@gravity-ui/dynamic-forms 5.2.0 → 5.3.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.
Files changed (29) hide show
  1. package/build/cjs/lib/kit/components/Card/Card.js +3 -1
  2. package/build/cjs/lib/kit/components/ErrorWrapper/ErrorWrapper.css +1 -1
  3. package/build/cjs/lib/kit/components/HTMLContent/HTMLContent.js +9 -0
  4. package/build/cjs/lib/kit/components/HTMLContent/index.js +4 -0
  5. package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +3 -1
  6. package/build/cjs/lib/kit/components/Layouts/Column/Column.js +3 -1
  7. package/build/cjs/lib/kit/components/Layouts/Row/Row.js +3 -1
  8. package/build/cjs/lib/kit/components/Layouts/Section/Section.js +3 -1
  9. package/build/cjs/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +3 -1
  10. package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.js +3 -1
  11. package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +3 -1
  12. package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +3 -1
  13. package/build/cjs/lib/kit/components/Views/TableArrayView/TableArrayView.js +3 -1
  14. package/build/esm/lib/kit/components/Card/Card.js +3 -1
  15. package/build/esm/lib/kit/components/ErrorWrapper/ErrorWrapper.css +1 -1
  16. package/build/esm/lib/kit/components/HTMLContent/HTMLContent.d.ts +6 -0
  17. package/build/esm/lib/kit/components/HTMLContent/HTMLContent.js +4 -0
  18. package/build/esm/lib/kit/components/HTMLContent/index.d.ts +1 -0
  19. package/build/esm/lib/kit/components/HTMLContent/index.js +1 -0
  20. package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +3 -1
  21. package/build/esm/lib/kit/components/Layouts/Column/Column.js +3 -1
  22. package/build/esm/lib/kit/components/Layouts/Row/Row.js +3 -1
  23. package/build/esm/lib/kit/components/Layouts/Section/Section.js +3 -1
  24. package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.js +3 -1
  25. package/build/esm/lib/kit/components/TogglerCard/TogglerCard.js +3 -1
  26. package/build/esm/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +3 -1
  27. package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +3 -1
  28. package/build/esm/lib/kit/components/Views/TableArrayView/TableArrayView.js +3 -1
  29. package/package.json +2 -1
@@ -8,6 +8,7 @@ const uikit_1 = require("@gravity-ui/uikit");
8
8
  const isString_1 = tslib_1.__importDefault(require("lodash/isString"));
9
9
  const common_1 = require("../../constants/common");
10
10
  const utils_1 = require("../../utils");
11
+ const HTMLContent_1 = require("../HTMLContent");
11
12
  const b = (0, utils_1.block)('card');
12
13
  const Card = ({ name, title: propsTitle, description, actions, open: propsOpen, onToggle, alwaysOpen, disableHeaderToggle, checkEmptyBody, children, }) => {
13
14
  var _a;
@@ -41,7 +42,8 @@ const Card = ({ name, title: propsTitle, description, actions, open: propsOpen,
41
42
  description ? (react_1.default.createElement("div", { className: b('note') },
42
43
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
43
44
  placement: common_1.COMMON_POPOVER_PLACEMENT,
44
- } }, description))) : null));
45
+ } },
46
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: description })))) : null));
45
47
  }
46
48
  return propsTitle;
47
49
  }, [propsTitle, titlePopoverDisabled, description]);
@@ -39,7 +39,7 @@
39
39
  .df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__content,
40
40
  .df-error-wrapper_error .yc-checkbox__indicator:not(.df-error-wrapper-ignore)::before,
41
41
  .df-error-wrapper_error .g-checkbox__indicator:not(.df-error-wrapper-ignore)::before {
42
- border-color: var(--g-color-text-danger);
42
+ border-color: var(--g-color-line-danger);
43
43
  }
44
44
  .df-error-wrapper__error-text {
45
45
  color: var(--g-color-text-danger);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTMLContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const HTMLContent = ({ html }) => {
7
+ return react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: html } });
8
+ };
9
+ exports.HTMLContent = HTMLContent;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./HTMLContent"), exports);
@@ -11,6 +11,7 @@ const core_1 = require("../../../../core");
11
11
  const hooks_1 = require("../../../../core/components/Form/hooks");
12
12
  const common_1 = require("../../../constants/common");
13
13
  const utils_1 = require("../../../utils");
14
+ const HTMLContent_1 = require("../../HTMLContent");
14
15
  const b = (0, utils_1.block)('table-array');
