@useinsider/guido 1.4.3 → 1.4.4-beta.b4adc85

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 +295 -664
  2. package/dist/@types/config/defaults.js +44 -0
  3. package/dist/@types/config/schemas.js +229 -0
  4. package/dist/@types/config/validator.js +56 -0
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +63 -89
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
  8. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
  9. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
  10. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +18 -15
  12. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  13. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +22 -19
  14. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
  15. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
  16. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  17. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
  18. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
  19. package/dist/composables/useBlocksConfig.js +23 -20
  20. package/dist/composables/useConfig.js +51 -5
  21. package/dist/composables/useHtmlCompiler.js +20 -19
  22. package/dist/composables/useHtmlValidator.js +41 -41
  23. package/dist/composables/usePartner.js +19 -9
  24. package/dist/composables/useStripo.js +11 -11
  25. package/dist/composables/useTranslations.js +3 -2
  26. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  27. package/dist/enums/defaults.js +3 -67
  28. package/dist/enums/unsubscribe.js +23 -20
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +12 -11
  30. package/dist/guido.css +1 -1
  31. package/dist/library.js +12 -2
  32. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  33. package/dist/node_modules/valibot/dist/index.js +476 -103
  34. package/dist/services/templateLibraryApi.js +18 -18
  35. package/dist/src/@types/config/defaults.d.ts +68 -0
  36. package/dist/src/@types/config/index.d.ts +14 -0
  37. package/dist/src/@types/config/schemas.d.ts +505 -0
  38. package/dist/src/@types/config/types.d.ts +142 -0
  39. package/dist/src/@types/config/validator.d.ts +119 -0
  40. package/dist/src/@types/generic.d.ts +4 -45
  41. package/dist/src/components/Guido.vue.d.ts +13 -12
  42. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  43. package/dist/src/composables/useConfig.d.ts +184 -2
  44. package/dist/src/composables/usePartner.d.ts +8 -0
  45. package/dist/src/enums/defaults.d.ts +4 -6
  46. package/dist/src/enums/unsubscribe.d.ts +5 -1
  47. package/dist/src/library.d.ts +3 -1
  48. package/dist/src/stores/config.d.ts +1547 -102
  49. package/dist/stores/config.js +141 -9
  50. package/package.json +1 -1
  51. package/dist/node_modules/lodash-es/_apply.js +0 -16
  52. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  53. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  54. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  55. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  56. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  57. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  58. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  59. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  60. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  61. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  62. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  63. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  64. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  65. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  66. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  67. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  68. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  69. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  70. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  71. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  72. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  73. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  74. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  75. package/dist/node_modules/lodash-es/constant.js +0 -8
  76. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  77. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  78. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  79. package/dist/node_modules/lodash-es/merge.js +0 -8
  80. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
@@ -1,17 +1,20 @@
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({
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({
11
11
  __name: "LeftSlot",
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: () => {
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: () => {
15
18
  if (o.isVersionHistoryOpen) {
16
19
  i();
17
20
  return;
@@ -21,9 +24,9 @@ const P = /* @__PURE__ */ c({
21
24
  return;
22
25
  }
23
26
  r();
24
- }, InButtonV2: k, RestoreButton: B };
27
+ }, InButtonV2: b, RestoreButton: _ };
25
28
  }
26
29
  });
27
30
  export {
28
- P as default
31
+ h as default
29
32
  };
@@ -1,20 +1,20 @@
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;
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;
5
5
  var s = this, e = s._self._c, t = s._self._setupProxy;
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) {
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) {
7
7
  return t.handleSave(!1);
8
8
  } } })], 1);
9
- }, u = [], d = /* @__PURE__ */ l(
10
- a,
11
- r,
9
+ }, c = [], _ = /* @__PURE__ */ d(
12
10
  u,
11
+ p,
12
+ c,
13
13
  !1,
14
14
  null,
15
15
  null
16
16
  );
