@rjsf/utils 6.6.2 → 6.7.1

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.
Files changed (88) hide show
  1. package/LICENSE.md +201 -0
  2. package/README.md +0 -4
  3. package/dist/index.cjs +246 -112
  4. package/dist/index.cjs.map +4 -4
  5. package/dist/utils.esm.js +246 -112
  6. package/dist/utils.esm.js.map +4 -4
  7. package/dist/utils.umd.js +277 -140
  8. package/lib/SelectedOptionDescription.d.ts +4 -0
  9. package/lib/SelectedOptionDescription.js +24 -0
  10. package/lib/SelectedOptionDescription.js.map +1 -0
  11. package/lib/asNumber.d.ts +6 -5
  12. package/lib/asNumber.js +14 -9
  13. package/lib/asNumber.js.map +1 -1
  14. package/lib/constants.d.ts +8 -5
  15. package/lib/constants.js +10 -7
  16. package/lib/constants.js.map +1 -1
  17. package/lib/createSchemaUtils.js +1 -1
  18. package/lib/createSchemaUtils.js.map +1 -1
  19. package/lib/enums.d.ts +4 -0
  20. package/lib/enums.js +4 -0
  21. package/lib/enums.js.map +1 -1
  22. package/lib/getDecimalSeparator.d.ts +8 -0
  23. package/lib/getDecimalSeparator.js +23 -0
  24. package/lib/getDecimalSeparator.js.map +1 -0
  25. package/lib/getSubmitButtonOptions.js +1 -1
  26. package/lib/getSubmitButtonOptions.js.map +1 -1
  27. package/lib/getWidget.js +2 -1
  28. package/lib/getWidget.js.map +1 -1
  29. package/lib/hashForSchema.d.ts +2 -0
  30. package/lib/hashForSchema.js +3 -1
  31. package/lib/hashForSchema.js.map +1 -1
  32. package/lib/index.d.ts +6 -2
  33. package/lib/index.js +5 -2
  34. package/lib/index.js.map +1 -1
  35. package/lib/isFixedItems.d.ts +2 -2
  36. package/lib/isFixedItems.js +3 -3
  37. package/lib/isFixedItems.js.map +1 -1
  38. package/lib/isRootSchema.js +2 -3
  39. package/lib/isRootSchema.js.map +1 -1
  40. package/lib/logUnsupportedDefaultForEnum.d.ts +9 -0
  41. package/lib/logUnsupportedDefaultForEnum.js +18 -0
  42. package/lib/logUnsupportedDefaultForEnum.js.map +1 -0
  43. package/lib/mergeSchemas.js +8 -1
  44. package/lib/mergeSchemas.js.map +1 -1
  45. package/lib/optionsList.js +22 -21
  46. package/lib/optionsList.js.map +1 -1
  47. package/lib/resolveUiSchema.js.map +1 -1
  48. package/lib/schema/getDefaultFormState.d.ts +1 -1
  49. package/lib/schema/getDefaultFormState.js +53 -17
  50. package/lib/schema/getDefaultFormState.js.map +1 -1
  51. package/lib/schema/getDisplayLabel.js +2 -3
  52. package/lib/schema/getDisplayLabel.js.map +1 -1
  53. package/lib/schema/omitExtraData.js +11 -0
  54. package/lib/schema/omitExtraData.js.map +1 -1
  55. package/lib/schema/retrieveSchema.d.ts +5 -1
  56. package/lib/schema/retrieveSchema.js +49 -14
  57. package/lib/schema/retrieveSchema.js.map +1 -1
  58. package/lib/schemaRequiresTrueValue.js +4 -3
  59. package/lib/schemaRequiresTrueValue.js.map +1 -1
  60. package/lib/tsconfig.tsbuildinfo +1 -1
  61. package/lib/types.d.ts +24 -0
  62. package/lib/useAltDateWidgetProps.d.ts +1 -1
  63. package/lib/useFileWidgetProps.js +2 -2
  64. package/lib/useFileWidgetProps.js.map +1 -1
  65. package/package.json +19 -19
  66. package/src/SelectedOptionDescription.tsx +48 -0
  67. package/src/asNumber.ts +18 -9
  68. package/src/constants.ts +10 -7
  69. package/src/createSchemaUtils.ts +1 -1
  70. package/src/enums.ts +4 -0
  71. package/src/getDecimalSeparator.ts +20 -0
  72. package/src/getSubmitButtonOptions.ts +1 -1
  73. package/src/getWidget.tsx +1 -1
  74. package/src/hashForSchema.ts +3 -1
  75. package/src/index.ts +8 -0
  76. package/src/isFixedItems.ts +3 -3
  77. package/src/isRootSchema.ts +2 -4
  78. package/src/logUnsupportedDefaultForEnum.ts +28 -0
  79. package/src/mergeSchemas.ts +9 -2
  80. package/src/optionsList.ts +20 -22
  81. package/src/resolveUiSchema.ts +12 -4
  82. package/src/schema/getDefaultFormState.ts +79 -22
  83. package/src/schema/getDisplayLabel.ts +3 -4
  84. package/src/schema/omitExtraData.ts +11 -0
  85. package/src/schema/retrieveSchema.ts +59 -13
  86. package/src/schemaRequiresTrueValue.ts +3 -3
  87. package/src/types.ts +31 -0
  88. package/src/useFileWidgetProps.ts +2 -2
