@gravity-ui/page-constructor 7.21.1 → 7.23.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 (145) hide show
  1. package/build/cjs/blocks/CardLayout/CardLayout.css +6 -0
  2. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +1 -1
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +2 -2
  4. package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
  5. package/build/cjs/blocks/ContentLayout/schema.d.ts +11 -0
  6. package/build/cjs/blocks/FoldableList/schema.d.ts +11 -0
  7. package/build/cjs/blocks/Form/Form.css +5 -2
  8. package/build/cjs/blocks/Form/Form.js +12 -9
  9. package/build/cjs/blocks/Form/Form.js.map +1 -1
  10. package/build/cjs/blocks/Form/schema.d.ts +12 -4
  11. package/build/cjs/blocks/Form/schema.js +1 -4
  12. package/build/cjs/blocks/Form/schema.js.map +1 -1
  13. package/build/cjs/blocks/Form/utils.d.ts +3 -0
  14. package/build/cjs/blocks/Form/utils.js +20 -0
  15. package/build/cjs/blocks/Form/utils.js.map +1 -0
  16. package/build/cjs/blocks/Info/schema.d.ts +22 -0
  17. package/build/cjs/blocks/Map/schema.d.ts +11 -0
  18. package/build/cjs/blocks/Media/schema.d.ts +22 -0
  19. package/build/cjs/blocks/Questions/schema.d.ts +11 -0
  20. package/build/cjs/blocks/Tabs/schema.d.ts +11 -0
  21. package/build/cjs/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  22. package/build/cjs/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  23. package/build/cjs/components/ContentIcon/ContentIcon.js.map +1 -0
  24. package/build/cjs/components/ContentLabels/ContentLabels.css +53 -0
  25. package/build/cjs/components/ContentLabels/ContentLabels.d.ts +3 -0
  26. package/build/cjs/components/ContentLabels/ContentLabels.js +16 -0
  27. package/build/cjs/components/ContentLabels/ContentLabels.js.map +1 -0
  28. package/build/cjs/components/ContentList/ContentList.js +2 -2
  29. package/build/cjs/components/ContentList/ContentList.js.map +1 -1
  30. package/build/cjs/components/Title/Title.d.ts +3 -2
  31. package/build/cjs/components/Title/Title.js +2 -2
  32. package/build/cjs/components/Title/Title.js.map +1 -1
  33. package/build/cjs/constructor-items.d.ts +1 -1
  34. package/build/cjs/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  35. package/build/cjs/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  36. package/build/cjs/context/windowWidthContext/index.d.ts +1 -1
  37. package/build/cjs/context/windowWidthContext/index.js +1 -1
  38. package/build/cjs/context/windowWidthContext/index.js.map +1 -1
  39. package/build/cjs/hooks/useDeviceValue.d.ts +2 -0
  40. package/build/cjs/hooks/useDeviceValue.js +33 -0
  41. package/build/cjs/hooks/useDeviceValue.js.map +1 -0
  42. package/build/cjs/models/constructor-items/blocks.d.ts +26 -9
  43. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  44. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -5
  45. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  46. package/build/cjs/schema/constants.d.ts +33 -0
  47. package/build/cjs/schema/validators/common.d.ts +12 -1
  48. package/build/cjs/schema/validators/common.js +21 -0
  49. package/build/cjs/schema/validators/common.js.map +1 -1
  50. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  51. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +11 -0
  52. package/build/cjs/sub-blocks/Content/Content.css +16 -0
  53. package/build/cjs/sub-blocks/Content/Content.js +12 -3
  54. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  55. package/build/cjs/sub-blocks/Content/schema.d.ts +103 -1
  56. package/build/cjs/sub-blocks/Content/schema.js +22 -2
  57. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  58. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +11 -0
  59. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +11 -0
  60. package/build/cjs/utils/breakpoint.d.ts +7 -0
  61. package/build/cjs/utils/breakpoint.js +12 -0
  62. package/build/cjs/utils/breakpoint.js.map +1 -0
  63. package/build/cjs/utils/index.d.ts +1 -0
  64. package/build/cjs/utils/index.js +1 -0
  65. package/build/cjs/utils/index.js.map +1 -1
  66. package/build/esm/blocks/CardLayout/CardLayout.css +6 -0
  67. package/build/esm/blocks/CardLayout/CardLayout.d.ts +1 -1
  68. package/build/esm/blocks/CardLayout/CardLayout.js +3 -3
  69. package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
  70. package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
  71. package/build/esm/blocks/FoldableList/schema.d.ts +11 -0
  72. package/build/esm/blocks/Form/Form.css +5 -2
  73. package/build/esm/blocks/Form/Form.js +12 -9
  74. package/build/esm/blocks/Form/Form.js.map +1 -1
  75. package/build/esm/blocks/Form/schema.d.ts +12 -4
  76. package/build/esm/blocks/Form/schema.js +1 -4
  77. package/build/esm/blocks/Form/schema.js.map +1 -1
  78. package/build/esm/blocks/Form/utils.d.ts +3 -0
  79. package/build/esm/blocks/Form/utils.js +16 -0
  80. package/build/esm/blocks/Form/utils.js.map +1 -0
  81. package/build/esm/blocks/Info/schema.d.ts +22 -0
  82. package/build/esm/blocks/Map/schema.d.ts +11 -0
  83. package/build/esm/blocks/Media/schema.d.ts +22 -0
  84. package/build/esm/blocks/Questions/schema.d.ts +11 -0
  85. package/build/esm/blocks/Tabs/schema.d.ts +11 -0
  86. package/build/esm/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  87. package/build/esm/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  88. package/build/esm/components/ContentIcon/ContentIcon.js.map +1 -0
  89. package/build/esm/components/ContentLabels/ContentLabels.css +53 -0
  90. package/build/esm/components/ContentLabels/ContentLabels.d.ts +4 -0
  91. package/build/esm/components/ContentLabels/ContentLabels.js +14 -0
  92. package/build/esm/components/ContentLabels/ContentLabels.js.map +1 -0
  93. package/build/esm/components/ContentList/ContentList.js +2 -2
  94. package/build/esm/components/ContentList/ContentList.js.map +1 -1
  95. package/build/esm/components/Title/Title.d.ts +3 -2
  96. package/build/esm/components/Title/Title.js +2 -2
  97. package/build/esm/components/Title/Title.js.map +1 -1
  98. package/build/esm/constructor-items.d.ts +1 -1
  99. package/build/esm/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  100. package/build/esm/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  101. package/build/esm/context/windowWidthContext/index.d.ts +1 -1
  102. package/build/esm/context/windowWidthContext/index.js +1 -1
  103. package/build/esm/context/windowWidthContext/index.js.map +1 -1
  104. package/build/esm/hooks/useDeviceValue.d.ts +2 -0
  105. package/build/esm/hooks/useDeviceValue.js +29 -0
  106. package/build/esm/hooks/useDeviceValue.js.map +1 -0
  107. package/build/esm/models/constructor-items/blocks.d.ts +26 -9
  108. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  109. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -5
  110. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  111. package/build/esm/schema/constants.d.ts +33 -0
  112. package/build/esm/schema/validators/common.d.ts +12 -1
  113. package/build/esm/schema/validators/common.js +21 -1
  114. package/build/esm/schema/validators/common.js.map +1 -1
  115. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  116. package/build/esm/sub-blocks/BasicCard/schema.d.ts +11 -0
  117. package/build/esm/sub-blocks/Content/Content.css +16 -0
  118. package/build/esm/sub-blocks/Content/Content.js +11 -3
  119. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  120. package/build/esm/sub-blocks/Content/schema.d.ts +103 -1
  121. package/build/esm/sub-blocks/Content/schema.js +21 -1
  122. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  123. package/build/esm/sub-blocks/ImageCard/schema.d.ts +11 -0
  124. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +11 -0
  125. package/build/esm/utils/breakpoint.d.ts +7 -0
  126. package/build/esm/utils/breakpoint.js +9 -0
  127. package/build/esm/utils/breakpoint.js.map +1 -0
  128. package/build/esm/utils/index.d.ts +1 -0
  129. package/build/esm/utils/index.js +1 -0
  130. package/build/esm/utils/index.js.map +1 -1
  131. package/package.json +1 -1
  132. package/schema/index.js +1 -1
  133. package/server/models/constructor-items/blocks.d.ts +26 -9
  134. package/server/models/constructor-items/sub-blocks.d.ts +5 -5
  135. package/server/utils/breakpoint.d.ts +7 -0
  136. package/server/utils/breakpoint.js +11 -0
  137. package/server/utils/index.d.ts +1 -0
  138. package/server/utils/index.js +1 -0
  139. package/widget/index.js +1 -1
  140. package/build/cjs/components/ContentList/ContentListItemIcon.js.map +0 -1
  141. package/build/cjs/context/windowWidthContext/BreakpointContext.js.map +0 -1
  142. package/build/esm/components/ContentList/ContentListItemIcon.js.map +0 -1
  143. package/build/esm/context/windowWidthContext/BreakpointContext.js.map +0 -1
  144. /package/build/cjs/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
  145. /package/build/esm/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpD,MAAM,CA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QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;iBAChC;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nconst YMapXY = {\n type: 'array',\n items: {type: 'number'},\n minItems: 2,\n maxItems: 2,\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n iconImageHref: {\n type: 'string',\n },\n iconImageSize: YMapXY,\n iconImageOffset: YMapXY,\n iconImageClipRect: {\n type: 'array',\n items: YMapXY,\n minItems: 2,\n maxItems: 2,\n },\n iconLayout: {\n type: 'string',\n },\n iconShape: {\n type: 'object',\n additionalProperties: true,\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n disableControls: {\n type: 'boolean',\n },\n disableBalloons: {\n type: 'boolean',\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n\nexport const GravityIconProps = {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['name'],\n properties: {\n name: {\n type: 'string',\n },\n color: {\n type: 'string',\n enum: ['brand', 'text-color'],\n },\n },\n },\n ],\n};\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["schema/validators/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,yCAAsC;AACzD,OAAO,EACH,+BAA+B,EAC/B,kBAAkB,EAClB,MAAM,EACN,sBAAsB,EACtB,SAAS,EACT,KAAK,GACR,8BAAqB;AAEtB,OAAO,EAAC,oBAAoB,EAAC,mBAAgB;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpD,MAAM,CAAC,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QACL,IAAI,EAAE,QAAQ;KACjB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,QAAQ;KACjB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,UAAU;KACpB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,SAAS;KAClB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,SAAS;KAClB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,UAAU;gBACb,UAAU,EAAE,SAAS;aACxB;SACJ;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;iBAChC;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {ImageProps} from '../../components/Image/schema';\nimport {\n CustomControlsButtonPositioning,\n CustomControlsType,\n Device,\n MediaVideoControlsType,\n QuoteType,\n Theme,\n} from '../../models';\n\nimport {AnalyticsEventSchema} from './event';\n\nexport const mediaDirection = ['media-content', 'content-media'];\nexport const textSize = ['xs', 's', 'sm', 'm', 'l'];\nexport const containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];\nexport const sliderSizesArray = ['sm', 'md', 'lg', 'xl'];\nexport const contentSizes = ['s', 'm', 'l'];\nexport const contentTextWidth = ['s', 'm', 'l'];\n\nexport const videoTypes = ['default', 'player'];\nexport const playIconTypes = ['default', 'text'];\nexport const playIconThemes = ['blue', 'grey'];\nexport const videoControlsTypes = [MediaVideoControlsType.Default, MediaVideoControlsType.Custom];\nexport const fileLinkTypes = ['vertical', 'horizontal'];\n\nexport const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']};\nexport const sizeNumber = {type: 'number', maximum: 12, minimum: 1};\nexport const contentThemes = ['default', 'dark', 'light'];\nexport const quoteTypes = Object.values(QuoteType);\nexport const mediaView = ['fit', 'full'];\nexport const customControlsType = [\n CustomControlsType.WithMuteButton,\n CustomControlsType.WithPlayPauseButton,\n];\nexport const customControlsButtonPositioning = [\n CustomControlsButtonPositioning.Center,\n CustomControlsButtonPositioning.Left,\n CustomControlsButtonPositioning.Right,\n];\n\nexport const BaseProps = {\n type: {},\n when: {\n type: 'string',\n },\n};\n\nexport const CardLayoutProps = {\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n};\n\nexport const containerSizesObject = {\n type: 'object',\n additionalProperties: false,\n properties: containerSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n};\n\nexport const sliderSizesObject = {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: sliderSizesArray.reduce((acc, size) => ({...acc, [size]: sizeNumber}), {}),\n optionName: 'custom',\n },\n {\n type: 'number',\n optionName: 'constant',\n },\n ],\n};\n\nexport const AnimatableProps = {\n animated: {\n type: 'boolean',\n },\n};\n\nexport const ChildrenProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/children'},\n};\n\nexport const ChildrenCardsProps = {\n type: 'array',\n items: {$ref: 'self#/definitions/cards'},\n};\n\nexport const LoopProps = {\n type: 'object',\n additionalProperties: false,\n required: ['start'],\n properties: {\n start: {\n type: 'number',\n },\n end: {\n type: 'number',\n },\n },\n};\n\nexport const PlayButtonProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: playIconTypes,\n },\n theme: {\n type: 'string',\n enum: playIconThemes,\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport const CustomControlsOptionsProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n enum: customControlsType,\n },\n muteButtonShown: {\n type: 'boolean',\n },\n positioning: {\n type: 'string',\n enum: customControlsButtonPositioning,\n },\n },\n};\n\nexport const VideoProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n loop: {\n oneOf: [\n {\n ...LoopProps,\n optionName: 'options',\n },\n {\n type: 'boolean',\n optionName: 'enabled',\n },\n ],\n },\n type: {\n type: 'string',\n enum: videoTypes,\n },\n muted: {\n type: 'boolean',\n },\n autoplay: {\n type: 'boolean',\n },\n elapsedTime: {\n type: 'number',\n },\n playButton: PlayButtonProps,\n controls: {\n type: 'string',\n enum: videoControlsTypes,\n },\n customControlsOptions: CustomControlsOptionsProps,\n ariaLabel: {\n type: 'string',\n },\n contain: {\n type: 'boolean',\n },\n },\n};\n\nexport const ThemeProps = {\n type: 'string',\n enum: ['light', 'dark'],\n};\n\nexport const JustifyProps = {\n type: 'string',\n enum: ['start', 'center', 'end'],\n};\n\nexport const DataLensObjectProps = {\n type: 'object',\n additionalProperties: false,\n required: ['id'],\n properties: {\n id: {\n type: 'string',\n },\n theme: ThemeProps,\n },\n};\n\nexport const DataLensProps = {\n oneOf: [\n {\n type: 'string',\n optionName: 'id',\n },\n {\n ...DataLensObjectProps,\n optionName: 'options',\n },\n ],\n};\n\nexport const BackgroundProps = {\n additionalProperties: false,\n properties: {\n ...AnimatableProps,\n image: ImageProps,\n color: {\n type: 'string',\n },\n video: VideoProps,\n height: {\n type: 'number',\n },\n size: {\n type: 'string',\n enum: ['contain', 'cover'],\n },\n parallax: {\n type: 'boolean',\n },\n fullWidthMedia: {\n type: 'boolean',\n },\n },\n};\n\nexport const LinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n ...BaseProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n arrow: {\n type: 'boolean',\n },\n theme: {\n type: 'string',\n enum: ['back', 'file-link', 'normal'],\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n target: {\n type: 'string',\n enum: ['_blank', '_parent', '_top', '_self'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n },\n};\n\nexport const FileLinkProps = {\n type: 'object',\n additionalProperties: false,\n required: ['href', 'text'],\n properties: {\n href: {\n type: 'string',\n },\n text: {\n type: 'string',\n contentType: 'text',\n },\n type: {\n type: 'string',\n enum: fileLinkTypes,\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n theme: {\n type: 'string',\n enum: contentThemes,\n },\n },\n};\n\nexport const authorItem = {\n type: 'object',\n required: ['firstName', 'secondName'],\n properties: {\n firstName: {\n type: 'string',\n contentType: 'text',\n },\n secondName: {\n type: 'string',\n contentType: 'text',\n },\n avatar: ImageProps,\n description: {\n type: 'string',\n contentType: 'yfm',\n },\n },\n};\n\nexport const ButtonProps = {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n primary: {\n type: 'boolean',\n },\n size: {\n type: 'string',\n enum: [\n 'xs', // deprecated, use 's'\n 'ns', // deprecated, use 's'\n 's',\n 'n', // deprecated, use 'l'\n 'm',\n 'l',\n 'xl',\n 'head', // deprecated, use 'l'\n 'promo', // deprecated, use 'xl'\n ],\n },\n theme: {\n type: 'string',\n enum: [\n 'normal',\n 'action',\n 'outlined',\n 'outlined-info',\n 'outlined-danger',\n 'raised',\n 'flat',\n 'flat-info',\n 'flat-danger',\n 'flat-secondary',\n 'clear',\n 'normal-contrast',\n 'outlined-contrast',\n 'flat-contrast',\n 'link', // deprecated, use 'outlined-info'\n 'pseudo', // deprecated, use 'outlined'\n 'pseudo-special', // deprecated, use 'outlined-contrast'\n 'websearch', // deprecated, use 'action'\n 'normal-dark', // deprecated, use 'outlined-contrast'\n 'normal-special', // deprecated, use 'normal-contrast'\n 'accent', // deprecated, use 'action'\n 'dark-grey', // deprecated, use 'github'\n 'app-store',\n 'google-play',\n 'scale',\n 'github',\n 'monochrome',\n ],\n },\n img: {\n oneOf: [\n {\n type: 'string',\n optionName: 'url',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['data'],\n properties: {\n data: {\n type: 'string',\n },\n position: {\n type: 'string',\n enum: ['left', 'right'],\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n optionName: 'options',\n },\n ],\n },\n analyticsEvents: {\n oneOf: [\n {...AnalyticsEventSchema, optionName: 'single'},\n {type: 'array', items: AnalyticsEventSchema, optionName: 'list'},\n ],\n },\n target: {\n type: 'string',\n enum: ['_self', '_blank', '_parent', '_top'],\n },\n width: {\n type: 'string',\n enum: ['auto', 'max'],\n },\n};\n\nexport const MenuProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: {\n type: 'string',\n contentType: 'text',\n },\n },\n};\n\nexport function withTheme<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no theme',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Theme.Light],\n properties: Object.values(Theme).reduce(\n (result, themeName) => ({\n ...result,\n [themeName]: value,\n }),\n {},\n ),\n optionName: 'themes',\n },\n ],\n };\n}\n\nexport function withDevice<T extends object>(value: T) {\n return {\n oneOf: [\n {\n ...value,\n optionName: 'no device',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: [Device.Desktop, Device.Mobile],\n properties: Object.values(Device).reduce(\n (result, deviceName) => ({\n ...result,\n [deviceName]: value,\n }),\n {},\n ),\n optionName: 'devices',\n },\n ],\n };\n}\n\nexport const AnchorProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text', 'url'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n },\n};\n\nexport const BlockBaseProps = {\n ...BaseProps,\n anchor: AnchorProps,\n visible: {\n type: 'string',\n enum: containerSizesArray,\n },\n resetPaddings: {\n type: 'boolean',\n },\n context: {\n type: 'string',\n },\n indent: {\n type: 'object',\n additionalProperties: false,\n properties: {\n top: dividerEnum,\n bottom: dividerEnum,\n },\n },\n};\n\nexport const TitleProps = {\n type: 'object',\n additionalProperties: false,\n required: ['text'],\n properties: {\n text: {\n type: 'string',\n contentType: 'text',\n },\n textSize: {\n type: 'string',\n enum: textSize,\n },\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n resetMargin: {\n type: 'boolean',\n },\n },\n};\n\nexport const ButtonBlock = {\n type: 'object',\n additionalProperties: false,\n properties: ButtonProps,\n if: {\n properties: {\n theme: {\n enum: ['app-store', 'google-play'],\n },\n },\n },\n then: {\n required: ['url'],\n },\n else: {\n required: ['text', 'url'],\n },\n};\n\nconst IframeProps = {\n type: 'object',\n additionalProperties: false,\n required: ['src'],\n properties: {\n src: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n height: {\n type: 'number',\n },\n width: {\n type: 'number',\n },\n },\n};\n\nexport const MediaProps = {\n color: {\n type: 'string',\n },\n image: {\n oneOf: [\n {...ImageProps, optionName: 'single'},\n {type: 'array', items: ImageProps, optionName: 'list'},\n ],\n },\n disableImageSliderForArrayInput: {\n type: 'boolean',\n },\n video: VideoProps,\n youtube: {\n type: 'string',\n },\n videoIframe: {\n type: 'string',\n },\n autoplay: {\n type: 'boolean',\n },\n parallax: {\n type: 'boolean',\n },\n height: {\n type: 'number',\n },\n previewImg: {\n type: 'string',\n },\n dataLens: DataLensProps,\n fullscreen: {\n type: 'boolean',\n },\n analyticsEvents: {\n anyOf: [AnalyticsEventSchema, {type: 'array', items: AnalyticsEventSchema}],\n },\n ratio: {\n type: ['number', 'string'],\n pattern: '^auto$',\n },\n iframe: {\n ...IframeProps,\n },\n margins: {\n type: 'boolean',\n },\n};\n\nconst YMapXY = {\n type: 'array',\n items: {type: 'number'},\n minItems: 2,\n maxItems: 2,\n};\n\nexport const YMapMarkerLabel = {\n type: 'object',\n required: [],\n properties: {\n iconCaption: {\n type: 'string',\n },\n iconContent: {\n type: 'string',\n },\n iconColor: {\n type: 'string',\n },\n iconImageHref: {\n type: 'string',\n },\n iconImageSize: YMapXY,\n iconImageOffset: YMapXY,\n iconImageClipRect: {\n type: 'array',\n items: YMapXY,\n minItems: 2,\n maxItems: 2,\n },\n iconLayout: {\n type: 'string',\n },\n iconShape: {\n type: 'object',\n additionalProperties: true,\n },\n preset: {\n type: 'string',\n },\n },\n};\n\nexport const YMapMarker = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n coordinate: {\n type: 'array',\n items: {type: 'number'},\n },\n address: {\n type: 'string',\n },\n label: YMapMarkerLabel,\n },\n};\n\nexport const MapProps = {\n zoom: {\n type: 'number',\n },\n address: {\n type: 'string',\n },\n id: {\n type: 'string',\n },\n markers: {\n type: 'array',\n items: YMapMarker,\n },\n disableControls: {\n type: 'boolean',\n },\n disableBalloons: {\n type: 'boolean',\n },\n};\n\nexport const BorderProps = {\n type: 'string',\n enum: ['line', 'shadow', 'none'],\n};\n\nexport const CardBase = {\n border: BorderProps,\n};\n\nexport const BlockHeaderProps = {\n title: {\n oneOf: [\n {\n type: 'string',\n optionName: 'text',\n },\n {\n ...TitleProps,\n optionName: 'options',\n },\n ],\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n};\n\nexport const GravityIconProps = {\n oneOf: [\n {\n type: 'string',\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['name'],\n properties: {\n name: {\n type: 'string',\n },\n color: {\n type: 'string',\n enum: ['brand', 'text-color'],\n },\n },\n },\n ],\n};\n"]}
