@rjsf/core 6.5.2 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.umd.js +267 -282
- package/dist/index.cjs +357 -372
- package/dist/index.cjs.map +4 -4
- package/dist/index.esm.js +335 -348
- package/dist/index.esm.js.map +4 -4
- package/lib/components/Form.d.ts +3 -4
- package/lib/components/Form.d.ts.map +1 -1
- package/lib/components/Form.js +33 -26
- package/lib/components/RichDescription.js +1 -1
- package/lib/components/RichHelp.js +1 -1
- package/lib/components/fields/FallbackField.d.ts.map +1 -1
- package/lib/components/fields/FallbackField.js +1 -1
- package/lib/components/fields/LayoutGridField.js +1 -1
- package/lib/components/fields/MultiSchemaField.d.ts.map +1 -1
- package/lib/components/fields/MultiSchemaField.js +1 -1
- package/lib/components/fields/ObjectField.js +1 -1
- package/lib/components/fields/SchemaField.d.ts.map +1 -1
- package/lib/components/fields/SchemaField.js +8 -3
- package/lib/components/fields/index.js +1 -1
- package/lib/components/templates/ButtonTemplates/index.js +1 -1
- package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -1
- package/lib/components/templates/UnsupportedField.js +1 -1
- package/lib/components/templates/index.js +2 -2
- package/lib/components/widgets/FileWidget.d.ts.map +1 -1
- package/lib/components/widgets/FileWidget.js +3 -2
- package/lib/components/widgets/index.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/withTheme.d.ts +1 -1
- package/lib/withTheme.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/components/Form.tsx +37 -53
- package/src/components/RichDescription.tsx +1 -1
- package/src/components/RichHelp.tsx +1 -1
- package/src/components/fields/FallbackField.tsx +1 -1
- package/src/components/fields/LayoutGridField.tsx +1 -1
- package/src/components/fields/MultiSchemaField.tsx +3 -3
- package/src/components/fields/ObjectField.tsx +1 -1
- package/src/components/fields/SchemaField.tsx +11 -2
- package/src/components/fields/index.ts +1 -1
- package/src/components/templates/ButtonTemplates/index.ts +1 -1
- package/src/components/templates/FieldHelpTemplate.tsx +1 -0
- package/src/components/templates/UnsupportedField.tsx +1 -1
- package/src/components/templates/index.ts +2 -2
- package/src/components/widgets/FileWidget.tsx +3 -2
- package/src/components/widgets/index.ts +4 -4
- package/src/index.ts +1 -1
- package/src/tsconfig.json +0 -1
- package/src/withTheme.tsx +2 -1
package/lib/components/Form.d.ts
CHANGED
|
@@ -146,10 +146,9 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
|
|
|
146
146
|
* called. Set to `false` by default.
|
|
147
147
|
*/
|
|
148
148
|
omitExtraData?: boolean;
|
|
149
|
-
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* required inner fields. This works independently of `omitExtraData`. Set to `false` by default.
|
|
149
|
+
/** This option no longer does anything as it has been co-opted into `omitExtraData`
|
|
150
|
+
*
|
|
151
|
+
* @deprecated - Will be removed in a future release use `omitExtraData` instead
|
|
153
152
|
*/
|
|
154
153
|
removeEmptyOptionalObjects?: boolean;
|
|
155
154
|
/** When this prop is set to `top` or 'bottom', a list of errors (or the custom error list defined in the `ErrorList`) will also
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/components/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAChG,OAAO,EAEL,eAAe,EAEf,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,eAAe,EAMf,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/components/Form.tsx"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|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Component, createRef } from 'react';
|
|
3
|
-
import { createSchemaUtils, deepEquals, ErrorSchemaBuilder, getChangedFields, getTemplate, getUiOptions, isObject, mergeObjects,
|
|
3
|
+
import { createSchemaUtils, deepEquals, ErrorSchemaBuilder, getChangedFields, getTemplate, getUiOptions, isObject, mergeObjects, shouldRender, SUBMIT_BTN_OPTIONS_KEY, toErrorList, toFieldPathId, UI_DEFINITIONS_KEY, UI_GLOBAL_OPTIONS_KEY, UI_OPTIONS_KEY, validationDataMerge, DEFAULT_ID_SEPARATOR, DEFAULT_ID_PREFIX, ERRORS_KEY, ID_KEY, getUsedFormData, getFieldNames, ANY_OF_KEY, ONE_OF_KEY, } from '@rjsf/utils';
|
|
4
4
|
import _cloneDeep from 'lodash-es/cloneDeep.js';
|
|
5
5
|
import _get from 'lodash-es/get.js';
|
|
6
6
|
import _isEmpty from 'lodash-es/isEmpty.js';
|
|
@@ -427,7 +427,7 @@ export default class Form extends Component {
|
|
|
427
427
|
this._isProcessingUserChange = true;
|
|
428
428
|
const { newValue, path, id } = this.pendingChanges[0];
|
|
429
429
|
const { newErrorSchema } = this.pendingChanges[0];
|
|
430
|
-
const { extraErrors, omitExtraData, liveOmit, noValidate, liveValidate, onChange
|
|
430
|
+
const { extraErrors, omitExtraData, liveOmit, noValidate, liveValidate, onChange } = this.props;
|
|
431
431
|
const { formData: oldFormData, schemaUtils, schema, fieldPathId, schemaValidationErrorSchema, errors } = this.state;
|
|
432
432
|
let { customErrors } = this.state;
|
|
433
433
|
// Use the un-merged AJV-only schema as the base for re-merging extraErrors. Mirrors the
|
|
@@ -454,7 +454,33 @@ export default class Form extends Component {
|
|
|
454
454
|
}
|
|
455
455
|
else if (!isRootPath) {
|
|
456
456
|
// If the newValue is not on the root path, then set it into the form data
|
|
457
|
-
|
|
457
|
+
let unsetPath = false;
|
|
458
|
+
let valueForPath = newValue;
|
|
459
|
+
if (newValue === undefined) {
|
|
460
|
+
const lastSegment = path[path.length - 1];
|
|
461
|
+
if (typeof lastSegment === 'number') {
|
|
462
|
+
// Array items: match ArrayField `handleChange` — AJV needs `null`, not undefined.
|
|
463
|
+
valueForPath = null;
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
const { field } = schemaUtils.findFieldInSchema(schema, path, oldFormData);
|
|
467
|
+
const leaf = field;
|
|
468
|
+
const isOneOfOrAnyOfLeaf = leaf && (ONE_OF_KEY in leaf || ANY_OF_KEY in leaf);
|
|
469
|
+
// Plain leaves: omit the key instead of `{ key: undefined }`, which breaks `type: "string"` validation in
|
|
470
|
+
// AJV after clearing a text input (https://github.com/rjsf-team/react-jsonschema-form/issues/4518).
|
|
471
|
+
// oneOf/anyOf leaves and unresolved leaves: keep `valueForPath === newValue` (already `undefined`) so
|
|
472
|
+
// mergeDefaults does not immediately re-apply a branch default when clearing those widgets.
|
|
473
|
+
if (!isOneOfOrAnyOfLeaf && leaf !== undefined) {
|
|
474
|
+
unsetPath = true;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
if (unsetPath) {
|
|
479
|
+
_unset(formData, path);
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
_set(formData, path, valueForPath);
|
|
483
|
+
}
|
|
458
484
|
}
|
|
459
485
|
// Pass true to skip live validation in `getStateFromProps()` since we will do it a bit later
|
|
460
486
|
const newState = this.getStateFromProps(this.props, inputForDefaults, undefined, undefined, undefined, true);
|
|
@@ -470,13 +496,6 @@ export default class Form extends Component {
|
|
|
470
496
|
formData: newFormData,
|
|
471
497
|
};
|
|
472
498
|
}
|
|
473
|
-
if (removeEmptyOptionalObjects) {
|
|
474
|
-
newFormData = removeOptionalEmptyObjects(schemaUtils.getValidator(), schema, schemaUtils.getRootSchema(), newFormData);
|
|
475
|
-
state = {
|
|
476
|
-
...state,
|
|
477
|
-
formData: newFormData,
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
499
|
if (newErrorSchema) {
|
|
481
500
|
// First check to see if there is an existing validation error on this path...
|
|
482
501
|
// @ts-expect-error TS2590, because getting from the error schema is confusing TS
|
|
@@ -579,23 +598,19 @@ export default class Form extends Component {
|
|
|
579
598
|
* @param data - The data associated with the field that was blurred
|
|
580
599
|
*/
|
|
581
600
|
onBlur = (id, data) => {
|
|
582
|
-
const { onBlur, omitExtraData, liveOmit, liveValidate
|
|
601
|
+
const { onBlur, omitExtraData, liveOmit, liveValidate } = this.props;
|
|
583
602
|
if (onBlur) {
|
|
584
603
|
onBlur(id, data);
|
|
585
604
|
}
|
|
586
605
|
if ((omitExtraData === true && liveOmit === 'onBlur') || liveValidate === 'onBlur') {
|
|
587
606
|
const { onChange, extraErrors } = this.props;
|
|
588
|
-
const { formData
|
|
607
|
+
const { formData } = this.state;
|
|
589
608
|
let newFormData = formData;
|
|
590
609
|
let state = { formData: newFormData };
|
|
591
610
|
if (omitExtraData === true && liveOmit === 'onBlur') {
|
|
592
611
|
newFormData = this.omitExtraData(formData);
|
|
593
612
|
state = { formData: newFormData };
|
|
594
613
|
}
|
|
595
|
-
if (removeEmptyOptionalObjects) {
|
|
596
|
-
newFormData = removeOptionalEmptyObjects(schemaUtils.getValidator(), schema, schemaUtils.getRootSchema(), newFormData);
|
|
597
|
-
state = { ...state, formData: newFormData };
|
|
598
|
-
}
|
|
599
614
|
if (liveValidate === 'onBlur') {
|
|
600
615
|
const { schema, schemaUtils, errorSchema, customErrors, retrievedSchema } = this.state;
|
|
601
616
|
const liveValidation = this.liveValidate(schema, schemaUtils, errorSchema, newFormData, extraErrors, customErrors, retrievedSchema);
|
|
@@ -642,15 +657,11 @@ export default class Form extends Component {
|
|
|
642
657
|
return;
|
|
643
658
|
}
|
|
644
659
|
event.persist();
|
|
645
|
-
const { omitExtraData, extraErrors, noValidate, onSubmit
|
|
660
|
+
const { omitExtraData, extraErrors, noValidate, onSubmit } = this.props;
|
|
646
661
|
let { formData: newFormData } = this.state;
|
|
647
662
|
if (omitExtraData === true) {
|
|
648
663
|
newFormData = this.omitExtraData(newFormData);
|
|
649
664
|
}
|
|
650
|
-
if (removeEmptyOptionalObjects) {
|
|
651
|
-
const { schemaUtils, schema } = this.state;
|
|
652
|
-
newFormData = removeOptionalEmptyObjects(schemaUtils.getValidator(), schema, schemaUtils.getRootSchema(), newFormData);
|
|
653
|
-
}
|
|
654
665
|
if (noValidate || this.validateFormWithFormData(newFormData)) {
|
|
655
666
|
// There are no errors generated through schema validation.
|
|
656
667
|
// Check for user provided errors and update state accordingly.
|
|
@@ -819,15 +830,11 @@ export default class Form extends Component {
|
|
|
819
830
|
* @returns - True if the form is valid, false otherwise.
|
|
820
831
|
*/
|
|
821
832
|
validateForm() {
|
|
822
|
-
const { omitExtraData
|
|
833
|
+
const { omitExtraData } = this.props;
|
|
823
834
|
let { formData: newFormData } = this.state;
|
|
824
835
|
if (omitExtraData === true) {
|
|
825
836
|
newFormData = this.omitExtraData(newFormData);
|
|
826
837
|
}
|
|
827
|
-
if (removeEmptyOptionalObjects) {
|
|
828
|
-
const { schemaUtils, schema } = this.state;
|
|
829
|
-
newFormData = removeOptionalEmptyObjects(schemaUtils.getValidator(), schema, schemaUtils.getRootSchema(), newFormData);
|
|
830
|
-
}
|
|
831
838
|
return this.validateFormWithFormData(newFormData);
|
|
832
839
|
}
|
|
833
840
|
/** Renders the `Form` fields inside the <form> | `tagName` or `_internalFormWrapper`, rendering any errors if
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTestIds, getUiOptions, } from '@rjsf/utils';
|
|
3
|
-
import Markdown from 'markdown-to-jsx';
|
|
3
|
+
import { Markdown } from 'markdown-to-jsx/react';
|
|
4
4
|
const TEST_IDS = getTestIds();
|
|
5
5
|
/** Renders the given `description` in the props as
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTestIds, getUiOptions, } from '@rjsf/utils';
|
|
3
|
-
import Markdown from 'markdown-to-jsx';
|
|
3
|
+
import { Markdown } from 'markdown-to-jsx/react';
|
|
4
4
|
const TEST_IDS = getTestIds();
|
|
5
5
|
/** Renders the given `description` in the props as
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FallbackField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/FallbackField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FallbackField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/FallbackField.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAElB,eAAe,EAIf,UAAU,EACV,gBAAgB,EAIjB,MAAM,aAAa,CAAC;AAoDrB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CA2FnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getTemplate, getUiOptions, hashObject, toFieldPathId, TranslatableString, useDeepCompareMemo, } from '@rjsf/utils';
|
|
3
2
|
import { useMemo, useState } from 'react';
|
|
3
|
+
import { getTemplate, getUiOptions, hashObject, toFieldPathId, TranslatableString, useDeepCompareMemo, } from '@rjsf/utils';
|
|
4
4
|
/**
|
|
5
5
|
* Get the schema for the type selection component.
|
|
6
6
|
* @param title - The translated title for the type selection schema.
|
|
@@ -8,8 +8,8 @@ import has from 'lodash-es/has.js';
|
|
|
8
8
|
import includes from 'lodash-es/includes.js';
|
|
9
9
|
import intersection from 'lodash-es/intersection.js';
|
|
10
10
|
import isEmpty from 'lodash-es/isEmpty.js';
|
|
11
|
-
import isFunction from 'lodash-es/isFunction.js';
|
|
12
11
|
import isEqual from 'lodash-es/isEqual.js';
|
|
12
|
+
import isFunction from 'lodash-es/isFunction.js';
|
|
13
13
|
import isObject from 'lodash-es/isObject.js';
|
|
14
14
|
import isPlainObject from 'lodash-es/isPlainObject.js';
|
|
15
15
|
import isString from 'lodash-es/isString.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/MultiSchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiSchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/MultiSchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAIL,UAAU,EACV,eAAe,EAQf,UAAU,EAEV,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAKrB,4DAA4D;AAC5D,KAAK,eAAe,CAAC,CAAC,SAAS,gBAAgB,GAAG,UAAU,IAAI;IAC9D,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,gBAAgB,EAAE,CAAC,EAAE,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,cAAM,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,CAAE,SAAQ,SAAS,CACnH,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACnB,eAAe,CAAC,CAAC,CAAC,CACnB;IACC;;;OAGG;gBACS,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAiBtC;;;;;OAKG;IACH,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,eAAe,CAAC;IAyBjG;;;;;OAKG;IACH,iBAAiB,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;IAW/E;;;;;OAKG;IACH,cAAc,GAAI,SAAS,MAAM,UAqB/B;IAEF,UAAU;IAKV;OACG;IACH,MAAM;CA4HP;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Component } from 'react';
|
|
3
|
+
import { ANY_OF_KEY, deepEquals, ERRORS_KEY, getDiscriminatorFieldFromSchema, getTemplate, getUiOptions, getWidget, isFormDataAvailable, mergeSchemas, ONE_OF_KEY, shouldRenderOptionalField, TranslatableString, } from '@rjsf/utils';
|
|
3
4
|
import get from 'lodash-es/get.js';
|
|
4
5
|
import isEmpty from 'lodash-es/isEmpty.js';
|
|
5
6
|
import omit from 'lodash-es/omit.js';
|
|
6
|
-
import { ANY_OF_KEY, deepEquals, ERRORS_KEY, getDiscriminatorFieldFromSchema, getTemplate, getUiOptions, getWidget, isFormDataAvailable, mergeSchemas, ONE_OF_KEY, shouldRenderOptionalField, TranslatableString, } from '@rjsf/utils';
|
|
7
7
|
/** The `AnyOfField` component is used to render a field in the schema that is an `anyOf`, `allOf` or `oneOf`. It tracks
|
|
8
8
|
* the currently selected option and cleans up any irrelevant data in `formData`.
|
|
9
9
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import { ADDITIONAL_PROPERTY_FLAG, ANY_OF_KEY, getTemplate, getUiOptions, isFormDataAvailable, orderProperties, shouldRenderOptionalField, toFieldPathId, useDeepCompareMemo, ONE_OF_KEY, PROPERTIES_KEY, REF_KEY, TranslatableString, } from '@rjsf/utils';
|
|
4
|
-
import Markdown from 'markdown-to-jsx';
|
|
5
4
|
import get from 'lodash-es/get.js';
|
|
6
5
|
import has from 'lodash-es/has.js';
|
|
7
6
|
import isObject from 'lodash-es/isObject.js';
|
|
8
7
|
import set from 'lodash-es/set.js';
|
|
8
|
+
import { Markdown } from 'markdown-to-jsx';
|
|
9
9
|
import { ADDITIONAL_PROPERTY_KEY_REMOVE } from '../constants.js';
|
|
10
10
|
/** Returns a flag indicating whether the `name` field is required in the object schema
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAiB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAQL,UAAU,EAEV,eAAe,EASf,UAAU,EAGV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,SAAS,EAAiB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAQL,UAAU,EAEV,eAAe,EASf,UAAU,EAGV,gBAAgB,EAKjB,MAAM,aAAa,CAAC;AA0SrB;;GAEG;AACH,cAAM,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,CAAE,SAAQ,SAAS,CACpH,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CACpB;IACC,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAS9D,MAAM;CAGP;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, Component } from 'react';
|
|
3
|
-
import { ADDITIONAL_PROPERTY_FLAG, ANY_OF_KEY, descriptionId, getSchemaType, getTemplate, getUiOptions, ID_KEY, isFormDataAvailable, ONE_OF_KEY, resolveUiSchema, shouldRender, shouldRenderOptionalField, toFieldPathId, UI_OPTIONS_KEY, } from '@rjsf/utils';
|
|
3
|
+
import { ADDITIONAL_PROPERTY_FLAG, ANY_OF_KEY, descriptionId, getSchemaType, getTemplate, getUiOptions, ID_KEY, isFormDataAvailable, ONE_OF_KEY, resolveUiSchema, shouldRender, shouldRenderOptionalField, toFieldPathId, TranslatableString, UI_OPTIONS_KEY, } from '@rjsf/utils';
|
|
4
4
|
import isObject from 'lodash-es/isObject.js';
|
|
5
5
|
import omit from 'lodash-es/omit.js';
|
|
6
6
|
/** The map of component type to FieldName */
|
|
@@ -71,7 +71,9 @@ function SchemaFieldRender(props) {
|
|
|
71
71
|
return onChange(formData, path, newErrorSchema, theId);
|
|
72
72
|
}, [fieldId, onChange]);
|
|
73
73
|
const FieldComponent = getFieldComponent(schema, uiOptions, registry);
|
|
74
|
-
const
|
|
74
|
+
const isDeprecated = Boolean(schema.deprecated);
|
|
75
|
+
const deprecatedHandling = isDeprecated ? (uiOptions.deprecatedHandling ?? 'label') : undefined;
|
|
76
|
+
const disabled = Boolean(uiOptions.disabled ?? props.disabled) || deprecatedHandling === 'disable';
|
|
75
77
|
const readonly = Boolean(uiOptions.readonly ?? (props.readonly || props.schema.readOnly || schema.readOnly));
|
|
76
78
|
const uiSchemaHideError = uiOptions.hideError;
|
|
77
79
|
// Set hideError to the value provided in the uiSchema, otherwise stick with the prop to propagate to children
|
|
@@ -129,9 +131,12 @@ function SchemaFieldRender(props) {
|
|
|
129
131
|
? name
|
|
130
132
|
: uiOptions.title || props.schema.title || schema.title || props.title || name;
|
|
131
133
|
}
|
|
134
|
+
if (deprecatedHandling === 'label') {
|
|
135
|
+
label = registry.translateString(TranslatableString.DeprecatedLabel, [label]);
|
|
136
|
+
}
|
|
132
137
|
const description = uiOptions.description || props.schema.description || schema.description || '';
|
|
133
138
|
const help = uiOptions.help;
|
|
134
|
-
const hidden = uiOptions.widget === 'hidden';
|
|
139
|
+
const hidden = uiOptions.widget === 'hidden' || deprecatedHandling === 'hide';
|
|
135
140
|
const classNames = ['rjsf-field', `rjsf-field-${getSchemaType(schema)}`];
|
|
136
141
|
if (!hideError && __errors && __errors.length > 0) {
|
|
137
142
|
classNames.push('rjsf-field-error');
|
|
@@ -5,12 +5,12 @@ import LayoutGridField from './LayoutGridField.js';
|
|
|
5
5
|
import LayoutHeaderField from './LayoutHeaderField.js';
|
|
6
6
|
import LayoutMultiSchemaField from './LayoutMultiSchemaField.js';
|
|
7
7
|
import MultiSchemaField from './MultiSchemaField.js';
|
|
8
|
+
import NullField from './NullField.js';
|
|
8
9
|
import NumberField from './NumberField.js';
|
|
9
10
|
import ObjectField from './ObjectField.js';
|
|
10
11
|
import OptionalDataControlsField from './OptionalDataControlsField.js';
|
|
11
12
|
import SchemaField from './SchemaField.js';
|
|
12
13
|
import StringField from './StringField.js';
|
|
13
|
-
import NullField from './NullField.js';
|
|
14
14
|
function fields() {
|
|
15
15
|
return {
|
|
16
16
|
AnyOfField: MultiSchemaField,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import SubmitButton from './SubmitButton.js';
|
|
2
1
|
import AddButton from './AddButton.js';
|
|
3
2
|
import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton, ClearButton } from './IconButton.js';
|
|
3
|
+
import SubmitButton from './SubmitButton.js';
|
|
4
4
|
function buttonTemplates() {
|
|
5
5
|
return {
|
|
6
6
|
SubmitButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHelpTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldHelpTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldHelpTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/templates/FieldHelpTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,kDAW/B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TranslatableString } from '@rjsf/utils';
|
|
3
|
-
import Markdown from 'markdown-to-jsx';
|
|
3
|
+
import { Markdown } from 'markdown-to-jsx';
|
|
4
4
|
/** The `UnsupportedField` component is used to render a field in the schema is one that is not supported by
|
|
5
5
|
* react-jsonschema-form.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ArrayFieldDescriptionTemplate from './ArrayFieldDescriptionTemplate.js';
|
|
2
|
-
import ArrayFieldItemTemplate from './ArrayFieldItemTemplate.js';
|
|
3
2
|
import ArrayFieldItemButtonsTemplate from './ArrayFieldItemButtonsTemplate.js';
|
|
3
|
+
import ArrayFieldItemTemplate from './ArrayFieldItemTemplate.js';
|
|
4
4
|
import ArrayFieldTemplate from './ArrayFieldTemplate.js';
|
|
5
5
|
import ArrayFieldTitleTemplate from './ArrayFieldTitleTemplate.js';
|
|
6
6
|
import BaseInputTemplate from './BaseInputTemplate.js';
|
|
@@ -8,9 +8,9 @@ import ButtonTemplates from './ButtonTemplates/index.js';
|
|
|
8
8
|
import DescriptionField from './DescriptionField.js';
|
|
9
9
|
import ErrorList from './ErrorList.js';
|
|
10
10
|
import FallbackFieldTemplate from './FallbackFieldTemplate.js';
|
|
11
|
-
import FieldTemplate from './FieldTemplate/index.js';
|
|
12
11
|
import FieldErrorTemplate from './FieldErrorTemplate.js';
|
|
13
12
|
import FieldHelpTemplate from './FieldHelpTemplate.js';
|
|
13
|
+
import FieldTemplate from './FieldTemplate/index.js';
|
|
14
14
|
import GridTemplate from './GridTemplate.js';
|
|
15
15
|
import MultiSchemaFieldTemplate from './MultiSchemaFieldTemplate.js';
|
|
16
16
|
import ObjectFieldTemplate from './ObjectFieldTemplate.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/FileWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EAGf,UAAU,EACV,gBAAgB,EAIhB,WAAW,EACZ,MAAM,aAAa,CAAC;AAwErB;;;GAGG;AACH,iBAAS,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACnG,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"FileWidget.d.ts","sourceRoot":"","sources":["../../../src/components/widgets/FileWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EAGf,UAAU,EACV,gBAAgB,EAIhB,WAAW,EACZ,MAAM,aAAa,CAAC;AAwErB;;;GAGG;AACH,iBAAS,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EACnG,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAiC5B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTemplate, TranslatableString, useFileWidgetProps, } from '@rjsf/utils';
|
|
3
|
-
import Markdown from 'markdown-to-jsx';
|
|
3
|
+
import { Markdown } from 'markdown-to-jsx';
|
|
4
4
|
function FileInfoPreview({ fileInfo, registry, }) {
|
|
5
5
|
const { translateString } = registry;
|
|
6
6
|
const { dataURL, type, name } = fileInfo;
|
|
@@ -38,7 +38,8 @@ function FileWidget(props) {
|
|
|
38
38
|
const BaseInputTemplate = getTemplate('BaseInputTemplate', registry, options);
|
|
39
39
|
const handleOnChangeEvent = (event) => {
|
|
40
40
|
if (event.target.files) {
|
|
41
|
-
handleChange
|
|
41
|
+
// handleChange is async; DOM event handlers are void-returning, so we intentionally don't await
|
|
42
|
+
void handleChange(event.target.files);
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
return (_jsxs("div", { children: [_jsx(BaseInputTemplate, { ...props, disabled: disabled || readonly, type: 'file', required: value ? false : required, onChangeOverride: handleOnChangeEvent, value: '', accept: options.accept ? String(options.accept) : undefined }), _jsx(FilesInfo, { filesInfo: filesInfo, onRemove: handleRemove, registry: registry, preview: options.filePreview, options: options })] }));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import AltDateWidget from './AltDateWidget.js';
|
|
2
1
|
import AltDateTimeWidget from './AltDateTimeWidget.js';
|
|
3
|
-
import
|
|
2
|
+
import AltDateWidget from './AltDateWidget.js';
|
|
4
3
|
import CheckboxesWidget from './CheckboxesWidget.js';
|
|
4
|
+
import CheckboxWidget from './CheckboxWidget.js';
|
|
5
5
|
import ColorWidget from './ColorWidget.js';
|
|
6
|
-
import DateWidget from './DateWidget.js';
|
|
7
6
|
import DateTimeWidget from './DateTimeWidget.js';
|
|
7
|
+
import DateWidget from './DateWidget.js';
|
|
8
8
|
import EmailWidget from './EmailWidget.js';
|
|
9
9
|
import FileWidget from './FileWidget.js';
|
|
10
10
|
import HiddenWidget from './HiddenWidget.js';
|
|
@@ -16,8 +16,8 @@ import SelectWidget from './SelectWidget.js';
|
|
|
16
16
|
import TextareaWidget from './TextareaWidget.js';
|
|
17
17
|
import TextWidget from './TextWidget.js';
|
|
18
18
|
import TimeWidget from './TimeWidget.js';
|
|
19
|
-
import URLWidget from './URLWidget.js';
|
|
20
19
|
import UpDownWidget from './UpDownWidget.js';
|
|
20
|
+
import URLWidget from './URLWidget.js';
|
|
21
21
|
function widgets() {
|
|
22
22
|
return {
|
|
23
23
|
AltDateWidget,
|
package/lib/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import Form, { FormProps, FormState, IChangeEvent } from './components/Form.js';
|
|
|
2
2
|
import RichDescription, { RichDescriptionProps } from './components/RichDescription.js';
|
|
3
3
|
import RichHelp, { RichHelpProps } from './components/RichHelp.js';
|
|
4
4
|
import SchemaExamples, { SchemaExamplesProps } from './components/SchemaExamples.js';
|
|
5
|
-
import withTheme, { ThemeProps } from './withTheme.js';
|
|
6
5
|
import getDefaultRegistry from './getDefaultRegistry.js';
|
|
7
6
|
import getTestRegistry from './getTestRegistry.js';
|
|
7
|
+
import withTheme, { ThemeProps } from './withTheme.js';
|
|
8
8
|
export type { FormProps, FormState, IChangeEvent, ThemeProps, RichDescriptionProps, RichHelpProps, SchemaExamplesProps, };
|
|
9
9
|
export { withTheme, getDefaultRegistry, getTestRegistry, RichDescription, RichHelp, SchemaExamples };
|
|
10
10
|
export default Form;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,eAAe,EAAE,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,cAAc,EAAE,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,eAAe,EAAE,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,cAAc,EAAE,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEpD,YAAY,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,GACpB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AACrG,eAAe,IAAI,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import Form from './components/Form.js';
|
|
|
2
2
|
import RichDescription from './components/RichDescription.js';
|
|
3
3
|
import RichHelp from './components/RichHelp.js';
|
|
4
4
|
import SchemaExamples from './components/SchemaExamples.js';
|
|
5
|
-
import withTheme from './withTheme.js';
|
|
6
5
|
import getDefaultRegistry from './getDefaultRegistry.js';
|
|
7
6
|
import getTestRegistry from './getTestRegistry.js';
|
|
7
|
+
import withTheme from './withTheme.js';
|
|
8
8
|
export { withTheme, getDefaultRegistry, getTestRegistry, RichDescription, RichHelp, SchemaExamples };
|
|
9
9
|
export default Form;
|