@rjsf/core 4.2.2 → 5.0.0-beta.2
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/README.md +2 -2
- package/dist/components/Form.d.ts +274 -45
- package/dist/components/fields/ArrayField.d.ts +6 -51
- package/dist/components/fields/BooleanField.d.ts +7 -44
- package/dist/components/fields/MultiSchemaField.d.ts +42 -38
- package/dist/components/fields/NullField.d.ts +7 -5
- package/dist/components/fields/NumberField.d.ts +3 -46
- package/dist/components/fields/ObjectField.d.ts +71 -20
- package/dist/components/fields/SchemaField.d.ts +9 -38
- package/dist/components/fields/StringField.d.ts +6 -44
- package/dist/components/fields/index.d.ts +3 -26
- package/dist/components/templates/ArrayFieldDescriptionTemplate.d.ts +7 -0
- package/dist/components/templates/ArrayFieldItemTemplate.d.ts +6 -0
- package/dist/components/templates/ArrayFieldTemplate.d.ts +6 -0
- package/dist/components/templates/ArrayFieldTitleTemplate.d.ts +7 -0
- package/dist/components/templates/BaseInputTemplate.d.ts +8 -0
- package/dist/components/templates/ButtonTemplates/AddButton.d.ts +4 -0
- package/dist/components/templates/ButtonTemplates/IconButton.d.ts +5 -0
- package/dist/components/templates/ButtonTemplates/SubmitButton.d.ts +4 -0
- package/dist/components/templates/ButtonTemplates/index.d.ts +3 -0
- package/dist/components/templates/DescriptionField.d.ts +6 -0
- package/dist/components/templates/ErrorList.d.ts +6 -0
- package/dist/components/templates/FieldTemplate/FieldTemplate.d.ts +7 -0
- package/dist/components/templates/FieldTemplate/Label.d.ts +13 -0
- package/dist/components/templates/FieldTemplate/WrapIfAdditional.d.ts +12 -0
- package/dist/components/templates/FieldTemplate/index.d.ts +2 -0
- package/dist/components/templates/ObjectFieldTemplate.d.ts +8 -0
- package/dist/components/templates/TitleField.d.ts +6 -0
- package/dist/components/templates/UnsupportedField.d.ts +8 -0
- package/dist/components/templates/index.d.ts +3 -0
- package/dist/components/widgets/AltDateTimeWidget.d.ts +7 -21
- package/dist/components/widgets/AltDateWidget.d.ts +5 -21
- package/dist/components/widgets/CheckboxWidget.d.ts +7 -17
- package/dist/components/widgets/CheckboxesWidget.d.ts +7 -25
- package/dist/components/widgets/ColorWidget.d.ts +7 -15
- package/dist/components/widgets/DateTimeWidget.d.ts +7 -8
- package/dist/components/widgets/DateWidget.d.ts +7 -8
- package/dist/components/widgets/EmailWidget.d.ts +6 -8
- package/dist/components/widgets/FileWidget.d.ts +6 -18
- package/dist/components/widgets/HiddenWidget.d.ts +7 -11
- package/dist/components/widgets/PasswordWidget.d.ts +6 -8
- package/dist/components/widgets/RadioWidget.d.ts +7 -21
- package/dist/components/widgets/RangeWidget.d.ts +7 -8
- package/dist/components/widgets/SelectWidget.d.ts +7 -23
- package/dist/components/widgets/TextWidget.d.ts +6 -9
- package/dist/components/widgets/TextareaWidget.d.ts +10 -22
- package/dist/components/widgets/URLWidget.d.ts +6 -8
- package/dist/components/widgets/UpDownWidget.d.ts +6 -8
- package/dist/components/widgets/index.d.ts +3 -43
- package/dist/core.cjs.development.js +2947 -4606
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +2897 -4566
- package/dist/core.esm.js.map +1 -1
- package/dist/core.umd.development.js +4049 -0
- package/dist/core.umd.development.js.map +1 -0
- package/dist/core.umd.production.min.js +2 -0
- package/dist/core.umd.production.min.js.map +1 -0
- package/dist/getDefaultRegistry.d.ts +6 -0
- package/dist/index.d.ts +5 -70
- package/dist/withTheme.d.ts +7 -9
- package/package.json +41 -68
- package/dist/components/AddButton.d.ts +0 -5
- package/dist/components/ErrorList.d.ts +0 -1
- package/dist/components/IconButton.d.ts +0 -1
- package/dist/components/fields/DescriptionField.d.ts +0 -9
- package/dist/components/fields/TitleField.d.ts +0 -10
- package/dist/components/fields/UnsupportedField.d.ts +0 -14
- package/dist/components/widgets/BaseInput.d.ts +0 -23
- package/dist/components/widgets/SubmitButton.d.ts +0 -3
- package/dist/defaultRegistry.d.ts +0 -41
- package/dist/react-jsonschema-form.js +0 -26
- package/dist/react-jsonschema-form.js.map +0 -1
- package/dist/types.d.ts +0 -50
- package/dist/utils.d.ts +0 -81
- package/dist/validate.d.ts +0 -21
- package/index.d.ts +0 -500
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.cjs.production.min.js","sources":["../src/components/IconButton.js","../src/components/AddButton.js","../src/types.js","../src/validate.js","../src/utils.js","../src/components/fields/ArrayField.js","../src/components/fields/BooleanField.js","../src/components/fields/MultiSchemaField.js","../src/components/fields/NumberField.js","../src/components/fields/ObjectField.js","../src/components/fields/SchemaField.js","../src/components/fields/StringField.js","../src/components/fields/index.js","../src/components/fields/DescriptionField.js","../src/components/fields/TitleField.js","../src/components/fields/NullField.js","../src/components/fields/UnsupportedField.js","../src/components/widgets/AltDateWidget.js","../src/components/widgets/AltDateTimeWidget.js","../src/components/widgets/BaseInput.js","../src/components/widgets/CheckboxWidget.js","../src/components/widgets/CheckboxesWidget.js","../src/components/widgets/FileWidget.js","../src/components/widgets/RadioWidget.js","../src/components/widgets/SelectWidget.js","../src/components/widgets/TextareaWidget.js","../src/components/widgets/index.js","../src/components/widgets/PasswordWidget.js","../src/components/widgets/UpDownWidget.js","../src/components/widgets/RangeWidget.js","../src/components/widgets/TextWidget.js","../src/components/widgets/DateWidget.js","../src/components/widgets/DateTimeWidget.js","../src/components/widgets/EmailWidget.js","../src/components/widgets/URLWidget.js","../src/components/widgets/HiddenWidget.js","../src/components/widgets/ColorWidget.js","../src/components/widgets/SubmitButton.js","../src/defaultRegistry.js","../src/components/Form.js","../src/withTheme.js","../src/components/ErrorList.js","../src/index.js"],"sourcesContent":["import React from \"react\";\n\nexport default function IconButton(props) {\n const { type = \"default\", icon, className, ...otherProps } = props;\n return (\n <button\n type=\"button\"\n className={`btn btn-${type} ${className}`}\n {...otherProps}>\n <i className={`glyphicon glyphicon-${icon}`} />\n </button>\n );\n}\n","import React from \"react\";\nimport IconButton from \"./IconButton\";\n\nexport default function AddButton({ className, onClick, disabled }) {\n return (\n <div className=\"row\">\n <p className={`col-xs-3 col-xs-offset-9 text-right ${className}`}>\n <IconButton\n type=\"info\"\n icon=\"plus\"\n className=\"btn-add col-xs-12\"\n aria-label=\"Add\"\n tabIndex=\"0\"\n onClick={onClick}\n disabled={disabled}\n />\n </p>\n </div>\n );\n}\n","import PropTypes from \"prop-types\";\n\nexport const registry = PropTypes.shape({\n ArrayFieldTemplate: PropTypes.elementType,\n FieldTemplate: PropTypes.elementType,\n ObjectFieldTemplate: PropTypes.elementType,\n definitions: PropTypes.object.isRequired,\n rootSchema: PropTypes.object,\n fields: PropTypes.objectOf(PropTypes.elementType).isRequired,\n formContext: PropTypes.object.isRequired,\n widgets: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n ).isRequired,\n});\n\nexport const fieldProps = {\n autofocus: PropTypes.bool,\n disabled: PropTypes.bool,\n errorSchema: PropTypes.object,\n formData: PropTypes.any,\n idSchema: PropTypes.object,\n onBlur: PropTypes.func,\n onChange: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n rawErrors: PropTypes.arrayOf(PropTypes.string),\n readonly: PropTypes.bool,\n registry: registry.isRequired,\n required: PropTypes.bool,\n schema: PropTypes.object.isRequired,\n uiSchema: PropTypes.shape({\n \"ui:options\": PropTypes.shape({\n addable: PropTypes.bool,\n orderable: PropTypes.bool,\n removable: PropTypes.bool,\n }),\n }),\n};\n","import toPath from \"lodash/toPath\";\nimport Ajv from \"ajv\";\nlet ajv = createAjvInstance();\nimport { deepEquals, getDefaultFormState } from \"./utils\";\n\nlet formerCustomFormats = null;\nlet formerMetaSchema = null;\nconst ROOT_SCHEMA_PREFIX = \"__rjsf_rootSchema\";\n\nimport { isObject, mergeObjects } from \"./utils\";\n\nfunction createAjvInstance() {\n const ajv = new Ajv({\n errorDataPath: \"property\",\n allErrors: true,\n multipleOfPrecision: 8,\n schemaId: \"auto\",\n unknownFormats: \"ignore\",\n });\n\n // add custom formats\n ajv.addFormat(\n \"data-url\",\n /^data:([a-z]+\\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/\n );\n ajv.addFormat(\n \"color\",\n /^(#?([0-9A-Fa-f]{3}){1,2}\\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\\(\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*,\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*,\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*\\))|(rgb\\(\\s*(\\d?\\d%|100%)+\\s*,\\s*(\\d?\\d%|100%)+\\s*,\\s*(\\d?\\d%|100%)+\\s*\\)))$/\n );\n return ajv;\n}\n\nfunction toErrorSchema(errors) {\n // Transforms a ajv validation errors list:\n // [\n // {property: \".level1.level2[2].level3\", message: \"err a\"},\n // {property: \".level1.level2[2].level3\", message: \"err b\"},\n // {property: \".level1.level2[4].level3\", message: \"err b\"},\n // ]\n // Into an error tree:\n // {\n // level1: {\n // level2: {\n // 2: {level3: {errors: [\"err a\", \"err b\"]}},\n // 4: {level3: {errors: [\"err b\"]}},\n // }\n // }\n // };\n if (!errors.length) {\n return {};\n }\n return errors.reduce((errorSchema, error) => {\n const { property, message } = error;\n const path = toPath(property);\n let parent = errorSchema;\n\n // If the property is at the root (.level1) then toPath creates\n // an empty array element at the first index. Remove it.\n if (path.length > 0 && path[0] === \"\") {\n path.splice(0, 1);\n }\n\n for (const segment of path.slice(0)) {\n if (!(segment in parent)) {\n parent[segment] = {};\n }\n parent = parent[segment];\n }\n\n if (Array.isArray(parent.__errors)) {\n // We store the list of errors for this node in a property named __errors\n // to avoid name collision with a possible sub schema field named\n // \"errors\" (see `validate.createErrorHandler`).\n parent.__errors = parent.__errors.concat(message);\n } else {\n if (message) {\n parent.__errors = [message];\n }\n }\n return errorSchema;\n }, {});\n}\n\nexport function toErrorList(errorSchema, fieldName = \"root\") {\n // XXX: We should transform fieldName as a full field path string.\n let errorList = [];\n if (\"__errors\" in errorSchema) {\n errorList = errorList.concat(\n errorSchema.__errors.map(stack => {\n return {\n stack: `${fieldName}: ${stack}`,\n };\n })\n );\n }\n return Object.keys(errorSchema).reduce((acc, key) => {\n if (key !== \"__errors\") {\n acc = acc.concat(toErrorList(errorSchema[key], key));\n }\n return acc;\n }, errorList);\n}\n\nfunction createErrorHandler(formData) {\n const handler = {\n // We store the list of errors for this node in a property named __errors\n // to avoid name collision with a possible sub schema field named\n // \"errors\" (see `utils.toErrorSchema`).\n __errors: [],\n addError(message) {\n this.__errors.push(message);\n },\n };\n if (isObject(formData)) {\n return Object.keys(formData).reduce((acc, key) => {\n return { ...acc, [key]: createErrorHandler(formData[key]) };\n }, handler);\n }\n if (Array.isArray(formData)) {\n return formData.reduce((acc, value, key) => {\n return { ...acc, [key]: createErrorHandler(value) };\n }, handler);\n }\n return handler;\n}\n\nfunction unwrapErrorHandler(errorHandler) {\n return Object.keys(errorHandler).reduce((acc, key) => {\n if (key === \"addError\") {\n return acc;\n } else if (key === \"__errors\") {\n return { ...acc, [key]: errorHandler[key] };\n }\n return { ...acc, [key]: unwrapErrorHandler(errorHandler[key]) };\n }, {});\n}\n\n/**\n * Transforming the error output from ajv to format used by jsonschema.\n * At some point, components should be updated to support ajv.\n */\nfunction transformAjvErrors(errors = []) {\n if (errors === null) {\n return [];\n }\n\n return errors.map(e => {\n const { dataPath, keyword, message, params, schemaPath } = e;\n let property = `${dataPath}`;\n\n // put data in expected format\n return {\n name: keyword,\n property,\n message,\n params, // specific to ajv\n stack: `${property} ${message}`.trim(),\n schemaPath,\n };\n });\n}\n\n/**\n * This function processes the formData with a user `validate` contributed\n * function, which receives the form data and an `errorHandler` object that\n * will be used to add custom validation errors for each field.\n */\nexport default function validateFormData(\n formData,\n schema,\n customValidate,\n transformErrors,\n additionalMetaSchemas = [],\n customFormats = {}\n) {\n // Include form data with undefined values, which is required for validation.\n const rootSchema = schema;\n formData = getDefaultFormState(schema, formData, rootSchema, true);\n\n const newMetaSchemas = !deepEquals(formerMetaSchema, additionalMetaSchemas);\n const newFormats = !deepEquals(formerCustomFormats, customFormats);\n\n if (newMetaSchemas || newFormats) {\n ajv = createAjvInstance();\n }\n\n // add more schemas to validate against\n if (\n additionalMetaSchemas &&\n newMetaSchemas &&\n Array.isArray(additionalMetaSchemas)\n ) {\n ajv.addMetaSchema(additionalMetaSchemas);\n formerMetaSchema = additionalMetaSchemas;\n }\n\n // add more custom formats to validate against\n if (customFormats && newFormats && isObject(customFormats)) {\n Object.keys(customFormats).forEach(formatName => {\n ajv.addFormat(formatName, customFormats[formatName]);\n });\n\n formerCustomFormats = customFormats;\n }\n\n let validationError = null;\n try {\n ajv.validate(schema, formData);\n } catch (err) {\n validationError = err;\n }\n\n let errors = transformAjvErrors(ajv.errors);\n // Clear errors to prevent persistent errors, see #1104\n\n ajv.errors = null;\n\n const noProperMetaSchema =\n validationError &&\n validationError.message &&\n typeof validationError.message === \"string\" &&\n validationError.message.includes(\"no schema with key or ref \");\n\n if (noProperMetaSchema) {\n errors = [\n ...errors,\n {\n stack: validationError.message,\n },\n ];\n }\n if (typeof transformErrors === \"function\") {\n errors = transformErrors(errors);\n }\n\n let errorSchema = toErrorSchema(errors);\n\n if (noProperMetaSchema) {\n errorSchema = {\n ...errorSchema,\n ...{\n $schema: {\n __errors: [validationError.message],\n },\n },\n };\n }\n\n if (typeof customValidate !== \"function\") {\n return { errors, errorSchema };\n }\n\n const errorHandler = customValidate(formData, createErrorHandler(formData));\n const userErrorSchema = unwrapErrorHandler(errorHandler);\n const newErrorSchema = mergeObjects(errorSchema, userErrorSchema, true);\n // XXX: The errors list produced is not fully compliant with the format\n // exposed by the jsonschema lib, which contains full field paths and other\n // properties.\n const newErrors = toErrorList(newErrorSchema);\n\n return {\n errors: newErrors,\n errorSchema: newErrorSchema,\n };\n}\n\n/**\n * Recursively prefixes all $ref's in a schema with `ROOT_SCHEMA_PREFIX`\n * This is used in isValid to make references to the rootSchema\n */\nexport function withIdRefPrefix(schemaNode) {\n let obj = schemaNode;\n if (schemaNode.constructor === Object) {\n obj = { ...schemaNode };\n for (const key in obj) {\n const value = obj[key];\n if (\n key === \"$ref\" &&\n typeof value === \"string\" &&\n value.startsWith(\"#\")\n ) {\n obj[key] = ROOT_SCHEMA_PREFIX + value;\n } else {\n obj[key] = withIdRefPrefix(value);\n }\n }\n } else if (Array.isArray(schemaNode)) {\n obj = [...schemaNode];\n for (var i = 0; i < obj.length; i++) {\n obj[i] = withIdRefPrefix(obj[i]);\n }\n }\n return obj;\n}\n\n/**\n * Validates data against a schema, returning true if the data is valid, or\n * false otherwise. If the schema is invalid, then this function will return\n * false.\n */\nexport function isValid(schema, data, rootSchema) {\n try {\n // add the rootSchema ROOT_SCHEMA_PREFIX as id.\n // then rewrite the schema ref's to point to the rootSchema\n // this accounts for the case where schema have references to models\n // that lives in the rootSchema but not in the schema in question.\n return ajv\n .addSchema(rootSchema, ROOT_SCHEMA_PREFIX)\n .validate(withIdRefPrefix(schema), data);\n } catch (e) {\n return false;\n } finally {\n // make sure we remove the rootSchema from the global ajv instance\n ajv.removeSchema(ROOT_SCHEMA_PREFIX);\n }\n}\n","import React from \"react\";\nimport * as ReactIs from \"react-is\";\nimport mergeAllOf from \"json-schema-merge-allof\";\nimport fill from \"core-js-pure/features/array/fill\";\nimport union from \"lodash/union\";\nimport jsonpointer from \"jsonpointer\";\nimport validateFormData, { isValid } from \"./validate\";\n\nexport const ADDITIONAL_PROPERTY_FLAG = \"__additional_property\";\n\nconst widgetMap = {\n boolean: {\n checkbox: \"CheckboxWidget\",\n radio: \"RadioWidget\",\n select: \"SelectWidget\",\n hidden: \"HiddenWidget\",\n },\n string: {\n text: \"TextWidget\",\n password: \"PasswordWidget\",\n email: \"EmailWidget\",\n hostname: \"TextWidget\",\n ipv4: \"TextWidget\",\n ipv6: \"TextWidget\",\n uri: \"URLWidget\",\n \"data-url\": \"FileWidget\",\n radio: \"RadioWidget\",\n select: \"SelectWidget\",\n textarea: \"TextareaWidget\",\n hidden: \"HiddenWidget\",\n date: \"DateWidget\",\n datetime: \"DateTimeWidget\",\n \"date-time\": \"DateTimeWidget\",\n \"alt-date\": \"AltDateWidget\",\n \"alt-datetime\": \"AltDateTimeWidget\",\n color: \"ColorWidget\",\n file: \"FileWidget\",\n },\n number: {\n text: \"TextWidget\",\n select: \"SelectWidget\",\n updown: \"UpDownWidget\",\n range: \"RangeWidget\",\n radio: \"RadioWidget\",\n hidden: \"HiddenWidget\",\n },\n integer: {\n text: \"TextWidget\",\n select: \"SelectWidget\",\n updown: \"UpDownWidget\",\n range: \"RangeWidget\",\n radio: \"RadioWidget\",\n hidden: \"HiddenWidget\",\n },\n array: {\n select: \"SelectWidget\",\n checkboxes: \"CheckboxesWidget\",\n files: \"FileWidget\",\n hidden: \"HiddenWidget\",\n },\n};\n\nexport function canExpand(schema, uiSchema, formData) {\n if (!schema.additionalProperties) {\n return false;\n }\n const { expandable } = getUiOptions(uiSchema);\n if (expandable === false) {\n return expandable;\n }\n // if ui:options.expandable was not explicitly set to false, we can add\n // another property if we have not exceeded maxProperties yet\n if (schema.maxProperties !== undefined) {\n return Object.keys(formData).length < schema.maxProperties;\n }\n return true;\n}\n\n/* Gets the type of a given schema. */\nexport function getSchemaType(schema) {\n let { type } = schema;\n\n if (!type && schema.const) {\n return guessType(schema.const);\n }\n\n if (!type && schema.enum) {\n return \"string\";\n }\n\n if (!type && (schema.properties || schema.additionalProperties)) {\n return \"object\";\n }\n\n if (type instanceof Array && type.length === 2 && type.includes(\"null\")) {\n return type.find(type => type !== \"null\");\n }\n\n return type;\n}\n\nexport function getWidget(schema, widget, registeredWidgets = {}) {\n const type = getSchemaType(schema);\n\n function mergeOptions(Widget) {\n // cache return value as property of widget for proper react reconciliation\n if (!Widget.MergedWidget) {\n const defaultOptions =\n (Widget.defaultProps && Widget.defaultProps.options) || {};\n Widget.MergedWidget = ({ options = {}, ...props }) => (\n <Widget options={{ ...defaultOptions, ...options }} {...props} />\n );\n }\n return Widget.MergedWidget;\n }\n\n if (\n typeof widget === \"function\" ||\n ReactIs.isForwardRef(React.createElement(widget)) ||\n ReactIs.isMemo(widget)\n ) {\n return mergeOptions(widget);\n }\n\n if (typeof widget !== \"string\") {\n throw new Error(`Unsupported widget definition: ${typeof widget}`);\n }\n\n if (registeredWidgets.hasOwnProperty(widget)) {\n const registeredWidget = registeredWidgets[widget];\n return getWidget(schema, registeredWidget, registeredWidgets);\n }\n\n if (!widgetMap.hasOwnProperty(type)) {\n throw new Error(`No widget for type \"${type}\"`);\n }\n\n if (widgetMap[type].hasOwnProperty(widget)) {\n const registeredWidget = registeredWidgets[widgetMap[type][widget]];\n return getWidget(schema, registeredWidget, registeredWidgets);\n }\n\n throw new Error(`No widget \"${widget}\" for type \"${type}\"`);\n}\n\nexport function hasWidget(schema, widget, registeredWidgets = {}) {\n try {\n getWidget(schema, widget, registeredWidgets);\n return true;\n } catch (e) {\n if (\n e.message &&\n (e.message.startsWith(\"No widget\") ||\n e.message.startsWith(\"Unsupported widget\"))\n ) {\n return false;\n }\n throw e;\n }\n}\n\nfunction computeDefaults(\n _schema,\n parentDefaults,\n rootSchema,\n rawFormData = {},\n includeUndefinedValues = false\n) {\n let schema = isObject(_schema) ? _schema : {};\n const formData = isObject(rawFormData) ? rawFormData : {};\n // Compute the defaults recursively: give highest priority to deepest nodes.\n let defaults = parentDefaults;\n if (isObject(defaults) && isObject(schema.default)) {\n // For object defaults, only override parent defaults that are defined in\n // schema.default.\n defaults = mergeObjects(defaults, schema.default);\n } else if (\"default\" in schema) {\n // Use schema defaults for this node.\n defaults = schema.default;\n } else if (\"$ref\" in schema) {\n // Use referenced schema defaults for this node.\n const refSchema = findSchemaDefinition(schema.$ref, rootSchema);\n return computeDefaults(\n refSchema,\n defaults,\n rootSchema,\n formData,\n includeUndefinedValues\n );\n } else if (\"dependencies\" in schema) {\n const resolvedSchema = resolveDependencies(schema, rootSchema, formData);\n return computeDefaults(\n resolvedSchema,\n defaults,\n rootSchema,\n formData,\n includeUndefinedValues\n );\n } else if (isFixedItems(schema)) {\n defaults = schema.items.map((itemSchema, idx) =>\n computeDefaults(\n itemSchema,\n Array.isArray(parentDefaults) ? parentDefaults[idx] : undefined,\n rootSchema,\n formData,\n includeUndefinedValues\n )\n );\n } else if (\"oneOf\" in schema) {\n schema =\n schema.oneOf[getMatchingOption(undefined, schema.oneOf, rootSchema)];\n } else if (\"anyOf\" in schema) {\n schema =\n schema.anyOf[getMatchingOption(undefined, schema.anyOf, rootSchema)];\n }\n\n // Not defaults defined for this node, fallback to generic typed ones.\n if (typeof defaults === \"undefined\") {\n defaults = schema.default;\n }\n\n switch (getSchemaType(schema)) {\n // We need to recur for object schema inner default values.\n case \"object\":\n return Object.keys(schema.properties || {}).reduce((acc, key) => {\n // Compute the defaults for this node, with the parent defaults we might\n // have from a previous run: defaults[key].\n let computedDefault = computeDefaults(\n schema.properties[key],\n (defaults || {})[key],\n rootSchema,\n (formData || {})[key],\n includeUndefinedValues\n );\n if (includeUndefinedValues || computedDefault !== undefined) {\n acc[key] = computedDefault;\n }\n return acc;\n }, {});\n\n case \"array\":\n // Inject defaults into existing array defaults\n if (Array.isArray(defaults)) {\n defaults = defaults.map((item, idx) => {\n return computeDefaults(\n schema.items[idx] || schema.additionalItems || {},\n item,\n rootSchema\n );\n });\n }\n\n // Deeply inject defaults into already existing form data\n if (Array.isArray(rawFormData)) {\n defaults = rawFormData.map((item, idx) => {\n return computeDefaults(\n schema.items,\n (defaults || {})[idx],\n rootSchema,\n item\n );\n });\n }\n if (schema.minItems) {\n if (!isMultiSelect(schema, rootSchema)) {\n const defaultsLength = defaults ? defaults.length : 0;\n if (schema.minItems > defaultsLength) {\n const defaultEntries = defaults || [];\n // populate the array with the defaults\n const fillerSchema = Array.isArray(schema.items)\n ? schema.additionalItems\n : schema.items;\n const fillerEntries = fill(\n new Array(schema.minItems - defaultsLength),\n computeDefaults(fillerSchema, fillerSchema.defaults, rootSchema)\n );\n // then fill up the rest with either the item default or empty, up to minItems\n\n return defaultEntries.concat(fillerEntries);\n }\n } else {\n return defaults ? defaults : [];\n }\n }\n }\n return defaults;\n}\n\nexport function getDefaultFormState(\n _schema,\n formData,\n rootSchema = {},\n includeUndefinedValues = false\n) {\n if (!isObject(_schema)) {\n throw new Error(\"Invalid schema: \" + _schema);\n }\n const schema = retrieveSchema(_schema, rootSchema, formData);\n const defaults = computeDefaults(\n schema,\n _schema.default,\n rootSchema,\n formData,\n includeUndefinedValues\n );\n if (typeof formData === \"undefined\") {\n // No form data? Use schema defaults.\n return defaults;\n }\n if (isObject(formData) || Array.isArray(formData)) {\n return mergeDefaultsWithFormData(defaults, formData);\n }\n if (formData === 0 || formData === false || formData === \"\") {\n return formData;\n }\n return formData || defaults;\n}\n\n/**\n * When merging defaults and form data, we want to merge in this specific way:\n * - objects are deeply merged\n * - arrays are merged in such a way that:\n * - when the array is set in form data, only array entries set in form data\n * are deeply merged; additional entries from the defaults are ignored\n * - when the array is not set in form data, the default is copied over\n * - scalars are overwritten/set by form data\n */\nexport function mergeDefaultsWithFormData(defaults, formData) {\n if (Array.isArray(formData)) {\n if (!Array.isArray(defaults)) {\n defaults = [];\n }\n return formData.map((value, idx) => {\n if (defaults[idx]) {\n return mergeDefaultsWithFormData(defaults[idx], value);\n }\n return value;\n });\n } else if (isObject(formData)) {\n const acc = Object.assign({}, defaults); // Prevent mutation of source object.\n return Object.keys(formData).reduce((acc, key) => {\n acc[key] = mergeDefaultsWithFormData(\n defaults ? defaults[key] : {},\n formData[key]\n );\n return acc;\n }, acc);\n } else {\n return formData;\n }\n}\n\nexport function getUiOptions(uiSchema) {\n // get all passed options from ui:widget, ui:options, and ui:<optionName>\n return Object.keys(uiSchema)\n .filter(key => key.indexOf(\"ui:\") === 0)\n .reduce((options, key) => {\n const value = uiSchema[key];\n if (key === \"ui:widget\" && isObject(value)) {\n console.warn(\n \"Setting options via ui:widget object is deprecated, use ui:options instead\"\n );\n return {\n ...options,\n ...(value.options || {}),\n widget: value.component,\n };\n }\n if (key === \"ui:options\" && isObject(value)) {\n return { ...options, ...value };\n }\n return { ...options, [key.substring(3)]: value };\n }, {});\n}\n\nexport function getSubmitButtonOptions(uiSchema) {\n const uiOptions = getUiOptions(uiSchema);\n const defaultOptions = {\n props: {\n disabled: false,\n },\n submitText: \"Submit\",\n norender: false,\n };\n if (uiOptions && uiOptions[\"submitButtonOptions\"]) {\n return Object.assign({}, defaultOptions, uiOptions[\"submitButtonOptions\"]);\n }\n\n return defaultOptions;\n}\n\nexport function getDisplayLabel(schema, uiSchema, rootSchema) {\n const uiOptions = getUiOptions(uiSchema);\n let { label: displayLabel = true } = uiOptions;\n const schemaType = getSchemaType(schema);\n\n if (schemaType === \"array\") {\n displayLabel =\n isMultiSelect(schema, rootSchema) ||\n isFilesArray(schema, uiSchema, rootSchema) ||\n isCustomWidget(uiSchema);\n }\n\n if (schemaType === \"object\") {\n displayLabel = false;\n }\n if (schemaType === \"boolean\" && !uiSchema[\"ui:widget\"]) {\n displayLabel = false;\n }\n if (uiSchema[\"ui:field\"]) {\n displayLabel = false;\n }\n return displayLabel;\n}\n\nexport function isObject(thing) {\n if (typeof File !== \"undefined\" && thing instanceof File) {\n return false;\n }\n return typeof thing === \"object\" && thing !== null && !Array.isArray(thing);\n}\n\nexport function mergeObjects(obj1, obj2, concatArrays = false) {\n // Recursively merge deeply nested objects.\n var acc = Object.assign({}, obj1); // Prevent mutation of source object.\n return Object.keys(obj2).reduce((acc, key) => {\n const left = obj1 ? obj1[key] : {},\n right = obj2[key];\n if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) {\n acc[key] = mergeObjects(left, right, concatArrays);\n } else if (concatArrays && Array.isArray(left) && Array.isArray(right)) {\n acc[key] = left.concat(right);\n } else {\n acc[key] = right;\n }\n return acc;\n }, acc);\n}\n\nexport function asNumber(value) {\n if (value === \"\") {\n return undefined;\n }\n if (value === null) {\n return null;\n }\n if (/\\.$/.test(value)) {\n // \"3.\" can't really be considered a number even if it parses in js. The\n // user is most likely entering a float.\n return value;\n }\n if (/\\.0$/.test(value)) {\n // we need to return this as a string here, to allow for input like 3.07\n return value;\n }\n const n = Number(value);\n const valid = typeof n === \"number\" && !Number.isNaN(n);\n\n if (/\\.\\d*0$/.test(value)) {\n // It's a number, that's cool - but we need it as a string so it doesn't screw\n // with the user when entering dollar amounts or other values (such as those with\n // specific precision or number of significant digits)\n return value;\n }\n\n return valid ? n : value;\n}\n\nexport function orderProperties(properties, order) {\n if (!Array.isArray(order)) {\n return properties;\n }\n\n const arrayToHash = arr =>\n arr.reduce((prev, curr) => {\n prev[curr] = true;\n return prev;\n }, {});\n const errorPropList = arr =>\n arr.length > 1\n ? `properties '${arr.join(\"', '\")}'`\n : `property '${arr[0]}'`;\n const propertyHash = arrayToHash(properties);\n const orderFiltered = order.filter(\n prop => prop === \"*\" || propertyHash[prop]\n );\n const orderHash = arrayToHash(orderFiltered);\n\n const rest = properties.filter(prop => !orderHash[prop]);\n const restIndex = orderFiltered.indexOf(\"*\");\n if (restIndex === -1) {\n if (rest.length) {\n throw new Error(\n `uiSchema order list does not contain ${errorPropList(rest)}`\n );\n }\n return orderFiltered;\n }\n if (restIndex !== orderFiltered.lastIndexOf(\"*\")) {\n throw new Error(\"uiSchema order list contains more than one wildcard item\");\n }\n\n const complete = [...orderFiltered];\n complete.splice(restIndex, 1, ...rest);\n return complete;\n}\n\n/**\n * This function checks if the given schema matches a single\n * constant value.\n */\nexport function isConstant(schema) {\n return (\n (Array.isArray(schema.enum) && schema.enum.length === 1) ||\n schema.hasOwnProperty(\"const\")\n );\n}\n\nexport function toConstant(schema) {\n if (Array.isArray(schema.enum) && schema.enum.length === 1) {\n return schema.enum[0];\n } else if (schema.hasOwnProperty(\"const\")) {\n return schema.const;\n } else {\n throw new Error(\"schema cannot be inferred as a constant\");\n }\n}\n\nexport function isSelect(_schema, rootSchema = {}) {\n const schema = retrieveSchema(_schema, rootSchema);\n const altSchemas = schema.oneOf || schema.anyOf;\n if (Array.isArray(schema.enum)) {\n return true;\n } else if (Array.isArray(altSchemas)) {\n return altSchemas.every(altSchemas => isConstant(altSchemas));\n }\n return false;\n}\n\nexport function isMultiSelect(schema, rootSchema = {}) {\n if (!schema.uniqueItems || !schema.items) {\n return false;\n }\n return isSelect(schema.items, rootSchema);\n}\n\nexport function isFilesArray(schema, uiSchema, rootSchema = {}) {\n if (uiSchema[\"ui:widget\"] === \"files\") {\n return true;\n } else if (schema.items) {\n const itemsSchema = retrieveSchema(schema.items, rootSchema);\n return itemsSchema.type === \"string\" && itemsSchema.format === \"data-url\";\n }\n return false;\n}\n\nexport function isFixedItems(schema) {\n return (\n Array.isArray(schema.items) &&\n schema.items.length > 0 &&\n schema.items.every(item => isObject(item))\n );\n}\n\nexport function isCustomWidget(uiSchema) {\n return (\n // TODO: Remove the `&& uiSchema[\"ui:widget\"] !== \"hidden\"` once we support hidden widgets for arrays.\n // https://react-jsonschema-form.readthedocs.io/en/latest/usage/widgets/#hidden-widgets\n \"widget\" in getUiOptions(uiSchema) &&\n getUiOptions(uiSchema)[\"widget\"] !== \"hidden\"\n );\n}\n\nexport function allowAdditionalItems(schema) {\n if (schema.additionalItems === true) {\n console.warn(\"additionalItems=true is currently not supported\");\n }\n return isObject(schema.additionalItems);\n}\n\nexport function optionsList(schema) {\n if (schema.enum) {\n return schema.enum.map((value, i) => {\n const label = (schema.enumNames && schema.enumNames[i]) || String(value);\n return { label, value };\n });\n } else {\n const altSchemas = schema.oneOf || schema.anyOf;\n return altSchemas.map(schema => {\n const value = toConstant(schema);\n const label = schema.title || String(value);\n return {\n schema,\n label,\n value,\n };\n });\n }\n}\n\nexport function findSchemaDefinition($ref, rootSchema = {}) {\n const origRef = $ref;\n if ($ref.startsWith(\"#\")) {\n // Decode URI fragment representation.\n $ref = decodeURIComponent($ref.substring(1));\n } else {\n throw new Error(`Could not find a definition for ${origRef}.`);\n }\n const current = jsonpointer.get(rootSchema, $ref);\n if (current === undefined) {\n throw new Error(`Could not find a definition for ${origRef}.`);\n }\n if (current.hasOwnProperty(\"$ref\")) {\n return findSchemaDefinition(current.$ref, rootSchema);\n }\n return current;\n}\n\n// In the case where we have to implicitly create a schema, it is useful to know what type to use\n// based on the data we are defining\nexport const guessType = function guessType(value) {\n if (Array.isArray(value)) {\n return \"array\";\n } else if (typeof value === \"string\") {\n return \"string\";\n } else if (value == null) {\n return \"null\";\n } else if (typeof value === \"boolean\") {\n return \"boolean\";\n } else if (!isNaN(value)) {\n return \"number\";\n } else if (typeof value === \"object\") {\n return \"object\";\n }\n // Default to string if we can't figure it out\n return \"string\";\n};\n\n// This function will create new \"properties\" items for each key in our formData\nexport function stubExistingAdditionalProperties(\n schema,\n rootSchema = {},\n formData = {}\n) {\n // Clone the schema so we don't ruin the consumer's original\n schema = {\n ...schema,\n properties: { ...schema.properties },\n };\n\n // make sure formData is an object\n formData = isObject(formData) ? formData : {};\n\n Object.keys(formData).forEach(key => {\n if (schema.properties.hasOwnProperty(key)) {\n // No need to stub, our schema already has the property\n return;\n }\n\n let additionalProperties;\n if (schema.additionalProperties.hasOwnProperty(\"$ref\")) {\n additionalProperties = retrieveSchema(\n { $ref: schema.additionalProperties[\"$ref\"] },\n rootSchema,\n formData\n );\n } else if (schema.additionalProperties.hasOwnProperty(\"type\")) {\n additionalProperties = { ...schema.additionalProperties };\n } else {\n additionalProperties = { type: guessType(formData[key]) };\n }\n\n // The type of our new key should match the additionalProperties value;\n schema.properties[key] = additionalProperties;\n // Set our additional property flag so we know it was dynamically added\n schema.properties[key][ADDITIONAL_PROPERTY_FLAG] = true;\n });\n\n return schema;\n}\n\n/**\n * Resolves a conditional block (if/else/then) by removing the condition and merging the appropriate conditional branch with the rest of the schema\n */\nconst resolveCondition = (schema, rootSchema, formData) => {\n let {\n if: expression,\n then,\n else: otherwise,\n ...resolvedSchemaLessConditional\n } = schema;\n\n const conditionalSchema = isValid(expression, formData, rootSchema)\n ? then\n : otherwise;\n\n if (conditionalSchema) {\n return retrieveSchema(\n mergeSchemas(\n resolvedSchemaLessConditional,\n retrieveSchema(conditionalSchema, rootSchema, formData)\n ),\n rootSchema,\n formData\n );\n } else {\n return retrieveSchema(resolvedSchemaLessConditional, rootSchema, formData);\n }\n};\n\n/**\n * Resolves references and dependencies within a schema and its 'allOf' children.\n *\n * Called internally by retrieveSchema.\n */\nexport function resolveSchema(schema, rootSchema = {}, formData = {}) {\n if (schema.hasOwnProperty(\"$ref\")) {\n return resolveReference(schema, rootSchema, formData);\n } else if (schema.hasOwnProperty(\"dependencies\")) {\n const resolvedSchema = resolveDependencies(schema, rootSchema, formData);\n return retrieveSchema(resolvedSchema, rootSchema, formData);\n } else if (schema.hasOwnProperty(\"allOf\")) {\n return {\n ...schema,\n allOf: schema.allOf.map(allOfSubschema =>\n retrieveSchema(allOfSubschema, rootSchema, formData)\n ),\n };\n } else {\n // No $ref or dependencies attribute found, returning the original schema.\n return schema;\n }\n}\n\nfunction resolveReference(schema, rootSchema, formData) {\n // Retrieve the referenced schema definition.\n const $refSchema = findSchemaDefinition(schema.$ref, rootSchema);\n // Drop the $ref property of the source schema.\n const { $ref, ...localSchema } = schema;\n // Update referenced schema definition with local schema properties.\n return retrieveSchema(\n { ...$refSchema, ...localSchema },\n rootSchema,\n formData\n );\n}\n\nexport function retrieveSchema(schema, rootSchema = {}, formData = {}) {\n if (!isObject(schema)) {\n return {};\n }\n let resolvedSchema = resolveSchema(schema, rootSchema, formData);\n\n if (schema.hasOwnProperty(\"if\")) {\n return resolveCondition(schema, rootSchema, formData);\n }\n\n // For each level of the dependency, we need to recursively determine the appropriate resolved schema given the current state of formData.\n // Otherwise, nested allOf subschemas will not be correctly displayed.\n if (resolvedSchema.properties) {\n const properties = {};\n\n Object.entries(resolvedSchema.properties).forEach(entries => {\n const propName = entries[0];\n const propSchema = entries[1];\n const rawPropData = formData && formData[propName];\n const propData = isObject(rawPropData) ? rawPropData : {};\n const resolvedPropSchema = retrieveSchema(\n propSchema,\n rootSchema,\n propData\n );\n\n properties[propName] = resolvedPropSchema;\n\n if (\n propSchema !== resolvedPropSchema &&\n resolvedSchema.properties !== properties\n ) {\n resolvedSchema = { ...resolvedSchema, properties };\n }\n });\n }\n\n if (\"allOf\" in schema) {\n try {\n resolvedSchema = mergeAllOf({\n ...resolvedSchema,\n allOf: resolvedSchema.allOf,\n });\n } catch (e) {\n console.warn(\"could not merge subschemas in allOf:\\n\" + e);\n const { allOf, ...resolvedSchemaWithoutAllOf } = resolvedSchema;\n return resolvedSchemaWithoutAllOf;\n }\n }\n const hasAdditionalProperties =\n resolvedSchema.hasOwnProperty(\"additionalProperties\") &&\n resolvedSchema.additionalProperties !== false;\n if (hasAdditionalProperties) {\n return stubExistingAdditionalProperties(\n resolvedSchema,\n rootSchema,\n formData\n );\n }\n return resolvedSchema;\n}\n\nfunction resolveDependencies(schema, rootSchema, formData) {\n // Drop the dependencies from the source schema.\n let { dependencies = {}, ...resolvedSchema } = schema;\n if (\"oneOf\" in resolvedSchema) {\n resolvedSchema =\n resolvedSchema.oneOf[\n getMatchingOption(formData, resolvedSchema.oneOf, rootSchema)\n ];\n } else if (\"anyOf\" in resolvedSchema) {\n resolvedSchema =\n resolvedSchema.anyOf[\n getMatchingOption(formData, resolvedSchema.anyOf, rootSchema)\n ];\n }\n return processDependencies(\n dependencies,\n resolvedSchema,\n rootSchema,\n formData\n );\n}\nfunction processDependencies(\n dependencies,\n resolvedSchema,\n rootSchema,\n formData\n) {\n // Process dependencies updating the local schema properties as appropriate.\n for (const dependencyKey in dependencies) {\n // Skip this dependency if its trigger property is not present.\n if (formData[dependencyKey] === undefined) {\n continue;\n }\n // Skip this dependency if it is not included in the schema (such as when dependencyKey is itself a hidden dependency.)\n if (\n resolvedSchema.properties &&\n !(dependencyKey in resolvedSchema.properties)\n ) {\n continue;\n }\n const {\n [dependencyKey]: dependencyValue,\n ...remainingDependencies\n } = dependencies;\n if (Array.isArray(dependencyValue)) {\n resolvedSchema = withDependentProperties(resolvedSchema, dependencyValue);\n } else if (isObject(dependencyValue)) {\n resolvedSchema = withDependentSchema(\n resolvedSchema,\n rootSchema,\n formData,\n dependencyKey,\n dependencyValue\n );\n }\n return processDependencies(\n remainingDependencies,\n resolvedSchema,\n rootSchema,\n formData\n );\n }\n return resolvedSchema;\n}\n\nfunction withDependentProperties(schema, additionallyRequired) {\n if (!additionallyRequired) {\n return schema;\n }\n const required = Array.isArray(schema.required)\n ? Array.from(new Set([...schema.required, ...additionallyRequired]))\n : additionallyRequired;\n return { ...schema, required: required };\n}\n\nfunction withDependentSchema(\n schema,\n rootSchema,\n formData,\n dependencyKey,\n dependencyValue\n) {\n let { oneOf, ...dependentSchema } = retrieveSchema(\n dependencyValue,\n rootSchema,\n formData\n );\n schema = mergeSchemas(schema, dependentSchema);\n // Since it does not contain oneOf, we return the original schema.\n if (oneOf === undefined) {\n return schema;\n } else if (!Array.isArray(oneOf)) {\n throw new Error(`invalid: it is some ${typeof oneOf} instead of an array`);\n }\n // Resolve $refs inside oneOf.\n const resolvedOneOf = oneOf.map(subschema =>\n subschema.hasOwnProperty(\"$ref\")\n ? resolveReference(subschema, rootSchema, formData)\n : subschema\n );\n return withExactlyOneSubschema(\n schema,\n rootSchema,\n formData,\n dependencyKey,\n resolvedOneOf\n );\n}\n\nfunction withExactlyOneSubschema(\n schema,\n rootSchema,\n formData,\n dependencyKey,\n oneOf\n) {\n const validSubschemas = oneOf.filter(subschema => {\n if (!subschema.properties) {\n return false;\n }\n const { [dependencyKey]: conditionPropertySchema } = subschema.properties;\n if (conditionPropertySchema) {\n const conditionSchema = {\n type: \"object\",\n properties: {\n [dependencyKey]: conditionPropertySchema,\n },\n };\n const { errors } = validateFormData(formData, conditionSchema);\n return errors.length === 0;\n }\n });\n if (validSubschemas.length !== 1) {\n console.warn(\n \"ignoring oneOf in dependencies because there isn't exactly one subschema that is valid\"\n );\n return schema;\n }\n const subschema = validSubschemas[0];\n const {\n [dependencyKey]: conditionPropertySchema,\n ...dependentSubschema\n } = subschema.properties;\n const dependentSchema = { ...subschema, properties: dependentSubschema };\n return mergeSchemas(\n schema,\n retrieveSchema(dependentSchema, rootSchema, formData)\n );\n}\n\n// Recursively merge deeply nested schemas.\n// The difference between mergeSchemas and mergeObjects\n// is that mergeSchemas only concats arrays for\n// values under the \"required\" keyword, and when it does,\n// it doesn't include duplicate values.\nexport function mergeSchemas(obj1, obj2) {\n var acc = Object.assign({}, obj1); // Prevent mutation of source object.\n return Object.keys(obj2).reduce((acc, key) => {\n const left = obj1 ? obj1[key] : {},\n right = obj2[key];\n if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) {\n acc[key] = mergeSchemas(left, right);\n } else if (\n obj1 &&\n obj2 &&\n (getSchemaType(obj1) === \"object\" || getSchemaType(obj2) === \"object\") &&\n key === \"required\" &&\n Array.isArray(left) &&\n Array.isArray(right)\n ) {\n // Don't include duplicate values when merging\n // \"required\" fields.\n acc[key] = union(left, right);\n } else {\n acc[key] = right;\n }\n return acc;\n }, acc);\n}\n\nfunction isArguments(object) {\n return Object.prototype.toString.call(object) === \"[object Arguments]\";\n}\n\nexport function deepEquals(a, b, ca = [], cb = []) {\n // Partially extracted from node-deeper and adapted to exclude comparison\n // checks for functions.\n // https://github.com/othiym23/node-deeper\n if (a === b) {\n return true;\n } else if (typeof a === \"function\" || typeof b === \"function\") {\n // Assume all functions are equivalent\n // see https://github.com/rjsf-team/react-jsonschema-form/issues/255\n return true;\n } else if (typeof a !== \"object\" || typeof b !== \"object\") {\n return false;\n } else if (a === null || b === null) {\n return false;\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n } else if (a instanceof RegExp && b instanceof RegExp) {\n return (\n a.source === b.source &&\n a.global === b.global &&\n a.multiline === b.multiline &&\n a.lastIndex === b.lastIndex &&\n a.ignoreCase === b.ignoreCase\n );\n } else if (isArguments(a) || isArguments(b)) {\n if (!(isArguments(a) && isArguments(b))) {\n return false;\n }\n let slice = Array.prototype.slice;\n return deepEquals(slice.call(a), slice.call(b), ca, cb);\n } else {\n if (a.constructor !== b.constructor) {\n return false;\n }\n\n let ka = Object.keys(a);\n let kb = Object.keys(b);\n // don't bother with stack acrobatics if there's nothing there\n if (ka.length === 0 && kb.length === 0) {\n return true;\n }\n if (ka.length !== kb.length) {\n return false;\n }\n\n let cal = ca.length;\n while (cal--) {\n if (ca[cal] === a) {\n return cb[cal] === b;\n }\n }\n ca.push(a);\n cb.push(b);\n\n ka.sort();\n kb.sort();\n for (var j = ka.length - 1; j >= 0; j--) {\n if (ka[j] !== kb[j]) {\n return false;\n }\n }\n\n let key;\n for (let k = ka.length - 1; k >= 0; k--) {\n key = ka[k];\n if (!deepEquals(a[key], b[key], ca, cb)) {\n return false;\n }\n }\n\n ca.pop();\n cb.pop();\n\n return true;\n }\n}\n\nexport function shouldRender(comp, nextProps, nextState) {\n const { props, state } = comp;\n return !deepEquals(props, nextProps) || !deepEquals(state, nextState);\n}\n\nexport function toIdSchema(\n schema,\n id,\n rootSchema,\n formData = {},\n idPrefix = \"root\",\n idSeparator = \"_\"\n) {\n const idSchema = {\n $id: id || idPrefix,\n };\n if (\"$ref\" in schema || \"dependencies\" in schema || \"allOf\" in schema) {\n const _schema = retrieveSchema(schema, rootSchema, formData);\n return toIdSchema(_schema, id, rootSchema, formData, idPrefix, idSeparator);\n }\n if (\"items\" in schema && !schema.items.$ref) {\n return toIdSchema(\n schema.items,\n id,\n rootSchema,\n formData,\n idPrefix,\n idSeparator\n );\n }\n if (schema.type !== \"object\") {\n return idSchema;\n }\n for (const name in schema.properties || {}) {\n const field = schema.properties[name];\n const fieldId = idSchema.$id + idSeparator + name;\n idSchema[name] = toIdSchema(\n isObject(field) ? field : {},\n fieldId,\n rootSchema,\n // It's possible that formData is not an object -- this can happen if an\n // array item has just been added, but not populated with data yet\n (formData || {})[name],\n idPrefix,\n idSeparator\n );\n }\n return idSchema;\n}\n\nexport function toPathSchema(schema, name = \"\", rootSchema, formData = {}) {\n const pathSchema = {\n $name: name.replace(/^\\./, \"\"),\n };\n if (\"$ref\" in schema || \"dependencies\" in schema || \"allOf\" in schema) {\n const _schema = retrieveSchema(schema, rootSchema, formData);\n return toPathSchema(_schema, name, rootSchema, formData);\n }\n\n if (schema.hasOwnProperty(\"additionalProperties\")) {\n pathSchema.__rjsf_additionalProperties = true;\n }\n\n if (schema.hasOwnProperty(\"items\") && Array.isArray(formData)) {\n formData.forEach((element, i) => {\n pathSchema[i] = toPathSchema(\n schema.items,\n `${name}.${i}`,\n rootSchema,\n element\n );\n });\n } else if (schema.hasOwnProperty(\"properties\")) {\n for (const property in schema.properties) {\n pathSchema[property] = toPathSchema(\n schema.properties[property],\n `${name}.${property}`,\n rootSchema,\n // It's possible that formData is not an object -- this can happen if an\n // array item has just been added, but not populated with data yet\n (formData || {})[property]\n );\n }\n }\n return pathSchema;\n}\n\nexport function parseDateString(dateString, includeTime = true) {\n if (!dateString) {\n return {\n year: -1,\n month: -1,\n day: -1,\n hour: includeTime ? -1 : 0,\n minute: includeTime ? -1 : 0,\n second: includeTime ? -1 : 0,\n };\n }\n const date = new Date(dateString);\n if (Number.isNaN(date.getTime())) {\n throw new Error(\"Unable to parse date \" + dateString);\n }\n return {\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1, // oh you, javascript.\n day: date.getUTCDate(),\n hour: includeTime ? date.getUTCHours() : 0,\n minute: includeTime ? date.getUTCMinutes() : 0,\n second: includeTime ? date.getUTCSeconds() : 0,\n };\n}\n\nexport function toDateString(\n { year, month, day, hour = 0, minute = 0, second = 0 },\n time = true\n) {\n const utcTime = Date.UTC(year, month - 1, day, hour, minute, second);\n const datetime = new Date(utcTime).toJSON();\n return time ? datetime : datetime.slice(0, 10);\n}\n\nexport function utcToLocal(jsonDate) {\n if (!jsonDate) {\n return \"\";\n }\n\n // required format of `\"yyyy-MM-ddThh:mm\" followed by optional \":ss\" or \":ss.SSS\"\n // https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local)\n // > should be a _valid local date and time string_ (not GMT)\n\n // Note - date constructor passed local ISO-8601 does not correctly\n // change time to UTC in node pre-8\n const date = new Date(jsonDate);\n\n const yyyy = pad(date.getFullYear(), 4);\n const MM = pad(date.getMonth() + 1, 2);\n const dd = pad(date.getDate(), 2);\n const hh = pad(date.getHours(), 2);\n const mm = pad(date.getMinutes(), 2);\n const ss = pad(date.getSeconds(), 2);\n const SSS = pad(date.getMilliseconds(), 3);\n\n return `${yyyy}-${MM}-${dd}T${hh}:${mm}:${ss}.${SSS}`;\n}\n\nexport function localToUTC(dateString) {\n if (dateString) {\n return new Date(dateString).toJSON();\n }\n}\n\nexport function pad(num, size) {\n let s = String(num);\n while (s.length < size) {\n s = \"0\" + s;\n }\n return s;\n}\n\nexport function dataURItoBlob(dataURI) {\n // Split metadata from data\n const splitted = dataURI.split(\",\");\n // Split params\n const params = splitted[0].split(\";\");\n // Get mime-type from params\n const type = params[0].replace(\"data:\", \"\");\n // Filter the name property from params\n const properties = params.filter(param => {\n return param.split(\"=\")[0] === \"name\";\n });\n // Look for the name and use unknown if no name property.\n let name;\n if (properties.length !== 1) {\n name = \"unknown\";\n } else {\n // Because we filtered out the other property,\n // we only have the name case here.\n name = properties[0].split(\"=\")[1];\n }\n\n // Built the Uint8Array Blob parameter from the base64 string.\n const binary = atob(splitted[1]);\n const array = [];\n for (let i = 0; i < binary.length; i++) {\n array.push(binary.charCodeAt(i));\n }\n // Create the blob object\n const blob = new window.Blob([new Uint8Array(array)], { type });\n\n return { blob, name };\n}\n\nexport function rangeSpec(schema) {\n const spec = {};\n if (schema.multipleOf) {\n spec.step = schema.multipleOf;\n }\n if (schema.minimum || schema.minimum === 0) {\n spec.min = schema.minimum;\n }\n if (schema.maximum || schema.maximum === 0) {\n spec.max = schema.maximum;\n }\n return spec;\n}\n\nexport function getMatchingOption(formData, options, rootSchema) {\n // For performance, skip validating subschemas if formData is undefined. We just\n // want to get the first option in that case.\n if (formData === undefined) {\n return 0;\n }\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n\n // If the schema describes an object then we need to add slightly more\n // strict matching to the schema, because unless the schema uses the\n // \"requires\" keyword, an object will match the schema as long as it\n // doesn't have matching keys with a conflicting type. To do this we use an\n // \"anyOf\" with an array of requires. This augmentation expresses that the\n // schema should match if any of the keys in the schema are present on the\n // object and pass validation.\n if (option.properties) {\n // Create an \"anyOf\" schema that requires at least one of the keys in the\n // \"properties\" object\n const requiresAnyOf = {\n anyOf: Object.keys(option.properties).map(key => ({\n required: [key],\n })),\n };\n\n let augmentedSchema;\n\n // If the \"anyOf\" keyword already exists, wrap the augmentation in an \"allOf\"\n if (option.anyOf) {\n // Create a shallow clone of the option\n const { ...shallowClone } = option;\n\n if (!shallowClone.allOf) {\n shallowClone.allOf = [];\n } else {\n // If \"allOf\" already exists, shallow clone the array\n shallowClone.allOf = shallowClone.allOf.slice();\n }\n\n shallowClone.allOf.push(requiresAnyOf);\n\n augmentedSchema = shallowClone;\n } else {\n augmentedSchema = Object.assign({}, option, requiresAnyOf);\n }\n\n // Remove the \"required\" field as it's likely that not all fields have\n // been filled in yet, which will mean that the schema is not valid\n delete augmentedSchema.required;\n\n if (isValid(augmentedSchema, formData, rootSchema)) {\n return i;\n }\n } else if (isValid(option, formData, rootSchema)) {\n return i;\n }\n }\n return 0;\n}\n\n// Check to see if a schema specifies that a value must be true\nexport function schemaRequiresTrueValue(schema) {\n // Check if const is a truthy value\n if (schema.const) {\n return true;\n }\n\n // Check if an enum has a single value of true\n if (schema.enum && schema.enum.length === 1 && schema.enum[0] === true) {\n return true;\n }\n\n // If anyOf has a single value, evaluate the subschema\n if (schema.anyOf && schema.anyOf.length === 1) {\n return schemaRequiresTrueValue(schema.anyOf[0]);\n }\n\n // If oneOf has a single value, evaluate the subschema\n if (schema.oneOf && schema.oneOf.length === 1) {\n return schemaRequiresTrueValue(schema.oneOf[0]);\n }\n\n // Evaluate each subschema in allOf, to see if one of them requires a true\n // value\n if (schema.allOf) {\n return schema.allOf.some(schemaRequiresTrueValue);\n }\n\n return false;\n}\n","import AddButton from \"../AddButton\";\nimport IconButton from \"../IconButton\";\nimport React, { Component } from \"react\";\nimport includes from \"core-js-pure/es/array/includes\";\nimport * as types from \"../../types\";\n\nimport {\n getWidget,\n getDefaultFormState,\n getUiOptions,\n isMultiSelect,\n isFilesArray,\n isFixedItems,\n allowAdditionalItems,\n isCustomWidget,\n optionsList,\n retrieveSchema,\n toIdSchema,\n} from \"../../utils\";\nimport { nanoid } from \"nanoid\";\n\nfunction ArrayFieldTitle({ TitleField, idSchema, title, required }) {\n if (!title) {\n return null;\n }\n const id = `${idSchema.$id}__title`;\n return <TitleField id={id} title={title} required={required} />;\n}\n\nfunction ArrayFieldDescription({ DescriptionField, idSchema, description }) {\n if (!description) {\n return null;\n }\n const id = `${idSchema.$id}__description`;\n return <DescriptionField id={id} description={description} />;\n}\n\n// Used in the two templates\nfunction DefaultArrayItem(props) {\n const btnStyle = {\n flex: 1,\n paddingLeft: 6,\n paddingRight: 6,\n fontWeight: \"bold\",\n };\n return (\n <div key={props.key} className={props.className}>\n <div className={props.hasToolbar ? \"col-xs-9\" : \"col-xs-12\"}>\n {props.children}\n </div>\n\n {props.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 {(props.hasMoveUp || props.hasMoveDown) && (\n <IconButton\n icon=\"arrow-up\"\n aria-label=\"Move up\"\n className=\"array-item-move-up\"\n tabIndex=\"-1\"\n style={btnStyle}\n disabled={props.disabled || props.readonly || !props.hasMoveUp}\n onClick={props.onReorderClick(props.index, props.index - 1)}\n />\n )}\n\n {(props.hasMoveUp || props.hasMoveDown) && (\n <IconButton\n icon=\"arrow-down\"\n className=\"array-item-move-down\"\n aria-label=\"Move down\"\n tabIndex=\"-1\"\n style={btnStyle}\n disabled={\n props.disabled || props.readonly || !props.hasMoveDown\n }\n onClick={props.onReorderClick(props.index, props.index + 1)}\n />\n )}\n\n {props.hasRemove && (\n <IconButton\n type=\"danger\"\n icon=\"remove\"\n aria-label=\"Remove\"\n className=\"array-item-remove\"\n tabIndex=\"-1\"\n style={btnStyle}\n disabled={props.disabled || props.readonly}\n onClick={props.onDropIndexClick(props.index)}\n />\n )}\n </div>\n </div>\n )}\n </div>\n );\n}\n\nfunction DefaultFixedArrayFieldTemplate(props) {\n return (\n <fieldset className={props.className} id={props.idSchema.$id}>\n <ArrayFieldTitle\n key={`array-field-title-${props.idSchema.$id}`}\n TitleField={props.TitleField}\n idSchema={props.idSchema}\n title={props.uiSchema[\"ui:title\"] || props.title}\n required={props.required}\n />\n\n {(props.uiSchema[\"ui:description\"] || props.schema.description) && (\n <div\n className=\"field-description\"\n key={`field-description-${props.idSchema.$id}`}>\n {props.uiSchema[\"ui:description\"] || props.schema.description}\n </div>\n )}\n\n <div\n className=\"row array-item-list\"\n key={`array-item-list-${props.idSchema.$id}`}>\n {props.items && props.items.map(DefaultArrayItem)}\n </div>\n\n {props.canAdd && (\n <AddButton\n className=\"array-item-add\"\n onClick={props.onAddClick}\n disabled={props.disabled || props.readonly}\n />\n )}\n </fieldset>\n );\n}\n\nfunction DefaultNormalArrayFieldTemplate(props) {\n return (\n <fieldset className={props.className} id={props.idSchema.$id}>\n <ArrayFieldTitle\n key={`array-field-title-${props.idSchema.$id}`}\n TitleField={props.TitleField}\n idSchema={props.idSchema}\n title={props.uiSchema[\"ui:title\"] || props.title}\n required={props.required}\n />\n\n {(props.uiSchema[\"ui:description\"] || props.schema.description) && (\n <ArrayFieldDescription\n key={`array-field-description-${props.idSchema.$id}`}\n DescriptionField={props.DescriptionField}\n idSchema={props.idSchema}\n description={\n props.uiSchema[\"ui:description\"] || props.schema.description\n }\n />\n )}\n\n <div\n className=\"row array-item-list\"\n key={`array-item-list-${props.idSchema.$id}`}>\n {props.items && props.items.map(p => DefaultArrayItem(p))}\n </div>\n\n {props.canAdd && (\n <AddButton\n className=\"array-item-add\"\n onClick={props.onAddClick}\n disabled={props.disabled || props.readonly}\n />\n )}\n </fieldset>\n );\n}\n\nfunction generateRowId() {\n return nanoid();\n}\n\nfunction generateKeyedFormData(formData) {\n return !Array.isArray(formData)\n ? []\n : formData.map(item => {\n return {\n key: generateRowId(),\n item,\n };\n });\n}\n\nfunction keyedToPlainFormData(keyedFormData) {\n return keyedFormData.map(keyedItem => keyedItem.item);\n}\n\nclass ArrayField extends Component {\n static defaultProps = {\n uiSchema: {},\n formData: [],\n idSchema: {},\n required: false,\n disabled: false,\n readonly: false,\n autofocus: false,\n };\n\n constructor(props) {\n super(props);\n const { formData } = props;\n const keyedFormData = generateKeyedFormData(formData);\n this.state = {\n keyedFormData,\n updatedKeyedFormData: false,\n };\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\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 = 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(nextFormData);\n return {\n keyedFormData: newKeyedFormData,\n };\n }\n\n get itemTitle() {\n const { schema } = this.props;\n return schema.items.title || schema.items.description || \"Item\";\n }\n\n isItemRequired(itemSchema) {\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 !includes(itemSchema.type, \"null\");\n }\n // All non-null array item types are inherently required by design\n return itemSchema.type !== \"null\";\n }\n\n canAddItem(formItems) {\n const { schema, uiSchema } = this.props;\n let { addable } = getUiOptions(uiSchema);\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 _getNewFormDataRow = () => {\n const { schema, registry } = this.props;\n const { rootSchema } = registry;\n let itemSchema = schema.items;\n if (isFixedItems(schema) && allowAdditionalItems(schema)) {\n itemSchema = schema.additionalItems;\n }\n return getDefaultFormState(itemSchema, undefined, rootSchema);\n };\n\n onAddClick = event => {\n if (event) {\n event.preventDefault();\n }\n\n const { onChange } = this.props;\n const newKeyedFormDataRow = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n const newKeyedFormData = [...this.state.keyedFormData, newKeyedFormDataRow];\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData))\n );\n };\n\n onAddIndexClick = index => {\n return event => {\n if (event) {\n event.preventDefault();\n }\n const { onChange } = this.props;\n const newKeyedFormDataRow = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n let newKeyedFormData = [...this.state.keyedFormData];\n newKeyedFormData.splice(index, 0, newKeyedFormDataRow);\n\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData))\n );\n };\n };\n\n onDropIndexClick = index => {\n return event => {\n if (event) {\n event.preventDefault();\n }\n const { onChange } = this.props;\n const { keyedFormData } = this.state;\n // refs #195: revalidate to ensure properly reindexing errors\n let newErrorSchema;\n if (this.props.errorSchema) {\n newErrorSchema = {};\n const errorSchema = this.props.errorSchema;\n for (let i in errorSchema) {\n i = parseInt(i);\n if (i < index) {\n newErrorSchema[i] = errorSchema[i];\n } else if (i > index) {\n newErrorSchema[i - 1] = errorSchema[i];\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)\n );\n };\n };\n\n onReorderClick = (index, newIndex) => {\n return event => {\n if (event) {\n event.preventDefault();\n event.target.blur();\n }\n const { onChange } = this.props;\n let newErrorSchema;\n if (this.props.errorSchema) {\n newErrorSchema = {};\n const errorSchema = this.props.errorSchema;\n for (let i in errorSchema) {\n if (i == index) {\n newErrorSchema[newIndex] = errorSchema[index];\n } else if (i == newIndex) {\n newErrorSchema[index] = errorSchema[newIndex];\n } else {\n newErrorSchema[i] = errorSchema[i];\n }\n }\n }\n\n const { keyedFormData } = this.state;\n function reOrderArray() {\n // Copy item\n let _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)\n );\n };\n };\n\n onChangeForIndex = index => {\n return (value, errorSchema) => {\n const { formData, onChange } = this.props;\n const newFormData = formData.map((item, i) => {\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 this.props.errorSchema && {\n ...this.props.errorSchema,\n [index]: errorSchema,\n }\n );\n };\n };\n\n onSelectChange = value => {\n this.props.onChange(value);\n };\n\n render() {\n const { schema, uiSchema, idSchema, registry } = this.props;\n const { rootSchema } = registry;\n if (!schema.hasOwnProperty(\"items\")) {\n const { fields } = registry;\n const { UnsupportedField } = fields;\n\n return (\n <UnsupportedField\n schema={schema}\n idSchema={idSchema}\n reason=\"Missing items definition\"\n />\n );\n }\n if (isMultiSelect(schema, rootSchema)) {\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(uiSchema)) {\n return this.renderCustomWidget();\n }\n if (isFixedItems(schema)) {\n return this.renderFixedArray();\n }\n if (isFilesArray(schema, uiSchema, rootSchema)) {\n return this.renderFiles();\n }\n return this.renderNormalArray();\n }\n\n renderNormalArray() {\n const {\n schema,\n uiSchema,\n errorSchema,\n idSchema,\n name,\n required,\n disabled,\n readonly,\n hideError,\n autofocus,\n registry,\n onBlur,\n onFocus,\n idPrefix,\n idSeparator = \"_\",\n rawErrors,\n } = this.props;\n const title = schema.title === undefined ? name : schema.title;\n const { ArrayFieldTemplate, rootSchema, fields, formContext } = registry;\n const { TitleField, DescriptionField } = fields;\n const itemsSchema = retrieveSchema(schema.items, rootSchema);\n const formData = keyedToPlainFormData(this.state.keyedFormData);\n const arrayProps = {\n canAdd: this.canAddItem(formData),\n items: this.state.keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n const itemSchema = retrieveSchema(schema.items, rootSchema, item);\n const itemErrorSchema = errorSchema ? errorSchema[index] : undefined;\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = toIdSchema(\n itemSchema,\n itemIdPrefix,\n rootSchema,\n item,\n idPrefix,\n idSeparator\n );\n return this.renderArrayFieldItem({\n key,\n index,\n canMoveUp: index > 0,\n canMoveDown: index < formData.length - 1,\n itemSchema: itemSchema,\n itemIdSchema,\n itemErrorSchema,\n itemData: item,\n itemUiSchema: uiSchema.items,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n });\n }),\n className: `field field-array field-array-of-${itemsSchema.type}`,\n DescriptionField,\n disabled,\n idSchema,\n uiSchema,\n onAddClick: this.onAddClick,\n readonly,\n hideError,\n required,\n schema,\n title,\n TitleField,\n formContext,\n formData,\n rawErrors,\n registry,\n };\n\n // Check if a custom render function was passed in\n const Component =\n uiSchema[\"ui:ArrayFieldTemplate\"] ||\n ArrayFieldTemplate ||\n DefaultNormalArrayFieldTemplate;\n return <Component {...arrayProps} />;\n }\n\n renderCustomWidget() {\n const {\n schema,\n idSchema,\n uiSchema,\n disabled,\n readonly,\n hideError,\n required,\n placeholder,\n autofocus,\n onBlur,\n onFocus,\n formData: items,\n registry,\n rawErrors,\n name,\n } = this.props;\n const { widgets, formContext } = registry;\n const title = schema.title || name;\n\n const { widget, ...options } = {\n ...getUiOptions(uiSchema),\n };\n const Widget = getWidget(schema, widget, widgets);\n return (\n <Widget\n id={idSchema && idSchema.$id}\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={title}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n renderMultiSelect() {\n const {\n schema,\n idSchema,\n uiSchema,\n formData,\n disabled,\n readonly,\n required,\n placeholder,\n autofocus,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n name,\n } = this.props;\n const items = this.props.formData;\n const { widgets, rootSchema, formContext } = registry;\n const itemsSchema = retrieveSchema(schema.items, rootSchema, formData);\n const title = schema.title || name;\n const enumOptions = optionsList(itemsSchema);\n const { widget = \"select\", ...options } = {\n ...getUiOptions(uiSchema),\n enumOptions,\n };\n const Widget = getWidget(schema, widget, widgets);\n return (\n <Widget\n id={idSchema && idSchema.$id}\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 required={required}\n label={title}\n placeholder={placeholder}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n renderFiles() {\n const {\n schema,\n uiSchema,\n idSchema,\n name,\n disabled,\n readonly,\n autofocus,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n } = this.props;\n const title = schema.title || name;\n const items = this.props.formData;\n const { widgets, formContext } = registry;\n const { widget = \"files\", ...options } = getUiOptions(uiSchema);\n const Widget = getWidget(schema, widget, widgets);\n return (\n <Widget\n options={options}\n id={idSchema && idSchema.$id}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n schema={schema}\n uiSchema={uiSchema}\n title={title}\n value={items}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n }\n\n renderFixedArray() {\n const {\n schema,\n uiSchema,\n formData,\n errorSchema,\n idPrefix,\n idSeparator = \"_\",\n idSchema,\n name,\n required,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n onFocus,\n rawErrors,\n } = this.props;\n const title = schema.title || name;\n let items = this.props.formData;\n const { ArrayFieldTemplate, rootSchema, fields, formContext } = registry;\n const { TitleField } = fields;\n const itemSchemas = schema.items.map((item, index) =>\n retrieveSchema(item, rootSchema, formData[index])\n );\n const additionalSchema = allowAdditionalItems(schema)\n ? retrieveSchema(schema.additionalItems, rootSchema, 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 arrayProps = {\n canAdd: this.canAddItem(items) && additionalSchema,\n className: \"field field-array field-array-fixed-items\",\n disabled,\n idSchema,\n formData,\n items: this.state.keyedFormData.map((keyedItem, index) => {\n const { key, item } = keyedItem;\n const additional = index >= itemSchemas.length;\n const itemSchema = additional\n ? retrieveSchema(schema.additionalItems, rootSchema, item)\n : itemSchemas[index];\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = toIdSchema(\n itemSchema,\n itemIdPrefix,\n rootSchema,\n item,\n idPrefix,\n idSeparator\n );\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] : undefined;\n\n return this.renderArrayFieldItem({\n key,\n index,\n canRemove: additional,\n canMoveUp: index >= itemSchemas.length + 1,\n canMoveDown: additional && index < items.length - 1,\n itemSchema,\n itemData: item,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n });\n }),\n onAddClick: this.onAddClick,\n readonly,\n required,\n registry,\n schema,\n uiSchema,\n title,\n TitleField,\n formContext,\n rawErrors,\n };\n\n // Check if a custom template template was passed in\n const Template =\n uiSchema[\"ui:ArrayFieldTemplate\"] ||\n ArrayFieldTemplate ||\n DefaultFixedArrayFieldTemplate;\n return <Template {...arrayProps} />;\n }\n\n renderArrayFieldItem(props) {\n const {\n key,\n index,\n canRemove = true,\n canMoveUp = true,\n canMoveDown = true,\n itemSchema,\n itemData,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus,\n onBlur,\n onFocus,\n rawErrors,\n } = props;\n const { disabled, readonly, uiSchema, registry } = this.props;\n const {\n fields: { SchemaField },\n } = registry;\n const { orderable = true, removable = true } = getUiOptions(uiSchema);\n const has = {\n moveUp: orderable && canMoveUp,\n moveDown: orderable && canMoveDown,\n remove: removable && canRemove,\n };\n has.toolbar = Object.keys(has).some(key => has[key]);\n\n return {\n children: (\n <SchemaField\n index={index}\n schema={itemSchema}\n uiSchema={itemUiSchema}\n formData={itemData}\n errorSchema={itemErrorSchema}\n idPrefix={this.props.idPrefix}\n idSeparator={this.props.idSeparator}\n idSchema={itemIdSchema}\n required={this.isItemRequired(itemSchema)}\n onChange={this.onChangeForIndex(index)}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={this.props.registry}\n disabled={this.props.disabled}\n readonly={this.props.readonly}\n hideError={this.props.hideError}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n ),\n className: \"array-item\",\n disabled,\n hasToolbar: has.toolbar,\n hasMoveUp: has.moveUp,\n hasMoveDown: has.moveDown,\n hasRemove: has.remove,\n index,\n key,\n onAddIndexClick: this.onAddIndexClick,\n onDropIndexClick: this.onDropIndexClick,\n onReorderClick: this.onReorderClick,\n readonly,\n };\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n ArrayField.propTypes = types.fieldProps;\n}\n\nexport default ArrayField;\n","import React from \"react\";\nimport * as types from \"../../types\";\n\nimport { getWidget, getUiOptions, optionsList } from \"../../utils\";\n\nfunction BooleanField(props) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n registry,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onFocus,\n onBlur,\n rawErrors,\n } = props;\n const { title } = schema;\n const { widgets, formContext, fields } = registry;\n const { widget = \"checkbox\", ...options } = getUiOptions(uiSchema);\n const Widget = getWidget(schema, widget, widgets);\n\n let enumOptions;\n\n if (Array.isArray(schema.oneOf)) {\n enumOptions = optionsList({\n oneOf: schema.oneOf.map(option => ({\n ...option,\n title: option.title || (option.const === true ? \"Yes\" : \"No\"),\n })),\n });\n } else {\n enumOptions = optionsList({\n enum: schema.enum || [true, false],\n enumNames:\n schema.enumNames ||\n (schema.enum && schema.enum[0] === false\n ? [\"No\", \"Yes\"]\n : [\"Yes\", \"No\"]),\n });\n }\n\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema && idSchema.$id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n label={title === undefined ? name : title}\n value={formData}\n required={required}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n DescriptionField={fields.DescriptionField}\n />\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n BooleanField.propTypes = types.fieldProps;\n}\n\nBooleanField.defaultProps = {\n uiSchema: {},\n disabled: false,\n readonly: false,\n autofocus: false,\n};\n\nexport default BooleanField;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport * as types from \"../../types\";\nimport {\n getUiOptions,\n getWidget,\n guessType,\n retrieveSchema,\n getDefaultFormState,\n getMatchingOption,\n deepEquals,\n} from \"../../utils\";\n\nclass AnyOfField extends Component {\n constructor(props) {\n super(props);\n\n const { formData, options } = this.props;\n\n this.state = {\n selectedOption: this.getMatchingOption(formData, options),\n };\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (\n !deepEquals(this.props.formData, prevProps.formData) &&\n this.props.idSchema.$id === prevProps.idSchema.$id\n ) {\n const matchingOption = this.getMatchingOption(\n this.props.formData,\n this.props.options\n );\n\n if (!prevState || matchingOption === this.state.selectedOption) {\n return;\n }\n\n this.setState({\n selectedOption: matchingOption,\n });\n }\n }\n\n getMatchingOption(formData, options) {\n const { rootSchema } = this.props.registry;\n\n let option = getMatchingOption(formData, options, rootSchema);\n if (option !== 0) {\n return option;\n }\n // If the form data matches none of the options, use the currently selected\n // option, assuming it's available; otherwise use the first option\n return this && this.state ? this.state.selectedOption : 0;\n }\n\n onOptionChange = option => {\n const selectedOption = parseInt(option, 10);\n const { formData, onChange, options, registry } = this.props;\n const { rootSchema } = registry;\n const newOption = retrieveSchema(\n options[selectedOption],\n rootSchema,\n formData\n );\n\n // If the new option is of type object and the current data is an object,\n // discard properties added using the old option.\n let newFormData = undefined;\n if (\n guessType(formData) === \"object\" &&\n (newOption.type === \"object\" || newOption.properties)\n ) {\n newFormData = Object.assign({}, formData);\n\n const optionsToDiscard = options.slice();\n optionsToDiscard.splice(selectedOption, 1);\n\n // Discard any data added using other options\n for (const option of optionsToDiscard) {\n if (option.properties) {\n for (const key in option.properties) {\n if (newFormData.hasOwnProperty(key)) {\n delete newFormData[key];\n }\n }\n }\n }\n }\n // Call getDefaultFormState to make sure defaults are populated on change.\n onChange(\n getDefaultFormState(options[selectedOption], newFormData, rootSchema)\n );\n\n this.setState({\n selectedOption: parseInt(option, 10),\n });\n };\n\n render() {\n const {\n baseType,\n disabled,\n readonly,\n hideError,\n errorSchema,\n formData,\n idPrefix,\n idSeparator,\n idSchema,\n onBlur,\n onChange,\n onFocus,\n options,\n registry,\n uiSchema,\n schema,\n } = this.props;\n\n const _SchemaField = registry.fields.SchemaField;\n const { widgets } = registry;\n const { selectedOption } = this.state;\n const { widget = \"select\", ...uiOptions } = getUiOptions(uiSchema);\n const Widget = getWidget({ type: \"number\" }, widget, widgets);\n\n const option = options[selectedOption] || null;\n let optionSchema;\n\n if (option) {\n // If the subschema doesn't declare a type, infer the type from the\n // parent schema\n optionSchema = option.type\n ? option\n : Object.assign({}, option, { type: baseType });\n }\n\n const enumOptions = options.map((option, index) => ({\n label: option.title || `Option ${index + 1}`,\n value: index,\n }));\n\n return (\n <div className=\"panel panel-default panel-body\">\n <div className=\"form-group\">\n <Widget\n id={`${idSchema.$id}${\n schema.oneOf ? \"__oneof_select\" : \"__anyof_select\"\n }`}\n schema={{ type: \"number\", default: 0 }}\n onChange={this.onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n value={selectedOption}\n options={{ enumOptions }}\n registry={registry}\n {...uiOptions}\n />\n </div>\n\n {option !== null && (\n <_SchemaField\n schema={optionSchema}\n uiSchema={uiSchema}\n errorSchema={errorSchema}\n idSchema={idSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formData={formData}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n />\n )}\n </div>\n );\n }\n}\n\nAnyOfField.defaultProps = {\n disabled: false,\n readonly: false,\n hideError: false,\n errorSchema: {},\n idSchema: {},\n uiSchema: {},\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n AnyOfField.propTypes = {\n options: PropTypes.arrayOf(PropTypes.object).isRequired,\n baseType: PropTypes.string,\n uiSchema: PropTypes.object,\n idSchema: PropTypes.object,\n formData: PropTypes.any,\n errorSchema: PropTypes.object,\n registry: types.registry.isRequired,\n };\n}\n\nexport default AnyOfField;\n","import React from \"react\";\n\nimport * as types from \"../../types\";\nimport { asNumber } from \"../../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 */\nclass NumberField extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n lastValue: props.value,\n };\n }\n\n handleChange = value => {\n // Cache the original value in component state\n this.setState({ lastValue: 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 let processed =\n typeof value === \"string\" && value.match(trailingCharMatcherWithPrefix)\n ? asNumber(value.replace(trailingCharMatcher, \"\"))\n : asNumber(value);\n\n this.props.onChange(processed);\n };\n\n render() {\n const { StringField } = this.props.registry.fields;\n const { formData, ...props } = this.props;\n const { lastValue } = this.state;\n\n let value = formData;\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(`${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;\n }\n }\n\n return (\n <StringField {...props} formData={value} onChange={this.handleChange} />\n );\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n NumberField.propTypes = types.fieldProps;\n}\n\nNumberField.defaultProps = {\n uiSchema: {},\n};\n\nexport default NumberField;\n","import AddButton from \"../AddButton\";\nimport React, { Component } from \"react\";\nimport * as types from \"../../types\";\n\nimport {\n orderProperties,\n retrieveSchema,\n canExpand,\n ADDITIONAL_PROPERTY_FLAG,\n} from \"../../utils\";\n\nfunction DefaultObjectFieldTemplate(props) {\n const { TitleField, DescriptionField } = props;\n return (\n <fieldset id={props.idSchema.$id}>\n {(props.uiSchema[\"ui:title\"] || props.title) && (\n <TitleField\n id={`${props.idSchema.$id}__title`}\n title={props.title || props.uiSchema[\"ui:title\"]}\n required={props.required}\n formContext={props.formContext}\n />\n )}\n {props.description && (\n <DescriptionField\n id={`${props.idSchema.$id}__description`}\n description={props.description}\n formContext={props.formContext}\n />\n )}\n {props.properties.map(prop => prop.content)}\n {canExpand(props.schema, props.uiSchema, props.formData) && (\n <AddButton\n className=\"object-property-expand\"\n onClick={props.onAddClick(props.schema)}\n disabled={props.disabled || props.readonly}\n />\n )}\n </fieldset>\n );\n}\n\nclass ObjectField extends Component {\n static defaultProps = {\n uiSchema: {},\n formData: {},\n errorSchema: {},\n idSchema: {},\n required: false,\n disabled: false,\n readonly: false,\n };\n\n state = {\n wasPropertyKeyModified: false,\n additionalProperties: {},\n };\n\n isRequired(name) {\n const schema = this.props.schema;\n return (\n Array.isArray(schema.required) && schema.required.indexOf(name) !== -1\n );\n }\n\n onPropertyChange = (name, addedByAdditionalProperties = false) => {\n return (value, errorSchema) => {\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 = \"\";\n }\n const newFormData = { ...this.props.formData, [name]: value };\n this.props.onChange(\n newFormData,\n errorSchema &&\n this.props.errorSchema && {\n ...this.props.errorSchema,\n [name]: errorSchema,\n }\n );\n };\n };\n\n onDropPropertyClick = key => {\n return event => {\n event.preventDefault();\n const { onChange, formData } = this.props;\n const copiedFormData = { ...formData };\n delete copiedFormData[key];\n onChange(copiedFormData);\n };\n };\n\n getAvailableKey = (preferredKey, formData) => {\n var index = 0;\n var newKey = preferredKey;\n while (formData.hasOwnProperty(newKey)) {\n newKey = `${preferredKey}-${++index}`;\n }\n return newKey;\n };\n\n onKeyChange = oldValue => {\n return (value, errorSchema) => {\n if (oldValue === value) {\n return;\n }\n\n value = this.getAvailableKey(value, this.props.formData);\n const newFormData = { ...this.props.formData };\n const newKeys = { [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 this.props.onChange(\n renamedObj,\n errorSchema &&\n this.props.errorSchema && {\n ...this.props.errorSchema,\n [value]: errorSchema,\n }\n );\n };\n };\n\n getDefaultValue(type) {\n switch (type) {\n case \"string\":\n return \"New Value\";\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 default:\n // We don't have a datatype for some reason (perhaps additionalProperties was true)\n return \"New Value\";\n }\n }\n\n handleAddClick = schema => () => {\n let type = schema.additionalProperties.type;\n const newFormData = { ...this.props.formData };\n\n if (schema.additionalProperties.hasOwnProperty(\"$ref\")) {\n const { registry } = this.props;\n const refSchema = retrieveSchema(\n { $ref: schema.additionalProperties[\"$ref\"] },\n registry.rootSchema,\n this.props.formData\n );\n\n type = refSchema.type;\n }\n\n newFormData[\n this.getAvailableKey(\"newKey\", newFormData)\n ] = this.getDefaultValue(type);\n\n this.props.onChange(newFormData);\n };\n\n render() {\n const {\n uiSchema,\n formData,\n errorSchema,\n idSchema,\n name,\n required,\n disabled,\n readonly,\n hideError,\n idPrefix,\n idSeparator,\n onBlur,\n onFocus,\n registry,\n } = this.props;\n\n const { rootSchema, fields, formContext } = registry;\n const { SchemaField, TitleField, DescriptionField } = fields;\n const schema = retrieveSchema(this.props.schema, rootSchema, formData);\n\n const title = schema.title === undefined ? name : schema.title;\n const description = uiSchema[\"ui:description\"] || schema.description;\n let orderedProperties;\n try {\n const properties = Object.keys(schema.properties || {});\n orderedProperties = orderProperties(properties, uiSchema[\"ui:order\"]);\n } catch (err) {\n return (\n <div>\n <p className=\"config-error\" style={{ color: \"red\" }}>\n Invalid {name || \"root\"} object field configuration:\n <em>{err.message}</em>.\n </p>\n <pre>{JSON.stringify(schema)}</pre>\n </div>\n );\n }\n\n const Template =\n uiSchema[\"ui:ObjectFieldTemplate\"] ||\n registry.ObjectFieldTemplate ||\n DefaultObjectFieldTemplate;\n\n const templateProps = {\n title: uiSchema[\"ui:title\"] || title,\n description,\n TitleField,\n DescriptionField,\n properties: orderedProperties.map(name => {\n const addedByAdditionalProperties = schema.properties[\n name\n ].hasOwnProperty(ADDITIONAL_PROPERTY_FLAG);\n const fieldUiSchema = addedByAdditionalProperties\n ? uiSchema.additionalProperties\n : uiSchema[name];\n const hidden = fieldUiSchema && fieldUiSchema[\"ui:widget\"] === \"hidden\";\n\n return {\n content: (\n <SchemaField\n key={name}\n name={name}\n required={this.isRequired(name)}\n schema={schema.properties[name]}\n uiSchema={fieldUiSchema}\n errorSchema={errorSchema[name]}\n idSchema={idSchema[name]}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formData={(formData || {})[name]}\n wasPropertyKeyModified={this.state.wasPropertyKeyModified}\n onKeyChange={this.onKeyChange(name)}\n onChange={this.onPropertyChange(\n name,\n addedByAdditionalProperties\n )}\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 schema,\n formData,\n formContext,\n registry,\n };\n return <Template {...templateProps} onAddClick={this.handleAddClick} />;\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n ObjectField.propTypes = types.fieldProps;\n}\n\nexport default ObjectField;\n","import IconButton from \"../IconButton\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport * as types from \"../../types\";\n\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n isSelect,\n retrieveSchema,\n toIdSchema,\n mergeObjects,\n deepEquals,\n getSchemaType,\n getDisplayLabel,\n} from \"../../utils\";\n\nconst REQUIRED_FIELD_SYMBOL = \"*\";\nconst COMPONENT_TYPES = {\n array: \"ArrayField\",\n boolean: \"BooleanField\",\n integer: \"NumberField\",\n number: \"NumberField\",\n object: \"ObjectField\",\n string: \"StringField\",\n null: \"NullField\",\n};\n\nfunction getFieldComponent(schema, uiSchema, idSchema, fields) {\n const field = uiSchema[\"ui:field\"];\n if (typeof field === \"function\") {\n return field;\n }\n if (typeof field === \"string\" && field in fields) {\n return fields[field];\n }\n\n const componentName = COMPONENT_TYPES[getSchemaType(schema)];\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 { UnsupportedField } = fields;\n\n return (\n <UnsupportedField\n schema={schema}\n idSchema={idSchema}\n reason={`Unknown field type ${schema.type}`}\n />\n );\n };\n}\n\nfunction Label(props) {\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\nfunction LabelInput(props) {\n const { id, label, onChange } = props;\n return (\n <input\n className=\"form-control\"\n type=\"text\"\n id={id}\n onBlur={event => onChange(event.target.value)}\n defaultValue={label}\n />\n );\n}\n\nfunction Help(props) {\n const { id, help } = props;\n if (!help) {\n return null;\n }\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\nfunction ErrorList(props) {\n const { errors = [] } = props;\n if (errors.length === 0) {\n return null;\n }\n\n return (\n <div>\n <ul className=\"error-detail bs-callout bs-callout-info\">\n {errors\n .filter(elem => !!elem)\n .map((error, index) => {\n return (\n <li className=\"text-danger\" key={index}>\n {error}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\nfunction DefaultTemplate(props) {\n const {\n id,\n label,\n children,\n errors,\n help,\n description,\n hidden,\n required,\n displayLabel,\n } = props;\n if (hidden) {\n return <div className=\"hidden\">{children}</div>;\n }\n\n return (\n <WrapIfAdditional {...props}>\n {displayLabel && <Label label={label} required={required} id={id} />}\n {displayLabel && description ? description : null}\n {children}\n {errors}\n {help}\n </WrapIfAdditional>\n );\n}\nif (process.env.NODE_ENV !== \"production\") {\n DefaultTemplate.propTypes = {\n id: PropTypes.string,\n classNames: PropTypes.string,\n label: PropTypes.string,\n children: PropTypes.node.isRequired,\n errors: PropTypes.element,\n rawErrors: PropTypes.arrayOf(PropTypes.string),\n help: PropTypes.element,\n rawHelp: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n description: PropTypes.element,\n rawDescription: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n hidden: PropTypes.bool,\n required: PropTypes.bool,\n readonly: PropTypes.bool,\n displayLabel: PropTypes.bool,\n fields: PropTypes.object,\n formContext: PropTypes.object,\n };\n}\n\nDefaultTemplate.defaultProps = {\n hidden: false,\n readonly: false,\n required: false,\n displayLabel: true,\n};\n\nfunction WrapIfAdditional(props) {\n const {\n id,\n classNames,\n disabled,\n label,\n onKeyChange,\n onDropPropertyClick,\n readonly,\n required,\n schema,\n } = props;\n const keyLabel = `${label} Key`; // i18n ?\n const additional = schema.hasOwnProperty(ADDITIONAL_PROPERTY_FLAG);\n\n if (!additional) {\n return <div className={classNames}>{props.children}</div>;\n }\n\n return (\n <div className={classNames}>\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 <LabelInput\n label={label}\n required={required}\n id={`${id}-key`}\n onChange={onKeyChange}\n />\n </div>\n </div>\n <div className=\"form-additional form-group col-xs-5\">\n {props.children}\n </div>\n <div className=\"col-xs-2\">\n <IconButton\n type=\"danger\"\n icon=\"remove\"\n className=\"array-item-remove btn-block\"\n tabIndex=\"-1\"\n style={{ border: \"0\" }}\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n />\n </div>\n </div>\n </div>\n );\n}\n\nfunction SchemaFieldRender(props) {\n const {\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 { rootSchema, fields, formContext } = registry;\n const FieldTemplate =\n uiSchema[\"ui:FieldTemplate\"] || registry.FieldTemplate || DefaultTemplate;\n let idSchema = props.idSchema;\n const schema = retrieveSchema(props.schema, rootSchema, formData);\n idSchema = mergeObjects(\n toIdSchema(schema, null, rootSchema, formData, idPrefix, idSeparator),\n idSchema\n );\n const FieldComponent = getFieldComponent(schema, uiSchema, idSchema, fields);\n const { DescriptionField } = fields;\n const disabled = Boolean(props.disabled || uiSchema[\"ui:disabled\"]);\n const readonly = Boolean(\n props.readonly ||\n uiSchema[\"ui:readonly\"] ||\n props.schema.readOnly ||\n schema.readOnly\n );\n const uiSchemaHideError = uiSchema[\"ui:hideError\"];\n // Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children\n const hideError =\n uiSchemaHideError === undefined\n ? props.hideError\n : Boolean(uiSchemaHideError);\n const autofocus = Boolean(props.autofocus || uiSchema[\"ui:autofocus\"]);\n if (Object.keys(schema).length === 0) {\n return null;\n }\n\n const displayLabel = getDisplayLabel(schema, uiSchema, rootSchema);\n\n const { __errors, ...fieldErrorSchema } = errorSchema;\n\n // See #439: uiSchema: Don't pass consumed class names to child components\n const field = (\n <FieldComponent\n {...props}\n idSchema={idSchema}\n schema={schema}\n uiSchema={{ ...uiSchema, classNames: undefined }}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n errorSchema={fieldErrorSchema}\n formContext={formContext}\n rawErrors={__errors}\n />\n );\n\n const id = idSchema.$id;\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 = uiSchema[\"ui:title\"] || props.schema.title || schema.title || name;\n }\n\n const description =\n uiSchema[\"ui:description\"] ||\n props.schema.description ||\n schema.description;\n const errors = __errors;\n const help = uiSchema[\"ui:help\"];\n const hidden = uiSchema[\"ui:widget\"] === \"hidden\";\n\n let classNames = [\"form-group\", \"field\", `field-${schema.type}`];\n if (!hideError && errors && errors.length > 0) {\n classNames.push(\"field-error has-error has-danger\");\n }\n classNames.push(uiSchema.classNames);\n classNames = classNames.join(\" \").trim();\n\n const fieldProps = {\n description: (\n <DescriptionField\n id={id + \"__description\"}\n description={description}\n formContext={formContext}\n />\n ),\n rawDescription: description,\n help: <Help id={id + \"__help\"} help={help} />,\n rawHelp: typeof help === \"string\" ? help : undefined,\n errors: hideError ? undefined : <ErrorList errors={errors} />,\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,\n formContext,\n formData,\n fields,\n schema,\n uiSchema,\n registry,\n };\n\n const _AnyOfField = registry.fields.AnyOfField;\n const _OneOfField = registry.fields.OneOfField;\n\n return (\n <FieldTemplate {...fieldProps}>\n <React.Fragment>\n {field}\n\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 && !isSelect(schema) && (\n <_AnyOfField\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\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 retrieveSchema(_schema, rootSchema, formData)\n )}\n baseType={schema.type}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n\n {schema.oneOf && !isSelect(schema) && (\n <_OneOfField\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n errorSchema={errorSchema}\n formData={formData}\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 retrieveSchema(_schema, rootSchema, formData)\n )}\n baseType={schema.type}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n </React.Fragment>\n </FieldTemplate>\n );\n}\n\nclass SchemaField extends React.Component {\n shouldComponentUpdate(nextProps, nextState) {\n return !deepEquals(this.props, nextProps);\n }\n\n render() {\n return SchemaFieldRender(this.props);\n }\n}\n\nSchemaField.defaultProps = {\n uiSchema: {},\n errorSchema: {},\n idSchema: {},\n disabled: false,\n readonly: false,\n autofocus: false,\n hideError: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n SchemaField.propTypes = {\n schema: PropTypes.object.isRequired,\n uiSchema: PropTypes.object,\n idSchema: PropTypes.object,\n formData: PropTypes.any,\n errorSchema: PropTypes.object,\n registry: types.registry.isRequired,\n };\n}\n\nexport default SchemaField;\n","import React from \"react\";\nimport * as types from \"../../types\";\n\nimport {\n getWidget,\n getUiOptions,\n isSelect,\n optionsList,\n hasWidget,\n} from \"../../utils\";\n\nfunction StringField(props) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n registry,\n rawErrors,\n } = props;\n const { title, format } = schema;\n const { widgets, formContext } = registry;\n const enumOptions = isSelect(schema) && optionsList(schema);\n let defaultWidget = enumOptions ? \"select\" : \"text\";\n if (format && hasWidget(schema, format, widgets)) {\n defaultWidget = format;\n }\n const { widget = defaultWidget, placeholder = \"\", ...options } = getUiOptions(\n uiSchema\n );\n const Widget = getWidget(schema, widget, widgets);\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema && idSchema.$id}\n label={title === undefined ? name : title}\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\nif (process.env.NODE_ENV !== \"production\") {\n StringField.propTypes = types.fieldProps;\n}\n\nStringField.defaultProps = {\n uiSchema: {},\n disabled: false,\n readonly: false,\n autofocus: false,\n};\n\nexport default StringField;\n","import ArrayField from \"./ArrayField\";\nimport BooleanField from \"./BooleanField\";\nimport DescriptionField from \"./DescriptionField\";\nimport MultiSchemaField from \"./MultiSchemaField\";\nimport NumberField from \"./NumberField\";\nimport ObjectField from \"./ObjectField\";\nimport SchemaField from \"./SchemaField\";\nimport StringField from \"./StringField\";\nimport TitleField from \"./TitleField\";\nimport NullField from \"./NullField\";\nimport UnsupportedField from \"./UnsupportedField\";\n\nexport default {\n AnyOfField: MultiSchemaField,\n ArrayField,\n BooleanField,\n DescriptionField,\n NumberField,\n ObjectField,\n OneOfField: MultiSchemaField,\n SchemaField,\n StringField,\n TitleField,\n NullField,\n UnsupportedField,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction DescriptionField(props) {\n const { id, description } = props;\n if (!description) {\n return null;\n }\n if (typeof description === \"string\") {\n return (\n <p id={id} className=\"field-description\">\n {description}\n </p>\n );\n } else {\n return (\n <div id={id} className=\"field-description\">\n {description}\n </div>\n );\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n DescriptionField.propTypes = {\n id: PropTypes.string,\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n };\n}\n\nexport default DescriptionField;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst REQUIRED_FIELD_SYMBOL = \"*\";\n\nfunction TitleField(props) {\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\nif (process.env.NODE_ENV !== \"production\") {\n TitleField.propTypes = {\n id: PropTypes.string,\n title: PropTypes.string,\n required: PropTypes.bool,\n };\n}\n\nexport default TitleField;\n","import { Component } from \"react\";\nimport * as types from \"../../types\";\n\nclass NullField extends Component {\n componentDidMount() {\n if (this.props.formData === undefined) {\n this.props.onChange(null);\n }\n }\n\n render() {\n return null;\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n NullField.propTypes = types.fieldProps;\n}\n\nexport default NullField;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction UnsupportedField({ schema, idSchema, reason }) {\n return (\n <div className=\"unsupported-field\">\n <p>\n Unsupported field schema\n {idSchema && idSchema.$id && (\n <span>\n {\" for\"} field <code>{idSchema.$id}</code>\n </span>\n )}\n {reason && <em>: {reason}</em>}.\n </p>\n {schema && <pre>{JSON.stringify(schema, null, 2)}</pre>}\n </div>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n UnsupportedField.propTypes = {\n schema: PropTypes.object.isRequired,\n idSchema: PropTypes.object,\n reason: PropTypes.string,\n };\n}\n\nexport default UnsupportedField;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { shouldRender, parseDateString, toDateString, pad } from \"../../utils\";\n\nfunction rangeOptions(start, stop) {\n let options = [];\n for (let i = start; i <= stop; i++) {\n options.push({ value: i, label: pad(i, 2) });\n }\n return options;\n}\n\nfunction readyForChange(state) {\n return Object.keys(state).every(key => state[key] !== -1);\n}\n\nfunction DateElement(props) {\n const {\n type,\n range,\n value,\n select,\n rootId,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n } = props;\n const id = rootId + \"_\" + type;\n const { SelectWidget } = registry.widgets;\n return (\n <SelectWidget\n schema={{ type: \"integer\" }}\n id={id}\n className=\"form-control\"\n options={{ enumOptions: rangeOptions(range[0], range[1]) }}\n placeholder={type}\n value={value}\n disabled={disabled}\n readonly={readonly}\n autofocus={autofocus}\n onChange={value => select(type, value)}\n onBlur={onBlur}\n />\n );\n}\n\nclass AltDateWidget extends Component {\n static defaultProps = {\n time: false,\n disabled: false,\n readonly: false,\n autofocus: false,\n options: {\n yearsRange: [1900, new Date().getFullYear() + 2],\n },\n };\n\n constructor(props) {\n super(props);\n this.state = parseDateString(props.value, props.time);\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (\n prevProps.value &&\n prevProps.value !== parseDateString(this.props.value, this.props.time)\n ) {\n this.setState(parseDateString(this.props.value, this.props.time));\n }\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n return shouldRender(this, nextProps, nextState);\n }\n\n onChange = (property, value) => {\n this.setState(\n { [property]: typeof value === \"undefined\" ? -1 : value },\n () => {\n // Only propagate to parent state if we have a complete date{time}\n if (readyForChange(this.state)) {\n this.props.onChange(toDateString(this.state, this.props.time));\n }\n }\n );\n };\n\n setNow = event => {\n event.preventDefault();\n const { time, disabled, readonly, onChange } = this.props;\n if (disabled || readonly) {\n return;\n }\n const nowDateObj = parseDateString(new Date().toJSON(), time);\n this.setState(nowDateObj, () => onChange(toDateString(this.state, time)));\n };\n\n clear = event => {\n event.preventDefault();\n const { time, disabled, readonly, onChange } = this.props;\n if (disabled || readonly) {\n return;\n }\n this.setState(parseDateString(\"\", time), () => onChange(undefined));\n };\n\n get dateElementProps() {\n const { time, options } = this.props;\n const { year, month, day, hour, minute, second } = this.state;\n const data = [\n {\n type: \"year\",\n range: options.yearsRange,\n value: year,\n },\n { type: \"month\", range: [1, 12], value: month },\n { type: \"day\", range: [1, 31], value: day },\n ];\n if (time) {\n data.push(\n { type: \"hour\", range: [0, 23], value: hour },\n { type: \"minute\", range: [0, 59], value: minute },\n { type: \"second\", range: [0, 59], value: second }\n );\n }\n return data;\n }\n\n render() {\n const {\n id,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n options,\n } = this.props;\n return (\n <ul className=\"list-inline\">\n {this.dateElementProps.map((elemProps, i) => (\n <li key={i}>\n <DateElement\n rootId={id}\n select={this.onChange}\n {...elemProps}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n onBlur={onBlur}\n autofocus={autofocus && i === 0}\n />\n </li>\n ))}\n {(options.hideNowButton !== \"undefined\"\n ? !options.hideNowButton\n : true) && (\n <li>\n <a href=\"#\" className=\"btn btn-info btn-now\" onClick={this.setNow}>\n Now\n </a>\n </li>\n )}\n {(options.hideClearButton !== \"undefined\"\n ? !options.hideClearButton\n : true) && (\n <li>\n <a\n href=\"#\"\n className=\"btn btn-warning btn-clear\"\n onClick={this.clear}>\n Clear\n </a>\n </li>\n )}\n </ul>\n );\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n AltDateWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n value: PropTypes.string,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n time: PropTypes.bool,\n options: PropTypes.object,\n };\n}\n\nexport default AltDateWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport AltDateWidget from \"./AltDateWidget\";\n\nfunction AltDateTimeWidget(props) {\n const { AltDateWidget } = props.registry.widgets;\n return <AltDateWidget time {...props} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n AltDateTimeWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n value: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n options: PropTypes.object,\n };\n}\n\nAltDateTimeWidget.defaultProps = {\n ...AltDateWidget.defaultProps,\n time: true,\n};\n\nexport default AltDateTimeWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction BaseInput(props) {\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 (!props.id) {\n console.log(\"No id for\", props);\n throw new Error(`no id for props ${JSON.stringify(props)}`);\n }\n const {\n value,\n readonly,\n disabled,\n autofocus,\n onBlur,\n onFocus,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors,\n ...inputProps\n } = props;\n\n // If options.inputType is set use that as the input type\n if (options.inputType) {\n inputProps.type = options.inputType;\n } else if (!inputProps.type) {\n // If the schema is of type number or integer, set the input type to number\n if (schema.type === \"number\") {\n inputProps.type = \"number\";\n // Setting step to 'any' fixes a bug in Safari where decimals are not\n // allowed in number inputs\n inputProps.step = \"any\";\n } else if (schema.type === \"integer\") {\n inputProps.type = \"number\";\n // Since this is integer, you always want to step up or down in multiples\n // of 1\n inputProps.step = \"1\";\n } else {\n inputProps.type = \"text\";\n }\n }\n\n if (options.autocomplete) {\n inputProps.autoComplete = options.autocomplete;\n }\n\n // If multipleOf is defined, use this as the step value. This mainly improves\n // the experience for keyboard users (who can use the up/down KB arrows).\n if (schema.multipleOf) {\n inputProps.step = schema.multipleOf;\n }\n\n if (typeof schema.minimum !== \"undefined\") {\n inputProps.min = schema.minimum;\n }\n\n if (typeof schema.maximum !== \"undefined\") {\n inputProps.max = schema.maximum;\n }\n\n const _onChange = ({ target: { value } }) => {\n return props.onChange(value === \"\" ? options.emptyValue : value);\n };\n\n return [\n <input\n key={inputProps.id}\n className=\"form-control\"\n readOnly={readonly}\n disabled={disabled}\n autoFocus={autofocus}\n value={value == null ? \"\" : value}\n {...inputProps}\n list={schema.examples ? `examples_${inputProps.id}` : null}\n onChange={_onChange}\n onBlur={onBlur && (event => onBlur(inputProps.id, event.target.value))}\n onFocus={onFocus && (event => onFocus(inputProps.id, event.target.value))}\n />,\n schema.examples ? (\n <datalist\n key={`datalist_${inputProps.id}`}\n id={`examples_${inputProps.id}`}>\n {[\n ...new Set(\n schema.examples.concat(schema.default ? [schema.default] : [])\n ),\n ].map(example => (\n <option key={example} value={example} />\n ))}\n </datalist>\n ) : null,\n ];\n}\n\nBaseInput.defaultProps = {\n required: false,\n disabled: false,\n readonly: false,\n autofocus: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n BaseInput.propTypes = {\n id: PropTypes.string.isRequired,\n placeholder: PropTypes.string,\n value: PropTypes.any,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n };\n}\n\nexport default BaseInput;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { schemaRequiresTrueValue } from \"../../utils\";\n\nfunction CheckboxWidget(props) {\n const {\n schema,\n id,\n value,\n disabled,\n readonly,\n label,\n autofocus,\n onBlur,\n onFocus,\n onChange,\n DescriptionField,\n } = props;\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(schema);\n\n return (\n <div className={`checkbox ${disabled || readonly ? \"disabled\" : \"\"}`}>\n {schema.description && (\n <DescriptionField description={schema.description} />\n )}\n <label>\n <input\n type=\"checkbox\"\n id={id}\n checked={typeof value === \"undefined\" ? false : value}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onChange={event => onChange(event.target.checked)}\n onBlur={onBlur && (event => onBlur(id, event.target.checked))}\n onFocus={onFocus && (event => onFocus(id, event.target.checked))}\n />\n <span>{label}</span>\n </label>\n </div>\n );\n}\n\nCheckboxWidget.defaultProps = {\n autofocus: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n CheckboxWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n value: PropTypes.bool,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n };\n}\n\nexport default CheckboxWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction selectValue(value, selected, all) {\n const at = all.indexOf(value);\n const updated = selected.slice(0, at).concat(value, selected.slice(at));\n // As inserting values at predefined index positions doesn't work with empty\n // arrays, we need to reorder the updated selection to match the initial order\n return updated.sort((a, b) => all.indexOf(a) > all.indexOf(b));\n}\n\nfunction deselectValue(value, selected) {\n return selected.filter(v => v !== value);\n}\n\nfunction CheckboxesWidget(props) {\n const { id, disabled, options, value, autofocus, readonly, onChange } = props;\n const { enumOptions, enumDisabled, inline } = options;\n return (\n <div className=\"checkboxes\" id={id}>\n {enumOptions.map((option, index) => {\n const checked = value.indexOf(option.value) !== -1;\n const itemDisabled =\n enumDisabled && enumDisabled.indexOf(option.value) != -1;\n const disabledCls =\n disabled || itemDisabled || readonly ? \"disabled\" : \"\";\n const checkbox = (\n <span>\n <input\n type=\"checkbox\"\n id={`${id}_${index}`}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={event => {\n const all = enumOptions.map(({ value }) => value);\n if (event.target.checked) {\n onChange(selectValue(option.value, value, all));\n } else {\n onChange(deselectValue(option.value, value));\n }\n }}\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\nCheckboxesWidget.defaultProps = {\n autofocus: false,\n options: {\n inline: false,\n },\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n CheckboxesWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n options: PropTypes.shape({\n enumOptions: PropTypes.array,\n inline: PropTypes.bool,\n }).isRequired,\n value: PropTypes.any,\n required: PropTypes.bool,\n readonly: PropTypes.bool,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n };\n}\n\nexport default CheckboxesWidget;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { dataURItoBlob, shouldRender } from \"../../utils\";\n\nfunction addNameToDataURL(dataURL, name) {\n return dataURL.replace(\";base64\", `;name=${encodeURIComponent(name)};base64`);\n}\n\nfunction processFile(file) {\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 resolve({\n dataURL: addNameToDataURL(event.target.result, name),\n name,\n size,\n type,\n });\n };\n reader.readAsDataURL(file);\n });\n}\n\nfunction processFiles(files) {\n return Promise.all([].map.call(files, processFile));\n}\n\nfunction FilesInfo(props) {\n const { filesInfo } = props;\n if (filesInfo.length === 0) {\n return null;\n }\n return (\n <ul className=\"file-info\">\n {filesInfo.map((fileInfo, key) => {\n const { name, size, type } = fileInfo;\n return (\n <li key={key}>\n <strong>{name}</strong> ({type}, {size} bytes)\n </li>\n );\n })}\n </ul>\n );\n}\n\nfunction extractFileInfo(dataURLs) {\n return dataURLs\n .filter(dataURL => typeof dataURL !== \"undefined\")\n .map(dataURL => {\n const { blob, name } = dataURItoBlob(dataURL);\n return {\n name: name,\n size: blob.size,\n type: blob.type,\n };\n });\n}\n\nclass FileWidget extends Component {\n constructor(props) {\n super(props);\n const { value } = props;\n const values = Array.isArray(value) ? value : [value];\n this.state = { values, filesInfo: extractFileInfo(values) };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n return shouldRender(this, nextProps, nextState);\n }\n\n onChange = event => {\n const { multiple, onChange } = this.props;\n processFiles(event.target.files).then(filesInfo => {\n const state = {\n values: filesInfo.map(fileInfo => fileInfo.dataURL),\n filesInfo,\n };\n this.setState(state, () => {\n if (multiple) {\n onChange(state.values);\n } else {\n onChange(state.values[0]);\n }\n });\n });\n };\n\n render() {\n const { multiple, id, readonly, disabled, autofocus, options } = this.props;\n const { filesInfo } = this.state;\n return (\n <div>\n <p>\n <input\n ref={ref => (this.inputRef = ref)}\n id={id}\n type=\"file\"\n disabled={readonly || disabled}\n onChange={this.onChange}\n defaultValue=\"\"\n autoFocus={autofocus}\n multiple={multiple}\n accept={options.accept}\n />\n </p>\n <FilesInfo filesInfo={filesInfo} />\n </div>\n );\n }\n}\n\nFileWidget.defaultProps = {\n autofocus: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n FileWidget.propTypes = {\n multiple: PropTypes.bool,\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n ]),\n autofocus: PropTypes.bool,\n };\n}\n\nexport default FileWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction RadioWidget(props) {\n const {\n options,\n value,\n required,\n disabled,\n readonly,\n autofocus,\n onBlur,\n onFocus,\n onChange,\n id,\n } = props;\n // Generating a unique field name to identify this set of radio buttons\n const name = Math.random().toString();\n const { enumOptions, enumDisabled, inline } = options;\n // checked={checked} has been moved above name={name}, As mentioned in #349;\n // this is a temporary fix for radio button rendering bug in React, facebook/react#7630.\n return (\n <div className=\"field-radio-group\" id={id}>\n {enumOptions.map((option, i) => {\n const checked = option.value === value;\n const itemDisabled =\n enumDisabled && enumDisabled.indexOf(option.value) != -1;\n const disabledCls =\n disabled || itemDisabled || readonly ? \"disabled\" : \"\";\n const radio = (\n <span>\n <input\n type=\"radio\"\n checked={checked}\n name={name}\n required={required}\n value={option.value}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && i === 0}\n onChange={_ => onChange(option.value)}\n onBlur={onBlur && (event => onBlur(id, event.target.value))}\n onFocus={onFocus && (event => onFocus(id, event.target.value))}\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\nRadioWidget.defaultProps = {\n autofocus: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n RadioWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n options: PropTypes.shape({\n enumOptions: PropTypes.array,\n inline: PropTypes.bool,\n }).isRequired,\n value: PropTypes.any,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n };\n}\nexport default RadioWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { asNumber, guessType } from \"../../utils\";\n\nconst nums = new Set([\"number\", \"integer\"]);\n\n/**\n * This is a silly limitation in the DOM where option change event values are\n * always retrieved as strings.\n */\nfunction processValue(schema, value) {\n // \"enum\" is a reserved word, so only \"type\" and \"items\" can be destructured\n const { type, items } = schema;\n if (value === \"\") {\n return undefined;\n } else if (type === \"array\" && items && nums.has(items.type)) {\n return value.map(asNumber);\n } else if (type === \"boolean\") {\n return value === \"true\";\n } else if (type === \"number\") {\n return asNumber(value);\n }\n\n // If type is undefined, but an enum is present, try and infer the type from\n // the enum values\n if (schema.enum) {\n if (schema.enum.every(x => guessType(x) === \"number\")) {\n return asNumber(value);\n } else if (schema.enum.every(x => guessType(x) === \"boolean\")) {\n return value === \"true\";\n }\n }\n\n return value;\n}\n\nfunction getValue(event, multiple) {\n if (multiple) {\n return [].slice\n .call(event.target.options)\n .filter(o => o.selected)\n .map(o => o.value);\n } else {\n return event.target.value;\n }\n}\n\nfunction SelectWidget(props) {\n const {\n schema,\n id,\n options,\n value,\n required,\n disabled,\n readonly,\n multiple,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n placeholder,\n } = props;\n const { enumOptions, enumDisabled } = options;\n const emptyValue = multiple ? [] : \"\";\n return (\n <select\n id={id}\n multiple={multiple}\n className=\"form-control\"\n value={typeof value === \"undefined\" ? emptyValue : value}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onBlur={\n onBlur &&\n (event => {\n const newValue = getValue(event, multiple);\n onBlur(id, processValue(schema, newValue));\n })\n }\n onFocus={\n onFocus &&\n (event => {\n const newValue = getValue(event, multiple);\n onFocus(id, processValue(schema, newValue));\n })\n }\n onChange={event => {\n const newValue = getValue(event, multiple);\n onChange(processValue(schema, newValue));\n }}>\n {!multiple && schema.default === undefined && (\n <option value=\"\">{placeholder}</option>\n )}\n {enumOptions.map(({ value, label }, i) => {\n const disabled = enumDisabled && enumDisabled.indexOf(value) != -1;\n return (\n <option key={i} value={value} disabled={disabled}>\n {label}\n </option>\n );\n })}\n </select>\n );\n}\n\nSelectWidget.defaultProps = {\n autofocus: false,\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n SelectWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n options: PropTypes.shape({\n enumOptions: PropTypes.array,\n }).isRequired,\n value: PropTypes.any,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n multiple: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n };\n}\n\nexport default SelectWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction TextareaWidget(props) {\n const {\n id,\n options,\n placeholder,\n value,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n } = props;\n const _onChange = ({ target: { value } }) => {\n return onChange(value === \"\" ? options.emptyValue : value);\n };\n return (\n <textarea\n id={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={onBlur && (event => onBlur(id, event.target.value))}\n onFocus={onFocus && (event => onFocus(id, event.target.value))}\n onChange={_onChange}\n />\n );\n}\n\nTextareaWidget.defaultProps = {\n autofocus: false,\n options: {},\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n TextareaWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n placeholder: PropTypes.string,\n options: PropTypes.shape({\n rows: PropTypes.number,\n }),\n value: PropTypes.string,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n };\n}\n\nexport default TextareaWidget;\n","import AltDateWidget from \"./AltDateWidget\";\nimport AltDateTimeWidget from \"./AltDateTimeWidget\";\nimport BaseInput from \"./BaseInput\";\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 SelectWidget from \"./SelectWidget\";\nimport TextareaWidget from \"./TextareaWidget\";\nimport TextWidget from \"./TextWidget\";\nimport URLWidget from \"./URLWidget\";\nimport UpDownWidget from \"./UpDownWidget\";\nimport SubmitButton from \"./SubmitButton\";\nexport default {\n BaseInput,\n PasswordWidget,\n RadioWidget,\n UpDownWidget,\n RangeWidget,\n SelectWidget,\n TextWidget,\n DateWidget,\n DateTimeWidget,\n AltDateWidget,\n AltDateTimeWidget,\n EmailWidget,\n URLWidget,\n TextareaWidget,\n HiddenWidget,\n ColorWidget,\n FileWidget,\n CheckboxWidget,\n CheckboxesWidget,\n SubmitButton,\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction PasswordWidget(props) {\n const { BaseInput } = props.registry.widgets;\n return <BaseInput type=\"password\" {...props} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n PasswordWidget.propTypes = {\n value: PropTypes.string,\n };\n}\n\nexport default PasswordWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { rangeSpec } from \"../../utils\";\n\nfunction UpDownWidget(props) {\n const {\n registry: {\n widgets: { BaseInput },\n },\n } = props;\n return <BaseInput type=\"number\" {...props} {...rangeSpec(props.schema)} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n UpDownWidget.propTypes = {\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n };\n}\n\nexport default UpDownWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { rangeSpec } from \"../../utils\";\n\nfunction RangeWidget(props) {\n const {\n schema,\n value,\n registry: {\n widgets: { BaseInput },\n },\n } = props;\n return (\n <div className=\"field-range-wrapper\">\n <BaseInput type=\"range\" {...props} {...rangeSpec(schema)} />\n <span className=\"range-view\">{value}</span>\n </div>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n RangeWidget.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n };\n}\n\nexport default RangeWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction TextWidget(props) {\n const { BaseInput } = props.registry.widgets;\n return <BaseInput {...props} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n TextWidget.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n id: PropTypes.string,\n };\n}\n\nexport default TextWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction DateWidget(props) {\n const {\n onChange,\n registry: {\n widgets: { BaseInput },\n },\n } = props;\n return (\n <BaseInput\n type=\"date\"\n {...props}\n onChange={value => onChange(value || undefined)}\n />\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n DateWidget.propTypes = {\n value: PropTypes.string,\n };\n}\n\nexport default DateWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { utcToLocal, localToUTC } from \"../../utils\";\n\nfunction DateTimeWidget(props) {\n const {\n value,\n onChange,\n registry: {\n widgets: { BaseInput },\n },\n } = props;\n return (\n <BaseInput\n type=\"datetime-local\"\n {...props}\n value={utcToLocal(value)}\n onChange={value => onChange(localToUTC(value))}\n />\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n DateTimeWidget.propTypes = {\n value: PropTypes.string,\n };\n}\n\nexport default DateTimeWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction EmailWidget(props) {\n const { BaseInput } = props.registry.widgets;\n return <BaseInput type=\"email\" {...props} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n EmailWidget.propTypes = {\n value: PropTypes.string,\n };\n}\n\nexport default EmailWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction URLWidget(props) {\n const { BaseInput } = props.registry.widgets;\n return <BaseInput type=\"url\" {...props} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n URLWidget.propTypes = {\n value: PropTypes.string,\n };\n}\n\nexport default URLWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction HiddenWidget({ id, value }) {\n return (\n <input\n type=\"hidden\"\n id={id}\n value={typeof value === \"undefined\" ? \"\" : value}\n />\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n HiddenWidget.propTypes = {\n id: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]),\n };\n}\n\nexport default HiddenWidget;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nfunction ColorWidget(props) {\n const {\n disabled,\n readonly,\n registry: {\n widgets: { BaseInput },\n },\n } = props;\n return <BaseInput type=\"color\" {...props} disabled={disabled || readonly} />;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n ColorWidget.propTypes = {\n schema: PropTypes.object.isRequired,\n id: PropTypes.string.isRequired,\n value: PropTypes.string,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n autofocus: PropTypes.bool,\n onChange: PropTypes.func,\n };\n}\n\nexport default ColorWidget;\n","import React from \"react\";\nimport { getSubmitButtonOptions } from \".././../utils\";\n\nexport default function SubmitButton({ uiSchema }) {\n const {\n submitText,\n norender,\n props: submitButtonProps,\n } = getSubmitButtonOptions(uiSchema);\n return (\n <div>\n {!norender && (\n <button type=\"submit\" {...submitButtonProps} className=\"btn btn-info\">\n {submitText}\n </button>\n )}\n </div>\n );\n}\n","import fields from \"./components/fields\";\nimport widgets from \"./components/widgets\";\n\nexport function getDefaultRegistry() {\n return {\n fields,\n widgets,\n definitions: {},\n rootSchema: {},\n formContext: {},\n };\n}\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport _pick from \"lodash/pick\";\nimport _get from \"lodash/get\";\nimport _isEmpty from \"lodash/isEmpty\";\nimport { getDefaultRegistry } from \"../defaultRegistry\";\n\nimport { default as DefaultErrorList } from \"./ErrorList\";\nimport {\n getDefaultFormState,\n retrieveSchema,\n shouldRender,\n toIdSchema,\n deepEquals,\n toPathSchema,\n isObject,\n} from \"../utils\";\nimport validateFormData, { toErrorList } from \"../validate\";\nimport { mergeObjects } from \"../utils\";\n\nexport default class Form extends Component {\n static defaultProps = {\n uiSchema: {},\n noValidate: false,\n liveValidate: false,\n disabled: false,\n readonly: false,\n noHtml5Validate: false,\n ErrorList: DefaultErrorList,\n omitExtraData: false,\n };\n\n constructor(props) {\n super(props);\n this.state = this.getStateFromProps(props, props.formData);\n if (\n this.props.onChange &&\n !deepEquals(this.state.formData, this.props.formData)\n ) {\n this.props.onChange(this.state);\n }\n this.formElement = null;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const nextState = this.getStateFromProps(nextProps, nextProps.formData);\n if (\n !deepEquals(nextState.formData, nextProps.formData) &&\n !deepEquals(nextState.formData, this.state.formData) &&\n this.props.onChange\n ) {\n this.props.onChange(nextState);\n }\n this.setState(nextState);\n }\n\n getStateFromProps(props, inputFormData) {\n const state = this.state || {};\n const schema = \"schema\" in props ? props.schema : this.props.schema;\n const uiSchema = \"uiSchema\" in props ? props.uiSchema : this.props.uiSchema;\n const edit = typeof inputFormData !== \"undefined\";\n const liveValidate =\n \"liveValidate\" in props ? props.liveValidate : this.props.liveValidate;\n const mustValidate = edit && !props.noValidate && liveValidate;\n const rootSchema = schema;\n const formData = getDefaultFormState(schema, inputFormData, rootSchema);\n const retrievedSchema = retrieveSchema(schema, rootSchema, formData);\n const customFormats = props.customFormats;\n const additionalMetaSchemas = props.additionalMetaSchemas;\n\n const getCurrentErrors = () => {\n if (props.noValidate) {\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,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema;\n if (mustValidate) {\n const schemaValidation = this.validate(\n formData,\n schema,\n additionalMetaSchemas,\n customFormats\n );\n errors = schemaValidation.errors;\n errorSchema = schemaValidation.errorSchema;\n schemaValidationErrors = errors;\n schemaValidationErrorSchema = errorSchema;\n } else {\n const currentErrors = getCurrentErrors();\n errors = currentErrors.errors;\n errorSchema = currentErrors.errorSchema;\n schemaValidationErrors = state.schemaValidationErrors;\n schemaValidationErrorSchema = state.schemaValidationErrorSchema;\n }\n if (props.extraErrors) {\n errorSchema = mergeObjects(\n errorSchema,\n props.extraErrors,\n !!\"concat arrays\"\n );\n errors = toErrorList(errorSchema);\n }\n const idSchema = toIdSchema(\n retrievedSchema,\n uiSchema[\"ui:rootFieldId\"],\n rootSchema,\n formData,\n props.idPrefix,\n props.idSeparator\n );\n const nextState = {\n schema,\n uiSchema,\n idSchema,\n formData,\n edit,\n errors,\n errorSchema,\n additionalMetaSchemas,\n };\n if (schemaValidationErrors) {\n nextState.schemaValidationErrors = schemaValidationErrors;\n nextState.schemaValidationErrorSchema = schemaValidationErrorSchema;\n }\n return nextState;\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n return shouldRender(this, nextProps, nextState);\n }\n\n validate(\n formData,\n schema = this.props.schema,\n additionalMetaSchemas = this.props.additionalMetaSchemas,\n customFormats = this.props.customFormats\n ) {\n const { validate, transformErrors } = this.props;\n const { rootSchema } = this.getRegistry();\n const resolvedSchema = retrieveSchema(schema, rootSchema, formData);\n return validateFormData(\n formData,\n resolvedSchema,\n validate,\n transformErrors,\n additionalMetaSchemas,\n customFormats\n );\n }\n\n renderErrors() {\n const { errors, errorSchema, schema, uiSchema } = this.state;\n const { ErrorList, showErrorList, formContext } = this.props;\n\n if (errors.length && showErrorList != false) {\n return (\n <ErrorList\n errors={errors}\n errorSchema={errorSchema}\n schema={schema}\n uiSchema={uiSchema}\n formContext={formContext}\n />\n );\n }\n return null;\n }\n\n getUsedFormData = (formData, fields) => {\n //for the case of a single input form\n if (fields.length === 0 && typeof formData !== \"object\") {\n return formData;\n }\n\n let data = _pick(formData, fields);\n if (Array.isArray(formData)) {\n return Object.keys(data).map(key => data[key]);\n }\n\n return data;\n };\n\n getFieldNames = (pathSchema, formData) => {\n const getAllPaths = (_obj, acc = [], paths = [\"\"]) => {\n Object.keys(_obj).forEach(key => {\n if (typeof _obj[key] === \"object\") {\n let newPaths = paths.map(path => `${path}.${key}`);\n // If an object is marked with additionalProperties, all its keys are valid\n if (_obj[key].__rjsf_additionalProperties && _obj[key].$name !== \"\") {\n acc.push(_obj[key].$name);\n } else {\n getAllPaths(_obj[key], acc, newPaths);\n }\n } else if (key === \"$name\" && _obj[key] !== \"\") {\n paths.forEach(path => {\n path = path.replace(/^\\./, \"\");\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 (typeof formValue !== \"object\" || _isEmpty(formValue)) {\n acc.push(path);\n }\n });\n }\n });\n return acc;\n };\n\n return getAllPaths(pathSchema);\n };\n\n onChange = (formData, newErrorSchema) => {\n if (isObject(formData) || Array.isArray(formData)) {\n const newState = this.getStateFromProps(this.props, formData);\n formData = newState.formData;\n }\n const mustValidate = !this.props.noValidate && this.props.liveValidate;\n let state = { formData };\n let newFormData = formData;\n\n if (this.props.omitExtraData === true && this.props.liveOmit === true) {\n const retrievedSchema = retrieveSchema(\n this.state.schema,\n this.state.schema,\n formData\n );\n const pathSchema = toPathSchema(\n retrievedSchema,\n \"\",\n this.state.schema,\n formData\n );\n\n const fieldNames = this.getFieldNames(pathSchema, formData);\n\n newFormData = this.getUsedFormData(formData, fieldNames);\n state = {\n formData: newFormData,\n };\n }\n\n if (mustValidate) {\n let schemaValidation = this.validate(newFormData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (this.props.extraErrors) {\n errorSchema = mergeObjects(\n errorSchema,\n this.props.extraErrors,\n !!\"concat arrays\"\n );\n errors = toErrorList(errorSchema);\n }\n state = {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n };\n } else if (!this.props.noValidate && newErrorSchema) {\n const errorSchema = this.props.extraErrors\n ? mergeObjects(\n newErrorSchema,\n this.props.extraErrors,\n !!\"concat arrays\"\n )\n : newErrorSchema;\n state = {\n formData: newFormData,\n errorSchema: errorSchema,\n errors: toErrorList(errorSchema),\n };\n }\n this.setState(\n state,\n () => this.props.onChange && this.props.onChange(this.state)\n );\n };\n\n onBlur = (...args) => {\n if (this.props.onBlur) {\n this.props.onBlur(...args);\n }\n };\n\n onFocus = (...args) => {\n if (this.props.onFocus) {\n this.props.onFocus(...args);\n }\n };\n\n onSubmit = event => {\n event.preventDefault();\n if (event.target !== event.currentTarget) {\n return;\n }\n\n event.persist();\n let newFormData = this.state.formData;\n\n if (this.props.omitExtraData === true) {\n const retrievedSchema = retrieveSchema(\n this.state.schema,\n this.state.schema,\n newFormData\n );\n const pathSchema = toPathSchema(\n retrievedSchema,\n \"\",\n this.state.schema,\n newFormData\n );\n\n const fieldNames = this.getFieldNames(pathSchema, newFormData);\n\n newFormData = this.getUsedFormData(newFormData, fieldNames);\n }\n\n if (!this.props.noValidate) {\n let schemaValidation = this.validate(newFormData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (Object.keys(errors).length > 0) {\n if (this.props.extraErrors) {\n errorSchema = mergeObjects(\n errorSchema,\n this.props.extraErrors,\n !!\"concat arrays\"\n );\n errors = toErrorList(errorSchema);\n }\n this.setState(\n {\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\n },\n () => {\n if (this.props.onError) {\n this.props.onError(errors);\n } else {\n console.error(\"Form validation failed\", errors);\n }\n }\n );\n return;\n }\n }\n\n // There are no errors generated through schema validation.\n // Check for user provided errors and update state accordingly.\n let errorSchema;\n let errors;\n if (this.props.extraErrors) {\n errorSchema = this.props.extraErrors;\n errors = toErrorList(errorSchema);\n } else {\n errorSchema = {};\n errors = [];\n }\n\n this.setState(\n {\n formData: newFormData,\n errors: errors,\n errorSchema: errorSchema,\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n },\n () => {\n if (this.props.onSubmit) {\n this.props.onSubmit(\n { ...this.state, formData: newFormData, status: \"submitted\" },\n event\n );\n }\n }\n );\n };\n\n getRegistry() {\n // For BC, accept passed SchemaField and TitleField props and pass them to\n // the \"fields\" registry one.\n const { fields, widgets } = getDefaultRegistry();\n return {\n fields: { ...fields, ...this.props.fields },\n widgets: { ...widgets, ...this.props.widgets },\n ArrayFieldTemplate: this.props.ArrayFieldTemplate,\n ObjectFieldTemplate: this.props.ObjectFieldTemplate,\n FieldTemplate: this.props.FieldTemplate,\n definitions: this.props.schema.definitions || {},\n rootSchema: this.props.schema,\n formContext: this.props.formContext || {},\n };\n }\n\n submit() {\n if (this.formElement) {\n this.formElement.dispatchEvent(\n new CustomEvent(\"submit\", {\n cancelable: true,\n })\n );\n }\n }\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: deprecatedAutocomplete,\n autoComplete: currentAutoComplete,\n enctype,\n acceptcharset,\n noHtml5Validate,\n disabled,\n readonly,\n formContext,\n /**\n * _internalFormWrapper is currently used by the material-ui and semantic-ui themes to provide a custom wrapper\n * around `<Form />` that supports the proper rendering of those themes. To use this prop, one must pass a\n * component that takes two props: `children` and `as`. That component, at minimum, should render the `children`\n * inside of a <form /> tag 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 _internalFormWrapper,\n } = this.props;\n\n const { schema, uiSchema, formData, errorSchema, idSchema } = this.state;\n const registry = this.getRegistry();\n const _SchemaField = registry.fields.SchemaField;\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 const SubmitButton = registry.widgets.SubmitButton;\n if (deprecatedAutocomplete) {\n console.warn(\n \"Using autocomplete property of Form is deprecated, use autoComplete instead.\"\n );\n }\n const autoComplete = currentAutoComplete\n ? currentAutoComplete\n : deprecatedAutocomplete;\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={form => {\n this.formElement = form;\n }}>\n {this.renderErrors()}\n <_SchemaField\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 {children ? children : <SubmitButton uiSchema={uiSchema} />}\n </FormTag>\n );\n }\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Form.propTypes = {\n schema: PropTypes.object.isRequired,\n uiSchema: PropTypes.object,\n formData: PropTypes.any,\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n widgets: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n ),\n fields: PropTypes.objectOf(PropTypes.elementType),\n ArrayFieldTemplate: PropTypes.elementType,\n ObjectFieldTemplate: PropTypes.elementType,\n FieldTemplate: PropTypes.elementType,\n ErrorList: PropTypes.func,\n onChange: PropTypes.func,\n onError: PropTypes.func,\n showErrorList: PropTypes.bool,\n onSubmit: PropTypes.func,\n id: PropTypes.string,\n className: PropTypes.string,\n tagName: PropTypes.elementType,\n _internalFormWrapper: PropTypes.elementType,\n name: PropTypes.string,\n method: PropTypes.string,\n target: PropTypes.string,\n action: PropTypes.string,\n autocomplete: PropTypes.string,\n autoComplete: PropTypes.string,\n enctype: PropTypes.string,\n acceptcharset: PropTypes.string,\n noValidate: PropTypes.bool,\n noHtml5Validate: PropTypes.bool,\n liveValidate: PropTypes.bool,\n validate: PropTypes.func,\n transformErrors: PropTypes.func,\n formContext: PropTypes.object,\n customFormats: PropTypes.object,\n additionalMetaSchemas: PropTypes.arrayOf(PropTypes.object),\n omitExtraData: PropTypes.bool,\n extraErrors: PropTypes.object,\n };\n}\n","import React, { forwardRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Form from \"./\";\n\nfunction withTheme(themeProps) {\n return forwardRef(({ fields, widgets, ...directProps }, ref) => {\n fields = { ...themeProps.fields, ...fields };\n widgets = { ...themeProps.widgets, ...widgets };\n\n return (\n <Form\n {...themeProps}\n {...directProps}\n fields={fields}\n widgets={widgets}\n ref={ref}\n />\n );\n });\n}\n\nwithTheme.propTypes = {\n widgets: PropTypes.object,\n fields: PropTypes.object,\n};\n\nexport default withTheme;\n","import React from \"react\";\n\nexport default function ErrorList(props) {\n const { errors } = props;\n return (\n <div className=\"panel panel-danger errors\">\n <div className=\"panel-heading\">\n <h3 className=\"panel-title\">Errors</h3>\n </div>\n <ul className=\"list-group\">\n {errors.map((error, i) => {\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 Form from \"./components/Form\";\nimport withTheme from \"./withTheme\";\nimport * as _utils from \"./utils\";\nimport { getDefaultRegistry } from \"./defaultRegistry\";\n\nconst utils = {\n ..._utils,\n getDefaultRegistry,\n};\n\nexport { withTheme, utils };\nexport default Form;\n"],"names":["IconButton","props","type","icon","className","otherProps","React","AddButton","tabIndex","onClick","disabled","ajv","createAjvInstance","formerCustomFormats","formerMetaSchema","Ajv","errorDataPath","allErrors","multipleOfPrecision","schemaId","unknownFormats","addFormat","toErrorList","errorSchema","fieldName","errorList","concat","__errors","map","stack","Object","keys","reduce","acc","key","validateFormData","formData","schema","customValidate","transformErrors","additionalMetaSchemas","customFormats","getDefaultFormState","newMetaSchemas","deepEquals","newFormats","Array","isArray","addMetaSchema","isObject","forEach","formatName","validationError","validate","err","errors","e","message","schemaPath","property","dataPath","name","keyword","params","trim","transformAjvErrors","noProperMetaSchema","includes","length","error","path","toPath","parent","splice","slice","segment","toErrorSchema","$schema","newErrorSchema","mergeObjects","unwrapErrorHandler","errorHandler","createErrorHandler","handler","addError","push","value","isValid","data","rootSchema","addSchema","withIdRefPrefix","schemaNode","obj","constructor","startsWith","i","removeSchema","widgetMap","checkbox","radio","select","hidden","string","text","password","email","hostname","ipv4","ipv6","uri","textarea","date","datetime","color","file","number","updown","range","integer","array","checkboxes","files","canExpand","uiSchema","additionalProperties","expandable","getUiOptions","undefined","maxProperties","getSchemaType","guessType","properties","find","getWidget","widget","registeredWidgets","ReactIs","createElement","Widget","MergedWidget","defaultOptions","defaultProps","options","mergeOptions","Error","hasOwnProperty","hasWidget","_schema","includeUndefinedValues","defaults","computeDefaults","parentDefaults","rawFormData","findSchemaDefinition","$ref","resolveDependencies","isFixedItems","items","itemSchema","idx","oneOf","getMatchingOption","anyOf","computedDefault","item","additionalItems","minItems","isMultiSelect","defaultsLength","defaultEntries","fillerSchema","fillerEntries","fill","retrieveSchema","mergeDefaultsWithFormData","assign","filter","indexOf","console","warn","component","substring","getSubmitButtonOptions","uiOptions","submitText","norender","getDisplayLabel","label","displayLabel","schemaType","isFilesArray","isCustomWidget","thing","File","obj1","obj2","concatArrays","left","right","asNumber","test","n","Number","valid","isNaN","orderProperties","order","arr","arrayToHash","prev","curr","propertyHash","orderFiltered","prop","orderHash","rest","restIndex","join","lastIndexOf","complete","isConstant","toConstant","isSelect","altSchemas","every","uniqueItems","itemsSchema","format","allowAdditionalItems","optionsList","enumNames","String","title","origRef","decodeURIComponent","current","jsonpointer","get","stubExistingAdditionalProperties","resolveSchema","resolveReference","allOf","allOfSubschema","resolvedSchema","expression","then","otherwise","resolvedSchemaLessConditional","conditionalSchema","mergeSchemas","resolveCondition","entries","propName","propSchema","rawPropData","propData","resolvedPropSchema","mergeAllOf","dependencies","processDependencies","dependencyKey","dependencyValue","remainingDependencies","withDependentProperties","withDependentSchema","additionallyRequired","required","from","Set","resolvedOneOf","subschema","validSubschemas","conditionPropertySchema","conditionSchema","withExactlyOneSubschema","union","isArguments","object","prototype","toString","call","a","b","ca","cb","Date","getTime","RegExp","source","global","multiline","lastIndex","ignoreCase","ka","kb","cal","sort","j","k","pop","shouldRender","comp","nextProps","nextState","state","toIdSchema","id","idPrefix","idSeparator","idSchema","$id","field","fieldId","toPathSchema","pathSchema","$name","replace","__rjsf_additionalProperties","element","parseDateString","dateString","includeTime","year","month","day","hour","minute","second","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","toDateString","time","utcTime","UTC","toJSON","utcToLocal","jsonDate","pad","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","localToUTC","num","size","s","dataURItoBlob","dataURI","splitted","split","param","binary","atob","charCodeAt","blob","window","Blob","Uint8Array","rangeSpec","spec","multipleOf","step","minimum","min","maximum","max","option","requiresAnyOf","augmentedSchema","shallowClone","schemaRequiresTrueValue","some","ArrayFieldTitle","TitleField","ArrayFieldDescription","description","DescriptionField","DefaultArrayItem","btnStyle","flex","paddingLeft","paddingRight","fontWeight","hasToolbar","children","style","display","justifyContent","hasMoveUp","hasMoveDown","readonly","onReorderClick","index","hasRemove","onDropIndexClick","DefaultFixedArrayFieldTemplate","canAdd","onAddClick","DefaultNormalArrayFieldTemplate","p","generateRowId","nanoid","generateKeyedFormData","keyedToPlainFormData","keyedFormData","keyedItem","ArrayField","_getNewFormDataRow","_this","registry","event","preventDefault","onChange","newKeyedFormDataRow","newKeyedFormData","setState","updatedKeyedFormData","onAddIndexClick","parseInt","_","newIndex","target","blur","_newKeyedFormData","onChangeForIndex","onSelectChange","getDerivedStateFromProps","prevState","nextFormData","previousKeyedFormData","previousKeyedFormDatum","isItemRequired","canAddItem","formItems","this","addable","maxItems","render","renderMultiSelect","renderCustomWidget","renderFixedArray","renderFiles","renderNormalArray","fields","UnsupportedField","reason","hideError","autofocus","onBlur","onFocus","rawErrors","ArrayFieldTemplate","formContext","arrayProps","itemErrorSchema","itemIdSchema","_this2","renderArrayFieldItem","canMoveUp","canMoveDown","itemData","itemUiSchema","placeholder","widgets","multiple","enumOptions","itemSchemas","additionalSchema","additional","_this3","canRemove","SchemaField","orderable","removable","has","moveUp","moveDown","remove","toolbar","Component","BooleanField","AnyOfField","onOptionChange","selectedOption","newOption","newFormData","optionsToDiscard","componentDidUpdate","prevProps","matchingOption","optionSchema","baseType","_SchemaField","trailingCharMatcherWithPrefix","trailingCharMatcher","NumberField","handleChange","lastValue","charAt","processed","match","StringField","re","DefaultObjectFieldTemplate","content","ObjectField","wasPropertyKeyModified","onPropertyChange","addedByAdditionalProperties","onDropPropertyClick","copiedFormData","getAvailableKey","preferredKey","newKey","onKeyChange","oldValue","newKeys","keyValues","renamedObj","handleAddClick","getDefaultValue","isRequired","orderedProperties","JSON","stringify","Template","ObjectFieldTemplate","templateProps","fieldUiSchema","COMPONENT_TYPES","Label","htmlFor","LabelInput","defaultValue","Help","help","ErrorList","elem","DefaultTemplate","WrapIfAdditional","classNames","keyLabel","border","shouldComponentUpdate","FieldTemplate","FieldComponent","componentName","getFieldComponent","Boolean","readOnly","uiSchemaHideError","fieldErrorSchema","_AnyOfField","_OneOfField","OneOfField","rawDescription","rawHelp","Fragment","SchemaFieldRender","defaultWidget","MultiSchemaField","NullField","componentDidMount","rangeOptions","start","stop","DateElement","SelectWidget","rootId","AltDateWidget","setNow","nowDateObj","clear","dateElementProps","elemProps","hideNowButton","href","hideClearButton","yearsRange","AltDateTimeWidget","BaseInput","log","inputType","inputProps","autocomplete","autoComplete","autoFocus","list","examples","emptyValue","example","CheckboxWidget","checked","CheckboxesWidget","enumDisabled","inline","itemDisabled","disabledCls","all","selected","at","selectValue","v","deselectValue","addNameToDataURL","dataURL","encodeURIComponent","processFile","Promise","resolve","reject","reader","FileReader","onerror","onload","result","readAsDataURL","FilesInfo","filesInfo","fileInfo","FileWidget","values","dataURLs","ref","inputRef","accept","RadioWidget","Math","random","nums","processValue","x","getValue","o","newValue","TextareaWidget","rows","PasswordWidget","UpDownWidget","RangeWidget","TextWidget","DateWidget","DateTimeWidget","EmailWidget","URLWidget","HiddenWidget","ColorWidget","SubmitButton","getDefaultRegistry","definitions","Form","getUsedFormData","_pick","getFieldNames","getAllPaths","_obj","paths","newPaths","formValue","_get","_isEmpty","getStateFromProps","mustValidate","noValidate","liveValidate","omitExtraData","liveOmit","fieldNames","schemaValidation","schemaValidationErrors","schemaValidationErrorSchema","extraErrors","onSubmit","currentTarget","persist","onError","status","formElement","UNSAFE_componentWillReceiveProps","inputFormData","edit","retrievedSchema","currentErrors","getRegistry","renderErrors","showErrorList","submit","dispatchEvent","CustomEvent","cancelable","tagName","method","action","deprecatedAutocomplete","currentAutoComplete","enctype","acceptcharset","noHtml5Validate","_internalFormWrapper","as","FormTag","encType","acceptCharset","form","withTheme","themeProps","forwardRef","directProps","propTypes","PropTypes","utils","_utils"],"mappings":"4lDAEe,SAASA,EAAWC,SAC4BA,EAArDC,KAAAA,aAAO,YAAWC,EAAmCF,EAAnCE,KAAMC,EAA6BH,EAA7BG,UAAcC,IAAeJ,sCAE3DK,4BACEJ,KAAK,SACLE,qBAAsBF,MAAQE,GAC1BC,GACJC,qBAAGF,iCAAkCD,KCN5B,SAASI,YAEpBD,uBAAKF,UAAU,OACbE,qBAAGF,mDAH2BA,WAI5BE,gBAACN,GACCE,KAAK,OACLC,KAAK,OACLC,UAAU,iCACC,MACXI,SAAS,IACTC,UAVqCA,QAWrCC,WAX8CA,aCDjD,ICAHC,EAAMC,IAGNC,EAAsB,KACtBC,EAAmB,KAKvB,SAASF,QACDD,EAAM,IAAII,EAAI,CAClBC,cAAe,WACfC,WAAW,EACXC,oBAAqB,EACrBC,SAAU,OACVC,eAAgB,kBAIlBT,EAAIU,UACF,WACA,6DAEFV,EAAIU,UACF,QACA,8YAEKV,EAsDF,SAASW,EAAYC,EAAaC,YAAAA,IAAAA,EAAY,YAE/CC,EAAY,SACZ,aAAcF,IAChBE,EAAYA,EAAUC,OACpBH,EAAYI,SAASC,KAAI,SAAAC,SAChB,CACLA,MAAUL,OAAcK,QAKzBC,OAAOC,KAAKR,GAAaS,QAAO,SAACC,EAAKC,SAC/B,aAARA,IACFD,EAAMA,EAAIP,OAAOJ,EAA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,UAAU,6BACbE,uBAAKF,UAAU,iBACbE,sBAAIF,UAAU,0BAEhBE,sBAAIF,UAAU,cACXmD,EAAO3B,KAAI,SAACyC,EAAO2B,UAEhB1F,sBAAI4B,IAAK8D,EAAG5F,UAAU,+BACnBiE,EAAMxC,aFgBjBooB,eAAe,GCRnBuC,GAAUI,UAAY,CACpBrP,QAASsP,EAAUvb,OACnB6K,OAAQ0Q,EAAUvb,YElBdwb,QACDC,IACH/D,mBAAAA"}
|
|
1
|
+
{"version":3,"file":"core.cjs.production.min.js","sources":["../src/components/fields/ArrayField.tsx","../src/components/fields/MultiSchemaField.tsx","../src/components/fields/NumberField.tsx","../src/components/fields/SchemaField.tsx","../src/components/fields/index.ts","../src/components/fields/BooleanField.tsx","../src/components/fields/ObjectField.tsx","../src/components/fields/StringField.tsx","../src/components/fields/NullField.tsx","../src/components/templates/ButtonTemplates/IconButton.tsx","../src/components/templates/FieldTemplate/Label.tsx","../src/components/templates/FieldTemplate/WrapIfAdditional.tsx","../src/components/templates/index.ts","../src/components/templates/ArrayFieldDescriptionTemplate.tsx","../src/components/templates/ArrayFieldItemTemplate.tsx","../src/components/templates/ArrayFieldTemplate.tsx","../src/components/templates/ArrayFieldTitleTemplate.tsx","../src/components/templates/ButtonTemplates/index.ts","../src/components/templates/ButtonTemplates/SubmitButton.tsx","../src/components/templates/ButtonTemplates/AddButton.tsx","../src/components/templates/BaseInputTemplate.tsx","../src/components/templates/DescriptionField.tsx","../src/components/templates/ErrorList.tsx","../src/components/templates/FieldTemplate/FieldTemplate.tsx","../src/components/templates/ObjectFieldTemplate.tsx","../src/components/templates/TitleField.tsx","../src/components/templates/UnsupportedField.tsx","../src/components/widgets/AltDateWidget.tsx","../src/components/widgets/FileWidget.tsx","../src/components/widgets/SelectWidget.tsx","../src/components/widgets/TextareaWidget.tsx","../src/components/widgets/index.ts","../src/components/widgets/PasswordWidget.tsx","../src/components/widgets/RadioWidget.tsx","../src/components/widgets/UpDownWidget.tsx","../src/components/widgets/RangeWidget.tsx","../src/components/widgets/TextWidget.tsx","../src/components/widgets/DateWidget.tsx","../src/components/widgets/DateTimeWidget.tsx","../src/components/widgets/AltDateTimeWidget.tsx","../src/components/widgets/EmailWidget.tsx","../src/components/widgets/URLWidget.tsx","../src/components/widgets/HiddenWidget.tsx","../src/components/widgets/ColorWidget.tsx","../src/components/widgets/CheckboxWidget.tsx","../src/components/widgets/CheckboxesWidget.tsx","../src/getDefaultRegistry.ts","../src/components/Form.tsx","../src/withTheme.tsx"],"sourcesContent":["import React, { Component } from \"react\";\nimport {\n getTemplate,\n getWidget,\n getUiOptions,\n isFixedItems,\n allowAdditionalItems,\n isCustomWidget,\n optionsList,\n ArrayFieldTemplateProps,\n ErrorSchema,\n Field,\n FieldProps,\n IdSchema,\n RJSFSchema,\n UiSchema,\n ITEMS_KEY,\n} from \"@rjsf/utils\";\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>(\n keyedFormData: KeyedFormDataType<T> | KeyedFormDataType<T>[]\n): 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, F = any> extends Component<\n FieldProps<T[], 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[], 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, F = any>(\n nextProps: Readonly<FieldProps<T[], 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)\n ? nextProps.formData\n : [];\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 } = this.props;\n return get(\n schema,\n [ITEMS_KEY, \"title\"],\n get(schema, [ITEMS_KEY, \"description\"], \"Item\")\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: RJSFSchema) {\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 } = this.props;\n let { addable } = getUiOptions<T[], F>(uiSchema);\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 RJSFSchema;\n if (isFixedItems(schema) && allowAdditionalItems(schema)) {\n itemSchema = schema.additionalItems as RJSFSchema;\n }\n // Cast this as a T to work around schema utils being for T[] caused by the FieldProps<T[], 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 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 if (event) {\n event.preventDefault();\n }\n\n const { onChange } = this.props;\n const { keyedFormData } = this.state;\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n const newKeyedFormData = [...keyedFormData, newKeyedFormDataRow];\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData))\n );\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 if (event) {\n event.preventDefault();\n }\n const { onChange } = this.props;\n const { keyedFormData } = this.state;\n const newKeyedFormDataRow: KeyedFormDataType<T> = {\n key: generateRowId(),\n item: this._getNewFormDataRow(),\n };\n const newKeyedFormData = [...keyedFormData];\n newKeyedFormData.splice(index, 0, newKeyedFormDataRow);\n\n this.setState(\n {\n keyedFormData: newKeyedFormData,\n updatedKeyedFormData: true,\n },\n () => onChange(keyedToPlainFormData(newKeyedFormData))\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 () =>\n onChange(\n keyedToPlainFormData(newKeyedFormData),\n newErrorSchema as ErrorSchema<T[]>\n )\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: React.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 (this.props.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 () =>\n onChange(\n keyedToPlainFormData(newKeyedFormData),\n newErrorSchema as ErrorSchema<T[]>\n )\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>) => {\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 );\n };\n };\n\n /** Callback handler used to change the value for a checkbox */\n onSelectChange = (value: any) => {\n const { onChange } = this.props;\n onChange(value);\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 } = registry;\n if (!(ITEMS_KEY in schema)) {\n const uiOptions = getUiOptions<T[], F>(uiSchema);\n const UnsupportedFieldTemplate = getTemplate<\n \"UnsupportedFieldTemplate\",\n T[],\n F\n >(\"UnsupportedFieldTemplate\", registry, uiOptions);\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason=\"Missing items definition\"\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[], 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 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 title = schema.title === undefined ? name : schema.title;\n const { schemaUtils, formContext } = registry;\n const uiOptions = getUiOptions<T[], F>(uiSchema);\n const _schemaItems = isObject(schema.items)\n ? (schema.items as RJSFSchema)\n : {};\n const itemsSchema = schemaUtils.retrieveSchema(_schemaItems);\n const formData = keyedToPlainFormData(this.state.keyedFormData);\n const arrayProps: ArrayFieldTemplateProps<T[], F> = {\n canAdd: this.canAddItem(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 itemSchema = schemaUtils.retrieveSchema(_schemaItems, itemCast);\n const itemErrorSchema = errorSchema\n ? (errorSchema[index] as ErrorSchema<T[]>)\n : undefined;\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(\n itemSchema,\n itemIdPrefix,\n itemCast,\n idPrefix,\n idSeparator\n );\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\n canMoveUp: index > 0,\n canMoveDown: index < formData.length - 1,\n itemSchema: itemSchema,\n itemIdSchema,\n itemErrorSchema,\n itemData: itemCast,\n itemUiSchema: uiSchema.items,\n autofocus: autofocus && index === 0,\n onBlur,\n onFocus,\n rawErrors,\n });\n }),\n className: `field field-array field-array-of-${itemsSchema.type}`,\n disabled,\n idSchema,\n uiSchema,\n onAddClick: this.onAddClick,\n readonly,\n required,\n schema,\n title,\n formContext,\n formData,\n rawErrors,\n registry,\n };\n\n const Template = getTemplate<\"ArrayFieldTemplate\", T[], F>(\n \"ArrayFieldTemplate\",\n registry,\n uiOptions\n );\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 } = registry;\n const title = schema.title || name;\n\n const { widget, ...options } = getUiOptions<T[], F>(uiSchema);\n const Widget = getWidget<T[], F>(schema, widget, widgets);\n return (\n <Widget\n id={idSchema && idSchema.$id}\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={title}\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 } = registry;\n const itemsSchema = schemaUtils.retrieveSchema(\n schema.items as RJSFSchema,\n items\n );\n const title = schema.title || name;\n const enumOptions = optionsList(itemsSchema);\n const { widget = \"select\", ...options } = getUiOptions<T[], F>(uiSchema);\n const Widget = getWidget<T[], F>(schema, widget, widgets);\n return (\n <Widget\n id={idSchema && idSchema.$id}\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={title}\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 title = schema.title || name;\n const { widgets, formContext } = registry;\n const { widget = \"files\", ...options } = getUiOptions<T[], F>(uiSchema);\n const Widget = getWidget<T[], F>(schema, widget, widgets);\n return (\n <Widget\n options={options}\n id={idSchema && idSchema.$id}\n multiple\n onChange={this.onSelectChange}\n onBlur={onBlur}\n onFocus={onFocus}\n schema={schema}\n uiSchema={uiSchema}\n title={title}\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=\"\"\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 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 title = schema.title || name;\n const uiOptions = getUiOptions<T[], F>(uiSchema);\n const { schemaUtils, formContext } = registry;\n const _schemaItems = isObject(schema.items)\n ? (schema.items as RJSFSchema[])\n : [];\n const itemSchemas = _schemaItems.map((item: RJSFSchema, index: number) =>\n schemaUtils.retrieveSchema(item, formData[index] as unknown as T[])\n );\n const additionalSchema = isObject(schema.additionalItems)\n ? schemaUtils.retrieveSchema(schema.additionalItems, 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 arrayProps: ArrayFieldTemplateProps<T[], F> = {\n canAdd: this.canAddItem(items) && !!additionalSchema,\n className: \"field field-array 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, itemCast)\n : itemSchemas[index];\n const itemIdPrefix = idSchema.$id + idSeparator + index;\n const itemIdSchema = schemaUtils.toIdSchema(\n itemSchema,\n itemIdPrefix,\n itemCast,\n idPrefix,\n idSeparator\n );\n const itemUiSchema = additional\n ? uiSchema.additionalItems || {}\n : Array.isArray(uiSchema.items)\n ? uiSchema.items[index]\n : uiSchema.items || {};\n const itemErrorSchema = errorSchema\n ? (errorSchema[index] as ErrorSchema<T[]>)\n : undefined;\n\n return this.renderArrayFieldItem({\n key,\n index,\n name: name && `${name}-${index}`,\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 });\n }),\n onAddClick: this.onAddClick,\n readonly,\n required,\n registry,\n schema,\n uiSchema,\n title,\n formContext,\n rawErrors,\n };\n\n const Template = getTemplate<\"ArrayFieldTemplate\", T[], F>(\n \"ArrayFieldTemplate\",\n registry,\n uiOptions\n );\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 canRemove?: boolean;\n canMoveUp?: boolean;\n canMoveDown?: boolean;\n itemSchema: RJSFSchema;\n itemData: T[];\n itemUiSchema: UiSchema<T[], F>;\n itemIdSchema: IdSchema<T[]>;\n itemErrorSchema?: ErrorSchema<T[]>;\n autofocus?: boolean;\n onBlur: FieldProps<T[], F>[\"onBlur\"];\n onFocus: FieldProps<T[], F>[\"onFocus\"];\n rawErrors?: string[];\n }) {\n const {\n key,\n index,\n name,\n canRemove = true,\n canMoveUp = true,\n canMoveDown = true,\n itemSchema,\n itemData,\n itemUiSchema,\n itemIdSchema,\n itemErrorSchema,\n autofocus,\n onBlur,\n onFocus,\n rawErrors,\n } = props;\n const {\n disabled,\n hideError,\n idPrefix,\n idSeparator,\n readonly,\n uiSchema,\n registry,\n formContext,\n } = this.props;\n const {\n fields: { SchemaField },\n } = registry;\n const { orderable = true, removable = true } = getUiOptions<T[], F>(\n uiSchema\n );\n const has: { [key: string]: boolean } = {\n moveUp: orderable && canMoveUp,\n moveDown: orderable && canMoveDown,\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 <SchemaField\n name={name}\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 className: \"array-item\",\n disabled,\n hasToolbar: has.toolbar,\n hasMoveUp: has.moveUp,\n hasMoveDown: has.moveDown,\n hasRemove: has.remove,\n index,\n key,\n onAddIndexClick: this.onAddIndexClick,\n onDropIndexClick: this.onDropIndexClick,\n onReorderClick: this.onReorderClick,\n readonly,\n registry,\n };\n }\n}\n\n/** `ArrayField` is `React.ComponentType<FieldProps<T[], F>>` (necessarily) but the `registry` requires things to be a\n * `Field` which is defined as `React.ComponentType<FieldProps<T, F>>`, so cast it to make `registry` happy.\n */\nexport default ArrayField as unknown as Field;\n","import React, { Component } from \"react\";\nimport {\n getUiOptions,\n getWidget,\n guessType,\n deepEquals,\n FieldProps,\n RJSFSchema,\n} from \"@rjsf/utils\";\nimport unset from \"lodash/unset\";\n\n/** Type used for the state of the `AnyOfField` component */\ntype AnyOfFieldState = {\n /** The currently selected option */\n selectedOption: number;\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, F = any> extends Component<\n FieldProps<T, F>,\n AnyOfFieldState\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, F>) {\n super(props);\n\n const { formData, options } = this.props;\n\n this.state = {\n selectedOption: this.getMatchingOption(0, formData, options),\n };\n }\n\n /** React lifecycle methos 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(\n prevProps: Readonly<FieldProps<T, F>>,\n prevState: Readonly<AnyOfFieldState>\n ) {\n const { formData, options, idSchema } = this.props;\n const { selectedOption } = this.state;\n if (\n !deepEquals(formData, prevProps.formData) &&\n idSchema.$id === prevProps.idSchema.$id\n ) {\n const matchingOption = this.getMatchingOption(\n selectedOption,\n formData,\n options\n );\n\n if (!prevState || matchingOption === selectedOption) {\n return;\n }\n\n this.setState({\n selectedOption: matchingOption,\n });\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(\n selectedOption: number,\n formData: T,\n options: RJSFSchema[]\n ) {\n const { schemaUtils } = this.props.registry;\n\n const option = schemaUtils.getMatchingOption(formData, options);\n if (option !== 0) {\n return option;\n }\n // If the form data matches none of the options, use the currently selected\n // option, assuming it's available; otherwise use the first option\n return selectedOption || 0;\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 -\n */\n onOptionChange = (option: any) => {\n const selectedOption = parseInt(option, 10);\n const { formData, onChange, options, registry } = this.props;\n const { schemaUtils } = registry;\n const newOption = schemaUtils.retrieveSchema(\n options[selectedOption],\n formData\n );\n\n // If the new option is of type object and the current data is an object,\n // discard properties added using the old option.\n let newFormData: T | undefined = undefined;\n if (\n guessType(formData) === \"object\" &&\n (newOption.type === \"object\" || newOption.properties)\n ) {\n newFormData = Object.assign({}, formData);\n\n const optionsToDiscard = options.slice();\n optionsToDiscard.splice(selectedOption, 1);\n\n // Discard any data added using other options\n for (const option of optionsToDiscard) {\n if (option.properties) {\n for (const key in option.properties) {\n if (key in newFormData) {\n unset(newFormData, key);\n }\n }\n }\n }\n }\n // Call getDefaultFormState to make sure defaults are populated on change.\n onChange(\n schemaUtils.getDefaultFormState(options[selectedOption], newFormData) as T\n );\n\n this.setState({\n selectedOption: parseInt(option, 10),\n });\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 baseType,\n disabled = false,\n readonly = false,\n hideError = false,\n errorSchema = {},\n formData,\n formContext,\n idPrefix,\n idSeparator,\n idSchema,\n onBlur,\n onChange,\n onFocus,\n options,\n registry,\n uiSchema,\n schema,\n } = this.props;\n\n const { widgets, fields } = registry;\n const { SchemaField: _SchemaField } = fields;\n const { selectedOption } = this.state;\n const { widget = \"select\", ...uiOptions } = getUiOptions<T, F>(uiSchema);\n const Widget = getWidget<T, F>({ type: \"number\" }, widget, widgets);\n\n const option = options[selectedOption] || null;\n let optionSchema;\n\n if (option) {\n // If the subschema doesn't declare a type, infer the type from the\n // parent schema\n optionSchema = option.type\n ? option\n : Object.assign({}, option, { type: baseType });\n }\n\n const enumOptions = options.map((option: RJSFSchema, index: number) => ({\n label: option.title || `Option ${index + 1}`,\n value: index,\n }));\n\n return (\n <div className=\"panel panel-default panel-body\">\n <div className=\"form-group\">\n <Widget\n id={`${idSchema.$id}${\n schema.oneOf ? \"__oneof_select\" : \"__anyof_select\"\n }`}\n schema={{ type: \"number\", default: 0 }}\n onChange={this.onOptionChange}\n onBlur={onBlur}\n onFocus={onFocus}\n value={selectedOption}\n options={{ enumOptions }}\n registry={registry}\n formContext={formContext}\n {...uiOptions}\n label=\"\"\n />\n </div>\n {option !== null && (\n <_SchemaField\n name={name}\n schema={optionSchema}\n uiSchema={uiSchema}\n errorSchema={errorSchema}\n idSchema={idSchema}\n idPrefix={idPrefix}\n idSeparator={idSeparator}\n formData={formData}\n formContext={formContext}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n registry={registry}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n />\n )}\n </div>\n );\n }\n}\n\nexport default AnyOfField;\n","import React, { useState, useCallback } from \"react\";\nimport { asNumber, FieldProps } 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, F = any>(props: FieldProps<T, F>) {\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, F>[\"value\"]) => {\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);\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(`${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 React from \"react\";\nimport {\n mergeObjects,\n deepEquals,\n getUiOptions,\n getSchemaType,\n getTemplate,\n FieldProps,\n FieldTemplateProps,\n IdSchema,\n Registry,\n RJSFSchema,\n RJSFSchemaDefinition,\n UIOptionsType,\n ID_KEY,\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, F>(\n schema: RJSFSchema,\n uiOptions: UIOptionsType<T, F>,\n idSchema: IdSchema<T>,\n registry: Registry<T, F>\n) {\n const field = uiOptions.field;\n const { fields } = registry;\n if (typeof field === \"function\") {\n return field;\n }\n if (typeof field === \"string\" && field in fields) {\n return fields[field];\n }\n\n const schemaType = getSchemaType(schema);\n const type: string = Array.isArray(schemaType)\n ? schemaType[0]\n : schemaType || \"\";\n const componentName = COMPONENT_TYPES[type];\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<\n \"UnsupportedFieldTemplate\",\n T,\n F\n >(\"UnsupportedFieldTemplate\", registry, uiOptions);\n\n return (\n <UnsupportedFieldTemplate\n schema={schema}\n idSchema={idSchema}\n reason={`Unknown field type ${schema.type}`}\n registry={registry}\n />\n );\n };\n}\n\n/** The `Help` component renders any help desired for a field\n *\n * @param props - The id and help information to be rendered\n */\nfunction Help(props: { id: string; help?: string | React.ReactElement }) {\n const { id, help } = props;\n if (!help) {\n return null;\n }\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\n/** The `ErrorList` component renders the errors local to the particular field\n *\n * @param props - The list of errors to show\n */\nfunction ErrorList(props: { errors?: string[] }) {\n const { errors = [] } = props;\n if (errors.length === 0) {\n return null;\n }\n\n return (\n <div>\n <ul className=\"error-detail bs-callout bs-callout-info\">\n {errors\n .filter((elem) => !!elem)\n .map((error, index) => {\n return (\n <li className=\"text-danger\" key={index}>\n {error}\n </li>\n );\n })}\n </ul>\n </div>\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, F>(props: FieldProps<T, F>) {\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 } = registry;\n const uiOptions = getUiOptions<T, F>(uiSchema);\n const FieldTemplate = getTemplate<\"FieldTemplate\", T, F>(\n \"FieldTemplate\",\n registry,\n uiOptions\n );\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n F\n >(\"DescriptionFieldTemplate\", registry, uiOptions);\n const schema = schemaUtils.retrieveSchema(_schema, formData);\n const idSchema = mergeObjects(\n schemaUtils.toIdSchema(\n schema,\n _idSchema.$id,\n formData,\n idPrefix,\n idSeparator\n ),\n _idSchema\n ) as IdSchema<T>;\n const FieldComponent = getFieldComponent(\n schema,\n uiOptions,\n idSchema,\n registry\n );\n const disabled = Boolean(props.disabled || uiOptions.disabled);\n const readonly = Boolean(\n props.readonly ||\n uiOptions.readonly ||\n props.schema.readOnly ||\n schema.readOnly\n );\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 =\n uiSchemaHideError === undefined\n ? props.hideError\n : Boolean(uiSchemaHideError);\n const autofocus = Boolean(props.autofocus || uiOptions.autofocus);\n if (Object.keys(schema).length === 0) {\n return null;\n }\n\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);\n\n const { __errors, ...fieldErrorSchema } = errorSchema || {};\n // See #439: uiSchema: Don't pass consumed class names to child components\n const fieldUiSchema = omit(uiSchema, [\"ui:classNames\", \"classNames\"]);\n if (\"ui:options\" in fieldUiSchema) {\n fieldUiSchema[\"ui:options\"] = omit(fieldUiSchema[\"ui:options\"], [\n \"classNames\",\n ]);\n }\n\n const field = (\n <FieldComponent\n {...props}\n idSchema={idSchema}\n schema={schema}\n uiSchema={fieldUiSchema}\n disabled={disabled}\n readonly={readonly}\n hideError={hideError}\n autofocus={autofocus}\n errorSchema={fieldErrorSchema}\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 = uiOptions.title || props.schema.title || schema.title || name;\n }\n\n const description =\n uiOptions.description ||\n props.schema.description ||\n schema.description ||\n \"\";\n const errors = __errors;\n const help = uiOptions.help;\n const hidden = uiOptions.widget === \"hidden\";\n\n const classNames = [\"form-group\", \"field\", `field-${schema.type}`];\n if (!hideError && errors && errors.length > 0) {\n classNames.push(\"field-error has-error has-danger\");\n }\n if (uiSchema?.classNames) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n \"'uiSchema.classNames' is deprecated and may be removed in a major release; Use 'ui:classNames' instead.\"\n );\n }\n classNames.push(uiSchema.classNames);\n }\n if (uiOptions.classNames) {\n classNames.push(uiOptions.classNames);\n }\n\n const fieldProps: Omit<FieldTemplateProps<T, F>, \"children\"> = {\n description: (\n <DescriptionFieldTemplate\n id={`${id}__description`}\n description={description}\n registry={registry}\n />\n ),\n rawDescription: description,\n help: <Help id={`${id}__help`} help={help} />,\n rawHelp: typeof help === \"string\" ? help : undefined,\n errors: hideError ? undefined : <ErrorList errors={errors} />,\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 formContext,\n formData,\n schema,\n uiSchema,\n registry,\n };\n\n const _AnyOfField = registry.fields.AnyOfField;\n const _OneOfField = registry.fields.OneOfField;\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 &&\n !uiSchema?.[\"ui:field\"] &&\n !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: RJSFSchemaDefinition) =>\n schemaUtils.retrieveSchema(\n isObject(_schema) ? _schema : {},\n formData\n )\n )}\n baseType={schema.type}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n />\n )}\n {schema.oneOf &&\n !uiSchema?.[\"ui:field\"] &&\n !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: RJSFSchemaDefinition) =>\n schemaUtils.retrieveSchema(\n isObject(_schema) ? _schema : {},\n formData\n )\n )}\n baseType={schema.type}\n registry={registry}\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, F = any> extends React.Component<FieldProps<T, F>> {\n shouldComponentUpdate(nextProps: Readonly<FieldProps<T, F>>) {\n return !deepEquals(this.props, nextProps);\n }\n\n render() {\n return <SchemaFieldRender<T, F> {...this.props} />;\n }\n}\n\nexport default SchemaField;\n","import { RegistryFieldsType } from \"@rjsf/utils\";\n\nimport ArrayField from \"./ArrayField\";\nimport BooleanField from \"./BooleanField\";\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\nconst fields: RegistryFieldsType = {\n AnyOfField: MultiSchemaField,\n ArrayField,\n BooleanField,\n NumberField,\n ObjectField,\n OneOfField: MultiSchemaField,\n SchemaField,\n StringField,\n NullField,\n};\n\nexport default fields;\n","import React from \"react\";\nimport {\n getWidget,\n getUiOptions,\n optionsList,\n FieldProps,\n RJSFSchemaDefinition,\n EnumOptionsType,\n RJSFSchema,\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, F = any>(props: FieldProps<T, F>) {\n const {\n schema,\n name,\n uiSchema,\n idSchema,\n formData,\n registry,\n required,\n disabled,\n readonly,\n autofocus,\n onChange,\n onFocus,\n onBlur,\n rawErrors,\n } = props;\n const { title } = schema;\n const { widgets, formContext } = registry;\n const { widget = \"checkbox\", ...options } = getUiOptions<T, F>(uiSchema);\n const Widget = getWidget(schema, widget, widgets);\n\n let enumOptions: EnumOptionsType[] | undefined;\n\n if (Array.isArray(schema.oneOf)) {\n enumOptions = optionsList({\n oneOf: schema.oneOf\n .map((option: RJSFSchemaDefinition) => {\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) => o) as RJSFSchemaDefinition[], // cast away the error that typescript can't grok is fixed\n });\n } else {\n // We deprecated enumNames in v5. It's intentionally omitted from RSJFSchema type, so we need to cast here.\n const schemaWithEnumNames = schema as RJSFSchema & { enumNames?: string[] };\n schema.enum = schema.enum ?? [true, false];\n if (\n !schemaWithEnumNames.enumNames &&\n schema.enum &&\n schema.enum.length === 2 &&\n schema.enum.every((v) => typeof v === \"boolean\")\n ) {\n enumOptions = [\n {\n value: schema.enum[0],\n label: schema.enum[0] ? \"Yes\" : \"No\",\n },\n {\n value: schema.enum[1],\n label: schema.enum[1] ? \"Yes\" : \"No\",\n },\n ];\n } else {\n enumOptions = optionsList({\n enum: schema.enum,\n // NOTE: enumNames is deprecated, but still supported for now.\n enumNames: schemaWithEnumNames.enumNames,\n } as RJSFSchema);\n }\n }\n\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema && idSchema.$id}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n label={title === undefined ? name : title}\n value={formData}\n required={required}\n disabled={disabled}\n readonly={readonly}\n registry={registry}\n formContext={formContext}\n autofocus={autofocus}\n rawErrors={rawErrors}\n />\n );\n}\n\nexport default BooleanField;\n","import React, { Component } from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n orderProperties,\n ErrorSchema,\n FieldProps,\n GenericObjectType,\n IdSchema,\n RJSFSchema,\n ADDITIONAL_PROPERTY_FLAG,\n PROPERTIES_KEY,\n REF_KEY,\n} from \"@rjsf/utils\";\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, F = any> extends Component<\n FieldProps<T, 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 (\n Array.isArray(schema.required) && schema.required.indexOf(name) !== -1\n );\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, newErrorSchema?: ErrorSchema<T>) => {\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 };\n onChange(\n newFormData,\n errorSchema &&\n errorSchema && {\n ...errorSchema,\n [name]: newErrorSchema,\n }\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 };\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 } = this.props;\n const { duplicateKeySuffixSeparator = \"-\" } = getUiOptions<T, F>(uiSchema);\n\n let index = 0;\n let newKey = preferredKey;\n while (newKey in formData) {\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 switch (type) {\n case \"string\":\n return \"New Value\";\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 default:\n // We don't have a datatype for some reason (perhaps additionalProperties was true)\n return \"New Value\";\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: RJSFSchema) => () => {\n if (!isObject(schema.additionalProperties)) {\n return;\n }\n const { formData, onChange, registry } = this.props;\n let type = schema.additionalProperties.type;\n const newFormData = { ...formData };\n\n if (REF_KEY in schema.additionalProperties) {\n const { schemaUtils } = registry;\n const refSchema = schemaUtils.retrieveSchema(\n { $ref: schema.additionalProperties[REF_KEY] },\n formData\n );\n\n type = refSchema.type;\n }\n\n const newKey = this.getAvailableKey(\"newKey\", newFormData);\n // Cast this to make the `set` work properly\n set(newFormData as GenericObjectType, newKey, this.getDefaultValue(type));\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 = false,\n readonly = false,\n hideError,\n idPrefix,\n idSeparator,\n onBlur,\n onFocus,\n registry,\n } = this.props;\n\n const { fields, formContext, schemaUtils } = registry;\n const { SchemaField } = fields;\n const schema = schemaUtils.retrieveSchema(rawSchema, formData);\n const uiOptions = getUiOptions<T, F>(uiSchema);\n const { properties: schemaProperties = {} } = schema;\n\n const title = schema.title === undefined ? name : schema.title;\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=\"config-error\" style={{ color: \"red\" }}>\n Invalid {name || \"root\"} object field configuration:\n <em>{(err as Error).message}</em>.\n </p>\n <pre>{JSON.stringify(schema)}</pre>\n </div>\n );\n }\n\n const Template = getTemplate<\"ObjectFieldTemplate\", T, F>(\n \"ObjectFieldTemplate\",\n registry,\n uiOptions\n );\n\n const templateProps = {\n title: uiOptions.title || title,\n description,\n properties: orderedProperties.map((name) => {\n const addedByAdditionalProperties = has(schema, [\n PROPERTIES_KEY,\n name,\n ADDITIONAL_PROPERTY_FLAG,\n ]);\n const fieldUiSchema = addedByAdditionalProperties\n ? uiSchema.additionalProperties\n : uiSchema[name];\n const hidden = getUiOptions<T, 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], {})}\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(\n name,\n addedByAdditionalProperties\n )}\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 schema,\n formData,\n formContext,\n registry,\n };\n return <Template {...templateProps} onAddClick={this.handleAddClick} />;\n }\n}\n\nexport default ObjectField;\n","import React from \"react\";\nimport {\n getWidget,\n getUiOptions,\n optionsList,\n hasWidget,\n FieldProps,\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, F = any>(props: FieldProps<T, F>) {\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 } = props;\n const { title, format } = schema;\n const { widgets, formContext, schemaUtils } = registry;\n const enumOptions = schemaUtils.isSelect(schema)\n ? optionsList(schema)\n : undefined;\n let defaultWidget = enumOptions ? \"select\" : \"text\";\n if (format && hasWidget<T, F>(schema, format, widgets)) {\n defaultWidget = format;\n }\n const {\n widget = defaultWidget,\n placeholder = \"\",\n ...options\n } = getUiOptions<T, F>(uiSchema);\n const Widget = getWidget<T, F>(schema, widget, widgets);\n return (\n <Widget\n options={{ ...options, enumOptions }}\n schema={schema}\n uiSchema={uiSchema}\n id={idSchema && idSchema.$id}\n label={title === undefined ? name : title}\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 } 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, F = any>(props: FieldProps<T, F>) {\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 React from \"react\";\nimport { IconButtonProps } from \"@rjsf/utils\";\n\nexport default function IconButton(props: IconButtonProps) {\n const { iconType = \"default\", icon, className, ...otherProps } = props;\n return (\n <button\n type=\"button\"\n className={`btn btn-${iconType} ${className}`}\n {...otherProps}\n >\n <i className={`glyphicon glyphicon-${icon}`} />\n </button>\n );\n}\n\nexport function MoveDownButton(props: IconButtonProps) {\n return (\n <IconButton\n title=\"Move down\"\n className=\"array-item-move-down\"\n {...props}\n icon=\"arrow-down\"\n />\n );\n}\n\nexport function MoveUpButton(props: IconButtonProps) {\n return (\n <IconButton\n title=\"Move up\"\n className=\"array-item-move-up\"\n {...props}\n icon=\"arrow-up\"\n />\n );\n}\n\nexport function RemoveButton(props: IconButtonProps) {\n return (\n <IconButton\n title=\"Remove\"\n className=\"array-item-remove\"\n {...props}\n iconType=\"danger\"\n icon=\"remove\"\n />\n );\n}\n","import React from \"react\";\n\nconst 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 React from \"react\";\nimport { ADDITIONAL_PROPERTY_FLAG, FieldTemplateProps } from \"@rjsf/utils\";\n\nimport Label from \"./Label\";\n\n/** The properties that are passed to a WrapIfAdditionalTemplate implementation */\nexport type WrapIfAdditionalProps<T = any, F = any> = {\n children: React.ReactNode;\n} & Pick<\n FieldTemplateProps<T, F>,\n | \"classNames\"\n | \"disabled\"\n | \"id\"\n | \"label\"\n | \"onDropPropertyClick\"\n | \"onKeyChange\"\n | \"readonly\"\n | \"required\"\n | \"schema\"\n | \"registry\"\n>;\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 WrapIfAdditional<T = any, F = any>(\n props: WrapIfAdditionalProps<T, F>\n) {\n const {\n id,\n classNames,\n disabled,\n label,\n onKeyChange,\n onDropPropertyClick,\n readonly,\n required,\n schema,\n children,\n registry,\n } = props;\n const { RemoveButton } = registry.templates.ButtonTemplates;\n const keyLabel = `${label} Key`; // i18n ?\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n if (!additional) {\n return <div className={classNames}>{children}</div>;\n }\n\n return (\n <div className={classNames}>\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={(event) => onKeyChange(event.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 className=\"array-item-remove btn-block\"\n style={{ border: \"0\" }}\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n />\n </div>\n </div>\n </div>\n );\n}\n","import { TemplatesType } from \"@rjsf/utils\";\n\nimport ArrayFieldDescriptionTemplate from \"./ArrayFieldDescriptionTemplate\";\nimport ArrayFieldItemTemplate from \"./ArrayFieldItemTemplate\";\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 ObjectFieldTemplate from \"./ObjectFieldTemplate\";\nimport TitleField from \"./TitleField\";\nimport UnsupportedField from \"./UnsupportedField\";\n\nconst templates: TemplatesType = {\n ArrayFieldDescriptionTemplate,\n ArrayFieldItemTemplate,\n ArrayFieldTemplate,\n ArrayFieldTitleTemplate,\n ButtonTemplates,\n BaseInputTemplate,\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n UnsupportedFieldTemplate: UnsupportedField,\n};\n\nexport default templates;\n","import React from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n ArrayFieldDescriptionProps,\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<T = any, F = any>(\n props: ArrayFieldDescriptionProps\n) {\n const { idSchema, description, registry, uiSchema } = props;\n if (!description) {\n return null;\n }\n const options = getUiOptions<T, F>(uiSchema);\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n F\n >(\"DescriptionFieldTemplate\", registry, options);\n const id = `${idSchema.$id}__description`;\n return (\n <DescriptionFieldTemplate\n id={id}\n description={description}\n registry={registry}\n />\n );\n}\n","import React, { CSSProperties } from \"react\";\nimport { ArrayFieldTemplateItemType } from \"@rjsf/utils\";\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldItemTemplate<T = any, F = any>(\n props: ArrayFieldTemplateItemType<T, F>\n) {\n const {\n children,\n className,\n disabled,\n hasToolbar,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n index,\n onDropIndexClick,\n onReorderClick,\n readonly,\n registry,\n } = props;\n const { MoveDownButton, MoveUpButton, RemoveButton } =\n registry.templates.ButtonTemplates;\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 {(hasMoveUp || hasMoveDown) && (\n <MoveUpButton\n style={btnStyle}\n disabled={disabled || readonly || !hasMoveUp}\n onClick={onReorderClick(index, index - 1)}\n />\n )}\n {(hasMoveUp || hasMoveDown) && (\n <MoveDownButton\n style={btnStyle}\n disabled={disabled || readonly || !hasMoveDown}\n onClick={onReorderClick(index, index + 1)}\n />\n )}\n {hasRemove && (\n <RemoveButton\n style={btnStyle}\n disabled={disabled || readonly}\n onClick={onDropIndexClick(index)}\n />\n )}\n </div>\n </div>\n )}\n </div>\n );\n}\n","import React from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n ArrayFieldTemplateProps,\n ArrayFieldTemplateItemType,\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 `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldTemplate<T = any, F = any>(\n props: ArrayFieldTemplateProps<T, F>\n) {\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, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<\n \"ArrayFieldDescriptionTemplate\",\n T,\n F\n >(\"ArrayFieldDescriptionTemplate\", registry, uiOptions);\n const ArrayFieldItemTemplate = getTemplate<\"ArrayFieldItemTemplate\", T, F>(\n \"ArrayFieldItemTemplate\",\n registry,\n uiOptions\n );\n const ArrayFieldTitleTemplate = getTemplate<\"ArrayFieldTitleTemplate\", T, 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 uiSchema={uiSchema}\n registry={registry}\n />\n {(uiOptions.description || schema.description) && (\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={(uiOptions.description || schema.description)!}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <div className=\"row array-item-list\">\n {items &&\n items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType) => (\n <ArrayFieldItemTemplate key={key} {...itemProps} />\n ))}\n </div>\n {canAdd && (\n <AddButton\n className=\"array-item-add\"\n onClick={onAddClick}\n disabled={disabled || readonly}\n />\n )}\n </fieldset>\n );\n}\n","import React from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n ArrayFieldTitleProps,\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<T = any, F = any>(\n props: ArrayFieldTitleProps\n) {\n const { idSchema, title, uiSchema, required, registry } = props;\n if (!title) {\n return null;\n }\n const options = getUiOptions<T, F>(uiSchema);\n const TitleFieldTemplate: TemplatesType<T, F>[\"TitleFieldTemplate\"] =\n getTemplate<\"TitleFieldTemplate\", T, F>(\n \"TitleFieldTemplate\",\n registry,\n options\n );\n const id = `${idSchema.$id}__title`;\n return (\n <TitleFieldTemplate\n id={id}\n title={title}\n required={required}\n uiSchema={uiSchema}\n registry={registry}\n />\n );\n}\n","import { TemplatesType } from \"@rjsf/utils\";\n\nimport SubmitButton from \"./SubmitButton\";\nimport AddButton from \"./AddButton\";\nimport { RemoveButton, MoveDownButton, MoveUpButton } from \"./IconButton\";\n\nconst buttonTemplates: TemplatesType[\"ButtonTemplates\"] = {\n SubmitButton,\n AddButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n};\n\nexport default buttonTemplates;\n","import React from \"react\";\nimport { getSubmitButtonOptions, SubmitButtonProps } from \"@rjsf/utils\";\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<T, F>({\n uiSchema,\n}: SubmitButtonProps<T, F>) {\n const {\n submitText,\n norender,\n props: submitButtonProps = {},\n } = getSubmitButtonOptions(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <div>\n <button\n type=\"submit\"\n {...submitButtonProps}\n className={`btn btn-info ${submitButtonProps.className}`}\n >\n {submitText}\n </button>\n </div>\n );\n}\n","import React from \"react\";\nimport { IconButtonProps } 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({\n className,\n onClick,\n disabled,\n}: IconButtonProps) {\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=\"Add\"\n onClick={onClick}\n disabled={disabled}\n />\n </p>\n </div>\n );\n}\n","import React, { useCallback } from \"react\";\nimport { getInputProps, WidgetProps } 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<T = any, F = any>(\n props: WidgetProps<T, F>\n) {\n const {\n id,\n value,\n readonly,\n disabled,\n autofocus,\n onBlur,\n onFocus,\n onChange,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors,\n type,\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 = { ...rest, ...getInputProps<T, F>(schema, type, options) };\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 } }: React.ChangeEvent<HTMLInputElement>) =>\n onChange(value === \"\" ? options.emptyValue : value),\n [onChange, options]\n );\n const _onBlur = useCallback(\n ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>\n onBlur(id, value),\n [onBlur, id]\n );\n const _onFocus = useCallback(\n ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>\n onFocus(id, value),\n [onFocus, id]\n );\n\n return (\n <>\n <input\n key={id}\n id={id}\n className=\"form-control\"\n readOnly={readonly}\n disabled={disabled}\n autoFocus={autofocus}\n value={inputValue}\n {...inputProps}\n list={schema.examples ? `examples_${id}` : undefined}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n />\n {Array.isArray(schema.examples) && (\n <datalist key={`datalist_${id}`} id={`examples_${id}`}>\n {[\n ...new Set(\n schema.examples.concat(schema.default ? [schema.default] : [])\n ),\n ].map((example: any) => (\n <option key={example} value={example} />\n ))}\n </datalist>\n )}\n </>\n );\n}\n","import React from \"react\";\nimport { DescriptionFieldProps } from \"@rjsf/utils\";\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<T = any, F = any>(\n props: DescriptionFieldProps<T, F>\n) {\n const { id, description } = props;\n if (!description) {\n return null;\n }\n if (typeof description === \"string\") {\n return (\n <p id={id} className=\"field-description\">\n {description}\n </p>\n );\n } else {\n return (\n <div id={id} className=\"field-description\">\n {description}\n </div>\n );\n }\n}\n","import React from \"react\";\nimport { ErrorListProps, RJSFValidationError } 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>({ errors }: ErrorListProps<T>) {\n return (\n <div className=\"panel panel-danger errors\">\n <div className=\"panel-heading\">\n <h3 className=\"panel-title\">Errors</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 React from \"react\";\nimport { FieldTemplateProps } from \"@rjsf/utils\";\n\nimport Label from \"./Label\";\nimport WrapIfAdditional from \"./WrapIfAdditional\";\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<T = any, F = any>(\n props: FieldTemplateProps<T, F>\n) {\n const {\n id,\n label,\n children,\n errors,\n help,\n description,\n hidden,\n required,\n displayLabel,\n } = props;\n if (hidden) {\n return <div className=\"hidden\">{children}</div>;\n }\n return (\n <WrapIfAdditional<T, F> {...props}>\n {displayLabel && <Label label={label} required={required} id={id} />}\n {displayLabel && description ? description : null}\n {children}\n {errors}\n {help}\n </WrapIfAdditional>\n );\n}\n","import React from \"react\";\nimport {\n ObjectFieldTemplatePropertyType,\n ObjectFieldTemplateProps,\n canExpand,\n getTemplate,\n getUiOptions,\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<T = any, F = any>(\n props: ObjectFieldTemplateProps<T, F>\n) {\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, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<\"TitleFieldTemplate\", T, F>(\n \"TitleFieldTemplate\",\n registry,\n options\n );\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n F\n >(\"DescriptionFieldTemplate\", registry, options);\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 {(options.title || title) && (\n <TitleFieldTemplate\n id={`${idSchema.$id}__title`}\n title={options.title || title}\n required={required}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {(options.description || description) && (\n <DescriptionFieldTemplate\n id={`${idSchema.$id}__description`}\n description={options.description || description!}\n registry={registry}\n />\n )}\n {properties.map((prop: ObjectFieldTemplatePropertyType) => prop.content)}\n {canExpand(schema, uiSchema, formData) && (\n <AddButton\n className=\"object-property-expand\"\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n />\n )}\n </fieldset>\n );\n}\n","import React from \"react\";\nimport { TitleFieldProps } 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, F = any>(\n props: TitleFieldProps<T, 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 React from \"react\";\nimport { UnsupportedFieldProps } from \"@rjsf/utils\";\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, F = any>(\n props: UnsupportedFieldProps<T, F>\n) {\n const { schema, idSchema, reason } = props;\n return (\n <div className=\"unsupported-field\">\n <p>\n Unsupported field schema\n {idSchema && idSchema.$id && (\n <span>\n {\" for\"} field <code>{idSchema.$id}</code>\n </span>\n )}\n {reason && <em>: {reason}</em>}.\n </p>\n {schema && <pre>{JSON.stringify(schema, null, 2)}</pre>}\n </div>\n );\n}\n\nexport default UnsupportedField;\n","import React, { MouseEvent, useCallback, useEffect, useReducer } from \"react\";\n\nimport {\n parseDateString,\n toDateString,\n pad,\n WidgetProps,\n DateObject,\n} from \"@rjsf/utils\";\n\nfunction rangeOptions(start: number, stop: number) {\n const options = [];\n for (let i = start; i <= stop; i++) {\n options.push({ value: i, label: pad(i, 2) });\n }\n return options;\n}\n\nfunction readyForChange(state: DateObject) {\n return Object.values(state).every((value) => value !== -1);\n}\n\nfunction dateElementProps(\n state: DateObject,\n time: boolean,\n yearsRange: [number, number] = [1900, new Date().getFullYear() + 2]\n) {\n const { year, month, day, hour, minute, second } = state;\n const data = [\n {\n type: \"year\",\n range: yearsRange,\n value: year,\n },\n { type: \"month\", range: [1, 12], value: month },\n { type: \"day\", range: [1, 31], value: day },\n ] as { type: string; range: [number, number]; value: number | undefined }[];\n if (time) {\n data.push(\n { type: \"hour\", range: [0, 23], value: hour },\n { type: \"minute\", range: [0, 59], value: minute },\n { type: \"second\", range: [0, 59], value: second }\n );\n }\n return data;\n}\n\ntype DateElementProps<T, F> = Pick<\n WidgetProps<T, F>,\n | \"value\"\n | \"disabled\"\n | \"readonly\"\n | \"autofocus\"\n | \"registry\"\n | \"onBlur\"\n | \"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, F>({\n type,\n range,\n value,\n select,\n rootId,\n disabled,\n readonly,\n autofocus,\n registry,\n onBlur,\n onFocus,\n}: DateElementProps<T, F>) {\n const id = rootId + \"_\" + type;\n const { SelectWidget } = registry.widgets;\n return (\n <SelectWidget\n schema={{ type: \"integer\" }}\n id={id}\n className=\"form-control\"\n options={{ enumOptions: rangeOptions(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 />\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, F = any>({\n time = false,\n disabled = false,\n readonly = false,\n autofocus = false,\n options,\n id,\n registry,\n onBlur,\n onFocus,\n onChange,\n value,\n}: WidgetProps<T, F>) {\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 if (value && value !== toDateString(state, time)) {\n setState(parseDateString(value, time));\n }\n }, [value, state, time]);\n\n useEffect(() => {\n if (readyForChange(state)) {\n // Only propagate to parent state if we have a complete date{time}\n onChange(toDateString(state, time));\n }\n }, [state, time, onChange]);\n\n const handleChange = useCallback(\n (property: keyof DateObject, value: string) => {\n setState({ [property]: value });\n },\n []\n );\n\n const handleSetNow = useCallback(\n (event: MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n if (disabled || readonly) {\n return;\n }\n const nowDateObj = parseDateString(new Date().toJSON(), time);\n setState(nowDateObj);\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 setState(parseDateString(\"\", time));\n onChange(undefined);\n },\n [disabled, readonly, time, onChange]\n );\n\n return (\n <ul className=\"list-inline\">\n {dateElementProps(\n state,\n time,\n options.yearsRange as [number, number] | undefined\n ).map((elemProps, i) => (\n <li key={i}>\n <DateElement\n rootId={id}\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\"\n ? !options.hideNowButton\n : true) && (\n <li>\n <a href=\"#\" className=\"btn btn-info btn-now\" onClick={handleSetNow}>\n Now\n </a>\n </li>\n )}\n {(options.hideClearButton !== \"undefined\"\n ? !options.hideClearButton\n : true) && (\n <li>\n <a\n href=\"#\"\n className=\"btn btn-warning btn-clear\"\n onClick={handleClear}\n >\n Clear\n </a>\n </li>\n )}\n </ul>\n );\n}\n\nexport default AltDateWidget;\n","import React, { ChangeEvent, useCallback, useMemo, useState } from \"react\";\n\nimport { dataURItoBlob, WidgetProps } from \"@rjsf/utils\";\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 FilesInfo({\n filesInfo,\n}: {\n filesInfo: { name: string; size: number; type: string }[];\n}) {\n if (filesInfo.length === 0) {\n return null;\n }\n return (\n <ul className=\"file-info\">\n {filesInfo.map((fileInfo, key) => {\n const { name, size, type } = fileInfo;\n return (\n <li key={key}>\n <strong>{name}</strong> ({type}, {size} bytes)\n </li>\n );\n })}\n </ul>\n );\n}\n\nfunction extractFileInfo(dataURLs: string[]) {\n return dataURLs\n .filter((dataURL) => typeof dataURL !== \"undefined\")\n .map((dataURL) => {\n const { blob, name } = dataURItoBlob(dataURL);\n return {\n name: name,\n size: blob.size,\n type: blob.type,\n };\n });\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, F>({\n multiple,\n id,\n readonly,\n disabled,\n onChange,\n value,\n autofocus = false,\n options,\n}: WidgetProps<T, F>) {\n const extractedFilesInfo = useMemo(\n () =>\n Array.isArray(value) ? extractFileInfo(value) : extractFileInfo([value]),\n [value]\n );\n const [filesInfo, setFilesInfo] =\n useState<FileInfoType[]>(extractedFilesInfo);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!event.target.files) {\n return;\n }\n processFiles(event.target.files).then((filesInfoEvent) => {\n setFilesInfo(filesInfoEvent);\n const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);\n if (multiple) {\n onChange(newValue);\n } else {\n onChange(newValue[0]);\n }\n });\n },\n [multiple, onChange]\n );\n\n return (\n <div>\n <p>\n <input\n id={id}\n type=\"file\"\n disabled={readonly || disabled}\n onChange={handleChange}\n defaultValue=\"\"\n autoFocus={autofocus}\n multiple={multiple}\n accept={options.accept ? String(options.accept) : undefined}\n />\n </p>\n <FilesInfo filesInfo={filesInfo} />\n </div>\n );\n}\n\nexport default FileWidget;\n","import React, { ChangeEvent, FocusEvent, useCallback } from \"react\";\nimport { processSelectValue, WidgetProps } from \"@rjsf/utils\";\n\nfunction getValue(\n event: React.SyntheticEvent<HTMLSelectElement>,\n multiple: boolean\n) {\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, F = 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, F>) {\n const { enumOptions, enumDisabled } = options;\n const emptyValue = multiple ? [] : \"\";\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onFocus(id, processSelectValue(schema, newValue, options));\n },\n [onFocus, id, schema, multiple, options]\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onBlur(id, processSelectValue(schema, newValue, options));\n },\n [onBlur, id, schema, multiple, options]\n );\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLSelectElement>) => {\n const newValue = getValue(event, multiple);\n return onChange(processSelectValue(schema, newValue, options));\n },\n [onChange, schema, multiple, options]\n );\n\n return (\n <select\n id={id}\n multiple={multiple}\n className=\"form-control\"\n value={typeof value === \"undefined\" ? emptyValue : value}\n required={required}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onChange={handleChange}\n >\n {!multiple && schema.default === undefined && (\n <option value=\"\">{placeholder}</option>\n )}\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={value} disabled={disabled}>\n {label}\n </option>\n );\n })}\n </select>\n );\n}\n\nexport default SelectWidget;\n","import React, { FocusEvent, useCallback } from \"react\";\nimport { 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, F = 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, F>) {\n const handleChange = useCallback(\n ({ target: { value } }: React.ChangeEvent<HTMLTextAreaElement>) =>\n onChange(value === \"\" ? options.emptyValue : value),\n [onChange, options.emptyValue]\n );\n\n const handleBlur = useCallback(\n ({ target: { value } }: FocusEvent<HTMLTextAreaElement>) =>\n onBlur(id, value),\n [onBlur, id]\n );\n\n const handleFocus = useCallback(\n ({ target: { value } }: FocusEvent<HTMLTextAreaElement>) =>\n onFocus(id, value),\n [id, onFocus]\n );\n\n return (\n <textarea\n id={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 />\n );\n}\n\nTextareaWidget.defaultProps = {\n autofocus: false,\n options: {},\n};\n\nexport default TextareaWidget;\n","import { RegistryWidgetsType } 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 SelectWidget from \"./SelectWidget\";\nimport TextareaWidget from \"./TextareaWidget\";\nimport TextWidget from \"./TextWidget\";\nimport URLWidget from \"./URLWidget\";\nimport UpDownWidget from \"./UpDownWidget\";\n\nconst widgets: RegistryWidgetsType = {\n PasswordWidget,\n RadioWidget,\n UpDownWidget,\n RangeWidget,\n SelectWidget,\n TextWidget,\n DateWidget,\n DateTimeWidget,\n AltDateWidget,\n AltDateTimeWidget,\n EmailWidget,\n URLWidget,\n TextareaWidget,\n HiddenWidget,\n ColorWidget,\n FileWidget,\n CheckboxWidget,\n CheckboxesWidget,\n};\n\nexport default widgets;\n","import React from \"react\";\nimport { getTemplate, 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<T = any, F = any>(\n props: WidgetProps<T, F>\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return <BaseInputTemplate type=\"password\" {...props} />;\n}\n","import React, { FocusEvent, useCallback } from \"react\";\nimport { WidgetProps } 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, F = 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, F>) {\n // Generating a unique field name to identify this set of radio buttons\n const name = Math.random().toString();\n const { enumOptions, enumDisabled, inline } = options;\n // checked={checked} has been moved above name={name}, As mentioned in #349;\n // this is a temporary fix for radio button rendering bug in React, facebook/react#7630.\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onBlur(id, event.target.value),\n [onBlur, id]\n );\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLInputElement>) => onFocus(id, event.target.value),\n [onFocus, id]\n );\n\n return (\n <div className=\"field-radio-group\" id={id}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, i) => {\n const checked = option.value === value;\n const itemDisabled =\n enumDisabled && enumDisabled.indexOf(option.value) != -1;\n const disabledCls =\n disabled || itemDisabled || readonly ? \"disabled\" : \"\";\n\n const handleChange = () => onChange(option.value);\n\n const radio = (\n <span>\n <input\n type=\"radio\"\n id={`${id}_${i}`}\n checked={checked}\n name={name}\n required={required}\n value={option.value}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && i === 0}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\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 React from \"react\";\nimport { getTemplate, 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, F = any>(\n props: WidgetProps<T, F>\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return <BaseInputTemplate type=\"number\" {...props} />;\n}\n","import React from \"react\";\nimport { 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, F = any>(\n props: WidgetProps<T, 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 React from \"react\";\nimport { getTemplate, 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, F = any>(props: WidgetProps<T, F>) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return <BaseInputTemplate {...props} />;\n}\n","import React, { useCallback } from \"react\";\nimport { getTemplate, 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, F = any>(props: WidgetProps<T, F>) {\n const { onChange, options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n const handleChange = useCallback(\n (value: React.ChangeEvent) => onChange(value || undefined),\n [onChange]\n );\n\n return <BaseInputTemplate type=\"date\" {...props} onChange={handleChange} />;\n}\n","import React from \"react\";\nimport { getTemplate, localToUTC, utcToLocal, WidgetProps } 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<T = any, F = any>(\n props: WidgetProps<T, F>\n) {\n const { onChange, value, options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\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 { WidgetProps } from \"@rjsf/utils\";\nimport React from \"react\";\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, F = any>({\n time = true,\n ...props\n}: WidgetProps<T, F>) {\n const { AltDateWidget } = props.registry.widgets;\n return <AltDateWidget time={time} {...props} />;\n}\n\nexport default AltDateTimeWidget;\n","import React from \"react\";\nimport { getTemplate, 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, F = any>(\n props: WidgetProps<T, F>\n) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return <BaseInputTemplate type=\"email\" {...props} />;\n}\n","import React from \"react\";\nimport { getTemplate, 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, F = any>(props: WidgetProps<T, F>) {\n const { options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return <BaseInputTemplate type=\"url\" {...props} />;\n}\n","import React from \"react\";\nimport { 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, F = any>({ id, value }: WidgetProps<T, F>) {\n return (\n <input\n type=\"hidden\"\n id={id}\n value={typeof value === \"undefined\" ? \"\" : value}\n />\n );\n}\n\nexport default HiddenWidget;\n","import React from \"react\";\nimport { getTemplate, 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, F = any>(\n props: WidgetProps<T, F>\n) {\n const { disabled, readonly, options, registry } = props;\n const BaseInputTemplate = getTemplate<\"BaseInputTemplate\", T, F>(\n \"BaseInputTemplate\",\n registry,\n options\n );\n return (\n <BaseInputTemplate\n type=\"color\"\n {...props}\n disabled={disabled || readonly}\n />\n );\n}\n","import React, { useCallback } from \"react\";\nimport { getTemplate, schemaRequiresTrueValue, WidgetProps } 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, F = any>({\n schema,\n options,\n id,\n value,\n disabled,\n readonly,\n label,\n autofocus = false,\n onBlur,\n onFocus,\n onChange,\n registry,\n}: WidgetProps<T, F>) {\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n F\n >(\"DescriptionFieldTemplate\", registry, options);\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(schema);\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) =>\n onChange(event.target.checked),\n [onChange]\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLInputElement>) =>\n onBlur(id, event.target.checked),\n [onBlur, id]\n );\n\n const handleFocus = useCallback(\n (event: React.FocusEvent<HTMLInputElement>) =>\n onFocus(id, event.target.checked),\n [onFocus, id]\n );\n\n return (\n <div className={`checkbox ${disabled || readonly ? \"disabled\" : \"\"}`}>\n {schema.description && (\n <DescriptionFieldTemplate\n id={id + \"__description\"}\n description={schema.description}\n registry={registry}\n />\n )}\n <label>\n <input\n type=\"checkbox\"\n id={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 />\n <span>{label}</span>\n </label>\n </div>\n );\n}\n\nexport default CheckboxWidget;\n","import React, { ChangeEvent } from \"react\";\nimport { WidgetProps } from \"@rjsf/utils\";\n\nfunction selectValue(value: any, selected: any[], all: any[]) {\n const at = all.indexOf(value);\n const updated = selected.slice(0, at).concat(value, selected.slice(at));\n // As inserting values at predefined index positions doesn't work with empty\n // arrays, we need to reorder the updated selection to match the initial order\n return updated.sort((a, b) => Number(all.indexOf(a) > all.indexOf(b)));\n}\n\nfunction deselectValue(value: any, selected: any[]) {\n return selected.filter((v) => v !== value);\n}\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, F = any>({\n id,\n disabled,\n options: { inline = false, enumOptions, enumDisabled },\n value,\n autofocus = false,\n readonly,\n onChange,\n}: WidgetProps<T, F>) {\n return (\n <div className=\"checkboxes\" id={id}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = value.indexOf(option.value) !== -1;\n const itemDisabled =\n enumDisabled && enumDisabled.indexOf(option.value) != -1;\n const disabledCls =\n disabled || itemDisabled || readonly ? \"disabled\" : \"\";\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const all = enumOptions.map(({ value }) => value);\n if (event.target.checked) {\n onChange(selectValue(option.value, value, all));\n } else {\n onChange(deselectValue(option.value, value));\n }\n };\n\n const checkbox = (\n <span>\n <input\n type=\"checkbox\"\n id={`${id}_${index}`}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={handleChange}\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 { Registry } 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<T = any, F = any>(): Omit<\n Registry<T, F>,\n \"schemaUtils\"\n> {\n return {\n fields,\n templates,\n widgets,\n rootSchema: {},\n formContext: {} as F,\n };\n}\n","import React, { Component } from \"react\";\nimport {\n CustomValidator,\n ErrorSchema,\n ErrorTransformer,\n GenericObjectType,\n IdSchema,\n PathSchema,\n RJSFSchema,\n RJSFValidationError,\n Registry,\n RegistryWidgetsType,\n RegistryFieldsType,\n SchemaUtilsType,\n TemplatesType,\n UiSchema,\n ValidationData,\n ValidatorType,\n createSchemaUtils,\n deepEquals,\n getTemplate,\n getUiOptions,\n isObject,\n mergeObjects,\n shouldRender,\n NAME_KEY,\n RJSF_ADDITONAL_PROPERTIES_FLAG,\n} from \"@rjsf/utils\";\nimport _pick from \"lodash/pick\";\nimport _get from \"lodash/get\";\nimport _isEmpty from \"lodash/isEmpty\";\n\nimport getDefaultRegistry from \"../getDefaultRegistry\";\n\n/** The properties that are passed to the `Form` */\nexport interface FormProps<T = any, F = any> {\n /** The JSON schema object for the form */\n schema: RJSFSchema;\n /** An implementation of the `ValidatorType` interface that is needed for form validation to work */\n validator: ValidatorType<T>;\n /** The uiSchema for the form */\n uiSchema?: UiSchema<T, 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, 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, F>, \"ButtonTemplates\">> & {\n ButtonTemplates?: Partial<TemplatesType<T, F>[\"ButtonTemplates\"]>;\n };\n /** The dictionary of registered widgets in the form */\n widgets?: RegistryWidgetsType<T, 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\n */\n onChange?: (data: IChangeEvent<T, F>) => 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, F>, event: React.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 // <form /> HTML attributes\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?: React.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>;\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\n */\n extraErrors?: ErrorSchema<T>;\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 true, 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 `true` by default\n */\n showErrorList?: boolean;\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;\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?: React.ElementType;\n}\n\n/** The data that is contained within the state for the `Form` */\nexport interface FormState<T = any, F = any> {\n /** The JSON schema object for the form */\n schema: RJSFSchema;\n /** The uiSchema for the form */\n uiSchema: UiSchema<T, 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>;\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}\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, F = any>\n extends Omit<\n FormState<T, F>,\n \"schemaValidationErrors\" | \"schemaValidationErrorSchema\"\n > {\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<T = any, F = any> extends Component<\n FormProps<T, F>,\n FormState<T, F>\n> {\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: React.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, F>) {\n super(props);\n\n this.state = this.getStateFromProps(props, props.formData);\n if (\n this.props.onChange &&\n !deepEquals(this.state.formData, this.props.formData)\n ) {\n this.props.onChange(this.state);\n }\n this.formElement = React.createRef();\n }\n\n /** React lifecycle method that gets called before new props are provided, updates the state based on new props. It\n * will also call the`onChange` handler if the `formData` is modified to add missing default values as part of the\n * state construction.\n *\n * @param nextProps - The new set of props about to be applied to the `Form`\n */\n UNSAFE_componentWillReceiveProps(nextProps: FormProps<T, F>) {\n const nextState = this.getStateFromProps(nextProps, nextProps.formData);\n if (\n !deepEquals(nextState.formData, nextProps.formData) &&\n !deepEquals(nextState.formData, this.state.formData) &&\n nextProps.onChange\n ) {\n nextProps.onChange(nextState);\n }\n this.setState(nextState);\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 * @returns - The new state for the `Form`\n */\n getStateFromProps(\n props: FormProps<T, F>,\n inputFormData?: T\n ): FormState<T, F> {\n const state: FormState<T, F> = this.state || {};\n const schema = \"schema\" in props ? props.schema : this.props.schema;\n const uiSchema: UiSchema<T, F> =\n (\"uiSchema\" in props ? props.uiSchema! : this.props.uiSchema!) || {};\n const edit = typeof inputFormData !== \"undefined\";\n const liveValidate =\n \"liveValidate\" in props ? props.liveValidate : this.props.liveValidate;\n const mustValidate = edit && !props.noValidate && liveValidate;\n const rootSchema = schema;\n let schemaUtils: SchemaUtilsType<T> = state.schemaUtils;\n if (\n !schemaUtils ||\n schemaUtils.doesSchemaUtilsDiffer(props.validator, rootSchema)\n ) {\n schemaUtils = createSchemaUtils<T>(props.validator, rootSchema);\n }\n const formData: T = schemaUtils.getDefaultFormState(\n schema,\n inputFormData\n ) as T;\n const retrievedSchema = schemaUtils.retrieveSchema(schema, formData);\n\n const getCurrentErrors = (): ValidationData<T> => {\n if (props.noValidate) {\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[] =\n state.schemaValidationErrors;\n let schemaValidationErrorSchema: ErrorSchema<T> =\n state.schemaValidationErrorSchema;\n if (mustValidate) {\n const schemaValidation = this.validate(schemaUtils, formData, schema);\n errors = schemaValidation.errors;\n errorSchema = schemaValidation.errorSchema;\n schemaValidationErrors = errors;\n schemaValidationErrorSchema = errorSchema;\n } else {\n const currentErrors = getCurrentErrors();\n errors = currentErrors.errors;\n errorSchema = currentErrors.errorSchema;\n }\n if (props.extraErrors) {\n const merged = schemaUtils.mergeValidationData(\n { errorSchema, errors },\n props.extraErrors\n );\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, F> = {\n schemaUtils,\n schema,\n uiSchema,\n idSchema,\n formData,\n edit,\n errors,\n errorSchema,\n schemaValidationErrors,\n schemaValidationErrorSchema,\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(\n nextProps: FormProps<T, F>,\n nextState: FormState<T, F>\n ): boolean {\n return shouldRender(this, nextProps, nextState);\n }\n\n /** Validates the `formData` against the `schema` using the `schemaUtils`, returning the results.\n *\n * @param schemaUtils - The schemaUtils to use for validation\n * @param formData - The new form data to validate\n * @param schema - The schema used to validate against\n */\n validate(\n schemaUtils: SchemaUtilsType<T>,\n formData: T,\n schema = this.props.schema\n ): ValidationData<T> {\n const { customValidate, transformErrors } = this.props;\n const resolvedSchema = schemaUtils.retrieveSchema(schema, formData);\n return schemaUtils\n .getValidator()\n .validateFormData(\n formData,\n resolvedSchema,\n customValidate,\n transformErrors\n );\n }\n\n /** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */\n renderErrors(registry: Registry<T, F>) {\n const { errors, errorSchema, schema, uiSchema } = this.state;\n const { showErrorList, formContext } = this.props;\n const options = getUiOptions<T, F>(uiSchema);\n const ErrorListTemplate = getTemplate<\"ErrorListTemplate\", T, F>(\n \"ErrorListTemplate\",\n registry,\n options\n );\n\n if (errors && errors.length && showErrorList != false) {\n return (\n <ErrorListTemplate\n errors={errors}\n errorSchema={errorSchema || {}}\n schema={schema}\n uiSchema={uiSchema}\n formContext={formContext}\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, fields: string[]): T => {\n // For the case of a single input form\n if (fields.length === 0 && typeof formData !== \"object\") {\n return formData;\n }\n\n const data: GenericObjectType = _pick(formData, fields);\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) => {\n const getAllPaths = (\n _obj: GenericObjectType,\n acc: string[] = [],\n paths = [\"\"]\n ) => {\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 (\n _obj[key][RJSF_ADDITONAL_PROPERTIES_FLAG] &&\n _obj[key][NAME_KEY] !== \"\"\n ) {\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 path = path.replace(/^\\./, \"\");\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 (typeof formValue !== \"object\" || _isEmpty(formValue)) {\n acc.push(path);\n }\n });\n }\n });\n return acc;\n };\n\n return getAllPaths(pathSchema);\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 filterer 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 */\n onChange = (formData: T, newErrorSchema?: ErrorSchema<T>) => {\n const {\n extraErrors,\n omitExtraData,\n liveOmit,\n noValidate,\n liveValidate,\n onChange,\n } = this.props;\n const { schemaUtils, schema } = this.state;\n if (isObject(formData) || Array.isArray(formData)) {\n const newState = this.getStateFromProps(this.props, formData);\n formData = newState.formData;\n }\n\n const mustValidate = !noValidate && liveValidate;\n let state: Partial<FormState<T, F>> = { formData, schema };\n let newFormData = formData;\n\n if (omitExtraData === true && liveOmit === true) {\n const retrievedSchema = schemaUtils.retrieveSchema(schema, formData);\n const pathSchema = schemaUtils.toPathSchema(\n retrievedSchema,\n \"\",\n formData\n );\n\n const fieldNames = this.getFieldNames(pathSchema, formData);\n\n newFormData = this.getUsedFormData(formData, fieldNames);\n state = {\n formData: newFormData,\n };\n }\n\n if (mustValidate) {\n const schemaValidation = this.validate(schemaUtils, newFormData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (extraErrors) {\n const merged = schemaUtils.mergeValidationData(\n schemaValidation,\n extraErrors\n );\n errorSchema = merged.errorSchema;\n errors = merged.errors;\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, true) as ErrorSchema<T>)\n : newErrorSchema;\n state = {\n formData: newFormData,\n errorSchema: errorSchema,\n errors: schemaUtils.getValidator().toErrorList(errorSchema),\n };\n }\n this.setState(\n state as FormState<T, F>,\n () => onChange && onChange({ ...this.state, ...state })\n );\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: React.FormEvent<any>) => {\n event.preventDefault();\n if (event.target !== event.currentTarget) {\n return;\n }\n\n event.persist();\n const { omitExtraData, extraErrors, noValidate, onSubmit, onError } =\n this.props;\n let { formData: newFormData } = this.state;\n const { schema, schemaUtils } = this.state;\n\n if (omitExtraData === true) {\n const retrievedSchema = schemaUtils.retrieveSchema(schema, newFormData);\n const pathSchema = schemaUtils.toPathSchema(\n retrievedSchema,\n \"\",\n newFormData\n );\n\n const fieldNames = this.getFieldNames(pathSchema, newFormData);\n\n newFormData = this.getUsedFormData(newFormData, fieldNames);\n }\n\n if (!noValidate) {\n const schemaValidation = this.validate(schemaUtils, newFormData);\n let errors = schemaValidation.errors;\n let errorSchema = schemaValidation.errorSchema;\n const schemaValidationErrors = errors;\n const schemaValidationErrorSchema = errorSchema;\n if (errors.length > 0) {\n if (extraErrors) {\n const merged = schemaUtils.mergeValidationData(\n schemaValidation,\n extraErrors\n );\n errorSchema = merged.errorSchema;\n errors = merged.errors;\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 return;\n }\n }\n\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\n ? schemaUtils.getValidator().toErrorList(extraErrors)\n : [];\n this.setState(\n {\n formData: newFormData,\n errors,\n errorSchema,\n schemaValidationErrors: [],\n schemaValidationErrorSchema: {},\n },\n () => {\n if (onSubmit) {\n onSubmit(\n { ...this.state, formData: newFormData, status: \"submitted\" },\n event\n );\n }\n }\n );\n };\n\n /** Returns the registry for the form */\n getRegistry(): Registry<T, F> {\n const { schemaUtils } = this.state;\n const { fields, templates, widgets, formContext } = getDefaultRegistry();\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 };\n }\n\n /** Provides a function that can be used to programmatically submit the `Form` */\n submit() {\n if (this.formElement.current) {\n this.formElement.current.dispatchEvent(\n new CustomEvent(\"submit\", {\n cancelable: true,\n })\n );\n }\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 = false,\n readonly = false,\n formContext,\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 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 {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 {children ? children : <SubmitButton uiSchema={uiSchema} />}\n </FormTag>\n );\n }\n}\n","import React, { ForwardedRef, forwardRef } from \"react\";\n\nimport Form, { FormProps } from \"./components/Form\";\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 WithThemeProps<T = any, F = any> = Pick<\n FormProps<T, 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, F = any>(\n themeProps: WithThemeProps<T, F>\n) {\n return forwardRef(\n (\n { fields, widgets, templates, ...directProps }: FormProps<T, F>,\n ref: ForwardedRef<Form<T, F>>\n ) => {\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, F>\n {...themeProps}\n {...directProps}\n fields={fields}\n widgets={widgets}\n templates={templates}\n ref={ref}\n />\n );\n }\n );\n}\n"],"names":["generateRowId","nanoid","generateKeyedFormData","formData","Array","isArray","map","item","key","keyedToPlainFormData","keyedFormData","keyedItem","AnyOfField","Component","constructor","props","super","this","onOptionChange","option","selectedOption","parseInt","onChange","options","registry","schemaUtils","newOption","retrieveSchema","newFormData","guessType","type","properties","Object","assign","optionsToDiscard","slice","splice","unset","getDefaultFormState","setState","state","getMatchingOption","componentDidUpdate","prevProps","prevState","idSchema","deepEquals","$id","matchingOption","render","name","baseType","disabled","readonly","hideError","errorSchema","formContext","idPrefix","idSeparator","onBlur","onFocus","uiSchema","schema","widgets","fields","SchemaField","_SchemaField","widget","uiOptions","getUiOptions","Widget","getWidget","optionSchema","enumOptions","index","label","title","value","React","createElement","className","id","oneOf","default","trailingCharMatcherWithPrefix","trailingCharMatcher","COMPONENT_TYPES","array","boolean","integer","number","object","string","null","Help","help","ErrorList","errors","length","filter","elem","error","SchemaFieldRender","_schema","_idSchema","onKeyChange","onDropPropertyClick","required","wasPropertyKeyModified","FieldTemplate","getTemplate","DescriptionFieldTemplate","mergeObjects","toIdSchema","FieldComponent","field","schemaType","getSchemaType","componentName","anyOf","UnsupportedFieldTemplate","reason","getFieldComponent","Boolean","readOnly","uiSchemaHideError","undefined","autofocus","keys","displayLabel","getDisplayLabel","__errors","fieldErrorSchema","fieldUiSchema","omit","rawErrors","ID_KEY","description","hidden","classNames","push","fieldProps","rawDescription","rawHelp","join","trim","_AnyOfField","_OneOfField","OneOfField","Fragment","isSelect","isObject","MultiSchemaField","ArrayField","_getNewFormDataRow","itemSchema","items","isFixedItems","allowAdditionalItems","additionalItems","onAddClick","event","preventDefault","newKeyedFormData","updatedKeyedFormData","onAddIndexClick","newKeyedFormDataRow","onDropIndexClick","newErrorSchema","idx","i","set","_","onReorderClick","newIndex","currentTarget","blur","_newKeyedFormData","reOrderArray","onChangeForIndex","onSelectChange","static","nextProps","nextFormData","previousKeyedFormData","previousKeyedFormDatum","itemTitle","get","ITEMS_KEY","isItemRequired","includes","canAddItem","formItems","addable","maxItems","isMultiSelect","renderMultiSelect","isCustomWidget","renderCustomWidget","renderFixedArray","isFilesArray","renderFiles","renderNormalArray","_schemaItems","itemsSchema","arrayProps","canAdd","itemCast","itemErrorSchema","itemIdSchema","renderArrayFieldItem","canMoveUp","canMoveDown","itemData","itemUiSchema","Template","placeholder","multiple","optionsList","itemSchemas","additionalSchema","concat","additional","canRemove","orderable","removable","has","moveUp","moveDown","remove","toolbar","some","children","hasToolbar","hasMoveUp","hasMoveDown","hasRemove","BooleanField","const","o","_schema$enum","schemaWithEnumNames","enum","enumNames","every","v","NumberField","initialValue","lastValue","setLastValue","useState","StringField","handleChange","useCallback","charAt","processed","match","asNumber","replace","re","RegExp","ObjectField","_this","arguments","additionalProperties","onPropertyChange","addedByAdditionalProperties","copiedFormData","getAvailableKey","preferredKey","duplicateKeySuffixSeparator","newKey","oldValue","newKeys","keyValues","renamedObj","handleAddClick","REF_KEY","$ref","getDefaultValue","isRequired","indexOf","rawSchema","schemaProperties","orderedProperties","orderProperties","order","err","style","color","message","JSON","stringify","templateProps","PROPERTIES_KEY","ADDITIONAL_PROPERTY_FLAG","fieldIdSchema","content","shouldComponentUpdate","format","defaultWidget","hasWidget","NullField","useEffect","IconButton","iconType","icon","otherProps","Label","htmlFor","WrapIfAdditional","RemoveButton","templates","ButtonTemplates","target","defaultValue","border","onClick","ArrayFieldDescriptionTemplate","ArrayFieldItemTemplate","MoveDownButton","MoveUpButton","btnStyle","flex","paddingLeft","paddingRight","fontWeight","display","justifyContent","ArrayFieldTemplate","ArrayFieldTitleTemplate","AddButton","_ref","itemProps","TitleFieldTemplate","SubmitButton","submitText","norender","submitButtonProps","getSubmitButtonOptions","BaseInputTemplate","rest","console","log","Error","inputProps","getInputProps","inputValue","_onChange","emptyValue","_onBlur","_ref2","_onFocus","_ref3","autoFocus","list","examples","Set","example","ErrorListTemplate","stack","ObjectFieldTemplate","prop","canExpand","rangeOptions","start","stop","pad","DateElement","range","select","rootId","SelectWidget","addNameToDataURL","dataURL","encodeURIComponent","processFile","file","size","Promise","resolve","reject","reader","window","FileReader","onerror","onload","_event$target","result","readAsDataURL","FilesInfo","filesInfo","fileInfo","extractFileInfo","dataURLs","blob","dataURItoBlob","getValue","from","selected","TextareaWidget","handleBlur","handleFocus","_ref4","rows","defaultProps","PasswordWidget","RadioWidget","Math","random","toString","enumDisabled","inline","checked","itemDisabled","disabledCls","radio","UpDownWidget","RangeWidget","newValue","processSelectValue","TextWidget","DateWidget","DateTimeWidget","utcToLocal","localToUTC","AltDateWidget","time","useReducer","action","parseDateString","toDateString","values","readyForChange","property","handleSetNow","nowDateObj","Date","toJSON","handleClear","yearsRange","getFullYear","year","month","day","hour","minute","second","data","dateElementProps","elemProps","hideNowButton","href","hideClearButton","AltDateTimeWidget","EmailWidget","URLWidget","HiddenWidget","ColorWidget","FileWidget","extractedFilesInfo","useMemo","setFilesInfo","files","all","then","filesInfoEvent","accept","String","CheckboxWidget","schemaRequiresTrueValue","CheckboxesWidget","checkbox","at","sort","a","b","Number","selectValue","deselectValue","getDefaultRegistry","rootSchema","Form","formElement","getUsedFormData","_pick","getFieldNames","pathSchema","getAllPaths","_obj","acc","paths","forEach","newPaths","path","RJSF_ADDITONAL_PROPERTIES_FLAG","NAME_KEY","formValue","_get","_isEmpty","extraErrors","omitExtraData","liveOmit","noValidate","liveValidate","getStateFromProps","mustValidate","retrievedSchema","toPathSchema","fieldNames","schemaValidation","validate","schemaValidationErrors","schemaValidationErrorSchema","merged","mergeValidationData","getValidator","toErrorList","onSubmit","persist","onError","status","createRef","UNSAFE_componentWillReceiveProps","nextState","inputFormData","edit","doesSchemaUtilsDiffer","validator","createSchemaUtils","currentErrors","shouldRender","customValidate","transformErrors","resolvedSchema","validateFormData","renderErrors","showErrorList","getRegistry","_this$props$templates","submit","current","dispatchEvent","CustomEvent","cancelable","tagName","method","autoComplete","enctype","acceptcharset","noHtml5Validate","_internalFormWrapper","encType","acceptCharset","as","ref","themeProps","forwardRef","_themeProps$templates","_templates","directProps"],"mappings":"geAmCA,SAASA,IACP,OAAOC,EAAMA,QACd,CAOD,SAASC,EAAyBC,GAChC,OAAQC,MAAMC,QAAQF,GAElBA,EAASG,KAAKC,IACL,CACLC,IAAKR,IACLO,WAJJ,EAOL,CAOD,SAASE,EACPC,GAEA,OAAIN,MAAMC,QAAQK,GACTA,EAAcJ,KAAKK,GAAcA,EAAUJ,OAE7C,EACR,CC7CD,MAAMK,UAAqCC,EAAAA,UAQzCC,YAAYC,GACVC,MAAMD,GAD2BE,KAsEnCC,eAAkBC,IAChB,MAAMC,EAAiBC,SAASF,EAAQ,KAClChB,SAAEA,EAAFmB,SAAYA,EAAZC,QAAsBA,EAAtBC,SAA+BA,GAAaP,KAAKF,OACjDU,YAAEA,GAAgBD,EAClBE,EAAYD,EAAYE,eAC5BJ,EAAQH,GACRjB,GAKF,IAAIyB,EACJ,GAC0B,WAAxBC,EAASA,UAAC1B,KACU,WAAnBuB,EAAUI,MAAqBJ,EAAUK,YAC1C,CACAH,EAAcI,OAAOC,OAAO,CAAd,EAAkB9B,GAEhC,MAAM+B,EAAmBX,EAAQY,QACjCD,EAAiBE,OAAOhB,EAAgB,GAGxC,IAAK,MAAMD,KAAUe,EACnB,GAAIf,EAAOY,WACT,IAAK,MAAMvB,KAAOW,EAAOY,WACnBvB,KAAOoB,GACTS,UAAMT,EAAapB,EA1BE,CAiC/Bc,EACEG,EAAYa,oBAAoBf,EAAQH,GAAiBQ,IAG3DX,KAAKsB,SAAS,CACZnB,eAAgBC,SAASF,EAAQ,KADnC,EAxGA,MAAQhB,SAAAA,EAAUoB,QA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