@useinsider/guido 1.0.0-beta.e830eab → 1.0.0-beta.e8ee5f5

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 (306) hide show
  1. package/README.md +408 -24
  2. package/dist/@types/generic.d.ts +41 -0
  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 +20 -4
  50. package/dist/components/Guido.vue.js +6 -6
  51. package/dist/components/Guido.vue2.js +83 -28
  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.js +5 -5
  83. package/dist/components/organisms/header/LeftSlot.vue2.js +10 -8
  84. package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
  85. package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -17
  86. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
  87. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  88. package/dist/components/organisms/header/RightSlot.vue2.js +30 -16
  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 +1 -1
  93. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  94. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  95. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  96. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  97. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
  98. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
  99. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
  100. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
  101. package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
  102. package/dist/components/wrappers/WpDrawer.vue.js +25 -0
  103. package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
  104. package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
  105. package/dist/components/wrappers/WpModal.vue.js +27 -0
  106. package/dist/components/wrappers/WpModal.vue2.js +22 -0
  107. package/dist/composables/useActionsApi.d.ts +5 -1
  108. package/dist/composables/useActionsApi.js +74 -31
  109. package/dist/composables/useCodeEditorApi.d.ts +4 -0
  110. package/dist/composables/useCodeEditorApi.js +11 -0
  111. package/dist/composables/useConfig.d.ts +4 -0
  112. package/dist/composables/useConfig.js +7 -0
  113. package/dist/composables/useDebounce.d.ts +4 -0
  114. package/dist/composables/useDebounce.js +12 -0
  115. package/dist/composables/useExport.d.ts +1 -1
  116. package/dist/composables/useExport.js +38 -22
  117. package/dist/composables/useGuidoActions.d.ts +46 -0
  118. package/dist/composables/useGuidoActions.js +37 -0
  119. package/dist/composables/useHtmlCompiler.d.ts +4 -0
  120. package/dist/composables/useHtmlCompiler.js +17 -0
  121. package/dist/composables/useHttp.js +23 -21
  122. package/dist/composables/usePartner.d.ts +1 -1
  123. package/dist/composables/usePartner.js +9 -14
  124. package/dist/composables/usePreviewMode.d.ts +5 -0
  125. package/dist/composables/usePreviewMode.js +31 -0
  126. package/dist/composables/useProvideInject.d.ts +14 -0
  127. package/dist/composables/useProvideInject.js +17 -0
  128. package/dist/composables/useResponsivePreview.d.ts +5 -0
  129. package/dist/composables/useResponsivePreview.js +86 -0
  130. package/dist/composables/useStripo.js +54 -32
  131. package/dist/composables/useToaster.d.ts +1 -16
  132. package/dist/composables/useToaster.js +24 -30
  133. package/dist/composables/useTranslations.js +3 -2
  134. package/dist/composables/useValidation.d.ts +56 -0
  135. package/dist/composables/useValidation.js +19 -0
  136. package/dist/composables/useVersionHistoryApi.js +11 -10
  137. package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
  138. package/dist/composables/validators/saveAsTemplate.js +24 -0
  139. package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
  140. package/dist/config/compiler/htmlCompilerRules.js +145 -0
  141. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  142. package/dist/enums/defaults.d.ts +4 -1
  143. package/dist/enums/defaults.js +21 -6
  144. package/dist/enums/preview.d.ts +13 -0
  145. package/dist/enums/preview.js +23 -0
  146. package/dist/enums/toaster.d.ts +5 -0
  147. package/dist/enums/toaster.js +4 -0
  148. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  149. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  150. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  151. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  152. package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
  153. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  154. package/dist/extensions/DynamicContent/extension.js +11 -0
  155. package/dist/guido.css +1 -1
  156. package/dist/mock/api/default-template.d.ts +2 -0
  157. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  158. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  159. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  160. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  161. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  162. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  163. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  164. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  165. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  166. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  167. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  168. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  192. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  193. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  194. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  195. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  196. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  197. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  198. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  199. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  200. package/dist/node_modules/@vueuse/shared/index.js +45 -0
  201. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  202. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  203. package/dist/node_modules/lodash-es/_apply.js +16 -0
  204. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
  205. package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
  206. package/dist/node_modules/lodash-es/_assignValue.js +10 -0
  207. package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
  208. package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
  209. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  210. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  211. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  212. package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
  213. package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
  214. package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  215. package/dist/node_modules/lodash-es/_baseRest.js +9 -0
  216. package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
  217. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  218. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  219. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  220. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  221. package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  222. package/dist/node_modules/lodash-es/_copyArray.js +9 -0
  223. package/dist/node_modules/lodash-es/_copyObject.js +14 -0
  224. package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
  225. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  226. package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
  227. package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
  228. package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
  229. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  230. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  231. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  232. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  233. package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
  234. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  235. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  236. package/dist/node_modules/lodash-es/_overRest.js +15 -0
  237. package/dist/node_modules/lodash-es/_safeGet.js +7 -0
  238. package/dist/node_modules/lodash-es/_setToString.js +6 -0
  239. package/dist/node_modules/lodash-es/_shortOut.js +16 -0
  240. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  241. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  242. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  243. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  244. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  245. package/dist/node_modules/lodash-es/constant.js +8 -0
  246. package/dist/node_modules/lodash-es/identity.js +6 -0
  247. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  248. package/dist/node_modules/lodash-es/isArray.js +4 -0
  249. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  250. package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  251. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  252. package/dist/node_modules/lodash-es/isLength.js +7 -0
  253. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  254. package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
  255. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  256. package/dist/node_modules/lodash-es/keysIn.js +9 -0
  257. package/dist/node_modules/lodash-es/merge.js +8 -0
  258. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  259. package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
  260. package/dist/node_modules/valibot/dist/index.js +190 -0
  261. package/dist/node_modules/vue-demi/lib/index.js +7 -0
  262. package/dist/services/stripoApi.d.ts +2 -1
  263. package/dist/services/stripoApi.js +27 -7
  264. package/dist/services/templateLibraryApi.d.ts +7 -0
  265. package/dist/services/templateLibraryApi.js +87 -0
  266. package/dist/static/assets/inbox-mockup.svg.js +4 -0
  267. package/dist/static/assets/phone-mockup.svg.js +4 -0
  268. package/dist/stores/dynamic-content.d.ts +27 -0
  269. package/dist/stores/dynamic-content.js +23 -0
  270. package/dist/stores/editor.d.ts +3 -1
  271. package/dist/stores/editor.js +5 -3
  272. package/dist/stores/preview.d.ts +46 -0
  273. package/dist/stores/preview.js +53 -0
  274. package/dist/stores/save-as-template.d.ts +73 -0
  275. package/dist/stores/save-as-template.js +48 -0
  276. package/dist/stores/toaster.d.ts +18 -0
  277. package/dist/stores/toaster.js +27 -0
  278. package/dist/utils/arrayUtil.d.ts +1 -0
  279. package/dist/utils/arrayUtil.js +10 -0
  280. package/dist/utils/base64.d.ts +1 -2
  281. package/dist/utils/base64.js +4 -11
  282. package/dist/utils/genericUtil.d.ts +3 -0
  283. package/dist/utils/genericUtil.js +11 -0
  284. package/dist/utils/htmlCompiler.d.ts +12 -0
  285. package/dist/utils/htmlCompiler.js +70 -0
  286. package/dist/utils/templatePreparation.d.ts +4 -0
  287. package/dist/utils/templatePreparation.js +33 -0
  288. package/dist/utils/tooltipUtils.d.ts +2 -0
  289. package/dist/utils/tooltipUtils.js +11 -0
  290. package/package.json +8 -7
  291. package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
  292. package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -22
  293. package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -79
  294. package/dist/components/wrappers/ModalWrapper.vue.d.ts +0 -72
  295. package/dist/components/wrappers/ModalWrapper.vue.js +0 -19
  296. package/dist/components/wrappers/ModalWrapper.vue2.js +0 -43
  297. package/dist/composables/useSaveAsTemplate.d.ts +0 -7
  298. package/dist/composables/useSaveAsTemplate.js +0 -44
  299. package/dist/composables/useTemplateNameValidation.d.ts +0 -13
  300. package/dist/composables/useTemplateNameValidation.js +0 -57
  301. package/dist/composables/useTemplates.d.ts +0 -5
  302. package/dist/composables/useTemplates.js +0 -27
  303. package/dist/static/templates/default/index.html.js +0 -5
  304. package/dist/static/templates/default/style.css.js +0 -119
  305. package/dist/stores/template-categories.d.ts +0 -41
  306. package/dist/stores/template-categories.js +0 -91
