@gravity-ui/page-constructor 7.21.0 → 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 (131) 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/CardBase/CardBase.css +13 -1
  18. package/build/cjs/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  19. package/build/cjs/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  20. package/build/cjs/components/ContentIcon/ContentIcon.js.map +1 -0
  21. package/build/cjs/components/ContentLabels/ContentLabels.css +53 -0
  22. package/build/cjs/components/ContentLabels/ContentLabels.d.ts +3 -0
  23. package/build/cjs/components/ContentLabels/ContentLabels.js +16 -0
  24. package/build/cjs/components/ContentLabels/ContentLabels.js.map +1 -0
  25. package/build/cjs/components/ContentList/ContentList.js +2 -2
  26. package/build/cjs/components/ContentList/ContentList.js.map +1 -1
  27. package/build/cjs/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  28. package/build/cjs/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  29. package/build/cjs/context/windowWidthContext/index.d.ts +1 -1
  30. package/build/cjs/context/windowWidthContext/index.js +1 -1
  31. package/build/cjs/context/windowWidthContext/index.js.map +1 -1
  32. package/build/cjs/hooks/useDeviceValue.d.ts +2 -0
  33. package/build/cjs/hooks/useDeviceValue.js +33 -0
  34. package/build/cjs/hooks/useDeviceValue.js.map +1 -0
  35. package/build/cjs/models/constructor-items/blocks.d.ts +28 -12
  36. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  37. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -5
  38. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  39. package/build/cjs/schema/constants.d.ts +33 -0
  40. package/build/cjs/schema/validators/common.d.ts +12 -1
  41. package/build/cjs/schema/validators/common.js +21 -0
  42. package/build/cjs/schema/validators/common.js.map +1 -1
  43. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  44. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +11 -0
  45. package/build/cjs/sub-blocks/Content/Content.css +16 -0
  46. package/build/cjs/sub-blocks/Content/Content.js +12 -3
  47. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  48. package/build/cjs/sub-blocks/Content/schema.d.ts +103 -1
  49. package/build/cjs/sub-blocks/Content/schema.js +22 -2
  50. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  51. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +11 -0
  52. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +11 -0
  53. package/build/cjs/utils/breakpoint.d.ts +7 -0
  54. package/build/cjs/utils/breakpoint.js +12 -0
  55. package/build/cjs/utils/breakpoint.js.map +1 -0
  56. package/build/cjs/utils/index.d.ts +1 -0
  57. package/build/cjs/utils/index.js +1 -0
  58. package/build/cjs/utils/index.js.map +1 -1
  59. package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
  60. package/build/esm/blocks/FoldableList/schema.d.ts +11 -0
  61. package/build/esm/blocks/Form/Form.css +5 -2
  62. package/build/esm/blocks/Form/Form.js +12 -9
  63. package/build/esm/blocks/Form/Form.js.map +1 -1
  64. package/build/esm/blocks/Form/schema.d.ts +12 -4
  65. package/build/esm/blocks/Form/schema.js +1 -4
  66. package/build/esm/blocks/Form/schema.js.map +1 -1
  67. package/build/esm/blocks/Form/utils.d.ts +3 -0
  68. package/build/esm/blocks/Form/utils.js +16 -0
  69. package/build/esm/blocks/Form/utils.js.map +1 -0
  70. package/build/esm/blocks/Info/schema.d.ts +22 -0
  71. package/build/esm/blocks/Map/schema.d.ts +11 -0
  72. package/build/esm/blocks/Media/schema.d.ts +22 -0
  73. package/build/esm/blocks/Questions/schema.d.ts +11 -0
  74. package/build/esm/blocks/Tabs/schema.d.ts +11 -0
  75. package/build/esm/components/CardBase/CardBase.css +13 -1
  76. package/build/esm/components/{ContentList/ContentListItemIcon.d.ts → ContentIcon/ContentIcon.d.ts} +3 -3
  77. package/build/esm/components/{ContentList/ContentListItemIcon.js → ContentIcon/ContentIcon.js} +3 -3
  78. package/build/esm/components/ContentIcon/ContentIcon.js.map +1 -0
  79. package/build/esm/components/ContentLabels/ContentLabels.css +53 -0
  80. package/build/esm/components/ContentLabels/ContentLabels.d.ts +4 -0
  81. package/build/esm/components/ContentLabels/ContentLabels.js +14 -0
  82. package/build/esm/components/ContentLabels/ContentLabels.js.map +1 -0
  83. package/build/esm/components/ContentList/ContentList.js +2 -2
  84. package/build/esm/components/ContentList/ContentList.js.map +1 -1
  85. package/build/esm/context/windowWidthContext/{BreakpointContext.js → WindowWidthContext.js} +2 -7
  86. package/build/esm/context/windowWidthContext/WindowWidthContext.js.map +1 -0
  87. package/build/esm/context/windowWidthContext/index.d.ts +1 -1
  88. package/build/esm/context/windowWidthContext/index.js +1 -1
  89. package/build/esm/context/windowWidthContext/index.js.map +1 -1
  90. package/build/esm/hooks/useDeviceValue.d.ts +2 -0
  91. package/build/esm/hooks/useDeviceValue.js +29 -0
  92. package/build/esm/hooks/useDeviceValue.js.map +1 -0
  93. package/build/esm/models/constructor-items/blocks.d.ts +28 -12
  94. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  95. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -5
  96. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  97. package/build/esm/schema/constants.d.ts +33 -0
  98. package/build/esm/schema/validators/common.d.ts +12 -1
  99. package/build/esm/schema/validators/common.js +21 -1
  100. package/build/esm/schema/validators/common.js.map +1 -1
  101. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +11 -0
  102. package/build/esm/sub-blocks/BasicCard/schema.d.ts +11 -0
  103. package/build/esm/sub-blocks/Content/Content.css +16 -0
  104. package/build/esm/sub-blocks/Content/Content.js +11 -3
  105. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  106. package/build/esm/sub-blocks/Content/schema.d.ts +103 -1
  107. package/build/esm/sub-blocks/Content/schema.js +21 -1
  108. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  109. package/build/esm/sub-blocks/ImageCard/schema.d.ts +11 -0
  110. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +11 -0
  111. package/build/esm/utils/breakpoint.d.ts +7 -0
  112. package/build/esm/utils/breakpoint.js +9 -0
  113. package/build/esm/utils/breakpoint.js.map +1 -0
  114. package/build/esm/utils/index.d.ts +1 -0
  115. package/build/esm/utils/index.js +1 -0
  116. package/build/esm/utils/index.js.map +1 -1
  117. package/package.json +1 -1
  118. package/schema/index.js +1 -1
  119. package/server/models/constructor-items/blocks.d.ts +28 -12
  120. package/server/models/constructor-items/sub-blocks.d.ts +5 -5
  121. package/server/utils/breakpoint.d.ts +7 -0
  122. package/server/utils/breakpoint.js +11 -0
  123. package/server/utils/index.d.ts +1 -0
  124. package/server/utils/index.js +1 -0
  125. package/styles/mixins.scss +16 -2
  126. package/build/cjs/components/ContentList/ContentListItemIcon.js.map +0 -1
  127. package/build/cjs/context/windowWidthContext/BreakpointContext.js.map +0 -1
  128. package/build/esm/components/ContentList/ContentListItemIcon.js.map +0 -1
  129. package/build/esm/context/windowWidthContext/BreakpointContext.js.map +0 -1
  130. /package/build/cjs/context/windowWidthContext/{BreakpointContext.d.ts → WindowWidthContext.d.ts} +0 -0
  131. /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":";;;;AA4cA,8BAsBC;AAleD,6DAAyD;AACzD,kDAMsB;AAEtB,sCAA6C;AAEhC,QAAA,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACpD,QAAA,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACvC,QAAA,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACtD,QAAA,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,QAAA,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/B,QAAA,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEnC,QAAA,UAAU,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACnC,QAAA,aAAa,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACpC,QAAA,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAClC,QAAA,kBAAkB,GAAG,CAAC,+BAAsB,CAAC,OAAO,EAAE,+BAAsB,CAAC,MAAM,CAAC,CAAC;AACrF,QAAA,aAAa,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAA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AAA,gBAAgB,GAAG;IAC5B,KAAK,EAAE;QACH,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,MAAM;aACrB;YACD;gBACI,GAAG,kBAAU;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;AAEW,QAAA,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":";;;;AA6cA,8BAsBC;AAED,gCAsBC;AA3fD,6DAAyD;AACzD,kDAOsB;AAEtB,sCAA6C;AAEhC,QAAA,cAAc,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;AACpD,QAAA,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACvC,QAAA,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACtD,QAAA,gBAAgB,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J;KACJ;IACD,WAAW,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,UAAU;KACxB;CACJ,CAAC;AAEW,QAAA,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,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