@@ -221,6 +221,17 @@ export declare const BackgroundCard: {
221
221
  type: string;
222
222
  enum: string[];
223
223
  };
224
+ labels: {
225
+ type: string;
226
+ items: {
227
+ type: string;
228
+ properties: {
229
+ when: {
230
+ type: string;
231
+ };
232
+ };
233
+ };
234
+ };
224
235
  additionalInfo: {
225
236
  type: string;
226
237
  contentType: string;
@@ -109,6 +109,17 @@ export declare const BasicCard: {
109
109
  contentType: string;
110
110
  inputType: string;
111
111
  };
112
+ labels: {
113
+ type: string;
114
+ items: {
115
+ type: string;
116
+ properties: {
117
+ when: {
118
+ type: string;
119
+ };
120
+ };
121
+ };
122
+ };
112
123
  additionalInfo: {
113
124
  type: string;
114
125
  contentType: string;
@@ -38,6 +38,10 @@ unpredictable css rules order in build */
38
38
  text-align: center;
39
39
  }
40
40
 
41
+ .pc-content_centered .pc-content__labels {
42
+ justify-content: center;
43
+ margin-inline: auto;
44
+ }
41
45
  .pc-content_centered .pc-content__list {
42
46
  margin-inline: auto;
43
47
  }
@@ -62,11 +66,15 @@ unpredictable css rules order in build */
62
66
  .pc-content_size_s .pc-content__text_without-title {
63
67
  margin-top: 0;
64
68
  }
69
+ .pc-content_size_s .pc-content__labels,
65
70
  .pc-content_size_s .pc-content__list,
66
71
  .pc-content_size_s .pc-content__links,
67
72
  .pc-content_size_s .pc-content__notice {
68
73
  margin-top: 16px;
69
74
  }
75
+ .pc-content_size_s .pc-content__labels + .pc-content__list, .pc-content_size_s .pc-content__labels + .pc-content__link, .pc-content_size_s .pc-content__labels + .pc-content__notice {
76
+ margin-top: 20px;
77
+ }
70
78
  .pc-content_size_s .pc-content__buttons {
71
79
  margin-top: 20px;
72
80
  }
@@ -93,11 +101,15 @@ unpredictable css rules order in build */
93
101
  font-size: var(--g-text-body-2-font-size);
94
102
  line-height: var(--g-text-body-2-line-height);
95
103
  }