@@ -0,0 +1,4 @@
1
+ import type { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from './types.js';
2
+ export type SelectedOptionDescriptionProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = Pick<WidgetProps<T, S, F>, 'id' | 'multiple' | 'options' | 'registry' | 'uiSchema' | 'value' | 'hideLabel'>;
3
+ /** Renders the description associated with the selected oneOf or anyOf option in a single-select widget. */
4
+ export default function SelectedOptionDescription<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ hideLabel, id, multiple, options, registry, uiSchema, value }: SelectedOptionDescriptionProps<T, S, F>): import("react").JSX.Element | null;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import enumOptionsIsSelected from './enumOptionsIsSelected.js';
3
+ import getTemplate from './getTemplate.js';
4
+ import getUiOptions from './getUiOptions.js';
5
+ import { descriptionId } from './idGenerators.js';
6
+ /** Renders the description associated with the selected oneOf or anyOf option in a single-select widget. */
7
+ export default function SelectedOptionDescription({ hideLabel, id, multiple, options, registry, uiSchema, value }) {
8
+ var _a, _b;
9
+ if (multiple || hideLabel) {
10
+ return null;
11
+ }
12
+ const { label = true } = getUiOptions(uiSchema, registry.globalUiOptions);
13
+ if (!label) {
14
+ return null;
15
+ }
16
+ const option = (_a = options.enumOptions) === null || _a === void 0 ? void 0 : _a.find(({ value: enumValue }) => enumOptionsIsSelected(enumValue, value));
17
+ const description = (_b = option === null || option === void 0 ? void 0 : option.schema) === null || _b === void 0 ? void 0 : _b.description;
18
+ if (!description) {
19
+ return null;
20
+ }
21
+ const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, options);
22
+ return (_jsx(DescriptionFieldTemplate, { id: descriptionId(id), description: description, schema: option.schema, uiSchema: uiSchema, registry: registry }));
23
+ }
24
+ //# sourceMappingURL=SelectedOptionDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectedOptionDescription.js","sourceRoot":"","sources":["../src/SelectedOptionDescription.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAS/C,4GAA4G;AAC5G,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAI/C,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAA2C;;IACxG,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,YAAY,CAAU,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IACnF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,WAAW,0CAAE,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5G,MAAM,WAAW,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,WAAW,CAAC;IAChD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,OAAO,CACR,CAAC;IACF,OAAO,CACL,KAAC,wBAAwB,IACvB,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC,EACrB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,CAAC,MAAO,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
package/lib/asNumber.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- /** Attempts to convert the string into a number. If an empty string is provided, then `undefined` is returned. If a
2
- * `null` is provided, it is returned. If the string ends in a `.` then the string is returned because the user may be
3
- * in the middle of typing a float number. If a number ends in a pattern like `.0`, `.20`, `.030`, string is returned
4
- * because the user may be typing number that will end in a non-zero digit. Otherwise, the string is wrapped by
5
- * `Number()` and if that result is not `NaN`, that number will be returned, otherwise the string `value` will be.
1
+ /** Attempts to convert the string into a number. If an empty string is provided, then `undefined` is returned.
2
+ * If a `null` is provided, it is returned. If the string ends in a `.` or the locale-specific separator then the
3
+ * string is returned because the user may be in the middle of typing a float number. If a number ends in a pattern
4
+ * like `.0`, `.20`, `.030`, string is returned because the user may be typing number that will end in a non-zero
5
+ * digit. Otherwise, the string is wrapped by `Number()` and if that result is not `NaN`, that number will be
6
+ * returned, otherwise the string `value` will be.
6
7
  *
7
8
  * @param value - The string or null value to convert to a number
8
9
  * @returns - The `value` converted to a number when appropriate, otherwise the `value`
package/lib/asNumber.js CHANGED
@@ -1,8 +1,10 @@
1
- /** Attempts to convert the string into a number. If an empty string is provided, then `undefined` is returned. If a
2
- * `null` is provided, it is returned. If the string ends in a `.` then the string is returned because the user may be
3
- * in the middle of typing a float number. If a number ends in a pattern like `.0`, `.20`, `.030`, string is returned
4
- * because the user may be typing number that will end in a non-zero digit. Otherwise, the string is wrapped by
5
- * `Number()` and if that result is not `NaN`, that number will be returned, otherwise the string `value` will be.
1
+ import getDecimalSeparator from './getDecimalSeparator.js';
2
+ /** Attempts to convert the string into a number. If an empty string is provided, then `undefined` is returned.
3
+ * If a `null` is provided, it is returned. If the string ends in a `.` or the locale-specific separator then the
4
+ * string is returned because the user may be in the middle of typing a float number. If a number ends in a pattern
5
+ * like `.0`, `.20`, `.030`, string is returned because the user may be typing number that will end in a non-zero
6
+ * digit. Otherwise, the string is wrapped by `Number()` and if that result is not `NaN`, that number will be
7
+ * returned, otherwise the string `value` will be.
6
8
  *
7
9
  * @param value - The string or null value to convert to a number
8
10
  * @returns - The `value` converted to a number when appropriate, otherwise the `value`
@@ -14,24 +16,27 @@ export default function asNumber(value) {
14
16
  if (value === null) {
15
17
  return null;
16
18
  }
19
+ const separator = getDecimalSeparator();
20
+ // Normalize separator to standard '.' for pattern checking and parsing
21
+ const standardValue = typeof value === 'string' && separator !== '.' ? value.replace(separator, '.') : value;
17
22
  // oxlint-disable-next-line typescript/prefer-string-starts-ends-with -- regex test() coerces undefined to "undefined" safely; endsWith() throws on undefined values passed at runtime
18
- if (/\.$/.test(value)) {
23
+ if (/\.$/.test(standardValue)) {
19
24
  // '3.' can't really be considered a number even if it parses in js. The
20
25
  // user is most likely entering a float.
21
26
  return value;
22
27
  }
23
28
  // oxlint-disable-next-line typescript/prefer-string-starts-ends-with -- same as above
24
- if (/\.0$/.test(value)) {
29
+ if (/\.0$/.test(standardValue)) {
25
30
  // we need to return this as a string here, to allow for input like 3.07
26
31
  return value;
27
32
  }
28
- if (/\.\d*0$/.test(value)) {
33
+ if (/\.\d*0$/.test(standardValue)) {
29
34
  // It's a number, that's cool - but we need it as a string so it doesn't screw
30
35
  // with the user when entering dollar amounts or other values (such as those with
31
36
  // specific precision or number of significant digits)
32
37
  return value;
33
38
  }
34
- const n = Number(value);
39
+ const n = Number(standardValue);
35
40
  const valid = typeof n === 'number' && !Number.isNaN(n);
36
41
  return valid ? n : value;
37
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"asNumber.js","sourceRoot":"","sources":["../src/asNumber.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CA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AK,KAAK,QAAQ,IAAI,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE7G,sLAAsL;IACtL,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAC9B,wEAAwE;QACxE,wCAAwC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,sFAAsF;IACtF,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/B,wEAAwE;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAClC,8EAA8E;QAC9E,iFAAiF;QACjF,sDAAsD;QACtD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAExD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3B,CAAC"}
@@ -1,9 +1,10 @@
1
1
  /** Below are the list of all the keys into various elements of a RJSFSchema or UiSchema that are used by the various
2
- * utility functions. In addition to those keys, there are the special `ADDITIONAL_PROPERTY_FLAG` and
3
- * `RJSF_ADDITIONAL_PROPERTIES_FLAG` flags that is added to a schema under certain conditions by the `retrieveSchema()`
4
- * utility.
2
+ * utility functions. In addition to those keys, there are the special `ADDITIONAL_PROPERTY_FLAG`,
3
+ * `RJSF_REF_KEY`, and `RJSF_REF_CYCLE_KEY` Symbols that are added to a schema under certain conditions by the
4
+ * `retrieveSchema()` utility. Using Symbols keeps these internal markers invisible to JSON serialisation and
5
+ * JSON Schema validators (AJV, ATA, etc.), which only enumerate string-keyed properties.
5
6
  */