15
16
  const TableArrayInput = ({ spec, name, arrayInput, input }) => {
16
17
  const { isHiddenField } = (0, hooks_1.useSearchContext)();
@@ -54,7 +55,8 @@ const TableArrayInput = ({ spec, name, arrayInput, input }) => {
54
55
  label,
55
56
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
56
57
  placement: common_1.COMMON_POPOVER_PLACEMENT,
57
- } }, description))),
58
+ } },
59
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: description })))),
58
60
  template: ({ key, }, idx) => {
59
61
  var _a, _b, _c;
60
62
  const entitySpec = (_a = items === null || items === void 0 ? void 0 : items.properties) === null || _a === void 0 ? void 0 : _a[property];
@@ -9,6 +9,7 @@ const core_1 = require("../../../../core");
9
9
  const components_1 = require("../../../components");
10
10
  const common_1 = require("../../../constants/common");
11
11
  const utils_1 = require("../../../utils");
12
+ const HTMLContent_1 = require("../../HTMLContent");
12
13
  const b = (0, utils_1.block)('column');
13
14
  const ColumnBase = ({ name, spec, input, meta, children, }) => {
14
15
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
@@ -21,7 +22,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
21
22
  react_1.default.createElement(uikit_1.Text, { className: b('note-inner') },
22
23
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
23
24
  placement: common_1.COMMON_POPOVER_PLACEMENT,
24
- } }, spec.viewSpec.layoutDescription)))) : null)),
25
+ } },
26
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
25
27
  react_1.default.createElement("div", { className: b('second-row') },
26
28
  react_1.default.createElement("div", { className: b('second-row-inner') },
27
29
  react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -9,6 +9,7 @@ const core_1 = require("../../../../core");
9
9
  const components_1 = require("../../../components");
10
10
  const common_1 = require("../../../constants/common");
11
11
  const utils_1 = require("../../../utils");
12
+ const HTMLContent_1 = require("../../HTMLContent");
12
13
  const b = (0, utils_1.block)('row');
13
14
  const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
14
15
  const arrayItem = react_1.default.useMemo(() => (0, core_1.isArrayItem)(name), [name]);
@@ -21,7 +22,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
21
22
  react_1.default.createElement(uikit_1.Text, { className: b('note-inner') },
22
23
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
23
24
  placement: common_1.COMMON_POPOVER_PLACEMENT,
24
- } }, spec.viewSpec.layoutDescription)))) : null)),
25
+ } },
26
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
25
27
  react_1.default.createElement("div", { className: b('right') },
26
28
  react_1.default.createElement("div", { className: b('right-inner') },
27
29
  react_1.default.createElement(components_1.ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -8,6 +8,7 @@ const __1 = require("../../");
8
8
  const __2 = require("../../../");
9
9
  const core_1 = require("../../../../core");
10
10
  const utils_1 = require("../../../utils");
11
+ const HTMLContent_1 = require("../../HTMLContent");
11
12
  const RemoveButton_1 = require("../../RemoveButton");
12
13
  const b = (0, utils_1.block)('section');
13
14
  const SectionBase = (_a) => {
@@ -60,7 +61,8 @@ const SectionBase = (_a) => {
60
61
  description = (react_1.default.createElement(uikit_1.Text, { className: b('note') },
61
62
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
62
63
  placement: __2.COMMON_POPOVER_PLACEMENT,
63
- } }, spec.viewSpec.layoutDescription)));
64
+ } },
65
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))));
64
66
  }
65
67
  }
66
68
  const layoutTitle = spec.viewSpec.layoutTitle;
@@ -7,6 +7,7 @@ const icons_1 = require("@gravity-ui/icons");
7
7
  const uikit_1 = require("@gravity-ui/uikit");
8
8
  const common_1 = require("../../constants/common");
9
9
  const utils_1 = require("../../utils");
10
+ const HTMLContent_1 = require("../HTMLContent");
10
11
  const b = (0, utils_1.block)('simple-vertical-accordeon');
11
12
  const TITLE_TEXT_MAX_WIDTH = 485; /** 533px (COMMON_TITLE_MAX_WIDTH) - 48px of padding */
12
13
  class SimpleVerticalAccordeon extends react_1.default.Component {
@@ -92,7 +93,8 @@ class SimpleVerticalAccordeon extends react_1.default.Component {
92
93
  return note ? (react_1.default.createElement(uikit_1.Text, { className: b('tooltip') },
93
94
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
94
95
  placement: common_1.COMMON_POPOVER_PLACEMENT,
95
- } }, note))) : null;
96
+ } },
97
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: note })))) : null;
96
98
  }
