@rjsf/primereact 6.6.0 → 6.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/index.cjs +133 -118
  2. package/dist/index.cjs.map +3 -3
  3. package/dist/primereact.esm.js +147 -179
  4. package/dist/primereact.esm.js.map +3 -3
  5. package/dist/primereact.umd.js +130 -116
  6. package/lib/AddButton/AddButton.d.ts +1 -1
  7. package/lib/AddButton/AddButton.js.map +1 -1
  8. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +1 -1
  9. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js +1 -1
  10. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.js.map +1 -1
  11. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
  12. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +1 -1
  13. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
  14. package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.d.ts +1 -1
  15. package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.js +1 -1
  16. package/lib/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.js.map +1 -1
  17. package/lib/AutoCompleteWidget/AutoCompleteWidget.d.ts +1 -1
  18. package/lib/AutoCompleteWidget/AutoCompleteWidget.js +6 -6
  19. package/lib/AutoCompleteWidget/AutoCompleteWidget.js.map +1 -1
  20. package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +1 -1
  21. package/lib/BaseInputTemplate/BaseInputTemplate.js +6 -6
  22. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  23. package/lib/CheckboxWidget/CheckboxWidget.d.ts +1 -1
  24. package/lib/CheckboxWidget/CheckboxWidget.js +5 -5
  25. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  26. package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
  27. package/lib/CheckboxesWidget/CheckboxesWidget.js +5 -5
  28. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  29. package/lib/ColorWidget/ColorWidget.d.ts +1 -1
  30. package/lib/ColorWidget/ColorWidget.js +5 -5
  31. package/lib/ColorWidget/ColorWidget.js.map +1 -1
  32. package/lib/DescriptionField/DescriptionField.d.ts +1 -1
  33. package/lib/ErrorList/ErrorList.d.ts +1 -1
  34. package/lib/ErrorList/ErrorList.js +1 -1
  35. package/lib/ErrorList/ErrorList.js.map +1 -1
  36. package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +1 -1
  37. package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -3
  38. package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
  39. package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +1 -1
  40. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  41. package/lib/FieldTemplate/FieldTemplate.d.ts +1 -1
  42. package/lib/FieldTemplate/FieldTemplate.js +1 -1
  43. package/lib/FieldTemplate/FieldTemplate.js.map +1 -1
  44. package/lib/GridTemplate/GridTemplate.d.ts +1 -1
  45. package/lib/GridTemplate/GridTemplate.js +1 -1
  46. package/lib/GridTemplate/GridTemplate.js.map +1 -1
  47. package/lib/IconButton/IconButton.d.ts +15 -8
  48. package/lib/IconButton/IconButton.js +14 -6
  49. package/lib/IconButton/IconButton.js.map +1 -1
  50. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +1 -1
  51. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
  52. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +1 -1
  53. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
  54. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +1 -1
  55. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +1 -1
  56. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -1
  57. package/lib/PasswordWidget/PasswordWidget.d.ts +1 -1
  58. package/lib/PasswordWidget/PasswordWidget.js +5 -5
  59. package/lib/PasswordWidget/PasswordWidget.js.map +1 -1
  60. package/lib/PrimeForm/PrimeForm.d.ts +3 -3
  61. package/lib/PrimeForm/PrimeForm.js.map +1 -1
  62. package/lib/RadioWidget/RadioWidget.d.ts +1 -1
  63. package/lib/RadioWidget/RadioWidget.js +5 -5
  64. package/lib/RadioWidget/RadioWidget.js.map +1 -1
  65. package/lib/RangeWidget/RangeWidget.d.ts +1 -1
  66. package/lib/RangeWidget/RangeWidget.js +5 -5
  67. package/lib/RangeWidget/RangeWidget.js.map +1 -1
  68. package/lib/SelectWidget/SelectWidget.d.ts +1 -1
  69. package/lib/SelectWidget/SelectWidget.js +18 -18
  70. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  71. package/lib/SubmitButton/SubmitButton.d.ts +1 -1
  72. package/lib/SubmitButton/SubmitButton.js.map +1 -1
  73. package/lib/Templates/Templates.d.ts +1 -1
  74. package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
  75. package/lib/Theme/Theme.d.ts +2 -2
  76. package/lib/TitleField/TitleField.d.ts +1 -1
  77. package/lib/TitleField/TitleField.js.map +1 -1
  78. package/lib/UpDownWidget/UpDownWidget.d.ts +1 -1
  79. package/lib/UpDownWidget/UpDownWidget.js +5 -6
  80. package/lib/UpDownWidget/UpDownWidget.js.map +1 -1
  81. package/lib/Widgets/Widgets.d.ts +1 -1
  82. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +1 -1
  83. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js +1 -1
  84. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
  85. package/lib/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +8 -8
  87. package/src/AddButton/AddButton.tsx +2 -1
  88. package/src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx +2 -8
  89. package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +2 -10
  90. package/src/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.tsx +2 -8
  91. package/src/AutoCompleteWidget/AutoCompleteWidget.tsx +14 -18
  92. package/src/BaseInputTemplate/BaseInputTemplate.tsx +13 -19
  93. package/src/CheckboxWidget/CheckboxWidget.tsx +10 -18
  94. package/src/CheckboxesWidget/CheckboxesWidget.tsx +14 -13
  95. package/src/ColorWidget/ColorWidget.tsx +10 -16
  96. package/src/DescriptionField/DescriptionField.tsx +1 -1
  97. package/src/ErrorList/ErrorList.tsx +4 -3
  98. package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +4 -4
  99. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -1
  100. package/src/FieldTemplate/FieldTemplate.tsx +2 -8
  101. package/src/GridTemplate/GridTemplate.tsx +2 -2
  102. package/src/IconButton/IconButton.tsx +18 -8
  103. package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +1 -1
  104. package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +2 -12
  105. package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +3 -2
  106. package/src/PasswordWidget/PasswordWidget.tsx +10 -16
  107. package/src/PrimeForm/PrimeForm.ts +4 -3
  108. package/src/RadioWidget/RadioWidget.tsx +11 -13
  109. package/src/RangeWidget/RangeWidget.tsx +18 -18
  110. package/src/SelectWidget/SelectWidget.tsx +25 -28
  111. package/src/SubmitButton/SubmitButton.tsx +2 -1
  112. package/src/Templates/Templates.ts +1 -1
  113. package/src/TextareaWidget/TextareaWidget.tsx +2 -2
  114. package/src/Theme/Theme.ts +2 -2
  115. package/src/TitleField/TitleField.tsx +2 -1
  116. package/src/UpDownWidget/UpDownWidget.tsx +13 -18
  117. package/src/Widgets/Widgets.tsx +1 -1
  118. package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +2 -9