6
- export declare const ADDITIONAL_PROPERTY_FLAG = "__additional_property";
7
+ export declare const ADDITIONAL_PROPERTY_FLAG: unique symbol;
7
8
  export declare const ADDITIONAL_PROPERTIES_KEY = "additionalProperties";
8
9
  export declare const ALL_OF_KEY = "allOf";
9
10
  export declare const ANY_OF_KEY = "anyOf";
@@ -25,7 +26,8 @@ export declare const READONLY_KEY = "readonly";
25
26
  export declare const REQUIRED_KEY = "required";
26
27
  export declare const SUBMIT_BTN_OPTIONS_KEY = "submitButtonOptions";
27
28
  export declare const REF_KEY = "$ref";
28
- export declare const RJSF_REF_KEY = "__rjsf_ref";
29
+ export declare const RJSF_REF_KEY: unique symbol;
30
+ export declare const RJSF_REF_CYCLE_KEY: unique symbol;
29
31
  export declare const SCHEMA_KEY = "$schema";
30
32
  export declare const DEFAULT_ID_PREFIX = "root";
31
33
  export declare const DEFAULT_ID_SEPARATOR = "_";
@@ -39,6 +41,7 @@ export declare const FORM_CONTEXT_NAME = "formContext";
39
41
  /** The name of the `layoutGridLookupMap` attribute in the form context
40
42
  */
41
43
  export declare const LOOKUP_MAP_NAME = "layoutGridLookupMap";
44
+ export declare const RJSF_PREFIX_KEY = "__rjsf";
42
45
  export declare const RJSF_ADDITIONAL_PROPERTIES_FLAG = "__rjsf_additionalProperties";
43
46
  export declare const ROOT_SCHEMA_PREFIX = "__rjsf_rootSchema";
44
47
  export declare const UI_FIELD_KEY = "ui:field";
package/lib/constants.js CHANGED
@@ -1,9 +1,10 @@
1
1
  /** Below are the list of all the keys into various elements of a RJSFSchema or UiSchema that are used by the various
2
- * utility functions. In addition to those keys, there are the special `ADDITIONAL_PROPERTY_FLAG` and
3
- * `RJSF_ADDITIONAL_PROPERTIES_FLAG` flags that is added to a schema under certain conditions by the `retrieveSchema()`
4
- * utility.
2
+ * utility functions. In addition to those keys, there are the special `ADDITIONAL_PROPERTY_FLAG`,
3
+ * `RJSF_REF_KEY`, and `RJSF_REF_CYCLE_KEY` Symbols that are added to a schema under certain conditions by the
4
+ * `retrieveSchema()` utility. Using Symbols keeps these internal markers invisible to JSON serialisation and
5
+ * JSON Schema validators (AJV, ATA, etc.), which only enumerate string-keyed properties.
5
6
  */
6
- export const ADDITIONAL_PROPERTY_FLAG = '__additional_property';
7
+ export const ADDITIONAL_PROPERTY_FLAG = Symbol('__additional_property');
7
8
  export const ADDITIONAL_PROPERTIES_KEY = 'additionalProperties';
8
9
  export const ALL_OF_KEY = 'allOf';
9
10
  export const ANY_OF_KEY = 'anyOf';
@@ -25,7 +26,8 @@ export const READONLY_KEY = 'readonly';
25
26
  export const REQUIRED_KEY = 'required';
26
27
  export const SUBMIT_BTN_OPTIONS_KEY = 'submitButtonOptions';
27
28
  export const REF_KEY = '$ref';
28
- export const RJSF_REF_KEY = '__rjsf_ref';
29
+ export const RJSF_REF_KEY = Symbol('__rjsf_ref');
30
+ export const RJSF_REF_CYCLE_KEY = Symbol('__rjsf_ref_cycle');
29
31
  export const SCHEMA_KEY = '$schema';
30
32
  export const DEFAULT_ID_PREFIX = 'root';
31
33
  export const DEFAULT_ID_SEPARATOR = '_';
@@ -39,8 +41,9 @@ export const FORM_CONTEXT_NAME = 'formContext';
39
41
  /** The name of the `layoutGridLookupMap` attribute in the form context
40
42
  */
41
43
  export const LOOKUP_MAP_NAME = 'layoutGridLookupMap';
