@rjsf/antd 6.0.0-beta.2 → 6.0.0-beta.20

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/README.md +6 -4
  2. package/dist/antd.esm.js +73 -62
  3. package/dist/antd.esm.js.map +4 -4
  4. package/dist/antd.umd.js +23 -15
  5. package/dist/{index.js → index.cjs} +74 -63
  6. package/dist/index.cjs.map +7 -0
  7. package/lib/templates/ArrayFieldTemplate/index.js +4 -3
  8. package/lib/templates/ArrayFieldTemplate/index.js.map +1 -1
  9. package/lib/templates/BaseInputTemplate/index.js.map +1 -1
  10. package/lib/templates/FieldErrorTemplate/index.js +2 -2
  11. package/lib/templates/FieldErrorTemplate/index.js.map +1 -1
  12. package/lib/templates/FieldTemplate/index.js +2 -1
  13. package/lib/templates/FieldTemplate/index.js.map +1 -1
  14. package/lib/templates/MultiSchemaFieldTemplate/index.d.ts +2 -0
  15. package/lib/templates/MultiSchemaFieldTemplate/index.js +6 -0
  16. package/lib/templates/MultiSchemaFieldTemplate/index.js.map +1 -0
  17. package/lib/templates/ObjectFieldTemplate/index.js +4 -3
  18. package/lib/templates/ObjectFieldTemplate/index.js.map +1 -1
  19. package/lib/templates/WrapIfAdditionalTemplate/index.js.map +1 -1
  20. package/lib/templates/index.js +2 -0
  21. package/lib/templates/index.js.map +1 -1
  22. package/lib/tsconfig.tsbuildinfo +1 -1
  23. package/lib/widgets/AltDateWidget/index.js.map +1 -1
  24. package/lib/widgets/CheckboxWidget/index.js.map +1 -1
  25. package/lib/widgets/CheckboxesWidget/index.js.map +1 -1
  26. package/lib/widgets/DateTimeWidget/index.js.map +1 -1
  27. package/lib/widgets/DateWidget/index.js.map +1 -1
  28. package/lib/widgets/PasswordWidget/index.js.map +1 -1
  29. package/lib/widgets/RadioWidget/index.js.map +1 -1
  30. package/lib/widgets/RangeWidget/index.js.map +1 -1
  31. package/lib/widgets/SelectWidget/index.js.map +1 -1
  32. package/lib/widgets/TextareaWidget/index.js.map +1 -1
  33. package/package.json +20 -20
  34. package/src/templates/ArrayFieldTemplate/index.tsx +6 -6
  35. package/src/templates/BaseInputTemplate/index.tsx +5 -5
  36. package/src/templates/FieldErrorTemplate/index.tsx +2 -2
  37. package/src/templates/FieldTemplate/index.tsx +1 -1
  38. package/src/templates/MultiSchemaFieldTemplate/index.tsx +16 -0
  39. package/src/templates/ObjectFieldTemplate/index.tsx +6 -6
  40. package/src/templates/WrapIfAdditionalTemplate/index.tsx +1 -1
  41. package/src/templates/index.ts +2 -0
  42. package/src/widgets/AltDateWidget/index.tsx +1 -1
  43. package/src/widgets/CheckboxWidget/index.tsx +1 -1
  44. package/src/widgets/CheckboxesWidget/index.tsx +1 -1
  45. package/src/widgets/DateTimeWidget/index.tsx +1 -1
  46. package/src/widgets/DateWidget/index.tsx +1 -1
  47. package/src/widgets/PasswordWidget/index.tsx +1 -1
  48. package/src/widgets/RadioWidget/index.tsx +1 -1
  49. package/src/widgets/RangeWidget/index.tsx +1 -1
  50. package/src/widgets/SelectWidget/index.tsx +1 -1
  51. package/src/widgets/TextareaWidget/index.tsx +1 -1
  52. package/dist/index.js.map +0 -7
