@useinsider/guido 1.0.0-beta.ef5e504 → 1.0.0-beta.f2fcf4d

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 (271) hide show
  1. package/README.md +84 -425
  2. package/dist/@types/generic.d.ts +4 -13
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +2 -18
  5. package/dist/components/Guido.vue.js +7 -7
  6. package/dist/components/Guido.vue2.js +15 -59
  7. package/dist/components/organisms/{header/HeaderWrapper.vue.js → top-bar/Header.vue.js} +7 -7
  8. package/dist/components/organisms/top-bar/Header.vue2.js +14 -0
  9. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.d.ts +2 -0
  10. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.js +17 -0
  11. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +11 -0
  12. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.d.ts +2 -0
  13. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +17 -0
  14. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +11 -0
  15. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.d.ts +2 -0
  16. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +18 -0
  17. package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +14 -0
  18. package/dist/composables/useCustomInterfaceAppearance.js +9 -45
  19. package/dist/composables/useStripo.d.ts +2 -2
  20. package/dist/composables/useStripo.js +50 -73
  21. package/dist/composables/useTemplates.d.ts +5 -0
  22. package/dist/composables/useTemplates.js +27 -0
  23. package/dist/composables/useToaster.d.ts +0 -1
  24. package/dist/composables/useTranslations.d.ts +3 -1
  25. package/dist/enums/defaults.enum.d.ts +18 -0
  26. package/dist/guido.css +1 -1
  27. package/dist/library.d.ts +0 -1
  28. package/dist/static/editor.css.js +182 -0
  29. package/dist/static/templates/default/index.html.js +5 -0
  30. package/dist/static/templates/default/style.css.js +119 -0
  31. package/dist/stores/counter.d.ts +12 -0
  32. package/package.json +5 -6
  33. package/dist/_virtual/AddCustomFont.js +0 -4
  34. package/dist/_virtual/AiAssistantValueType.js +0 -4
  35. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  36. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  37. package/dist/_virtual/Block.js +0 -4
  38. package/dist/_virtual/BlockAttributes.js +0 -4
  39. package/dist/_virtual/BlockCompositionType.js +0 -4
  40. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  41. package/dist/_virtual/BlockRenderer.js +0 -4
  42. package/dist/_virtual/BlockType.js +0 -4
  43. package/dist/_virtual/BlocksPanel.js +0 -4
  44. package/dist/_virtual/BuiltInControl.js +0 -4
  45. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  46. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  47. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  48. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  49. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  50. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  51. package/dist/_virtual/ContextAction.js +0 -4
  52. package/dist/_virtual/ContextActionType.js +0 -4
  53. package/dist/_virtual/Control.js +0 -4
  54. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  55. package/dist/_virtual/Extension.js +0 -4
  56. package/dist/_virtual/ExtensionBuilder.js +0 -4
  57. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  58. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  59. package/dist/_virtual/ModificationDescription.js +0 -4
  60. package/dist/_virtual/PanelPosition.js +0 -4
  61. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  62. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  63. package/dist/_virtual/SettingsPanelTab.js +0 -4
  64. package/dist/_virtual/SettingsTab.js +0 -4
  65. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  66. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  67. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  68. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  69. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  70. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  71. package/dist/_virtual/UIElement.js +0 -4
  72. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  73. package/dist/_virtual/UIElementType.js +0 -4
  74. package/dist/_virtual/UIElementsAttributes.js +0 -4
  75. package/dist/_virtual/index.js +0 -5
  76. package/dist/_virtual/index2.js +0 -4
  77. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +0 -16
  78. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +0 -22
  79. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +0 -28
  80. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +0 -16
  81. package/dist/components/organisms/design-preview/EmailPreview.vue.js +0 -17
  82. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +0 -37
  83. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +0 -18
  84. package/dist/components/organisms/design-preview/EmailView.vue.js +0 -19
  85. package/dist/components/organisms/design-preview/EmailView.vue2.js +0 -24
  86. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +0 -17
  87. package/dist/components/organisms/design-preview/InboxView.vue.js +0 -19
  88. package/dist/components/organisms/design-preview/InboxView.vue2.js +0 -23
  89. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +0 -17
  90. package/dist/components/organisms/design-preview/MobilePreview.vue.js +0 -17
  91. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +0 -22
  92. package/dist/components/organisms/header/AmpErrorModal.vue.d.ts +0 -16
  93. package/dist/components/organisms/header/AmpErrorModal.vue.js +0 -21
  94. package/dist/components/organisms/header/AmpErrorModal.vue2.js +0 -27
  95. package/dist/components/organisms/header/AmpToggle.vue.js +0 -19
  96. package/dist/components/organisms/header/AmpToggle.vue2.js +0 -38
  97. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +0 -2
  98. package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -14
  99. package/dist/components/organisms/header/LeftSlot.vue.d.ts +0 -2
  100. package/dist/components/organisms/header/LeftSlot.vue.js +0 -17
  101. package/dist/components/organisms/header/LeftSlot.vue2.js +0 -13
  102. package/dist/components/organisms/header/MiddleSlot.vue.d.ts +0 -2
  103. package/dist/components/organisms/header/MiddleSlot.vue.js +0 -17
  104. package/dist/components/organisms/header/MiddleSlot.vue2.js +0 -26
  105. package/dist/components/organisms/header/RightSlot.vue.d.ts +0 -2
  106. package/dist/components/organisms/header/RightSlot.vue.js +0 -17
  107. package/dist/components/organisms/header/RightSlot.vue2.js +0 -21
  108. package/dist/components/organisms/header/ViewOptions.vue.d.ts +0 -2
  109. package/dist/components/organisms/header/ViewOptions.vue.js +0 -18
  110. package/dist/components/organisms/header/ViewOptions.vue2.js +0 -15
  111. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
  112. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
  113. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
  114. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +0 -14
  115. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +0 -22
  116. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +0 -18
  117. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -16
  118. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +0 -18
  119. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +0 -16
  120. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +0 -2
  121. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +0 -18
  122. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +0 -23
  123. package/dist/composables/useActionsApi.d.ts +0 -5
  124. package/dist/composables/useActionsApi.js +0 -38
  125. package/dist/composables/useDebounce.d.ts +0 -4
  126. package/dist/composables/useDebounce.js +0 -12
  127. package/dist/composables/useExport.d.ts +0 -3
  128. package/dist/composables/useExport.js +0 -45
  129. package/dist/composables/useHtmlCompiler.d.ts +0 -4
  130. package/dist/composables/useHtmlCompiler.js +0 -16
  131. package/dist/composables/useHttp.js +0 -84
  132. package/dist/composables/useMobileGmailFit.d.ts +0 -5
  133. package/dist/composables/useMobileGmailFit.js +0 -69
  134. package/dist/composables/usePartner.d.ts +0 -4
  135. package/dist/composables/usePartner.js +0 -16
  136. package/dist/composables/usePreviewMode.d.ts +0 -6
  137. package/dist/composables/usePreviewMode.js +0 -19
  138. package/dist/composables/useToaster.js +0 -37
  139. package/dist/composables/useTranslations.js +0 -18
  140. package/dist/composables/useVersionHistoryApi.d.ts +0 -8
  141. package/dist/composables/useVersionHistoryApi.js +0 -53
  142. package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
  143. package/dist/config/compiler/htmlCompilerRules.js +0 -145
  144. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  145. package/dist/enums/defaults.d.ts +0 -4
  146. package/dist/enums/defaults.js +0 -8
  147. package/dist/enums/displayConditions.d.ts +0 -2
  148. package/dist/enums/displayConditions.js +0 -80
  149. package/dist/enums/gmailMobilePreview.d.ts +0 -7
  150. package/dist/enums/gmailMobilePreview.js +0 -17
  151. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  152. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  153. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  154. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  155. package/dist/extensions/DynamicContent/dynamic-content.js +0 -63
  156. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  157. package/dist/extensions/DynamicContent/extension.js +0 -11
  158. package/dist/guido.png +0 -0
  159. package/dist/inbox-mockup.svg +0 -41
  160. package/dist/mock/api/custom-fonts.d.ts +0 -2
  161. package/dist/mock/api/default-template.d.ts +0 -2
  162. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  163. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  164. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  165. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  166. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  167. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  168. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  192. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  193. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  194. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  195. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  196. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  197. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  198. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  199. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  200. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  201. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  202. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  203. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  204. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  205. package/dist/node_modules/lodash-es/_Hash.js +0 -20
  206. package/dist/node_modules/lodash-es/_ListCache.js +0 -20
  207. package/dist/node_modules/lodash-es/_Map.js +0 -6
  208. package/dist/node_modules/lodash-es/_MapCache.js +0 -20
  209. package/dist/node_modules/lodash-es/_Symbol.js +0 -5
  210. package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
  211. package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
  212. package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
  213. package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
  214. package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
  215. package/dist/node_modules/lodash-es/_getMapData.js +0 -8
  216. package/dist/node_modules/lodash-es/_getNative.js +0 -9
  217. package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
  218. package/dist/node_modules/lodash-es/_getValue.js +0 -6
  219. package/dist/node_modules/lodash-es/_hashClear.js +0 -7
  220. package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
  221. package/dist/node_modules/lodash-es/_hashGet.js +0 -13
  222. package/dist/node_modules/lodash-es/_hashHas.js +0 -9
  223. package/dist/node_modules/lodash-es/_hashSet.js +0 -9
  224. package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
  225. package/dist/node_modules/lodash-es/_isMasked.js +0 -11
  226. package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
  227. package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
  228. package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
  229. package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
  230. package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
  231. package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
  232. package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  233. package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
  234. package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
  235. package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
  236. package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
  237. package/dist/node_modules/lodash-es/_objectToString.js +0 -7
  238. package/dist/node_modules/lodash-es/_root.js +0 -5
  239. package/dist/node_modules/lodash-es/_toSource.js +0 -17
  240. package/dist/node_modules/lodash-es/eq.js +0 -6
  241. package/dist/node_modules/lodash-es/isFunction.js +0 -12
  242. package/dist/node_modules/lodash-es/isObject.js +0 -7
  243. package/dist/node_modules/lodash-es/memoize.js +0 -18
  244. package/dist/phone-mockup.svg +0 -31
  245. package/dist/services/stripoApi.d.ts +0 -8
  246. package/dist/services/stripoApi.js +0 -45
  247. package/dist/static/styles/base.css.js +0 -11
  248. package/dist/static/styles/components/alert-message.css.js +0 -39
  249. package/dist/static/styles/components/amp-block.css.js +0 -18
  250. package/dist/static/styles/components/base-input.css.js +0 -47
  251. package/dist/static/styles/components/button-group.css.js +0 -54
  252. package/dist/static/styles/components/button.css.js +0 -106
  253. package/dist/static/styles/components/combobox.css.js +0 -49
  254. package/dist/static/styles/components/counter.css.js +0 -42
  255. package/dist/static/styles/components/dropdown-menu.css.js +0 -52
  256. package/dist/static/styles/components/narrow-panel.css.js +0 -38
  257. package/dist/static/styles/components/switcher.css.js +0 -11
  258. package/dist/static/styles/components/tabs.css.js +0 -97
  259. package/dist/static/styles/components/tools.css.js +0 -23
  260. package/dist/static/styles/components/version-history.css.js +0 -30
  261. package/dist/static/styles/components/wide-panel.css.js +0 -135
  262. package/dist/static/styles/variables.css.js +0 -23
  263. package/dist/stores/editor.d.ts +0 -9
  264. package/dist/stores/editor.js +0 -15
  265. package/dist/stores/version-history.d.ts +0 -80
  266. package/dist/stores/version-history.js +0 -28
  267. package/dist/utils/dateUtil.d.ts +0 -1
  268. package/dist/utils/dateUtil.js +0 -16
  269. package/dist/utils/htmlCompiler.d.ts +0 -12
  270. package/dist/utils/htmlCompiler.js +0 -70
  271. /package/dist/components/organisms/{header/AmpToggle.vue.d.ts → top-bar/Header.vue.d.ts} +0 -0