@@ -170,10 +170,10 @@
170
170
  const { AutoCompleteWidget: AutoCompleteWidget2 } = registry.widgets;
171
171
  const inputProps = utils.getInputProps(schema, type, options);
172
172
  const primeProps = options.prime || {};
173
- const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
174
- const _onBlur = () => onBlur && onBlur(id, value);
175
- const _onFocus = () => onFocus && onFocus(id, value);
176
- const _onClear = react.useCallback(
173
+ const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
174
+ const handleBlur = () => onBlur && onBlur(id, value);
175
+ const handleFocus = () => onFocus && onFocus(id, value);
176
+ const handleClear = react.useCallback(
177
177
  (e) => {
178
178
  e.preventDefault();
179
179
  e.stopPropagation();
@@ -199,13 +199,13 @@
199
199
  list: schema.examples ? utils.examplesId(id) : void 0,
200
200
  value: value || value === 0 ? value : "",
201
201
  invalid: rawErrors.length > 0,
202
- onChange: onChangeOverride || _onChange,
203
- onBlur: _onBlur,
204
- onFocus: _onFocus,
202
+ onChange: onChangeOverride || handleChange,
203
+ onBlur: handleBlur,
204
+ onFocus: handleFocus,
205
205
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples)
206
206
  }
207
207
  ),
208
- options.allowClearTextInputs && !readonly && !disabled && value && /* @__PURE__ */ jsxRuntime.jsx(ClearButton2, { registry, onClick: _onClear })
208
+ options.allowClearTextInputs && !readonly && !disabled && value && /* @__PURE__ */ jsxRuntime.jsx(ClearButton2, { registry, onClick: handleClear })
209
209
  ] });
210
210
  }
211
211
  function DescriptionField(props) {
@@ -225,7 +225,7 @@
225
225
  /* @__PURE__ */ jsxRuntime.jsx(timescircle.TimesCircleIcon, { style: { width: "1.5rem", height: "1.5rem" } }),
226
226
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-message-summary", children: translateString(utils.TranslatableString.ErrorsLabel) })
227
227
  ] }),
228
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "p-message-list", children: errors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.stack }, `error-${index}`)) })
228
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "p-message-list", children: errors.map((error) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.stack }, error.stack)) })
229
229
  ] });
