@gravity-ui/page-constructor 3.2.0 → 3.4.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 (258) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -0
  3. package/build/cjs/blocks/Banner/schema.d.ts +63 -21
  4. package/build/cjs/blocks/CardLayout/schema.d.ts +10 -4
  5. package/build/cjs/blocks/Companies/schema.d.ts +5 -2
  6. package/build/cjs/blocks/ContentLayout/ContentLayout.js +3 -2
  7. package/build/cjs/blocks/ContentLayout/schema.d.ts +107 -61
  8. package/build/cjs/blocks/ContentLayout/schema.js +23 -18
  9. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +31 -4
  10. package/build/cjs/blocks/ExtendedFeatures/schema.js +2 -3
  11. package/build/cjs/blocks/FilterBlock/schema.d.ts +13 -5
  12. package/build/cjs/blocks/FilterBlock/schema.js +13 -2
  13. package/build/cjs/blocks/Header/schema.d.ts +92 -36
  14. package/build/cjs/blocks/Header/schema.js +1 -0
  15. package/build/cjs/blocks/HeaderSlider/schema.d.ts +48 -53
  16. package/build/cjs/blocks/HeaderSlider/schema.js +3 -1
  17. package/build/cjs/blocks/Icons/schema.d.ts +3 -1
  18. package/build/cjs/blocks/Icons/schema.js +2 -1
  19. package/build/cjs/blocks/Info/schema.d.ts +19 -8
  20. package/build/cjs/blocks/Map/schema.d.ts +17 -6
  21. package/build/cjs/blocks/Media/schema.d.ts +204 -152
  22. package/build/cjs/blocks/Media/schema.js +1 -1
  23. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +22 -8
  24. package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -0
  25. package/build/cjs/blocks/Questions/schema.d.ts +7 -3
  26. package/build/cjs/blocks/Slider/schema.d.ts +13 -18
  27. package/build/cjs/blocks/Slider/schema.js +4 -5
  28. package/build/cjs/blocks/Table/schema.d.ts +5 -2
  29. package/build/cjs/blocks/Table/schema.js +12 -2
  30. package/build/cjs/blocks/Tabs/schema.d.ts +43 -16
  31. package/build/cjs/components/BlockBase/BlockBase.js +2 -2
  32. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
  33. package/build/cjs/components/Image/schema.d.ts +1 -0
  34. package/build/cjs/components/Image/schema.js +3 -2
  35. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
  36. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  37. package/build/cjs/customization/BlockDecoration.d.ts +1 -1
  38. package/build/cjs/customization/BlockDecoration.js +5 -6
  39. package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.css +1 -1
  40. package/build/cjs/editor/components/AddBlock/AddBlock.d.ts +7 -0
  41. package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.js +2 -2
  42. package/build/cjs/editor/components/BlockForm/BlockForm.d.ts +12 -0
  43. package/build/cjs/editor/components/BlockForm/BlockForm.js +33 -0
  44. package/build/cjs/editor/components/ControlPanel/ControlPanel.css +26 -0
  45. package/build/cjs/editor/components/ControlPanel/ControlPanel.d.ts +8 -0
  46. package/build/cjs/editor/components/ControlPanel/ControlPanel.js +24 -0
  47. package/build/cjs/editor/components/ControlPanel/i18n/en.json +3 -0
  48. package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +2 -0
  49. package/build/cjs/editor/components/ControlPanel/i18n/index.js +8 -0
  50. package/build/cjs/editor/components/ControlPanel/i18n/ru.json +3 -0
  51. package/build/cjs/editor/components/EditBlock/EditBlock.d.ts +13 -0
  52. package/build/cjs/editor/components/EditBlock/EditBlock.js +44 -0
  53. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
  54. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.d.ts +13 -0
  55. package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +35 -0
  56. package/build/cjs/editor/components/ErrorBoundary/i18n/en.json +4 -0
  57. package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
  58. package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +8 -0
  59. package/build/cjs/editor/components/ErrorBoundary/i18n/ru.json +4 -0
  60. package/build/cjs/editor/components/Layout/Layout.css +36 -0
  61. package/build/cjs/editor/components/Layout/Layout.d.ts +16 -0
  62. package/build/cjs/editor/components/Layout/Layout.js +34 -0
  63. package/build/cjs/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
  64. package/build/cjs/editor/components/PagePropsForm/PagePropsForm.js +17 -0
  65. package/build/cjs/editor/containers/Editor/Editor.d.ts +2 -0
  66. package/build/cjs/editor/containers/Editor/Editor.js +40 -0
  67. package/build/cjs/editor/containers/Form/Form.css +94 -0
  68. package/build/cjs/editor/containers/Form/Form.d.ts +11 -0
  69. package/build/cjs/editor/containers/Form/Form.js +47 -0
  70. package/build/cjs/editor/containers/Form/dynamic-form-custom.css +0 -0
  71. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
  72. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +19 -0
  73. package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +72 -0
  74. package/build/cjs/editor/dynamic-forms-custom/config.d.ts +2 -0
  75. package/build/cjs/editor/dynamic-forms-custom/config.js +13 -0
  76. package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
  77. package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.js +75 -0
  78. package/build/cjs/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
  79. package/build/cjs/editor/dynamic-forms-custom/parser/detect.js +36 -0
  80. package/build/cjs/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
  81. package/build/cjs/editor/dynamic-forms-custom/parser/index.js +188 -0
  82. package/build/cjs/editor/dynamic-forms-custom/parser/types.d.ts +29 -0
  83. package/build/cjs/editor/dynamic-forms-custom/parser/types.js +2 -0
  84. package/build/cjs/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
  85. package/build/cjs/editor/dynamic-forms-custom/parser/views.js +46 -0
  86. package/build/cjs/editor/hooks/useFormSpec.d.ts +2 -0
  87. package/build/cjs/editor/hooks/useFormSpec.js +13 -0
  88. package/build/cjs/editor/hooks/usePreviousValue.d.ts +1 -0
  89. package/build/cjs/editor/hooks/usePreviousValue.js +11 -0
  90. package/build/cjs/editor/index.d.ts +1 -1
  91. package/build/cjs/editor/index.js +1 -1
  92. package/build/cjs/editor/store/index.d.ts +10 -11
  93. package/build/cjs/editor/store/index.js +66 -15
  94. package/build/cjs/editor/store/reducer.d.ts +24 -9
  95. package/build/cjs/editor/store/reducer.js +17 -31
  96. package/build/cjs/editor/store/utils.d.ts +1 -0
  97. package/build/cjs/editor/store/utils.js +3 -1
  98. package/build/cjs/editor/styles/root.css +5 -0
  99. package/build/cjs/editor/types/index.d.ts +15 -9
  100. package/build/cjs/editor/types/index.js +6 -0
  101. package/build/cjs/editor/utils/index.d.ts +4 -3
  102. package/build/cjs/editor/utils/index.js +6 -4
  103. package/build/cjs/grid/Col/Col.d.ts +1 -1
  104. package/build/cjs/models/constructor-items/blocks.d.ts +13 -8
  105. package/build/cjs/models/constructor.d.ts +2 -2
  106. package/build/cjs/models/customization.d.ts +3 -8
  107. package/build/cjs/navigation/schema.d.ts +1 -0
  108. package/build/cjs/schema/constants.d.ts +908 -0
  109. package/build/cjs/schema/constants.js +42 -0
  110. package/build/cjs/schema/index.d.ts +9 -228
  111. package/build/cjs/schema/index.js +8 -46
  112. package/build/cjs/schema/validators/common.d.ts +71 -27
  113. package/build/cjs/schema/validators/common.js +50 -17
  114. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +12 -5
  115. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +8 -3
  116. package/build/cjs/sub-blocks/Content/schema.d.ts +14 -6
  117. package/build/cjs/sub-blocks/Content/schema.js +9 -1
  118. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +23 -9
  119. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +16 -6
  120. package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +1 -0
  121. package/build/cjs/sub-blocks/PriceDetailed/schema.js +5 -1
  122. package/build/cjs/sub-blocks/Quote/schema.d.ts +6 -2
  123. package/build/esm/blocks/Banner/schema.d.ts +63 -21
  124. package/build/esm/blocks/CardLayout/schema.d.ts +10 -4
  125. package/build/esm/blocks/Companies/schema.d.ts +5 -2
  126. package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -2
  127. package/build/esm/blocks/ContentLayout/schema.d.ts +107 -61
  128. package/build/esm/blocks/ContentLayout/schema.js +23 -18
  129. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +31 -4
  130. package/build/esm/blocks/ExtendedFeatures/schema.js +3 -4
  131. package/build/esm/blocks/FilterBlock/schema.d.ts +13 -5
  132. package/build/esm/blocks/FilterBlock/schema.js +13 -2
  133. package/build/esm/blocks/Header/schema.d.ts +92 -36
  134. package/build/esm/blocks/Header/schema.js +1 -0
  135. package/build/esm/blocks/HeaderSlider/schema.d.ts +48 -53
  136. package/build/esm/blocks/HeaderSlider/schema.js +2 -1
  137. package/build/esm/blocks/Icons/schema.d.ts +3 -1
  138. package/build/esm/blocks/Icons/schema.js +2 -1
  139. package/build/esm/blocks/Info/schema.d.ts +19 -8
  140. package/build/esm/blocks/Map/schema.d.ts +17 -6
  141. package/build/esm/blocks/Media/schema.d.ts +204 -152
  142. package/build/esm/blocks/Media/schema.js +2 -2
  143. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +22 -8
  144. package/build/esm/blocks/PromoFeaturesBlock/schema.js +1 -0
  145. package/build/esm/blocks/Questions/schema.d.ts +7 -3
  146. package/build/esm/blocks/Slider/schema.d.ts +13 -18
  147. package/build/esm/blocks/Slider/schema.js +4 -5
  148. package/build/esm/blocks/Table/schema.d.ts +5 -2
  149. package/build/esm/blocks/Table/schema.js +12 -2
  150. package/build/esm/blocks/Tabs/schema.d.ts +43 -16
  151. package/build/esm/components/BlockBase/BlockBase.js +2 -2
  152. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
  153. package/build/esm/components/Image/schema.d.ts +1 -0
  154. package/build/esm/components/Image/schema.js +3 -2
  155. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
  156. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  157. package/build/esm/customization/BlockDecoration.d.ts +1 -1
  158. package/build/esm/customization/BlockDecoration.js +6 -6
  159. package/build/esm/editor/{Components → components}/AddBlock/AddBlock.css +1 -1
  160. package/build/esm/editor/components/AddBlock/AddBlock.d.ts +8 -0
  161. package/build/esm/editor/{Components → components}/AddBlock/AddBlock.js +2 -2
  162. package/build/esm/editor/components/BlockForm/BlockForm.d.ts +12 -0
  163. package/build/esm/editor/components/BlockForm/BlockForm.js +30 -0
  164. package/build/esm/editor/components/ControlPanel/ControlPanel.css +26 -0
  165. package/build/esm/editor/components/ControlPanel/ControlPanel.d.ts +9 -0
  166. package/build/esm/editor/components/ControlPanel/ControlPanel.js +22 -0
  167. package/build/esm/editor/components/ControlPanel/i18n/en.json +3 -0
  168. package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +2 -0
  169. package/build/esm/editor/components/ControlPanel/i18n/index.js +5 -0
  170. package/build/esm/editor/components/ControlPanel/i18n/ru.json +3 -0
  171. package/build/esm/editor/components/EditBlock/EditBlock.d.ts +14 -0
  172. package/build/esm/editor/components/EditBlock/EditBlock.js +41 -0
  173. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
  174. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
  175. package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +31 -0
  176. package/build/esm/editor/components/ErrorBoundary/i18n/en.json +4 -0
  177. package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
  178. package/build/esm/editor/components/ErrorBoundary/i18n/index.js +5 -0
  179. package/build/esm/editor/components/ErrorBoundary/i18n/ru.json +4 -0
  180. package/build/esm/editor/components/Layout/Layout.css +36 -0
  181. package/build/esm/editor/components/Layout/Layout.d.ts +17 -0
  182. package/build/esm/editor/components/Layout/Layout.js +32 -0
  183. package/build/esm/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
  184. package/build/esm/editor/components/PagePropsForm/PagePropsForm.js +13 -0
  185. package/build/esm/editor/containers/Editor/Editor.d.ts +2 -0
  186. package/build/esm/editor/containers/Editor/Editor.js +36 -0
  187. package/build/esm/editor/containers/Form/Form.css +94 -0
  188. package/build/esm/editor/containers/Form/Form.d.ts +12 -0
  189. package/build/esm/editor/containers/Form/Form.js +45 -0
  190. package/build/esm/editor/containers/Form/dynamic-form-custom.css +0 -0
  191. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
  192. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +20 -0
  193. package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +68 -0
  194. package/build/esm/editor/dynamic-forms-custom/config.d.ts +2 -0
  195. package/build/esm/editor/dynamic-forms-custom/config.js +9 -0
  196. package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
  197. package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.js +69 -0
  198. package/build/esm/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
  199. package/build/esm/editor/dynamic-forms-custom/parser/detect.js +32 -0
  200. package/build/esm/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
  201. package/build/esm/editor/dynamic-forms-custom/parser/index.js +186 -0
  202. package/build/esm/editor/dynamic-forms-custom/parser/types.d.ts +29 -0
  203. package/build/esm/editor/dynamic-forms-custom/parser/types.js +1 -0
  204. package/build/esm/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
  205. package/build/esm/editor/dynamic-forms-custom/parser/views.js +39 -0
  206. package/build/esm/editor/hooks/useFormSpec.d.ts +2 -0
  207. package/build/esm/editor/hooks/useFormSpec.js +9 -0
  208. package/build/esm/editor/hooks/usePreviousValue.d.ts +1 -0
  209. package/build/esm/editor/hooks/usePreviousValue.js +8 -0
  210. package/build/esm/editor/index.d.ts +1 -1
  211. package/build/esm/editor/index.js +1 -1
  212. package/build/esm/editor/store/index.d.ts +10 -11
  213. package/build/esm/editor/store/index.js +68 -17
  214. package/build/esm/editor/store/reducer.d.ts +24 -9
  215. package/build/esm/editor/store/reducer.js +15 -29
  216. package/build/esm/editor/store/utils.d.ts +1 -0
  217. package/build/esm/editor/store/utils.js +1 -0
  218. package/build/esm/editor/styles/root.css +5 -0
  219. package/build/esm/editor/types/index.d.ts +15 -9
  220. package/build/esm/editor/types/index.js +5 -1
  221. package/build/esm/editor/utils/index.d.ts +4 -3
  222. package/build/esm/editor/utils/index.js +4 -3
  223. package/build/esm/grid/Col/Col.d.ts +1 -1
  224. package/build/esm/models/constructor-items/blocks.d.ts +13 -8
  225. package/build/esm/models/constructor.d.ts +2 -2
  226. package/build/esm/models/customization.d.ts +3 -8
  227. package/build/esm/navigation/schema.d.ts +1 -0
  228. package/build/esm/schema/constants.d.ts +908 -0
  229. package/build/esm/schema/constants.js +39 -0
  230. package/build/esm/schema/index.d.ts +9 -228
  231. package/build/esm/schema/index.js +4 -42
  232. package/build/esm/schema/validators/common.d.ts +71 -27
  233. package/build/esm/schema/validators/common.js +49 -16
  234. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +12 -5
  235. package/build/esm/sub-blocks/BasicCard/schema.d.ts +8 -3
  236. package/build/esm/sub-blocks/Content/schema.d.ts +14 -6
  237. package/build/esm/sub-blocks/Content/schema.js +9 -1
  238. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +23 -9
  239. package/build/esm/sub-blocks/MediaCard/schema.d.ts +16 -6
  240. package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +1 -0
  241. package/build/esm/sub-blocks/PriceDetailed/schema.js +5 -1
  242. package/build/esm/sub-blocks/Quote/schema.d.ts +6 -2
  243. package/package.json +5 -1
  244. package/server/models/constructor-items/blocks.d.ts +13 -8
  245. package/server/models/constructor.d.ts +2 -2
  246. package/server/models/customization.d.ts +3 -8
  247. package/build/cjs/editor/Components/AddBlock/AddBlock.d.ts +0 -7
  248. package/build/cjs/editor/Components/EditBlock/EditBlock.d.ts +0 -4
  249. package/build/cjs/editor/Components/EditBlock/EditBlock.js +0 -32
  250. package/build/cjs/editor/Containers/Editor.d.ts +0 -2
  251. package/build/cjs/editor/Containers/Editor.js +0 -24
  252. package/build/esm/editor/Components/AddBlock/AddBlock.d.ts +0 -8
  253. package/build/esm/editor/Components/EditBlock/EditBlock.d.ts +0 -5
  254. package/build/esm/editor/Components/EditBlock/EditBlock.js +0 -30
  255. package/build/esm/editor/Containers/Editor.d.ts +0 -2
  256. package/build/esm/editor/Containers/Editor.js +0 -20
  257. /package/build/cjs/editor/{Components → components}/EditBlock/EditBlock.css +0 -0
  258. /package/build/esm/editor/{Components → components}/EditBlock/EditBlock.css +0 -0