@@ -1,68 +1,24 @@
1
- import { defineComponent as E, onMounted as D } from "vue";
2
- import { usePartner as _ } from "../composables/usePartner.js";
3
- import { useStripo as b } from "../composables/useStripo.js";
4
- import { DefaultUsername as I, DefaultGuidoConfig as P } from "../enums/defaults.js";
5
- import S from "./organisms/design-preview/EmailPreview.vue.js";
6
- import G from "./organisms/header/HeaderWrapper.vue.js";
7
- import { useStripoApi as T } from "../services/stripoApi.js";
8
- import { useEditorStore as N } from "../stores/editor.js";
9
- const M = /* @__PURE__ */ E({
1
+ import { defineComponent as a, onMounted as n } from "vue";
2
+ import { useStripo as m } from "../composables/useStripo.js";
3
+ import { useTemplates as p } from "../composables/useTemplates.js";
4
+ import s from "./organisms/top-bar/Header.vue.js";
5
+ const f = /* @__PURE__ */ a({
10
6
  __name: "Guido",
11
7
  props: {
12
- templateId: null,
13
- userId: null,
14
- partnerName: null,
15
- productType: null,
16
- username: null,
17
- html: null,
18
- css: null,
19
- guidoConfig: null,
20
- emailData: null
8
+ emailId: null
21
9
  },
22
- emits: ["dynamic-content:open"],
23
- setup(h, { expose: v, emit: t }) {
24
- const n = h, { getPartnerName: o, getProductType: i } = _(), {
25
- templateId: r,
26
- userId: a,
27
- guidoConfig: c,
28
- html: l = "",
29
- css: s = "",
30
- partnerName: m = o(),
31
- productType: d = i(),
32
- username: u = I
33
- } = n;
34
- window.GuidoConfig = {
35
- ...P,
36
- ...c
37
- };
38
- const { initPlugin: p } = b({ emailId: r, userId: a, username: u, partnerName: m, productType: d }), { getDefaultTemplate: f } = T(), w = N(), y = (e) => {
39
- console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
40
- }, g = () => {
41
- console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
42
- };
43
- return D(async () => {
44
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
10
+ setup(i) {
11
+ const e = i, { initPlugin: o } = m(e.emailId), { getDefaultTemplate: r } = p();
12
+ return n(async () => {
45
13
  try {
46
- let e = {
47
- html: l,
48
- css: s
49
- };
50
- e.html || (e = await f()), await p(e);
51
- } catch (e) {
52
- console.error("Failed to initialize Stripo editor:", e);
14
+ const t = await r();
15
+ await o(t);
16
+ } catch (t) {
17
+ console.error("Failed to initialize Stripo editor:", t);
53
18
  }
54
- document.addEventListener("dynamic-content:open", (e) => {
55
- const C = e;
56
- console.debug("dynamic-content:open", C.detail), t("dynamic-content:open", C.detail);
57
- });
58
- }), v({
59
- dynamicContent: {
60
- insert: y,
61
- close: g
62
- }
63
- }), { __sfc: !0, props: n, getPartnerName: o, getProductType: i, templateId: r, userId: a, guidoConfig: c, html: l, css: s, partnerName: m, productType: d, username: u, emit: t, initPlugin: p, getDefaultTemplate: f, editorStore: w, insertDynamicContent: y, closeDynamicContent: g, EmailPreview: S, HeaderWrapper: G };
19
+ }), { __sfc: !0, props: e, initPlugin: o, getDefaultTemplate: r, Header: s };
64
20
  }
65
21
  });
66
22
  export {
67
- M as default
23
+ f as default
68
24
  };
@@ -1,17 +1,17 @@
1
- import t from "./HeaderWrapper.vue2.js";
1
+ import t from "./Header.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var n = function() {
3
+ var a = function() {
4
4
  var o = this, r = o._self._c, e = o._self._setupProxy;
5
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
6
- }, a = [], _ = /* @__PURE__ */ s(
5
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.HeaderLeftSlot), r(e.HeaderMiddleSlot), r(e.HeaderRightSlot)], 1)]);
6
+ }, n = [], _ = /* @__PURE__ */ s(
7
7
  t,
8
- n,
9
8
  a,
9
+ n,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const d = _.exports;
14
+ const c = _.exports;
15
15
  export {
16
- d as default
16
+ c as default
17
17
  };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { InContainer as r } from "@useinsider/design-system-vue";
3
+ import o from "./HeaderLeftSlot.vue.js";
4
+ import t from "./HeaderMiddleSlot.vue.js";
5
+ import m from "./HeaderRightSlot.vue.js";
6
+ const _ = /* @__PURE__ */ e({
7
+ __name: "Header",
8
+ setup(f) {
9
+ return { __sfc: !0, InContainer: r, HeaderLeftSlot: o, HeaderMiddleSlot: t, HeaderRightSlot: m };
10
+ }
11
+ });
12
+ export {
13
+ _ as default
14
+ };
@@ -0,0 +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<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import n from "./HeaderLeftSlot.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var t = this, e = t._self._c, r = t._self._setupProxy;
5
+ return e("div", [e(r.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
6
+ }, a = [], s = /* @__PURE__ */ o(
7
+ n,
8
+ _,
9
+ a,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const i = s.exports;
15
+ export {
16
+ i as default
17
+ };
@@ -0,0 +1,11 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { InButtonV2 as e } from "@useinsider/design-system-vue";
3
+ const _ = /* @__PURE__ */ t({
4
+ __name: "HeaderLeftSlot",
5
+ setup(o) {
6
+ return { __sfc: !0, InButtonV2: e };
7
+ }
8
+ });
9
+ export {
10
+ _ as default
11
+ };
@@ -0,0 +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<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import o from "./HeaderMiddleSlot.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var l = function() {
4
+ var n = this, t = n._self._c, e = n._self._setupProxy;
5
+ return t("div", { staticClass: "d-f" }, [t(e.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__code-button", "left-icon": "line-code", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1 } })], 1);
6
+ }, a = [], i = /* @__PURE__ */ s(
7
+ o,
8
+ l,
9
+ a,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const _ = i.exports;
15
+ export {
16
+ _ as default
17
+ };
@@ -0,0 +1,11 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { InButtonV2 as t } from "@useinsider/design-system-vue";
3
+ const _ = /* @__PURE__ */ e({
4
+ __name: "HeaderMiddleSlot",
5
+ setup(o) {
6
+ return { __sfc: !0, InButtonV2: t };
7
+ }
8
+ });
9
+ export {
10
+ _ as default
11
+ };
@@ -0,0 +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<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import n from "./HeaderRightSlot.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var s = this, t = s._self._c, e = s._self._setupProxy;
6
+ return t("div", { staticClass: "d-f header-right-slot" }, [t("div", { staticClass: "d-f" }, [t(e.InSegments, { attrs: { id: "preview-platform-selection", "with-icon": "", selected: "desktop", "segment-list": e.segmentList } })], 1), t("div", { staticClass: "d-f" }, [t(e.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "label-text-status": !1 } })], 1), t(e.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
7
+ }, i = [], l = /* @__PURE__ */ o(
8
+ n,
9
+ a,
10
+ i,
11
+ !1,
12
+ null,
13
+ "9d879f6f"
14
+ );
15
+ const u = l.exports;
16
+ export {
17
+ u as default
18
+ };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { InSegments as t, InButtonV2 as n } from "@useinsider/design-system-vue";
3
+ const p = /* @__PURE__ */ e({
4
+ __name: "HeaderRightSlot",
5
+ setup(o) {
6
+ return { __sfc: !0, segmentList: [
7
+ { text: "", icon: "line-desktop", value: "desktop" },
8
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
9
+ ], InButtonV2: n, InSegments: t };
10
+ }
11
+ });
12
+ export {
13
+ p as default
14
+ };
@@ -1,49 +1,13 @@
1
- import S from "../static/styles/base.css.js";
2
- import e from "../static/styles/components/alert-message.css.js";
3
- import m from "../static/styles/components/amp-block.css.js";
4
- import i from "../static/styles/components/base-input.css.js";
5
- import p from "../static/styles/components/button-group.css.js";
6
- import n from "../static/styles/components/button.css.js";
7
- import s from "../static/styles/components/combobox.css.js";
8
- import C from "../static/styles/components/counter.css.js";
9
- import f from "../static/styles/components/dropdown-menu.css.js";
10
- import a from "../static/styles/components/narrow-panel.css.js";
11
- import u from "../static/styles/components/switcher.css.js";
12
- import c from "../static/styles/components/tabs.css.js";
13
- import d from "../static/styles/components/tools.css.js";
14
- import l from "../static/styles/components/version-history.css.js";
15
- import h from "../static/styles/components/wide-panel.css.js";
16
- import w from "../static/styles/variables.css.js";
17
- const y = [
18
- w,
19
- // Must be on top
20
- S,
21
- // Must be on top
22
- e,
23
- m,
24
- i,
25
- p,
26
- n,
27
- s,
28
- C,
29
- f,
30
- a,
31
- u,
32
- c,
33
- d,
34
- l,
35
- h
36
- ].join(`
37
-
38
- `), N = () => ({ importCss: () => {
39
- const o = new CSSStyleSheet();
40
- o.replaceSync(y);
41
- const r = document.querySelector("ui-editor");
42
- if (!r)
1
+ import r from "../static/editor.css.js";
2
+ const c = () => ({ importCss: () => {
3
+ const e = new CSSStyleSheet();
4
+ e.replaceSync(r);
5
+ const t = document.querySelector("ui-editor");
6
+ if (!t)
43
7
  return;
44
- const t = r.shadowRoot;
45
- t && (t.adoptedStyleSheets = [o]);
8
+ const o = t.shadowRoot;
9
+ o && (o.adoptedStyleSheets = [e]);
46
10
  } });
47
11
  export {
48
- N as useCustomInterfaceAppearance
12
+ c as useCustomInterfaceAppearance
49
13
  };
@@ -1,4 +1,4 @@
1
- import type { Metadata, Template } from '@@/Types/stripo';
2
- export declare const useStripo: (metadata: Metadata) => {
1
+ import type { Template } from '@@types/stripo';
2
+ export declare const useStripo: (emailId: string) => {
3
3
  initPlugin: (template: Template) => Promise<void>;
4
4
  };
@@ -1,91 +1,68 @@
1
- import { useActionsApi as m } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as g } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as f } from "./useToaster.js";
4
- import { displayConditions as E } from "../enums/displayConditions.js";
5
- import S from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as y } from "../services/stripoApi.js";
7
- import { useEditorStore as C } from "../stores/editor.js";
8
- const x = (a) => {
9
- const { handleError: d } = f(), { getToken: c, getCustomFonts: u } = y(), l = (e, r = []) => {
10
- const i = C(), { html: t, css: s } = e;
1
+ import { useCustomInterfaceAppearance as d } from "./useCustomInterfaceAppearance.js";
2
+ const u = (s) => {
3
+ const c = () => {
4
+ const t = new Headers();
5
+ t.append("Content-Type", "application/json");
6
+ const o = JSON.stringify({
7
+ pluginId: void 0,
8
+ secretKey: void 0,
9
+ role: void 0,
10
+ userId: s
11
+ });
12
+ return fetch("/v2/stripo/get-token", {
13
+ method: "POST",
14
+ headers: t,
15
+ body: o,
16
+ redirect: "follow"
17
+ }).then((e) => e.json());
18
+ }, i = (t) => {
19
+ const o = t.html, n = t.css;
11
20
  window.UIEditor.initEditor(
12
21
  document.querySelector("#guido-editor"),
13
22
  {
14
- metadata: a,
15
- html: t,
16
- css: s,
17
- forceRecreate: !0,
18
- locale: "en",
19
- undoButtonSelector: "#guido__undo-button",
20
- redoButtonSelector: "#guido__redo-button",
21
- mobileViewButtonSelector: ".guido__view-option-selection-mobile",
22
- desktopViewButtonSelector: ".guido__view-option-selection-desktop",
23
- codeEditorButtonSelector: "#guido__code-button",
24
- customAppearanceMergetags: !0,
25
- customAppearanceMergetagsBorderColor: "#f1f3fe",
26
- customAppearanceMergetagsBackgroundColor: "#f1f3fe",
27
- customViewStyles: `
28
- .esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
29
- .esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
30
- `,
31
- conditionsEnabled: !0,
32
- customConditionsEnabled: !0,
33
- conditionCategories: E,
34
- messageSettingsEnabled: !1,
35
- editorFonts: {
36
- showDefaultStandardFonts: !0,
37
- showDefaultNotStandardFonts: !0,
38
- customFonts: r
23
+ metadata: {
24
+ emailId: s,
25
+ userId: "1",
26
+ username: "Plugin Demo User"
39
27
  },
40
- async onTokenRefreshRequest(o) {
28
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
29
+ html: o,
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
31
+ css: n,
32
+ locale: "en",
33
+ async onTokenRefreshRequest(e) {
41
34
  try {
42
- const n = await c();
43
- o(n);
44
- } catch (n) {
45
- d(n, "Failed to refresh token");
35
+ const r = await c();
36
+ e(r.token);
37
+ } catch (r) {
38
+ console.error("Failed to refresh token:", r);
46
39
  }
47
40
  },
48
41
  onTemplateLoaded() {
49
42
  try {
50
- const { importCss: o } = g(), { activateCustomViewStyles: n } = m();
51
- o(), n();
52
- } catch (o) {
53
- d(o, "Failed to load custom interface appearance");
43
+ const { importCss: e } = d();
44
+ e();
45
+ } catch (e) {
46
+ console.error("Failed to load custom interface appearance:", e);
54
47
  }
55
- },
56
- onCodeEditorVisibilityChanged(o) {
57
- i.isCodeEditorOpen = o;
58
- },
59
- onEditorVisualModeChanged(o) {
60
- i.editorVisualMode = o.toLowerCase();
61
- },
62
- onVersionHistoryVisibilityChanged(o) {
63
- i.isVersionHistoryOpen = o;
64
- },
65
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
66
- extensions: [S]
48
+ }
67
49
  }
68
50
  );
69
- }, p = (e) => new Promise((r, i) => {
51
+ };
52
+ return { initPlugin: (t) => new Promise((o, n) => {
70
53
  if (document.getElementById("UiEditorScript")) {
71
- e(), r();
54
+ i(t), o();
72
55
  return;
73
56
  }
74
- const t = document.createElement("script");
75
- t.id = "UiEditorScript", t.type = "module", t.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", t.onload = () => {
76
- e(), r();
77
- }, t.onerror = () => {
78
- const s = new Error("Failed to load Stripo UIEditor script");
79
- i(s);
80
- }, document.body.appendChild(t);
81
- });
82
- return { initPlugin: async (e) => {
83
- await p(async () => {
84
- const r = await u();
85
- l(e, r);
86
- });
87
- } };
57
+ const e = document.createElement("script");
58
+ e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
59
+ i(t), o();
60
+ }, e.onerror = () => {
61
+ const r = new Error("Failed to load Stripo UIEditor script");
62
+ n(r);
63
+ }, document.body.appendChild(e);
64
+ }) };
88
65
  };
89
66
  export {
90
- x as useStripo
67
+ u as useStripo
91
68
  };
@@ -0,0 +1,5 @@
1
+ import type { Template } from '@@types/stripo';
2
+ export declare const useTemplates: () => {
3
+ getDefaultTemplate: () => Promise<Template>;
4
+ getTemplate: (templateName: string) => Promise<Template>;
5
+ };
@@ -0,0 +1,27 @@
1
+ const s = () => {
2
+ const t = async () => {
3
+ const [e, a] = await Promise.all([
4
+ // eslint-disable-next-line import/extensions
5
+ import("../static/templates/default/index.html.js"),
6
+ import("../static/templates/default/style.css.js")
7
+ ]);
8
+ return {
9
+ html: e.default,
10
+ css: a.default
11
+ };
12
+ };
13
+ return {
14
+ getDefaultTemplate: t,
15
+ getTemplate: async (e) => {
16
+ switch (e) {
17
+ case "default":
18
+ return t();
19
+ default:
20
+ return t();
21
+ }
22
+ }
23
+ };
24
+ };
25
+ export {
26
+ s as useTemplates
27
+ };
@@ -17,5 +17,4 @@ export declare const useToaster: () => {
17
17
  } | undefined)[]>;
18
18
  showToaster: (options?: ToasterOptions) => void;
19
19
  hideToaster: () => void;
20
- handleError: (error: unknown, context: string) => void;
21
20
  };
@@ -1,5 +1,7 @@
1
1
  interface TranslationValues {
2
2
  [key: string]: string | number | boolean;
3
3
  }
4
- export declare const useTranslations: () => ((key: string, params?: TranslationValues) => string) & import("lodash").MemoizedFunction;
4
+ export declare const useTranslations: () => {
5
+ trans: ((key: string, params?: TranslationValues) => string) & import("lodash").MemoizedFunction;
6
+ };
5
7
  export {};
@@ -0,0 +1,18 @@
1
+ export declare const DefaultApiEndpoints: {
2
+ dynamicContent: string;
3
+ unsubPages: string;
4
+ header: string;
5
+ footer: string;
6
+ productName: string;
7
+ productVersion: string;
8
+ token: string;
9
+ };
10
+ export declare const DefaultExtensions: {
11
+ dynamicContent: boolean;
12
+ unsubPages: boolean;
13
+ header: boolean;
14
+ footer: boolean;
15
+ };
16
+ export declare const DefaultConfig: {
17
+ translationsPath: string;
18
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- [data-v-b07fa463] .in-progress-wrapper__progress p span:last-child{display:none!important}.version-history-item[data-v-ee4b9c3f]{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-f90d31ea] .guido__view-option-selection-desktop svg,[data-v-f90d31ea] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-f90d31ea] .in-segments-wrapper__button_selected,[data-v-f90d31ea] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-f09e89b0],.guido-editor__container[data-v-f09e89b0]{width:100%;height:calc(100vh - 75px)}
1
+ .header-right-slot[data-v-9d879f6f]{gap:16px}[data-v-9d879f6f] .preview-platform-selection-desktop svg,[data-v-9d879f6f] .preview-platform-selection-mobile svg{margin:0 0 0 2px}.guido-editor-wrapper[data-v-c14163ad],.guido-editor-container[data-v-c14163ad]{width:100%;height:100vh}
package/dist/library.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export { default as Guido } from './components/Guido.vue';
2
2
  export type { StripoEventType } from './@types/events';
3
- export type * from './@types/generic';