@useinsider/guido 1.0.2-beta.80ac5e8 → 1.0.2-beta.80c1297

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 (48) hide show
  1. package/README.md +0 -12
  2. package/dist/@types/events.d.ts +0 -6
  3. package/dist/@types/generic.d.ts +0 -1
  4. package/dist/components/Guido.vue.d.ts +0 -1
  5. package/dist/components/Guido.vue.js +5 -5
  6. package/dist/components/Guido.vue2.js +47 -54
  7. package/dist/components/organisms/header/ViewOptions.vue.js +9 -9
  8. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  9. package/dist/composables/usePartner.d.ts +0 -1
  10. package/dist/composables/usePartner.js +9 -16
  11. package/dist/composables/usePreviewMode.js +13 -13
  12. package/dist/composables/useStripo.js +43 -44
  13. package/dist/enums/defaults.d.ts +0 -1
  14. package/dist/enums/defaults.js +9 -42
  15. package/dist/guido.css +1 -1
  16. package/dist/static/styles/components/wide-panel.css.js +0 -9
  17. package/dist/stores/editor.d.ts +0 -21
  18. package/dist/stores/editor.js +1 -2
  19. package/package.json +1 -1
  20. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
  21. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
  22. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
  23. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
  24. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
  25. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
  26. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
  27. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
  28. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
  29. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
  30. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
  31. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
  32. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
  33. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
  34. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -62
  35. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
  36. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
  37. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
  38. package/dist/composables/useStripoEventHandler.d.ts +0 -3
  39. package/dist/composables/useStripoEventHandler.js +0 -20
  40. package/dist/enums/onboarding.d.ts +0 -1
  41. package/dist/enums/onboarding.js +0 -8
  42. package/dist/mock/api/user-modal-state.d.ts +0 -2
  43. package/dist/services/onboardingApi.d.ts +0 -4
  44. package/dist/services/onboardingApi.js +0 -23
  45. package/dist/static/assets/onboarding-img.svg.js +0 -4
  46. package/dist/static/styles/customEditorStyle.css.js +0 -18
  47. package/dist/stores/onboarding.d.ts +0 -1004
  48. package/dist/stores/onboarding.js +0 -95
package/README.md CHANGED
@@ -131,7 +131,6 @@ export default {
131
131
  | `back` | - | Fired when user clicks the back button |
132
132
  | `save:start` | - | Fired when the save process begins |
133
133
  | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
134
- | `on-change` | void | It Fires once for managing leave modal etc. |
135
134
 
136
135
  ### Guido Exposed Methods
137
136
  ```typescript
@@ -146,16 +145,6 @@ interface GuidoConfig {
146
145
  translationsPath: string;
147
146
  htmlCompilerRules?: CompilerRule[];
148
147
  ignoreDefaultHtmlCompilerRules?: boolean;
149
- useHeader: boolean
150
- emailHeader: {
151
- senderName: string;
152
- subject: string;
153
- };
154
- partner: {
155
- partnerName: string;
156
- productType: number;
157
- messageType: number;
158
- };
159
148
  features: {
160
149
  dynamicContent: boolean;
161
150
  saveAsTemplate: boolean;
@@ -169,7 +158,6 @@ interface GuidoConfig {
169
158
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
170
159
  | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
171
160
  | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
172
- | `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
173
161
  | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
174
162
  | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
175
163
  | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
@@ -1,7 +1 @@
1
1
  export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
2
- export interface EventHandler {
3
- (params: Record<string, string>): void | Promise<void>;
4
- }
5
- export interface EventHandlers {
6
- [eventType: string]: EventHandler;
7
- }
@@ -13,7 +13,6 @@ export type GuidoConfig = {
13
13
  translationsPath: string;
14
14
  htmlCompilerRules?: CompilerRule[];
15
15
  ignoreDefaultHtmlCompilerRules?: boolean;
16
- useHeader?: boolean;
17
16
  emailHeader: EmailHeader;
18
17
  partner?: Partner;
19
18
  features?: Features;
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
23
23
  back: () => void;
24
24
  "save:start": () => void;
25
25
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
26
- "on-change": () => void;
27
26
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
28
27
  export default _default;
29
28
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -2,17 +2,17 @@ import a 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), 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), r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
5
+ var o = this, e = o._self._c, r = o._self._setupProxy;
6
+ return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.editorStore.isPreviewModeOpen ? e(r.PreviewContainer) : o._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster), e(r.SaveAsTemplateDrawer), e(r.LoadingWrapper)], 1);
7
7
  }, s = [], d = /* @__PURE__ */ i(
8
8
  a,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "5c6ce65b"
13
+ "f78aa5ad"
14
14
  );