42
- export const RJSF_ADDITIONAL_PROPERTIES_FLAG = '__rjsf_additionalProperties';
43
- export const ROOT_SCHEMA_PREFIX = '__rjsf_rootSchema';
44
+ export const RJSF_PREFIX_KEY = '__rjsf';
45
+ export const RJSF_ADDITIONAL_PROPERTIES_FLAG = `${RJSF_PREFIX_KEY}_additionalProperties`;
46
+ export const ROOT_SCHEMA_PREFIX = `${RJSF_PREFIX_KEY}_rootSchema`;
44
47
  export const UI_FIELD_KEY = 'ui:field';
45
48
  export const UI_WIDGET_KEY = 'ui:widget';
46
49
  export const UI_OPTIONS_KEY = 'ui:options';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants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B,CAAC;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,eAAe,uBAAuB,CAAC;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,eAAe,aAAa,CAAC;AAClE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AACvC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;GACG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,8CAA8C,CAAC;AACxF,MAAM,CAAC,MAAM,yBAAyB,GAAG,8CAA8C,CAAC"}
@@ -18,7 +18,7 @@ class SchemaUtils {
18
18
  * @param [experimental_customMergeAllOf] - Optional function that allows for custom merging of `allOf` schemas
19
19
  */
20
20
  constructor(validator, rootSchema, experimental_defaultFormStateBehavior, experimental_customMergeAllOf) {
21
- if (rootSchema && rootSchema[SCHEMA_KEY] === JSON_SCHEMA_DRAFT_2020_12) {
21
+ if ((rootSchema === null || rootSchema === void 0 ? void 0 : rootSchema[SCHEMA_KEY]) === JSON_SCHEMA_DRAFT_2020_12) {
22
22
  this.rootSchema = makeAllReferencesAbsolute(rootSchema, get(rootSchema, ID_KEY, '#'));
23
23
  }
24
24
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"createSchemaUtils.js","sourceRoot":"","sources":["../src/createSchemaUtils.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,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IACH,cAAc,CAAC,MAAS,EAAE,WAAe,EAAE,uBAAiC;QAC1E,OAAO,cAAc,CACnB,IAAI,CAAC,SAAS,EACd,MAAM,EACN,IAAI,CAAC,UAAU,EACf,WAAW,EACX,IAAI,CAAC,6BAA6B,EAClC,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,wBAAwB,CAAC,SAAa,EAAE,SAAa,EAAE,IAAU;QAC/D,OAAO,wBAAwB,CAC7B,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,UAAU,EACf,SAAS,EACT,SAAS,EACT,IAAI,EACJ,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,oDAAoD;IACpD,YAAY,CAAC,MAAS,EAAE,IAAa,EAAE,QAAY;QACjD,oDAAoD;QACpD,OAAO,YAAY,CACjB,IAAI,CAAC,SAAS,EACd,MAAM,EACN,IAAI,EACJ,IAAI,CAAC,UAAU,EACf,QAAQ,EACR,IAAI,CAAC,6BAA6B,CACnC,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAKvC,SAAiC,EACjC,UAAa,EACb,qCAAqC,GAAG,EAAE,EAC1C,6BAAgE;IAEhE,OAAO,IAAI,WAAW,CACpB,SAAS,EACT,UAAU,EACV,qCAAqC,EACrC,6BAA6B,CAC9B,CAAC;AACJ,CAAC"}
package/lib/enums.d.ts CHANGED
@@ -27,6 +27,8 @@ export declare enum TranslatableString {
27
27
  AddItemButton = "Add Item",
28
28
  /** Copy button title, used by IconButton */
29
29
  CopyButton = "Copy",
30
+ /** Expand cycle button title */
31
+ ExpandButton = "Expand Cycle",
30
32
  /** Move down button title, used by IconButton */
31
33
  MoveDownButton = "Move down",
32
34
  /** Move up button title, used by IconButton */
@@ -69,6 +71,8 @@ export declare enum TranslatableString {
69
71
  KeyLabel = "%1 Key",
70
72
  /** Deprecated label, where %1 will be replaced by the label as provided by SchemaField */
71
73
  DeprecatedLabel = "%1 (deprecated)",
74
+ /** Cyclic schema message */
75
+ CycleDetected = "Circular reference ($ref cycle) detected for field \"%1\". You may choose to expand to the next cycle break",
72
76
  /** Invalid object field configuration as provided by the ObjectField.
73
77
  * NOTE: Use markdown notation rather than html tags.
74
78
  */
package/lib/enums.js CHANGED
@@ -28,6 +28,8 @@ export var TranslatableString;
28
28
  TranslatableString["AddItemButton"] = "Add Item";
29
29
  /** Copy button title, used by IconButton */
30
30
  TranslatableString["CopyButton"] = "Copy";
31
+ /** Expand cycle button title */
32
+ TranslatableString["ExpandButton"] = "Expand Cycle";
31
33
  /** Move down button title, used by IconButton */
32
34
  TranslatableString["MoveDownButton"] = "Move down";
33
35
  /** Move up button title, used by IconButton */
@@ -71,6 +73,8 @@ export var TranslatableString;
71
73
  TranslatableString["KeyLabel"] = "%1 Key";
72
74
  /** Deprecated label, where %1 will be replaced by the label as provided by SchemaField */
73
75
  TranslatableString["DeprecatedLabel"] = "%1 (deprecated)";
76
+ /** Cyclic schema message */
77
+ TranslatableString["CycleDetected"] = "Circular reference ($ref cycle) detected for field \"%1\". You may choose to expand to the next cycle break";
74
78
  // Strings with replaceable parameters AND/OR that support markdown and html
75
79
  /** Invalid object field configuration as provided by the ObjectField.
76
80
  * NOTE: Use markdown notation rather than html tags.
package/lib/enums.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kBA0FX;AA1FD,WAAY,kBAAkB;IAC5B,0DAA0D;IAC1D,6CAAuB,CAAA;IACvB,+CAA+C;IAC/C,+DAAyC,CAAA;IACzC,8CAA8C;IAC9C,oFAA8D,CAAA;IAC9D,sCAAsC;IACtC,sCAAgB,CAAA;IAChB,qCAAqC;IACrC,oCAAc,CAAA;IACd,qCAAqC;IACrC,0CAAoB,CAAA;IACpB,sCAAsC;IACtC,4CAAs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;IAC3H,4EAA4E;IAC5E;;OAEG;IACH,6FAAqE,CAAA;IACrE,yDAAyD;IACzD,oEAA8C,CAAA;IAC9C;;OAEG;IACH,yFAAmE,CAAA;IACnE;;OAEG;IACH,oFAA8D,CAAA;IAC9D;;;OAGG;IACH,wGAAkF,CAAA;IAClF;;OAEG;IACH,yDAAmC,CAAA;AACrC,CAAC,EA9FW,kBAAkB,KAAlB,kBAAkB,QA8F7B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Determines the locale-specific decimal separator.
3
+ * It uses the provided locale or the first locale in navigator.languages (if available) and falls back to "en".
4
+ *
5
+ * @param languages - Optional array of locales or a single locale string
6
+ * @returns The decimal separator character (typically '.' or ',').
7
+ */
8
+ export default function getDecimalSeparator(languages?: string | string[]): string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Determines the locale-specific decimal separator.
3
+ * It uses the provided locale or the first locale in navigator.languages (if available) and falls back to "en".
4
+ *
5
+ * @param languages - Optional array of locales or a single locale string
6
+ * @returns The decimal separator character (typically '.' or ',').
7
+ */
8
+ export default function getDecimalSeparator(languages) {
9
+ var _a;
10
+ const locales = languages || (typeof navigator !== 'undefined' ? navigator.languages : undefined);
11
+ if (locales) {
12
+ try {
13
+ const formatter = new Intl.NumberFormat(locales);
14
+ const parts = formatter.formatToParts(1.1);
15
+ return ((_a = parts.find((part) => part.type === 'decimal')) === null || _a === void 0 ? void 0 : _a.value) || '.';
16
+ }
17
+ catch (e) {
18
+ // Fallback
19
+ }
20
+ }
21
+ return '.';
22
+ }
23
+ //# sourceMappingURL=getDecimalSeparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDecimalSeparator.js","sourceRoot":"","sources":["../src/getDecimalSeparator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,SAA6B;;IACvE,MAAM,OAAO,GAAG,SAAS,IAAI,CAAC,OAAO,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClG,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YACjD,MAAM,KAAK,GAAG,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC3C,OAAO,CAAA,MAAA,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,0CAAE,KAAK,KAAI,GAAG,CAAC;QACrE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,WAAW;QACb,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -16,7 +16,7 @@ export const DEFAULT_OPTIONS = {
16
16
  */
17
17
  export default function getSubmitButtonOptions(uiSchema = {}) {
18
18
  const uiOptions = getUiOptions(uiSchema);
19
- if (uiOptions && uiOptions[SUBMIT_BTN_OPTIONS_KEY]) {
19
+ if (uiOptions === null || uiOptions === void 0 ? void 0 : uiOptions[SUBMIT_BTN_OPTIONS_KEY]) {
20
20
  const options = uiOptions[SUBMIT_BTN_OPTIONS_KEY];
21
21
  return { ...DEFAULT_OPTIONS, ...options };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getSubmitButtonOptions.js","sourceRoot":"","sources":["../src/getSubmitButtonOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C;GACG;AACH,MAAM,CAAC,MAAM,eAAe,GAAgC;IAC1D,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,WAA8B,EAAE;IAChC,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,IAAI,SAAS,IAAI,SAAS,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAClD,OAAO,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
1
+ {"version":3,"file":"getSubmitButtonOptions.js","sourceRoot":"","sources":["../src/getSubmitButtonOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C;GACG;AACH,MAAM,CAAC,MAAM,eAAe,GAAgC;IAC1D,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,WAA8B,EAAE;IAChC,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,IAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,sBAAsB,CAAC,EAAE,CAAC;QACxC,MAAM,OAAO,GAAG,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAClD,OAAO,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
package/lib/getWidget.js CHANGED
@@ -66,11 +66,12 @@ const widgetMap = {
66
66
  * @returns - The wrapper widget
67
67
  */
68
68
  function mergeWidgetOptions(AWidget) {
69
+ var _a;
69
70
  let MergedWidget = get(AWidget, 'MergedWidget');
70
71
  // cache return value as property of widget for proper react reconciliation
71
72
  if (!MergedWidget) {
72
73
  // oxlint-disable-next-line typescript/no-deprecated
73
- const defaultOptions = (AWidget.defaultProps && AWidget.defaultProps.options) || {};
74
+ const defaultOptions = ((_a = AWidget.defaultProps) === null || _a === void 0 ? void 0 : _a.options) || {};
74
75
  MergedWidget = ({ options, ...props }) => _jsx(AWidget, { options: { ...defaultOptions, ...options }, ...props });
75
76
  set(AWidget, 'MergedWidget', MergedWidget);
76
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getWidget.js","sourceRoot":"","sources":["../src/getWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,OAAO,MAAM,UAAU,CAAC;AAE/B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C;GACG;AACH,MAAM,SAAS,GAA2C;IACxD,OAAO,EAAE;QACP,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,cAAc;QACtB,MAAM,EAAE,cAAc;KACvB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW;QAChB,UAAU,EAAE,YAAY;QACxB,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,gBAAgB;QAC1B,WAAW,EAAE,gBAAgB;QAC7B,UAAU,EAAE,eAAe;QAC3B,cAAc,EAAE,mBAAmB;QACnC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,YAAY;KACnB;IACD,MAAM,EAAE;QACN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AI,MAAM,IAAI,iBAAiB,EAAE,CAAC;QAChC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACnD,OAAO,SAAS,CAAU,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,gBAAgB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACvF,CAAC;QAED,IAAI,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACpE,OAAO,SAAS,CAAU,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,eAAe,IAAI,gBAAgB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACnG,CAAC"}
@@ -23,6 +23,8 @@ export declare function sortedJSONStringify(object: unknown): string;
23
23
  export declare function hashObject(object: unknown): string;
24
24
  /** Stringifies the schema and returns the hash of the resulting string. Sorts schema fields
25
25
  * in consistent order before stringify to prevent different hash ids for the same schema.
26
+ * Symbol-keyed properties (RJSF_REF_KEY, RJSF_REF_CYCLE_KEY, ADDITIONAL_PROPERTY_FLAG) are
27
+ * automatically excluded by JSON.stringify, so no special filtering is needed.
26
28
  *
27
29
  * @param schema - The schema for which the hash is desired
28
30
  * @returns - The string obtained from the hash of the stringified schema
@@ -42,11 +42,13 @@ export function hashObject(object) {
42
42
  }
43
43
  /** Stringifies the schema and returns the hash of the resulting string. Sorts schema fields
44
44
  * in consistent order before stringify to prevent different hash ids for the same schema.
45
+ * Symbol-keyed properties (RJSF_REF_KEY, RJSF_REF_CYCLE_KEY, ADDITIONAL_PROPERTY_FLAG) are
46
+ * automatically excluded by JSON.stringify, so no special filtering is needed.
45
47
  *
46
48
  * @param schema - The schema for which the hash is desired
47
49
  * @returns - The string obtained from the hash of the stringified schema
48
50
  */
49
51
  export default function hashForSchema(schema) {
50
- return hashObject(schema);
52
+ return hashString(sortedJSONStringify(schema));
51
53
  }
52
54
  //# sourceMappingURL=hashForSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashForSchema.js","sourceRoot":"","sources":["../src/hashForSchema.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACjC,sCAAsC;QACtC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC;QAChC,sCAAsC;QACtC,IAAI,IAAI,IAAI,CAAC,CAAC,2BAA2B;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,4HAA4H;IAC5H,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACpC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM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KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe;IACxC,OAAO,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAA0C,MAAS;IACtF,OAAO,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AACjD,CAAC"}
package/lib/index.d.ts CHANGED
@@ -20,6 +20,7 @@ import findSchemaDefinition from './findSchemaDefinition.js';
20
20
  import getChangedFields from './getChangedFields.js';
21
21
  import type { DateElementFormat, DateElementProp } from './getDateElementProps.js';
22
22
  import getDateElementProps from './getDateElementProps.js';
23
+ import getDecimalSeparator from './getDecimalSeparator.js';
23
24
  import getDiscriminatorFieldFromSchema from './getDiscriminatorFieldFromSchema.js';
24
25
  import getInputProps from './getInputProps.js';
25
26
  import getOptionMatchingSimpleDiscriminator from './getOptionMatchingSimpleDiscriminator.js';
@@ -42,6 +43,7 @@ import isObject from './isObject.js';
42
43
  import isRootSchema from './isRootSchema.js';
43
44
  import labelValue from './labelValue.js';
44
45
  import localToUTC from './localToUTC.js';
46
+ import logUnsupportedDefaultForEnum from './logUnsupportedDefaultForEnum.js';
45
47
  import lookupFromFormContext from './lookupFromFormContext.js';
46
48
  import mergeDefaultsWithFormData from './mergeDefaultsWithFormData.js';
47
49
  import mergeObjects from './mergeObjects.js';
@@ -56,6 +58,8 @@ import removeOptionalEmptyObjects from './removeOptionalEmptyObjects.js';
56
58
  import replaceStringParameters from './replaceStringParameters.js';
57
59
  import resolveUiSchema from './resolveUiSchema.js';
58
60
  import schemaRequiresTrueValue from './schemaRequiresTrueValue.js';
61
+ import SelectedOptionDescription from './SelectedOptionDescription.js';
62
+ import type { SelectedOptionDescriptionProps } from './SelectedOptionDescription.js';
59
63
  import shallowEquals from './shallowEquals.js';
60
64
  import type { ComponentUpdateStrategy } from './shouldRender.js';
61
65
  import shouldRender from './shouldRender.js';
@@ -79,5 +83,5 @@ export * from './enums.js';
79
83
  export * from './constants.js';
80
84
  export * from './parser/index.js';
81
85
  export * from './schema/index.js';
82
- export type { ComponentUpdateStrategy, DateElementFormat, DateElementProp, DateElementProps, FileInfoType, UseAltDateWidgetResult, UseFileWidgetPropsResult, };
83
- export { allowAdditionalItems, ariaDescribedByIds, asNumber, buttonId, canExpand, createErrorHandler, createSchemaUtils, DateElement, dataURItoBlob, dateRangeOptions, deepEquals, descriptionId, englishStringTranslator, enumOptionSelectedValue, enumOptionValueDecoder, enumOptionValueEncoder, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getChangedFields, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getOptionValueFormat, getSchemaType, getSubmitButtonOptions, getTemplate, getTestIds, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, hashObject, hashString, helpId, isConstant, isCustomWidget, isFixedItems, isFormDataAvailable, isObject, isRootSchema, labelValue, localToUTC, lookupFromFormContext, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionalControlsId, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, removeOptionalEmptyObjects, replaceStringParameters, resolveUiSchema, schemaRequiresTrueValue, shallowEquals, shouldRender, shouldRenderOptionalField, sortedJSONStringify, titleId, toConstant, toDateString, toErrorList, toErrorSchema, toFieldPathId, unwrapErrorHandler, useAltDateWidgetProps, useDeepCompareMemo, useFileWidgetProps, utcToLocal, validationDataMerge, withIdRefPrefix, bracketNameGenerator, dotNotationNameGenerator, };
86
+ export type { ComponentUpdateStrategy, DateElementFormat, DateElementProp, DateElementProps, FileInfoType, SelectedOptionDescriptionProps, UseAltDateWidgetResult, UseFileWidgetPropsResult, };
87
+ export { allowAdditionalItems, ariaDescribedByIds, asNumber, buttonId, canExpand, createErrorHandler, createSchemaUtils, DateElement, dataURItoBlob, dateRangeOptions, deepEquals, descriptionId, englishStringTranslator, enumOptionSelectedValue, enumOptionValueDecoder, enumOptionValueEncoder, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getChangedFields, getDateElementProps, getDecimalSeparator, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getOptionValueFormat, getSchemaType, getSubmitButtonOptions, getTemplate, getTestIds, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, hashObject, hashString, helpId, isConstant, isCustomWidget, isFixedItems, isFormDataAvailable, isObject, isRootSchema, labelValue, localToUTC, logUnsupportedDefaultForEnum, lookupFromFormContext, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionalControlsId, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, removeOptionalEmptyObjects, replaceStringParameters, resolveUiSchema, schemaRequiresTrueValue, SelectedOptionDescription, shallowEquals, shouldRender, shouldRenderOptionalField, sortedJSONStringify, titleId, toConstant, toDateString, toErrorList, toErrorSchema, toFieldPathId, unwrapErrorHandler, useAltDateWidgetProps, useDeepCompareMemo, useFileWidgetProps, utcToLocal, validationDataMerge, withIdRefPrefix, bracketNameGenerator, dotNotationNameGenerator, };
package/lib/index.js CHANGED
@@ -19,6 +19,7 @@ import ErrorSchemaBuilder from './ErrorSchemaBuilder.js';
19
19
  import findSchemaDefinition from './findSchemaDefinition.js';
20
20
  import getChangedFields from './getChangedFields.js';
21
21
  import getDateElementProps from './getDateElementProps.js';
22
+ import getDecimalSeparator from './getDecimalSeparator.js';
22
23
  import getDiscriminatorFieldFromSchema from './getDiscriminatorFieldFromSchema.js';
23
24
  import getInputProps from './getInputProps.js';
24
25
  import getOptionMatchingSimpleDiscriminator from './getOptionMatchingSimpleDiscriminator.js';
@@ -41,6 +42,7 @@ import isObject from './isObject.js';
41
42
  import isRootSchema from './isRootSchema.js';
42
43
  import labelValue from './labelValue.js';
43
44
  import localToUTC from './localToUTC.js';
45
+ import logUnsupportedDefaultForEnum from './logUnsupportedDefaultForEnum.js';
44
46
  import lookupFromFormContext from './lookupFromFormContext.js';
45
47
  import mergeDefaultsWithFormData from './mergeDefaultsWithFormData.js';
46
48
  import mergeObjects from './mergeObjects.js';
@@ -55,6 +57,7 @@ import removeOptionalEmptyObjects from './removeOptionalEmptyObjects.js';
55
57
  import replaceStringParameters from './replaceStringParameters.js';
56
58
  import resolveUiSchema from './resolveUiSchema.js';
57
59
  import schemaRequiresTrueValue from './schemaRequiresTrueValue.js';
60
+ import SelectedOptionDescription from './SelectedOptionDescription.js';
58
61
  import shallowEquals from './shallowEquals.js';
59
62
  import shouldRender from './shouldRender.js';
60
63
  import shouldRenderOptionalField from './shouldRenderOptionalField.js';
@@ -74,7 +77,7 @@ export * from './enums.js';
74
77
  export * from './constants.js';
75
78
  export * from './parser/index.js';
76
79
  export * from './schema/index.js';
77
- export { allowAdditionalItems, ariaDescribedByIds, asNumber, buttonId, canExpand, createErrorHandler, createSchemaUtils, DateElement, dataURItoBlob, dateRangeOptions, deepEquals, descriptionId, englishStringTranslator, enumOptionSelectedValue, enumOptionValueDecoder, enumOptionValueEncoder, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getChangedFields, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getOptionValueFormat, getSchemaType, getSubmitButtonOptions, getTemplate, getTestIds, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, hashObject, hashString, helpId, isConstant, isCustomWidget, isFixedItems, isFormDataAvailable, isObject, isRootSchema, labelValue, localToUTC, lookupFromFormContext, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionalControlsId, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec,
80
+ export { allowAdditionalItems, ariaDescribedByIds, asNumber, buttonId, canExpand, createErrorHandler, createSchemaUtils, DateElement, dataURItoBlob, dateRangeOptions, deepEquals, descriptionId, englishStringTranslator, enumOptionSelectedValue, enumOptionValueDecoder, enumOptionValueEncoder, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getChangedFields, getDateElementProps, getDecimalSeparator, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getOptionValueFormat, getSchemaType, getSubmitButtonOptions, getTemplate, getTestIds, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, hashObject, hashString, helpId, isConstant, isCustomWidget, isFixedItems, isFormDataAvailable, isObject, isRootSchema, labelValue, localToUTC, logUnsupportedDefaultForEnum, lookupFromFormContext, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionalControlsId, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec,
78
81
  // oxlint-disable-next-line typescript/no-deprecated
79
- removeOptionalEmptyObjects, replaceStringParameters, resolveUiSchema, schemaRequiresTrueValue, shallowEquals, shouldRender, shouldRenderOptionalField, sortedJSONStringify, titleId, toConstant, toDateString, toErrorList, toErrorSchema, toFieldPathId, unwrapErrorHandler, useAltDateWidgetProps, useDeepCompareMemo, useFileWidgetProps, utcToLocal, validationDataMerge, withIdRefPrefix, bracketNameGenerator, dotNotationNameGenerator, };
82
+ removeOptionalEmptyObjects, replaceStringParameters, resolveUiSchema, schemaRequiresTrueValue, SelectedOptionDescription, shallowEquals, shouldRender, shouldRenderOptionalField, sortedJSONStringify, titleId, toConstant, toDateString, toErrorList, toErrorSchema, toFieldPathId, unwrapErrorHandler, useAltDateWidgetProps, useDeepCompareMemo, useFileWidgetProps, utcToLocal, validationDataMerge, withIdRefPrefix, bracketNameGenerator, dotNotationNameGenerator, };
80
83
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,+BAA+B,MAAM,mCAAmC,CAAC;AAChF,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAC1F,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,sBAAsB,MAAM,0BAA0B,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,oCAAoC,EACpC,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,UAAU,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,eAAe,EACf,GAAG,EACH,eAAe,EACf,SAAS;AACT,oDAAoD;AACpD,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,mBAAmB,EACnB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MA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,uBAAuB,EACvB,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,mBAAmB,EACnB,OAAO,EACP,UAAU,EACV,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,GACzB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { RJSFSchema, StrictRJSFSchema } from './types.js';
2
- /** Detects whether the given `schema` contains fixed items. This is the case when `schema.items` is a non-empty array
3
- * that only contains objects.
2
+ /** Detects whether the given `schema` contains fixed items. This is the case when `schema.items` is an array that only
3
+ * contains objects.
4
4
  *
5
5
  * @param schema - The schema in which to check for fixed items
6
6
  * @returns - True if there are fixed items in the schema, false otherwise
@@ -1,11 +1,11 @@
1
1
  import isObject from './isObject.js';
2
- /** Detects whether the given `schema` contains fixed items. This is the case when `schema.items` is a non-empty array
3
- * that only contains objects.
2
+ /** Detects whether the given `schema` contains fixed items. This is the case when `schema.items` is an array that only
3
+ * contains objects.
4
4
  *
5
5
  * @param schema - The schema in which to check for fixed items
6
6
  * @returns - True if there are fixed items in the schema, false otherwise
7
7
  */
8
8
  export default function isFixedItems(schema) {
9
- return Array.isArray(schema.items) && schema.items.length > 0 && schema.items.every((item) => isObject(item));
9
+ return Array.isArray(schema.items) && schema.items.every((item) => isObject(item));
10
10
  }
11
11
  //# sourceMappingURL=isFixedItems.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFixedItems.js","sourceRoot":"","sources":["../src/isFixedItems.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAA0C,MAAS;IACrF,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAChH,CAAC"}
1
+ {"version":3,"file":"isFixedItems.js","sourceRoot":"","sources":["../src/isFixedItems.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAA0C,MAAS;IACrF,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC"}
@@ -1,5 +1,4 @@
1
- import omit from 'lodash-es/omit.js';
2
- import { REF_KEY, RJSF_REF_KEY } from './constants.js';
1
+ import { REF_KEY } from './constants.js';
3
2
  import deepEquals from './deepEquals.js';
4
3
  /** Helper to check whether a JSON schema object is the root schema. The schema is a root schema with root `properties`
5
4
  * key or a root `$ref` key. If the `schemaToCompare` has a root `oneOf` property, the function will
@@ -19,7 +18,7 @@ export default function isRootSchema(registry, schemaToCompare) {
19
18
  }
20
19
  if (REF_KEY in rootSchema) {
21
20
  const resolvedSchema = schemaUtils.retrieveSchema(rootSchema);
22
- return deepEquals(schemaToCompare, omit(resolvedSchema, RJSF_REF_KEY));
21
+ return deepEquals(schemaToCompare, resolvedSchema);
23
22
  }
24
23
  return false;
25
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"isRootSchema.js","sourceRoot":"","sources":["../src/isRootSchema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAA2B,EAC3B,eAAkB;IAElB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAC7C,IAAI,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAC9D,OAAO,UAAU,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"isRootSchema.js","sourceRoot":"","sources":["../src/isRootSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAA2B,EAC3B,eAAkB;IAElB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAC7C,IAAI,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAC9D,OAAO,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { EnumOptionsType, RJSFSchema, StrictRJSFSchema } from './types.js';
2
+ /** Logs a warning when a single-select enum widget has a schema default that is not one of its enum options.
3
+ *
4
+ * @param id - The field id used in the warning message
5
+ * @param schema - The schema whose default value is checked
6
+ * @param enumOptions - The enum options available to the widget
7
+ * @param multiple - Whether the widget allows multiple selections
8
+ */
9
+ export default function logUnsupportedDefaultForEnum<S extends StrictRJSFSchema = RJSFSchema>(id: string, schema: S, enumOptions?: EnumOptionsType<S>[], multiple?: boolean): void;
@@ -0,0 +1,18 @@
1
+ import enumOptionsIndexForValue from './enumOptionsIndexForValue.js';
2
+ /** Logs a warning when a single-select enum widget has a schema default that is not one of its enum options.
3
+ *
4
+ * @param id - The field id used in the warning message
5
+ * @param schema - The schema whose default value is checked
6
+ * @param enumOptions - The enum options available to the widget
7
+ * @param multiple - Whether the widget allows multiple selections
8
+ */
9
+ export default function logUnsupportedDefaultForEnum(id, schema, enumOptions, multiple = false) {
10
+ if (!multiple &&
11
+ Array.isArray(enumOptions) &&
12
+ schema.default !== undefined &&
13
+ enumOptionsIndexForValue(schema.default, enumOptions, multiple) === undefined) {
14
+ // oxlint-disable-next-line no-console
15
+ console.error(`The schema default value "${schema.default}" is not one of the values in the enum options for "${id}"`);
16
+ }
17
+ }
18
+ //# sourceMappingURL=logUnsupportedDefaultForEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logUnsupportedDefaultForEnum.js","sourceRoot":"","sources":["../src/logUnsupportedDefaultForEnum.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,EAAU,EACV,MAAS,EACT,WAAkC,EAClC,QAAQ,GAAG,KAAK;IAEhB,IACE,CAAC,QAAQ;QACT,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;QAC1B,MAAM,CAAC,OAAO,KAAK,SAAS;QAC5B,wBAAwB,CAAI,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,KAAK,SAAS,EAChF,CAAC;QACD,sCAAsC;QACtC,OAAO,CAAC,KAAK,CACX,6BAA6B,MAAM,CAAC,OAAO,uDAAuD,EAAE,GAAG,CACxG,CAAC;IACJ,CAAC;AACH,CAAC"}