97
99
  }
98
100
  exports.SimpleVerticalAccordeon = SimpleVerticalAccordeon;
@@ -6,6 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
7
  const common_1 = require("../../constants/common");
8
8
  const utils_1 = require("../../utils");
9
+ const HTMLContent_1 = require("../HTMLContent");
9
10
  const b = (0, utils_1.block)('toggler-card');
10
11
  const TogglerCard = ({ description, title, text, onClick, disabled, selected, }) => {
11
12
  return (react_1.default.createElement(uikit_1.Card, { onClick: onClick, type: "selection", disabled: disabled ? !selected : disabled, selected: selected, size: "m", className: b() },
@@ -13,7 +14,8 @@ const TogglerCard = ({ description, title, text, onClick, disabled, selected, })
13
14
  react_1.default.createElement(uikit_1.Text, { variant: "subheader-2", ellipsis: true }, title),
14
15
  description ? (react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
15
16
  placement: common_1.COMMON_POPOVER_PLACEMENT,
16
- } }, description)) : null),
17
+ } },
18
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: description }))) : null),
17
19
  react_1.default.createElement(uikit_1.Text, { variant: "body-1", color: "secondary", className: b('text') }, text)));
18
20
  };
19
21
  exports.TogglerCard = TogglerCard;
@@ -8,6 +8,7 @@ const core_1 = require("../../../../core");
8
8
  const kit_1 = require("../../../../kit");
9
9
  const common_1 = require("../../../constants/common");
10
10
  const utils_1 = require("../../../utils");
11
+ const HTMLContent_1 = require("../../HTMLContent");
11
12
  const b = (0, utils_1.block)('view-column');
12
13
  const ViewColumn = ({ value, spec, children, }) => {
13
14
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -19,7 +20,8 @@ const ViewColumn = ({ value, spec, children, }) => {
19
20
  react_1.default.createElement(uikit_1.Text, { color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
20
21
  showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(uikit_1.HelpMark, { className: b('note'), popoverProps: {
21
22
  placement: common_1.COMMON_POPOVER_PLACEMENT,
22
- } }, spec.viewSpec.layoutDescription)) : null),
23
+ } },
24
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))) : null),
23
25
  react_1.default.createElement("div", { className: b('second-row') }, children),
24
26
  react_1.default.createElement(kit_1.CopyButton, { spec: spec, value: value })));
25
27
  };
@@ -8,6 +8,7 @@ const core_1 = require("../../../../core");
8
8
  const kit_1 = require("../../../../kit");
9
9
  const common_1 = require("../../../constants/common");
10
10
  const utils_1 = require("../../../utils");
11
+ const HTMLContent_1 = require("../../HTMLContent");
11
12
  const b = (0, utils_1.block)('view-row');
12
13
  const ViewRow = ({ value, spec, children, }) => {
13
14
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -19,7 +20,8 @@ const ViewRow = ({ value, spec, children, }) => {
19
20
  react_1.default.createElement(uikit_1.Text, { whiteSpace: "nowrap", color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
20
21
  showLayoutDescription && spec.viewSpec.layoutDescription ? (react_1.default.createElement(uikit_1.HelpMark, { className: b('note'), popoverProps: {
21
22
  placement: common_1.COMMON_POPOVER_PLACEMENT,
22
- } }, spec.viewSpec.layoutDescription)) : null,
23
+ } },
24
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: spec.viewSpec.layoutDescription }))) : null,
23
25
  react_1.default.createElement("div", { className: b('dots') })),
24
26
  react_1.default.createElement("div", { className: b('right') }, children),
25
27
  react_1.default.createElement(kit_1.CopyButton, { spec: spec, value: value })));
@@ -7,6 +7,7 @@ const uikit_1 = require("@gravity-ui/uikit");
7
7
  const core_1 = require("../../../../core");
8
8
  const common_1 = require("../../../constants/common");
9
9
  const utils_1 = require("../../../utils");
10
+ const HTMLContent_1 = require("../../HTMLContent");
10
11
  const b = (0, utils_1.block)('table-array-view');