230
230
  return /* @__PURE__ */ jsxRuntime.jsx(
231
231
  message.Message,
@@ -247,9 +247,7 @@
247
247
  function FieldErrorTemplate({ errors, fieldPathId }) {
248
248
  if (errors && errors.length > 0) {
249
249
  const id = utils.errorId(fieldPathId);
250
- const content = errors.map((error, i) => {
251
- return /* @__PURE__ */ jsxRuntime.jsx("div", { children: error }, i);
252
- });
250
+ const content = errors.map((error, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: error }, i));
253
251
  return /* @__PURE__ */ jsxRuntime.jsx(
254
252
  message.Message,
255
253
  {
@@ -356,7 +354,8 @@
356
354
  const [breakpoint, setBreakpoint] = react.useState(() => getBreakpoint(getInitialWidth()));
357
355
  react.useEffect(() => {
358
356
  if (typeof window === "undefined") {
359
- return;
357
+ return () => {
358
+ };
360
359
  }
361
360
  const handleResize = () => setBreakpoint(getBreakpoint(window.innerWidth));
362
361
  window.addEventListener("resize", handleResize);
@@ -365,40 +364,47 @@
365
364
  const span = getResponsiveSpan(props, breakpoint);
366
365
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { gridColumn: `span ${span} / span ${span}`, ...style ?? {} }, ...rest, children });
367
366
  }
368
- function IconButton(props) {
367
+ function IconButtonFn(props) {
369
368
  const { icon, iconType, uiSchema, registry, ...otherProps } = props;
370
369
  return /* @__PURE__ */ jsxRuntime.jsx(button.Button, { icon: `pi pi-${icon}`, rounded: true, text: true, severity: "secondary", ...otherProps });
371
370
  }
372
- function CopyButton(props) {
371
+ var IconButton = react.memo(IconButtonFn);
372
+ var IconButton_default = IconButton;
373
+ function CopyButtonFn(props) {
373
374
  const {
374
375
  registry: { translateString }
375
376
  } = props;
376
377
  return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.CopyButton), ...props, icon: "copy" });
377
378
  }
378
- function MoveDownButton(props) {
379
+ var CopyButton = react.memo(CopyButtonFn);
380
+ function MoveDownButtonFn(props) {
379
381
  const {
380
382
  registry: { translateString }
381
383
  } = props;
382
384
  return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveDownButton), ...props, icon: "angle-down" });
383
385
  }
384
- function MoveUpButton(props) {
386
+ var MoveDownButton = react.memo(MoveDownButtonFn);
387
+ function MoveUpButtonFn(props) {
385
388
  const {
386
389
  registry: { translateString }
387
390
  } = props;
388
391
  return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.MoveUpButton), ...props, icon: "angle-up" });
389
392
  }
390
- function RemoveButton(props) {
393
+ var MoveUpButton = react.memo(MoveUpButtonFn);
394
+ function RemoveButtonFn(props) {
391
395
  const {
392
396
  registry: { translateString }
393
397
  } = props;
394
398
  return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.RemoveButton), ...props, icon: "trash" });
395
399
  }