@@ -82,8 +82,7 @@ function ArrayFieldTemplate(props) {
82
82
  canAdd,
83
83
  className,
84
84
  disabled,
85
- formContext,
86
- idSchema,
85
+ fieldPathId,
87
86
  items,
88
87
  onAddClick,
89
88
  readonly,
@@ -109,6 +108,7 @@ function ArrayFieldTemplate(props) {
109
108
  registry,
110
109
  uiOptions
111
110
  );
111
+ const { formContext } = registry;
112
112
  const {
113
113
  ButtonTemplates: { AddButton: AddButton2 }
114
114
  } = registry.templates;
@@ -121,11 +121,11 @@ function ArrayFieldTemplate(props) {
121
121
  labelAlign === "left" && `${labelClsBasic}-left`
122
122
  // labelCol.className,
123
123
  );
124
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("fieldset", { className, id: idSchema.$id, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd2.Row, { gutter: rowGutter, children: [
124
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("fieldset", { className, id: fieldPathId.$id, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd2.Row, { gutter: rowGutter, children: [
125
125
  (uiOptions.title || title) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Col, { className: labelColClassName, span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
126
126
  ArrayFieldTitleTemplate,
127
127
  {
128
- idSchema,
128
+ fieldPathId,
129
129
  required,
130
130
  title: uiOptions.title || title,
131
131
  schema,
@@ -137,7 +137,7 @@ function ArrayFieldTemplate(props) {
137
137
  ArrayFieldDescriptionTemplate,
138
138
  {
139
139
  description: uiOptions.description || schema.description,
140
- idSchema,
140
+ fieldPathId,
141
141
  schema,
142
142
  uiSchema,
143
143
  registry
@@ -147,7 +147,7 @@ function ArrayFieldTemplate(props) {
147
147
  canAdd && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Row, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
148
148
  AddButton2,
149
149
  {
150
- id: (0, import_utils2.buttonId)(idSchema, "add"),
150
+ id: (0, import_utils2.buttonId)(fieldPathId, "add"),
151
151
  className: "rjsf-array-item-add",
152
152
  disabled: disabled || readonly,
153
153
  onClick: onAddClick,
@@ -340,11 +340,11 @@ function RemoveButton(props) {
340
340
  var import_utils6 = require("@rjsf/utils");
341
341
  var import_jsx_runtime7 = require("react/jsx-runtime");
342
342
  function FieldErrorTemplate(props) {
343
- const { errors = [], idSchema } = props;
343
+ const { errors = [], fieldPathId } = props;
344
344
  if (errors.length === 0) {
345
345
  return null;
346
346
  }
347
- const id = (0, import_utils6.errorId)(idSchema);
347
+ const id = (0, import_utils6.errorId)(fieldPathId);
348
348
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, children: errors.map((error) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: error }, `field-${id}-error-${error}`)) });
349
349
  }
350
350
 
@@ -363,7 +363,6 @@ function FieldTemplate(props) {
363
363
  disabled,
364
364
  displayLabel,
365
365
  errors,
366
- formContext,
367
366
  help,
368
367
  hidden,
369
368
  id,
@@ -379,6 +378,7 @@ function FieldTemplate(props) {
379
378
  schema,
380
379
  uiSchema
381
380
  } = props;
381
+ const { formContext } = registry;
382
382
  const {
383
383
  colon,
384
384
  labelCol = VERTICAL_LABEL_COL,
@@ -453,6 +453,16 @@ function GridTemplate(props) {
453
453
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd7.Row, { ...rest, children });
454
454
  }
455
455
 
456
+ // src/templates/MultiSchemaFieldTemplate/index.tsx
457
+ var import_jsx_runtime10 = require("react/jsx-runtime");
458
+ function MultiSchemaFieldTemplate(props) {
459
+ const { optionSchemaField, selector } = props;
460
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
461
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: selector }),
462
+ optionSchemaField
463
+ ] });
464
+ }
465
+
456
466
  // src/templates/ObjectFieldTemplate/index.tsx
457
467
  var import_classnames2 = __toESM(require("classnames"), 1);
458
468
  var import_isObject = __toESM(require("lodash/isObject"), 1);
@@ -461,7 +471,7 @@ var import_isString = __toESM(require("lodash/isString"), 1);
461
471
  var import_utils8 = require("@rjsf/utils");
462
472
  var import_antd8 = require("antd");
463
473
  var import_react2 = require("react");
464
- var import_jsx_runtime10 = require("react/jsx-runtime");
474
+ var import_jsx_runtime11 = require("react/jsx-runtime");
465
475
  var DESCRIPTION_COL_STYLE2 = {
466
476
  paddingBottom: "8px"
467
477
  };
@@ -469,9 +479,8 @@ function ObjectFieldTemplate(props) {
469
479
  const {
470
480
  description,
471
481
  disabled,
472
- formContext,
473
482
  formData,
474
- idSchema,
483
+ fieldPathId,
475
484
  onAddClick,
476
485
  properties,
477
486
  readonly,
@@ -488,6 +497,7 @@ function ObjectFieldTemplate(props) {
488
497
  registry,
489
498
  uiOptions
490
499
  );
500
+ const { formContext } = registry;
491
501
  const {
492
502
  ButtonTemplates: { AddButton: AddButton2 }
493
503
  } = registry.templates;
@@ -528,12 +538,12 @@ function ObjectFieldTemplate(props) {
528
538
  labelAlign === "left" && `${labelClsBasic}-left`
529
539
  // labelCol.className,
530
540
  );
531
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("fieldset", { id: idSchema.$id, children: [
532
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_antd8.Row, { gutter: rowGutter, children: [
533
- title && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { className: labelColClassName, span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
541
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("fieldset", { id: fieldPathId.$id, children: [
542
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd8.Row, { gutter: rowGutter, children: [
543
+ title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Col, { className: labelColClassName, span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
534
544
  TitleFieldTemplate,
535
545
  {
536
- id: (0, import_utils8.titleId)(idSchema),
546
+ id: (0, import_utils8.titleId)(fieldPathId),
537
547
  title,
538
548
  required,
539
549
  schema,
@@ -541,22 +551,22 @@ function ObjectFieldTemplate(props) {
541
551
  registry
542
552
  }
543
553
  ) }),
544
- description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: 24, style: DESCRIPTION_COL_STYLE2, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
554
+ description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Col, { span: 24, style: DESCRIPTION_COL_STYLE2, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
545
555
  DescriptionFieldTemplate,
546
556
  {
547
- id: (0, import_utils8.descriptionId)(idSchema),
557
+ id: (0, import_utils8.descriptionId)(fieldPathId),
548
558
  description,
549
559
  schema,
550
560
  uiSchema,
551
561
  registry
552
562
  }
553
563
  ) }),
554
- properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: calculateColSpan(element), children: element.content }, element.name))
564
+ properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Col, { span: calculateColSpan(element), children: element.content }, element.name))
555
565
  ] }),
556
- (0, import_utils8.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Row, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd8.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
566
+ (0, import_utils8.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Col, { span: 24, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Row, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
557
567
  AddButton2,
558
568
  {
559
- id: (0, import_utils8.buttonId)(idSchema, "add"),
569
+ id: (0, import_utils8.buttonId)(fieldPathId, "add"),
560
570
  className: "rjsf-object-property-expand",
561
571
  disabled: disabled || readonly,
562
572
  onClick: onAddClick(schema),
@@ -570,20 +580,20 @@ function ObjectFieldTemplate(props) {
570
580
  // src/templates/SubmitButton/index.tsx
571
581
  var import_antd9 = require("antd");
572
582
  var import_utils9 = require("@rjsf/utils");
573
- var import_jsx_runtime11 = require("react/jsx-runtime");
583
+ var import_jsx_runtime12 = require("react/jsx-runtime");
574
584
  function SubmitButton({ uiSchema }) {
575
585
  const { submitText, norender, props: submitButtonProps } = (0, import_utils9.getSubmitButtonOptions)(uiSchema);
576
586
  if (norender) {
577
587
  return null;
578
588
  }
579
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd9.Button, { type: "submit", ...submitButtonProps, htmlType: "submit", children: submitText });
589
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_antd9.Button, { type: "submit", ...submitButtonProps, htmlType: "submit", children: submitText });
580
590
  }
581
591
 
582
592
  // src/templates/TitleField/index.tsx
583
593
  var import_classnames3 = __toESM(require("classnames"), 1);
584
594
  var import_antd10 = require("antd");
585
595
  var import_react3 = require("react");
586
- var import_jsx_runtime12 = require("react/jsx-runtime");
596
+ var import_jsx_runtime13 = require("react/jsx-runtime");
587
597
  function TitleField({
588
598
  id,
589
599
  required,
@@ -611,7 +621,7 @@ function TitleField({
611
621
  [`${prefixCls}-item-required`]: required,
612
622
  [`${prefixCls}-item-no-colon`]: !colon
613
623
  });
614
- return title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
624
+ return title ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
615
625
  "label",
616
626
  {
617
627
  className: labelClassName,
@@ -626,7 +636,7 @@ function TitleField({
626
636
  // src/templates/WrapIfAdditionalTemplate/index.tsx
627
637
  var import_antd11 = require("antd");
628
638
  var import_utils10 = require("@rjsf/utils");
629
- var import_jsx_runtime13 = require("react/jsx-runtime");
639
+ var import_jsx_runtime14 = require("react/jsx-runtime");
630
640
  var VERTICAL_LABEL_COL2 = { span: 24 };
631
641
  var VERTICAL_WRAPPER_COL2 = { span: 24 };
632
642
  var INPUT_STYLE2 = {
@@ -662,7 +672,7 @@ function WrapIfAdditionalTemplate(props) {
662
672
  const keyLabel = translateString(import_utils10.TranslatableString.KeyLabel, [label]);
663
673
  const additional = import_utils10.ADDITIONAL_PROPERTY_FLAG in schema;
664
674
  if (!additional) {
665
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: classNames4, style, children });
675
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: classNames4, style, children });
666
676
  }
667
677
  const handleBlur = ({ target }) => onKeyChange(target && target.value);
668
678
  const uiOptions = uiSchema ? uiSchema[import_utils10.UI_OPTIONS_KEY] : {};
@@ -670,8 +680,8 @@ function WrapIfAdditionalTemplate(props) {
670
680
  ...uiSchema,
671
681
  [import_utils10.UI_OPTIONS_KEY]: { ...uiOptions, block: true }
672
682
  };
673
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: classNames4, style, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_antd11.Row, { align: toolbarAlign, gutter: rowGutter, children: [
674
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
683
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: classNames4, style, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_antd11.Row, { align: toolbarAlign, gutter: rowGutter, children: [
684
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
675
685
  import_antd11.Form.Item,
676
686
  {
677
687
  colon,
@@ -683,7 +693,7 @@ function WrapIfAdditionalTemplate(props) {
683
693
  required,
684
694
  style: wrapperStyle,
685
695
  wrapperCol,
686
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
696
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
687
697
  import_antd11.Input,
688
698
  {
689
699
  className: "form-control",
@@ -698,8 +708,8 @@ function WrapIfAdditionalTemplate(props) {
698
708
  )
699
709
  }
700
710
  ) }) }),
701
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children }),
702
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_antd11.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
711
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd11.Col, { className: "form-additional", flex: "1", children }),
712
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd11.Col, { flex: "192px", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
703
713
  RemoveButton2,
704
714
  {
705
715
  id: (0, import_utils10.buttonId)(id, "remove"),
@@ -732,6 +742,7 @@ function generateTemplates() {
732
742
  FieldErrorTemplate,
733
743
  FieldTemplate,
734
744
  GridTemplate,
745
+ MultiSchemaFieldTemplate,
735
746
  ObjectFieldTemplate,
736
747
  TitleFieldTemplate: TitleField,
737
748
  WrapIfAdditionalTemplate
@@ -743,7 +754,7 @@ var templates_default = generateTemplates();
743
754
  var import_react4 = require("react");
744
755
  var import_antd12 = require("antd");
745
756
  var import_utils11 = require("@rjsf/utils");
746
- var import_jsx_runtime14 = require("react/jsx-runtime");
757
+ var import_jsx_runtime15 = require("react/jsx-runtime");
747
758
  var readyForChange = (state) => {
748
759
  return Object.values(state).every((value) => value !== -1);
749
760
  };
@@ -795,7 +806,7 @@ function AltDateWidget(props) {
795
806
  }
796
807
  onChange(void 0);
797
808
  };
798
- const renderDateElement = (elemProps) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
809
+ const renderDateElement = (elemProps) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
799
810
  SelectWidget2,
800
811
  {
801
812
  autofocus: elemProps.autofocus,
@@ -818,7 +829,7 @@ function AltDateWidget(props) {
818
829
  "aria-describedby": (0, import_utils11.ariaDescribedByIds)(id)
819
830
  }
820
831
  );
821
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_antd12.Row, { gutter: [Math.floor(rowGutter / 2), Math.floor(rowGutter / 2)], children: [
832
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_antd12.Row, { gutter: [Math.floor(rowGutter / 2), Math.floor(rowGutter / 2)], children: [
822
833
  (0, import_utils11.getDateElementProps)(
823
834
  state,
824
835
  showTime,
@@ -826,7 +837,7 @@ function AltDateWidget(props) {
826
837
  options.format
827
838
  ).map((elemProps, i) => {
828
839
  const elemId = id + "_" + elemProps.type;
829
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: renderDateElement({
840
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd12.Col, { flex: "88px", children: renderDateElement({
830
841
  ...elemProps,
831
842
  autofocus: autofocus && i === 0,
832
843
  disabled,
@@ -842,8 +853,8 @@ function AltDateWidget(props) {
842
853
  value: elemProps.value || -1 < 0 ? void 0 : elemProps.value
843
854
  }) }, elemId);
844
855
  }),
845
- !options.hideNowButton && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Button, { block: true, className: "btn-now", onClick: handleNow, type: "primary", children: translateString(import_utils11.TranslatableString.NowLabel) }) }),
846
- !options.hideClearButton && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd12.Button, { block: true, className: "btn-clear", danger: true, onClick: handleClear, type: "primary", children: translateString(import_utils11.TranslatableString.ClearLabel) }) })
856
+ !options.hideNowButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd12.Button, { block: true, className: "btn-now", onClick: handleNow, type: "primary", children: translateString(import_utils11.TranslatableString.NowLabel) }) }),
857
+ !options.hideClearButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd12.Col, { flex: "88px", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd12.Button, { block: true, className: "btn-clear", danger: true, onClick: handleClear, type: "primary", children: translateString(import_utils11.TranslatableString.ClearLabel) }) })
847
858
  ] });
848
859
  }
849
860
  AltDateWidget.defaultProps = {
@@ -857,10 +868,10 @@ AltDateWidget.defaultProps = {
857
868
  };
858
869
 
859
870
  // src/widgets/AltDateTimeWidget/index.tsx
860
- var import_jsx_runtime15 = require("react/jsx-runtime");
871
+ var import_jsx_runtime16 = require("react/jsx-runtime");
861
872
  function AltDateTimeWidget(props) {
862
873
  const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
863
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AltDateWidget2, { showTime: true, ...props });
874
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AltDateWidget2, { showTime: true, ...props });
864
875
  }
865
876
  AltDateTimeWidget.defaultProps = {
866
877
  ...AltDateWidget.defaultProps,
@@ -870,7 +881,7 @@ AltDateTimeWidget.defaultProps = {
870
881
  // src/widgets/CheckboxesWidget/index.tsx
871
882
  var import_antd13 = require("antd");
872
883
  var import_utils12 = require("@rjsf/utils");
873
- var import_jsx_runtime16 = require("react/jsx-runtime");
884
+ var import_jsx_runtime17 = require("react/jsx-runtime");
874
885
  function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
875
886
  const { readonlyAsDisabled = true } = formContext;
876
887
  const { enumOptions, enumDisabled, inline, emptyValue } = options;
@@ -883,7 +894,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
883
894
  onFocus: !readonly ? handleFocus : void 0
884
895
  };
885
896
  const selectedIndexes = (0, import_utils12.enumOptionsIndexForValue)(value, enumOptions, true);
886
- return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
897
+ return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
887
898
  import_antd13.Checkbox.Group,
888
899
  {
889
900
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -892,8 +903,8 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
892
903
  value: selectedIndexes,
893
904
  ...extraProps,
894
905
  "aria-describedby": (0, import_utils12.ariaDescribedByIds)(id),
895
- children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
896
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
906
+ children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
897
908
  import_antd13.Checkbox,
898
909
  {
899
910
  id: (0, import_utils12.optionId)(id, i),
@@ -904,7 +915,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
904
915
  children: option.label
905
916
  }
906
917
  ),
907
- !inline && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("br", {})
918
+ !inline && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("br", {})
908
919
  ] }, i))
909
920
  }
910
921
  ) }) : null;
