@rjsf/antd 6.0.0-beta.20 → 6.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/antd.esm.js +118 -52
- package/dist/antd.esm.js.map +4 -4
- package/dist/antd.umd.js +72 -9
- package/dist/index.cjs +115 -49
- package/dist/index.cjs.map +4 -4
- package/lib/templates/ArrayFieldTemplate/index.js +3 -3
- package/lib/templates/ArrayFieldTemplate/index.js.map +1 -1
- package/lib/templates/IconButton/index.d.ts +2 -2
- package/lib/templates/IconButton/index.js +6 -4
- package/lib/templates/IconButton/index.js.map +1 -1
- package/lib/templates/ObjectFieldTemplate/index.js +3 -2
- package/lib/templates/ObjectFieldTemplate/index.js.map +1 -1
- package/lib/templates/OptionalDataControlsTemplate/index.d.ts +10 -0
- package/lib/templates/OptionalDataControlsTemplate/index.js +21 -0
- package/lib/templates/OptionalDataControlsTemplate/index.js.map +1 -0
- package/lib/templates/TitleField/index.d.ts +1 -1
- package/lib/templates/TitleField/index.js +8 -4
- package/lib/templates/TitleField/index.js.map +1 -1
- package/lib/templates/index.js +2 -0
- package/lib/templates/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/templates/ArrayFieldTemplate/index.tsx +7 -5
- package/src/templates/IconButton/index.tsx +10 -8
- package/src/templates/ObjectFieldTemplate/index.tsx +4 -1
- package/src/templates/OptionalDataControlsTemplate/index.tsx +47 -0
- package/src/templates/TitleField/index.tsx +18 -3
- package/src/templates/index.ts +2 -0
package/dist/antd.esm.js
CHANGED
|
@@ -49,6 +49,7 @@ function ArrayFieldTemplate(props) {
|
|
|
49
49
|
disabled,
|
|
50
50
|
fieldPathId,
|
|
51
51
|
items,
|
|
52
|
+
optionalDataControl,
|
|
52
53
|
onAddClick,
|
|
53
54
|
readonly,
|
|
54
55
|
registry,
|
|
@@ -73,6 +74,7 @@ function ArrayFieldTemplate(props) {
|
|
|
73
74
|
registry,
|
|
74
75
|
uiOptions
|
|
75
76
|
);
|
|
77
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
76
78
|
const { formContext } = registry;
|
|
77
79
|
const {
|
|
78
80
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
@@ -95,7 +97,8 @@ function ArrayFieldTemplate(props) {
|
|
|
95
97
|
title: uiOptions.title || title,
|
|
96
98
|
schema,
|
|
97
99
|
uiSchema,
|
|
98
|
-
registry
|
|
100
|
+
registry,
|
|
101
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
99
102
|
}
|
|
100
103
|
) }),
|
|
101
104
|
(uiOptions.description || schema.description) && /* @__PURE__ */ jsx2(Col2, { span: 24, style: DESCRIPTION_COL_STYLE, children: /* @__PURE__ */ jsx2(
|
|
@@ -108,7 +111,10 @@ function ArrayFieldTemplate(props) {
|
|
|
108
111
|
registry
|
|
109
112
|
}
|
|
110
113
|
) }),
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ jsxs2(Col2, { className: "row array-item-list", span: 24, children: [
|
|
115
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
116
|
+
items.map(({ key, ...itemProps }) => /* @__PURE__ */ jsx2(ArrayFieldItemTemplate2, { ...itemProps }, key))
|
|
117
|
+
] }),
|
|
112
118
|
canAdd && /* @__PURE__ */ jsx2(Col2, { span: 24, children: /* @__PURE__ */ jsx2(Row2, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ jsx2(Col2, { flex: "192px", children: /* @__PURE__ */ jsx2(
|
|
113
119
|
AddButton2,
|
|
114
120
|
{
|
|
@@ -246,13 +252,18 @@ import {
|
|
|
246
252
|
} from "@rjsf/utils";
|
|
247
253
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
248
254
|
function IconButton(props) {
|
|
249
|
-
const { iconType = "default", icon, onClick, uiSchema, registry, ...otherProps } = props;
|
|
255
|
+
const { iconType = "default", icon, onClick, uiSchema, registry, color, ...otherProps } = props;
|
|
250
256
|
return /* @__PURE__ */ jsx6(
|
|
251
257
|
Button,
|
|
252
258
|
{
|
|
253
259
|
onClick,
|
|
254
260
|
type: iconType,
|
|
255
261
|
icon,
|
|
262
|
+
color,
|
|
263
|
+
style: {
|
|
264
|
+
paddingTop: "4px"
|
|
265
|
+
/* Center the button */
|
|
266
|
+
},
|
|
256
267
|
...otherProps
|
|
257
268
|
}
|
|
258
269
|
);
|
|
@@ -265,9 +276,9 @@ function AddButton(props) {
|
|
|
265
276
|
IconButton,
|
|
266
277
|
{
|
|
267
278
|
title: translateString(TranslatableString2.AddItemButton),
|
|
268
|
-
...props,
|
|
269
|
-
block: true,
|
|
270
279
|
iconType: "primary",
|
|
280
|
+
block: true,
|
|
281
|
+
...props,
|
|
271
282
|
icon: /* @__PURE__ */ jsx6(PlusCircleOutlined, {})
|
|
272
283
|
}
|
|
273
284
|
);
|
|
@@ -299,10 +310,10 @@ function RemoveButton(props) {
|
|
|
299
310
|
IconButton,
|
|
300
311
|
{
|
|
301
312
|
title: translateString(TranslatableString2.RemoveButton),
|
|
302
|
-
...props,
|
|
303
313
|
danger: true,
|
|
304
314
|
block: !!options.block,
|
|
305
315
|
iconType: "primary",
|
|
316
|
+
...props,
|
|
306
317
|
icon: /* @__PURE__ */ jsx6(DeleteOutlined, {})
|
|
307
318
|
}
|
|
308
319
|
);
|
|
@@ -464,6 +475,7 @@ function ObjectFieldTemplate(props) {
|
|
|
464
475
|
formData,
|
|
465
476
|
fieldPathId,
|
|
466
477
|
onAddClick,
|
|
478
|
+
optionalDataControl,
|
|
467
479
|
properties,
|
|
468
480
|
readonly,
|
|
469
481
|
required,
|
|
@@ -480,6 +492,7 @@ function ObjectFieldTemplate(props) {
|
|
|
480
492
|
uiOptions
|
|
481
493
|
);
|
|
482
494
|
const { formContext } = registry;
|
|
495
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
483
496
|
const {
|
|
484
497
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
485
498
|
} = registry.templates;
|
|
@@ -530,7 +543,8 @@ function ObjectFieldTemplate(props) {
|
|
|
530
543
|
required,
|
|
531
544
|
schema,
|
|
532
545
|
uiSchema,
|
|
533
|
-
registry
|
|
546
|
+
registry,
|
|
547
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
534
548
|
}
|
|
535
549
|
) }),
|
|
536
550
|
description && /* @__PURE__ */ jsx11(Col4, { span: 24, style: DESCRIPTION_COL_STYLE2, children: /* @__PURE__ */ jsx11(
|
|
@@ -543,6 +557,7 @@ function ObjectFieldTemplate(props) {
|
|
|
543
557
|
registry
|
|
544
558
|
}
|
|
545
559
|
) }),
|
|
560
|
+
!showOptionalDataControlInTitle ? /* @__PURE__ */ jsx11(Col4, { span: 24, children: optionalDataControl }) : void 0,
|
|
546
561
|
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ jsx11(Col4, { span: calculateColSpan(element), children: element.content }, element.name))
|
|
547
562
|
] }),
|
|
548
563
|
canExpand(schema, uiSchema, formData) && /* @__PURE__ */ jsx11(Col4, { span: 24, children: /* @__PURE__ */ jsx11(Row4, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ jsx11(Col4, { flex: "192px", children: /* @__PURE__ */ jsx11(
|
|
@@ -559,28 +574,65 @@ function ObjectFieldTemplate(props) {
|
|
|
559
574
|
] });
|
|
560
575
|
}
|
|
561
576
|
|
|
577
|
+
// src/templates/OptionalDataControlsTemplate/index.tsx
|
|
578
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
579
|
+
function OptionalDataControlsTemplate(props) {
|
|
580
|
+
const { id, registry, label, onAddClick, onRemoveClick } = props;
|
|
581
|
+
if (onAddClick) {
|
|
582
|
+
return /* @__PURE__ */ jsx12(
|
|
583
|
+
AddButton,
|
|
584
|
+
{
|
|
585
|
+
id,
|
|
586
|
+
registry,
|
|
587
|
+
className: "rjsf-add-optional-data",
|
|
588
|
+
onClick: onAddClick,
|
|
589
|
+
title: label,
|
|
590
|
+
size: "small",
|
|
591
|
+
iconType: "default",
|
|
592
|
+
block: false
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
} else if (onRemoveClick) {
|
|
596
|
+
return /* @__PURE__ */ jsx12(
|
|
597
|
+
RemoveButton,
|
|
598
|
+
{
|
|
599
|
+
id,
|
|
600
|
+
registry,
|
|
601
|
+
className: "rjsf-remove-optional-data",
|
|
602
|
+
onClick: onRemoveClick,
|
|
603
|
+
title: label,
|
|
604
|
+
size: "small",
|
|
605
|
+
iconType: "default",
|
|
606
|
+
block: false
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
return /* @__PURE__ */ jsx12("em", { id, children: label });
|
|
611
|
+
}
|
|
612
|
+
|
|
562
613
|
// src/templates/SubmitButton/index.tsx
|
|
563
614
|
import { Button as Button2 } from "antd";
|
|
564
615
|
import { getSubmitButtonOptions } from "@rjsf/utils";
|
|
565
|
-
import { jsx as
|
|
616
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
566
617
|
function SubmitButton({ uiSchema }) {
|
|
567
618
|
const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(uiSchema);
|
|
568
619
|
if (norender) {
|
|
569
620
|
return null;
|
|
570
621
|
}
|
|
571
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ jsx13(Button2, { type: "submit", ...submitButtonProps, htmlType: "submit", children: submitText });
|
|
572
623
|
}
|
|
573
624
|
|
|
574
625
|
// src/templates/TitleField/index.tsx
|
|
575
626
|
import classNames3 from "classnames";
|
|
576
|
-
import { ConfigProvider as ConfigProvider3 } from "antd";
|
|
627
|
+
import { Col as Col5, Divider, Row as Row5, ConfigProvider as ConfigProvider3 } from "antd";
|
|
577
628
|
import { useContext as useContext3 } from "react";
|
|
578
|
-
import { jsx as
|
|
629
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
579
630
|
function TitleField({
|
|
580
631
|
id,
|
|
581
632
|
required,
|
|
582
633
|
registry,
|
|
583
|
-
title
|
|
634
|
+
title,
|
|
635
|
+
optionalDataControl
|
|
584
636
|
}) {
|
|
585
637
|
const { formContext } = registry;
|
|
586
638
|
const { colon = true } = formContext;
|
|
@@ -603,7 +655,7 @@ function TitleField({
|
|
|
603
655
|
[`${prefixCls}-item-required`]: required,
|
|
604
656
|
[`${prefixCls}-item-no-colon`]: !colon
|
|
605
657
|
});
|
|
606
|
-
|
|
658
|
+
let heading = title ? /* @__PURE__ */ jsx14(
|
|
607
659
|
"label",
|
|
608
660
|
{
|
|
609
661
|
className: labelClassName,
|
|
@@ -613,17 +665,30 @@ function TitleField({
|
|
|
613
665
|
children: labelChildren
|
|
614
666
|
}
|
|
615
667
|
) : null;
|
|
668
|
+
if (optionalDataControl) {
|
|
669
|
+
heading = /* @__PURE__ */ jsxs7(Row5, { children: [
|
|
670
|
+
/* @__PURE__ */ jsx14(Col5, { flex: "auto", children: heading }),
|
|
671
|
+
/* @__PURE__ */ jsx14(Col5, { flex: "none", children: optionalDataControl })
|
|
672
|
+
] });
|
|
673
|
+
}
|
|
674
|
+
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
675
|
+
heading,
|
|
676
|
+
/* @__PURE__ */ jsx14(Divider, { size: "small", style: {
|
|
677
|
+
marginBlock: "1px"
|
|
678
|
+
/* pull the margin right up against the label */
|
|
679
|
+
} })
|
|
680
|
+
] });
|
|
616
681
|
}
|
|
617
682
|
|
|
618
683
|
// src/templates/WrapIfAdditionalTemplate/index.tsx
|
|
619
|
-
import { Col as
|
|
684
|
+
import { Col as Col6, Row as Row6, Form as Form2, Input as Input2 } from "antd";
|
|
620
685
|
import {
|
|
621
686
|
ADDITIONAL_PROPERTY_FLAG,
|
|
622
687
|
UI_OPTIONS_KEY,
|
|
623
688
|
TranslatableString as TranslatableString3,
|
|
624
689
|
buttonId as buttonId3
|
|
625
690
|
} from "@rjsf/utils";
|
|
626
|
-
import { jsx as
|
|
691
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
627
692
|
var VERTICAL_LABEL_COL2 = { span: 24 };
|
|
628
693
|
var VERTICAL_WRAPPER_COL2 = { span: 24 };
|
|
629
694
|
var INPUT_STYLE2 = {
|
|
@@ -659,7 +724,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
659
724
|
const keyLabel = translateString(TranslatableString3.KeyLabel, [label]);
|
|
660
725
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
661
726
|
if (!additional) {
|
|
662
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx15("div", { className: classNames4, style, children });
|
|
663
728
|
}
|
|
664
729
|
const handleBlur = ({ target }) => onKeyChange(target && target.value);
|
|
665
730
|
const uiOptions = uiSchema ? uiSchema[UI_OPTIONS_KEY] : {};
|
|
@@ -667,8 +732,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
667
732
|
...uiSchema,
|
|
668
733
|
[UI_OPTIONS_KEY]: { ...uiOptions, block: true }
|
|
669
734
|
};
|
|
670
|
-
return /* @__PURE__ */
|
|
671
|
-
/* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ jsx15("div", { className: classNames4, style, children: /* @__PURE__ */ jsxs8(Row6, { align: toolbarAlign, gutter: rowGutter, children: [
|
|
736
|
+
/* @__PURE__ */ jsx15(Col6, { className: "form-additional", flex: "1", children: /* @__PURE__ */ jsx15("div", { className: "form-group", children: /* @__PURE__ */ jsx15(
|
|
672
737
|
Form2.Item,
|
|
673
738
|
{
|
|
674
739
|
colon,
|
|
@@ -680,7 +745,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
680
745
|
required,
|
|
681
746
|
style: wrapperStyle,
|
|
682
747
|
wrapperCol,
|
|
683
|
-
children: /* @__PURE__ */
|
|
748
|
+
children: /* @__PURE__ */ jsx15(
|
|
684
749
|
Input2,
|
|
685
750
|
{
|
|
686
751
|
className: "form-control",
|
|
@@ -695,8 +760,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
695
760
|
)
|
|
696
761
|
}
|
|
697
762
|
) }) }),
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ jsx15(Col6, { className: "form-additional", flex: "1", children }),
|
|
764
|
+
/* @__PURE__ */ jsx15(Col6, { flex: "192px", children: /* @__PURE__ */ jsx15(
|
|
700
765
|
RemoveButton2,
|
|
701
766
|
{
|
|
702
767
|
id: buttonId3(id, "remove"),
|
|
@@ -731,6 +796,7 @@ function generateTemplates() {
|
|
|
731
796
|
GridTemplate,
|
|
732
797
|
MultiSchemaFieldTemplate,
|
|
733
798
|
ObjectFieldTemplate,
|
|
799
|
+
OptionalDataControlsTemplate,
|
|
734
800
|
TitleFieldTemplate: TitleField,
|
|
735
801
|
WrapIfAdditionalTemplate
|
|
736
802
|
};
|
|
@@ -739,7 +805,7 @@ var templates_default = generateTemplates();
|
|
|
739
805
|
|
|
740
806
|
// src/widgets/AltDateWidget/index.tsx
|
|
741
807
|
import { useEffect, useState } from "react";
|
|
742
|
-
import { Row as
|
|
808
|
+
import { Row as Row7, Col as Col7, Button as Button3 } from "antd";
|
|
743
809
|
import {
|
|
744
810
|
ariaDescribedByIds as ariaDescribedByIds2,
|
|
745
811
|
dateRangeOptions,
|
|
@@ -748,7 +814,7 @@ import {
|
|
|
748
814
|
toDateString,
|
|
749
815
|
TranslatableString as TranslatableString4
|
|
750
816
|
} from "@rjsf/utils";
|
|
751
|
-
import { jsx as
|
|
817
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
752
818
|
var readyForChange = (state) => {
|
|
753
819
|
return Object.values(state).every((value) => value !== -1);
|
|
754
820
|
};
|
|
@@ -800,7 +866,7 @@ function AltDateWidget(props) {
|
|
|
800
866
|
}
|
|
801
867
|
onChange(void 0);
|
|
802
868
|
};
|
|
803
|
-
const renderDateElement = (elemProps) => /* @__PURE__ */
|
|
869
|
+
const renderDateElement = (elemProps) => /* @__PURE__ */ jsx16(
|
|
804
870
|
SelectWidget2,
|
|
805
871
|
{
|
|
806
872
|
autofocus: elemProps.autofocus,
|
|
@@ -823,7 +889,7 @@ function AltDateWidget(props) {
|
|
|
823
889
|
"aria-describedby": ariaDescribedByIds2(id)
|
|
824
890
|
}
|
|
825
891
|
);
|
|
826
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ jsxs9(Row7, { gutter: [Math.floor(rowGutter / 2), Math.floor(rowGutter / 2)], children: [
|
|
827
893
|
getDateElementProps(
|
|
828
894
|
state,
|
|
829
895
|
showTime,
|
|
@@ -831,7 +897,7 @@ function AltDateWidget(props) {
|
|
|
831
897
|
options.format
|
|
832
898
|
).map((elemProps, i) => {
|
|
833
899
|
const elemId = id + "_" + elemProps.type;
|
|
834
|
-
return /* @__PURE__ */
|
|
900
|
+
return /* @__PURE__ */ jsx16(Col7, { flex: "88px", children: renderDateElement({
|
|
835
901
|
...elemProps,
|
|
836
902
|
autofocus: autofocus && i === 0,
|
|
837
903
|
disabled,
|
|
@@ -847,8 +913,8 @@ function AltDateWidget(props) {
|
|
|
847
913
|
value: elemProps.value || -1 < 0 ? void 0 : elemProps.value
|
|
848
914
|
}) }, elemId);
|
|
849
915
|
}),
|
|
850
|
-
!options.hideNowButton && /* @__PURE__ */
|
|
851
|
-
!options.hideClearButton && /* @__PURE__ */
|
|
916
|
+
!options.hideNowButton && /* @__PURE__ */ jsx16(Col7, { flex: "88px", children: /* @__PURE__ */ jsx16(Button3, { block: true, className: "btn-now", onClick: handleNow, type: "primary", children: translateString(TranslatableString4.NowLabel) }) }),
|
|
917
|
+
!options.hideClearButton && /* @__PURE__ */ jsx16(Col7, { flex: "88px", children: /* @__PURE__ */ jsx16(Button3, { block: true, className: "btn-clear", danger: true, onClick: handleClear, type: "primary", children: translateString(TranslatableString4.ClearLabel) }) })
|
|
852
918
|
] });
|
|
853
919
|
}
|
|
854
920
|
AltDateWidget.defaultProps = {
|
|
@@ -862,10 +928,10 @@ AltDateWidget.defaultProps = {
|
|
|
862
928
|
};
|
|
863
929
|
|
|
864
930
|
// src/widgets/AltDateTimeWidget/index.tsx
|
|
865
|
-
import { jsx as
|
|
931
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
866
932
|
function AltDateTimeWidget(props) {
|
|
867
933
|
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
868
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsx17(AltDateWidget2, { showTime: true, ...props });
|
|
869
935
|
}
|
|
870
936
|
AltDateTimeWidget.defaultProps = {
|
|
871
937
|
...AltDateWidget.defaultProps,
|
|
@@ -880,7 +946,7 @@ import {
|
|
|
880
946
|
enumOptionsValueForIndex,
|
|
881
947
|
optionId
|
|
882
948
|
} from "@rjsf/utils";
|
|
883
|
-
import { Fragment as
|
|
949
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
884
950
|
function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
|
|
885
951
|
const { readonlyAsDisabled = true } = formContext;
|
|
886
952
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
@@ -893,7 +959,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
893
959
|
onFocus: !readonly ? handleFocus : void 0
|
|
894
960
|
};
|
|
895
961
|
const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, true);
|
|
896
|
-
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */
|
|
962
|
+
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ jsx18(Fragment3, { children: /* @__PURE__ */ jsx18(
|
|
897
963
|
Checkbox.Group,
|
|
898
964
|
{
|
|
899
965
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -902,8 +968,8 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
902
968
|
value: selectedIndexes,
|
|
903
969
|
...extraProps,
|
|
904
970
|
"aria-describedby": ariaDescribedByIds3(id),
|
|
905
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
971
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ jsxs10("span", { children: [
|
|
972
|
+
/* @__PURE__ */ jsx18(
|
|
907
973
|
Checkbox,
|
|
908
974
|
{
|
|
909
975
|
id: optionId(id, i),
|
|
@@ -914,7 +980,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
914
980
|
children: option.label
|
|
915
981
|
}
|
|
916
982
|
),
|
|
917
|
-
!inline && /* @__PURE__ */
|
|
983
|
+
!inline && /* @__PURE__ */ jsx18("br", {})
|
|
918
984
|
] }, i))
|
|
919
985
|
}
|
|
920
986
|
) }) : null;
|
|
@@ -926,7 +992,7 @@ import {
|
|
|
926
992
|
ariaDescribedByIds as ariaDescribedByIds4,
|
|
927
993
|
labelValue
|
|
928
994
|
} from "@rjsf/utils";
|
|
929
|
-
import { jsx as
|
|
995
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
930
996
|
function CheckboxWidget(props) {
|
|
931
997
|
const { autofocus, disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value } = props;
|
|
932
998
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -937,7 +1003,7 @@ function CheckboxWidget(props) {
|
|
|
937
1003
|
onBlur: !readonly ? handleBlur : void 0,
|
|
938
1004
|
onFocus: !readonly ? handleFocus : void 0
|
|
939
1005
|
};
|
|
940
|
-
return /* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsx19(
|
|
941
1007
|
Checkbox2,
|
|
942
1008
|
{
|
|
943
1009
|
autoFocus: autofocus,
|
|
@@ -959,7 +1025,7 @@ import {
|
|
|
959
1025
|
ariaDescribedByIds as ariaDescribedByIds5
|
|
960
1026
|
} from "@rjsf/utils";
|
|
961
1027
|
import { DatePicker } from "antd";
|
|
962
|
-
import { jsx as
|
|
1028
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
963
1029
|
var DATE_PICKER_STYLE = {
|
|
964
1030
|
width: "100%"
|
|
965
1031
|
};
|
|
@@ -970,7 +1036,7 @@ function DateTimeWidget(props) {
|
|
|
970
1036
|
const handleBlur = () => onBlur(id, value);
|
|
971
1037
|
const handleFocus = () => onFocus(id, value);
|
|
972
1038
|
const getPopupContainer = (node) => node.parentNode;
|
|
973
|
-
return /* @__PURE__ */
|
|
1039
|
+
return /* @__PURE__ */ jsx20(
|
|
974
1040
|
DatePicker,
|
|
975
1041
|
{
|
|
976
1042
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -995,7 +1061,7 @@ import {
|
|
|
995
1061
|
ariaDescribedByIds as ariaDescribedByIds6
|
|
996
1062
|
} from "@rjsf/utils";
|
|
997
1063
|
import { DatePicker as DatePicker2 } from "antd";
|
|
998
|
-
import { jsx as
|
|
1064
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
999
1065
|
var DATE_PICKER_STYLE2 = {
|
|
1000
1066
|
width: "100%"
|
|
1001
1067
|
};
|
|
@@ -1006,7 +1072,7 @@ function DateWidget(props) {
|
|
|
1006
1072
|
const handleBlur = () => onBlur(id, value);
|
|
1007
1073
|
const handleFocus = () => onFocus(id, value);
|
|
1008
1074
|
const getPopupContainer = (node) => node.parentNode;
|
|
1009
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsx21(
|
|
1010
1076
|
DatePicker2,
|
|
1011
1077
|
{
|
|
1012
1078
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1030,7 +1096,7 @@ import { Input as Input3 } from "antd";
|
|
|
1030
1096
|
import {
|
|
1031
1097
|
ariaDescribedByIds as ariaDescribedByIds7
|
|
1032
1098
|
} from "@rjsf/utils";
|
|
1033
|
-
import { jsx as
|
|
1099
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1034
1100
|
function PasswordWidget(props) {
|
|
1035
1101
|
const { disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, value } = props;
|
|
1036
1102
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -1038,7 +1104,7 @@ function PasswordWidget(props) {
|
|
|
1038
1104
|
const handleChange = ({ target }) => onChange(target.value === "" ? emptyValue : target.value);
|
|
1039
1105
|
const handleBlur = ({ target }) => onBlur(id, target.value);
|
|
1040
1106
|
const handleFocus = ({ target }) => onFocus(id, target.value);
|
|
1041
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsx22(
|
|
1042
1108
|
Input3.Password,
|
|
1043
1109
|
{
|
|
1044
1110
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1062,7 +1128,7 @@ import {
|
|
|
1062
1128
|
enumOptionsValueForIndex as enumOptionsValueForIndex2,
|
|
1063
1129
|
optionId as optionId2
|
|
1064
1130
|
} from "@rjsf/utils";
|
|
1065
|
-
import { jsx as
|
|
1131
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1066
1132
|
function RadioWidget({
|
|
1067
1133
|
autofocus,
|
|
1068
1134
|
disabled,
|
|
@@ -1081,7 +1147,7 @@ function RadioWidget({
|
|
|
1081
1147
|
const handleBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
|
|
1082
1148
|
const handleFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
|
|
1083
1149
|
const selectedIndexes = enumOptionsIndexForValue2(value, enumOptions);
|
|
1084
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ jsx23(
|
|
1085
1151
|
Radio.Group,
|
|
1086
1152
|
{
|
|
1087
1153
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1092,7 +1158,7 @@ function RadioWidget({
|
|
|
1092
1158
|
onFocus: !readonly ? handleFocus : void 0,
|
|
1093
1159
|
value: selectedIndexes,
|
|
1094
1160
|
"aria-describedby": ariaDescribedByIds8(id),
|
|
1095
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */
|
|
1161
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ jsx23(
|
|
1096
1162
|
Radio,
|
|
1097
1163
|
{
|
|
1098
1164
|
id: optionId2(id, i),
|
|
@@ -1114,7 +1180,7 @@ import {
|
|
|
1114
1180
|
ariaDescribedByIds as ariaDescribedByIds9,
|
|
1115
1181
|
rangeSpec
|
|
1116
1182
|
} from "@rjsf/utils";
|
|
1117
|
-
import { jsx as
|
|
1183
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1118
1184
|
function RangeWidget(props) {
|
|
1119
1185
|
const {
|
|
1120
1186
|
autofocus,
|
|
@@ -1141,7 +1207,7 @@ function RangeWidget(props) {
|
|
|
1141
1207
|
onBlur: !readonly ? handleBlur : void 0,
|
|
1142
1208
|
onFocus: !readonly ? handleFocus : void 0
|
|
1143
1209
|
};
|
|
1144
|
-
return /* @__PURE__ */
|
|
1210
|
+
return /* @__PURE__ */ jsx24(
|
|
1145
1211
|
Slider,
|
|
1146
1212
|
{
|
|
1147
1213
|
autoFocus: autofocus,
|
|
@@ -1168,7 +1234,7 @@ import {
|
|
|
1168
1234
|
} from "@rjsf/utils";
|
|
1169
1235
|
import isString2 from "lodash/isString";
|
|
1170
1236
|
import { useMemo } from "react";
|
|
1171
|
-
import { jsx as
|
|
1237
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1172
1238
|
var SELECT_STYLE = {
|
|
1173
1239
|
width: "100%"
|
|
1174
1240
|
};
|
|
@@ -1219,7 +1285,7 @@ function SelectWidget({
|
|
|
1219
1285
|
}
|
|
1220
1286
|
return void 0;
|
|
1221
1287
|
}, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
|
|
1222
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ jsx25(
|
|
1223
1289
|
Select,
|
|
1224
1290
|
{
|
|
1225
1291
|
autoFocus: autofocus,
|
|
@@ -1246,7 +1312,7 @@ import { Input as Input4 } from "antd";
|
|
|
1246
1312
|
import {
|
|
1247
1313
|
ariaDescribedByIds as ariaDescribedByIds11
|
|
1248
1314
|
} from "@rjsf/utils";
|
|
1249
|
-
import { jsx as
|
|
1315
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1250
1316
|
var INPUT_STYLE3 = {
|
|
1251
1317
|
width: "100%"
|
|
1252
1318
|
};
|
|
@@ -1269,7 +1335,7 @@ function TextareaWidget({
|
|
|
1269
1335
|
const extraProps = {
|
|
1270
1336
|
type: "textarea"
|
|
1271
1337
|
};
|
|
1272
|
-
return /* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ jsx26(
|
|
1273
1339
|
Input4.TextArea,
|
|
1274
1340
|
{
|
|
1275
1341
|
disabled: disabled || readonlyAsDisabled && readonly,
|