396
- function ClearButton(props) {
400
+ var RemoveButton = react.memo(RemoveButtonFn);
401
+ function ClearButtonFn(props) {
397
402
  const {
398
403
  registry: { translateString }
399
404
  } = props;
400
405
  return /* @__PURE__ */ jsxRuntime.jsx(IconButton, { title: translateString(utils.TranslatableString.ClearButton), ...props, icon: "times" });
401
406
  }
407
+ var ClearButton = react.memo(ClearButtonFn);
402
408
  function MultiSchemaFieldTemplate(props) {
403
409
  const { selector, optionSchemaField } = props;
404
410
  return /* @__PURE__ */ jsxRuntime.jsxs(fieldset.Fieldset, { children: [
@@ -475,7 +481,7 @@
475
481
  const { id, registry, label, onAddClick, onRemoveClick } = props;
476
482
  if (onAddClick) {
477
483
  return /* @__PURE__ */ jsxRuntime.jsx(
478
- IconButton,
484
+ IconButton_default,
479
485
  {
480
486
  id,
481
487
  registry,
@@ -486,7 +492,8 @@
486
492
  style: { height: "1.5rem", width: "1.5rem" }
487
493
  }
488
494
  );
489
- } else if (onRemoveClick) {
495
+ }
496
+ if (onRemoveClick) {
490
497
  return /* @__PURE__ */ jsxRuntime.jsx(
491
498
  RemoveButton,
492
499
  {
@@ -646,9 +653,9 @@
646
653
  } = props;
647
654
  const inputProps = utils.getInputProps(schema, type, options);
648
655
  const primeProps = options.prime || {};
649
- const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
650
- const _onBlur = () => onBlur && onBlur(id, value);
651
- const _onFocus = () => onFocus && onFocus(id, value);
656
+ const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
657
+ const handleBlur = () => onBlur && onBlur(id, value);
658
+ const handleFocus = () => onFocus && onFocus(id, value);
652
659
  const examples = schema.examples.concat(
653
660
  schema.default && !schema.examples.includes(schema.default.toString()) ? [schema.default.toString()] : []
654
661
  );
@@ -664,7 +671,7 @@
664
671
  placeholder,
665
672
  ...primeProps,
666
673
  ...inputProps,
667
- loadingIcon: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
674
+ loadingIcon: null,
668
675
  required,
669
676
  autoFocus: autofocus,
670
677
  disabled: disabled || readonly,
@@ -673,9 +680,9 @@
673
680
  value: value || value === 0 ? value : "",
674
681
  dropdown: true,
675
682
  invalid: rawErrors.length > 0,
676
- onChange: onChangeOverride || _onChange,
677
- onBlur: _onBlur,
678
- onFocus: _onFocus,
683
+ onChange: onChangeOverride || handleChange,
684
+ onBlur: handleBlur,
685
+ onFocus: handleFocus,
679
686
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples),
680
687
  pt: {
681
688
  root: {
@@ -715,7 +722,7 @@
715
722
  const { enumOptions, enumDisabled } = options;
716
723
  const primeProps = options.prime || {};
717
724
  const checkboxesValues = Array.isArray(value) ? value : [value];
718
- const _onChange = (index) => (e) => {
725
+ const handleChange = (index) => (e) => {
719
726
  if (e.checked) {
720
727
  onChange(utils.enumOptionsSelectValue(index, checkboxesValues, enumOptions));
721
728
  } else {
@@ -727,8 +734,8 @@
727
734
  registry,
728
735
  options
729
736
  );
730
- const _onBlur = () => onBlur(id, value);
731
- const _onFocus = () => onFocus(id, value);
737
+ const handleBlur = () => onBlur(id, value);
738
+ const handleFocus = () => onFocus(id, value);
732
739
  const description = options.description ?? schema.description;
733
740
  return /* @__PURE__ */ jsxRuntime.jsxs(
734
741
  "div",
@@ -748,26 +755,33 @@
748
755
  ),
749
756
  Array.isArray(enumOptions) && enumOptions.map((option, index) => {
750
757
  const checked = utils.enumOptionsIsSelected(option.value, checkboxesValues);
751
- const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
752
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "row", gap: "0.5rem", alignItems: "center" }, children: [
753
- /* @__PURE__ */ jsxRuntime.jsx(
754
- checkbox.Checkbox,
755
- {
756
- inputId: utils.optionId(id, index),
757
- name: htmlName || id,
758
- ...primeProps,
759
- value: option.value,
760
- checked,
761
- disabled: disabled || itemDisabled || readonly,
762
- autoFocus: autofocus && index === 0,
763
- onChange: _onChange(index),
764
- onBlur: _onBlur,
765
- onFocus: _onFocus,
766
- "aria-describedby": utils.ariaDescribedByIds(id)
767
- }
768
- ),
769
- /* @__PURE__ */ jsxRuntime.jsx(Label, { id: utils.optionId(id, index), text: option.label })
770
- ] }, index);
758
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
759
+ return /* @__PURE__ */ jsxRuntime.jsxs(
760
+ "div",
761
+ {
762
+ style: { display: "flex", flexDirection: "row", gap: "0.5rem", alignItems: "center" },
763
+ children: [
764
+ /* @__PURE__ */ jsxRuntime.jsx(
765
+ checkbox.Checkbox,
766
+ {
767
+ inputId: utils.optionId(id, index),
768
+ name: htmlName || id,
769
+ ...primeProps,
770
+ value: option.value,
771
+ checked,
772
+ disabled: disabled || itemDisabled || readonly,
773
+ autoFocus: autofocus && index === 0,
774
+ onChange: handleChange(index),
775
+ onBlur: handleBlur,
776
+ onFocus: handleFocus,
777
+ "aria-describedby": utils.ariaDescribedByIds(id)
778
+ }
779
+ ),
780
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { id: utils.optionId(id, index), text: option.label })
781
+ ]
782
+ },
783
+ String(option.value)
784
+ );
771
785
  })
772
786
  ]
773
787
  }
@@ -798,9 +812,9 @@
798
812
  );
799
813
  const required = utils.schemaRequiresTrueValue(schema);
800
814
  const checked = value === "true" || value === true;
801
- const _onChange = (e) => onChange && onChange(e.checked);
802
- const _onBlur = () => onBlur && onBlur(id, value);
803
- const _onFocus = () => onFocus && onFocus(id, value);
815
+ const handleChange = (e) => onChange && onChange(e.checked);
816
+ const handleBlur = () => onBlur && onBlur(id, value);
817
+ const handleFocus = () => onFocus && onFocus(id, value);
804
818
  const description = options.description ?? schema.description;
805
819
  const primeProps = options.prime || {};
806
820
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -824,9 +838,9 @@
824
838
  disabled: disabled || readonly,
825
839
  autoFocus: autofocus,
826
840
  checked: typeof value === "undefined" ? false : checked,
827
- onChange: _onChange,
828
- onBlur: _onBlur,
829
- onFocus: _onFocus,
841
+ onChange: handleChange,
842
+ onBlur: handleBlur,
843
+ onFocus: handleFocus,
830
844
  required,
831
845
  "aria-describedby": utils.ariaDescribedByIds(id)
832
846
  }
@@ -855,9 +869,9 @@
855
869
  const inputProps = utils.getInputProps(schema, type, options);
856
870
  const { inline } = options;
857
871
  const primeProps = options.prime || {};
858
- const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
859
- const _onBlur = () => onBlur && onBlur(id, value);
860
- const _onFocus = () => onFocus && onFocus(id, value);
872
+ const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
873
+ const handleBlur = () => onBlur && onBlur(id, value);
874
+ const handleFocus = () => onFocus && onFocus(id, value);
861
875
  return /* @__PURE__ */ jsxRuntime.jsx(
862
876
  colorpicker.ColorPicker,
863
877
  {
@@ -871,9 +885,9 @@
871
885
  autoFocus: autofocus,
872
886
  disabled: disabled || readonly,
873
887
  value: value || "",
874
- onChange: onChangeOverride || _onChange,
875
- onBlur: _onBlur,
876
- onFocus: _onFocus,
888
+ onChange: onChangeOverride || handleChange,
889
+ onBlur: handleBlur,
890
+ onFocus: handleFocus,
877
891
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples)
878
892
  }
879
893
  );
@@ -898,9 +912,9 @@
898
912
  } = props;
