@gravity-ui/page-constructor 7.21.1 → 7.22.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 (128) hide show
  1. package/build/cjs/blocks/ContentLayout/schema.d.ts +11 -0
  2. package/build/cjs/blocks/FoldableList/schema.d.ts +11 -0
  3. package/build/cjs/blocks/Form/Form.css +5 -2
  4. package/build/cjs/blocks/Form/Form.js +12 -9
  5. package/build/cjs/blocks/Form/Form.js.map +1 -1
  6. package/build/cjs/blocks/Form/schema.d.ts +12 -4
  7. package/build/cjs/blocks/Form/schema.js +1 -4
  8. package/build/cjs/blocks/Form/schema.js.map +1 -1
  9. package/build/cjs/blocks/Form/utils.d.ts +3 -0
  10. package/build/cjs/blocks/Form/utils.js +20 -0
  11. package/build/cjs/blocks/Form/utils.js.map +1 -0
  12. package/build/cjs/blocks/Info/schema.d.ts +22 -0
  13. package/build/cjs/blocks/Map/schema.d.ts +11 -0
  14. package/build/cjs/blocks/Media/schema.d.ts +22 -0
  15. package/build/cjs/blocks/Questions/schema.d.ts +11 -0
  16. package/build/cjs/blocks/Tabs/schema.d.ts +11 -0
  17. package/build/cjs/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  18. package/build/cjs/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  19. package/build/cjs/components/ContentIcon/ContentIcon.js.map +1 -0
  20. package/build/cjs/components/ContentLabels/ContentLabels.css +53 -0
  21. package/build/cjs/components/ContentLabels/ContentLabels.d.ts +3 -0
  22. package/build/cjs/components/ContentLabels/ContentLabels.js +16 -0
  23. package/build/cjs/components/ContentLabels/ContentLabels.js.map +1 -0
  24. package/build/cjs/components/ContentList/ContentList.js +2 -2
  25. package/build/cjs/components/ContentList/ContentList.js.map +1 -1
  26. package/build/cjs/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  27. package/build/cjs/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  28. package/build/cjs/context/windowWidthContext/index.d.ts +1 -1
  29. package/build/cjs/context/windowWidthContext/index.js +1 -1
  30. package/build/cjs/context/windowWidthContext/index.js.map +1 -1
  31. package/build/cjs/hooks/useDeviceValue.d.ts +2 -0
  32. package/build/cjs/hooks/useDeviceValue.js +33 -0
  33. package/build/cjs/hooks/useDeviceValue.js.map +1 -0
  34. package/build/cjs/models/constructor-items/blocks.d.ts +25 -9
  35. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  36. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -5
  37. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  38. package/build/cjs/schema/constants.d.ts +33 -0
  39. package/build/cjs/schema/validators/common.d.ts +12 -1
  40. package/build/cjs/schema/validators/common.js +21 -0
  41. package/build/cjs/schema/validators/common.js.map +1 -1
  42. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  43. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +11 -0
  44. package/build/cjs/sub-blocks/Content/Content.css +16 -0
  45. package/build/cjs/sub-blocks/Content/Content.js +12 -3
  46. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  47. package/build/cjs/sub-blocks/Content/schema.d.ts +103 -1
  48. package/build/cjs/sub-blocks/Content/schema.js +22 -2
  49. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  50. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +11 -0
  51. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +11 -0
  52. package/build/cjs/utils/breakpoint.d.ts +7 -0
  53. package/build/cjs/utils/breakpoint.js +12 -0
  54. package/build/cjs/utils/breakpoint.js.map +1 -0
  55. package/build/cjs/utils/index.d.ts +1 -0
  56. package/build/cjs/utils/index.js +1 -0
  57. package/build/cjs/utils/index.js.map +1 -1
  58. package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
  59. package/build/esm/blocks/FoldableList/schema.d.ts +11 -0
  60. package/build/esm/blocks/Form/Form.css +5 -2
  61. package/build/esm/blocks/Form/Form.js +12 -9
  62. package/build/esm/blocks/Form/Form.js.map +1 -1
  63. package/build/esm/blocks/Form/schema.d.ts +12 -4
  64. package/build/esm/blocks/Form/schema.js +1 -4
  65. package/build/esm/blocks/Form/schema.js.map +1 -1
  66. package/build/esm/blocks/Form/utils.d.ts +3 -0
  67. package/build/esm/blocks/Form/utils.js +16 -0
  68. package/build/esm/blocks/Form/utils.js.map +1 -0
  69. package/build/esm/blocks/Info/schema.d.ts +22 -0
  70. package/build/esm/blocks/Map/schema.d.ts +11 -0
  71. package/build/esm/blocks/Media/schema.d.ts +22 -0
  72. package/build/esm/blocks/Questions/schema.d.ts +11 -0
  73. package/build/esm/blocks/Tabs/schema.d.ts +11 -0
  74. package/build/esm/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  75. package/build/esm/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  76. package/build/esm/components/ContentIcon/ContentIcon.js.map +1 -0
  77. package/build/esm/components/ContentLabels/ContentLabels.css +53 -0
  78. package/build/esm/components/ContentLabels/ContentLabels.d.ts +4 -0
  79. package/build/esm/components/ContentLabels/ContentLabels.js +14 -0
  80. package/build/esm/components/ContentLabels/ContentLabels.js.map +1 -0
  81. package/build/esm/components/ContentList/ContentList.js +2 -2
  82. package/build/esm/components/ContentList/ContentList.js.map +1 -1
  83. package/build/esm/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  84. package/build/esm/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  85. package/build/esm/context/windowWidthContext/index.d.ts +1 -1
  86. package/build/esm/context/windowWidthContext/index.js +1 -1
  87. package/build/esm/context/windowWidthContext/index.js.map +1 -1
  88. package/build/esm/hooks/useDeviceValue.d.ts +2 -0
  89. package/build/esm/hooks/useDeviceValue.js +29 -0
  90. package/build/esm/hooks/useDeviceValue.js.map +1 -0
  91. package/build/esm/models/constructor-items/blocks.d.ts +25 -9
  92. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  93. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -5
  94. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  95. package/build/esm/schema/constants.d.ts +33 -0
  96. package/build/esm/schema/validators/common.d.ts +12 -1
  97. package/build/esm/schema/validators/common.js +21 -1
  98. package/build/esm/schema/validators/common.js.map +1 -1
  99. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  100. package/build/esm/sub-blocks/BasicCard/schema.d.ts +11 -0
  101. package/build/esm/sub-blocks/Content/Content.css +16 -0
  102. package/build/esm/sub-blocks/Content/Content.js +11 -3
  103. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  104. package/build/esm/sub-blocks/Content/schema.d.ts +103 -1
  105. package/build/esm/sub-blocks/Content/schema.js +21 -1
  106. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  107. package/build/esm/sub-blocks/ImageCard/schema.d.ts +11 -0
  108. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +11 -0
  109. package/build/esm/utils/breakpoint.d.ts +7 -0
  110. package/build/esm/utils/breakpoint.js +9 -0
  111. package/build/esm/utils/breakpoint.js.map +1 -0
  112. package/build/esm/utils/index.d.ts +1 -0
  113. package/build/esm/utils/index.js +1 -0
  114. package/build/esm/utils/index.js.map +1 -1
  115. package/package.json +1 -1
  116. package/schema/index.js +1 -1
  117. package/server/models/constructor-items/blocks.d.ts +25 -9
  118. package/server/models/constructor-items/sub-blocks.d.ts +5 -5
  119. package/server/utils/breakpoint.d.ts +7 -0
  120. package/server/utils/breakpoint.js +11 -0
  121. package/server/utils/index.d.ts +1 -0
  122. package/server/utils/index.js +1 -0
  123. package/build/cjs/components/ContentList/ContentListItemIcon.js.map +0 -1
  124. package/build/cjs/context/windowWidthContext/BreakpointContext.js.map +0 -1
  125. package/build/esm/components/ContentList/ContentListItemIcon.js.map +0 -1
  126. package/build/esm/context/windowWidthContext/BreakpointContext.js.map +0 -1
  127. /package/build/cjs/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
  128. /package/build/esm/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAS/B,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,EAAC,eAAe,EAAC,8BAA2B;AAEnD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAID,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACpC,MAAM,EACF,KAAK,EACL,OAAO,EAAE,gBAAgB,EACzB,IAAI,EACJ,MAAM,EACN,cAAc,EACd,IAAI,GAAG,GAAG,EACV,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,QAAQ,EACR,KAAK,EACL,SAAS,EACT,IAAI,EACJ,EAAE,EACF,eAAe,GAClB,GAAG,KAAK,CAAC;IACV,MAAM,YAAY,GAAG,eAAe,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,S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AAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,GAC1E,CACT,CAAC,CAAC,CAAC,IAAI,EACP,cAAc,IAAI,CACf,cAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,YACvB,KAAC,UAAU,IACP,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE;wBACP,WAAW,EAAE,IAAI;wBACjB,oBAAoB,EAAE,IAAI;wBAC1B,CAAC,oBAAoB,IAAI,EAAE,CAAC,EAAE,IAAI;qBACrC,GACH,GACA,CACT,EACA,KAAK,IAAI,CACN,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAC,CAAC,EAC7B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,KAAK,EACtB,MAAM,EAAE,YAAY,CAAC,IAAI,GAC3B,CACL,EACA,OAAO,IAAI,CACR,KAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,CAAC,EAC/B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n qa={qaAttributes.list}\n />\n </div>\n )}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links', {size})}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons', {size})}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
