@rjsf/antd 5.12.0 → 5.12.1
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 +27 -58
- package/dist/antd.esm.js.map +3 -3
- package/dist/antd.umd.js +26 -55
- package/dist/index.js +26 -55
- package/dist/index.js.map +2 -2
- package/lib/widgets/CheckboxesWidget/index.d.ts +1 -1
- package/lib/widgets/CheckboxesWidget/index.js +4 -5
- package/lib/widgets/CheckboxesWidget/index.js.map +1 -1
- package/package.json +5 -5
- package/src/widgets/CheckboxesWidget/index.tsx +1 -31
package/dist/antd.umd.js
CHANGED
|
@@ -804,25 +804,8 @@
|
|
|
804
804
|
...AltDateWidget.defaultProps,
|
|
805
805
|
showTime: true
|
|
806
806
|
};
|
|
807
|
-
function CheckboxesWidget({
|
|
808
|
-
autofocus,
|
|
809
|
-
disabled,
|
|
810
|
-
formContext,
|
|
811
|
-
id,
|
|
812
|
-
label,
|
|
813
|
-
hideLabel,
|
|
814
|
-
onBlur,
|
|
815
|
-
onChange,
|
|
816
|
-
onFocus,
|
|
817
|
-
options,
|
|
818
|
-
readonly,
|
|
819
|
-
registry,
|
|
820
|
-
schema,
|
|
821
|
-
uiSchema,
|
|
822
|
-
value
|
|
823
|
-
}) {
|
|
807
|
+
function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
|
|
824
808
|
const { readonlyAsDisabled = true } = formContext;
|
|
825
|
-
const TitleFieldTemplate = utils.getTemplate("TitleFieldTemplate", registry, options);
|
|
826
809
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
827
810
|
const handleChange = (nextValue) => onChange(utils.enumOptionsValueForIndex(nextValue, enumOptions, emptyValue));
|
|
828
811
|
const handleBlur = ({ target }) => onBlur(id, utils.enumOptionsValueForIndex(target.value, enumOptions, emptyValue));
|
|
@@ -833,43 +816,31 @@
|
|
|
833
816
|
onFocus: !readonly ? handleFocus : void 0
|
|
834
817
|
};
|
|
835
818
|
const selectedIndexes = utils.enumOptionsIndexForValue(value, enumOptions, true);
|
|
836
|
-
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
name: id,
|
|
862
|
-
autoFocus: i === 0 ? autofocus : false,
|
|
863
|
-
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1,
|
|
864
|
-
value: String(i),
|
|
865
|
-
children: option.label
|
|
866
|
-
}
|
|
867
|
-
),
|
|
868
|
-
!inline && /* @__PURE__ */ jsxRuntime.jsx("br", {})
|
|
869
|
-
] }, i))
|
|
870
|
-
}
|
|
871
|
-
)
|
|
872
|
-
] }) : null;
|
|
819
|
+
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
820
|
+
Checkbox.Group,
|
|
821
|
+
{
|
|
822
|
+
disabled: disabled || readonlyAsDisabled && readonly,
|
|
823
|
+
name: id,
|
|
824
|
+
onChange: !readonly ? handleChange : void 0,
|
|
825
|
+
value: selectedIndexes,
|
|
826
|
+
...extraProps,
|
|
827
|
+
"aria-describedby": utils.ariaDescribedByIds(id),
|
|
828
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
829
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
830
|
+
Checkbox,
|
|
831
|
+
{
|
|
832
|
+
id: utils.optionId(id, i),
|
|
833
|
+
name: id,
|
|
834
|
+
autoFocus: i === 0 ? autofocus : false,
|
|
835
|
+
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1,
|
|
836
|
+
value: String(i),
|
|
837
|
+
children: option.label
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
!inline && /* @__PURE__ */ jsxRuntime.jsx("br", {})
|
|
841
|
+
] }, i))
|
|
842
|
+
}
|
|
843
|
+
) }) : null;
|
|
873
844
|
}
|
|
874
845
|
function CheckboxWidget(props) {
|
|
875
846
|
const { autofocus, disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value } = props;
|
package/dist/index.js
CHANGED
|
@@ -936,25 +936,8 @@ AltDateTimeWidget.defaultProps = {
|
|
|
936
936
|
var import_checkbox = __toESM(require("antd/lib/checkbox"));
|
|
937
937
|
var import_utils11 = require("@rjsf/utils");
|
|
938
938
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
939
|
-
function CheckboxesWidget({
|
|
940
|
-
autofocus,
|
|
941
|
-
disabled,
|
|
942
|
-
formContext,
|
|
943
|
-
id,
|
|
944
|
-
label,
|
|
945
|
-
hideLabel,
|
|
946
|
-
onBlur,
|
|
947
|
-
onChange,
|
|
948
|
-
onFocus,
|
|
949
|
-
options,
|
|
950
|
-
readonly,
|
|
951
|
-
registry,
|
|
952
|
-
schema,
|
|
953
|
-
uiSchema,
|
|
954
|
-
value
|
|
955
|
-
}) {
|
|
939
|
+
function CheckboxesWidget({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value }) {
|
|
956
940
|
const { readonlyAsDisabled = true } = formContext;
|
|
957
|
-
const TitleFieldTemplate = (0, import_utils11.getTemplate)("TitleFieldTemplate", registry, options);
|
|
958
941
|
const { enumOptions, enumDisabled, inline, emptyValue } = options;
|
|
959
942
|
const handleChange = (nextValue) => onChange((0, import_utils11.enumOptionsValueForIndex)(nextValue, enumOptions, emptyValue));
|
|
960
943
|
const handleBlur = ({ target }) => onBlur(id, (0, import_utils11.enumOptionsValueForIndex)(target.value, enumOptions, emptyValue));
|
|
@@ -965,43 +948,31 @@ function CheckboxesWidget({
|
|
|
965
948
|
onFocus: !readonly ? handleFocus : void 0
|
|
966
949
|
};
|
|
967
950
|
const selectedIndexes = (0, import_utils11.enumOptionsIndexForValue)(value, enumOptions, true);
|
|
968
|
-
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
name: id,
|
|
994
|
-
autoFocus: i === 0 ? autofocus : false,
|
|
995
|
-
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1,
|
|
996
|
-
value: String(i),
|
|
997
|
-
children: option.label
|
|
998
|
-
}
|
|
999
|
-
),
|
|
1000
|
-
!inline && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("br", {})
|
|
1001
|
-
] }, i))
|
|
1002
|
-
}
|
|
1003
|
-
)
|
|
1004
|
-
] }) : null;
|
|
951
|
+
return Array.isArray(enumOptions) && enumOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
952
|
+
import_checkbox.default.Group,
|
|
953
|
+
{
|
|
954
|
+
disabled: disabled || readonlyAsDisabled && readonly,
|
|
955
|
+
name: id,
|
|
956
|
+
onChange: !readonly ? handleChange : void 0,
|
|
957
|
+
value: selectedIndexes,
|
|
958
|
+
...extraProps,
|
|
959
|
+
"aria-describedby": (0, import_utils11.ariaDescribedByIds)(id),
|
|
960
|
+
children: Array.isArray(enumOptions) && enumOptions.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
962
|
+
import_checkbox.default,
|
|
963
|
+
{
|
|
964
|
+
id: (0, import_utils11.optionId)(id, i),
|
|
965
|
+
name: id,
|
|
966
|
+
autoFocus: i === 0 ? autofocus : false,
|
|
967
|
+
disabled: Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1,
|
|
968
|
+
value: String(i),
|
|
969
|
+
children: option.label
|
|
970
|
+
}
|
|
971
|
+
),
|
|
972
|
+
!inline && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("br", {})
|
|
973
|
+
] }, i))
|
|
974
|
+
}
|
|
975
|
+
) }) : null;
|
|
1005
976
|
}
|
|
1006
977
|
|
|
1007
978
|
// src/widgets/CheckboxWidget/index.tsx
|