3
4
  const jsx_runtime_1 = require("react/jsx-runtime");
4
5
  const uikit_1 = require("@gravity-ui/uikit");
5
6
  const components_1 = require("../../components/index.js");
7
+ const ContentLabels_1 = tslib_1.__importDefault(require("../../components/ContentLabels/ContentLabels.js"));
6
8
  const grid_1 = require("../../grid/index.js");
7
9
  const utils_1 = require("../../utils/index.js");
8
10
  const blocks_1 = require("../../utils/blocks.js");
@@ -19,15 +21,22 @@ function getTextSize(size) {
19
21
  }
20
22
  }
21
23
  const Content = (props) => {
22
- const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, controlPosition, } = props;
23
- const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['links', 'link', 'buttons', 'button', 'list']);
24
+ const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, labels, qa, controlPosition, } = props;
25
+ const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, [
26
+ 'links',
27
+ 'link',
28
+ 'buttons',
29
+ 'button',
30
+ 'list',
31
+ 'labels',
32
+ ]);
24
33
  const titleProps = !title || typeof title === 'string'
25
34
  ? { text: title, textSize: getTextSize(size) }
26
35
  : title;
27
36
  const hasTitle = Boolean(title);
28
37
  const defaultTitleId = (0, uikit_1.useUniqId)();
