@rjsf/semantic-ui 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/index.cjs +93 -45
- package/dist/index.cjs.map +4 -4
- package/dist/semantic-ui.esm.js +95 -47
- package/dist/semantic-ui.esm.js.map +4 -4
- package/dist/semantic-ui.umd.js +62 -17
- package/lib/AddButton/AddButton.d.ts +3 -2
- package/lib/AddButton/AddButton.js +1 -1
- package/lib/AddButton/AddButton.js.map +1 -1
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +4 -4
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/IconButton/IconButton.d.ts +7 -6
- package/lib/IconButton/IconButton.js +1 -2
- package/lib/IconButton/IconButton.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +3 -2
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +10 -0
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +22 -0
- package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -0
- package/lib/OptionalDataControlsTemplate/index.d.ts +2 -0
- package/lib/OptionalDataControlsTemplate/index.js +3 -0
- package/lib/OptionalDataControlsTemplate/index.js.map +1 -0
- package/lib/Templates/Templates.js +2 -0
- package/lib/Templates/Templates.js.map +1 -1
- package/lib/TitleField/TitleField.d.ts +1 -1
- package/lib/TitleField/TitleField.js +7 -6
- package/lib/TitleField/TitleField.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/AddButton/AddButton.tsx +5 -3
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +15 -12
- package/src/IconButton/IconButton.tsx +12 -8
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +4 -0
- package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +44 -0
- package/src/OptionalDataControlsTemplate/index.ts +2 -0
- package/src/Templates/Templates.ts +2 -0
- package/src/TitleField/TitleField.tsx +16 -6
package/dist/index.cjs
CHANGED
|
@@ -64,9 +64,9 @@ function AddButton({
|
|
|
64
64
|
{
|
|
65
65
|
title: translateString(import_utils.TranslatableString.AddItemButton),
|
|
66
66
|
color,
|
|
67
|
+
size: "tiny",
|
|
67
68
|
...props,
|
|
68
69
|
icon: true,
|
|
69
|
-
size: "tiny",
|
|
70
70
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_semantic_ui_react.Icon, { name: "plus" })
|
|
71
71
|
}
|
|
72
72
|
);
|
|
@@ -151,6 +151,7 @@ function ArrayFieldTemplate(props) {
|
|
|
151
151
|
// classNames, This is not part of the type, so it is likely never passed in
|
|
152
152
|
disabled,
|
|
153
153
|
items,
|
|
154
|
+
optionalDataControl,
|
|
154
155
|
onAddClick,
|
|
155
156
|
// options, This is not part of the type, so it is likely never passed in
|
|
156
157
|
readonly,
|
|
@@ -182,6 +183,7 @@ function ArrayFieldTemplate(props) {
|
|
|
182
183
|
registry,
|
|
183
184
|
uiOptions
|
|
184
185
|
);
|
|
186
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
185
187
|
const {
|
|
186
188
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
187
189
|
} = registry.templates;
|
|
@@ -194,7 +196,8 @@ function ArrayFieldTemplate(props) {
|
|
|
194
196
|
schema,
|
|
195
197
|
uiSchema,
|
|
196
198
|
required,
|
|
197
|
-
registry
|
|
199
|
+
registry,
|
|
200
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
198
201
|
}
|
|
199
202
|
),
|
|
200
203
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -208,16 +211,19 @@ function ArrayFieldTemplate(props) {
|
|
|
208
211
|
}
|
|
209
212
|
),
|
|
210
213
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
|
|
211
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
...itemUiSchema
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "row array-item-list", children: [
|
|
215
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
216
|
+
items.map(({ key, uiSchema: itemUiSchema = {}, ...props2 }) => {
|
|
217
|
+
const mergedUiSchema = {
|
|
218
|
+
...itemUiSchema,
|
|
219
|
+
[import_utils4.UI_OPTIONS_KEY]: {
|
|
220
|
+
...itemUiSchema[import_utils4.UI_OPTIONS_KEY],
|
|
221
|
+
semantic
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ArrayFieldItemTemplate2, { ...props2, uiSchema: mergedUiSchema }, key);
|
|
225
|
+
})
|
|
226
|
+
] }),
|
|
221
227
|
canAdd && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
222
228
|
"div",
|
|
223
229
|
{
|
|
@@ -499,6 +505,7 @@ var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
|
499
505
|
function ObjectFieldTemplate(props) {
|
|
500
506
|
const {
|
|
501
507
|
description,
|
|
508
|
+
optionalDataControl,
|
|
502
509
|
onAddClick,
|
|
503
510
|
title,
|
|
504
511
|
properties,
|
|
@@ -518,6 +525,7 @@ function ObjectFieldTemplate(props) {
|
|
|
518
525
|
registry,
|
|
519
526
|
uiOptions
|
|
520
527
|
);
|
|
528
|
+
const showOptionalDataControlInTitle = !readonly && !disabled;
|
|
521
529
|
const {
|
|
522
530
|
ButtonTemplates: { AddButton: AddButton2 }
|
|
523
531
|
} = registry.templates;
|
|
@@ -530,7 +538,8 @@ function ObjectFieldTemplate(props) {
|
|
|
530
538
|
required,
|
|
531
539
|
schema,
|
|
532
540
|
uiSchema,
|
|
533
|
-
registry
|
|
541
|
+
registry,
|
|
542
|
+
optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
|
|
534
543
|
}
|
|
535
544
|
),
|
|
536
545
|
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
@@ -543,6 +552,7 @@ function ObjectFieldTemplate(props) {
|
|
|
543
552
|
registry
|
|
544
553
|
}
|
|
545
554
|
),
|
|
555
|
+
!showOptionalDataControlInTitle ? optionalDataControl : void 0,
|
|
546
556
|
properties.map((prop) => prop.content),
|
|
547
557
|
(0, import_utils11.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_semantic_ui_react10.Grid.Column, { width: 16, verticalAlign: "middle", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_semantic_ui_react10.Grid.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
548
558
|
"div",
|
|
@@ -568,21 +578,53 @@ function ObjectFieldTemplate(props) {
|
|
|
568
578
|
] });
|
|
569
579
|
}
|
|
570
580
|
|
|
581
|
+
// src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
|
|
582
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
583
|
+
function OptionalDataControlsTemplate(props) {
|
|
584
|
+
const { id, registry, label, onAddClick, onRemoveClick } = props;
|
|
585
|
+
if (onAddClick) {
|
|
586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
587
|
+
AddButton,
|
|
588
|
+
{
|
|
589
|
+
id,
|
|
590
|
+
registry,
|
|
591
|
+
className: "rjsf-add-optional-data",
|
|
592
|
+
onClick: onAddClick,
|
|
593
|
+
title: label,
|
|
594
|
+
size: "mini"
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
} else if (onRemoveClick) {
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
599
|
+
RemoveButton,
|
|
600
|
+
{
|
|
601
|
+
id,
|
|
602
|
+
registry,
|
|
603
|
+
className: "rjsf-remove-optional-data",
|
|
604
|
+
onClick: onRemoveClick,
|
|
605
|
+
title: label,
|
|
606
|
+
size: "mini"
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("em", { id, children: label });
|
|
611
|
+
}
|
|
612
|
+
|
|
571
613
|
// src/SubmitButton/SubmitButton.tsx
|
|
572
614
|
var import_semantic_ui_react11 = require("semantic-ui-react");
|
|
573
615
|
var import_utils12 = require("@rjsf/utils");
|
|
574
|
-
var
|
|
616
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
575
617
|
function SubmitButton({ uiSchema }) {
|
|
576
618
|
const { submitText, norender, props: submitButtonProps = {} } = (0, import_utils12.getSubmitButtonOptions)(uiSchema);
|
|
577
619
|
if (norender) {
|
|
578
620
|
return null;
|
|
579
621
|
}
|
|
580
|
-
return /* @__PURE__ */ (0,
|
|
622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_semantic_ui_react11.Button, { type: "submit", primary: true, ...submitButtonProps, children: submitText });
|
|
581
623
|
}
|
|
582
624
|
|
|
583
625
|
// src/TitleField/TitleField.tsx
|
|
584
626
|
var import_semantic_ui_react12 = require("semantic-ui-react");
|
|
585
|
-
var
|
|
627
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
586
628
|
var DEFAULT_OPTIONS2 = {
|
|
587
629
|
inverted: false,
|
|
588
630
|
dividing: true
|
|
@@ -590,22 +632,27 @@ var DEFAULT_OPTIONS2 = {
|
|
|
590
632
|
function TitleField({
|
|
591
633
|
id,
|
|
592
634
|
title,
|
|
593
|
-
uiSchema
|
|
635
|
+
uiSchema,
|
|
636
|
+
optionalDataControl
|
|
594
637
|
}) {
|
|
595
638
|
const semanticProps = getSemanticProps({
|
|
596
639
|
uiSchema,
|
|
597
640
|
defaultSchemaProps: DEFAULT_OPTIONS2
|
|
598
641
|
});
|
|
599
|
-
|
|
600
|
-
|
|
642
|
+
let heading = title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Header, { id, ...semanticProps, as: "h5", children: title }) : null;
|
|
643
|
+
if (optionalDataControl) {
|
|
644
|
+
heading = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_semantic_ui_react12.Grid, { colums: 2, relaxed: true, children: [
|
|
645
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Grid.Column, { width: 14, style: { paddingRight: 0 }, children: heading }),
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Grid.Column, { width: 2, children: optionalDataControl })
|
|
647
|
+
] });
|
|
601
648
|
}
|
|
602
|
-
return
|
|
649
|
+
return heading;
|
|
603
650
|
}
|
|
604
651
|
|
|
605
652
|
// src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
|
|
606
653
|
var import_utils13 = require("@rjsf/utils");
|
|
607
654
|
var import_semantic_ui_react13 = require("semantic-ui-react");
|
|
608
|
-
var
|
|
655
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
609
656
|
function WrapIfAdditionalTemplate(props) {
|
|
610
657
|
const {
|
|
611
658
|
children,
|
|
@@ -628,11 +675,11 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
628
675
|
const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;
|
|
629
676
|
const additional = import_utils13.ADDITIONAL_PROPERTY_FLAG in schema;
|
|
630
677
|
if (!additional) {
|
|
631
|
-
return /* @__PURE__ */ (0,
|
|
678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children });
|
|
632
679
|
}
|
|
633
680
|
const handleBlur = ({ target }) => onKeyChange(target.value);
|
|
634
|
-
return /* @__PURE__ */ (0,
|
|
635
|
-
/* @__PURE__ */ (0,
|
|
681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid, { columns: "equal", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_semantic_ui_react13.Grid.Row, { children: [
|
|
682
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { className: "form-additional", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Form.Group, { widths: "equal", grouped: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
636
683
|
import_semantic_ui_react13.Form.Input,
|
|
637
684
|
{
|
|
638
685
|
className: "form-group",
|
|
@@ -650,8 +697,8 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
650
697
|
type: "text"
|
|
651
698
|
}
|
|
652
699
|
) }) }),
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { className: "form-additional", verticalAlign: "middle", children }),
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
655
702
|
RemoveButton2,
|
|
656
703
|
{
|
|
657
704
|
id: (0, import_utils13.buttonId)(id, "remove"),
|
|
@@ -688,6 +735,7 @@ function generateTemplates() {
|
|
|
688
735
|
GridTemplate,
|
|
689
736
|
MultiSchemaFieldTemplate,
|
|
690
737
|
ObjectFieldTemplate,
|
|
738
|
+
OptionalDataControlsTemplate,
|
|
691
739
|
TitleFieldTemplate: TitleField,
|
|
692
740
|
WrapIfAdditionalTemplate
|
|
693
741
|
};
|
|
@@ -697,7 +745,7 @@ var Templates_default = generateTemplates();
|
|
|
697
745
|
// src/CheckboxWidget/CheckboxWidget.tsx
|
|
698
746
|
var import_utils14 = require("@rjsf/utils");
|
|
699
747
|
var import_semantic_ui_react14 = require("semantic-ui-react");
|
|
700
|
-
var
|
|
748
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
701
749
|
function CheckboxWidget(props) {
|
|
702
750
|
const {
|
|
703
751
|
id,
|
|
@@ -735,8 +783,8 @@ function CheckboxWidget(props) {
|
|
|
735
783
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
736
784
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
737
785
|
const description = options.description ?? schema.description;
|
|
738
|
-
return /* @__PURE__ */ (0,
|
|
739
|
-
!hideLabel && description && /* @__PURE__ */ (0,
|
|
786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
787
|
+
!hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
740
788
|
DescriptionFieldTemplate,
|
|
741
789
|
{
|
|
742
790
|
id: (0, import_utils14.descriptionId)(id),
|
|
@@ -746,7 +794,7 @@ function CheckboxWidget(props) {
|
|
|
746
794
|
registry
|
|
747
795
|
}
|
|
748
796
|
),
|
|
749
|
-
/* @__PURE__ */ (0,
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
750
798
|
import_semantic_ui_react14.Form.Checkbox,
|
|
751
799
|
{
|
|
752
800
|
id,
|
|
@@ -770,7 +818,7 @@ function CheckboxWidget(props) {
|
|
|
770
818
|
// src/CheckboxesWidget/CheckboxesWidget.tsx
|
|
771
819
|
var import_semantic_ui_react15 = require("semantic-ui-react");
|
|
772
820
|
var import_utils15 = require("@rjsf/utils");
|
|
773
|
-
var
|
|
821
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
774
822
|
function CheckboxesWidget(props) {
|
|
775
823
|
const {
|
|
776
824
|
id,
|
|
@@ -810,12 +858,12 @@ function CheckboxesWidget(props) {
|
|
|
810
858
|
const _onBlur = () => onBlur(id, value);
|
|
811
859
|
const _onFocus = () => onFocus(id, value);
|
|
812
860
|
const inlineOption = inline ? { inline: true } : { grouped: true };
|
|
813
|
-
return /* @__PURE__ */ (0,
|
|
814
|
-
!hideLabel && !!label && /* @__PURE__ */ (0,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
862
|
+
!hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TitleFieldTemplate, { id: (0, import_utils15.titleId)(id), title: label, schema, uiSchema, registry }),
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_semantic_ui_react15.Form.Group, { id, name: id, ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
816
864
|
const checked = (0, import_utils15.enumOptionsIsSelected)(option.value, checkboxesValues);
|
|
817
865
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
818
|
-
return /* @__PURE__ */ (0,
|
|
866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
819
867
|
import_semantic_ui_react15.Form.Checkbox,
|
|
820
868
|
{
|
|
821
869
|
id: (0, import_utils15.optionId)(id, index),
|
|
@@ -840,7 +888,7 @@ function CheckboxesWidget(props) {
|
|
|
840
888
|
// src/RadioWidget/RadioWidget.tsx
|
|
841
889
|
var import_utils16 = require("@rjsf/utils");
|
|
842
890
|
var import_semantic_ui_react16 = require("semantic-ui-react");
|
|
843
|
-
var
|
|
891
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
844
892
|
var import_react = require("react");
|
|
845
893
|
function RadioWidget(props) {
|
|
846
894
|
const {
|
|
@@ -869,7 +917,7 @@ function RadioWidget(props) {
|
|
|
869
917
|
const _onBlur = () => onBlur(id, value);
|
|
870
918
|
const _onFocus = () => onFocus(id, value);
|
|
871
919
|
const inlineOption = options.inline ? { inline: true } : { grouped: true };
|
|
872
|
-
return /* @__PURE__ */ (0,
|
|
920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_semantic_ui_react16.Form.Group, { ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
|
|
873
921
|
const checked = (0, import_utils16.enumOptionsIsSelected)(option.value, value);
|
|
874
922
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
875
923
|
return /* @__PURE__ */ (0, import_react.createElement)(
|
|
@@ -898,7 +946,7 @@ function RadioWidget(props) {
|
|
|
898
946
|
// src/RangeWidget/RangeWidget.tsx
|
|
899
947
|
var import_semantic_ui_react17 = require("semantic-ui-react");
|
|
900
948
|
var import_utils17 = require("@rjsf/utils");
|
|
901
|
-
var
|
|
949
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
902
950
|
function RangeWidget(props) {
|
|
903
951
|
const {
|
|
904
952
|
id,
|
|
@@ -926,8 +974,8 @@ function RangeWidget(props) {
|
|
|
926
974
|
const _onChange = ({ target: { value: value2 } }) => onChange && onChange(value2 === "" ? options.emptyValue : value2);
|
|
927
975
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
928
976
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
929
|
-
return /* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
931
979
|
import_semantic_ui_react17.Input,
|
|
932
980
|
{
|
|
933
981
|
id,
|
|
@@ -946,7 +994,7 @@ function RangeWidget(props) {
|
|
|
946
994
|
},
|
|
947
995
|
id
|
|
948
996
|
),
|
|
949
|
-
/* @__PURE__ */ (0,
|
|
997
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: value })
|
|
950
998
|
] });
|
|
951
999
|
}
|
|
952
1000
|
|
|
@@ -954,7 +1002,7 @@ function RangeWidget(props) {
|
|
|
954
1002
|
var import_utils18 = require("@rjsf/utils");
|
|
955
1003
|
var import_map = __toESM(require("lodash/map"), 1);
|
|
956
1004
|
var import_semantic_ui_react18 = require("semantic-ui-react");
|
|
957
|
-
var
|
|
1005
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
958
1006
|
function createDefaultValueOptionsForDropDown(enumOptions, enumDisabled, showPlaceholderOption, placeholder) {
|
|
959
1007
|
const disabledOptions = enumDisabled || [];
|
|
960
1008
|
const options = (0, import_map.default)(enumOptions, ({ label, value }, index) => ({
|
|
@@ -1014,7 +1062,7 @@ function SelectWidget(props) {
|
|
|
1014
1062
|
const _onBlur = (_, { target }) => onBlur(id, (0, import_utils18.enumOptionsValueForIndex)(target && target.value, enumOptions, optEmptyVal));
|
|
1015
1063
|
const _onFocus = (_, { target }) => onFocus(id, (0, import_utils18.enumOptionsValueForIndex)(target && target.value, enumOptions, optEmptyVal));
|
|
1016
1064
|
const selectedIndexes = (0, import_utils18.enumOptionsIndexForValue)(value, enumOptions, multiple);
|
|
1017
|
-
return /* @__PURE__ */ (0,
|
|
1065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1018
1066
|
import_semantic_ui_react18.Form.Dropdown,
|
|
1019
1067
|
{
|
|
1020
1068
|
id,
|
|
@@ -1042,7 +1090,7 @@ function SelectWidget(props) {
|
|
|
1042
1090
|
// src/TextareaWidget/TextareaWidget.tsx
|
|
1043
1091
|
var import_utils19 = require("@rjsf/utils");
|
|
1044
1092
|
var import_semantic_ui_react19 = require("semantic-ui-react");
|
|
1045
|
-
var
|
|
1093
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1046
1094
|
function TextareaWidget(props) {
|
|
1047
1095
|
const {
|
|
1048
1096
|
id,
|
|
@@ -1069,7 +1117,7 @@ function TextareaWidget(props) {
|
|
|
1069
1117
|
const _onChange = ({ target: { value: value2 } }) => onChange && onChange(value2 === "" ? options.emptyValue : value2);
|
|
1070
1118
|
const _onBlur = () => onBlur && onBlur(id, value);
|
|
1071
1119
|
const _onFocus = () => onFocus && onFocus(id, value);
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1073
1121
|
import_semantic_ui_react19.Form.TextArea,
|
|
1074
1122
|
{
|
|
1075
1123
|
id,
|