@gravity-ui/dynamic-forms 4.17.0 → 5.0.0-beta.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/Card/Card.css +4 -2
- package/build/cjs/lib/kit/components/Card/Card.js +4 -3
- package/build/cjs/lib/kit/components/Inputs/CardOneOf/CardOneOf.js +2 -8
- package/build/cjs/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.css +3 -0
- package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +4 -2
- package/build/cjs/lib/kit/components/Inputs/Text/Text.js +1 -2
- package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.js +2 -2
- package/build/cjs/lib/kit/components/Layouts/Accordeon/Accordeon.js +1 -2
- package/build/cjs/lib/kit/components/Layouts/Column/Column.js +7 -5
- package/build/cjs/lib/kit/components/Layouts/Row/Row.js +7 -5
- package/build/cjs/lib/kit/components/Layouts/Section/Section.css +4 -6
- package/build/cjs/lib/kit/components/Layouts/Section/Section.js +6 -24
- package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
- package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +6 -5
- package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.js +4 -2
- package/build/cjs/lib/kit/components/ViewLayouts/ViewAccordeon/ViewAccordeon.js +1 -2
- package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +4 -2
- package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +4 -2
- package/build/cjs/lib/kit/components/Views/CardOneOfView.js +3 -13
- package/build/cjs/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.css +7 -5
- package/build/cjs/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.js +4 -3
- package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.css +7 -5
- package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +3 -1
- package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.css +7 -5
- package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +3 -1
- package/build/cjs/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.css +6 -4
- package/build/cjs/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.js +2 -1
- package/build/cjs/lib/kit/components/Views/TableArrayView/TableArrayView.js +4 -2
- package/build/cjs/lib/kit/hooks/useOneOf/useOneOf.js +1 -1
- package/build/cjs/lib/kit/utils/common.js +8 -9
- package/build/esm/lib/core/components/View/types/layout.d.ts +1 -1
- package/build/esm/lib/core/components/View/types/views.d.ts +1 -1
- package/build/esm/lib/core/types/specs.d.ts +1 -2
- package/build/esm/lib/kit/components/Card/Card.css +4 -2
- package/build/esm/lib/kit/components/Card/Card.js +5 -4
- package/build/esm/lib/kit/components/Inputs/CardOneOf/CardOneOf.js +2 -8
- package/build/esm/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.css +3 -0
- package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +5 -3
- package/build/esm/lib/kit/components/Inputs/Text/Text.js +2 -3
- package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.js +2 -2
- package/build/esm/lib/kit/components/Layouts/Accordeon/Accordeon.d.ts +1 -6
- package/build/esm/lib/kit/components/Layouts/Accordeon/Accordeon.js +1 -2
- package/build/esm/lib/kit/components/Layouts/Column/Column.js +5 -3
- package/build/esm/lib/kit/components/Layouts/Row/Row.js +5 -3
- package/build/esm/lib/kit/components/Layouts/Section/Section.css +4 -6
- package/build/esm/lib/kit/components/Layouts/Section/Section.js +7 -25
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.d.ts +0 -2
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +7 -6
- package/build/esm/lib/kit/components/TogglerCard/TogglerCard.js +5 -3
- package/build/esm/lib/kit/components/ViewLayouts/ViewAccordeon/ViewAccordeon.d.ts +2 -7
- package/build/esm/lib/kit/components/ViewLayouts/ViewAccordeon/ViewAccordeon.js +1 -2
- package/build/esm/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +5 -3
- package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +5 -3
- package/build/esm/lib/kit/components/Views/CardOneOfView.js +3 -13
- package/build/esm/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.css +7 -5
- package/build/esm/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.js +5 -4
- package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.css +7 -5
- package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +4 -2
- package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.css +7 -5
- package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +4 -2
- package/build/esm/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.css +6 -4
- package/build/esm/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.js +2 -1
- package/build/esm/lib/kit/components/Views/TableArrayView/TableArrayView.js +5 -3
- package/build/esm/lib/kit/hooks/useOneOf/useOneOf.js +2 -2
- package/build/esm/lib/kit/utils/common.js +8 -9
- package/package.json +5 -6
|
@@ -3,7 +3,7 @@ import isObjectLike from 'lodash/isObjectLike';
|
|
|
3
3
|
import { Card, ViewRow } from '../';
|
|
4
4
|
import { ViewController } from '../../../core';
|
|
5
5
|
export const CardOneOfView = (props) => {
|
|
6
|
-
const { value = {}, spec, name
|
|
6
|
+
const { value = {}, spec, name } = props;
|
|
7
7
|
const [open, setOpen] = React.useState(true);
|
|
8
8
|
const onToggle = React.useCallback(() => setOpen((f) => !f), [setOpen]);
|
|
9
9
|
const specProperties = React.useMemo(() => (isObjectLike(spec.properties) ? spec.properties : {}), [spec.properties]);
|
|
@@ -14,18 +14,8 @@ export const CardOneOfView = (props) => {
|
|
|
14
14
|
((_b = specProperties[valueKey]) === null || _b === void 0 ? void 0 : _b.viewSpec.layoutTitle) ||
|
|
15
15
|
valueKey);
|
|
16
16
|
}, [valueKey, spec.description, specProperties]);
|
|
17
|
-
const title = React.useMemo(() => {
|
|
18
|
-
|
|
19
|
-
spec: spec,
|
|
20
|
-
value: valueName,
|
|
21
|
-
name: name,
|
|
22
|
-
children: React.createElement(React.Fragment, null, valueName),
|
|
23
|
-
};
|
|
24
|
-
if (Layout) {
|
|
25
|
-
return React.createElement(Layout, Object.assign({}, titleProps));
|
|
26
|
-
}
|
|
27
|
-
return React.createElement(ViewRow, Object.assign({}, titleProps));
|
|
28
|
-
}, [spec, name, valueName, Layout]);
|
|
17
|
+
const title = React.useMemo(() => (React.createElement(ViewRow, { spec: spec, value: valueName, name: name },
|
|
18
|
+
React.createElement(React.Fragment, null, valueName))), [spec, name, valueName]);
|
|
29
19
|
if (!value || !Object.keys(value).length) {
|
|
30
20
|
return null;
|
|
31
21
|
}
|
|
@@ -30,16 +30,18 @@
|
|
|
30
30
|
.df-checkbox-group-view_vertical > *:not(:last-child) {
|
|
31
31
|
margin: var(--df-checkbox-group-view-vertical-child-margin, var(--g-spacing-0) var(--g-spacing-0) 6px);
|
|
32
32
|
}
|
|
33
|
-
.df-checkbox-group-
|
|
33
|
+
.df-checkbox-group-view__popover {
|
|
34
|
+
padding: var(--g-spacing-2);
|
|
34
35
|
overflow-wrap: break-word;
|
|
36
|
+
max-width: 300px;
|
|
35
37
|
}
|
|
36
|
-
.df-checkbox-group-
|
|
37
|
-
max-width: var(--df-
|
|
38
|
+
.df-checkbox-group-view__item {
|
|
39
|
+
max-width: var(--df-popover-item-max-width, 100%);
|
|
38
40
|
overflow: hidden;
|
|
39
41
|
text-overflow: ellipsis;
|
|
40
42
|
display: block;
|
|
41
|
-
margin-bottom: var(--df-
|
|
43
|
+
margin-bottom: var(--df-popover-item-margin-bottom, 6px);
|
|
42
44
|
}
|
|
43
|
-
.df-checkbox-group-
|
|
45
|
+
.df-checkbox-group-view__item:last-child {
|
|
44
46
|
margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
|
|
45
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Popover } from '@gravity-ui/uikit';
|
|
2
|
+
import { Popover, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
4
4
|
import { block } from '../../../utils';
|
|
5
5
|
import './CheckboxGroupView.css';
|
|
@@ -9,7 +9,8 @@ export const CheckboxGroupView = ({ spec, value = [] }) => {
|
|
|
9
9
|
const _value = value;
|
|
10
10
|
const items = React.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
|
|
11
11
|
const verticalPlacement = React.useMemo(() => { var _a; return ((_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement) === 'vertical'; }, [(_a = spec.viewSpec.checkboxGroupParams) === null || _a === void 0 ? void 0 : _a.placement]);
|
|
12
|
-
return (React.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT,
|
|
13
|
-
item,
|
|
14
|
-
|
|
12
|
+
return (React.createElement("div", { className: b({ vertical: verticalPlacement }) }, items.map((item, idx) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), key: item, hasArrow: true, disabled: item.length < 51 },
|
|
13
|
+
React.createElement(Text, { className: b('item') },
|
|
14
|
+
item,
|
|
15
|
+
!verticalPlacement && idx !== items.length - 1 ? ', ' : null))))));
|
|
15
16
|
};
|
|
@@ -17,17 +17,19 @@
|
|
|
17
17
|
}
|
|
18
18
|
*/
|
|
19
19
|
/* Border-radius */
|
|
20
|
-
.df-multi-oneof-
|
|
20
|
+
.df-multi-oneof-view__popover {
|
|
21
|
+
padding: var(--g-spacing-2);
|
|
21
22
|
overflow-wrap: break-word;
|
|
23
|
+
max-width: 300px;
|
|
22
24
|
}
|
|
23
|
-
.df-multi-oneof-
|
|
24
|
-
max-width: var(--df-
|
|
25
|
+
.df-multi-oneof-view__item {
|
|
26
|
+
max-width: var(--df-popover-item-max-width, 100%);
|
|
25
27
|
overflow: hidden;
|
|
26
28
|
text-overflow: ellipsis;
|
|
27
29
|
display: block;
|
|
28
|
-
margin-bottom: var(--df-
|
|
30
|
+
margin-bottom: var(--df-popover-item-margin-bottom, 6px);
|
|
29
31
|
}
|
|
30
|
-
.df-multi-oneof-
|
|
32
|
+
.df-multi-oneof-view__item:last-child {
|
|
31
33
|
margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
|
|
32
34
|
}
|
|
33
35
|
.df-multi-oneof-view__content_multiple-values > .df-group-indent {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Popover } from '@gravity-ui/uikit';
|
|
2
|
+
import { Popover, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import isObjectLike from 'lodash/isObjectLike';
|
|
4
4
|
import { ViewController } from '../../../../core';
|
|
5
5
|
import { block } from '../../../utils';
|
|
6
6
|
import { GroupIndent } from '../../GroupIndent';
|
|
7
|
+
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
7
8
|
import './MultiOneOfView.css';
|
|
8
9
|
const b = block('multi-oneof-view');
|
|
9
10
|
export const MultiOneOfView = (props) => {
|
|
@@ -20,7 +21,8 @@ export const MultiOneOfView = (props) => {
|
|
|
20
21
|
}), [spec.description, specProperties, values]);
|
|
21
22
|
const selectView = React.useMemo(() => {
|
|
22
23
|
const selectView = (React.createElement(React.Fragment, null, items.map((item) => {
|
|
23
|
-
return (React.createElement(Popover, { placement:
|
|
24
|
+
return (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
|
|
25
|
+
React.createElement(Text, { className: b('item') }, item)));
|
|
24
26
|
})));
|
|
25
27
|
if (Layout) {
|
|
26
28
|
return (React.createElement(Layout, Object.assign({}, props, { value: values }), selectView));
|
|
@@ -17,16 +17,18 @@
|
|
|
17
17
|
}
|
|
18
18
|
*/
|
|
19
19
|
/* Border-radius */
|
|
20
|
-
.df-multiselect-
|
|
20
|
+
.df-multiselect-view__popover {
|
|
21
|
+
padding: var(--g-spacing-2);
|
|
21
22
|
overflow-wrap: break-word;
|
|
23
|
+
max-width: 300px;
|
|
22
24
|
}
|
|
23
|
-
.df-multiselect-
|
|
24
|
-
max-width: var(--df-
|
|
25
|
+
.df-multiselect-view__item {
|
|
26
|
+
max-width: var(--df-popover-item-max-width, 100%);
|
|
25
27
|
overflow: hidden;
|
|
26
28
|
text-overflow: ellipsis;
|
|
27
29
|
display: block;
|
|
28
|
-
margin-bottom: var(--df-
|
|
30
|
+
margin-bottom: var(--df-popover-item-margin-bottom, 6px);
|
|
29
31
|
}
|
|
30
|
-
.df-multiselect-
|
|
32
|
+
.df-multiselect-view__item:last-child {
|
|
31
33
|
margin-bottom: var(--df-spacing-last-child, var(--g-spacing-0));
|
|
32
34
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Popover } from '@gravity-ui/uikit';
|
|
2
|
+
import { Popover, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import { block } from '../../../utils';
|
|
4
|
+
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
4
5
|
import './MultiSelectView.css';
|
|
5
6
|
const b = block('multiselect-view');
|
|
6
7
|
export const MultiSelectView = ({ spec, value = [] }) => {
|
|
7
8
|
const _value = value;
|
|
8
9
|
const items = React.useMemo(() => _value.map((item) => { var _a; return ((_a = spec.description) === null || _a === void 0 ? void 0 : _a[item]) || item; }), [spec.description, _value]);
|
|
9
|
-
return (React.createElement(React.Fragment, null, items.map((item) => (React.createElement(Popover, { placement:
|
|
10
|
+
return (React.createElement(React.Fragment, null, items.map((item) => (React.createElement(Popover, { placement: COMMON_POPOVER_PLACEMENT, content: item, className: b('popover'), disabled: item.length < 51, hasArrow: true, key: item },
|
|
11
|
+
React.createElement(Text, { className: b('item') }, item))))));
|
|
10
12
|
};
|
|
@@ -20,14 +20,16 @@
|
|
|
20
20
|
.df-number-with-scale-view {
|
|
21
21
|
display: flex;
|
|
22
22
|
}
|
|
23
|
-
.df-number-with-scale-
|
|
23
|
+
.df-number-with-scale-view__popover {
|
|
24
|
+
padding: var(--g-spacing-2);
|
|
24
25
|
overflow-wrap: break-word;
|
|
26
|
+
max-width: 300px;
|
|
25
27
|
}
|
|
26
|
-
.df-number-with-scale-
|
|
27
|
-
|
|
28
|
+
.df-number-with-scale-view__item {
|
|
29
|
+
max-width: var(--df-popover-item-max-width, 100%);
|
|
28
30
|
overflow: hidden;
|
|
29
31
|
text-overflow: ellipsis;
|
|
30
|
-
|
|
32
|
+
display: block;
|
|
31
33
|
}
|
|
32
34
|
.df-number-with-scale-view__size {
|
|
33
35
|
margin-left: var(--df-number-with-scale-view-size-margin-left, var(--g-spacing-half));
|
|
@@ -8,7 +8,8 @@ const NumberWithScaleViewBase = ({ spec, value }) => {
|
|
|
8
8
|
const { initialValue, initialType } = useInitial(value || '', spec, [value]);
|
|
9
9
|
const { scale } = spec.viewSpec.sizeParams;
|
|
10
10
|
return (React.createElement("div", { className: b() },
|
|
11
|
-
React.createElement(Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('
|
|
11
|
+
React.createElement(Popover, { placement: ['bottom', 'top'], content: initialValue, className: b('popover'), disabled: initialValue.length < 26, hasArrow: true },
|
|
12
|
+
React.createElement(Text, { className: b('item') }, initialValue)),
|
|
12
13
|
React.createElement(Text, { className: b('size') }, scale[initialType].title)));
|
|
13
14
|
};
|
|
14
15
|
export const NumberWithScaleView = (props) => isCorrectSizeParams(props.spec) && props.value ? React.createElement(NumberWithScaleViewBase, Object.assign({}, props)) : null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Flex, Table } from '@gravity-ui/uikit';
|
|
2
|
+
import { Flex, HelpMark, Table } from '@gravity-ui/uikit';
|
|
3
3
|
import { ViewController, isArraySpec, isBooleanSpec, isObjectSpec, useDynamicFormsCtx, } from '../../../../core';
|
|
4
4
|
import { block } from '../../../utils';
|
|
5
|
+
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
5
6
|
import './TableArrayView.css';
|
|
6
|
-
import { HelpPopover } from '@gravity-ui/components';
|
|
7
7
|
const b = block('table-array-view');
|
|
8
8
|
export const TableArrayView = ({ value = [], spec, name }) => {
|
|
9
9
|
const { showLayoutDescription } = useDynamicFormsCtx();
|
|
@@ -23,7 +23,9 @@ export const TableArrayView = ({ value = [], spec, name }) => {
|
|
|
23
23
|
name: description && showLayoutDescription
|
|
24
24
|
? () => (React.createElement(Flex, { gap: 0.5, alignItems: "center" },
|
|
25
25
|
label,
|
|
26
|
-
React.createElement(
|
|
26
|
+
React.createElement(HelpMark, { popoverProps: {
|
|
27
|
+
placement: COMMON_POPOVER_PLACEMENT,
|
|
28
|
+
} }, description)))
|
|
27
29
|
: label,
|
|
28
30
|
template: (_, idx) => {
|
|
29
31
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Checkbox,
|
|
2
|
+
import { Checkbox, SegmentedRadioGroup, Select } from '@gravity-ui/uikit';
|
|
3
3
|
import isObjectLike from 'lodash/isObjectLike';
|
|
4
4
|
import some from 'lodash/some';
|
|
5
5
|
import { TogglerCard } from '../../components';
|
|
@@ -96,7 +96,7 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
96
96
|
return (React.createElement("div", { className: b('checkbox') },
|
|
97
97
|
React.createElement(Checkbox, { checked: checkboxValue, onUpdate: onCheckboxChange, disabled: spec.viewSpec.disabled, qa: name })));
|
|
98
98
|
}
|
|
99
|
-
return (React.createElement(
|
|
99
|
+
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
100
|
}, [
|
|
101
101
|
togglerType,
|
|
102
102
|
oneOfValue,
|
|
@@ -37,7 +37,7 @@ export const isNotEmptyValue = (value, spec) => {
|
|
|
37
37
|
return true;
|
|
38
38
|
};
|
|
39
39
|
export const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) => {
|
|
40
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
41
|
if (isObjectLike(spec)) {
|
|
42
42
|
const result = cloneDeep(spec);
|
|
43
43
|
if (isString(result.type)) {
|
|
@@ -49,7 +49,7 @@ export const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) =
|
|
|
49
49
|
try {
|
|
50
50
|
_defaultValue = JSON.parse(result.defaultValue);
|
|
51
51
|
}
|
|
52
|
-
catch (
|
|
52
|
+
catch (_l) {
|
|
53
53
|
_defaultValue = undefined;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -70,21 +70,20 @@ export const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) =
|
|
|
70
70
|
if (isString((_c = result.viewSpec) === null || _c === void 0 ? void 0 : _c.addButtonPosition)) {
|
|
71
71
|
result.viewSpec.addButtonPosition = result.viewSpec.addButtonPosition.toLowerCase();
|
|
72
72
|
}
|
|
73
|
-
if (isString((
|
|
73
|
+
if (isString((_d = result.viewSpec) === null || _d === void 0 ? void 0 : _d.themeLabel)) {
|
|
74
|
+
result.viewSpec.textContentParams = Object.assign(Object.assign({}, result.viewSpec.textContentParams), { themeLabel: result.viewSpec.themeLabel.toLowerCase() });
|
|
75
|
+
}
|
|
76
|
+
if (isString((_f = (_e = result.viewSpec) === null || _e === void 0 ? void 0 : _e.oneOfParams) === null || _f === void 0 ? void 0 : _f.toggler)) {
|
|
74
77
|
result.viewSpec.oneOfParams.toggler = result.viewSpec.oneOfParams.toggler.toLowerCase();
|
|
75
78
|
}
|
|
76
|
-
if (isString((
|
|
79
|
+
if (isString((_h = (_g = result.viewSpec) === null || _g === void 0 ? void 0 : _g.textContentParams) === null || _h === void 0 ? void 0 : _h.themeLabel)) {
|
|
77
80
|
result.viewSpec.textContentParams.themeLabel =
|
|
78
81
|
result.viewSpec.textContentParams.themeLabel.toLowerCase();
|
|
79
82
|
}
|
|
80
|
-
if (isString((
|
|
83
|
+
if (isString((_k = (_j = result.viewSpec) === null || _j === void 0 ? void 0 : _j.textContentParams) === null || _k === void 0 ? void 0 : _k.themeAlert)) {
|
|
81
84
|
result.viewSpec.textContentParams.themeAlert =
|
|
82
85
|
result.viewSpec.textContentParams.themeAlert.toLowerCase();
|
|
83
86
|
}
|
|
84
|
-
if (isString((_l = (_k = result.viewSpec) === null || _k === void 0 ? void 0 : _k.textContentParams) === null || _l === void 0 ? void 0 : _l.viewAlert)) {
|
|
85
|
-
result.viewSpec.textContentParams.viewAlert =
|
|
86
|
-
result.viewSpec.textContentParams.viewAlert.toLowerCase();
|
|
87
|
-
}
|
|
88
87
|
if (isString(result.validator)) {
|
|
89
88
|
result.validator = result.validator.toLowerCase();
|
|
90
89
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/dynamic-forms",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/cjs/index.js",
|
|
@@ -45,11 +45,10 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@bem-react/classname": "^1.6.0",
|
|
48
|
-
"@gravity-ui/components": "^3.0.0",
|
|
49
|
-
"@gravity-ui/date-components": "^2.10.3",
|
|
48
|
+
"@gravity-ui/date-components": "^3.0.0-beta.0",
|
|
50
49
|
"@gravity-ui/date-utils": "^2.5.5",
|
|
51
50
|
"@gravity-ui/i18n": "^1.2.0",
|
|
52
|
-
"@gravity-ui/icons": "^2.
|
|
51
|
+
"@gravity-ui/icons": "^2.12.0",
|
|
53
52
|
"lodash": "^4.17.20"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
"@gravity-ui/prettier-config": "^1.1.0",
|
|
62
61
|
"@gravity-ui/stylelint-config": "^4.0.1",
|
|
63
62
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
64
|
-
"@gravity-ui/uikit": "^
|
|
63
|
+
"@gravity-ui/uikit": "^7.0.0-beta.5",
|
|
65
64
|
"@playwright/experimental-ct-react": "^1.40.0",
|
|
66
65
|
"@playwright/test": "^1.40.0",
|
|
67
66
|
"@storybook/addon-essentials": "^7.0.27",
|
|
@@ -115,7 +114,7 @@
|
|
|
115
114
|
"uuid": "^9.0.1"
|
|
116
115
|
},
|
|
117
116
|
"peerDependencies": {
|
|
118
|
-
"@gravity-ui/uikit": "^
|
|
117
|
+
"@gravity-ui/uikit": "^7.0.0-beta.5",
|
|
119
118
|
"final-form": "^4.20.2",
|
|
120
119
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
121
120
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0",
|