11
12
  const TableArrayView = ({ value = [], spec, name }) => {
12
13
  const { showLayoutDescription } = (0, core_1.useDynamicFormsCtx)();
@@ -28,7 +29,8 @@ const TableArrayView = ({ value = [], spec, name }) => {
28
29
  label,
29
30
  react_1.default.createElement(uikit_1.HelpMark, { popoverProps: {
30
31
  placement: common_1.COMMON_POPOVER_PLACEMENT,
31
- } }, description)))
32
+ } },
33
+ react_1.default.createElement(HTMLContent_1.HTMLContent, { html: description }))))
32
34
  : label,
33
35
  template: (_, idx) => {
34
36
  var _a;
@@ -4,6 +4,7 @@ import { Button, Card as CardBase, HelpMark, Icon, Popover, Text } from '@gravit
4
4
  import isString from 'lodash/isString';
5
5
  import { COMMON_POPOVER_PLACEMENT, COMMON_TITLE_MAX_WIDTH } from '../../constants/common';
6
6
  import { block } from '../../utils';
7
+ import { HTMLContent } from '../HTMLContent';
7
8
  import './Card.css';
8
9
  const b = block('card');
9
10
  export const Card = ({ name, title: propsTitle, description, actions, open: propsOpen, onToggle, alwaysOpen, disableHeaderToggle, checkEmptyBody, children, }) => {
@@ -38,7 +39,8 @@ export const Card = ({ name, title: propsTitle, description, actions, open: prop
38
39
  description ? (React.createElement("div", { className: b('note') },
39
40
  React.createElement(HelpMark, { popoverProps: {
40
41
  placement: COMMON_POPOVER_PLACEMENT,
41
- } }, description))) : null));
42
+ } },
43
+ React.createElement(HTMLContent, { html: description })))) : null));
42
44
  }
43
45
  return propsTitle;
44
46
  }, [propsTitle, titlePopoverDisabled, description]);
@@ -39,7 +39,7 @@
39
39
  .df-error-wrapper_error .g-text-input_view_normal:not(.df-error-wrapper-ignore) .g-text-input__content,
40
40
  .df-error-wrapper_error .yc-checkbox__indicator:not(.df-error-wrapper-ignore)::before,
41
41
  .df-error-wrapper_error .g-checkbox__indicator:not(.df-error-wrapper-ignore)::before {
42
- border-color: var(--g-color-text-danger);
42
+ border-color: var(--g-color-line-danger);
43
43
  }