1
+ {"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAChF,OAAO,aAAa,wDAAqD;AACzE,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAS/B,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,EAAC,eAAe,EAAC,8BAA2B;AAEnD,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3B,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAID,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACpC,MAAM,EACF,KAAK,EACL,OAAO,EAAE,gBAAgB,EACzB,IAAI,EACJ,MAAM,EACN,cAAc,EACd,IAAI,GAAG,GAAG,EACV,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,QAAQ,EACR,KAAK,EACL,SAAS,EACT,IAAI,EACJ,MAAM,EACN,EAAE,EACF,eAAe,GAClB,GAAG,KAAK,CAAC;IACV,MAAM,YAAY,GAAG,eAAe,CAAC,EAAE,EAAE;QACrC,OAAO;QACP,MAAM;QACN,SAAS;QACT,QAAQ;QACR,MAAM;QACN,QAAQ;KACX,CAAC,CAAC;IAEH,MAAM,UAAU,GACZ,CAAC,KAAK,IAAI,OAAO,KAAK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,GACzB,GACA,CACT,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CACZ,cAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACrB,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,GAC1E,CACT,CAAC,CAAC,CAAC,IAAI,EACP,cAAc,IAAI,CACf,cAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,YACvB,KAAC,UAAU,IACP,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE;wBACP,WAAW,EAAE,IAAI;wBACjB,oBAAoB,EAAE,IAAI;wBAC1B,CAAC,oBAAoB,IAAI,EAAE,CAAC,EAAE,IAAI;qBACrC,GACH,GACA,CACT,EACA,KAAK,IAAI,CACN,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAC,CAAC,EAC7B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,KAAK,EACtB,MAAM,EAAE,YAAY,CAAC,IAAI,GAC3B,CACL,EACA,OAAO,IAAI,CACR,KAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,CAAC,EAC/B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,YAAY,CAAC,OAAO,EACxB,QAAQ,EAAE,YAAY,CAAC,MAAM,GAC/B,CACL,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {Buttons, ContentList, Links, Title, YFMWrapper} from '../../components';\nimport ContentLabels from '../../components/ContentLabels/ContentLabels';\nimport {Col} from '../../grid';\nimport {\n ClassNameProps,\n ContentBlockProps,\n ContentSize,\n TextSize,\n TitleItemProps,\n} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\n\nimport './Content.scss';\n\nconst b = block('content');\n\nfunction getTextSize(size: ContentSize): TextSize {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n return 'sm';\n case 'l':\n default:\n return 'm';\n }\n}\n\nexport type ContentProps = ContentBlockProps & ClassNameProps & QAProps;\n\nconst Content = (props: ContentProps) => {\n const {\n title,\n titleId: titleIdFromProps,\n text,\n textId,\n additionalInfo,\n size = 'l',\n links,\n buttons,\n colSizes = {all: 12, sm: 8},\n centered,\n theme,\n className,\n list,\n labels,\n qa,\n controlPosition,\n } = props;\n const qaAttributes = getQaAttrubutes(qa, [\n 'links',\n 'link',\n 'buttons',\n 'button',\n 'list',\n 'labels',\n ]);\n\n const titleProps =\n !title || typeof title === 'string'\n ? ({text: title, textSize: getTextSize(size)} as TitleItemProps)\n : title;\n\n const hasTitle = Boolean(title);\n const defaultTitleId = useUniqId();\n const titleId = titleIdFromProps || defaultTitleId;\n\n return (\n <Col\n className={b({size, centered, theme, 'control-position': controlPosition}, className)}\n reset\n sizes={colSizes}\n qa={qaAttributes.container}\n >\n {title && (\n <Title\n className={b('title')}\n title={titleProps}\n colSizes={{all: 12}}\n id={titleId}\n />\n )}\n {text && (\n <div className={b('text', {['without-title']: !hasTitle})}>\n <YFMWrapper\n content={text}\n modifiers={{constructor: true, [`constructor-size-${size}`]: true}}\n id={textId}\n qa={qaAttributes.list}\n />\n </div>\n )}\n {labels?.length ? (\n <div className={b('labels')}>\n <ContentLabels\n labels={labels}\n theme={theme}\n size={size}\n qa={qaAttributes.labels}\n />\n </div>\n ) : null}\n {list?.length ? (\n <div className={b('list')}>\n <ContentList list={list} size={size} qa={qaAttributes.list} theme={theme} />\n </div>\n ) : null}\n {additionalInfo && (\n <div className={b('notice')}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n 'constructor-notice': true,\n [`constructor-size-${size}`]: true,\n }}\n />\n </div>\n )}\n {links && (\n <Links\n className={b('links', {size})}\n size={size}\n links={links}\n titleId={titleId}\n qa={qaAttributes.links}\n linkQa={qaAttributes.link}\n />\n )}\n {buttons && (\n <Buttons\n className={b('buttons', {size})}\n size={size}\n buttons={buttons}\n titleId={titleId}\n qa={qaAttributes.buttons}\n buttonQa={qaAttributes.button}\n />\n )}\n </Col>\n );\n};\n\nexport default Content;\n"]}
@@ -1,6 +1,8 @@
1
1
  export declare const ContentItem: {
2
2
  additionalProperties: boolean;
3
- required: string[];
3
+ oneOf: {
4
+ required: string[];
5
+ }[];
4
6
  properties: {
5
7
  title: {
6
8
  type: string;
@@ -80,6 +82,84 @@ export declare const ContentItem: {
80
82
  };
81
83
  };
82
84
  };
85
+ export declare const ContentLabel: {
86
+ additionalProperties: boolean;
87
+ required: string[];
88
+ properties: {
89
+ text: {
90
+ type: string;
91
+ contentType: string;
92
+ };
93
+ icon: {
94
+ oneOf: (({
95
+ oneOf: ({
96
+ type: string;
97
+ properties: {
98
+ when: {
99
+ type: string;
100
+ };
101
+ };
102
+ } | {
103
+ type: string;
104
+ pattern: string;
105
+ optionName: string;
106
+ items?: undefined;
107
+ } | {
108
+ type: string;
109
+ items: {
110
+ type: string;
111
+ properties: {
112
+ when: {
113
+ type: string;
114
+ };
115
+ };
116
+ };
117
+ optionName: string;
118
+ pattern?: undefined;
119
+ })[];
120
+ } & {
121
+ optionName: string;
122
+ }) | {
123
+ type: string;
124
+ additionalProperties: boolean;
125
+ required: import("../../index.js").Theme[];
126
+ properties: {};
127
+ optionName: string;
128
+ })[];
129
+ };
130
+ gravityIcon: {
131
+ oneOf: (({
132
+ oneOf: ({
133
+ type: string;
134
+ additionalProperties?: undefined;
135
+ required?: undefined;
136
+ properties?: undefined;
137
+ } | {
138
+ type: string;
139
+ additionalProperties: boolean;
140
+ required: string[];
141
+ properties: {
142
+ name: {
143
+ type: string;
144
+ };
145
+ color: {
146
+ type: string;
147
+ enum: string[];
148
+ };
149
+ };
150
+ })[];
151
+ } & {
152
+ optionName: string;
153
+ }) | {
154
+ type: string;
155
+ additionalProperties: boolean;
156
+ required: import("../../index.js").Theme[];
157
+ properties: {};
158
+ optionName: string;
159
+ })[];
160
+ };
161
+ };
162
+ };
83
163
  export declare const ContentBase: {
84
164
  title: {
85
165
  oneOf: ({
@@ -163,6 +243,17 @@ export declare const ContentBase: {
163
243
  };
164
244
  };
165
245
  };
246
+ labels: {
247
+ type: string;
248
+ items: {
249
+ type: string;
250
+ properties: {
251
+ when: {
252
+ type: string;
253
+ };
254
+ };
255
+ };
256
+ };
166
257
  controlPosition: {
167
258
  type: string;
168
259
  enum: string[];
@@ -258,6 +349,17 @@ export declare const ContentBlock: {
258
349
  };
259
350
  };
260
351
  };
352
+ labels: {
353
+ type: string;
354
+ items: {
355
+ type: string;
356
+ properties: {
357
+ when: {
358
+ type: string;
359
+ };
360
+ };
361
+ };
362
+ };
261
363
  controlPosition: {
262
364
  type: string;
263
365
  enum: string[];
@@ -3,7 +3,14 @@ import { ButtonBlock, GravityIconProps, LinkProps, TitleProps, containerSizesArr
3
3
  import { filteredArray } from "../../schema/validators/utils.js";
4
4
  export const ContentItem = {
5
5
  additionalProperties: false,
6
- required: ['icon'],
6
+ oneOf: [
7
+ {
8
+ required: ['icon'],
9
+ },
10
+ {
11
+ required: ['gravityIcon'],
12
+ },
13
+ ],
7
14
  properties: {
8
15
  title: {
9
16
  type: 'string',
@@ -17,6 +24,18 @@ export const ContentItem = {
17
24
  gravityIcon: withTheme(GravityIconProps),
18
25
  },
19
26
  };
27
+ export const ContentLabel = {
28
+ additionalProperties: false,
29
+ required: ['text'],
30
+ properties: {
31
+ text: {
32
+ type: 'string',
33
+ contentType: 'text',
34
+ },
35
+ icon: withTheme(ImageProps),
36
+ gravityIcon: withTheme(GravityIconProps),
37
+ },
38
+ };
20
39
  export const ContentBase = {
21
40
  title: {
22
41
  oneOf: [
@@ -51,6 +70,7 @@ export const ContentBase = {
51
70
  enum: contentThemes,
52
71
  },
53
72
  list: filteredArray(ContentItem),
73
+ labels: filteredArray(ContentLabel),
54
74
  controlPosition: {
55
75
  type: 'string',
56
76
  enum: ['default', 'bottom'],
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC;QAC3B,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;gBACnB,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;KACrB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;KACrB;IACD,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC;IAC/B,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC;IACnC,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;KACtB;IACD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC;IAChC,eAAe,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC9B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,OAAO,EAAE;QACL,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACR,GAAG,WAAW;YACd,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAC,CAAC,EAAE,EAAE,CAAC;YACvF,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n ButtonBlock,\n GravityIconProps,\n LinkProps,\n TitleProps,\n containerSizesArray,\n contentSizes,\n contentThemes,\n sizeNumber,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\n\nexport const ContentItem = {\n additionalProperties: false,\n required: ['icon'],\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentBase = {\n title: {\n oneOf: [\n {\n type: 'string',\n contentType: 'text',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n additionalInfo: {\n type: 'string',\n contentType: 'yfm',\n },\n size: {\n type: 'string',\n enum: contentSizes,\n },\n links: filteredArray(LinkProps),\n buttons: filteredArray(ButtonBlock),\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n list: filteredArray(ContentItem),\n controlPosition: {\n type: 'string',\n enum: ['default', 'bottom'],\n },\n};\n\nexport const ContentBlock = {\n content: {\n additionalProperties: false,\n properties: {\n ...ContentBase,\n colSizes: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n centered: {\n type: 'boolean',\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,GACZ,0CAAuC;AACxC,OAAO,EAAC,aAAa,EAAC,yCAAsC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACH;YACI,QAAQ,EAAE,CAAC,MAAM,CAAC;SACrB;QACD;YACI,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC5B;KACJ;IACD,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,KAAK;SACrB;QACD,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC;QAC3B,WAAW,EAAE,SAAS,CAAC,gBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM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AAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAC,CAAC,EAAE,EAAE,CAAC;YACvF,QAAQ,EAAE;gBACN,IAAI,EAAE,SAAS;aAClB;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n ButtonBlock,\n GravityIconProps,\n LinkProps,\n TitleProps,\n containerSizesArray,\n contentSizes,\n contentThemes,\n sizeNumber,\n withTheme,\n} from '../../schema/validators/common';\nimport {filteredArray} from '../../schema/validators/utils';\n\nexport const ContentItem = {\n additionalProperties: false,\n oneOf: [\n {\n required: ['icon'],\n },\n {\n required: ['gravityIcon'],\n },\n ],\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentLabel = {\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n icon: withTheme(ImageProps),\n gravityIcon: withTheme(GravityIconProps),\n },\n};\n\nexport const ContentBase = {\n title: {\n oneOf: [\n {\n type: 'string',\n contentType: 'text',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n text: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n additionalInfo: {\n type: 'string',\n contentType: 'yfm',\n },\n size: {\n type: 'string',\n enum: contentSizes,\n },\n links: filteredArray(LinkProps),\n buttons: filteredArray(ButtonBlock),\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n list: filteredArray(ContentItem),\n labels: filteredArray(ContentLabel),\n controlPosition: {\n type: 'string',\n enum: ['default', 'bottom'],\n },\n};\n\nexport const ContentBlock = {\n content: {\n additionalProperties: false,\n properties: {\n ...ContentBase,\n colSizes: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n centered: {\n type: 'boolean',\n },\n },\n },\n};\n"]}
@@ -129,6 +129,17 @@ export declare const ImageCard: {
129
129
  };
130
130
  };
131
131
  } | undefined;
132
+ labels?: {
133
+ type: string;
134
+ items: {
135
+ type: string;
136
+ properties: {
137
+ when: {
138
+ type: string;
139
+ };
140
+ };
141
+ };
142
+ } | undefined;
132
143
  controlPosition: {
133
144
  type: string;
134
145
  enum: string[];
@@ -394,6 +394,17 @@ export declare const LayoutItem: {
394
394
  };
395
395
  };
396
396
  };
397
+ labels: {
398
+ type: string;
399
+ items: {
400
+ type: string;
401
+ properties: {
402
+ when: {
403
+ type: string;
404
+ };
405
+ };
406
+ };
407
+ };
397
408
  controlPosition: {
398
409
  type: string;
399
410
  enum: string[];
@@ -0,0 +1,7 @@
1
+ import { Device } from "../models/index.js";
2
+ export interface ValueWithDevice<T> extends Partial<Record<Device, T>> {
3
+ [Device.Desktop]: T;
4
+ [Device.Mobile]: T;
5
+ }
6
+ export type DeviceSupporting<T> = T | ValueWithDevice<T>;
7
+ export declare function isDeviceValue<T>(value: DeviceSupporting<T>): value is ValueWithDevice<T>;
@@ -0,0 +1,9 @@
1
+ import { Device } from "../models/index.js";
2
+ export function isDeviceValue(value) {
3
+ return (typeof value === 'object' &&
4
+ value !== null &&
5
+ !Array.isArray(value) &&
6
+ Device.Desktop in value &&
7
+ Device.Mobile in value);
8
+ }
9
+ //# sourceMappingURL=breakpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoint.js","sourceRoot":"../../../src","sources":["utils/breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,2BAAkB;AASjC,MAAM,UAAU,aAAa,CAAI,KAA0B;IACvD,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,MAAM,CAAC,OAAO,IAAI,KAAK;QACvB,MAAM,CAAC,MAAM,IAAI,KAAK,CACzB,CAAC;AACN,CAAC","sourcesContent":["import {Device} from '../models';\n\nexport interface ValueWithDevice<T> extends Partial<Record<Device, T>> {\n [Device.Desktop]: T;\n [Device.Mobile]: T;\n}\n\nexport type DeviceSupporting<T> = T | ValueWithDevice<T>;\n\nexport function isDeviceValue<T>(value: DeviceSupporting<T>): value is ValueWithDevice<T> {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n Device.Desktop in value &&\n Device.Mobile in value\n );\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  export * from "./common.js";
2
2
  export * from "./analytics.js";
3
+ export * from "./breakpoint.js";
3
4
  export * from "./blocks.js";
4
5
  export * from "./url.js";
5
6
  export * from "./cn.js";
@@ -1,5 +1,6 @@
1
1
  export * from "./common.js";
2
2
  export * from "./analytics.js";
3
+ export * from "./breakpoint.js";
3
4
  export * from "./blocks.js";
4
5
  export * from "./url.js";
5
6
  export * from "./cn.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,4BAAyB;AACzB,+BAA4B;AAC5B,4BAAyB;AACzB,yBAAsB;AACtB,wBAAqB;AACrB,yBAAsB;AACtB,2BAAwB;AACxB,2BAAwB;AAGxB,OAAO,EAAC,kBAAkB,EAAC,qBAAkB","sourcesContent":["export * from './common';\nexport * from './analytics';\nexport * from './blocks';\nexport * from './url';\nexport * from './cn';\nexport * from './url';\nexport * from './theme';\nexport * from './icons';\n\nexport type {HubspotEventData, HubspotEventHandlers, HubspotEventName} from './hubspot';\nexport {isHubspotEventData} from './hubspot';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,4BAAyB;AACzB,+BAA4B;AAC5B,gCAA6B;AAC7B,4BAAyB;AACzB,yBAAsB;AACtB,wBAAqB;AACrB,yBAAsB;AACtB,2BAAwB;AACxB,2BAAwB;AAGxB,OAAO,EAAC,kBAAkB,EAAC,qBAAkB","sourcesContent":["export * from './common';\nexport * from './analytics';\nexport * from './breakpoint';\nexport * from './blocks';\nexport * from './url';\nexport * from './cn';\nexport * from './url';\nexport * from './theme';\nexport * from './icons';\n\nexport type {HubspotEventData, HubspotEventHandlers, HubspotEventName} from './hubspot';\nexport {isHubspotEventData} from './hubspot';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "7.21.1",
3
+ "version": "7.22.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",