@gravity-ui/page-constructor 6.3.2-alpha.2 → 6.3.2-alpha.3

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 (254) hide show
  1. package/build/cjs/blocks/CardLayout/index.d.ts +1 -1
  2. package/build/cjs/blocks/CardLayout/index.js.map +1 -1
  3. package/build/cjs/blocks/Header/dynamic-form.d.ts +1 -1
  4. package/build/cjs/blocks/Header/dynamic-form.js.map +1 -1
  5. package/build/cjs/blocks/Slider/dynamic-form.d.ts +1 -1
  6. package/build/cjs/blocks/Slider/dynamic-form.js.map +1 -1
  7. package/build/cjs/blocks/TestEditorBlock/form.d.ts +1 -1
  8. package/build/cjs/blocks/TestEditorBlock/form.js.map +1 -1
  9. package/build/cjs/common/postMessage.d.ts +4 -0
  10. package/build/cjs/common/postMessage.js +31 -0
  11. package/build/cjs/common/postMessage.js.map +1 -0
  12. package/build/cjs/common/store.d.ts +40 -0
  13. package/build/cjs/common/store.js +20 -0
  14. package/build/cjs/common/store.js.map +1 -0
  15. package/build/cjs/common/types/actions.d.ts +36 -0
  16. package/build/cjs/common/types/actions.js +3 -0
  17. package/build/cjs/common/types/actions.js.map +1 -0
  18. package/build/cjs/common/types/common.d.ts +5 -0
  19. package/build/cjs/common/types/common.js +3 -0
  20. package/build/cjs/common/types/common.js.map +1 -0
  21. package/build/cjs/common/types/forms.d.ts +97 -0
  22. package/build/cjs/common/types/forms.js +3 -0
  23. package/build/cjs/common/types/forms.js.map +1 -0
  24. package/build/cjs/common/types/index.d.ts +4 -0
  25. package/build/cjs/common/types/index.js +8 -0
  26. package/build/cjs/common/types/index.js.map +1 -0
  27. package/build/cjs/common/types/messages.d.ts +9 -0
  28. package/build/cjs/common/types/messages.js +3 -0
  29. package/build/cjs/common/types/messages.js.map +1 -0
  30. package/build/cjs/common/utils.d.ts +25 -0
  31. package/build/cjs/common/utils.js +22 -0
  32. package/build/cjs/common/utils.js.map +1 -0
  33. package/build/cjs/components/Image/dynamic-form.d.ts +1 -1
  34. package/build/cjs/components/Image/dynamic-form.js.map +1 -1
  35. package/build/cjs/constructor-items.d.ts +1 -1
  36. package/build/cjs/constructor-items.js.map +1 -1
  37. package/build/cjs/context/editorStoreContext/PCEditorStoreContext.d.ts +1 -1
  38. package/build/cjs/context/editorStoreContext/PCEditorStoreContext.js +1 -1
  39. package/build/cjs/context/editorStoreContext/PCEditorStoreContext.js.map +1 -1
  40. package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js +1 -1
  41. package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -1
  42. package/build/cjs/editor-v2/components/DynamicForm/DynamicForm.d.ts +1 -1
  43. package/build/cjs/editor-v2/components/DynamicForm/DynamicForm.js.map +1 -1
  44. package/build/cjs/editor-v2/components/DynamicForm/FieldBase/FieldBase.css +0 -13
  45. package/build/cjs/editor-v2/components/DynamicForm/Fields/Array/Array.d.ts +1 -1
  46. package/build/cjs/editor-v2/components/DynamicForm/Fields/Array/Array.js.map +1 -1
  47. package/build/cjs/editor-v2/components/DynamicForm/Fields/Object/Object.d.ts +1 -1
  48. package/build/cjs/editor-v2/components/DynamicForm/Fields/Object/Object.js.map +1 -1
  49. package/build/cjs/editor-v2/components/DynamicForm/Fields/OneOf/OneOf.d.ts +1 -1
  50. package/build/cjs/editor-v2/components/DynamicForm/Fields/OneOf/OneOf.js.map +1 -1
  51. package/build/cjs/editor-v2/components/DynamicForm/Fields/Select/Select.d.ts +1 -1
  52. package/build/cjs/editor-v2/components/DynamicForm/Fields/Select/Select.js.map +1 -1
  53. package/build/cjs/editor-v2/components/DynamicForm/utils.d.ts +1 -1
  54. package/build/cjs/editor-v2/components/DynamicForm/utils.js.map +1 -1
  55. package/build/cjs/editor-v2/components/Panels/Panels.css +0 -13
  56. package/build/cjs/editor-v2/components/Sidebar/Sidebar.css +3 -13
  57. package/build/cjs/editor-v2/components/Tabs/Tabs.css +7 -2
  58. package/build/cjs/editor-v2/containers/BigOverlay/BigOverlay.css +0 -13
  59. package/build/cjs/editor-v2/containers/BigOverlay/BigOverlay.js +1 -1
  60. package/build/cjs/editor-v2/containers/BigOverlay/BigOverlay.js.map +1 -1
  61. package/build/cjs/editor-v2/containers/BlockConfigForm/BlockConfigForm.css +20 -0
  62. package/build/cjs/editor-v2/containers/BlockConfigForm/BlockConfigForm.d.ts +5 -0
  63. package/build/cjs/editor-v2/containers/{BlockConfig/BlockConfig.js → BlockConfigForm/BlockConfigForm.js} +4 -4
  64. package/build/cjs/editor-v2/containers/BlockConfigForm/BlockConfigForm.js.map +1 -0
  65. package/build/cjs/editor-v2/containers/BlocksList/BlocksList.css +3 -16
  66. package/build/cjs/editor-v2/containers/BlocksList/BlocksList.js.map +1 -1
  67. package/build/cjs/editor-v2/containers/Editor/Editor.css +0 -13
  68. package/build/cjs/editor-v2/containers/Editor/Editor.js +3 -2
  69. package/build/cjs/editor-v2/containers/Editor/Editor.js.map +1 -1
  70. package/build/cjs/editor-v2/containers/GlobalConfig/GlobalConfig.css +2 -17
  71. package/build/cjs/editor-v2/containers/GlobalConfig/GlobalConfig.js.map +1 -1
  72. package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.css +1 -14
  73. package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.js +1 -1
  74. package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.js.map +1 -1
  75. package/build/cjs/editor-v2/containers/Overlay/Overlay.css +21 -17
  76. package/build/cjs/editor-v2/containers/Overlay/Overlay.js +2 -2
  77. package/build/cjs/editor-v2/containers/Overlay/Overlay.js.map +1 -1
  78. package/build/cjs/editor-v2/containers/Source/Source.css +0 -13
  79. package/build/cjs/editor-v2/containers/SourceCode/SourceCode.css +1 -14
  80. package/build/cjs/editor-v2/containers/Tree/DragContext.css +2 -15
  81. package/build/cjs/editor-v2/containers/Tree/Tree.css +0 -13
  82. package/build/cjs/editor-v2/containers/Tree/TreeContent.css +0 -16
  83. package/build/cjs/editor-v2/containers/Tree/TreeItem.css +1 -17
  84. package/build/cjs/editor-v2/containers/ViewSwitches/ViewSwitches.css +3 -13
  85. package/build/cjs/editor-v2/containers/ViewSwitches/ViewSwitches.js +1 -1
  86. package/build/cjs/editor-v2/containers/ViewSwitches/ViewSwitches.js.map +1 -1
  87. package/build/cjs/editor-v2/containers/index.d.ts +7 -0
  88. package/build/cjs/editor-v2/containers/index.js +19 -0
  89. package/build/cjs/editor-v2/containers/index.js.map +1 -0
  90. package/build/cjs/editor-v2/context/editorStore/MainEditorStoreProvider.js +1 -1
  91. package/build/cjs/editor-v2/context/editorStore/MainEditorStoreProvider.js.map +1 -1
  92. package/build/cjs/editor-v2/hooks/index.d.ts +2 -0
  93. package/build/cjs/editor-v2/hooks/index.js +8 -0
  94. package/build/cjs/editor-v2/hooks/index.js.map +1 -0
  95. package/build/cjs/editor-v2/hooks/useEditorTabs.js +2 -2
  96. package/build/cjs/editor-v2/hooks/useEditorTabs.js.map +1 -1
  97. package/build/cjs/editor-v2/hooks/useMainEditorInitialize.js +1 -1
  98. package/build/cjs/editor-v2/hooks/useMainEditorInitialize.js.map +1 -1
  99. package/build/cjs/editor-v2/hooks/usePostMessageEvents.d.ts +1 -1
  100. package/build/cjs/editor-v2/hooks/usePostMessageEvents.js +1 -1
  101. package/build/cjs/editor-v2/hooks/usePostMessageEvents.js.map +1 -1
  102. package/build/cjs/editor-v2/index.d.ts +5 -2
  103. package/build/cjs/editor-v2/index.js +5 -4
  104. package/build/cjs/editor-v2/index.js.map +1 -1
  105. package/build/cjs/editor-v2/store.d.ts +2 -2
  106. package/build/cjs/editor-v2/store.js +2 -2
  107. package/build/cjs/editor-v2/store.js.map +1 -1
  108. package/build/cjs/editor-v2/styles/root.css +3 -6
  109. package/build/cjs/editor-v2/utils/index.d.ts +2 -0
  110. package/build/cjs/editor-v2/utils/index.js +2 -0
  111. package/build/cjs/editor-v2/utils/index.js.map +1 -1
  112. package/build/cjs/hooks/usePCEditorInitializeEvents.js.map +1 -1
  113. package/build/cjs/hooks/usePCEditorStore.d.ts +1 -1
  114. package/build/cjs/hooks/usePostMessageAPI.d.ts +1 -1
  115. package/build/cjs/hooks/usePostMessageAPI.js.map +1 -1
  116. package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.d.ts +1 -1
  117. package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js.map +1 -1
  118. package/build/cjs/utils/form-generator.d.ts +1 -1
  119. package/build/cjs/utils/form-generator.js.map +1 -1
  120. package/build/esm/blocks/CardLayout/index.d.ts +1 -1
  121. package/build/esm/blocks/CardLayout/index.js.map +1 -1
  122. package/build/esm/blocks/Header/dynamic-form.d.ts +1 -1
  123. package/build/esm/blocks/Header/dynamic-form.js.map +1 -1
  124. package/build/esm/blocks/Slider/dynamic-form.d.ts +1 -1
  125. package/build/esm/blocks/Slider/dynamic-form.js.map +1 -1
  126. package/build/esm/blocks/TestEditorBlock/form.d.ts +1 -1
  127. package/build/esm/blocks/TestEditorBlock/form.js.map +1 -1
  128. package/build/esm/common/postMessage.d.ts +4 -0
  129. package/build/esm/common/postMessage.js +25 -0
  130. package/build/esm/common/postMessage.js.map +1 -0
  131. package/build/esm/common/store.d.ts +40 -0
  132. package/build/esm/common/store.js +17 -0
  133. package/build/esm/common/store.js.map +1 -0
  134. package/build/esm/common/types/actions.d.ts +36 -0
  135. package/build/esm/common/types/actions.js +2 -0
  136. package/build/esm/common/types/actions.js.map +1 -0
  137. package/build/esm/common/types/common.d.ts +5 -0
  138. package/build/esm/common/types/common.js +2 -0
  139. package/build/esm/common/types/common.js.map +1 -0
  140. package/build/esm/common/types/forms.d.ts +97 -0
  141. package/build/esm/common/types/forms.js +2 -0
  142. package/build/esm/common/types/forms.js.map +1 -0
  143. package/build/esm/common/types/index.d.ts +4 -0
  144. package/build/esm/common/types/index.js +5 -0
  145. package/build/esm/common/types/index.js.map +1 -0
  146. package/build/esm/common/types/messages.d.ts +9 -0
  147. package/build/esm/common/types/messages.js +2 -0
  148. package/build/esm/common/types/messages.js.map +1 -0
  149. package/build/esm/common/utils.d.ts +25 -0
  150. package/build/esm/common/utils.js +17 -0
  151. package/build/esm/common/utils.js.map +1 -0
  152. package/build/esm/components/Image/dynamic-form.d.ts +1 -1
  153. package/build/esm/components/Image/dynamic-form.js.map +1 -1
  154. package/build/esm/constructor-items.d.ts +1 -1
  155. package/build/esm/constructor-items.js.map +1 -1
  156. package/build/esm/context/editorStoreContext/PCEditorStoreContext.d.ts +1 -1
  157. package/build/esm/context/editorStoreContext/PCEditorStoreContext.js +1 -1
  158. package/build/esm/context/editorStoreContext/PCEditorStoreContext.js.map +1 -1
  159. package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js +1 -1
  160. package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -1
  161. package/build/esm/editor-v2/components/DynamicForm/DynamicForm.d.ts +1 -1
  162. package/build/esm/editor-v2/components/DynamicForm/DynamicForm.js.map +1 -1
  163. package/build/esm/editor-v2/components/DynamicForm/FieldBase/FieldBase.css +0 -13
  164. package/build/esm/editor-v2/components/DynamicForm/Fields/Array/Array.d.ts +1 -1
  165. package/build/esm/editor-v2/components/DynamicForm/Fields/Array/Array.js.map +1 -1
  166. package/build/esm/editor-v2/components/DynamicForm/Fields/Object/Object.d.ts +1 -1
  167. package/build/esm/editor-v2/components/DynamicForm/Fields/Object/Object.js.map +1 -1
  168. package/build/esm/editor-v2/components/DynamicForm/Fields/OneOf/OneOf.d.ts +1 -1
  169. package/build/esm/editor-v2/components/DynamicForm/Fields/OneOf/OneOf.js.map +1 -1
  170. package/build/esm/editor-v2/components/DynamicForm/Fields/Select/Select.d.ts +1 -1
  171. package/build/esm/editor-v2/components/DynamicForm/Fields/Select/Select.js.map +1 -1
  172. package/build/esm/editor-v2/components/DynamicForm/utils.d.ts +1 -1
  173. package/build/esm/editor-v2/components/DynamicForm/utils.js.map +1 -1
  174. package/build/esm/editor-v2/components/Panels/Panels.css +0 -13
  175. package/build/esm/editor-v2/components/Sidebar/Sidebar.css +3 -13
  176. package/build/esm/editor-v2/components/Tabs/Tabs.css +7 -2
  177. package/build/esm/editor-v2/containers/BigOverlay/BigOverlay.css +0 -13
  178. package/build/esm/editor-v2/containers/BigOverlay/BigOverlay.js +1 -1
  179. package/build/esm/editor-v2/containers/BigOverlay/BigOverlay.js.map +1 -1
  180. package/build/esm/editor-v2/containers/BlockConfigForm/BlockConfigForm.css +20 -0
  181. package/build/esm/editor-v2/containers/BlockConfigForm/BlockConfigForm.d.ts +6 -0
  182. package/build/esm/editor-v2/containers/{BlockConfig/BlockConfig.js → BlockConfigForm/BlockConfigForm.js} +5 -5
  183. package/build/esm/editor-v2/containers/BlockConfigForm/BlockConfigForm.js.map +1 -0
  184. package/build/esm/editor-v2/containers/BlocksList/BlocksList.css +3 -16
  185. package/build/esm/editor-v2/containers/BlocksList/BlocksList.js.map +1 -1
  186. package/build/esm/editor-v2/containers/Editor/Editor.css +0 -13
  187. package/build/esm/editor-v2/containers/Editor/Editor.js +3 -2
  188. package/build/esm/editor-v2/containers/Editor/Editor.js.map +1 -1
  189. package/build/esm/editor-v2/containers/GlobalConfig/GlobalConfig.css +2 -17
  190. package/build/esm/editor-v2/containers/GlobalConfig/GlobalConfig.js.map +1 -1
  191. package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.css +1 -14
  192. package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.js +1 -1
  193. package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.js.map +1 -1
  194. package/build/esm/editor-v2/containers/Overlay/Overlay.css +21 -17
  195. package/build/esm/editor-v2/containers/Overlay/Overlay.js +2 -2
  196. package/build/esm/editor-v2/containers/Overlay/Overlay.js.map +1 -1
  197. package/build/esm/editor-v2/containers/Source/Source.css +0 -13
  198. package/build/esm/editor-v2/containers/SourceCode/SourceCode.css +1 -14
  199. package/build/esm/editor-v2/containers/Tree/DragContext.css +2 -15
  200. package/build/esm/editor-v2/containers/Tree/Tree.css +0 -13
  201. package/build/esm/editor-v2/containers/Tree/TreeContent.css +0 -16
  202. package/build/esm/editor-v2/containers/Tree/TreeItem.css +1 -17
  203. package/build/esm/editor-v2/containers/ViewSwitches/ViewSwitches.css +3 -13
  204. package/build/esm/editor-v2/containers/ViewSwitches/ViewSwitches.js +1 -1
  205. package/build/esm/editor-v2/containers/ViewSwitches/ViewSwitches.js.map +1 -1
  206. package/build/esm/editor-v2/containers/index.d.ts +7 -0
  207. package/build/esm/editor-v2/containers/index.js +8 -0
  208. package/build/esm/editor-v2/containers/index.js.map +1 -0
  209. package/build/esm/editor-v2/context/editorStore/MainEditorStoreProvider.js +1 -1
  210. package/build/esm/editor-v2/context/editorStore/MainEditorStoreProvider.js.map +1 -1
  211. package/build/esm/editor-v2/hooks/index.d.ts +2 -0
  212. package/build/esm/editor-v2/hooks/index.js +3 -0
  213. package/build/esm/editor-v2/hooks/index.js.map +1 -0
  214. package/build/esm/editor-v2/hooks/useEditorTabs.js +2 -2
  215. package/build/esm/editor-v2/hooks/useEditorTabs.js.map +1 -1
  216. package/build/esm/editor-v2/hooks/useMainEditorInitialize.js +1 -1
  217. package/build/esm/editor-v2/hooks/useMainEditorInitialize.js.map +1 -1
  218. package/build/esm/editor-v2/hooks/usePostMessageEvents.d.ts +1 -1
  219. package/build/esm/editor-v2/hooks/usePostMessageEvents.js +1 -1
  220. package/build/esm/editor-v2/hooks/usePostMessageEvents.js.map +1 -1
  221. package/build/esm/editor-v2/index.d.ts +5 -2
  222. package/build/esm/editor-v2/index.js +5 -2
  223. package/build/esm/editor-v2/index.js.map +1 -1
  224. package/build/esm/editor-v2/store.d.ts +2 -2
  225. package/build/esm/editor-v2/store.js +2 -2
  226. package/build/esm/editor-v2/store.js.map +1 -1
  227. package/build/esm/editor-v2/styles/root.css +3 -6
  228. package/build/esm/editor-v2/utils/index.d.ts +2 -0
  229. package/build/esm/editor-v2/utils/index.js +2 -0
  230. package/build/esm/editor-v2/utils/index.js.map +1 -1
  231. package/build/esm/hooks/usePCEditorInitializeEvents.js.map +1 -1
  232. package/build/esm/hooks/usePCEditorStore.d.ts +1 -1
  233. package/build/esm/hooks/usePostMessageAPI.d.ts +1 -1
  234. package/build/esm/hooks/usePostMessageAPI.js.map +1 -1
  235. package/build/esm/sub-blocks/BackgroundCard/dynamic-form.d.ts +1 -1
  236. package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js.map +1 -1
  237. package/build/esm/utils/form-generator.d.ts +1 -1
  238. package/build/esm/utils/form-generator.js.map +1 -1
  239. package/package.json +1 -2
  240. package/widget/index.js +1 -1
  241. package/build/cjs/editor-v2/components/StoreViewer/StoreViewer.css +0 -29
  242. package/build/cjs/editor-v2/components/StoreViewer/StoreViewer.d.ts +0 -6
  243. package/build/cjs/editor-v2/components/StoreViewer/StoreViewer.js +0 -17
  244. package/build/cjs/editor-v2/components/StoreViewer/StoreViewer.js.map +0 -1
  245. package/build/cjs/editor-v2/containers/BlockConfig/BlockConfig.css +0 -33
  246. package/build/cjs/editor-v2/containers/BlockConfig/BlockConfig.d.ts +0 -5
  247. package/build/cjs/editor-v2/containers/BlockConfig/BlockConfig.js.map +0 -1
  248. package/build/esm/editor-v2/components/StoreViewer/StoreViewer.css +0 -29
  249. package/build/esm/editor-v2/components/StoreViewer/StoreViewer.d.ts +0 -7
  250. package/build/esm/editor-v2/components/StoreViewer/StoreViewer.js +0 -15
  251. package/build/esm/editor-v2/components/StoreViewer/StoreViewer.js.map +0 -1
  252. package/build/esm/editor-v2/containers/BlockConfig/BlockConfig.css +0 -33
  253. package/build/esm/editor-v2/containers/BlockConfig/BlockConfig.d.ts +0 -6
  254. package/build/esm/editor-v2/containers/BlockConfig/BlockConfig.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ConfigInput } from "../../../common/types/index.js";
