@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.
- package/README.md +6 -4
- package/dist/antd.esm.js +73 -62
- package/dist/antd.esm.js.map +4 -4
- package/dist/antd.umd.js +23 -15
- package/dist/{index.js → index.cjs} +74 -63
- package/dist/index.cjs.map +7 -0
- package/lib/templates/ArrayFieldTemplate/index.js +4 -3
- package/lib/templates/ArrayFieldTemplate/index.js.map +1 -1
- package/lib/templates/BaseInputTemplate/index.js.map +1 -1
- package/lib/templates/FieldErrorTemplate/index.js +2 -2
- package/lib/templates/FieldErrorTemplate/index.js.map +1 -1
- package/lib/templates/FieldTemplate/index.js +2 -1
- package/lib/templates/FieldTemplate/index.js.map +1 -1
- package/lib/templates/MultiSchemaFieldTemplate/index.d.ts +2 -0
- package/lib/templates/MultiSchemaFieldTemplate/index.js +6 -0
- package/lib/templates/MultiSchemaFieldTemplate/index.js.map +1 -0
- package/lib/templates/ObjectFieldTemplate/index.js +4 -3
- package/lib/templates/ObjectFieldTemplate/index.js.map +1 -1
- package/lib/templates/WrapIfAdditionalTemplate/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/lib/widgets/AltDateWidget/index.js.map +1 -1
- package/lib/widgets/CheckboxWidget/index.js.map +1 -1
- package/lib/widgets/CheckboxesWidget/index.js.map +1 -1
- package/lib/widgets/DateTimeWidget/index.js.map +1 -1
- package/lib/widgets/DateWidget/index.js.map +1 -1
- package/lib/widgets/PasswordWidget/index.js.map +1 -1
- package/lib/widgets/RadioWidget/index.js.map +1 -1
- package/lib/widgets/RangeWidget/index.js.map +1 -1
- package/lib/widgets/SelectWidget/index.js.map +1 -1
- package/lib/widgets/TextareaWidget/index.js.map +1 -1
- package/package.json +20 -20
- package/src/templates/ArrayFieldTemplate/index.tsx +6 -6
- package/src/templates/BaseInputTemplate/index.tsx +5 -5
- package/src/templates/FieldErrorTemplate/index.tsx +2 -2
- package/src/templates/FieldTemplate/index.tsx +1 -1
- package/src/templates/MultiSchemaFieldTemplate/index.tsx +16 -0
- package/src/templates/ObjectFieldTemplate/index.tsx +6 -6
- package/src/templates/WrapIfAdditionalTemplate/index.tsx +1 -1
- package/src/templates/index.ts +2 -0
- package/src/widgets/AltDateWidget/index.tsx +1 -1
- package/src/widgets/CheckboxWidget/index.tsx +1 -1
- package/src/widgets/CheckboxesWidget/index.tsx +1 -1
- package/src/widgets/DateTimeWidget/index.tsx +1 -1
- package/src/widgets/DateWidget/index.tsx +1 -1
- package/src/widgets/PasswordWidget/index.tsx +1 -1
- package/src/widgets/RadioWidget/index.tsx +1 -1
- package/src/widgets/RangeWidget/index.tsx +1 -1
- package/src/widgets/SelectWidget/index.tsx +1 -1
- package/src/widgets/TextareaWidget/index.tsx +1 -1
- package/dist/index.js.map +0 -7
package/README.md
CHANGED
|
@@ -58,13 +58,15 @@ Ant Design theme, fields and widgets for `react-jsonschema-form`.
|
|
|
58
58
|
|
|
59
59
|
### Prerequisites
|
|
60
60
|
|
|
61
|
-
- `antd >=
|
|
62
|
-
- `@ant-design/icons >=
|
|
61
|
+
- `antd >= 5`
|
|
62
|
+
- `@ant-design/icons >= 5`
|
|
63
63
|
- `dayjs >= 1.8.0`
|
|
64
|
-
- `@rjsf/core >=
|
|
64
|
+
- `@rjsf/core >= 6`
|
|
65
|
+
- `@rjsf/utils >= 6`
|
|
66
|
+
- `@rjsf/validator-ajv8 >= 6`
|
|
65
67
|
|
|
66
68
|
```sh
|
|
67
|
-
npm install antd @ant-design/icons dayjs @rjsf/core
|
|
69
|
+
npm install antd @ant-design/icons dayjs @rjsf/core @rjsf/utils @rjsf/validator-ajv8
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
### Installation
|
package/dist/antd.esm.js
CHANGED
|
@@ -47,8 +47,7 @@ function ArrayFieldTemplate(props) {
|
|
|
47
47
|
canAdd,
|
|
48
48
|
className,
|
|
49
49
|
disabled,
|
|
50
|
-
|
|
51
|
-
idSchema,
|
|
50
|
+
fieldPathId,
|
|
52
51
|
items,
|
|
53
52
|
onAddClick,
|
|
54
53
|
readonly,
|
|
@@ -74,6 +73,7 @@ function ArrayFieldTemplate(props) {
|
|
|
74
73
|
registry,
|
|
75
74
|
uiOptions
|
|
76
75
|
);
|
|
76
|
+
const { formContext } = registry;
|
|
77
77
|
const {
|
|
78
78
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
79
79
|
} = registry.templates;
|
|
@@ -86,11 +86,11 @@ function ArrayFieldTemplate(props) {
|
|
|
86
86
|
labelAlign === "left" && `${labelClsBasic}-left`
|
|
87
87
|
// labelCol.className,
|
|
88
88
|
);
|
|
89
|
-
return /* @__PURE__ */ jsx2("fieldset", { className, id:
|
|
89
|
+
return /* @__PURE__ */ jsx2("fieldset", { className, id: fieldPathId.$id, children: /* @__PURE__ */ jsxs2(Row2, { gutter: rowGutter, children: [
|
|
90
90
|
(uiOptions.title || title) && /* @__PURE__ */ jsx2(Col2, { className: labelColClassName, span: 24, children: /* @__PURE__ */ jsx2(
|
|
91
91
|
ArrayFieldTitleTemplate,
|
|
92
92
|
{
|
|
93
|
-
|
|
93
|
+
fieldPathId,
|
|
94
94
|
required,
|
|
95
95
|
title: uiOptions.title || title,
|
|
96
96
|
schema,
|
|
@@ -102,7 +102,7 @@ function ArrayFieldTemplate(props) {
|
|
|
102
102
|
ArrayFieldDescriptionTemplate,
|
|
103
103
|
{
|
|
104
104
|
description: uiOptions.description || schema.description,
|
|
105
|
-
|
|
105
|
+
fieldPathId,
|
|
106
106
|
schema,
|
|
107
107
|
uiSchema,
|
|
108
108
|
registry
|
|
@@ -112,7 +112,7 @@ function ArrayFieldTemplate(props) {
|
|
|
112
112
|
canAdd && /* @__PURE__ */ jsx2(Col2, { span: 24, children: /* @__PURE__ */ jsx2(Row2, { gutter: rowGutter, justify: "end", children: /* @__PURE__ */ jsx2(Col2, { flex: "192px", children: /* @__PURE__ */ jsx2(
|
|
113
113
|
AddButton2,
|
|
114
114
|
{
|
|
115
|
-
id: buttonId(
|
|
115
|
+
id: buttonId(fieldPathId, "add"),
|
|
116
116
|
className: "rjsf-array-item-add",
|
|
117
117
|
disabled: disabled || readonly,
|
|
118
118
|
onClick: onAddClick,
|
|
@@ -312,11 +312,11 @@ function RemoveButton(props) {
|
|
|
312
312
|
import { errorId } from "@rjsf/utils";
|
|
313
313
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
314
314
|
function FieldErrorTemplate(props) {
|
|
315
|
-
const { errors = [],
|
|
315
|
+
const { errors = [], fieldPathId } = props;
|
|
316
316
|
if (errors.length === 0) {
|
|
317
317
|
return null;
|
|
318
318
|
}
|
|
319
|
-
const id = errorId(
|
|
319
|
+
const id = errorId(fieldPathId);
|
|
320
320
|
return /* @__PURE__ */ jsx7("div", { id, children: errors.map((error) => /* @__PURE__ */ jsx7("div", { children: error }, `field-${id}-error-${error}`)) });
|
|
321
321
|
}
|
|
322
322
|
|
|
@@ -338,7 +338,6 @@ function FieldTemplate(props) {
|
|
|
338
338
|
disabled,
|
|
339
339
|
displayLabel,
|
|
340
340
|
errors,
|
|
341
|
-
formContext,
|
|
342
341
|
help,
|
|
343
342
|
hidden,
|
|
344
343
|
id,
|
|
@@ -354,6 +353,7 @@ function FieldTemplate(props) {
|
|
|
354
353
|
schema,
|
|
355
354
|
uiSchema
|
|
356
355
|
} = props;
|
|
356
|
+
const { formContext } = registry;
|
|
357
357
|
const {
|
|
358
358
|
colon,
|
|
359
359
|
labelCol = VERTICAL_LABEL_COL,
|
|
@@ -428,6 +428,16 @@ function GridTemplate(props) {
|
|
|
428
428
|
return /* @__PURE__ */ jsx9(Row3, { ...rest, children });
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
+
// src/templates/MultiSchemaFieldTemplate/index.tsx
|
|
432
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
433
|
+
function MultiSchemaFieldTemplate(props) {
|
|
434
|
+
const { optionSchemaField, selector } = props;
|
|
435
|
+
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
436
|
+
/* @__PURE__ */ jsx10("div", { children: selector }),
|
|
437
|
+
optionSchemaField
|
|
438
|
+
] });
|
|
439
|
+
}
|
|
440
|
+
|
|
431
441
|
// src/templates/ObjectFieldTemplate/index.tsx
|
|
432
442
|
import classNames2 from "classnames";
|
|
433
443
|
import isObject from "lodash/isObject";
|
|
@@ -443,7 +453,7 @@ import {
|
|
|
443
453
|
} from "@rjsf/utils";
|
|
444
454
|
import { Col as Col4, Row as Row4, ConfigProvider as ConfigProvider2 } from "antd";
|
|
445
455
|
import { useContext as useContext2 } from "react";
|
|
446
|
-
import { jsx as
|
|
456
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
447
457
|
var DESCRIPTION_COL_STYLE2 = {
|
|
448
458
|
paddingBottom: "8px"
|
|
449
459
|
};
|
|
@@ -451,9 +461,8 @@ function ObjectFieldTemplate(props) {
|
|
|
451
461
|
const {
|
|
452
462
|
description,
|
|
453
463
|
disabled,
|
|
454
|
-
formContext,
|
|
455
464
|
formData,
|
|
456
|
-
|
|
465
|
+
fieldPathId,
|
|
457
466
|
onAddClick,
|
|
458
467
|
properties,
|
|
459
468
|
readonly,
|
|
@@ -470,6 +479,7 @@ function ObjectFieldTemplate(props) {
|
|
|
470
479
|
registry,
|
|
471
480
|
uiOptions
|
|
472
481
|
);
|
|
482
|
+
const { formContext } = registry;
|
|
473
483
|
const {
|
|
474
484
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
475
485
|
} = registry.templates;
|
|
@@ -510,12 +520,12 @@ function ObjectFieldTemplate(props) {
|
|
|
510
520
|
labelAlign === "left" && `${labelClsBasic}-left`
|
|
511
521
|
// labelCol.className,
|
|
512
522
|
);
|
|
513
|
-
return /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
title && /* @__PURE__ */
|
|
523
|
+
return /* @__PURE__ */ jsxs6("fieldset", { id: fieldPathId.$id, children: [
|
|
524
|
+
/* @__PURE__ */ jsxs6(Row4, { gutter: rowGutter, children: [
|
|
525
|
+
title && /* @__PURE__ */ jsx11(Col4, { className: labelColClassName, span: 24, children: /* @__PURE__ */ jsx11(
|
|
516
526
|
TitleFieldTemplate,
|
|
517
527
|
{
|
|
518
|
-
id: titleId(
|
|
528
|
+
id: titleId(fieldPathId),
|
|
519
529
|
title,
|
|
520
530
|
required,
|
|
521
531
|
schema,
|
|
@@ -523,22 +533,22 @@ function ObjectFieldTemplate(props) {
|
|
|
523
533
|
registry
|
|
524
534
|
}
|
|
525
535
|
) }),
|
|
526
|
-
description && /* @__PURE__ */
|
|
536
|
+
description && /* @__PURE__ */ jsx11(Col4, { span: 24, style: DESCRIPTION_COL_STYLE2, children: /* @__PURE__ */ jsx11(
|
|
527
537
|
DescriptionFieldTemplate,
|
|
528
538
|
{
|
|
529
|
-
id: descriptionId(
|
|
539
|
+
id: descriptionId(fieldPathId),
|
|
530
540
|
description,
|
|
531
541
|
schema,
|
|
532
542
|
uiSchema,
|
|
533
543
|
registry
|
|
534
544
|
}
|
|
535
545
|
) }),
|
|
536
|
-
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */
|
|
546
|
+
properties.filter((e) => !e.hidden).map((element) => /* @__PURE__ */ jsx11(Col4, { span: calculateColSpan(element), children: element.content }, element.name))
|
|
537
547
|
] }),
|
|
538
|
-
canExpand(schema, uiSchema, formData) && /* @__PURE__ */
|
|
548
|
+
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(
|
|
539
549
|
AddButton2,
|
|
540
550
|
{
|
|
541
|
-
id: buttonId2(
|
|
551
|
+
id: buttonId2(fieldPathId, "add"),
|
|
542
552
|
className: "rjsf-object-property-expand",
|
|
543
553
|
disabled: disabled || readonly,
|
|
544
554
|
onClick: onAddClick(schema),
|
|
@@ -552,20 +562,20 @@ function ObjectFieldTemplate(props) {
|
|
|
552
562
|
// src/templates/SubmitButton/index.tsx
|
|
553
563
|
import { Button as Button2 } from "antd";
|
|
554
564
|
import { getSubmitButtonOptions } from "@rjsf/utils";
|
|
555
|
-
import { jsx as
|
|
565
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
556
566
|
function SubmitButton({ uiSchema }) {
|
|
557
567
|
const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(uiSchema);
|
|
558
568
|
if (norender) {
|
|
559
569
|
return null;
|
|
560
570
|
}
|
|
561
|
-
return /* @__PURE__ */
|
|
571
|
+
return /* @__PURE__ */ jsx12(Button2, { type: "submit", ...submitButtonProps, htmlType: "submit", children: submitText });
|
|
562
572
|
}
|
|
563
573
|
|
|
564
574
|
// src/templates/TitleField/index.tsx
|
|
565
575
|
import classNames3 from "classnames";
|
|
566
576
|
import { ConfigProvider as ConfigProvider3 } from "antd";
|
|
567
577
|
import { useContext as useContext3 } from "react";
|
|
568
|
-
import { jsx as
|
|
578
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
569
579
|
function TitleField({
|
|
570
580
|
id,
|
|
571
581
|
required,
|
|
@@ -593,7 +603,7 @@ function TitleField({
|
|
|
593
603
|
[`${prefixCls}-item-required`]: required,
|
|
594
604
|
[`${prefixCls}-item-no-colon`]: !colon
|
|
595
605
|
});
|
|
596
|
-
return title ? /* @__PURE__ */
|
|
606
|
+
return title ? /* @__PURE__ */ jsx13(
|
|
597
607
|
"label",
|
|
598
608
|
{
|
|
599
609
|
className: labelClassName,
|
|
@@ -613,7 +623,7 @@ import {
|
|
|
613
623
|
TranslatableString as TranslatableString3,
|
|
614
624
|
buttonId as buttonId3
|
|
615
625
|
} from "@rjsf/utils";
|
|
616
|
-
import { jsx as
|
|
626
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
617
627
|
var VERTICAL_LABEL_COL2 = { span: 24 };
|
|
618
628
|
var VERTICAL_WRAPPER_COL2 = { span: 24 };
|
|
619
629
|
var INPUT_STYLE2 = {
|
|
@@ -649,7 +659,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
649
659
|
const keyLabel = translateString(TranslatableString3.KeyLabel, [label]);
|
|
650
660
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
651
661
|
if (!additional) {
|
|
652
|
-
return /* @__PURE__ */
|
|
662
|
+
return /* @__PURE__ */ jsx14("div", { className: classNames4, style, children });
|
|
653
663
|
}
|
|
654
664
|
const handleBlur = ({ target }) => onKeyChange(target && target.value);
|
|
655
665
|
const uiOptions = uiSchema ? uiSchema[UI_OPTIONS_KEY] : {};
|
|
@@ -657,8 +667,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
657
667
|
...uiSchema,
|
|
658
668
|
[UI_OPTIONS_KEY]: { ...uiOptions, block: true }
|
|
659
669
|
};
|
|
660
|
-
return /* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
670
|
+
return /* @__PURE__ */ jsx14("div", { className: classNames4, style, children: /* @__PURE__ */ jsxs7(Row5, { align: toolbarAlign, gutter: rowGutter, children: [
|
|
671
|
+
/* @__PURE__ */ jsx14(Col5, { className: "form-additional", flex: "1", children: /* @__PURE__ */ jsx14("div", { className: "form-group", children: /* @__PURE__ */ jsx14(
|
|
662
672
|
Form2.Item,
|
|
663
673
|
{
|
|
664
674
|
colon,
|
|
@@ -670,7 +680,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
670
680
|
required,
|
|
671
681
|
style: wrapperStyle,
|
|
672
682
|
wrapperCol,
|
|
673
|
-
children: /* @__PURE__ */
|
|
683
|
+
children: /* @__PURE__ */ jsx14(
|
|
674
684
|
Input2,
|
|
675
685
|
{
|
|
676
686
|
className: "form-control",
|
|
@@ -685,8 +695,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
685
695
|
)
|
|
686
696
|
}
|
|
687
697
|
) }) }),
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ jsx14(Col5, { className: "form-additional", flex: "1", children }),
|
|
699
|
+
/* @__PURE__ */ jsx14(Col5, { flex: "192px", children: /* @__PURE__ */ jsx14(
|
|
690
700
|
RemoveButton2,
|
|
691
701
|
{
|
|
692
702
|
id: buttonId3(id, "remove"),
|
|
@@ -719,6 +729,7 @@ function generateTemplates() {
|
|
|
719
729
|
FieldErrorTemplate,
|
|
720
730
|
FieldTemplate,
|
|
721
731
|
GridTemplate,
|
|
732
|
+
MultiSchemaFieldTemplate,
|
|
722
733
|
ObjectFieldTemplate,
|
|
723
734
|
TitleFieldTemplate: TitleField,
|
|
724
735
|
WrapIfAdditionalTemplate
|
|
@@ -737,7 +748,7 @@ import {
|
|
|
737
748
|
toDateString,
|
|
738
749
|
TranslatableString as TranslatableString4
|
|
739
750
|
} from "@rjsf/utils";
|
|
740
|
-
import { jsx as
|
|
751
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
741
752
|
var readyForChange = (state) => {
|
|
742
753
|
return Object.values(state).every((value) => value !== -1);
|
|
743
754
|
};
|
|
@@ -789,7 +800,7 @@ function AltDateWidget(props) {
|
|
|
789
800
|
}
|
|
790
801
|
onChange(void 0);
|
|
791
802
|
};
|
|
792
|
-
const renderDateElement = (elemProps) => /* @__PURE__ */
|
|
803
|
+
const renderDateElement = (elemProps) => /* @__PURE__ */ jsx15(
|
|
793
804
|
SelectWidget2,
|
|
794
805
|
{
|
|
795
806
|
autofocus: elemProps.autofocus,
|
|
@@ -812,7 +823,7 @@ function AltDateWidget(props) {
|
|
|
812
823
|
"aria-describedby": ariaDescribedByIds2(id)
|
|
813
824
|
}
|
|
814
825
|
);
|
|
815
|
-
return /* @__PURE__ */
|
|
826
|
+
return /* @__PURE__ */ jsxs8(Row6, { gutter: [Math.floor(rowGutter / 2), Math.floor(rowGutter / 2)], children: [
|
|
816
827
|
getDateElementProps(
|
|
817
828
|
state,
|
|
818
829
|
showTime,
|
|
@@ -820,7 +831,7 @@ function AltDateWidget(props) {
|
|
|
820
831
|
options.format
|
|
821
832
|
).map((elemProps, i) => {
|
|
822
833
|
const elemId = id + "_" + elemProps.type;
|
|
823
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ jsx15(Col6, { flex: "88px", children: renderDateElement({
|
|
824
835
|
...elemProps,
|
|
825
836
|
autofocus: autofocus && i === 0,
|
|
826
837
|
disabled,
|
|
@@ -836,8 +847,8 @@ function AltDateWidget(props) {
|
|
|
836
847
|
value: elemProps.value || -1 < 0 ? void 0 : elemProps.value
|
|
837
848
|
}) }, elemId);
|
|
838
849
|
}),
|
|
839
|
-
!options.hideNowButton && /* @__PURE__ */
|
|
840
|
-
!options.hideClearButton && /* @__PURE__ */
|
|
850
|
+
!options.hideNowButton && /* @__PURE__ */ jsx15(Col6, { flex: "88px", children: /* @__PURE__ */ jsx15(Button3, { block: true, className: "btn-now", onClick: handleNow, type: "primary", children: translateString(TranslatableString4.NowLabel) }) }),
|
|
851
|
+
!options.hideClearButton && /* @__PURE__ */ jsx15(Col6, { flex: "88px", children: /* @__PURE__ */ jsx15(Button3, { block: true, className: "btn-clear", danger: true, onClick: handleClear, type: "primary", children: translateString(TranslatableString4.ClearLabel) }) })
|
|
841
852
|
] });
|
|
842
853
|
}
|
|
843
854
|
AltDateWidget.defaultProps = {
|
|
@@ -851,10 +862,10 @@ AltDateWidget.defaultProps = {
|
|
|
851
862
|
};
|
|
852
863
|
|
|
853
864
|
// src/widgets/AltDateTimeWidget/index.tsx
|
|
854
|
-
import { jsx as
|
|
865
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
855
866
|
function AltDateTimeWidget(props) {
|
|
856
867
|
const { AltDateWidget: AltDateWidget2 } = props.registry.widgets;
|
|
857
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ jsx16(AltDateWidget2, { showTime: true, ...props });
|
|
858
869
|
}
|
|
859
870
|
AltDateTimeWidget.defaultProps = {
|
|
860
871
|
...AltDateWidget.defaultProps,
|
|
@@ -869,7 +880,7 @@ import {
|
|
|
869
880
|
enumOptionsValueForIndex,
|
|
870
881
|
optionId
|
|
871
882
|
} from "@rjsf/utils";
|
|
872
|
-
import { Fragment as Fragment2, jsx as
|
|
883
|
+
import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
873
884
|
function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
|
|
874
885
|
const { readonlyAsDisabled = true } = formContext;
|
|
875
886
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
@@ -882,7 +893,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
882
893
|
onFocus: !readonly ? handleFocus : void 0
|
|
883
894
|
};
|
|
884
895
|
const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, true);
|
|
885
|
-
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */
|
|
896
|
+
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ jsx17(Fragment2, { children: /* @__PURE__ */ jsx17(
|
|
886
897
|
Checkbox.Group,
|
|
887
898
|
{
|
|
888
899
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -891,8 +902,8 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
891
902
|
value: selectedIndexes,
|
|
892
903
|
...extraProps,
|
|
893
904
|
"aria-describedby": ariaDescribedByIds3(id),
|
|
894
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
905
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ jsxs9("span", { children: [
|
|
906
|
+
/* @__PURE__ */ jsx17(
|
|
896
907
|
Checkbox,
|
|
897
908
|
{
|
|
898
909
|
id: optionId(id, i),
|
|
@@ -903,7 +914,7 @@ function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChan
|
|
|
903
914
|
children: option.label
|
|
904
915
|
}
|
|
905
916
|
),
|
|
906
|
-
!inline && /* @__PURE__ */
|
|
917
|
+
!inline && /* @__PURE__ */ jsx17("br", {})
|
|
907
918
|
] }, i))
|
|
908
919
|
}
|
|
909
920
|
) }) : null;
|
|
@@ -915,7 +926,7 @@ import {
|
|
|
915
926
|
ariaDescribedByIds as ariaDescribedByIds4,
|
|
916
927
|
labelValue
|
|
917
928
|
} from "@rjsf/utils";
|
|
918
|
-
import { jsx as
|
|
929
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
919
930
|
function CheckboxWidget(props) {
|
|
920
931
|
const { autofocus, disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value } = props;
|
|
921
932
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -926,7 +937,7 @@ function CheckboxWidget(props) {
|
|
|
926
937
|
onBlur: !readonly ? handleBlur : void 0,
|
|
927
938
|
onFocus: !readonly ? handleFocus : void 0
|
|
928
939
|
};
|
|
929
|
-
return /* @__PURE__ */
|
|
940
|
+
return /* @__PURE__ */ jsx18(
|
|
930
941
|
Checkbox2,
|
|
931
942
|
{
|
|
932
943
|
autoFocus: autofocus,
|
|
@@ -948,7 +959,7 @@ import {
|
|
|
948
959
|
ariaDescribedByIds as ariaDescribedByIds5
|
|
949
960
|
} from "@rjsf/utils";
|
|
950
961
|
import { DatePicker } from "antd";
|
|
951
|
-
import { jsx as
|
|
962
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
952
963
|
var DATE_PICKER_STYLE = {
|
|
953
964
|
width: "100%"
|
|
954
965
|
};
|
|
@@ -959,7 +970,7 @@ function DateTimeWidget(props) {
|
|
|
959
970
|
const handleBlur = () => onBlur(id, value);
|
|
960
971
|
const handleFocus = () => onFocus(id, value);
|
|
961
972
|
const getPopupContainer = (node) => node.parentNode;
|
|
962
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ jsx19(
|
|
963
974
|
DatePicker,
|
|
964
975
|
{
|
|
965
976
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -984,7 +995,7 @@ import {
|
|
|
984
995
|
ariaDescribedByIds as ariaDescribedByIds6
|
|
985
996
|
} from "@rjsf/utils";
|
|
986
997
|
import { DatePicker as DatePicker2 } from "antd";
|
|
987
|
-
import { jsx as
|
|
998
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
988
999
|
var DATE_PICKER_STYLE2 = {
|
|
989
1000
|
width: "100%"
|
|
990
1001
|
};
|
|
@@ -995,7 +1006,7 @@ function DateWidget(props) {
|
|
|
995
1006
|
const handleBlur = () => onBlur(id, value);
|
|
996
1007
|
const handleFocus = () => onFocus(id, value);
|
|
997
1008
|
const getPopupContainer = (node) => node.parentNode;
|
|
998
|
-
return /* @__PURE__ */
|
|
1009
|
+
return /* @__PURE__ */ jsx20(
|
|
999
1010
|
DatePicker2,
|
|
1000
1011
|
{
|
|
1001
1012
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1019,7 +1030,7 @@ import { Input as Input3 } from "antd";
|
|
|
1019
1030
|
import {
|
|
1020
1031
|
ariaDescribedByIds as ariaDescribedByIds7
|
|
1021
1032
|
} from "@rjsf/utils";
|
|
1022
|
-
import { jsx as
|
|
1033
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1023
1034
|
function PasswordWidget(props) {
|
|
1024
1035
|
const { disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, value } = props;
|
|
1025
1036
|
const { readonlyAsDisabled = true } = formContext;
|
|
@@ -1027,7 +1038,7 @@ function PasswordWidget(props) {
|
|
|
1027
1038
|
const handleChange = ({ target }) => onChange(target.value === "" ? emptyValue : target.value);
|
|
1028
1039
|
const handleBlur = ({ target }) => onBlur(id, target.value);
|
|
1029
1040
|
const handleFocus = ({ target }) => onFocus(id, target.value);
|
|
1030
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ jsx21(
|
|
1031
1042
|
Input3.Password,
|
|
1032
1043
|
{
|
|
1033
1044
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1051,7 +1062,7 @@ import {
|
|
|
1051
1062
|
enumOptionsValueForIndex as enumOptionsValueForIndex2,
|
|
1052
1063
|
optionId as optionId2
|
|
1053
1064
|
} from "@rjsf/utils";
|
|
1054
|
-
import { jsx as
|
|
1065
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1055
1066
|
function RadioWidget({
|
|
1056
1067
|
autofocus,
|
|
1057
1068
|
disabled,
|
|
@@ -1070,7 +1081,7 @@ function RadioWidget({
|
|
|
1070
1081
|
const handleBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
|
|
1071
1082
|
const handleFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
|
|
1072
1083
|
const selectedIndexes = enumOptionsIndexForValue2(value, enumOptions);
|
|
1073
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ jsx22(
|
|
1074
1085
|
Radio.Group,
|
|
1075
1086
|
{
|
|
1076
1087
|
disabled: disabled || readonlyAsDisabled && readonly,
|
|
@@ -1081,7 +1092,7 @@ function RadioWidget({
|
|
|
1081
1092
|
onFocus: !readonly ? handleFocus : void 0,
|
|
1082
1093
|
value: selectedIndexes,
|
|
1083
1094
|
"aria-describedby": ariaDescribedByIds8(id),
|
|
1084
|
-
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */
|
|
1095
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ jsx22(
|
|
1085
1096
|
Radio,
|
|
1086
1097
|
{
|
|
1087
1098
|
id: optionId2(id, i),
|
|
@@ -1103,7 +1114,7 @@ import {
|
|
|
1103
1114
|
ariaDescribedByIds as ariaDescribedByIds9,
|
|
1104
1115
|
rangeSpec
|
|
1105
1116
|
} from "@rjsf/utils";
|
|
1106
|
-
import { jsx as
|
|
1117
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1107
1118
|
function RangeWidget(props) {
|
|
1108
1119
|
const {
|
|
1109
1120
|
autofocus,
|
|
@@ -1130,7 +1141,7 @@ function RangeWidget(props) {
|
|
|
1130
1141
|
onBlur: !readonly ? handleBlur : void 0,
|
|
1131
1142
|
onFocus: !readonly ? handleFocus : void 0
|
|
1132
1143
|
};
|
|
1133
|
-
return /* @__PURE__ */
|
|
1144
|
+
return /* @__PURE__ */ jsx23(
|
|
1134
1145
|
Slider,
|
|
1135
1146
|
{
|
|
1136
1147
|
autoFocus: autofocus,
|
|
@@ -1157,7 +1168,7 @@ import {
|
|
|
1157
1168
|
} from "@rjsf/utils";
|
|
1158
1169
|
import isString2 from "lodash/isString";
|
|
1159
1170
|
import { useMemo } from "react";
|
|
1160
|
-
import { jsx as
|
|
1171
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1161
1172
|
var SELECT_STYLE = {
|
|
1162
1173
|
width: "100%"
|
|
1163
1174
|
};
|
|
@@ -1208,7 +1219,7 @@ function SelectWidget({
|
|
|
1208
1219
|
}
|
|
1209
1220
|
return void 0;
|
|
1210
1221
|
}, [enumDisabled, enumOptions, placeholder, showPlaceholderOption]);
|
|
1211
|
-
return /* @__PURE__ */
|
|
1222
|
+
return /* @__PURE__ */ jsx24(
|
|
1212
1223
|
Select,
|
|
1213
1224
|
{
|
|
1214
1225
|
autoFocus: autofocus,
|
|
@@ -1235,7 +1246,7 @@ import { Input as Input4 } from "antd";
|
|
|
1235
1246
|
import {
|
|
1236
1247
|
ariaDescribedByIds as ariaDescribedByIds11
|
|
1237
1248
|
} from "@rjsf/utils";
|
|
1238
|
-
import { jsx as
|
|
1249
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1239
1250
|
var INPUT_STYLE3 = {
|
|
1240
1251
|
width: "100%"
|
|
1241
1252
|
};
|
|
@@ -1258,7 +1269,7 @@ function TextareaWidget({
|
|
|
1258
1269
|
const extraProps = {
|
|
1259
1270
|
type: "textarea"
|
|
1260
1271
|
};
|
|
1261
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsx25(
|
|
1262
1273
|
Input4.TextArea,
|
|
1263
1274
|
{
|
|
1264
1275
|
disabled: disabled || readonlyAsDisabled && readonly,
|