@useinsider/guido 1.4.4-beta.b4adc85 → 1.4.4

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 (80) hide show
  1. package/README.md +664 -295
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/Guido.vue2.js +89 -63
  4. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
  5. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
  6. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
  7. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  8. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -18
  9. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  10. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +19 -22
  11. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
  12. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
  13. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  14. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
  15. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
  16. package/dist/composables/useBlocksConfig.js +20 -23
  17. package/dist/composables/useConfig.js +5 -51
  18. package/dist/composables/useHtmlCompiler.js +19 -20
  19. package/dist/composables/useHtmlValidator.js +41 -41
  20. package/dist/composables/usePartner.js +9 -19
  21. package/dist/composables/useStripo.js +11 -11
  22. package/dist/composables/useTranslations.js +2 -3
  23. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  24. package/dist/enums/defaults.js +67 -3
  25. package/dist/enums/unsubscribe.js +20 -23
  26. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +11 -12
  27. package/dist/guido.css +1 -1
  28. package/dist/library.js +2 -12
  29. package/dist/node_modules/lodash-es/_apply.js +16 -0
  30. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  31. package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
  32. package/dist/node_modules/lodash-es/_assignValue.js +10 -0
  33. package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
  34. package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
  35. package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
  36. package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
  37. package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  38. package/dist/node_modules/lodash-es/_baseRest.js +9 -0
  39. package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
  40. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  41. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  42. package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  43. package/dist/node_modules/lodash-es/_copyArray.js +9 -0
  44. package/dist/node_modules/lodash-es/_copyObject.js +14 -0
  45. package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
  46. package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
  47. package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
  48. package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
  49. package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
  50. package/dist/node_modules/lodash-es/_overRest.js +15 -0
  51. package/dist/node_modules/lodash-es/_safeGet.js +7 -0
  52. package/dist/node_modules/lodash-es/_setToString.js +6 -0
  53. package/dist/node_modules/lodash-es/_shortOut.js +16 -0
  54. package/dist/node_modules/lodash-es/constant.js +8 -0
  55. package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  56. package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
  57. package/dist/node_modules/lodash-es/keysIn.js +9 -0
  58. package/dist/node_modules/lodash-es/merge.js +8 -0
  59. package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
  60. package/dist/node_modules/valibot/dist/index.js +103 -476
  61. package/dist/services/templateLibraryApi.js +18 -18
  62. package/dist/src/@types/generic.d.ts +45 -4
  63. package/dist/src/components/Guido.vue.d.ts +12 -13
  64. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  65. package/dist/src/composables/useConfig.d.ts +2 -184
  66. package/dist/src/composables/usePartner.d.ts +0 -8
  67. package/dist/src/enums/defaults.d.ts +6 -4
  68. package/dist/src/enums/unsubscribe.d.ts +1 -5
  69. package/dist/src/library.d.ts +1 -3
  70. package/dist/src/stores/config.d.ts +102 -1547
  71. package/dist/stores/config.js +9 -141
  72. package/package.json +1 -1
  73. package/dist/@types/config/defaults.js +0 -44
  74. package/dist/@types/config/schemas.js +0 -229
  75. package/dist/@types/config/validator.js +0 -56
  76. package/dist/src/@types/config/defaults.d.ts +0 -68
  77. package/dist/src/@types/config/index.d.ts +0 -14
  78. package/dist/src/@types/config/schemas.d.ts +0 -505
  79. package/dist/src/@types/config/types.d.ts +0 -142
  80. package/dist/src/@types/config/validator.d.ts +0 -119
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "86b0275b"
15
+ "98181b5a"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,108 +1,134 @@
1
- import { defineComponent as R, defineAsyncComponent as k, ref as x, computed as P, watch as N, onMounted as O, onUnmounted as z } from "vue";
2
- import { provideGuidoActions as B } from "../composables/useGuidoActions.js";
3
- import { usePartner as K } from "../composables/usePartner.js";
4
- import { useStripo as M } from "../composables/useStripo.js";
5
- import { migrate as T } from "../config/migrator/index.js";
6
- import j from "./organisms/base/Toaster.vue.js";
7
- import q from "./organisms/extensions/recommendation/FilterSelectionDrawer.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 X from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
12
- import { useStripoApi as Y } from "../services/stripoApi.js";
13
- import { useConfigStore as Z } from "../stores/config.js";
14
- import { useDynamicContentStore as $ } from "../stores/dynamic-content.js";
15
- import { useEditorStore as ee } from "../stores/editor.js";
16
- import { usePreviewStore as oe } from "../stores/preview.js";
17
- import { useUnsubscribeStore as te } from "../stores/unsubscribe.js";
18
- const Se = /* @__PURE__ */ R({
1
+ import { defineComponent as O, defineAsyncComponent as I, ref as z, computed as U, watch as B, onMounted as K, onUnmounted as j } from "vue";
2
+ import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
+ import { usePartner as J } from "../composables/usePartner.js";
4
+ import { useStripo as Q } from "../composables/useStripo.js";
5
+ import { migrate as L } from "../config/migrator/index.js";
6
+ import { DefaultUsername as V, DefaultMessageType as X, DefaultGuidoConfig as Y } from "../enums/defaults.js";
7
+ import Z from "./organisms/base/Toaster.vue.js";
8
+ import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import ee from "./organisms/header/HeaderWrapper.vue.js";
10
+ import oe from "./organisms/LoadingWrapper.vue.js";
11
+ import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
+ import { useStripoApi as re } from "../services/stripoApi.js";
14
+ import { useConfigStore as ie } from "../stores/config.js";
15
+ import { useDynamicContentStore as se } from "../stores/dynamic-content.js";
16
+ import { useEditorStore as ae } from "../stores/editor.js";
17
+ import { usePreviewStore as ce } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as me } from "../stores/unsubscribe.js";
19
+ import de from "../node_modules/lodash-es/merge.js";
20
+ const Ue = /* @__PURE__ */ O({
19
21
  __name: "Guido",
20
22
  props: {
21
- config: null
23
+ templateId: null,
24
+ userId: null,
25
+ messageType: null,
26
+ partnerName: null,
27
+ productType: null,
28
+ username: null,
29
+ html: null,
30
+ css: null,
31
+ guidoConfig: null,
32
+ templateConfig: null
22
33
  },
23
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
24
- setup(U, { expose: W, emit: t }) {
25
- const l = U, _ = k(
35
+ setup(W, { expose: _, emit: o }) {
36
+ const u = W, A = I(
26
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
27
- ), I = k(
38
+ ), N = I(
28
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
29
- ), p = x(), s = $(), u = te(), n = Z();
30
- n.init(l.config);
31
- const i = ee(), L = oe(), r = P(() => i.hasChanges), { isTestPartner: A } = K(), y = () => {
40
+ ), p = z(), i = se(), g = me(), f = ie(), s = ae(), F = ce(), n = U(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: H } = J(), b = () => {
32
41
  var e;
33
42
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
34
- }, { templateId: a, userId: v, partnerName: b, productType: f, username: g, template: o } = n, c = (o == null ? void 0 : o.html) || "", h = (o == null ? void 0 : o.css) || "", d = (o == null ? void 0 : o.preselectedDynamicContent) || [];
35
- i.templateId = a;
36
- const { initPlugin: S } = M({
43
+ }, {
44
+ templateId: a,
45
+ userId: C,
46
+ guidoConfig: h,
47
+ templateConfig: t,
48
+ html: r = "",
49
+ css: S = "",
50
+ partnerName: c = y(),
51
+ productType: m = v(),
52
+ messageType: w = X,
53
+ username: D = V
54
+ } = u, d = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
55
+ s.templateId = a, window.GuidoConfig = de(Y, h), window.GuidoConfig.partner = {
56
+ partnerName: c,
57
+ productType: m,
58
+ messageType: w
59
+ }, f.templateConfig = t;
60
+ const { initPlugin: E } = Q({
37
61
  emailId: a,
38
- userId: v,
39
- username: g,
40
- partnerName: b,
41
- productType: f,
62
+ userId: C,
63
+ username: D,
64
+ partnerName: c,
65
+ productType: m,
42
66
  preselectedDynamicContentList: d,
43
67
  onReady: () => {
44
- console.debug("guido:ready"), t("ready");
68
+ console.debug("guido:ready"), o("ready");
45
69
  }
46
- }), { getDefaultTemplate: w } = Y(), F = P(() => !n.showHeader);
47
- B({
70
+ }), { getDefaultTemplate: T } = re(), R = U(() => {
71
+ var e;
72
+ return !((e = window.GuidoConfig) != null && e.useHeader);
73
+ });
74
+ q({
48
75
  onBack: () => {
49
- console.debug("guido:back"), t("back");
76
+ console.debug("guido:back"), o("back");
50
77
  },
51
78
  onSaveStart: () => {
52
- console.debug("guido:save:start"), t("save:start");
79
+ console.debug("guido:save:start"), o("save:start");
53
80
  },
54
81
  onSaveComplete: (e) => {
55
- console.debug("guido:save:complete", e), t("save:complete", e);
82
+ console.debug("guido:save:complete", e), o("save:complete", e);
56
83
  },
57
84
  onTestEmailClick: () => {
58
- console.debug("guido:test-email:click"), t("test-email:click");
85
+ console.debug("guido:test-email:click"), o("test-email:click");
59
86
  }
60
87
  });
61
- const C = (e) => {
62
- console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
63
- }, D = () => {
88
+ const P = (e) => {
89
+ console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
90
+ }, k = () => {
64
91
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
65
92
  };
66
- N(() => r.value, () => {
67
- t("on-change", r.value);
93
+ B(() => n.value, () => {
94
+ o("on-change", n.value);
68
95
  });
69
- const m = (e) => {
70
- const E = e, { attribute: G, position: H } = E.detail;
71
- console.debug("dynamic-content:open", E.detail), t("dynamic-content:open", G, H);
96
+ const l = (e) => {
97
+ const G = e, { attribute: x, position: M } = G.detail;
98
+ console.debug("dynamic-content:open", G.detail), o("dynamic-content:open", x, M);
72
99
  };
73
- return O(async () => {
100
+ return K(async () => {
74
101
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
75
102
  try {
76
- u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
103
+ g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
77
104
  let e = {
78
- html: c && await T(c),
79
- css: h,
105
+ html: r && await L(r),
106
+ css: S,
80
107
  forceRecreate: !0
81
108
  // TODO: It should be false for old templates. We will communicate with Stripo
82
109
  };
83
- e.html || (e = await w(), e.html = await T(e.html)), await S(e), s.selectedDynamicContentList = d;
110
+ e.html || (e = await T(), e.html = await L(e.html)), await E(e), i.selectedDynamicContentList = d;
84
111
  } catch (e) {
85
112
  console.error("Failed to initialize Stripo editor:", e);
86
113
  }
87
- document.addEventListener("dynamic-content:open", m);
88
- }), z(() => {
89
- document.removeEventListener("dynamic-content:open", m);
114
+ document.addEventListener("dynamic-content:open", l);
115
+ }), j(() => {
116
+ document.removeEventListener("dynamic-content:open", l);
90
117
  try {
91
118
  window.UIEditor.removeEditor();
92
119
  } catch {
93
120
  console.debug("Failed to remove Stripo editor: No editor found");
94
121
  }
95
- n.reset();
96
- }), W({
122
+ }), _({
97
123
  dynamicContent: {
98
- insert: C,
99
- close: D
124
+ insert: P,
125
+ close: k
100
126
  },
101
- hasChanges: r,
102
- saveSilent: y
103
- }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: I, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: L, hasChanges: r, isTestPartner: A, saveSilent: y, templateId: a, userId: v, partnerName: b, productType: f, username: g, templateConfig: o, html: c, css: h, preselectedDynamicContentList: d, emit: t, initPlugin: S, getDefaultTemplate: w, noHeader: F, insertDynamicContent: C, closeDynamicContent: D, handleDynamicContentOpen: m, Toaster: j, FilterSelectionDrawer: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V, UnsubscribeWrapper: X };
127
+ hasChanges: n,
128
+ saveSilent: b
129
+ }), { __sfc: !0, PreviewContainer: A, OnboardingWrapper: N, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: F, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: H, saveSilent: b, templateId: a, userId: C, guidoConfig: h, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: E, getDefaultTemplate: T, noHeader: R, insertDynamicContent: P, closeDynamicContent: k, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
104
130
  }
105
131
  });
106
132
  export {
107
- Se as default
133
+ Ue as default
108
134
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as i, computed as s } from "vue";
2
- import { useConfig as c } from "../../../../composables/useConfig.js";
3
- import { useTranslations as d } from "../../../../composables/useTranslations.js";
4
- import { InIcons as u } from "@useinsider/design-system-vue";
5
- const g = /* @__PURE__ */ i({
1
+ import { defineComponent as m, computed as o } from "vue";
2
+ import { useConfig as a } from "../../../../composables/useConfig.js";
3
+ import { useTranslations as i } from "../../../../composables/useTranslations.js";
4
+ import { InIcons as c } from "@useinsider/design-system-vue";
5
+ const l = /* @__PURE__ */ m({
6
6
  __name: "EmailHeaderInfo",
7
7
  setup(f) {
8
- const { config: n } = c(), r = d(), a = s(() => {
9
- var e, t, o;
10
- return ((o = (t = (e = n.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.senderName) || r("settings.sender-name");
11
- }), m = s(() => {
12
- var e, t, o;
13
- return ((o = (t = (e = n.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.subject) || r("email-editor.default-subject");
8
+ const { config: t } = a(), n = i(), s = o(() => {
9
+ var e;
10
+ return ((e = t.emailHeader) == null ? void 0 : e.senderName) || n("settings.sender-name");
11
+ }), r = o(() => {
12
+ var e;
13
+ return ((e = t.emailHeader) == null ? void 0 : e.subject) || n("email-editor.default-subject");
14
14
  });
15
- return { __sfc: !0, config: n, trans: r, senderName: a, subject: m, InIcons: u };
15
+ return { __sfc: !0, config: t, trans: n, senderName: s, subject: r, InIcons: c };
16
16
  }
17
17
  });
18
18
  export {
19
- g as default
19
+ l as default
20
20
  };
@@ -1,18 +1,18 @@
1
1
  import e from "./InboxView.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
5
  var s = this, t = s._self._c, c = s._self._setupProxy;
6
6
  return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(_) {
7
7
  return c.emit("open-email");
8
8
  } } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 mb-12 cropped-text" }, [s._v(" " + s._s(c.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1 cropped-text" }, [s._v(" " + s._s(c.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.trans("product-catalog.today")) + " ")]), t(c.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]);
9
- }, i = [], n = /* @__PURE__ */ r(
9
+ }, i = [], n = /* @__PURE__ */ a(
10
10
  e,
11
- a,
11
+ r,
12
12
  i,
13
13
  !1,
14
14
  null,
15
- "4b876c1b"
15
+ "f20b3a9b"
16
16
  );
17
17
  const m = n.exports;
18
18
  export {
@@ -1,21 +1,21 @@
1
- import { defineComponent as c, computed as r } from "vue";
2
- import { useConfig as u } from "../../../../composables/useConfig.js";
3
- import { useTranslations as d } from "../../../../composables/useTranslations.js";
1
+ import { defineComponent as a, computed as o } from "vue";
2
+ import { useConfig as i } from "../../../../composables/useConfig.js";
3
+ import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
4
  import { InIcons as f } from "@useinsider/design-system-vue";
5
- const j = /* @__PURE__ */ c({
5
+ const b = /* @__PURE__ */ a({
6
6
  __name: "InboxView",
7
7
  emits: ["open-email"],
8
- setup(p, { emit: m }) {
9
- const n = d(), { config: s } = u(), a = r(() => {
10
- var e, t, o;
11
- return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.senderName) || n("settings.sender-name");
12
- }), i = r(() => {
13
- var e, t, o;
14
- return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.subject) || n("email-editor.default-subject");
8
+ setup(p, { emit: s }) {
9
+ const t = c(), { config: n } = i(), r = o(() => {
10
+ var e;
11
+ return ((e = n.emailHeader) == null ? void 0 : e.senderName) || t("settings.sender-name");
12
+ }), m = o(() => {
13
+ var e;
14
+ return ((e = n.emailHeader) == null ? void 0 : e.subject) || t("email-editor.default-subject");
15
15
  });
16
- return { __sfc: !0, emit: m, trans: n, config: s, senderName: a, subject: i, InIcons: f };
16
+ return { __sfc: !0, emit: s, trans: t, config: n, senderName: r, subject: m, InIcons: f };
17
17
  }
18
18
  });
19
19
  export {
20
- j as default
20
+ b as default
21
21
  };
@@ -10,7 +10,7 @@ var n = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "06e6f7a7"
13
+ "0502bceb"
14
14
  );
15
15
  const p = i.exports;
16
16
  export {
@@ -1,20 +1,17 @@
1
- import { defineComponent as u, computed as m } from "vue";
2
- import { useConfig as f } from "../../../composables/useConfig.js";
3
- import { useBack as p } from "../../../composables/useGuidoActions.js";
4
- import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
5
- import { useTranslations as d } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as k } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as B } from "../../../stores/editor.js";
8
- import { InButtonV2 as b } from "@useinsider/design-system-vue";
9
- import _ from "./version-history/RestoreButton.vue.js";
10
- const h = /* @__PURE__ */ u({
1
+ import { defineComponent as c, computed as a } from "vue";
2
+ import { useConfig as m } from "../../../composables/useConfig.js";
3
+ import { useBack as u } from "../../../composables/useGuidoActions.js";
4
+ import { usePreviewMode as f } from "../../../composables/usePreviewMode.js";
5
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as d } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useEditorStore as l } from "../../../stores/editor.js";
8
+ import { InButtonV2 as k } from "@useinsider/design-system-vue";
9
+ import B from "./version-history/RestoreButton.vue.js";
10
+ const P = /* @__PURE__ */ c({
11
11
  __name: "LeftSlot",
12
- setup(v) {
13
- const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(), c = m(() => {
14
- var s, a;
15
- return o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : (a = (s = t.value) == null ? void 0 : s.ui) != null && a.backButtonLabel ? t.value.ui.backButtonLabel : e("email-editor.back-to-design");
16
- });
17
- return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: c, handleBackClick: () => {
12
+ setup(b) {
13
+ const o = l(), r = u(), { closeVersionHistory: i } = d(), { closePreviewMode: n } = f(), e = p(), { config: t } = m(), s = a(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : t.backButtonLabel ? t.backButtonLabel : e("email-editor.back-to-design"));
14
+ return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: s, handleBackClick: () => {
18
15
  if (o.isVersionHistoryOpen) {
19
16
  i();
20
17
  return;
@@ -24,9 +21,9 @@ const h = /* @__PURE__ */ u({
24
21
  return;
25
22
  }
26
23
  r();
27
- }, InButtonV2: b, RestoreButton: _ };
24
+ }, InButtonV2: k, RestoreButton: B };
28
25
  }
29
26
  });
30
27
  export {
31
- h as default
28
+ P as default
32
29
  };
@@ -1,20 +1,20 @@
1
- import u from "./RightSlot.vue2.js";
2
- import d from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var p = function() {
4
- var o, i, n, a, l, r;
1
+ import a from "./RightSlot.vue2.js";
2
+ import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var o, i, n;
5
5
  var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f" }, [(i = (o = t.config) == null ? void 0 : o.features) != null && i.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (a = (n = t.config) == null ? void 0 : n.features) != null && a.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (r = (l = t.config) == null ? void 0 : l.features) != null && r.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(f) {
6
+ return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (n = t.config.features) != null && n.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(c) {
7
7
  return t.handleSave(!1);
8
8
  } } })], 1);
9
- }, c = [], _ = /* @__PURE__ */ d(
9
+ }, u = [], d = /* @__PURE__ */ l(
10
+ a,
11
+ r,
10
12
  u,
11
- p,
12
- c,
13
13
  !1,
14
14
  null,
15
15
  null
16
16
  );
17
- const y = _.exports;
17
+ const f = d.exports;
18
18
  export {
19
- y as default
19
+ f as default
20
20
  };
@@ -1,26 +1,23 @@
1
- import { defineComponent as v, ref as D, computed as o } from "vue";
2
- import h from "../../wrappers/WpModal.vue.js";
3
- import { useConfig as y } from "../../../composables/useConfig.js";
4
- import { useTranslations as _ } from "../../../composables/useTranslations.js";
5
- import { ACADEMY_LINK as c } from "../../../enums/onboarding.js";
6
- import C from "../../../static/assets/onboarding-img.svg.js";
7
- import { useOnboardingStore as L } from "../../../stores/onboarding.js";
8
- import { isAfterDate as w, formatShortDate as N } from "../../../utils/dateUtil.js";
9
- const E = /* @__PURE__ */ v({
1
+ import { defineComponent as g, ref as b, computed as o } from "vue";
2
+ import v from "../../wrappers/WpModal.vue.js";
3
+ import { useConfig as D } from "../../../composables/useConfig.js";
4
+ import { useTranslations as h } from "../../../composables/useTranslations.js";
5
+ import { ACADEMY_LINK as l } from "../../../enums/onboarding.js";
6
+ import y from "../../../static/assets/onboarding-img.svg.js";
7
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
8
+ import { isAfterDate as C, formatShortDate as L } from "../../../utils/dateUtil.js";
9
+ const I = /* @__PURE__ */ g({
10
10
  __name: "NewVersionPopup",
11
11
  emits: ["onboarding-finished"],
12
- setup(S, { emit: a }) {
13
- const e = _(), t = L(), s = D(!0), { config: p } = y(), i = o(() => {
14
- var l, m;
15
- return (m = (l = p.value) == null ? void 0 : l.editor) == null ? void 0 : m.migrationDate;
16
- }), n = o(() => w(i.value || 0)), d = o(() => N(
17
- i.value || 0
18
- )), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), g = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
12
+ setup(w, { emit: a }) {
13
+ const e = h(), t = _(), s = b(!0), { config: p } = D(), i = o(() => p.migrationDate), n = o(() => C(i.value || 0)), d = o(() => L(
14
+ i.value
15
+ )), m = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), c = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
19
16
  sunsetDate: d.value,
20
- academyLink: c
17
+ academyLink: l
21
18
  }) : e("email-editor.onboarding-description", {
22
- academyLink: c
23
- })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
19
+ academyLink: l
20
+ })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), f = o(() => ({
24
21
  primaryButton: {
25
22
  type: "primary",
26
23
  labelText: e("left-menu.discover-now")
@@ -32,15 +29,15 @@ const E = /* @__PURE__ */ v({
32
29
  })), r = () => {
33
30
  s.value = !1, a("onboarding-finished");
34
31
  };
35
- return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: f, popupDescription: g, secondaryButtonLabel: u, footerButtonOptions: b, closePopup: r, handleDiscoverNow: () => {
32
+ return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: m, popupDescription: c, secondaryButtonLabel: u, footerButtonOptions: f, closePopup: r, handleDiscoverNow: () => {
36
33
  t.onDiscoverNowClicked(), r();
37
34
  }, handleRemindLater: () => {
38
35
  t.onRemindMeLater(), r();
39
36
  }, handleClose: () => {
40
37
  t.onNewVersionPopupClose(), r();
41
- }, WpModal: h, onboardingImageSvg: C };
38
+ }, WpModal: v, onboardingImageSvg: y };
42
39
  }
43
40
  });
44
41
  export {
45
- E as default
42
+ I as default
46
43
  };
@@ -1,16 +1,16 @@
1
1
  import s from "./UnsubscribeBreadcrumb.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var c = function() {
4
+ var o = function() {
5
5
  var e = this, t = e._self._c, r = e._self._setupProxy;
6
6
  return t(r.InBreadcrumb, { staticClass: "c-p", attrs: { "without-router": "", "active-tab": r.unsubscribeStore.activeType, "home-icon": !1, list: r.breadcrumbs, routes: [] }, on: { click: r.navigate } });
7
- }, o = [], n = /* @__PURE__ */ a(
7
+ }, c = [], n = /* @__PURE__ */ a(
8
8
  s,
9
- c,
10
9
  o,
10
+ c,
11
11
  !1,
12
12
  null,
13
- "293f1c47"
13
+ "70835920"
14
14
  );
15
15
  const f = n.exports;
16
16
  export {
@@ -1,16 +1,16 @@
1
- import { defineComponent as n, computed as s } from "vue";
2
- import { getTypeTranslations as a } from "../../../enums/unsubscribe.js";
1
+ import { defineComponent as o, computed as n } from "vue";
2
+ import { TYPE_TRANSLATIONS as s } from "../../../enums/unsubscribe.js";
3
3
  import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
4
4
  import { InBreadcrumb as m } from "@useinsider/design-system-vue";
5
- const _ = /* @__PURE__ */ n({
5
+ const f = /* @__PURE__ */ o({
6
6
  __name: "UnsubscribeBreadcrumb",
7
- setup(i) {
8
- const t = c(), r = a(), o = s(() => t.getSelectedCollection.map((e) => ({ value: e, text: r[e] })));
9
- return { __sfc: !0, unsubscribeStore: t, typeTranslations: r, breadcrumbs: o, navigate: (e) => {
10
- t.activeType = e.value;
7
+ setup(a) {
8
+ const r = c(), t = n(() => r.getSelectedCollection.map((e) => ({ value: e, text: s[e] })));
9
+ return { __sfc: !0, unsubscribeStore: r, breadcrumbs: t, navigate: (e) => {
10
+ r.activeType = e.value;
11
11
  }, InBreadcrumb: m };
12
12
  }
13
13
  });
14
14
  export {
15
- _ as default
15
+ f as default
16
16
  };
@@ -10,9 +10,9 @@ var i = function() {
10
10
  r,
11
11
  !1,
12
12
  null,
13
- "bb3bb07c"
13
+ "dd57102d"
14
14
  );
15
- const _ = c.exports;
15
+ const d = c.exports;
16
16
  export {
17
- _ as default
17
+ d as default
18
18
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as v, ref as b, computed as m, watch as _ } from "vue";
2
- import B from "../../wrappers/WpDrawer.vue.js";
3
- import { useToaster as U } from "../../../composables/useToaster.js";
4
- import { useTranslations as w } from "../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as N } from "../../../enums/toaster.js";
6
- import { PAGE_TYPES as l, ACADEMY_LINK as D, getTypeTranslations as P, UNSUBSCRIBE_PAGES_LINK as R } from "../../../enums/unsubscribe.js";
7
- import { useUnsubscribeStore as I } from "../../../stores/unsubscribe.js";
8
- import { InSegments as G } from "@useinsider/design-system-vue";
9
- const K = /* @__PURE__ */ v({
1
+ import { defineComponent as h, ref as b, computed as m, watch as _ } from "vue";
2
+ import v from "../../wrappers/WpDrawer.vue.js";
3
+ import { useToaster as B } from "../../../composables/useToaster.js";
4
+ import { useTranslations as N } from "../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as U } from "../../../enums/toaster.js";
6
+ import { PAGE_TYPES as l, ACADEMY_LINK as w, UNSUBSCRIBE_PAGES_LINK as P, TYPE_TRANSLATIONS as R } from "../../../enums/unsubscribe.js";
7
+ import { useUnsubscribeStore as D } from "../../../stores/unsubscribe.js";
8
+ import { InSegments as I } from "@useinsider/design-system-vue";
9
+ const z = /* @__PURE__ */ h({
10
10
  __name: "UnsubscribeTypeSelection",
11
- setup(x) {
12
- const e = w(), { showToaster: f } = U(), t = I(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
11
+ setup(G) {
12
+ const e = N(), { showToaster: f } = B(), t = D(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
13
13
  "unsubscription-preference.select-unsubscribe-page-description",
14
- { action: `<a href="${D}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
14
+ { action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
15
15
  ), T = m(() => [
16
16
  {
17
17
  description: e("unsubscription-preference.type-global-unsubscribe-description"),
@@ -62,7 +62,7 @@ const K = /* @__PURE__ */ v({
62
62
  p || r.push(Number(c));
63
63
  }), r.length === 0)
64
64
  return !0;
65
- const h = P(), a = r.map((c) => h[c]);
65
+ const a = r.map((c) => R[c]);
66
66
  let u = "";
67
67
  if (r.length === 1)
68
68
  u = e("unsubscription-preference.create-page-to-continue", {
@@ -81,12 +81,12 @@ const K = /* @__PURE__ */ v({
81
81
  });
82
82
  }
83
83
  return f({
84
- type: N.Warning,
84
+ type: U.Warning,
85
85
  message: u,
86
86
  actionButton: {
87
87
  text: "Go to Unsubscribe Pages",
88
88
  onClick: () => {
89
- window.location.href = R;
89
+ window.location.href = P;
90
90
  }
91
91
  }
92
92
  }), !1;
@@ -99,9 +99,9 @@ const K = /* @__PURE__ */ v({
99
99
  };
100
100
  return _(() => t.typeSelectionDrawerStatus, (s) => {
101
101
  s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
102
- }), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: B, InSegments: G };
102
+ }), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: g, selectCollection: C, WpDrawer: v, InSegments: I };
103
103
  }
104
104
  });
105
105
  export {
106
- K as default
106
+ z as default
107
107
  };