@gravity-ui/page-constructor 5.14.3 → 5.14.4-alpha.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 (390) hide show
  1. package/build/cjs/blocks/Banner/Banner.js +3 -1
  2. package/build/cjs/blocks/Banner/index.d.ts +3 -0
  3. package/build/cjs/blocks/Banner/index.js +22 -0
  4. package/build/cjs/blocks/CardLayout/CardLayout.css +1 -0
  5. package/build/cjs/blocks/CardLayout/CardLayout.js +11 -6
  6. package/build/cjs/blocks/CardLayout/index.d.ts +5 -0
  7. package/build/cjs/blocks/CardLayout/index.js +166 -0
  8. package/build/cjs/blocks/Companies/Companies.js +6 -4
  9. package/build/cjs/blocks/Companies/index.d.ts +3 -0
  10. package/build/cjs/blocks/Companies/index.js +18 -0
  11. package/build/cjs/blocks/ContentLayout/ContentLayout.js +6 -5
  12. package/build/cjs/blocks/ContentLayout/index.d.ts +11 -0
  13. package/build/cjs/blocks/ContentLayout/index.js +17 -0
  14. package/build/cjs/blocks/ContentLayout/schema.d.ts +1 -0
  15. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +22 -20
  16. package/build/cjs/blocks/ExtendedFeatures/index.d.ts +12 -0
  17. package/build/cjs/blocks/ExtendedFeatures/index.js +18 -0
  18. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +1 -0
  19. package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -0
  20. package/build/cjs/blocks/FilterBlock/FilterBlock.js +11 -10
  21. package/build/cjs/blocks/FilterBlock/index.d.ts +11 -0
  22. package/build/cjs/blocks/FilterBlock/index.js +17 -0
  23. package/build/cjs/blocks/Form/index.d.ts +12 -0
  24. package/build/cjs/blocks/Form/index.js +18 -0
  25. package/build/cjs/blocks/Header/dynamic-form.d.ts +2 -0
  26. package/build/cjs/blocks/Header/dynamic-form.js +730 -0
  27. package/build/cjs/blocks/Header/index.d.ts +8 -0
  28. package/build/cjs/blocks/Header/index.js +14 -0
  29. package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +3 -2
  30. package/build/cjs/blocks/HeaderSlider/index.d.ts +31 -0
  31. package/build/cjs/blocks/HeaderSlider/index.js +38 -0
  32. package/build/cjs/blocks/Icons/Icons.js +9 -6
  33. package/build/cjs/blocks/Icons/index.d.ts +13 -0
  34. package/build/cjs/blocks/Icons/index.js +19 -0
  35. package/build/cjs/blocks/Info/index.d.ts +21 -0
  36. package/build/cjs/blocks/Info/index.js +41 -0
  37. package/build/cjs/blocks/Map/index.d.ts +11 -0
  38. package/build/cjs/blocks/Map/index.js +17 -0
  39. package/build/cjs/blocks/Media/index.d.ts +14 -0
  40. package/build/cjs/blocks/Media/index.js +20 -0
  41. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
  42. package/build/cjs/blocks/PromoFeaturesBlock/index.d.ts +12 -0
  43. package/build/cjs/blocks/PromoFeaturesBlock/index.js +18 -0
  44. package/build/cjs/blocks/Questions/Questions.js +12 -10
  45. package/build/cjs/blocks/Questions/index.d.ts +29 -0
  46. package/build/cjs/blocks/Questions/index.js +47 -0
  47. package/build/cjs/blocks/Share/Share.js +11 -10
  48. package/build/cjs/blocks/Share/index.d.ts +12 -0
  49. package/build/cjs/blocks/Share/index.js +18 -0
  50. package/build/cjs/blocks/Slider/Slider.js +22 -17
  51. package/build/cjs/blocks/Slider/dynamic-form.d.ts +3 -0
  52. package/build/cjs/blocks/Slider/dynamic-form.js +225 -0
  53. package/build/cjs/blocks/Slider/index.d.ts +8 -0
  54. package/build/cjs/blocks/Slider/index.js +14 -0
  55. package/build/cjs/blocks/Table/index.d.ts +8 -0
  56. package/build/cjs/blocks/Table/index.js +14 -0
  57. package/build/cjs/blocks/Table/schema.d.ts +1 -0
  58. package/build/cjs/blocks/Table/schema.js +1 -0
  59. package/build/cjs/blocks/Tabs/Tabs.js +9 -8
  60. package/build/cjs/blocks/Tabs/index.d.ts +16 -0
  61. package/build/cjs/blocks/Tabs/index.js +29 -0
  62. package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
  63. package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.js +12 -0
  64. package/build/cjs/blocks/TestEditorBlock/form.d.ts +3 -0
  65. package/build/cjs/blocks/TestEditorBlock/form.js +80 -0
  66. package/build/cjs/blocks/TestEditorBlock/index.d.ts +11 -0
  67. package/build/cjs/blocks/TestEditorBlock/index.js +17 -0
  68. package/build/cjs/components/BlockBase/BlockBase.css +8 -16
  69. package/build/cjs/components/Image/dynamic-form.d.ts +2 -0
  70. package/build/cjs/components/Image/dynamic-form.js +84 -0
  71. package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
  72. package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.d.ts +6 -0
  73. package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.js +15 -0
  74. package/build/cjs/components/editor/ItemWrap/ItemWrap.css +9 -0
  75. package/build/cjs/components/editor/ItemWrap/ItemWrap.d.ts +6 -0
  76. package/build/cjs/components/editor/ItemWrap/ItemWrap.js +15 -0
  77. package/build/cjs/constructor-items.d.ts +18 -6
  78. package/build/cjs/constructor-items.js +67 -1
  79. package/build/cjs/containers/PageConstructor/PageConstructor.js +16 -13
  80. package/build/cjs/containers/PageConstructor/Provider.js +4 -0
  81. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
  82. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
  83. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
  84. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +109 -0
  85. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
  86. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
  87. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  88. package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
  89. package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
  90. package/build/cjs/context/blockIdContext/blockIdContext.d.ts +2 -2
  91. package/build/cjs/context/blockIdContext/blockIdContext.js +1 -1
  92. package/build/cjs/context/editorContext/editorContext.d.ts +13 -0
  93. package/build/cjs/context/editorContext/editorContext.js +10 -0
  94. package/build/cjs/context/editorContext/editorProvider.d.ts +2 -0
  95. package/build/cjs/context/editorContext/editorProvider.js +20 -0
  96. package/build/cjs/context/editorContext/hooks/useEditorStore.d.ts +2 -0
  97. package/build/cjs/context/editorContext/hooks/useEditorStore.js +15 -0
  98. package/build/cjs/context/editorContext/index.d.ts +4 -0
  99. package/build/cjs/context/editorContext/index.js +7 -0
  100. package/build/cjs/context/editorContext/store.d.ts +24 -0
  101. package/build/cjs/context/editorContext/store.js +39 -0
  102. package/build/cjs/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
  103. package/build/cjs/context/messagesContext/hooks/useMessageObserver.js +16 -0
  104. package/build/cjs/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
  105. package/build/cjs/context/messagesContext/hooks/useMessageSender.js +11 -0
  106. package/build/cjs/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
  107. package/build/cjs/context/messagesContext/hooks/useMessagesStore.js +15 -0
  108. package/build/cjs/context/messagesContext/index.d.ts +5 -0
  109. package/build/cjs/context/messagesContext/index.js +8 -0
  110. package/build/cjs/context/messagesContext/messagesContext.d.ts +14 -0
  111. package/build/cjs/context/messagesContext/messagesContext.js +12 -0
  112. package/build/cjs/context/messagesContext/messagesProvider.d.ts +2 -0
  113. package/build/cjs/context/messagesContext/messagesProvider.js +73 -0
  114. package/build/cjs/context/messagesContext/store.d.ts +25 -0
  115. package/build/cjs/context/messagesContext/store.js +17 -0
  116. package/build/cjs/context/messagesContext/types.d.ts +14 -0
  117. package/build/cjs/context/messagesContext/types.js +2 -0
  118. package/build/cjs/grid/Col/Col.d.ts +1 -1
  119. package/build/cjs/grid/Grid/Grid.css +2 -6
  120. package/build/cjs/hooks/useAnalytics.js +1 -1
  121. package/build/cjs/hooks/useEditorInitialize.d.ts +7 -0
  122. package/build/cjs/hooks/useEditorInitialize.js +90 -0
  123. package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
  124. package/build/cjs/models/constructor-items/blocks.js +1 -0
  125. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
  126. package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -1
  127. package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
  128. package/build/cjs/navigation/containers/Layout/Layout.css +0 -1
  129. package/build/cjs/schema/constants.d.ts +1 -1
  130. package/build/cjs/schema/constants.js +2 -1
  131. package/build/cjs/schema/index.d.ts +227 -0
  132. package/build/cjs/schema/index.js +7 -3
  133. package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
  134. package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js +81 -0
  135. package/build/cjs/sub-blocks/BackgroundCard/index.d.ts +3 -0
  136. package/build/cjs/sub-blocks/BackgroundCard/index.js +19 -0
  137. package/build/cjs/sub-blocks/BannerCard/BannerCard.js +4 -3
  138. package/build/cjs/sub-blocks/BannerCard/index.d.ts +3 -0
  139. package/build/cjs/sub-blocks/BannerCard/index.js +22 -0
  140. package/build/cjs/sub-blocks/BasicCard/index.d.ts +3 -0
  141. package/build/cjs/sub-blocks/BasicCard/index.js +18 -0
  142. package/build/cjs/sub-blocks/Content/index.d.ts +3 -0
  143. package/build/cjs/sub-blocks/Content/index.js +18 -0
  144. package/build/cjs/sub-blocks/Content/schema.d.ts +1 -0
  145. package/build/cjs/sub-blocks/Content/schema.js +1 -0
  146. package/build/cjs/sub-blocks/Divider/index.d.ts +3 -0
  147. package/build/cjs/sub-blocks/Divider/index.js +15 -0
  148. package/build/cjs/sub-blocks/ImageCard/ImageCard.js +2 -2
  149. package/build/cjs/sub-blocks/ImageCard/index.d.ts +3 -0
  150. package/build/cjs/sub-blocks/ImageCard/index.js +18 -0
  151. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +1 -1
  152. package/build/cjs/sub-blocks/LayoutItem/form.d.ts +8 -0
  153. package/build/cjs/sub-blocks/LayoutItem/form.js +14 -0
  154. package/build/cjs/sub-blocks/LayoutItem/index.d.ts +3 -0
  155. package/build/cjs/sub-blocks/LayoutItem/index.js +20 -0
  156. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +254 -246
  157. package/build/cjs/sub-blocks/LayoutItem/schema.js +7 -3
  158. package/build/cjs/sub-blocks/MediaCard/index.d.ts +3 -0
  159. package/build/cjs/sub-blocks/MediaCard/index.js +20 -0
  160. package/build/cjs/sub-blocks/PriceCard/index.d.ts +3 -0
  161. package/build/cjs/sub-blocks/PriceCard/index.js +31 -0
  162. package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
  163. package/build/cjs/sub-blocks/PriceDetailed/index.d.ts +4 -0
  164. package/build/cjs/sub-blocks/PriceDetailed/index.js +33 -0
  165. package/build/cjs/sub-blocks/Quote/index.d.ts +3 -0
  166. package/build/cjs/sub-blocks/Quote/index.js +21 -0
  167. package/build/cjs/types/actions/codes.d.ts +16 -0
  168. package/build/cjs/types/actions/codes.js +26 -0
  169. package/build/cjs/types/actions/index.d.ts +20 -0
  170. package/build/cjs/types/actions/index.js +10 -0
  171. package/build/cjs/types/actions/initial.d.ts +23 -0
  172. package/build/cjs/types/actions/initial.js +2 -0
  173. package/build/cjs/types/actions/insert.d.ts +19 -0
  174. package/build/cjs/types/actions/insert.js +2 -0
  175. package/build/cjs/types/actions/other.d.ts +16 -0
  176. package/build/cjs/types/actions/other.js +2 -0
  177. package/build/cjs/types/actions/overlay.d.ts +16 -0
  178. package/build/cjs/types/actions/overlay.js +2 -0
  179. package/build/cjs/types/actions/reorder.d.ts +17 -0
  180. package/build/cjs/types/actions/reorder.js +2 -0
  181. package/build/cjs/types/actions/select.d.ts +16 -0
  182. package/build/cjs/types/actions/select.js +2 -0
  183. package/build/cjs/types/dynamic-form.d.ts +92 -0
  184. package/build/cjs/types/dynamic-form.js +2 -0
  185. package/build/cjs/types/index.d.ts +14 -0
  186. package/build/cjs/types/index.js +2 -0
  187. package/build/cjs/utils/editor.d.ts +2 -0
  188. package/build/cjs/utils/editor.js +24 -0
  189. package/build/cjs/utils/form-generator.d.ts +9 -0
  190. package/build/cjs/utils/form-generator.js +126 -0
  191. package/build/cjs/utils/store.d.ts +16 -0
  192. package/build/cjs/utils/store.js +9 -0
  193. package/build/esm/blocks/Banner/Banner.js +3 -1
  194. package/build/esm/blocks/Banner/index.d.ts +3 -0
  195. package/build/esm/blocks/Banner/index.js +19 -0
  196. package/build/esm/blocks/CardLayout/CardLayout.css +1 -0
  197. package/build/esm/blocks/CardLayout/CardLayout.js +12 -7
  198. package/build/esm/blocks/CardLayout/index.d.ts +5 -0
  199. package/build/esm/blocks/CardLayout/index.js +162 -0
  200. package/build/esm/blocks/Companies/Companies.js +6 -4
  201. package/build/esm/blocks/Companies/index.d.ts +3 -0
  202. package/build/esm/blocks/Companies/index.js +15 -0
  203. package/build/esm/blocks/ContentLayout/ContentLayout.js +7 -6
  204. package/build/esm/blocks/ContentLayout/index.d.ts +11 -0
  205. package/build/esm/blocks/ContentLayout/index.js +14 -0
  206. package/build/esm/blocks/ContentLayout/schema.d.ts +1 -0
  207. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +23 -21
  208. package/build/esm/blocks/ExtendedFeatures/index.d.ts +12 -0
  209. package/build/esm/blocks/ExtendedFeatures/index.js +15 -0
  210. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +1 -0
  211. package/build/esm/blocks/ExtendedFeatures/schema.js +1 -0
  212. package/build/esm/blocks/FilterBlock/FilterBlock.js +12 -11
  213. package/build/esm/blocks/FilterBlock/index.d.ts +11 -0
  214. package/build/esm/blocks/FilterBlock/index.js +14 -0
  215. package/build/esm/blocks/Form/index.d.ts +12 -0
  216. package/build/esm/blocks/Form/index.js +15 -0
  217. package/build/esm/blocks/Header/dynamic-form.d.ts +2 -0
  218. package/build/esm/blocks/Header/dynamic-form.js +727 -0
  219. package/build/esm/blocks/Header/index.d.ts +8 -0
  220. package/build/esm/blocks/Header/index.js +11 -0
  221. package/build/esm/blocks/HeaderSlider/HeaderSlider.js +3 -2
  222. package/build/esm/blocks/HeaderSlider/index.d.ts +31 -0
  223. package/build/esm/blocks/HeaderSlider/index.js +35 -0
  224. package/build/esm/blocks/Icons/Icons.js +9 -6
  225. package/build/esm/blocks/Icons/index.d.ts +13 -0
  226. package/build/esm/blocks/Icons/index.js +16 -0
  227. package/build/esm/blocks/Info/index.d.ts +21 -0
  228. package/build/esm/blocks/Info/index.js +38 -0
  229. package/build/esm/blocks/Map/index.d.ts +11 -0
  230. package/build/esm/blocks/Map/index.js +14 -0
  231. package/build/esm/blocks/Media/index.d.ts +14 -0
  232. package/build/esm/blocks/Media/index.js +17 -0
  233. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
  234. package/build/esm/blocks/PromoFeaturesBlock/index.d.ts +12 -0
  235. package/build/esm/blocks/PromoFeaturesBlock/index.js +15 -0
  236. package/build/esm/blocks/Questions/Questions.js +13 -11
  237. package/build/esm/blocks/Questions/index.d.ts +29 -0
  238. package/build/esm/blocks/Questions/index.js +44 -0
  239. package/build/esm/blocks/Share/Share.js +11 -10
  240. package/build/esm/blocks/Share/index.d.ts +12 -0
  241. package/build/esm/blocks/Share/index.js +15 -0
  242. package/build/esm/blocks/Slider/Slider.js +22 -17
  243. package/build/esm/blocks/Slider/dynamic-form.d.ts +3 -0
  244. package/build/esm/blocks/Slider/dynamic-form.js +222 -0
  245. package/build/esm/blocks/Slider/index.d.ts +8 -0
  246. package/build/esm/blocks/Slider/index.js +11 -0
  247. package/build/esm/blocks/Table/index.d.ts +8 -0
  248. package/build/esm/blocks/Table/index.js +11 -0
  249. package/build/esm/blocks/Table/schema.d.ts +1 -0
  250. package/build/esm/blocks/Table/schema.js +1 -0
  251. package/build/esm/blocks/Tabs/Tabs.js +10 -9
  252. package/build/esm/blocks/Tabs/index.d.ts +16 -0
  253. package/build/esm/blocks/Tabs/index.js +26 -0
  254. package/build/esm/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
  255. package/build/esm/blocks/TestEditorBlock/TestEditorBlock.js +7 -0
  256. package/build/esm/blocks/TestEditorBlock/form.d.ts +3 -0
  257. package/build/esm/blocks/TestEditorBlock/form.js +78 -0
  258. package/build/esm/blocks/TestEditorBlock/index.d.ts +11 -0
  259. package/build/esm/blocks/TestEditorBlock/index.js +13 -0
  260. package/build/esm/components/BlockBase/BlockBase.css +8 -16
  261. package/build/esm/components/Image/dynamic-form.d.ts +2 -0
  262. package/build/esm/components/Image/dynamic-form.js +80 -0
  263. package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
  264. package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.d.ts +7 -0
  265. package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.js +13 -0
  266. package/build/esm/components/editor/ItemWrap/ItemWrap.css +9 -0
  267. package/build/esm/components/editor/ItemWrap/ItemWrap.d.ts +7 -0
  268. package/build/esm/components/editor/ItemWrap/ItemWrap.js +13 -0
  269. package/build/esm/constructor-items.d.ts +18 -6
  270. package/build/esm/constructor-items.js +66 -0
  271. package/build/esm/containers/PageConstructor/PageConstructor.js +19 -16
  272. package/build/esm/containers/PageConstructor/Provider.js +4 -0
  273. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
  274. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
  275. package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
  276. package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +107 -0
  277. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
  278. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
  279. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
  280. package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
  281. package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
  282. package/build/esm/context/blockIdContext/blockIdContext.d.ts +2 -2
  283. package/build/esm/context/blockIdContext/blockIdContext.js +1 -1
  284. package/build/esm/context/editorContext/editorContext.d.ts +13 -0
  285. package/build/esm/context/editorContext/editorContext.js +6 -0
  286. package/build/esm/context/editorContext/editorProvider.d.ts +2 -0
  287. package/build/esm/context/editorContext/editorProvider.js +15 -0
  288. package/build/esm/context/editorContext/hooks/useEditorStore.d.ts +2 -0
  289. package/build/esm/context/editorContext/hooks/useEditorStore.js +11 -0
  290. package/build/esm/context/editorContext/index.d.ts +4 -0
  291. package/build/esm/context/editorContext/index.js +4 -0
  292. package/build/esm/context/editorContext/store.d.ts +24 -0
  293. package/build/esm/context/editorContext/store.js +36 -0
  294. package/build/esm/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
  295. package/build/esm/context/messagesContext/hooks/useMessageObserver.js +12 -0
  296. package/build/esm/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
  297. package/build/esm/context/messagesContext/hooks/useMessageSender.js +7 -0
  298. package/build/esm/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
  299. package/build/esm/context/messagesContext/hooks/useMessagesStore.js +11 -0
  300. package/build/esm/context/messagesContext/index.d.ts +5 -0
  301. package/build/esm/context/messagesContext/index.js +5 -0
  302. package/build/esm/context/messagesContext/messagesContext.d.ts +14 -0
  303. package/build/esm/context/messagesContext/messagesContext.js +8 -0
  304. package/build/esm/context/messagesContext/messagesProvider.d.ts +2 -0
  305. package/build/esm/context/messagesContext/messagesProvider.js +68 -0
  306. package/build/esm/context/messagesContext/store.d.ts +25 -0
  307. package/build/esm/context/messagesContext/store.js +14 -0
  308. package/build/esm/context/messagesContext/types.d.ts +14 -0
  309. package/build/esm/context/messagesContext/types.js +1 -0
  310. package/build/esm/grid/Col/Col.d.ts +1 -1
  311. package/build/esm/grid/Grid/Grid.css +2 -6
  312. package/build/esm/hooks/useAnalytics.js +1 -1
  313. package/build/esm/hooks/useEditorInitialize.d.ts +7 -0
  314. package/build/esm/hooks/useEditorInitialize.js +87 -0
  315. package/build/esm/models/constructor-items/blocks.d.ts +2 -1
  316. package/build/esm/models/constructor-items/blocks.js +1 -0
  317. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
  318. package/build/esm/navigation/components/NavigationItem/NavigationItem.js +4 -1
  319. package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
  320. package/build/esm/navigation/containers/Layout/Layout.css +0 -1
  321. package/build/esm/schema/constants.d.ts +1 -1
  322. package/build/esm/schema/constants.js +2 -1
  323. package/build/esm/schema/index.d.ts +227 -0
  324. package/build/esm/schema/index.js +6 -2
  325. package/build/esm/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
  326. package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js +78 -0
  327. package/build/esm/sub-blocks/BackgroundCard/index.d.ts +3 -0
  328. package/build/esm/sub-blocks/BackgroundCard/index.js +16 -0
  329. package/build/esm/sub-blocks/BannerCard/BannerCard.js +4 -3
  330. package/build/esm/sub-blocks/BannerCard/index.d.ts +3 -0
  331. package/build/esm/sub-blocks/BannerCard/index.js +19 -0
  332. package/build/esm/sub-blocks/BasicCard/index.d.ts +3 -0
  333. package/build/esm/sub-blocks/BasicCard/index.js +15 -0
  334. package/build/esm/sub-blocks/Content/index.d.ts +3 -0
  335. package/build/esm/sub-blocks/Content/index.js +15 -0
  336. package/build/esm/sub-blocks/Content/schema.d.ts +1 -0
  337. package/build/esm/sub-blocks/Content/schema.js +1 -0
  338. package/build/esm/sub-blocks/Divider/index.d.ts +3 -0
  339. package/build/esm/sub-blocks/Divider/index.js +12 -0
  340. package/build/esm/sub-blocks/ImageCard/ImageCard.js +2 -2
  341. package/build/esm/sub-blocks/ImageCard/index.d.ts +3 -0
  342. package/build/esm/sub-blocks/ImageCard/index.js +15 -0
  343. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +1 -1
  344. package/build/esm/sub-blocks/LayoutItem/form.d.ts +8 -0
  345. package/build/esm/sub-blocks/LayoutItem/form.js +11 -0
  346. package/build/esm/sub-blocks/LayoutItem/index.d.ts +3 -0
  347. package/build/esm/sub-blocks/LayoutItem/index.js +17 -0
  348. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +254 -246
  349. package/build/esm/sub-blocks/LayoutItem/schema.js +6 -2
  350. package/build/esm/sub-blocks/MediaCard/index.d.ts +3 -0
  351. package/build/esm/sub-blocks/MediaCard/index.js +17 -0
  352. package/build/esm/sub-blocks/PriceCard/index.d.ts +3 -0
  353. package/build/esm/sub-blocks/PriceCard/index.js +28 -0
  354. package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
  355. package/build/esm/sub-blocks/PriceDetailed/index.d.ts +4 -0
  356. package/build/esm/sub-blocks/PriceDetailed/index.js +30 -0
  357. package/build/esm/sub-blocks/Quote/index.d.ts +3 -0
  358. package/build/esm/sub-blocks/Quote/index.js +18 -0
  359. package/build/esm/types/actions/codes.d.ts +16 -0
  360. package/build/esm/types/actions/codes.js +23 -0
  361. package/build/esm/types/actions/index.d.ts +20 -0
  362. package/build/esm/types/actions/index.js +7 -0
  363. package/build/esm/types/actions/initial.d.ts +23 -0
  364. package/build/esm/types/actions/initial.js +1 -0
  365. package/build/esm/types/actions/insert.d.ts +19 -0
  366. package/build/esm/types/actions/insert.js +1 -0
  367. package/build/esm/types/actions/other.d.ts +16 -0
  368. package/build/esm/types/actions/other.js +1 -0
  369. package/build/esm/types/actions/overlay.d.ts +16 -0
  370. package/build/esm/types/actions/overlay.js +1 -0
  371. package/build/esm/types/actions/reorder.d.ts +17 -0
  372. package/build/esm/types/actions/reorder.js +1 -0
  373. package/build/esm/types/actions/select.d.ts +16 -0
  374. package/build/esm/types/actions/select.js +1 -0
  375. package/build/esm/types/dynamic-form.d.ts +92 -0
  376. package/build/esm/types/dynamic-form.js +1 -0
  377. package/build/esm/types/index.d.ts +14 -0
  378. package/build/esm/types/index.js +1 -0
  379. package/build/esm/utils/editor.d.ts +2 -0
  380. package/build/esm/utils/editor.js +20 -0
  381. package/build/esm/utils/form-generator.d.ts +9 -0
  382. package/build/esm/utils/form-generator.js +121 -0
  383. package/build/esm/utils/store.d.ts +16 -0
  384. package/build/esm/utils/store.js +5 -0
  385. package/package.json +5 -2
  386. package/server/models/constructor-items/blocks.d.ts +2 -1
  387. package/server/models/constructor-items/blocks.js +1 -0
  388. package/server/models/constructor-items/sub-blocks.d.ts +1 -1
  389. package/styles/mixins.scss +9 -9
  390. package/widget/index.js +1 -1
