@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import type { FieldValidation } from '@rjsf/utils';
|
||||
import type { FieldValidation } from '@rjsf/core';
|
||||
import {
|
||||
createScaffolderFieldExtension,
|
||||
FieldExtensionComponentProps,
|
||||
@@ -30,7 +30,7 @@ const TextValuePicker = (props: FieldExtensionComponentProps<string>) => {
|
||||
schema: { title, description },
|
||||
rawErrors,
|
||||
formData,
|
||||
uiSchema: { 'ui:autofocus': autoFocus } = {},
|
||||
uiSchema: { 'ui:autofocus': autoFocus },
|
||||
idSchema,
|
||||
placeholder,
|
||||
} = props;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const EntityNamePicker = (
|
||||
schema: { title = 'Name', description = 'Unique name of the component' },
|
||||
rawErrors,
|
||||
formData,
|
||||
uiSchema: { 'ui:autofocus': autoFocus } = {},
|
||||
uiSchema: { 'ui:autofocus': autoFocus },
|
||||
idSchema,
|
||||
placeholder,
|
||||
} = props;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FieldValidation } from '@rjsf/utils';
|
||||
import { FieldValidation } from '@rjsf/core';
|
||||
import { KubernetesValidatorFunctions } from '@backstage/catalog-model';
|
||||
import { entityNamePickerValidation } from './validation';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FieldValidation } from '@rjsf/utils';
|
||||
import { FieldValidation } from '@rjsf/core';
|
||||
import { KubernetesValidatorFunctions } from '@backstage/catalog-model';
|
||||
|
||||
export const entityNamePickerValidation = (
|
||||
|
||||
@@ -51,9 +51,9 @@ export const EntityTagsPicker = (
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
const [inputError, setInputError] = useState(false);
|
||||
const tagValidator = makeValidator().isValidTag;
|
||||
const kinds = uiSchema?.['ui:options']?.kinds;
|
||||
const showCounts = uiSchema?.['ui:options']?.showCounts;
|
||||
const helperText = uiSchema?.['ui:options']?.helperText;
|
||||
const kinds = uiSchema['ui:options']?.kinds;
|
||||
const showCounts = uiSchema['ui:options']?.showCounts;
|
||||
const helperText = uiSchema['ui:options']?.helperText;
|
||||
|
||||
const { loading, value: existingTags } = useAsync(async () => {
|
||||
const facet = 'metadata.tags';
|
||||
|
||||
@@ -59,12 +59,12 @@ export const OwnedEntityPicker = (
|
||||
formData,
|
||||
idSchema,
|
||||
} = props;
|
||||
const allowedKinds = uiSchema?.['ui:options']?.allowedKinds;
|
||||
const defaultKind = uiSchema?.['ui:options']?.defaultKind;
|
||||
const defaultNamespace = uiSchema?.['ui:options']?.defaultNamespace;
|
||||
|
||||
const allowedKinds = uiSchema['ui:options']?.allowedKinds;
|
||||
const defaultKind = uiSchema['ui:options']?.defaultKind;
|
||||
const defaultNamespace = uiSchema['ui:options']?.defaultNamespace;
|
||||
const allowArbitraryValues =
|
||||
uiSchema?.['ui:options']?.allowArbitraryValues ?? true;
|
||||
uiSchema['ui:options']?.allowArbitraryValues ?? true;
|
||||
const { ownedEntities, loading } = useOwnedEntities(allowedKinds);
|
||||
|
||||
const entityRefs = ownedEntities?.items
|
||||
|
||||
Reference in New Issue
Block a user