@rjsf/core 6.0.1 → 6.1.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.
Files changed (52) hide show
  1. package/dist/core.umd.js +139 -91
  2. package/dist/index.cjs +369 -312
  3. package/dist/index.cjs.map +4 -4
  4. package/dist/index.esm.js +248 -188
  5. package/dist/index.esm.js.map +4 -4
  6. package/lib/components/Form.d.ts.map +1 -1
  7. package/lib/components/Form.js +7 -3
  8. package/lib/components/RichHelp.d.ts +20 -0
  9. package/lib/components/RichHelp.d.ts.map +1 -0
  10. package/lib/components/RichHelp.js +17 -0
  11. package/lib/components/constants.d.ts +5 -0
  12. package/lib/components/constants.d.ts.map +1 -0
  13. package/lib/components/constants.js +4 -0
  14. package/lib/components/fields/ArrayField.d.ts.map +1 -1
  15. package/lib/components/fields/ArrayField.js +39 -17
  16. package/lib/components/fields/FallbackField.d.ts.map +1 -1
  17. package/lib/components/fields/FallbackField.js +11 -3
  18. package/lib/components/fields/ObjectField.d.ts.map +1 -1
  19. package/lib/components/fields/ObjectField.js +7 -9
  20. package/lib/components/fields/StringField.d.ts.map +1 -1
  21. package/lib/components/fields/StringField.js +3 -3
  22. package/lib/components/templates/ArrayFieldItemTemplate.d.ts.map +1 -1
  23. package/lib/components/templates/ArrayFieldItemTemplate.js +5 -5
  24. package/lib/components/templates/ButtonTemplates/AddButton.d.ts.map +1 -1
  25. package/lib/components/templates/ButtonTemplates/AddButton.js +1 -1
  26. package/lib/components/templates/FieldHelpTemplate.d.ts.map +1 -1
  27. package/lib/components/templates/FieldHelpTemplate.js +3 -6
  28. package/lib/components/templates/FieldTemplate/FieldTemplate.d.ts.map +1 -1
  29. package/lib/components/templates/FieldTemplate/FieldTemplate.js +2 -1
  30. package/lib/components/templates/WrapIfAdditionalTemplate.d.ts.map +1 -1
  31. package/lib/components/templates/WrapIfAdditionalTemplate.js +4 -2
  32. package/lib/components/widgets/CheckboxWidget.d.ts.map +1 -1
  33. package/lib/components/widgets/CheckboxWidget.js +4 -2
  34. package/lib/index.d.ts +3 -2
  35. package/lib/index.d.ts.map +1 -1
  36. package/lib/index.js +2 -1
  37. package/lib/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +2 -2
  39. package/src/components/Form.tsx +6 -4
  40. package/src/components/RichHelp.tsx +46 -0
  41. package/src/components/constants.ts +5 -0
  42. package/src/components/fields/ArrayField.tsx +52 -29
  43. package/src/components/fields/FallbackField.tsx +18 -10
  44. package/src/components/fields/ObjectField.tsx +7 -12
  45. package/src/components/fields/StringField.tsx +3 -2
  46. package/src/components/templates/ArrayFieldItemTemplate.tsx +8 -11
  47. package/src/components/templates/ButtonTemplates/AddButton.tsx +3 -1
  48. package/src/components/templates/FieldHelpTemplate.tsx +5 -11
  49. package/src/components/templates/FieldTemplate/FieldTemplate.tsx +2 -1
  50. package/src/components/templates/WrapIfAdditionalTemplate.tsx +7 -3
  51. package/src/components/widgets/CheckboxWidget.tsx +4 -1
  52. package/src/index.ts +3 -2
package/dist/index.esm.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  ErrorSchemaBuilder,
7
7
  getChangedFields,
8
8
  getTemplate as getTemplate28,
9
- getUiOptions as getUiOptions19,
9
+ getUiOptions as getUiOptions21,
10
10
  isObject as isObject6,
11
11
  mergeObjects,
12
12
  NAME_KEY,
@@ -29,6 +29,7 @@ import _isEmpty from "lodash/isEmpty";
29
29
  import _pick from "lodash/pick";
30
30
  import _set from "lodash/set";
31
31
  import _toPath from "lodash/toPath";
32
+ import _unset from "lodash/unset";
32
33
 
33
34
  // src/getDefaultRegistry.ts
34
35
  import {
@@ -109,9 +110,11 @@ function computeItemUiSchema(uiSchema, item, index, formContext) {
109
110
  }
110
111
  }
