@useinsider/guido 1.0.2-beta.d032aea → 1.0.2-beta.da959c4

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 (138) hide show
  1. package/README.md +25 -2
  2. package/dist/@types/generic.d.ts +4 -0
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +51 -50
  5. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  6. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
  7. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +2 -2
  8. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +5 -5
  9. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +40 -28
  10. package/dist/composables/useCustomInterfaceAppearance.js +22 -18
  11. package/dist/composables/useHtmlValidator.d.ts +2 -1
  12. package/dist/composables/useHtmlValidator.js +114 -95
  13. package/dist/composables/useSave.js +6 -6
  14. package/dist/composables/useStripo.js +25 -24
  15. package/dist/config/migrator/checkboxMigrator.d.ts +1 -0
  16. package/dist/config/migrator/checkboxMigrator.js +83 -0
  17. package/dist/config/migrator/index.d.ts +1 -0
  18. package/dist/config/migrator/index.js +5 -0
  19. package/dist/extensions/Blocks/Checkbox/block.d.ts +10 -0
  20. package/dist/extensions/Blocks/Checkbox/block.js +39 -0
  21. package/dist/extensions/Blocks/Checkbox/control.d.ts +22 -0
  22. package/dist/extensions/Blocks/Checkbox/control.js +104 -0
  23. package/dist/extensions/Blocks/Checkbox/extension.d.ts +2 -0
  24. package/dist/extensions/Blocks/Checkbox/extension.js +20 -0
  25. package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
  26. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +38 -0
  27. package/dist/extensions/Blocks/Checkbox/template.d.ts +6 -0
  28. package/dist/extensions/Blocks/Checkbox/template.js +75 -0
  29. package/dist/extensions/Blocks/_Boilerplate/block.d.ts +10 -0
  30. package/dist/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
  31. package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
  32. package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
  33. package/dist/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
  34. package/dist/extensions/DynamicContent/dynamic-content.js +41 -27
  35. package/dist/extensions/DynamicContent/extension.js +18 -6
  36. package/dist/guido.css +1 -1
  37. package/dist/mock/api/unsubscribe.d.ts +2 -0
  38. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +72 -48
  39. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +74 -49
  40. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +120 -38
  41. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +5 -11
  42. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +5 -11
  43. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
  44. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +5 -11
  45. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +116 -101
  46. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +5 -11
  47. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +5 -11
  48. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +5 -11
  49. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
  50. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +5 -11
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +5 -11
  52. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +5 -11
  53. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +22 -43
  54. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +21 -17
  55. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +8 -15
  56. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +30 -29
  57. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +19 -23
  58. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +37 -19
  59. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -15
  60. package/dist/static/styles/components/alert-message.css.js +32 -2
  61. package/dist/static/styles/components/button.css.js +32 -2
  62. package/dist/static/styles/components/notification.css.js +55 -0
  63. package/dist/static/styles/components/popup.css.js +68 -0
  64. package/dist/static/styles/components/wide-panel.css.js +5 -1
  65. package/dist/static/styles/customEditorStyle.css.js +6 -0
  66. package/dist/static/styles/variables.css.js +10 -0
  67. package/dist/stores/dynamic-content.d.ts +12 -0
  68. package/dist/stores/dynamic-content.js +7 -6
  69. package/dist/utils/genericUtil.d.ts +5 -0
  70. package/dist/utils/genericUtil.js +9 -6
  71. package/package.json +2 -2
  72. package/dist/_virtual/AddCustomFont.js +0 -4
  73. package/dist/_virtual/AiAssistantValueType.js +0 -4
  74. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  75. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  76. package/dist/_virtual/Block.js +0 -4
  77. package/dist/_virtual/BlockAttributes.js +0 -4
  78. package/dist/_virtual/BlockCompositionType.js +0 -4
  79. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  80. package/dist/_virtual/BlockRenderer.js +0 -4
  81. package/dist/_virtual/BlockType.js +0 -4
  82. package/dist/_virtual/BlocksPanel.js +0 -4
  83. package/dist/_virtual/BuiltInControl.js +0 -4
  84. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  85. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  86. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  87. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  88. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  89. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  90. package/dist/_virtual/ContextAction.js +0 -4
  91. package/dist/_virtual/ContextActionType.js +0 -4
  92. package/dist/_virtual/Control.js +0 -4
  93. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  94. package/dist/_virtual/Extension.js +0 -4
  95. package/dist/_virtual/ExtensionBuilder.js +0 -4
  96. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  97. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  98. package/dist/_virtual/ModificationDescription.js +0 -4
  99. package/dist/_virtual/PanelPosition.js +0 -4
  100. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  101. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  102. package/dist/_virtual/SettingsPanelTab.js +0 -4
  103. package/dist/_virtual/SettingsTab.js +0 -4
  104. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  105. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  106. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  107. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  108. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  109. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  110. package/dist/_virtual/UIElement.js +0 -4
  111. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  112. package/dist/_virtual/UIElementType.js +0 -4
  113. package/dist/_virtual/UIElementsAttributes.js +0 -4
  114. package/dist/_virtual/index.js +0 -5
  115. package/dist/_virtual/index2.js +0 -4
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  131. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  132. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  133. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  134. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  135. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  136. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  137. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  138. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
package/README.md CHANGED
@@ -16,7 +16,30 @@ npm install @useinsider/guido
16
16
  ```
17
17
  ### Prerequisites
18
18
  🍍 Your project should have `pinia`
19
-
19
+ You need to be sure those lines added in your config file:
20
+
21
+ ℹ️ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
22
+
23
+ #### For Webpack
24
+ `/webpack.config.js` or `/vue.config.js`
25
+ ```js
26
+ // ... Previous Configs
27
+ shared: {
28
+ vue: { singleton: true },
29
+ pinia: { singleton: true },
30
+ },
31
+ // ... Upcoming Configs
32
+ ```
33
+
34
+ ##### For Vite:
35
+ `/vite.config.js`
36
+ ```js
37
+ // ... Previous Configs
38
+ resolve: {
39
+ dedupe: ['vue', 'pinia'],
40
+ },
41
+ // ... Upcoming Configs
42
+ ```
20
43
  ---
21
44
  ## 🚀 Usage
22
45
 
@@ -620,6 +643,6 @@ ISC License
620
643
  ## 🎯 TODO:
621
644
  - CSS part should be optimized with variables & `sass-loader`.
622
645
  - Master Version Generator should be fixed.
623
- - Playwright integration
646
+ - Playwright integrationBoilerplate/control.ts
624
647
  - Commitlint & Precommit Hooks integration
625
648
  - Get Pre-built display conditions from API
@@ -22,6 +22,10 @@ export type DynamicContent = {
22
22
  value: string;
23
23
  text: string;
24
24
  fallback?: string;
25
+ format?: {
26
+ key: string;
27
+ value: string;
28
+ };
25
29
  };
26
30
  export interface EmailHeader {
27
31
  senderName: string;
@@ -1,16 +1,16 @@
1
- import a from "./Guido.vue2.js";
1
+ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
- var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
5
+ var a = this, r = a._self._c, e = a._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
7
7
  }, s = [], d = /* @__PURE__ */ i(
8
- a,
8
+ o,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "cc1f9260"
13
+ "aca05338"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,18 +1,19 @@
1
- import { defineComponent as N, defineAsyncComponent as E, ref as H, computed as G, watch as R, onMounted as U, onUnmounted as x } from "vue";
2
- import { provideGuidoActions as F } from "../composables/useGuidoActions.js";
3
- import { usePartner as M } from "../composables/usePartner.js";
4
- import { useStripo as z } from "../composables/useStripo.js";
5
- import { DefaultUsername as B, DefaultMessageType as K, DefaultGuidoConfig as O } from "../enums/defaults.js";
6
- import j from "./organisms/base/Toaster.vue.js";
7
- import q from "./organisms/header/HeaderWrapper.vue.js";
8
- import J from "./organisms/LoadingWrapper.vue.js";
9
- import Q from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as V } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as X } from "../stores/dynamic-content.js";
12
- import { useEditorStore as Y } from "../stores/editor.js";
13
- import { usePreviewStore as Z } from "../stores/preview.js";
14
- import $ from "../node_modules/lodash-es/merge.js";
15
- const ge = /* @__PURE__ */ N({
1
+ import { defineComponent as H, defineAsyncComponent as E, ref as R, computed as G, watch as U, onMounted as x, onUnmounted as F } from "vue";
2
+ import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
+ import { usePartner as z } from "../composables/usePartner.js";
4
+ import { useStripo as B } from "../composables/useStripo.js";
5
+ import { migrate as P } from "../config/migrator/index.js";
6
+ import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
7
+ import q from "./organisms/base/Toaster.vue.js";
8
+ import J from "./organisms/header/HeaderWrapper.vue.js";
9
+ import Q from "./organisms/LoadingWrapper.vue.js";
10
+ import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
+ import { useStripoApi as X } from "../services/stripoApi.js";
12
+ import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
13
+ import { useEditorStore as Z } from "../stores/editor.js";
14
+ import { usePreviewStore as $ } from "../stores/preview.js";
15
+ import ee from "../node_modules/lodash-es/merge.js";
16
+ const ye = /* @__PURE__ */ H({
16
17
  __name: "Guido",
17
18
  props: {
18
19
  templateId: null,
@@ -27,45 +28,45 @@ const ge = /* @__PURE__ */ N({
27
28
  guidoConfig: null
28
29
  },
29
30
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
30
- setup(P, { expose: I, emit: o }) {
31
- const n = P, L = E(
31
+ setup(I, { expose: L, emit: o }) {
32
+ const r = I, _ = E(
32
33
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), _ = E(
34
+ ), W = E(
34
35
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
- ), c = H(), r = X(), d = Y(), W = Z(), t = G(() => d.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: l, isTestPartner: k } = M(), u = () => {
36
+ ), d = R(), a = Y(), m = Z(), k = $(), t = G(() => m.hasChanges), i = r.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: A } = z(), p = () => {
36
37
  var e;
37
- return (e = c.value) == null ? void 0 : e.handleSave(!0);
38
+ return (e = d.value) == null ? void 0 : e.handleSave(!0);
38
39
  }, {
39
- templateId: p,
40
- userId: g,
41
- guidoConfig: f,
42
- html: y = "",
40
+ templateId: g,
41
+ userId: f,
42
+ guidoConfig: y,
43
+ html: n = "",
43
44
  css: v = "",
44
- partnerName: i = m(),
45
- productType: s = l(),
46
- messageType: C = K,
47
- username: h = B
48
- } = n;
49
- window.GuidoConfig = $(O, f), window.GuidoConfig.partner = {
50
- partnerName: i,
51
- productType: s,
45
+ partnerName: s = l(),
46
+ productType: c = u(),
47
+ messageType: C = O,
48
+ username: h = K
49
+ } = r;
50
+ window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
51
+ partnerName: s,
52
+ productType: c,
52
53
  messageType: C
53
54
  };
54
- const { initPlugin: w } = z({
55
- emailId: p,
56
- userId: g,
55
+ const { initPlugin: w } = B({
56
+ emailId: g,
57
+ userId: f,
57
58
  username: h,
58
- partnerName: i,
59
- productType: s,
60
- preselectedDynamicContentList: a,
59
+ partnerName: s,
60
+ productType: c,
61
+ preselectedDynamicContentList: i,
61
62
  onReady: () => {
62
63
  console.debug("guido:ready"), o("ready");
63
64
  }
64
- }), { getDefaultTemplate: S } = V(), A = G(() => {
65
+ }), { getDefaultTemplate: S } = X(), N = G(() => {
65
66
  var e;
66
67
  return !((e = window.GuidoConfig) != null && e.useHeader);
67
68
  });
68
- F({
69
+ M({
69
70
  onBack: () => {
70
71
  console.debug("guido:back"), o("back");
71
72
  },
@@ -77,22 +78,22 @@ const ge = /* @__PURE__ */ N({
77
78
  }
78
79
  });
79
80
  const b = (e) => {
80
- console.debug("dynamic-content:close", e), r.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
81
+ console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
81
82
  }, D = () => {
82
83
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
84
  };
84
- return R(() => t.value, () => {
85
+ return U(() => t.value, () => {
85
86
  o("on-change", t.value);
86
- }), U(async () => {
87
+ }), x(async () => {
87
88
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
88
89
  try {
89
90
  let e = {
90
- html: y,
91
+ html: n && P(n),
91
92
  css: v,
92
93
  forceRecreate: !0
93
94
  // TODO: It should be false for old templates. We will communicate with Stripo
94
95
  };
95
- e.html || (e = await S()), await w(e), r.selectedDynamicContentList = a;
96
+ e.html || (e = await S(), e.html = P(e.html)), await w(e), a.selectedDynamicContentList = i;
96
97
  } catch (e) {
97
98
  console.error("Failed to initialize Stripo editor:", e);
98
99
  }
@@ -100,22 +101,22 @@ const ge = /* @__PURE__ */ N({
100
101
  const T = e;
101
102
  console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
102
103
  });
103
- }), x(() => {
104
+ }), F(() => {
104
105
  try {
105
106
  window.UIEditor.removeEditor();
106
107
  } catch {
107
108
  console.debug("Failed to remove Stripo editor: No editor found");
108
109
  }
109
- }), I({
110
+ }), L({
110
111
  dynamicContent: {
111
112
  insert: b,
112
113
  close: D
113
114
  },
114
115
  hasChanges: t,
115
- saveSilent: u
116
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: c, dynamicContentStore: r, props: n, editorStore: d, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: m, getProductType: l, isTestPartner: k, saveSilent: u, templateId: p, userId: g, guidoConfig: f, html: y, css: v, partnerName: i, productType: s, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: A, insertDynamicContent: b, closeDynamicContent: D, Toaster: j, HeaderWrapper: q, LoadingWrapper: J, SaveAsTemplateDrawer: Q };
116
+ saveSilent: p
117
+ }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: d, dynamicContentStore: a, props: r, editorStore: m, previewStore: k, hasChanges: t, preselectedDynamicContentList: i, getPartnerName: l, getProductType: u, isTestPartner: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: n, css: v, partnerName: s, productType: c, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: b, closeDynamicContent: D, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
117
118
  }
118
119
  });
119
120
  export {
120
- ge as default
121
+ ye as default
121
122
  };
@@ -1,8 +1,9 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
+ /* empty css */
2
3
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var s = function() {
4
5
  var r = this, t = r._self._c, e = r._self._setupProxy;
5
- return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
6
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
6
7
  return e.previewStore.openErrorModal();
7
8
  } } }) : r._e()], 1)]);
8
9
  }, a = [], i = /* @__PURE__ */ n(
@@ -11,7 +12,7 @@ var s = function() {
11
12
  a,
12
13
  !1,
13
14
  null,
14
- null
15
+ "b5997368"
15
16
  );
16
17
  const d = i.exports;
17
18
  export {
@@ -1,19 +1,19 @@
1
- import d from "./GenericOnboarding.vue2.js";
1
+ import c from "./GenericOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var l = function() {
5
5
  var r, n, t, i, a, s;
6
- var o = this, c = o._self._c, e = o._self._setupProxy;
7
- return e.isVisible ? c(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
6
+ var o = this, d = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? d(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
8
8
  return e.onboardingStore.close("genericOnboarding");
9
9
  }, nextButtonClick: e.handleNext } }) : o._e();
10
10
  }, p = [], _ = /* @__PURE__ */ g(
11
- d,
11
+ c,
12
12
  l,
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "2473c29f"
16
+ "d3c52b44"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -33,8 +33,8 @@ const S = /* @__PURE__ */ l({
33
33
  {
34
34
  classes: "guido-onboarding-stripes",
35
35
  right: "450px",
36
- bottom: "-38px",
37
- position: "Right Top",
36
+ bottom: "38px",
37
+ position: "Right Bottom",
38
38
  title: e("email-editor.onboarding-stripes-title"),
39
39
  description: e("email-editor.onboarding-stripes-description"),
40
40
  imageSource: "",
@@ -1,19 +1,19 @@
1
- import c from "./TextBlockOnboarding.vue2.js";
1
+ import l from "./TextBlockOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var g = function() {
5
5
  var e, n, r, i, a, s;
6
- var t = this, l = t._self._c, o = t._self._setupProxy;
7
- return o.isVisible ? l(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
6
+ var t = this, c = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? c(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
8
8
  return o.onboardingStore.close("textBlockOnboarding");
9
9
  }, nextButtonClick: o.handleNext } }) : t._e();
10
10
  }, b = [], p = /* @__PURE__ */ d(
11
- c,
11
+ l,
12
12
  g,
13
13
  b,
14
14
  !1,
15
15
  null,
16
- "a77a2dd4"
16
+ "a408dcea"
17
17
  );
18
18
  const f = p.exports;
19
19
  export {
@@ -1,23 +1,35 @@
1
- import { defineComponent as s, computed as r, watch as l } from "vue";
2
- import { useTranslations as x } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as g } from "../../../stores/onboarding.js";
4
- import { InOnboard as b } from "@useinsider/design-system-vue";
5
- const C = /* @__PURE__ */ s({
1
+ import { defineComponent as u, computed as a, watch as b } from "vue";
2
+ import { useTranslations as m } from "../../../composables/useTranslations.js";
3
+ import { useOnboardingStore as k } from "../../../stores/onboarding.js";
4
+ import { InOnboard as B } from "@useinsider/design-system-vue";
5
+ const y = /* @__PURE__ */ u({
6
6
  __name: "TextBlockOnboarding",
7
- setup(p) {
8
- const n = x(), o = g(), i = r(() => [
7
+ setup(h) {
8
+ const i = m(), o = k(), e = a(() => {
9
+ const n = window.innerHeight - 128, r = Math.max(90, n * 0.15), s = Math.max(490, n * 0.71), d = 200, g = 40;
10
+ return {
11
+ settings: {
12
+ top: `${r}px`,
13
+ position: r + d + g > n ? "Right Bottom" : "Right Top"
14
+ },
15
+ dynamic: {
16
+ top: `${s}px`,
17
+ position: s + d + g > n ? "Right Bottom" : "Right Top"
18
+ }
19
+ };
20
+ }), c = a(() => [
9
21
  {
10
22
  classes: "guido-text-block-onboarding-settings",
11
23
  right: "450px",
12
- top: "90px",
13
- position: "Right Top",
14
- title: n("email-editor.onboarding-text-block-title"),
15
- description: n("email-editor.onboarding-text-block-description"),
24
+ top: e.value.settings.top,
25
+ position: e.value.settings.position,
26
+ title: i("email-editor.onboarding-text-block-title"),
27
+ description: i("email-editor.onboarding-text-block-description"),
16
28
  imageSource: "",
17
29
  backButtonClick: () => {
18
30
  },
19
31
  nextButtonType: "text",
20
- nextButtonText: n("products.next"),
32
+ nextButtonText: i("products.next"),
21
33
  nextButtonClick: () => {
22
34
  o.next("textBlockOnboarding");
23
35
  }
@@ -25,38 +37,38 @@ const C = /* @__PURE__ */ s({
25
37
  {
26
38
  classes: "guido-text-block-onboarding-dynamic",
27
39
  right: "450px",
28
- top: "594px",
29
- position: "Right Top",
30
- title: n("email-editor.onboarding-dynamic-content-title"),
31
- description: n("email-editor.onboarding-dynamic-content-description"),
40
+ top: e.value.dynamic.top,
41
+ position: e.value.dynamic.position,
42
+ title: i("email-editor.onboarding-dynamic-content-title"),
43
+ description: i("email-editor.onboarding-dynamic-content-description"),
32
44
  imageSource: "",
33
45
  backButtonType: "text",
34
- backButtonText: n("ds-steps.back"),
46
+ backButtonText: i("ds-steps.back"),
35
47
  backButtonClick: () => {
36
48
  o.previous("textBlockOnboarding");
37
49
  },
38
50
  nextButtonType: "text",
39
- nextButtonText: n("action-builder.ok"),
51
+ nextButtonText: i("action-builder.ok"),
40
52
  nextButtonClick: () => {
41
53
  o.close("textBlockOnboarding");
42
54
  }
43
55
  }
44
- ]), c = r(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), a = () => {
45
- var t, e;
46
- (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
47
- }, d = () => {
48
- var t, e;
49
- (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
56
+ ]), l = a(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), p = () => {
57
+ var t, n;
58
+ (n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
59
+ }, x = () => {
60
+ var t, n;
61
+ (n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
50
62
  };
51
- return l(
63
+ return b(
52
64
  () => o.isActive("textBlockOnboarding"),
53
65
  (t) => {
54
- t && o.setConfig("textBlockOnboarding", i.value);
66
+ t && o.setConfig("textBlockOnboarding", c.value);
55
67
  },
56
68
  { immediate: !0 }
57
- ), { __sfc: !0, trans: n, onboardingStore: o, onboardingCardsConfig: i, isVisible: c, handleNext: a, handleBack: d, InOnboard: b };
69
+ ), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
58
70
  }
59
71
  });
60
72
  export {
61
- C as default
73
+ y as default
62
74
  };
@@ -1,32 +1,34 @@
1
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";
2
+ import m from "../static/styles/components/alert-message.css.js";
3
+ import e from "../static/styles/components/amp-block.css.js";
4
4
  import i from "../static/styles/components/base-input.css.js";
5
5
  import p from "../static/styles/components/button-group.css.js";
6
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";
7
+ import C from "../static/styles/components/combobox.css.js";
8
+ import s from "../static/styles/components/counter.css.js";
9
9
  import f from "../static/styles/components/dropdown-menu.css.js";
10
10
  import a from "../static/styles/components/loader.css.js";
11
11
  import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/switcher.css.js";
13
- import d from "../static/styles/components/tabs.css.js";
14
- import l from "../static/styles/components/tools.css.js";
15
- import h from "../static/styles/components/version-history.css.js";
16
- import w from "../static/styles/components/wide-panel.css.js";
17
- import y from "../static/styles/variables.css.js";
18
- const B = [
19
- y,
12
+ import c from "../static/styles/components/notification.css.js";
13
+ import d from "../static/styles/components/popup.css.js";
14
+ import l from "../static/styles/components/switcher.css.js";
15
+ import h from "../static/styles/components/tabs.css.js";
16
+ import w from "../static/styles/components/tools.css.js";
17
+ import y from "../static/styles/components/version-history.css.js";
18
+ import B from "../static/styles/components/wide-panel.css.js";
19
+ import b from "../static/styles/variables.css.js";
20
+ const A = [
21
+ b,
20
22
  // Must be on top
21
23
  S,
22
24
  // Must be on top
23
- e,
24
25
  m,
26
+ e,
25
27
  i,
26
28
  p,
27
29
  n,
28
- s,
29
30
  C,
31
+ s,
30
32
  f,
31
33
  a,
32
34
  u,
@@ -34,12 +36,14 @@ const B = [
34
36
  d,
35
37
  l,
36
38
  h,
37
- w
39
+ w,
40
+ y,
41
+ B
38
42
  ].join(`
39
43
 
40
- `), R = () => ({ importCss: () => {
44
+ `), F = () => ({ importCss: () => {
41
45
  const o = new CSSStyleSheet();
42
- o.replaceSync(B);
46
+ o.replaceSync(A);
43
47
  const r = document.querySelector("ui-editor");
44
48
  if (!r)
45
49
  return;
@@ -47,5 +51,5 @@ const B = [
47
51
  t && (t.adoptedStyleSheets = [o]);
48
52
  } });
49
53
  export {
50
- R as useCustomInterfaceAppearance
54
+ F as useCustomInterfaceAppearance
51
55
  };
@@ -1,3 +1,4 @@
1
+ import type { DynamicContent } from '@@/Types/generic';
1
2
  export declare const useHtmlValidator: () => {
2
- validateHtml: (html: string, customFields: string[], isOnSaveValidation?: boolean) => Promise<boolean>;
3
+ validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
3
4
  };