@gravity-ui/dynamic-forms 5.8.0 → 5.9.0
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/build/cjs/lib/kit/components/Layouts/Column/Column.css +6 -6
- package/build/cjs/lib/kit/components/Layouts/Column/Column.js +3 -2
- package/build/cjs/lib/kit/components/Layouts/Row/Row.css +3 -0
- package/build/cjs/lib/kit/components/Layouts/Row/Row.js +3 -2
- package/build/cjs/lib/kit/components/Views/OneOfView/OneOfView.js +6 -4
- package/build/cjs/lib/kit/hooks/useOneOf/useOneOf.css +5 -0
- package/build/cjs/lib/kit/hooks/useOneOf/useOneOf.js +13 -8
- package/build/esm/lib/core/types/specs.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Column/Column.css +6 -6
- package/build/esm/lib/kit/components/Layouts/Column/Column.js +3 -2
- package/build/esm/lib/kit/components/Layouts/Row/Row.css +3 -0
- package/build/esm/lib/kit/components/Layouts/Row/Row.js +3 -2
- package/build/esm/lib/kit/components/Views/OneOfView/OneOfView.js +6 -4
- package/build/esm/lib/kit/hooks/useOneOf/useOneOf.css +5 -0
- package/build/esm/lib/kit/hooks/useOneOf/useOneOf.js +14 -9
- package/package.json +1 -1
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
min-height: var(--df-column-first-row-min-height, 28px);
|
|
28
28
|
display: flex;
|
|
29
29
|
margin-bottom: auto;
|
|
30
|
-
flex-direction:
|
|
30
|
+
flex-direction: row;
|
|
31
31
|
flex-shrink: 0;
|
|
32
32
|
}
|
|
33
33
|
.df-column__first-row-inner {
|
|
34
|
-
|
|
34
|
+
flex-grow: 1;
|
|
35
35
|
margin-top: auto;
|
|
36
36
|
margin-bottom: auto;
|
|
37
37
|
}
|
|
38
|
-
.df-column__first-row
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
.df-column__first-row-action {
|
|
39
|
+
padding-left: var(--g-spacing-2);
|
|
40
|
+
margin-top: auto;
|
|
41
|
+
margin-bottom: auto;
|
|
42
42
|
}
|
|
43
43
|
.df-column__title {
|
|
44
44
|
word-break: break-word;
|
|
@@ -11,7 +11,7 @@ const common_1 = require("../../../constants/common");
|
|
|
11
11
|
const utils_1 = require("../../../utils");
|
|
12
12
|
const HTMLContent_1 = require("../../HTMLContent");
|
|
13
13
|
const b = (0, utils_1.block)('column');
|
|
14
|
-
const ColumnBase = ({ name, spec, input, meta, children, }) => {
|
|
14
|
+
const ColumnBase = ({ name, spec, input, meta, children, action, }) => {
|
|
15
15
|
const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
|
|
16
16
|
const generateButton = react_1.default.useMemo(() => (0, core_1.withGenerateButton)(spec), [spec]);
|
|
17
17
|
return (react_1.default.createElement("div", { className: b() },
|
|
@@ -23,7 +23,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
|
|
|
23
23
|
react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
|
|
24
24
|
placement: common_1.COMMON_POPOVER_PLACEMENT,
|
|
25
25
|
} },
|
|
26
|
-
react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)
|
|
26
|
+
react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null),
|
|
27
|
+
Boolean(action) && react_1.default.createElement("div", { className: b('first-row-action') }, action)),
|
|
27
28
|
react_1.default.createElement("div", { className: b('second-row') },
|
|
28
29
|
react_1.default.createElement("div", { className: b('second-row-inner') },
|
|
29
30
|
react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
|
|
@@ -11,7 +11,7 @@ const common_1 = require("../../../constants/common");
|
|
|
11
11
|
const utils_1 = require("../../../utils");
|
|
12
12
|
const HTMLContent_1 = require("../../HTMLContent");
|
|
13
13
|
const b = (0, utils_1.block)('row');
|
|
14
|
-
const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
|
|
14
|
+
const RowBase = ({ name, spec, input, meta, verboseDescription, action, children, }) => {
|
|
15
15
|
const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
|
|
16
16
|
const generateButton = react_1.default.useMemo(() => (0, core_1.withGenerateButton)(spec), [spec]);
|
|
17
17
|
return (react_1.default.createElement("div", { className: b() },
|
|
@@ -23,7 +23,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
|
|
|
23
23
|
react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
|
|
24
24
|
placement: common_1.COMMON_POPOVER_PLACEMENT,
|
|
25
25
|
} },
|
|
26
|
-
react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null
|
|
26
|
+
react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null,
|
|
27
|
+
Boolean(action) && react_1.default.createElement("span", { className: b('left-action') }, action))),
|
|
27
28
|
react_1.default.createElement("div", { className: b('right') },
|
|
28
29
|
react_1.default.createElement("div", { className: b('right-inner') },
|
|
29
30
|
react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
|
|
@@ -15,12 +15,14 @@ const OneOfViewComponent = (props) => {
|
|
|
15
15
|
const specBooleanMap = react_1.default.useMemo(() => { var _a; return (_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.booleanMap; }, [(_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.booleanMap]);
|
|
16
16
|
const valueKey = react_1.default.useMemo(() => Object.keys(value)[0], [value]);
|
|
17
17
|
const valueName = react_1.default.useMemo(() => {
|
|
18
|
-
var _a, _b, _c;
|
|
19
|
-
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'checkbox'
|
|
18
|
+
var _a, _b, _c, _d;
|
|
19
|
+
if ((((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'checkbox' ||
|
|
20
|
+
((_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler) === 'switch') &&
|
|
21
|
+
specBooleanMap) {
|
|
20
22
|
return (0, utils_1.objectKeys)(specBooleanMap).find((key) => specBooleanMap[key] === valueKey);
|
|
21
23
|
}
|
|
22
|
-
return (((
|
|
23
|
-
((
|
|
24
|
+
return (((_c = spec.description) === null || _c === void 0 ? void 0 : _c[valueKey]) ||
|
|
25
|
+
((_d = specProperties[valueKey]) === null || _d === void 0 ? void 0 : _d.viewSpec.layoutTitle) ||
|
|
24
26
|
valueKey);
|
|
25
27
|
}, [
|
|
26
28
|
valueKey,
|
|
@@ -37,14 +37,14 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
37
37
|
onTogglerChange === null || onTogglerChange === void 0 ? void 0 : onTogglerChange(newValue);
|
|
38
38
|
}
|
|
39
39
|
}, [setOneOfValue, input.onChange, oneOfValue]);
|
|
40
|
-
const
|
|
40
|
+
const onCheckedChange = react_1.default.useCallback((checked) => {
|
|
41
41
|
if (specBooleanMap) {
|
|
42
42
|
const value = String(checked);
|
|
43
43
|
const newValue = specBooleanMap[value];
|
|
44
44
|
onOneOfChange([newValue]);
|
|
45
45
|
}
|
|
46
46
|
}, [onOneOfChange, specBooleanMap]);
|
|
47
|
-
const
|
|
47
|
+
const checkedValue = react_1.default.useMemo(() => {
|
|
48
48
|
if (specBooleanMap) {
|
|
49
49
|
const keyBooleanMap = (0, utils_1.objectKeys)(specBooleanMap).find((key) => specBooleanMap[key] === oneOfValue);
|
|
50
50
|
return keyBooleanMap === 'true';
|
|
@@ -65,7 +65,7 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
65
65
|
};
|
|
66
66
|
}), [propertiesOrder, spec.description, specProperties]);
|
|
67
67
|
const togglerType = react_1.default.useMemo(() => {
|
|
68
|
-
var _a, _b, _c, _d;
|
|
68
|
+
var _a, _b, _c, _d, _e;
|
|
69
69
|
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length < 4) {
|
|
70
70
|
return 'card';
|
|
71
71
|
}
|
|
@@ -75,10 +75,11 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
75
75
|
(0, some_1.default)(options, ({ title }) => title.length > MAX_TAB_TITLE_LENGTH))) {
|
|
76
76
|
return 'select';
|
|
77
77
|
}
|
|
78
|
-
if (((_d = spec.viewSpec.oneOfParams) === null || _d === void 0 ? void 0 : _d.toggler) === 'checkbox'
|
|
78
|
+
if ((((_d = spec.viewSpec.oneOfParams) === null || _d === void 0 ? void 0 : _d.toggler) === 'checkbox' ||
|
|
79
|
+
((_e = spec.viewSpec.oneOfParams) === null || _e === void 0 ? void 0 : _e.toggler) === 'switch') &&
|
|
79
80
|
options.length === 2 &&
|
|
80
81
|
specBooleanMap) {
|
|
81
|
-
return
|
|
82
|
+
return spec.viewSpec.oneOfParams.toggler;
|
|
82
83
|
}
|
|
83
84
|
return 'radio';
|
|
84
85
|
}, [options, (_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler, specBooleanMap]);
|
|
@@ -97,7 +98,11 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
97
98
|
}
|
|
98
99
|
if (togglerType === 'checkbox') {
|
|
99
100
|
return (react_1.default.createElement("div", { className: b('checkbox') },
|
|
100
|
-
react_1.default.createElement(uikit_1.Checkbox, { checked:
|
|
101
|
+
react_1.default.createElement(uikit_1.Checkbox, { checked: checkedValue, onUpdate: onCheckedChange, disabled: spec.viewSpec.disabled, qa: name })));
|
|
102
|
+
}
|
|
103
|
+
if (togglerType === 'switch') {
|
|
104
|
+
return (react_1.default.createElement("div", { className: b('switch') },
|
|
105
|
+
react_1.default.createElement(uikit_1.Switch, { checked: checkedValue, onUpdate: onCheckedChange, disabled: spec.viewSpec.disabled, qa: name })));
|
|
101
106
|
}
|
|
102
107
|
return (react_1.default.createElement(uikit_1.SegmentedRadioGroup, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (react_1.default.createElement(uikit_1.SegmentedRadioGroup.Option, { key: option.value, value: option.value }, option.title)))));
|
|
103
108
|
}, [
|
|
@@ -109,8 +114,8 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
109
114
|
options,
|
|
110
115
|
onOneOfChange,
|
|
111
116
|
specProperties,
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
onCheckedChange,
|
|
118
|
+
checkedValue,
|
|
114
119
|
]);
|
|
115
120
|
const toggler = react_1.default.useMemo(() => {
|
|
116
121
|
if (Layout) {
|
|
@@ -101,7 +101,7 @@ export interface ObjectSpec<LinkType = any, InputComponentProps extends Record<s
|
|
|
101
101
|
order?: string[];
|
|
102
102
|
link?: LinkType;
|
|
103
103
|
oneOfParams?: {
|
|
104
|
-
toggler?: 'select' | 'radio' | 'card' | 'checkbox';
|
|
104
|
+
toggler?: 'select' | 'radio' | 'card' | 'checkbox' | 'switch';
|
|
105
105
|
booleanMap?: Record<'true' | 'false', string>;
|
|
106
106
|
};
|
|
107
107
|
placeholder?: string;
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
min-height: var(--df-column-first-row-min-height, 28px);
|
|
28
28
|
display: flex;
|
|
29
29
|
margin-bottom: auto;
|
|
30
|
-
flex-direction:
|
|
30
|
+
flex-direction: row;
|
|
31
31
|
flex-shrink: 0;
|
|
32
32
|
}
|
|
33
33
|
.df-column__first-row-inner {
|
|
34
|
-
|
|
34
|
+
flex-grow: 1;
|
|
35
35
|
margin-top: auto;
|
|
36
36
|
margin-bottom: auto;
|
|
37
37
|
}
|
|
38
|
-
.df-column__first-row
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
.df-column__first-row-action {
|
|
39
|
+
padding-left: var(--g-spacing-2);
|
|
40
|
+
margin-top: auto;
|
|
41
|
+
margin-bottom: auto;
|
|
42
42
|
}
|
|
43
43
|
.df-column__title {
|
|
44
44
|
word-break: break-word;
|
|
@@ -8,7 +8,7 @@ import { block } from '../../../utils';
|
|
|
8
8
|
import { HTMLContent } from '../../HTMLContent';
|
|
9
9
|
import './Column.css';
|
|
10
10
|
const b = block('column');
|
|
11
|
-
const ColumnBase = ({ name, spec, input, meta, children, }) => {
|
|
11
|
+
const ColumnBase = ({ name, spec, input, meta, children, action, }) => {
|
|
12
12
|
const arrayItem = React.useMemo(() => isArrayItem(name), [name]);
|
|
13
13
|
const generateButton = React.useMemo(() => withGenerateButton(spec), [spec]);
|
|
14
14
|
return (React.createElement("div", { className: b() },
|
|
@@ -20,7 +20,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
|
|
|
20
20
|
React.createElement(HelpMark, { popoverProps: {
|
|
21
21
|
placement: COMMON_POPOVER_PLACEMENT,
|
|
22
22
|
} },
|
|
23
|
-
React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)
|
|
23
|
+
React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null),
|
|
24
|
+
Boolean(action) && React.createElement("div", { className: b('first-row-action') }, action)),
|
|
24
25
|
React.createElement("div", { className: b('second-row') },
|
|
25
26
|
React.createElement("div", { className: b('second-row-inner') },
|
|
26
27
|
React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
|
|
@@ -8,7 +8,7 @@ import { block } from '../../../utils';
|
|
|
8
8
|
import { HTMLContent } from '../../HTMLContent';
|
|
9
9
|
import './Row.css';
|
|
10
10
|
const b = block('row');
|
|
11
|
-
const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
|
|
11
|
+
const RowBase = ({ name, spec, input, meta, verboseDescription, action, children, }) => {
|
|
12
12
|
const arrayItem = React.useMemo(() => isArrayItem(name), [name]);
|
|
13
13
|
const generateButton = React.useMemo(() => withGenerateButton(spec), [spec]);
|
|
14
14
|
return (React.createElement("div", { className: b() },
|
|
@@ -20,7 +20,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
|
|
|
20
20
|
React.createElement(HelpMark, { popoverProps: {
|
|
21
21
|
placement: COMMON_POPOVER_PLACEMENT,
|
|
22
22
|
} },
|
|
23
|
-
React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null
|
|
23
|
+
React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null,
|
|
24
|
+
Boolean(action) && React.createElement("span", { className: b('left-action') }, action))),
|
|
24
25
|
React.createElement("div", { className: b('right') },
|
|
25
26
|
React.createElement("div", { className: b('right-inner') },
|
|
26
27
|
React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
|
|
@@ -12,12 +12,14 @@ const OneOfViewComponent = (props) => {
|
|
|
12
12
|
const specBooleanMap = React.useMemo(() => { var _a; return (_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.booleanMap; }, [(_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.booleanMap]);
|
|
13
13
|
const valueKey = React.useMemo(() => Object.keys(value)[0], [value]);
|
|
14
14
|
const valueName = React.useMemo(() => {
|
|
15
|
-
var _a, _b, _c;
|
|
16
|
-
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'checkbox'
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
if ((((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'checkbox' ||
|
|
17
|
+
((_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler) === 'switch') &&
|
|
18
|
+
specBooleanMap) {
|
|
17
19
|
return objectKeys(specBooleanMap).find((key) => specBooleanMap[key] === valueKey);
|
|
18
20
|
}
|
|
19
|
-
return (((
|
|
20
|
-
((
|
|
21
|
+
return (((_c = spec.description) === null || _c === void 0 ? void 0 : _c[valueKey]) ||
|
|
22
|
+
((_d = specProperties[valueKey]) === null || _d === void 0 ? void 0 : _d.viewSpec.layoutTitle) ||
|
|
21
23
|
valueKey);
|
|
22
24
|
}, [
|
|
23
25
|
valueKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Checkbox, SegmentedRadioGroup, Select } from '@gravity-ui/uikit';
|
|
2
|
+
import { Checkbox, SegmentedRadioGroup, Select, Switch } from '@gravity-ui/uikit';
|
|
3
3
|
import isObjectLike from 'lodash/isObjectLike';
|
|
4
4
|
import some from 'lodash/some';
|
|
5
5
|
import { TogglerCard } from '../../components';
|
|
@@ -34,14 +34,14 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
34
34
|
onTogglerChange === null || onTogglerChange === void 0 ? void 0 : onTogglerChange(newValue);
|
|
35
35
|
}
|
|
36
36
|
}, [setOneOfValue, input.onChange, oneOfValue]);
|
|
37
|
-
const
|
|
37
|
+
const onCheckedChange = React.useCallback((checked) => {
|
|
38
38
|
if (specBooleanMap) {
|
|
39
39
|
const value = String(checked);
|
|
40
40
|
const newValue = specBooleanMap[value];
|
|
41
41
|
onOneOfChange([newValue]);
|
|
42
42
|
}
|
|
43
43
|
}, [onOneOfChange, specBooleanMap]);
|
|
44
|
-
const
|
|
44
|
+
const checkedValue = React.useMemo(() => {
|
|
45
45
|
if (specBooleanMap) {
|
|
46
46
|
const keyBooleanMap = objectKeys(specBooleanMap).find((key) => specBooleanMap[key] === oneOfValue);
|
|
47
47
|
return keyBooleanMap === 'true';
|
|
@@ -62,7 +62,7 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
62
62
|
};
|
|
63
63
|
}), [propertiesOrder, spec.description, specProperties]);
|
|
64
64
|
const togglerType = React.useMemo(() => {
|
|
65
|
-
var _a, _b, _c, _d;
|
|
65
|
+
var _a, _b, _c, _d, _e;
|
|
66
66
|
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length < 4) {
|
|
67
67
|
return 'card';
|
|
68
68
|
}
|
|
@@ -72,10 +72,11 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
72
72
|
some(options, ({ title }) => title.length > MAX_TAB_TITLE_LENGTH))) {
|
|
73
73
|
return 'select';
|
|
74
74
|
}
|
|
75
|
-
if (((_d = spec.viewSpec.oneOfParams) === null || _d === void 0 ? void 0 : _d.toggler) === 'checkbox'
|
|
75
|
+
if ((((_d = spec.viewSpec.oneOfParams) === null || _d === void 0 ? void 0 : _d.toggler) === 'checkbox' ||
|
|
76
|
+
((_e = spec.viewSpec.oneOfParams) === null || _e === void 0 ? void 0 : _e.toggler) === 'switch') &&
|
|
76
77
|
options.length === 2 &&
|
|
77
78
|
specBooleanMap) {
|
|
78
|
-
return
|
|
79
|
+
return spec.viewSpec.oneOfParams.toggler;
|
|
79
80
|
}
|
|
80
81
|
return 'radio';
|
|
81
82
|
}, [options, (_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler, specBooleanMap]);
|
|
@@ -94,7 +95,11 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
94
95
|
}
|
|
95
96
|
if (togglerType === 'checkbox') {
|
|
96
97
|
return (React.createElement("div", { className: b('checkbox') },
|
|
97
|
-
React.createElement(Checkbox, { checked:
|
|
98
|
+
React.createElement(Checkbox, { checked: checkedValue, onUpdate: onCheckedChange, disabled: spec.viewSpec.disabled, qa: name })));
|
|
99
|
+
}
|
|
100
|
+
if (togglerType === 'switch') {
|
|
101
|
+
return (React.createElement("div", { className: b('switch') },
|
|
102
|
+
React.createElement(Switch, { checked: checkedValue, onUpdate: onCheckedChange, disabled: spec.viewSpec.disabled, qa: name })));
|
|
98
103
|
}
|
|
99
104
|
return (React.createElement(SegmentedRadioGroup, { value: oneOfValue, onChange: (event) => onOneOfChange([event.target.value]), disabled: spec.viewSpec.disabled, qa: name }, options.map((option) => (React.createElement(SegmentedRadioGroup.Option, { key: option.value, value: option.value }, option.title)))));
|
|
100
105
|
}, [
|
|
@@ -106,8 +111,8 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
106
111
|
options,
|
|
107
112
|
onOneOfChange,
|
|
108
113
|
specProperties,
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
onCheckedChange,
|
|
115
|
+
checkedValue,
|
|
111
116
|
]);
|
|
112
117
|
const toggler = React.useMemo(() => {
|
|
113
118
|
if (Layout) {
|