@useinsider/guido 1.0.0-beta.f7c239e → 1.0.1-beta.0168eae

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 (325) hide show
  1. package/README.md +422 -21
  2. package/dist/@types/generic.d.ts +39 -23
  3. package/dist/@types/save-as-template.d.ts +29 -0
  4. package/dist/App.vue.d.ts +1 -1
  5. package/dist/_virtual/AddCustomFont.js +4 -0
  6. package/dist/_virtual/AiAssistantValueType.js +4 -0
  7. package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
  8. package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
  9. package/dist/_virtual/Block.js +4 -0
  10. package/dist/_virtual/BlockAttributes.js +4 -0
  11. package/dist/_virtual/BlockCompositionType.js +4 -0
  12. package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
  13. package/dist/_virtual/BlockRenderer.js +4 -0
  14. package/dist/_virtual/BlockType.js +4 -0
  15. package/dist/_virtual/BlocksPanel.js +4 -0
  16. package/dist/_virtual/BuiltInControl.js +4 -0
  17. package/dist/_virtual/BuiltInControlTypes.js +4 -0
  18. package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
  19. package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
  20. package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
  21. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
  22. package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
  23. package/dist/_virtual/ContextAction.js +4 -0
  24. package/dist/_virtual/ContextActionType.js +4 -0
  25. package/dist/_virtual/Control.js +4 -0
  26. package/dist/_virtual/EditorStatePropertyType.js +4 -0
  27. package/dist/_virtual/Extension.js +4 -0
  28. package/dist/_virtual/ExtensionBuilder.js +4 -0
  29. package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
  30. package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
  31. package/dist/_virtual/ModificationDescription.js +4 -0
  32. package/dist/_virtual/PanelPosition.js +4 -0
  33. package/dist/_virtual/PreviewDeviceMode.js +4 -0
  34. package/dist/_virtual/SettingsPanelRegistry.js +4 -0
  35. package/dist/_virtual/SettingsPanelTab.js +4 -0
  36. package/dist/_virtual/SettingsTab.js +4 -0
  37. package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
  38. package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
  39. package/dist/_virtual/TextColorBuiltInControl.js +4 -0
  40. package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
  41. package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
  42. package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
  43. package/dist/_virtual/UIElement.js +4 -0
  44. package/dist/_virtual/UIElementTagRegistry.js +4 -0
  45. package/dist/_virtual/UIElementType.js +4 -0
  46. package/dist/_virtual/UIElementsAttributes.js +4 -0
  47. package/dist/_virtual/index.js +5 -0
  48. package/dist/_virtual/index2.js +4 -0
  49. package/dist/components/Guido.vue.d.ts +21 -4
  50. package/dist/components/Guido.vue.js +12 -12
  51. package/dist/components/Guido.vue2.js +89 -25
  52. package/dist/components/organisms/base/Toaster.vue.d.ts +2 -0
  53. package/dist/components/organisms/base/Toaster.vue.js +17 -0
  54. package/dist/components/organisms/base/Toaster.vue2.js +15 -0
  55. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
  56. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
  57. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
  58. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
  59. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
  60. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
  61. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
  62. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
  63. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
  64. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
  65. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
  66. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
  67. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
  68. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
  69. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
  70. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
  71. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
  72. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
  73. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
  74. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
  75. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
  76. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
  77. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
  78. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
  79. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
  80. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
  81. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
  82. package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
  83. package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
  84. package/dist/components/organisms/header/LeftSlot.vue2.js +10 -6
  85. package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
  86. package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -15
  87. package/dist/components/organisms/header/RightSlot.vue.js +12 -14
  88. package/dist/components/organisms/header/RightSlot.vue2.js +30 -17
  89. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  90. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  91. package/dist/components/organisms/header/ViewOptions.vue2.js +30 -10
  92. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
  93. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
  94. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
  95. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
  96. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  97. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
  98. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  99. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  100. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  101. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  102. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
  103. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
  104. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
  105. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
  106. package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
  107. package/dist/components/wrappers/WpDrawer.vue.js +25 -0
  108. package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
  109. package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
  110. package/dist/components/wrappers/WpModal.vue.js +27 -0
  111. package/dist/components/wrappers/WpModal.vue2.js +22 -0
  112. package/dist/composables/useActionsApi.d.ts +5 -1
  113. package/dist/composables/useActionsApi.js +74 -31
  114. package/dist/composables/useApiExample.d.ts +6 -4
  115. package/dist/composables/useCodeEditorApi.d.ts +4 -0
  116. package/dist/composables/useCodeEditorApi.js +11 -0
  117. package/dist/composables/useConfig.d.ts +4 -0
  118. package/dist/composables/useConfig.js +7 -0
  119. package/dist/composables/useCustomInterfaceAppearance.js +45 -9
  120. package/dist/composables/useDebounce.d.ts +4 -0
  121. package/dist/composables/useDebounce.js +12 -0
  122. package/dist/composables/useExport.d.ts +1 -1
  123. package/dist/composables/useExport.js +38 -22
  124. package/dist/composables/useGuidoActions.d.ts +46 -0
  125. package/dist/composables/useGuidoActions.js +37 -0
  126. package/dist/composables/useHtmlCompiler.d.ts +4 -0
  127. package/dist/composables/useHtmlCompiler.js +17 -0
  128. package/dist/composables/useHttp.d.ts +19 -1
  129. package/dist/composables/useHttp.js +23 -21
  130. package/dist/composables/usePartner.d.ts +1 -1
  131. package/dist/composables/usePartner.js +9 -14
  132. package/dist/composables/usePreviewMode.d.ts +5 -0
  133. package/dist/composables/usePreviewMode.js +31 -0
  134. package/dist/composables/useProvideInject.d.ts +14 -0
  135. package/dist/composables/useProvideInject.js +17 -0
  136. package/dist/composables/useResponsivePreview.d.ts +5 -0
  137. package/dist/composables/useResponsivePreview.js +86 -0
  138. package/dist/composables/useStripo.js +66 -40
  139. package/dist/composables/useToaster.d.ts +1 -8
  140. package/dist/composables/useToaster.js +24 -30
  141. package/dist/composables/useTranslations.d.ts +4 -1
  142. package/dist/composables/useTranslations.js +3 -2
  143. package/dist/composables/useValidation.d.ts +56 -0
  144. package/dist/composables/useValidation.js +19 -0
  145. package/dist/composables/useVersionHistoryApi.js +11 -10
  146. package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
  147. package/dist/composables/validators/saveAsTemplate.js +24 -0
  148. package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
  149. package/dist/config/compiler/htmlCompilerRules.js +145 -0
  150. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  151. package/dist/enums/defaults.d.ts +4 -1
  152. package/dist/enums/defaults.js +22 -6
  153. package/dist/enums/displayConditions.d.ts +2 -0
  154. package/dist/enums/displayConditions.js +80 -0
  155. package/dist/enums/preview.d.ts +13 -0
  156. package/dist/enums/preview.js +23 -0
  157. package/dist/enums/toaster.d.ts +5 -0
  158. package/dist/enums/toaster.js +4 -0
  159. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  160. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  161. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  162. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  163. package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
  164. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  165. package/dist/extensions/DynamicContent/extension.js +11 -0
  166. package/dist/guido.css +1 -1
  167. package/dist/mock/api/default-template.d.ts +2 -0
  168. package/dist/mock/api/template-library.d.ts +2 -0
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  192. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  193. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  194. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  195. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  196. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  197. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  198. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  199. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  200. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  201. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  202. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  203. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  204. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  205. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  206. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  207. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  208. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  209. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  210. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  211. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  212. package/dist/node_modules/@vueuse/shared/index.js +45 -0
  213. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  214. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  215. package/dist/node_modules/lodash-es/_apply.js +16 -0
  216. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
  217. package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
  218. package/dist/node_modules/lodash-es/_assignValue.js +10 -0
  219. package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
  220. package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
  221. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  222. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  223. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  224. package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
  225. package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
  226. package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  227. package/dist/node_modules/lodash-es/_baseRest.js +9 -0
  228. package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
  229. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  230. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  231. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  232. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  233. package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  234. package/dist/node_modules/lodash-es/_copyArray.js +9 -0
  235. package/dist/node_modules/lodash-es/_copyObject.js +14 -0
  236. package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
  237. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  238. package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
  239. package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
  240. package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
  241. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  242. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  243. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  244. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  245. package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
  246. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  247. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  248. package/dist/node_modules/lodash-es/_overRest.js +15 -0
  249. package/dist/node_modules/lodash-es/_safeGet.js +7 -0
  250. package/dist/node_modules/lodash-es/_setToString.js +6 -0
  251. package/dist/node_modules/lodash-es/_shortOut.js +16 -0
  252. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  253. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  254. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  255. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  256. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  257. package/dist/node_modules/lodash-es/constant.js +8 -0
  258. package/dist/node_modules/lodash-es/identity.js +6 -0
  259. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  260. package/dist/node_modules/lodash-es/isArray.js +4 -0
  261. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  262. package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  263. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  264. package/dist/node_modules/lodash-es/isLength.js +7 -0
  265. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  266. package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
  267. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  268. package/dist/node_modules/lodash-es/keysIn.js +9 -0
  269. package/dist/node_modules/lodash-es/merge.js +8 -0
  270. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  271. package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
  272. package/dist/node_modules/valibot/dist/index.js +190 -0
  273. package/dist/node_modules/vue-demi/lib/index.js +7 -0
  274. package/dist/services/stripoApi.d.ts +6 -7
  275. package/dist/services/stripoApi.js +44 -23
  276. package/dist/services/templateLibraryApi.d.ts +7 -0
  277. package/dist/services/templateLibraryApi.js +87 -0
  278. package/dist/static/assets/inbox-mockup.svg.js +4 -0
  279. package/dist/static/assets/phone-mockup.svg.js +4 -0
  280. package/dist/static/styles/base.css.js +11 -0
  281. package/dist/static/styles/components/alert-message.css.js +39 -0
  282. package/dist/static/styles/components/amp-block.css.js +18 -0
  283. package/dist/static/styles/components/base-input.css.js +47 -0
  284. package/dist/static/styles/components/button-group.css.js +54 -0
  285. package/dist/static/styles/components/button.css.js +106 -0
  286. package/dist/static/styles/components/combobox.css.js +49 -0
  287. package/dist/static/styles/components/counter.css.js +42 -0
  288. package/dist/static/styles/components/dropdown-menu.css.js +52 -0
  289. package/dist/static/styles/components/narrow-panel.css.js +38 -0
  290. package/dist/static/styles/components/switcher.css.js +11 -0
  291. package/dist/static/styles/components/tabs.css.js +97 -0
  292. package/dist/static/styles/components/tools.css.js +23 -0
  293. package/dist/static/styles/components/version-history.css.js +30 -0
  294. package/dist/static/styles/components/wide-panel.css.js +144 -0
  295. package/dist/static/styles/customEditorStyle.css.js +18 -0
  296. package/dist/static/styles/variables.css.js +23 -0
  297. package/dist/stores/dynamic-content.d.ts +27 -0
  298. package/dist/stores/dynamic-content.js +23 -0
  299. package/dist/stores/editor.d.ts +3 -0
  300. package/dist/stores/editor.js +6 -3
  301. package/dist/stores/preview.d.ts +46 -0
  302. package/dist/stores/preview.js +53 -0
  303. package/dist/stores/save-as-template.d.ts +73 -0
  304. package/dist/stores/save-as-template.js +48 -0
  305. package/dist/stores/toaster.d.ts +18 -0
  306. package/dist/stores/toaster.js +27 -0
  307. package/dist/utils/arrayUtil.d.ts +1 -0
  308. package/dist/utils/arrayUtil.js +10 -0
  309. package/dist/utils/base64.d.ts +1 -0
  310. package/dist/utils/base64.js +7 -0
  311. package/dist/utils/genericUtil.d.ts +3 -0
  312. package/dist/utils/genericUtil.js +11 -0
  313. package/dist/utils/htmlCompiler.d.ts +12 -0
  314. package/dist/utils/htmlCompiler.js +70 -0
  315. package/dist/utils/templatePreparation.d.ts +4 -0
  316. package/dist/utils/templatePreparation.js +33 -0
  317. package/dist/utils/tooltipUtils.d.ts +2 -0
  318. package/dist/utils/tooltipUtils.js +11 -0
  319. package/package.json +8 -7
  320. package/dist/@types/http.d.ts +0 -19
  321. package/dist/composables/useTemplates.d.ts +0 -5
  322. package/dist/composables/useTemplates.js +0 -27
  323. package/dist/static/editor.css.js +0 -232
  324. package/dist/static/templates/default/index.html.js +0 -5
  325. package/dist/static/templates/default/style.css.js +0 -119