17
- const f = d.exports;
17
+ const y = _.exports;
18
18
  export {
19
- f as default
19
+ y as default
20
20
  };
@@ -1,23 +1,26 @@
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({
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({
10
10
  __name: "NewVersionPopup",
11
11
  emits: ["onboarding-finished"],
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", {
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", {
16
19
  sunsetDate: d.value,
17
- academyLink: l
20
+ academyLink: c
18
21
  }) : e("email-editor.onboarding-description", {
19
- academyLink: l
20
- })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), f = o(() => ({
22
+ academyLink: c
23
+ })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
21
24
  primaryButton: {
22
25
  type: "primary",
23
26
  labelText: e("left-menu.discover-now")
@@ -29,15 +32,15 @@ const I = /* @__PURE__ */ g({
29
32
  })), r = () => {
30
33
  s.value = !1, a("onboarding-finished");
31
34
  };
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: () => {
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: () => {
33
36
  t.onDiscoverNowClicked(), r();
34
37
  }, handleRemindLater: () => {
35
38
  t.onRemindMeLater(), r();
36
39
  }, handleClose: () => {
37
40
  t.onNewVersionPopupClose(), r();
38
- }, WpModal: v, onboardingImageSvg: y };
41
+ }, WpModal: h, onboardingImageSvg: C };
39
42
  }
40
43
  });
41
44
  export {
42
- I as default
45
+ E as default
43
46
  };
@@ -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 o = function() {
4
+ var c = 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
- }, c = [], n = /* @__PURE__ */ a(
7
+ }, o = [], n = /* @__PURE__ */ a(
8
8
  s,
9
- o,
10
9
  c,
10
+ o,
11
11
  !1,
12
12
  null,
13
- "70835920"
13
+ "293f1c47"
14
14
  );
15
15
  const f = n.exports;
16
16
  export {
@@ -1,16 +1,16 @@
1
- import { defineComponent as o, computed as n } from "vue";
2
- import { TYPE_TRANSLATIONS as s } from "../../../enums/unsubscribe.js";
1
+ import { defineComponent as n, computed as s } from "vue";
2
+ import { getTypeTranslations as a } 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 f = /* @__PURE__ */ o({
5
+ const _ = /* @__PURE__ */ n({
6
6
  __name: "UnsubscribeBreadcrumb",
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;
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;
11
11
  }, InBreadcrumb: m };
12
12
  }
13
13
  });
14
14
  export {
15
- f as default
15
+ _ as default
16
16
  };
@@ -10,9 +10,9 @@ var i = function() {
10
10
  r,
11
11
  !1,
12
12
  null,
13
- "dd57102d"
13
+ "bb3bb07c"
14
14
  );
15
- const d = c.exports;
15
+ const _ = c.exports;
16
16
  export {
17
- d as default
17
+ _ as default
18
18
  };