44
44
  .df-error-wrapper__error-text {
45
45
  color: var(--g-color-text-danger);
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface HTMLContentProps {
3
+ html: string;
4
+ }
5
+ export declare const HTMLContent: React.FC<HTMLContentProps>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export const HTMLContent = ({ html }) => {
3
+ return React.createElement("div", { dangerouslySetInnerHTML: { __html: html } });
4
+ };
@@ -0,0 +1 @@
1
+ export * from './HTMLContent';
@@ -0,0 +1 @@
1
+ export * from './HTMLContent';
@@ -7,6 +7,7 @@ import { Controller, OBJECT_ARRAY_CNT, OBJECT_ARRAY_FLAG, isArraySpec, isBoolean
7
7
  import { useSearchContext } from '../../../../core/components/Form/hooks';
8
8
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
9
9
  import { block } from '../../../utils';
10
+ import { HTMLContent } from '../../HTMLContent';
10
11
  import './TableArrayInput.css';
11
12
  const b = block('table-array');
12
13
  export const TableArrayInput = ({ spec, name, arrayInput, input }) => {
@@ -51,7 +52,8 @@ export const TableArrayInput = ({ spec, name, arrayInput, input }) => {
51
52
  label,
52
53
  React.createElement(HelpMark, { popoverProps: {
53
54
  placement: COMMON_POPOVER_PLACEMENT,
54
- } }, description))),
55
+ } },
56
+ React.createElement(HTMLContent, { html: description })))),
55
57
  template: ({ key, }, idx) => {
56
58
  var _a, _b, _c;
57
59
  const entitySpec = (_a = items === null || items === void 0 ? void 0 : items.properties) === null || _a === void 0 ? void 0 : _a[property];
@@ -5,6 +5,7 @@ import { isArrayItem, isArraySpec, isObjectSpec, withGenerateButton } from '../.
5
5
  import { ErrorWrapper, GenerateRandomValueButton } from '../../../components';
6
6
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
7
7
  import { block } from '../../../utils';
8
+ import { HTMLContent } from '../../HTMLContent';
8
9
  import './Column.css';
9
10
  const b = block('column');
10
11
  const ColumnBase = ({ name, spec, input, meta, children, }) => {
@@ -18,7 +19,8 @@ const ColumnBase = ({ name, spec, input, meta, children, }) => {
18
19
  React.createElement(Text, { className: b('note-inner') },
19
20
  React.createElement(HelpMark, { popoverProps: {
20
21
  placement: COMMON_POPOVER_PLACEMENT,
21
- } }, spec.viewSpec.layoutDescription)))) : null)),
22
+ } },
23
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
22
24
  React.createElement("div", { className: b('second-row') },
23
25
  React.createElement("div", { className: b('second-row-inner') },
24
26
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -5,6 +5,7 @@ import { isArrayItem, isArraySpec, isObjectSpec, withGenerateButton } from '../.
5
5
  import { ErrorWrapper, GenerateRandomValueButton } from '../../../components';
6
6
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
7
7
  import { block } from '../../../utils';
8
+ import { HTMLContent } from '../../HTMLContent';
8
9
  import './Row.css';
9
10
  const b = block('row');
10
11
  const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) => {
@@ -18,7 +19,8 @@ const RowBase = ({ name, spec, input, meta, verboseDescription, children, }) =>
18
19
  React.createElement(Text, { className: b('note-inner') },
19
20
  React.createElement(HelpMark, { popoverProps: {
20
21
  placement: COMMON_POPOVER_PLACEMENT,
21
- } }, spec.viewSpec.layoutDescription)))) : null)),
22
+ } },
23
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))))) : null)),
22
24
  React.createElement("div", { className: b('right') },
23
25
  React.createElement("div", { className: b('right-inner') },
24
26
  React.createElement(ErrorWrapper, { name: name, meta: meta, withoutChildErrorStyles:
@@ -5,6 +5,7 @@ import { GroupIndent } from '../../';
5
5
  import { COMMON_POPOVER_PLACEMENT, COMMON_TITLE_MAX_WIDTH, ErrorWrapper } from '../../../';
6
6
  import { isArrayItem, isArraySpec, isObjectSpec } from '../../../../core';
7
7
  import { block } from '../../../utils';
8
+ import { HTMLContent } from '../../HTMLContent';
8
9
  import { RemoveButton } from '../../RemoveButton';
9
10
  import './Section.css';
10
11
  const b = block('section');
@@ -58,7 +59,8 @@ const SectionBase = (_a) => {
58
59
  description = (React.createElement(Text, { className: b('note') },
59
60
  React.createElement(HelpMark, { popoverProps: {
60
61
  placement: COMMON_POPOVER_PLACEMENT,
61
- } }, spec.viewSpec.layoutDescription)));
62
+ } },
63
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))));
62
64
  }
63
65
  }
64
66
  const layoutTitle = spec.viewSpec.layoutTitle;
@@ -3,6 +3,7 @@ import { ChevronDown } from '@gravity-ui/icons';
3
3
  import { Button, HelpMark, Icon, Popover, Text } from '@gravity-ui/uikit';
4
4
  import { COMMON_POPOVER_PLACEMENT } from '../../constants/common';
5
5
  import { block } from '../../utils';
6
+ import { HTMLContent } from '../HTMLContent';
6
7
  import './SimpleVerticalAccordeon.css';
7
8
  const b = block('simple-vertical-accordeon');
8
9
  const TITLE_TEXT_MAX_WIDTH = 485; /** 533px (COMMON_TITLE_MAX_WIDTH) - 48px of padding */
@@ -89,7 +90,8 @@ export class SimpleVerticalAccordeon extends React.Component {
89
90
  return note ? (React.createElement(Text, { className: b('tooltip') },
90
91
  React.createElement(HelpMark, { popoverProps: {
91
92
  placement: COMMON_POPOVER_PLACEMENT,
92
- } }, note))) : null;
93
+ } },
94
+ React.createElement(HTMLContent, { html: note })))) : null;
93
95
  }
94
96
  }
95
97
  SimpleVerticalAccordeon.defaultProps = {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Card, HelpMark, Text } from '@gravity-ui/uikit';
3
3
  import { COMMON_POPOVER_PLACEMENT } from '../../constants/common';
4
4
  import { block } from '../../utils';
5
+ import { HTMLContent } from '../HTMLContent';
5
6
  import './TogglerCard.css';
6
7
  const b = block('toggler-card');