@@ -0,0 +1,56 @@
1
+ import { type BaseIssue, type BaseSchema, type BaseSchemaAsync } from 'valibot';
2
+ import { type Ref } from 'vue';
3
+ type Base = BaseSchema<unknown, unknown, BaseIssue<unknown>>;
4
+ type BaseAsync = BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
5
+ type MaybeRefOrGetter<T> = T | Ref<T> | (() => T);
6
+ export declare function useValidation<const Schema extends Base = Base>(input: MaybeRefOrGetter<unknown>, schema: Schema): {
7
+ schema: Schema;
8
+ validate: () => {
9
+ error: import("valibot").InferIssue<Schema> | undefined;
10
+ errorMessage: string;
11
+ typed: true;
12
+ success: true;
13
+ output: import("valibot").InferOutput<Schema>;
14
+ issues: undefined;
15
+ } | {
16
+ error: import("valibot").InferIssue<Schema> | undefined;
17
+ errorMessage: string;
18
+ typed: true;
19
+ success: false;
20
+ output: import("valibot").InferOutput<Schema>;
21
+ issues: [import("valibot").InferIssue<Schema>, ...import("valibot").InferIssue<Schema>[]];
22
+ } | {
23
+ error: import("valibot").InferIssue<Schema> | undefined;
24
+ errorMessage: string;
25
+ typed: false;
26
+ success: false;
27
+ output: unknown;
28
+ issues: [import("valibot").InferIssue<Schema>, ...import("valibot").InferIssue<Schema>[]];
29
+ };
30
+ };
31
+ export declare function useAsyncValidation<const Schema extends BaseAsync = BaseAsync>(input: MaybeRefOrGetter<unknown>, schema: Schema): {
32
+ schema: Schema;
33
+ validate: () => Promise<{
34
+ error: import("valibot").InferIssue<Schema> | undefined;
35
+ errorMessage: string;
36
+ typed: true;
37
+ success: true;
38
+ output: import("valibot").InferOutput<Schema>;
39
+ issues: undefined;
40
+ } | {
41
+ error: import("valibot").InferIssue<Schema> | undefined;
42
+ errorMessage: string;
43
+ typed: true;
44
+ success: false;
45
+ output: import("valibot").InferOutput<Schema>;
46
+ issues: [import("valibot").InferIssue<Schema>, ...import("valibot").InferIssue<Schema>[]];
47
+ } | {
48
+ error: import("valibot").InferIssue<Schema> | undefined;
49
+ errorMessage: string;
50
+ typed: false;
51
+ success: false;
52
+ output: unknown;
53
+ issues: [import("valibot").InferIssue<Schema>, ...import("valibot").InferIssue<Schema>[]];
54
+ }>;
55
+ };
56
+ export {};
@@ -0,0 +1,19 @@
1
+ import { safeParseAsync as i } from "../node_modules/valibot/dist/index.js";
2
+ import { unref as n } from "vue";
3
+ function c(o, e) {
4
+ return {
5
+ schema: e,
6
+ validate: async () => {
7
+ var s, t, a;
8
+ const r = await i(e, n(o), { abortPipeEarly: !0 });
9
+ return {
10
+ ...r,
11
+ error: (s = r.issues) == null ? void 0 : s[0],
12
+ errorMessage: ((a = (t = r.issues) == null ? void 0 : t[0]) == null ? void 0 : a.message) || ""
13
+ };
14
+ }
15
+ };
16
+ }
17
+ export {
18
+ c as useAsyncValidation
19
+ };
@@ -1,14 +1,15 @@
1
- import { useVersionHistoryStore as p } from "../stores/version-history.js";
2
- import { useToaster as c } from "./useToaster.js";
3
- const l = () => {
4
- const i = p(), { showToaster: s } = c(), t = (e) => {
1
+ import { ToasterTypeOptions as t } from "../enums/toaster.js";
2
+ import { useVersionHistoryStore as c } from "../stores/version-history.js";
3
+ import { useToaster as w } from "./useToaster.js";
4
+ const S = () => {
5
+ const i = c(), { showToaster: s } = w(), n = (e) => {
5
6
  i.$reset(), i.updateState(e);
6
- }, n = () => {
7
+ }, p = () => {
7
8
  i.$reset();
8
9
  };
9
10
  return {
10
11
  openVersionHistory: () => {
11
- window.StripoEditorApi.versionHistoryApi.openVersionHistory(t, n);
12
+ window.StripoEditorApi.versionHistoryApi.openVersionHistory(n, p);
12
13
  },
13
14
  closeVersionHistory: () => {
14
15
  window.StripoEditorApi.versionHistoryApi.closeVersionHistory();
@@ -23,7 +24,7 @@ const l = () => {
23
24
  window.StripoEditorApi.versionHistoryApi.previewVersion(e, (o) => {
24
25
  const r = o instanceof Error ? o.message : String(o);
25
26
  s({
26
- type: "error",
27
+ type: t.Alert,
27
28
  message: `Error compiling email: ${r}`
28
29
  });
29
30
  });
@@ -33,14 +34,14 @@ const l = () => {
33
34
  e,
34
35
  () => {
35
36
  s({
36
- type: "success",
37
+ type: t.Success,
37
38
  message: `${e} patch restored successfully.`
38
39
  });
39
40
  },
40
41
  (o) => {
41
42
  const r = o instanceof Error ? o.message : String(o);
42
43
  s({
43
- type: "error",
44
+ type: t.Alert,
44
45
  message: `Error compiling email: ${r}`
45
46
  });
46
47
  }
@@ -49,5 +50,5 @@ const l = () => {
49
50
  };
50
51
  };
51
52
  export {
52
- l as useVersionHistoryApi
53
+ S as useVersionHistoryApi
53
54
  };
@@ -0,0 +1,31 @@
1
+ import type { Ref } from 'vue';
2
+ /**
3
+ * @description Validates template name with basic checks and availability.
4
+ * @param name - Input value
5
+ * @returns Combined validation with name availability check
6
+ */
7
+ export declare const useTemplateNameValidator: (name: Ref<string>) => {
8
+ schema: import("valibot").SchemaWithPipeAsync<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").NonEmptyAction<string, string>, import("valibot").MaxLengthAction<string, 255, string>, import("valibot").CheckActionAsync<string, string>]>;
9
+ validate: () => Promise<{
10
+ error: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string> | undefined;
11
+ errorMessage: string;
12
+ typed: true;
13
+ success: true;
14
+ output: string;
15
+ issues: undefined;
16
+ } | {
17
+ error: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string> | undefined;
18
+ errorMessage: string;
19
+ typed: true;
20
+ success: false;
21
+ output: string;
22
+ issues: [import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string>, ...(import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string>)[]];
23
+ } | {
24
+ error: import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string> | undefined;
25
+ errorMessage: string;
26
+ typed: false;
27
+ success: false;
28
+ output: unknown;
29
+ issues: [import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string>, ...(import("valibot").StringIssue | import("valibot").NonEmptyIssue<string> | import("valibot").MaxLengthIssue<string, 255> | import("valibot").CheckIssue<string>)[]];
30
+ }>;
31
+ };
@@ -0,0 +1,24 @@
1
+ import { useTemplateLibraryApi as i } from "../../services/templateLibraryApi.js";
2
+ import { pipeAsync as m, checkAsync as s, maxLength as n, nonEmpty as o, trim as c, string as p } from "../../node_modules/valibot/dist/index.js";
3
+ import { useTranslations as l } from "../useTranslations.js";
4
+ import { useAsyncValidation as u } from "../useValidation.js";
5
+ const x = (a) => {
6
+ const e = l(), { checkTemplateNameAvailability: r } = i(), t = 255;
7
+ return u(a, m(
8
+ p(),
9
+ c(),
10
+ o(e("whatsapp-business.template-name-required")),
11
+ n(
12
+ t,
13
+ e("validations.enter-up-to-x-characters", {
14
+ article: "a",
15
+ field: e("products.template-name"),
16
+ max: t
17
+ })
18
+ ),
19
+ s(r, e("save-product-card.name-error"))
20
+ ));
21
+ };
22
+ export {
23
+ x as useTemplateNameValidator
24
+ };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const defaultHtmlCompilerRules: CompilerRule[];
@@ -0,0 +1,145 @@
1
+ const a = [
2
+ {
3
+ id: "fix-url-encoding-start",
4
+ description: "Replace {%22 with %7B%22 to fix URL encoding",
5
+ type: "replace",
6
+ search: "{%22",
7
+ replacement: "%7B%22",
8
+ replaceAll: !0,
9
+ priority: 10
10
+ },
11
+ {
12
+ id: "fix-url-encoding-end",
13
+ description: "Replace %22} with %22%7D to fix URL encoding",
14
+ type: "replace",
15
+ search: "%22}",
16
+ replacement: "%22%7D",
17
+ replaceAll: !0,
18
+ priority: 10
19
+ },
20
+ {
21
+ id: "fix-tags-start",
22
+ description: "Replace %7B%7B with {{ to fix URL encoding",
23
+ type: "replace",
24
+ search: "%7B%7B",
25
+ replacement: "{{",
26
+ replaceAll: !0,
27
+ priority: 11
28
+ },
29
+ {
30
+ id: "fix-tags-end",
31
+ description: "Replace %7D%7D with }} to fix URL encoding",
32
+ type: "replace",
33
+ search: "%7D%7D",
34
+ replacement: "}}",
35
+ replaceAll: !0,
36
+ priority: 12
37
+ },
38
+ {
39
+ id: "unescape-inequality-operators-start",
40
+ description: "Replace &lt; with < to fix URL encoding",
41
+ type: "replace",
42
+ search: "&lt;",
43
+ replacement: "<",
44
+ replaceAll: !0,
45
+ priority: 13
46
+ },
47
+ {
48
+ id: "unescape-inequality-operators-end",
49
+ description: "Replace &gt; with > to fix URL encoding",
50
+ type: "replace",
51
+ search: "&gt;",
52
+ replacement: ">",
53
+ replaceAll: !0,
54
+ priority: 14
55
+ },
56
+ {
57
+ id: "remove-apty-iframe",
58
+ description: "Cleanup Apty Iframe Code",
59
+ type: "remove",
60
+ targets: [
61
+ '<iframe src="about:blank" id="letznav-iframe-script" allowtransparency="true" style="width:1px;height:1px"></iframe>',
62
+ 'src="about:blank" id="letznav-iframe-script" allowtransparency="true" style="width:1px;height:1px"></iframe>'
63
+ ],
64
+ priority: 20
65
+ },
66
+ {
67
+ id: "remove-apty-styles",
68
+ description: "Removing Apty Styles",
69
+ type: "regex",
70
+ pattern: '<styles*data-styles="apty_styles"s* type="text/css"s*>((s|.)*?)</style>',
71
+ replacement: "",
72
+ flags: "g",
73
+ priority: 21
74
+ },
75
+ {
76
+ id: "remove-mso-conditions",
77
+ description: "Removing MSO Conditions",
78
+ type: "remove",
79
+ targets: [
80
+ /<!--\[if\s\(mso 16\)\]>\s*<style\s*\S*>\s*a\s*\{\s*text-decoration\s*:\s*none\s*;*\s*\}\s*<\/style>\s*<!\[endif\]-->/g,
81
+ /<!--\[if\sgte mso 9\]>\s*<style\s*\S*>\s*sup\s*\{\s*font-size\s*:\s*100%\s*!important\s*;*\s*\}\s*<\/style>\s*<!\[endif\]-->/g,
82
+ /<!--\[if\sgte mso 9\]>\s*<noscript>\s*<xml>\s*<o:OfficeDocumentSettings>\s*<o:AllowPNG>\s*<\/o:AllowPNG>\s*<o:PixelsPerInch>\d+<\/o:PixelsPerInch>\s*<\/o:OfficeDocumentSettings>\s*<\/xml>\s*<\/noscript>\s*<!\[endif\]-->/g,
83
+ /<!--\[if mso\]>\s*<xml>\s*<w:WordDocument\s+xmlns:w="urn:schemas-microsoft-com:office:word">\s*<w:DontUseAdvancedTypographyReadingMail><\/w:DontUseAdvancedTypographyReadingMail>\s*<\/w:WordDocument>\s*<\/xml>\s*<!\[endif\]-->/g,
84
+ /<\!--\[if \!mso\]><\!--\s*\d*\s*-->\s*<\!--\[if \!mso\]><\!--\s*\d*\s*-->\s*<\!--<!\[endif\]-->/g,
85
+ /<!--\[if\s\!mso\]>\s*<!-- \d -->/g
86
+ ],
87
+ priority: 22
88
+ },
89
+ {
90
+ id: "add-mso-conditions",
91
+ description: "Adding MSO Conditions",
92
+ type: "custom",
93
+ processor: (e) => {
94
+ const t = [
95
+ `<!--[if gte mso 9]>
96
+ <style>sup {
97
+ font-size: 100% !important;
98
+ }</style><![endif]-->`,
99
+ `<!--[if gte mso 9]>
100
+ <noscript>
101
+ <xml>
102
+ <o:OfficeDocumentSettings>
103
+ <o:AllowPNG></o:AllowPNG>
104
+ <o:PixelsPerInch>96</o:PixelsPerInch>
105
+ </o:OfficeDocumentSettings>
106
+ </xml>
107
+ </noscript><![endif]-->`,
108
+ `<!--[if mso]>
109
+ <xml>
110
+ <w:WordDocument xmlns:w="urn:schemas-microsoft-com:office:word">
111
+ <w:DontUseAdvancedTypographyReadingMail></w:DontUseAdvancedTypographyReadingMail>
112
+ </w:WordDocument>
113
+ </xml><![endif]-->`
114
+ ], s = /<head>([\S\s]*)<\/head>/, o = new RegExp(s);
115
+ if (!e.match(o))
116
+ return e;
117
+ let i = e;
118
+ return t.forEach((r) => {
119
+ i = i.replace("</head>", `${r}</head>`);
120
+ }), i;
121
+ },
122
+ priority: 30
123
+ },
124
+ {
125
+ id: "replace-old-image-domain",
126
+ description: "Replacing old image domains",
127
+ type: "replace",
128
+ search: "stripo-editor-image.s3-eu-west-1.amazonaws.com",
129
+ replacement: "email-static.useinsider.com",
130
+ replaceAll: !0,
131
+ priority: 40
132
+ },
133
+ {
134
+ id: "replace-old-v2-image-domain",
135
+ description: "Replacing old image domains",
136
+ type: "replace",
137
+ search: "email.static.useinsider.com",
138
+ replacement: "email-static.useinsider.com",
139
+ replaceAll: !0,
140
+ priority: 41
141
+ }
142
+ ];
143
+ export {
144
+ a as defaultHtmlCompilerRules
145
+ };
File without changes
@@ -1,4 +1,7 @@
1
1
  import type { GuidoConfig } from '@@/Types/generic';
2
2
  export declare const DefaultGuidoConfig: GuidoConfig;
3
- export declare const DefaultProductType = "newsletter";
3
+ export declare const DefaultProductType = "email";
4
4
  export declare const DefaultUsername = "Guido User";
5
+ export declare const DefaultMessageType = 1;
6
+ export declare const EditorType: number;
7
+ export declare const ProductIds: Record<string, number>;
@@ -1,8 +1,23 @@
1
- const t = {
2
- translationsPath: "window.trans.en"
3
- }, e = "newsletter", n = "Guido User";
1
+ const e = {
2
+ translationsPath: "window.trans.en",
3
+ emailHeader: {
4
+ senderName: "",
5
+ subject: ""
6
+ },
7
+ features: {
8
+ dynamicContent: !0,
9
+ saveAsTemplate: !0,
10
+ versionHistory: !0
11
+ }
12
+ }, t = "email", s = "Guido User", a = 1, n = 2, o = {
13
+ email: 60,
14
+ architect: 49
15
+ };
4
16
  export {
5
- t as DefaultGuidoConfig,
6
- e as DefaultProductType,
7
- n as DefaultUsername
17
+ e as DefaultGuidoConfig,
18
+ a as DefaultMessageType,
19
+ t as DefaultProductType,
20
+ s as DefaultUsername,
21
+ n as EditorType,
22
+ o as ProductIds
8
23
  };
@@ -0,0 +1,13 @@
1
+ export declare const ResponsivePreviewConfig: {
2
+ DEFAULT_WIDTH: number;
3
+ MIN_SCALE: number;
4
+ RESIZE_DEBOUNCE_MS: number;
5
+ };
6
+ export declare const ResponsivePreviewRegex: {
7
+ INLINE_WIDTH: RegExp;
8
+ TABLE_WIDTH: RegExp;
9
+ META_VIEWPORT: RegExp;
10
+ };
11
+ export declare const ResponsivePreviewSelectors: {
12
+ CONTAINERS: string[];
13
+ };
@@ -0,0 +1,23 @@
1
+ const e = {
2
+ DEFAULT_WIDTH: 600,
3
+ MIN_SCALE: 0.2,
4
+ RESIZE_DEBOUNCE_MS: 100
5
+ }, i = {
6
+ INLINE_WIDTH: /width\s*:\s*(\d+(\.\d+)?)px/i,
7
+ TABLE_WIDTH: /^(\d+(\.\d+)?)(px)?$/i,
8
+ META_VIEWPORT: /width\s*=\s*device-width/i
9
+ }, n = {
10
+ CONTAINERS: [
11
+ ".wrapper",
12
+ ".container",
13
+ "#wrapper",
14
+ "#container",
15
+ "[data-email-container]",
16
+ '[role="presentation"]'
17
+ ]
18
+ };
19
+ export {
20
+ e as ResponsivePreviewConfig,
21
+ i as ResponsivePreviewRegex,
22
+ n as ResponsivePreviewSelectors
23
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum ToasterTypeOptions {
2
+ Success = "success",
3
+ Warning = "warning",
4
+ Alert = "alert"
5
+ }
@@ -0,0 +1,4 @@
1
+ var c = /* @__PURE__ */ ((r) => (r.Success = "success", r.Warning = "warning", r.Alert = "alert", r))(c || {});
2
+ export {
3
+ c as ToasterTypeOptions
4
+ };
@@ -0,0 +1,6 @@
1
+ import type { DynamicContent } from '@@/Types/generic';
2
+ export declare class ExternalMergeTagsLibrary {
3
+ selectedDynamicContent: DynamicContent | null;
4
+ dataSelectCallback: (data: DynamicContent) => void;
5
+ openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
6
+ }
@@ -0,0 +1,27 @@
1
+ var i = Object.defineProperty;
2
+ var d = (t, e, n) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var a = (t, e, n) => d(t, typeof e != "symbol" ? e + "" : e, n);
4
+ class y {
5
+ constructor() {
6
+ a(this, "selectedDynamicContent", null);
7
+ a(this, "dataSelectCallback", () => {
8
+ });
9
+ }
10
+ openMergeTagsLibrary(e, n) {
11
+ this.dataSelectCallback = n, this.selectedDynamicContent = e;
12
+ const s = new CustomEvent("dynamic-content:open", {
13
+ detail: {
14
+ attribute: e
15
+ }
16
+ });
17
+ document.dispatchEvent(s);
18
+ const o = (l) => {
19
+ const c = l.detail;
20
+ this.selectedDynamicContent = c, c.text && c.value && this.dataSelectCallback(c), document.removeEventListener("dynamic-content:close", o);
21
+ };
22
+ document.addEventListener("dynamic-content:close", o);
23
+ }
24
+ }
25
+ export {
26
+ y as ExternalMergeTagsLibrary
27
+ };
@@ -0,0 +1,24 @@
1
+ const n = `
2
+ #guido__btn-add-dynamic-content {
3
+ background-color: transparent;
4
+ }
5
+
6
+ #guido__btn-add-dynamic-content > button {
7
+ color: var(--guido-color-primary-500);
8
+ background-color: transparent;
9
+ box-shadow: none;
10
+ padding: 0;
11
+ border: none;
12
+ }
13
+
14
+ #guido__btn-add-dynamic-content > button:hover {
15
+ text-decoration: underline;
16
+ }
17
+
18
+ .color-primary {
19
+ color: var(--guido-color-primary-500) !important;
20
+ }
21
+ `;
22
+ export {
23
+ n as default
24
+ };
@@ -0,0 +1,16 @@
1
+ import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
2
+ export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
3
+ registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
4
+ }
5
+ export declare class DynamicContentUiElementExtension extends UIElement {
6
+ private mergeTagsButton;
7
+ private listener;
8
+ private mergeTagsLibrary;
9
+ private selectedDynamicContent;
10
+ getId(): string;
11
+ onRender(container: HTMLElement): void;
12
+ onDestroy(): void;
13
+ _onClick(): void;
14
+ openMergeTagLibrary(): void;
15
+ getTemplate(): string;
16
+ }
@@ -0,0 +1,61 @@
1
+ var o = Object.defineProperty;
2
+ var m = (i, t, e) => t in i ? o(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var r = (i, t, e) => m(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { dynamicContentToMergeTags as l } from "../../utils/genericUtil.js";
5
+ import { d as n } from "../../_virtual/index.js";
6
+ import { ExternalMergeTagsLibrary as g } from "./dynamic-content-modal.js";
7
+ const a = "external-dynamic-content-ui-element", c = "button-add-dynamic-content";
8
+ class p extends n.UIElementTagRegistry {
9
+ registerUiElements(t) {
10
+ t[n.UIElementType.MERGETAGS] = a;
11
+ }
12
+ }
13
+ class u extends n.UIElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ r(this, "mergeTagsButton", null);
17
+ r(this, "listener", () => {
18
+ });
19
+ r(this, "mergeTagsLibrary", null);
20
+ r(this, "selectedDynamicContent", { value: "", text: "" });
21
+ }
22
+ getId() {
23
+ return a;
24
+ }
25
+ onRender(e) {
26
+ var s;
27
+ this.listener = this._onClick.bind(this), this.mergeTagsButton = e.querySelector("#guido__btn-add-dynamic-content"), (s = this.mergeTagsButton) == null || s.addEventListener("click", this.listener);
28
+ }
29
+ onDestroy() {
30
+ var e;
31
+ (e = this.mergeTagsButton) == null || e.removeEventListener("click", this.listener);
32
+ }
33
+ _onClick() {
34
+ this.openMergeTagLibrary();
35
+ }
36
+ openMergeTagLibrary() {
37
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new g()), this.mergeTagsLibrary.openMergeTagsLibrary(
38
+ this.selectedDynamicContent,
39
+ (e) => {
40
+ this.api.onValueChanged(l([e])[0]);
41
+ }
42
+ );
43
+ }
44
+ getTemplate() {
45
+ return `
46
+ <div>
47
+ <${n.UIElementType.BUTTON}
48
+ id="guido__btn-add-dynamic-content"
49
+ class="btn btn-primary"
50
+ ${n.UEAttr.BUTTON.name}="${c}">
51
+ <${n.UIElementType.ICON} src="plus" class="icon icon-button color-primary">
52
+ </${n.UIElementType.ICON}>
53
+ ${this.api.translate("Add Dynamic Content")}
54
+ </${n.UIElementType.BUTTON}>
55
+ </div>`;
56
+ }
57
+ }
58
+ export {
59
+ p as DynamicContentTagRegistry,
60
+ u as DynamicContentUiElementExtension
61
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { d as t } from "../../_virtual/index.js";
2
+ import { DynamicContentUiElementExtension as n, DynamicContentTagRegistry as i } from "./dynamic-content.js";
3
+ import e from "./dynamic-content.css.js";
4
+ const s = new t.ExtensionBuilder().addUiElement(n).withStyles(e).withLocalization({
5
+ en: {
6
+ "Add Dynamic Content": "Add Dynamic Content"
7
+ }
8
+ }).withUiElementTagRegistry(i).build();
9
+ export {
10
+ s as default
11
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .version-history-item[data-v-0e2ff42d]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-69c35c60],.guido-editor__container[data-v-69c35c60]{width:100%;height:calc(100vh - 75px)}
1
+ .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-aad05c54] .guido__view-option-selection-desktop svg,[data-v-aad05c54] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-aad05c54] .in-segments-wrapper__button_selected,[data-v-aad05c54] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-aad05c54] .in-tooltip-wrapper__icon{cursor:pointer}.guido-editor__wrapper[data-v-84c43576],.guido-editor__container[data-v-84c43576]{width:100%;height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { __exports as e } from "../../../../_virtual/Extension.js";
2
+ var o;
3
+ function m() {
4
+ if (o) return e;
5
+ o = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.Extension = void 0;
6
+ var a = (
7
+ /** @class */
8
+ (function() {
9
+ function t(u, l, i, y, n, p, r, s, h, g, c, f, x, E, d) {
10
+ i === void 0 && (i = []), n === void 0 && (n = []), r === void 0 && (r = []), s === void 0 && (s = []), this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = u, this.styles = l, this.previewStyles = c, this.uiElements = i, this.uiElementTagRegistry = y, this.controls = n, this.settingsPanelRegistry = p, this.contextActions = r, this.blocks = s, this.externalSmartElementsLibrary = h, this.externalImageLibrary = g, this.externalAiAssistant = f, this.externalDisplayConditionsLibrary = x, this.externalVideoLibrary = E, this.blocksPanel = d, this.id = Math.random().toString(36).substring(2);
11
+ }
12
+ return t.prototype.getI18n = function() {
13
+ return this.i18n;
14
+ }, t.prototype.getStyles = function() {
15
+ return this.styles;
16
+ }, t.prototype.getPreviewStyles = function() {
17
+ return this.previewStyles;
18
+ }, t.prototype.getUiElements = function() {
19
+ return this.uiElements;
20
+ }, t.prototype.getUiElementTagRegistry = function() {
21
+ return this.uiElementTagRegistry;
22
+ }, t.prototype.getControls = function() {
23
+ return this.controls;
24
+ }, t.prototype.getSettingsPanelRegistry = function() {
25
+ return this.settingsPanelRegistry;
26
+ }, t.prototype.getContextActions = function() {
27
+ return this.contextActions;
28
+ }, t.prototype.getBlocks = function() {
29
+ return this.blocks;
30
+ }, t.prototype.getId = function() {
31
+ return this.id;
32
+ }, t.prototype.getExternalSmartElementsLibrary = function() {
33
+ return this.externalSmartElementsLibrary;
34
+ }, t.prototype.getExternalImageLibrary = function() {
35
+ return this.externalImageLibrary;
36
+ }, t.prototype.getExternalAiAssistant = function() {
37
+ return this.externalAiAssistant;
38
+ }, t.prototype.getExternalDisplayConditionsLibrary = function() {
39
+ return this.externalDisplayConditionsLibrary;
40
+ }, t.prototype.getExternalVideoLibrary = function() {
41
+ return this.externalVideoLibrary;
42
+ }, t.prototype.getBlocksPanel = function() {
43
+ return this.blocksPanel;
44
+ }, t;
45
+ })()
46
+ );
47
+ return e.Extension = a, e;
48
+ }
49
+ export {
50
+ m as __require
51
+ };