@@ -1,17 +1,17 @@
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({
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({
10
10
  __name: "UnsubscribeTypeSelection",
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(
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(
13
13
  "unsubscription-preference.select-unsubscribe-page-description",
14
- { action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
14
+ { action: `<a href="${D}" 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 z = /* @__PURE__ */ h({
62
62
  p || r.push(Number(c));
63
63
  }), r.length === 0)
64
64
  return !0;
65
- const a = r.map((c) => R[c]);
65
+ const h = P(), a = r.map((c) => h[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 z = /* @__PURE__ */ h({
81
81
  });
82
82
  }
83
83
  return f({
84
- type: U.Warning,
84
+ type: N.Warning,
85
85
  message: u,
86
86
  actionButton: {
87
87
  text: "Go to Unsubscribe Pages",
88
88
  onClick: () => {
89
- window.location.href = P;
89
+ window.location.href = R;
90
90
  }
91
91
  }
92
92
  }), !1;
@@ -99,9 +99,9 @@ const z = /* @__PURE__ */ h({
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: v, InSegments: I };
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 };
103
103
  }
104
104
  });
105
105
  export {
106
- z as default
106
+ K as default
107
107
  };
@@ -1,18 +1,18 @@
1
- import o from "./UnsubscribeWrapper.vue2.js";
2
- import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var _ = function() {
4
- var s;
5
- var e = this, n = e._self._c, r = e._self._setupProxy;
6
- return (s = r.config.extensions) != null && s.unsubscribe ? n("div", [n(r.UnsubscribeTypeSelection), n(r.UnsubscribePageSelection)], 1) : e._e();
7
- }, c = [], i = /* @__PURE__ */ t(
8
- o,
1
+ import _ from "./UnsubscribeWrapper.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var c = function() {
4
+ var s, t;
5
+ var e = this, r = e._self._c, n = e._self._setupProxy;
6
+ return (t = (s = n.config) == null ? void 0 : s.features) != null && t.unsubscribe ? r("div", [r(n.UnsubscribeTypeSelection), r(n.UnsubscribePageSelection)], 1) : e._e();
7
+ }, i = [], a = /* @__PURE__ */ o(
9
8
  _,
10
9
  c,
10
+ i,
11
11
  !1,
12
12
  null,
13
13
  null
14
14
  );
15
- const l = i.exports;
15
+ const p = a.exports;
16
16
  export {
17
- l as default
17
+ p as default
18
18
  };
@@ -1,4 +1,5 @@
1
- const l = {
1
+ import { useConfigStore as l } from "../stores/config.js";
2
+ const r = {
2
3
  "amp-accordion": "ampAccordionEnabled",
3
4
  "amp-carousel": "ampCarouselEnabled",
4
5
  "amp-form-controls": "ampFormControlsEnabled",
@@ -23,26 +24,28 @@ const l = {
23
24
  }, a = (n) => {
24
25
  if (!n || !n.length)
25
26
  return {};
26
- const o = {};
27
- return n.forEach((e) => {
28
- const t = l[e];
29
- t && (o[t] = !1);
30
- }), o;
31
- }, r = async (n) => !n || !n.length ? [] : (await Promise.all(
32
- n.map(async (e) => {
33
- const t = c[e];
27
+ const e = {};
28
+ return n.forEach((o) => {
29
+ const t = r[o];
30
+ t && (e[t] = !1);
31
+ }), e;
32
+ }, i = async (n) => !n || !n.length ? [] : (await Promise.all(
33
+ n.map(async (o) => {
34
+ const t = c[o];
34
35
  return t ? (await t()).default : null;
35
36
  })
36
- )).filter((e) => e !== null), s = () => ({
37
- getStripoBlocksConfig: async () => {
38
- var e;
39
- const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
40
- return {
41
- baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
42
- extensions: await r(o == null ? void 0 : o.includeCustoms)
43
- };
44
- }
45
- });
37
+ )).filter((o) => o !== null), m = () => {
38
+ const n = l();
39
+ return {
40
+ getStripoBlocksConfig: async () => {
41
+ const o = n.blocks;
42
+ return {
43
+ baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
44
+ extensions: await i(o == null ? void 0 : o.includeCustoms)
45
+ };
46
+ }
47
+ };
48
+ };
46
49
  export {
47
- s as useBlocksConfig
50
+ m as useBlocksConfig
48
51
  };
@@ -1,7 +1,53 @@
1
- import { DefaultGuidoConfig as o } from "../enums/defaults.js";
2
- const t = () => ({
3
- config: typeof window > "u" ? o : window.GuidoConfig || o
4
- });
1
+ import { useConfigStore as F } from "../stores/config.js";
2
+ import { storeToRefs as I } from "pinia";
3
+ const k = () => {
4
+ const e = F(), {
5
+ config: t,
6
+ initialized: o,
7
+ identity: r,
8
+ partner: i,
9
+ template: n,
10
+ editor: a,
11
+ ui: s,
12
+ features: u,
13
+ blocks: d,
14
+ compiler: p,
15
+ templateId: c,
16
+ userId: f,
17
+ variationId: m,
18
+ partnerName: g,
19
+ productType: l,
20
+ messageType: b,
21
+ username: C,
22
+ showHeader: y
23
+ } = I(e);
24
+ return {
25
+ // State refs
26
+ config: t,
27
+ initialized: o,
28
+ // Section refs
29
+ identity: r,
30
+ partner: i,
31
+ template: n,
32
+ editor: a,
33
+ ui: s,
34
+ features: u,
35
+ blocks: d,
36
+ compiler: p,
37
+ // Convenience refs
38
+ templateId: c,
39
+ userId: f,
40
+ variationId: m,
41
+ partnerName: g,
42
+ productType: l,
43
+ messageType: b,
44
+ username: C,
45
+ showHeader: y,
46
+ // Methods
47
+ getConfig: () => t.value,
48
+ isFeatureEnabled: (E) => e.isFeatureEnabled(E)
49
+ };
50
+ };
5
51
  export {
6
- t as useConfig
52
+ k as useConfig
7
53
  };
@@ -1,27 +1,28 @@
1
- import { defaultHtmlCompilerRules as t } from "../config/compiler/htmlCompilerRules.js";
2
- import { itemsCompilerRules as p } from "../config/compiler/itemsCompilerRules.js";
3
- import { outlookCompilerRules as s } from "../config/compiler/outlookCompilerRules.js";
4
- import { recommendationCompilerRules as u } from "../config/compiler/recommendationCompilerRules.js";
5
- import { socialCompilerRules as n } from "../config/compiler/socialCompilerRules.js";
6
- import { unsubscribeCompilerRules as c } from "../config/compiler/unsubscribeCompilerRules.js";
7
- import { createHtmlCompiler as f } from "../utils/htmlCompiler.js";
8
- import { useConfig as R } from "./useConfig.js";
9
- const x = () => {
10
- const { config: e } = R(), m = e.htmlCompilerRules || [], l = [
11
- ...!!e.ignoreDefaultHtmlCompilerRules ? [] : t,
1
+ import { defaultHtmlCompilerRules as p } from "../config/compiler/htmlCompilerRules.js";
2
+ import { itemsCompilerRules as u } from "../config/compiler/itemsCompilerRules.js";
3
+ import { outlookCompilerRules as c } from "../config/compiler/outlookCompilerRules.js";
4
+ import { recommendationCompilerRules as n } from "../config/compiler/recommendationCompilerRules.js";
5
+ import { socialCompilerRules as f } from "../config/compiler/socialCompilerRules.js";
6
+ import { unsubscribeCompilerRules as R } from "../config/compiler/unsubscribeCompilerRules.js";
7
+ import { createHtmlCompiler as a } from "../utils/htmlCompiler.js";
8
+ import { useConfig as C } from "./useConfig.js";
9
+ const B = () => {
10
+ var m, l;
11
+ const { compiler: e } = C(), r = ((m = e.value) == null ? void 0 : m.customRules) || [], t = [
12
+ ...!!((l = e.value) != null && l.ignoreDefaultRules) ? [] : p,
13
+ ...n,
14
+ ...R,
12
15
  ...u,
13
16
  ...c,
14
- ...p,
15
- ...s,
16
- ...n,
17
- ...m.map((o, i) => ({
17
+ ...f,
18
+ ...r.map((o, s) => ({
18
19
  ...o,
19
- priority: o.priority + 1e3 + i
20
+ priority: o.priority + 1e3 + s
20
21
  // Ensure additional rules run after default rules
21
22
  }))
22
- ], r = f(l);
23
- return { compileHtml: (o) => r.compile(o) };
23
+ ], i = a(t);
24
+ return { compileHtml: (o) => i.compile(o) };
24
25
  };
25
26
  export {
26
- x as useHtmlCompiler
27
+ B as useHtmlCompiler
27
28
  };