@@ -0,0 +1,14 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
+ const _ = /* @__PURE__ */ t({
6
+ __name: "RestoreButton",
7
+ setup(i) {
8
+ const { restoreVersion: o } = e(), r = s();
9
+ return { __sfc: !0, restoreVersion: o, versionHistoryStore: r, InButtonV2: n };
10
+ }
11
+ });
12
+ export {
13
+ _ as default
14
+ };
@@ -1,2 +1,14 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ type __VLS_Props = {
2
+ itemStatus?: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
2
5
  export default _default;
6
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
+ type __VLS_TypePropsToOption<T> = {
8
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
9
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
10
+ } : {
11
+ type: import('vue').PropType<T[K]>;
12
+ required: true;
13
+ };
14
+ };
@@ -2,21 +2,21 @@ import o from "./VersionHistory.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
- var r = this, e = r._self._c, t = r._self._setupProxy;
6
- return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-2" }, [e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(s) {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-3" }, [t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }) : s._e(), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(r) {
7
7
  return t.previewVersion(t.versionHistoryStore.previousPatch.id);
8
- } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(s) {
8
+ } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(r) {
9
9
  return t.previewVersion(t.versionHistoryStore.nextPatch.id);
10
- } } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
10
+ } } })], 1), t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } }) : s._e()], 1);
11
11
  }, a = [], c = /* @__PURE__ */ i(
12
12
  o,
13
13
  n,
14
14
  a,
15
15
  !1,
16
16
  null,
17
- "187d41fa"
17
+ "52a77eec"
18
18
  );