@@ -913,7 +924,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
913
924
  // src/widgets/CheckboxWidget/index.tsx
914
925
  var import_antd14 = require("antd");
915
926
  var import_utils13 = require("@rjsf/utils");
916
- var import_jsx_runtime17 = require("react/jsx-runtime");
927
+ var import_jsx_runtime18 = require("react/jsx-runtime");
917
928
  function CheckboxWidget(props) {
918
929
  const { autofocus, disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value } = props;
919
930
  const { readonlyAsDisabled = true } = formContext;
@@ -924,7 +935,7 @@ function CheckboxWidget(props) {
924
935
  onBlur: !readonly ? handleBlur : void 0,
925
936
  onFocus: !readonly ? handleFocus : void 0
926
937
  };
927
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
938
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
928
939
  import_antd14.Checkbox,
929
940
  {
930
941
  autoFocus: autofocus,
@@ -944,7 +955,7 @@ function CheckboxWidget(props) {
944
955
  var import_dayjs = __toESM(require("dayjs"), 1);
945
956
  var import_utils14 = require("@rjsf/utils");
946
957
  var import_antd15 = require("antd");
947
- var import_jsx_runtime18 = require("react/jsx-runtime");
958
+ var import_jsx_runtime19 = require("react/jsx-runtime");
948
959
  var DATE_PICKER_STYLE = {
949
960
  width: "100%"
950
961
  };
@@ -955,7 +966,7 @@ function DateTimeWidget(props) {
955
966
  const handleBlur = () => onBlur(id, value);
956
967
  const handleFocus = () => onFocus(id, value);
957
968
  const getPopupContainer = (node) => node.parentNode;
958
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
969
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
959
970
  import_antd15.DatePicker,
960
971
  {
961
972
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -978,7 +989,7 @@ function DateTimeWidget(props) {
978
989
  var import_dayjs2 = __toESM(require("dayjs"), 1);
979
990
  var import_utils15 = require("@rjsf/utils");
980
991
  var import_antd16 = require("antd");
981
- var import_jsx_runtime19 = require("react/jsx-runtime");
992
+ var import_jsx_runtime20 = require("react/jsx-runtime");
982
993
  var DATE_PICKER_STYLE2 = {
983
994
  width: "100%"
984
995
  };
@@ -989,7 +1000,7 @@ function DateWidget(props) {
989
1000
  const handleBlur = () => onBlur(id, value);
990
1001
  const handleFocus = () => onFocus(id, value);
991
1002
  const getPopupContainer = (node) => node.parentNode;
992
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1003
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
993
1004
  import_antd16.DatePicker,
994
1005
  {
995
1006
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -1011,7 +1022,7 @@ function DateWidget(props) {
1011
1022
  // src/widgets/PasswordWidget/index.tsx
1012
1023
  var import_antd17 = require("antd");
1013
1024
  var import_utils16 = require("@rjsf/utils");
1014
- var import_jsx_runtime20 = require("react/jsx-runtime");
1025
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1015
1026
  function PasswordWidget(props) {
1016
1027
  const { disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, value } = props;
1017
1028
  const { readonlyAsDisabled = true } = formContext;
@@ -1019,7 +1030,7 @@ function PasswordWidget(props) {
1019
1030
  const handleChange = ({ target }) => onChange(target.value === "" ? emptyValue : target.value);
1020
1031
  const handleBlur = ({ target }) => onBlur(id, target.value);
1021
1032
  const handleFocus = ({ target }) => onFocus(id, target.value);
1022
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1033
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1023
1034
  import_antd17.Input.Password,
1024
1035
  {
1025
1036
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -1038,7 +1049,7 @@ function PasswordWidget(props) {
1038
1049
  // src/widgets/RadioWidget/index.tsx
1039
1050
  var import_antd18 = require("antd");
1040
1051
  var import_utils17 = require("@rjsf/utils");
1041
- var import_jsx_runtime21 = require("react/jsx-runtime");
1052
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1042
1053
  function RadioWidget({
1043
1054
  autofocus,
1044
1055
  disabled,
@@ -1057,7 +1068,7 @@ function RadioWidget({
1057
1068
  const handleBlur = ({ target }) => onBlur(id, (0, import_utils17.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
1058
1069
  const handleFocus = ({ target }) => onFocus(id, (0, import_utils17.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
1059
1070
  const selectedIndexes = (0, import_utils17.enumOptionsIndexForValue)(value, enumOptions);
1060
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1071
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1061
1072
  import_antd18.Radio.Group,
1062
1073
  {
1063
1074
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -1068,7 +1079,7 @@ function RadioWidget({
1068
1079
  onFocus: !readonly ? handleFocus : void 0,
1069
1080
  value: selectedIndexes,
1070
1081
  "aria-describedby": (0, import_utils17.ariaDescribedByIds)(id),
1071
- children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1082
+ children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1072
1083
  import_antd18.Radio,
1073
1084
  {
1074
1085
  id: (0, import_utils17.optionId)(id, i),
@@ -1087,7 +1098,7 @@ function RadioWidget({
1087
1098
  // src/widgets/RangeWidget/index.tsx
1088
1099
  var import_antd19 = require("antd");
1089
1100
  var import_utils18 = require("@rjsf/utils");
1090
- var import_jsx_runtime22 = require("react/jsx-runtime");
1101
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1091
1102
  function RangeWidget(props) {
1092
1103
  const {
1093
1104
  autofocus,
@@ -1114,7 +1125,7 @@ function RangeWidget(props) {
1114
1125
  onBlur: !readonly ? handleBlur : void 0,
1115
1126
  onFocus: !readonly ? handleFocus : void 0
1116
1127
  };
1117
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1128
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1118
1129
  import_antd19.Slider,
1119
1130
  {
1120
1131
  autoFocus: autofocus,
@@ -1137,7 +1148,7 @@ var import_antd20 = require("antd");
1137
1148
  var import_utils19 = require("@rjsf/utils");
1138
1149
  var import_isString2 = __toESM(require("lodash/isString"), 1);
1139
1150
  var import_react5 = require("react");
1140
- var import_jsx_runtime23 = require("react/jsx-runtime");
1151
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1141
1152
  var SELECT_STYLE = {
1142
1153
  width: "100%"
1143
1154
  };
@@ -1188,7 +1199,7 @@ function SelectWidget({
1188
1199
  }
1189
1200
  return void 0;
1190
1201
  }, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
1191
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1202
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1192
1203
  import_antd20.Select,
1193
1204
  {
1194
1205
  autoFocus: autofocus,
@@ -1213,7 +1224,7 @@ function SelectWidget({
1213
1224
  // src/widgets/TextareaWidget/index.tsx
1214
1225
  var import_antd21 = require("antd");
1215
1226
  var import_utils20 = require("@rjsf/utils");
1216
- var import_jsx_runtime24 = require("react/jsx-runtime");
1227
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1217
1228
  var INPUT_STYLE3 = {
1218
1229
  width: "100%"
1219
1230
  };
@@ -1236,7 +1247,7 @@ function TextareaWidget({
1236
1247
  const extraProps = {
1237
1248
  type: "textarea"
1238
1249
  };
1239
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1250
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1240
1251
  import_antd21.Input.TextArea,
1241
1252
  {
1242
1253
  disabled: disabled || readonlyAsDisabled && readonly,
@@ -1286,4 +1297,4 @@ function generateForm() {
1286
1297
  }
1287
1298
  var Form3 = generateForm();
1288
1299
  var index_default = Form3;
1289
- //# sourceMappingURL=index.js.map
1300
+ //# sourceMappingURL=index.cjs.map