15
- const v = d.exports;
15
+ const c = d.exports;
16
16
  export {
17
- v as default
17
+ c as default
18
18
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as k, defineAsyncComponent as b, computed as E, watch as A, onMounted as W, onUnmounted as H } from "vue";
2
- import { provideGuidoActions as N } from "../composables/useGuidoActions.js";
3
- import { usePartner as U } from "../composables/usePartner.js";
4
- import { useStripo as x } from "../composables/useStripo.js";
5
- import { DefaultUsername as M, DefaultMessageType as z, DefaultGuidoConfig as B } from "../enums/defaults.js";
6
- import F from "./organisms/base/Toaster.vue.js";
7
- import K from "./organisms/header/HeaderWrapper.vue.js";
8
- import O from "./organisms/LoadingWrapper.vue.js";
9
- import R from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as j } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as q } from "../stores/dynamic-content.js";
12
- import { useEditorStore as J } from "../stores/editor.js";
13
- import { usePreviewStore as Q } from "../stores/preview.js";
14
- import V from "../node_modules/lodash-es/merge.js";
15
- const de = /* @__PURE__ */ k({
1
+ import { defineComponent as I, defineAsyncComponent as L, computed as P, onMounted as _, onUnmounted as k } from "vue";
2
+ import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
3
+ import { usePartner as N } from "../composables/usePartner.js";
4
+ import { useStripo as U } from "../composables/useStripo.js";
5
+ import { DefaultUsername as W, DefaultMessageType as x, DefaultGuidoConfig as M } from "../enums/defaults.js";
6
+ import z from "./organisms/base/Toaster.vue.js";
7
+ import B from "./organisms/header/HeaderWrapper.vue.js";
8
+ import F from "./organisms/LoadingWrapper.vue.js";
9
+ import H from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
+ import { useStripoApi as K } from "../services/stripoApi.js";
11
+ import { useDynamicContentStore as R } from "../stores/dynamic-content.js";
12
+ import { useEditorStore as j } from "../stores/editor.js";
13
+ import { usePreviewStore as q } from "../stores/preview.js";
14
+ import J from "../node_modules/lodash-es/merge.js";
15
+ const ae = /* @__PURE__ */ I({
16
16
  __name: "Guido",
17
17
  props: {
18
18
  templateId: null,
@@ -26,85 +26,78 @@ const de = /* @__PURE__ */ k({
26
26
  preselectedDynamicContentList: null,
27
27
  guidoConfig: null
28
28
  },
29
- emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
30
- setup(T, { expose: G, emit: o }) {
31
- const t = T, I = b(
29
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
30
+ setup(b, { expose: E, emit: t }) {
31
+ const o = b, T = L(
32
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), L = b(
34
- () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
- ), n = q(), c = J(), P = Q(), r = E(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
33
+ ), n = R(), a = j(), G = q(), c = P(() => a.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), {
36
34
  templateId: l,
37
35
  userId: p,
38
36
  guidoConfig: u,
39
- html: g = "",
40
- css: f = "",
37
+ html: f = "",
38
+ css: g = "",
41
39
  partnerName: i = m(),
42
40
  productType: s = d(),
43
- messageType: y = z,
44
- username: C = M
45
- } = t;
46
- window.GuidoConfig = V(B, u), window.GuidoConfig.partner = {
41
+ messageType: y = x,
42
+ username: C = W
43
+ } = o;
44
+ window.GuidoConfig = J(M, u), window.GuidoConfig.partner = {
47
45
  partnerName: i,
48
46
  productType: s,
49
47
  messageType: y
50
48
  };
51
- const { initPlugin: v } = x({
49
+ const { initPlugin: v } = U({
52
50
  emailId: l,
53
51
  userId: p,
54
52
  username: C,
55
53
  partnerName: i,
56
54
  productType: s,
57
- preselectedDynamicContentList: a
58
- }), { getDefaultTemplate: w } = j(), _ = E(() => {
59
- var e;
60
- return !((e = window.GuidoConfig) != null && e.useHeader);
61
- });
62
- N({
55
+ preselectedDynamicContentList: r
56
+ }), { getDefaultTemplate: w } = K();
57
+ A({
63
58
  onBack: () => {
64
- console.debug("guido:back"), o("back");
59
+ console.debug("guido:back"), t("back");
65
60
  },
66
61
  onSaveStart: () => {
67
- console.debug("guido:save:start"), o("save:start");
62
+ console.debug("guido:save:start"), t("save:start");
68
63
  },
69
64
  onSaveComplete: (e) => {
70
- console.debug("guido:save:complete", e), o("save:complete", e);
65
+ console.debug("guido:save:complete", e), t("save:complete", e);
71
66
  }
72
67
  });
73
- const h = (e) => {
68
+ const D = (e) => {
74
69
  console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
75
- }, D = () => {
70
+ }, S = () => {
76
71
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
77
72
  };
78
- return A(() => r.value, () => {
79
- o("on-change");
80
- }), W(async () => {
73
+ return _(async () => {
81
74
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
82
75
  try {
83
76
  let e = {
84
- html: g,
85
- css: f,
77
+ html: f,
78
+ css: g,
86
79
  forceRecreate: !0
87
80
  // TODO: It should be false for old templates. We will communicate with Stripo
88
81
  };
89
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = a;
82
+ e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
90
83
  } catch (e) {
91
84
  console.error("Failed to initialize Stripo editor:", e);
92
85
  }
93
86
  document.addEventListener("dynamic-content:open", (e) => {
94
- const S = e;
95
- console.debug("dynamic-content:open", S.detail), o("dynamic-content:open", S.detail);
87
+ const h = e;
88
+ console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
96
89
  });
97
- }), H(() => {
90
+ }), k(() => {
98
91
  window.UIEditor.removeEditor();
99
- }), G({
92
+ }), E({
100
93
  dynamicContent: {
101
- insert: h,
102
- close: D
94
+ insert: D,
95
+ close: S
103
96
  },
104
- hasChanges: r
105
- }), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: L, dynamicContentStore: n, props: t, editorStore: c, previewStore: P, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: _, insertDynamicContent: h, closeDynamicContent: D, Toaster: F, HeaderWrapper: K, LoadingWrapper: O, SaveAsTemplateDrawer: R };
97
+ hasChanges: c
98
+ }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, previewStore: G, hasChanges: c, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: f, css: g, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, LoadingWrapper: F, SaveAsTemplateDrawer: H };
106
99
  }
107
100
  });
108
101
  export {
109
- de as default
102
+ ae as default
110
103
  };
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import o from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var r = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.editorStore.isViewOptionsDisabled ? t._e() : s("div", { staticClass: "new-tag" }, [t._v(" " + t._s(e.trans("settings.new")) + " ")])], 1);
7
- }, n = [], a = /* @__PURE__ */ o(
8
- i,
5
+ var t = this, i = t._self._c, e = t._self._setupProxy;
6
+ return i(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ s(
8
+ o,
9
9
  r,
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "99e4d32b"
13
+ "ad3cf7cc"
14
14
  );
15
- const c = a.exports;
15
+ const m = _.exports;
16
16
  export {
17
- c as default
17
+ m as default
18
18
  };
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import s from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } }), s("div", { staticClass: "new-tag" }, [t._v(" " + t._s(e.trans("settings.new")) + " ")])], 1);
7
- }, r = [], a = /* @__PURE__ */ o(
8
- i,
9
- n,
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ s,
10
9
  r,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "c144e1e3"
13
+ "421ffc13"
14
14
  );
15
- const m = a.exports;
15
+ const f = _.exports;
16
16
  export {
17
- m as default
17
+ f as default
18
18
  };
@@ -1,5 +1,4 @@
1
1
  export declare const usePartner: () => {
2
2
  getPartnerName: () => string;
3
3
  getProductType: () => number;
4
- isTestPartner: () => boolean;
5
4
  };
@@ -1,18 +1,11 @@
1
- import { TEST_PARTNER_LIST as r, DefaultProductType as o, ProductIds as n } from "../enums/defaults.js";
2
- const i = () => {
3
- const e = () => window.location.hostname.split(".")[0] || "";
4
- return {
5
- getPartnerName: e,
6
- getProductType: () => {
7
- const t = window.location.pathname.split("/").filter(Boolean)[0] || o;
8
- return n[t] || 0;
9
- },
10
- isTestPartner: () => {
11
- const t = e();
12
- return r.includes(t);
13
- }
14
- };
15
- };
1
+ import { DefaultProductType as e, ProductIds as o } from "../enums/defaults.js";
2
+ const c = () => ({
3
+ getPartnerName: () => window.location.hostname.split(".")[0] || "",
4
+ getProductType: () => {
5
+ const t = window.location.pathname.split("/").filter(Boolean)[0] || e;
6
+ return o[t] || 0;
7
+ }
8
+ });
16
9
  export {
17
- i as usePartner
10
+ c as usePartner
18
11
  };
@@ -1,31 +1,31 @@
1
1
  import { useEditorStore as n } from "../stores/editor.js";
2
- import { usePreviewStore as p } from "../stores/preview.js";
3
- import { useActionsApi as l } from "./useActionsApi.js";
4
- import { useCodeEditorApi as m } from "./useCodeEditorApi.js";
5
- const M = () => {
6
- const e = n(), o = p(), { closeCodeEditor: i } = m(), { getPreviewData: a } = l(), r = () => {
7
- e.isPreviewModeOpen = !1, o.$reset();
2
+ import { usePreviewStore as l } from "../stores/preview.js";
3
+ import { useActionsApi as m } from "./useActionsApi.js";
4
+ import { useCodeEditorApi as p } from "./useCodeEditorApi.js";
5
+ const E = () => {
6
+ const o = n(), e = l(), { closeCodeEditor: a } = p(), { getPreviewData: s } = m(), r = () => {
7
+ o.isPreviewModeOpen = !1, e.$reset();
8
8
  };
9
9
  return {
10
10
  closePreviewMode: r,
11
11
  openPreviewMode: () => {
12
- e.isCodeEditorOpen && i(), e.isPreviewModeOpen = !0;
12
+ o.isCodeEditorOpen && a(), o.isPreviewModeOpen = !0;
13
13
  },
14
14
  loadPreviewData: async () => {
15
- if (!(e.loadingStatus || o.isLoaded)) {
16
- e.loadingStatus = !0;
15
+ if (!(o.loadingStatus || e.isLoaded)) {
16
+ o.loadingStatus = !0;
17
17
  try {
18
- const { html: t, ampHtml: s, ampErrors: d } = await a();
19
- o.templateHtml = t || "", o.updateAMPData({ ampHtml: s || "", ampErrors: d || [] }), o.isLoaded = !0;
18
+ const { html: t, ampHtml: i, ampErrors: d } = await s();
19
+ e.templateHtml = t || "", e.ampHtml = i || "", e.ampErrors = d || [], e.setEmailFormat(i ? "AMP" : "html"), e.isLoaded = !0;
20
20
  } catch (t) {
21
21
  console.error("Failed to load preview data:", t), r();
22
22
  } finally {
23
- e.loadingStatus = !1;
23
+ o.loadingStatus = !1;
24
24
  }
25
25
  }
26
26
  }
27
27
  };
28
28
  };
29
29
  export {
30
- M as usePreviewMode
30
+ E as usePreviewMode
31
31
  };
@@ -1,23 +1,21 @@
1
- import { useActionsApi as S } from "./useActionsApi.js";
1
+ import { useActionsApi as g } from "./useActionsApi.js";
2
2
  import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
- import { useStripoEventHandler as E } from "./useStripoEventHandler.js";
4
- import { useToaster as C } from "./useToaster.js";
5
- import { displayConditions as y } from "../enums/displayConditions.js";
6
- import h from "../extensions/DynamicContent/extension.js";
7
- import { useStripoApi as w } from "../services/stripoApi.js";
8
- import b from "../static/styles/customEditorStyle.css.js";
9
- import { useEditorStore as V } from "../stores/editor.js";
10
- import { dynamicContentToMergeTags as _ } from "../utils/genericUtil.js";
11
- const x = (a) => {
12
- const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
13
- const o = V(), { html: e, css: s, forceRecreate: g } = r;
3
+ import { useToaster as S } from "./useToaster.js";
4
+ import { displayConditions as C } from "../enums/displayConditions.js";
5
+ import y from "../extensions/DynamicContent/extension.js";
6
+ import { useStripoApi as E } from "../services/stripoApi.js";
7
+ import { useEditorStore as h } from "../stores/editor.js";
8
+ import { dynamicContentToMergeTags as w } from "../utils/genericUtil.js";
9
+ const M = (d) => {
10
+ const { handleError: a } = S(), { getToken: c, getCustomFonts: u } = E(), l = (r, i = []) => {
11
+ const e = h(), { html: t, css: s, forceRecreate: p } = r;
14
12
  window.UIEditor.initEditor(
15
13
  document.querySelector("#guido-editor"),
16
14
  {
17
- metadata: a,
18
- html: e,
15
+ metadata: d,
16
+ html: t,
19
17
  css: s,
20
- forceRecreate: g,
18
+ forceRecreate: p,
21
19
  locale: "en",
22
20
  undoButtonSelector: "#guido__undo-button",
23
21
  redoButtonSelector: "#guido__redo-button",
@@ -27,13 +25,15 @@ const x = (a) => {
27
25
  customAppearanceMergetags: !0,
28
26
  customAppearanceMergetagsBorderColor: "#f1f3fe",
29
27
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
30
- customViewStyles: b,
28
+ customViewStyles: `
29
+ .esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
30
+ .esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
31
+ `,
31
32
  conditionsEnabled: !0,
32
33
  customConditionsEnabled: !0,
33
- conditionCategories: y,
34
+ conditionCategories: C,
34
35
  enableXSSSecurity: !0,
35
36
  messageSettingsEnabled: !1,
36
- selectBlockAfterDropFromSettingsPanel: !0,
37
37
  editorFonts: {
38
38
  showDefaultStandardFonts: !0,
39
39
  showDefaultNotStandardFonts: !0,
@@ -41,62 +41,61 @@ const x = (a) => {
41
41
  },
42
42
  mergeTags: [
43
43
  {
44
- entries: _(a.preselectedDynamicContentList)
44
+ entries: w(d.preselectedDynamicContentList)
45
45
  }
46
46
  ],
47
- async onTokenRefreshRequest(t) {
47
+ async onTokenRefreshRequest(o) {
48
48
  try {
49
49
  const n = await c();
50
- t(n);
50
+ o(n);
51
51
  } catch (n) {
52
- d(n, "Failed to refresh token");
52
+ a(n, "Failed to refresh token");
53
53
  }
54
54
  },
55
55
  onTemplateLoaded() {
56
56
  try {
57
- const { importCss: t } = f(), { activateCustomViewStyles: n } = S();
58
- t(), n(), o.isStripoInitialized = !0, o.loadingStatus = !1;
59
- } catch (t) {
60
- d(t, "Failed to load custom interface appearance");
57
+ const { importCss: o } = f(), { activateCustomViewStyles: n } = g();
58
+ o(), n(), e.loadingStatus = !1;
59
+ } catch (o) {
60
+ a(o, "Failed to load custom interface appearance");
61
61
  }
62
62
  },
63
- onCodeEditorVisibilityChanged(t) {
64
- o.isCodeEditorOpen = t;
63
+ onCodeEditorVisibilityChanged(o) {
64
+ e.isCodeEditorOpen = o;
65
65
  },
66
- onEditorVisualModeChanged(t) {
67
- o.editorVisualMode = t.toLowerCase();
66
+ onEditorVisualModeChanged(o) {
67
+ e.editorVisualMode = o.toLowerCase();
68
68
  },
69
- onVersionHistoryVisibilityChanged(t) {
70
- o.isVersionHistoryOpen = t;
69
+ onVersionHistoryVisibilityChanged(o) {
70
+ e.isVersionHistoryOpen = o;
71
71
  },
72
72
  onDataChanged() {
73
- o.hasChanges = !0;
73
+ e.hasChanges = !0;
74
74
  },
75
- onEvent: l,
76
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
77
- extensions: [h]
75
+ ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
76
+ extensions: [y]
78
77
  }
79
78
  );
80
- }, m = (r) => new Promise((i, o) => {
79
+ }, m = (r) => new Promise((i, e) => {
81
80
  if (document.getElementById("UiEditorScript")) {
82
81
  r(), i();
83
82
  return;
84
83
  }
85
- const e = document.createElement("script");
86
- e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
84
+ const t = document.createElement("script");
85
+ t.id = "UiEditorScript", t.type = "module", t.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", t.onload = () => {
87
86
  r(), i();
88
- }, e.onerror = () => {
87
+ }, t.onerror = () => {
89
88
  const s = new Error("Failed to load Stripo UIEditor script");
90
- o(s);
91
- }, document.body.appendChild(e);
89
+ e(s);
90
+ }, document.body.appendChild(t);
92
91
  });
93
92
  return { initPlugin: async (r) => {
94
93
  await m(async () => {
95
94
  const i = await u();
96
- p(r, i);
95
+ l(r, i);
97
96
  });
98
97
  } };
99
98
  };
100
99
  export {
101
- x as useStripo
100
+ M as useStripo
102
101
  };
@@ -5,4 +5,3 @@ export declare const DefaultUsername = "Guido User";
5
5
  export declare const DefaultMessageType = 1;
6
6
  export declare const EditorType: number;
7
7
  export declare const ProductIds: Record<string, number>;
8
- export declare const TEST_PARTNER_LIST: string[];
@@ -1,4 +1,4 @@
1
- const t = {
1
+ const e = {
2
2
  translationsPath: "window.trans.en",
3
3
  emailHeader: {
4
4
  senderName: "",
@@ -8,49 +8,16 @@ const t = {
8
8
  dynamicContent: !0,
9
9
  saveAsTemplate: !0,
10
10
  versionHistory: !0
11
- },
12
- useHeader: !0
13
- }, a = "email", e = "Guido User", o = 1, n = 2, i = {
11
+ }
12
+ }, t = "email", s = "Guido User", a = 1, n = 2, o = {
14
13
  email: 60,
15
14
  architect: 49
16
- }, s = [
17
- "alfredtesting",
18
- "electio",
19
- "eurekatest",
20
- "gachapontestpart",
21
- "gluautomation1",
22
- "gluautomation2",
23
- "gluautomation3",
24
- "gluautomation4",
25
- "inone",
26
- "inshoppingcart",
27
- "krakentest",
28
- "leeroy",
29
- "newsletteruat",
30
- "ozaspava",
31
- "piratesquad",
32
- "qaautomation1",
33
- "qaautomation2",
34
- "qaautomation3",
35
- "qaautomation4",
36
- "roiautomation",
37
- "seleniumautomation",
38
- "seleniumautomation1",
39
- "seleniumautomation2",
40
- "seleniumautomation3",
41
- "shopbagg",
42
- "shopifytest",
43
- "singlepageqa",
44
- "testqa",
45
- "vikingsankara",
46
- "stripoeditorlivetest"
47
- ];
15
+ };
48
16
  export {
49
- t as DefaultGuidoConfig,
50
- o as DefaultMessageType,
51
- a as DefaultProductType,
52
- e as DefaultUsername,
17
+ e as DefaultGuidoConfig,
18
+ a as DefaultMessageType,
19
+ t as DefaultProductType,
20
+ s as DefaultUsername,
53
21
  n as EditorType,
54
- i as ProductIds,
55
- s as TEST_PARTNER_LIST
22
+ o as ProductIds
56
23
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-c144e1e3]{position:relative;display:inline-block}.new-tag[data-v-c144e1e3]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-c144e1e3] .guido__verion-history-view-option-selection-desktop svg,[data-v-c144e1e3] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-c144e1e3] .in-segments-wrapper__button_selected,[data-v-c144e1e3] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-c144e1e3] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-99e4d32b]{position:relative;display:inline-block}.new-tag[data-v-99e4d32b]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-99e4d32b] .guido__view-option-selection-desktop svg,[data-v-99e4d32b] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-99e4d32b] .in-segments-wrapper__button_selected,[data-v-99e4d32b] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-99e4d32b] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-5c6ce65b],.guido-editor__container[data-v-5c6ce65b]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-5c6ce65b]{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}[data-v-acae5543] .vueperslides__bullets,[data-v-bccb3b50] .vueperslides__bullets{pointer-events:none!important}
1
+ [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.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-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-f78aa5ad],.guido-editor__container[data-v-f78aa5ad]{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}
@@ -6,20 +6,11 @@ ue-main-tabs-panel-component .fixed-panel-header {
6
6
  display: none;
7
7
  }
8
8
 
9
- /* Remove with this writing task DT-28355 */
10
- ue-description a {
11
- display: none;
12
- }
13
-
14
9
  .label {
15
10
  font-size: 13px;
16
11
  color: var(--guido-color-gray-800);
17
12
  }
18
13
 
19
- .stacked-panel {
20
- overflow: scroll;
21
- }
22
-
23
14
  .stacked-panel-title {
24
15
  padding: 16px;
25
16
  font-size: 16px;