@gravity-ui/dynamic-forms 4.16.1 → 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 +1 -1
- 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 +4 -3
- package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
- package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +4 -3
- package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.js +4 -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 -5
- 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 +1 -1
- 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 +5 -4
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.css +3 -0
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +5 -4
- package/build/esm/lib/kit/components/TogglerCard/TogglerCard.js +5 -3
- 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 -5
- package/package.json +5 -6
|
@@ -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;
|
|
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,14 +70,17 @@ 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
|
}
|
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",
|