@useinsider/guido 1.4.4-beta.b4adc85 → 1.4.4-beta.db9794f

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 (84) hide show
  1. package/README.md +664 -295
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +90 -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/useActionsApi.js +42 -25
  17. package/dist/composables/useBlocksConfig.js +20 -23
  18. package/dist/composables/useConfig.js +5 -51
  19. package/dist/composables/useHtmlCompiler.js +19 -20
  20. package/dist/composables/useHtmlValidator.js +41 -41
  21. package/dist/composables/usePartner.js +9 -19
  22. package/dist/composables/useStripo.js +33 -33
  23. package/dist/composables/useTimerClone.js +53 -0
  24. package/dist/composables/useTranslations.js +2 -3
  25. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  26. package/dist/enums/defaults.js +67 -3
  27. package/dist/enums/unsubscribe.js +20 -23
  28. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +11 -12
  29. package/dist/guido.css +1 -1
  30. package/dist/library.js +2 -12
  31. package/dist/node_modules/lodash-es/_apply.js +16 -0
  32. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  33. package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
  34. package/dist/node_modules/lodash-es/_assignValue.js +10 -0
  35. package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
  36. package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
  37. package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
  38. package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
  39. package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  40. package/dist/node_modules/lodash-es/_baseRest.js +9 -0
  41. package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
  42. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  43. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  44. package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  45. package/dist/node_modules/lodash-es/_copyArray.js +9 -0
  46. package/dist/node_modules/lodash-es/_copyObject.js +14 -0
  47. package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
  48. package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
  49. package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
  50. package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
  51. package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
  52. package/dist/node_modules/lodash-es/_overRest.js +15 -0
  53. package/dist/node_modules/lodash-es/_safeGet.js +7 -0
  54. package/dist/node_modules/lodash-es/_setToString.js +6 -0
  55. package/dist/node_modules/lodash-es/_shortOut.js +16 -0
  56. package/dist/node_modules/lodash-es/constant.js +8 -0
  57. package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  58. package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
  59. package/dist/node_modules/lodash-es/keysIn.js +9 -0
  60. package/dist/node_modules/lodash-es/merge.js +8 -0
  61. package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
  62. package/dist/node_modules/valibot/dist/index.js +103 -476
  63. package/dist/services/templateLibraryApi.js +18 -18
  64. package/dist/src/@types/generic.d.ts +45 -4
  65. package/dist/src/components/Guido.vue.d.ts +12 -13
  66. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  67. package/dist/src/composables/useActionsApi.d.ts +2 -0
  68. package/dist/src/composables/useConfig.d.ts +2 -184
  69. package/dist/src/composables/usePartner.d.ts +0 -8
  70. package/dist/src/composables/useTimerClone.d.ts +6 -0
  71. package/dist/src/enums/defaults.d.ts +6 -4
  72. package/dist/src/enums/unsubscribe.d.ts +1 -5
  73. package/dist/src/library.d.ts +1 -3
  74. package/dist/src/stores/config.d.ts +102 -1547
  75. package/dist/stores/config.js +9 -141
  76. package/package.json +1 -1
  77. package/dist/@types/config/defaults.js +0 -44
  78. package/dist/@types/config/schemas.js +0 -229
  79. package/dist/@types/config/validator.js +0 -56
  80. package/dist/src/@types/config/defaults.d.ts +0 -68
  81. package/dist/src/@types/config/index.d.ts +0 -14
  82. package/dist/src/@types/config/schemas.d.ts +0 -505
  83. package/dist/src/@types/config/types.d.ts +0 -142
  84. package/dist/src/@types/config/validator.d.ts +0 -119
@@ -12,9 +12,9 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "86b0275b"
15
+ "e2f12ef7"
16
16
  );
17
- const v = s.exports;
17
+ const u = s.exports;
18
18
  export {
19
- v as default
19
+ u as default
20
20
  };