899
913
  const inputProps = utils.getInputProps(schema, type, options);
900
914
  const primeProps = options.prime || {};
901
- const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
902
- const _onBlur = () => onBlur && onBlur(id, value);
903
- const _onFocus = () => onFocus && onFocus(id, value);
915
+ const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
916
+ const handleBlur = () => onBlur && onBlur(id, value);
917
+ const handleFocus = () => onFocus && onFocus(id, value);
904
918
  return /* @__PURE__ */ jsxRuntime.jsx(
905
919
  password.Password,
906
920
  {
@@ -914,9 +928,9 @@
914
928
  disabled: disabled || readonly,
915
929
  value: value || "",
916
930
  invalid: rawErrors.length > 0,
917
- onChange: onChangeOverride || _onChange,
918
- onBlur: _onBlur,
919
- onFocus: _onFocus,
931
+ onChange: onChangeOverride || handleChange,
932
+ onBlur: handleBlur,
933
+ onFocus: handleFocus,
920
934
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples),
921
935
  pt: { root: { style: { display: "flex", flexDirection: "column" } } }
922
936
  }
@@ -927,14 +941,14 @@
927
941
  const primeProps = options.prime || {};
928
942
  const { enumOptions, enumDisabled, emptyValue } = options;
929
943
  const optionValueFormat = utils.getOptionValueFormat(options);
930
- const _onChange = (e) => {
944
+ const handleChange = (e) => {
931
945
  onChange(utils.enumOptionValueDecoder(e.value, enumOptions, optionValueFormat, emptyValue));
932
946
  };
933
- const _onBlur = () => onBlur(id, value);
934
- const _onFocus = () => onFocus(id, value);
947
+ const handleBlur = () => onBlur(id, value);
948
+ const handleFocus = () => onFocus(id, value);
935
949
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "row", gap: "1rem" }, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
936
950
  const checked = utils.enumOptionsIsSelected(option.value, value);
937
- const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
951
+ const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
938
952
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
939
953
  /* @__PURE__ */ jsxRuntime.jsx(
940
954
  radiobutton.RadioButton,
@@ -942,9 +956,9 @@
942
956
  inputId: utils.optionId(id, index),
943
957
  name: htmlName || id,
944
958
  ...primeProps,
945
- onFocus: _onFocus,
946
- onBlur: _onBlur,
947
- onChange: _onChange,
959
+ onFocus: handleFocus,
960
+ onBlur: handleBlur,
961
+ onChange: handleChange,
948
962
  value: utils.enumOptionValueEncoder(option.value, index, optionValueFormat),
949
963
  checked,
950
964
  disabled: disabled || itemDisabled || readonly,
@@ -952,31 +966,31 @@
952
966
  }
953
967
  ),
954
968
  /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: utils.optionId(id, index), style: { marginLeft: "8px" }, children: option.label })
955
- ] }, index);
969
+ ] }, String(option.value));
956
970
  }) });
957
971
  }
958
972
  function RangeWidget(props) {
959
973
  const { value, readonly, disabled, onBlur, onFocus, options, schema, onChange, id } = props;
960
974
  const primeProps = options.prime || {};
961
975
  const sliderProps = { value, id, ...utils.rangeSpec(schema) };
962
- const _onChange = (e) => {
976
+ const handleChange = (e) => {
963
977
  onChange(e.value ?? options.emptyValue);
964
978
  };
965
- const _onBlur = ({ target }) => onBlur(id, target && target.value);
966
- const _onFocus = ({ target }) => onFocus(id, target && target.value);
967
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
979
+ const handleBlur = ({ target }) => onBlur(id, target && target.value);
980
+ const handleFocus = ({ target }) => onFocus(id, target && target.value);
981
+ return /* @__PURE__ */ jsxRuntime.jsx(
968
982
  slider.Slider,
969
983
  {
970
984
  ...primeProps,
971
985
  disabled: disabled || readonly,
972
986
  onMouseDown: (e) => e.stopPropagation(),
973
- onChange: _onChange,
974
- onBlur: _onBlur,
975
- onFocus: _onFocus,
987
+ onChange: handleChange,
988
+ onBlur: handleBlur,
989
+ onFocus: handleFocus,
976
990
  ...sliderProps,
977
991
  "aria-describedby": utils.ariaDescribedByIds(id)
978
992
  }
979
- ) });
993
+ );
980
994
  }