1
+ import { ConfigInput } from "../../common/types/index.js";
2
2
  import { BlockData } from "../../constructor-items.js";
3
3
  export declare const blockConfig: ConfigInput[];
4
4
  declare const CardLayoutBlockConfig: BlockData;
@@ -1 +1 @@
1
- {"version":3,"file":"index.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CAAC;oBACpD,OAAO,GAAG,CAAC;gBACf,CAAC,EAAE,EAAwB,CAAC;aAC/B;SACJ;KACJ;IACD;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,UAAU;aACpB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,UAAU;aACpB;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,qBAAqB,GAAc;IACrC,SAAS,EAAE,oBAAU;IACrB,MAAM,EAAE;QACJ,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,IAAA,gCAAe,EAAC,wBAAgD,CAAC;QACzE,OAAO,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;aACJ;YACD,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACP,6HAA6H;SACpI;QACD,UAAU,EAAE,4EAA4E;KAC3F;CACJ,CAAC;AAEF,kBAAe,qBAAqB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {ConfigInput} from '../../../common/types';\nimport {BlockData} from '../../constructor-items';\nimport {sliderSizesArray, textSize} from '../../schema/validators/common';\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport CardLayout from './CardLayout';\nimport {CardLayoutProps} from './schema';\n\nconst textSizeEnum = textSize.map((size) => ({value: size, content: size}));\n\nexport const blockConfig: ConfigInput[] = [\n {\n type: 'oneOf',\n name: 'title',\n title: 'Title Object',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'text',\n name: '',\n title: 'Title',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Title',\n },\n {\n type: 'select',\n name: 'textSize',\n title: 'Text Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n {\n type: 'text',\n name: 'url',\n title: 'Url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'Url',\n },\n {\n type: 'boolean',\n name: 'resetMargin',\n title: 'Reset Margin',\n },\n ],\n },\n ],\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n {\n type: 'boolean',\n name: 'dots',\n title: 'With dots',\n },\n {\n type: 'boolean',\n name: 'arrows',\n title: 'With Arrows',\n },\n {\n type: 'boolean',\n name: 'randomOrder',\n title: 'Random Order',\n },\n {\n type: 'number',\n name: 'autoplay',\n title: 'Autoplay',\n },\n {\n type: 'object',\n name: 'disclaimer',\n title: 'Disclaimer',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Text',\n },\n {\n type: 'select',\n name: 'size',\n title: 'Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'slidesToShow',\n title: 'Slides to Show',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'number',\n name: '',\n title: 'Slides',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: sliderSizesArray.reduce((acc, size) => {\n acc.push({type: 'number', name: size, title: size});\n return acc;\n }, [] as Array<ConfigInput>),\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n];\n\nconst CardLayoutBlockConfig: BlockData = {\n component: CardLayout,\n schema: {\n name: 'Card Layout Block',\n group: 'card-containers',\n inputs: generateFromAJV(CardLayoutProps as unknown as JSONSchemaType<{}>),\n default: {\n type: 'card-layout-block',\n children: [\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n ],\n title: 'Card Layout Block',\n description:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n },\n previewImg: 'https://storage.cloud-preprod.yandex.net/qradle-test/card-layout-block.svg',\n },\n};\n\nexport default CardLayoutBlockConfig;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/index.ts"],"names":[],"mappings":";;;;AAIA,8DAA0E;AAC1E,kEAA2D;AAE3D,yEAAsC;AACtC,wCAAyC;AAEzC,MAAM,YAAY,GAAG,iBAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AAE/D,QAAA,WAAW,GAAkB;IACtC;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,KAAK,EAA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K,EAAE,UAAU;aACpB;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,qBAAqB,GAAc;IACrC,SAAS,EAAE,oBAAU;IACrB,MAAM,EAAE;QACJ,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,IAAA,gCAAe,EAAC,wBAAgD,CAAC;QACzE,OAAO,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;aACJ;YACD,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACP,6HAA6H;SACpI;QACD,UAAU,EAAE,4EAA4E;KAC3F;CACJ,CAAC;AAEF,kBAAe,qBAAqB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {ConfigInput} from '../../common/types';\nimport {BlockData} from '../../constructor-items';\nimport {sliderSizesArray, textSize} from '../../schema/validators/common';\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport CardLayout from './CardLayout';\nimport {CardLayoutProps} from './schema';\n\nconst textSizeEnum = textSize.map((size) => ({value: size, content: size}));\n\nexport const blockConfig: ConfigInput[] = [\n {\n type: 'oneOf',\n name: 'title',\n title: 'Title Object',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'text',\n name: '',\n title: 'Title',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Title',\n },\n {\n type: 'select',\n name: 'textSize',\n title: 'Text Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n {\n type: 'text',\n name: 'url',\n title: 'Url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'Url',\n },\n {\n type: 'boolean',\n name: 'resetMargin',\n title: 'Reset Margin',\n },\n ],\n },\n ],\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n {\n type: 'boolean',\n name: 'dots',\n title: 'With dots',\n },\n {\n type: 'boolean',\n name: 'arrows',\n title: 'With Arrows',\n },\n {\n type: 'boolean',\n name: 'randomOrder',\n title: 'Random Order',\n },\n {\n type: 'number',\n name: 'autoplay',\n title: 'Autoplay',\n },\n {\n type: 'object',\n name: 'disclaimer',\n title: 'Disclaimer',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Text',\n },\n {\n type: 'select',\n name: 'size',\n title: 'Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'slidesToShow',\n title: 'Slides to Show',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'number',\n name: '',\n title: 'Slides',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: sliderSizesArray.reduce((acc, size) => {\n acc.push({type: 'number', name: size, title: size});\n return acc;\n }, [] as Array<ConfigInput>),\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n];\n\nconst CardLayoutBlockConfig: BlockData = {\n component: CardLayout,\n schema: {\n name: 'Card Layout Block',\n group: 'card-containers',\n inputs: generateFromAJV(CardLayoutProps as unknown as JSONSchemaType<{}>),\n default: {\n type: 'card-layout-block',\n children: [\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n ],\n title: 'Card Layout Block',\n description:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n },\n previewImg: 'https://storage.cloud-preprod.yandex.net/qradle-test/card-layout-block.svg',\n },\n};\n\nexport default CardLayoutBlockConfig;\n"]}
@@ -1,2 +1,2 @@
1
- import { BlockConfig } from "../../../common/types/index.js";
1
+ import { BlockConfig } from "../../common/types/index.js";
2
2
  export declare const blockConfig: BlockConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-form.js","sourceRoot":"../../../../src","sources":["blocks/Header/dynamic-form.ts"],"names":[],"mappings":";;;AACA,yEAAgE;AAChE,kDAAmC;AAEnC,MAAM,WAAW,GAAkB;IAC/B;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE;YACL;gBACI,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,YAAY;gBACnB,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,OAAO;qBACjB;iBACJ;aACJ;YACD;gBACI,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,OAAO;gBACd,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,OAAO;wBACb,GAAG,EAAE,aAAa;wBAClB,KAAK,EAAE,cAAc;wBACrB,OAAO,EAAE;4BACL,EAAC,KAAK,E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C,CAAC,GAAG,WAAW,EAAE,GAAG,sBAAsB,CAAC,CAAC;QAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8iBI;KACP;CACJ,CAAC","sourcesContent":["import {BlockConfig, ConfigInput} from '../../../common/types';\nimport {imageInputs} from '../../components/Image/dynamic-form';\nimport {Theme} from '../../models';\n\nconst mediaInputs: ConfigInput[] = [\n {\n type: 'oneOf',\n name: '',\n key: 'mediaType',\n title: 'Media Type',\n options: [\n {\n title: 'Empty',\n value: 'emptyMedia',\n properties: [\n {\n type: 'text',\n name: 'color',\n title: 'Color',\n },\n ],\n },\n {\n title: 'Image',\n value: 'image',\n properties: [\n {\n type: 'oneOf',\n name: 'image',\n key: 'imagesCount',\n title: 'Images Count',\n options: [\n {title: 'Single Image', value: 'singleImage', properties: imageInputs},\n {\n title: 'Multiple Images',\n value: 'multipleImages',\n properties: [\n {\n type: 'array',\n name: '',\n arrayType: 'object',\n title: 'Images',\n properties: imageInputs,\n buttonText: 'Add Image',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: 'Youtube',\n value: 'youtube',\n properties: [\n {\n type: 'text',\n name: 'youtube',\n title: 'Youtube',\n },\n {\n type: 'text',\n name: 'previewImg',\n title: 'Preview Image',\n },\n ],\n },\n {\n title: 'Datalens',\n value: 'datalens',\n properties: [],\n },\n {\n title: 'Iframe',\n value: 'iframe',\n properties: [],\n },\n {\n title: 'Video',\n value: 'video',\n properties: [],\n },\n ],\n },\n {\n type: 'boolean',\n name: 'disableImageSliderForArrayInput',\n title: 'Disable Image Slider For Array Input',\n },\n {\n type: 'boolean',\n name: 'parallax',\n title: 'Parallax',\n },\n {\n type: 'number',\n name: 'height',\n title: 'Height',\n },\n {\n type: 'boolean',\n name: 'fullscreen',\n title: 'Fullscreen',\n },\n {\n type: 'number',\n name: 'ratio',\n title: 'Ratio',\n },\n {\n type: 'boolean',\n name: 'margins',\n title: 'Margins',\n },\n];\n\nconst headerBackgroundInputs: ConfigInput[] = [\n {\n type: 'boolean',\n name: 'fullWidthMedia',\n title: 'Full width Media',\n },\n {\n type: 'boolean',\n name: 'fullWidth',\n title: 'Full width',\n },\n];\n\nconst backgroundProperty = (properties: ConfigInput[]): ConfigInput => ({\n type: 'oneOf',\n name: 'background',\n title: 'Background',\n options: [\n {\n value: 'noThemes',\n title: 'No Themes',\n properties: properties,\n },\n {\n value: 'withThemes',\n title: 'With Themes',\n properties: Object.values(Theme).map((theme) => ({\n type: 'object',\n name: theme,\n title: theme,\n properties: properties,\n })),\n },\n ],\n});\n\nexport const blockConfig: BlockConfig = {\n name: 'Header Block',\n inputs: [\n {\n type: 'text',\n name: 'title',\n title: 'Title',\n },\n {\n type: 'text',\n name: 'overtitle',\n title: 'Overtitle',\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n backgroundProperty([...mediaInputs, ...headerBackgroundInputs]),\n /* {\n type: 'text',\n name: 'when',\n title: 'when',\n },\n {\n type: 'object',\n name: 'anchor',\n title: 'anchor',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'urlTitle',\n },\n ],\n },\n {\n type: 'select',\n name: 'visible',\n title: 'visible',\n enum: [\n {\n content: 'sm',\n value: 'sm',\n },\n {\n content: 'md',\n value: 'md',\n },\n {\n content: 'lg',\n value: 'lg',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n {\n content: 'all',\n value: 'all',\n },\n ],\n },\n {\n type: 'text',\n name: 'context',\n title: 'context',\n },\n {\n type: 'object',\n name: 'indent',\n title: 'indent',\n properties: [],\n },\n {\n type: 'select',\n name: 'width',\n title: 'width',\n enum: [\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n ],\n },\n {\n type: 'array',\n name: 'buttons',\n title: 'buttons',\n properties: [\n {\n type: 'text',\n name: 'when',\n title: 'when',\n },\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'urlTitle',\n },\n {\n type: 'select',\n name: 'size',\n title: 'size',\n enum: [\n {\n content: 'xs',\n value: 'xs',\n },\n {\n content: 'ns',\n value: 'ns',\n },\n {\n content: 's',\n value: 's',\n },\n {\n content: 'n',\n value: 'n',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n {\n content: 'head',\n value: 'head',\n },\n {\n content: 'promo',\n value: 'promo',\n },\n ],\n },\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'normal',\n value: 'normal',\n },\n {\n content: 'action',\n value: 'action',\n },\n {\n content: 'outlined',\n value: 'outlined',\n },\n {\n content: 'outlined-info',\n value: 'outlined-info',\n },\n {\n content: 'outlined-danger',\n value: 'outlined-danger',\n },\n {\n content: 'raised',\n value: 'raised',\n },\n {\n content: 'flat',\n value: 'flat',\n },\n {\n content: 'flat-info',\n value: 'flat-info',\n },\n {\n content: 'flat-danger',\n value: 'flat-danger',\n },\n {\n content: 'flat-secondary',\n value: 'flat-secondary',\n },\n {\n content: 'clear',\n value: 'clear',\n },\n {\n content: 'normal-contrast',\n value: 'normal-contrast',\n },\n {\n content: 'outlined-contrast',\n value: 'outlined-contrast',\n },\n {\n content: 'flat-contrast',\n value: 'flat-contrast',\n },\n {\n content: 'link',\n value: 'link',\n },\n {\n content: 'pseudo',\n value: 'pseudo',\n },\n {\n content: 'pseudo-special',\n value: 'pseudo-special',\n },\n {\n content: 'websearch',\n value: 'websearch',\n },\n {\n content: 'normal-dark',\n value: 'normal-dark',\n },\n {\n content: 'normal-special',\n value: 'normal-special',\n },\n {\n content: 'accent',\n value: 'accent',\n },\n {\n content: 'dark-grey',\n value: 'dark-grey',\n },\n {\n content: 'app-store',\n value: 'app-store',\n },\n {\n content: 'google-play',\n value: 'google-play',\n },\n {\n content: 'scale',\n value: 'scale',\n },\n {\n content: 'github',\n value: 'github',\n },\n {\n content: 'monochrome',\n value: 'monochrome',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'img',\n title: 'img',\n options: [\n {\n value: 'url',\n title: 'url',\n properties: [],\n },\n {\n value: 'options',\n title: 'options',\n properties: [],\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'analyticsEvents',\n title: 'analyticsEvents',\n options: [\n {\n value: 'single',\n title: 'single',\n properties: [\n {\n type: 'text',\n name: 'additionalProperties',\n title: 'additionalProperties',\n },\n ],\n },\n {\n value: 'list',\n title: 'list',\n properties: [\n {\n type: 'object',\n name: 'items',\n title: 'items',\n properties: [\n {\n type: 'text',\n name: 'name',\n title: 'name',\n },\n {\n type: 'text',\n name: 'type',\n title: 'type',\n },\n {\n type: 'object',\n name: 'counters',\n title: 'counters',\n properties: [],\n },\n {\n type: 'text',\n name: 'context',\n title: 'context',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n type: 'select',\n name: 'target',\n title: 'target',\n enum: [\n {\n content: '_self',\n value: '_self',\n },\n {\n content: '_blank',\n value: '_blank',\n },\n {\n content: '_parent',\n value: '_parent',\n },\n {\n content: '_top',\n value: '_top',\n },\n ],\n },\n {\n type: 'select',\n name: 'width',\n title: 'width',\n enum: [\n {\n content: 'auto',\n value: 'auto',\n },\n {\n content: 'max',\n value: 'max',\n },\n ],\n },\n ],\n },\n {\n type: 'select',\n name: 'offset',\n title: 'offset',\n enum: [\n {\n content: 'default',\n value: 'default',\n },\n {\n content: 'large',\n value: 'large',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'image',\n title: 'image',\n options: [\n {\n value: 'no theme',\n title: 'no theme',\n properties: [],\n },\n {\n value: 'themes',\n title: 'themes',\n properties: [],\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'video',\n title: 'video',\n options: [\n {\n value: 'no theme',\n title: 'no theme',\n properties: [],\n },\n {\n value: 'themes',\n title: 'themes',\n properties: [],\n },\n ],\n },\n {\n type: 'select',\n name: 'mediaView',\n title: 'mediaView',\n enum: [\n {\n content: 'fit',\n value: 'fit',\n },\n {\n content: 'full',\n value: 'full',\n },\n ],\n },\n {\n type: 'object',\n name: 'backLink',\n title: 'backLink',\n properties: [\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'title',\n title: 'title',\n },\n ],\n },\n {\n type: 'select',\n name: 'imageSize',\n title: 'imageSize',\n enum: [\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n ],\n },\n {\n type: 'select',\n name: 'verticalOffset',\n title: 'verticalOffset',\n enum: [\n {\n content: '0',\n value: '0',\n },\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n ],\n },\n\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'default',\n value: 'default',\n },\n {\n content: 'dark',\n value: 'dark',\n },\n ],\n },\n {\n type: 'object',\n name: 'breadcrumbs',\n title: 'breadcrumbs',\n properties: [\n {\n type: 'array',\n name: 'items',\n title: 'items',\n properties: [\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n ],\n },\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'light',\n value: 'light',\n },\n {\n content: 'dark',\n value: 'dark',\n },\n ],\n },\n ],\n },\n {\n type: 'text',\n name: 'status',\n title: 'status',\n },*/\n ],\n};\n"]}
1
+ {"version":3,"file":"dynamic-form.js","sourceRoot":"../../../../src","sources":["blocks/Header/dynamic-form.ts"],"names":[],"mappings":";;;AACA,yEAAgE;AAChE,kDAAmC;AAEnC,MAAM,WAAW,GAAkB;IAC/B;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE;YACL;gBACI,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,YAAY;gBACnB,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,OAAO;qBACjB;iBACJ;aACJ;YACD;gBACI,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,OAAO;gBACd,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,OAAO;wBACb,GAAG,EAAE,aAAa;wBAClB,KAAK,EAAE,cAAc;wBACrB,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,0BAAW,EAAC;4BACtE;gCACI,KAAK,EAAE,iBAAiB;gCACxB,KAAK,EAAE,gBAAgB;gCACvB,UAAU,EAAE;oCACR;wCACI,IAAI,EAAE,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8iBI;KACP;CACJ,CAAC","sourcesContent":["import {BlockConfig, ConfigInput} from '../../common/types';\nimport {imageInputs} from '../../components/Image/dynamic-form';\nimport {Theme} from '../../models';\n\nconst mediaInputs: ConfigInput[] = [\n {\n type: 'oneOf',\n name: '',\n key: 'mediaType',\n title: 'Media Type',\n options: [\n {\n title: 'Empty',\n value: 'emptyMedia',\n properties: [\n {\n type: 'text',\n name: 'color',\n title: 'Color',\n },\n ],\n },\n {\n title: 'Image',\n value: 'image',\n properties: [\n {\n type: 'oneOf',\n name: 'image',\n key: 'imagesCount',\n title: 'Images Count',\n options: [\n {title: 'Single Image', value: 'singleImage', properties: imageInputs},\n {\n title: 'Multiple Images',\n value: 'multipleImages',\n properties: [\n {\n type: 'array',\n name: '',\n arrayType: 'object',\n title: 'Images',\n properties: imageInputs,\n buttonText: 'Add Image',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n title: 'Youtube',\n value: 'youtube',\n properties: [\n {\n type: 'text',\n name: 'youtube',\n title: 'Youtube',\n },\n {\n type: 'text',\n name: 'previewImg',\n title: 'Preview Image',\n },\n ],\n },\n {\n title: 'Datalens',\n value: 'datalens',\n properties: [],\n },\n {\n title: 'Iframe',\n value: 'iframe',\n properties: [],\n },\n {\n title: 'Video',\n value: 'video',\n properties: [],\n },\n ],\n },\n {\n type: 'boolean',\n name: 'disableImageSliderForArrayInput',\n title: 'Disable Image Slider For Array Input',\n },\n {\n type: 'boolean',\n name: 'parallax',\n title: 'Parallax',\n },\n {\n type: 'number',\n name: 'height',\n title: 'Height',\n },\n {\n type: 'boolean',\n name: 'fullscreen',\n title: 'Fullscreen',\n },\n {\n type: 'number',\n name: 'ratio',\n title: 'Ratio',\n },\n {\n type: 'boolean',\n name: 'margins',\n title: 'Margins',\n },\n];\n\nconst headerBackgroundInputs: ConfigInput[] = [\n {\n type: 'boolean',\n name: 'fullWidthMedia',\n title: 'Full width Media',\n },\n {\n type: 'boolean',\n name: 'fullWidth',\n title: 'Full width',\n },\n];\n\nconst backgroundProperty = (properties: ConfigInput[]): ConfigInput => ({\n type: 'oneOf',\n name: 'background',\n title: 'Background',\n options: [\n {\n value: 'noThemes',\n title: 'No Themes',\n properties: properties,\n },\n {\n value: 'withThemes',\n title: 'With Themes',\n properties: Object.values(Theme).map((theme) => ({\n type: 'object',\n name: theme,\n title: theme,\n properties: properties,\n })),\n },\n ],\n});\n\nexport const blockConfig: BlockConfig = {\n name: 'Header Block',\n inputs: [\n {\n type: 'text',\n name: 'title',\n title: 'Title',\n },\n {\n type: 'text',\n name: 'overtitle',\n title: 'Overtitle',\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n backgroundProperty([...mediaInputs, ...headerBackgroundInputs]),\n /* {\n type: 'text',\n name: 'when',\n title: 'when',\n },\n {\n type: 'object',\n name: 'anchor',\n title: 'anchor',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'urlTitle',\n },\n ],\n },\n {\n type: 'select',\n name: 'visible',\n title: 'visible',\n enum: [\n {\n content: 'sm',\n value: 'sm',\n },\n {\n content: 'md',\n value: 'md',\n },\n {\n content: 'lg',\n value: 'lg',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n {\n content: 'all',\n value: 'all',\n },\n ],\n },\n {\n type: 'text',\n name: 'context',\n title: 'context',\n },\n {\n type: 'object',\n name: 'indent',\n title: 'indent',\n properties: [],\n },\n {\n type: 'select',\n name: 'width',\n title: 'width',\n enum: [\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n ],\n },\n {\n type: 'array',\n name: 'buttons',\n title: 'buttons',\n properties: [\n {\n type: 'text',\n name: 'when',\n title: 'when',\n },\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'urlTitle',\n },\n {\n type: 'select',\n name: 'size',\n title: 'size',\n enum: [\n {\n content: 'xs',\n value: 'xs',\n },\n {\n content: 'ns',\n value: 'ns',\n },\n {\n content: 's',\n value: 's',\n },\n {\n content: 'n',\n value: 'n',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n {\n content: 'head',\n value: 'head',\n },\n {\n content: 'promo',\n value: 'promo',\n },\n ],\n },\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'normal',\n value: 'normal',\n },\n {\n content: 'action',\n value: 'action',\n },\n {\n content: 'outlined',\n value: 'outlined',\n },\n {\n content: 'outlined-info',\n value: 'outlined-info',\n },\n {\n content: 'outlined-danger',\n value: 'outlined-danger',\n },\n {\n content: 'raised',\n value: 'raised',\n },\n {\n content: 'flat',\n value: 'flat',\n },\n {\n content: 'flat-info',\n value: 'flat-info',\n },\n {\n content: 'flat-danger',\n value: 'flat-danger',\n },\n {\n content: 'flat-secondary',\n value: 'flat-secondary',\n },\n {\n content: 'clear',\n value: 'clear',\n },\n {\n content: 'normal-contrast',\n value: 'normal-contrast',\n },\n {\n content: 'outlined-contrast',\n value: 'outlined-contrast',\n },\n {\n content: 'flat-contrast',\n value: 'flat-contrast',\n },\n {\n content: 'link',\n value: 'link',\n },\n {\n content: 'pseudo',\n value: 'pseudo',\n },\n {\n content: 'pseudo-special',\n value: 'pseudo-special',\n },\n {\n content: 'websearch',\n value: 'websearch',\n },\n {\n content: 'normal-dark',\n value: 'normal-dark',\n },\n {\n content: 'normal-special',\n value: 'normal-special',\n },\n {\n content: 'accent',\n value: 'accent',\n },\n {\n content: 'dark-grey',\n value: 'dark-grey',\n },\n {\n content: 'app-store',\n value: 'app-store',\n },\n {\n content: 'google-play',\n value: 'google-play',\n },\n {\n content: 'scale',\n value: 'scale',\n },\n {\n content: 'github',\n value: 'github',\n },\n {\n content: 'monochrome',\n value: 'monochrome',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'img',\n title: 'img',\n options: [\n {\n value: 'url',\n title: 'url',\n properties: [],\n },\n {\n value: 'options',\n title: 'options',\n properties: [],\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'analyticsEvents',\n title: 'analyticsEvents',\n options: [\n {\n value: 'single',\n title: 'single',\n properties: [\n {\n type: 'text',\n name: 'additionalProperties',\n title: 'additionalProperties',\n },\n ],\n },\n {\n value: 'list',\n title: 'list',\n properties: [\n {\n type: 'object',\n name: 'items',\n title: 'items',\n properties: [\n {\n type: 'text',\n name: 'name',\n title: 'name',\n },\n {\n type: 'text',\n name: 'type',\n title: 'type',\n },\n {\n type: 'object',\n name: 'counters',\n title: 'counters',\n properties: [],\n },\n {\n type: 'text',\n name: 'context',\n title: 'context',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n type: 'select',\n name: 'target',\n title: 'target',\n enum: [\n {\n content: '_self',\n value: '_self',\n },\n {\n content: '_blank',\n value: '_blank',\n },\n {\n content: '_parent',\n value: '_parent',\n },\n {\n content: '_top',\n value: '_top',\n },\n ],\n },\n {\n type: 'select',\n name: 'width',\n title: 'width',\n enum: [\n {\n content: 'auto',\n value: 'auto',\n },\n {\n content: 'max',\n value: 'max',\n },\n ],\n },\n ],\n },\n {\n type: 'select',\n name: 'offset',\n title: 'offset',\n enum: [\n {\n content: 'default',\n value: 'default',\n },\n {\n content: 'large',\n value: 'large',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'image',\n title: 'image',\n options: [\n {\n value: 'no theme',\n title: 'no theme',\n properties: [],\n },\n {\n value: 'themes',\n title: 'themes',\n properties: [],\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'video',\n title: 'video',\n options: [\n {\n value: 'no theme',\n title: 'no theme',\n properties: [],\n },\n {\n value: 'themes',\n title: 'themes',\n properties: [],\n },\n ],\n },\n {\n type: 'select',\n name: 'mediaView',\n title: 'mediaView',\n enum: [\n {\n content: 'fit',\n value: 'fit',\n },\n {\n content: 'full',\n value: 'full',\n },\n ],\n },\n {\n type: 'object',\n name: 'backLink',\n title: 'backLink',\n properties: [\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'title',\n title: 'title',\n },\n ],\n },\n {\n type: 'select',\n name: 'imageSize',\n title: 'imageSize',\n enum: [\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n ],\n },\n {\n type: 'select',\n name: 'verticalOffset',\n title: 'verticalOffset',\n enum: [\n {\n content: '0',\n value: '0',\n },\n {\n content: 's',\n value: 's',\n },\n {\n content: 'm',\n value: 'm',\n },\n {\n content: 'l',\n value: 'l',\n },\n {\n content: 'xl',\n value: 'xl',\n },\n ],\n },\n\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'default',\n value: 'default',\n },\n {\n content: 'dark',\n value: 'dark',\n },\n ],\n },\n {\n type: 'object',\n name: 'breadcrumbs',\n title: 'breadcrumbs',\n properties: [\n {\n type: 'array',\n name: 'items',\n title: 'items',\n properties: [\n {\n type: 'text',\n name: 'url',\n title: 'url',\n },\n {\n type: 'text',\n name: 'text',\n title: 'text',\n },\n ],\n },\n {\n type: 'select',\n name: 'theme',\n title: 'theme',\n enum: [\n {\n content: 'light',\n value: 'light',\n },\n {\n content: 'dark',\n value: 'dark',\n },\n ],\n },\n ],\n },\n {\n type: 'text',\n name: 'status',\n title: 'status',\n },*/\n ],\n};\n"]}
@@ -1,3 +1,3 @@
1
- import { BlockConfig } from "../../../common/types/index.js";
1
+ import { BlockConfig } from "../../common/types/index.js";
2
2
  export declare const blockConfig: BlockConfig;
3
3
  export declare const exampleConfig: BlockConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-form.js","sourceRoot":"../../../../src","sources":["blocks/Slider/dynamic-form.ts"],"names":[],"mappings":";;;AACA,8DAA0E;AAE1E,MAAM,YAAY,GAAG,iBAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AAE/D,QAAA,WAAW,GAAgB;IACpC,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE;gBACL;oBACI,KAAK,EAAE,QAAQ;oBACf,KAAK,EAAE,QAAQ;oBACf,UAAU,EAAE;wBACR;4BACI,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,EAAE;4BACR,KAAK,EAAE,OAAO;yBACjB;qBACJ;iBACJ;gBACD;oBACI,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,SAAS;oBAChB,UAAU,EAAE;wBACR;4BACI,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,OAAO;yBACjB;wBACD;4BACI,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,UAAU;4BAChB,KAAK,EAAE,WAAW;4BA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AK,EAAE,mBAAmB;YAC1B,MAAM,EAAE,8BAA8B;SACzC;QACD;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE;gBACF,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;gBACxC,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;aAC3C;YACD,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,iBAAiB;YACxB,UAAU,EAAE;gBACR;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;iBACpB;gBACD;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,UAAU;iBACpB;aACJ;SACJ;QACD;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE;gBACR;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;iBACpB;gBACD;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,UAAU;iBACpB;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {BlockConfig, ConfigInput} from '../../../common/types';\nimport {sliderSizesArray, textSize} from '../../schema/validators/common';\n\nconst textSizeEnum = textSize.map((size) => ({value: size, content: size}));\n\nexport const blockConfig: BlockConfig = {\n name: 'Slider Block',\n inputs: [\n {\n type: 'oneOf',\n name: 'title',\n title: 'Title Object',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'text',\n name: '',\n title: 'Title',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Title',\n },\n {\n type: 'select',\n name: 'textSize',\n title: 'Text Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n {\n type: 'text',\n name: 'url',\n title: 'Url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'Url',\n },\n {\n type: 'boolean',\n name: 'resetMargin',\n title: 'Reset Margin',\n },\n ],\n },\n ],\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n {\n type: 'boolean',\n name: 'dots',\n title: 'With dots',\n },\n {\n type: 'boolean',\n name: 'arrows',\n title: 'With Arrows',\n },\n {\n type: 'boolean',\n name: 'randomOrder',\n title: 'Random Order',\n },\n {\n type: 'number',\n name: 'autoplay',\n title: 'Autoplay',\n },\n {\n type: 'object',\n name: 'disclaimer',\n title: 'Disclaimer',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Text',\n },\n {\n type: 'select',\n name: 'size',\n title: 'Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'slidesToShow',\n title: 'Slides to Show',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'number',\n name: '',\n title: 'Slides',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: sliderSizesArray.reduce((acc, size) => {\n acc.push({type: 'number', name: size, title: size});\n return acc;\n }, [] as Array<ConfigInput>),\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n ],\n};\n\nexport const exampleConfig: BlockConfig = {\n name: 'Slider Block',\n inputs: [\n {\n type: 'text',\n name: 'title',\n title: 'Text Property',\n },\n {\n type: 'boolean',\n name: '<ID>',\n title: 'Boolean Property',\n },\n {\n type: 'number',\n name: '<ID>',\n title: 'Number Property',\n },\n {\n type: 'textarea',\n name: '<ID>',\n title: 'TextArea Property',\n showIf: `block.description === 'Test'`,\n },\n {\n type: 'select',\n name: 'select',\n title: 'Select Property',\n enum: [\n {content: 'Option 1', value: 'option-1'},\n {content: 'Option 2', value: 'option-2'},\n ],\n mode: 'single',\n view: 'select',\n },\n {\n type: 'object',\n name: 'object_data',\n title: 'Object Property',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n ],\n};\n"]}
1
+ {"version":3,"file":"dynamic-form.js","sourceRoot":"../../../../src","sources":["blocks/Slider/dynamic-form.ts"],"names":[],"mappings":";;;AACA,8DAA0E;AAE1E,MAAM,YAAY,GAAG,iBAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AAE/D,QAAA,WAAW,GAAgB;IACpC,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE;gBACL;oBACI,KAAK,EAAE,QAAQ;oBACf,KAAK,EAAE,QAAQ;oBACf,UAAU,EAAE;wBACR;4BACI,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,EAAE;4BACR,KAAK,EAAE,OAAO;yBACjB;qBACJ;iBACJ;gBACD;oBACI,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,SAAS;oBAChB,U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AM;YACZ,KAAK,EAAE,kBAAkB;SAC5B;QACD;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,iBAAiB;SAC3B;QACD;YACI,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,mBAAmB;YAC1B,MAAM,EAAE,8BAA8B;SACzC;QACD;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE;gBACF,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;gBACxC,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;aAC3C;YACD,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,iBAAiB;YACxB,UAAU,EAAE;gBACR;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;iBACpB;gBACD;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,UAAU;iBACpB;aACJ;SACJ;QACD;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE;gBACR;oBACI,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;iBACpB;gBACD;oBACI,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,UAAU;iBACpB;aACJ;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import {BlockConfig, ConfigInput} from '../../common/types';\nimport {sliderSizesArray, textSize} from '../../schema/validators/common';\n\nconst textSizeEnum = textSize.map((size) => ({value: size, content: size}));\n\nexport const blockConfig: BlockConfig = {\n name: 'Slider Block',\n inputs: [\n {\n type: 'oneOf',\n name: 'title',\n title: 'Title Object',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'text',\n name: '',\n title: 'Title',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Title',\n },\n {\n type: 'select',\n name: 'textSize',\n title: 'Text Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n {\n type: 'text',\n name: 'url',\n title: 'Url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'Url',\n },\n {\n type: 'boolean',\n name: 'resetMargin',\n title: 'Reset Margin',\n },\n ],\n },\n ],\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n {\n type: 'boolean',\n name: 'dots',\n title: 'With dots',\n },\n {\n type: 'boolean',\n name: 'arrows',\n title: 'With Arrows',\n },\n {\n type: 'boolean',\n name: 'randomOrder',\n title: 'Random Order',\n },\n {\n type: 'number',\n name: 'autoplay',\n title: 'Autoplay',\n },\n {\n type: 'object',\n name: 'disclaimer',\n title: 'Disclaimer',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Text',\n },\n {\n type: 'select',\n name: 'size',\n title: 'Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'slidesToShow',\n title: 'Slides to Show',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'number',\n name: '',\n title: 'Slides',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: sliderSizesArray.reduce((acc, size) => {\n acc.push({type: 'number', name: size, title: size});\n return acc;\n }, [] as Array<ConfigInput>),\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n ],\n};\n\nexport const exampleConfig: BlockConfig = {\n name: 'Slider Block',\n inputs: [\n {\n type: 'text',\n name: 'title',\n title: 'Text Property',\n },\n {\n type: 'boolean',\n name: '<ID>',\n title: 'Boolean Property',\n },\n {\n type: 'number',\n name: '<ID>',\n title: 'Number Property',\n },\n {\n type: 'textarea',\n name: '<ID>',\n title: 'TextArea Property',\n showIf: `block.description === 'Test'`,\n },\n {\n type: 'select',\n name: 'select',\n title: 'Select Property',\n enum: [\n {content: 'Option 1', value: 'option-1'},\n {content: 'Option 2', value: 'option-2'},\n ],\n mode: 'single',\n view: 'select',\n },\n {\n type: 'object',\n name: 'object_data',\n title: 'Object Property',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n ],\n};\n"]}
@@ -1,3 +1,3 @@
1
- import { ArrayObjectInput, ArrayTextInput, BooleanInput, NumberInput, ObjectInput, OneOfInput, SelectMultipleInput, SelectSingleInput, TextAreaInput, TextInput } from "../../../common/types/index.js";
1
+ import { ArrayObjectInput, ArrayTextInput, BooleanInput, NumberInput, ObjectInput, OneOfInput, SelectMultipleInput, SelectSingleInput, TextAreaInput, TextInput } from "../../common/types/index.js";
2
2
  declare const _default: (TextInput | BooleanInput | NumberInput | TextAreaInput | SelectSingleInput | SelectMultipleInput | ObjectInput | ArrayTextInput | ArrayObjectInput | OneOfInput)[];
3
3
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"../../../../src","sources":["blocks/TestEditorBlock/form.ts"],"names":[],"mappings":";;AAaA,MA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O;IACb,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,kBAAkB;IACzB,UAAU,EAAE,gBAAgB;IAC5B,SAAS,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,gBAAgB,GAAqB;IACvC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE,gBAAgB;IAC5B,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,CAAC;CACtD,CAAC;AAEF,MAAM,UAAU,GAAe;IAC3B,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,kBAAkB;IACzB,OAAO,EAAE;QACL,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAC;QACvD,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,aAAa,CAAC,EAAC;KACtE;CACJ,CAAC;AAEF,kBAAe;IACX,SAAS;IACT,aAAa;IACb,YAAY;IACZ,WAAW;IACX,WAAW;IACX,2BAA2B;IAC3B,uBAAuB;IACvB,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,UAAU;CACb,CAAC","sourcesContent":["import {\n ArrayObjectInput,\n ArrayTextInput,\n BooleanInput,\n NumberInput,\n ObjectInput,\n OneOfInput,\n SelectMultipleInput,\n SelectSingleInput,\n TextAreaInput,\n TextInput,\n} from '../../../common/types';\n\nconst textInput: TextInput = {\n type: 'text',\n name: 'text',\n title: 'Text Input',\n};\n\nconst textAreaInput: TextAreaInput = {\n type: 'textarea',\n name: 'textarea',\n title: 'TextArea Input',\n};\n\nconst booleanInput: BooleanInput = {\n type: 'boolean',\n name: 'boolean',\n title: 'Boolean Input',\n};\n\nconst numberInput: NumberInput = {\n type: 'number',\n name: 'number',\n title: 'Number Input',\n};\n\nconst selectInput: SelectSingleInput = {\n type: 'select',\n name: 'selectSingle',\n title: 'Select Single Input',\n mode: 'single',\n view: 'select',\n enum: [\n {value: 'id_1', content: 'Option 1'},\n {value: 'id_2', content: 'Option 2'},\n ],\n};\n\nconst radioButtonsViewSingleInput: SelectSingleInput = {\n ...selectInput,\n name: 'radioButtons',\n title: 'Radio Button Input',\n\n view: 'radiobutton',\n};\n\n// @ts-ignore\nconst selectMultipleModeInput: SelectMultipleInput = {\n ...selectInput,\n name: 'selectMultiple',\n title: 'Select Multiple Input',\n\n mode: 'multiple',\n};\n\nconst objectInput: ObjectInput = {\n type: 'object',\n name: 'object',\n title: 'Object Input',\n properties: [textInput, textAreaInput, selectInput],\n};\n\nconst arrayTextInput: ArrayTextInput = {\n type: 'array',\n name: 'arrayText',\n title: 'Array Text Input',\n buttonText: 'Add Array Item',\n arrayType: 'text',\n};\n\nconst arrayObjectInput: ArrayObjectInput = {\n type: 'array',\n name: 'arrayObject',\n title: 'Array Object Input',\n buttonText: 'Add Array Item',\n arrayType: 'object',\n properties: [textInput, textAreaInput, selectInput],\n};\n\nconst oneOfInput: OneOfInput = {\n type: 'oneOf',\n name: 'oneOf',\n key: 'oneOfKey',\n title: 'Array Text Input',\n options: [\n {value: 'text', title: 'Text', properties: [textInput]},\n {value: 'textarea', title: 'TextArea', properties: [textAreaInput]},\n ],\n};\n\nexport default [\n textInput,\n textAreaInput,\n booleanInput,\n numberInput,\n selectInput,\n radioButtonsViewSingleInput,\n selectMultipleModeInput,\n objectInput,\n arrayTextInput,\n arrayObjectInput,\n oneOfInput,\n];\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"../../../../src","sources":["blocks/TestEditorBlock/form.ts"],"names":[],"mappings":";;AAaA,MAAM,SAAS,GAAc;IACzB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,aAAa,GAAkB;IACjC,IAAI,EAA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B;IACvC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE,gBAAgB;IAC5B,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,CAAC;CACtD,CAAC;AAEF,MAAM,UAAU,GAAe;IAC3B,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,kBAAkB;IACzB,OAAO,EAAE;QACL,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAC;QACvD,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,aAAa,CAAC,EAAC;KACtE;CACJ,CAAC;AAEF,kBAAe;IACX,SAAS;IACT,aAAa;IACb,YAAY;IACZ,WAAW;IACX,WAAW;IACX,2BAA2B;IAC3B,uBAAuB;IACvB,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,UAAU;CACb,CAAC","sourcesContent":["import {\n ArrayObjectInput,\n ArrayTextInput,\n BooleanInput,\n NumberInput,\n ObjectInput,\n OneOfInput,\n SelectMultipleInput,\n SelectSingleInput,\n TextAreaInput,\n TextInput,\n} from '../../common/types';\n\nconst textInput: TextInput = {\n type: 'text',\n name: 'text',\n title: 'Text Input',\n};\n\nconst textAreaInput: TextAreaInput = {\n type: 'textarea',\n name: 'textarea',\n title: 'TextArea Input',\n};\n\nconst booleanInput: BooleanInput = {\n type: 'boolean',\n name: 'boolean',\n title: 'Boolean Input',\n};\n\nconst numberInput: NumberInput = {\n type: 'number',\n name: 'number',\n title: 'Number Input',\n};\n\nconst selectInput: SelectSingleInput = {\n type: 'select',\n name: 'selectSingle',\n title: 'Select Single Input',\n mode: 'single',\n view: 'select',\n enum: [\n {value: 'id_1', content: 'Option 1'},\n {value: 'id_2', content: 'Option 2'},\n ],\n};\n\nconst radioButtonsViewSingleInput: SelectSingleInput = {\n ...selectInput,\n name: 'radioButtons',\n title: 'Radio Button Input',\n\n view: 'radiobutton',\n};\n\n// @ts-ignore\nconst selectMultipleModeInput: SelectMultipleInput = {\n ...selectInput,\n name: 'selectMultiple',\n title: 'Select Multiple Input',\n\n mode: 'multiple',\n};\n\nconst objectInput: ObjectInput = {\n type: 'object',\n name: 'object',\n title: 'Object Input',\n properties: [textInput, textAreaInput, selectInput],\n};\n\nconst arrayTextInput: ArrayTextInput = {\n type: 'array',\n name: 'arrayText',\n title: 'Array Text Input',\n buttonText: 'Add Array Item',\n arrayType: 'text',\n};\n\nconst arrayObjectInput: ArrayObjectInput = {\n type: 'array',\n name: 'arrayObject',\n title: 'Array Object Input',\n buttonText: 'Add Array Item',\n arrayType: 'object',\n properties: [textInput, textAreaInput, selectInput],\n};\n\nconst oneOfInput: OneOfInput = {\n type: 'oneOf',\n name: 'oneOf',\n key: 'oneOfKey',\n title: 'Array Text Input',\n options: [\n {value: 'text', title: 'Text', properties: [textInput]},\n {value: 'textarea', title: 'TextArea', properties: [textAreaInput]},\n ],\n};\n\nexport default [\n textInput,\n textAreaInput,\n booleanInput,\n numberInput,\n selectInput,\n radioButtonsViewSingleInput,\n selectMultipleModeInput,\n objectInput,\n arrayTextInput,\n arrayObjectInput,\n oneOfInput,\n];\n"]}
@@ -0,0 +1,4 @@
1
+ import { ActionMessageTypes, EventMessageTypes } from "./types/index.js";
2
+ export declare function requestActionPostMessage<K extends keyof ActionMessageTypes>(action: K, data: ActionMessageTypes[K], destinationElement: Window): void;
3
+ export declare function listenPostMessageEvents<K extends keyof EventMessageTypes>(action: K, callback: (data: EventMessageTypes[K]) => void): () => void;
4
+ export declare function usePostMessageAPIListener<K extends keyof EventMessageTypes>(action: K, callback: (data: EventMessageTypes[K]) => void, deps?: unknown[]): void;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requestActionPostMessage = requestActionPostMessage;
4
+ exports.listenPostMessageEvents = listenPostMessageEvents;
5
+ exports.usePostMessageAPIListener = usePostMessageAPIListener;
6
+ const tslib_1 = require("tslib");
7
+ const React = tslib_1.__importStar(require("react"));
8
+ function requestActionPostMessage(action, data, destinationElement) {
9
+ const message = { action, data };
10
+ destinationElement.postMessage(message);
11
+ }
12
+ function listenPostMessageEvents(action, callback) {
13
+ const onMessage = (e) => {
14
+ const message = e.data;
15
+ if ('action' in message && message.action === action) {
16
+ return callback(message.data);
17
+ }
18
+ return undefined;
19
+ };
20
+ window.addEventListener('message', onMessage);
21
+ return () => {
22
+ window.removeEventListener('message', onMessage);
23
+ };
24
+ }
25
+ function usePostMessageAPIListener(action, callback, deps = []) {
26
+ React.useEffect(() => {
27
+ return listenPostMessageEvents(action, callback);
28
+ // eslint-disable-next-line react-hooks/exhaustive-deps
29
+ }, [...deps]);
30
+ }
31
+ //# sourceMappingURL=postMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postMessage.js","sourceRoot":"../../../src","sources":["common/postMessage.ts"],"names":[],"mappings":";;AAIA,4DAOC;AAED,0DAmBC;AAED,8DASC;;AA3CD,qDAA+B;AAI/B,SAAgB,wBAAwB,CACpC,MAAS,EACT,IAA2B,EAC3B,kBAA0B;IAE1B,MAAM,OAAO,GAAG,EAAC,MAAM,EAAE,IAAI,EAA6B,CAAC;IAC3D,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,SAAgB,uBAAuB,CACnC,MAAS,EACT,QAA8C;IAE9C,MAAM,SAAS,GAAG,CAAC,CAAe,EAAE,EAAE;QAClC,MAAM,OAAO,GAAG,CAAC,CAAC,IAAgC,CAAC;QAEnD,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACnD,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE9C,OAAO,GAAG,EAAE;QACR,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC;AACN,CAAC;AAED,SAAgB,yBAAyB,CACrC,MAAS,EACT,QAA8C,EAC9C,OAAkB,EAAE;IAEpB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,OAAO,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACjD,uDAAuD;IAC3D,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {ActionMessageTypes, EventMessageTypes, PostMessageAPIMessage} from './types';\n\nexport function requestActionPostMessage<K extends keyof ActionMessageTypes>(\n action: K,\n data: ActionMessageTypes[K],\n destinationElement: Window,\n) {\n const message = {action, data} as PostMessageAPIMessage<K>;\n destinationElement.postMessage(message);\n}\n\nexport function listenPostMessageEvents<K extends keyof EventMessageTypes>(\n action: K,\n callback: (data: EventMessageTypes[K]) => void,\n) {\n const onMessage = (e: MessageEvent) => {\n const message = e.data as PostMessageAPIMessage<K>;\n\n if ('action' in message && message.action === action) {\n return callback(message.data);\n }\n\n return undefined;\n };\n\n window.addEventListener('message', onMessage);\n\n return () => {\n window.removeEventListener('message', onMessage);\n };\n}\n\nexport function usePostMessageAPIListener<K extends keyof EventMessageTypes>(\n action: K,\n callback: (data: EventMessageTypes[K]) => void,\n deps: unknown[] = [],\n) {\n React.useEffect(() => {\n return listenPostMessageEvents(action, callback);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...deps]);\n}\n"]}
@@ -0,0 +1,40 @@
1
+ import { PageContentWithNavigation } from "../models/index.js";
2
+ import { ConfigInput, ItemConfig } from "./types/index.js";
3
+ export interface EditorState {
4
+ height?: number;
5
+ deviceWidth?: string;
6
+ zoom: number;
7
+ manipulateOverlayMode: 'insert' | 'reorder' | false;
8
+ selectedBlock: number[] | null;
9
+ initialized: boolean;
10
+ content: PageContentWithNavigation;
11
+ blocks: Array<ItemConfig>;
12
+ subBlocks: Array<ItemConfig>;
13
+ global: Array<ConfigInput>;
14
+ preInsertBlockType: string | null;
15
+ preReorderBlockPath: number[] | null;
16
+ }
17
+ export declare const initialStore: EditorState;
18
+ export declare const createPCEditorStore: (overrideInitialState?: Partial<EditorState> | undefined) => import("zustand").UseBoundStore<Omit<Omit<Omit<import("zustand").StoreApi<EditorState>, "subscribe"> & {
19
+ subscribe: {
20
+ (listener: (selectedState: EditorState, previousSelectedState: EditorState) => void): () => void;
21
+ <U>(selector: (state: EditorState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
22
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
23
+ fireImmediately?: boolean;
24
+ } | undefined): () => void;
25
+ };
26
+ }, "setState"> & {
27
+ setState<A extends string | {
28
+ type: string;
29
+ }>(partial: EditorState | Partial<EditorState> | ((state: EditorState) => EditorState | Partial<EditorState>), replace?: boolean | undefined, action?: A | undefined): void;
30
+ }, "persist"> & {
31
+ persist: {
32
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<EditorState, EditorState>>) => void;
33
+ clearStorage: () => void;
34
+ rehydrate: () => Promise<void> | void;
35
+ hasHydrated: () => boolean;
36
+ onHydrate: (fn: (state: EditorState) => void) => () => void;
37
+ onFinishHydration: (fn: (state: EditorState) => void) => () => void;
38
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<EditorState, EditorState>>;
39
+ };
40
+ }>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPCEditorStore = exports.initialStore = void 0;
4
+ const utils_1 = require("./utils.js");
5
+ exports.initialStore = {
6
+ height: 100,
7
+ deviceWidth: '100%',
8
+ zoom: 100,
9
+ manipulateOverlayMode: false,
10
+ selectedBlock: null,
11
+ initialized: false,
12
+ content: { blocks: [] },
13
+ blocks: [],
14
+ subBlocks: [],
15
+ global: [],
16
+ preInsertBlockType: null,
17
+ preReorderBlockPath: null,
18
+ };
19
+ exports.createPCEditorStore = (0, utils_1.initializeStore)(exports.initialStore, () => ({}));
20
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"../../../src","sources":["common/store.ts"],"names":[],"mappings":";;;AAKA,sCAAwC;AAoB3B,QAAA,YAAY,GAAgB;IACrC,MAAM,EAAE,GAAG;IACX,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,GAAG;IACT,qBAAqB,EAAE,KAAK;IAC5B,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,EAAC,MAAM,EAAE,EAAE,EAAC;IACrB,MAAM,EAAE,EAAE;IACV,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,EAAE;IACV,kBAAkB,EAAE,IAAI;IACxB,mBAAmB,EAAE,IAAI;CAC5B,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAA,uBAAe,EAAc,oBAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["import _ from 'lodash';\n\nimport {PageContentWithNavigation} from '../models';\n\nimport {ConfigInput, ItemConfig} from './types';\nimport {initializeStore} from './utils';\n\nexport interface EditorState {\n height?: number;\n deviceWidth?: string;\n zoom: number;\n\n manipulateOverlayMode: 'insert' | 'reorder' | false;\n selectedBlock: number[] | null;\n initialized: boolean;\n\n content: PageContentWithNavigation;\n blocks: Array<ItemConfig>;\n subBlocks: Array<ItemConfig>;\n global: Array<ConfigInput>;\n\n preInsertBlockType: string | null;\n preReorderBlockPath: number[] | null;\n}\n\nexport const initialStore: EditorState = {\n height: 100,\n deviceWidth: '100%',\n zoom: 100,\n manipulateOverlayMode: false,\n selectedBlock: null,\n initialized: false,\n content: {blocks: []},\n blocks: [],\n subBlocks: [],\n global: [],\n preInsertBlockType: null,\n preReorderBlockPath: null,\n};\n\nexport const createPCEditorStore = initializeStore<EditorState>(initialStore, () => ({}));\n"]}
@@ -0,0 +1,36 @@
1
+ import { PageContentWithNavigation } from "../../models/index.js";
2
+ import { EditorState } from "../store.js";
3
+ export type MessageTypes = EventMessageTypes & ActionMessageTypes;
4
+ export type EventMessageTypes = {
5
+ ON_INIT: {
6
+ height: number;
7
+ };
8
+ ON_RESIZE: {
9
+ height: number;
10
+ };
11
+ ON_MOUSE_UP: {
12
+ path?: number[];
13
+ rect?: DOMRect;
14
+ position?: string;
15
+ };
16
+ ON_MOUSE_MOVE: {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ ON_HOVER_BLOCK: {
21
+ rect?: DOMRect;
22
+ position?: string;
23
+ };
24
+ ON_CLICK_BLOCK: {
25
+ path: number[];
26
+ };
27
+ ON_UPDATE_BLOCK_SELECTION: {
28
+ rect: DOMRect;
29
+ };
30
+ ON_SUPPORTED_BLOCKS: Pick<EditorState, 'blocks' | 'subBlocks' | 'global'>;
31
+ ON_INITIAL_CONTENT: PageContentWithNavigation;
32
+ };
33
+ export type ActionMessageTypes = {
34
+ GET_SUPPORTED_BLOCKS: {};
35
+ GET_INITIAL_CONTENT: {};
36
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"../../../../src","sources":["common/types/actions.ts"],"names":[],"mappings":"","sourcesContent":["import {PageContentWithNavigation} from '../../models';\nimport {EditorState} from '../store';\n\nexport type MessageTypes = EventMessageTypes & ActionMessageTypes;\n\nexport type EventMessageTypes = {\n ON_INIT: {height: number};\n ON_RESIZE: {height: number};\n ON_MOUSE_UP: {path?: number[]; rect?: DOMRect; position?: string};\n ON_MOUSE_MOVE: {x: number; y: number};\n ON_HOVER_BLOCK: {rect?: DOMRect; position?: string};\n ON_CLICK_BLOCK: {path: number[]};\n ON_UPDATE_BLOCK_SELECTION: {rect: DOMRect};\n ON_SUPPORTED_BLOCKS: Pick<EditorState, 'blocks' | 'subBlocks' | 'global'>;\n ON_INITIAL_CONTENT: PageContentWithNavigation;\n};\n\nexport type ActionMessageTypes = {\n GET_SUPPORTED_BLOCKS: {};\n GET_INITIAL_CONTENT: {};\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import { BlockConfig } from "./forms.js";
2
+ export interface ItemConfig {
3
+ type: string;
4
+ schema: BlockConfig;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["common/types/common.ts"],"names":[],"mappings":"","sourcesContent":["import {BlockConfig} from './forms';\n\nexport interface ItemConfig {\n type: string;\n schema: BlockConfig;\n}\n"]}
@@ -0,0 +1,97 @@
1
+ import { PageContentWithNavigation } from "../../models/index.js";
2
+ export type DynamicFormValue = string | number | [] | object | boolean | PageContentWithNavigation | undefined;
3
+ export interface BlockConfig {
4
+ name: string;
5
+ inputs: Array<ConfigInput>;
6
+ group?: string;
7
+ default?: object;
8
+ previewImg?: string;
9
+ }
10
+ export interface TextInput {
11
+ type: 'text';
12
+ name: string;
13
+ title: string;
14
+ }
15
+ export interface BooleanInput {
16
+ type: 'boolean';
17
+ name: string;
18
+ title: string;
19
+ }
20
+ export interface NumberInput {
21
+ type: 'number';
22
+ name: string;
23
+ title: string;
24
+ }
25
+ export interface TextAreaInput {
26
+ type: 'textarea';
27
+ name: string;
28
+ title: string;
29
+ }
30
+ export interface SelectBaseInput {
31
+ type: 'select';
32
+ name: string;
33
+ title: string;
34
+ view: 'select' | 'radiobutton';
35
+ mode: 'single' | 'multiple';
36
+ enum: Array<{
37
+ content: string;
38
+ value: string;
39
+ }>;
40
+ }
41
+ export interface SelectSingleInput extends SelectBaseInput {
42
+ type: 'select';
43
+ name: string;
44
+ title: string;
45
+ view: 'select' | 'radiobutton';
46
+ mode: 'single';
47
+ enum: Array<{
48
+ content: string;
49
+ value: string;
50
+ }>;
51
+ }
52
+ export interface SelectMultipleInput extends SelectBaseInput {
53
+ type: 'select';
54
+ name: string;
55
+ title: string;
56
+ view: 'select';
57
+ mode: 'multiple';
58
+ enum: Array<{
59
+ content: string;
60
+ value: string;
61
+ }>;
62
+ }
63
+ export interface ObjectInput {
64
+ type: 'object';
65
+ name: string;
66
+ title: string;
67
+ properties: Array<ConfigInput>;
68
+ }
69
+ export interface ArrayBaseInput {
70
+ type: 'array';
71
+ arrayType: 'object' | 'text';
72
+ name: string;
73
+ title: string;
74
+ buttonText: string;
75
+ }
76
+ export interface ArrayTextInput extends ArrayBaseInput {
77
+ arrayType: 'text';
78
+ }
79
+ export interface ArrayObjectInput extends ArrayBaseInput {
80
+ arrayType: 'object';
81
+ properties: Array<ConfigInput>;
82
+ }
83
+ export interface OneOfInput {
84
+ type: 'oneOf';
85
+ name: string;
86
+ key?: string;
87
+ title: string;
88
+ options: {
89
+ value: string;
90
+ title: string;
91
+ properties: Array<ConfigInput>;
92
+ }[];
93
+ }
94
+ export interface GeneralProps {
95
+ showIf?: string;
96
+ }
97
+ export type ConfigInput = (TextInput | BooleanInput | NumberInput | TextAreaInput | SelectSingleInput | SelectMultipleInput | ObjectInput | ArrayTextInput | ArrayObjectInput | OneOfInput) & GeneralProps;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forms.js","sourceRoot":"../../../../src","sources":["common/types/forms.ts"],"names":[],"mappings":"","sourcesContent":["import {PageContentWithNavigation} from '../../models';\n\nexport type DynamicFormValue =\n | string\n | number\n | []\n | object\n | boolean\n | PageContentWithNavigation\n | undefined;\n\nexport interface BlockConfig {\n name: string;\n inputs: Array<ConfigInput>;\n group?: string;\n default?: object;\n previewImg?: string;\n}\n\nexport interface TextInput {\n type: 'text';\n name: string;\n title: string;\n}\n\nexport interface BooleanInput {\n type: 'boolean';\n name: string;\n title: string;\n}\n\nexport interface NumberInput {\n type: 'number';\n name: string;\n title: string;\n}\n\nexport interface TextAreaInput {\n type: 'textarea';\n name: string;\n title: string;\n}\n\nexport interface SelectBaseInput {\n type: 'select';\n name: string;\n title: string;\n view: 'select' | 'radiobutton';\n mode: 'single' | 'multiple';\n enum: Array<{content: string; value: string}>;\n}\n\nexport interface SelectSingleInput extends SelectBaseInput {\n type: 'select';\n name: string;\n title: string;\n view: 'select' | 'radiobutton';\n mode: 'single';\n enum: Array<{content: string; value: string}>;\n}\n\nexport interface SelectMultipleInput extends SelectBaseInput {\n type: 'select';\n name: string;\n title: string;\n view: 'select';\n mode: 'multiple';\n enum: Array<{content: string; value: string}>;\n}\n\nexport interface ObjectInput {\n type: 'object';\n name: string;\n title: string;\n properties: Array<ConfigInput>;\n}\n\nexport interface ArrayBaseInput {\n type: 'array';\n arrayType: 'object' | 'text';\n name: string;\n title: string;\n buttonText: string;\n}\n\nexport interface ArrayTextInput extends ArrayBaseInput {\n arrayType: 'text';\n}\n\nexport interface ArrayObjectInput extends ArrayBaseInput {\n arrayType: 'object';\n properties: Array<ConfigInput>;\n}\n\nexport interface OneOfInput {\n type: 'oneOf';\n name: string;\n key?: string;\n title: string;\n options: {\n value: string;\n title: string;\n properties: Array<ConfigInput>;\n }[];\n}\n\nexport interface GeneralProps {\n showIf?: string;\n}\n\nexport type ConfigInput = (\n | TextInput\n | BooleanInput\n | NumberInput\n | TextAreaInput\n | SelectSingleInput\n | SelectMultipleInput\n | ObjectInput\n | ArrayTextInput\n | ArrayObjectInput\n | OneOfInput\n) &\n GeneralProps;\n"]}
@@ -0,0 +1,4 @@
1
+ export * from "./actions.js";
2
+ export * from "./common.js";
3
+ export * from "./forms.js";
4
+ export * from "./messages.js";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./actions.js"), exports);
5
+ tslib_1.__exportStar(require("./common.js"), exports);
6
+ tslib_1.__exportStar(require("./forms.js"), exports);
7
+ tslib_1.__exportStar(require("./messages.js"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["common/types/index.ts"],"names":[],"mappings":";;;AAAA,uDAA0B;AAC1B,sDAAyB;AACzB,qDAAwB;AACxB,wDAA2B","sourcesContent":["export * from './actions';\nexport * from './common';\nexport * from './forms';\nexport * from './messages';\n"]}