29
38
  const titleId = titleIdFromProps || defaultTitleId;
30
- return ((0, jsx_runtime_1.jsxs)(grid_1.Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && ((0, jsx_runtime_1.jsx)(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && ((0, jsx_runtime_1.jsx)("div", { className: b('text', { ['without-title']: !hasTitle }), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), list?.length ? ((0, jsx_runtime_1.jsx)("div", { className: b('list'), children: (0, jsx_runtime_1.jsx)(components_1.ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && ((0, jsx_runtime_1.jsx)("div", { className: b('notice'), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: additionalInfo, modifiers: {
39
+ return ((0, jsx_runtime_1.jsxs)(grid_1.Col, { className: b({ size, centered, theme, 'control-position': controlPosition }, className), reset: true, sizes: colSizes, qa: qaAttributes.container, children: [title && ((0, jsx_runtime_1.jsx)(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })), text && ((0, jsx_runtime_1.jsx)("div", { className: b('text', { ['without-title']: !hasTitle }), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: text, modifiers: { constructor: true, [`constructor-size-${size}`]: true }, id: textId, qa: qaAttributes.list }) })), labels?.length ? ((0, jsx_runtime_1.jsx)("div", { className: b('labels'), children: (0, jsx_runtime_1.jsx)(ContentLabels_1.default, { labels: labels, theme: theme, size: size, qa: qaAttributes.labels }) })) : null, list?.length ? ((0, jsx_runtime_1.jsx)("div", { className: b('list'), children: (0, jsx_runtime_1.jsx)(components_1.ContentList, { list: list, size: size, qa: qaAttributes.list, theme: theme }) })) : null, additionalInfo && ((0, jsx_runtime_1.jsx)("div", { className: b('notice'), children: (0, jsx_runtime_1.jsx)(components_1.YFMWrapper, { content: additionalInfo, modifiers: {
31
40
  constructor: true,
32
41
  'constructor-notice': true,
33
42
  [`constructor-size-${size}`]: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/Content.tsx"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,0DAAgF;AAChF,8CAA+B;AAS/B,gDAAkC;AAClC,kDAAmD;AAInD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,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,IAAA,wBAAe,EAAC,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzF,MAAM,UAAU,GACZ,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC/B,CAAC,CAAE,EAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAAoB;QAChE,CAAC,CAAC,KAAK,CAAC;IAEhB,MAAM,QA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P,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,uBAAC,kBAAK,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,uBAAC,oBAAO,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,kBAAe,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,6CAA4C;AAE5C,0DAAgF;AAChF,4GAAyE;AACzE,8CAA+B;AAS/B,gDAAkC;AAClC,kDAAmD;AAInD,MAAM,CAAC,GAAG,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ACvB,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,uBAAC,kBAAK,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,uBAAC,oBAAO,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,kBAAe,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[];
@@ -1,12 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentBlock = exports.ContentBase = exports.ContentItem = void 0;
3
+ exports.ContentBlock = exports.ContentBase = exports.ContentLabel = exports.ContentItem = void 0;
4
4
  const schema_1 = require("../../components/Image/schema.js");
5
5
  const common_1 = require("../../schema/validators/common.js");
6
6
  const utils_1 = require("../../schema/validators/utils.js");
7
7
  exports.ContentItem = {
8
8
  additionalProperties: false,
9
- required: ['icon'],
9
+ oneOf: [
10
+ {
11
+ required: ['icon'],
12
+ },
13
+ {
14
+ required: ['gravityIcon'],
15
+ },
16
+ ],
10
17
  properties: {
11
18
  title: {
12
19
  type: 'string',
@@ -20,6 +27,18 @@ exports.ContentItem = {
20
27
  gravityIcon: (0, common_1.withTheme)(common_1.GravityIconProps),
21
28
  },
22
29
  };
30
+ exports.ContentLabel = {
31
+ additionalProperties: false,
32
+ required: ['text'],
33
+ properties: {
34
+ text: {
35
+ type: 'string',
36
+ contentType: 'text',
37
+ },
38
+ icon: (0, common_1.withTheme)(schema_1.ImageProps),
39
+ gravityIcon: (0, common_1.withTheme)(common_1.GravityIconProps),
40
+ },
41
+ };
23
42
  exports.ContentBase = {
24
43
  title: {
25
44
  oneOf: [
@@ -54,6 +73,7 @@ exports.ContentBase = {
54
73
  enum: common_1.contentThemes,
55
74
  },
56
75
  list: (0, utils_1.filteredArray)(exports.ContentItem),
76
+ labels: (0, utils_1.filteredArray)(exports.ContentLabel),
57
77
  controlPosition: {
58
78
  type: 'string',
59
79
  enum: ['default', 'bottom'],
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/Content/schema.ts"],"names":[],"mappings":";;;AAAA,6DAAyD;AACzD,8DAUwC;AACxC,4DAA4D;AAE/C,QAAA,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,IAAA,kBAAS,EAAC,mBAAU,CAAC;QAC3B,WAAW,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,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,mBAAU;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,qBAAY;KACrB;IACD,KAAK,EAAE,IAAA,qBAAa,EAAC,kBAAS,CAAC;IAC/B,OAAO,EAAE,IAAA,qBAAa,EAAC,oBAAW,CAAC;IACnC,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,sBAAa;KACtB;IACD,IAAI,EAAE,IAAA,qBAAa,EAAC,mBAAW,CAAC;IAChC,eAAe,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC9B;CACJ,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE;QACL,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACR,GAAG,mBAAW;YACd,QAAQ,EAAE,4BAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,mBAAU,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,6DAAyD;AACzD,8DAUwC;AACxC,4DAA4D;AAE/C,QAAA,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,IAAA,kBAAS,EAAC,mBAAU,CAAC;QAC3B,WAAW,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,MAAM;SACtB;QACD,IAAI,EAAE,IAAA,kBAAS,EAAC,mBAAU,CAAC;QAC3B,WAAW,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,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,mBAAU;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,qBAAY;KACrB;IACD,KAAK,EAAE,IAAA,qBAAa,EAAC,kBAAS,CAAC;IAC/B,OAAO,EAAE,IAAA,qBAAa,EAAC,oBAAW,CAAC;IACnC,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,sBAAa;KACtB;IACD,IAAI,EAAE,IAAA,qBAAa,EAAC,mBAAW,CAAC;IAChC,MAAM,EAAE,IAAA,qBAAa,EAAC,oBAAY,CAAC;IACnC,eAAe,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC9B;CACJ,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE;QACL,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACR,GAAG,mBAAW;YACd,QAAQ,EAAE,4BAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,mBAAU,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,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDeviceValue = isDeviceValue;
4
+ const models_1 = require("../models/index.js");
5
+ function isDeviceValue(value) {
6
+ return (typeof value === 'object' &&
7
+ value !== null &&
8
+ !Array.isArray(value) &&
9
+ models_1.Device.Desktop in value &&
10
+ models_1.Device.Mobile in value);
11
+ }
12
+ //# sourceMappingURL=breakpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoint.js","sourceRoot":"../../../src","sources":["utils/breakpoint.ts"],"names":[],"mappings":";;AASA,sCAQC;AAjBD,+CAAiC;AASjC,SAAgB,aAAa,CAAI,KAA0B;IACvD,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,eAAM,CAAC,OAAO,IAAI,KAAK;QACvB,eAAM,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";
@@ -4,6 +4,7 @@ exports.isHubspotEventData = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./common.js"), exports);
6
6
  tslib_1.__exportStar(require("./analytics.js"), exports);
7
+ tslib_1.__exportStar(require("./breakpoint.js"), exports);
7
8
  tslib_1.__exportStar(require("./blocks.js"), exports);
8
9
  tslib_1.__exportStar(require("./url.js"), exports);
9
10
  tslib_1.__exportStar(require("./cn.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["utils/index.ts"],"names":[],"mappings":";;;;AAAA,sDAAyB;AACzB,yDAA4B;AAC5B,sDAAyB;AACzB,mDAAsB;AACtB,kDAAqB;AACrB,mDAAsB;AACtB,qDAAwB;AACxB,qDAAwB;AAGxB,wCAA6C;AAArC,6GAAA,kBAAkB,OAAA","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,sDAAyB;AACzB,yDAA4B;AAC5B,0DAA6B;AAC7B,sDAAyB;AACzB,mDAAsB;AACtB,kDAAqB;AACrB,mDAAsB;AACtB,qDAAwB;AACxB,qDAAwB;AAGxB,wCAA6C;AAArC,6GAAA,kBAAkB,OAAA","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"]}