19
- const p = c.exports;
19
+ const _ = c.exports;
20
20
  export {
21
- p as default
21
+ _ as default
22
22
  };
@@ -1,15 +1,18 @@
1
- import { defineComponent as t } from "vue";
2
- import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
- import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
- import { InButtonV2 as i } from "@useinsider/design-system-vue";
5
- import n from "./VersionHistoryItem.vue.js";
6
- const c = /* @__PURE__ */ t({
1
+ import { defineComponent as i } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as m } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as p } from "@useinsider/design-system-vue";
5
+ import f from "./VersionHistoryItem.vue.js";
6
+ const _ = /* @__PURE__ */ i({
7
7
  __name: "VersionHistory",
8
- setup(m) {
9
- const o = s(), { previewVersion: r } = e();
10
- return { __sfc: !0, versionHistoryStore: o, previewVersion: r, InButtonV2: i, VersionHistoryItem: n };
8
+ props: {
9
+ itemStatus: { type: Boolean }
10
+ },
11
+ setup(t) {
12
+ const o = t, r = m(), { previewVersion: e } = n(), { itemStatus: s = !1 } = o;
13
+ return { __sfc: !0, versionHistoryStore: r, previewVersion: e, props: o, itemStatus: s, InButtonV2: p, VersionHistoryItem: f };
11
14
  }
12
15
  });
13
16
  export {
14
- c as default
17
+ _ as default
15
18
  };
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  date: number;
4
4
  textAlign: string;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
9
  type __VLS_TypePropsToOption<T> = {
@@ -10,7 +10,7 @@ var i = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "0e2ff42d"
13
+ "ee4b9c3f"
14
14
  );
15
15
  const d = n.exports;
16
16
  export {
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
2
  export default _default;
@@ -10,9 +10,9 @@ var r = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "6a2bde67"
13
+ "421ffc13"
14
14
  );
15
- const d = _.exports;
15
+ const f = _.exports;
16
16
  export {
17
- d as default
17
+ f as default
18
18
  };
@@ -1,23 +1,41 @@
1
- import { defineComponent as s } from "vue";
2
- import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
- import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
4
- import { InSegments as m } from "@useinsider/design-system-vue";
5
- const d = /* @__PURE__ */ s({
1
+ import { defineComponent as p } from "vue";
2
+ import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
+ import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
+ import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
+ import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
+ import { InSegments as c } from "@useinsider/design-system-vue";
7
+ const h = /* @__PURE__ */ p({
6
8
  __name: "ViewOptions",
7
- setup(p) {
8
- const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
9
- return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
10
- { text: "", icon: "line-desktop", value: "desktop" },
11
- { text: "", icon: "line-menu-mobileapp", value: "mobile" }
12
- ], changeVisualMode: (i) => {
13
- if (e.editorVisualMode = i, i === "mobile") {
14
- t();
9
+ setup(u) {
10
+ const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
+ {
12
+ text: "",
13
+ icon: "line-desktop",
14
+ value: "desktop",
15
+ position: "bottom",
16
+ align: "center",
17
+ tooltipText: o("newsletter.desktop"),
18
+ tooltipOptions: n("guido__version-history-view-option-desktop")
19
+ },
20
+ {
21
+ text: "",
22
+ icon: "line-menu-mobileapp",
23
+ value: "mobile",
24
+ position: "bottom",
25
+ align: "center",
26
+ tooltipText: o("newsletter.mobile"),
27
+ tooltipOptions: n("guido__version-history-view-option-mobile")
28
+ }
29
+ ];
30
+ return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
31
+ if (t.editorVisualMode = s, s === "mobile") {
32
+ i();
15
33
  return;
16
34
  }
17
- o();
18
- }, InSegments: m };
35
+ e();
36
+ }, InSegments: c };
19
37
  }
20
38
  });
