@gravity-ui/dynamic-forms 5.13.1 → 5.13.2

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.
@@ -42,7 +42,7 @@ const isNotEmptyValue = (value, spec) => {
42
42
  };
43
43
  exports.isNotEmptyValue = isNotEmptyValue;
44
44
  const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) => {
45
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
45
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
46
46
  if ((0, isObjectLike_1.default)(spec)) {
47
47
  const result = (0, cloneDeep_1.default)(spec);
48
48
  if ((0, isString_1.default)(result.type)) {
@@ -54,7 +54,7 @@ const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) => {
54
54
  try {
55
55
  _defaultValue = JSON.parse(result.defaultValue);
56
56
  }
57
- catch (_m) {
57
+ catch (_p) {
58
58
  _defaultValue = undefined;
59
59
  }
60
60
  }
@@ -75,18 +75,22 @@ const prepareSpec = (spec, parseJsonDefaultValue, overridePatternError) => {
75
75
  if ((0, isString_1.default)((_c = result.viewSpec) === null || _c === void 0 ? void 0 : _c.addButtonPosition)) {
76
76
  result.viewSpec.addButtonPosition = result.viewSpec.addButtonPosition.toLowerCase();
77
77
  }
78
- if ((0, isString_1.default)((_e = (_d = result.viewSpec) === null || _d === void 0 ? void 0 : _d.oneOfParams) === null || _e === void 0 ? void 0 : _e.toggler)) {
78
+ if ((0, isString_1.default)((_e = (_d = result.viewSpec) === null || _d === void 0 ? void 0 : _d.radioGroupParams) === null || _e === void 0 ? void 0 : _e.direction)) {
79
+ result.viewSpec.radioGroupParams.direction =
80
+ result.viewSpec.radioGroupParams.direction.toLowerCase();
81
+ }
82
+ if ((0, isString_1.default)((_g = (_f = result.viewSpec) === null || _f === void 0 ? void 0 : _f.oneOfParams) === null || _g === void 0 ? void 0 : _g.toggler)) {
79
83
  result.viewSpec.oneOfParams.toggler = result.viewSpec.oneOfParams.toggler.toLowerCase();
80
84
  }
81
- if ((0, isString_1.default)((_g = (_f = result.viewSpec) === null || _f === void 0 ? void 0 : _f.textContentParams) === null || _g === void 0 ? void 0 : _g.themeLabel)) {
85
+ if ((0, isString_1.default)((_j = (_h = result.viewSpec) === null || _h === void 0 ? void 0 : _h.textContentParams) === null || _j === void 0 ? void 0 : _j.themeLabel)) {
82
86
  result.viewSpec.textContentParams.themeLabel =
83
87
  result.viewSpec.textContentParams.themeLabel.toLowerCase();
84
88
  }
85
- if ((0, isString_1.default)((_j = (_h = result.viewSpec) === null || _h === void 0 ? void 0 : _h.textContentParams) === null || _j === void 0 ? void 0 : _j.themeAlert)) {
89
+ if ((0, isString_1.default)((_l = (_k = result.viewSpec) === null || _k === void 0 ? void 0 : _k.textContentParams) === null || _l === void 0 ? void 0 : _l.themeAlert)) {
86
90
  result.viewSpec.textContentParams.themeAlert =
87
91
  result.viewSpec.textContentParams.themeAlert.toLowerCase();
88
92
  }
89
- if ((0, isString_1.default)((_l = (_k = result.viewSpec) === null || _k === void 0 ? void 0 : _k.textContentParams) === null || _l === void 0 ? void 0 : _l.viewAlert)) {
93
+ if ((0, isString_1.default)((_o = (_m = result.viewSpec) === null || _m === void 0 ? void 0 : _m.textContentParams) === null || _o === void 0 ? void 0 : _o.viewAlert)) {
90
94
  result.viewSpec.textContentParams.viewAlert =
91
95
  result.viewSpec.textContentParams.viewAlert.toLowerCase();
92
96
  }
@@ -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, _l;
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
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 (_m) {
52
+ catch (_p) {
53
53
  _defaultValue = undefined;
54
54
  }
55
55
  }
@@ -70,18 +70,22 @@ 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((_e = (_d = result.viewSpec) === null || _d === void 0 ? void 0 : _d.oneOfParams) === null || _e === void 0 ? void 0 : _e.toggler)) {
73
+ if (isString((_e = (_d = result.viewSpec) === null || _d === void 0 ? void 0 : _d.radioGroupParams) === null || _e === void 0 ? void 0 : _e.direction)) {
74
+ result.viewSpec.radioGroupParams.direction =
75
+ result.viewSpec.radioGroupParams.direction.toLowerCase();
76
+ }
77
+ if (isString((_g = (_f = result.viewSpec) === null || _f === void 0 ? void 0 : _f.oneOfParams) === null || _g === void 0 ? void 0 : _g.toggler)) {
74
78
  result.viewSpec.oneOfParams.toggler = result.viewSpec.oneOfParams.toggler.toLowerCase();
75
79
  }
76
- if (isString((_g = (_f = result.viewSpec) === null || _f === void 0 ? void 0 : _f.textContentParams) === null || _g === void 0 ? void 0 : _g.themeLabel)) {
80
+ if (isString((_j = (_h = result.viewSpec) === null || _h === void 0 ? void 0 : _h.textContentParams) === null || _j === void 0 ? void 0 : _j.themeLabel)) {
77
81
  result.viewSpec.textContentParams.themeLabel =
78
82
  result.viewSpec.textContentParams.themeLabel.toLowerCase();
79
83
  }
80
- if (isString((_j = (_h = result.viewSpec) === null || _h === void 0 ? void 0 : _h.textContentParams) === null || _j === void 0 ? void 0 : _j.themeAlert)) {
84
+ if (isString((_l = (_k = result.viewSpec) === null || _k === void 0 ? void 0 : _k.textContentParams) === null || _l === void 0 ? void 0 : _l.themeAlert)) {
81
85
  result.viewSpec.textContentParams.themeAlert =
82
86
  result.viewSpec.textContentParams.themeAlert.toLowerCase();
83
87
  }
84
- if (isString((_l = (_k = result.viewSpec) === null || _k === void 0 ? void 0 : _k.textContentParams) === null || _l === void 0 ? void 0 : _l.viewAlert)) {
88
+ if (isString((_o = (_m = result.viewSpec) === null || _m === void 0 ? void 0 : _m.textContentParams) === null || _o === void 0 ? void 0 : _o.viewAlert)) {
85
89
  result.viewSpec.textContentParams.viewAlert =
86
90
  result.viewSpec.textContentParams.viewAlert.toLowerCase();
87
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dynamic-forms",
3
- "version": "5.13.1",
3
+ "version": "5.13.2",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/cjs/index.js",