104
+ .pc-content_size_m .pc-content__labels,
96
105
  .pc-content_size_m .pc-content__list,
97
106
  .pc-content_size_m .pc-content__links,
98
107
  .pc-content_size_m .pc-content__notice {
99
108
  margin-top: 20px;
100
109
  }
110
+ .pc-content_size_m .pc-content__labels + .pc-content__list, .pc-content_size_m .pc-content__labels + .pc-content__link, .pc-content_size_m .pc-content__labels + .pc-content__notice {
111
+ margin-top: 24px;
112
+ }
101
113
  .pc-content_size_m .pc-content__buttons {
102
114
  margin-top: 24px;
103
115
  }
@@ -120,11 +132,15 @@ unpredictable css rules order in build */
120
132
  font-size: var(--g-text-body-2-font-size);
121
133
  line-height: var(--g-text-body-2-line-height);
122
134
  }
135
+ .pc-content_size_l .pc-content__labels,
123
136
  .pc-content_size_l .pc-content__list,
124
137
  .pc-content_size_l .pc-content__links,
125
138
  .pc-content_size_l .pc-content__notice {
126
139
  margin-top: 20px;
127
140
  }
141
+ .pc-content_size_l .pc-content__labels + .pc-content__list, .pc-content_size_l .pc-content__labels + .pc-content__link, .pc-content_size_l .pc-content__labels + .pc-content__notice {
142
+ margin-top: 24px;
143
+ }
128
144
  .pc-content_size_l .pc-content__buttons {
129
145
  margin-top: 24px;
130
146
  }
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useUniqId } from '@gravity-ui/uikit';
3
3
  import { Buttons, ContentList, Links, Title, YFMWrapper } from "../../components/index.js";
