@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.
- package/README.md +295 -664
- package/dist/@types/config/defaults.js +44 -0
- package/dist/@types/config/schemas.js +229 -0
- package/dist/@types/config/validator.js +56 -0
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +63 -89
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +18 -15
- package/dist/components/organisms/header/RightSlot.vue.js +10 -10
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +22 -19
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
- package/dist/composables/useBlocksConfig.js +23 -20
- package/dist/composables/useConfig.js +51 -5
- package/dist/composables/useHtmlCompiler.js +20 -19
- package/dist/composables/useHtmlValidator.js +41 -41
- package/dist/composables/usePartner.js +19 -9
- package/dist/composables/useStripo.js +11 -11
- package/dist/composables/useTranslations.js +3 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
- package/dist/enums/defaults.js +3 -67
- package/dist/enums/unsubscribe.js +23 -20
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +12 -11
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -2
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
- package/dist/node_modules/valibot/dist/index.js +476 -103
- package/dist/services/templateLibraryApi.js +18 -18
- package/dist/src/@types/config/defaults.d.ts +68 -0
- package/dist/src/@types/config/index.d.ts +14 -0
- package/dist/src/@types/config/schemas.d.ts +505 -0
- package/dist/src/@types/config/types.d.ts +142 -0
- package/dist/src/@types/config/validator.d.ts +119 -0
- package/dist/src/@types/generic.d.ts +4 -45
- package/dist/src/components/Guido.vue.d.ts +13 -12
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +184 -2
- package/dist/src/composables/usePartner.d.ts +8 -0
- package/dist/src/enums/defaults.d.ts +4 -6
- package/dist/src/enums/unsubscribe.d.ts +5 -1
- package/dist/src/library.d.ts +3 -1
- package/dist/src/stores/config.d.ts +1547 -102
- package/dist/stores/config.js +141 -9
- package/package.json +1 -1
- package/dist/node_modules/lodash-es/_apply.js +0 -16
- package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
- package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
- package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/lodash-es/_copyArray.js +0 -9
- package/dist/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
- package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
- package/dist/node_modules/lodash-es/_overRest.js +0 -15
- package/dist/node_modules/lodash-es/_safeGet.js +0 -7
- package/dist/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/lodash-es/_shortOut.js +0 -16
- package/dist/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
- package/dist/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useBack as
|
|
4
|
-
import { usePreviewMode as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
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(
|
|
13
|
-
const o =
|
|
14
|
-
|
|
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:
|
|
27
|
+
}, InButtonV2: b, RestoreButton: _ };
|
|
25
28
|
}
|
|
26
29
|
});
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
h as default
|
|
29
32
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
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 &&
|
|
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
|
-
},
|
|
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
|
|
17
|
+
const y = _.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
y as default
|
|
20
20
|
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ACADEMY_LINK as
|
|
6
|
-
import
|
|
7
|
-
import { useOnboardingStore as
|
|
8
|
-
import { isAfterDate as
|
|
9
|
-
const
|
|
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(
|
|
13
|
-
const e =
|
|
14
|
-
|
|
15
|
-
|
|
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:
|
|
20
|
+
academyLink: c
|
|
18
21
|
}) : e("email-editor.onboarding-description", {
|
|
19
|
-
academyLink:
|
|
20
|
-
})), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")),
|
|
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:
|
|
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:
|
|
41
|
+
}, WpModal: h, onboardingImageSvg: C };
|
|
39
42
|
}
|
|
40
43
|
});
|
|
41
44
|
export {
|
|
42
|
-
|
|
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
|
|
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
|
-
},
|
|
7
|
+
}, o = [], n = /* @__PURE__ */ a(
|
|
8
8
|
s,
|
|
9
|
-
o,
|
|
10
9
|
c,
|
|
10
|
+
o,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"293f1c47"
|
|
14
14
|
);
|
|
15
15
|
const f = n.exports;
|
|
16
16
|
export {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
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
|
|
5
|
+
const _ = /* @__PURE__ */ n({
|
|
6
6
|
__name: "UnsubscribeBreadcrumb",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
return { __sfc: !0, unsubscribeStore: r, breadcrumbs:
|
|
10
|
-
|
|
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
|
-
|
|
15
|
+
_ as default
|
|
16
16
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ToasterTypeOptions as
|
|
6
|
-
import { PAGE_TYPES as l, ACADEMY_LINK as
|
|
7
|
-
import { useUnsubscribeStore as
|
|
8
|
-
import { InSegments as
|
|
9
|
-
const
|
|
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(
|
|
12
|
-
const 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="${
|
|
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) =>
|
|
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:
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
106
|
+
K as default
|
|
107
107
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var s;
|
|
5
|
-
var e = this,
|
|
6
|
-
return (s =
|
|
7
|
-
},
|
|
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
|
|
15
|
+
const p = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|
27
|
-
return n.forEach((
|
|
28
|
-
const t =
|
|
29
|
-
t && (
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
n.map(async (
|
|
33
|
-
const t = c[
|
|
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((
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
50
|
+
m as useBlocksConfig
|
|
48
51
|
};
|
|
@@ -1,7 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
52
|
+
k as useConfig
|
|
7
53
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as
|
|
2
|
-
import { itemsCompilerRules as
|
|
3
|
-
import { outlookCompilerRules as
|
|
4
|
-
import { recommendationCompilerRules as
|
|
5
|
-
import { socialCompilerRules as
|
|
6
|
-
import { unsubscribeCompilerRules as
|
|
7
|
-
import { createHtmlCompiler as
|
|
8
|
-
import { useConfig as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
...
|
|
15
|
-
...s
|
|
16
|
-
...n,
|
|
17
|
-
...m.map((o, i) => ({
|
|
17
|
+
...f,
|
|
18
|
+
...r.map((o, s) => ({
|
|
18
19
|
...o,
|
|
19
|
-
priority: o.priority + 1e3 +
|
|
20
|
+
priority: o.priority + 1e3 + s
|
|
20
21
|
// Ensure additional rules run after default rules
|
|
21
22
|
}))
|
|
22
|
-
],
|
|
23
|
-
return { compileHtml: (o) =>
|
|
23
|
+
], i = a(t);
|
|
24
|
+
return { compileHtml: (o) => i.compile(o) };
|
|
24
25
|
};
|
|
25
26
|
export {
|
|
26
|
-
|
|
27
|
+
B as useHtmlCompiler
|
|
27
28
|
};
|