@@ -1,108 +1,135 @@
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 z, defineAsyncComponent as L, ref as K, computed as W, watch as j, onMounted as q, onUnmounted as J } from "vue";
2
+ import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
3
+ import { usePartner as V } from "../composables/usePartner.js";
4
+ import { useStripo as X } from "../composables/useStripo.js";
5
+ import { useTimerClone as Y } from "../composables/useTimerClone.js";
6
+ import { migrate as _ } from "../config/migrator/index.js";
7
+ import { DefaultUsername as Z, DefaultMessageType as $, DefaultGuidoConfig as ee } from "../enums/defaults.js";
8
+ import oe from "./organisms/base/Toaster.vue.js";
9
+ import te from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
+ import ne from "./organisms/header/HeaderWrapper.vue.js";
11
+ import re from "./organisms/LoadingWrapper.vue.js";
12
+ import ie from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
+ import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
+ import { useStripoApi as ae } from "../services/stripoApi.js";
15
+ import { useConfigStore as ce } from "../stores/config.js";
16
+ import { useDynamicContentStore as me } from "../stores/dynamic-content.js";
17
+ import { useEditorStore as de } from "../stores/editor.js";
18
+ import { usePreviewStore as le } from "../stores/preview.js";
19
+ import { useUnsubscribeStore as ue } from "../stores/unsubscribe.js";
20
+ import pe from "../node_modules/lodash-es/merge.js";
21
+ const Ae = /* @__PURE__ */ z({
19
22
  __name: "Guido",
20
23
  props: {
21
- config: null
24
+ templateId: null,
25
+ userId: null,
26
+ messageType: null,
27
+ partnerName: null,
28
+ productType: null,
29
+ username: null,
30
+ html: null,
31
+ css: null,
32
+ guidoConfig: null,
33
+ templateConfig: null
22
34
  },
23
35
  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(
36
+ setup(A, { expose: N, emit: o }) {
37
+ const u = A, F = L(
26
38
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
27
- ), I = k(
39
+ ), H = L(
28
40
  () => 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 = () => {
41
+ ), p = K(), i = me(), g = ue(), f = ce(), s = de(), O = le(), n = W(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: R } = V(), h = () => {
32
42
  var e;
33
43
  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({
44
+ }, {
45
+ templateId: a,
46
+ userId: b,
47
+ guidoConfig: C,
48
+ templateConfig: t,
49
+ html: r = "",
50
+ css: S = "",
51
+ partnerName: c = y(),
52
+ productType: m = v(),
53
+ messageType: w = $,
54
+ username: D = Z
55
+ } = u, d = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
56
+ s.templateId = a, window.GuidoConfig = pe(ee, C), window.GuidoConfig.partner = {
57
+ partnerName: c,
58
+ productType: m,
59
+ messageType: w
60
+ }, f.templateConfig = t;
61
+ const { initPlugin: T } = X({
37
62
  emailId: a,
38
- userId: v,
39
- username: g,
40
- partnerName: b,
41
- productType: f,
63
+ userId: b,
64
+ username: D,
65
+ partnerName: c,
66
+ productType: m,
42
67
  preselectedDynamicContentList: d,
43
68
  onReady: () => {
44
- console.debug("guido:ready"), t("ready");
69
+ console.debug("guido:ready"), o("ready");
45
70
  }
46
- }), { getDefaultTemplate: w } = Y(), F = P(() => !n.showHeader);
47
- B({
71
+ }), { getDefaultTemplate: E } = ae(), { cloneTimersOnSave: k, hasTimerBlocks: P } = Y(), x = W(() => {
72
+ var e;
73
+ return !((e = window.GuidoConfig) != null && e.useHeader);
74
+ });
75
+ Q({
48
76
  onBack: () => {
49
- console.debug("guido:back"), t("back");
77
+ console.debug("guido:back"), o("back");
50
78
  },
51
79
  onSaveStart: () => {
52
- console.debug("guido:save:start"), t("save:start");
80
+ console.debug("guido:save:start"), o("save:start");
53
81
  },
54
82
  onSaveComplete: (e) => {
55
- console.debug("guido:save:complete", e), t("save:complete", e);
83
+ console.debug("guido:save:complete", e), o("save:complete", e);
56
84
  },
57
85
  onTestEmailClick: () => {
58
- console.debug("guido:test-email:click"), t("test-email:click");
86
+ console.debug("guido:test-email:click"), o("test-email:click");
59
87
  }
60
88
  });
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 = () => {
89
+ const G = (e) => {
90
+ console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
91
+ }, I = () => {
64
92
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
65
93
  };
66
- N(() => r.value, () => {
67
- t("on-change", r.value);
94
+ j(() => n.value, () => {
95
+ o("on-change", n.value);
68
96
  });
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);
97
+ const l = (e) => {
98
+ const U = e, { attribute: B, position: M } = U.detail;
99
+ console.debug("dynamic-content:open", U.detail), o("dynamic-content:open", B, M);
72
100
  };
73
- return O(async () => {
101
+ return q(async () => {
74
102
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
75
103
  try {
76
- u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
104
+ g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
77
105
  let e = {
78
- html: c && await T(c),
79
- css: h,
106
+ html: r && await _(r),
107
+ css: S,
80
108
  forceRecreate: !0
81
109
  // TODO: It should be false for old templates. We will communicate with Stripo
82
110
  };
83
- e.html || (e = await w(), e.html = await T(e.html)), await S(e), s.selectedDynamicContentList = d;
111
+ e.html || (e = await E(), e.html = await _(e.html)), P(e.html) && (e.html = await k(e.html)), await T(e), i.selectedDynamicContentList = d;
84
112
  } catch (e) {
85
113
  console.error("Failed to initialize Stripo editor:", e);
86
114
  }
87
- document.addEventListener("dynamic-content:open", m);
88
- }), z(() => {
89
- document.removeEventListener("dynamic-content:open", m);
115
+ document.addEventListener("dynamic-content:open", l);
116
+ }), J(() => {
117
+ document.removeEventListener("dynamic-content:open", l);
90
118
  try {
91
119
  window.UIEditor.removeEditor();
92
120
  } catch {
93
121
  console.debug("Failed to remove Stripo editor: No editor found");
94
122
  }
95
- n.reset();
96
- }), W({
123
+ }), N({
97
124
  dynamicContent: {
98
- insert: C,
99
- close: D
125
+ insert: G,
126
+ close: I
100
127
  },
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 };
128
+ hasChanges: n,
129
+ saveSilent: h
130
+ }), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: H, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: O, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: R, saveSilent: h, templateId: a, userId: b, guidoConfig: C, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: T, getDefaultTemplate: E, cloneTimersOnSave: k, hasTimerBlocks: P, noHeader: x, insertDynamicContent: G, closeDynamicContent: I, handleDynamicContentOpen: l, Toaster: oe, FilterSelectionDrawer: te, HeaderWrapper: ne, LoadingWrapper: re, SaveAsTemplateDrawer: ie, UnsubscribeWrapper: se };
104
131
  }
105
132
  });
106
133
  export {
107
- Se as default
134
+ Ae as default
108
135
  };
@@ -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
  };