7
8
  export const TogglerCard = ({ description, title, text, onClick, disabled, selected, }) => {
@@ -10,6 +11,7 @@ export const TogglerCard = ({ description, title, text, onClick, disabled, selec
10
11
  React.createElement(Text, { variant: "subheader-2", ellipsis: true }, title),
11
12
  description ? (React.createElement(HelpMark, { popoverProps: {
12
13
  placement: COMMON_POPOVER_PLACEMENT,
13
- } }, description)) : null),
14
+ } },
15
+ React.createElement(HTMLContent, { html: description }))) : null),
14
16
  React.createElement(Text, { variant: "body-1", color: "secondary", className: b('text') }, text)));
15
17
  };
@@ -4,6 +4,7 @@ import { useDynamicFormsCtx } from '../../../../core';
4
4
  import { CopyButton } from '../../../../kit';
5
5
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
6
6
  import { block, isNotEmptyValue } from '../../../utils';
7
+ import { HTMLContent } from '../../HTMLContent';
7
8
  import './ViewColumn.css';
8
9
  const b = block('view-column');
9
10
  export const ViewColumn = ({ value, spec, children, }) => {
@@ -16,7 +17,8 @@ export const ViewColumn = ({ value, spec, children, }) => {
16
17
  React.createElement(Text, { color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
17
18
  showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpMark, { className: b('note'), popoverProps: {
18
19
  placement: COMMON_POPOVER_PLACEMENT,
19
- } }, spec.viewSpec.layoutDescription)) : null),
20
+ } },
21
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))) : null),
20
22
  React.createElement("div", { className: b('second-row') }, children),
21
23
  React.createElement(CopyButton, { spec: spec, value: value })));
22
24
  };
@@ -4,6 +4,7 @@ import { useDynamicFormsCtx } from '../../../../core';
4
4
  import { CopyButton } from '../../../../kit';
5
5
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
6
6
  import { block, isNotEmptyValue } from '../../../utils';
7
+ import { HTMLContent } from '../../HTMLContent';
7
8
  import './ViewRow.css';
8
9
  const b = block('view-row');
9
10
  export const ViewRow = ({ value, spec, children, }) => {
@@ -16,7 +17,8 @@ export const ViewRow = ({ value, spec, children, }) => {
16
17
  React.createElement(Text, { whiteSpace: "nowrap", color: "secondary", ellipsis: true }, spec.viewSpec.layoutTitle),
17
18
  showLayoutDescription && spec.viewSpec.layoutDescription ? (React.createElement(HelpMark, { className: b('note'), popoverProps: {
18
19
  placement: COMMON_POPOVER_PLACEMENT,
19
- } }, spec.viewSpec.layoutDescription)) : null,
20
+ } },
21
+ React.createElement(HTMLContent, { html: spec.viewSpec.layoutDescription }))) : null,
20
22
  React.createElement("div", { className: b('dots') })),
21
23
  React.createElement("div", { className: b('right') }, children),
22
24
  React.createElement(CopyButton, { spec: spec, value: value })));
@@ -3,6 +3,7 @@ import { Flex, HelpMark, Table } from '@gravity-ui/uikit';
3
3
  import { ViewController, isArraySpec, isBooleanSpec, isObjectSpec, useDynamicFormsCtx, } from '../../../../core';
4
4
  import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
5
5
  import { block } from '../../../utils';
6
+ import { HTMLContent } from '../../HTMLContent';
6
7
  import './TableArrayView.css';
7
8
  const b = block('table-array-view');
8
9
  export const TableArrayView = ({ value = [], spec, name }) => {
@@ -25,7 +26,8 @@ export const TableArrayView = ({ value = [], spec, name }) => {
25
26
  label,
26
27
  React.createElement(HelpMark, { popoverProps: {
27
28
  placement: COMMON_POPOVER_PLACEMENT,
28
- } }, description)))
29
+ } },
30
+ React.createElement(HTMLContent, { html: description }))))
29
31
  : label,
30
32
  template: (_, idx) => {
31
33
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dynamic-forms",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/cjs/index.js",
@@ -80,6 +80,7 @@
80
80
  "@types/react-is": "^17.0.3",
81
81
  "@types/uuid": "^9.0.4",
82
82
  "@vitejs/plugin-react": "^4.2.0",
83
+ "ajv": "^8.17.1",
83
84
  "css-loader": "^5.2.6",
84
85
  "eslint": "^8.49.0",
85
86
  "final-form": "^4.20.2",