@@ -0,0 +1,222 @@
1
+ import { sliderSizesArray, textSize } from '../../schema/validators/common';
2
+ const textSizeEnum = textSize.map((size) => ({ value: size, content: size }));
3
+ export const blockConfig = {
4
+ name: 'Slider Block',
5
+ inputs: [
6
+ {
7
+ type: 'oneOf',
8
+ name: 'title',
9
+ title: 'Title Object',
10
+ options: [
11
+ {
12
+ title: 'Simple',
13
+ value: 'simple',
14
+ properties: [
15
+ {
16
+ type: 'text',
17
+ name: '',
18
+ title: 'Title',
19
+ },
20
+ ],
21
+ },
22
+ {
23
+ title: 'Complex',
24
+ value: 'complex',
25
+ properties: [
26
+ {
27
+ type: 'text',
28
+ name: 'text',
29
+ title: 'Title',
30
+ },
31
+ {
32
+ type: 'select',
33
+ name: 'textSize',
34
+ title: 'Text Size',
35
+ enum: textSizeEnum,
36
+ view: 'select',
37
+ mode: 'single',
38
+ },
39
+ {
40
+ type: 'text',
41
+ name: 'url',
42
+ title: 'Url',
43
+ },
44
+ {
45
+ type: 'text',
46
+ name: 'urlTitle',
47
+ title: 'Url',
48
+ },
49
+ {
50
+ type: 'boolean',
51
+ name: 'resetMargin',
52
+ title: 'Reset Margin',
53
+ },
54
+ ],
55
+ },
56
+ ],
57
+ },
58
+ {
59
+ type: 'textarea',
60
+ name: 'description',
61
+ title: 'Description',
62
+ },
63
+ {
64
+ type: 'boolean',
65
+ name: 'dots',
66
+ title: 'With dots',
67
+ },
68
+ {
69
+ type: 'boolean',
70
+ name: 'arrows',
71
+ title: 'With Arrows',
72
+ },
73
+ {
74
+ type: 'boolean',
75
+ name: 'randomOrder',
76
+ title: 'Random Order',
77
+ },
78
+ {
79
+ type: 'number',
80
+ name: 'autoplay',
81
+ title: 'Autoplay',
82
+ },
83
+ {
84
+ type: 'object',
85
+ name: 'disclaimer',
86
+ title: 'Disclaimer',
87
+ properties: [
88
+ {
89
+ type: 'text',
90
+ name: 'text',
91
+ title: 'Text',
92
+ },
93
+ {
94
+ type: 'select',
95
+ name: 'size',
96
+ title: 'Size',
97
+ enum: textSizeEnum,
98
+ view: 'select',
99
+ mode: 'single',
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ type: 'oneOf',
105
+ name: 'slidesToShow',
106
+ title: 'Slides to Show',
107
+ options: [
108
+ {
109
+ title: 'Simple',
110
+ value: 'simple',
111
+ properties: [
112
+ {
113
+ type: 'number',
114
+ name: '',
115
+ title: 'Slides',
116
+ },
117
+ ],
118
+ },
119
+ {
120
+ title: 'Complex',
121
+ value: 'complex',
122
+ properties: sliderSizesArray.reduce((acc, size) => {
123
+ acc.push({ type: 'number', name: size, title: size });
124
+ return acc;
125
+ }, []),
126
+ },
127
+ ],
128
+ },
129
+ {
130
+ type: 'array',
131
+ name: 'array',
132
+ title: 'Array Properties',
133
+ buttonText: 'Add new',
134
+ arrayType: 'object',
135
+ properties: [
136
+ {
137
+ type: 'text',
138
+ name: 'text',
139
+ title: 'Property',
140
+ },
141
+ {
142
+ type: 'boolean',
143
+ name: 'boolean',
144
+ title: 'Property',
145
+ },
146
+ ],
147
+ },
148
+ ],
149
+ };
150
+ export const exampleConfig = {
151
+ name: 'Slider Block',
152
+ inputs: [
153
+ {
154
+ type: 'text',
155
+ name: 'title',
156
+ title: 'Text Property',
157
+ },
158
+ {
159
+ type: 'boolean',
160
+ name: '<ID>',
161
+ title: 'Boolean Property',
162
+ },
163
+ {
164
+ type: 'number',
165
+ name: '<ID>',
166
+ title: 'Number Property',
167
+ },
168
+ {
169
+ type: 'textarea',
170
+ name: '<ID>',
171
+ title: 'TextArea Property',
172
+ showIf: `block.description === 'Test'`,
173
+ },
174
+ {
175
+ type: 'select',
176
+ name: 'select',
177
+ title: 'Select Property',
178
+ enum: [
179
+ { content: 'Option 1', value: 'option-1' },
180
+ { content: 'Option 2', value: 'option-2' },
181
+ ],
182
+ mode: 'single',
183
+ view: 'select',
184
+ },
185
+ {
186
+ type: 'object',
187
+ name: 'object_data',
188
+ title: 'Object Property',
189
+ properties: [
190
+ {
191
+ type: 'text',
192
+ name: 'text',
193
+ title: 'Property',
194
+ },
195
+ {
196
+ type: 'boolean',
197
+ name: 'boolean',
198
+ title: 'Property',
199
+ },
200
+ ],
201
+ },
202
+ {
203
+ type: 'array',
204
+ name: 'array',
205
+ title: 'Array Properties',
206
+ buttonText: 'Add new',
207
+ arrayType: 'object',
208
+ properties: [
209
+ {
210
+ type: 'text',
211
+ name: 'text',
212
+ title: 'Property',
213
+ },
214
+ {
215
+ type: 'boolean',
216
+ name: 'boolean',
217
+ title: 'Property',
218
+ },
219
+ ],
220
+ },
221
+ ],
222
+ };
@@ -0,0 +1,8 @@
1
+ declare const SliderBlockConfig: {
2
+ component: (props: import("../..").WithChildren<import("./Slider").SliderProps>) => JSX.Element;
3
+ schema: {
4
+ name: string;
5
+ inputs: import("../../types/dynamic-form").ConfigInput[];
6
+ };
7
+ };
8
+ export default SliderBlockConfig;
@@ -0,0 +1,11 @@
1
+ import { generateFromAJV } from '../../utils/form-generator';
2
+ import SliderBlock from './Slider';
3
+ import { SliderBlock as SliderBlockSchema } from './schema';
4
+ const SliderBlockConfig = {
5
+ component: SliderBlock,
6
+ schema: {
7
+ name: 'Slider Block',
8
+ inputs: generateFromAJV(SliderBlockSchema['slider-block']),
9
+ },
10
+ };
11
+ export default SliderBlockConfig;
@@ -0,0 +1,8 @@
1
+ declare const TableBlockConfig: {
2
+ component: (props: import("../..").TableBlockProps) => JSX.Element;
3
+ schema: {
4
+ name: string;
5
+ inputs: import("../../types/dynamic-form").ConfigInput[];
6
+ };
7
+ };
8
+ export default TableBlockConfig;
@@ -0,0 +1,11 @@
1
+ import { generateFromAJV } from '../../utils/form-generator';
2
+ import TableBlock from './Table';
3
+ import { TableBlock as TableBlockSchema } from './schema';
4
+ const TableBlockConfig = {
5
+ component: TableBlock,
6
+ schema: {
7
+ name: 'Table Block',
8
+ inputs: generateFromAJV(TableBlockSchema['table-block']),
9
+ },
10
+ };
11
+ export default TableBlockConfig;
@@ -8,6 +8,7 @@ export declare const TableBlock: {
8
8
  contentType: string;
9
9
  };
10
10
  table: {
11
+ type: string;
11
12
  additionalProperties: boolean;
12
13
  required: string[];
13
14
  properties: {
@@ -7,6 +7,7 @@ export const TableBlock = {
7
7
  type: 'string',
8
8
  contentType: 'text',
9
9
  }, table: {
10
+ type: 'object',
10
11
  additionalProperties: false,
11
12
  required: ['content'],
12
13
  properties: Object.assign(Object.assign({}, BaseProps), { content: {
@@ -9,7 +9,7 @@ import Title from '../../components/Title/Title';
9
9
  import { getHeight } from '../../components/VideoBlock/VideoBlock';
10
10
  import YFMWrapper from '../../components/YFMWrapper/YFMWrapper';
11
11
  import { useTheme } from '../../context/theme';
12
- import { Col, GridColumnOrderClasses, Row } from '../../grid';
12
+ import { Col, Grid, GridColumnOrderClasses, Row } from '../../grid';
13
13
  import { block, getThemedValue } from '../../utils';
14
14
  import TabsTextContent from './TabsTextContent/TabsTextContent';
15
15
  import './Tabs.css';
@@ -72,13 +72,14 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
72
72
  React.createElement(FullscreenImage, Object.assign({}, imageProps, { imageClassName: b('image', { border }) })))),
73
73
  (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && (React.createElement("p", { className: b('caption'), id: captionId },
74
74
  React.createElement(YFMWrapper, { content: activeTabData.caption, modifiers: { constructor: true }, id: captionId })))));
75
- return (React.createElement(AnimateBlock, { className: b(), onScroll: () => setPlay(true), animate: animated },
76
- React.createElement(Title, { title: title, subtitle: description, className: b('title', { centered: centered }) }),
77
- React.createElement(Row, null,
78
- React.createElement(Col, { sizes: tabsColSizes },
79
- React.createElement(ButtonTabs, { items: tabs, onSelectTab: onSelectTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
80
- activeTabData && (React.createElement(Row, { className: b('row', { reverse: isReverse }) },
81
- mediaContent,
82
- textContent))));
75
+ return (React.createElement(Grid, null,
76
+ React.createElement(AnimateBlock, { className: b(), onScroll: () => setPlay(true), animate: animated },
77
+ React.createElement(Title, { title: title, subtitle: description, className: b('title', { centered: centered }) }),
78
+ React.createElement(Row, null,
79
+ React.createElement(Col, { sizes: tabsColSizes },
80
+ React.createElement(ButtonTabs, { items: tabs, onSelectTab: onSelectTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
81
+ activeTabData && (React.createElement(Row, { className: b('row', { reverse: isReverse }) },
82
+ mediaContent,
83
+ textContent)))));
83
84
  };
84
85
  export default TabsBlock;
@@ -0,0 +1,16 @@
1
+ declare const TabsBlockConfig: {
2
+ component: ({ items, title, description, animated, tabsColSizes, centered, direction, contentSize, }: import("../..").TabsBlockProps) => JSX.Element;
3
+ schema: {
4
+ name: string;
5
+ inputs: import("../../types/dynamic-form").ConfigInput[];
6
+ default: {
7
+ title: string;
8
+ items: {
9
+ tabName: string;
10
+ text: string;
11
+ title: string;
12
+ }[];
13
+ };
14
+ };
15
+ };
16
+ export default TabsBlockConfig;
@@ -0,0 +1,26 @@
1
+ import { generateFromAJV } from '../../utils/form-generator';
2
+ import TabsBlock from './Tabs';
3
+ import { TabsBlock as TabsBlockSchema } from './schema';
4
+ const TabsBlockConfig = {
5
+ component: TabsBlock,
6
+ schema: {
7
+ name: 'Tabs Block',
8
+ inputs: generateFromAJV(TabsBlockSchema['tabs-block']),
9
+ default: {
10
+ title: 'Tabs Block',
11
+ items: [
12
+ {
13
+ tabName: 'First Tab',
14
+ text: 'First Tab Content',
15
+ title: 'First Tab Title',
16
+ },
17
+ {
18
+ text: 'Second Tab Content',
19
+ title: 'Second Tab Title',
20
+ tabName: 'Second Tab',
21
+ },
22
+ ],
23
+ },
24
+ },
25
+ };
26
+ export default TabsBlockConfig;
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export interface TestEditorBlockProps extends PropsWithChildren {
3
+ }
4
+ export declare const TestEditorBlock: (props: TestEditorBlockProps) => JSX.Element;
5
+ export default TestEditorBlock;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { block } from '../../utils';
3
+ const b = block('test-editor-block');
4
+ export const TestEditorBlock = (props) => {
5
+ return React.createElement("div", { className: b() }, JSON.stringify(props, null, 2));
6
+ };
7
+ export default TestEditorBlock;
@@ -0,0 +1,3 @@
1
+ import { ArrayObjectInput, ArrayTextInput, BooleanInput, NumberInput, ObjectInput, OneOfInput, SelectMultipleInput, SelectSingleInput, TextAreaInput, TextInput } from '../../types/dynamic-form';
2
+ declare const _default: (TextInput | BooleanInput | NumberInput | TextAreaInput | SelectSingleInput | SelectMultipleInput | ObjectInput | ArrayTextInput | ArrayObjectInput | OneOfInput)[];
3
+ export default _default;
@@ -0,0 +1,78 @@
1
+ const textInput = {
2
+ type: 'text',
3
+ name: 'text',
4
+ title: 'Text Input',
5
+ };
6
+ const textAreaInput = {
7
+ type: 'textarea',
8
+ name: 'textarea',
9
+ title: 'TextArea Input',
10
+ };
11
+ const booleanInput = {
12
+ type: 'boolean',
13
+ name: 'boolean',
14
+ title: 'Boolean Input',
15
+ };
16
+ const numberInput = {
17
+ type: 'number',
18
+ name: 'number',
19
+ title: 'Number Input',
20
+ };
21
+ const selectInput = {
22
+ type: 'select',
23
+ name: 'selectSingle',
24
+ title: 'Select Single Input',
25
+ mode: 'single',
26
+ view: 'select',
27
+ enum: [
28
+ { value: 'id_1', content: 'Option 1' },
29
+ { value: 'id_2', content: 'Option 2' },
30
+ ],
31
+ };
32
+ const radioButtonsViewSingleInput = Object.assign(Object.assign({}, selectInput), { name: 'radioButtons', title: 'Radio Button Input', view: 'radiobutton' });
33
+ // @ts-ignore
34
+ const selectMultipleModeInput = Object.assign(Object.assign({}, selectInput), { name: 'selectMultiple', title: 'Select Multiple Input', mode: 'multiple' });
35
+ const objectInput = {
36
+ type: 'object',
37
+ name: 'object',
38
+ title: 'Object Input',
39
+ properties: [textInput, textAreaInput, selectInput],
40
+ };
41
+ const arrayTextInput = {
42
+ type: 'array',
43
+ name: 'arrayText',
44
+ title: 'Array Text Input',
45
+ buttonText: 'Add Array Item',
46
+ arrayType: 'text',
47
+ };
48
+ const arrayObjectInput = {
49
+ type: 'array',
50
+ name: 'arrayObject',
51
+ title: 'Array Object Input',
52
+ buttonText: 'Add Array Item',
53
+ arrayType: 'object',
54
+ properties: [textInput, textAreaInput, selectInput],
55
+ };
56
+ const oneOfInput = {
57
+ type: 'oneOf',
58
+ name: 'oneOf',
59
+ key: 'oneOfKey',
60
+ title: 'Array Text Input',
61
+ options: [
62
+ { value: 'text', title: 'Text', properties: [textInput] },
63
+ { value: 'textarea', title: 'TextArea', properties: [textAreaInput] },
64
+ ],
65
+ };
66
+ export default [
67
+ textInput,
68
+ textAreaInput,
69
+ booleanInput,
70
+ numberInput,
71
+ selectInput,
72
+ radioButtonsViewSingleInput,
73
+ selectMultipleModeInput,
74
+ objectInput,
75
+ arrayTextInput,
76
+ arrayObjectInput,
77
+ oneOfInput,
78
+ ];
@@ -0,0 +1,11 @@
1
+ declare const TestEditorBlockConfig: {
2
+ component: (props: import("./TestEditorBlock").TestEditorBlockProps) => JSX.Element;
3
+ schema: {
4
+ name: string;
5
+ inputs: (import("../../types/dynamic-form").TextInput | import("../../types/dynamic-form").BooleanInput | import("../../types/dynamic-form").NumberInput | import("../../types/dynamic-form").TextAreaInput | import("../../types/dynamic-form").SelectSingleInput | import("../../types/dynamic-form").SelectMultipleInput | import("../../types/dynamic-form").ObjectInput | import("../../types/dynamic-form").ArrayTextInput | import("../../types/dynamic-form").ArrayObjectInput | import("../../types/dynamic-form").OneOfInput)[];
6
+ };
7
+ };
8
+ export declare const TestEditorBlockSchema: {
9
+ "test-editor-block": {};
10
+ };
11
+ export default TestEditorBlockConfig;
@@ -0,0 +1,13 @@
1
+ import TestEditorBlock from './TestEditorBlock';
2
+ import testEditorBlockInputs from './form';
3
+ const TestEditorBlockConfig = {
4
+ component: TestEditorBlock,
5
+ schema: {
6
+ name: 'Test Editor Block',
7
+ inputs: testEditorBlockInputs,
8
+ },
9
+ };
10
+ export const TestEditorBlockSchema = {
11
+ ['test-editor-block']: {},
12
+ };
13
+ export default TestEditorBlockConfig;
@@ -4,30 +4,25 @@ unpredictable css rules order in build */
4
4
  --anchor-offset: 48px;
5
5
  }
6
6
  .pc-block-base.pc-block-base {
7
- margin-top: 48px;
8
- padding: 0 0 48px;
7
+ padding: 48px 0;
9
8
  }
10
- .pc-block-base.pc-block-base:first-child {
11
- margin-top: var(--pc-first-block-indent, 96px);
12
- }
13
-
14
9
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_0 {
15
- margin-top: 0;
10
+ padding-top: 0;
16
11
  }
17
12
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xs {
18
- margin-top: 16px;
13
+ padding-top: 16px;
19
14
  }
20
15
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_s {
21
- margin-top: 24px;
16
+ padding-top: 24px;
22
17
  }
23
18
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_m {
24
- margin-top: 32px;
19
+ padding-top: 32px;
25
20
  }
26
21
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_l {
27
- margin-top: 48px;
22
+ padding-top: 48px;
28
23
  }
29
24
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xl {
30
- margin-top: 64px;
25
+ padding-top: 64px;
31
26
  }
32
27
  .pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_0 {
33
28
  padding-bottom: 0;
@@ -50,12 +45,9 @@ unpredictable css rules order in build */
50
45
 
51
46
  @media only screen and (max-width: 577px) {
52
47
  .pc-block-base.pc-block-base {
53
- margin-top: 32px;
48
+ padding-top: 32px;
54
49
  padding-bottom: 32px;
55
50
  }
56
- .pc-block-base.pc-block-base:first-child {
57
- margin-top: var(--pc-first-block-mobile-indent, 64px);
58
- }
59
51
  }
60
52
 
61
53
  .pc-block-base_reset-paddings.pc-block-base.pc-block-base_reset-paddings.pc-block-base {
@@ -0,0 +1,2 @@
1
+ import { ConfigInput } from '../../types/dynamic-form';
2
+ export declare const imageInputs: ConfigInput[];
@@ -0,0 +1,80 @@
1
+ import _ from 'lodash';
2
+ const devices = ['desktop', 'tablet', 'mobile'];
3
+ const imageBaseInputs = [
4
+ {
5
+ type: 'text',
6
+ name: 'alt',
7
+ title: 'Alternative',
8
+ },
9
+ {
10
+ type: 'boolean',
11
+ name: 'disableCompress',
12
+ title: 'Disable Compress',
13
+ },
14
+ ];
15
+ const imageStyleInputs = [
16
+ {
17
+ type: 'text',
18
+ name: 'style.backgroundColor',
19
+ title: 'Background Color',
20
+ },
21
+ {
22
+ type: 'text',
23
+ name: 'style.height',
24
+ title: 'Height',
25
+ },
26
+ {
27
+ type: 'text',
28
+ name: 'style.width',
29
+ title: 'Width',
30
+ },
31
+ {
32
+ type: 'text',
33
+ name: 'style.color',
34
+ title: 'Color',
35
+ },
36
+ ];
37
+ const devicesInputs = devices.map((device) => ({
38
+ type: 'text',
39
+ title: _.capitalize(device),
40
+ name: `${device}`,
41
+ }));
42
+ export const imageInputs = [
43
+ {
44
+ type: 'oneOf',
45
+ name: '',
46
+ key: 'imageType',
47
+ title: 'Image Type',
48
+ options: [
49
+ {
50
+ title: 'Simple',
51
+ value: 'simple',
52
+ properties: [
53
+ {
54
+ type: 'text',
55
+ name: '',
56
+ title: 'Image URL',
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ title: 'Complex',
62
+ value: 'complex',
63
+ properties: [
64
+ {
65
+ type: 'text',
66
+ name: 'src',
67
+ title: 'Source',
68
+ },
69
+ ...imageStyleInputs,
70
+ ...imageBaseInputs,
71
+ ],
72
+ },
73
+ {
74
+ title: 'Device Based',
75
+ value: 'deviseBased',
76
+ properties: [...devicesInputs, ...imageBaseInputs],
77
+ },
78
+ ],
79
+ },
80
+ ];
@@ -0,0 +1,5 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-children-wrap {
4
+ min-height: 50px;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+ import './ChildrenWrap.css';
3
+ export interface ChildrenWrapProps extends PropsWithChildren {
4
+ checkChildren?: ReactNode;
5
+ }
6
+ declare const ChildrenWrap: (props: ChildrenWrapProps) => JSX.Element;
7
+ export default ChildrenWrap;
@@ -0,0 +1,13 @@
1
+ import React, { useContext } from 'react';
2
+ import useEditorBlockMouseEvents from '../../../containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents';
3
+ import { BlockIdContext } from '../../../context/blockIdContext';
4
+ import { block } from '../../../utils';
5
+ import './ChildrenWrap.css';
6
+ const b = block('children-wrap');
7
+ const ChildrenWrap = (props) => {
8
+ const { children } = props;
9
+ const parentBlockId = useContext(BlockIdContext);
10
+ const { onMouseUp, onMouseMove } = useEditorBlockMouseEvents([parentBlockId, 0]);
11
+ return (React.createElement("div", { className: b(), onMouseMove: onMouseMove, onMouseUp: onMouseUp }, children));
12
+ };
13
+ export default ChildrenWrap;
@@ -0,0 +1,9 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .pc-item-wrap {
4
+ height: 100%;
5
+ }
6
+
7
+ .pc-page-constructor_with-editor .pc-item-wrap {
8
+ cursor: pointer;
9
+ }