@rjsf/core 6.0.0-beta.7 → 6.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.umd.js +2 -3
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +2 -3
- package/dist/index.js.map +2 -2
- package/lib/components/fields/LayoutGridField.d.ts +0 -3
- package/lib/components/fields/LayoutGridField.d.ts.map +1 -1
- package/lib/components/fields/LayoutGridField.js +3 -6
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/components/fields/LayoutGridField.tsx +3 -6
package/dist/index.esm.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/Form.tsx", "../src/getDefaultRegistry.ts", "../src/components/fields/ArrayField.tsx", "../src/components/fields/BooleanField.tsx", "../src/components/fields/LayoutGridField.tsx", "../src/components/fields/LayoutHeaderField.tsx", "../src/components/fields/LayoutMultiSchemaField.tsx", "../src/components/fields/MultiSchemaField.tsx", "../src/components/fields/NumberField.tsx", "../src/components/fields/ObjectField.tsx", "../src/components/fields/SchemaField.tsx", "../src/components/fields/StringField.tsx", "../src/components/fields/NullField.tsx", "../src/components/fields/index.ts", "../src/components/templates/ArrayFieldDescriptionTemplate.tsx", "../src/components/templates/ArrayFieldItemTemplate.tsx", "../src/components/templates/ArrayFieldItemButtonsTemplate.tsx", "../src/components/templates/ArrayFieldTemplate.tsx", "../src/components/templates/ArrayFieldTitleTemplate.tsx", "../src/components/templates/BaseInputTemplate.tsx", "../src/components/templates/ButtonTemplates/SubmitButton.tsx", "../src/components/templates/ButtonTemplates/AddButton.tsx", "../src/components/templates/ButtonTemplates/IconButton.tsx", "../src/components/templates/ButtonTemplates/index.ts", "../src/components/RichDescription.tsx", "../src/components/templates/DescriptionField.tsx", "../src/components/templates/ErrorList.tsx", "../src/components/templates/FieldTemplate/FieldTemplate.tsx", "../src/components/templates/FieldTemplate/Label.tsx", "../src/components/templates/FieldTemplate/index.ts", "../src/components/templates/FieldErrorTemplate.tsx", "../src/components/templates/FieldHelpTemplate.tsx", "../src/components/templates/GridTemplate.tsx", "../src/components/templates/ObjectFieldTemplate.tsx", "../src/components/templates/TitleField.tsx", "../src/components/templates/UnsupportedField.tsx", "../src/components/templates/WrapIfAdditionalTemplate.tsx", "../src/components/templates/index.ts", "../src/components/widgets/AltDateWidget.tsx", "../src/components/widgets/AltDateTimeWidget.tsx", "../src/components/widgets/CheckboxWidget.tsx", "../src/components/widgets/CheckboxesWidget.tsx", "../src/components/widgets/ColorWidget.tsx", "../src/components/widgets/DateWidget.tsx", "../src/components/widgets/DateTimeWidget.tsx", "../src/components/widgets/EmailWidget.tsx", "../src/components/widgets/FileWidget.tsx", "../src/components/widgets/HiddenWidget.tsx", "../src/components/widgets/PasswordWidget.tsx", "../src/components/widgets/RadioWidget.tsx", "../src/components/widgets/RangeWidget.tsx", "../src/components/widgets/RatingWidget.tsx", "../src/components/widgets/SelectWidget.tsx", "../src/components/widgets/TextareaWidget.tsx", "../src/components/widgets/TextWidget.tsx", "../src/components/widgets/TimeWidget.tsx", "../src/components/widgets/URLWidget.tsx", "../src/components/widgets/UpDownWidget.tsx", "../src/components/widgets/index.ts", "../src/withTheme.tsx", "../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { Component, ElementType, FormEvent, ReactNode, Ref, RefObject, createRef } from 'react';\nimport {\n createSchemaUtils,\n CustomValidator,\n deepEquals,\n ErrorSchema,\n ErrorTransformer,\n FormContextType,\n GenericObjectType,\n getChangedFields,\n getTemplate,\n getUiOptions,\n IdSchema,\n isObject,\n mergeObjects,\n NAME_KEY,\n PathSchema,\n StrictRJSFSchema,\n Registry,\n RegistryFieldsType,\n RegistryWidgetsType,\n RJSFSchema,\n RJSFValidationError,\n RJSF_ADDITIONAL_PROPERTIES_FLAG,\n SchemaUtilsType,\n shouldRender,\n SUBMIT_BTN_OPTIONS_KEY,\n TemplatesType,\n toErrorList,\n UiSchema,\n UI_GLOBAL_OPTIONS_KEY,\n UI_OPTIONS_KEY,\n ValidationData,\n validationDataMerge,\n ValidatorType,\n Experimental_DefaultFormStateBehavior,\n Experimental_CustomMergeAllOf,\n createErrorHandler,\n unwrapErrorHandler,\n} from '@rjsf/utils';\nimport _forEach from 'lodash/forEach';\nimport _get from 'lodash/get';\nimport _isEmpty from 'lodash/isEmpty';\nimport _isNil from 'lodash/isNil';\nimport _pick from 'lodash/pick';\nimport _toPath from 'lodash/toPath';\n\nimport getDefaultRegistry from '../getDefaultRegistry';\n\n/** The properties that are passed to the `Form` */\nexport interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {\n /** The JSON schema object for the form */\n schema: S;\n /** An implementation of the `ValidatorType` interface that is needed for form validation to work */\n validator: ValidatorType<T, S, F>;\n /** The optional children for the form, if provided, it will replace the default `SubmitButton` */\n children?: ReactNode;\n /** The uiSchema for the form */\n uiSchema?: UiSchema<T, S, F>;\n /** The data for the form, used to prefill a form with existing data */\n formData?: T;\n // Form presentation and behavior modifiers\n /** You can provide a `formContext` object to the form, which is passed down to all fields and widgets. Useful for\n * implementing context aware fields and widgets.\n *\n * NOTE: Setting `{readonlyAsDisabled: false}` on the formContext will make the antd theme treat readOnly fields as\n * disabled.\n */\n formContext?: F;\n /** To avoid collisions with existing ids in the DOM, it is possible to change the prefix used for ids;\n * Default is `root`\n */\n idPrefix?: string;\n /** To avoid using a path separator that is present in field names, it is possible to change the separator used for\n * ids (Default is `_`)\n */\n idSeparator?: string;\n /** It's possible to disable the whole form by setting the `disabled` prop. The `disabled` prop is then forwarded down\n * to each field of the form. If you just want to disable some fields, see the `ui:disabled` parameter in `uiSchema`\n */\n disabled?: boolean;\n /** It's possible to make the whole form read-only by setting the `readonly` prop. The `readonly` prop is then\n * forwarded down to each field of the form. If you just want to make some fields read-only, see the `ui:readonly`\n * parameter in `uiSchema`\n */\n readonly?: boolean;\n // Form registry\n /** The dictionary of registered fields in the form */\n fields?: RegistryFieldsType<T, S, F>;\n /** The dictionary of registered templates in the form; Partial allows a subset to be provided beyond the defaults */\n templates?: Partial<Omit<TemplatesType<T, S, F>, 'ButtonTemplates'>> & {\n ButtonTemplates?: Partial<TemplatesType<T, S, F>['ButtonTemplates']>;\n };\n /** The dictionary of registered widgets in the form */\n widgets?: RegistryWidgetsType<T, S, F>;\n // Callbacks\n /** If you plan on being notified every time the form data are updated, you can pass an `onChange` handler, which will\n * receive the same args as `onSubmit` any time a value is updated in the form. Can also return the `id` of the field\n * that caused the change\n */\n onChange?: (data: IChangeEvent<T, S, F>, id?: string) => void;\n /** To react when submitted form data are invalid, pass an `onError` handler. It will be passed the list of\n * encountered errors\n */\n onError?: (errors: RJSFValidationError[]) => void;\n /** You can pass a function as the `onSubmit` prop of your `Form` component to listen to when the form is submitted\n * and its data are valid. It will be passed a result object having a `formData` attribute, which is the valid form\n * data you're usually after. The original event will also be passed as a second parameter\n */\n onSubmit?: (data: IChangeEvent<T, S, F>, event: FormEvent<any>) => void;\n /** Sometimes you may want to trigger events or modify external state when a field has been touched, so you can pass\n * an `onBlur` handler, which will receive the id of the input that was blurred and the field value\n */\n onBlur?: (id: string, data: any) => void;\n /** Sometimes you may want to trigger events or modify external state when a field has been focused, so you can pass\n * an `onFocus` handler, which will receive the id of the input that is focused and the field value\n */\n onFocus?: (id: string, data: any) => void;\n /** The value of this prop will be passed to the `accept-charset` HTML attribute on the form */\n acceptCharset?: string;\n /** The value of this prop will be passed to the `action` HTML attribute on the form\n *\n * NOTE: this just renders the `action` attribute in the HTML markup. There is no real network request being sent to\n * this `action` on submit. Instead, react-jsonschema-form catches the submit event with `event.preventDefault()`\n * and then calls the `onSubmit` function, where you could send a request programmatically with `fetch` or similar.\n */\n action?: string;\n /** The value of this prop will be passed to the `autocomplete` HTML attribute on the form */\n autoComplete?: string;\n /** The value of this prop will be passed to the `class` HTML attribute on the form */\n className?: string;\n /** The value of this prop will be passed to the `enctype` HTML attribute on the form */\n enctype?: string;\n /** The value of this prop will be passed to the `id` HTML attribute on the form */\n id?: string;\n /** The value of this prop will be passed to the `name` HTML attribute on the form */\n name?: string;\n /** The value of this prop will be passed to the `method` HTML attribute on the form */\n method?: string;\n /** It's possible to change the default `form` tag name to a different HTML tag, which can be helpful if you are\n * nesting forms. However, native browser form behaviour, such as submitting when the `Enter` key is pressed, may no\n * longer work\n */\n tagName?: ElementType;\n /** The value of this prop will be passed to the `target` HTML attribute on the form */\n target?: string;\n // Errors and validation\n /** Formerly the `validate` prop; Takes a function that specifies custom validation rules for the form */\n customValidate?: CustomValidator<T, S, F>;\n /** This prop allows passing in custom errors that are augmented with the existing JSON Schema errors on the form; it\n * can be used to implement asynchronous validation. By default, these are non-blocking errors, meaning that you can\n * still submit the form when these are the only errors displayed to the user.\n */\n extraErrors?: ErrorSchema<T>;\n /** If set to true, causes the `extraErrors` to become blocking when the form is submitted */\n extraErrorsBlockSubmit?: boolean;\n /** If set to true, turns off HTML5 validation on the form; Set to `false` by default */\n noHtml5Validate?: boolean;\n /** If set to true, turns off all validation. Set to `false` by default\n *\n * @deprecated - In a future release, this switch may be replaced by making `validator` prop optional\n */\n noValidate?: boolean;\n /** If set to true, the form will perform validation and show any validation errors whenever the form data is changed,\n * rather than just on submit\n */\n liveValidate?: boolean;\n /** If `omitExtraData` and `liveOmit` are both set to true, then extra form data values that are not in any form field\n * will be removed whenever `onChange` is called. Set to `false` by default\n */\n liveOmit?: boolean;\n /** If set to true, then extra form data values that are not in any form field will be removed whenever `onSubmit` is\n * called. Set to `false` by default.\n */\n omitExtraData?: boolean;\n /** When this prop is set to `top` or 'bottom', a list of errors (or the custom error list defined in the `ErrorList`) will also\n * show. When set to false, only inline input validation errors will be shown. Set to `top` by default\n */\n showErrorList?: false | 'top' | 'bottom';\n /** A function can be passed to this prop in order to make modifications to the default errors resulting from JSON\n * Schema validation\n */\n transformErrors?: ErrorTransformer<T, S, F>;\n /** If set to true, then the first field with an error will receive the focus when the form is submitted with errors\n */\n focusOnFirstError?: boolean | ((error: RJSFValidationError) => void);\n /** Optional string translation function, if provided, allows users to change the translation of the RJSF internal\n * strings. Some strings contain replaceable parameter values as indicated by `%1`, `%2`, etc. The number after the\n * `%` indicates the order of the parameter. The ordering of parameters is important because some languages may choose\n * to put the second parameter before the first in its translation.\n */\n translateString?: Registry['translateString'];\n /** Optional configuration object with flags, if provided, allows users to override default form state behavior\n * Currently only affecting minItems on array fields and handling of setting defaults based on the value of\n * `emptyObjectFields`\n */\n experimental_defaultFormStateBehavior?: Experimental_DefaultFormStateBehavior;\n /** Optional function that allows for custom merging of `allOf` schemas\n */\n experimental_customMergeAllOf?: Experimental_CustomMergeAllOf<S>;\n // Private\n /**\n * _internalFormWrapper is currently used by the semantic-ui theme to provide a custom wrapper around `<Form />`\n * that supports the proper rendering of those themes. To use this prop, one must pass a component that takes two\n * props: `children` and `as`. That component, at minimum, should render the `children` inside of a <form /> tag\n * unless `as` is provided, in which case, use the `as` prop in place of `<form />`.\n * i.e.:\n * ```\n * export default function InternalForm({ children, as }) {\n * const FormTag = as || 'form';\n * return <FormTag>{children}</FormTag>;\n * }\n * ```\n *\n * Use at your own risk as this prop is private and may change at any time without notice.\n */\n _internalFormWrapper?: ElementType;\n /** Support receiving a React ref to the Form\n */\n ref?: Ref<Form<T, S, F>>;\n}\n\n/** The data that is contained within the state for the `Form` */\nexport interface FormState<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {\n /** The JSON schema object for the form */\n schema: S;\n /** The uiSchema for the form */\n uiSchema: UiSchema<T, S, F>;\n /** The `IdSchema` for the form, computed from the `schema`, the `rootFieldId`, the `formData` and the `idPrefix` and\n * `idSeparator` props.\n */\n idSchema: IdSchema<T>;\n /** The schemaUtils implementation used by the `Form`, created from the `validator` and the `schema` */\n schemaUtils: SchemaUtilsType<T, S, F>;\n /** The current data for the form, computed from the `formData` prop and the changes made by the user */\n formData?: T;\n /** Flag indicating whether the form is in edit mode, true when `formData` is passed to the form, otherwise false */\n edit: boolean;\n /** The current list of errors for the form, includes `extraErrors` */\n errors: RJSFValidationError[];\n /** The current errors, in `ErrorSchema` format, for the form, includes `extraErrors` */\n errorSchema: ErrorSchema<T>;\n /** The current list of errors for the form directly from schema validation, does NOT include `extraErrors` */\n schemaValidationErrors: RJSFValidationError[];\n /** The current errors, in `ErrorSchema` format, for the form directly from schema validation, does NOT include\n * `extraErrors`\n */\n schemaValidationErrorSchema: ErrorSchema<T>;\n // Private\n /** @description result of schemaUtils.retrieveSchema(schema, formData). This a memoized value to avoid re calculate at internal functions (getStateFromProps, onChange) */\n retrievedSchema: S;\n}\n\n/** The event data passed when changes have been made to the form, includes everything from the `FormState` except\n * the schema validation errors. An additional `status` is added when returned from `onSubmit`\n */\nexport interface IChangeEvent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>\n extends Omit<FormState<T, S, F>, 'schemaValidationErrors' | 'schemaValidationErrorSchema'> {\n /** The status of the form when submitted */\n status?: 'submitted';\n}\n\n/** The `Form` component renders the outer form and all the fields defined in the `schema` */\nexport default class Form<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> extends Component<FormProps<T, S, F>, FormState<T, S, F>> {\n /** The ref used to hold the `form` element, this needs to be `any` because `tagName` or `_internalFormWrapper` can\n * provide any possible type here\n */\n formElement: RefObject<any>;\n\n /** Constructs the `Form` from the `props`. Will setup the initial state from the props. It will also call the\n * `onChange` handler if the initially provided `formData` is modified to add missing default values as part of the\n * state construction.\n *\n * @param props - The initial props for the `Form`\n */\n constructor(props: FormProps<T, S, F>) {\n super(props);\n\n if (!props.validator) {\n throw new Error('A validator is required for Form functionality to work');\n }\n\n this.state = this.getStateFromProps(props, props.formData);\n if (this.props.onChange && !deepEquals(this.state.formData, this.props.formData)) {\n this.props.onChange(this.state);\n }\n this.formElement = createRef();\n }\n\n /**\n * `getSnapshotBeforeUpdate` is a React lifecycle method that is invoked right before the most recently rendered\n * output is committed to the DOM. It enables your component to capture current values (e.g., scroll position) before\n * they are potentially changed.\n *\n * In this case, it checks if the props have changed since the last render. If they have, it computes the next state\n * of the component using `getStateFromProps` method and returns it along with a `shouldUpdate` flag set to `true` IF\n * the `nextState` and `prevState` are different, otherwise `false`. This ensures that we have the most up-to-date\n * state ready to be applied in `componentDidUpdate`.\n *\n * If `formData` hasn't changed, it simply returns an object with `shouldUpdate` set to `false`, indicating that a\n * state update is not necessary.\n *\n * @param prevProps - The previous set of props before the update.\n * @param prevState - The previous state before the update.\n * @returns Either an object containing the next state and a flag indicating that an update should occur, or an object\n * with a flag indicating that an update is not necessary.\n */\n getSnapshotBeforeUpdate(\n prevProps: FormProps<T, S, F>,\n prevState: FormState<T, S, F>,\n ): { nextState: FormState<T, S, F>; shouldUpdate: true } | { shouldUpdate: false } {\n if (!deepEquals(this.props, prevProps)) {\n const formDataChangedFields = getChangedFields(this.props.formData, prevProps.formData);\n const isSchemaChanged = !deepEquals(prevProps.schema, this.props.schema);\n // When formData is not an object, getChangedFields returns an empty array.\n // In this case, deepEquals is most needed to check again.\n const isFormDataChanged =\n formDataChangedFields.length > 0 || !deepEquals(prevProps.formData, this.props.formData);\n const nextState = this.getStateFromProps(\n this.props,\n this.props.formData,\n // If the `schema` has changed, we need to update the retrieved schema.\n // Or if the `formData` changes, for example in the case of a schema with dependencies that need to\n // match one of the subSchemas, the retrieved schema must be updated.\n isSchemaChanged || isFormDataChanged ? undefined : this.state.retrievedSchema,\n isSchemaChanged,\n formDataChangedFields,\n );\n const shouldUpdate = !deepEquals(nextState, prevState);\n return { nextState, shouldUpdate };\n }\n return { shouldUpdate: false };\n }\n\n /**\n * `componentDidUpdate` is a React lifecycle method that is invoked immediately after updating occurs. This method is\n * not called for the initial render.\n *\n * Here, it checks if an update is necessary based on the `shouldUpdate` flag received from `getSnapshotBeforeUpdate`.\n * If an update is required, it applies the next state and, if needed, triggers the `onChange` handler to inform about\n * changes.\n *\n * @param _ - The previous set of props.\n * @param prevState - The previous state of the component before the update.\n * @param snapshot - The value returned from `getSnapshotBeforeUpdate`.\n */\n componentDidUpdate(\n _: FormProps<T, S, F>,\n prevState: FormState<T, S, F>,\n snapshot: { nextState: FormState<T, S, F>; shouldUpdate: true } | { shouldUpdate: false },\n ) {\n if (snapshot.shouldUpdate) {\n const { nextState } = snapshot;\n\n if (\n !deepEquals(nextState.formData, this.props.formData) &&\n !deepEquals(nextState.formData, prevState.formData) &&\n this.props.onChange\n ) {\n this.props.onChange(nextState);\n }\n this.setState(nextState);\n }\n }\n\n /** Extracts the updated state from the given `props` and `inputFormData`. As part of this process, the\n * `inputFormData` is first processed to add any missing required defaults. After that, the data is run through the\n * validation process IF required by the `props`.\n *\n * @param props - The props passed to the `Form`\n * @param inputFormData - The new or current data for the `Form`\n * @param retrievedSchema - An expanded schema, if not provided, it will be retrieved from the `schema` and `formData`.\n * @param isSchemaChanged - A flag indicating whether the schema has changed.\n * @param formDataChangedFields - The changed fields of `formData`\n * @returns - The new state for the `Form`\n */\n getStateFromProps(\n props: FormProps<T, S, F>,\n inputFormData?: T,\n retrievedSchema?: S,\n isSchemaChanged = false,\n formDataChangedFields: string[] = [],\n ): FormState<T, S, F> {\n const state: FormState<T, S, F> = this.state || {};\n const schema = 'schema' in props ? props.schema : this.props.schema;\n const uiSchema: UiSchema<T, S, F> = ('uiSchema' in props ? props.uiSchema! : this.props.uiSchema!) || {};\n const edit = typeof inputFormData !== 'undefined';\n const liveValidate = 'liveValidate' in props ? props.liveValidate : this.props.liveValidate;\n const mustValidate = edit && !props.noValidate && liveValidate;\n const rootSchema = schema;\n const experimental_defaultFormStateBehavior =\n 'experimental_defaultFormStateBehavior' in props\n ? props.experimental_defaultFormStateBehavior\n : this.props.experimental_defaultFormStateBehavior;\n const experimental_customMergeAllOf =\n 'experimental_customMergeAllOf' in props\n ? props.experimental_customMergeAllOf\n : this.props.experimental_customMergeAllOf;\n let schemaUtils: SchemaUtilsType<T, S, F> = state.schemaUtils;\n if (\n !schemaUtils ||\n schemaUtils.doesSchemaUtilsDiffer(\n props.validator,\n rootSchema,\n experimental_defaultFormStateBehavior,\n experimental_customMergeAllOf,\n )\n ) {\n schemaUtils = createSchemaUtils<T, S, F>(\n props.validator,\n rootSchema,\n experimental_defaultFormStateBehavior,\n experimental_customMergeAllOf,\n );\n }\n const formData: T = schemaUtils.getDefaultFormState(schema, inputFormData) as T;\n const _retrievedSchema = this.updateRetrievedSchema(\n retrievedSchema ?? schemaUtils.retrieveSchema(schema, formData),\n );\n\n const getCurrentErrors = (): ValidationData<T> => {\n // If the `props.noValidate` option is set or the schema has changed, we reset the error state.\n if (props.noValidate || isSchemaChanged) {\n return { errors: [], errorSchema: {} };\n } else if (!props.liveValidate) {\n return {\n errors: state.schemaValidationErrors || [],\n errorSchema: state.schemaValidationErrorSchema || {},\n };\n }\n return {\n errors: state.errors || [],\n errorSchema: state.errorSchema || {},\n };\n };\n\n let errors: RJSFValidationError[];\n let errorSchema: ErrorSchema<T> | undefined;\n let schemaValidationErrors: RJSFValidationError[] = state.schemaValidationErrors;\n let schemaValidationErrorSchema: ErrorSchema<T> = state.schemaValidationErrorSchema;\n if (mustValidate) {\n const schemaValidation = this.validate(formData, schema, schemaUtils, _retrievedSchema);\n errors = schemaValidation.errors;\n // If retrievedSchema is undefined which means the schema or formData has changed, we do not merge state.\n // Else in the case where it hasn't changed, we merge 'state.errorSchema' with 'schemaValidation.errorSchema.' This done to display the raised field error.\n if (retrievedSchema === undefined) {\n errorSchema = schemaValidation.errorSchema;\n } else {\n errorSchema = mergeObjects(\n this.state?.errorSchema,\n schemaValidation.errorSchema,\n 'preventDuplicates',\n ) as ErrorSchema<T>;\n }\n schemaValidationErrors = errors;\n schemaValidationErrorSchema = errorSchema;\n } else {\n const currentErrors = getCurrentErrors();\n errors = currentErrors.errors;\n errorSchema = currentErrors.errorSchema;\n if (formDataChangedFields.length > 0) {\n const newErrorSchema = formDataChangedFields.reduce(\n (acc, key) => {\n acc[key] = undefined;\n return acc;\n },\n {} as Record<string, undefined>,\n );\n errorSchema = schemaValidationErrorSchema = mergeObjects(\n currentErrors.errorSchema,\n newErrorSchema,\n 'preventDuplicates',\n ) as ErrorSchema<T>;\n }\n }\n\n if (props.extraErrors) {\n const merged = validationDataMerge({ errorSchema, errors }, props.extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n const idSchema = schemaUtils.toIdSchema(\n _retrievedSchema,\n uiSchema['ui:rootFieldId'],\n formData,\n props.idPrefix,\n props.idSeparator,\n );\n const nextState: FormState<T, S, F> = {\n schemaUtils,\n schema,\n uiSchema,\n idSchema,\n formData,\n edit,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n retrievedSchema: _retrievedSchema,\n };\n return nextState;\n }\n\n /** React lifecycle method that is used to determine whether component should be updated.\n *\n * @param nextProps - The next version of the props\n * @param nextState - The next version of the state\n * @returns - True if the component should be updated, false otherwise\n */\n shouldComponentUpdate(nextProps: FormProps<T, S, F>, nextState: FormState<T, S, F>): boolean {\n return shouldRender(this, nextProps, nextState);\n }\n\n /** Gets the previously raised customValidate errors.\n *\n * @returns the previous customValidate errors\n */\n private getPreviousCustomValidateErrors(): ErrorSchema<T> {\n const { customValidate, uiSchema } = this.props;\n const prevFormData = this.state.formData as T;\n let customValidateErrors = {};\n if (typeof customValidate === 'function') {\n const errorHandler = customValidate(prevFormData, createErrorHandler<T>(prevFormData), uiSchema);\n const userErrorSchema = unwrapErrorHandler<T>(errorHandler);\n customValidateErrors = userErrorSchema;\n }\n return customValidateErrors;\n }\n\n /** Validates the `formData` against the `schema` using the `altSchemaUtils` (if provided otherwise it uses the\n * `schemaUtils` in the state), returning the results.\n *\n * @param formData - The new form data to validate\n * @param schema - The schema used to validate against\n * @param altSchemaUtils - The alternate schemaUtils to use for validation\n */\n validate(\n formData: T | undefined,\n schema = this.props.schema,\n altSchemaUtils?: SchemaUtilsType<T, S, F>,\n retrievedSchema?: S,\n ): ValidationData<T> {\n const schemaUtils = altSchemaUtils ? altSchemaUtils : this.state.schemaUtils;\n const { customValidate, transformErrors, uiSchema } = this.props;\n const resolvedSchema = retrievedSchema ?? schemaUtils.retrieveSchema(schema, formData);\n return schemaUtils\n .getValidator()\n .validateFormData(formData, resolvedSchema, customValidate, transformErrors, uiSchema);\n }\n\n /** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */\n renderErrors(registry: Registry<T, S, F>) {\n const { errors, errorSchema, schema, uiSchema } = this.state;\n const { formContext } = this.props;\n const options = getUiOptions<T, S, F>(uiSchema);\n const ErrorListTemplate = getTemplate<'ErrorListTemplate', T, S, F>('ErrorListTemplate', registry, options);\n\n if (errors && errors.length) {\n return (\n <ErrorListTemplate\n errors={errors}\n errorSchema={errorSchema || {}}\n schema={schema}\n uiSchema={uiSchema}\n formContext={formContext}\n registry={registry}\n />\n );\n }\n return null;\n }\n\n /** Returns the `formData` with only the elements specified in the `fields` list\n *\n * @param formData - The data for the `Form`\n * @param fields - The fields to keep while filtering\n */\n getUsedFormData = (formData: T | undefined, fields: string[][]): T | undefined => {\n // For the case of a single input form\n if (fields.length === 0 && typeof formData !== 'object') {\n return formData;\n }\n\n // _pick has incorrect type definition, it works with string[][], because lodash/hasIn supports it\n const data: GenericObjectType = _pick(formData, fields as unknown as string[]);\n if (Array.isArray(formData)) {\n return Object.keys(data).map((key: string) => data[key]) as unknown as T;\n }\n\n return data as T;\n };\n\n /** Returns the list of field names from inspecting the `pathSchema` as well as using the `formData`\n *\n * @param pathSchema - The `PathSchema` object for the form\n * @param [formData] - The form data to use while checking for empty objects/arrays\n */\n getFieldNames = (pathSchema: PathSchema<T>, formData?: T): string[][] => {\n const getAllPaths = (_obj: GenericObjectType, acc: string[][] = [], paths: string[][] = [[]]) => {\n Object.keys(_obj).forEach((key: string) => {\n if (typeof _obj[key] === 'object') {\n const newPaths = paths.map((path) => [...path, key]);\n // If an object is marked with additionalProperties, all its keys are valid\n if (_obj[key][RJSF_ADDITIONAL_PROPERTIES_FLAG] && _obj[key][NAME_KEY] !== '') {\n acc.push(_obj[key][NAME_KEY]);\n } else {\n getAllPaths(_obj[key], acc, newPaths);\n }\n } else if (key === NAME_KEY && _obj[key] !== '') {\n paths.forEach((path) => {\n const formValue = _get(formData, path);\n // adds path to fieldNames if it points to a value\n // or an empty object/array\n if (\n typeof formValue !== 'object' ||\n _isEmpty(formValue) ||\n (Array.isArray(formValue) && formValue.every((val) => typeof val !== 'object'))\n ) {\n acc.push(path);\n }\n });\n }\n });\n return acc;\n };\n\n return getAllPaths(pathSchema);\n };\n\n /** Returns the `formData` after filtering to remove any extra data not in a form field\n *\n * @param formData - The data for the `Form`\n * @returns The `formData` after omitting extra data\n */\n omitExtraData = (formData?: T): T | undefined => {\n const { schema, schemaUtils } = this.state;\n const retrievedSchema = schemaUtils.retrieveSchema(schema, formData);\n const pathSchema = schemaUtils.toPathSchema(retrievedSchema, '', formData);\n const fieldNames = this.getFieldNames(pathSchema, formData);\n const newFormData = this.getUsedFormData(formData, fieldNames);\n return newFormData;\n };\n\n // Filtering errors based on your retrieved schema to only show errors for properties in the selected branch.\n private filterErrorsBasedOnSchema(schemaErrors: ErrorSchema<T>, resolvedSchema?: S, formData?: any): ErrorSchema<T> {\n const { retrievedSchema, schemaUtils } = this.state;\n const _retrievedSchema = resolvedSchema ?? retrievedSchema;\n const pathSchema = schemaUtils.toPathSchema(_retrievedSchema, '', formData);\n const fieldNames = this.getFieldNames(pathSchema, formData);\n const filteredErrors: ErrorSchema<T> = _pick(schemaErrors, fieldNames as unknown as string[]);\n // If the root schema is of a primitive type, do not filter out the __errors\n if (resolvedSchema?.type !== 'object' && resolvedSchema?.type !== 'array') {\n filteredErrors.__errors = schemaErrors.__errors;\n }\n\n const prevCustomValidateErrors = this.getPreviousCustomValidateErrors();\n // Filtering out the previous raised customValidate errors so that they are cleared when no longer valid.\n const filterPreviousCustomErrors = (errors: string[] = [], prevCustomErrors: string[]) => {\n if (errors.length === 0) {\n return errors;\n }\n\n return errors.filter((error) => {\n return !prevCustomErrors.includes(error);\n });\n };\n\n // Removing undefined, null and empty errors.\n const filterNilOrEmptyErrors = (errors: any, previousCustomValidateErrors: any = {}): ErrorSchema<T> => {\n _forEach(errors, (errorAtKey: ErrorSchema<T>['__errors'] | undefined, errorKey: keyof typeof errors) => {\n const prevCustomValidateErrorAtKey: ErrorSchema<T> | undefined = previousCustomValidateErrors[errorKey];\n if (_isNil(errorAtKey) || (Array.isArray(errorAtKey) && errorAtKey.length === 0)) {\n delete errors[errorKey];\n } else if (\n isObject(errorAtKey) &&\n isObject(prevCustomValidateErrorAtKey) &&\n Array.isArray(prevCustomValidateErrorAtKey?.__errors)\n ) {\n // if previous customValidate error is an object and has __errors array, filter out the errors previous customValidate errors.\n errors[errorKey] = filterPreviousCustomErrors(errorAtKey.__errors, prevCustomValidateErrorAtKey.__errors);\n } else if (typeof errorAtKey === 'object' && !Array.isArray(errorAtKey.__errors)) {\n filterNilOrEmptyErrors(errorAtKey, previousCustomValidateErrors[errorKey]);\n }\n });\n return errors;\n };\n return filterNilOrEmptyErrors(filteredErrors, prevCustomValidateErrors);\n }\n\n /** Function to handle changes made to a field in the `Form`. This handler receives an entirely new copy of the\n * `formData` along with a new `ErrorSchema`. It will first update the `formData` with any missing default fields and\n * then, if `omitExtraData` and `liveOmit` are turned on, the `formData` will be filtered to remove any extra data not\n * in a form field. Then, the resulting formData will be validated if required. The state will be updated with the new\n * updated (potentially filtered) `formData`, any errors that resulted from validation. Finally the `onChange`\n * callback will be called if specified with the updated state.\n *\n * @param formData - The new form data from a change to a field\n * @param newErrorSchema - The new `ErrorSchema` based on the field change\n * @param id - The id of the field that caused the change\n */\n onChange = (formData: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { extraErrors, omitExtraData, liveOmit, noValidate, liveValidate, onChange } = this.props;\n const { schemaUtils, schema } = this.state;\n\n let retrievedSchema = this.state.retrievedSchema;\n if (isObject(formData) || Array.isArray(formData)) {\n const newState = this.getStateFromProps(this.props, formData);\n formData = newState.formData;\n retrievedSchema = newState.retrievedSchema;\n }\n\n const mustValidate = !noValidate && liveValidate;\n let state: Partial<FormState<T, S, F>> = { formData, schema };\n let newFormData = formData;\n\n if (omitExtraData === true && liveOmit === true) {\n newFormData = this.omitExtraData(formData);\n state = {\n formData: newFormData,\n };\n }\n\n if (mustValidate) {\n const schemaValidation = this.validate(newFormData, schema, schemaUtils, retrievedSchema);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (extraErrors) {\n const merged = validationDataMerge(schemaValidation, extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n // Merging 'newErrorSchema' into 'errorSchema' to display the custom raised errors.\n if (newErrorSchema) {\n const filteredErrors = this.filterErrorsBasedOnSchema(newErrorSchema, retrievedSchema, newFormData);\n errorSchema = mergeObjects(errorSchema, filteredErrors, 'preventDuplicates') as ErrorSchema<T>;\n }\n state = {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n };\n } else if (!noValidate && newErrorSchema) {\n const errorSchema = extraErrors\n ? (mergeObjects(newErrorSchema, extraErrors, 'preventDuplicates') as ErrorSchema<T>)\n : newErrorSchema;\n state = {\n formData: newFormData,\n errorSchema: errorSchema,\n errors: toErrorList(errorSchema),\n };\n }\n this.setState(state as FormState<T, S, F>, () => onChange && onChange({ ...this.state, ...state }, id));\n };\n\n /**\n * If the retrievedSchema has changed the new retrievedSchema is returned.\n * Otherwise, the old retrievedSchema is returned to persist reference.\n * - This ensures that AJV retrieves the schema from the cache when it has not changed,\n * avoiding the performance cost of recompiling the schema.\n *\n * @param retrievedSchema The new retrieved schema.\n * @returns The new retrieved schema if it has changed, else the old retrieved schema.\n */\n private updateRetrievedSchema(retrievedSchema: S) {\n const isTheSame = deepEquals(retrievedSchema, this.state?.retrievedSchema);\n return isTheSame ? this.state.retrievedSchema : retrievedSchema;\n }\n\n /**\n * Callback function to handle reset form data.\n * - Reset all fields with default values.\n * - Reset validations and errors\n *\n */\n reset = () => {\n const { onChange } = this.props;\n const newState = this.getStateFromProps(this.props, undefined);\n const newFormData = newState.formData;\n const state = {\n formData: newFormData,\n errorSchema: {},\n errors: [] as unknown,\n schemaValidationErrors: [] as unknown,\n schemaValidationErrorSchema: {},\n } as FormState<T, S, F>;\n\n this.setState(state, () => onChange && onChange({ ...this.state, ...state }));\n };\n\n /** Callback function to handle when a field on the form is blurred. Calls the `onBlur` callback for the `Form` if it\n * was provided.\n *\n * @param id - The unique `id` of the field that was blurred\n * @param data - The data associated with the field that was blurred\n */\n onBlur = (id: string, data: any) => {\n const { onBlur } = this.props;\n if (onBlur) {\n onBlur(id, data);\n }\n };\n\n /** Callback function to handle when a field on the form is focused. Calls the `onFocus` callback for the `Form` if it\n * was provided.\n *\n * @param id - The unique `id` of the field that was focused\n * @param data - The data associated with the field that was focused\n */\n onFocus = (id: string, data: any) => {\n const { onFocus } = this.props;\n if (onFocus) {\n onFocus(id, data);\n }\n };\n\n /** Callback function to handle when the form is submitted. First, it prevents the default event behavior. Nothing\n * happens if the target and currentTarget of the event are not the same. It will omit any extra data in the\n * `formData` in the state if `omitExtraData` is true. It will validate the resulting `formData`, reporting errors\n * via the `onError()` callback unless validation is disabled. Finally, it will add in any `extraErrors` and then call\n * back the `onSubmit` callback if it was provided.\n *\n * @param event - The submit HTML form event\n */\n onSubmit = (event: FormEvent<any>) => {\n event.preventDefault();\n if (event.target !== event.currentTarget) {\n return;\n }\n\n event.persist();\n const { omitExtraData, extraErrors, noValidate, onSubmit } = this.props;\n let { formData: newFormData } = this.state;\n\n if (omitExtraData === true) {\n newFormData = this.omitExtraData(newFormData);\n }\n\n if (noValidate || this.validateFormWithFormData(newFormData)) {\n // There are no errors generated through schema validation.\n // Check for user provided errors and update state accordingly.\n const errorSchema = extraErrors || {};\n const errors = extraErrors ? toErrorList(extraErrors) : [];\n this.setState(\n {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n },\n () => {\n if (onSubmit) {\n onSubmit({ ...this.state, formData: newFormData, status: 'submitted' }, event);\n }\n },\n );\n }\n };\n\n /** Returns the registry for the form */\n getRegistry(): Registry<T, S, F> {\n const { translateString: customTranslateString, uiSchema = {} } = this.props;\n const { schemaUtils } = this.state;\n const { fields, templates, widgets, formContext, translateString } = getDefaultRegistry<T, S, F>();\n return {\n fields: { ...fields, ...this.props.fields },\n templates: {\n ...templates,\n ...this.props.templates,\n ButtonTemplates: {\n ...templates.ButtonTemplates,\n ...this.props.templates?.ButtonTemplates,\n },\n },\n widgets: { ...widgets, ...this.props.widgets },\n rootSchema: this.props.schema,\n formContext: this.props.formContext || formContext,\n schemaUtils,\n translateString: customTranslateString || translateString,\n globalUiOptions: uiSchema[UI_GLOBAL_OPTIONS_KEY],\n };\n }\n\n /** Provides a function that can be used to programmatically submit the `Form` */\n submit = () => {\n if (this.formElement.current) {\n const submitCustomEvent = new CustomEvent('submit', {\n cancelable: true,\n });\n submitCustomEvent.preventDefault();\n this.formElement.current.dispatchEvent(submitCustomEvent);\n this.formElement.current.requestSubmit();\n }\n };\n\n /** Attempts to focus on the field associated with the `error`. Uses the `property` field to compute path of the error\n * field, then, using the `idPrefix` and `idSeparator` converts that path into an id. Then the input element with that\n * id is attempted to be found using the `formElement` ref. If it is located, then it is focused.\n *\n * @param error - The error on which to focus\n */\n focusOnError(error: RJSFValidationError) {\n const { idPrefix = 'root', idSeparator = '_' } = this.props;\n const { property } = error;\n const path = _toPath(property);\n if (path[0] === '') {\n // Most of the time the `.foo` property results in the first element being empty, so replace it with the idPrefix\n path[0] = idPrefix;\n } else {\n // Otherwise insert the idPrefix into the first location using unshift\n path.unshift(idPrefix);\n }\n\n const elementId = path.join(idSeparator);\n let field = this.formElement.current.elements[elementId];\n if (!field) {\n // if not an exact match, try finding an input starting with the element id (like radio buttons or checkboxes)\n field = this.formElement.current.querySelector(`input[id^=\"${elementId}\"`);\n }\n if (field && field.length) {\n // If we got a list with length > 0\n field = field[0];\n }\n if (field) {\n field.focus();\n }\n }\n\n /** Validates the form using the given `formData`. For use on form submission or on programmatic validation.\n * If `onError` is provided, then it will be called with the list of errors.\n *\n * @param formData - The form data to validate\n * @returns - True if the form is valid, false otherwise.\n */\n validateFormWithFormData = (formData?: T): boolean => {\n const { extraErrors, extraErrorsBlockSubmit, focusOnFirstError, onError } = this.props;\n const { errors: prevErrors } = this.state;\n const schemaValidation = this.validate(formData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n const hasError = errors.length > 0 || (extraErrors && extraErrorsBlockSubmit);\n if (hasError) {\n if (extraErrors) {\n const merged = validationDataMerge(schemaValidation, extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n if (focusOnFirstError) {\n if (typeof focusOnFirstError === 'function') {\n focusOnFirstError(errors[0]);\n } else {\n this.focusOnError(errors[0]);\n }\n }\n this.setState(\n {\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n },\n () => {\n if (onError) {\n onError(errors);\n } else {\n console.error('Form validation failed', errors);\n }\n },\n );\n } else if (prevErrors.length > 0) {\n this.setState({\n errors: [],\n errorSchema: {},\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n });\n }\n return !hasError;\n };\n\n /** Programmatically validate the form. If `omitExtraData` is true, the `formData` will first be filtered to remove\n * any extra data not in a form field. If `onError` is provided, then it will be called with the list of errors the\n * same way as would happen on form submission.\n *\n * @returns - True if the form is valid, false otherwise.\n */\n validateForm() {\n const { omitExtraData } = this.props;\n let { formData: newFormData } = this.state;\n if (omitExtraData === true) {\n newFormData = this.omitExtraData(newFormData);\n }\n return this.validateFormWithFormData(newFormData);\n }\n\n /** Renders the `Form` fields inside the <form> | `tagName` or `_internalFormWrapper`, rendering any errors if\n * needed along with the submit button or any children of the form.\n */\n render() {\n const {\n children,\n id,\n idPrefix,\n idSeparator,\n className = '',\n tagName,\n name,\n method,\n target,\n action,\n autoComplete,\n enctype,\n acceptCharset,\n noHtml5Validate = false,\n disabled,\n readonly,\n formContext,\n showErrorList = 'top',\n _internalFormWrapper,\n } = this.props;\n\n const { schema, uiSchema, formData, errorSchema, idSchema } = this.state;\n const registry = this.getRegistry();\n const { SchemaField: _SchemaField } = registry.fields;\n const { SubmitButton } = registry.templates.ButtonTemplates;\n // The `semantic-ui` and `material-ui` themes have `_internalFormWrapper`s that take an `as` prop that is the\n // PropTypes.elementType to use for the inner tag, so we'll need to pass `tagName` along if it is provided.\n // NOTE, the `as` prop is native to `semantic-ui` and is emulated in the `material-ui` theme\n const as = _internalFormWrapper ? tagName : undefined;\n const FormTag = _internalFormWrapper || tagName || 'form';\n\n let { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions = {} } = getUiOptions<T, S, F>(uiSchema);\n if (disabled) {\n submitOptions = { ...submitOptions, props: { ...submitOptions.props, disabled: true } };\n }\n const submitUiSchema = { [UI_OPTIONS_KEY]: { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions } };\n\n return (\n <FormTag\n className={className ? className : 'rjsf'}\n id={id}\n name={name}\n method={method}\n target={target}\n action={action}\n autoComplete={autoComplete}\n encType={enctype}\n acceptCharset={acceptCharset}\n noValidate={noHtml5Validate}\n onSubmit={this.onSubmit}\n as={as}\n ref={this.formElement}\n >\n {showErrorList === 'top' && this.renderErrors(registry)}\n <_SchemaField\n name=''\n schema={schema}\n uiSchema={uiSchema}\n errorSchema={errorSchema}\n idSchema={idSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formContext={formContext}\n formData={formData}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n />\n\n {children ? children : <SubmitButton uiSchema={submitUiSchema} registry={registry} />}\n {showErrorList === 'bottom' && this.renderErrors(registry)}\n </FormTag>\n );\n }\n}\n", "import { englishStringTranslator, FormContextType, Registry, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport fields from './components/fields';\nimport templates from './components/templates';\nimport widgets from './components/widgets';\n\n/** The default registry consists of all the fields, templates and widgets provided in the core implementation,\n * plus an empty `rootSchema` and `formContext. We omit schemaUtils here because it cannot be defaulted without a\n * rootSchema and validator. It will be added into the computed registry later in the Form.\n */\nexport default function getDefaultRegistry<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): Omit<Registry<T, S, F>, 'schemaUtils'> {\n return {\n fields: fields<T, S, F>(),\n templates: templates<T, S, F>(),\n widgets: widgets<T, S, F>(),\n rootSchema: {} as S,\n formContext: {} as F,\n translateString: englishStringTranslator,\n };\n}\n", "import { Component, MouseEvent } from 'react';\nimport {\n getTemplate,\n getWidget,\n getUiOptions,\n isFixedItems,\n allowAdditionalItems,\n isCustomWidget,\n optionsList,\n ArrayFieldTemplateProps,\n ErrorSchema,\n FieldProps,\n FormContextType,\n IdSchema,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UiSchema,\n ITEMS_KEY,\n} from '@rjsf/utils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport get from 'lodash/get';\nimport isObject from 'lodash/isObject';\nimport set from 'lodash/set';\nimport { nanoid } from 'nanoid';\n\n/** Type used to represent the keyed form data used in the state */\ntype KeyedFormDataType<T> = { key: string; item: T };\n\n/** Type used for the state of the `ArrayField` component */\ntype ArrayFieldState<T> = {\n /** The keyed form data elements */\n keyedFormData: KeyedFormDataType<T>[];\n /** Flag indicating whether any of the keyed form data has been updated */\n updatedKeyedFormData: boolean;\n};\n\n/** Used to generate a unique ID for an element in a row */\nfunction generateRowId() {\n return nanoid();\n}\n\n/** Converts the `formData` into `KeyedFormDataType` data, using the `generateRowId()` function to create the key\n *\n * @param formData - The data for the form\n * @returns - The `formData` converted into a `KeyedFormDataType` element\n */\nfunction generateKeyedFormData<T>(formData: T[]): KeyedFormDataType<T>[] {\n return !Array.isArray(formData)\n ? []\n : formData.map((item) => {\n return {\n key: generateRowId(),\n item,\n };\n });\n}\n\n/** Converts `KeyedFormDataType` data into the inner `formData`\n *\n * @param keyedFormData - The `KeyedFormDataType` to be converted\n * @returns - The inner `formData` item(s) in the `keyedFormData`\n */\nfunction keyedToPlainFormData<T>(keyedFormData: KeyedFormDataType<T> | KeyedFormDataType<T>[]): T[] {\n if (Array.isArray(keyedFormData)) {\n return keyedFormData.map((keyedItem) => keyedItem.item);\n }\n return [];\n}\n\n/** The `ArrayField` component is used to render a field in the schema that is of type `array`. It supports both normal\n * and fixed array, allowing user to add and remove elements from the array data.\n */\nclass ArrayField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T[], S, F>,\n ArrayFieldState<T>\n> {\n /** Constructs an `ArrayField` from the `props`, generating the initial keyed data from the `formData`\n *\n * @param props - The `FieldProps` for this template\n */\n constructor(props: FieldProps<T[], S, F>) {\n super(props);\n const { formData = [] } = props;\n const keyedFormData = generateKeyedFormData<T>(formData);\n this.state = {\n keyedFormData,\n updatedKeyedFormData: false,\n };\n }\n\n /** React lifecycle method that is called when the props are about to change allowing the state to be updated. It\n * regenerates the keyed form data and returns it\n *\n * @param nextProps - The next set of props data\n * @param prevState - The previous set of state data\n */\n static getDerivedStateFromProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n nextProps: Readonly<FieldProps<T[], S, F>>,\n prevState: Readonly<ArrayFieldState<T>>,\n ) {\n // Don't call getDerivedStateFromProps if keyed formdata was just updated.\n if (prevState.updatedKeyedFormData) {\n return {\n updatedKeyedFormData: false,\n };\n }\n const nextFormData = Array.isArray(nextProps.formData) ? nextProps.formData : [];\n const previousKeyedFormData = prevState.keyedFormData || [];\n const newKeyedFormData =\n nextFormData.length === previousKeyedFormData.length\n ? previousKeyedFormData.map((previousKeyedFormDatum, index) => {\n return {\n key: previousKeyedFormDatum.key,\n item: nextFormData[index],\n };\n })\n : generateKeyedFormData<T>(nextFormData);\n return {\n keyedFormData: newKeyedFormData,\n };\n }\n\n /** Returns the appropriate title for an item by getting first the title from the schema.items, then falling back to\n * the description from the schema.items, and finally the string \"Item\"\n */\n get itemTitle() {\n const { schema, registry } = this.props;\n const { translateString } = registry;\n return get(\n schema,\n [ITEMS_KEY, 'title'],\n get(schema, [ITEMS_KEY, 'description'], translateString(TranslatableString.ArrayItemTitle)),\n );\n }\n\n /** Determines whether the item described in the schema is always required, which is determined by whether any item\n * may be null.\n *\n * @param itemSchema - The schema for the item\n * @return - True if the item schema type does not contain the \"null\" type\n */\n isItemRequired(itemSchema: S) {\n if (Array.isArray(itemSchema.type)) {\n // While we don't yet support composite/nullable jsonschema types, it's\n // future-proof to check for requirement against these.\n return !itemSchema.type.includes('null');\n }\n // All non-null array item types are inherently required by design\n return itemSchema.type !== 'null';\n }\n\n /** Determines whether more items can be added to the array. If the uiSchema indicates the array doesn't allow adding\n * then false is returned. Otherwise, if the schema indicates that there are a maximum number of items and the\n * `formData` matches that value, then false is returned, otherwise true is returned.\n *\n * @param formItems - The list of items in the form\n * @returns - True if the item is addable otherwise false\n */\n canAddItem(formItems: any[]) {\n const { schema, uiSchema, registry } = this.props;\n let { addable } = getUiOptions<T[], S, F>(uiSchema, registry.globalUiOptions);\n if (addable !== false) {\n // if ui:options.addable was not explicitly set to false, we can add\n // another item if we have not exceeded maxItems yet\n if (schema.maxItems !== undefined) {\n addable = formItems.length < schema.maxItems;\n } else {\n addable = true;\n }\n }\n return addable;\n }\n\n /** Returns the default form information for an item based on the schema for that item. Deals with the possibility\n * that the schema is fixed and allows additional items.\n */\n _getNewFormDataRow = (): T => {\n const { schema, registry } = this.props;\n const { schemaUtils } = registry;\n let itemSchema = schema.items as S;\n if (isFixedItems(schema) && allowAdditionalItems(schema)) {\n itemSchema = schema.additionalItems as S;\n }\n // Cast this as a T to work around schema utils being for T[] caused by the FieldProps<T[], S, F> call on the class\n return schemaUtils.getDefaultFormState(itemSchema) as unknown as T;\n };\n\n /** Callback handler for when the user clicks on the add or add at index buttons. Creates a new row of keyed form data\n * either at the end of the list (when index is not specified) or inserted at the `index` when it is, adding it into\n * the state, and then returning `onChange()` with the plain form data converted from the keyed data\n *\n * @param event - The event for the click\n * @param [index] - The optional index at which to add the new data\n */\n _handleAddClick(event: MouseEvent, index?: number) {\n if (event) {\n event.preventDefault();\n }\n\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (index === undefined || i < index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i >= index) {\n set(newErrorSchema, [i + 1], errorSchema[idx]);\n }\n }\n }\n\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n const newKeyedFormData = [...keyedFormData];\n if (index !== undefined) {\n newKeyedFormData.splice(index, 0, newKeyedFormDataRow);\n } else {\n newKeyedFormData.push(newKeyedFormDataRow);\n }\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n }\n\n /** Callback handler for when the user clicks on the add button. Creates a new row of keyed form data at the end of\n * the list, adding it into the state, and then returning `onChange()` with the plain form data converted from the\n * keyed data\n *\n * @param event - The event for the click\n */\n onAddClick = (event: MouseEvent) => {\n this._handleAddClick(event);\n };\n\n /** Callback handler for when the user clicks on the add button on an existing array element. Creates a new row of\n * keyed form data inserted at the `index`, adding it into the state, and then returning `onChange()` with the plain\n * form data converted from the keyed data\n *\n * @param index - The index at which the add button is clicked\n */\n onAddIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n this._handleAddClick(event, index);\n };\n };\n\n /** Callback handler for when the user clicks on the copy button on an existing array element. Clones the row of\n * keyed form data at the `index` into the next position in the state, and then returning `onChange()` with the plain\n * form data converted from the keyed data\n *\n * @param index - The index at which the copy button is clicked\n */\n onCopyIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n if (event) {\n event.preventDefault();\n }\n\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i <= index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i > index) {\n set(newErrorSchema, [i + 1], errorSchema[idx]);\n }\n }\n }\n\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: cloneDeep(keyedFormData[index].item),\n };\n const newKeyedFormData = [...keyedFormData];\n if (index !== undefined) {\n newKeyedFormData.splice(index + 1, 0, newKeyedFormDataRow);\n } else {\n newKeyedFormData.push(newKeyedFormDataRow);\n }\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler for when the user clicks on the remove button on an existing array element. Removes the row of\n * keyed form data at the `index` in the state, and then returning `onChange()` with the plain form data converted\n * from the keyed data\n *\n * @param index - The index at which the remove button is clicked\n */\n onDropIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n if (event) {\n event.preventDefault();\n }\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i < index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i > index) {\n set(newErrorSchema, [i - 1], errorSchema[idx]);\n }\n }\n }\n const newKeyedFormData = keyedFormData.filter((_, i) => i !== index);\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler for when the user clicks on one of the move item buttons on an existing array element. Moves the\n * row of keyed form data at the `index` to the `newIndex` in the state, and then returning `onChange()` with the\n * plain form data converted from the keyed data\n *\n * @param index - The index of the item to move\n * @param newIndex - The index to where the item is to be moved\n */\n onReorderClick = (index: number, newIndex: number) => {\n return (event: MouseEvent<HTMLButtonElement>) => {\n if (event) {\n event.preventDefault();\n event.currentTarget.blur();\n }\n const { onChange, errorSchema } = this.props;\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i == index) {\n set(newErrorSchema, [newIndex], errorSchema[index]);\n } else if (i == newIndex) {\n set(newErrorSchema, [index], errorSchema[newIndex]);\n } else {\n set(newErrorSchema, [idx], errorSchema[i]);\n }\n }\n }\n\n const { keyedFormData } = this.state;\n function reOrderArray() {\n // Copy item\n const _newKeyedFormData = keyedFormData.slice();\n\n // Moves item from index to newIndex\n _newKeyedFormData.splice(index, 1);\n _newKeyedFormData.splice(newIndex, 0, keyedFormData[index]);\n\n return _newKeyedFormData;\n }\n const newKeyedFormData = reOrderArray();\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler used to deal with changing the value of the data in the array at the `index`. Calls the\n * `onChange` callback with the updated form data\n *\n * @param index - The index of the item being changed\n */\n onChangeForIndex = (index: number) => {\n return (value: any, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { formData, onChange, errorSchema } = this.props;\n const arrayData = Array.isArray(formData) ? formData : [];\n const newFormData = arrayData.map((item: T, i: number) => {\n // We need to treat undefined items as nulls to have validation.\n // See https://github.com/tdegrunt/jsonschema/issues/206\n const jsonValue = typeof value === 'undefined' ? null : value;\n return index === i ? jsonValue : item;\n });\n onChange(\n newFormData,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [index]: newErrorSchema,\n },\n id,\n );\n };\n };\n\n /** Callback handler used to change the value for a checkbox */\n onSelectChange = (value: any) => {\n const { onChange, idSchema } = this.props;\n onChange(value, undefined, idSchema && idSchema.$id);\n };\n\n /** Renders the `ArrayField` depending on the specific needs of the schema and uischema elements\n */\n render() {\n const { schema, uiSchema, idSchema, registry } = this.props;\n const { schemaUtils, translateString } = registry;\n if (!(ITEMS_KEY in schema)) {\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const UnsupportedFieldTemplate = getTemplate<'UnsupportedFieldTemplate', T[], S, F>(\n 'UnsupportedFieldTemplate',\n registry,\n uiOptions,\n );\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason={translateString(TranslatableString.MissingItems)}\n registry={registry}\n />\n );\n }\n if (schemaUtils.isMultiSelect(schema)) {\n // If array has enum or uniqueItems set to true, call renderMultiSelect() to render the default multiselect widget or a custom widget, if specified.\n return this.renderMultiSelect();\n }\n if (isCustomWidget<T[], S, F>(uiSchema)) {\n return this.renderCustomWidget();\n }\n if (isFixedItems(schema)) {\n return this.renderFixedArray();\n }\n if (schemaUtils.isFilesArray(schema, uiSchema)) {\n return this.renderFiles();\n }\n return this.renderNormalArray();\n }\n\n /** Renders a normal array without any limitations of length\n */\n renderNormalArray() {\n const {\n schema,\n uiSchema = {},\n errorSchema,\n idSchema,\n name,\n title,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n registry,\n onBlur,\n onFocus,\n idPrefix,\n idSeparator = '_',\n rawErrors,\n } = this.props;\n const { keyedFormData } = this.state;\n const fieldTitle = schema.title || title || name;\n const { schemaUtils, formContext } = registry;\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const _schemaItems: S = isObject(schema.items) ? (schema.items as S) : ({} as S);\n const itemsSchema: S = schemaUtils.retrieveSchema(_schemaItems);\n const formData = keyedToPlainFormData(this.state.keyedFormData);\n const canAdd = this.canAddItem(formData);\n const arrayProps: ArrayFieldTemplateProps<T[], S, F> = {\n canAdd,\n items: keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n // While we are actually dealing with a single item of type T, the types require a T[], so cast\n const itemCast = item as unknown as T[];\n const itemSchema = schemaUtils.retrieveSchema(_schemaItems, itemCast);\n const itemErrorSchema = errorSchema ? (errorSchema[index] as ErrorSchema<T[]>) : undefined;\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(itemSchema, itemIdPrefix, itemCast, idPrefix, idSeparator);\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\n title: fieldTitle ? `${fieldTitle}-${index + 1}` : undefined,\n canAdd,\n canMoveUp: index > 0,\n canMoveDown: index < formData.length - 1,\n itemSchema,\n itemIdSchema,\n itemErrorSchema,\n itemData: itemCast,\n itemUiSchema: uiSchema.items,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n rawErrors,\n totalItems: keyedFormData.length,\n });\n }),\n className: `rjsf-field rjsf-field-array rjsf-field-array-of-${itemsSchema.type}`,\n disabled,\n idSchema,\n uiSchema,\n onAddClick: this.onAddClick,\n readonly,\n required,\n schema,\n title: fieldTitle,\n formContext,\n formData,\n rawErrors,\n registry,\n };\n\n const Template = getTemplate<'ArrayFieldTemplate', T[], S, F>('ArrayFieldTemplate', registry, uiOptions);\n return <Template {...arrayProps} />;\n }\n\n /** Renders an array using the custom widget provided by the user in the `uiSchema`\n */\n renderCustomWidget() {\n const {\n schema,\n idSchema,\n uiSchema,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n hideError,\n placeholder,\n onBlur,\n onFocus,\n formData: items = [],\n registry,\n rawErrors,\n name,\n } = this.props;\n const { widgets, formContext, globalUiOptions, schemaUtils } = registry;\n const { widget, title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n options={options}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n value={items}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n required={required}\n label={label}\n hideLabel={!displayLabel}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n /** Renders an array as a set of checkboxes\n */\n renderMultiSelect() {\n const {\n schema,\n idSchema,\n uiSchema,\n formData: items = [],\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n placeholder,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n name,\n } = this.props;\n const { widgets, schemaUtils, formContext, globalUiOptions } = registry;\n const itemsSchema = schemaUtils.retrieveSchema(schema.items as S, items);\n const enumOptions = optionsList<T[], S, F>(itemsSchema, uiSchema);\n const { widget = 'select', title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n value={items}\n disabled={disabled}\n readonly={readonly}\n required={required}\n label={label}\n hideLabel={!displayLabel}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n /** Renders an array of files using the `FileWidget`\n */\n renderFiles() {\n const {\n schema,\n uiSchema,\n idSchema,\n name,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n onBlur,\n onFocus,\n registry,\n formData: items = [],\n rawErrors,\n } = this.props;\n const { widgets, formContext, globalUiOptions, schemaUtils } = registry;\n const { widget = 'files', title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n options={options}\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n schema={schema}\n uiSchema={uiSchema}\n value={items}\n disabled={disabled}\n readonly={readonly}\n required={required}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n label={label}\n hideLabel={!displayLabel}\n />\n );\n }\n\n /** Renders an array that has a maximum limit of items\n */\n renderFixedArray() {\n const {\n schema,\n uiSchema = {},\n formData = [],\n errorSchema,\n idPrefix,\n idSeparator = '_',\n idSchema,\n name,\n title,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n registry,\n onBlur,\n onFocus,\n rawErrors,\n } = this.props;\n const { keyedFormData } = this.state;\n let { formData: items = [] } = this.props;\n const fieldTitle = schema.title || title || name;\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const { schemaUtils, formContext } = registry;\n const _schemaItems: S[] = isObject(schema.items) ? (schema.items as S[]) : ([] as S[]);\n const itemSchemas = _schemaItems.map((item: S, index: number) =>\n schemaUtils.retrieveSchema(item, formData[index] as unknown as T[]),\n );\n const additionalSchema = isObject(schema.additionalItems)\n ? schemaUtils.retrieveSchema(schema.additionalItems as S, formData)\n : null;\n\n if (!items || items.length < itemSchemas.length) {\n // to make sure at least all fixed items are generated\n items = items || [];\n items = items.concat(new Array(itemSchemas.length - items.length));\n }\n\n // These are the props passed into the render function\n const canAdd = this.canAddItem(items) && !!additionalSchema;\n const arrayProps: ArrayFieldTemplateProps<T[], S, F> = {\n canAdd,\n className: 'rjsf-field rjsf-field-array rjsf-field-array-fixed-items',\n disabled,\n idSchema,\n formData,\n items: keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n // While we are actually dealing with a single item of type T, the types require a T[], so cast\n const itemCast = item as unknown as T[];\n const additional = index >= itemSchemas.length;\n const itemSchema =\n (additional && isObject(schema.additionalItems)\n ? schemaUtils.retrieveSchema(schema.additionalItems as S, itemCast)\n : itemSchemas[index]) || {};\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(itemSchema, itemIdPrefix, itemCast, idPrefix, idSeparator);\n const itemUiSchema = additional\n ? uiSchema.additionalItems || {}\n : Array.isArray(uiSchema.items)\n ? uiSchema.items[index]\n : uiSchema.items || {};\n const itemErrorSchema = errorSchema ? (errorSchema[index] as ErrorSchema<T[]>) : undefined;\n\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\n title: fieldTitle ? `${fieldTitle}-${index + 1}` : undefined,\n canAdd,\n canRemove: additional,\n canMoveUp: index >= itemSchemas.length + 1,\n canMoveDown: additional && index < items.length - 1,\n itemSchema,\n itemData: itemCast,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n rawErrors,\n totalItems: keyedFormData.length,\n });\n }),\n onAddClick: this.onAddClick,\n readonly,\n required,\n registry,\n schema,\n uiSchema,\n title: fieldTitle,\n formContext,\n errorSchema,\n rawErrors,\n };\n\n const Template = getTemplate<'ArrayFieldTemplate', T[], S, F>('ArrayFieldTemplate', registry, uiOptions);\n return <Template {...arrayProps} />;\n }\n\n /** Renders the individual array item using a `SchemaField` along with the additional properties required to be send\n * back to the `ArrayFieldItemTemplate`.\n *\n * @param props - The props for the individual array item to be rendered\n */\n renderArrayFieldItem(props: {\n key: string;\n index: number;\n name: string;\n title: string | undefined;\n canAdd: boolean;\n canRemove?: boolean;\n canMoveUp: boolean;\n canMoveDown: boolean;\n itemSchema: S;\n itemData: T[];\n itemUiSchema: UiSchema<T[], S, F>;\n itemIdSchema: IdSchema<T[]>;\n itemErrorSchema?: ErrorSchema<T[]>;\n autofocus?: boolean;\n onBlur: FieldProps<T[], S, F>['onBlur'];\n onFocus: FieldProps<T[], S, F>['onFocus'];\n rawErrors?: string[];\n totalItems: number;\n }) {\n const {\n key,\n index,\n name,\n canAdd,\n canRemove = true,\n canMoveUp,\n canMoveDown,\n itemSchema,\n itemData,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus,\n onBlur,\n onFocus,\n rawErrors,\n totalItems,\n title,\n } = props;\n const { disabled, hideError, idPrefix, idSeparator, readonly, uiSchema, registry, formContext } = this.props;\n const {\n fields: { ArraySchemaField, SchemaField },\n globalUiOptions,\n } = registry;\n const ItemSchemaField = ArraySchemaField || SchemaField;\n const { orderable = true, removable = true, copyable = false } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const has: { [key: string]: boolean } = {\n moveUp: orderable && canMoveUp,\n moveDown: orderable && canMoveDown,\n copy: copyable && canAdd,\n remove: removable && canRemove,\n toolbar: false,\n };\n has.toolbar = Object.keys(has).some((key: keyof typeof has) => has[key]);\n\n return {\n children: (\n <ItemSchemaField\n name={name}\n title={title}\n index={index}\n schema={itemSchema}\n uiSchema={itemUiSchema}\n formData={itemData}\n formContext={formContext}\n errorSchema={itemErrorSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n idSchema={itemIdSchema}\n required={this.isItemRequired(itemSchema)}\n onChange={this.onChangeForIndex(index)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n ),\n buttonsProps: {\n idSchema: itemIdSchema,\n disabled: disabled,\n readonly: readonly,\n canAdd,\n hasCopy: has.copy,\n hasMoveUp: has.moveUp,\n hasMoveDown: has.moveDown,\n hasRemove: has.remove,\n index: index,\n totalItems: totalItems,\n onAddIndexClick: this.onAddIndexClick,\n onCopyIndexClick: this.onCopyIndexClick,\n onDropIndexClick: this.onDropIndexClick,\n onReorderClick: this.onReorderClick,\n registry: registry,\n schema: itemSchema,\n uiSchema: itemUiSchema,\n },\n className: 'rjsf-array-item',\n disabled,\n hasToolbar: has.toolbar,\n index,\n totalItems,\n key,\n readonly,\n registry,\n schema: itemSchema,\n uiSchema: itemUiSchema,\n };\n }\n}\n\n/** `ArrayField` is `React.ComponentType<FieldProps<T[], S, F>>` (necessarily) but the `registry` requires things to be a\n * `Field` which is defined as `React.ComponentType<FieldProps<T, S, F>>`, so cast it to make `registry` happy.\n */\nexport default ArrayField;\n", "import {\n getWidget,\n getUiOptions,\n optionsList,\n FieldProps,\n FormContextType,\n EnumOptionsType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from '@rjsf/utils';\nimport isObject from 'lodash/isObject';\n\n/** The `BooleanField` component is used to render a field in the schema is boolean. It constructs `enumOptions` for the\n * two boolean values based on the various alternatives in the schema.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction BooleanField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n registry,\n required,\n disabled,\n readonly,\n hideError,\n autofocus,\n title,\n onChange,\n onFocus,\n onBlur,\n rawErrors,\n } = props;\n const { title: schemaTitle } = schema;\n const { widgets, formContext, translateString, globalUiOptions } = registry;\n const {\n widget = 'checkbox',\n title: uiTitle,\n // Unlike the other fields, don't use `getDisplayLabel()` since it always returns false for the boolean type\n label: displayLabel = true,\n enumNames,\n ...options\n } = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget(schema, widget, widgets);\n const yes = translateString(TranslatableString.YesLabel);\n const no = translateString(TranslatableString.NoLabel);\n let enumOptions: EnumOptionsType<S>[] | undefined;\n const label = uiTitle ?? schemaTitle ?? title ?? name;\n if (Array.isArray(schema.oneOf)) {\n enumOptions = optionsList<T, S, F>(\n {\n oneOf: schema.oneOf\n .map((option) => {\n if (isObject(option)) {\n return {\n ...option,\n title: option.title || (option.const === true ? yes : no),\n };\n }\n return undefined;\n })\n .filter((o: any) => o) as S[], // cast away the error that typescript can't grok is fixed\n } as unknown as S,\n uiSchema,\n );\n } else {\n const enums = schema.enum ?? [true, false];\n if (!enumNames && enums.length === 2 && enums.every((v: any) => typeof v === 'boolean')) {\n enumOptions = [\n {\n value: enums[0],\n label: enums[0] ? yes : no,\n },\n {\n value: enums[1],\n label: enums[1] ? yes : no,\n },\n ];\n } else {\n enumOptions = optionsList<T, S, F>({ enum: enums } as S, uiSchema);\n }\n }\n\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema.$id}\n name={name}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n label={label}\n hideLabel={!displayLabel}\n value={formData}\n required={required}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n}\n\nexport default BooleanField;\n", "import { ComponentType, PureComponent, ReactNode } from 'react';\nimport {\n ANY_OF_KEY,\n ErrorSchema,\n FieldProps,\n FormContextType,\n GenericObjectType,\n getDiscriminatorFieldFromSchema,\n getTemplate,\n getTestIds,\n getUiOptions,\n hashObject,\n ID_KEY,\n IdSchema,\n lookupFromFormContext,\n mergeObjects,\n ONE_OF_KEY,\n PROPERTIES_KEY,\n READONLY_KEY,\n RJSFSchema,\n Registry,\n SchemaUtilsType,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n UiSchema,\n} from '@rjsf/utils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport each from 'lodash/each';\nimport flatten from 'lodash/flatten';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport includes from 'lodash/includes';\nimport intersection from 'lodash/intersection';\nimport isEmpty from 'lodash/isEmpty';\nimport isFunction from 'lodash/isFunction';\nimport isEqual from 'lodash/isEqual';\nimport isObject from 'lodash/isObject';\nimport isPlainObject from 'lodash/isPlainObject';\nimport isString from 'lodash/isString';\nimport isUndefined from 'lodash/isUndefined';\nimport set from 'lodash/set';\n\n/** The enumeration of the three different Layout GridTemplate type values\n */\nexport enum GridType {\n ROW = 'ui:row',\n COLUMN = 'ui:col',\n COLUMNS = 'ui:columns',\n CONDITION = 'ui:condition',\n}\n\n/** The enumeration of the different operators within a condition\n */\nexport enum Operators {\n ALL = 'all',\n SOME = 'some',\n NONE = 'none',\n}\n\n/** Type used to represent an object that contains anything */\ntype ConfigObject = Record<string, any>;\n\nexport interface GridProps extends GenericObjectType {\n /** The optional operator to use when comparing a field's value with the expected value for `GridType.CONDITION`\n */\n operator?: Operators;\n /** The optional name of the field from which to get the value for `GridType.CONDITION`\n */\n field?: string;\n /** The optional expected value against which to compare the field's value using the `operator`\n */\n value?: unknown;\n}\n\nexport type GridSchemaType = {\n /** The limited set of props which are keyed using the `GridType` enumeration and return an object\n */\n [gridType in GridType]?: object;\n};\n\n/** The types which comprise the possibilities for the `layoutGridSchema` prop\n */\nexport type LayoutGridSchemaType = GridSchemaType | ConfigObject | string;\n\nexport interface LayoutGridFieldProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>\n extends FieldProps<T, S, F> {\n /** Optional string or object used to describe the current level of the `LayoutGridField`\n */\n layoutGridSchema?: LayoutGridSchemaType;\n}\n\n/** The regular expression that is used to detect whether a string contains a lookup key\n */\nexport const LOOKUP_REGEX = /^\\$lookup=(.+)/;\n\n/** The constant representing the main layout grid schema option name in the `uiSchema`\n */\nexport const LAYOUT_GRID_UI_OPTION = 'layoutGrid';\n\n/** The constant representing the main layout grid schema option name in the `uiSchema`\n */\nexport const LAYOUT_GRID_OPTION = `ui:${LAYOUT_GRID_UI_OPTION}`;\n\n/** The constant representing the global UI Options object potentially contained within the `uiSchema`\n */\nexport const UI_GLOBAL_OPTIONS = 'ui:global_options';\n\n/** Type used to return options list and whether it has a discriminator */\ntype OneOfOptionsInfoType<S extends StrictRJSFSchema = RJSFSchema> = { options: S[]; hasDiscriminator: boolean };\n\n/** Type used to represent a React-based rendering component */\ntype RenderComponent = ComponentType<any>;\n\n/** Type used to determine what are the UIComponent and props from the grid schema */\ntype UIComponentPropsType = {\n /** The name of the component */\n name: string;\n /** The render component if specified */\n UIComponent: RenderComponent | null;\n /** Any uiProps associated with the render component */\n uiProps: ConfigObject;\n /** The special case where the component is immediately rendered */\n rendered: ReactNode;\n};\n\n/** Returns either the `value` if it is non-nullish or the fallback\n *\n * @param [value] - The potential value to return if it is non-nullish\n * @param [fallback] - The fallback value to return if `value` is nullish\n * @returns - `value` if it is non-nullish otherwise `fallback`\n */\nfunction getNonNullishValue<T = unknown>(value?: T, fallback?: T): T | undefined {\n return value ?? fallback;\n}\n\n/** The `LayoutGridField` will render a schema, uiSchema and formData combination out into a GridTemplate in the shape\n * described in the uiSchema. To define the grid to use to render the elements within a field in the schema, provide in\n * the uiSchema for that field the object contained under a `ui:layoutGrid` element. E.g. (as a JSON object):\n *\n * ```\n * {\n * \"field1\" : {\n * \"ui:field\": \"LayoutGridField\",\n * \"ui:layoutGrid\": {\n * \"ui:row\": { ... }\n * }\n * }\n * }\n * ```\n *\n * The outermost level of a `LayoutGridField` is the `ui:row` that defines the nested rows, columns, and/or condition\n * elements (i.e. \"grid elements\") in the grid. This definition is either a simple \"grid elements\" OR an object with\n * native `GridTemplate` implementation specific props and a `children` array of \"grid elements\". E.g. (as JSON objects):\n *\n * Simple `ui:row` definition, without additional `GridTemplate` props:\n * ```\n * \"ui:row\": [\n * { \"ui:row\"|\"ui:col\"|\"ui:columns\"|\"ui:condition\": ... },\n * ...\n * ]\n * ```\n *\n * Complex `ui:row` definition, with additional `GridTemplate` (this example uses @mui/material/Grid2 native props):\n * ```\n * \"ui:row\": {\n * \"spacing\": 2,\n * \"size\": { md\": 4 },\n * \"alignContent\": \"flex-start\",\n * \"className\": \"GridRow\",\n * \"children\": [\n * { \"ui:row\"|\"ui:col\"|\"ui:columns\"|\"ui:condition\": ... },\n * ...\n * ]\n * }\n * ```\n *\n * NOTE: Special note about the native `className` prop values. All className values will automatically be looked up in\n * the `formContext.lookupMap` in case they have been defined using a CSS-in-JS approach. In other words, from the\n * example above, if the `Form` was constructed with a `lookupMap` set to `{ GridRow: cssInJs.GridRowClass }`\n * then when rendered, the native `GridTemplate` will get the `className` with the value from\n * `cssInJs.GridRowClass`. This automatic lookup will happen for any of the \"grid elements\" when rendering with\n * `GridTemplate` props. If multiple className values are present, for example:\n * `{ className: 'GridRow GridColumn' }`, the classNames are split apart, looked up individually, and joined\n * together to form one className with the values from `cssInJs.GridRowClass` and `cssInJs.GridColumnClass`.\n *\n * The `ui:col` grid element is used to specify the list of columns within a grid row. A `ui:col` element can take on\n * several forms: 1) a simple list of dotted-path field names within the root field; 2) a list of objects containing the\n * dotted-path field `name` any other props that are gathered into `ui:options` for the field; 3) a list with a one-off\n * `render` functional component with or without a non-field `name` identifier and any other to-be-spread props; and\n * 4) an object with native `GridTemplate` implementation specific props and a `children` array with 1) or 2) or even a\n * nested `ui:row` or a `ui:condition` containing a `ui:row` (although this should be used carefully). E.g.\n * (as JSON objects):\n *\n * Simple `ui:col` definition, without additional `GridTemplate` props and form 1 only children:\n * ```\n * \"ui:col\": [\"innerField\", \"inner.grandChild\", ...]\n * ```\n *\n * Complicated `ui:col` definition, without additional `GridTemplate` props and form 2 only children:\n * ```\n * \"ui:col\": [\n * { \"name\": \"innerField\", \"fullWidth\": true },\n * { \"name\": \"inner.grandChild\", \"convertOther\": true },\n * ...\n * ]\n * ```\n *\n * More complicated `ui:col` definition, without additional `GridTemplate` props and form 2 children, one being a\n * one-off `render` functional component without a non-field `name` identifier\n * ```\n * \"ui:col\": [\n * \"innerField\",\n * {\n * \"render\": \"WizardNavButton\",\n * \"isNext\": true,\n * \"size\": \"large\"\n * }\n * ]\n * ```\n *\n * Most complicated `ui:col` definition, additional `GridTemplate` props and form 1, 2 and 3 children (this example\n * uses @mui/material/Grid2 native props):\n * ```\n * \"ui:col\": {\n * \"size\": { \"md\": 4 },\n * \"className\": \"GridColumn\",\n * \"children\": [\n * \"innerField\",\n * { \"name\": \"inner.grandChild\", \"convertOther\": true },\n * { \"name\": \"customRender\", \"render\": \"CustomRender\", toSpread: \"prop-value\" }\n * { \"ui:row|ui:condition\": ... }\n * ...\n * ]\n * }\n * ```\n *\n * NOTE: If a `name` prop does not exist or its value does not match any field in a schema, then it is assumed to be a\n * custom `render` component. If the `render` prop does not exist, a null render will occur. If `render` is a\n * string, its value will be looked up in the `formContext.lookupMap` first before defaulting to a null render.\n *\n * The `ui:columns` grid element is syntactic sugar to specify a set of `ui:col` columns that all share the same set of\n * native `GridTemplate` props. In other words rather than writing the following configuration that renders a\n * `<GridTemplate>` element with 3 `<GridTemplate column className=\"GridColumn col-md-4\">` nodes and 2\n * `<GridTemplate column className=\"col-md-6\">` nodes within it (one for each of the fields contained in the `children`\n * list):\n *\n * ```\n * \"ui:row\": {\n * \"children\": [\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"innerField\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"inner.grandChild\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [{ \"name\": \"inner.grandChild2\" }],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"innerField2\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"inner.grandChild3\"],\n * }\n * },\n\n * ]\n * }\n * ```\n *\n * One can write this instead:\n * ```\n * \"ui:row\": {\n * \"children\": [\n * {\n * \"ui:columns\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"innerField\", \"inner.grandChild\", { \"name\": \"inner.grandChild2\", \"convertOther\": true }],\n * }\n * },\n * {\n * \"ui:columns\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"innerField2\", \"inner.grandChild3\"],\n * }\n * }\n * ]\n * }\n * ```\n *\n * NOTE: This syntax differs from\n * `\"ui:col\": { \"className\": \"col-md-6\", \"children\": [\"innerField2\", \"inner.grandChild3\"] }` in that\n * the `ui:col` will render the two children fields inside a single `<GridTemplate \"className\": \"col-md-6\",>`\n * element.\n *\n * The final grid element, `ui:condition`, allows for conditionally displaying \"grid elements\" within a row based on the\n * current value of a field as it relates to a (list of) hard-coded value(s). There are four elements that make up a\n * `ui:condition`: 1) the dotted-path `field` name within the root field that makes up the left-side of the condition;\n * 2) the hard-coded `value` (single or list) that makes up the right-side of the condition; 3) the `operator` that\n * controls how the left and right sides of the condition are compared; and 4) the `children` array that defines the\n * \"grid elements\" to display if the condition passes.\n *\n * A `ui:condition` uses one of three `operators` when deciding if a condition passes: 1) The `all` operator will pass\n * when the right-side and left-side contains all the same value(s); 2) the `some` operator will pass when the\n * right-side and left-side contain as least one value in common; 3) the `none` operator will pass when the right-side\n * and left-side do not contain any values in common. E.g. (as JSON objects):\n *\n * Here is how to render an if-then-else for `field2` which is an enum that has 3 known values and supports allowing\n * any other value:\n * ```\n * \"ui:row\": [\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"all\",\n * \"value\": \"value1\",\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * },\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"some\",\n * \"value\": [\"value2\", \"value3\"],\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * },\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"none\",\n * \"value\": [\"value1\", \"value2\", \"value3\"],\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * }\n * ]\n * ```\n */\nexport default class LayoutGridField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> extends PureComponent<LayoutGridFieldProps<T, S, F>> {\n static defaultProps = {\n layoutGridSchema: undefined,\n };\n\n static TEST_IDS = getTestIds();\n /** Computes the uiSchema for the field with `name` from the `uiProps` and `uiSchema` provided. The field UI Schema\n * will always contain a copy of the global options from the `uiSchema` (so they can be passed down) as well as\n * copying them into the local ui options. When the `forceReadonly` flag is true, then the field UI Schema is\n * updated to make \"readonly\" be true. When the `schemaReadonly` flag is true AND the field UI Schema does NOT have\n * the flag already provided, then we also make \"readonly\" true. We always make sure to return the final value of the\n * field UI Schema's \"readonly\" flag as `uiReadonly` along with the `fieldUiSchema` in the return value.\n *\n * @param field - The name of the field to pull the existing UI Schema for\n * @param uiProps - Any props that should be put into the field's uiSchema\n * @param [uiSchema] - The optional UI Schema from which to get the UI schema for the field\n * @param [schemaReadonly] - Optional flag indicating whether the schema indicates the field is readonly\n * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode\n */\n static computeFieldUiSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n field: string,\n uiProps: ConfigObject,\n uiSchema?: UiSchema<T, S, F>,\n schemaReadonly?: boolean,\n forceReadonly?: boolean,\n ) {\n const globalUiOptions = get(uiSchema, [UI_GLOBAL_OPTIONS], {});\n const localUiSchema = get(uiSchema, field);\n const localUiOptions = { ...get(localUiSchema, [UI_OPTIONS_KEY], {}), ...uiProps, ...globalUiOptions };\n const fieldUiSchema = { ...localUiSchema };\n if (!isEmpty(localUiOptions)) {\n set(fieldUiSchema, [UI_OPTIONS_KEY], localUiOptions);\n }\n if (!isEmpty(globalUiOptions)) {\n // pass the global uiOptions down to the field uiSchema so that they can be applied to all nested fields\n set(fieldUiSchema, [UI_GLOBAL_OPTIONS], globalUiOptions);\n }\n let { readonly: uiReadonly } = getUiOptions<T, S, F>(fieldUiSchema);\n if (forceReadonly === true || (isUndefined(uiReadonly) && schemaReadonly === true)) {\n // If we are forcing all widgets to be readonly, OR the schema indicates it is readonly AND the uiSchema does not\n // have an overriding value, then update the uiSchema to set readonly to true. Doing this will\n uiReadonly = true;\n if (has(localUiOptions, READONLY_KEY)) {\n // If the local options has the key value provided in it, then set that one to true\n set(fieldUiSchema, [UI_OPTIONS_KEY, READONLY_KEY], true);\n } else {\n // otherwise set the `ui:` version\n set(fieldUiSchema, `ui:${READONLY_KEY}`, true);\n }\n }\n return { fieldUiSchema, uiReadonly };\n }\n\n /** Given an `operator`, `datum` and `value` determines whether this condition is considered matching. Matching\n * depends on the `operator`. The `datum` and `value` are converted into arrays if they aren't already and then the\n * contents of the two arrays are compared using the `operator`. When `operator` is All, then the two arrays must be\n * equal to match. When `operator` is SOME then the intersection of the two arrays must have at least one value in\n * common to match. When `operator` is NONE then the intersection of the two arrays must not have any values in common\n * to match.\n *\n * @param [operator] - The optional operator for the condition\n * @param [datum] - The optional datum for the condition, this can be an item or a list of items of type unknown\n * @param [value='$0m3tH1nG Un3xP3cT3d'] The optional value for the condition, defaulting to a highly unlikely value\n * to avoid comparing two undefined elements when `value` was forgotten in the condition definition.\n * This can be an item or a list of items of type unknown\n * @returns - True if the condition matches, false otherwise\n */\n static conditionMatches(operator?: Operators, datum?: unknown, value: unknown = '$0m3tH1nG Un3xP3cT3d'): boolean {\n const data = flatten([datum]).sort();\n const values = flatten([value]).sort();\n switch (operator) {\n case Operators.ALL:\n return isEqual(data, values);\n case Operators.SOME:\n return intersection(data, values).length > 0;\n case Operators.NONE:\n return intersection(data, values).length === 0;\n default:\n return false;\n }\n }\n\n /** From within the `layoutGridSchema` finds the `children` and any extra `gridProps` from the object keyed by\n * `schemaKey`. If the `children` contains extra `gridProps` and those props contain a `className` string, try to\n * lookup whether that `className` has a replacement value in the `registry` using the `FORM_CONTEXT_LOOKUP_BASE`.\n * When the `className` value contains multiple classNames separated by a space, the lookup will look for a\n * replacement value for each `className` and combine them into one.\n *\n * @param layoutGridSchema - The GridSchemaType instance from which to obtain the `schemaKey` children and extra props\n * @param schemaKey - A `GridType` value, used to get the children and extra props from within the `layoutGridSchema`\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @returns - An object containing the list of `LayoutGridSchemaType` `children` and any extra `gridProps`\n * @throws - A `TypeError` when the `children` is not an array\n */\n static findChildrenAndProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n layoutGridSchema: GridSchemaType,\n schemaKey: GridType,\n registry: Registry<T, S, F>,\n ) {\n let gridProps: GridProps = {};\n let children = layoutGridSchema[schemaKey];\n if (isPlainObject(children)) {\n const { children: elements, className: toMapClassNames, ...otherProps } = children as ConfigObject;\n children = elements;\n if (toMapClassNames) {\n const classes = toMapClassNames.split(' ');\n const className = classes.map((ele: string) => lookupFromFormContext<T, S, F>(registry, ele, ele)).join(' ');\n gridProps = { ...otherProps, className };\n } else {\n gridProps = otherProps;\n }\n }\n if (!Array.isArray(children)) {\n throw new TypeError(`Expected array for \"${schemaKey}\" in ${JSON.stringify(layoutGridSchema)}`);\n }\n return { children: children as LayoutGridSchemaType[], gridProps };\n }\n\n /** Generates an idSchema for the `schema` using `@rjsf`'s `toIdSchema` util, passing the `baseIdSchema`'s `$id` value\n * as the id prefix.\n *\n * @param schemaUtils - The `SchemaUtilsType` used to call `toIdSchema`\n * @param schema - The schema to generate the idSchema for\n * @param baseIdSchema - The IdSchema for the base\n * @param formData - The formData to pass the `toIdSchema`\n * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths\n * @returns - The generated `idSchema` for the `schema`\n */\n static getIdSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schemaUtils: SchemaUtilsType<T, S, F>,\n baseIdSchema: IdSchema<T>,\n formData: FieldProps['formData'],\n schema: S = {} as S,\n idSeparator?: string,\n ): FieldProps<T, S, F>['idSchema'] {\n const baseId = get(baseIdSchema, ID_KEY);\n return schemaUtils.toIdSchema(schema, baseId, formData, baseId, idSeparator);\n }\n\n /** Given a `dottedPath` to a field in the `initialSchema`, iterate through each individual path in the schema until\n * the leaf path is found and returned (along with whether that leaf path `isRequired`) OR no schema exists for an\n * element in the path. If the leaf schema element happens to be a oneOf/anyOf then also return the oneOf/anyOf as\n * `options`.\n *\n * @param schemaUtils - The `SchemaUtilsType` used to call `retrieveSchema`\n * @param dottedPath - The dotted-path to the field for which to get the schema\n * @param initialSchema - The initial schema to start the search from\n * @param formData - The formData, useful for resolving a oneOf/anyOf selection in the path hierarchy\n * @param initialIdSchema - The initial idSchema to start the search from\n * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths\n * @returns - An object containing the destination schema, isRequired and isReadonly flags for the field and options\n * info if a oneOf/anyOf\n */\n static getSchemaDetailsForField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schemaUtils: SchemaUtilsType<T, S, F>,\n dottedPath: string,\n initialSchema: S,\n formData: FieldProps<T, S, F>['formData'],\n initialIdSchema: IdSchema<T>,\n idSeparator?: string,\n ): {\n schema?: S;\n isRequired: boolean;\n isReadonly?: boolean;\n optionsInfo?: OneOfOptionsInfoType<S>;\n idSchema: IdSchema<T>;\n } {\n let rawSchema: S = initialSchema;\n let idSchema = initialIdSchema;\n const parts: string[] = dottedPath.split('.');\n const leafPath: string | undefined = parts.pop(); // pop off the last element in the list as the leaf\n let schema: S | undefined = schemaUtils.retrieveSchema(rawSchema, formData); // always returns an object\n let innerData = formData;\n let isReadonly: boolean | undefined = schema.readOnly;\n\n // For all the remaining path parts\n parts.forEach((part) => {\n // dive into the properties of the current schema (when it exists) and get the schema for the next part\n if (has(schema, PROPERTIES_KEY)) {\n rawSchema = get(schema, [PROPERTIES_KEY, part], {}) as S;\n idSchema = get(idSchema, part, {}) as IdSchema<T>;\n } else if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // When the schema represents a oneOf/anyOf, find the selected schema for it and grab the inner part\n const selectedSchema = schemaUtils.findSelectedOptionInXxxOf(schema, part, xxx, innerData);\n const selectedIdSchema = LayoutGridField.getIdSchema<T, S, F>(\n schemaUtils,\n idSchema,\n formData,\n selectedSchema,\n idSeparator,\n );\n rawSchema = get(selectedSchema, [PROPERTIES_KEY, part], {}) as S;\n idSchema = get(selectedIdSchema, part, {}) as IdSchema<T>;\n } else {\n rawSchema = {} as S;\n }\n // Now drill into the innerData for the part, returning an empty object by default if it doesn't exist\n innerData = get(innerData, part, {}) as T;\n // Resolve any `$ref`s for the current rawSchema\n schema = schemaUtils.retrieveSchema(rawSchema, innerData);\n isReadonly = getNonNullishValue(schema.readOnly, isReadonly);\n });\n\n let optionsInfo: OneOfOptionsInfoType<S> | undefined;\n let isRequired = false;\n // retrieveSchema will return an empty schema in the worst case scenario, convert it to undefined\n if (isEmpty(schema)) {\n schema = undefined;\n }\n if (schema && leafPath) {\n // When we have both a schema and a leafPath...\n if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // Grab the selected schema for the oneOf/anyOf value for the leafPath using the innerData\n schema = schemaUtils.findSelectedOptionInXxxOf(schema, leafPath, xxx, innerData);\n // Generate the idSchema for the oneOf/anyOf value then merge with the existing `idSchema`\n const rawIdSchema = LayoutGridField.getIdSchema<T, S, F>(schemaUtils, idSchema, formData, schema, idSeparator);\n idSchema = mergeObjects(rawIdSchema, idSchema) as IdSchema<T>;\n }\n isRequired = schema !== undefined && Array.isArray(schema.required) && includes(schema.required, leafPath);\n // Now grab the schema from the leafPath of the current schema properties\n schema = get(schema, [PROPERTIES_KEY, leafPath]) as S | undefined;\n // Resolve any `$ref`s for the current schema\n schema = schema ? schemaUtils.retrieveSchema(schema) : schema;\n idSchema = get(idSchema, leafPath, {}) as IdSchema<T>;\n isReadonly = getNonNullishValue(schema?.readOnly, isReadonly);\n if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // Set the options if we have a schema with a oneOf/anyOf\n const discriminator = getDiscriminatorFieldFromSchema(schema);\n optionsInfo = { options: schema[xxx] as S[], hasDiscriminator: !!discriminator };\n }\n }\n\n return { schema, isRequired, isReadonly, optionsInfo, idSchema };\n }\n\n /** Gets the custom render component from the `render`, by either determining that it is either already a function or\n * it is a non-function value that can be used to look up the function in the registry. If no function can be found,\n * null is returned.\n *\n * @param render - The potential render function or lookup name to one\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @returns - Either a render function if available, or null if not\n */\n static getCustomRenderComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n render: string | RenderComponent,\n registry: Registry<T, S, F>,\n ): RenderComponent | null {\n let customRenderer = render;\n if (isString(customRenderer)) {\n customRenderer = lookupFromFormContext<T, S, F>(registry, customRenderer);\n }\n if (isFunction(customRenderer)) {\n return customRenderer;\n }\n return null;\n }\n\n /** Extract the `name`, and optional `render` and all other props from the `gridSchema`. We look up the `render` to\n * see if can be resolved to a UIComponent. If `name` does not exist and there is an optional `render` UIComponent, we\n * set the `rendered` component with only specified props for that component in the object.\n *\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @param gridSchema - The string or object that represents the configuration for the grid field\n * @returns - The UIComponentPropsType computed from the gridSchema\n */\n static computeUIComponentPropsFromGridSchema<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n >(registry: Registry<T, S, F>, gridSchema?: string | ConfigObject): UIComponentPropsType {\n let name: string;\n let UIComponent: RenderComponent | null = null;\n let uiProps: ConfigObject = {};\n let rendered: ReactNode | undefined;\n if (isString(gridSchema) || isUndefined(gridSchema)) {\n name = gridSchema ?? '';\n } else {\n const { name: innerName = '', render, ...innerProps } = gridSchema;\n name = innerName;\n uiProps = innerProps;\n if (!isEmpty(uiProps)) {\n // Transform any `$lookup=` in the uiProps props with the appropriate value\n each(uiProps, (prop: ConfigObject, key: string) => {\n if (isString(prop)) {\n const match: string[] | null = LOOKUP_REGEX.exec(prop);\n if (Array.isArray(match) && match.length > 1) {\n const name = match[1];\n uiProps[key] = lookupFromFormContext(registry, name, name);\n }\n }\n });\n }\n UIComponent = LayoutGridField.getCustomRenderComponent<T, S, F>(render, registry);\n if (!innerName && UIComponent) {\n rendered = <UIComponent {...innerProps} data-testid={LayoutGridField.TEST_IDS.uiComponent} />;\n }\n }\n return { name, UIComponent, uiProps, rendered };\n }\n\n /** Constructs an `LayoutGridField` with the given `props`\n *\n * @param props - The `LayoutGridField` for this template\n */\n constructor(props: LayoutGridFieldProps<T, S, F>) {\n super(props);\n }\n\n /** Generates an `onChange` handler for the field associated with the `dottedPath`. This handler will clone and update\n * the `formData` with the new `value` and the `errorSchema` if an `errSchema` is provided. After updating those two\n * elements, they will then be passed on to the `onChange` handler of the `LayoutFieldGrid`.\n *\n * @param dottedPath - The dotted-path to the field for which to generate the onChange handler\n * @returns - The `onChange` handling function for the `dottedPath` field\n */\n onFieldChange = (dottedPath: string) => {\n return (value: unknown, errSchema?: ErrorSchema<T>, id?: string) => {\n const { onChange, errorSchema, formData } = this.props;\n const newFormData = cloneDeep(formData || ({} as T));\n let newErrorSchema = errorSchema;\n if (errSchema && errorSchema) {\n newErrorSchema = cloneDeep(errorSchema);\n set(newErrorSchema, dottedPath, errSchema);\n }\n set(newFormData as object, dottedPath, value);\n onChange(newFormData, newErrorSchema, id);\n };\n };\n\n /** Renders the `children` of the `GridType.CONDITION` if it passes. The `layoutGridSchema` for the\n * `GridType.CONDITION` is separated into the `children` and other `gridProps`. The `gridProps` are used to extract\n * the `operator`, `field` and `value` of the condition. If the condition matches, then all of the `children` are\n * rendered, otherwise null is returned.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered the children for the `GridType.CONDITION` or null\n */\n renderCondition(layoutGridSchema: GridSchemaType) {\n const { formData, registry } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.CONDITION,\n registry,\n );\n const { operator, field = '', value } = gridProps;\n const fieldData = get(formData, field, null);\n if (LayoutGridField.conditionMatches(operator, fieldData, value)) {\n return this.renderChildren(children);\n }\n return null;\n }\n\n /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMN` is separated\n * into the `children` and other `gridProps`. The `gridProps` will be spread onto the outer `GridTemplate`. Inside\n * the `GridTemplate` all the `children` are rendered.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMN`\n */\n renderCol(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.COLUMN,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return (\n <GridTemplate column data-testid={LayoutGridField.TEST_IDS.col} {...gridProps}>\n {this.renderChildren(children)}\n </GridTemplate>\n );\n }\n\n /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMNS` is separated\n * into the `children` and other `gridProps`. The `children` is iterated on and `gridProps` will be spread onto the\n * outer `GridTemplate`. Each child will have their own rendered `GridTemplate`.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMNS`\n */\n renderColumns(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.COLUMNS,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return children.map((child) => (\n <GridTemplate\n column\n key={`column-${hashObject(child)}`}\n data-testid={LayoutGridField.TEST_IDS.col}\n {...gridProps}\n >\n {this.renderChildren([child])}\n </GridTemplate>\n ));\n }\n\n /** Renders a material-ui `GridTemplate` as a container. The\n * `layoutGridSchema` for the `GridType.ROW` is separated into the `children` and other `gridProps`. The `gridProps`\n * will be spread onto the outer `GridTemplate`. Inside of the `GridTemplate` all of the `children` are rendered.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.ROW`\n */\n renderRow(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.ROW,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return (\n <GridTemplate {...gridProps} data-testid={LayoutGridField.TEST_IDS.row}>\n {this.renderChildren(children)}\n </GridTemplate>\n );\n }\n\n /** Iterates through all the `childrenLayoutGridSchema`, rendering a nested `LayoutGridField` for each item in the\n * list, passing all the props for the current `LayoutGridField` along, updating the `schema` by calling\n * `retrieveSchema()` on it to resolve any `$ref`s. In addition to the updated `schema`, each item in\n * `childrenLayoutGridSchema` is passed as `layoutGridSchema`.\n *\n * @param childrenLayoutGridSchema - The list of strings or objects that represents the configurations for the\n * children fields\n * @returns - The nested `LayoutGridField`s\n */\n renderChildren(childrenLayoutGridSchema: LayoutGridSchemaType[]) {\n const { registry, schema: rawSchema, formData } = this.props;\n const { schemaUtils } = registry;\n const schema = schemaUtils.retrieveSchema(rawSchema, formData);\n\n return childrenLayoutGridSchema.map((layoutGridSchema) => (\n <LayoutGridField<T, S, F>\n {...this.props}\n key={`layoutGrid-${hashObject(layoutGridSchema)}`}\n schema={schema}\n layoutGridSchema={layoutGridSchema}\n />\n ));\n }\n\n /** Renders the field described by `gridSchema`. If `gridSchema` is not an object, then is will be assumed\n * to be the dotted-path to the field in the schema. Otherwise, we extract the `name`, and optional `render` and all\n * other props. If `name` does not exist and there is an optional `render`, we return the `render` component with only\n * specified props for that component. If `name` exists, we take the name, the initial & root schemas and the formData\n * and get the destination schema, is required state and optional oneOf/anyOf options for it. If the destination\n * schema was located along with oneOf/anyOf options then a `LayoutMultiSchemaField` will be rendered with the\n * `uiSchema`, `errorSchema`, `idSchema` and `formData` drilled down to the dotted-path field, spreading any other\n * props from `gridSchema` into the `ui:options`. If the destination schema located without any oneOf/anyOf options,\n * then a `SchemaField` will be rendered with the same props as mentioned in the previous sentence. If no destination\n * schema was located, but a custom render component was found, then it will be rendered with many of the non-event\n * handling props. If none of the previous render paths are valid, then a null is returned.\n *\n * @param gridSchema - The string or object that represents the configuration for the grid field\n * @returns - One of `LayoutMultiSchemaField`, `SchemaField`, a custom render component or null, depending\n */\n renderField(gridSchema?: ConfigObject | string) {\n const {\n schema: initialSchema,\n uiSchema,\n errorSchema,\n idSchema,\n onBlur,\n onFocus,\n formData,\n readonly,\n registry,\n idSeparator,\n layoutGridSchema, // Used to pull this out of otherProps since we don't want to pass it through\n ...otherProps\n } = this.props;\n const { fields, schemaUtils } = registry;\n const { SchemaField, LayoutMultiSchemaField } = fields;\n const uiComponentProps = LayoutGridField.computeUIComponentPropsFromGridSchema(registry, gridSchema);\n if (uiComponentProps.rendered) {\n return uiComponentProps.rendered;\n }\n const { name, UIComponent, uiProps } = uiComponentProps;\n const {\n schema,\n isRequired,\n isReadonly,\n optionsInfo,\n idSchema: fieldIdSchema,\n } = LayoutGridField.getSchemaDetailsForField<T, S, F>(\n schemaUtils,\n name,\n initialSchema,\n formData,\n idSchema,\n idSeparator,\n );\n\n if (schema) {\n const Field = optionsInfo?.hasDiscriminator ? LayoutMultiSchemaField : SchemaField;\n // Call this function to get the appropriate UISchema, which will always have its `readonly` state matching the\n // `uiReadonly` flag that it returns. This is done since the `SchemaField` will always defer to the `readonly`\n // state in the uiSchema over anything in the props or schema. Because we are implementing the \"readonly\" state of\n // the `Form` via the prop passed to `LayoutGridField` we need to make sure the uiSchema always has a true value\n // when it is needed\n const { fieldUiSchema, uiReadonly } = LayoutGridField.computeFieldUiSchema<T, S, F>(\n name,\n uiProps,\n uiSchema,\n isReadonly,\n readonly,\n );\n\n return (\n <Field\n data-testid={\n optionsInfo?.hasDiscriminator\n ? LayoutGridField.TEST_IDS.layoutMultiSchemaField\n : LayoutGridField.TEST_IDS.field\n }\n {...otherProps}\n name={name}\n required={isRequired}\n readonly={uiReadonly}\n schema={schema}\n uiSchema={fieldUiSchema}\n errorSchema={get(errorSchema, name)}\n idSchema={fieldIdSchema}\n idSeparator={idSeparator}\n formData={get(formData, name)}\n onChange={this.onFieldChange(name)}\n onBlur={onBlur}\n onFocus={onFocus}\n options={optionsInfo?.options}\n registry={registry}\n />\n );\n }\n\n if (UIComponent) {\n return (\n <UIComponent\n data-testid={LayoutGridField.TEST_IDS.uiComponent}\n {...otherProps}\n name={name}\n required={isRequired}\n formData={formData}\n readOnly={!!isReadonly || readonly}\n errorSchema={errorSchema}\n uiSchema={uiSchema}\n schema={initialSchema}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n {...uiProps}\n />\n );\n }\n return null;\n }\n\n /** Renders the `LayoutGridField`. If there isn't a `layoutGridSchema` prop defined, then try pulling it out of the\n * `uiSchema` via `ui:LayoutGridField`. If `layoutGridSchema` is an object, then check to see if any of the properties\n * match one of the `GridType`s. If so, call the appropriate render function for the type. Otherwise, just call the\n * generic `renderField()` function with the `layoutGridSchema`.\n *\n * @returns - the rendered `LayoutGridField`\n */\n render() {\n const { uiSchema } = this.props;\n let { layoutGridSchema } = this.props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n if (!layoutGridSchema && LAYOUT_GRID_UI_OPTION in uiOptions && isObject(uiOptions[LAYOUT_GRID_UI_OPTION])) {\n layoutGridSchema = uiOptions[LAYOUT_GRID_UI_OPTION];\n }\n\n if (isObject(layoutGridSchema)) {\n if (GridType.ROW in layoutGridSchema) {\n return this.renderRow(layoutGridSchema as GridSchemaType);\n }\n if (GridType.COLUMN in layoutGridSchema) {\n return this.renderCol(layoutGridSchema as GridSchemaType);\n }\n if (GridType.COLUMNS in layoutGridSchema) {\n return this.renderColumns(layoutGridSchema as GridSchemaType);\n }\n if (GridType.CONDITION in layoutGridSchema) {\n return this.renderCondition(layoutGridSchema as GridSchemaType);\n }\n }\n return this.renderField(layoutGridSchema);\n }\n}\n", "import {\n getTemplate,\n getUiOptions,\n titleId,\n FieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from '@rjsf/utils';\n\n/** The `LayoutHeaderField` component renders a `TitleFieldTemplate` with an `id` derived from the `idSchema`\n * and whether it is `required` from the props. The `title` is derived from the props as follows:\n * - If there is a title in the `uiSchema`, it is displayed\n * - Else, if there is an explicit `title` passed in the props, it is displayed\n * - Otherwise, if there is a title in the `schema`, it is displayed\n * - Finally, the `name` prop is displayed as the title\n *\n * @param props - The `LayoutHeaderField` for the component\n */\nexport default function LayoutHeaderField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldProps<T, S, F>) {\n const { idSchema, title, schema, uiSchema, required, registry, name } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { title: uiTitle } = options;\n const { title: schemaTitle } = schema;\n const fieldTitle = uiTitle || title || schemaTitle || name;\n if (!fieldTitle) {\n return null;\n }\n const TitleFieldTemplate: TemplatesType<T, S, F>['TitleFieldTemplate'] = getTemplate<'TitleFieldTemplate', T, S, F>(\n 'TitleFieldTemplate',\n registry,\n options,\n );\n return (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={fieldTitle}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { useState, useEffect } from 'react';\nimport {\n ANY_OF_KEY,\n CONST_KEY,\n DEFAULT_KEY,\n EnumOptionsType,\n ERRORS_KEY,\n FieldProps,\n FormContextType,\n getDiscriminatorFieldFromSchema,\n hashObject,\n ID_KEY,\n ONE_OF_KEY,\n optionsList,\n PROPERTIES_KEY,\n RJSFSchema,\n getTemplate,\n getUiOptions,\n getWidget,\n SchemaUtilsType,\n StrictRJSFSchema,\n UiSchema,\n} from '@rjsf/utils';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport isEmpty from 'lodash/isEmpty';\nimport noop from 'lodash/noop';\nimport omit from 'lodash/omit';\nimport set from 'lodash/set';\n\n/** Gets the selected option from the list of `options`, using the `selectorField` to search inside each `option` for\n * the `properties[selectorField].default(or const)` that matches the given `value`.\n *\n * @param options - The list of schemas each representing a choice in the `oneOf`\n * @param selectorField - The name of the field that is common in all of the schemas that represents the selector field\n * @param value - The current value of the selector field from the data\n */\nexport function getSelectedOption<S extends StrictRJSFSchema = RJSFSchema>(\n options: EnumOptionsType<S>[],\n selectorField: string,\n value: unknown,\n): S | undefined {\n const defaultValue = '!@#!@$@#$!@$#';\n const schemaOptions: S[] = options.map(({ schema }) => schema!);\n return schemaOptions.find((option) => {\n const selector = get(option, [PROPERTIES_KEY, selectorField]);\n const result = get(selector, DEFAULT_KEY, get(selector, CONST_KEY, defaultValue));\n return result === value;\n });\n}\n\n/** Computes the `enumOptions` array from the schema and options.\n *\n * @param schema - The schema that contains the `options`\n * @param options - The options from the `schema`\n * @param schemaUtils - The SchemaUtilsType object used to call retrieveSchema,\n * @param [uiSchema] - The optional uiSchema for the schema\n * @param [formData] - The optional formData associated with the schema\n * @returns - The list of enumOptions for the `schema` and `options`\n * @throws - Error when no enum options were computed\n */\nexport function computeEnumOptions<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schema: S,\n options: S[],\n schemaUtils: SchemaUtilsType<T, S, F>,\n uiSchema?: UiSchema<T, S, F>,\n formData?: T,\n): EnumOptionsType<S>[] {\n const realOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n let tempSchema = schema;\n if (has(schema, ONE_OF_KEY)) {\n tempSchema = { ...schema, [ONE_OF_KEY]: realOptions };\n } else if (has(schema, ANY_OF_KEY)) {\n tempSchema = { ...schema, [ANY_OF_KEY]: realOptions };\n }\n const enumOptions = optionsList<T, S, F>(tempSchema, uiSchema);\n if (!enumOptions) {\n throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(tempSchema)}`);\n }\n return enumOptions;\n}\n\n/** The `LayoutMultiSchemaField` is an adaptation of the `MultiSchemaField` but changed considerably to only\n * support `anyOf`/`oneOf` fields that are being displayed in a `LayoutGridField` where the field selection is shown as\n * a radio group by default. It expects that a `selectorField` is provided (either directly via the `discriminator`\n * field or indirectly via `ui:optionsSchemaSelector` in the `uiSchema`) to help determine which `anyOf`/`oneOf` schema\n * is active. If no `selectorField` is specified, then an error is thrown.\n */\nexport default function LayoutMultiSchemaField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldProps<T, S, F>) {\n const {\n name,\n baseType,\n disabled = false,\n formData,\n idSchema,\n onBlur,\n onChange,\n options,\n onFocus,\n registry,\n uiSchema,\n schema,\n formContext,\n autofocus,\n readonly,\n required,\n errorSchema,\n hideError = false,\n } = props;\n const { widgets, schemaUtils, globalUiOptions } = registry;\n const [enumOptions, setEnumOptions] = useState(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData)!);\n const id = get(idSchema, ID_KEY);\n const discriminator = getDiscriminatorFieldFromSchema(schema);\n const FieldErrorTemplate = getTemplate<'FieldErrorTemplate', T, S, F>('FieldErrorTemplate', registry, options);\n const FieldTemplate = getTemplate<'FieldTemplate', T, S, F>('FieldTemplate', registry, options);\n const schemaHash = hashObject(schema);\n const optionsHash = hashObject(options);\n const uiSchemaHash = uiSchema ? hashObject(uiSchema) : '';\n const formDataHash = formData ? hashObject(formData) : '';\n\n useEffect(() => {\n setEnumOptions(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));\n // We are using hashes in place of the dependencies\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [schemaHash, optionsHash, schemaUtils, uiSchemaHash, formDataHash]);\n const {\n widget = discriminator ? 'radio' : 'select',\n title = '',\n placeholder = '',\n optionsSchemaSelector: selectorField = discriminator,\n hideError: uiSchemaHideError,\n ...uiOptions\n } = getUiOptions<T, S, F>(uiSchema);\n if (!selectorField) {\n throw new Error('No selector field provided for the LayoutMultiSchemaField');\n }\n const selectedOption = get(formData, selectorField);\n let optionSchema: S = get(enumOptions[0]?.schema, [PROPERTIES_KEY, selectorField], {}) as S;\n const option = getSelectedOption<S>(enumOptions, selectorField, selectedOption);\n // If the subschema doesn't declare a type, infer the type from the parent schema\n optionSchema = optionSchema?.type ? optionSchema : ({ ...optionSchema, type: option?.type || baseType } as S);\n const Widget = getWidget<T, S, F>(optionSchema!, widget, widgets);\n\n // The following code was copied from `@rjsf`'s `SchemaField`\n // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n const hideFieldError = uiSchemaHideError === undefined ? hideError : Boolean(uiSchemaHideError);\n\n const rawErrors = get(errorSchema, [ERRORS_KEY], []) as string[];\n const fieldErrorSchema = omit(errorSchema, [ERRORS_KEY]);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n /** Callback function that updates the selected option and adjusts the form data based on the structure of the new\n * option, calling the `onChange` callback with the adjusted formData.\n *\n * @param opt - If the option is undefined, we are going to clear the selection otherwise we\n * will use it as the index of the new option to select\n */\n const onOptionChange = (opt?: unknown) => {\n const newOption = getSelectedOption<S>(enumOptions, selectorField, opt);\n const oldOption = getSelectedOption<S>(enumOptions, selectorField, selectedOption);\n\n let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);\n if (newFormData && newOption) {\n // Call getDefaultFormState to make sure defaults are populated on change.\n newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, 'excludeObjectChildren') as T;\n }\n if (newFormData) {\n set(newFormData, selectorField, opt);\n }\n onChange(newFormData, undefined, id);\n };\n\n // filtering the options based on the type of widget because `selectField` does not recognize the `convertOther` prop\n const widgetOptions = { enumOptions, ...uiOptions };\n const errors =\n !hideFieldError && rawErrors.length > 0 ? (\n <FieldErrorTemplate idSchema={idSchema} schema={schema} errors={rawErrors} registry={registry} />\n ) : undefined;\n const ignored = (value: string) => noop;\n\n return (\n <FieldTemplate\n id={id}\n schema={schema}\n label={(title || schema.title) ?? ''}\n disabled={disabled || (Array.isArray(enumOptions) && isEmpty(enumOptions))}\n uiSchema={uiSchema}\n formContext={formContext}\n required={required}\n readonly={!!readonly}\n registry={registry}\n displayLabel={displayLabel}\n errors={errors}\n onChange={onChange}\n onDropPropertyClick={ignored}\n onKeyChange={ignored}\n >\n <Widget\n id={id}\n name={name}\n schema={schema}\n label={(title || schema.title) ?? ''}\n disabled={disabled || (Array.isArray(enumOptions) && isEmpty(enumOptions))}\n uiSchema={uiSchema}\n formContext={formContext}\n autofocus={autofocus}\n readonly={readonly}\n required={required}\n registry={registry}\n multiple={false}\n rawErrors={rawErrors}\n hideError={hideFieldError}\n hideLabel={!displayLabel}\n errorSchema={fieldErrorSchema}\n placeholder={placeholder}\n onChange={onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n value={selectedOption}\n options={widgetOptions}\n />\n </FieldTemplate>\n );\n}\n", "import { Component } from 'react';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\nimport omit from 'lodash/omit';\nimport {\n ANY_OF_KEY,\n deepEquals,\n ERRORS_KEY,\n FieldProps,\n FormContextType,\n getDiscriminatorFieldFromSchema,\n getUiOptions,\n getWidget,\n mergeSchemas,\n ONE_OF_KEY,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UiSchema,\n} from '@rjsf/utils';\n\n/** Type used for the state of the `AnyOfField` component */\ntype AnyOfFieldState<S extends StrictRJSFSchema = RJSFSchema> = {\n /** The currently selected option */\n selectedOption: number;\n /** The option schemas after retrieving all $refs */\n retrievedOptions: S[];\n};\n\n/** The `AnyOfField` component is used to render a field in the schema that is an `anyOf`, `allOf` or `oneOf`. It tracks\n * the currently selected option and cleans up any irrelevant data in `formData`.\n *\n * @param props - The `FieldProps` for this template\n */\nclass AnyOfField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>,\n AnyOfFieldState<S>\n> {\n /** Constructs an `AnyOfField` with the given `props` to initialize the initially selected option in state\n *\n * @param props - The `FieldProps` for this template\n */\n constructor(props: FieldProps<T, S, F>) {\n super(props);\n\n const {\n formData,\n options,\n registry: { schemaUtils },\n } = this.props;\n // cache the retrieved options in state in case they have $refs to save doing it later\n const retrievedOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n\n this.state = {\n retrievedOptions,\n selectedOption: this.getMatchingOption(0, formData, retrievedOptions),\n };\n }\n\n /** React lifecycle method that is called when the props and/or state for this component is updated. It recomputes the\n * currently selected option based on the overall `formData`\n *\n * @param prevProps - The previous `FieldProps` for this template\n * @param prevState - The previous `AnyOfFieldState` for this template\n */\n componentDidUpdate(prevProps: Readonly<FieldProps<T, S, F>>, prevState: Readonly<AnyOfFieldState>) {\n const { formData, options, idSchema } = this.props;\n const { selectedOption } = this.state;\n let newState = this.state;\n if (!deepEquals(prevProps.options, options)) {\n const {\n registry: { schemaUtils },\n } = this.props;\n // re-cache the retrieved options in state in case they have $refs to save doing it later\n const retrievedOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n newState = { selectedOption, retrievedOptions };\n }\n if (!deepEquals(formData, prevProps.formData) && idSchema.$id === prevProps.idSchema.$id) {\n const { retrievedOptions } = newState;\n const matchingOption = this.getMatchingOption(selectedOption, formData, retrievedOptions);\n\n if (prevState && matchingOption !== selectedOption) {\n newState = { selectedOption: matchingOption, retrievedOptions };\n }\n }\n if (newState !== this.state) {\n this.setState(newState);\n }\n }\n\n /** Determines the best matching option for the given `formData` and `options`.\n *\n * @param formData - The new formData\n * @param options - The list of options to choose from\n * @return - The index of the `option` that best matches the `formData`\n */\n getMatchingOption(selectedOption: number, formData: T | undefined, options: S[]) {\n const {\n schema,\n registry: { schemaUtils },\n } = this.props;\n\n const discriminator = getDiscriminatorFieldFromSchema<S>(schema);\n const option = schemaUtils.getClosestMatchingOption(formData, options, selectedOption, discriminator);\n return option;\n }\n\n /** Callback handler to remember what the currently selected option is. In addition to that the `formData` is updated\n * to remove properties that are not part of the newly selected option schema, and then the updated data is passed to\n * the `onChange` handler.\n *\n * @param option - The new option value being selected\n */\n onOptionChange = (option?: string) => {\n const { selectedOption, retrievedOptions } = this.state;\n const { formData, onChange, registry } = this.props;\n const { schemaUtils } = registry;\n const intOption = option !== undefined ? parseInt(option, 10) : -1;\n if (intOption === selectedOption) {\n return;\n }\n const newOption = intOption >= 0 ? retrievedOptions[intOption] : undefined;\n const oldOption = selectedOption >= 0 ? retrievedOptions[selectedOption] : undefined;\n\n let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);\n if (newOption) {\n // Call getDefaultFormState to make sure defaults are populated on change. Pass \"excludeObjectChildren\"\n // so that only the root objects themselves are created without adding undefined children properties\n newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, 'excludeObjectChildren') as T;\n }\n\n this.setState({ selectedOption: intOption }, () => {\n onChange(newFormData, undefined, this.getFieldId());\n });\n };\n\n getFieldId() {\n const { idSchema, schema } = this.props;\n return `${idSchema.$id}${schema.oneOf ? '__oneof_select' : '__anyof_select'}`;\n }\n\n /** Renders the `AnyOfField` selector along with a `SchemaField` for the value of the `formData`\n */\n render() {\n const {\n name,\n disabled = false,\n errorSchema = {},\n formContext,\n onBlur,\n onFocus,\n readonly,\n registry,\n schema,\n uiSchema,\n } = this.props;\n\n const { widgets, fields, translateString, globalUiOptions, schemaUtils } = registry;\n const { SchemaField: _SchemaField } = fields;\n const { selectedOption, retrievedOptions } = this.state;\n const {\n widget = 'select',\n placeholder,\n autofocus,\n autocomplete,\n title = schema.title,\n ...uiOptions\n } = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T, S, F>({ type: 'number' }, widget, widgets);\n const rawErrors = get(errorSchema, ERRORS_KEY, []);\n const fieldErrorSchema = omit(errorSchema, [ERRORS_KEY]);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n const option = selectedOption >= 0 ? retrievedOptions[selectedOption] || null : null;\n let optionSchema: S | undefined | null;\n\n if (option) {\n // merge top level required field\n const { required } = schema;\n // Merge in all the non-oneOf/anyOf properties and also skip the special ADDITIONAL_PROPERTY_FLAG property\n optionSchema = required ? (mergeSchemas({ required }, option) as S) : option;\n }\n\n // First we will check to see if there is an anyOf/oneOf override for the UI schema\n let optionsUiSchema: UiSchema<T, S, F>[] = [];\n if (ONE_OF_KEY in schema && uiSchema && ONE_OF_KEY in uiSchema) {\n if (Array.isArray(uiSchema[ONE_OF_KEY])) {\n optionsUiSchema = uiSchema[ONE_OF_KEY];\n } else {\n console.warn(`uiSchema.oneOf is not an array for \"${title || name}\"`);\n }\n } else if (ANY_OF_KEY in schema && uiSchema && ANY_OF_KEY in uiSchema) {\n if (Array.isArray(uiSchema[ANY_OF_KEY])) {\n optionsUiSchema = uiSchema[ANY_OF_KEY];\n } else {\n console.warn(`uiSchema.anyOf is not an array for \"${title || name}\"`);\n }\n }\n // Then we pick the one that matches the selected option index, if one exists otherwise default to the main uiSchema\n let optionUiSchema = uiSchema;\n if (selectedOption >= 0 && optionsUiSchema.length > selectedOption) {\n optionUiSchema = optionsUiSchema[selectedOption];\n }\n\n const translateEnum: TranslatableString = title\n ? TranslatableString.TitleOptionPrefix\n : TranslatableString.OptionPrefix;\n const translateParams = title ? [title] : [];\n const enumOptions = retrievedOptions.map((opt: { title?: string }, index: number) => {\n // Also see if there is an override title in the uiSchema for each option, otherwise use the title from the option\n const { title: uiTitle = opt.title } = getUiOptions<T, S, F>(optionsUiSchema[index]);\n return {\n label: uiTitle || translateString(translateEnum, translateParams.concat(String(index + 1))),\n value: index,\n };\n });\n\n return (\n <div className='panel panel-default panel-body'>\n <div className='form-group'>\n <Widget\n id={this.getFieldId()}\n name={`${name}${schema.oneOf ? '__oneof_select' : '__anyof_select'}`}\n schema={{ type: 'number', default: 0 } as S}\n onChange={this.onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n disabled={disabled || isEmpty(enumOptions)}\n multiple={false}\n rawErrors={rawErrors}\n errorSchema={fieldErrorSchema}\n value={selectedOption >= 0 ? selectedOption : undefined}\n options={{ enumOptions, ...uiOptions }}\n registry={registry}\n formContext={formContext}\n placeholder={placeholder}\n autocomplete={autocomplete}\n autofocus={autofocus}\n label={title ?? name}\n hideLabel={!displayLabel}\n readonly={readonly}\n />\n </div>\n {optionSchema && optionSchema.type !== 'null' && (\n <_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} />\n )}\n </div>\n );\n }\n}\n\nexport default AnyOfField;\n", "import { useState, useCallback } from 'react';\nimport { asNumber, ErrorSchema, FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n// Matches a string that ends in a . character, optionally followed by a sequence of\n// digits followed by any number of 0 characters up until the end of the line.\n// Ensuring that there is at least one prefixed character is important so that\n// you don't incorrectly match against \"0\".\nconst trailingCharMatcherWithPrefix = /\\.([0-9]*0)*$/;\n\n// This is used for trimming the trailing 0 and . characters without affecting\n// the rest of the string. Its possible to use one RegEx with groups for this\n// functionality, but it is fairly complex compared to simply defining two\n// different matchers.\nconst trailingCharMatcher = /[0.]0*$/;\n\n/**\n * The NumberField class has some special handling for dealing with trailing\n * decimal points and/or zeroes. This logic is designed to allow trailing values\n * to be visible in the input element, but not be represented in the\n * corresponding form data.\n *\n * The algorithm is as follows:\n *\n * 1. When the input value changes the value is cached in the component state\n *\n * 2. The value is then normalized, removing trailing decimal points and zeros,\n * then passed to the \"onChange\" callback\n *\n * 3. When the component is rendered, the formData value is checked against the\n * value cached in the state. If it matches the cached value, the cached\n * value is passed to the input instead of the formData value\n */\nfunction NumberField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const { registry, onChange, formData, value: initialValue } = props;\n const [lastValue, setLastValue] = useState(initialValue);\n const { StringField } = registry.fields;\n\n let value = formData;\n\n /** Handle the change from the `StringField` to properly convert to a number\n *\n * @param value - The current value for the change occurring\n */\n const handleChange = useCallback(\n (value: FieldProps<T, S, F>['value'], errorSchema?: ErrorSchema<T>, id?: string) => {\n // Cache the original value in component state\n setLastValue(value);\n\n // Normalize decimals that don't start with a zero character in advance so\n // that the rest of the normalization logic is simpler\n if (`${value}`.charAt(0) === '.') {\n value = `0${value}`;\n }\n\n // Check that the value is a string (this can happen if the widget used is a\n // <select>, due to an enum declaration etc) then, if the value ends in a\n // trailing decimal point or multiple zeroes, strip the trailing values\n const processed =\n typeof value === 'string' && value.match(trailingCharMatcherWithPrefix)\n ? asNumber(value.replace(trailingCharMatcher, ''))\n : asNumber(value);\n\n onChange(processed as unknown as T, errorSchema, id);\n },\n [onChange],\n );\n\n if (typeof lastValue === 'string' && typeof value === 'number') {\n // Construct a regular expression that checks for a string that consists\n // of the formData value suffixed with zero or one '.' characters and zero\n // or more '0' characters\n const re = new RegExp(`^(${String(value).replace('.', '\\\\.')})?\\\\.?0*$`);\n\n // If the cached \"lastValue\" is a match, use that instead of the formData\n // value to prevent the input value from changing in the UI\n if (lastValue.match(re)) {\n value = lastValue as unknown as T;\n }\n }\n\n return <StringField {...props} formData={value} onChange={handleChange} />;\n}\n\nexport default NumberField;\n", "import { Component } from 'react';\nimport {\n getTemplate,\n getUiOptions,\n orderProperties,\n ErrorSchema,\n FieldProps,\n FormContextType,\n GenericObjectType,\n IdSchema,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n ADDITIONAL_PROPERTY_FLAG,\n PROPERTIES_KEY,\n REF_KEY,\n ANY_OF_KEY,\n ONE_OF_KEY,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport isObject from 'lodash/isObject';\nimport set from 'lodash/set';\nimport unset from 'lodash/unset';\n\n/** Type used for the state of the `ObjectField` component */\ntype ObjectFieldState = {\n /** Flag indicating whether an additional property key was modified */\n wasPropertyKeyModified: boolean;\n /** The set of additional properties */\n additionalProperties: object;\n};\n\n/** The `ObjectField` component is used to render a field in the schema that is of type `object`. It tracks whether an\n * additional property key was modified and what it was modified to\n *\n * @param props - The `FieldProps` for this template\n */\nclass ObjectField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>,\n ObjectFieldState\n> {\n /** Set up the initial state */\n state = {\n wasPropertyKeyModified: false,\n additionalProperties: {},\n };\n\n /** Returns a flag indicating whether the `name` field is required in the object schema\n *\n * @param name - The name of the field to check for required-ness\n * @returns - True if the field `name` is required, false otherwise\n */\n isRequired(name: string) {\n const { schema } = this.props;\n return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;\n }\n\n /** Returns the `onPropertyChange` handler for the `name` field. Handles the special case where a user is attempting\n * to clear the data for a field added as an additional property. Calls the `onChange()` handler with the updated\n * formData.\n *\n * @param name - The name of the property\n * @param addedByAdditionalProperties - Flag indicating whether this property is an additional property\n * @returns - The onPropertyChange callback for the `name` property\n */\n onPropertyChange = (name: string, addedByAdditionalProperties = false) => {\n return (value: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { formData, onChange, errorSchema } = this.props;\n if (value === undefined && addedByAdditionalProperties) {\n // Don't set value = undefined for fields added by\n // additionalProperties. Doing so removes them from the\n // formData, which causes them to completely disappear\n // (including the input field for the property name). Unlike\n // fields which are \"mandated\" by the schema, these fields can\n // be set to undefined by clicking a \"delete field\" button, so\n // set empty values to the empty string.\n value = '' as unknown as T;\n }\n const newFormData = { ...formData, [name]: value } as unknown as T;\n onChange(\n newFormData,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [name]: newErrorSchema,\n },\n id,\n );\n };\n };\n\n /** Returns a callback to handle the onDropPropertyClick event for the given `key` which removes the old `key` data\n * and calls the `onChange` callback with it\n *\n * @param key - The key for which the drop callback is desired\n * @returns - The drop property click callback\n */\n onDropPropertyClick = (key: string) => {\n return (event: DragEvent) => {\n event.preventDefault();\n const { onChange, formData } = this.props;\n const copiedFormData = { ...formData } as T;\n unset(copiedFormData, key);\n onChange(copiedFormData);\n };\n };\n\n /** Computes the next available key name from the `preferredKey`, indexing through the already existing keys until one\n * that is already not assigned is found.\n *\n * @param preferredKey - The preferred name of a new key\n * @param [formData] - The form data in which to check if the desired key already exists\n * @returns - The name of the next available key from `preferredKey`\n */\n getAvailableKey = (preferredKey: string, formData?: T) => {\n const { uiSchema, registry } = this.props;\n const { duplicateKeySuffixSeparator = '-' } = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n\n let index = 0;\n let newKey = preferredKey;\n while (has(formData, newKey)) {\n newKey = `${preferredKey}${duplicateKeySuffixSeparator}${++index}`;\n }\n return newKey;\n };\n\n /** Returns a callback function that deals with the rename of a key for an additional property for a schema. That\n * callback will attempt to rename the key and move the existing data to that key, calling `onChange` when it does.\n *\n * @param oldValue - The old value of a field\n * @returns - The key change callback function\n */\n onKeyChange = (oldValue: any) => {\n return (value: any, newErrorSchema: ErrorSchema<T>) => {\n if (oldValue === value) {\n return;\n }\n const { formData, onChange, errorSchema } = this.props;\n\n value = this.getAvailableKey(value, formData);\n const newFormData: GenericObjectType = {\n ...(formData as GenericObjectType),\n };\n const newKeys: GenericObjectType = { [oldValue]: value };\n const keyValues = Object.keys(newFormData).map((key) => {\n const newKey = newKeys[key] || key;\n return { [newKey]: newFormData[key] };\n });\n const renamedObj = Object.assign({}, ...keyValues);\n\n this.setState({ wasPropertyKeyModified: true });\n\n onChange(\n renamedObj,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [value]: newErrorSchema,\n },\n );\n };\n };\n\n /** Returns a default value to be used for a new additional schema property of the given `type`\n *\n * @param type - The type of the new additional schema property\n */\n getDefaultValue(type?: RJSFSchema['type']) {\n const {\n registry: { translateString },\n } = this.props;\n switch (type) {\n case 'array':\n return [];\n case 'boolean':\n return false;\n case 'null':\n return null;\n case 'number':\n return 0;\n case 'object':\n return {};\n case 'string':\n default:\n // We don't have a datatype for some reason (perhaps additionalProperties was true)\n return translateString(TranslatableString.NewStringDefault);\n }\n }\n\n /** Handles the adding of a new additional property on the given `schema`. Calls the `onChange` callback once the new\n * default data for that field has been added to the formData.\n *\n * @param schema - The schema element to which the new property is being added\n */\n handleAddClick = (schema: S) => () => {\n if (!(schema.additionalProperties || schema.patternProperties)) {\n return;\n }\n const { formData, onChange, registry } = this.props;\n const newFormData = { ...formData } as T;\n const newKey = this.getAvailableKey('newKey', newFormData);\n if (schema.patternProperties) {\n // Cast this to make the `set` work properly\n set(newFormData as GenericObjectType, newKey, null);\n } else {\n let type: RJSFSchema['type'] = undefined;\n let constValue: RJSFSchema['const'] = undefined;\n let defaultValue: RJSFSchema['default'] = undefined;\n if (isObject(schema.additionalProperties)) {\n type = schema.additionalProperties.type;\n constValue = schema.additionalProperties.const;\n defaultValue = schema.additionalProperties.default;\n let apSchema = schema.additionalProperties;\n if (REF_KEY in apSchema) {\n const { schemaUtils } = registry;\n apSchema = schemaUtils.retrieveSchema({ $ref: apSchema[REF_KEY] } as S, formData);\n type = apSchema.type;\n constValue = apSchema.const;\n defaultValue = apSchema.default;\n }\n if (!type && (ANY_OF_KEY in apSchema || ONE_OF_KEY in apSchema)) {\n type = 'object';\n }\n }\n\n const newValue = constValue ?? defaultValue ?? this.getDefaultValue(type);\n // Cast this to make the `set` work properly\n set(newFormData as GenericObjectType, newKey, newValue);\n }\n\n onChange(newFormData);\n };\n\n /** Renders the `ObjectField` from the given props\n */\n render() {\n const {\n schema: rawSchema,\n uiSchema = {},\n formData,\n errorSchema,\n idSchema,\n name,\n required = false,\n disabled,\n readonly,\n hideError,\n idPrefix,\n idSeparator,\n onBlur,\n onFocus,\n registry,\n title,\n } = this.props;\n\n const { fields, formContext, schemaUtils, translateString, globalUiOptions } = registry;\n const { SchemaField } = fields;\n const schema: S = schemaUtils.retrieveSchema(rawSchema, formData);\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const { properties: schemaProperties = {} } = schema;\n\n const templateTitle = uiOptions.title ?? schema.title ?? title ?? name;\n const description = uiOptions.description ?? schema.description;\n let orderedProperties: string[];\n try {\n const properties = Object.keys(schemaProperties);\n orderedProperties = orderProperties(properties, uiOptions.order);\n } catch (err) {\n return (\n <div>\n <p className='rjsf-config-error' style={{ color: 'red' }}>\n <Markdown options={{ disableParsingRawHTML: true }}>\n {translateString(TranslatableString.InvalidObjectField, [name || 'root', (err as Error).message])}\n </Markdown>\n </p>\n <pre>{JSON.stringify(schema)}</pre>\n </div>\n );\n }\n\n const Template = getTemplate<'ObjectFieldTemplate', T, S, F>('ObjectFieldTemplate', registry, uiOptions);\n\n const templateProps = {\n // getDisplayLabel() always returns false for object types, so just check the `uiOptions.label`\n title: uiOptions.label === false ? '' : templateTitle,\n description: uiOptions.label === false ? undefined : description,\n properties: orderedProperties.map((name) => {\n const addedByAdditionalProperties = has(schema, [PROPERTIES_KEY, name, ADDITIONAL_PROPERTY_FLAG]);\n const fieldUiSchema = addedByAdditionalProperties ? uiSchema.additionalProperties : uiSchema[name];\n const hidden = getUiOptions<T, S, F>(fieldUiSchema).widget === 'hidden';\n const fieldIdSchema: IdSchema<T> = get(idSchema, [name], {});\n\n return {\n content: (\n <SchemaField\n key={name}\n name={name}\n required={this.isRequired(name)}\n schema={get(schema, [PROPERTIES_KEY, name], {}) as S}\n uiSchema={fieldUiSchema}\n errorSchema={get(errorSchema, name)}\n idSchema={fieldIdSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formData={get(formData, name)}\n formContext={formContext}\n wasPropertyKeyModified={this.state.wasPropertyKeyModified}\n onKeyChange={this.onKeyChange(name)}\n onChange={this.onPropertyChange(name, addedByAdditionalProperties)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n onDropPropertyClick={this.onDropPropertyClick}\n />\n ),\n name,\n readonly,\n disabled,\n required,\n hidden,\n };\n }),\n readonly,\n disabled,\n required,\n idSchema,\n uiSchema,\n errorSchema,\n schema,\n formData,\n formContext,\n registry,\n };\n return <Template {...templateProps} onAddClick={this.handleAddClick} />;\n }\n}\n\nexport default ObjectField;\n", "import { useCallback, Component, ComponentType } from 'react';\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n deepEquals,\n descriptionId,\n ErrorSchema,\n FieldProps,\n FieldTemplateProps,\n FormContextType,\n getSchemaType,\n getTemplate,\n getUiOptions,\n ID_KEY,\n IdSchema,\n mergeObjects,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UI_OPTIONS_KEY,\n UIOptionsType,\n} from '@rjsf/utils';\nimport isObject from 'lodash/isObject';\nimport omit from 'lodash/omit';\n\n/** The map of component type to FieldName */\nconst COMPONENT_TYPES: { [key: string]: string } = {\n array: 'ArrayField',\n boolean: 'BooleanField',\n integer: 'NumberField',\n number: 'NumberField',\n object: 'ObjectField',\n string: 'StringField',\n null: 'NullField',\n};\n\n/** Computes and returns which `Field` implementation to return in order to render the field represented by the\n * `schema`. The `uiOptions` are used to alter what potential `Field` implementation is actually returned. If no\n * appropriate `Field` implementation can be found then a wrapper around `UnsupportedFieldTemplate` is used.\n *\n * @param schema - The schema from which to obtain the type\n * @param uiOptions - The UI Options that may affect the component decision\n * @param idSchema - The id that is passed to the `UnsupportedFieldTemplate`\n * @param registry - The registry from which fields and templates are obtained\n * @returns - The `Field` component that is used to render the actual field data\n */\nfunction getFieldComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schema: S,\n uiOptions: UIOptionsType<T, S, F>,\n idSchema: IdSchema<T>,\n registry: Registry<T, S, F>,\n): ComponentType<FieldProps<T, S, F>> {\n const field = uiOptions.field;\n const { fields, translateString } = registry;\n if (typeof field === 'function') {\n return field;\n }\n if (typeof field === 'string' && field in fields) {\n return fields[field] as ComponentType<FieldProps<T, S, F>>;\n }\n\n const schemaType = getSchemaType(schema);\n const type: string = Array.isArray(schemaType) ? schemaType[0] : schemaType || '';\n\n const schemaId = schema.$id;\n\n let componentName = COMPONENT_TYPES[type];\n if (schemaId && schemaId in fields) {\n componentName = schemaId;\n }\n\n // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't\n // render a field and let the MultiSchemaField component handle the form display\n if (!componentName && (schema.anyOf || schema.oneOf)) {\n return () => null;\n }\n\n return componentName in fields\n ? fields[componentName]\n : () => {\n const UnsupportedFieldTemplate = getTemplate<'UnsupportedFieldTemplate', T, S, F>(\n 'UnsupportedFieldTemplate',\n registry,\n uiOptions,\n );\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason={translateString(TranslatableString.UnknownFieldType, [String(schema.type)])}\n registry={registry}\n />\n );\n };\n}\n\n/** The `SchemaFieldRender` component is the work-horse of react-jsonschema-form, determining what kind of real field to\n * render based on the `schema`, `uiSchema` and all the other props. It also deals with rendering the `anyOf` and\n * `oneOf` fields.\n *\n * @param props - The `FieldProps` for this component\n */\nfunction SchemaFieldRender<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema: _schema,\n idSchema: _idSchema,\n uiSchema,\n formData,\n errorSchema,\n idPrefix,\n idSeparator,\n name,\n onChange,\n onKeyChange,\n onDropPropertyClick,\n required,\n registry,\n wasPropertyKeyModified = false,\n } = props;\n const { formContext, schemaUtils, globalUiOptions } = registry;\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const FieldTemplate = getTemplate<'FieldTemplate', T, S, F>('FieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions,\n );\n const FieldHelpTemplate = getTemplate<'FieldHelpTemplate', T, S, F>('FieldHelpTemplate', registry, uiOptions);\n const FieldErrorTemplate = getTemplate<'FieldErrorTemplate', T, S, F>('FieldErrorTemplate', registry, uiOptions);\n const schema = schemaUtils.retrieveSchema(_schema, formData);\n const fieldId = _idSchema[ID_KEY];\n const idSchema = mergeObjects(\n schemaUtils.toIdSchema(schema, fieldId, formData, idPrefix, idSeparator),\n _idSchema,\n ) as IdSchema<T>;\n\n /** Intermediary `onChange` handler for field components that will inject the `id` of the current field into the\n * `onChange` chain if it is not already being provided from a deeper level in the hierarchy\n */\n const handleFieldComponentChange = useCallback(\n (formData: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const theId = id || fieldId;\n return onChange(formData, newErrorSchema, theId);\n },\n [fieldId, onChange],\n );\n\n const FieldComponent = getFieldComponent<T, S, F>(schema, uiOptions, idSchema, registry);\n const disabled = Boolean(uiOptions.disabled ?? props.disabled);\n const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));\n const uiSchemaHideError = uiOptions.hideError;\n // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n const hideError = uiSchemaHideError === undefined ? props.hideError : Boolean(uiSchemaHideError);\n const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);\n if (Object.keys(schema).length === 0) {\n return null;\n }\n\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n const { __errors, ...fieldErrorSchema } = errorSchema || {};\n // See #439: uiSchema: Don't pass consumed class names or style to child components\n const fieldUiSchema = omit(uiSchema, ['ui:classNames', 'classNames', 'ui:style']);\n if (UI_OPTIONS_KEY in fieldUiSchema) {\n fieldUiSchema[UI_OPTIONS_KEY] = omit(fieldUiSchema[UI_OPTIONS_KEY], ['classNames', 'style']);\n }\n\n const field = (\n <FieldComponent\n {...props}\n onChange={handleFieldComponentChange}\n idSchema={idSchema}\n schema={schema}\n uiSchema={fieldUiSchema}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n errorSchema={fieldErrorSchema as ErrorSchema}\n formContext={formContext}\n rawErrors={__errors}\n />\n );\n\n const id = idSchema[ID_KEY];\n\n // If this schema has a title defined, but the user has set a new key/label, retain their input.\n let label;\n if (wasPropertyKeyModified) {\n label = name;\n } else {\n label =\n ADDITIONAL_PROPERTY_FLAG in schema\n ? name\n : uiOptions.title || props.schema.title || schema.title || props.title || name;\n }\n\n const description = uiOptions.description || props.schema.description || schema.description || '';\n const help = uiOptions.help;\n const hidden = uiOptions.widget === 'hidden';\n\n const classNames = ['rjsf-field', `rjsf-field-${getSchemaType(schema)}`];\n if (!hideError && __errors && __errors.length > 0) {\n classNames.push('rjsf-field-error');\n }\n if (uiOptions.classNames) {\n classNames.push(uiOptions.classNames);\n }\n\n const helpComponent = (\n <FieldHelpTemplate\n help={help}\n idSchema={idSchema}\n schema={schema}\n uiSchema={uiSchema}\n hasErrors={!hideError && __errors && __errors.length > 0}\n registry={registry}\n />\n );\n /*\n * AnyOf/OneOf errors handled by child schema\n * unless it can be rendered as select control\n */\n const errorsComponent =\n hideError || ((schema.anyOf || schema.oneOf) && !schemaUtils.isSelect(schema)) ? undefined : (\n <FieldErrorTemplate\n errors={__errors}\n errorSchema={errorSchema}\n idSchema={idSchema}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n const fieldProps: Omit<FieldTemplateProps<T, S, F>, 'children'> = {\n description: (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n ),\n rawDescription: description,\n help: helpComponent,\n rawHelp: typeof help === 'string' ? help : undefined,\n errors: errorsComponent,\n rawErrors: hideError ? undefined : __errors,\n id,\n label,\n hidden,\n onChange,\n onKeyChange,\n onDropPropertyClick,\n required,\n disabled,\n readonly,\n hideError,\n displayLabel,\n classNames: classNames.join(' ').trim(),\n style: uiOptions.style,\n formContext,\n formData,\n schema,\n uiSchema,\n registry,\n };\n\n const _AnyOfField = registry.fields.AnyOfField;\n const _OneOfField = registry.fields.OneOfField;\n const isReplacingAnyOrOneOf = uiSchema?.['ui:field'] && uiSchema?.['ui:fieldReplacesAnyOrOneOf'] === true;\n\n return (\n <FieldTemplate {...fieldProps}>\n <>\n {field}\n {/*\n If the schema `anyOf` or 'oneOf' can be rendered as a select control, don't\n render the selection and let `StringField` component handle\n rendering\n */}\n {schema.anyOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && (\n <_AnyOfField\n name={name}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\n formContext={formContext}\n idPrefix={idPrefix}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={props.onBlur}\n onChange={props.onChange}\n onFocus={props.onFocus}\n options={schema.anyOf.map((_schema) =>\n schemaUtils.retrieveSchema(isObject(_schema) ? (_schema as S) : ({} as S), formData),\n )}\n registry={registry}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n {schema.oneOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && (\n <_OneOfField\n name={name}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\n formContext={formContext}\n idPrefix={idPrefix}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={props.onBlur}\n onChange={props.onChange}\n onFocus={props.onFocus}\n options={schema.oneOf.map((_schema) =>\n schemaUtils.retrieveSchema(isObject(_schema) ? (_schema as S) : ({} as S), formData),\n )}\n registry={registry}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n </>\n </FieldTemplate>\n );\n}\n\n/** The `SchemaField` component determines whether it is necessary to rerender the component based on any props changes\n * and if so, calls the `SchemaFieldRender` component with the props.\n */\nclass SchemaField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>\n> {\n shouldComponentUpdate(nextProps: Readonly<FieldProps<T, S, F>>) {\n return !deepEquals(this.props, nextProps);\n }\n\n render() {\n return <SchemaFieldRender<T, S, F> {...this.props} />;\n }\n}\n\nexport default SchemaField;\n", "import {\n getWidget,\n getUiOptions,\n optionsList,\n hasWidget,\n FieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `StringField` component is used to render a schema field that represents a string type\n *\n * @param props - The `FieldProps` for this template\n */\nfunction StringField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n required,\n disabled = false,\n readonly = false,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n hideError,\n } = props;\n const { title, format } = schema;\n const { widgets, formContext, schemaUtils, globalUiOptions } = registry;\n const enumOptions = schemaUtils.isSelect(schema) ? optionsList<T, S, F>(schema, uiSchema) : undefined;\n let defaultWidget = enumOptions ? 'select' : 'text';\n if (format && hasWidget<T, S, F>(schema, format, widgets)) {\n defaultWidget = format;\n }\n const { widget = defaultWidget, placeholder = '', title: uiTitle, ...options } = getUiOptions<T, S, F>(uiSchema);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n const label = uiTitle ?? title ?? name;\n const Widget = getWidget<T, S, F>(schema, widget, widgets);\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema.$id}\n name={name}\n label={label}\n hideLabel={!displayLabel}\n hideError={hideError}\n value={formData}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n required={required}\n disabled={disabled}\n readonly={readonly}\n formContext={formContext}\n autofocus={autofocus}\n registry={registry}\n placeholder={placeholder}\n rawErrors={rawErrors}\n />\n );\n}\n\nexport default StringField;\n", "import { useEffect } from 'react';\nimport { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `NullField` component is used to render a field in the schema is null. It also ensures that the `formData` is\n * also set to null if it has no value.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction NullField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const { formData, onChange } = props;\n useEffect(() => {\n if (formData === undefined) {\n onChange(null as unknown as T);\n }\n }, [formData, onChange]);\n\n return null;\n}\n\nexport default NullField;\n", "import { Field, FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport ArrayField from './ArrayField';\nimport BooleanField from './BooleanField';\nimport LayoutGridField from './LayoutGridField';\nimport LayoutHeaderField from './LayoutHeaderField';\nimport LayoutMultiSchemaField from './LayoutMultiSchemaField';\nimport MultiSchemaField from './MultiSchemaField';\nimport NumberField from './NumberField';\nimport ObjectField from './ObjectField';\nimport SchemaField from './SchemaField';\nimport StringField from './StringField';\nimport NullField from './NullField';\n\nfunction fields<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryFieldsType<T, S, F> {\n return {\n AnyOfField: MultiSchemaField,\n ArrayField: ArrayField as unknown as Field<T, S, F>,\n // ArrayField falls back to SchemaField if ArraySchemaField is not defined, which it isn't by default\n BooleanField,\n LayoutGridField,\n LayoutHeaderField,\n LayoutMultiSchemaField,\n NumberField,\n ObjectField,\n OneOfField: MultiSchemaField,\n SchemaField,\n StringField,\n NullField,\n };\n}\n\nexport default fields;\n", "import {\n descriptionId,\n getTemplate,\n getUiOptions,\n ArrayFieldDescriptionProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldDescriptionTemplate` component renders a `DescriptionFieldTemplate` with an `id` derived from\n * the `idSchema`.\n *\n * @param props - The `ArrayFieldDescriptionProps` for the component\n */\nexport default function ArrayFieldDescriptionTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldDescriptionProps<T, S, F>) {\n const { idSchema, description, registry, schema, uiSchema } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { label: displayLabel = true } = options;\n if (!description || !displayLabel) {\n return null;\n }\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n return (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { CSSProperties } from 'react';\nimport {\n ArrayFieldItemTemplateType,\n FormContextType,\n getTemplate,\n getUiOptions,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemTemplateType<T, S, F>) {\n const { children, className, buttonsProps, hasToolbar, registry, uiSchema } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(\n 'ArrayFieldItemButtonsTemplate',\n registry,\n uiOptions,\n );\n const btnStyle: CSSProperties = {\n flex: 1,\n paddingLeft: 6,\n paddingRight: 6,\n fontWeight: 'bold',\n };\n return (\n <div className={className}>\n <div className={hasToolbar ? 'col-xs-9' : 'col-xs-12'}>{children}</div>\n {hasToolbar && (\n <div className='col-xs-3 array-item-toolbox'>\n <div\n className='btn-group'\n style={{\n display: 'flex',\n justifyContent: 'space-around',\n }}\n >\n <ArrayFieldItemButtonsTemplate {...buttonsProps} style={btnStyle} />\n </div>\n </div>\n )}\n </div>\n );\n}\n", "import { useMemo } from 'react';\nimport {\n ArrayFieldItemButtonsTemplateType,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTemplateItemButtons` component is the template used to render the buttons associate3d with items of\n * an array.\n *\n * @param props - The `ArrayFieldItemButtonsTemplateType` props for the component\n */\nexport default function ArrayFieldItemButtonsTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemButtonsTemplateType<T, S, F>) {\n const {\n disabled,\n hasCopy,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n idSchema,\n index,\n onCopyIndexClick,\n onDropIndexClick,\n onReorderClick,\n readonly,\n registry,\n uiSchema,\n } = props;\n const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = registry.templates.ButtonTemplates;\n const onCopyClick = useMemo(() => onCopyIndexClick(index), [index, onCopyIndexClick]);\n const onRemoveClick = useMemo(() => onDropIndexClick(index), [index, onDropIndexClick]);\n const onArrowUpClick = useMemo(() => onReorderClick(index, index - 1), [index, onReorderClick]);\n const onArrowDownClick = useMemo(() => onReorderClick(index, index + 1), [index, onReorderClick]);\n\n return (\n <>\n {(hasMoveUp || hasMoveDown) && (\n <MoveUpButton\n id={buttonId<T>(idSchema, 'moveUp')}\n className='rjsf-array-item-move-up'\n disabled={disabled || readonly || !hasMoveUp}\n onClick={onArrowUpClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {(hasMoveUp || hasMoveDown) && (\n <MoveDownButton\n id={buttonId<T>(idSchema, 'moveDown')}\n className='rjsf-array-item-move-down'\n disabled={disabled || readonly || !hasMoveDown}\n onClick={onArrowDownClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasCopy && (\n <CopyButton\n id={buttonId<T>(idSchema, 'copy')}\n className='rjsf-array-item-copy'\n disabled={disabled || readonly}\n onClick={onCopyClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasRemove && (\n <RemoveButton\n id={buttonId<T>(idSchema, 'remove')}\n className='rjsf-array-item-remove'\n disabled={disabled || readonly}\n onClick={onRemoveClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </>\n );\n}\n", "import {\n getTemplate,\n getUiOptions,\n ArrayFieldTemplateProps,\n ArrayFieldItemTemplateType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n canAdd,\n className,\n disabled,\n idSchema,\n uiSchema,\n items,\n onAddClick,\n readonly,\n registry,\n required,\n schema,\n title,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <fieldset className={className} id={idSchema.$id}>\n <ArrayFieldTitleTemplate\n idSchema={idSchema}\n title={uiOptions.title || title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div className='row array-item-list'>\n {items &&\n items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (\n <ArrayFieldItemTemplate key={key} {...itemProps} />\n ))}\n </div>\n {canAdd && (\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-array-item-add'\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </fieldset>\n );\n}\n", "import {\n getTemplate,\n getUiOptions,\n titleId,\n ArrayFieldTitleProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from\n * the `idSchema`.\n *\n * @param props - The `ArrayFieldTitleProps` for the component\n */\nexport default function ArrayFieldTitleTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTitleProps<T, S, F>) {\n const { idSchema, title, schema, uiSchema, required, registry } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { label: displayLabel = true } = options;\n if (!title || !displayLabel) {\n return null;\n }\n const TitleFieldTemplate: TemplatesType<T, S, F>['TitleFieldTemplate'] = getTemplate<'TitleFieldTemplate', T, S, F>(\n 'TitleFieldTemplate',\n registry,\n options,\n );\n return (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n name, // remove this from ...rest\n value,\n readonly,\n disabled,\n autofocus,\n onBlur,\n onFocus,\n onChange,\n onChangeOverride,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors,\n type,\n hideLabel, // remove this from ...rest\n hideError, // remove this from ...rest\n ...rest\n } = props;\n\n // Note: since React 15.2.0 we can't forward unknown element attributes, so we\n // exclude the \"options\" and \"schema\" ones here.\n if (!id) {\n console.log('No id for', props);\n throw new Error(`no id for props ${JSON.stringify(props)}`);\n }\n const inputProps = {\n ...rest,\n ...getInputProps<T, S, F>(schema, type, options),\n };\n\n let inputValue;\n if (inputProps.type === 'number' || inputProps.type === 'integer') {\n inputValue = value || value === 0 ? value : '';\n } else {\n inputValue = value == null ? '' : value;\n }\n\n const _onChange = useCallback(\n ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onChange(value === '' ? options.emptyValue : value),\n [onChange, options],\n );\n const _onBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) => onBlur(id, target && target.value),\n [onBlur, id],\n );\n const _onFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) => onFocus(id, target && target.value),\n [onFocus, id],\n );\n\n return (\n <>\n <input\n id={id}\n name={id}\n className='form-control'\n readOnly={readonly}\n disabled={disabled}\n autoFocus={autofocus}\n value={inputValue}\n {...inputProps}\n list={schema.examples ? examplesId<T>(id) : undefined}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist key={`datalist_${id}`} id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example: any) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n", "import { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <div>\n <button type='submit' {...submitButtonProps} className={`btn btn-info ${submitButtonProps.className || ''}`}>\n {submitText}\n </button>\n </div>\n );\n}\n", "import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nimport IconButton from './IconButton';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n className,\n onClick,\n disabled,\n registry,\n}: IconButtonProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <div className='row'>\n <p className={`col-xs-3 col-xs-offset-9 text-right ${className}`}>\n <IconButton\n iconType='info'\n icon='plus'\n className='btn-add col-xs-12'\n title={translateString(TranslatableString.AddButton)}\n onClick={onClick}\n disabled={disabled}\n registry={registry}\n />\n </p>\n </div>\n );\n}\n", "import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nexport default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const { iconType = 'default', icon, className, uiSchema, registry, ...otherProps } = props;\n return (\n <button type='button' className={`btn btn-${iconType} ${className}`} {...otherProps}>\n <i className={`glyphicon glyphicon-${icon}`} />\n </button>\n );\n}\n\nexport function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.CopyButton)} {...props} icon='copy' />;\n}\n\nexport function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='arrow-down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='arrow-up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return (\n <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} iconType='danger' icon='remove' />\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport SubmitButton from './SubmitButton';\nimport AddButton from './AddButton';\nimport { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton';\n\nfunction buttonTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): TemplatesType<T, S, F>['ButtonTemplates'] {\n return {\n SubmitButton,\n AddButton,\n CopyButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n };\n}\n\nexport default buttonTemplates;\n", "import { ReactElement } from 'react';\nimport {\n FormContextType,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n UiSchema,\n getTestIds,\n getUiOptions,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\nconst TEST_IDS = getTestIds();\n\nexport interface RichDescriptionProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> {\n /** The description text for a field, potentially containing markdown */\n description: string | ReactElement;\n /** The uiSchema object for this base component */\n uiSchema?: UiSchema<T, S, F>;\n /** The `registry` object */\n registry: Registry<T, S, F>;\n}\n\n/** Renders the given `description` in the props as\n *\n * @param props - The `RichDescriptionProps` for this component\n */\nexport default function RichDescription<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ description, registry, uiSchema = {} }: RichDescriptionProps<T, S, F>) {\n const { globalUiOptions } = registry;\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n\n if (uiOptions.enableMarkdownInDescription && typeof description === 'string') {\n return (\n <Markdown options={{ disableParsingRawHTML: true }} data-testid={TEST_IDS.markdown}>\n {description}\n </Markdown>\n );\n }\n return description;\n}\n\nRichDescription.TEST_IDS = TEST_IDS;\n", "import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport RichDescription from '../RichDescription';\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description, registry, uiSchema } = props;\n if (!description) {\n return null;\n }\n return (\n <div id={id} className='field-description'>\n <RichDescription description={description} registry={registry} uiSchema={uiSchema} />\n </div>\n );\n}\n", "import {\n ErrorListProps,\n FormContextType,\n RJSFValidationError,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from '@rjsf/utils';\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <div className='panel panel-danger errors'>\n <div className='panel-heading'>\n <h3 className='panel-title'>{translateString(TranslatableString.ErrorsLabel)}</h3>\n </div>\n <ul className='list-group'>\n {errors.map((error: RJSFValidationError, i: number) => {\n return (\n <li key={i} className='list-group-item text-danger'>\n {error.stack}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n", "import {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\n\nimport Label from './Label';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldTemplateProps<T, S, F>) {\n const { id, label, children, errors, help, description, hidden, required, displayLabel, registry, uiSchema } = props;\n const uiOptions = getUiOptions(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions,\n );\n if (hidden) {\n return <div className='hidden'>{children}</div>;\n }\n return (\n <WrapIfAdditionalTemplate {...props}>\n {displayLabel && <Label label={label} required={required} id={id} />}\n {displayLabel && description ? description : null}\n {children}\n {errors}\n {help}\n </WrapIfAdditionalTemplate>\n );\n}\n", "const REQUIRED_FIELD_SYMBOL = '*';\n\nexport type LabelProps = {\n /** The label for the field */\n label?: string;\n /** A boolean value stating if the field is required */\n required?: boolean;\n /** The id of the input field being labeled */\n id?: string;\n};\n\n/** Renders a label for a field\n *\n * @param props - The `LabelProps` for this component\n */\nexport default function Label(props: LabelProps) {\n const { label, required, id } = props;\n if (!label) {\n return null;\n }\n return (\n <label className='control-label' htmlFor={id}>\n {label}\n {required && <span className='required'>{REQUIRED_FIELD_SYMBOL}</span>}\n </label>\n );\n}\n", "import FieldTemplate from './FieldTemplate';\n\nexport default FieldTemplate;\n", "import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldErrorProps<T, S, F>) {\n const { errors = [], idSchema } = props;\n if (errors.length === 0) {\n return null;\n }\n const id = errorId<T>(idSchema);\n\n return (\n <div>\n <ul id={id} className='error-detail bs-callout bs-callout-info'>\n {errors\n .filter((elem) => !!elem)\n .map((error, index: number) => {\n return (\n <li className='text-danger' key={index}>\n {error}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n", "import { helpId, FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (!help) {\n return null;\n }\n const id = helpId<T>(idSchema);\n if (typeof help === 'string') {\n return (\n <p id={id} className='help-block'>\n {help}\n </p>\n );\n }\n return (\n <div id={id} className='help-block'>\n {help}\n </div>\n );\n}\n", "import { GridTemplateProps } from '@rjsf/utils';\n\n/** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`\n * prop. Also spreads all the other props provided by the user directly on the div.\n *\n * @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior\n */\nexport default function GridTemplate(props: GridTemplateProps) {\n const { children, column, className, ...rest } = props;\n return (\n <div className={className} {...rest}>\n {children}\n </div>\n );\n}\n", "import {\n FormContextType,\n ObjectFieldTemplatePropertyType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n disabled,\n formData,\n idSchema,\n onAddClick,\n properties,\n readonly,\n registry,\n required,\n schema,\n title,\n uiSchema,\n } = props;\n const options = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, options);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <fieldset id={idSchema.$id}>\n {title && (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop: ObjectFieldTemplatePropertyType) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-object-property-expand'\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </fieldset>\n );\n}\n", "import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nconst REQUIRED_FIELD_SYMBOL = '*';\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: TitleFieldProps<T, S, F>,\n) {\n const { id, title, required } = props;\n return (\n <legend id={id}>\n {title}\n {required && <span className='required'>{REQUIRED_FIELD_SYMBOL}</span>}\n </legend>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString, UnsupportedFieldProps } from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\n/** The `UnsupportedField` component is used to render a field in the schema is one that is not supported by\n * react-jsonschema-form.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction UnsupportedField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: UnsupportedFieldProps<T, S, F>,\n) {\n const { schema, idSchema, reason, registry } = props;\n const { translateString } = registry;\n let translateEnum: TranslatableString = TranslatableString.UnsupportedField;\n const translateParams: string[] = [];\n if (idSchema && idSchema.$id) {\n translateEnum = TranslatableString.UnsupportedFieldWithId;\n translateParams.push(idSchema.$id);\n }\n if (reason) {\n translateEnum =\n translateEnum === TranslatableString.UnsupportedField\n ? TranslatableString.UnsupportedFieldWithReason\n : TranslatableString.UnsupportedFieldWithIdAndReason;\n translateParams.push(reason);\n }\n return (\n <div className='unsupported-field'>\n <p>\n <Markdown options={{ disableParsingRawHTML: true }}>{translateString(translateEnum, translateParams)}</Markdown>\n </p>\n {schema && <pre>{JSON.stringify(schema, null, 2)}</pre>}\n </div>\n );\n}\n\nexport default UnsupportedField;\n", "import {\n ADDITIONAL_PROPERTY_FLAG,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WrapIfAdditionalTemplateProps,\n} from '@rjsf/utils';\n\nimport Label from './FieldTemplate/Label';\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n id,\n classNames,\n style,\n disabled,\n label,\n onKeyChange,\n onDropPropertyClick,\n readonly,\n required,\n schema,\n hideError,\n rawErrors,\n children,\n uiSchema,\n registry,\n } = props;\n const { templates, translateString } = registry;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = templates.ButtonTemplates;\n const keyLabel = translateString(TranslatableString.KeyLabel, [label]);\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n const classNamesList = ['form-group', classNames];\n if (!hideError && rawErrors && rawErrors.length > 0) {\n classNamesList.push('has-error has-danger');\n }\n const uiClassNames = classNamesList.join(' ').trim();\n\n if (!additional) {\n return (\n <div className={uiClassNames} style={style}>\n {children}\n </div>\n );\n }\n\n return (\n <div className={uiClassNames} style={style}>\n <div className='row'>\n <div className='col-xs-5 form-additional'>\n <div className='form-group'>\n <Label label={keyLabel} required={required} id={`${id}-key`} />\n <input\n className='form-control'\n type='text'\n id={`${id}-key`}\n onBlur={({ target }) => onKeyChange(target && target.value)}\n defaultValue={label}\n />\n </div>\n </div>\n <div className='form-additional form-group col-xs-5'>{children}</div>\n <div className='col-xs-2'>\n <RemoveButton\n id={buttonId<T>(id, 'remove')}\n className='rjsf-object-property-remove btn-block'\n style={{ border: '0' }}\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </div>\n </div>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate';\nimport ArrayFieldItemTemplate from './ArrayFieldItemTemplate';\nimport ArrayFieldItemButtonsTemplate from './ArrayFieldItemButtonsTemplate';\nimport ArrayFieldTemplate from './ArrayFieldTemplate';\nimport ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate';\nimport BaseInputTemplate from './BaseInputTemplate';\nimport ButtonTemplates from './ButtonTemplates';\nimport DescriptionField from './DescriptionField';\nimport ErrorList from './ErrorList';\nimport FieldTemplate from './FieldTemplate';\nimport FieldErrorTemplate from './FieldErrorTemplate';\nimport FieldHelpTemplate from './FieldHelpTemplate';\nimport GridTemplate from './GridTemplate';\nimport ObjectFieldTemplate from './ObjectFieldTemplate';\nimport TitleField from './TitleField';\nimport UnsupportedField from './UnsupportedField';\nimport WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate';\n\nfunction templates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<\n T,\n S,\n F\n> {\n return {\n ArrayFieldDescriptionTemplate,\n ArrayFieldItemTemplate,\n ArrayFieldItemButtonsTemplate,\n ArrayFieldTemplate,\n ArrayFieldTitleTemplate,\n ButtonTemplates: ButtonTemplates<T, S, F>(),\n BaseInputTemplate,\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldTemplate,\n FieldErrorTemplate,\n FieldHelpTemplate,\n GridTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n UnsupportedFieldTemplate: UnsupportedField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default templates;\n", "import { MouseEvent, useCallback, useEffect, useReducer, useState } from 'react';\nimport {\n ariaDescribedByIds,\n dateRangeOptions,\n parseDateString,\n toDateString,\n DateObject,\n type DateElementFormat,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WidgetProps,\n getDateElementProps,\n} from '@rjsf/utils';\n\nfunction readyForChange(state: DateObject) {\n return Object.values(state).every((value) => value !== -1);\n}\n\ntype DateElementProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<\n WidgetProps<T, S, F>,\n 'value' | 'name' | 'disabled' | 'readonly' | 'autofocus' | 'registry' | 'onBlur' | 'onFocus'\n> & {\n rootId: string;\n select: (property: keyof DateObject, value: any) => void;\n type: string;\n range: [number, number];\n};\n\nfunction DateElement<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n type,\n range,\n value,\n select,\n rootId,\n name,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n onFocus,\n}: DateElementProps<T, S, F>) {\n const id = rootId + '_' + type;\n const { SelectWidget } = registry.widgets;\n return (\n <SelectWidget\n schema={{ type: 'integer' } as S}\n id={id}\n name={name}\n className='form-control'\n options={{ enumOptions: dateRangeOptions<S>(range[0], range[1]) }}\n placeholder={type}\n value={value}\n disabled={disabled}\n readonly={readonly}\n autofocus={autofocus}\n onChange={(value: any) => select(type as keyof DateObject, value)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n label=''\n aria-describedby={ariaDescribedByIds<T>(rootId)}\n />\n );\n}\n\n/** The `AltDateWidget` is an alternative widget for rendering date properties.\n * @param props - The `WidgetProps` for this component\n */\nfunction AltDateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n time = false,\n disabled = false,\n readonly = false,\n autofocus = false,\n options,\n id,\n name,\n registry,\n onBlur,\n onFocus,\n onChange,\n value,\n}: WidgetProps<T, S, F>) {\n const { translateString } = registry;\n const [lastValue, setLastValue] = useState(value);\n const [state, setState] = useReducer(\n (state: DateObject, action: Partial<DateObject>) => {\n return { ...state, ...action };\n },\n parseDateString(value, time),\n );\n\n useEffect(() => {\n const stateValue = toDateString(state, time);\n if (readyForChange(state) && stateValue !== value) {\n // The user changed the date to a new valid data via the comboboxes, so call onChange\n onChange(stateValue);\n } else if (lastValue !== value) {\n // We got a new value in the props\n setLastValue(value);\n setState(parseDateString(value, time));\n }\n }, [time, value, onChange, state, lastValue]);\n\n const handleChange = useCallback((property: keyof DateObject, value: string) => {\n setState({ [property]: value });\n }, []);\n\n const handleSetNow = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (disabled || readonly) {\n return;\n }\n const nextState = parseDateString(new Date().toJSON(), time);\n onChange(toDateString(nextState, time));\n },\n [disabled, readonly, time],\n );\n\n const handleClear = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (disabled || readonly) {\n return;\n }\n onChange(undefined);\n },\n [disabled, readonly, onChange],\n );\n\n return (\n <ul className='list-inline'>\n {getDateElementProps(\n state,\n time,\n options.yearsRange as [number, number] | undefined,\n options.format as DateElementFormat | undefined,\n ).map((elemProps, i) => (\n <li className='list-inline-item' key={i}>\n <DateElement\n rootId={id}\n name={name}\n select={handleChange}\n {...elemProps}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n onBlur={onBlur}\n onFocus={onFocus}\n autofocus={autofocus && i === 0}\n />\n </li>\n ))}\n {(options.hideNowButton !== 'undefined' ? !options.hideNowButton : true) && (\n <li className='list-inline-item'>\n <a href='#' className='btn btn-info btn-now' onClick={handleSetNow}>\n {translateString(TranslatableString.NowLabel)}\n </a>\n </li>\n )}\n {(options.hideClearButton !== 'undefined' ? !options.hideClearButton : true) && (\n <li className='list-inline-item'>\n <a href='#' className='btn btn-warning btn-clear' onClick={handleClear}>\n {translateString(TranslatableString.ClearLabel)}\n </a>\n </li>\n )}\n </ul>\n );\n}\n\nexport default AltDateWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `AltDateTimeWidget` is an alternative widget for rendering datetime properties.\n * It uses the AltDateWidget for rendering, with the `time` prop set to true by default.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction AltDateTimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n time = true,\n ...props\n}: WidgetProps<T, S, F>) {\n const { AltDateWidget } = props.registry.widgets;\n return <AltDateWidget time={time} {...props} />;\n}\n\nexport default AltDateTimeWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n descriptionId,\n getTemplate,\n labelValue,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction CheckboxWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n schema,\n uiSchema,\n options,\n id,\n value,\n disabled,\n readonly,\n label,\n hideLabel,\n autofocus = false,\n onBlur,\n onFocus,\n onChange,\n registry,\n}: WidgetProps<T, S, F>) {\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.checked),\n [onChange],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onBlur(id, event.target.checked),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onFocus(id, event.target.checked),\n [onFocus, id],\n );\n const description = options.description ?? schema.description;\n\n return (\n <div className={`checkbox ${disabled || readonly ? 'disabled' : ''}`}>\n {!hideLabel && description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <label>\n <input\n type='checkbox'\n id={id}\n name={id}\n checked={typeof value === 'undefined' ? false : value}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n {labelValue(<span>{label}</span>, hideLabel)}\n </label>\n </div>\n );\n}\n\nexport default CheckboxWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n WidgetProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n disabled,\n options: { inline = false, enumOptions, enumDisabled, emptyValue },\n value,\n autofocus = false,\n readonly,\n onChange,\n onBlur,\n onFocus,\n}: WidgetProps<T, S, F>) {\n const checkboxesValues = Array.isArray(value) ? value : [value];\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onFocus, id],\n );\n return (\n <div className='checkboxes' id={id}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n const disabledCls = disabled || itemDisabled || readonly ? 'disabled' : '';\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\n }\n };\n\n const checkbox = (\n <span>\n <input\n type='checkbox'\n id={optionId(id, index)}\n name={id}\n checked={checked}\n value={String(index)}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{option.label}</span>\n </span>\n );\n return inline ? (\n <label key={index} className={`checkbox-inline ${disabledCls}`}>\n {checkbox}\n </label>\n ) : (\n <div key={index} className={`checkbox ${disabledCls}`}>\n <label>{checkbox}</label>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default CheckboxesWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `ColorWidget` component uses the `BaseInputTemplate` changing the type to `color` and disables it when it is\n * either disabled or readonly.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function ColorWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { disabled, readonly, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='color' {...props} disabled={disabled || readonly} />;\n}\n", "import { useCallback } from 'react';\nimport { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `DateWidget` component uses the `BaseInputTemplate` changing the type to `date` and transforms\n * the value to undefined when it is falsy during the `onChange` handling.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function DateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { onChange, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n const handleChange = useCallback((value: any) => onChange(value || undefined), [onChange]);\n\n return <BaseInputTemplate type='date' {...props} onChange={handleChange} />;\n}\n", "import {\n getTemplate,\n localToUTC,\n utcToLocal,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `DateTimeWidget` component uses the `BaseInputTemplate` changing the type to `datetime-local` and transforms\n * the value to/from utc using the appropriate utility functions.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function DateTimeWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const { onChange, value, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return (\n <BaseInputTemplate\n type='datetime-local'\n {...props}\n value={utcToLocal(value)}\n onChange={(value) => onChange(localToUTC(value))}\n />\n );\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `EmailWidget` component uses the `BaseInputTemplate` changing the type to `email`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function EmailWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='email' {...props} />;\n}\n", "import { ChangeEvent, useCallback, useMemo } from 'react';\nimport {\n dataURItoBlob,\n FormContextType,\n getTemplate,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UIOptionsType,\n WidgetProps,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\nfunction addNameToDataURL(dataURL: string, name: string) {\n if (dataURL === null) {\n return null;\n }\n return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);\n}\n\ntype FileInfoType = {\n dataURL?: string | null;\n name: string;\n size: number;\n type: string;\n};\n\nfunction processFile(file: File): Promise<FileInfoType> {\n const { name, size, type } = file;\n return new Promise((resolve, reject) => {\n const reader = new window.FileReader();\n reader.onerror = reject;\n reader.onload = (event) => {\n if (typeof event.target?.result === 'string') {\n resolve({\n dataURL: addNameToDataURL(event.target.result, name),\n name,\n size,\n type,\n });\n } else {\n resolve({\n dataURL: null,\n name,\n size,\n type,\n });\n }\n };\n reader.readAsDataURL(file);\n });\n}\n\nfunction processFiles(files: FileList) {\n return Promise.all(Array.from(files).map(processFile));\n}\n\nfunction FileInfoPreview<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n fileInfo,\n registry,\n}: {\n fileInfo: FileInfoType;\n registry: Registry<T, S, F>;\n}) {\n const { translateString } = registry;\n const { dataURL, type, name } = fileInfo;\n if (!dataURL) {\n return null;\n }\n\n // If type is JPEG or PNG then show image preview.\n // Originally, any type of image was supported, but this was changed into a whitelist\n // since SVGs and animated GIFs are also images, which are generally considered a security risk.\n if (['image/jpeg', 'image/png'].includes(type)) {\n return <img src={dataURL} style={{ maxWidth: '100%' }} className='file-preview' />;\n }\n\n // otherwise, let users download file\n\n return (\n <>\n {' '}\n <a download={`preview-${name}`} href={dataURL} className='file-download'>\n {translateString(TranslatableString.PreviewLabel)}\n </a>\n </>\n );\n}\n\nfunction FilesInfo<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n filesInfo,\n registry,\n preview,\n onRemove,\n options,\n}: {\n filesInfo: FileInfoType[];\n registry: Registry<T, S, F>;\n preview?: boolean;\n onRemove: (index: number) => void;\n options: UIOptionsType<T, S, F>;\n}) {\n if (filesInfo.length === 0) {\n return null;\n }\n const { translateString } = registry;\n\n const { RemoveButton } = getTemplate<'ButtonTemplates', T, S, F>('ButtonTemplates', registry, options);\n\n return (\n <ul className='file-info'>\n {filesInfo.map((fileInfo, key) => {\n const { name, size, type } = fileInfo;\n const handleRemove = () => onRemove(key);\n return (\n <li key={key}>\n <Markdown>{translateString(TranslatableString.FilesInfo, [name, type, String(size)])}</Markdown>\n {preview && <FileInfoPreview<T, S, F> fileInfo={fileInfo} registry={registry} />}\n <RemoveButton onClick={handleRemove} registry={registry} />\n </li>\n );\n })}\n </ul>\n );\n}\n\nfunction extractFileInfo(dataURLs: string[]): FileInfoType[] {\n return dataURLs.reduce((acc, dataURL) => {\n if (!dataURL) {\n return acc;\n }\n try {\n const { blob, name } = dataURItoBlob(dataURL);\n return [\n ...acc,\n {\n dataURL,\n name: name,\n size: blob.size,\n type: blob.type,\n },\n ];\n } catch {\n // Invalid dataURI, so just ignore it.\n return acc;\n }\n }, [] as FileInfoType[]);\n}\n\n/**\n * The `FileWidget` is a widget for rendering file upload fields.\n * It is typically used with a string property with data-url format.\n */\nfunction FileWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { disabled, readonly, required, multiple, onChange, value, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!event.target.files) {\n return;\n }\n // Due to variances in themes, dealing with multiple files for the array case now happens one file at a time.\n // This is because we don't pass `multiple` into the `BaseInputTemplate` anymore. Instead, we deal with the single\n // file in each event and concatenate them together ourselves\n processFiles(event.target.files).then((filesInfoEvent) => {\n const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);\n if (multiple) {\n onChange(value.concat(newValue));\n } else {\n onChange(newValue[0]);\n }\n });\n },\n [multiple, value, onChange],\n );\n\n const filesInfo = useMemo(() => extractFileInfo(Array.isArray(value) ? value : [value]), [value]);\n const rmFile = useCallback(\n (index: number) => {\n if (multiple) {\n const newValue = value.filter((_: any, i: number) => i !== index);\n onChange(newValue);\n } else {\n onChange(undefined);\n }\n },\n [multiple, value, onChange],\n );\n return (\n <div>\n <BaseInputTemplate\n {...props}\n disabled={disabled || readonly}\n type='file'\n required={value ? false : required} // this turns off HTML required validation when a value exists\n onChangeOverride={handleChange}\n value=''\n accept={options.accept ? String(options.accept) : undefined}\n />\n <FilesInfo<T, S, F>\n filesInfo={filesInfo}\n onRemove={rmFile}\n registry={registry}\n preview={options.filePreview}\n options={options}\n />\n </div>\n );\n}\n\nexport default FileWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `HiddenWidget` is a widget for rendering a hidden input field.\n * It is typically used by setting type to \"hidden\".\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction HiddenWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n value,\n}: WidgetProps<T, S, F>) {\n return <input type='hidden' id={id} name={id} value={typeof value === 'undefined' ? '' : value} />;\n}\n\nexport default HiddenWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `PasswordWidget` component uses the `BaseInputTemplate` changing the type to `password`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function PasswordWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='password' {...props} />;\n}\n", "import { FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n options,\n value,\n required,\n disabled,\n readonly,\n autofocus = false,\n onBlur,\n onFocus,\n onChange,\n id,\n}: WidgetProps<T, S, F>) {\n const { enumOptions, enumDisabled, inline, emptyValue } = options;\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onBlur, enumOptions, emptyValue, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onFocus, enumOptions, emptyValue, id],\n );\n\n return (\n <div className='field-radio-group' id={id} role='radiogroup'>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, i) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n const disabledCls = disabled || itemDisabled || readonly ? 'disabled' : '';\n\n const handleChange = () => onChange(option.value);\n\n const radio = (\n <span>\n <input\n type='radio'\n id={optionId(id, i)}\n checked={checked}\n name={id}\n required={required}\n value={String(i)}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && i === 0}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{option.label}</span>\n </span>\n );\n\n return inline ? (\n <label key={i} className={`radio-inline ${disabledCls}`}>\n {radio}\n </label>\n ) : (\n <div key={i} className={`radio ${disabledCls}`}>\n <label>{radio}</label>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default RadioWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n value,\n registry: {\n templates: { BaseInputTemplate },\n },\n } = props;\n return (\n <div className='field-range-wrapper'>\n <BaseInputTemplate type='range' {...props} />\n <span className='range-view'>{value}</span>\n </div>\n );\n}\n", "import { FocusEvent, useCallback } from 'react';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `RatingWidget` component renders a star or heart rating input\n *\n * Features:\n * - Configurable number of stars/hearts (1-5) with default of 5\n * - Supports different shapes (star, heart)\n * - Supports minimum and maximum values from schema\n * - Handles required, disabled, and readonly states\n * - Provides focus and blur event handling for accessibility\n * - Uses Unicode characters for better visual representation\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RatingWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({\n id,\n value,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onFocus,\n onBlur,\n schema,\n options,\n}: WidgetProps<T, S, F>) {\n const { stars = 5, shape = 'star' } = options;\n\n // Use schema.maximum if provided, otherwise use stars option (limited to 1-5)\n const numStars = schema.maximum ? Math.min(schema.maximum, 5) : Math.min(Math.max(stars as number, 1), 5);\n const min = schema.minimum || 0;\n\n /** Handles clicking on a star to set the rating */\n const handleStarClick = useCallback(\n (starValue: number) => {\n if (!disabled && !readonly) {\n onChange(starValue);\n }\n },\n [onChange, disabled, readonly],\n );\n\n /** Handles focus events for accessibility */\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLSpanElement>) => {\n if (onFocus) {\n // Get the star value from the data attribute\n const starValue = Number((event.target as HTMLElement).dataset.value);\n onFocus(id, starValue);\n }\n },\n [onFocus, id],\n );\n\n /** Handles blur events for accessibility */\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLSpanElement>) => {\n if (onBlur) {\n // Get the star value from the data attribute\n const starValue = Number((event.target as HTMLElement).dataset.value);\n onBlur(id, starValue);\n }\n },\n [onBlur, id],\n );\n\n // Get the appropriate Unicode character based on shape option\n const getSymbol = (isFilled: boolean): string => {\n if (shape === 'heart') {\n return isFilled ? '\u2665' : '\u2661';\n }\n return isFilled ? '\u2605' : '\u2606';\n };\n\n return (\n <>\n <div\n className='rating-widget'\n style={{\n display: 'inline-flex',\n fontSize: '1.5rem',\n cursor: disabled || readonly ? 'default' : 'pointer',\n }}\n >\n {[...Array(numStars)].map((_, index) => {\n const starValue = min + index;\n const isFilled = starValue <= value;\n\n return (\n <span\n key={index}\n onClick={() => handleStarClick(starValue)}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-value={starValue}\n tabIndex={disabled || readonly ? -1 : 0}\n role='radio'\n aria-checked={starValue === value}\n aria-label={`${starValue} ${shape === 'heart' ? 'heart' : 'star'}${starValue === 1 ? '' : 's'}`}\n style={{\n color: isFilled ? '#FFD700' : '#ccc',\n padding: '0 0.2rem',\n transition: 'color 0.2s',\n userSelect: 'none',\n }}\n >\n {getSymbol(isFilled)}\n </span>\n );\n })}\n <input\n type='hidden'\n id={id}\n name={id}\n value={value || ''}\n required={required}\n disabled={disabled || readonly}\n aria-hidden='true'\n />\n </div>\n </>\n );\n}\n", "import { ChangeEvent, FocusEvent, SyntheticEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\nfunction getValue(event: SyntheticEvent<HTMLSelectElement>, multiple: boolean) {\n if (multiple) {\n return Array.from((event.target as HTMLSelectElement).options)\n .slice()\n .filter((o) => o.selected)\n .map((o) => o.value);\n }\n return (event.target as HTMLSelectElement).value;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction SelectWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n schema,\n id,\n options,\n value,\n required,\n disabled,\n readonly,\n multiple = false,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n placeholder,\n}: WidgetProps<T, S, F>) {\n const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : '';\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onFocus(id, enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onFocus, id, multiple, enumOptions, optEmptyVal],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onBlur(id, enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onBlur, id, multiple, enumOptions, optEmptyVal],\n );\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onChange(enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onChange, multiple, enumOptions, optEmptyVal],\n );\n\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\n const showPlaceholderOption = !multiple && schema.default === undefined;\n\n return (\n <select\n id={id}\n name={id}\n multiple={multiple}\n role='combobox'\n className='form-control'\n value={typeof selectedIndexes === 'undefined' ? emptyValue : selectedIndexes}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n aria-describedby={ariaDescribedByIds<T>(id)}\n >\n {showPlaceholderOption && <option value=''>{placeholder}</option>}\n {Array.isArray(enumOptions) &&\n enumOptions.map(({ value, label }, i) => {\n const disabled = enumDisabled && enumDisabled.indexOf(value) !== -1;\n return (\n <option key={i} value={String(i)} disabled={disabled}>\n {label}\n </option>\n );\n })}\n </select>\n );\n}\n\nexport default SelectWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction TextareaWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n options = {},\n placeholder,\n value,\n required,\n disabled,\n readonly,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n}: WidgetProps<T, S, F>) {\n const handleChange = useCallback(\n ({ target: { value } }: ChangeEvent<HTMLTextAreaElement>) => onChange(value === '' ? options.emptyValue : value),\n [onChange, options.emptyValue],\n );\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLTextAreaElement>) => onBlur(id, target && target.value),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLTextAreaElement>) => onFocus(id, target && target.value),\n [id, onFocus],\n );\n\n return (\n <textarea\n id={id}\n name={id}\n className='form-control'\n value={value ? value : ''}\n placeholder={placeholder}\n required={required}\n disabled={disabled}\n readOnly={readonly}\n autoFocus={autofocus}\n rows={options.rows}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n\nTextareaWidget.defaultProps = {\n autofocus: false,\n options: {},\n};\n\nexport default TextareaWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TextWidget` component uses the `BaseInputTemplate`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate {...props} />;\n}\n", "import { useCallback } from 'react';\nimport { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TimeWidget` component uses the `BaseInputTemplate` changing the type to `time` and transforms\n * the value to undefined when it is falsy during the `onChange` handling.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { onChange, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n const handleChange = useCallback((value: any) => onChange(value ? `${value}:00` : undefined), [onChange]);\n\n return <BaseInputTemplate type='time' {...props} onChange={handleChange} />;\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `URLWidget` component uses the `BaseInputTemplate` changing the type to `url`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function URLWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='url' {...props} />;\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `UpDownWidget` component uses the `BaseInputTemplate` changing the type to `number`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function UpDownWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='number' {...props} />;\n}\n", "import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport AltDateWidget from './AltDateWidget';\nimport AltDateTimeWidget from './AltDateTimeWidget';\nimport CheckboxWidget from './CheckboxWidget';\nimport CheckboxesWidget from './CheckboxesWidget';\nimport ColorWidget from './ColorWidget';\nimport DateWidget from './DateWidget';\nimport DateTimeWidget from './DateTimeWidget';\nimport EmailWidget from './EmailWidget';\nimport FileWidget from './FileWidget';\nimport HiddenWidget from './HiddenWidget';\nimport PasswordWidget from './PasswordWidget';\nimport RadioWidget from './RadioWidget';\nimport RangeWidget from './RangeWidget';\nimport RatingWidget from './RatingWidget';\nimport SelectWidget from './SelectWidget';\nimport TextareaWidget from './TextareaWidget';\nimport TextWidget from './TextWidget';\nimport TimeWidget from './TimeWidget';\nimport URLWidget from './URLWidget';\nimport UpDownWidget from './UpDownWidget';\n\nfunction widgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryWidgetsType<T, S, F> {\n return {\n AltDateWidget,\n AltDateTimeWidget,\n CheckboxWidget,\n CheckboxesWidget,\n ColorWidget,\n DateWidget,\n DateTimeWidget,\n EmailWidget,\n FileWidget,\n HiddenWidget,\n PasswordWidget,\n RadioWidget,\n RangeWidget,\n RatingWidget,\n SelectWidget,\n TextWidget,\n TextareaWidget,\n TimeWidget,\n UpDownWidget,\n URLWidget,\n };\n}\n\nexport default widgets;\n", "import { ComponentType, ForwardedRef, forwardRef } from 'react';\nimport Form, { FormProps } from './components/Form';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The properties for the `withTheme` function, essentially a subset of properties from the `FormProps` that can be\n * overridden while creating a theme\n */\nexport type ThemeProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<\n FormProps<T, S, F>,\n 'fields' | 'templates' | 'widgets' | '_internalFormWrapper'\n>;\n\n/** A Higher-Order component that creates a wrapper around a `Form` with the overrides from the `WithThemeProps` */\nexport default function withTheme<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n themeProps: ThemeProps<T, S, F>,\n): ComponentType<FormProps<T, S, F>> {\n // @ts-expect-error TS2322 because the latest types complain about LegacyRef's string form not working with Form\n return forwardRef<Form<T, S, F>, FormProps<T, S, F>>(\n ({ fields, widgets, templates, ...directProps }: FormProps<T, S, F>, ref: ForwardedRef<Form<T, S, F>>) => {\n fields = { ...themeProps?.fields, ...fields };\n widgets = { ...themeProps?.widgets, ...widgets };\n templates = {\n ...themeProps?.templates,\n ...templates,\n ButtonTemplates: {\n ...themeProps?.templates?.ButtonTemplates,\n ...templates?.ButtonTemplates,\n },\n };\n\n return (\n <Form<T, S, F>\n {...themeProps}\n {...directProps}\n fields={fields}\n widgets={widgets}\n templates={templates}\n ref={ref}\n />\n );\n },\n );\n}\n", "import Form, { FormProps, FormState, IChangeEvent } from './components/Form';\nimport RichDescription, { RichDescriptionProps } from './components/RichDescription';\nimport withTheme, { ThemeProps } from './withTheme';\nimport getDefaultRegistry from './getDefaultRegistry';\n\nexport type { FormProps, FormState, IChangeEvent, ThemeProps, RichDescriptionProps };\n\nexport { withTheme, getDefaultRegistry, RichDescription };\nexport default Form;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,aAAAA,YAA8D,iBAAiB;AACxF;AAAA,EACE;AAAA,EAEA,cAAAC;AAAA,EAKA;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAAA,EAEA,YAAAC;AAAA,EACA,gBAAAC;AAAA,EACA;AAAA,EAQA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA,kBAAAC;AAAA,EAEA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;AACP,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,aAAa;;;AC7CpB,SAAS,+BAAwF;;;ACAjG,SAAS,iBAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAQA;AAAA,EAEA;AAAA,OACK;AACP,OAAO,eAAe;AACtB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,SAAS;AAChB,SAAS,cAAc;AA+Zf;AAjZR,SAAS,gBAAgB;AACvB,SAAO,OAAO;AAChB;AAOA,SAAS,sBAAyB,UAAuC;AACvE,SAAO,CAAC,MAAM,QAAQ,QAAQ,IAC1B,CAAC,IACD,SAAS,IAAI,CAAC,SAAS;AACrB,WAAO;AAAA,MACL,KAAK,cAAc;AAAA,MACnB;AAAA,IACF;AAAA,EACF,CAAC;AACP;AAOA,SAAS,qBAAwB,eAAmE;AAClG,MAAI,MAAM,QAAQ,aAAa,GAAG;AAChC,WAAO,cAAc,IAAI,CAAC,cAAc,UAAU,IAAI;AAAA,EACxD;AACA,SA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,YAAY,SAAS,GAAGA,SAAQ;AAC/C,MAAAC,aAAY;AAAA,QACV,GAAG,YAAY;AAAA,QACf,GAAGA;AAAA,QACH,iBAAiB;AAAA,UACf,GAAG,YAAY,WAAW;AAAA,UAC1B,GAAGA,YAAW;AAAA,QAChB;AAAA,MACF;AAEA,aACE,gBAAAH;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,QAAQC;AAAA,UACR,SAASC;AAAA,UACT,WAAWC;AAAA,UACX;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AACF;;;AClCA,IAAO,gBAAQ;",
|
|
6
|
-
"names": ["Component", "deepEquals", "getTemplate", "getUiOptions", "isObject", "mergeObjects", "UI_OPTIONS_KEY", "widgets", "SchemaField", "has", "key", "getWidget", "getUiOptions", "optionsList", "TranslatableString", "isObject", "jsx", "widgets", "getTemplate", "getUiOptions", "cloneDeep", "get", "isObject", "set", "jsx", "get", "set", "getUiOptions", "name", "jsx", "cloneDeep", "GridTemplate", "getTemplate", "fields", "SchemaField", "LayoutMultiSchemaField", "isObject", "getTemplate", "getUiOptions", "jsx", "ANY_OF_KEY", "getDiscriminatorFieldFromSchema", "hashObject", "ID_KEY", "ONE_OF_KEY", "optionsList", "PROPERTIES_KEY", "getTemplate", "getUiOptions", "getWidget", "get", "has", "isEmpty", "set", "jsx", "widgets", "FieldErrorTemplate", "FieldTemplate", "Component", "get", "isEmpty", "omit", "ANY_OF_KEY", "ERRORS_KEY", "getDiscriminatorFieldFromSchema", "getUiOptions", "getWidget", "ONE_OF_KEY", "TranslatableString", "jsx", "widgets", "fields", "useState", "jsx", "StringField", "value", "Component", "getTemplate", "getUiOptions", "TranslatableString", "PROPERTIES_KEY", "ANY_OF_KEY", "ONE_OF_KEY", "get", "has", "isObject", "set", "jsx", "jsxs", "fields", "SchemaField", "name", "useCallback", "Component", "ADDITIONAL_PROPERTY_FLAG", "deepEquals", "getTemplate", "getUiOptions", "ID_KEY", "mergeObjects", "TranslatableString", "UI_OPTIONS_KEY", "isObject", "omit", "jsx", "jsxs", "fields", "FieldTemplate", "FieldHelpTemplate", "FieldErrorTemplate", "formData", "id", "_schema", "getWidget", "getUiOptions", "optionsList", "jsx", "widgets", "useEffect", "descriptionId", "getTemplate", "getUiOptions", "jsx", "getTemplate", "getUiOptions", "jsx", "jsxs", "ArrayFieldItemButtonsTemplate", "Fragment", "jsx", "jsxs", "CopyButton", "MoveDownButton", "MoveUpButton", "RemoveButton", "getTemplate", "getUiOptions", "buttonId", "jsx", "jsxs", "ArrayFieldDescriptionTemplate", "ArrayFieldItemTemplate", "ArrayFieldTitleTemplate", "AddButton", "getTemplate", "getUiOptions", "titleId", "jsx", "useCallback", "Fragment", "jsx", "jsxs", "value", "jsx", "TranslatableString", "TranslatableString", "jsx", "jsx", "TranslatableString", "getTestIds", "getUiOptions", "Markdown", "jsx", "jsx", "TranslatableString", "jsx", "jsxs", "getTemplate", "getUiOptions", "jsx", "jsxs", "jsx", "jsxs", "getUiOptions", "WrapIfAdditionalTemplate", "getTemplate", "jsx", "jsx", "jsx", "descriptionId", "getTemplate", "getUiOptions", "titleId", "buttonId", "jsx", "jsxs", "AddButton", "jsx", "jsxs", "REQUIRED_FIELD_SYMBOL", "TranslatableString", "Markdown", "jsx", "jsxs", "ADDITIONAL_PROPERTY_FLAG", "buttonId", "TranslatableString", "jsx", "jsxs", "templates", "RemoveButton", "TranslatableString", "ADDITIONAL_PROPERTY_FLAG", "buttonId", "useCallback", "useEffect", "useState", "ariaDescribedByIds", "TranslatableString", "jsx", "jsxs", "SelectWidget", "value", "state", "jsx", "AltDateWidget", "useCallback", "ariaDescribedByIds", "descriptionId", "getTemplate", "jsx", "jsxs", "useCallback", "ariaDescribedByIds", "jsx", "jsxs", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "value", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "useMemo", "getTemplate", "TranslatableString", "Markdown", "Fragment", "jsx", "jsxs", "RemoveButton", "BaseInputTemplate", "jsx", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "ariaDescribedByIds", "enumOptionsIsSelected", "enumOptionsValueForIndex", "optionId", "jsx", "jsxs", "jsx", "jsxs", "BaseInputTemplate", "useCallback", "Fragment", "jsx", "jsxs", "useCallback", "ariaDescribedByIds", "enumOptionsValueForIndex", "jsx", "jsxs", "value", "disabled", "useCallback", "ariaDescribedByIds", "jsx", "value", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "jsx", "jsxs", "Component", "deepEquals", "mergeObjects", "getUiOptions", "getTemplate", "fields", "isObject", "templates", "widgets", "SubmitButton", "UI_OPTIONS_KEY", "jsx", "fields", "widgets", "templates"]
|
|
4
|
+
"sourcesContent": ["import { Component, ElementType, FormEvent, ReactNode, Ref, RefObject, createRef } from 'react';\nimport {\n createSchemaUtils,\n CustomValidator,\n deepEquals,\n ErrorSchema,\n ErrorTransformer,\n FormContextType,\n GenericObjectType,\n getChangedFields,\n getTemplate,\n getUiOptions,\n IdSchema,\n isObject,\n mergeObjects,\n NAME_KEY,\n PathSchema,\n StrictRJSFSchema,\n Registry,\n RegistryFieldsType,\n RegistryWidgetsType,\n RJSFSchema,\n RJSFValidationError,\n RJSF_ADDITIONAL_PROPERTIES_FLAG,\n SchemaUtilsType,\n shouldRender,\n SUBMIT_BTN_OPTIONS_KEY,\n TemplatesType,\n toErrorList,\n UiSchema,\n UI_GLOBAL_OPTIONS_KEY,\n UI_OPTIONS_KEY,\n ValidationData,\n validationDataMerge,\n ValidatorType,\n Experimental_DefaultFormStateBehavior,\n Experimental_CustomMergeAllOf,\n createErrorHandler,\n unwrapErrorHandler,\n} from '@rjsf/utils';\nimport _forEach from 'lodash/forEach';\nimport _get from 'lodash/get';\nimport _isEmpty from 'lodash/isEmpty';\nimport _isNil from 'lodash/isNil';\nimport _pick from 'lodash/pick';\nimport _toPath from 'lodash/toPath';\n\nimport getDefaultRegistry from '../getDefaultRegistry';\n\n/** The properties that are passed to the `Form` */\nexport interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {\n /** The JSON schema object for the form */\n schema: S;\n /** An implementation of the `ValidatorType` interface that is needed for form validation to work */\n validator: ValidatorType<T, S, F>;\n /** The optional children for the form, if provided, it will replace the default `SubmitButton` */\n children?: ReactNode;\n /** The uiSchema for the form */\n uiSchema?: UiSchema<T, S, F>;\n /** The data for the form, used to prefill a form with existing data */\n formData?: T;\n // Form presentation and behavior modifiers\n /** You can provide a `formContext` object to the form, which is passed down to all fields and widgets. Useful for\n * implementing context aware fields and widgets.\n *\n * NOTE: Setting `{readonlyAsDisabled: false}` on the formContext will make the antd theme treat readOnly fields as\n * disabled.\n */\n formContext?: F;\n /** To avoid collisions with existing ids in the DOM, it is possible to change the prefix used for ids;\n * Default is `root`\n */\n idPrefix?: string;\n /** To avoid using a path separator that is present in field names, it is possible to change the separator used for\n * ids (Default is `_`)\n */\n idSeparator?: string;\n /** It's possible to disable the whole form by setting the `disabled` prop. The `disabled` prop is then forwarded down\n * to each field of the form. If you just want to disable some fields, see the `ui:disabled` parameter in `uiSchema`\n */\n disabled?: boolean;\n /** It's possible to make the whole form read-only by setting the `readonly` prop. The `readonly` prop is then\n * forwarded down to each field of the form. If you just want to make some fields read-only, see the `ui:readonly`\n * parameter in `uiSchema`\n */\n readonly?: boolean;\n // Form registry\n /** The dictionary of registered fields in the form */\n fields?: RegistryFieldsType<T, S, F>;\n /** The dictionary of registered templates in the form; Partial allows a subset to be provided beyond the defaults */\n templates?: Partial<Omit<TemplatesType<T, S, F>, 'ButtonTemplates'>> & {\n ButtonTemplates?: Partial<TemplatesType<T, S, F>['ButtonTemplates']>;\n };\n /** The dictionary of registered widgets in the form */\n widgets?: RegistryWidgetsType<T, S, F>;\n // Callbacks\n /** If you plan on being notified every time the form data are updated, you can pass an `onChange` handler, which will\n * receive the same args as `onSubmit` any time a value is updated in the form. Can also return the `id` of the field\n * that caused the change\n */\n onChange?: (data: IChangeEvent<T, S, F>, id?: string) => void;\n /** To react when submitted form data are invalid, pass an `onError` handler. It will be passed the list of\n * encountered errors\n */\n onError?: (errors: RJSFValidationError[]) => void;\n /** You can pass a function as the `onSubmit` prop of your `Form` component to listen to when the form is submitted\n * and its data are valid. It will be passed a result object having a `formData` attribute, which is the valid form\n * data you're usually after. The original event will also be passed as a second parameter\n */\n onSubmit?: (data: IChangeEvent<T, S, F>, event: FormEvent<any>) => void;\n /** Sometimes you may want to trigger events or modify external state when a field has been touched, so you can pass\n * an `onBlur` handler, which will receive the id of the input that was blurred and the field value\n */\n onBlur?: (id: string, data: any) => void;\n /** Sometimes you may want to trigger events or modify external state when a field has been focused, so you can pass\n * an `onFocus` handler, which will receive the id of the input that is focused and the field value\n */\n onFocus?: (id: string, data: any) => void;\n /** The value of this prop will be passed to the `accept-charset` HTML attribute on the form */\n acceptCharset?: string;\n /** The value of this prop will be passed to the `action` HTML attribute on the form\n *\n * NOTE: this just renders the `action` attribute in the HTML markup. There is no real network request being sent to\n * this `action` on submit. Instead, react-jsonschema-form catches the submit event with `event.preventDefault()`\n * and then calls the `onSubmit` function, where you could send a request programmatically with `fetch` or similar.\n */\n action?: string;\n /** The value of this prop will be passed to the `autocomplete` HTML attribute on the form */\n autoComplete?: string;\n /** The value of this prop will be passed to the `class` HTML attribute on the form */\n className?: string;\n /** The value of this prop will be passed to the `enctype` HTML attribute on the form */\n enctype?: string;\n /** The value of this prop will be passed to the `id` HTML attribute on the form */\n id?: string;\n /** The value of this prop will be passed to the `name` HTML attribute on the form */\n name?: string;\n /** The value of this prop will be passed to the `method` HTML attribute on the form */\n method?: string;\n /** It's possible to change the default `form` tag name to a different HTML tag, which can be helpful if you are\n * nesting forms. However, native browser form behaviour, such as submitting when the `Enter` key is pressed, may no\n * longer work\n */\n tagName?: ElementType;\n /** The value of this prop will be passed to the `target` HTML attribute on the form */\n target?: string;\n // Errors and validation\n /** Formerly the `validate` prop; Takes a function that specifies custom validation rules for the form */\n customValidate?: CustomValidator<T, S, F>;\n /** This prop allows passing in custom errors that are augmented with the existing JSON Schema errors on the form; it\n * can be used to implement asynchronous validation. By default, these are non-blocking errors, meaning that you can\n * still submit the form when these are the only errors displayed to the user.\n */\n extraErrors?: ErrorSchema<T>;\n /** If set to true, causes the `extraErrors` to become blocking when the form is submitted */\n extraErrorsBlockSubmit?: boolean;\n /** If set to true, turns off HTML5 validation on the form; Set to `false` by default */\n noHtml5Validate?: boolean;\n /** If set to true, turns off all validation. Set to `false` by default\n *\n * @deprecated - In a future release, this switch may be replaced by making `validator` prop optional\n */\n noValidate?: boolean;\n /** If set to true, the form will perform validation and show any validation errors whenever the form data is changed,\n * rather than just on submit\n */\n liveValidate?: boolean;\n /** If `omitExtraData` and `liveOmit` are both set to true, then extra form data values that are not in any form field\n * will be removed whenever `onChange` is called. Set to `false` by default\n */\n liveOmit?: boolean;\n /** If set to true, then extra form data values that are not in any form field will be removed whenever `onSubmit` is\n * called. Set to `false` by default.\n */\n omitExtraData?: boolean;\n /** When this prop is set to `top` or 'bottom', a list of errors (or the custom error list defined in the `ErrorList`) will also\n * show. When set to false, only inline input validation errors will be shown. Set to `top` by default\n */\n showErrorList?: false | 'top' | 'bottom';\n /** A function can be passed to this prop in order to make modifications to the default errors resulting from JSON\n * Schema validation\n */\n transformErrors?: ErrorTransformer<T, S, F>;\n /** If set to true, then the first field with an error will receive the focus when the form is submitted with errors\n */\n focusOnFirstError?: boolean | ((error: RJSFValidationError) => void);\n /** Optional string translation function, if provided, allows users to change the translation of the RJSF internal\n * strings. Some strings contain replaceable parameter values as indicated by `%1`, `%2`, etc. The number after the\n * `%` indicates the order of the parameter. The ordering of parameters is important because some languages may choose\n * to put the second parameter before the first in its translation.\n */\n translateString?: Registry['translateString'];\n /** Optional configuration object with flags, if provided, allows users to override default form state behavior\n * Currently only affecting minItems on array fields and handling of setting defaults based on the value of\n * `emptyObjectFields`\n */\n experimental_defaultFormStateBehavior?: Experimental_DefaultFormStateBehavior;\n /** Optional function that allows for custom merging of `allOf` schemas\n */\n experimental_customMergeAllOf?: Experimental_CustomMergeAllOf<S>;\n // Private\n /**\n * _internalFormWrapper is currently used by the semantic-ui theme to provide a custom wrapper around `<Form />`\n * that supports the proper rendering of those themes. To use this prop, one must pass a component that takes two\n * props: `children` and `as`. That component, at minimum, should render the `children` inside of a <form /> tag\n * unless `as` is provided, in which case, use the `as` prop in place of `<form />`.\n * i.e.:\n * ```\n * export default function InternalForm({ children, as }) {\n * const FormTag = as || 'form';\n * return <FormTag>{children}</FormTag>;\n * }\n * ```\n *\n * Use at your own risk as this prop is private and may change at any time without notice.\n */\n _internalFormWrapper?: ElementType;\n /** Support receiving a React ref to the Form\n */\n ref?: Ref<Form<T, S, F>>;\n}\n\n/** The data that is contained within the state for the `Form` */\nexport interface FormState<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {\n /** The JSON schema object for the form */\n schema: S;\n /** The uiSchema for the form */\n uiSchema: UiSchema<T, S, F>;\n /** The `IdSchema` for the form, computed from the `schema`, the `rootFieldId`, the `formData` and the `idPrefix` and\n * `idSeparator` props.\n */\n idSchema: IdSchema<T>;\n /** The schemaUtils implementation used by the `Form`, created from the `validator` and the `schema` */\n schemaUtils: SchemaUtilsType<T, S, F>;\n /** The current data for the form, computed from the `formData` prop and the changes made by the user */\n formData?: T;\n /** Flag indicating whether the form is in edit mode, true when `formData` is passed to the form, otherwise false */\n edit: boolean;\n /** The current list of errors for the form, includes `extraErrors` */\n errors: RJSFValidationError[];\n /** The current errors, in `ErrorSchema` format, for the form, includes `extraErrors` */\n errorSchema: ErrorSchema<T>;\n /** The current list of errors for the form directly from schema validation, does NOT include `extraErrors` */\n schemaValidationErrors: RJSFValidationError[];\n /** The current errors, in `ErrorSchema` format, for the form directly from schema validation, does NOT include\n * `extraErrors`\n */\n schemaValidationErrorSchema: ErrorSchema<T>;\n // Private\n /** @description result of schemaUtils.retrieveSchema(schema, formData). This a memoized value to avoid re calculate at internal functions (getStateFromProps, onChange) */\n retrievedSchema: S;\n}\n\n/** The event data passed when changes have been made to the form, includes everything from the `FormState` except\n * the schema validation errors. An additional `status` is added when returned from `onSubmit`\n */\nexport interface IChangeEvent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>\n extends Omit<FormState<T, S, F>, 'schemaValidationErrors' | 'schemaValidationErrorSchema'> {\n /** The status of the form when submitted */\n status?: 'submitted';\n}\n\n/** The `Form` component renders the outer form and all the fields defined in the `schema` */\nexport default class Form<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> extends Component<FormProps<T, S, F>, FormState<T, S, F>> {\n /** The ref used to hold the `form` element, this needs to be `any` because `tagName` or `_internalFormWrapper` can\n * provide any possible type here\n */\n formElement: RefObject<any>;\n\n /** Constructs the `Form` from the `props`. Will setup the initial state from the props. It will also call the\n * `onChange` handler if the initially provided `formData` is modified to add missing default values as part of the\n * state construction.\n *\n * @param props - The initial props for the `Form`\n */\n constructor(props: FormProps<T, S, F>) {\n super(props);\n\n if (!props.validator) {\n throw new Error('A validator is required for Form functionality to work');\n }\n\n this.state = this.getStateFromProps(props, props.formData);\n if (this.props.onChange && !deepEquals(this.state.formData, this.props.formData)) {\n this.props.onChange(this.state);\n }\n this.formElement = createRef();\n }\n\n /**\n * `getSnapshotBeforeUpdate` is a React lifecycle method that is invoked right before the most recently rendered\n * output is committed to the DOM. It enables your component to capture current values (e.g., scroll position) before\n * they are potentially changed.\n *\n * In this case, it checks if the props have changed since the last render. If they have, it computes the next state\n * of the component using `getStateFromProps` method and returns it along with a `shouldUpdate` flag set to `true` IF\n * the `nextState` and `prevState` are different, otherwise `false`. This ensures that we have the most up-to-date\n * state ready to be applied in `componentDidUpdate`.\n *\n * If `formData` hasn't changed, it simply returns an object with `shouldUpdate` set to `false`, indicating that a\n * state update is not necessary.\n *\n * @param prevProps - The previous set of props before the update.\n * @param prevState - The previous state before the update.\n * @returns Either an object containing the next state and a flag indicating that an update should occur, or an object\n * with a flag indicating that an update is not necessary.\n */\n getSnapshotBeforeUpdate(\n prevProps: FormProps<T, S, F>,\n prevState: FormState<T, S, F>,\n ): { nextState: FormState<T, S, F>; shouldUpdate: true } | { shouldUpdate: false } {\n if (!deepEquals(this.props, prevProps)) {\n const formDataChangedFields = getChangedFields(this.props.formData, prevProps.formData);\n const isSchemaChanged = !deepEquals(prevProps.schema, this.props.schema);\n // When formData is not an object, getChangedFields returns an empty array.\n // In this case, deepEquals is most needed to check again.\n const isFormDataChanged =\n formDataChangedFields.length > 0 || !deepEquals(prevProps.formData, this.props.formData);\n const nextState = this.getStateFromProps(\n this.props,\n this.props.formData,\n // If the `schema` has changed, we need to update the retrieved schema.\n // Or if the `formData` changes, for example in the case of a schema with dependencies that need to\n // match one of the subSchemas, the retrieved schema must be updated.\n isSchemaChanged || isFormDataChanged ? undefined : this.state.retrievedSchema,\n isSchemaChanged,\n formDataChangedFields,\n );\n const shouldUpdate = !deepEquals(nextState, prevState);\n return { nextState, shouldUpdate };\n }\n return { shouldUpdate: false };\n }\n\n /**\n * `componentDidUpdate` is a React lifecycle method that is invoked immediately after updating occurs. This method is\n * not called for the initial render.\n *\n * Here, it checks if an update is necessary based on the `shouldUpdate` flag received from `getSnapshotBeforeUpdate`.\n * If an update is required, it applies the next state and, if needed, triggers the `onChange` handler to inform about\n * changes.\n *\n * @param _ - The previous set of props.\n * @param prevState - The previous state of the component before the update.\n * @param snapshot - The value returned from `getSnapshotBeforeUpdate`.\n */\n componentDidUpdate(\n _: FormProps<T, S, F>,\n prevState: FormState<T, S, F>,\n snapshot: { nextState: FormState<T, S, F>; shouldUpdate: true } | { shouldUpdate: false },\n ) {\n if (snapshot.shouldUpdate) {\n const { nextState } = snapshot;\n\n if (\n !deepEquals(nextState.formData, this.props.formData) &&\n !deepEquals(nextState.formData, prevState.formData) &&\n this.props.onChange\n ) {\n this.props.onChange(nextState);\n }\n this.setState(nextState);\n }\n }\n\n /** Extracts the updated state from the given `props` and `inputFormData`. As part of this process, the\n * `inputFormData` is first processed to add any missing required defaults. After that, the data is run through the\n * validation process IF required by the `props`.\n *\n * @param props - The props passed to the `Form`\n * @param inputFormData - The new or current data for the `Form`\n * @param retrievedSchema - An expanded schema, if not provided, it will be retrieved from the `schema` and `formData`.\n * @param isSchemaChanged - A flag indicating whether the schema has changed.\n * @param formDataChangedFields - The changed fields of `formData`\n * @returns - The new state for the `Form`\n */\n getStateFromProps(\n props: FormProps<T, S, F>,\n inputFormData?: T,\n retrievedSchema?: S,\n isSchemaChanged = false,\n formDataChangedFields: string[] = [],\n ): FormState<T, S, F> {\n const state: FormState<T, S, F> = this.state || {};\n const schema = 'schema' in props ? props.schema : this.props.schema;\n const uiSchema: UiSchema<T, S, F> = ('uiSchema' in props ? props.uiSchema! : this.props.uiSchema!) || {};\n const edit = typeof inputFormData !== 'undefined';\n const liveValidate = 'liveValidate' in props ? props.liveValidate : this.props.liveValidate;\n const mustValidate = edit && !props.noValidate && liveValidate;\n const rootSchema = schema;\n const experimental_defaultFormStateBehavior =\n 'experimental_defaultFormStateBehavior' in props\n ? props.experimental_defaultFormStateBehavior\n : this.props.experimental_defaultFormStateBehavior;\n const experimental_customMergeAllOf =\n 'experimental_customMergeAllOf' in props\n ? props.experimental_customMergeAllOf\n : this.props.experimental_customMergeAllOf;\n let schemaUtils: SchemaUtilsType<T, S, F> = state.schemaUtils;\n if (\n !schemaUtils ||\n schemaUtils.doesSchemaUtilsDiffer(\n props.validator,\n rootSchema,\n experimental_defaultFormStateBehavior,\n experimental_customMergeAllOf,\n )\n ) {\n schemaUtils = createSchemaUtils<T, S, F>(\n props.validator,\n rootSchema,\n experimental_defaultFormStateBehavior,\n experimental_customMergeAllOf,\n );\n }\n const formData: T = schemaUtils.getDefaultFormState(schema, inputFormData) as T;\n const _retrievedSchema = this.updateRetrievedSchema(\n retrievedSchema ?? schemaUtils.retrieveSchema(schema, formData),\n );\n\n const getCurrentErrors = (): ValidationData<T> => {\n // If the `props.noValidate` option is set or the schema has changed, we reset the error state.\n if (props.noValidate || isSchemaChanged) {\n return { errors: [], errorSchema: {} };\n } else if (!props.liveValidate) {\n return {\n errors: state.schemaValidationErrors || [],\n errorSchema: state.schemaValidationErrorSchema || {},\n };\n }\n return {\n errors: state.errors || [],\n errorSchema: state.errorSchema || {},\n };\n };\n\n let errors: RJSFValidationError[];\n let errorSchema: ErrorSchema<T> | undefined;\n let schemaValidationErrors: RJSFValidationError[] = state.schemaValidationErrors;\n let schemaValidationErrorSchema: ErrorSchema<T> = state.schemaValidationErrorSchema;\n if (mustValidate) {\n const schemaValidation = this.validate(formData, schema, schemaUtils, _retrievedSchema);\n errors = schemaValidation.errors;\n // If retrievedSchema is undefined which means the schema or formData has changed, we do not merge state.\n // Else in the case where it hasn't changed, we merge 'state.errorSchema' with 'schemaValidation.errorSchema.' This done to display the raised field error.\n if (retrievedSchema === undefined) {\n errorSchema = schemaValidation.errorSchema;\n } else {\n errorSchema = mergeObjects(\n this.state?.errorSchema,\n schemaValidation.errorSchema,\n 'preventDuplicates',\n ) as ErrorSchema<T>;\n }\n schemaValidationErrors = errors;\n schemaValidationErrorSchema = errorSchema;\n } else {\n const currentErrors = getCurrentErrors();\n errors = currentErrors.errors;\n errorSchema = currentErrors.errorSchema;\n if (formDataChangedFields.length > 0) {\n const newErrorSchema = formDataChangedFields.reduce(\n (acc, key) => {\n acc[key] = undefined;\n return acc;\n },\n {} as Record<string, undefined>,\n );\n errorSchema = schemaValidationErrorSchema = mergeObjects(\n currentErrors.errorSchema,\n newErrorSchema,\n 'preventDuplicates',\n ) as ErrorSchema<T>;\n }\n }\n\n if (props.extraErrors) {\n const merged = validationDataMerge({ errorSchema, errors }, props.extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n const idSchema = schemaUtils.toIdSchema(\n _retrievedSchema,\n uiSchema['ui:rootFieldId'],\n formData,\n props.idPrefix,\n props.idSeparator,\n );\n const nextState: FormState<T, S, F> = {\n schemaUtils,\n schema,\n uiSchema,\n idSchema,\n formData,\n edit,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n retrievedSchema: _retrievedSchema,\n };\n return nextState;\n }\n\n /** React lifecycle method that is used to determine whether component should be updated.\n *\n * @param nextProps - The next version of the props\n * @param nextState - The next version of the state\n * @returns - True if the component should be updated, false otherwise\n */\n shouldComponentUpdate(nextProps: FormProps<T, S, F>, nextState: FormState<T, S, F>): boolean {\n return shouldRender(this, nextProps, nextState);\n }\n\n /** Gets the previously raised customValidate errors.\n *\n * @returns the previous customValidate errors\n */\n private getPreviousCustomValidateErrors(): ErrorSchema<T> {\n const { customValidate, uiSchema } = this.props;\n const prevFormData = this.state.formData as T;\n let customValidateErrors = {};\n if (typeof customValidate === 'function') {\n const errorHandler = customValidate(prevFormData, createErrorHandler<T>(prevFormData), uiSchema);\n const userErrorSchema = unwrapErrorHandler<T>(errorHandler);\n customValidateErrors = userErrorSchema;\n }\n return customValidateErrors;\n }\n\n /** Validates the `formData` against the `schema` using the `altSchemaUtils` (if provided otherwise it uses the\n * `schemaUtils` in the state), returning the results.\n *\n * @param formData - The new form data to validate\n * @param schema - The schema used to validate against\n * @param altSchemaUtils - The alternate schemaUtils to use for validation\n */\n validate(\n formData: T | undefined,\n schema = this.props.schema,\n altSchemaUtils?: SchemaUtilsType<T, S, F>,\n retrievedSchema?: S,\n ): ValidationData<T> {\n const schemaUtils = altSchemaUtils ? altSchemaUtils : this.state.schemaUtils;\n const { customValidate, transformErrors, uiSchema } = this.props;\n const resolvedSchema = retrievedSchema ?? schemaUtils.retrieveSchema(schema, formData);\n return schemaUtils\n .getValidator()\n .validateFormData(formData, resolvedSchema, customValidate, transformErrors, uiSchema);\n }\n\n /** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */\n renderErrors(registry: Registry<T, S, F>) {\n const { errors, errorSchema, schema, uiSchema } = this.state;\n const { formContext } = this.props;\n const options = getUiOptions<T, S, F>(uiSchema);\n const ErrorListTemplate = getTemplate<'ErrorListTemplate', T, S, F>('ErrorListTemplate', registry, options);\n\n if (errors && errors.length) {\n return (\n <ErrorListTemplate\n errors={errors}\n errorSchema={errorSchema || {}}\n schema={schema}\n uiSchema={uiSchema}\n formContext={formContext}\n registry={registry}\n />\n );\n }\n return null;\n }\n\n /** Returns the `formData` with only the elements specified in the `fields` list\n *\n * @param formData - The data for the `Form`\n * @param fields - The fields to keep while filtering\n */\n getUsedFormData = (formData: T | undefined, fields: string[][]): T | undefined => {\n // For the case of a single input form\n if (fields.length === 0 && typeof formData !== 'object') {\n return formData;\n }\n\n // _pick has incorrect type definition, it works with string[][], because lodash/hasIn supports it\n const data: GenericObjectType = _pick(formData, fields as unknown as string[]);\n if (Array.isArray(formData)) {\n return Object.keys(data).map((key: string) => data[key]) as unknown as T;\n }\n\n return data as T;\n };\n\n /** Returns the list of field names from inspecting the `pathSchema` as well as using the `formData`\n *\n * @param pathSchema - The `PathSchema` object for the form\n * @param [formData] - The form data to use while checking for empty objects/arrays\n */\n getFieldNames = (pathSchema: PathSchema<T>, formData?: T): string[][] => {\n const getAllPaths = (_obj: GenericObjectType, acc: string[][] = [], paths: string[][] = [[]]) => {\n Object.keys(_obj).forEach((key: string) => {\n if (typeof _obj[key] === 'object') {\n const newPaths = paths.map((path) => [...path, key]);\n // If an object is marked with additionalProperties, all its keys are valid\n if (_obj[key][RJSF_ADDITIONAL_PROPERTIES_FLAG] && _obj[key][NAME_KEY] !== '') {\n acc.push(_obj[key][NAME_KEY]);\n } else {\n getAllPaths(_obj[key], acc, newPaths);\n }\n } else if (key === NAME_KEY && _obj[key] !== '') {\n paths.forEach((path) => {\n const formValue = _get(formData, path);\n // adds path to fieldNames if it points to a value\n // or an empty object/array\n if (\n typeof formValue !== 'object' ||\n _isEmpty(formValue) ||\n (Array.isArray(formValue) && formValue.every((val) => typeof val !== 'object'))\n ) {\n acc.push(path);\n }\n });\n }\n });\n return acc;\n };\n\n return getAllPaths(pathSchema);\n };\n\n /** Returns the `formData` after filtering to remove any extra data not in a form field\n *\n * @param formData - The data for the `Form`\n * @returns The `formData` after omitting extra data\n */\n omitExtraData = (formData?: T): T | undefined => {\n const { schema, schemaUtils } = this.state;\n const retrievedSchema = schemaUtils.retrieveSchema(schema, formData);\n const pathSchema = schemaUtils.toPathSchema(retrievedSchema, '', formData);\n const fieldNames = this.getFieldNames(pathSchema, formData);\n const newFormData = this.getUsedFormData(formData, fieldNames);\n return newFormData;\n };\n\n // Filtering errors based on your retrieved schema to only show errors for properties in the selected branch.\n private filterErrorsBasedOnSchema(schemaErrors: ErrorSchema<T>, resolvedSchema?: S, formData?: any): ErrorSchema<T> {\n const { retrievedSchema, schemaUtils } = this.state;\n const _retrievedSchema = resolvedSchema ?? retrievedSchema;\n const pathSchema = schemaUtils.toPathSchema(_retrievedSchema, '', formData);\n const fieldNames = this.getFieldNames(pathSchema, formData);\n const filteredErrors: ErrorSchema<T> = _pick(schemaErrors, fieldNames as unknown as string[]);\n // If the root schema is of a primitive type, do not filter out the __errors\n if (resolvedSchema?.type !== 'object' && resolvedSchema?.type !== 'array') {\n filteredErrors.__errors = schemaErrors.__errors;\n }\n\n const prevCustomValidateErrors = this.getPreviousCustomValidateErrors();\n // Filtering out the previous raised customValidate errors so that they are cleared when no longer valid.\n const filterPreviousCustomErrors = (errors: string[] = [], prevCustomErrors: string[]) => {\n if (errors.length === 0) {\n return errors;\n }\n\n return errors.filter((error) => {\n return !prevCustomErrors.includes(error);\n });\n };\n\n // Removing undefined, null and empty errors.\n const filterNilOrEmptyErrors = (errors: any, previousCustomValidateErrors: any = {}): ErrorSchema<T> => {\n _forEach(errors, (errorAtKey: ErrorSchema<T>['__errors'] | undefined, errorKey: keyof typeof errors) => {\n const prevCustomValidateErrorAtKey: ErrorSchema<T> | undefined = previousCustomValidateErrors[errorKey];\n if (_isNil(errorAtKey) || (Array.isArray(errorAtKey) && errorAtKey.length === 0)) {\n delete errors[errorKey];\n } else if (\n isObject(errorAtKey) &&\n isObject(prevCustomValidateErrorAtKey) &&\n Array.isArray(prevCustomValidateErrorAtKey?.__errors)\n ) {\n // if previous customValidate error is an object and has __errors array, filter out the errors previous customValidate errors.\n errors[errorKey] = filterPreviousCustomErrors(errorAtKey.__errors, prevCustomValidateErrorAtKey.__errors);\n } else if (typeof errorAtKey === 'object' && !Array.isArray(errorAtKey.__errors)) {\n filterNilOrEmptyErrors(errorAtKey, previousCustomValidateErrors[errorKey]);\n }\n });\n return errors;\n };\n return filterNilOrEmptyErrors(filteredErrors, prevCustomValidateErrors);\n }\n\n /** Function to handle changes made to a field in the `Form`. This handler receives an entirely new copy of the\n * `formData` along with a new `ErrorSchema`. It will first update the `formData` with any missing default fields and\n * then, if `omitExtraData` and `liveOmit` are turned on, the `formData` will be filtered to remove any extra data not\n * in a form field. Then, the resulting formData will be validated if required. The state will be updated with the new\n * updated (potentially filtered) `formData`, any errors that resulted from validation. Finally the `onChange`\n * callback will be called if specified with the updated state.\n *\n * @param formData - The new form data from a change to a field\n * @param newErrorSchema - The new `ErrorSchema` based on the field change\n * @param id - The id of the field that caused the change\n */\n onChange = (formData: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { extraErrors, omitExtraData, liveOmit, noValidate, liveValidate, onChange } = this.props;\n const { schemaUtils, schema } = this.state;\n\n let retrievedSchema = this.state.retrievedSchema;\n if (isObject(formData) || Array.isArray(formData)) {\n const newState = this.getStateFromProps(this.props, formData);\n formData = newState.formData;\n retrievedSchema = newState.retrievedSchema;\n }\n\n const mustValidate = !noValidate && liveValidate;\n let state: Partial<FormState<T, S, F>> = { formData, schema };\n let newFormData = formData;\n\n if (omitExtraData === true && liveOmit === true) {\n newFormData = this.omitExtraData(formData);\n state = {\n formData: newFormData,\n };\n }\n\n if (mustValidate) {\n const schemaValidation = this.validate(newFormData, schema, schemaUtils, retrievedSchema);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (extraErrors) {\n const merged = validationDataMerge(schemaValidation, extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n // Merging 'newErrorSchema' into 'errorSchema' to display the custom raised errors.\n if (newErrorSchema) {\n const filteredErrors = this.filterErrorsBasedOnSchema(newErrorSchema, retrievedSchema, newFormData);\n errorSchema = mergeObjects(errorSchema, filteredErrors, 'preventDuplicates') as ErrorSchema<T>;\n }\n state = {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n };\n } else if (!noValidate && newErrorSchema) {\n const errorSchema = extraErrors\n ? (mergeObjects(newErrorSchema, extraErrors, 'preventDuplicates') as ErrorSchema<T>)\n : newErrorSchema;\n state = {\n formData: newFormData,\n errorSchema: errorSchema,\n errors: toErrorList(errorSchema),\n };\n }\n this.setState(state as FormState<T, S, F>, () => onChange && onChange({ ...this.state, ...state }, id));\n };\n\n /**\n * If the retrievedSchema has changed the new retrievedSchema is returned.\n * Otherwise, the old retrievedSchema is returned to persist reference.\n * - This ensures that AJV retrieves the schema from the cache when it has not changed,\n * avoiding the performance cost of recompiling the schema.\n *\n * @param retrievedSchema The new retrieved schema.\n * @returns The new retrieved schema if it has changed, else the old retrieved schema.\n */\n private updateRetrievedSchema(retrievedSchema: S) {\n const isTheSame = deepEquals(retrievedSchema, this.state?.retrievedSchema);\n return isTheSame ? this.state.retrievedSchema : retrievedSchema;\n }\n\n /**\n * Callback function to handle reset form data.\n * - Reset all fields with default values.\n * - Reset validations and errors\n *\n */\n reset = () => {\n const { onChange } = this.props;\n const newState = this.getStateFromProps(this.props, undefined);\n const newFormData = newState.formData;\n const state = {\n formData: newFormData,\n errorSchema: {},\n errors: [] as unknown,\n schemaValidationErrors: [] as unknown,\n schemaValidationErrorSchema: {},\n } as FormState<T, S, F>;\n\n this.setState(state, () => onChange && onChange({ ...this.state, ...state }));\n };\n\n /** Callback function to handle when a field on the form is blurred. Calls the `onBlur` callback for the `Form` if it\n * was provided.\n *\n * @param id - The unique `id` of the field that was blurred\n * @param data - The data associated with the field that was blurred\n */\n onBlur = (id: string, data: any) => {\n const { onBlur } = this.props;\n if (onBlur) {\n onBlur(id, data);\n }\n };\n\n /** Callback function to handle when a field on the form is focused. Calls the `onFocus` callback for the `Form` if it\n * was provided.\n *\n * @param id - The unique `id` of the field that was focused\n * @param data - The data associated with the field that was focused\n */\n onFocus = (id: string, data: any) => {\n const { onFocus } = this.props;\n if (onFocus) {\n onFocus(id, data);\n }\n };\n\n /** Callback function to handle when the form is submitted. First, it prevents the default event behavior. Nothing\n * happens if the target and currentTarget of the event are not the same. It will omit any extra data in the\n * `formData` in the state if `omitExtraData` is true. It will validate the resulting `formData`, reporting errors\n * via the `onError()` callback unless validation is disabled. Finally, it will add in any `extraErrors` and then call\n * back the `onSubmit` callback if it was provided.\n *\n * @param event - The submit HTML form event\n */\n onSubmit = (event: FormEvent<any>) => {\n event.preventDefault();\n if (event.target !== event.currentTarget) {\n return;\n }\n\n event.persist();\n const { omitExtraData, extraErrors, noValidate, onSubmit } = this.props;\n let { formData: newFormData } = this.state;\n\n if (omitExtraData === true) {\n newFormData = this.omitExtraData(newFormData);\n }\n\n if (noValidate || this.validateFormWithFormData(newFormData)) {\n // There are no errors generated through schema validation.\n // Check for user provided errors and update state accordingly.\n const errorSchema = extraErrors || {};\n const errors = extraErrors ? toErrorList(extraErrors) : [];\n this.setState(\n {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n },\n () => {\n if (onSubmit) {\n onSubmit({ ...this.state, formData: newFormData, status: 'submitted' }, event);\n }\n },\n );\n }\n };\n\n /** Returns the registry for the form */\n getRegistry(): Registry<T, S, F> {\n const { translateString: customTranslateString, uiSchema = {} } = this.props;\n const { schemaUtils } = this.state;\n const { fields, templates, widgets, formContext, translateString } = getDefaultRegistry<T, S, F>();\n return {\n fields: { ...fields, ...this.props.fields },\n templates: {\n ...templates,\n ...this.props.templates,\n ButtonTemplates: {\n ...templates.ButtonTemplates,\n ...this.props.templates?.ButtonTemplates,\n },\n },\n widgets: { ...widgets, ...this.props.widgets },\n rootSchema: this.props.schema,\n formContext: this.props.formContext || formContext,\n schemaUtils,\n translateString: customTranslateString || translateString,\n globalUiOptions: uiSchema[UI_GLOBAL_OPTIONS_KEY],\n };\n }\n\n /** Provides a function that can be used to programmatically submit the `Form` */\n submit = () => {\n if (this.formElement.current) {\n const submitCustomEvent = new CustomEvent('submit', {\n cancelable: true,\n });\n submitCustomEvent.preventDefault();\n this.formElement.current.dispatchEvent(submitCustomEvent);\n this.formElement.current.requestSubmit();\n }\n };\n\n /** Attempts to focus on the field associated with the `error`. Uses the `property` field to compute path of the error\n * field, then, using the `idPrefix` and `idSeparator` converts that path into an id. Then the input element with that\n * id is attempted to be found using the `formElement` ref. If it is located, then it is focused.\n *\n * @param error - The error on which to focus\n */\n focusOnError(error: RJSFValidationError) {\n const { idPrefix = 'root', idSeparator = '_' } = this.props;\n const { property } = error;\n const path = _toPath(property);\n if (path[0] === '') {\n // Most of the time the `.foo` property results in the first element being empty, so replace it with the idPrefix\n path[0] = idPrefix;\n } else {\n // Otherwise insert the idPrefix into the first location using unshift\n path.unshift(idPrefix);\n }\n\n const elementId = path.join(idSeparator);\n let field = this.formElement.current.elements[elementId];\n if (!field) {\n // if not an exact match, try finding an input starting with the element id (like radio buttons or checkboxes)\n field = this.formElement.current.querySelector(`input[id^=\"${elementId}\"`);\n }\n if (field && field.length) {\n // If we got a list with length > 0\n field = field[0];\n }\n if (field) {\n field.focus();\n }\n }\n\n /** Validates the form using the given `formData`. For use on form submission or on programmatic validation.\n * If `onError` is provided, then it will be called with the list of errors.\n *\n * @param formData - The form data to validate\n * @returns - True if the form is valid, false otherwise.\n */\n validateFormWithFormData = (formData?: T): boolean => {\n const { extraErrors, extraErrorsBlockSubmit, focusOnFirstError, onError } = this.props;\n const { errors: prevErrors } = this.state;\n const schemaValidation = this.validate(formData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n const hasError = errors.length > 0 || (extraErrors && extraErrorsBlockSubmit);\n if (hasError) {\n if (extraErrors) {\n const merged = validationDataMerge(schemaValidation, extraErrors);\n errorSchema = merged.errorSchema;\n errors = merged.errors;\n }\n if (focusOnFirstError) {\n if (typeof focusOnFirstError === 'function') {\n focusOnFirstError(errors[0]);\n } else {\n this.focusOnError(errors[0]);\n }\n }\n this.setState(\n {\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n },\n () => {\n if (onError) {\n onError(errors);\n } else {\n console.error('Form validation failed', errors);\n }\n },\n );\n } else if (prevErrors.length > 0) {\n this.setState({\n errors: [],\n errorSchema: {},\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n });\n }\n return !hasError;\n };\n\n /** Programmatically validate the form. If `omitExtraData` is true, the `formData` will first be filtered to remove\n * any extra data not in a form field. If `onError` is provided, then it will be called with the list of errors the\n * same way as would happen on form submission.\n *\n * @returns - True if the form is valid, false otherwise.\n */\n validateForm() {\n const { omitExtraData } = this.props;\n let { formData: newFormData } = this.state;\n if (omitExtraData === true) {\n newFormData = this.omitExtraData(newFormData);\n }\n return this.validateFormWithFormData(newFormData);\n }\n\n /** Renders the `Form` fields inside the <form> | `tagName` or `_internalFormWrapper`, rendering any errors if\n * needed along with the submit button or any children of the form.\n */\n render() {\n const {\n children,\n id,\n idPrefix,\n idSeparator,\n className = '',\n tagName,\n name,\n method,\n target,\n action,\n autoComplete,\n enctype,\n acceptCharset,\n noHtml5Validate = false,\n disabled,\n readonly,\n formContext,\n showErrorList = 'top',\n _internalFormWrapper,\n } = this.props;\n\n const { schema, uiSchema, formData, errorSchema, idSchema } = this.state;\n const registry = this.getRegistry();\n const { SchemaField: _SchemaField } = registry.fields;\n const { SubmitButton } = registry.templates.ButtonTemplates;\n // The `semantic-ui` and `material-ui` themes have `_internalFormWrapper`s that take an `as` prop that is the\n // PropTypes.elementType to use for the inner tag, so we'll need to pass `tagName` along if it is provided.\n // NOTE, the `as` prop is native to `semantic-ui` and is emulated in the `material-ui` theme\n const as = _internalFormWrapper ? tagName : undefined;\n const FormTag = _internalFormWrapper || tagName || 'form';\n\n let { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions = {} } = getUiOptions<T, S, F>(uiSchema);\n if (disabled) {\n submitOptions = { ...submitOptions, props: { ...submitOptions.props, disabled: true } };\n }\n const submitUiSchema = { [UI_OPTIONS_KEY]: { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions } };\n\n return (\n <FormTag\n className={className ? className : 'rjsf'}\n id={id}\n name={name}\n method={method}\n target={target}\n action={action}\n autoComplete={autoComplete}\n encType={enctype}\n acceptCharset={acceptCharset}\n noValidate={noHtml5Validate}\n onSubmit={this.onSubmit}\n as={as}\n ref={this.formElement}\n >\n {showErrorList === 'top' && this.renderErrors(registry)}\n <_SchemaField\n name=''\n schema={schema}\n uiSchema={uiSchema}\n errorSchema={errorSchema}\n idSchema={idSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formContext={formContext}\n formData={formData}\n onChange={this.onChange}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n />\n\n {children ? children : <SubmitButton uiSchema={submitUiSchema} registry={registry} />}\n {showErrorList === 'bottom' && this.renderErrors(registry)}\n </FormTag>\n );\n }\n}\n", "import { englishStringTranslator, FormContextType, Registry, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport fields from './components/fields';\nimport templates from './components/templates';\nimport widgets from './components/widgets';\n\n/** The default registry consists of all the fields, templates and widgets provided in the core implementation,\n * plus an empty `rootSchema` and `formContext. We omit schemaUtils here because it cannot be defaulted without a\n * rootSchema and validator. It will be added into the computed registry later in the Form.\n */\nexport default function getDefaultRegistry<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): Omit<Registry<T, S, F>, 'schemaUtils'> {\n return {\n fields: fields<T, S, F>(),\n templates: templates<T, S, F>(),\n widgets: widgets<T, S, F>(),\n rootSchema: {} as S,\n formContext: {} as F,\n translateString: englishStringTranslator,\n };\n}\n", "import { Component, MouseEvent } from 'react';\nimport {\n getTemplate,\n getWidget,\n getUiOptions,\n isFixedItems,\n allowAdditionalItems,\n isCustomWidget,\n optionsList,\n ArrayFieldTemplateProps,\n ErrorSchema,\n FieldProps,\n FormContextType,\n IdSchema,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UiSchema,\n ITEMS_KEY,\n} from '@rjsf/utils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport get from 'lodash/get';\nimport isObject from 'lodash/isObject';\nimport set from 'lodash/set';\nimport { nanoid } from 'nanoid';\n\n/** Type used to represent the keyed form data used in the state */\ntype KeyedFormDataType<T> = { key: string; item: T };\n\n/** Type used for the state of the `ArrayField` component */\ntype ArrayFieldState<T> = {\n /** The keyed form data elements */\n keyedFormData: KeyedFormDataType<T>[];\n /** Flag indicating whether any of the keyed form data has been updated */\n updatedKeyedFormData: boolean;\n};\n\n/** Used to generate a unique ID for an element in a row */\nfunction generateRowId() {\n return nanoid();\n}\n\n/** Converts the `formData` into `KeyedFormDataType` data, using the `generateRowId()` function to create the key\n *\n * @param formData - The data for the form\n * @returns - The `formData` converted into a `KeyedFormDataType` element\n */\nfunction generateKeyedFormData<T>(formData: T[]): KeyedFormDataType<T>[] {\n return !Array.isArray(formData)\n ? []\n : formData.map((item) => {\n return {\n key: generateRowId(),\n item,\n };\n });\n}\n\n/** Converts `KeyedFormDataType` data into the inner `formData`\n *\n * @param keyedFormData - The `KeyedFormDataType` to be converted\n * @returns - The inner `formData` item(s) in the `keyedFormData`\n */\nfunction keyedToPlainFormData<T>(keyedFormData: KeyedFormDataType<T> | KeyedFormDataType<T>[]): T[] {\n if (Array.isArray(keyedFormData)) {\n return keyedFormData.map((keyedItem) => keyedItem.item);\n }\n return [];\n}\n\n/** The `ArrayField` component is used to render a field in the schema that is of type `array`. It supports both normal\n * and fixed array, allowing user to add and remove elements from the array data.\n */\nclass ArrayField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T[], S, F>,\n ArrayFieldState<T>\n> {\n /** Constructs an `ArrayField` from the `props`, generating the initial keyed data from the `formData`\n *\n * @param props - The `FieldProps` for this template\n */\n constructor(props: FieldProps<T[], S, F>) {\n super(props);\n const { formData = [] } = props;\n const keyedFormData = generateKeyedFormData<T>(formData);\n this.state = {\n keyedFormData,\n updatedKeyedFormData: false,\n };\n }\n\n /** React lifecycle method that is called when the props are about to change allowing the state to be updated. It\n * regenerates the keyed form data and returns it\n *\n * @param nextProps - The next set of props data\n * @param prevState - The previous set of state data\n */\n static getDerivedStateFromProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n nextProps: Readonly<FieldProps<T[], S, F>>,\n prevState: Readonly<ArrayFieldState<T>>,\n ) {\n // Don't call getDerivedStateFromProps if keyed formdata was just updated.\n if (prevState.updatedKeyedFormData) {\n return {\n updatedKeyedFormData: false,\n };\n }\n const nextFormData = Array.isArray(nextProps.formData) ? nextProps.formData : [];\n const previousKeyedFormData = prevState.keyedFormData || [];\n const newKeyedFormData =\n nextFormData.length === previousKeyedFormData.length\n ? previousKeyedFormData.map((previousKeyedFormDatum, index) => {\n return {\n key: previousKeyedFormDatum.key,\n item: nextFormData[index],\n };\n })\n : generateKeyedFormData<T>(nextFormData);\n return {\n keyedFormData: newKeyedFormData,\n };\n }\n\n /** Returns the appropriate title for an item by getting first the title from the schema.items, then falling back to\n * the description from the schema.items, and finally the string \"Item\"\n */\n get itemTitle() {\n const { schema, registry } = this.props;\n const { translateString } = registry;\n return get(\n schema,\n [ITEMS_KEY, 'title'],\n get(schema, [ITEMS_KEY, 'description'], translateString(TranslatableString.ArrayItemTitle)),\n );\n }\n\n /** Determines whether the item described in the schema is always required, which is determined by whether any item\n * may be null.\n *\n * @param itemSchema - The schema for the item\n * @return - True if the item schema type does not contain the \"null\" type\n */\n isItemRequired(itemSchema: S) {\n if (Array.isArray(itemSchema.type)) {\n // While we don't yet support composite/nullable jsonschema types, it's\n // future-proof to check for requirement against these.\n return !itemSchema.type.includes('null');\n }\n // All non-null array item types are inherently required by design\n return itemSchema.type !== 'null';\n }\n\n /** Determines whether more items can be added to the array. If the uiSchema indicates the array doesn't allow adding\n * then false is returned. Otherwise, if the schema indicates that there are a maximum number of items and the\n * `formData` matches that value, then false is returned, otherwise true is returned.\n *\n * @param formItems - The list of items in the form\n * @returns - True if the item is addable otherwise false\n */\n canAddItem(formItems: any[]) {\n const { schema, uiSchema, registry } = this.props;\n let { addable } = getUiOptions<T[], S, F>(uiSchema, registry.globalUiOptions);\n if (addable !== false) {\n // if ui:options.addable was not explicitly set to false, we can add\n // another item if we have not exceeded maxItems yet\n if (schema.maxItems !== undefined) {\n addable = formItems.length < schema.maxItems;\n } else {\n addable = true;\n }\n }\n return addable;\n }\n\n /** Returns the default form information for an item based on the schema for that item. Deals with the possibility\n * that the schema is fixed and allows additional items.\n */\n _getNewFormDataRow = (): T => {\n const { schema, registry } = this.props;\n const { schemaUtils } = registry;\n let itemSchema = schema.items as S;\n if (isFixedItems(schema) && allowAdditionalItems(schema)) {\n itemSchema = schema.additionalItems as S;\n }\n // Cast this as a T to work around schema utils being for T[] caused by the FieldProps<T[], S, F> call on the class\n return schemaUtils.getDefaultFormState(itemSchema) as unknown as T;\n };\n\n /** Callback handler for when the user clicks on the add or add at index buttons. Creates a new row of keyed form data\n * either at the end of the list (when index is not specified) or inserted at the `index` when it is, adding it into\n * the state, and then returning `onChange()` with the plain form data converted from the keyed data\n *\n * @param event - The event for the click\n * @param [index] - The optional index at which to add the new data\n */\n _handleAddClick(event: MouseEvent, index?: number) {\n if (event) {\n event.preventDefault();\n }\n\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (index === undefined || i < index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i >= index) {\n set(newErrorSchema, [i + 1], errorSchema[idx]);\n }\n }\n }\n\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n const newKeyedFormData = [...keyedFormData];\n if (index !== undefined) {\n newKeyedFormData.splice(index, 0, newKeyedFormDataRow);\n } else {\n newKeyedFormData.push(newKeyedFormDataRow);\n }\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n }\n\n /** Callback handler for when the user clicks on the add button. Creates a new row of keyed form data at the end of\n * the list, adding it into the state, and then returning `onChange()` with the plain form data converted from the\n * keyed data\n *\n * @param event - The event for the click\n */\n onAddClick = (event: MouseEvent) => {\n this._handleAddClick(event);\n };\n\n /** Callback handler for when the user clicks on the add button on an existing array element. Creates a new row of\n * keyed form data inserted at the `index`, adding it into the state, and then returning `onChange()` with the plain\n * form data converted from the keyed data\n *\n * @param index - The index at which the add button is clicked\n */\n onAddIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n this._handleAddClick(event, index);\n };\n };\n\n /** Callback handler for when the user clicks on the copy button on an existing array element. Clones the row of\n * keyed form data at the `index` into the next position in the state, and then returning `onChange()` with the plain\n * form data converted from the keyed data\n *\n * @param index - The index at which the copy button is clicked\n */\n onCopyIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n if (event) {\n event.preventDefault();\n }\n\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i <= index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i > index) {\n set(newErrorSchema, [i + 1], errorSchema[idx]);\n }\n }\n }\n\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: cloneDeep(keyedFormData[index].item),\n };\n const newKeyedFormData = [...keyedFormData];\n if (index !== undefined) {\n newKeyedFormData.splice(index + 1, 0, newKeyedFormDataRow);\n } else {\n newKeyedFormData.push(newKeyedFormDataRow);\n }\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler for when the user clicks on the remove button on an existing array element. Removes the row of\n * keyed form data at the `index` in the state, and then returning `onChange()` with the plain form data converted\n * from the keyed data\n *\n * @param index - The index at which the remove button is clicked\n */\n onDropIndexClick = (index: number) => {\n return (event: MouseEvent) => {\n if (event) {\n event.preventDefault();\n }\n const { onChange, errorSchema } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i < index) {\n set(newErrorSchema, [i], errorSchema[idx]);\n } else if (i > index) {\n set(newErrorSchema, [i - 1], errorSchema[idx]);\n }\n }\n }\n const newKeyedFormData = keyedFormData.filter((_, i) => i !== index);\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler for when the user clicks on one of the move item buttons on an existing array element. Moves the\n * row of keyed form data at the `index` to the `newIndex` in the state, and then returning `onChange()` with the\n * plain form data converted from the keyed data\n *\n * @param index - The index of the item to move\n * @param newIndex - The index to where the item is to be moved\n */\n onReorderClick = (index: number, newIndex: number) => {\n return (event: MouseEvent<HTMLButtonElement>) => {\n if (event) {\n event.preventDefault();\n event.currentTarget.blur();\n }\n const { onChange, errorSchema } = this.props;\n let newErrorSchema: ErrorSchema<T>;\n if (errorSchema) {\n newErrorSchema = {};\n for (const idx in errorSchema) {\n const i = parseInt(idx);\n if (i == index) {\n set(newErrorSchema, [newIndex], errorSchema[index]);\n } else if (i == newIndex) {\n set(newErrorSchema, [index], errorSchema[newIndex]);\n } else {\n set(newErrorSchema, [idx], errorSchema[i]);\n }\n }\n }\n\n const { keyedFormData } = this.state;\n function reOrderArray() {\n // Copy item\n const _newKeyedFormData = keyedFormData.slice();\n\n // Moves item from index to newIndex\n _newKeyedFormData.splice(index, 1);\n _newKeyedFormData.splice(newIndex, 0, keyedFormData[index]);\n\n return _newKeyedFormData;\n }\n const newKeyedFormData = reOrderArray();\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema as ErrorSchema<T[]>),\n );\n };\n };\n\n /** Callback handler used to deal with changing the value of the data in the array at the `index`. Calls the\n * `onChange` callback with the updated form data\n *\n * @param index - The index of the item being changed\n */\n onChangeForIndex = (index: number) => {\n return (value: any, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { formData, onChange, errorSchema } = this.props;\n const arrayData = Array.isArray(formData) ? formData : [];\n const newFormData = arrayData.map((item: T, i: number) => {\n // We need to treat undefined items as nulls to have validation.\n // See https://github.com/tdegrunt/jsonschema/issues/206\n const jsonValue = typeof value === 'undefined' ? null : value;\n return index === i ? jsonValue : item;\n });\n onChange(\n newFormData,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [index]: newErrorSchema,\n },\n id,\n );\n };\n };\n\n /** Callback handler used to change the value for a checkbox */\n onSelectChange = (value: any) => {\n const { onChange, idSchema } = this.props;\n onChange(value, undefined, idSchema && idSchema.$id);\n };\n\n /** Renders the `ArrayField` depending on the specific needs of the schema and uischema elements\n */\n render() {\n const { schema, uiSchema, idSchema, registry } = this.props;\n const { schemaUtils, translateString } = registry;\n if (!(ITEMS_KEY in schema)) {\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const UnsupportedFieldTemplate = getTemplate<'UnsupportedFieldTemplate', T[], S, F>(\n 'UnsupportedFieldTemplate',\n registry,\n uiOptions,\n );\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason={translateString(TranslatableString.MissingItems)}\n registry={registry}\n />\n );\n }\n if (schemaUtils.isMultiSelect(schema)) {\n // If array has enum or uniqueItems set to true, call renderMultiSelect() to render the default multiselect widget or a custom widget, if specified.\n return this.renderMultiSelect();\n }\n if (isCustomWidget<T[], S, F>(uiSchema)) {\n return this.renderCustomWidget();\n }\n if (isFixedItems(schema)) {\n return this.renderFixedArray();\n }\n if (schemaUtils.isFilesArray(schema, uiSchema)) {\n return this.renderFiles();\n }\n return this.renderNormalArray();\n }\n\n /** Renders a normal array without any limitations of length\n */\n renderNormalArray() {\n const {\n schema,\n uiSchema = {},\n errorSchema,\n idSchema,\n name,\n title,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n registry,\n onBlur,\n onFocus,\n idPrefix,\n idSeparator = '_',\n rawErrors,\n } = this.props;\n const { keyedFormData } = this.state;\n const fieldTitle = schema.title || title || name;\n const { schemaUtils, formContext } = registry;\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const _schemaItems: S = isObject(schema.items) ? (schema.items as S) : ({} as S);\n const itemsSchema: S = schemaUtils.retrieveSchema(_schemaItems);\n const formData = keyedToPlainFormData(this.state.keyedFormData);\n const canAdd = this.canAddItem(formData);\n const arrayProps: ArrayFieldTemplateProps<T[], S, F> = {\n canAdd,\n items: keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n // While we are actually dealing with a single item of type T, the types require a T[], so cast\n const itemCast = item as unknown as T[];\n const itemSchema = schemaUtils.retrieveSchema(_schemaItems, itemCast);\n const itemErrorSchema = errorSchema ? (errorSchema[index] as ErrorSchema<T[]>) : undefined;\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(itemSchema, itemIdPrefix, itemCast, idPrefix, idSeparator);\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\n title: fieldTitle ? `${fieldTitle}-${index + 1}` : undefined,\n canAdd,\n canMoveUp: index > 0,\n canMoveDown: index < formData.length - 1,\n itemSchema,\n itemIdSchema,\n itemErrorSchema,\n itemData: itemCast,\n itemUiSchema: uiSchema.items,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n rawErrors,\n totalItems: keyedFormData.length,\n });\n }),\n className: `rjsf-field rjsf-field-array rjsf-field-array-of-${itemsSchema.type}`,\n disabled,\n idSchema,\n uiSchema,\n onAddClick: this.onAddClick,\n readonly,\n required,\n schema,\n title: fieldTitle,\n formContext,\n formData,\n rawErrors,\n registry,\n };\n\n const Template = getTemplate<'ArrayFieldTemplate', T[], S, F>('ArrayFieldTemplate', registry, uiOptions);\n return <Template {...arrayProps} />;\n }\n\n /** Renders an array using the custom widget provided by the user in the `uiSchema`\n */\n renderCustomWidget() {\n const {\n schema,\n idSchema,\n uiSchema,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n hideError,\n placeholder,\n onBlur,\n onFocus,\n formData: items = [],\n registry,\n rawErrors,\n name,\n } = this.props;\n const { widgets, formContext, globalUiOptions, schemaUtils } = registry;\n const { widget, title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n options={options}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n value={items}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n required={required}\n label={label}\n hideLabel={!displayLabel}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n /** Renders an array as a set of checkboxes\n */\n renderMultiSelect() {\n const {\n schema,\n idSchema,\n uiSchema,\n formData: items = [],\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n placeholder,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n name,\n } = this.props;\n const { widgets, schemaUtils, formContext, globalUiOptions } = registry;\n const itemsSchema = schemaUtils.retrieveSchema(schema.items as S, items);\n const enumOptions = optionsList<T[], S, F>(itemsSchema, uiSchema);\n const { widget = 'select', title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n value={items}\n disabled={disabled}\n readonly={readonly}\n required={required}\n label={label}\n hideLabel={!displayLabel}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n /** Renders an array of files using the `FileWidget`\n */\n renderFiles() {\n const {\n schema,\n uiSchema,\n idSchema,\n name,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n onBlur,\n onFocus,\n registry,\n formData: items = [],\n rawErrors,\n } = this.props;\n const { widgets, formContext, globalUiOptions, schemaUtils } = registry;\n const { widget = 'files', title: uiTitle, ...options } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T[], S, F>(schema, widget, widgets);\n const label = uiTitle ?? schema.title ?? name;\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n return (\n <Widget\n options={options}\n id={idSchema.$id}\n name={name}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n schema={schema}\n uiSchema={uiSchema}\n value={items}\n disabled={disabled}\n readonly={readonly}\n required={required}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n label={label}\n hideLabel={!displayLabel}\n />\n );\n }\n\n /** Renders an array that has a maximum limit of items\n */\n renderFixedArray() {\n const {\n schema,\n uiSchema = {},\n formData = [],\n errorSchema,\n idPrefix,\n idSeparator = '_',\n idSchema,\n name,\n title,\n disabled = false,\n readonly = false,\n autofocus = false,\n required = false,\n registry,\n onBlur,\n onFocus,\n rawErrors,\n } = this.props;\n const { keyedFormData } = this.state;\n let { formData: items = [] } = this.props;\n const fieldTitle = schema.title || title || name;\n const uiOptions = getUiOptions<T[], S, F>(uiSchema);\n const { schemaUtils, formContext } = registry;\n const _schemaItems: S[] = isObject(schema.items) ? (schema.items as S[]) : ([] as S[]);\n const itemSchemas = _schemaItems.map((item: S, index: number) =>\n schemaUtils.retrieveSchema(item, formData[index] as unknown as T[]),\n );\n const additionalSchema = isObject(schema.additionalItems)\n ? schemaUtils.retrieveSchema(schema.additionalItems as S, formData)\n : null;\n\n if (!items || items.length < itemSchemas.length) {\n // to make sure at least all fixed items are generated\n items = items || [];\n items = items.concat(new Array(itemSchemas.length - items.length));\n }\n\n // These are the props passed into the render function\n const canAdd = this.canAddItem(items) && !!additionalSchema;\n const arrayProps: ArrayFieldTemplateProps<T[], S, F> = {\n canAdd,\n className: 'rjsf-field rjsf-field-array rjsf-field-array-fixed-items',\n disabled,\n idSchema,\n formData,\n items: keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n // While we are actually dealing with a single item of type T, the types require a T[], so cast\n const itemCast = item as unknown as T[];\n const additional = index >= itemSchemas.length;\n const itemSchema =\n (additional && isObject(schema.additionalItems)\n ? schemaUtils.retrieveSchema(schema.additionalItems as S, itemCast)\n : itemSchemas[index]) || {};\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(itemSchema, itemIdPrefix, itemCast, idPrefix, idSeparator);\n const itemUiSchema = additional\n ? uiSchema.additionalItems || {}\n : Array.isArray(uiSchema.items)\n ? uiSchema.items[index]\n : uiSchema.items || {};\n const itemErrorSchema = errorSchema ? (errorSchema[index] as ErrorSchema<T[]>) : undefined;\n\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\n title: fieldTitle ? `${fieldTitle}-${index + 1}` : undefined,\n canAdd,\n canRemove: additional,\n canMoveUp: index >= itemSchemas.length + 1,\n canMoveDown: additional && index < items.length - 1,\n itemSchema,\n itemData: itemCast,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n rawErrors,\n totalItems: keyedFormData.length,\n });\n }),\n onAddClick: this.onAddClick,\n readonly,\n required,\n registry,\n schema,\n uiSchema,\n title: fieldTitle,\n formContext,\n errorSchema,\n rawErrors,\n };\n\n const Template = getTemplate<'ArrayFieldTemplate', T[], S, F>('ArrayFieldTemplate', registry, uiOptions);\n return <Template {...arrayProps} />;\n }\n\n /** Renders the individual array item using a `SchemaField` along with the additional properties required to be send\n * back to the `ArrayFieldItemTemplate`.\n *\n * @param props - The props for the individual array item to be rendered\n */\n renderArrayFieldItem(props: {\n key: string;\n index: number;\n name: string;\n title: string | undefined;\n canAdd: boolean;\n canRemove?: boolean;\n canMoveUp: boolean;\n canMoveDown: boolean;\n itemSchema: S;\n itemData: T[];\n itemUiSchema: UiSchema<T[], S, F>;\n itemIdSchema: IdSchema<T[]>;\n itemErrorSchema?: ErrorSchema<T[]>;\n autofocus?: boolean;\n onBlur: FieldProps<T[], S, F>['onBlur'];\n onFocus: FieldProps<T[], S, F>['onFocus'];\n rawErrors?: string[];\n totalItems: number;\n }) {\n const {\n key,\n index,\n name,\n canAdd,\n canRemove = true,\n canMoveUp,\n canMoveDown,\n itemSchema,\n itemData,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus,\n onBlur,\n onFocus,\n rawErrors,\n totalItems,\n title,\n } = props;\n const { disabled, hideError, idPrefix, idSeparator, readonly, uiSchema, registry, formContext } = this.props;\n const {\n fields: { ArraySchemaField, SchemaField },\n globalUiOptions,\n } = registry;\n const ItemSchemaField = ArraySchemaField || SchemaField;\n const { orderable = true, removable = true, copyable = false } = getUiOptions<T[], S, F>(uiSchema, globalUiOptions);\n const has: { [key: string]: boolean } = {\n moveUp: orderable && canMoveUp,\n moveDown: orderable && canMoveDown,\n copy: copyable && canAdd,\n remove: removable && canRemove,\n toolbar: false,\n };\n has.toolbar = Object.keys(has).some((key: keyof typeof has) => has[key]);\n\n return {\n children: (\n <ItemSchemaField\n name={name}\n title={title}\n index={index}\n schema={itemSchema}\n uiSchema={itemUiSchema}\n formData={itemData}\n formContext={formContext}\n errorSchema={itemErrorSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n idSchema={itemIdSchema}\n required={this.isItemRequired(itemSchema)}\n onChange={this.onChangeForIndex(index)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n ),\n buttonsProps: {\n idSchema: itemIdSchema,\n disabled: disabled,\n readonly: readonly,\n canAdd,\n hasCopy: has.copy,\n hasMoveUp: has.moveUp,\n hasMoveDown: has.moveDown,\n hasRemove: has.remove,\n index: index,\n totalItems: totalItems,\n onAddIndexClick: this.onAddIndexClick,\n onCopyIndexClick: this.onCopyIndexClick,\n onDropIndexClick: this.onDropIndexClick,\n onReorderClick: this.onReorderClick,\n registry: registry,\n schema: itemSchema,\n uiSchema: itemUiSchema,\n },\n className: 'rjsf-array-item',\n disabled,\n hasToolbar: has.toolbar,\n index,\n totalItems,\n key,\n readonly,\n registry,\n schema: itemSchema,\n uiSchema: itemUiSchema,\n };\n }\n}\n\n/** `ArrayField` is `React.ComponentType<FieldProps<T[], S, F>>` (necessarily) but the `registry` requires things to be a\n * `Field` which is defined as `React.ComponentType<FieldProps<T, S, F>>`, so cast it to make `registry` happy.\n */\nexport default ArrayField;\n", "import {\n getWidget,\n getUiOptions,\n optionsList,\n FieldProps,\n FormContextType,\n EnumOptionsType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from '@rjsf/utils';\nimport isObject from 'lodash/isObject';\n\n/** The `BooleanField` component is used to render a field in the schema is boolean. It constructs `enumOptions` for the\n * two boolean values based on the various alternatives in the schema.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction BooleanField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n registry,\n required,\n disabled,\n readonly,\n hideError,\n autofocus,\n title,\n onChange,\n onFocus,\n onBlur,\n rawErrors,\n } = props;\n const { title: schemaTitle } = schema;\n const { widgets, formContext, translateString, globalUiOptions } = registry;\n const {\n widget = 'checkbox',\n title: uiTitle,\n // Unlike the other fields, don't use `getDisplayLabel()` since it always returns false for the boolean type\n label: displayLabel = true,\n enumNames,\n ...options\n } = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget(schema, widget, widgets);\n const yes = translateString(TranslatableString.YesLabel);\n const no = translateString(TranslatableString.NoLabel);\n let enumOptions: EnumOptionsType<S>[] | undefined;\n const label = uiTitle ?? schemaTitle ?? title ?? name;\n if (Array.isArray(schema.oneOf)) {\n enumOptions = optionsList<T, S, F>(\n {\n oneOf: schema.oneOf\n .map((option) => {\n if (isObject(option)) {\n return {\n ...option,\n title: option.title || (option.const === true ? yes : no),\n };\n }\n return undefined;\n })\n .filter((o: any) => o) as S[], // cast away the error that typescript can't grok is fixed\n } as unknown as S,\n uiSchema,\n );\n } else {\n const enums = schema.enum ?? [true, false];\n if (!enumNames && enums.length === 2 && enums.every((v: any) => typeof v === 'boolean')) {\n enumOptions = [\n {\n value: enums[0],\n label: enums[0] ? yes : no,\n },\n {\n value: enums[1],\n label: enums[1] ? yes : no,\n },\n ];\n } else {\n enumOptions = optionsList<T, S, F>({ enum: enums } as S, uiSchema);\n }\n }\n\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema.$id}\n name={name}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n label={label}\n hideLabel={!displayLabel}\n value={formData}\n required={required}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n}\n\nexport default BooleanField;\n", "import { ComponentType, PureComponent, ReactNode } from 'react';\nimport {\n ANY_OF_KEY,\n ErrorSchema,\n FieldProps,\n FormContextType,\n GenericObjectType,\n getDiscriminatorFieldFromSchema,\n getTemplate,\n getTestIds,\n getUiOptions,\n hashObject,\n ID_KEY,\n IdSchema,\n lookupFromFormContext,\n mergeObjects,\n ONE_OF_KEY,\n PROPERTIES_KEY,\n READONLY_KEY,\n RJSFSchema,\n Registry,\n SchemaUtilsType,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n UI_GLOBAL_OPTIONS_KEY,\n UiSchema,\n} from '@rjsf/utils';\nimport cloneDeep from 'lodash/cloneDeep';\nimport each from 'lodash/each';\nimport flatten from 'lodash/flatten';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport includes from 'lodash/includes';\nimport intersection from 'lodash/intersection';\nimport isEmpty from 'lodash/isEmpty';\nimport isFunction from 'lodash/isFunction';\nimport isEqual from 'lodash/isEqual';\nimport isObject from 'lodash/isObject';\nimport isPlainObject from 'lodash/isPlainObject';\nimport isString from 'lodash/isString';\nimport isUndefined from 'lodash/isUndefined';\nimport set from 'lodash/set';\n\n/** The enumeration of the three different Layout GridTemplate type values\n */\nexport enum GridType {\n ROW = 'ui:row',\n COLUMN = 'ui:col',\n COLUMNS = 'ui:columns',\n CONDITION = 'ui:condition',\n}\n\n/** The enumeration of the different operators within a condition\n */\nexport enum Operators {\n ALL = 'all',\n SOME = 'some',\n NONE = 'none',\n}\n\n/** Type used to represent an object that contains anything */\ntype ConfigObject = Record<string, any>;\n\nexport interface GridProps extends GenericObjectType {\n /** The optional operator to use when comparing a field's value with the expected value for `GridType.CONDITION`\n */\n operator?: Operators;\n /** The optional name of the field from which to get the value for `GridType.CONDITION`\n */\n field?: string;\n /** The optional expected value against which to compare the field's value using the `operator`\n */\n value?: unknown;\n}\n\nexport type GridSchemaType = {\n /** The limited set of props which are keyed using the `GridType` enumeration and return an object\n */\n [gridType in GridType]?: object;\n};\n\n/** The types which comprise the possibilities for the `layoutGridSchema` prop\n */\nexport type LayoutGridSchemaType = GridSchemaType | ConfigObject | string;\n\nexport interface LayoutGridFieldProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>\n extends FieldProps<T, S, F> {\n /** Optional string or object used to describe the current level of the `LayoutGridField`\n */\n layoutGridSchema?: LayoutGridSchemaType;\n}\n\n/** The regular expression that is used to detect whether a string contains a lookup key\n */\nexport const LOOKUP_REGEX = /^\\$lookup=(.+)/;\n\n/** The constant representing the main layout grid schema option name in the `uiSchema`\n */\nexport const LAYOUT_GRID_UI_OPTION = 'layoutGrid';\n\n/** The constant representing the main layout grid schema option name in the `uiSchema`\n */\nexport const LAYOUT_GRID_OPTION = `ui:${LAYOUT_GRID_UI_OPTION}`;\n\n/** Type used to return options list and whether it has a discriminator */\ntype OneOfOptionsInfoType<S extends StrictRJSFSchema = RJSFSchema> = { options: S[]; hasDiscriminator: boolean };\n\n/** Type used to represent a React-based rendering component */\ntype RenderComponent = ComponentType<any>;\n\n/** Type used to determine what are the UIComponent and props from the grid schema */\ntype UIComponentPropsType = {\n /** The name of the component */\n name: string;\n /** The render component if specified */\n UIComponent: RenderComponent | null;\n /** Any uiProps associated with the render component */\n uiProps: ConfigObject;\n /** The special case where the component is immediately rendered */\n rendered: ReactNode;\n};\n\n/** Returns either the `value` if it is non-nullish or the fallback\n *\n * @param [value] - The potential value to return if it is non-nullish\n * @param [fallback] - The fallback value to return if `value` is nullish\n * @returns - `value` if it is non-nullish otherwise `fallback`\n */\nfunction getNonNullishValue<T = unknown>(value?: T, fallback?: T): T | undefined {\n return value ?? fallback;\n}\n\n/** The `LayoutGridField` will render a schema, uiSchema and formData combination out into a GridTemplate in the shape\n * described in the uiSchema. To define the grid to use to render the elements within a field in the schema, provide in\n * the uiSchema for that field the object contained under a `ui:layoutGrid` element. E.g. (as a JSON object):\n *\n * ```\n * {\n * \"field1\" : {\n * \"ui:field\": \"LayoutGridField\",\n * \"ui:layoutGrid\": {\n * \"ui:row\": { ... }\n * }\n * }\n * }\n * ```\n *\n * The outermost level of a `LayoutGridField` is the `ui:row` that defines the nested rows, columns, and/or condition\n * elements (i.e. \"grid elements\") in the grid. This definition is either a simple \"grid elements\" OR an object with\n * native `GridTemplate` implementation specific props and a `children` array of \"grid elements\". E.g. (as JSON objects):\n *\n * Simple `ui:row` definition, without additional `GridTemplate` props:\n * ```\n * \"ui:row\": [\n * { \"ui:row\"|\"ui:col\"|\"ui:columns\"|\"ui:condition\": ... },\n * ...\n * ]\n * ```\n *\n * Complex `ui:row` definition, with additional `GridTemplate` (this example uses @mui/material/Grid2 native props):\n * ```\n * \"ui:row\": {\n * \"spacing\": 2,\n * \"size\": { md\": 4 },\n * \"alignContent\": \"flex-start\",\n * \"className\": \"GridRow\",\n * \"children\": [\n * { \"ui:row\"|\"ui:col\"|\"ui:columns\"|\"ui:condition\": ... },\n * ...\n * ]\n * }\n * ```\n *\n * NOTE: Special note about the native `className` prop values. All className values will automatically be looked up in\n * the `formContext.lookupMap` in case they have been defined using a CSS-in-JS approach. In other words, from the\n * example above, if the `Form` was constructed with a `lookupMap` set to `{ GridRow: cssInJs.GridRowClass }`\n * then when rendered, the native `GridTemplate` will get the `className` with the value from\n * `cssInJs.GridRowClass`. This automatic lookup will happen for any of the \"grid elements\" when rendering with\n * `GridTemplate` props. If multiple className values are present, for example:\n * `{ className: 'GridRow GridColumn' }`, the classNames are split apart, looked up individually, and joined\n * together to form one className with the values from `cssInJs.GridRowClass` and `cssInJs.GridColumnClass`.\n *\n * The `ui:col` grid element is used to specify the list of columns within a grid row. A `ui:col` element can take on\n * several forms: 1) a simple list of dotted-path field names within the root field; 2) a list of objects containing the\n * dotted-path field `name` any other props that are gathered into `ui:options` for the field; 3) a list with a one-off\n * `render` functional component with or without a non-field `name` identifier and any other to-be-spread props; and\n * 4) an object with native `GridTemplate` implementation specific props and a `children` array with 1) or 2) or even a\n * nested `ui:row` or a `ui:condition` containing a `ui:row` (although this should be used carefully). E.g.\n * (as JSON objects):\n *\n * Simple `ui:col` definition, without additional `GridTemplate` props and form 1 only children:\n * ```\n * \"ui:col\": [\"innerField\", \"inner.grandChild\", ...]\n * ```\n *\n * Complicated `ui:col` definition, without additional `GridTemplate` props and form 2 only children:\n * ```\n * \"ui:col\": [\n * { \"name\": \"innerField\", \"fullWidth\": true },\n * { \"name\": \"inner.grandChild\", \"convertOther\": true },\n * ...\n * ]\n * ```\n *\n * More complicated `ui:col` definition, without additional `GridTemplate` props and form 2 children, one being a\n * one-off `render` functional component without a non-field `name` identifier\n * ```\n * \"ui:col\": [\n * \"innerField\",\n * {\n * \"render\": \"WizardNavButton\",\n * \"isNext\": true,\n * \"size\": \"large\"\n * }\n * ]\n * ```\n *\n * Most complicated `ui:col` definition, additional `GridTemplate` props and form 1, 2 and 3 children (this example\n * uses @mui/material/Grid2 native props):\n * ```\n * \"ui:col\": {\n * \"size\": { \"md\": 4 },\n * \"className\": \"GridColumn\",\n * \"children\": [\n * \"innerField\",\n * { \"name\": \"inner.grandChild\", \"convertOther\": true },\n * { \"name\": \"customRender\", \"render\": \"CustomRender\", toSpread: \"prop-value\" }\n * { \"ui:row|ui:condition\": ... }\n * ...\n * ]\n * }\n * ```\n *\n * NOTE: If a `name` prop does not exist or its value does not match any field in a schema, then it is assumed to be a\n * custom `render` component. If the `render` prop does not exist, a null render will occur. If `render` is a\n * string, its value will be looked up in the `formContext.lookupMap` first before defaulting to a null render.\n *\n * The `ui:columns` grid element is syntactic sugar to specify a set of `ui:col` columns that all share the same set of\n * native `GridTemplate` props. In other words rather than writing the following configuration that renders a\n * `<GridTemplate>` element with 3 `<GridTemplate column className=\"GridColumn col-md-4\">` nodes and 2\n * `<GridTemplate column className=\"col-md-6\">` nodes within it (one for each of the fields contained in the `children`\n * list):\n *\n * ```\n * \"ui:row\": {\n * \"children\": [\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"innerField\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"inner.grandChild\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [{ \"name\": \"inner.grandChild2\" }],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"innerField2\"],\n * }\n * },\n * {\n * \"ui:col\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"inner.grandChild3\"],\n * }\n * },\n\n * ]\n * }\n * ```\n *\n * One can write this instead:\n * ```\n * \"ui:row\": {\n * \"children\": [\n * {\n * \"ui:columns\": {\n * \"className\": \"GridColumn col-md-4\",\n * \"children\": [\"innerField\", \"inner.grandChild\", { \"name\": \"inner.grandChild2\", \"convertOther\": true }],\n * }\n * },\n * {\n * \"ui:columns\": {\n * \"className\": \"col-md-6\",\n * \"children\": [\"innerField2\", \"inner.grandChild3\"],\n * }\n * }\n * ]\n * }\n * ```\n *\n * NOTE: This syntax differs from\n * `\"ui:col\": { \"className\": \"col-md-6\", \"children\": [\"innerField2\", \"inner.grandChild3\"] }` in that\n * the `ui:col` will render the two children fields inside a single `<GridTemplate \"className\": \"col-md-6\",>`\n * element.\n *\n * The final grid element, `ui:condition`, allows for conditionally displaying \"grid elements\" within a row based on the\n * current value of a field as it relates to a (list of) hard-coded value(s). There are four elements that make up a\n * `ui:condition`: 1) the dotted-path `field` name within the root field that makes up the left-side of the condition;\n * 2) the hard-coded `value` (single or list) that makes up the right-side of the condition; 3) the `operator` that\n * controls how the left and right sides of the condition are compared; and 4) the `children` array that defines the\n * \"grid elements\" to display if the condition passes.\n *\n * A `ui:condition` uses one of three `operators` when deciding if a condition passes: 1) The `all` operator will pass\n * when the right-side and left-side contains all the same value(s); 2) the `some` operator will pass when the\n * right-side and left-side contain as least one value in common; 3) the `none` operator will pass when the right-side\n * and left-side do not contain any values in common. E.g. (as JSON objects):\n *\n * Here is how to render an if-then-else for `field2` which is an enum that has 3 known values and supports allowing\n * any other value:\n * ```\n * \"ui:row\": [\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"all\",\n * \"value\": \"value1\",\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * },\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"some\",\n * \"value\": [\"value2\", \"value3\"],\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * },\n * {\n * \"ui:condition\": {\n * \"field\": \"field2\",\n * \"operator\": \"none\",\n * \"value\": [\"value1\", \"value2\", \"value3\"],\n * \"children\": [\n * { \"ui:row\": [...] },\n * ],\n * }\n * }\n * ]\n * ```\n */\nexport default class LayoutGridField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> extends PureComponent<LayoutGridFieldProps<T, S, F>> {\n static defaultProps = {\n layoutGridSchema: undefined,\n };\n\n static TEST_IDS = getTestIds();\n /** Computes the uiSchema for the field with `name` from the `uiProps` and `uiSchema` provided. The field UI Schema\n * will always contain a copy of the global options from the `uiSchema` (so they can be passed down) as well as\n * copying them into the local ui options. When the `forceReadonly` flag is true, then the field UI Schema is\n * updated to make \"readonly\" be true. When the `schemaReadonly` flag is true AND the field UI Schema does NOT have\n * the flag already provided, then we also make \"readonly\" true. We always make sure to return the final value of the\n * field UI Schema's \"readonly\" flag as `uiReadonly` along with the `fieldUiSchema` in the return value.\n *\n * @param field - The name of the field to pull the existing UI Schema for\n * @param uiProps - Any props that should be put into the field's uiSchema\n * @param [uiSchema] - The optional UI Schema from which to get the UI schema for the field\n * @param [schemaReadonly] - Optional flag indicating whether the schema indicates the field is readonly\n * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode\n */\n static computeFieldUiSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n field: string,\n uiProps: ConfigObject,\n uiSchema?: UiSchema<T, S, F>,\n schemaReadonly?: boolean,\n forceReadonly?: boolean,\n ) {\n const globalUiOptions = get(uiSchema, [UI_GLOBAL_OPTIONS_KEY], {});\n const localUiSchema = get(uiSchema, field);\n const localUiOptions = { ...get(localUiSchema, [UI_OPTIONS_KEY], {}), ...uiProps, ...globalUiOptions };\n const fieldUiSchema = { ...localUiSchema };\n if (!isEmpty(localUiOptions)) {\n set(fieldUiSchema, [UI_OPTIONS_KEY], localUiOptions);\n }\n if (!isEmpty(globalUiOptions)) {\n // pass the global uiOptions down to the field uiSchema so that they can be applied to all nested fields\n set(fieldUiSchema, [UI_GLOBAL_OPTIONS_KEY], globalUiOptions);\n }\n let { readonly: uiReadonly } = getUiOptions<T, S, F>(fieldUiSchema);\n if (forceReadonly === true || (isUndefined(uiReadonly) && schemaReadonly === true)) {\n // If we are forcing all widgets to be readonly, OR the schema indicates it is readonly AND the uiSchema does not\n // have an overriding value, then update the uiSchema to set readonly to true. Doing this will\n uiReadonly = true;\n if (has(localUiOptions, READONLY_KEY)) {\n // If the local options has the key value provided in it, then set that one to true\n set(fieldUiSchema, [UI_OPTIONS_KEY, READONLY_KEY], true);\n } else {\n // otherwise set the `ui:` version\n set(fieldUiSchema, `ui:${READONLY_KEY}`, true);\n }\n }\n return { fieldUiSchema, uiReadonly };\n }\n\n /** Given an `operator`, `datum` and `value` determines whether this condition is considered matching. Matching\n * depends on the `operator`. The `datum` and `value` are converted into arrays if they aren't already and then the\n * contents of the two arrays are compared using the `operator`. When `operator` is All, then the two arrays must be\n * equal to match. When `operator` is SOME then the intersection of the two arrays must have at least one value in\n * common to match. When `operator` is NONE then the intersection of the two arrays must not have any values in common\n * to match.\n *\n * @param [operator] - The optional operator for the condition\n * @param [datum] - The optional datum for the condition, this can be an item or a list of items of type unknown\n * @param [value='$0m3tH1nG Un3xP3cT3d'] The optional value for the condition, defaulting to a highly unlikely value\n * to avoid comparing two undefined elements when `value` was forgotten in the condition definition.\n * This can be an item or a list of items of type unknown\n * @returns - True if the condition matches, false otherwise\n */\n static conditionMatches(operator?: Operators, datum?: unknown, value: unknown = '$0m3tH1nG Un3xP3cT3d'): boolean {\n const data = flatten([datum]).sort();\n const values = flatten([value]).sort();\n switch (operator) {\n case Operators.ALL:\n return isEqual(data, values);\n case Operators.SOME:\n return intersection(data, values).length > 0;\n case Operators.NONE:\n return intersection(data, values).length === 0;\n default:\n return false;\n }\n }\n\n /** From within the `layoutGridSchema` finds the `children` and any extra `gridProps` from the object keyed by\n * `schemaKey`. If the `children` contains extra `gridProps` and those props contain a `className` string, try to\n * lookup whether that `className` has a replacement value in the `registry` using the `FORM_CONTEXT_LOOKUP_BASE`.\n * When the `className` value contains multiple classNames separated by a space, the lookup will look for a\n * replacement value for each `className` and combine them into one.\n *\n * @param layoutGridSchema - The GridSchemaType instance from which to obtain the `schemaKey` children and extra props\n * @param schemaKey - A `GridType` value, used to get the children and extra props from within the `layoutGridSchema`\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @returns - An object containing the list of `LayoutGridSchemaType` `children` and any extra `gridProps`\n * @throws - A `TypeError` when the `children` is not an array\n */\n static findChildrenAndProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n layoutGridSchema: GridSchemaType,\n schemaKey: GridType,\n registry: Registry<T, S, F>,\n ) {\n let gridProps: GridProps = {};\n let children = layoutGridSchema[schemaKey];\n if (isPlainObject(children)) {\n const { children: elements, className: toMapClassNames, ...otherProps } = children as ConfigObject;\n children = elements;\n if (toMapClassNames) {\n const classes = toMapClassNames.split(' ');\n const className = classes.map((ele: string) => lookupFromFormContext<T, S, F>(registry, ele, ele)).join(' ');\n gridProps = { ...otherProps, className };\n } else {\n gridProps = otherProps;\n }\n }\n if (!Array.isArray(children)) {\n throw new TypeError(`Expected array for \"${schemaKey}\" in ${JSON.stringify(layoutGridSchema)}`);\n }\n return { children: children as LayoutGridSchemaType[], gridProps };\n }\n\n /** Generates an idSchema for the `schema` using `@rjsf`'s `toIdSchema` util, passing the `baseIdSchema`'s `$id` value\n * as the id prefix.\n *\n * @param schemaUtils - The `SchemaUtilsType` used to call `toIdSchema`\n * @param schema - The schema to generate the idSchema for\n * @param baseIdSchema - The IdSchema for the base\n * @param formData - The formData to pass the `toIdSchema`\n * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths\n * @returns - The generated `idSchema` for the `schema`\n */\n static getIdSchema<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schemaUtils: SchemaUtilsType<T, S, F>,\n baseIdSchema: IdSchema<T>,\n formData: FieldProps['formData'],\n schema: S = {} as S,\n idSeparator?: string,\n ): FieldProps<T, S, F>['idSchema'] {\n const baseId = get(baseIdSchema, ID_KEY);\n return schemaUtils.toIdSchema(schema, baseId, formData, baseId, idSeparator);\n }\n\n /** Given a `dottedPath` to a field in the `initialSchema`, iterate through each individual path in the schema until\n * the leaf path is found and returned (along with whether that leaf path `isRequired`) OR no schema exists for an\n * element in the path. If the leaf schema element happens to be a oneOf/anyOf then also return the oneOf/anyOf as\n * `options`.\n *\n * @param schemaUtils - The `SchemaUtilsType` used to call `retrieveSchema`\n * @param dottedPath - The dotted-path to the field for which to get the schema\n * @param initialSchema - The initial schema to start the search from\n * @param formData - The formData, useful for resolving a oneOf/anyOf selection in the path hierarchy\n * @param initialIdSchema - The initial idSchema to start the search from\n * @param [idSeparator] - The param to pass into the `toIdSchema` util which will use it to join the `idSchema` paths\n * @returns - An object containing the destination schema, isRequired and isReadonly flags for the field and options\n * info if a oneOf/anyOf\n */\n static getSchemaDetailsForField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schemaUtils: SchemaUtilsType<T, S, F>,\n dottedPath: string,\n initialSchema: S,\n formData: FieldProps<T, S, F>['formData'],\n initialIdSchema: IdSchema<T>,\n idSeparator?: string,\n ): {\n schema?: S;\n isRequired: boolean;\n isReadonly?: boolean;\n optionsInfo?: OneOfOptionsInfoType<S>;\n idSchema: IdSchema<T>;\n } {\n let rawSchema: S = initialSchema;\n let idSchema = initialIdSchema;\n const parts: string[] = dottedPath.split('.');\n const leafPath: string | undefined = parts.pop(); // pop off the last element in the list as the leaf\n let schema: S | undefined = schemaUtils.retrieveSchema(rawSchema, formData); // always returns an object\n let innerData = formData;\n let isReadonly: boolean | undefined = schema.readOnly;\n\n // For all the remaining path parts\n parts.forEach((part) => {\n // dive into the properties of the current schema (when it exists) and get the schema for the next part\n if (has(schema, PROPERTIES_KEY)) {\n rawSchema = get(schema, [PROPERTIES_KEY, part], {}) as S;\n idSchema = get(idSchema, part, {}) as IdSchema<T>;\n } else if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // When the schema represents a oneOf/anyOf, find the selected schema for it and grab the inner part\n const selectedSchema = schemaUtils.findSelectedOptionInXxxOf(schema, part, xxx, innerData);\n const selectedIdSchema = LayoutGridField.getIdSchema<T, S, F>(\n schemaUtils,\n idSchema,\n formData,\n selectedSchema,\n idSeparator,\n );\n rawSchema = get(selectedSchema, [PROPERTIES_KEY, part], {}) as S;\n idSchema = get(selectedIdSchema, part, {}) as IdSchema<T>;\n } else {\n rawSchema = {} as S;\n }\n // Now drill into the innerData for the part, returning an empty object by default if it doesn't exist\n innerData = get(innerData, part, {}) as T;\n // Resolve any `$ref`s for the current rawSchema\n schema = schemaUtils.retrieveSchema(rawSchema, innerData);\n isReadonly = getNonNullishValue(schema.readOnly, isReadonly);\n });\n\n let optionsInfo: OneOfOptionsInfoType<S> | undefined;\n let isRequired = false;\n // retrieveSchema will return an empty schema in the worst case scenario, convert it to undefined\n if (isEmpty(schema)) {\n schema = undefined;\n }\n if (schema && leafPath) {\n // When we have both a schema and a leafPath...\n if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // Grab the selected schema for the oneOf/anyOf value for the leafPath using the innerData\n schema = schemaUtils.findSelectedOptionInXxxOf(schema, leafPath, xxx, innerData);\n // Generate the idSchema for the oneOf/anyOf value then merge with the existing `idSchema`\n const rawIdSchema = LayoutGridField.getIdSchema<T, S, F>(schemaUtils, idSchema, formData, schema, idSeparator);\n idSchema = mergeObjects(rawIdSchema, idSchema) as IdSchema<T>;\n }\n isRequired = schema !== undefined && Array.isArray(schema.required) && includes(schema.required, leafPath);\n // Now grab the schema from the leafPath of the current schema properties\n schema = get(schema, [PROPERTIES_KEY, leafPath]) as S | undefined;\n // Resolve any `$ref`s for the current schema\n schema = schema ? schemaUtils.retrieveSchema(schema) : schema;\n idSchema = get(idSchema, leafPath, {}) as IdSchema<T>;\n isReadonly = getNonNullishValue(schema?.readOnly, isReadonly);\n if (schema && (has(schema, ONE_OF_KEY) || has(schema, ANY_OF_KEY))) {\n const xxx = has(schema, ONE_OF_KEY) ? ONE_OF_KEY : ANY_OF_KEY;\n // Set the options if we have a schema with a oneOf/anyOf\n const discriminator = getDiscriminatorFieldFromSchema(schema);\n optionsInfo = { options: schema[xxx] as S[], hasDiscriminator: !!discriminator };\n }\n }\n\n return { schema, isRequired, isReadonly, optionsInfo, idSchema };\n }\n\n /** Gets the custom render component from the `render`, by either determining that it is either already a function or\n * it is a non-function value that can be used to look up the function in the registry. If no function can be found,\n * null is returned.\n *\n * @param render - The potential render function or lookup name to one\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @returns - Either a render function if available, or null if not\n */\n static getCustomRenderComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n render: string | RenderComponent,\n registry: Registry<T, S, F>,\n ): RenderComponent | null {\n let customRenderer = render;\n if (isString(customRenderer)) {\n customRenderer = lookupFromFormContext<T, S, F>(registry, customRenderer);\n }\n if (isFunction(customRenderer)) {\n return customRenderer;\n }\n return null;\n }\n\n /** Extract the `name`, and optional `render` and all other props from the `gridSchema`. We look up the `render` to\n * see if can be resolved to a UIComponent. If `name` does not exist and there is an optional `render` UIComponent, we\n * set the `rendered` component with only specified props for that component in the object.\n *\n * @param registry - The `@rjsf` Registry from which to look up `classNames` if they are present in the extra props\n * @param gridSchema - The string or object that represents the configuration for the grid field\n * @returns - The UIComponentPropsType computed from the gridSchema\n */\n static computeUIComponentPropsFromGridSchema<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n >(registry: Registry<T, S, F>, gridSchema?: string | ConfigObject): UIComponentPropsType {\n let name: string;\n let UIComponent: RenderComponent | null = null;\n let uiProps: ConfigObject = {};\n let rendered: ReactNode | undefined;\n if (isString(gridSchema) || isUndefined(gridSchema)) {\n name = gridSchema ?? '';\n } else {\n const { name: innerName = '', render, ...innerProps } = gridSchema;\n name = innerName;\n uiProps = innerProps;\n if (!isEmpty(uiProps)) {\n // Transform any `$lookup=` in the uiProps props with the appropriate value\n each(uiProps, (prop: ConfigObject, key: string) => {\n if (isString(prop)) {\n const match: string[] | null = LOOKUP_REGEX.exec(prop);\n if (Array.isArray(match) && match.length > 1) {\n const name = match[1];\n uiProps[key] = lookupFromFormContext(registry, name, name);\n }\n }\n });\n }\n UIComponent = LayoutGridField.getCustomRenderComponent<T, S, F>(render, registry);\n if (!innerName && UIComponent) {\n rendered = <UIComponent {...innerProps} data-testid={LayoutGridField.TEST_IDS.uiComponent} />;\n }\n }\n return { name, UIComponent, uiProps, rendered };\n }\n\n /** Constructs an `LayoutGridField` with the given `props`\n *\n * @param props - The `LayoutGridField` for this template\n */\n constructor(props: LayoutGridFieldProps<T, S, F>) {\n super(props);\n }\n\n /** Generates an `onChange` handler for the field associated with the `dottedPath`. This handler will clone and update\n * the `formData` with the new `value` and the `errorSchema` if an `errSchema` is provided. After updating those two\n * elements, they will then be passed on to the `onChange` handler of the `LayoutFieldGrid`.\n *\n * @param dottedPath - The dotted-path to the field for which to generate the onChange handler\n * @returns - The `onChange` handling function for the `dottedPath` field\n */\n onFieldChange = (dottedPath: string) => {\n return (value: unknown, errSchema?: ErrorSchema<T>, id?: string) => {\n const { onChange, errorSchema, formData } = this.props;\n const newFormData = cloneDeep(formData || ({} as T));\n let newErrorSchema = errorSchema;\n if (errSchema && errorSchema) {\n newErrorSchema = cloneDeep(errorSchema);\n set(newErrorSchema, dottedPath, errSchema);\n }\n set(newFormData as object, dottedPath, value);\n onChange(newFormData, newErrorSchema, id);\n };\n };\n\n /** Renders the `children` of the `GridType.CONDITION` if it passes. The `layoutGridSchema` for the\n * `GridType.CONDITION` is separated into the `children` and other `gridProps`. The `gridProps` are used to extract\n * the `operator`, `field` and `value` of the condition. If the condition matches, then all of the `children` are\n * rendered, otherwise null is returned.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered the children for the `GridType.CONDITION` or null\n */\n renderCondition(layoutGridSchema: GridSchemaType) {\n const { formData, registry } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.CONDITION,\n registry,\n );\n const { operator, field = '', value } = gridProps;\n const fieldData = get(formData, field, null);\n if (LayoutGridField.conditionMatches(operator, fieldData, value)) {\n return this.renderChildren(children);\n }\n return null;\n }\n\n /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMN` is separated\n * into the `children` and other `gridProps`. The `gridProps` will be spread onto the outer `GridTemplate`. Inside\n * the `GridTemplate` all the `children` are rendered.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMN`\n */\n renderCol(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.COLUMN,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return (\n <GridTemplate column data-testid={LayoutGridField.TEST_IDS.col} {...gridProps}>\n {this.renderChildren(children)}\n </GridTemplate>\n );\n }\n\n /** Renders a material-ui `GridTemplate` as an item. The `layoutGridSchema` for the `GridType.COLUMNS` is separated\n * into the `children` and other `gridProps`. The `children` is iterated on and `gridProps` will be spread onto the\n * outer `GridTemplate`. Each child will have their own rendered `GridTemplate`.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.COLUMNS`\n */\n renderColumns(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.COLUMNS,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return children.map((child) => (\n <GridTemplate\n column\n key={`column-${hashObject(child)}`}\n data-testid={LayoutGridField.TEST_IDS.col}\n {...gridProps}\n >\n {this.renderChildren([child])}\n </GridTemplate>\n ));\n }\n\n /** Renders a material-ui `GridTemplate` as a container. The\n * `layoutGridSchema` for the `GridType.ROW` is separated into the `children` and other `gridProps`. The `gridProps`\n * will be spread onto the outer `GridTemplate`. Inside of the `GridTemplate` all of the `children` are rendered.\n *\n * @param layoutGridSchema - The string or object that represents the configuration for the grid field\n * @returns - The rendered `GridTemplate` containing the children for the `GridType.ROW`\n */\n renderRow(layoutGridSchema: GridSchemaType) {\n const { registry, uiSchema } = this.props;\n const { children, gridProps } = LayoutGridField.findChildrenAndProps<T, S, F>(\n layoutGridSchema,\n GridType.ROW,\n registry,\n );\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const GridTemplate = getTemplate<'GridTemplate', T, S, F>('GridTemplate', registry, uiOptions);\n\n return (\n <GridTemplate {...gridProps} data-testid={LayoutGridField.TEST_IDS.row}>\n {this.renderChildren(children)}\n </GridTemplate>\n );\n }\n\n /** Iterates through all the `childrenLayoutGridSchema`, rendering a nested `LayoutGridField` for each item in the\n * list, passing all the props for the current `LayoutGridField` along, updating the `schema` by calling\n * `retrieveSchema()` on it to resolve any `$ref`s. In addition to the updated `schema`, each item in\n * `childrenLayoutGridSchema` is passed as `layoutGridSchema`.\n *\n * @param childrenLayoutGridSchema - The list of strings or objects that represents the configurations for the\n * children fields\n * @returns - The nested `LayoutGridField`s\n */\n renderChildren(childrenLayoutGridSchema: LayoutGridSchemaType[]) {\n const { registry, schema: rawSchema, formData } = this.props;\n const { schemaUtils } = registry;\n const schema = schemaUtils.retrieveSchema(rawSchema, formData);\n\n return childrenLayoutGridSchema.map((layoutGridSchema) => (\n <LayoutGridField<T, S, F>\n {...this.props}\n key={`layoutGrid-${hashObject(layoutGridSchema)}`}\n schema={schema}\n layoutGridSchema={layoutGridSchema}\n />\n ));\n }\n\n /** Renders the field described by `gridSchema`. If `gridSchema` is not an object, then is will be assumed\n * to be the dotted-path to the field in the schema. Otherwise, we extract the `name`, and optional `render` and all\n * other props. If `name` does not exist and there is an optional `render`, we return the `render` component with only\n * specified props for that component. If `name` exists, we take the name, the initial & root schemas and the formData\n * and get the destination schema, is required state and optional oneOf/anyOf options for it. If the destination\n * schema was located along with oneOf/anyOf options then a `LayoutMultiSchemaField` will be rendered with the\n * `uiSchema`, `errorSchema`, `idSchema` and `formData` drilled down to the dotted-path field, spreading any other\n * props from `gridSchema` into the `ui:options`. If the destination schema located without any oneOf/anyOf options,\n * then a `SchemaField` will be rendered with the same props as mentioned in the previous sentence. If no destination\n * schema was located, but a custom render component was found, then it will be rendered with many of the non-event\n * handling props. If none of the previous render paths are valid, then a null is returned.\n *\n * @param gridSchema - The string or object that represents the configuration for the grid field\n * @returns - One of `LayoutMultiSchemaField`, `SchemaField`, a custom render component or null, depending\n */\n renderField(gridSchema?: ConfigObject | string) {\n const {\n schema: initialSchema,\n uiSchema,\n errorSchema,\n idSchema,\n onBlur,\n onFocus,\n formData,\n readonly,\n registry,\n idSeparator,\n layoutGridSchema, // Used to pull this out of otherProps since we don't want to pass it through\n ...otherProps\n } = this.props;\n const { fields, schemaUtils } = registry;\n const { SchemaField, LayoutMultiSchemaField } = fields;\n const uiComponentProps = LayoutGridField.computeUIComponentPropsFromGridSchema(registry, gridSchema);\n if (uiComponentProps.rendered) {\n return uiComponentProps.rendered;\n }\n const { name, UIComponent, uiProps } = uiComponentProps;\n const {\n schema,\n isRequired,\n isReadonly,\n optionsInfo,\n idSchema: fieldIdSchema,\n } = LayoutGridField.getSchemaDetailsForField<T, S, F>(\n schemaUtils,\n name,\n initialSchema,\n formData,\n idSchema,\n idSeparator,\n );\n\n if (schema) {\n const Field = optionsInfo?.hasDiscriminator ? LayoutMultiSchemaField : SchemaField;\n // Call this function to get the appropriate UISchema, which will always have its `readonly` state matching the\n // `uiReadonly` flag that it returns. This is done since the `SchemaField` will always defer to the `readonly`\n // state in the uiSchema over anything in the props or schema. Because we are implementing the \"readonly\" state of\n // the `Form` via the prop passed to `LayoutGridField` we need to make sure the uiSchema always has a true value\n // when it is needed\n const { fieldUiSchema, uiReadonly } = LayoutGridField.computeFieldUiSchema<T, S, F>(\n name,\n uiProps,\n uiSchema,\n isReadonly,\n readonly,\n );\n\n return (\n <Field\n data-testid={\n optionsInfo?.hasDiscriminator\n ? LayoutGridField.TEST_IDS.layoutMultiSchemaField\n : LayoutGridField.TEST_IDS.field\n }\n {...otherProps}\n name={name}\n required={isRequired}\n readonly={uiReadonly}\n schema={schema}\n uiSchema={fieldUiSchema}\n errorSchema={get(errorSchema, name)}\n idSchema={fieldIdSchema}\n idSeparator={idSeparator}\n formData={get(formData, name)}\n onChange={this.onFieldChange(name)}\n onBlur={onBlur}\n onFocus={onFocus}\n options={optionsInfo?.options}\n registry={registry}\n />\n );\n }\n\n if (UIComponent) {\n return (\n <UIComponent\n data-testid={LayoutGridField.TEST_IDS.uiComponent}\n {...otherProps}\n name={name}\n required={isRequired}\n formData={formData}\n readOnly={!!isReadonly || readonly}\n errorSchema={errorSchema}\n uiSchema={uiSchema}\n schema={initialSchema}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n {...uiProps}\n />\n );\n }\n return null;\n }\n\n /** Renders the `LayoutGridField`. If there isn't a `layoutGridSchema` prop defined, then try pulling it out of the\n * `uiSchema` via `ui:LayoutGridField`. If `layoutGridSchema` is an object, then check to see if any of the properties\n * match one of the `GridType`s. If so, call the appropriate render function for the type. Otherwise, just call the\n * generic `renderField()` function with the `layoutGridSchema`.\n *\n * @returns - the rendered `LayoutGridField`\n */\n render() {\n const { uiSchema } = this.props;\n let { layoutGridSchema } = this.props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n if (!layoutGridSchema && LAYOUT_GRID_UI_OPTION in uiOptions && isObject(uiOptions[LAYOUT_GRID_UI_OPTION])) {\n layoutGridSchema = uiOptions[LAYOUT_GRID_UI_OPTION];\n }\n\n if (isObject(layoutGridSchema)) {\n if (GridType.ROW in layoutGridSchema) {\n return this.renderRow(layoutGridSchema as GridSchemaType);\n }\n if (GridType.COLUMN in layoutGridSchema) {\n return this.renderCol(layoutGridSchema as GridSchemaType);\n }\n if (GridType.COLUMNS in layoutGridSchema) {\n return this.renderColumns(layoutGridSchema as GridSchemaType);\n }\n if (GridType.CONDITION in layoutGridSchema) {\n return this.renderCondition(layoutGridSchema as GridSchemaType);\n }\n }\n return this.renderField(layoutGridSchema);\n }\n}\n", "import {\n getTemplate,\n getUiOptions,\n titleId,\n FieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from '@rjsf/utils';\n\n/** The `LayoutHeaderField` component renders a `TitleFieldTemplate` with an `id` derived from the `idSchema`\n * and whether it is `required` from the props. The `title` is derived from the props as follows:\n * - If there is a title in the `uiSchema`, it is displayed\n * - Else, if there is an explicit `title` passed in the props, it is displayed\n * - Otherwise, if there is a title in the `schema`, it is displayed\n * - Finally, the `name` prop is displayed as the title\n *\n * @param props - The `LayoutHeaderField` for the component\n */\nexport default function LayoutHeaderField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldProps<T, S, F>) {\n const { idSchema, title, schema, uiSchema, required, registry, name } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { title: uiTitle } = options;\n const { title: schemaTitle } = schema;\n const fieldTitle = uiTitle || title || schemaTitle || name;\n if (!fieldTitle) {\n return null;\n }\n const TitleFieldTemplate: TemplatesType<T, S, F>['TitleFieldTemplate'] = getTemplate<'TitleFieldTemplate', T, S, F>(\n 'TitleFieldTemplate',\n registry,\n options,\n );\n return (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={fieldTitle}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { useState, useEffect } from 'react';\nimport {\n ANY_OF_KEY,\n CONST_KEY,\n DEFAULT_KEY,\n EnumOptionsType,\n ERRORS_KEY,\n FieldProps,\n FormContextType,\n getDiscriminatorFieldFromSchema,\n hashObject,\n ID_KEY,\n ONE_OF_KEY,\n optionsList,\n PROPERTIES_KEY,\n RJSFSchema,\n getTemplate,\n getUiOptions,\n getWidget,\n SchemaUtilsType,\n StrictRJSFSchema,\n UiSchema,\n} from '@rjsf/utils';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport isEmpty from 'lodash/isEmpty';\nimport noop from 'lodash/noop';\nimport omit from 'lodash/omit';\nimport set from 'lodash/set';\n\n/** Gets the selected option from the list of `options`, using the `selectorField` to search inside each `option` for\n * the `properties[selectorField].default(or const)` that matches the given `value`.\n *\n * @param options - The list of schemas each representing a choice in the `oneOf`\n * @param selectorField - The name of the field that is common in all of the schemas that represents the selector field\n * @param value - The current value of the selector field from the data\n */\nexport function getSelectedOption<S extends StrictRJSFSchema = RJSFSchema>(\n options: EnumOptionsType<S>[],\n selectorField: string,\n value: unknown,\n): S | undefined {\n const defaultValue = '!@#!@$@#$!@$#';\n const schemaOptions: S[] = options.map(({ schema }) => schema!);\n return schemaOptions.find((option) => {\n const selector = get(option, [PROPERTIES_KEY, selectorField]);\n const result = get(selector, DEFAULT_KEY, get(selector, CONST_KEY, defaultValue));\n return result === value;\n });\n}\n\n/** Computes the `enumOptions` array from the schema and options.\n *\n * @param schema - The schema that contains the `options`\n * @param options - The options from the `schema`\n * @param schemaUtils - The SchemaUtilsType object used to call retrieveSchema,\n * @param [uiSchema] - The optional uiSchema for the schema\n * @param [formData] - The optional formData associated with the schema\n * @returns - The list of enumOptions for the `schema` and `options`\n * @throws - Error when no enum options were computed\n */\nexport function computeEnumOptions<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schema: S,\n options: S[],\n schemaUtils: SchemaUtilsType<T, S, F>,\n uiSchema?: UiSchema<T, S, F>,\n formData?: T,\n): EnumOptionsType<S>[] {\n const realOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n let tempSchema = schema;\n if (has(schema, ONE_OF_KEY)) {\n tempSchema = { ...schema, [ONE_OF_KEY]: realOptions };\n } else if (has(schema, ANY_OF_KEY)) {\n tempSchema = { ...schema, [ANY_OF_KEY]: realOptions };\n }\n const enumOptions = optionsList<T, S, F>(tempSchema, uiSchema);\n if (!enumOptions) {\n throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(tempSchema)}`);\n }\n return enumOptions;\n}\n\n/** The `LayoutMultiSchemaField` is an adaptation of the `MultiSchemaField` but changed considerably to only\n * support `anyOf`/`oneOf` fields that are being displayed in a `LayoutGridField` where the field selection is shown as\n * a radio group by default. It expects that a `selectorField` is provided (either directly via the `discriminator`\n * field or indirectly via `ui:optionsSchemaSelector` in the `uiSchema`) to help determine which `anyOf`/`oneOf` schema\n * is active. If no `selectorField` is specified, then an error is thrown.\n */\nexport default function LayoutMultiSchemaField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldProps<T, S, F>) {\n const {\n name,\n baseType,\n disabled = false,\n formData,\n idSchema,\n onBlur,\n onChange,\n options,\n onFocus,\n registry,\n uiSchema,\n schema,\n formContext,\n autofocus,\n readonly,\n required,\n errorSchema,\n hideError = false,\n } = props;\n const { widgets, schemaUtils, globalUiOptions } = registry;\n const [enumOptions, setEnumOptions] = useState(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData)!);\n const id = get(idSchema, ID_KEY);\n const discriminator = getDiscriminatorFieldFromSchema(schema);\n const FieldErrorTemplate = getTemplate<'FieldErrorTemplate', T, S, F>('FieldErrorTemplate', registry, options);\n const FieldTemplate = getTemplate<'FieldTemplate', T, S, F>('FieldTemplate', registry, options);\n const schemaHash = hashObject(schema);\n const optionsHash = hashObject(options);\n const uiSchemaHash = uiSchema ? hashObject(uiSchema) : '';\n const formDataHash = formData ? hashObject(formData) : '';\n\n useEffect(() => {\n setEnumOptions(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));\n // We are using hashes in place of the dependencies\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [schemaHash, optionsHash, schemaUtils, uiSchemaHash, formDataHash]);\n const {\n widget = discriminator ? 'radio' : 'select',\n title = '',\n placeholder = '',\n optionsSchemaSelector: selectorField = discriminator,\n hideError: uiSchemaHideError,\n ...uiOptions\n } = getUiOptions<T, S, F>(uiSchema);\n if (!selectorField) {\n throw new Error('No selector field provided for the LayoutMultiSchemaField');\n }\n const selectedOption = get(formData, selectorField);\n let optionSchema: S = get(enumOptions[0]?.schema, [PROPERTIES_KEY, selectorField], {}) as S;\n const option = getSelectedOption<S>(enumOptions, selectorField, selectedOption);\n // If the subschema doesn't declare a type, infer the type from the parent schema\n optionSchema = optionSchema?.type ? optionSchema : ({ ...optionSchema, type: option?.type || baseType } as S);\n const Widget = getWidget<T, S, F>(optionSchema!, widget, widgets);\n\n // The following code was copied from `@rjsf`'s `SchemaField`\n // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n const hideFieldError = uiSchemaHideError === undefined ? hideError : Boolean(uiSchemaHideError);\n\n const rawErrors = get(errorSchema, [ERRORS_KEY], []) as string[];\n const fieldErrorSchema = omit(errorSchema, [ERRORS_KEY]);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n /** Callback function that updates the selected option and adjusts the form data based on the structure of the new\n * option, calling the `onChange` callback with the adjusted formData.\n *\n * @param opt - If the option is undefined, we are going to clear the selection otherwise we\n * will use it as the index of the new option to select\n */\n const onOptionChange = (opt?: unknown) => {\n const newOption = getSelectedOption<S>(enumOptions, selectorField, opt);\n const oldOption = getSelectedOption<S>(enumOptions, selectorField, selectedOption);\n\n let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);\n if (newFormData && newOption) {\n // Call getDefaultFormState to make sure defaults are populated on change.\n newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, 'excludeObjectChildren') as T;\n }\n if (newFormData) {\n set(newFormData, selectorField, opt);\n }\n onChange(newFormData, undefined, id);\n };\n\n // filtering the options based on the type of widget because `selectField` does not recognize the `convertOther` prop\n const widgetOptions = { enumOptions, ...uiOptions };\n const errors =\n !hideFieldError && rawErrors.length > 0 ? (\n <FieldErrorTemplate idSchema={idSchema} schema={schema} errors={rawErrors} registry={registry} />\n ) : undefined;\n const ignored = (value: string) => noop;\n\n return (\n <FieldTemplate\n id={id}\n schema={schema}\n label={(title || schema.title) ?? ''}\n disabled={disabled || (Array.isArray(enumOptions) && isEmpty(enumOptions))}\n uiSchema={uiSchema}\n formContext={formContext}\n required={required}\n readonly={!!readonly}\n registry={registry}\n displayLabel={displayLabel}\n errors={errors}\n onChange={onChange}\n onDropPropertyClick={ignored}\n onKeyChange={ignored}\n >\n <Widget\n id={id}\n name={name}\n schema={schema}\n label={(title || schema.title) ?? ''}\n disabled={disabled || (Array.isArray(enumOptions) && isEmpty(enumOptions))}\n uiSchema={uiSchema}\n formContext={formContext}\n autofocus={autofocus}\n readonly={readonly}\n required={required}\n registry={registry}\n multiple={false}\n rawErrors={rawErrors}\n hideError={hideFieldError}\n hideLabel={!displayLabel}\n errorSchema={fieldErrorSchema}\n placeholder={placeholder}\n onChange={onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n value={selectedOption}\n options={widgetOptions}\n />\n </FieldTemplate>\n );\n}\n", "import { Component } from 'react';\nimport get from 'lodash/get';\nimport isEmpty from 'lodash/isEmpty';\nimport omit from 'lodash/omit';\nimport {\n ANY_OF_KEY,\n deepEquals,\n ERRORS_KEY,\n FieldProps,\n FormContextType,\n getDiscriminatorFieldFromSchema,\n getUiOptions,\n getWidget,\n mergeSchemas,\n ONE_OF_KEY,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UiSchema,\n} from '@rjsf/utils';\n\n/** Type used for the state of the `AnyOfField` component */\ntype AnyOfFieldState<S extends StrictRJSFSchema = RJSFSchema> = {\n /** The currently selected option */\n selectedOption: number;\n /** The option schemas after retrieving all $refs */\n retrievedOptions: S[];\n};\n\n/** The `AnyOfField` component is used to render a field in the schema that is an `anyOf`, `allOf` or `oneOf`. It tracks\n * the currently selected option and cleans up any irrelevant data in `formData`.\n *\n * @param props - The `FieldProps` for this template\n */\nclass AnyOfField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>,\n AnyOfFieldState<S>\n> {\n /** Constructs an `AnyOfField` with the given `props` to initialize the initially selected option in state\n *\n * @param props - The `FieldProps` for this template\n */\n constructor(props: FieldProps<T, S, F>) {\n super(props);\n\n const {\n formData,\n options,\n registry: { schemaUtils },\n } = this.props;\n // cache the retrieved options in state in case they have $refs to save doing it later\n const retrievedOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n\n this.state = {\n retrievedOptions,\n selectedOption: this.getMatchingOption(0, formData, retrievedOptions),\n };\n }\n\n /** React lifecycle method that is called when the props and/or state for this component is updated. It recomputes the\n * currently selected option based on the overall `formData`\n *\n * @param prevProps - The previous `FieldProps` for this template\n * @param prevState - The previous `AnyOfFieldState` for this template\n */\n componentDidUpdate(prevProps: Readonly<FieldProps<T, S, F>>, prevState: Readonly<AnyOfFieldState>) {\n const { formData, options, idSchema } = this.props;\n const { selectedOption } = this.state;\n let newState = this.state;\n if (!deepEquals(prevProps.options, options)) {\n const {\n registry: { schemaUtils },\n } = this.props;\n // re-cache the retrieved options in state in case they have $refs to save doing it later\n const retrievedOptions = options.map((opt: S) => schemaUtils.retrieveSchema(opt, formData));\n newState = { selectedOption, retrievedOptions };\n }\n if (!deepEquals(formData, prevProps.formData) && idSchema.$id === prevProps.idSchema.$id) {\n const { retrievedOptions } = newState;\n const matchingOption = this.getMatchingOption(selectedOption, formData, retrievedOptions);\n\n if (prevState && matchingOption !== selectedOption) {\n newState = { selectedOption: matchingOption, retrievedOptions };\n }\n }\n if (newState !== this.state) {\n this.setState(newState);\n }\n }\n\n /** Determines the best matching option for the given `formData` and `options`.\n *\n * @param formData - The new formData\n * @param options - The list of options to choose from\n * @return - The index of the `option` that best matches the `formData`\n */\n getMatchingOption(selectedOption: number, formData: T | undefined, options: S[]) {\n const {\n schema,\n registry: { schemaUtils },\n } = this.props;\n\n const discriminator = getDiscriminatorFieldFromSchema<S>(schema);\n const option = schemaUtils.getClosestMatchingOption(formData, options, selectedOption, discriminator);\n return option;\n }\n\n /** Callback handler to remember what the currently selected option is. In addition to that the `formData` is updated\n * to remove properties that are not part of the newly selected option schema, and then the updated data is passed to\n * the `onChange` handler.\n *\n * @param option - The new option value being selected\n */\n onOptionChange = (option?: string) => {\n const { selectedOption, retrievedOptions } = this.state;\n const { formData, onChange, registry } = this.props;\n const { schemaUtils } = registry;\n const intOption = option !== undefined ? parseInt(option, 10) : -1;\n if (intOption === selectedOption) {\n return;\n }\n const newOption = intOption >= 0 ? retrievedOptions[intOption] : undefined;\n const oldOption = selectedOption >= 0 ? retrievedOptions[selectedOption] : undefined;\n\n let newFormData = schemaUtils.sanitizeDataForNewSchema(newOption, oldOption, formData);\n if (newOption) {\n // Call getDefaultFormState to make sure defaults are populated on change. Pass \"excludeObjectChildren\"\n // so that only the root objects themselves are created without adding undefined children properties\n newFormData = schemaUtils.getDefaultFormState(newOption, newFormData, 'excludeObjectChildren') as T;\n }\n\n this.setState({ selectedOption: intOption }, () => {\n onChange(newFormData, undefined, this.getFieldId());\n });\n };\n\n getFieldId() {\n const { idSchema, schema } = this.props;\n return `${idSchema.$id}${schema.oneOf ? '__oneof_select' : '__anyof_select'}`;\n }\n\n /** Renders the `AnyOfField` selector along with a `SchemaField` for the value of the `formData`\n */\n render() {\n const {\n name,\n disabled = false,\n errorSchema = {},\n formContext,\n onBlur,\n onFocus,\n readonly,\n registry,\n schema,\n uiSchema,\n } = this.props;\n\n const { widgets, fields, translateString, globalUiOptions, schemaUtils } = registry;\n const { SchemaField: _SchemaField } = fields;\n const { selectedOption, retrievedOptions } = this.state;\n const {\n widget = 'select',\n placeholder,\n autofocus,\n autocomplete,\n title = schema.title,\n ...uiOptions\n } = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const Widget = getWidget<T, S, F>({ type: 'number' }, widget, widgets);\n const rawErrors = get(errorSchema, ERRORS_KEY, []);\n const fieldErrorSchema = omit(errorSchema, [ERRORS_KEY]);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n const option = selectedOption >= 0 ? retrievedOptions[selectedOption] || null : null;\n let optionSchema: S | undefined | null;\n\n if (option) {\n // merge top level required field\n const { required } = schema;\n // Merge in all the non-oneOf/anyOf properties and also skip the special ADDITIONAL_PROPERTY_FLAG property\n optionSchema = required ? (mergeSchemas({ required }, option) as S) : option;\n }\n\n // First we will check to see if there is an anyOf/oneOf override for the UI schema\n let optionsUiSchema: UiSchema<T, S, F>[] = [];\n if (ONE_OF_KEY in schema && uiSchema && ONE_OF_KEY in uiSchema) {\n if (Array.isArray(uiSchema[ONE_OF_KEY])) {\n optionsUiSchema = uiSchema[ONE_OF_KEY];\n } else {\n console.warn(`uiSchema.oneOf is not an array for \"${title || name}\"`);\n }\n } else if (ANY_OF_KEY in schema && uiSchema && ANY_OF_KEY in uiSchema) {\n if (Array.isArray(uiSchema[ANY_OF_KEY])) {\n optionsUiSchema = uiSchema[ANY_OF_KEY];\n } else {\n console.warn(`uiSchema.anyOf is not an array for \"${title || name}\"`);\n }\n }\n // Then we pick the one that matches the selected option index, if one exists otherwise default to the main uiSchema\n let optionUiSchema = uiSchema;\n if (selectedOption >= 0 && optionsUiSchema.length > selectedOption) {\n optionUiSchema = optionsUiSchema[selectedOption];\n }\n\n const translateEnum: TranslatableString = title\n ? TranslatableString.TitleOptionPrefix\n : TranslatableString.OptionPrefix;\n const translateParams = title ? [title] : [];\n const enumOptions = retrievedOptions.map((opt: { title?: string }, index: number) => {\n // Also see if there is an override title in the uiSchema for each option, otherwise use the title from the option\n const { title: uiTitle = opt.title } = getUiOptions<T, S, F>(optionsUiSchema[index]);\n return {\n label: uiTitle || translateString(translateEnum, translateParams.concat(String(index + 1))),\n value: index,\n };\n });\n\n return (\n <div className='panel panel-default panel-body'>\n <div className='form-group'>\n <Widget\n id={this.getFieldId()}\n name={`${name}${schema.oneOf ? '__oneof_select' : '__anyof_select'}`}\n schema={{ type: 'number', default: 0 } as S}\n onChange={this.onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n disabled={disabled || isEmpty(enumOptions)}\n multiple={false}\n rawErrors={rawErrors}\n errorSchema={fieldErrorSchema}\n value={selectedOption >= 0 ? selectedOption : undefined}\n options={{ enumOptions, ...uiOptions }}\n registry={registry}\n formContext={formContext}\n placeholder={placeholder}\n autocomplete={autocomplete}\n autofocus={autofocus}\n label={title ?? name}\n hideLabel={!displayLabel}\n readonly={readonly}\n />\n </div>\n {optionSchema && optionSchema.type !== 'null' && (\n <_SchemaField {...this.props} schema={optionSchema} uiSchema={optionUiSchema} />\n )}\n </div>\n );\n }\n}\n\nexport default AnyOfField;\n", "import { useState, useCallback } from 'react';\nimport { asNumber, ErrorSchema, FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n// Matches a string that ends in a . character, optionally followed by a sequence of\n// digits followed by any number of 0 characters up until the end of the line.\n// Ensuring that there is at least one prefixed character is important so that\n// you don't incorrectly match against \"0\".\nconst trailingCharMatcherWithPrefix = /\\.([0-9]*0)*$/;\n\n// This is used for trimming the trailing 0 and . characters without affecting\n// the rest of the string. Its possible to use one RegEx with groups for this\n// functionality, but it is fairly complex compared to simply defining two\n// different matchers.\nconst trailingCharMatcher = /[0.]0*$/;\n\n/**\n * The NumberField class has some special handling for dealing with trailing\n * decimal points and/or zeroes. This logic is designed to allow trailing values\n * to be visible in the input element, but not be represented in the\n * corresponding form data.\n *\n * The algorithm is as follows:\n *\n * 1. When the input value changes the value is cached in the component state\n *\n * 2. The value is then normalized, removing trailing decimal points and zeros,\n * then passed to the \"onChange\" callback\n *\n * 3. When the component is rendered, the formData value is checked against the\n * value cached in the state. If it matches the cached value, the cached\n * value is passed to the input instead of the formData value\n */\nfunction NumberField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const { registry, onChange, formData, value: initialValue } = props;\n const [lastValue, setLastValue] = useState(initialValue);\n const { StringField } = registry.fields;\n\n let value = formData;\n\n /** Handle the change from the `StringField` to properly convert to a number\n *\n * @param value - The current value for the change occurring\n */\n const handleChange = useCallback(\n (value: FieldProps<T, S, F>['value'], errorSchema?: ErrorSchema<T>, id?: string) => {\n // Cache the original value in component state\n setLastValue(value);\n\n // Normalize decimals that don't start with a zero character in advance so\n // that the rest of the normalization logic is simpler\n if (`${value}`.charAt(0) === '.') {\n value = `0${value}`;\n }\n\n // Check that the value is a string (this can happen if the widget used is a\n // <select>, due to an enum declaration etc) then, if the value ends in a\n // trailing decimal point or multiple zeroes, strip the trailing values\n const processed =\n typeof value === 'string' && value.match(trailingCharMatcherWithPrefix)\n ? asNumber(value.replace(trailingCharMatcher, ''))\n : asNumber(value);\n\n onChange(processed as unknown as T, errorSchema, id);\n },\n [onChange],\n );\n\n if (typeof lastValue === 'string' && typeof value === 'number') {\n // Construct a regular expression that checks for a string that consists\n // of the formData value suffixed with zero or one '.' characters and zero\n // or more '0' characters\n const re = new RegExp(`^(${String(value).replace('.', '\\\\.')})?\\\\.?0*$`);\n\n // If the cached \"lastValue\" is a match, use that instead of the formData\n // value to prevent the input value from changing in the UI\n if (lastValue.match(re)) {\n value = lastValue as unknown as T;\n }\n }\n\n return <StringField {...props} formData={value} onChange={handleChange} />;\n}\n\nexport default NumberField;\n", "import { Component } from 'react';\nimport {\n getTemplate,\n getUiOptions,\n orderProperties,\n ErrorSchema,\n FieldProps,\n FormContextType,\n GenericObjectType,\n IdSchema,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n ADDITIONAL_PROPERTY_FLAG,\n PROPERTIES_KEY,\n REF_KEY,\n ANY_OF_KEY,\n ONE_OF_KEY,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\nimport get from 'lodash/get';\nimport has from 'lodash/has';\nimport isObject from 'lodash/isObject';\nimport set from 'lodash/set';\nimport unset from 'lodash/unset';\n\n/** Type used for the state of the `ObjectField` component */\ntype ObjectFieldState = {\n /** Flag indicating whether an additional property key was modified */\n wasPropertyKeyModified: boolean;\n /** The set of additional properties */\n additionalProperties: object;\n};\n\n/** The `ObjectField` component is used to render a field in the schema that is of type `object`. It tracks whether an\n * additional property key was modified and what it was modified to\n *\n * @param props - The `FieldProps` for this template\n */\nclass ObjectField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>,\n ObjectFieldState\n> {\n /** Set up the initial state */\n state = {\n wasPropertyKeyModified: false,\n additionalProperties: {},\n };\n\n /** Returns a flag indicating whether the `name` field is required in the object schema\n *\n * @param name - The name of the field to check for required-ness\n * @returns - True if the field `name` is required, false otherwise\n */\n isRequired(name: string) {\n const { schema } = this.props;\n return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;\n }\n\n /** Returns the `onPropertyChange` handler for the `name` field. Handles the special case where a user is attempting\n * to clear the data for a field added as an additional property. Calls the `onChange()` handler with the updated\n * formData.\n *\n * @param name - The name of the property\n * @param addedByAdditionalProperties - Flag indicating whether this property is an additional property\n * @returns - The onPropertyChange callback for the `name` property\n */\n onPropertyChange = (name: string, addedByAdditionalProperties = false) => {\n return (value: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const { formData, onChange, errorSchema } = this.props;\n if (value === undefined && addedByAdditionalProperties) {\n // Don't set value = undefined for fields added by\n // additionalProperties. Doing so removes them from the\n // formData, which causes them to completely disappear\n // (including the input field for the property name). Unlike\n // fields which are \"mandated\" by the schema, these fields can\n // be set to undefined by clicking a \"delete field\" button, so\n // set empty values to the empty string.\n value = '' as unknown as T;\n }\n const newFormData = { ...formData, [name]: value } as unknown as T;\n onChange(\n newFormData,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [name]: newErrorSchema,\n },\n id,\n );\n };\n };\n\n /** Returns a callback to handle the onDropPropertyClick event for the given `key` which removes the old `key` data\n * and calls the `onChange` callback with it\n *\n * @param key - The key for which the drop callback is desired\n * @returns - The drop property click callback\n */\n onDropPropertyClick = (key: string) => {\n return (event: DragEvent) => {\n event.preventDefault();\n const { onChange, formData } = this.props;\n const copiedFormData = { ...formData } as T;\n unset(copiedFormData, key);\n onChange(copiedFormData);\n };\n };\n\n /** Computes the next available key name from the `preferredKey`, indexing through the already existing keys until one\n * that is already not assigned is found.\n *\n * @param preferredKey - The preferred name of a new key\n * @param [formData] - The form data in which to check if the desired key already exists\n * @returns - The name of the next available key from `preferredKey`\n */\n getAvailableKey = (preferredKey: string, formData?: T) => {\n const { uiSchema, registry } = this.props;\n const { duplicateKeySuffixSeparator = '-' } = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n\n let index = 0;\n let newKey = preferredKey;\n while (has(formData, newKey)) {\n newKey = `${preferredKey}${duplicateKeySuffixSeparator}${++index}`;\n }\n return newKey;\n };\n\n /** Returns a callback function that deals with the rename of a key for an additional property for a schema. That\n * callback will attempt to rename the key and move the existing data to that key, calling `onChange` when it does.\n *\n * @param oldValue - The old value of a field\n * @returns - The key change callback function\n */\n onKeyChange = (oldValue: any) => {\n return (value: any, newErrorSchema: ErrorSchema<T>) => {\n if (oldValue === value) {\n return;\n }\n const { formData, onChange, errorSchema } = this.props;\n\n value = this.getAvailableKey(value, formData);\n const newFormData: GenericObjectType = {\n ...(formData as GenericObjectType),\n };\n const newKeys: GenericObjectType = { [oldValue]: value };\n const keyValues = Object.keys(newFormData).map((key) => {\n const newKey = newKeys[key] || key;\n return { [newKey]: newFormData[key] };\n });\n const renamedObj = Object.assign({}, ...keyValues);\n\n this.setState({ wasPropertyKeyModified: true });\n\n onChange(\n renamedObj,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [value]: newErrorSchema,\n },\n );\n };\n };\n\n /** Returns a default value to be used for a new additional schema property of the given `type`\n *\n * @param type - The type of the new additional schema property\n */\n getDefaultValue(type?: RJSFSchema['type']) {\n const {\n registry: { translateString },\n } = this.props;\n switch (type) {\n case 'array':\n return [];\n case 'boolean':\n return false;\n case 'null':\n return null;\n case 'number':\n return 0;\n case 'object':\n return {};\n case 'string':\n default:\n // We don't have a datatype for some reason (perhaps additionalProperties was true)\n return translateString(TranslatableString.NewStringDefault);\n }\n }\n\n /** Handles the adding of a new additional property on the given `schema`. Calls the `onChange` callback once the new\n * default data for that field has been added to the formData.\n *\n * @param schema - The schema element to which the new property is being added\n */\n handleAddClick = (schema: S) => () => {\n if (!(schema.additionalProperties || schema.patternProperties)) {\n return;\n }\n const { formData, onChange, registry } = this.props;\n const newFormData = { ...formData } as T;\n const newKey = this.getAvailableKey('newKey', newFormData);\n if (schema.patternProperties) {\n // Cast this to make the `set` work properly\n set(newFormData as GenericObjectType, newKey, null);\n } else {\n let type: RJSFSchema['type'] = undefined;\n let constValue: RJSFSchema['const'] = undefined;\n let defaultValue: RJSFSchema['default'] = undefined;\n if (isObject(schema.additionalProperties)) {\n type = schema.additionalProperties.type;\n constValue = schema.additionalProperties.const;\n defaultValue = schema.additionalProperties.default;\n let apSchema = schema.additionalProperties;\n if (REF_KEY in apSchema) {\n const { schemaUtils } = registry;\n apSchema = schemaUtils.retrieveSchema({ $ref: apSchema[REF_KEY] } as S, formData);\n type = apSchema.type;\n constValue = apSchema.const;\n defaultValue = apSchema.default;\n }\n if (!type && (ANY_OF_KEY in apSchema || ONE_OF_KEY in apSchema)) {\n type = 'object';\n }\n }\n\n const newValue = constValue ?? defaultValue ?? this.getDefaultValue(type);\n // Cast this to make the `set` work properly\n set(newFormData as GenericObjectType, newKey, newValue);\n }\n\n onChange(newFormData);\n };\n\n /** Renders the `ObjectField` from the given props\n */\n render() {\n const {\n schema: rawSchema,\n uiSchema = {},\n formData,\n errorSchema,\n idSchema,\n name,\n required = false,\n disabled,\n readonly,\n hideError,\n idPrefix,\n idSeparator,\n onBlur,\n onFocus,\n registry,\n title,\n } = this.props;\n\n const { fields, formContext, schemaUtils, translateString, globalUiOptions } = registry;\n const { SchemaField } = fields;\n const schema: S = schemaUtils.retrieveSchema(rawSchema, formData);\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const { properties: schemaProperties = {} } = schema;\n\n const templateTitle = uiOptions.title ?? schema.title ?? title ?? name;\n const description = uiOptions.description ?? schema.description;\n let orderedProperties: string[];\n try {\n const properties = Object.keys(schemaProperties);\n orderedProperties = orderProperties(properties, uiOptions.order);\n } catch (err) {\n return (\n <div>\n <p className='rjsf-config-error' style={{ color: 'red' }}>\n <Markdown options={{ disableParsingRawHTML: true }}>\n {translateString(TranslatableString.InvalidObjectField, [name || 'root', (err as Error).message])}\n </Markdown>\n </p>\n <pre>{JSON.stringify(schema)}</pre>\n </div>\n );\n }\n\n const Template = getTemplate<'ObjectFieldTemplate', T, S, F>('ObjectFieldTemplate', registry, uiOptions);\n\n const templateProps = {\n // getDisplayLabel() always returns false for object types, so just check the `uiOptions.label`\n title: uiOptions.label === false ? '' : templateTitle,\n description: uiOptions.label === false ? undefined : description,\n properties: orderedProperties.map((name) => {\n const addedByAdditionalProperties = has(schema, [PROPERTIES_KEY, name, ADDITIONAL_PROPERTY_FLAG]);\n const fieldUiSchema = addedByAdditionalProperties ? uiSchema.additionalProperties : uiSchema[name];\n const hidden = getUiOptions<T, S, F>(fieldUiSchema).widget === 'hidden';\n const fieldIdSchema: IdSchema<T> = get(idSchema, [name], {});\n\n return {\n content: (\n <SchemaField\n key={name}\n name={name}\n required={this.isRequired(name)}\n schema={get(schema, [PROPERTIES_KEY, name], {}) as S}\n uiSchema={fieldUiSchema}\n errorSchema={get(errorSchema, name)}\n idSchema={fieldIdSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formData={get(formData, name)}\n formContext={formContext}\n wasPropertyKeyModified={this.state.wasPropertyKeyModified}\n onKeyChange={this.onKeyChange(name)}\n onChange={this.onPropertyChange(name, addedByAdditionalProperties)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n onDropPropertyClick={this.onDropPropertyClick}\n />\n ),\n name,\n readonly,\n disabled,\n required,\n hidden,\n };\n }),\n readonly,\n disabled,\n required,\n idSchema,\n uiSchema,\n errorSchema,\n schema,\n formData,\n formContext,\n registry,\n };\n return <Template {...templateProps} onAddClick={this.handleAddClick} />;\n }\n}\n\nexport default ObjectField;\n", "import { useCallback, Component, ComponentType } from 'react';\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n deepEquals,\n descriptionId,\n ErrorSchema,\n FieldProps,\n FieldTemplateProps,\n FormContextType,\n getSchemaType,\n getTemplate,\n getUiOptions,\n ID_KEY,\n IdSchema,\n mergeObjects,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UI_OPTIONS_KEY,\n UIOptionsType,\n} from '@rjsf/utils';\nimport isObject from 'lodash/isObject';\nimport omit from 'lodash/omit';\n\n/** The map of component type to FieldName */\nconst COMPONENT_TYPES: { [key: string]: string } = {\n array: 'ArrayField',\n boolean: 'BooleanField',\n integer: 'NumberField',\n number: 'NumberField',\n object: 'ObjectField',\n string: 'StringField',\n null: 'NullField',\n};\n\n/** Computes and returns which `Field` implementation to return in order to render the field represented by the\n * `schema`. The `uiOptions` are used to alter what potential `Field` implementation is actually returned. If no\n * appropriate `Field` implementation can be found then a wrapper around `UnsupportedFieldTemplate` is used.\n *\n * @param schema - The schema from which to obtain the type\n * @param uiOptions - The UI Options that may affect the component decision\n * @param idSchema - The id that is passed to the `UnsupportedFieldTemplate`\n * @param registry - The registry from which fields and templates are obtained\n * @returns - The `Field` component that is used to render the actual field data\n */\nfunction getFieldComponent<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n schema: S,\n uiOptions: UIOptionsType<T, S, F>,\n idSchema: IdSchema<T>,\n registry: Registry<T, S, F>,\n): ComponentType<FieldProps<T, S, F>> {\n const field = uiOptions.field;\n const { fields, translateString } = registry;\n if (typeof field === 'function') {\n return field;\n }\n if (typeof field === 'string' && field in fields) {\n return fields[field] as ComponentType<FieldProps<T, S, F>>;\n }\n\n const schemaType = getSchemaType(schema);\n const type: string = Array.isArray(schemaType) ? schemaType[0] : schemaType || '';\n\n const schemaId = schema.$id;\n\n let componentName = COMPONENT_TYPES[type];\n if (schemaId && schemaId in fields) {\n componentName = schemaId;\n }\n\n // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't\n // render a field and let the MultiSchemaField component handle the form display\n if (!componentName && (schema.anyOf || schema.oneOf)) {\n return () => null;\n }\n\n return componentName in fields\n ? fields[componentName]\n : () => {\n const UnsupportedFieldTemplate = getTemplate<'UnsupportedFieldTemplate', T, S, F>(\n 'UnsupportedFieldTemplate',\n registry,\n uiOptions,\n );\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason={translateString(TranslatableString.UnknownFieldType, [String(schema.type)])}\n registry={registry}\n />\n );\n };\n}\n\n/** The `SchemaFieldRender` component is the work-horse of react-jsonschema-form, determining what kind of real field to\n * render based on the `schema`, `uiSchema` and all the other props. It also deals with rendering the `anyOf` and\n * `oneOf` fields.\n *\n * @param props - The `FieldProps` for this component\n */\nfunction SchemaFieldRender<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema: _schema,\n idSchema: _idSchema,\n uiSchema,\n formData,\n errorSchema,\n idPrefix,\n idSeparator,\n name,\n onChange,\n onKeyChange,\n onDropPropertyClick,\n required,\n registry,\n wasPropertyKeyModified = false,\n } = props;\n const { formContext, schemaUtils, globalUiOptions } = registry;\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n const FieldTemplate = getTemplate<'FieldTemplate', T, S, F>('FieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions,\n );\n const FieldHelpTemplate = getTemplate<'FieldHelpTemplate', T, S, F>('FieldHelpTemplate', registry, uiOptions);\n const FieldErrorTemplate = getTemplate<'FieldErrorTemplate', T, S, F>('FieldErrorTemplate', registry, uiOptions);\n const schema = schemaUtils.retrieveSchema(_schema, formData);\n const fieldId = _idSchema[ID_KEY];\n const idSchema = mergeObjects(\n schemaUtils.toIdSchema(schema, fieldId, formData, idPrefix, idSeparator),\n _idSchema,\n ) as IdSchema<T>;\n\n /** Intermediary `onChange` handler for field components that will inject the `id` of the current field into the\n * `onChange` chain if it is not already being provided from a deeper level in the hierarchy\n */\n const handleFieldComponentChange = useCallback(\n (formData: T | undefined, newErrorSchema?: ErrorSchema<T>, id?: string) => {\n const theId = id || fieldId;\n return onChange(formData, newErrorSchema, theId);\n },\n [fieldId, onChange],\n );\n\n const FieldComponent = getFieldComponent<T, S, F>(schema, uiOptions, idSchema, registry);\n const disabled = Boolean(uiOptions.disabled ?? props.disabled);\n const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));\n const uiSchemaHideError = uiOptions.hideError;\n // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n const hideError = uiSchemaHideError === undefined ? props.hideError : Boolean(uiSchemaHideError);\n const autofocus = Boolean(uiOptions.autofocus ?? props.autofocus);\n if (Object.keys(schema).length === 0) {\n return null;\n }\n\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n\n const { __errors, ...fieldErrorSchema } = errorSchema || {};\n // See #439: uiSchema: Don't pass consumed class names or style to child components\n const fieldUiSchema = omit(uiSchema, ['ui:classNames', 'classNames', 'ui:style']);\n if (UI_OPTIONS_KEY in fieldUiSchema) {\n fieldUiSchema[UI_OPTIONS_KEY] = omit(fieldUiSchema[UI_OPTIONS_KEY], ['classNames', 'style']);\n }\n\n const field = (\n <FieldComponent\n {...props}\n onChange={handleFieldComponentChange}\n idSchema={idSchema}\n schema={schema}\n uiSchema={fieldUiSchema}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n errorSchema={fieldErrorSchema as ErrorSchema}\n formContext={formContext}\n rawErrors={__errors}\n />\n );\n\n const id = idSchema[ID_KEY];\n\n // If this schema has a title defined, but the user has set a new key/label, retain their input.\n let label;\n if (wasPropertyKeyModified) {\n label = name;\n } else {\n label =\n ADDITIONAL_PROPERTY_FLAG in schema\n ? name\n : uiOptions.title || props.schema.title || schema.title || props.title || name;\n }\n\n const description = uiOptions.description || props.schema.description || schema.description || '';\n const help = uiOptions.help;\n const hidden = uiOptions.widget === 'hidden';\n\n const classNames = ['rjsf-field', `rjsf-field-${getSchemaType(schema)}`];\n if (!hideError && __errors && __errors.length > 0) {\n classNames.push('rjsf-field-error');\n }\n if (uiOptions.classNames) {\n classNames.push(uiOptions.classNames);\n }\n\n const helpComponent = (\n <FieldHelpTemplate\n help={help}\n idSchema={idSchema}\n schema={schema}\n uiSchema={uiSchema}\n hasErrors={!hideError && __errors && __errors.length > 0}\n registry={registry}\n />\n );\n /*\n * AnyOf/OneOf errors handled by child schema\n * unless it can be rendered as select control\n */\n const errorsComponent =\n hideError || ((schema.anyOf || schema.oneOf) && !schemaUtils.isSelect(schema)) ? undefined : (\n <FieldErrorTemplate\n errors={__errors}\n errorSchema={errorSchema}\n idSchema={idSchema}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n const fieldProps: Omit<FieldTemplateProps<T, S, F>, 'children'> = {\n description: (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n ),\n rawDescription: description,\n help: helpComponent,\n rawHelp: typeof help === 'string' ? help : undefined,\n errors: errorsComponent,\n rawErrors: hideError ? undefined : __errors,\n id,\n label,\n hidden,\n onChange,\n onKeyChange,\n onDropPropertyClick,\n required,\n disabled,\n readonly,\n hideError,\n displayLabel,\n classNames: classNames.join(' ').trim(),\n style: uiOptions.style,\n formContext,\n formData,\n schema,\n uiSchema,\n registry,\n };\n\n const _AnyOfField = registry.fields.AnyOfField;\n const _OneOfField = registry.fields.OneOfField;\n const isReplacingAnyOrOneOf = uiSchema?.['ui:field'] && uiSchema?.['ui:fieldReplacesAnyOrOneOf'] === true;\n\n return (\n <FieldTemplate {...fieldProps}>\n <>\n {field}\n {/*\n If the schema `anyOf` or 'oneOf' can be rendered as a select control, don't\n render the selection and let `StringField` component handle\n rendering\n */}\n {schema.anyOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && (\n <_AnyOfField\n name={name}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\n formContext={formContext}\n idPrefix={idPrefix}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={props.onBlur}\n onChange={props.onChange}\n onFocus={props.onFocus}\n options={schema.anyOf.map((_schema) =>\n schemaUtils.retrieveSchema(isObject(_schema) ? (_schema as S) : ({} as S), formData),\n )}\n registry={registry}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n {schema.oneOf && !isReplacingAnyOrOneOf && !schemaUtils.isSelect(schema) && (\n <_OneOfField\n name={name}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\n formContext={formContext}\n idPrefix={idPrefix}\n idSchema={idSchema}\n idSeparator={idSeparator}\n onBlur={props.onBlur}\n onChange={props.onChange}\n onFocus={props.onFocus}\n options={schema.oneOf.map((_schema) =>\n schemaUtils.retrieveSchema(isObject(_schema) ? (_schema as S) : ({} as S), formData),\n )}\n registry={registry}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n </>\n </FieldTemplate>\n );\n}\n\n/** The `SchemaField` component determines whether it is necessary to rerender the component based on any props changes\n * and if so, calls the `SchemaFieldRender` component with the props.\n */\nclass SchemaField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> extends Component<\n FieldProps<T, S, F>\n> {\n shouldComponentUpdate(nextProps: Readonly<FieldProps<T, S, F>>) {\n return !deepEquals(this.props, nextProps);\n }\n\n render() {\n return <SchemaFieldRender<T, S, F> {...this.props} />;\n }\n}\n\nexport default SchemaField;\n", "import {\n getWidget,\n getUiOptions,\n optionsList,\n hasWidget,\n FieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `StringField` component is used to render a schema field that represents a string type\n *\n * @param props - The `FieldProps` for this template\n */\nfunction StringField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n required,\n disabled = false,\n readonly = false,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n hideError,\n } = props;\n const { title, format } = schema;\n const { widgets, formContext, schemaUtils, globalUiOptions } = registry;\n const enumOptions = schemaUtils.isSelect(schema) ? optionsList<T, S, F>(schema, uiSchema) : undefined;\n let defaultWidget = enumOptions ? 'select' : 'text';\n if (format && hasWidget<T, S, F>(schema, format, widgets)) {\n defaultWidget = format;\n }\n const { widget = defaultWidget, placeholder = '', title: uiTitle, ...options } = getUiOptions<T, S, F>(uiSchema);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);\n const label = uiTitle ?? title ?? name;\n const Widget = getWidget<T, S, F>(schema, widget, widgets);\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema.$id}\n name={name}\n label={label}\n hideLabel={!displayLabel}\n hideError={hideError}\n value={formData}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n required={required}\n disabled={disabled}\n readonly={readonly}\n formContext={formContext}\n autofocus={autofocus}\n registry={registry}\n placeholder={placeholder}\n rawErrors={rawErrors}\n />\n );\n}\n\nexport default StringField;\n", "import { useEffect } from 'react';\nimport { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `NullField` component is used to render a field in the schema is null. It also ensures that the `formData` is\n * also set to null if it has no value.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction NullField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: FieldProps<T, S, F>,\n) {\n const { formData, onChange } = props;\n useEffect(() => {\n if (formData === undefined) {\n onChange(null as unknown as T);\n }\n }, [formData, onChange]);\n\n return null;\n}\n\nexport default NullField;\n", "import { Field, FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport ArrayField from './ArrayField';\nimport BooleanField from './BooleanField';\nimport LayoutGridField from './LayoutGridField';\nimport LayoutHeaderField from './LayoutHeaderField';\nimport LayoutMultiSchemaField from './LayoutMultiSchemaField';\nimport MultiSchemaField from './MultiSchemaField';\nimport NumberField from './NumberField';\nimport ObjectField from './ObjectField';\nimport SchemaField from './SchemaField';\nimport StringField from './StringField';\nimport NullField from './NullField';\n\nfunction fields<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryFieldsType<T, S, F> {\n return {\n AnyOfField: MultiSchemaField,\n ArrayField: ArrayField as unknown as Field<T, S, F>,\n // ArrayField falls back to SchemaField if ArraySchemaField is not defined, which it isn't by default\n BooleanField,\n LayoutGridField,\n LayoutHeaderField,\n LayoutMultiSchemaField,\n NumberField,\n ObjectField,\n OneOfField: MultiSchemaField,\n SchemaField,\n StringField,\n NullField,\n };\n}\n\nexport default fields;\n", "import {\n descriptionId,\n getTemplate,\n getUiOptions,\n ArrayFieldDescriptionProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldDescriptionTemplate` component renders a `DescriptionFieldTemplate` with an `id` derived from\n * the `idSchema`.\n *\n * @param props - The `ArrayFieldDescriptionProps` for the component\n */\nexport default function ArrayFieldDescriptionTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldDescriptionProps<T, S, F>) {\n const { idSchema, description, registry, schema, uiSchema } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { label: displayLabel = true } = options;\n if (!description || !displayLabel) {\n return null;\n }\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n return (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { CSSProperties } from 'react';\nimport {\n ArrayFieldItemTemplateType,\n FormContextType,\n getTemplate,\n getUiOptions,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemTemplateType<T, S, F>) {\n const { children, className, buttonsProps, hasToolbar, registry, uiSchema } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(\n 'ArrayFieldItemButtonsTemplate',\n registry,\n uiOptions,\n );\n const btnStyle: CSSProperties = {\n flex: 1,\n paddingLeft: 6,\n paddingRight: 6,\n fontWeight: 'bold',\n };\n return (\n <div className={className}>\n <div className={hasToolbar ? 'col-xs-9' : 'col-xs-12'}>{children}</div>\n {hasToolbar && (\n <div className='col-xs-3 array-item-toolbox'>\n <div\n className='btn-group'\n style={{\n display: 'flex',\n justifyContent: 'space-around',\n }}\n >\n <ArrayFieldItemButtonsTemplate {...buttonsProps} style={btnStyle} />\n </div>\n </div>\n )}\n </div>\n );\n}\n", "import { useMemo } from 'react';\nimport {\n ArrayFieldItemButtonsTemplateType,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTemplateItemButtons` component is the template used to render the buttons associate3d with items of\n * an array.\n *\n * @param props - The `ArrayFieldItemButtonsTemplateType` props for the component\n */\nexport default function ArrayFieldItemButtonsTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemButtonsTemplateType<T, S, F>) {\n const {\n disabled,\n hasCopy,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n idSchema,\n index,\n onCopyIndexClick,\n onDropIndexClick,\n onReorderClick,\n readonly,\n registry,\n uiSchema,\n } = props;\n const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = registry.templates.ButtonTemplates;\n const onCopyClick = useMemo(() => onCopyIndexClick(index), [index, onCopyIndexClick]);\n const onRemoveClick = useMemo(() => onDropIndexClick(index), [index, onDropIndexClick]);\n const onArrowUpClick = useMemo(() => onReorderClick(index, index - 1), [index, onReorderClick]);\n const onArrowDownClick = useMemo(() => onReorderClick(index, index + 1), [index, onReorderClick]);\n\n return (\n <>\n {(hasMoveUp || hasMoveDown) && (\n <MoveUpButton\n id={buttonId<T>(idSchema, 'moveUp')}\n className='rjsf-array-item-move-up'\n disabled={disabled || readonly || !hasMoveUp}\n onClick={onArrowUpClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {(hasMoveUp || hasMoveDown) && (\n <MoveDownButton\n id={buttonId<T>(idSchema, 'moveDown')}\n className='rjsf-array-item-move-down'\n disabled={disabled || readonly || !hasMoveDown}\n onClick={onArrowDownClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasCopy && (\n <CopyButton\n id={buttonId<T>(idSchema, 'copy')}\n className='rjsf-array-item-copy'\n disabled={disabled || readonly}\n onClick={onCopyClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasRemove && (\n <RemoveButton\n id={buttonId<T>(idSchema, 'remove')}\n className='rjsf-array-item-remove'\n disabled={disabled || readonly}\n onClick={onRemoveClick}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </>\n );\n}\n", "import {\n getTemplate,\n getUiOptions,\n ArrayFieldTemplateProps,\n ArrayFieldItemTemplateType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n canAdd,\n className,\n disabled,\n idSchema,\n uiSchema,\n items,\n onAddClick,\n readonly,\n registry,\n required,\n schema,\n title,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <fieldset className={className} id={idSchema.$id}>\n <ArrayFieldTitleTemplate\n idSchema={idSchema}\n title={uiOptions.title || title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div className='row array-item-list'>\n {items &&\n items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (\n <ArrayFieldItemTemplate key={key} {...itemProps} />\n ))}\n </div>\n {canAdd && (\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-array-item-add'\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </fieldset>\n );\n}\n", "import {\n getTemplate,\n getUiOptions,\n titleId,\n ArrayFieldTitleProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from '@rjsf/utils';\n\n/** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from\n * the `idSchema`.\n *\n * @param props - The `ArrayFieldTitleProps` for the component\n */\nexport default function ArrayFieldTitleTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTitleProps<T, S, F>) {\n const { idSchema, title, schema, uiSchema, required, registry } = props;\n const options = getUiOptions<T, S, F>(uiSchema, registry.globalUiOptions);\n const { label: displayLabel = true } = options;\n if (!title || !displayLabel) {\n return null;\n }\n const TitleFieldTemplate: TemplatesType<T, S, F>['TitleFieldTemplate'] = getTemplate<'TitleFieldTemplate', T, S, F>(\n 'TitleFieldTemplate',\n registry,\n options,\n );\n return (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n name, // remove this from ...rest\n value,\n readonly,\n disabled,\n autofocus,\n onBlur,\n onFocus,\n onChange,\n onChangeOverride,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors,\n type,\n hideLabel, // remove this from ...rest\n hideError, // remove this from ...rest\n ...rest\n } = props;\n\n // Note: since React 15.2.0 we can't forward unknown element attributes, so we\n // exclude the \"options\" and \"schema\" ones here.\n if (!id) {\n console.log('No id for', props);\n throw new Error(`no id for props ${JSON.stringify(props)}`);\n }\n const inputProps = {\n ...rest,\n ...getInputProps<T, S, F>(schema, type, options),\n };\n\n let inputValue;\n if (inputProps.type === 'number' || inputProps.type === 'integer') {\n inputValue = value || value === 0 ? value : '';\n } else {\n inputValue = value == null ? '' : value;\n }\n\n const _onChange = useCallback(\n ({ target: { value } }: ChangeEvent<HTMLInputElement>) => onChange(value === '' ? options.emptyValue : value),\n [onChange, options],\n );\n const _onBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) => onBlur(id, target && target.value),\n [onBlur, id],\n );\n const _onFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) => onFocus(id, target && target.value),\n [onFocus, id],\n );\n\n return (\n <>\n <input\n id={id}\n name={id}\n className='form-control'\n readOnly={readonly}\n disabled={disabled}\n autoFocus={autofocus}\n value={inputValue}\n {...inputProps}\n list={schema.examples ? examplesId<T>(id) : undefined}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist key={`datalist_${id}`} id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example: any) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n", "import { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <div>\n <button type='submit' {...submitButtonProps} className={`btn btn-info ${submitButtonProps.className || ''}`}>\n {submitText}\n </button>\n </div>\n );\n}\n", "import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nimport IconButton from './IconButton';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n className,\n onClick,\n disabled,\n registry,\n}: IconButtonProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <div className='row'>\n <p className={`col-xs-3 col-xs-offset-9 text-right ${className}`}>\n <IconButton\n iconType='info'\n icon='plus'\n className='btn-add col-xs-12'\n title={translateString(TranslatableString.AddButton)}\n onClick={onClick}\n disabled={disabled}\n registry={registry}\n />\n </p>\n </div>\n );\n}\n", "import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nexport default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const { iconType = 'default', icon, className, uiSchema, registry, ...otherProps } = props;\n return (\n <button type='button' className={`btn btn-${iconType} ${className}`} {...otherProps}>\n <i className={`glyphicon glyphicon-${icon}`} />\n </button>\n );\n}\n\nexport function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.CopyButton)} {...props} icon='copy' />;\n}\n\nexport function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='arrow-down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='arrow-up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return (\n <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} iconType='danger' icon='remove' />\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport SubmitButton from './SubmitButton';\nimport AddButton from './AddButton';\nimport { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton';\n\nfunction buttonTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): TemplatesType<T, S, F>['ButtonTemplates'] {\n return {\n SubmitButton,\n AddButton,\n CopyButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n };\n}\n\nexport default buttonTemplates;\n", "import { ReactElement } from 'react';\nimport {\n FormContextType,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n UiSchema,\n getTestIds,\n getUiOptions,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\nconst TEST_IDS = getTestIds();\n\nexport interface RichDescriptionProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> {\n /** The description text for a field, potentially containing markdown */\n description: string | ReactElement;\n /** The uiSchema object for this base component */\n uiSchema?: UiSchema<T, S, F>;\n /** The `registry` object */\n registry: Registry<T, S, F>;\n}\n\n/** Renders the given `description` in the props as\n *\n * @param props - The `RichDescriptionProps` for this component\n */\nexport default function RichDescription<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ description, registry, uiSchema = {} }: RichDescriptionProps<T, S, F>) {\n const { globalUiOptions } = registry;\n const uiOptions = getUiOptions<T, S, F>(uiSchema, globalUiOptions);\n\n if (uiOptions.enableMarkdownInDescription && typeof description === 'string') {\n return (\n <Markdown options={{ disableParsingRawHTML: true }} data-testid={TEST_IDS.markdown}>\n {description}\n </Markdown>\n );\n }\n return description;\n}\n\nRichDescription.TEST_IDS = TEST_IDS;\n", "import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport RichDescription from '../RichDescription';\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description, registry, uiSchema } = props;\n if (!description) {\n return null;\n }\n return (\n <div id={id} className='field-description'>\n <RichDescription description={description} registry={registry} uiSchema={uiSchema} />\n </div>\n );\n}\n", "import {\n ErrorListProps,\n FormContextType,\n RJSFValidationError,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from '@rjsf/utils';\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <div className='panel panel-danger errors'>\n <div className='panel-heading'>\n <h3 className='panel-title'>{translateString(TranslatableString.ErrorsLabel)}</h3>\n </div>\n <ul className='list-group'>\n {errors.map((error: RJSFValidationError, i: number) => {\n return (\n <li key={i} className='list-group-item text-danger'>\n {error.stack}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n", "import {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\n\nimport Label from './Label';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldTemplateProps<T, S, F>) {\n const { id, label, children, errors, help, description, hidden, required, displayLabel, registry, uiSchema } = props;\n const uiOptions = getUiOptions(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions,\n );\n if (hidden) {\n return <div className='hidden'>{children}</div>;\n }\n return (\n <WrapIfAdditionalTemplate {...props}>\n {displayLabel && <Label label={label} required={required} id={id} />}\n {displayLabel && description ? description : null}\n {children}\n {errors}\n {help}\n </WrapIfAdditionalTemplate>\n );\n}\n", "const REQUIRED_FIELD_SYMBOL = '*';\n\nexport type LabelProps = {\n /** The label for the field */\n label?: string;\n /** A boolean value stating if the field is required */\n required?: boolean;\n /** The id of the input field being labeled */\n id?: string;\n};\n\n/** Renders a label for a field\n *\n * @param props - The `LabelProps` for this component\n */\nexport default function Label(props: LabelProps) {\n const { label, required, id } = props;\n if (!label) {\n return null;\n }\n return (\n <label className='control-label' htmlFor={id}>\n {label}\n {required && <span className='required'>{REQUIRED_FIELD_SYMBOL}</span>}\n </label>\n );\n}\n", "import FieldTemplate from './FieldTemplate';\n\nexport default FieldTemplate;\n", "import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldErrorProps<T, S, F>) {\n const { errors = [], idSchema } = props;\n if (errors.length === 0) {\n return null;\n }\n const id = errorId<T>(idSchema);\n\n return (\n <div>\n <ul id={id} className='error-detail bs-callout bs-callout-info'>\n {errors\n .filter((elem) => !!elem)\n .map((error, index: number) => {\n return (\n <li className='text-danger' key={index}>\n {error}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n", "import { helpId, FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (!help) {\n return null;\n }\n const id = helpId<T>(idSchema);\n if (typeof help === 'string') {\n return (\n <p id={id} className='help-block'>\n {help}\n </p>\n );\n }\n return (\n <div id={id} className='help-block'>\n {help}\n </div>\n );\n}\n", "import { GridTemplateProps } from '@rjsf/utils';\n\n/** Renders a `GridTemplate` for bootstrap 3, which is expecting the column information coming in via the `className`\n * prop. Also spreads all the other props provided by the user directly on the div.\n *\n * @param props - The GridTemplateProps, including the expected className for the bootstrap 3 grid behavior\n */\nexport default function GridTemplate(props: GridTemplateProps) {\n const { children, column, className, ...rest } = props;\n return (\n <div className={className} {...rest}>\n {children}\n </div>\n );\n}\n", "import {\n FormContextType,\n ObjectFieldTemplatePropertyType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n disabled,\n formData,\n idSchema,\n onAddClick,\n properties,\n readonly,\n registry,\n required,\n schema,\n title,\n uiSchema,\n } = props;\n const options = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, options);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <fieldset id={idSchema.$id}>\n {title && (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop: ObjectFieldTemplatePropertyType) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-object-property-expand'\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </fieldset>\n );\n}\n", "import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nconst REQUIRED_FIELD_SYMBOL = '*';\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: TitleFieldProps<T, S, F>,\n) {\n const { id, title, required } = props;\n return (\n <legend id={id}>\n {title}\n {required && <span className='required'>{REQUIRED_FIELD_SYMBOL}</span>}\n </legend>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString, UnsupportedFieldProps } from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\n/** The `UnsupportedField` component is used to render a field in the schema is one that is not supported by\n * react-jsonschema-form.\n *\n * @param props - The `FieldProps` for this template\n */\nfunction UnsupportedField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: UnsupportedFieldProps<T, S, F>,\n) {\n const { schema, idSchema, reason, registry } = props;\n const { translateString } = registry;\n let translateEnum: TranslatableString = TranslatableString.UnsupportedField;\n const translateParams: string[] = [];\n if (idSchema && idSchema.$id) {\n translateEnum = TranslatableString.UnsupportedFieldWithId;\n translateParams.push(idSchema.$id);\n }\n if (reason) {\n translateEnum =\n translateEnum === TranslatableString.UnsupportedField\n ? TranslatableString.UnsupportedFieldWithReason\n : TranslatableString.UnsupportedFieldWithIdAndReason;\n translateParams.push(reason);\n }\n return (\n <div className='unsupported-field'>\n <p>\n <Markdown options={{ disableParsingRawHTML: true }}>{translateString(translateEnum, translateParams)}</Markdown>\n </p>\n {schema && <pre>{JSON.stringify(schema, null, 2)}</pre>}\n </div>\n );\n}\n\nexport default UnsupportedField;\n", "import {\n ADDITIONAL_PROPERTY_FLAG,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WrapIfAdditionalTemplateProps,\n} from '@rjsf/utils';\n\nimport Label from './FieldTemplate/Label';\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n id,\n classNames,\n style,\n disabled,\n label,\n onKeyChange,\n onDropPropertyClick,\n readonly,\n required,\n schema,\n hideError,\n rawErrors,\n children,\n uiSchema,\n registry,\n } = props;\n const { templates, translateString } = registry;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = templates.ButtonTemplates;\n const keyLabel = translateString(TranslatableString.KeyLabel, [label]);\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n const classNamesList = ['form-group', classNames];\n if (!hideError && rawErrors && rawErrors.length > 0) {\n classNamesList.push('has-error has-danger');\n }\n const uiClassNames = classNamesList.join(' ').trim();\n\n if (!additional) {\n return (\n <div className={uiClassNames} style={style}>\n {children}\n </div>\n );\n }\n\n return (\n <div className={uiClassNames} style={style}>\n <div className='row'>\n <div className='col-xs-5 form-additional'>\n <div className='form-group'>\n <Label label={keyLabel} required={required} id={`${id}-key`} />\n <input\n className='form-control'\n type='text'\n id={`${id}-key`}\n onBlur={({ target }) => onKeyChange(target && target.value)}\n defaultValue={label}\n />\n </div>\n </div>\n <div className='form-additional form-group col-xs-5'>{children}</div>\n <div className='col-xs-2'>\n <RemoveButton\n id={buttonId<T>(id, 'remove')}\n className='rjsf-object-property-remove btn-block'\n style={{ border: '0' }}\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </div>\n </div>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate';\nimport ArrayFieldItemTemplate from './ArrayFieldItemTemplate';\nimport ArrayFieldItemButtonsTemplate from './ArrayFieldItemButtonsTemplate';\nimport ArrayFieldTemplate from './ArrayFieldTemplate';\nimport ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate';\nimport BaseInputTemplate from './BaseInputTemplate';\nimport ButtonTemplates from './ButtonTemplates';\nimport DescriptionField from './DescriptionField';\nimport ErrorList from './ErrorList';\nimport FieldTemplate from './FieldTemplate';\nimport FieldErrorTemplate from './FieldErrorTemplate';\nimport FieldHelpTemplate from './FieldHelpTemplate';\nimport GridTemplate from './GridTemplate';\nimport ObjectFieldTemplate from './ObjectFieldTemplate';\nimport TitleField from './TitleField';\nimport UnsupportedField from './UnsupportedField';\nimport WrapIfAdditionalTemplate from './WrapIfAdditionalTemplate';\n\nfunction templates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<\n T,\n S,\n F\n> {\n return {\n ArrayFieldDescriptionTemplate,\n ArrayFieldItemTemplate,\n ArrayFieldItemButtonsTemplate,\n ArrayFieldTemplate,\n ArrayFieldTitleTemplate,\n ButtonTemplates: ButtonTemplates<T, S, F>(),\n BaseInputTemplate,\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldTemplate,\n FieldErrorTemplate,\n FieldHelpTemplate,\n GridTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n UnsupportedFieldTemplate: UnsupportedField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default templates;\n", "import { MouseEvent, useCallback, useEffect, useReducer, useState } from 'react';\nimport {\n ariaDescribedByIds,\n dateRangeOptions,\n parseDateString,\n toDateString,\n DateObject,\n type DateElementFormat,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WidgetProps,\n getDateElementProps,\n} from '@rjsf/utils';\n\nfunction readyForChange(state: DateObject) {\n return Object.values(state).every((value) => value !== -1);\n}\n\ntype DateElementProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<\n WidgetProps<T, S, F>,\n 'value' | 'name' | 'disabled' | 'readonly' | 'autofocus' | 'registry' | 'onBlur' | 'onFocus'\n> & {\n rootId: string;\n select: (property: keyof DateObject, value: any) => void;\n type: string;\n range: [number, number];\n};\n\nfunction DateElement<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n type,\n range,\n value,\n select,\n rootId,\n name,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n onFocus,\n}: DateElementProps<T, S, F>) {\n const id = rootId + '_' + type;\n const { SelectWidget } = registry.widgets;\n return (\n <SelectWidget\n schema={{ type: 'integer' } as S}\n id={id}\n name={name}\n className='form-control'\n options={{ enumOptions: dateRangeOptions<S>(range[0], range[1]) }}\n placeholder={type}\n value={value}\n disabled={disabled}\n readonly={readonly}\n autofocus={autofocus}\n onChange={(value: any) => select(type as keyof DateObject, value)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n label=''\n aria-describedby={ariaDescribedByIds<T>(rootId)}\n />\n );\n}\n\n/** The `AltDateWidget` is an alternative widget for rendering date properties.\n * @param props - The `WidgetProps` for this component\n */\nfunction AltDateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n time = false,\n disabled = false,\n readonly = false,\n autofocus = false,\n options,\n id,\n name,\n registry,\n onBlur,\n onFocus,\n onChange,\n value,\n}: WidgetProps<T, S, F>) {\n const { translateString } = registry;\n const [lastValue, setLastValue] = useState(value);\n const [state, setState] = useReducer(\n (state: DateObject, action: Partial<DateObject>) => {\n return { ...state, ...action };\n },\n parseDateString(value, time),\n );\n\n useEffect(() => {\n const stateValue = toDateString(state, time);\n if (readyForChange(state) && stateValue !== value) {\n // The user changed the date to a new valid data via the comboboxes, so call onChange\n onChange(stateValue);\n } else if (lastValue !== value) {\n // We got a new value in the props\n setLastValue(value);\n setState(parseDateString(value, time));\n }\n }, [time, value, onChange, state, lastValue]);\n\n const handleChange = useCallback((property: keyof DateObject, value: string) => {\n setState({ [property]: value });\n }, []);\n\n const handleSetNow = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (disabled || readonly) {\n return;\n }\n const nextState = parseDateString(new Date().toJSON(), time);\n onChange(toDateString(nextState, time));\n },\n [disabled, readonly, time],\n );\n\n const handleClear = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (disabled || readonly) {\n return;\n }\n onChange(undefined);\n },\n [disabled, readonly, onChange],\n );\n\n return (\n <ul className='list-inline'>\n {getDateElementProps(\n state,\n time,\n options.yearsRange as [number, number] | undefined,\n options.format as DateElementFormat | undefined,\n ).map((elemProps, i) => (\n <li className='list-inline-item' key={i}>\n <DateElement\n rootId={id}\n name={name}\n select={handleChange}\n {...elemProps}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n onBlur={onBlur}\n onFocus={onFocus}\n autofocus={autofocus && i === 0}\n />\n </li>\n ))}\n {(options.hideNowButton !== 'undefined' ? !options.hideNowButton : true) && (\n <li className='list-inline-item'>\n <a href='#' className='btn btn-info btn-now' onClick={handleSetNow}>\n {translateString(TranslatableString.NowLabel)}\n </a>\n </li>\n )}\n {(options.hideClearButton !== 'undefined' ? !options.hideClearButton : true) && (\n <li className='list-inline-item'>\n <a href='#' className='btn btn-warning btn-clear' onClick={handleClear}>\n {translateString(TranslatableString.ClearLabel)}\n </a>\n </li>\n )}\n </ul>\n );\n}\n\nexport default AltDateWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `AltDateTimeWidget` is an alternative widget for rendering datetime properties.\n * It uses the AltDateWidget for rendering, with the `time` prop set to true by default.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction AltDateTimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n time = true,\n ...props\n}: WidgetProps<T, S, F>) {\n const { AltDateWidget } = props.registry.widgets;\n return <AltDateWidget time={time} {...props} />;\n}\n\nexport default AltDateTimeWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n descriptionId,\n getTemplate,\n labelValue,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction CheckboxWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n schema,\n uiSchema,\n options,\n id,\n value,\n disabled,\n readonly,\n label,\n hideLabel,\n autofocus = false,\n onBlur,\n onFocus,\n onChange,\n registry,\n}: WidgetProps<T, S, F>) {\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.checked),\n [onChange],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onBlur(id, event.target.checked),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onFocus(id, event.target.checked),\n [onFocus, id],\n );\n const description = options.description ?? schema.description;\n\n return (\n <div className={`checkbox ${disabled || readonly ? 'disabled' : ''}`}>\n {!hideLabel && description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <label>\n <input\n type='checkbox'\n id={id}\n name={id}\n checked={typeof value === 'undefined' ? false : value}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n {labelValue(<span>{label}</span>, hideLabel)}\n </label>\n </div>\n );\n}\n\nexport default CheckboxWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n WidgetProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction CheckboxesWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n disabled,\n options: { inline = false, enumOptions, enumDisabled, emptyValue },\n value,\n autofocus = false,\n readonly,\n onChange,\n onBlur,\n onFocus,\n}: WidgetProps<T, S, F>) {\n const checkboxesValues = Array.isArray(value) ? value : [value];\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onFocus, id],\n );\n return (\n <div className='checkboxes' id={id}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n const disabledCls = disabled || itemDisabled || readonly ? 'disabled' : '';\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (event.target.checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\n }\n };\n\n const checkbox = (\n <span>\n <input\n type='checkbox'\n id={optionId(id, index)}\n name={id}\n checked={checked}\n value={String(index)}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{option.label}</span>\n </span>\n );\n return inline ? (\n <label key={index} className={`checkbox-inline ${disabledCls}`}>\n {checkbox}\n </label>\n ) : (\n <div key={index} className={`checkbox ${disabledCls}`}>\n <label>{checkbox}</label>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default CheckboxesWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `ColorWidget` component uses the `BaseInputTemplate` changing the type to `color` and disables it when it is\n * either disabled or readonly.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function ColorWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { disabled, readonly, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='color' {...props} disabled={disabled || readonly} />;\n}\n", "import { useCallback } from 'react';\nimport { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `DateWidget` component uses the `BaseInputTemplate` changing the type to `date` and transforms\n * the value to undefined when it is falsy during the `onChange` handling.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function DateWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { onChange, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n const handleChange = useCallback((value: any) => onChange(value || undefined), [onChange]);\n\n return <BaseInputTemplate type='date' {...props} onChange={handleChange} />;\n}\n", "import {\n getTemplate,\n localToUTC,\n utcToLocal,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `DateTimeWidget` component uses the `BaseInputTemplate` changing the type to `datetime-local` and transforms\n * the value to/from utc using the appropriate utility functions.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function DateTimeWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const { onChange, value, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return (\n <BaseInputTemplate\n type='datetime-local'\n {...props}\n value={utcToLocal(value)}\n onChange={(value) => onChange(localToUTC(value))}\n />\n );\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `EmailWidget` component uses the `BaseInputTemplate` changing the type to `email`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function EmailWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='email' {...props} />;\n}\n", "import { ChangeEvent, useCallback, useMemo } from 'react';\nimport {\n dataURItoBlob,\n FormContextType,\n getTemplate,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n UIOptionsType,\n WidgetProps,\n} from '@rjsf/utils';\nimport Markdown from 'markdown-to-jsx';\n\nfunction addNameToDataURL(dataURL: string, name: string) {\n if (dataURL === null) {\n return null;\n }\n return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);\n}\n\ntype FileInfoType = {\n dataURL?: string | null;\n name: string;\n size: number;\n type: string;\n};\n\nfunction processFile(file: File): Promise<FileInfoType> {\n const { name, size, type } = file;\n return new Promise((resolve, reject) => {\n const reader = new window.FileReader();\n reader.onerror = reject;\n reader.onload = (event) => {\n if (typeof event.target?.result === 'string') {\n resolve({\n dataURL: addNameToDataURL(event.target.result, name),\n name,\n size,\n type,\n });\n } else {\n resolve({\n dataURL: null,\n name,\n size,\n type,\n });\n }\n };\n reader.readAsDataURL(file);\n });\n}\n\nfunction processFiles(files: FileList) {\n return Promise.all(Array.from(files).map(processFile));\n}\n\nfunction FileInfoPreview<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n fileInfo,\n registry,\n}: {\n fileInfo: FileInfoType;\n registry: Registry<T, S, F>;\n}) {\n const { translateString } = registry;\n const { dataURL, type, name } = fileInfo;\n if (!dataURL) {\n return null;\n }\n\n // If type is JPEG or PNG then show image preview.\n // Originally, any type of image was supported, but this was changed into a whitelist\n // since SVGs and animated GIFs are also images, which are generally considered a security risk.\n if (['image/jpeg', 'image/png'].includes(type)) {\n return <img src={dataURL} style={{ maxWidth: '100%' }} className='file-preview' />;\n }\n\n // otherwise, let users download file\n\n return (\n <>\n {' '}\n <a download={`preview-${name}`} href={dataURL} className='file-download'>\n {translateString(TranslatableString.PreviewLabel)}\n </a>\n </>\n );\n}\n\nfunction FilesInfo<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n filesInfo,\n registry,\n preview,\n onRemove,\n options,\n}: {\n filesInfo: FileInfoType[];\n registry: Registry<T, S, F>;\n preview?: boolean;\n onRemove: (index: number) => void;\n options: UIOptionsType<T, S, F>;\n}) {\n if (filesInfo.length === 0) {\n return null;\n }\n const { translateString } = registry;\n\n const { RemoveButton } = getTemplate<'ButtonTemplates', T, S, F>('ButtonTemplates', registry, options);\n\n return (\n <ul className='file-info'>\n {filesInfo.map((fileInfo, key) => {\n const { name, size, type } = fileInfo;\n const handleRemove = () => onRemove(key);\n return (\n <li key={key}>\n <Markdown>{translateString(TranslatableString.FilesInfo, [name, type, String(size)])}</Markdown>\n {preview && <FileInfoPreview<T, S, F> fileInfo={fileInfo} registry={registry} />}\n <RemoveButton onClick={handleRemove} registry={registry} />\n </li>\n );\n })}\n </ul>\n );\n}\n\nfunction extractFileInfo(dataURLs: string[]): FileInfoType[] {\n return dataURLs.reduce((acc, dataURL) => {\n if (!dataURL) {\n return acc;\n }\n try {\n const { blob, name } = dataURItoBlob(dataURL);\n return [\n ...acc,\n {\n dataURL,\n name: name,\n size: blob.size,\n type: blob.type,\n },\n ];\n } catch {\n // Invalid dataURI, so just ignore it.\n return acc;\n }\n }, [] as FileInfoType[]);\n}\n\n/**\n * The `FileWidget` is a widget for rendering file upload fields.\n * It is typically used with a string property with data-url format.\n */\nfunction FileWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { disabled, readonly, required, multiple, onChange, value, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!event.target.files) {\n return;\n }\n // Due to variances in themes, dealing with multiple files for the array case now happens one file at a time.\n // This is because we don't pass `multiple` into the `BaseInputTemplate` anymore. Instead, we deal with the single\n // file in each event and concatenate them together ourselves\n processFiles(event.target.files).then((filesInfoEvent) => {\n const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);\n if (multiple) {\n onChange(value.concat(newValue));\n } else {\n onChange(newValue[0]);\n }\n });\n },\n [multiple, value, onChange],\n );\n\n const filesInfo = useMemo(() => extractFileInfo(Array.isArray(value) ? value : [value]), [value]);\n const rmFile = useCallback(\n (index: number) => {\n if (multiple) {\n const newValue = value.filter((_: any, i: number) => i !== index);\n onChange(newValue);\n } else {\n onChange(undefined);\n }\n },\n [multiple, value, onChange],\n );\n return (\n <div>\n <BaseInputTemplate\n {...props}\n disabled={disabled || readonly}\n type='file'\n required={value ? false : required} // this turns off HTML required validation when a value exists\n onChangeOverride={handleChange}\n value=''\n accept={options.accept ? String(options.accept) : undefined}\n />\n <FilesInfo<T, S, F>\n filesInfo={filesInfo}\n onRemove={rmFile}\n registry={registry}\n preview={options.filePreview}\n options={options}\n />\n </div>\n );\n}\n\nexport default FileWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `HiddenWidget` is a widget for rendering a hidden input field.\n * It is typically used by setting type to \"hidden\".\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction HiddenWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n value,\n}: WidgetProps<T, S, F>) {\n return <input type='hidden' id={id} name={id} value={typeof value === 'undefined' ? '' : value} />;\n}\n\nexport default HiddenWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `PasswordWidget` component uses the `BaseInputTemplate` changing the type to `password`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function PasswordWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='password' {...props} />;\n}\n", "import { FocusEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n options,\n value,\n required,\n disabled,\n readonly,\n autofocus = false,\n onBlur,\n onFocus,\n onChange,\n id,\n}: WidgetProps<T, S, F>) {\n const { enumOptions, enumDisabled, inline, emptyValue } = options;\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onBlur, enumOptions, emptyValue, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, emptyValue)),\n [onFocus, enumOptions, emptyValue, id],\n );\n\n return (\n <div className='field-radio-group' id={id} role='radiogroup'>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, i) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n const disabledCls = disabled || itemDisabled || readonly ? 'disabled' : '';\n\n const handleChange = () => onChange(option.value);\n\n const radio = (\n <span>\n <input\n type='radio'\n id={optionId(id, i)}\n checked={checked}\n name={id}\n required={required}\n value={String(i)}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && i === 0}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{option.label}</span>\n </span>\n );\n\n return inline ? (\n <label key={i} className={`radio-inline ${disabledCls}`}>\n {radio}\n </label>\n ) : (\n <div key={i} className={`radio ${disabledCls}`}>\n <label>{radio}</label>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default RadioWidget;\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n value,\n registry: {\n templates: { BaseInputTemplate },\n },\n } = props;\n return (\n <div className='field-range-wrapper'>\n <BaseInputTemplate type='range' {...props} />\n <span className='range-view'>{value}</span>\n </div>\n );\n}\n", "import { FocusEvent, useCallback } from 'react';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `RatingWidget` component renders a star or heart rating input\n *\n * Features:\n * - Configurable number of stars/hearts (1-5) with default of 5\n * - Supports different shapes (star, heart)\n * - Supports minimum and maximum values from schema\n * - Handles required, disabled, and readonly states\n * - Provides focus and blur event handling for accessibility\n * - Uses Unicode characters for better visual representation\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RatingWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({\n id,\n value,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onFocus,\n onBlur,\n schema,\n options,\n}: WidgetProps<T, S, F>) {\n const { stars = 5, shape = 'star' } = options;\n\n // Use schema.maximum if provided, otherwise use stars option (limited to 1-5)\n const numStars = schema.maximum ? Math.min(schema.maximum, 5) : Math.min(Math.max(stars as number, 1), 5);\n const min = schema.minimum || 0;\n\n /** Handles clicking on a star to set the rating */\n const handleStarClick = useCallback(\n (starValue: number) => {\n if (!disabled && !readonly) {\n onChange(starValue);\n }\n },\n [onChange, disabled, readonly],\n );\n\n /** Handles focus events for accessibility */\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLSpanElement>) => {\n if (onFocus) {\n // Get the star value from the data attribute\n const starValue = Number((event.target as HTMLElement).dataset.value);\n onFocus(id, starValue);\n }\n },\n [onFocus, id],\n );\n\n /** Handles blur events for accessibility */\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLSpanElement>) => {\n if (onBlur) {\n // Get the star value from the data attribute\n const starValue = Number((event.target as HTMLElement).dataset.value);\n onBlur(id, starValue);\n }\n },\n [onBlur, id],\n );\n\n // Get the appropriate Unicode character based on shape option\n const getSymbol = (isFilled: boolean): string => {\n if (shape === 'heart') {\n return isFilled ? '\u2665' : '\u2661';\n }\n return isFilled ? '\u2605' : '\u2606';\n };\n\n return (\n <>\n <div\n className='rating-widget'\n style={{\n display: 'inline-flex',\n fontSize: '1.5rem',\n cursor: disabled || readonly ? 'default' : 'pointer',\n }}\n >\n {[...Array(numStars)].map((_, index) => {\n const starValue = min + index;\n const isFilled = starValue <= value;\n\n return (\n <span\n key={index}\n onClick={() => handleStarClick(starValue)}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-value={starValue}\n tabIndex={disabled || readonly ? -1 : 0}\n role='radio'\n aria-checked={starValue === value}\n aria-label={`${starValue} ${shape === 'heart' ? 'heart' : 'star'}${starValue === 1 ? '' : 's'}`}\n style={{\n color: isFilled ? '#FFD700' : '#ccc',\n padding: '0 0.2rem',\n transition: 'color 0.2s',\n userSelect: 'none',\n }}\n >\n {getSymbol(isFilled)}\n </span>\n );\n })}\n <input\n type='hidden'\n id={id}\n name={id}\n value={value || ''}\n required={required}\n disabled={disabled || readonly}\n aria-hidden='true'\n />\n </div>\n </>\n );\n}\n", "import { ChangeEvent, FocusEvent, SyntheticEvent, useCallback } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\n\nfunction getValue(event: SyntheticEvent<HTMLSelectElement>, multiple: boolean) {\n if (multiple) {\n return Array.from((event.target as HTMLSelectElement).options)\n .slice()\n .filter((o) => o.selected)\n .map((o) => o.value);\n }\n return (event.target as HTMLSelectElement).value;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction SelectWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n schema,\n id,\n options,\n value,\n required,\n disabled,\n readonly,\n multiple = false,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n placeholder,\n}: WidgetProps<T, S, F>) {\n const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : '';\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onFocus(id, enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onFocus, id, multiple, enumOptions, optEmptyVal],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onBlur(id, enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onBlur, id, multiple, enumOptions, optEmptyVal],\n );\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onChange(enumOptionsValueForIndex<S>(newValue, enumOptions, optEmptyVal));\n },\n [onChange, multiple, enumOptions, optEmptyVal],\n );\n\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\n const showPlaceholderOption = !multiple && schema.default === undefined;\n\n return (\n <select\n id={id}\n name={id}\n multiple={multiple}\n role='combobox'\n className='form-control'\n value={typeof selectedIndexes === 'undefined' ? emptyValue : selectedIndexes}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n aria-describedby={ariaDescribedByIds<T>(id)}\n >\n {showPlaceholderOption && <option value=''>{placeholder}</option>}\n {Array.isArray(enumOptions) &&\n enumOptions.map(({ value, label }, i) => {\n const disabled = enumDisabled && enumDisabled.indexOf(value) !== -1;\n return (\n <option key={i} value={String(i)} disabled={disabled}>\n {label}\n </option>\n );\n })}\n </select>\n );\n}\n\nexport default SelectWidget;\n", "import { ChangeEvent, FocusEvent, useCallback } from 'react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nfunction TextareaWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n options = {},\n placeholder,\n value,\n required,\n disabled,\n readonly,\n autofocus = false,\n onChange,\n onBlur,\n onFocus,\n}: WidgetProps<T, S, F>) {\n const handleChange = useCallback(\n ({ target: { value } }: ChangeEvent<HTMLTextAreaElement>) => onChange(value === '' ? options.emptyValue : value),\n [onChange, options.emptyValue],\n );\n\n const handleBlur = useCallback(\n ({ target }: FocusEvent<HTMLTextAreaElement>) => onBlur(id, target && target.value),\n [onBlur, id],\n );\n\n const handleFocus = useCallback(\n ({ target }: FocusEvent<HTMLTextAreaElement>) => onFocus(id, target && target.value),\n [id, onFocus],\n );\n\n return (\n <textarea\n id={id}\n name={id}\n className='form-control'\n value={value ? value : ''}\n placeholder={placeholder}\n required={required}\n disabled={disabled}\n readOnly={readonly}\n autoFocus={autofocus}\n rows={options.rows}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n\nTextareaWidget.defaultProps = {\n autofocus: false,\n options: {},\n};\n\nexport default TextareaWidget;\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TextWidget` component uses the `BaseInputTemplate`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate {...props} />;\n}\n", "import { useCallback } from 'react';\nimport { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `TimeWidget` component uses the `BaseInputTemplate` changing the type to `time` and transforms\n * the value to undefined when it is falsy during the `onChange` handling.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TimeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { onChange, options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n const handleChange = useCallback((value: any) => onChange(value ? `${value}:00` : undefined), [onChange]);\n\n return <BaseInputTemplate type='time' {...props} onChange={handleChange} />;\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `URLWidget` component uses the `BaseInputTemplate` changing the type to `url`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function URLWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='url' {...props} />;\n}\n", "import { getTemplate, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';\n\n/** The `UpDownWidget` component uses the `BaseInputTemplate` changing the type to `number`.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function UpDownWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options);\n return <BaseInputTemplate type='number' {...props} />;\n}\n", "import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport AltDateWidget from './AltDateWidget';\nimport AltDateTimeWidget from './AltDateTimeWidget';\nimport CheckboxWidget from './CheckboxWidget';\nimport CheckboxesWidget from './CheckboxesWidget';\nimport ColorWidget from './ColorWidget';\nimport DateWidget from './DateWidget';\nimport DateTimeWidget from './DateTimeWidget';\nimport EmailWidget from './EmailWidget';\nimport FileWidget from './FileWidget';\nimport HiddenWidget from './HiddenWidget';\nimport PasswordWidget from './PasswordWidget';\nimport RadioWidget from './RadioWidget';\nimport RangeWidget from './RangeWidget';\nimport RatingWidget from './RatingWidget';\nimport SelectWidget from './SelectWidget';\nimport TextareaWidget from './TextareaWidget';\nimport TextWidget from './TextWidget';\nimport TimeWidget from './TimeWidget';\nimport URLWidget from './URLWidget';\nimport UpDownWidget from './UpDownWidget';\n\nfunction widgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryWidgetsType<T, S, F> {\n return {\n AltDateWidget,\n AltDateTimeWidget,\n CheckboxWidget,\n CheckboxesWidget,\n ColorWidget,\n DateWidget,\n DateTimeWidget,\n EmailWidget,\n FileWidget,\n HiddenWidget,\n PasswordWidget,\n RadioWidget,\n RangeWidget,\n RatingWidget,\n SelectWidget,\n TextWidget,\n TextareaWidget,\n TimeWidget,\n UpDownWidget,\n URLWidget,\n };\n}\n\nexport default widgets;\n", "import { ComponentType, ForwardedRef, forwardRef } from 'react';\nimport Form, { FormProps } from './components/Form';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\n/** The properties for the `withTheme` function, essentially a subset of properties from the `FormProps` that can be\n * overridden while creating a theme\n */\nexport type ThemeProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<\n FormProps<T, S, F>,\n 'fields' | 'templates' | 'widgets' | '_internalFormWrapper'\n>;\n\n/** A Higher-Order component that creates a wrapper around a `Form` with the overrides from the `WithThemeProps` */\nexport default function withTheme<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n themeProps: ThemeProps<T, S, F>,\n): ComponentType<FormProps<T, S, F>> {\n // @ts-expect-error TS2322 because the latest types complain about LegacyRef's string form not working with Form\n return forwardRef<Form<T, S, F>, FormProps<T, S, F>>(\n ({ fields, widgets, templates, ...directProps }: FormProps<T, S, F>, ref: ForwardedRef<Form<T, S, F>>) => {\n fields = { ...themeProps?.fields, ...fields };\n widgets = { ...themeProps?.widgets, ...widgets };\n templates = {\n ...themeProps?.templates,\n ...templates,\n ButtonTemplates: {\n ...themeProps?.templates?.ButtonTemplates,\n ...templates?.ButtonTemplates,\n },\n };\n\n return (\n <Form<T, S, F>\n {...themeProps}\n {...directProps}\n fields={fields}\n widgets={widgets}\n templates={templates}\n ref={ref}\n />\n );\n },\n );\n}\n", "import Form, { FormProps, FormState, IChangeEvent } from './components/Form';\nimport RichDescription, { RichDescriptionProps } from './components/RichDescription';\nimport withTheme, { ThemeProps } from './withTheme';\nimport getDefaultRegistry from './getDefaultRegistry';\n\nexport type { FormProps, FormState, IChangeEvent, ThemeProps, RichDescriptionProps };\n\nexport { withTheme, getDefaultRegistry, RichDescription };\nexport default Form;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,aAAAA,YAA8D,iBAAiB;AACxF;AAAA,EACE;AAAA,EAEA,cAAAC;AAAA,EAKA;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;A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AAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AACF;;;AClCA,IAAO,gBAAQ;",
|
|
6
|
+
"names": ["Component", "deepEquals", "getTemplate", "getUiOptions", "isObject", "mergeObjects", "UI_GLOBAL_OPTIONS_KEY", "UI_OPTIONS_KEY", "widgets", "SchemaField", "has", "key", "getWidget", "getUiOptions", "optionsList", "TranslatableString", "isObject", "jsx", "widgets", "getTemplate", "getUiOptions", "cloneDeep", "get", "isObject", "set", "jsx", "get", "set", "getUiOptions", "name", "jsx", "cloneDeep", "GridTemplate", "getTemplate", "fields", "SchemaField", "LayoutMultiSchemaField", "isObject", "getTemplate", "getUiOptions", "jsx", "ANY_OF_KEY", "getDiscriminatorFieldFromSchema", "hashObject", "ID_KEY", "ONE_OF_KEY", "optionsList", "PROPERTIES_KEY", "getTemplate", "getUiOptions", "getWidget", "get", "has", "isEmpty", "set", "jsx", "widgets", "FieldErrorTemplate", "FieldTemplate", "Component", "get", "isEmpty", "omit", "ANY_OF_KEY", "ERRORS_KEY", "getDiscriminatorFieldFromSchema", "getUiOptions", "getWidget", "ONE_OF_KEY", "TranslatableString", "jsx", "widgets", "fields", "useState", "jsx", "StringField", "value", "Component", "getTemplate", "getUiOptions", "TranslatableString", "PROPERTIES_KEY", "ANY_OF_KEY", "ONE_OF_KEY", "get", "has", "isObject", "set", "jsx", "jsxs", "fields", "SchemaField", "name", "useCallback", "Component", "ADDITIONAL_PROPERTY_FLAG", "deepEquals", "getTemplate", "getUiOptions", "ID_KEY", "mergeObjects", "TranslatableString", "UI_OPTIONS_KEY", "isObject", "omit", "jsx", "jsxs", "fields", "FieldTemplate", "FieldHelpTemplate", "FieldErrorTemplate", "formData", "id", "_schema", "getWidget", "getUiOptions", "optionsList", "jsx", "widgets", "useEffect", "descriptionId", "getTemplate", "getUiOptions", "jsx", "getTemplate", "getUiOptions", "jsx", "jsxs", "ArrayFieldItemButtonsTemplate", "Fragment", "jsx", "jsxs", "CopyButton", "MoveDownButton", "MoveUpButton", "RemoveButton", "getTemplate", "getUiOptions", "buttonId", "jsx", "jsxs", "ArrayFieldDescriptionTemplate", "ArrayFieldItemTemplate", "ArrayFieldTitleTemplate", "AddButton", "getTemplate", "getUiOptions", "titleId", "jsx", "useCallback", "Fragment", "jsx", "jsxs", "value", "jsx", "TranslatableString", "TranslatableString", "jsx", "jsx", "TranslatableString", "getTestIds", "getUiOptions", "Markdown", "jsx", "jsx", "TranslatableString", "jsx", "jsxs", "getTemplate", "getUiOptions", "jsx", "jsxs", "jsx", "jsxs", "getUiOptions", "WrapIfAdditionalTemplate", "getTemplate", "jsx", "jsx", "jsx", "descriptionId", "getTemplate", "getUiOptions", "titleId", "buttonId", "jsx", "jsxs", "AddButton", "jsx", "jsxs", "REQUIRED_FIELD_SYMBOL", "TranslatableString", "Markdown", "jsx", "jsxs", "ADDITIONAL_PROPERTY_FLAG", "buttonId", "TranslatableString", "jsx", "jsxs", "templates", "RemoveButton", "TranslatableString", "ADDITIONAL_PROPERTY_FLAG", "buttonId", "useCallback", "useEffect", "useState", "ariaDescribedByIds", "TranslatableString", "jsx", "jsxs", "SelectWidget", "value", "state", "jsx", "AltDateWidget", "useCallback", "ariaDescribedByIds", "descriptionId", "getTemplate", "jsx", "jsxs", "useCallback", "ariaDescribedByIds", "jsx", "jsxs", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "value", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "useMemo", "getTemplate", "TranslatableString", "Markdown", "Fragment", "jsx", "jsxs", "RemoveButton", "BaseInputTemplate", "jsx", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "ariaDescribedByIds", "enumOptionsIsSelected", "enumOptionsValueForIndex", "optionId", "jsx", "jsxs", "jsx", "jsxs", "BaseInputTemplate", "useCallback", "Fragment", "jsx", "jsxs", "useCallback", "ariaDescribedByIds", "enumOptionsValueForIndex", "jsx", "jsxs", "value", "disabled", "useCallback", "ariaDescribedByIds", "jsx", "value", "getTemplate", "jsx", "BaseInputTemplate", "useCallback", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "getTemplate", "jsx", "BaseInputTemplate", "jsx", "jsxs", "Component", "deepEquals", "mergeObjects", "getUiOptions", "getTemplate", "fields", "isObject", "templates", "widgets", "UI_GLOBAL_OPTIONS_KEY", "SubmitButton", "UI_OPTIONS_KEY", "jsx", "fields", "widgets", "templates"]
|
|
7
7
|
}
|