981
995
  function SelectWidget(props) {
982
996
  const { multiple = false } = props;
@@ -1011,11 +1025,11 @@
1011
1025
  const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;
1012
1026
  const optionValueFormat = utils.getOptionValueFormat(options);
1013
1027
  const primeProps = options.prime || {};
1014
- multiple = typeof multiple === "undefined" ? false : multiple;
1015
- const emptyValue = multiple ? [] : "";
1016
- const _onChange = (e) => onChange(utils.enumOptionValueDecoder(e.value, enumOptions, optionValueFormat, optEmptyVal));
1017
- const _onBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1018
- const _onFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1028
+ const isMultiple = typeof multiple === "undefined" ? false : multiple;
1029
+ const emptyValue = isMultiple ? [] : "";
1030
+ const handleChange = (e) => onChange(utils.enumOptionValueDecoder(e.value, enumOptions, optionValueFormat, optEmptyVal));
1031
+ const handleBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1032
+ const handleFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1019
1033
  const { ...dropdownRemainingProps } = dropdownProps;
1020
1034
  return /* @__PURE__ */ jsxRuntime.jsx(
1021
1035
  dropdown.Dropdown,
@@ -1023,15 +1037,15 @@
1023
1037
  id,
1024
1038
  name: htmlName || id,
1025
1039
  ...primeProps,
1026
- value: utils.enumOptionSelectedValue(value, enumOptions, !!multiple, optionValueFormat, emptyValue),
1027
- options: (enumOptions ?? []).map(({ value: value2, label: label2 }, i) => ({
1028
- label: label2,
1029
- value: utils.enumOptionValueEncoder(value2, i, optionValueFormat),
1030
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1040
+ value: utils.enumOptionSelectedValue(value, enumOptions, isMultiple, optionValueFormat, emptyValue),
1041
+ options: (enumOptions ?? []).map(({ value: enumValue, label: enumLabel }, i) => ({
1042
+ label: enumLabel,
1043
+ value: utils.enumOptionValueEncoder(enumValue, i, optionValueFormat),
1044
+ disabled: Array.isArray(enumDisabled) && enumDisabled.includes(enumValue)
1031
1045
  })),
1032
- onChange: _onChange,
1033
- onBlur: _onBlur,
1034
- onFocus: _onFocus,
1046
+ onChange: handleChange,
1047
+ onBlur: handleBlur,
1048
+ onFocus: handleFocus,
1035
1049
  placeholder,
1036
1050
  disabled: disabled || readonly,
1037
1051
  autoFocus: autofocus,
@@ -1058,9 +1072,9 @@
1058
1072
  const optionValueFormat = utils.getOptionValueFormat(options);
1059
1073
  const primeProps = options.prime || {};
1060
1074
  const emptyValue = multiple ? [] : "";
1061
- const _onChange = (e) => onChange(utils.enumOptionValueDecoder(e.value, enumOptions, optionValueFormat, optEmptyVal));
1062
- const _onBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1063
- const _onFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1075
+ const handleChange = (e) => onChange(utils.enumOptionValueDecoder(e.value, enumOptions, optionValueFormat, optEmptyVal));
1076
+ const handleBlur = ({ target }) => onBlur(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1077
+ const handleFocus = ({ target }) => onFocus(id, utils.enumOptionValueDecoder(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1064
1078
  return /* @__PURE__ */ jsxRuntime.jsx(
1065
1079
  multiselect.MultiSelect,
1066
1080
  {
@@ -1068,14 +1082,14 @@
1068
1082
  name: htmlName || id,
1069
1083
  ...primeProps,
1070
1084
  value: utils.enumOptionSelectedValue(value, enumOptions, multiple, optionValueFormat, emptyValue),
1071
- options: (enumOptions ?? []).map(({ value: value2, label }, i) => ({
1072
- label,
1073
- value: utils.enumOptionValueEncoder(value2, i, optionValueFormat),
1074
- disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) !== -1
1085
+ options: (enumOptions ?? []).map(({ value: enumValue, label: enumLabel }, i) => ({
1086
+ label: enumLabel,
1087
+ value: utils.enumOptionValueEncoder(enumValue, i, optionValueFormat),
1088
+ disabled: Array.isArray(enumDisabled) && enumDisabled.includes(enumValue)
1075
1089
  })),
1076
- onChange: _onChange,
1077
- onBlur: _onBlur,
1078
- onFocus: _onFocus,
1090
+ onChange: handleChange,
1091
+ onBlur: handleBlur,
1092
+ onFocus: handleFocus,
1079
1093
  placeholder,
1080
1094
  disabled: disabled || readonly,
1081
1095
  autoFocus: autofocus,
@@ -1133,9 +1147,9 @@
1133
1147
  const inputProps = utils.getInputProps(schema, type, options);
1134
1148
  const { showButtons, buttonLayout, useGrouping, minFractionDigits, maxFractionDigits, locale, currency } = options;
1135
1149
  const primeProps = options.prime || {};
1136
- const _onChange = (event) => onChange(event.value === null ? options.emptyValue : value);
1137
- const _onBlur = () => onBlur && onBlur(id, value);
1138
- const _onFocus = () => onFocus && onFocus(id, value);
1150
+ const handleChange = (event) => onChange(event.value === null ? options.emptyValue : value);
1151
+ const handleBlur = () => onBlur && onBlur(id, value);
1152
+ const handleFocus = () => onFocus && onFocus(id, value);
1139
1153
  return /* @__PURE__ */ jsxRuntime.jsx(
1140
1154
  inputnumber.InputNumber,
1141
1155
  {
@@ -1143,7 +1157,7 @@
1143
1157
  name: id,
1144
1158
  ...primeProps,
1145
1159
  placeholder,
1146
- step: isNaN(Number(inputProps.step)) ? 1 : Number(inputProps.step),
1160
+ step: Number.isNaN(Number(inputProps.step)) ? 1 : Number(inputProps.step),
1147
1161
  required,
1148
1162
  autoFocus: autofocus,
1149
1163
  disabled: disabled || readonly,
@@ -1156,11 +1170,11 @@
1156
1170
  locale,
1157
1171
  mode: currency ? "currency" : "decimal",
1158
1172
  currency,
1159
- value: isNaN(Number(value)) ? null : Number(value),
1173
+ value: Number.isNaN(Number(value)) ? null : Number(value),
1160
1174
  invalid: rawErrors.length > 0,
1161
- onChange: onChangeOverride || _onChange,
1162
- onBlur: _onBlur,
1163
- onFocus: _onFocus,
1175
+ onChange: onChangeOverride || handleChange,
1176
+ onBlur: handleBlur,
1177
+ onFocus: handleFocus,
1164
1178
  "aria-describedby": utils.ariaDescribedByIds(id, !!schema.examples)
1165
1179
  }
1166
1180
  );
@@ -1,4 +1,4 @@
1
- import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `AddButton` renders a button that represents the `Add` action on a form
3
3
  */
4
4
  export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema, registry, color, ...props }: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACiB;IACzB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,EACxD,IAAI,EAAC,YAAY,EACjB,QAAQ,QACR,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,OAAO,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../src/AddButton/AddButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACiB;IACzB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,EACxD,IAAI,EAAC,YAAY,EACjB,QAAQ,QACR,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,OAAO,KACR,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldItemTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
3
3
  *
4
4
  * @param props - The `ArrayFieldItemTemplateProps` props for the component
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, } from '@rjsf/utils';
2
+ import { getTemplate, getUiOptions } from '@rjsf/utils';
3
3
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
4
4
  *
5
5
  * @param props - The `ArrayFieldItemTemplateProps` props for the component
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA2C;IAC3C,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACvF,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aACjC,UAAU,IAAI,CACb,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,YAC3E,UAAU,IAAI,CACb,cAAK,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,YAClC,KAAC,6BAA6B,OAAK,YAAY,GAAI,GAC/C,CACP,GACG,CACP,EACA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA2C;IAC3C,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACvF,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aACjC,UAAU,IAAI,CACb,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,YAC3E,UAAU,IAAI,CACb,cAAK,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,YAClC,KAAC,6BAA6B,OAAK,YAAY,GAAI,GAC/C,CACP,GACG,CACP,EACA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
3
3
  *
4
4
  * @param props - The `ArrayFieldTemplateProps` props for the component
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { getTemplate, getUiOptions, isFixedItems, buttonId, } from '@rjsf/utils';
2
+ import { getTemplate, getUiOptions, isFixedItems, buttonId } from '@rjsf/utils';
3
3
  import { Fieldset } from 'primereact/fieldset';
4
4
  import AddButton from '../AddButton/index.js';
5
5
  /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EAKZ,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ;IACR,2EAA2E;IAC3E,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,uBAAuB,GAAG,WAAW,CACzC,yBAAyB,EACzB,QAAQ,EACR,SAAS,CACV,CAAC;IACF,MAAM,8BAA8B,GAAG,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC;IAE9D,OAAO,CACL,8BACE,KAAC,uBAAuB,IACtB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,KAAK,EAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,8BAA8B,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,GACrF,EACF,MAAC,QAAQ,OACH,I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,mBAAmB,CAAC,CAAC,CAAC,SAAS,EACjE,KAAK,IACF,EACL,MAAM,IAAI,CACT,cACE,KAAK,EAAE;oCACL,SAAS,EAAE,MAAM;oCACjB,QAAQ,EAAE,UAAU;oCACpB,SAAS,EAAE,OAAO;iCACnB,YAED,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,EAChC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACE,CACP,KAtBO,mBAAmB,WAAW,CAAC,GAAG,EAAE,CAuBxC,IACG,IACV,CACJ,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
1
+ import type { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
2
  /** The `ArrayFieldTitleTemplate` component renders a header for the array.
3
3
  *
4
4
  * @param props - The `ArrayFieldTitleProps` for the component
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { getUiOptions, titleId, } from '@rjsf/utils';
2
+ import { getUiOptions, titleId } from '@rjsf/utils';
3
3
  /** The `ArrayFieldTitleTemplate` component renders a header for the array.
4
4
  *
5
5
  * @param props - The `ArrayFieldTitleProps` for the component
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayFieldTitleTemplate.js","sourceRoot":"","sources":["../../src/ArrayFieldTitleTemplate/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,YAAY,EAGZ,OAAO,GACR,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAI7C,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,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Q,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAC5C,CACN,CAAC;IACF,IAAI,mBAAmB,EAAE,CAAC;QACxB,OAAO,GAAG,CACR,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAC7B,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAG,OAAO,GAAO,EAC5C,wBAAM,mBAAmB,GAAO,IAC5B,CACP,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
1
+ import type { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
2
2
  /** The `AutoCompleteWidget` is a widget for rendering a field with options.
3
3
  * This is used instead of the base input template if the schema has examples.
4
4
  *
@@ -1,6 +1,6 @@
1
- import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { ariaDescribedByIds, getInputProps, } from '@rjsf/utils';
3
+ import { ariaDescribedByIds, getInputProps } from '@rjsf/utils';
4
4
  import { AutoComplete } from 'primereact/autocomplete';
5
5
  /** The `AutoCompleteWidget` is a widget for rendering a field with options.
6
6
  * This is used instead of the base input template if the schema has examples.
@@ -11,9 +11,9 @@ export default function AutoCompleteWidget(props) {
11
11
  const { id, placeholder, value, required, readonly, disabled, onChange, onChangeOverride, onBlur, onFocus, autofocus, options, schema, type, rawErrors = [], } = props;
12
12
  const inputProps = getInputProps(schema, type, options);
13
13
  const primeProps = (options.prime || {});
14
- const _onChange = ({ target: { value } }) => onChange(value === '' ? options.emptyValue : value);
15
- const _onBlur = () => onBlur && onBlur(id, value);
16
- const _onFocus = () => onFocus && onFocus(id, value);
14
+ const handleChange = ({ target: { value: newValue } }) => onChange(newValue === '' ? options.emptyValue : newValue);
15
+ const handleBlur = () => onBlur && onBlur(id, value);
16
+ const handleFocus = () => onFocus && onFocus(id, value);
17
17
  const examples = schema.examples.concat(schema.default && !schema.examples.includes(schema.default.toString())
18
18
  ? [schema.default.toString()]
19
19
  : []);
@@ -21,7 +21,7 @@ export default function AutoCompleteWidget(props) {
21
21
  const search = (event) => {
22
22
  setItems(examples.filter((example) => example.toString().toLowerCase().includes(event.query.toLowerCase())));
23
23
  };
24
- return (_jsx(AutoComplete, { id: id, name: id, placeholder: placeholder, ...primeProps, ...inputProps, loadingIcon: _jsx(_Fragment, {}), required: required, autoFocus: autofocus, disabled: disabled || readonly, suggestions: items, completeMethod: search, value: value || value === 0 ? value : '', dropdown: true, invalid: rawErrors.length > 0, onChange: onChangeOverride || _onChange, onBlur: _onBlur, onFocus: _onFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples),
24
+ return (_jsx(AutoComplete, { id: id, name: id, placeholder: placeholder, ...primeProps, ...inputProps, loadingIcon: null, required: required, autoFocus: autofocus, disabled: disabled || readonly, suggestions: items, completeMethod: search, value: value || value === 0 ? value : '', dropdown: true, invalid: rawErrors.length > 0, onChange: onChangeOverride || handleChange, onBlur: handleBlur, onFocus: handleFocus, "aria-describedby": ariaDescribedByIds(id, !!schema.examples),
25
25
  /* Make autocomplete look like a dropdown, which looks much nicer */
26
26
  pt: {
27
27
  root: {