111
112
  function getNewFormDataRow(registry, schema) {
112
- const { schemaUtils } = registry;
113
+ const { schemaUtils, globalFormOptions } = registry;
113
114
  let itemSchema = schema.items;
114
- if (isFixedItems(schema) && allowAdditionalItems(schema)) {
115
+ if (globalFormOptions.useFallbackUiForUnsupportedType && !itemSchema) {
116
+ itemSchema = {};
117
+ } else if (isFixedItems(schema) && allowAdditionalItems(schema)) {
115
118
  itemSchema = schema.additionalItems;
116
119
  }
117
120
  return schemaUtils.getDefaultFormState(itemSchema);
@@ -301,7 +304,9 @@ function ArrayFieldItem(props) {
301
304
  handleReorderItems
302
305
  } = props;
303
306
  const {
304
- fields: { ArraySchemaField, SchemaField: SchemaField2 }
307
+ schemaUtils,
308
+ fields: { ArraySchemaField, SchemaField: SchemaField2 },
309
+ globalUiOptions
305
310
  } = registry;
306
311
  const fieldPathId = useDeepCompareMemo(itemFieldPathId);
307
312
  const ItemSchemaField = ArraySchemaField || SchemaField2;
@@ -310,6 +315,9 @@ function ArrayFieldItem(props) {
310
315
  registry,
311
316
  uiOptions
312
317
  );
318
+ const displayLabel = schemaUtils.getDisplayLabel(itemSchema, itemUiSchema, globalUiOptions);
319
+ const { description } = getUiOptions(itemUiSchema);
320
+ const hasDescription = !!description || !!itemSchema.description;
313
321
  const { orderable = true, removable = true, copyable = false } = uiOptions;
314
322
  const has4 = {
315
323
  moveUp: orderable && canMoveUp,
@@ -403,7 +411,9 @@ function ArrayFieldItem(props) {
403
411
  registry,
404
412
  schema: itemSchema,
405
413
  uiSchema: itemUiSchema,
406
- parentUiSchema
414
+ parentUiSchema,
415
+ displayLabel,
416
+ hasDescription
407
417
  };
408
418
  return /* @__PURE__ */ jsx(ArrayFieldItemTemplate2, { ...templateProps });
409
419
  }
@@ -646,7 +656,7 @@ function useKeyedFormData(formData = []) {
646
656
  }
647
657
  function ArrayField(props) {
648
658
  const { schema, uiSchema, errorSchema, fieldPathId, registry, formData, onChange } = props;
649
- const { schemaUtils, translateString } = registry;
659
+ const { globalFormOptions, schemaUtils, translateString } = registry;
650
660
  const { keyedFormData, updateKeyedFormData } = useKeyedFormData(formData);
651
661
  const childFieldPathId = props.childFieldPathId ?? fieldPathId;
652
662
  const handleAddItem = useCallback(
@@ -783,24 +793,14 @@ function ArrayField(props) {
783
793
  },
784
794
  [onChange, childFieldPathId]
785
795
  );
786
- if (!(ITEMS_KEY in schema)) {
787
- const uiOptions = getUiOptions(uiSchema);
788
- const UnsupportedFieldTemplate = getTemplate(
789
- "UnsupportedFieldTemplate",
790
- registry,
791
- uiOptions
792
- );
793
- return /* @__PURE__ */ jsx(
794
- UnsupportedFieldTemplate,
795
- {
796
- schema,
797
- fieldPathId,
798
- reason: translateString(TranslatableString.MissingItems),
799
- registry
800
- }
801
- );
802
- }
796
+ const arrayAsMultiProps = {
797
+ ...props,
798
+ formData,
799
+ fieldPathId: childFieldPathId,
800
+ onSelectChange
801
+ };
803
802
  const arrayProps = {
803
+ ...props,
804
804
  handleAddItem,
805
805
  handleCopyItem,
806
806
  handleRemoveItem,
@@ -808,19 +808,41 @@ function ArrayField(props) {
808
808
  keyedFormData,
809
809
  onChange: handleChange
810
810
  };
811
- if (schemaUtils.isMultiSelect(schema)) {
812
- return /* @__PURE__ */ jsx(ArrayAsMultiSelect, { ...props, fieldPathId: childFieldPathId, onSelectChange });
811
+ if (!(ITEMS_KEY in schema)) {
812
+ if (!globalFormOptions.useFallbackUiForUnsupportedType) {
813
+ const uiOptions = getUiOptions(uiSchema);
814
+ const UnsupportedFieldTemplate = getTemplate(
815
+ "UnsupportedFieldTemplate",
816
+ registry,
817
+ uiOptions
818
+ );
819
+ return /* @__PURE__ */ jsx(
820
+ UnsupportedFieldTemplate,
821
+ {
822
+ schema,
823
+ fieldPathId,
824
+ reason: translateString(TranslatableString.MissingItems),
825
+ registry
826
+ }
827
+ );
828
+ }
829
+ const fallbackSchema = { ...schema, [ITEMS_KEY]: { type: void 0 } };
830
+ arrayAsMultiProps.schema = fallbackSchema;
831
+ arrayProps.schema = fallbackSchema;
832
+ }
833
+ if (schemaUtils.isMultiSelect(arrayAsMultiProps.schema)) {
834
+ return /* @__PURE__ */ jsx(ArrayAsMultiSelect, { ...arrayAsMultiProps });
813
835
  }
814
836
  if (isCustomWidget(uiSchema)) {
815
- return /* @__PURE__ */ jsx(ArrayAsCustomWidget, { ...props, fieldPathId: childFieldPathId, onSelectChange });
837
+ return /* @__PURE__ */ jsx(ArrayAsCustomWidget, { ...arrayAsMultiProps });
816
838
  }
817
- if (isFixedItems(schema)) {
818
- return /* @__PURE__ */ jsx(FixedArray, { ...props, ...arrayProps });
839
+ if (isFixedItems(arrayAsMultiProps.schema)) {
840
+ return /* @__PURE__ */ jsx(FixedArray, { ...arrayProps });
819
841
  }
820
- if (schemaUtils.isFilesArray(schema, uiSchema)) {
821
- return /* @__PURE__ */ jsx(ArrayAsFiles, { ...props, fieldPathId: childFieldPathId, onSelectChange });
842
+ if (schemaUtils.isFilesArray(arrayAsMultiProps.schema, uiSchema)) {
843
+ return /* @__PURE__ */ jsx(ArrayAsFiles, { ...arrayAsMultiProps });
822
844
  }
823
- return /* @__PURE__ */ jsx(NormalArray, { ...props, ...arrayProps });
845
+ return /* @__PURE__ */ jsx(NormalArray, { ...arrayProps });
824
846
  }
825
847
 
826
848
  // src/components/fields/BooleanField.tsx
@@ -947,7 +969,7 @@ import { jsx as jsx3 } from "react/jsx-runtime";
947
969
  function getFallbackTypeSelectionSchema(title) {
948
970
  return {
949
971
  type: "string",
950
- enum: ["string", "number", "boolean"],
972
+ enum: ["string", "number", "boolean", "object", "array"],
951
973
  default: "string",
952
974
  title
953
975
  };
@@ -957,6 +979,9 @@ function getTypeOfFormData(formData) {
957
979
  if (dataType === "string" || dataType === "number" || dataType === "boolean") {
958
980
  return dataType;
959
981
  }
982
+ if (dataType === "object") {
983
+ return Array.isArray(formData) ? "array" : "object";
984
+ }
960
985
  return "string";
961
986
  }
962
987
  function castToNewType(formData, newType) {
@@ -1006,20 +1031,13 @@ function FallbackField(props) {
1006
1031
  }
1007
1032
  };
1008
1033
  if (!globalFormOptions.useFallbackUiForUnsupportedType) {
1034
+ const { reason = translateString(TranslatableString3.UnknownFieldType, [String(schema.type)]) } = props;
1009
1035
  const UnsupportedFieldTemplate = getTemplate2(
1010
1036
  "UnsupportedFieldTemplate",
1011
1037
  registry,
1012
1038
  uiOptions
1013
1039
  );
1014
- return /* @__PURE__ */ jsx3(
1015
- UnsupportedFieldTemplate,
1016
- {
1017
- schema,
1018
- fieldPathId,
1019
- reason: translateString(TranslatableString3.UnknownFieldType, [String(schema.type)]),
1020
- registry
1021
- }
1022
- );
1040
+ return /* @__PURE__ */ jsx3(UnsupportedFieldTemplate, { schema, fieldPathId, reason, registry });
1023
1041
  }
1024
1042
  const FallbackFieldTemplate2 = getTemplate2(
1025
1043
  "FallbackFieldTemplate",
@@ -1050,7 +1068,17 @@ function FallbackField(props) {
1050
1068
  },
1051
1069
  formData ? hashObject2(formData) : "__empty__"
1052
1070
  ),
1053
- schemaField: /* @__PURE__ */ jsx3(SchemaField2, { ...props, schema: { type, title: translateString(TranslatableString3.Value) } })
1071
+ schemaField: /* @__PURE__ */ jsx3(
1072
+ SchemaField2,
1073
+ {
1074
+ ...props,
1075
+ schema: {
1076
+ type,
1077
+ title: translateString(TranslatableString3.Value),
1078
+ ...type === "object" && { additionalProperties: true }
1079
+ }
1080
+ }
1081
+ )
1054
1082
  }
1055
1083
  );
1056
1084
  }
@@ -1890,7 +1918,6 @@ import {
1890
1918
  ANY_OF_KEY as ANY_OF_KEY4,
1891
1919
  getTemplate as getTemplate7,
1892
1920
  getUiOptions as getUiOptions8,
1893
- hashObject as hashObject5,
1894
1921
  isFormDataAvailable as isFormDataAvailable3,
1895
1922
  orderProperties,
1896
1923
  shouldRenderOptionalField as shouldRenderOptionalField3,
@@ -1906,7 +1933,12 @@ import get4 from "lodash/get";
1906
1933
  import has3 from "lodash/has";
1907
1934
  import isObject4 from "lodash/isObject";
1908
1935
  import set4 from "lodash/set";
1909
- import unset from "lodash/unset";
1936
+
1937
+ // src/components/constants.ts
1938
+ var ADDITIONAL_PROPERTY_KEY_REMOVE = Symbol("remove-this-key");
1939
+ var IS_RESET = Symbol("reset");
1940
+
1941
+ // src/components/fields/ObjectField.tsx
1910
1942
  import { jsx as jsx9, jsxs } from "react/jsx-runtime";
1911
1943
  function isRequired(schema, name) {
1912
1944
  return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1;
@@ -2031,7 +2063,6 @@ function ObjectField(props) {
2031
2063
  const schema = schemaUtils.retrieveSchema(rawSchema, formData, true);
2032
2064
  const uiOptions = getUiOptions8(uiSchema, globalUiOptions);
2033
2065
  const { properties: schemaProperties = {} } = schema;
2034
- const formDataHash = hashObject5(formData || {});
2035
2066
  const childFieldPathId = props.childFieldPathId ?? fieldPathId;
2036
2067
  const templateTitle = uiOptions.title ?? schema.title ?? title ?? name;
2037
2068
  const description = uiOptions.description ?? schema.description;
@@ -2104,11 +2135,9 @@ function ObjectField(props) {
2104
2135
  );
2105
2136
  const handleRemoveProperty = useCallback4(
2106
2137
  (key) => {
2107
- const copiedFormData = { ...formData };
2108
- unset(copiedFormData, key);
2109
- onChange(copiedFormData, childFieldPathId.path);
2138
+ onChange(ADDITIONAL_PROPERTY_KEY_REMOVE, [...childFieldPathId.path, key]);
2110
2139
  },
2111
- [onChange, childFieldPathId, formData]
2140
+ [onChange, childFieldPathId]
2112
2141
  );
2113
2142
  if (!renderOptionalField || hasFormData) {
2114
2143
  try {
@@ -2152,7 +2181,7 @@ function ObjectField(props) {
2152
2181
  readonly,
2153
2182
  hideError
2154
2183
  },
2155
- addedByAdditionalProperties ? `${name2}-${formDataHash}` : name2
2184
+ name2
2156
2185
  );
2157
2186
  return {
2158
2187
  content,
@@ -2526,9 +2555,10 @@ function StringField(props) {
2526
2555
  onFocus,
2527
2556
  registry,
2528
2557
  rawErrors,
2529
- hideError
2558
+ hideError,
2559
+ title
2530
2560
  } = props;
2531
- const { title, format } = schema;
2561
+ const { title: schemaTitle, format } = schema;
2532
2562
  const { widgets: widgets2, schemaUtils, globalUiOptions } = registry;
2533
2563
  const enumOptions = schemaUtils.isSelect(schema) ? optionsList4(schema, uiSchema) : void 0;
2534
2564
  let defaultWidget = enumOptions ? "select" : "text";
@@ -2537,7 +2567,7 @@ function StringField(props) {
2537
2567
  }
2538
2568
  const { widget = defaultWidget, placeholder = "", title: uiTitle, ...options } = getUiOptions11(uiSchema);
2539
2569
  const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);
2540
- const label = uiTitle ?? title ?? name;
2570
+ const label = uiTitle ?? title ?? schemaTitle ?? name;
2541
2571
  const Widget = getWidget5(schema, widget, widgets2);
2542
2572
  const onWidgetChange = useCallback6(
2543
2573
  (value, errorSchema, id) => {
@@ -2646,7 +2676,7 @@ import {
2646
2676
  } from "@rjsf/utils";
2647
2677
  import { jsx as jsx14, jsxs as jsxs3 } from "react/jsx-runtime";
2648
2678
  function ArrayFieldItemTemplate(props) {
2649
- const { children, className, buttonsProps, hasToolbar, registry, uiSchema } = props;
2679
+ const { children, className, buttonsProps, displayLabel, hasDescription, hasToolbar, registry, uiSchema } = props;
2650
2680
  const uiOptions = getUiOptions13(uiSchema);
2651
2681
  const ArrayFieldItemButtonsTemplate2 = getTemplate11(
2652
2682
  "ArrayFieldItemButtonsTemplate",
@@ -2659,19 +2689,12 @@ function ArrayFieldItemTemplate(props) {
2659
2689
  paddingRight: 6,
2660
2690
  fontWeight: "bold"
2661
2691
  };
2662
- return /* @__PURE__ */ jsxs3("div", { className, children: [
2663
- /* @__PURE__ */ jsx14("div", { className: hasToolbar ? "col-xs-9" : "col-xs-12", children }),
2664
- hasToolbar && /* @__PURE__ */ jsx14("div", { className: "col-xs-3 array-item-toolbox", children: /* @__PURE__ */ jsx14(
2665
- "div",
2666
- {
2667
- className: "btn-group",
2668
- style: {
2669
- display: "flex",
2670
- justifyContent: "space-around"
2671
- },
2672
- children: /* @__PURE__ */ jsx14(ArrayFieldItemButtonsTemplate2, { ...buttonsProps, style: btnStyle })
2673
- }
2674
- ) })
2692
+ const margin = hasDescription ? 31 : 9;
2693
+ const containerStyle = { display: "flex", alignItems: displayLabel ? "center" : "baseline" };
2694
+ const toolbarStyle = { display: "flex", justifyContent: "flex-end", marginTop: displayLabel ? `${margin}px` : 0 };
2695
+ return /* @__PURE__ */ jsxs3("div", { className, style: containerStyle, children: [
2696
+ /* @__PURE__ */ jsx14("div", { className: hasToolbar ? "col-xs-9 col-md-10 col-xl-11" : "col-xs-12", children }),
2697
+ hasToolbar && /* @__PURE__ */ jsx14("div", { className: "col-xs-3 col-md-2 col-xl-1 array-item-toolbox", children: /* @__PURE__ */ jsx14("div", { className: "btn-group", style: toolbarStyle, children: /* @__PURE__ */ jsx14(ArrayFieldItemButtonsTemplate2, { ...buttonsProps, style: btnStyle }) }) })
2675
2698
  ] });
2676
2699
  }
2677
2700
 
@@ -2996,19 +3019,25 @@ function AddButton({
2996
3019
  registry
2997
3020
  }) {
2998
3021
  const { translateString } = registry;
2999
- return /* @__PURE__ */ jsx21("div", { className: "row", children: /* @__PURE__ */ jsx21("p", { className: `col-xs-3 col-xs-offset-9 text-right ${className}`, children: /* @__PURE__ */ jsx21(
3000
- IconButton,
3022
+ return /* @__PURE__ */ jsx21("div", { className: "row", children: /* @__PURE__ */ jsx21(
3023
+ "p",
3001
3024
  {
3002
- id,
3003
- iconType: "info",
3004
- icon: "plus",
3005
- className: "btn-add col-xs-12",
3006
- title: translateString(TranslatableString8.AddButton),
3007
- onClick,
3008
- disabled,
3009
- registry
3025
+ className: `col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${className}`,
3026
+ children: /* @__PURE__ */ jsx21(
3027
+ IconButton,
3028
+ {
3029
+ id,
3030
+ iconType: "info",
3031
+ icon: "plus",
3032
+ className: "btn-add col-xs-12",
3033
+ title: translateString(TranslatableString8.AddButton),
3034
+ onClick,
3035
+ disabled,
3036
+ registry
3037
+ }
3038
+ )
3010
3039
  }
3011
- ) }) });
3040
+ ) });
3012
3041
  }
3013
3042
 
3014
3043
  // src/components/templates/ButtonTemplates/index.ts
@@ -3123,8 +3152,9 @@ function FieldTemplate(props) {
3123
3152
  if (hidden) {
3124
3153
  return /* @__PURE__ */ jsx27("div", { className: "hidden", children });
3125
3154
  }
3155
+ const isCheckbox = uiOptions.widget === "checkbox";
3126
3156
  return /* @__PURE__ */ jsxs9(WrapIfAdditionalTemplate2, { ...props, children: [
3127
- displayLabel && /* @__PURE__ */ jsx27(Label, { label, required, id }),
3157
+ displayLabel && !isCheckbox && /* @__PURE__ */ jsx27(Label, { label, required, id }),
3128
3158
  displayLabel && description ? description : null,
3129
3159
  children,
3130
3160
  errors,
@@ -3151,32 +3181,52 @@ function FieldErrorTemplate(props) {
3151
3181
 
3152
3182
  // src/components/templates/FieldHelpTemplate.tsx
3153
3183
  import { helpId } from "@rjsf/utils";
3184
+
3185
+ // src/components/RichHelp.tsx
3186
+ import {
3187
+ getTestIds as getTestIds3,
3188
+ getUiOptions as getUiOptions18
3189
+ } from "@rjsf/utils";
3190
+ import Markdown3 from "markdown-to-jsx";
3154
3191
  import { jsx as jsx29 } from "react/jsx-runtime";
3192
+ var TEST_IDS2 = getTestIds3();
3193
+ function RichHelp({
3194
+ help,
3195
+ registry,
3196
+ uiSchema = {}
3197
+ }) {
3198
+ const { globalUiOptions } = registry;
3199
+ const uiOptions = getUiOptions18(uiSchema, globalUiOptions);
3200
+ if (uiOptions.enableMarkdownInHelp && typeof help === "string") {
3201
+ return /* @__PURE__ */ jsx29(Markdown3, { options: { disableParsingRawHTML: true }, "data-testid": TEST_IDS2.markdown, children: help });
3202
+ }
3203
+ return help;
3204
+ }
3205
+ RichHelp.TEST_IDS = TEST_IDS2;
3206
+
3207
+ // src/components/templates/FieldHelpTemplate.tsx
3208
+ import { jsx as jsx30 } from "react/jsx-runtime";
3155
3209
  function FieldHelpTemplate(props) {
3156
- const { fieldPathId, help } = props;
3210
+ const { fieldPathId, help, uiSchema, registry } = props;
3157
3211
  if (!help) {
3158
3212
  return null;
3159
3213
  }
3160
- const id = helpId(fieldPathId);
3161
- if (typeof help === "string") {
3162
- return /* @__PURE__ */ jsx29("p", { id, className: "help-block", children: help });
3163
- }
3164
- return /* @__PURE__ */ jsx29("div", { id, className: "help-block", children: help });
3214
+ return /* @__PURE__ */ jsx30("div", { id: helpId(fieldPathId), className: "help-block", children: /* @__PURE__ */ jsx30(RichHelp, { help, registry, uiSchema }) });
3165
3215
  }
3166
3216
 
3167
3217
  // src/components/templates/GridTemplate.tsx
3168
- import { jsx as jsx30 } from "react/jsx-runtime";
3218
+ import { jsx as jsx31 } from "react/jsx-runtime";
3169
3219
  function GridTemplate(props) {
3170
3220
  const { children, column, className, ...rest } = props;
3171
- return /* @__PURE__ */ jsx30("div", { className, ...rest, children });
3221
+ return /* @__PURE__ */ jsx31("div", { className, ...rest, children });
3172
3222
  }
3173
3223
 
3174
3224
  // src/components/templates/MultiSchemaFieldTemplate.tsx
3175
- import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
3225
+ import { jsx as jsx32, jsxs as jsxs10 } from "react/jsx-runtime";
3176
3226
  function MultiSchemaFieldTemplate(props) {
3177
3227
  const { selector, optionSchemaField } = props;
3178
3228
  return /* @__PURE__ */ jsxs10("div", { className: "panel panel-default panel-body", children: [
3179
- /* @__PURE__ */ jsx31("div", { className: "form-group", children: selector }),
3229
+ /* @__PURE__ */ jsx32("div", { className: "form-group", children: selector }),
3180
3230
  optionSchemaField
3181
3231
  ] });
3182
3232
  }
@@ -3186,11 +3236,11 @@ import {
3186
3236
  canExpand,
3187
3237
  descriptionId as descriptionId3,
3188
3238
  getTemplate as getTemplate16,
3189
- getUiOptions as getUiOptions18,
3239
+ getUiOptions as getUiOptions19,
3190
3240
  titleId as titleId3,
3191
3241
  buttonId as buttonId3
3192
3242
  } from "@rjsf/utils";
3193
- import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
3243
+ import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
3194
3244
  function ObjectFieldTemplate(props) {
3195
3245
  const {
3196
3246
  className,
@@ -3208,7 +3258,7 @@ function ObjectFieldTemplate(props) {
3208
3258
  title,
3209
3259
  uiSchema
3210
3260
  } = props;
3211
- const options = getUiOptions18(uiSchema);
3261
+ const options = getUiOptions19(uiSchema);
3212
3262
  const TitleFieldTemplate = getTemplate16("TitleFieldTemplate", registry, options);
3213
3263
  const DescriptionFieldTemplate = getTemplate16(
3214
3264
  "DescriptionFieldTemplate",
@@ -3220,7 +3270,7 @@ function ObjectFieldTemplate(props) {
3220
3270
  ButtonTemplates: { AddButton: AddButton2 }
3221
3271
  } = registry.templates;
3222
3272
  return /* @__PURE__ */ jsxs11("fieldset", { className, id: fieldPathId.$id, children: [
3223
- title && /* @__PURE__ */ jsx32(
3273
+ title && /* @__PURE__ */ jsx33(
3224
3274
  TitleFieldTemplate,
3225
3275
  {
3226
3276
  id: titleId3(fieldPathId),
@@ -3232,7 +3282,7 @@ function ObjectFieldTemplate(props) {
3232
3282
  optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
3233
3283
  }
3234
3284
  ),
3235
- description && /* @__PURE__ */ jsx32(
3285
+ description && /* @__PURE__ */ jsx33(
3236
3286
  DescriptionFieldTemplate,
3237
3287
  {
3238
3288
  id: descriptionId3(fieldPathId),
@@ -3244,7 +3294,7 @@ function ObjectFieldTemplate(props) {
3244
3294
  ),
3245
3295
  !showOptionalDataControlInTitle ? optionalDataControl : void 0,
3246
3296
  properties.map((prop) => prop.content),
3247
- canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx32(
3297
+ canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx33(
3248
3298
  AddButton2,
3249
3299
  {
3250
3300
  id: buttonId3(fieldPathId, "add"),
@@ -3259,11 +3309,11 @@ function ObjectFieldTemplate(props) {
3259
3309
  }
3260
3310
 
3261
3311
  // src/components/templates/OptionalDataControlsTemplate.tsx
3262
- import { jsx as jsx33 } from "react/jsx-runtime";
3312
+ import { jsx as jsx34 } from "react/jsx-runtime";
3263
3313
  function OptionalDataControlsTemplate(props) {
3264
3314
  const { id, registry, label, onAddClick, onRemoveClick } = props;
3265
3315
  if (onAddClick) {
3266
- return /* @__PURE__ */ jsx33(
3316
+ return /* @__PURE__ */ jsx34(
3267
3317
  IconButton,
3268
3318
  {
3269
3319
  id,
@@ -3275,7 +3325,7 @@ function OptionalDataControlsTemplate(props) {
3275
3325
  }
3276
3326
  );
3277
3327
  } else if (onRemoveClick) {
3278
- return /* @__PURE__ */ jsx33(
3328
+ return /* @__PURE__ */ jsx34(
3279
3329
  IconButton,
3280
3330
  {
3281
3331
  id,
@@ -3287,25 +3337,25 @@ function OptionalDataControlsTemplate(props) {
3287
3337
  }
3288
3338
  );
3289
3339
  }
3290
- return /* @__PURE__ */ jsx33("em", { id, children: label });
3340
+ return /* @__PURE__ */ jsx34("em", { id, children: label });
3291
3341
  }
3292
3342
 
3293
3343
  // src/components/templates/TitleField.tsx
3294
- import { jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
3344
+ import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
3295
3345
  var REQUIRED_FIELD_SYMBOL2 = "*";
3296
3346
  function TitleField(props) {
3297
3347
  const { id, title, required, optionalDataControl } = props;
3298
3348
  return /* @__PURE__ */ jsxs12("legend", { id, children: [
3299
3349
  title,
3300
- required && /* @__PURE__ */ jsx34("span", { className: "required", children: REQUIRED_FIELD_SYMBOL2 }),
3301
- optionalDataControl && /* @__PURE__ */ jsx34("span", { className: "pull-right", style: { marginBottom: "2px" }, children: optionalDataControl })
3350
+ required && /* @__PURE__ */ jsx35("span", { className: "required", children: REQUIRED_FIELD_SYMBOL2 }),
3351
+ optionalDataControl && /* @__PURE__ */ jsx35("span", { className: "pull-right", style: { marginBottom: "2px" }, children: optionalDataControl })
3302
3352
  ] });
3303
3353
  }
3304
3354
 
3305
3355
  // src/components/templates/UnsupportedField.tsx
3306
3356
  import { TranslatableString as TranslatableString10 } from "@rjsf/utils";
3307
- import Markdown3 from "markdown-to-jsx";
3308
- import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
3357
+ import Markdown4 from "markdown-to-jsx";
3358
+ import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
3309
3359
  function UnsupportedField(props) {
3310
3360
  const { schema, fieldPathId, reason, registry } = props;
3311
3361
  const { translateString } = registry;
@@ -3320,8 +3370,8 @@ function UnsupportedField(props) {
3320
3370
  translateParams.push(reason);
3321
3371
  }
3322
3372
  return /* @__PURE__ */ jsxs13("div", { className: "unsupported-field", children: [
3323
- /* @__PURE__ */ jsx35("p", { children: /* @__PURE__ */ jsx35(Markdown3, { options: { disableParsingRawHTML: true }, children: translateString(translateEnum, translateParams) }) }),
3324
- schema && /* @__PURE__ */ jsx35("pre", { children: JSON.stringify(schema, null, 2) })
3373
+ /* @__PURE__ */ jsx36("p", { children: /* @__PURE__ */ jsx36(Markdown4, { options: { disableParsingRawHTML: true }, children: translateString(translateEnum, translateParams) }) }),
3374
+ schema && /* @__PURE__ */ jsx36("pre", { children: JSON.stringify(schema, null, 2) })
3325
3375
  ] });
3326
3376
  }
3327
3377
  var UnsupportedField_default = UnsupportedField;
@@ -3332,16 +3382,18 @@ import {
3332
3382
  buttonId as buttonId4,
3333
3383
  TranslatableString as TranslatableString11
3334
3384
  } from "@rjsf/utils";
3335
- import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
3385
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
3336
3386
  function WrapIfAdditionalTemplate(props) {
3337
3387
  const {
3338
3388
  id,
3339
3389
  classNames,
3340
3390
  style,
3341
3391
  disabled,
3392
+ displayLabel,
3342
3393
  label,
3343
3394
  onKeyRenameBlur,
3344
3395
  onRemoveProperty,
3396
+ rawDescription,
3345
3397
  readonly,
3346
3398
  required,
3347
3399
  schema,
@@ -3355,18 +3407,21 @@ function WrapIfAdditionalTemplate(props) {
3355
3407
  const { RemoveButton: RemoveButton2 } = templates2.ButtonTemplates;
3356
3408
  const keyLabel = translateString(TranslatableString11.KeyLabel, [label]);
3357
3409
  const additional = ADDITIONAL_PROPERTY_FLAG3 in schema;
3410
+ const hasDescription = !!rawDescription;
3358
3411
  const classNamesList = ["form-group", classNames];
3359
3412
  if (!hideError && rawErrors && rawErrors.length > 0) {
3360
3413
  classNamesList.push("has-error has-danger");
3361
3414
  }
3362
3415
  const uiClassNames = classNamesList.join(" ").trim();
3363
3416
  if (!additional) {
3364
- return /* @__PURE__ */ jsx36("div", { className: uiClassNames, style, children });
3417
+ return /* @__PURE__ */ jsx37("div", { className: uiClassNames, style, children });
3365
3418
  }
3366
- return /* @__PURE__ */ jsx36("div", { className: uiClassNames, style, children: /* @__PURE__ */ jsxs14("div", { className: "row", children: [
3367
- /* @__PURE__ */ jsx36("div", { className: "col-xs-5 form-additional", children: /* @__PURE__ */ jsxs14("div", { className: "form-group", children: [
3368
- /* @__PURE__ */ jsx36(Label, { label: keyLabel, required, id: `${id}-key` }),
3369
- /* @__PURE__ */ jsx36(
3419
+ const margin = hasDescription ? 46 : 26;
3420
+ return /* @__PURE__ */ jsx37("div", { className: uiClassNames, style, children: /* @__PURE__ */ jsxs14("div", { className: "row", children: [
3421
+ /* @__PURE__ */ jsx37("div", { className: "col-xs-5 form-additional", children: /* @__PURE__ */ jsxs14("div", { className: "form-group", children: [
3422
+ displayLabel && /* @__PURE__ */ jsx37(Label, { label: keyLabel, required, id: `${id}-key` }),
3423
+ displayLabel && rawDescription && /* @__PURE__ */ jsx37("div", { children: "\xA0" }),
3424
+ /* @__PURE__ */ jsx37(
3370
3425
  "input",
3371
3426
  {
3372
3427
  className: "form-control",
@@ -3377,8 +3432,8 @@ function WrapIfAdditionalTemplate(props) {
3377
3432
  }
3378
3433
  )
3379
3434
  ] }) }),
3380
- /* @__PURE__ */ jsx36("div", { className: "form-additional form-group col-xs-5", children }),
3381
- /* @__PURE__ */ jsx36("div", { className: "col-xs-2", children: /* @__PURE__ */ jsx36(
3435
+ /* @__PURE__ */ jsx37("div", { className: "form-additional form-group col-xs-5", children }),
3436
+ /* @__PURE__ */ jsx37("div", { className: "col-xs-2", style: { marginTop: displayLabel ? `${margin}px` : void 0 }, children: /* @__PURE__ */ jsx37(
3382
3437
  RemoveButton2,
3383
3438
  {
3384
3439
  id: buttonId4(id, "remove"),
@@ -3426,13 +3481,13 @@ import {
3426
3481
  TranslatableString as TranslatableString12,
3427
3482
  useAltDateWidgetProps
3428
3483
  } from "@rjsf/utils";
3429
- import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
3484
+ import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
3430
3485
  function AltDateWidget(props) {
3431
3486
  const { disabled = false, readonly = false, autofocus = false, options, id, name, registry, onBlur, onFocus } = props;
3432
3487
  const { translateString } = registry;
3433
3488
  const { elements, handleChange, handleClear, handleSetNow } = useAltDateWidgetProps(props);
3434
3489
  return /* @__PURE__ */ jsxs15("ul", { className: "list-inline", children: [
3435
- elements.map((elemProps, i) => /* @__PURE__ */ jsx37("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx37(
3490
+ elements.map((elemProps, i) => /* @__PURE__ */ jsx38("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx38(
3436
3491
  DateElement,
3437
3492
  {
3438
3493
  rootId: id,
@@ -3447,20 +3502,20 @@ function AltDateWidget(props) {
3447
3502
  autofocus: autofocus && i === 0
3448
3503
  }
3449
3504
  ) }, i)),
3450
- (options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ jsx37("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx37("a", { href: "#", className: "btn btn-info btn-now", onClick: handleSetNow, children: translateString(TranslatableString12.NowLabel) }) }),
3451
- (options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ jsx37("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx37("a", { href: "#", className: "btn btn-warning btn-clear", onClick: handleClear, children: translateString(TranslatableString12.ClearLabel) }) })
3505
+ (options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && /* @__PURE__ */ jsx38("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx38("a", { href: "#", className: "btn btn-info btn-now", onClick: handleSetNow, children: translateString(TranslatableString12.NowLabel) }) }),
3506
+ (options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && /* @__PURE__ */ jsx38("li", { className: "list-inline-item", children: /* @__PURE__ */ jsx38("a", { href: "#", className: "btn btn-warning btn-clear", onClick: handleClear, children: translateString(TranslatableString12.ClearLabel) }) })
3452
3507
  ] });
3453
3508
  }
3454
3509
  var AltDateWidget_default = AltDateWidget;
3455
3510
 
3456
3511
  // src/components/widgets/AltDateTimeWidget.tsx
3457
- import { jsx as jsx38 } from "react/jsx-runtime";
3512
+ import { jsx as jsx39 } from "react/jsx-runtime";
3458
3513
  function AltDateTimeWidget({
3459
3514
  time = true,
3460
3515
  ...props
3461
3516
  }) {
3462
3517
  const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
3463
- return /* @__PURE__ */ jsx38(AltDateWidget2, { time, ...props });
3518
+ return /* @__PURE__ */ jsx39(AltDateWidget2, { time, ...props });
3464
3519
  }
3465
3520
  var AltDateTimeWidget_default = AltDateTimeWidget;
3466
3521
 
@@ -3471,9 +3526,10 @@ import {
3471
3526
  descriptionId as descriptionId4,
3472
3527
  getTemplate as getTemplate17,
3473
3528
  labelValue,
3474
- schemaRequiresTrueValue
3529
+ schemaRequiresTrueValue,
3530
+ getUiOptions as getUiOptions20
3475
3531
  } from "@rjsf/utils";
3476
- import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
3532
+ import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
3477
3533
  function CheckboxWidget({
3478
3534
  schema,
3479
3535
  uiSchema,
@@ -3509,9 +3565,11 @@ function CheckboxWidget({
3509
3565
  (event) => onFocus(id, event.target.checked),
3510
3566
  [onFocus, id]
3511
3567
  );
3512
- const description = options.description ?? schema.description;
3568
+ const uiOptions = getUiOptions20(uiSchema);
3569
+ const isCheckboxWidget = uiOptions.widget === "checkbox";
3570
+ const description = isCheckboxWidget ? void 0 : options.description ?? schema.description;
3513
3571
  return /* @__PURE__ */ jsxs16("div", { className: `checkbox ${disabled || readonly ? "disabled" : ""}`, children: [
3514
- !hideLabel && description && /* @__PURE__ */ jsx39(
3572
+ !hideLabel && description && /* @__PURE__ */ jsx40(
3515
3573
  DescriptionFieldTemplate,
3516
3574
  {
3517
3575
  id: descriptionId4(id),
@@ -3522,7 +3580,7 @@ function CheckboxWidget({
3522
3580
  }
3523
3581
  ),
3524
3582
  /* @__PURE__ */ jsxs16("label", { children: [
3525
- /* @__PURE__ */ jsx39(
3583
+ /* @__PURE__ */ jsx40(
3526
3584
  "input",
3527
3585
  {
3528
3586
  type: "checkbox",
@@ -3538,7 +3596,7 @@ function CheckboxWidget({
3538
3596
  "aria-describedby": ariaDescribedByIds2(id)
3539
3597
  }
3540
3598
  ),
3541
- labelValue(/* @__PURE__ */ jsx39("span", { children: label }), hideLabel)
3599
+ labelValue(/* @__PURE__ */ jsx40("span", { children: label }), hideLabel)
3542
3600
  ] })
3543
3601
  ] });
3544
3602
  }
@@ -3554,7 +3612,7 @@ import {
3554
3612
  enumOptionsValueForIndex,
3555
3613
  optionId
3556
3614
  } from "@rjsf/utils";
3557
- import { jsx as jsx40, jsxs as jsxs17 } from "react/jsx-runtime";
3615
+ import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
3558
3616
  function CheckboxesWidget({
3559
3617
  id,
3560
3618
  disabled,
@@ -3576,7 +3634,7 @@ function CheckboxesWidget({
3576
3634
  ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue)),
3577
3635
  [onFocus, id, enumOptions, emptyValue]
3578
3636
  );
3579
- return /* @__PURE__ */ jsx40("div", { className: "checkboxes", id, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
3637
+ return /* @__PURE__ */ jsx41("div", { className: "checkboxes", id, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
3580
3638
  const checked = enumOptionsIsSelected(option.value, checkboxesValues);
3581
3639
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
3582
3640
  const disabledCls = disabled || itemDisabled || readonly ? "disabled" : "";
@@ -3588,7 +3646,7 @@ function CheckboxesWidget({
3588
3646
  }
3589
3647
  };
3590
3648
  const checkbox = /* @__PURE__ */ jsxs17("span", { children: [
3591
- /* @__PURE__ */ jsx40(
3649
+ /* @__PURE__ */ jsx41(
3592
3650
  "input",
3593
3651
  {
3594
3652
  type: "checkbox",
@@ -3604,31 +3662,31 @@ function CheckboxesWidget({
3604
3662
  "aria-describedby": ariaDescribedByIds3(id)
3605
3663
  }
3606
3664
  ),
3607
- /* @__PURE__ */ jsx40("span", { children: option.label })
3665
+ /* @__PURE__ */ jsx41("span", { children: option.label })
3608
3666
  ] });
3609
- return inline ? /* @__PURE__ */ jsx40("label", { className: `checkbox-inline ${disabledCls}`, children: checkbox }, index) : /* @__PURE__ */ jsx40("div", { className: `checkbox ${disabledCls}`, children: /* @__PURE__ */ jsx40("label", { children: checkbox }) }, index);
3667
+ return inline ? /* @__PURE__ */ jsx41("label", { className: `checkbox-inline ${disabledCls}`, children: checkbox }, index) : /* @__PURE__ */ jsx41("div", { className: `checkbox ${disabledCls}`, children: /* @__PURE__ */ jsx41("label", { children: checkbox }) }, index);
3610
3668
  }) });
3611
3669
  }
3612
3670
  var CheckboxesWidget_default = CheckboxesWidget;
3613
3671
 
3614
3672
  // src/components/widgets/ColorWidget.tsx
3615
3673
  import { getTemplate as getTemplate18 } from "@rjsf/utils";
3616
- import { jsx as jsx41 } from "react/jsx-runtime";
3674
+ import { jsx as jsx42 } from "react/jsx-runtime";
3617
3675
  function ColorWidget(props) {
3618
3676
  const { disabled, readonly, options, registry } = props;
3619
3677
  const BaseInputTemplate2 = getTemplate18("BaseInputTemplate", registry, options);
3620
- return /* @__PURE__ */ jsx41(BaseInputTemplate2, { type: "color", ...props, disabled: disabled || readonly });
3678
+ return /* @__PURE__ */ jsx42(BaseInputTemplate2, { type: "color", ...props, disabled: disabled || readonly });
3621
3679
  }
3622
3680
 
3623
3681
  // src/components/widgets/DateWidget.tsx
3624
3682
  import { useCallback as useCallback10 } from "react";
3625
3683
  import { getTemplate as getTemplate19 } from "@rjsf/utils";
3626
- import { jsx as jsx42 } from "react/jsx-runtime";
3684
+ import { jsx as jsx43 } from "react/jsx-runtime";
3627
3685
  function DateWidget(props) {
3628
3686
  const { onChange, options, registry } = props;
3629
3687
  const BaseInputTemplate2 = getTemplate19("BaseInputTemplate", registry, options);
3630
3688
  const handleChange = useCallback10((value) => onChange(value || void 0), [onChange]);
3631
- return /* @__PURE__ */ jsx42(BaseInputTemplate2, { type: "date", ...props, onChange: handleChange });
3689
+ return /* @__PURE__ */ jsx43(BaseInputTemplate2, { type: "date", ...props, onChange: handleChange });
3632
3690
  }
3633
3691
 
3634
3692
  // src/components/widgets/DateTimeWidget.tsx
@@ -3637,11 +3695,11 @@ import {
3637
3695
  localToUTC,
3638
3696
  utcToLocal
3639
3697
  } from "@rjsf/utils";
3640
- import { jsx as jsx43 } from "react/jsx-runtime";
3698
+ import { jsx as jsx44 } from "react/jsx-runtime";
3641
3699
  function DateTimeWidget(props) {
3642
3700
  const { onChange, value, options, registry } = props;
3643
3701
  const BaseInputTemplate2 = getTemplate20("BaseInputTemplate", registry, options);
3644
- return /* @__PURE__ */ jsx43(
3702
+ return /* @__PURE__ */ jsx44(
3645
3703
  BaseInputTemplate2,
3646
3704
  {
3647
3705
  type: "datetime-local",
@@ -3654,11 +3712,11 @@ function DateTimeWidget(props) {
3654
3712
 
3655
3713
  // src/components/widgets/EmailWidget.tsx
3656
3714
  import { getTemplate as getTemplate21 } from "@rjsf/utils";
3657
- import { jsx as jsx44 } from "react/jsx-runtime";
3715
+ import { jsx as jsx45 } from "react/jsx-runtime";
3658
3716
  function EmailWidget(props) {
3659
3717
  const { options, registry } = props;
3660
3718
  const BaseInputTemplate2 = getTemplate21("BaseInputTemplate", registry, options);
3661
- return /* @__PURE__ */ jsx44(BaseInputTemplate2, { type: "email", ...props });
3719
+ return /* @__PURE__ */ jsx45(BaseInputTemplate2, { type: "email", ...props });
3662
3720
  }
3663
3721
 
3664
3722
  // src/components/widgets/FileWidget.tsx
@@ -3667,8 +3725,8 @@ import {
3667
3725
  TranslatableString as TranslatableString13,
3668
3726
  useFileWidgetProps
3669
3727
  } from "@rjsf/utils";
3670
- import Markdown4 from "markdown-to-jsx";
3671
- import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs18 } from "react/jsx-runtime";
3728
+ import Markdown5 from "markdown-to-jsx";
3729
+ import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs18 } from "react/jsx-runtime";
3672
3730
  function FileInfoPreview({
3673
3731
  fileInfo,
3674
3732
  registry
@@ -3679,11 +3737,11 @@ function FileInfoPreview({
3679
3737
  return null;
3680
3738
  }
3681
3739
  if (["image/jpeg", "image/png"].includes(type)) {
3682
- return /* @__PURE__ */ jsx45("img", { src: dataURL, style: { maxWidth: "100%" }, className: "file-preview" });
3740
+ return /* @__PURE__ */ jsx46("img", { src: dataURL, style: { maxWidth: "100%" }, className: "file-preview" });
3683
3741
  }
3684
3742
  return /* @__PURE__ */ jsxs18(Fragment4, { children: [
3685
3743
  " ",
3686
- /* @__PURE__ */ jsx45("a", { download: `preview-${name}`, href: dataURL, className: "file-download", children: translateString(TranslatableString13.PreviewLabel) })
3744
+ /* @__PURE__ */ jsx46("a", { download: `preview-${name}`, href: dataURL, className: "file-download", children: translateString(TranslatableString13.PreviewLabel) })
3687
3745
  ] });
3688
3746
  }
3689
3747
  function FilesInfo({
@@ -3698,13 +3756,13 @@ function FilesInfo({
3698
3756
  }
3699
3757
  const { translateString } = registry;
3700
3758
  const { RemoveButton: RemoveButton2 } = getTemplate22("ButtonTemplates", registry, options);
3701
- return /* @__PURE__ */ jsx45("ul", { className: "file-info", children: filesInfo.map((fileInfo, key) => {
3759
+ return /* @__PURE__ */ jsx46("ul", { className: "file-info", children: filesInfo.map((fileInfo, key) => {
3702
3760
  const { name, size, type } = fileInfo;
3703
3761
  const handleRemove = () => onRemove(key);
3704
3762
  return /* @__PURE__ */ jsxs18("li", { children: [
3705
- /* @__PURE__ */ jsx45(Markdown4, { children: translateString(TranslatableString13.FilesInfo, [name, type, String(size)]) }),
3706
- preview && /* @__PURE__ */ jsx45(FileInfoPreview, { fileInfo, registry }),
3707
- /* @__PURE__ */ jsx45(RemoveButton2, { onClick: handleRemove, registry })
3763
+ /* @__PURE__ */ jsx46(Markdown5, { children: translateString(TranslatableString13.FilesInfo, [name, type, String(size)]) }),
3764
+ preview && /* @__PURE__ */ jsx46(FileInfoPreview, { fileInfo, registry }),
3765
+ /* @__PURE__ */ jsx46(RemoveButton2, { onClick: handleRemove, registry })
3708
3766
  ] }, key);
3709
3767
  }) });
3710
3768
  }
@@ -3718,7 +3776,7 @@ function FileWidget(props) {
3718
3776
  }
3719
3777
  };
3720
3778
  return /* @__PURE__ */ jsxs18("div", { children: [
3721
- /* @__PURE__ */ jsx45(
3779
+ /* @__PURE__ */ jsx46(
3722
3780
  BaseInputTemplate2,
3723
3781
  {
3724
3782
  ...props,
@@ -3730,7 +3788,7 @@ function FileWidget(props) {
3730
3788
  accept: options.accept ? String(options.accept) : void 0
3731
3789
  }
3732
3790
  ),
3733
- /* @__PURE__ */ jsx45(
3791
+ /* @__PURE__ */ jsx46(
3734
3792
  FilesInfo,
3735
3793
  {
3736
3794
  filesInfo,
@@ -3745,23 +3803,23 @@ function FileWidget(props) {
3745
3803
  var FileWidget_default = FileWidget;
3746
3804
 
3747
3805
  // src/components/widgets/HiddenWidget.tsx
3748
- import { jsx as jsx46 } from "react/jsx-runtime";
3806
+ import { jsx as jsx47 } from "react/jsx-runtime";
3749
3807
  function HiddenWidget({
3750
3808
  id,
3751
3809
  value,
3752
3810
  htmlName
3753
3811
  }) {
3754
- return /* @__PURE__ */ jsx46("input", { type: "hidden", id, name: htmlName || id, value: typeof value === "undefined" ? "" : value });
3812
+ return /* @__PURE__ */ jsx47("input", { type: "hidden", id, name: htmlName || id, value: typeof value === "undefined" ? "" : value });
3755
3813
  }
3756
3814
  var HiddenWidget_default = HiddenWidget;
3757
3815
 
3758
3816
  // src/components/widgets/PasswordWidget.tsx
3759
3817
  import { getTemplate as getTemplate23 } from "@rjsf/utils";
3760
- import { jsx as jsx47 } from "react/jsx-runtime";
3818
+ import { jsx as jsx48 } from "react/jsx-runtime";
3761
3819
  function PasswordWidget(props) {
3762
3820
  const { options, registry } = props;
3763
3821
  const BaseInputTemplate2 = getTemplate23("BaseInputTemplate", registry, options);
3764
- return /* @__PURE__ */ jsx47(BaseInputTemplate2, { type: "password", ...props });
3822
+ return /* @__PURE__ */ jsx48(BaseInputTemplate2, { type: "password", ...props });
3765
3823
  }
3766
3824
 
3767
3825
  // src/components/widgets/RadioWidget.tsx
@@ -3772,7 +3830,7 @@ import {
3772
3830
  enumOptionsValueForIndex as enumOptionsValueForIndex2,
3773
3831
  optionId as optionId2
3774
3832
  } from "@rjsf/utils";
3775
- import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
3833
+ import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
3776
3834
  function RadioWidget({
3777
3835
  options,
3778
3836
  value,
@@ -3795,13 +3853,13 @@ function RadioWidget({
3795
3853
  ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue)),
3796
3854
  [onFocus, enumOptions, emptyValue, id]
3797
3855
  );
3798
- return /* @__PURE__ */ jsx48("div", { className: "field-radio-group", id, role: "radiogroup", children: Array.isArray(enumOptions) && enumOptions.map((option, i) => {
3856
+ return /* @__PURE__ */ jsx49("div", { className: "field-radio-group", id, role: "radiogroup", children: Array.isArray(enumOptions) && enumOptions.map((option, i) => {
3799
3857
  const checked = enumOptionsIsSelected2(option.value, value);
3800
3858
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
3801
3859
  const disabledCls = disabled || itemDisabled || readonly ? "disabled" : "";
3802
3860
  const handleChange = () => onChange(option.value);
3803
3861
  const radio = /* @__PURE__ */ jsxs19("span", { children: [
3804
- /* @__PURE__ */ jsx48(
3862
+ /* @__PURE__ */ jsx49(
3805
3863
  "input",
3806
3864
  {
3807
3865
  type: "radio",
@@ -3818,15 +3876,15 @@ function RadioWidget({
3818
3876
  "aria-describedby": ariaDescribedByIds4(id)
3819
3877
  }
3820
3878
  ),
3821
- /* @__PURE__ */ jsx48("span", { children: option.label })
3879
+ /* @__PURE__ */ jsx49("span", { children: option.label })
3822
3880
  ] });
3823
- return inline ? /* @__PURE__ */ jsx48("label", { className: `radio-inline ${disabledCls}`, children: radio }, i) : /* @__PURE__ */ jsx48("div", { className: `radio ${disabledCls}`, children: /* @__PURE__ */ jsx48("label", { children: radio }) }, i);
3881
+ return inline ? /* @__PURE__ */ jsx49("label", { className: `radio-inline ${disabledCls}`, children: radio }, i) : /* @__PURE__ */ jsx49("div", { className: `radio ${disabledCls}`, children: /* @__PURE__ */ jsx49("label", { children: radio }) }, i);
3824
3882
  }) });
3825
3883
  }
3826
3884
  var RadioWidget_default = RadioWidget;
3827
3885
 
3828
3886
  // src/components/widgets/RangeWidget.tsx
3829
- import { jsx as jsx49, jsxs as jsxs20 } from "react/jsx-runtime";
3887
+ import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
3830
3888
  function RangeWidget(props) {
3831
3889
  const {
3832
3890
  value,
@@ -3835,14 +3893,14 @@ function RangeWidget(props) {
3835
3893
  }
3836
3894
  } = props;
3837
3895
  return /* @__PURE__ */ jsxs20("div", { className: "field-range-wrapper", children: [
3838
- /* @__PURE__ */ jsx49(BaseInputTemplate2, { type: "range", ...props }),
3839
- /* @__PURE__ */ jsx49("span", { className: "range-view", children: value })
3896
+ /* @__PURE__ */ jsx50(BaseInputTemplate2, { type: "range", ...props }),
3897
+ /* @__PURE__ */ jsx50("span", { className: "range-view", children: value })
3840
3898
  ] });
3841
3899
  }
3842
3900
 
3843
3901
  // src/components/widgets/RatingWidget.tsx
3844
3902
  import { useCallback as useCallback12 } from "react";
3845
- import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs21 } from "react/jsx-runtime";
3903
+ import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
3846
3904
  function RatingWidget({
3847
3905
  id,
3848
3906
  value,
@@ -3892,7 +3950,7 @@ function RatingWidget({
3892
3950
  }
3893
3951
  return isFilled ? "\u2605" : "\u2606";
3894
3952
  };
3895
- return /* @__PURE__ */ jsx50(Fragment5, { children: /* @__PURE__ */ jsxs21(
3953
+ return /* @__PURE__ */ jsx51(Fragment5, { children: /* @__PURE__ */ jsxs21(
3896
3954
  "div",
3897
3955
  {
3898
3956
  className: "rating-widget",
@@ -3905,7 +3963,7 @@ function RatingWidget({
3905
3963
  [...Array(numStars)].map((_, index) => {
3906
3964
  const starValue = min + index;
3907
3965
  const isFilled = starValue <= value;
3908
- return /* @__PURE__ */ jsx50(
3966
+ return /* @__PURE__ */ jsx51(
3909
3967
  "span",
3910
3968
  {
3911
3969
  onClick: () => handleStarClick(starValue),
@@ -3927,7 +3985,7 @@ function RatingWidget({
3927
3985
  index
3928
3986
  );
3929
3987
  }),
3930
- /* @__PURE__ */ jsx50(
3988
+ /* @__PURE__ */ jsx51(
3931
3989
  "input",
3932
3990
  {
3933
3991
  type: "hidden",
@@ -3951,7 +4009,7 @@ import {
3951
4009
  enumOptionsIndexForValue,
3952
4010
  enumOptionsValueForIndex as enumOptionsValueForIndex3
3953
4011
  } from "@rjsf/utils";
3954
- import { jsx as jsx51, jsxs as jsxs22 } from "react/jsx-runtime";
4012
+ import { jsx as jsx52, jsxs as jsxs22 } from "react/jsx-runtime";
3955
4013
  function getValue(event, multiple) {
3956
4014
  if (multiple) {
3957
4015
  return Array.from(event.target.options).slice().filter((o) => o.selected).map((o) => o.value);
@@ -4016,10 +4074,10 @@ function SelectWidget({
4016
4074
  onChange: handleChange,
4017
4075
  "aria-describedby": ariaDescribedByIds5(id),
4018
4076
  children: [
4019
- showPlaceholderOption && /* @__PURE__ */ jsx51("option", { value: "", children: placeholder }),
4077
+ showPlaceholderOption && /* @__PURE__ */ jsx52("option", { value: "", children: placeholder }),
4020
4078
  Array.isArray(enumOptions) && enumOptions.map(({ value: value2, label }, i) => {
4021
4079
  const disabled2 = enumDisabled && enumDisabled.indexOf(value2) !== -1;
4022
- return /* @__PURE__ */ jsx51("option", { value: String(i), disabled: disabled2, children: label }, i);
4080
+ return /* @__PURE__ */ jsx52("option", { value: String(i), disabled: disabled2, children: label }, i);
4023
4081
  })
4024
4082
  ]
4025
4083
  }
@@ -4030,7 +4088,7 @@ var SelectWidget_default = SelectWidget;
4030
4088
  // src/components/widgets/TextareaWidget.tsx
4031
4089
  import { useCallback as useCallback14 } from "react";
4032
4090
  import { ariaDescribedByIds as ariaDescribedByIds6 } from "@rjsf/utils";
4033
- import { jsx as jsx52 } from "react/jsx-runtime";
4091
+ import { jsx as jsx53 } from "react/jsx-runtime";
4034
4092
  function TextareaWidget({
4035
4093
  id,
4036
4094
  options = {},
@@ -4057,7 +4115,7 @@ function TextareaWidget({
4057
4115
  ({ target }) => onFocus(id, target && target.value),
4058
4116
  [id, onFocus]
4059
4117
  );
4060
- return /* @__PURE__ */ jsx52(
4118
+ return /* @__PURE__ */ jsx53(
4061
4119
  "textarea",
4062
4120
  {
4063
4121
  id,
@@ -4085,40 +4143,40 @@ var TextareaWidget_default = TextareaWidget;
4085
4143
 
4086
4144
  // src/components/widgets/TextWidget.tsx
4087
4145
  import { getTemplate as getTemplate24 } from "@rjsf/utils";
4088
- import { jsx as jsx53 } from "react/jsx-runtime";
4146
+ import { jsx as jsx54 } from "react/jsx-runtime";
4089
4147
  function TextWidget(props) {
4090
4148
  const { options, registry } = props;
4091
4149
  const BaseInputTemplate2 = getTemplate24("BaseInputTemplate", registry, options);
4092
- return /* @__PURE__ */ jsx53(BaseInputTemplate2, { ...props });
4150
+ return /* @__PURE__ */ jsx54(BaseInputTemplate2, { ...props });
4093
4151
  }
4094
4152
 
4095
4153
  // src/components/widgets/TimeWidget.tsx
4096
4154
  import { useCallback as useCallback15 } from "react";
4097
4155
  import { getTemplate as getTemplate25 } from "@rjsf/utils";
4098
- import { jsx as jsx54 } from "react/jsx-runtime";
4156
+ import { jsx as jsx55 } from "react/jsx-runtime";
4099
4157
  function TimeWidget(props) {
4100
4158
  const { onChange, options, registry } = props;
4101
4159
  const BaseInputTemplate2 = getTemplate25("BaseInputTemplate", registry, options);
4102
4160
  const handleChange = useCallback15((value) => onChange(value ? `${value}:00` : void 0), [onChange]);
4103
- return /* @__PURE__ */ jsx54(BaseInputTemplate2, { type: "time", ...props, onChange: handleChange });
4161
+ return /* @__PURE__ */ jsx55(BaseInputTemplate2, { type: "time", ...props, onChange: handleChange });
4104
4162
  }
4105
4163
 
4106
4164
  // src/components/widgets/URLWidget.tsx
4107
4165
  import { getTemplate as getTemplate26 } from "@rjsf/utils";
4108
- import { jsx as jsx55 } from "react/jsx-runtime";
4166
+ import { jsx as jsx56 } from "react/jsx-runtime";
4109
4167
  function URLWidget(props) {
4110
4168
  const { options, registry } = props;
4111
4169
  const BaseInputTemplate2 = getTemplate26("BaseInputTemplate", registry, options);
4112
- return /* @__PURE__ */ jsx55(BaseInputTemplate2, { type: "url", ...props });
4170
+ return /* @__PURE__ */ jsx56(BaseInputTemplate2, { type: "url", ...props });
4113
4171
  }
4114
4172
 
4115
4173
  // src/components/widgets/UpDownWidget.tsx
4116
4174
  import { getTemplate as getTemplate27 } from "@rjsf/utils";
4117
- import { jsx as jsx56 } from "react/jsx-runtime";
4175
+ import { jsx as jsx57 } from "react/jsx-runtime";
4118
4176
  function UpDownWidget(props) {
4119
4177
  const { options, registry } = props;
4120
4178
  const BaseInputTemplate2 = getTemplate27("BaseInputTemplate", registry, options);
4121
- return /* @__PURE__ */ jsx56(BaseInputTemplate2, { type: "number", ...props });
4179
+ return /* @__PURE__ */ jsx57(BaseInputTemplate2, { type: "number", ...props });
4122
4180
  }
4123
4181
 
4124
4182
  // src/components/widgets/index.ts
@@ -4166,8 +4224,7 @@ function getDefaultRegistry() {
4166
4224
  }
4167
4225
 
4168
4226
  // src/components/Form.tsx
4169
- import { jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
4170
- var IS_RESET = Symbol("reset");
4227
+ import { jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
4171
4228
  function toIChangeEvent(state, status) {
4172
4229
  return {
4173
4230
  ..._pick(state, ["schema", "uiSchema", "fieldPathId", "schemaUtils", "formData", "edit", "errors", "errorSchema"]),
@@ -4421,10 +4478,10 @@ var Form = class extends Component3 {
4421
4478
  /** Renders any errors contained in the `state` in using the `ErrorList`, if not disabled by `showErrorList`. */
4422
4479
  renderErrors(registry) {
4423
4480
  const { errors, errorSchema, schema, uiSchema } = this.state;
4424
- const options = getUiOptions19(uiSchema);
4481
+ const options = getUiOptions21(uiSchema);
4425
4482
  const ErrorListTemplate = getTemplate28("ErrorListTemplate", registry, options);
4426
4483
  if (errors && errors.length) {
4427
- return /* @__PURE__ */ jsx57(
4484
+ return /* @__PURE__ */ jsx58(
4428
4485
  ErrorListTemplate,
4429
4486
  {
4430
4487
  errors,
@@ -4599,7 +4656,9 @@ var Form = class extends Component3 {
4599
4656
  let retrievedSchema = this.state.retrievedSchema;
4600
4657
  let formData = isRootPath ? newValue : _cloneDeep(oldFormData);
4601
4658
  if (isObject6(formData) || Array.isArray(formData)) {
4602
- if (!isRootPath) {
4659
+ if (newValue === ADDITIONAL_PROPERTY_KEY_REMOVE) {
4660
+ _unset(formData, path);
4661
+ } else if (!isRootPath) {
4603
4662
  _set(formData, path, newValue);
4604
4663
  }
4605
4664
  const newState = this.getStateFromProps(this.props, formData, void 0, void 0, void 0, true);
@@ -4982,7 +5041,7 @@ var Form = class extends Component3 {
4982
5041
  const { SubmitButton: SubmitButton2 } = registry.templates.ButtonTemplates;
4983
5042
  const as = _internalFormWrapper ? tagName : void 0;
4984
5043
  const FormTag = _internalFormWrapper || tagName || "form";
4985
- let { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions = {} } = getUiOptions19(uiSchema);
5044
+ let { [SUBMIT_BTN_OPTIONS_KEY]: submitOptions = {} } = getUiOptions21(uiSchema);
4986
5045
  if (disabled) {
4987
5046
  submitOptions = { ...submitOptions, props: { ...submitOptions.props, disabled: true } };
4988
5047
  }
@@ -5005,7 +5064,7 @@ var Form = class extends Component3 {
5005
5064
  ref: this.formElement,
5006
5065
  children: [
5007
5066
  showErrorList === "top" && this.renderErrors(registry),
5008
- /* @__PURE__ */ jsx57(
5067
+ /* @__PURE__ */ jsx58(
5009
5068
  _SchemaField,
5010
5069
  {
5011
5070
  name: "",
@@ -5022,7 +5081,7 @@ var Form = class extends Component3 {
5022
5081
  readonly
5023
5082
  }
5024
5083
  ),
5025
- children ? children : /* @__PURE__ */ jsx57(SubmitButton2, { uiSchema: submitUiSchema, registry }),
5084
+ children ? children : /* @__PURE__ */ jsx58(SubmitButton2, { uiSchema: submitUiSchema, registry }),
5026
5085
  showErrorList === "bottom" && this.renderErrors(registry)
5027
5086
  ]
5028
5087
  }
@@ -5032,7 +5091,7 @@ var Form = class extends Component3 {
5032
5091
 
5033
5092
  // src/withTheme.tsx
5034
5093
  import { forwardRef } from "react";
5035
- import { jsx as jsx58 } from "react/jsx-runtime";
5094
+ import { jsx as jsx59 } from "react/jsx-runtime";
5036
5095
  function withTheme(themeProps) {
5037
5096
  return forwardRef(
5038
5097
  ({ fields: fields2, widgets: widgets2, templates: templates2, ...directProps }, ref) => {
@@ -5046,7 +5105,7 @@ function withTheme(themeProps) {
5046
5105
  ...templates2?.ButtonTemplates
5047
5106
  }
5048
5107
  };
5049
- return /* @__PURE__ */ jsx58(
5108
+ return /* @__PURE__ */ jsx59(
5050
5109
  Form,
5051
5110
  {
5052
5111
  ...themeProps,
@@ -5092,6 +5151,7 @@ function getTestRegistry(rootSchema, fields2 = {}, templates2 = {}, widgets2 = {
5092
5151
  var index_default = Form;
5093
5152
  export {
5094
5153
  RichDescription,
5154
+ RichHelp,
5095
5155
  index_default as default,
5096
5156
  getDefaultRegistry,
5097
5157
  getTestRegistry,