4
+ import ContentLabels from "../../components/ContentLabels/ContentLabels.js";
4
5
  import { Col } from "../../grid/index.js";
5
6
  import { block } from "../../utils/index.js";
6
7
  import { getQaAttrubutes } from "../../utils/blocks.js";
@@ -18,15 +19,22 @@ function getTextSize(size) {
18
19
  }
19
20
  }
20
21
  const Content = (props) => {
21
- const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, controlPosition, } = props;
22
- const qaAttributes = getQaAttrubutes(qa, ['links', 'link', 'buttons', 'button', 'list']);
22
+ const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, labels, qa, controlPosition, } = props;
23
+ const qaAttributes = getQaAttrubutes(qa, [
24
+ 'links',
25
+ 'link',
26
+ 'buttons',
27
+ 'button',
28
+ 'list',
29
+ 'labels',
30
+ ]);
23
31
  const titleProps = !title || typeof title === 'string'
24
32
  ? { text: title, textSize: getTextSize(size) }
25
33
  : title;
26
34
  const hasTitle = Boolean(title);
27
35
  const defaultTitleId = useUniqId();
28
36
  const titleId = titleIdFromProps || defaultTitleId;
29
- return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), list?.length ? (_jsx("div", { className: b('list'), children: _jsx(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && (_jsx("div", { className: b('notice'), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
37
+ return (_jsxs(Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && (_jsx(Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && (_jsx("div", { className: b('text', { ['without-title']: !hasTitle }), children: _jsx(YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), labels?.length ? (_jsx("div", { className: b('labels'), children: _jsx(ContentLabels, { labels: labels, theme: theme, size: size, qa: qaAttributes.labels }) })) : null, list?.length ? (_jsx("div", { className: b('list'), children: _jsx(ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && (_jsx("div", { className: b('notice'), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
30
38
  constructor: true,
31
39
  'constructor-notice': true,
32
40
  [`constructor-size-${size}`]: true,
@@ -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,Q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AAM,EACV,EAAE,EAAE,YAAY,CAAC,IAAI,GACvB,GACA,CACT,EACA,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 {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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T,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,C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oB,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 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.23.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",