@@ -8,7 +8,7 @@ export declare const CompaniesBlock: {
8
8
  contentType: string;
9
9
  };
10
10
  images: {
11
- oneOf: ({
11
+ oneOf: (({
12
12
  type: string;
13
13
  required: string[];
14
14
  properties: {
@@ -26,11 +26,14 @@ export declare const CompaniesBlock: {
26
26
  contentType: string;
27
27
  };
28
28
  };
29
- } | {
29
+ } & {
30
+ optionName: string;
31
+ }) | {
30
32
  type: string;
31
33
  additionalProperties: boolean;
32
34
  required: import("../..").Theme[];
33
35
  properties: {};
36
+ optionName: string;
34
37
  })[];
35
38
  };
36
39
  animated: {
@@ -28,8 +28,9 @@ function getTextWidth(size) {
28
28
  }
29
29
  export const ContentLayoutBlock = (props) => {
30
30
  const isMobile = useContext(MobileContext);
31
- const { textContent, fileContent, properties: cardLayoutProperties = { size: 'l' } } = props;
32
- const { size = 'l', background, centered, theme = 'default', textWidth = 'm', } = cardLayoutProperties;
31
+ const { textContent, fileContent } = props;
32
+ const propsSource = props.properties || props;
33
+ const { size = 'l', background, centered, theme = 'default', textWidth = 'm' } = propsSource;
33
34
  const colSizes = useMemo(() => getTextWidth(textWidth), [textWidth]);
34
35
  return (React.createElement("div", { className: b({ size, background: Boolean(background) }) },
35
36
  React.createElement(Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
@@ -2,79 +2,120 @@ export declare const ContentLayoutBlock: {
2
2
  'content-layout-block': {
3
3
  additionalProperties: boolean;
4
4
  properties: {
5
+ size: {
6
+ type: string;
7
+ enum: string[];
8
+ };
9
+ background: {
10
+ type: string;
11
+ additionalProperties: boolean;
12
+ required: string[];
13
+ properties: {
14
+ src: {
15
+ type: string; /**
16
+ * @deprecated Use params on top level instead
17
+ */
18
+ pattern: string;
19
+ };
20
+ alt: {
21
+ type: string;
22
+ contentType: string;
23
+ };
24
+ disableCompress: {
25
+ type: string;
26
+ };
27
+ };
28
+ };
29
+ centered: {
30
+ type: string;
31
+ };
32
+ theme: {
33
+ type: string;
34
+ enum: string[];
35
+ };
36
+ textWidth: {
37
+ type: string;
38
+ enum: string[];
39
+ };
5
40
  textContent: {
6
- content: {
7
- additionalProperties: boolean;
8
- properties: {
9
- colSizes: {};
10
- centered: {
11
- type: string;
12
- };
13
- title: {
14
- oneOf: ({
15
- type: string;
16
- additionalProperties: boolean;
17
- required: string[];
18
- properties: {
19
- text: {
20
- type: string;
21
- contentType: string;
22
- };
23
- textSize: {
24
- type: string;
25
- enum: string[];
26
- };
27
- url: {
28
- type: string;
29
- };
30
- resetMargin: {
31
- type: string;
32
- };
33
- };
34
- } | {
35
- type: string;
36
- contentType: string;
37
- })[];
38
- };
39
- text: {
40
- type: string;
41
- contentType: string;
42
- };
43
- additionalInfo: {
41
+ additionalProperties: boolean;
42
+ properties: {
43
+ colSizes: {};
44
+ centered: {
45
+ type: string;
46
+ };
47
+ title: {
48
+ oneOf: ({
44
49
  type: string;
45
50
  contentType: string;
46
- };
47
- size: {
51
+ optionName: string;
52
+ } | {
53
+ optionName: string;
48
54
  type: string;
49
- enum: string[];
50
- };
51
- links: {
52
- type: string;
53
- items: {
54
- type: string;
55
- properties: {
56
- when: {
57
- type: string;
58
- };
55
+ additionalProperties: boolean;
56
+ required: string[];
57
+ properties: {
58
+ text: {
59
+ type: string;
60
+ contentType: string;
61
+ };
62
+ textSize: {
63
+ type: string;
64
+ enum: string[];
65
+ };
66
+ url: {
67
+ type: string;
68
+ };
69
+ resetMargin: {
70
+ type: string;
59
71
  };
60
72
  };
61
- };
62
- buttons: {
73
+ contentType?: undefined;
74
+ })[];
75
+ };
76
+ text: {
77
+ type: string;
78
+ contentType: string;
79
+ inputType: string;
80
+ };
81
+ additionalInfo: {
82
+ type: string;
83
+ contentType: string;
84
+ };
85
+ size: {
86
+ type: string;
87
+ enum: string[];
88
+ };
89
+ links: {
90
+ type: string;
91
+ items: {
63
92
  type: string;
64
- items: {
65
- type: string;
66
- properties: {
67
- when: {
68
- type: string;
69
- };
93
+ properties: {
94
+ when: {
95
+ type: string;
70
96
  };
71
97
  };
72
98
  };
73
- theme: {
99
+ };
100
+ buttons: {
101
+ type: string;
102
+ items: {
74
103
  type: string;
75
- enum: string[];
104
+ properties: {
105
+ when: {
106
+ type: string;
107
+ };
108
+ };
76
109
  };
77
110
  };
111
+ theme: {
112
+ type: string;
113
+ enum: string[]; /**
114
+ * @deprecated Use params on top level instead
115
+ */
116
+ }; /**
117
+ * @deprecated Use params on top level instead
118
+ */
78
119
  };
79
120
  };
80
121
  fileContent: {
@@ -88,6 +129,9 @@ export declare const ContentLayoutBlock: {
88
129
  };
89
130
  };
90
131
  };
132
+ /**
133
+ * @deprecated Use params on top level instead
134
+ */
91
135
  properties: {
92
136
  size: {
93
137
  type: string;
@@ -99,7 +143,9 @@ export declare const ContentLayoutBlock: {
99
143
  required: string[];
100
144
  properties: {
101
145
  src: {
102
- type: string;
146
+ type: string; /**
147
+ * @deprecated Use params on top level instead
148
+ */
103
149
  pattern: string;
104
150
  };
105
151
  alt: {
@@ -2,26 +2,31 @@ import { ImageObjectProps } from '../../components/Image/schema';
2
2
  import { BlockBaseProps, FileLinkProps, contentSizes, contentTextWidth, contentThemes, } from '../../schema/validators/common';
3
3
  import { filteredArray } from '../../schema/validators/utils';
4
4
  import { ContentBlock } from '../../sub-blocks/Content/schema';
5
+ const ContentLayoutBlockProperties = {
6
+ size: {
7
+ type: 'string',
8
+ enum: contentSizes,
9
+ },
10
+ background: ImageObjectProps,
11
+ centered: {
12
+ type: 'boolean',
13
+ },
14
+ theme: {
15
+ type: 'string',
16
+ enum: contentThemes,
17
+ },
18
+ textWidth: {
19
+ type: 'string',
20
+ enum: contentTextWidth,
21
+ },
22
+ };
5
23
  export const ContentLayoutBlock = {
6
24
  'content-layout-block': {
7
25
  additionalProperties: false,
8
- properties: Object.assign(Object.assign({}, BlockBaseProps), { textContent: ContentBlock, fileContent: filteredArray(FileLinkProps), properties: {
9
- size: {
10
- type: 'string',
11
- enum: contentSizes,
12
- },
13
- background: ImageObjectProps,
14
- centered: {
15
- type: 'boolean',
16
- },
17
- theme: {
18
- type: 'string',
19
- enum: contentThemes,
20
- },
21
- textWidth: {
22
- type: 'string',
23
- enum: contentTextWidth,
24
- },
25
- } }),
26
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), { textContent: ContentBlock === null || ContentBlock === void 0 ? void 0 : ContentBlock.content, fileContent: filteredArray(FileLinkProps),
27
+ /**
28
+ * @deprecated Use params on top level instead
29
+ */
30
+ properties: ContentLayoutBlockProperties }), ContentLayoutBlockProperties),
26
31
  },
27
32
  };
@@ -42,7 +42,8 @@ export declare const ExtendedFeaturesItem: {
42
42
  enum: string[];
43
43
  };
44
44
  analyticsEvents: {
45
- anyOf: ({
45
+ oneOf: ({
46
+ optionName: string;
46
47
  type: string;
47
48
  additionalProperties: {
48
49
  type: string;
@@ -78,6 +79,7 @@ export declare const ExtendedFeaturesItem: {
78
79
  type: string;
79
80
  };
80
81
  };
82
+ items?: undefined;
81
83
  } | {
82
84
  type: string;
83
85
  items: {
@@ -117,6 +119,7 @@ export declare const ExtendedFeaturesItem: {
117
119
  };
118
120
  };
119
121
  };
122
+ optionName: string;
120
123
  })[];
121
124
  };
122
125
  type: {};
@@ -124,7 +127,28 @@ export declare const ExtendedFeaturesItem: {
124
127
  };
125
128
  };
126
129
  icon: {
127
- type: string;
130
+ oneOf: (({
131
+ oneOf: ({
132
+ type: string;
133
+ properties: {
134
+ when: {
135
+ type: string;
136
+ };
137
+ };
138
+ } | {
139
+ type: string;
140
+ pattern: string;
141
+ optionName: string;
142
+ })[];
143
+ } & {
144
+ optionName: string;
145
+ }) | {
146
+ type: string;
147
+ additionalProperties: boolean;
148
+ required: import("../..").Theme[];
149
+ properties: {};
150
+ optionName: string;
151
+ })[];
128
152
  };
129
153
  };
130
154
  };
@@ -151,6 +175,10 @@ export declare const ExtendedFeaturesBlock: {
151
175
  };
152
176
  title: {
153
177
  oneOf: ({
178
+ type: string;
179
+ optionName: string;
180
+ } | {
181
+ optionName: string;
154
182
  type: string;
155
183
  additionalProperties: boolean;
156
184
  required: string[];
@@ -170,13 +198,12 @@ export declare const ExtendedFeaturesBlock: {
170
198
  type: string;
171
199
  };
172
200
  };
173
- } | {
174
- type: string;
175
201
  })[];
176
202
  };
177
203
  description: {
178
204
  type: string;
179
205
  contentType: string;
206
+ inputType: string;
180
207
  };
181
208
  animated: {
182
209
  type: string;
@@ -1,4 +1,5 @@
1
- import { AnimatableProps, BlockBaseProps, BlockHeaderProps, LinkProps, containerSizesObject, } from '../../schema/validators/common';
1
+ import { AnimatableProps, BlockBaseProps, BlockHeaderProps, LinkProps, containerSizesObject, withTheme, } from '../../schema/validators/common';
2
+ import { ImageProps } from '../../schema/validators/components';
2
3
  import { filteredArray } from '../../schema/validators/utils';
3
4
  export const ExtendedFeaturesItem = {
4
5
  additionalProperties: false,
@@ -17,9 +18,7 @@ export const ExtendedFeaturesItem = {
17
18
  enum: ['New', 'Preview'],
18
19
  },
19
20
  link: LinkProps,
20
- icon: {
21
- type: 'string',
22
- },
21
+ icon: withTheme(ImageProps),
23
22
  },
24
23
  };
25
24
  export const ExtendedFeaturesBlock = {
@@ -32,6 +32,7 @@ export declare const FilterProps: {
32
32
  allTag: {
33
33
  oneOf: {
34
34
  type: string;
35
+ optionName: string;
35
36
  }[];
36
37
  };
37
38
  colSizes: {
@@ -67,6 +68,10 @@ export declare const FilterProps: {
67
68
  };
68
69
  title: {
69
70
  oneOf: ({
71
+ type: string;
72
+ optionName: string;
73
+ } | {
74
+ optionName: string;
70
75
  type: string;
71
76
  additionalProperties: boolean;
72
77
  required: string[];
@@ -86,13 +91,12 @@ export declare const FilterProps: {
86
91
  type: string;
87
92
  };
88
93
  };
89
- } | {
90
- type: string;
91
94
  })[];
92
95
  };
93
96
  description: {
94
97
  type: string;
95
98
  contentType: string;
99
+ inputType: string;
96
100
  };
97
101
  animated: {
98
102
  type: string;
@@ -126,13 +130,14 @@ export declare const FilterProps: {
126
130
  };
127
131
  };
128
132
  export declare const FilterBlock: {
129
- 'filterable-block': {
133
+ 'filter-block': {
130
134
  additionalProperties: boolean;
131
135
  required: string[];
132
136
  properties: {
133
137
  allTag: {
134
138
  oneOf: {
135
139
  type: string;
140
+ optionName: string;
136
141
  }[];
137
142
  };
138
143
  colSizes: {
@@ -168,6 +173,10 @@ export declare const FilterBlock: {
168
173
  };
169
174
  title: {
170
175
  oneOf: ({
176
+ type: string;
177
+ optionName: string;
178
+ } | {
179
+ optionName: string;
171
180
  type: string;
172
181
  additionalProperties: boolean;
173
182
  required: string[];
@@ -187,13 +196,12 @@ export declare const FilterBlock: {
187
196
  type: string;
188
197
  };
189
198
  };
190
- } | {
191
- type: string;
192
199
  })[];
193
200
  };
194
201
  description: {
195
202
  type: string;
196
203
  contentType: string;
204
+ inputType: string;
197
205
  };
198
206
  animated: {
199
207
  type: string;
@@ -28,11 +28,22 @@ export const FilterItemProps = {
28
28
  export const FilterProps = {
29
29
  additionalProperties: false,
30
30
  required: ['filterTags', 'block'],
31
- properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { allTag: { oneOf: [{ type: 'boolean' }, { type: 'string' }] }, colSizes: containerSizesObject, tags: filteredArray(FilterTagProps), items: filteredArray(FilterItemProps), tagButtonSize: {
31
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { allTag: {
32
+ oneOf: [
33
+ {
34
+ type: 'boolean',
35
+ optionName: 'auto',
36
+ },
37
+ {
38
+ type: 'string',
39
+ optionName: 'cutom',
40
+ },
41
+ ],
42
+ }, colSizes: containerSizesObject, tags: filteredArray(FilterTagProps), items: filteredArray(FilterItemProps), tagButtonSize: {
32
43
  type: 'string',
33
44
  enum: ['s', 'm', 'l', 'xl'],
34
45
  } }),
35
46
  };
36
47
  export const FilterBlock = {
37
- 'filterable-block': FilterProps,
48
+ 'filter-block': FilterProps,
38
49
  };