21
39
  export {
22
- d as default
40
+ h as default
23
41
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import s from "./SaveAsTemplateDrawer.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var a = this, e = a._self._c, t = a._self._setupProxy;
5
+ return e(t.WpDrawer, { attrs: { id: "save-as-template-modal", "description-status": "", "description-text": t.trans("newsletter.save-template-description"), "footer-button-group-options": t.footerButtonGroupOptions, status: t.editorStore.isSaveAsTemplateDrawerOpen, "title-text": t.trans("products.save-template") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.saveTemplate } }, [e(t.InBasicTextInput, { staticClass: "mb-5 w-1", attrs: { id: "guido__template-name-input", name: "templateName", "character-counter-status": !1, "disabled-status": t.isSaving, "label-text": t.trans("products.template-name"), "max-character-length": 1e3, "placeholder-text": t.trans("newsletter.enter-template-name"), "skeleton-sizing": { width: 495, height: 44 }, "skeleton-status": t.saveAsTemplateStore.skeletonStatus, "state-message": t.templateNameError, states: t.templateNameError ? "error" : "default", "tooltip-status": !1, value: t.saveAsTemplateStore.templateName }, on: { input: t.handleTemplateName } }), e(t.InMultiSelect, { staticClass: "template-category-dropdown mb-5 w-1", attrs: { id: "guido__template-category-dropdown", "create-option-status": "", "search-status": "", "button-status": !1, "character-limit-validation-text": t.trans("validation-v2.duration-value", {
6
+ min: 1,
7
+ max: 25
8
+ }), "create-button-label": t.trans("products.create-new-category"), "disabled-status": t.isSaving, "label-text": t.trans("products.template-category"), "loading-state": t.isAddingOption, "max-character-limit": 25, "max-height": 350, options: t.saveAsTemplateStore.categories, "placeholder-text": t.trans("products.select-template-category"), "skeleton-sizing": { width: 495, height: 44 }, "skeleton-status": t.saveAsTemplateStore.skeletonStatus, value: t.saveAsTemplateStore.selectedCategories }, on: { addOption: t.handleAddOption, change: t.handleCategoryChange, resetAllOptions: t.handleResetAllOptions, selectAllOptions: t.handleSelectAllOptions } })], 1);
9
+ }, l = [], n = /* @__PURE__ */ o(
10
+ s,
11
+ r,
12
+ l,
13
+ !1,
14
+ null,
15
+ null
16
+ );
17
+ const c = n.exports;
18
+ export {
19
+ c as default
20
+ };
@@ -0,0 +1,63 @@
1
+ import { defineComponent as A, ref as c, computed as b, toRef as h, nextTick as C } from "vue";
2
+ import N from "../../wrappers/WpDrawer.vue.js";
3
+ import { useTranslations as O } from "../../../composables/useTranslations.js";
4
+ import { useTemplateNameValidator as x } from "../../../composables/validators/saveAsTemplate.js";
5
+ import { useTemplateLibraryApi as B } from "../../../services/templateLibraryApi.js";
6
+ import { useEditorStore as D } from "../../../stores/editor.js";
7
+ import { useSaveAsTemplateStore as k } from "../../../stores/save-as-template.js";
8
+ import { InMultiSelect as I, InBasicTextInput as M } from "@useinsider/design-system-vue";
9
+ import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const H = /* @__PURE__ */ A({
11
+ __name: "SaveAsTemplateDrawer",
12
+ setup(E) {
13
+ const s = O(), o = D(), t = k(), { createTemplate: m } = B(), a = c(!1), n = c(!1), r = c(""), f = b(() => ({
14
+ primaryButton: {
15
+ styling: "solid",
16
+ type: "primary",
17
+ labelText: s(a.value ? "newsletter.saving" : "products.save"),
18
+ loadingStatus: a.value,
19
+ disabledStatus: t.skeletonStatus
20
+ },
21
+ cancelOrBackButton: {
22
+ styling: "ghost",
23
+ type: "secondary",
24
+ labelText: s("products.cancel"),
25
+ disabledStatus: a.value
26
+ }
27
+ })), p = () => {
28
+ r.value = "", o.isSaveAsTemplateDrawerOpen = !1;
29
+ }, l = async () => {
30
+ const e = h(t, "templateName"), { success: i, errorMessage: _ } = await x(e).validate();
31
+ return r.value = _, i;
32
+ }, v = V(async (e) => {
33
+ t.templateName = e, await l();
34
+ }, 500), g = async (e) => {
35
+ n.value = !0, await t.addCategory(e), n.value = !1;
36
+ }, y = (e) => {
37
+ t.selectedCategories = e;
38
+ }, S = (e) => {
39
+ e && (t.selectedCategories = e);
40
+ }, T = () => {
41
+ t.selectedCategories = [];
42
+ }, w = async () => {
43
+ if (a.value = !0, !await l()) {
44
+ a.value = !1;
45
+ return;
46
+ }
47
+ await m(), a.value = !1, p();
48
+ }, u = () => {
49
+ C(() => {
50
+ const e = document.querySelector("input#guido__template-name-input");
51
+ e == null || e.focus();
52
+ });
53
+ }, d = async () => {
54
+ t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, u();
55
+ };
56
+ return o.$subscribe((e, { isSaveAsTemplateDrawerOpen: i }) => {
57
+ i && d();
58
+ }), { __sfc: !0, trans: s, editorStore: o, saveAsTemplateStore: t, createTemplate: m, isSaving: a, isAddingOption: n, templateNameError: r, footerButtonGroupOptions: f, closeModal: p, validateTemplateName: l, handleTemplateName: v, handleAddOption: g, handleCategoryChange: y, handleSelectAllOptions: S, handleResetAllOptions: T, saveTemplate: w, focusToInput: u, initializeDrawer: d, WpDrawer: N, InBasicTextInput: M, InMultiSelect: I };
59
+ }
60
+ });
61
+ export {
62
+ H as default
63
+ };
@@ -0,0 +1,63 @@
1
+ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
2
+ interface Props {
3
+ id: string;
4
+ className?: string;
5
+ size?: string;
6
+ closeOnOutsideClick?: boolean;
7
+ descriptionStatus?: boolean;
8
+ descriptionText?: string;
9
+ footerButtonGroupOptions: FooterButtonGroupOptions;
10
+ status: boolean;
11
+ titleText: string;
12
+ }
13
+ declare var __VLS_12: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_12) => any;
16
+ };
17
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
18
+ className: string;
19
+ size: string;
20
+ closeOnOutsideClick: boolean;
21
+ descriptionStatus: boolean;
22
+ descriptionText: string;
23
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
24
+ cancelOrBackButtonEvent: () => void;
25
+ onCloseEvent: () => void;
26
+ primaryButtonEvent: () => void;
27
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
28
+ className: string;
29
+ size: string;
30
+ closeOnOutsideClick: boolean;
31
+ descriptionStatus: boolean;
32
+ descriptionText: string;
33
+ }>>>, {
34
+ className: string;
35
+ size: string;
36
+ closeOnOutsideClick: boolean;
37
+ descriptionStatus: boolean;
38
+ descriptionText: string;
39
+ }>;
40
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
41
+ export default _default;
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
48
+ type __VLS_TypePropsToOption<T> = {
49
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
50
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
51
+ } : {
52
+ type: import('vue').PropType<T[K]>;
53
+ required: true;
54
+ };
55
+ };
56
+ type __VLS_WithSlots<T, S> = T & {
57
+ new (): {
58
+ $scopedSlots: S;
59
+ };
60
+ };
61
+ type __VLS_PrettifyLocal<T> = {
62
+ [K in keyof T]: T[K];
63
+ } & {};
@@ -0,0 +1,25 @@
1
+ import r from "./WpDrawer.vue2.js";
2
+ import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var t = this, n = t._self._c, e = t._self._setupProxy;
5
+ return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
6
+ return e.emit("cancelOrBackButtonEvent");
7
+ }, onCloseEvent: function(o) {
8
+ return e.emit("onCloseEvent");
9
+ }, primaryButtonEvent: function(o) {
10
+ return e.emit("primaryButtonEvent");
11
+ } }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
12
+ return [n("div", [t._t("default")], 2)];
13
+ }, proxy: !0 }], null, !0) });
14
+ }, u = [], c = /* @__PURE__ */ s(
15
+ r,
16
+ i,
17
+ u,
18
+ !1,
19
+ null,
20
+ null
21
+ );
22
+ const f = c.exports;
23
+ export {
24
+ f as default
25
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { InDrawer as o } from "@useinsider/design-system-vue";
3
+ const r = /* @__PURE__ */ e({
4
+ __name: "WpDrawer",
5
+ props: {
6
+ id: null,
7
+ className: { default: "" },
8
+ size: { default: "small" },
9
+ closeOnOutsideClick: { type: Boolean, default: !0 },
10
+ descriptionStatus: { type: Boolean, default: !1 },
11
+ descriptionText: { default: "" },
12
+ footerButtonGroupOptions: null,
13
+ status: { type: Boolean },
14
+ titleText: null
15
+ },
16
+ emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent"],
17
+ setup(n, { emit: t }) {
18
+ return { __sfc: !0, emit: t, InDrawer: o };
19
+ }
20
+ });
21
+ export {
22
+ r as default
23
+ };
@@ -0,0 +1,65 @@
1
+ import type { FooterButtonGroup } from '@@/Types/preview';
2
+ type __VLS_Props = {
3
+ id: string;
4
+ title: string;
5
+ description?: string;
6
+ size?: 'small' | 'medium' | 'large';
7
+ footerButtonOptions?: FooterButtonGroup;
8
+ closeButtonStatus?: boolean;
9
+ closeOnOutsideClick?: boolean;
10
+ footerStatus?: boolean;
11
+ };
12
+ declare var __VLS_13: {};
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_13) => any;
15
+ };
16
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ description: string;
18
+ size: string;
19
+ footerButtonOptions: undefined;
20
+ closeButtonStatus: boolean;
21
+ closeOnOutsideClick: boolean;
22
+ footerStatus: boolean;
23
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
24
+ close: () => void;
25
+ "primary-action": () => void;
26
+ "secondary-action": () => void;
27
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
28
+ description: string;
29
+ size: string;
30
+ footerButtonOptions: undefined;
31
+ closeButtonStatus: boolean;
32
+ closeOnOutsideClick: boolean;
33
+ footerStatus: boolean;
34
+ }>>>, {
35
+ description: string;
36
+ size: "small" | "medium" | "large";
37
+ closeOnOutsideClick: boolean;
38
+ footerButtonOptions: FooterButtonGroup;
39
+ closeButtonStatus: boolean;
40
+ footerStatus: boolean;
41
+ }>;
42
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
43
+ export default _default;
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
50
+ type __VLS_TypePropsToOption<T> = {
51
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
52
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
53
+ } : {
54
+ type: import('vue').PropType<T[K]>;
55
+ required: true;
56
+ };
57
+ };
58
+ type __VLS_WithSlots<T, S> = T & {
59
+ new (): {
60
+ $scopedSlots: S;
61
+ };
62
+ };
63
+ type __VLS_PrettifyLocal<T> = {
64
+ [K in keyof T]: T[K];
65
+ } & {};
@@ -0,0 +1,27 @@
1
+ import r from "./WpModal.vue2.js";
2
+ import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var t = this, o = t._self._c, e = t._self._setupProxy;
5
+ return o(e.InModalV2, { attrs: { id: t.id, "description-status": "", status: "", "close-button-status": t.closeButtonStatus, "close-on-outside-click": t.closeOnOutsideClick, "description-text": t.description, "footer-button-group-options": t.footerButtonOptions, "footer-status": t.footerStatus, size: t.size, "title-text": t.title }, on: { cancelOrBackButtonEvent: function(n) {
6
+ return e.emit("close");
7
+ }, onCloseEvent: function(n) {
8
+ return e.emit("close");
9
+ }, primaryButtonEvent: function(n) {
10
+ return e.emit("primary-action");
11
+ }, secondaryButtonEvent: function(n) {
12
+ return e.emit("secondary-action");
13
+ } }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
14
+ return [t._t("default")];
15
+ }, proxy: !0 }], null, !0) });
16
+ }, u = [], c = /* @__PURE__ */ s(
17
+ r,
18
+ i,
19
+ u,
20
+ !1,
21
+ null,
22
+ null
23
+ );
24
+ const p = c.exports;
25
+ export {
26
+ p as default
27
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { InModalV2 as o } from "@useinsider/design-system-vue";
3
+ const u = /* @__PURE__ */ e({
4
+ __name: "WpModal",
5
+ props: {
6
+ id: null,
7
+ title: null,
8
+ description: { default: "" },
9
+ size: { default: "small" },
10
+ footerButtonOptions: { default: void 0 },
11
+ closeButtonStatus: { type: Boolean, default: !0 },
12
+ closeOnOutsideClick: { type: Boolean, default: !0 },
13
+ footerStatus: { type: Boolean, default: !0 }
14
+ },
15
+ emits: ["close", "primary-action", "secondary-action"],
16
+ setup(l, { emit: t }) {
17
+ return { __sfc: !0, emit: t, InModalV2: o };
18
+ }
19
+ });
20
+ export {
21
+ u as default
22
+ };
@@ -1,4 +1,8 @@
1
- import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
1
+ import type { CompileEmailOptions } from '@@/Types/actions-api';
2
+ import { GetCompiledEmailOptions, CompiledEmailResult, TemplateData } from '@@/Types/actions-api';
2
3
  export declare const useActionsApi: () => {
3
4
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
5
+ getTemplateData: () => Promise<TemplateData>;
6
+ activateCustomViewStyles: (isActive?: boolean) => void;
7
+ getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
4
8
  };
@@ -1,36 +1,79 @@
1
- const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
- const m = { ...{
3
- minimize: !0,
4
- utmEntity: {
5
- utmSource: "",
6
- utmMedium: "",
7
- utmCampaign: "",
8
- utmContent: "",
9
- utmTerm: "",
10
- customUtms: [
11
- {
12
- name1: "val1",
13
- name2: "val2"
14
- }
15
- ]
16
- },
17
- mergeTags: ["Tag1", "Tag2"],
18
- forseAmp: !1,
19
- resetDataSavedFlag: !1,
20
- disableLineHeightsReplace: !0
21
- }, ...t }, s = {
22
- callback: (e, l, n, o, c) => {
23
- e ? i(e) : a({
24
- html: l,
25
- ampHtml: n,
26
- ampErrors: o,
27
- displayConditions: c
1
+ import { useToaster as g } from "./useToaster.js";
2
+ const A = () => {
3
+ const { handleError: l } = g(), n = (t = {}) => new Promise((e, a) => {
4
+ const i = { ...{
5
+ minimize: !0,
6
+ utmEntity: {
7
+ utmSource: "",
8
+ utmMedium: "",
9
+ utmCampaign: "",
10
+ utmContent: "",
11
+ utmTerm: "",
12
+ customUtms: [
13
+ {
14
+ name1: "val1",
15
+ name2: "val2"
16
+ }
17
+ ]
18
+ },
19
+ mergeTags: ["Tag1", "Tag2"],
20
+ forseAmp: !1,
21
+ resetDataSavedFlag: !1,
22
+ disableLineHeightsReplace: !0
23
+ }, ...t }, m = {
24
+ callback: (s, c, p, u, d) => {
25
+ s ? a(s) : e({
26
+ html: c,
27
+ ampHtml: p,
28
+ ampErrors: u,
29
+ displayConditions: d
30
+ });
31
+ },
32
+ ...i
33
+ };
34
+ window.StripoEditorApi.actionsApi.compileEmail(m);
35
+ });
36
+ return {
37
+ getCompiledEmail: n,
38
+ getTemplateData: () => new Promise((t) => {
39
+ const e = ({ html: a, css: o, width: i, height: r, utmParams: m, syncModulesIds: s }) => t({
40
+ html: a,
41
+ css: o,
42
+ width: i,
43
+ height: r,
44
+ utmParams: m,
45
+ syncModulesIds: s
28
46
  });
47
+ window.StripoEditorApi.actionsApi.getTemplateData(e);
48
+ }),
49
+ activateCustomViewStyles: (t = !0) => {
50
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
29
51
  },
30
- ...m
52
+ getPreviewData: async (t) => {
53
+ try {
54
+ const {
55
+ html: e,
56
+ displayConditions: a,
57
+ ampHtml: o = "",
58
+ ampErrors: i = []
59
+ } = await n({ minimize: !1, resetDataSavedFlag: !1, ...t });
60
+ return {
61
+ html: e,
62
+ ampHtml: o,
63
+ ampErrors: i,
64
+ displayConditions: a
65
+ };
66
+ } catch (e) {
67
+ return l(e, "Error loading preview"), {
68
+ html: "",
69
+ ampHtml: "",
70
+ ampErrors: [],
71
+ displayConditions: []
72
+ };
73
+ }
74
+ }
31
75
  };
32
- window.StripoEditorApi.actionsApi.compileEmail(s);
33
- }) });
76
+ };
34
77
  export {
35
- d as useActionsApi
78
+ A as useActionsApi
36
79
  };