@useinsider/guido 1.0.3-beta.22d624e → 1.0.3-beta.2370dad
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/dist/@types/generic.d.ts +14 -0
- package/dist/components/Guido.vue.d.ts +3 -2
- package/dist/components/Guido.vue.js +11 -9
- package/dist/components/Guido.vue2.js +75 -69
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +2 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.d.ts +2 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +3 -1
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +29 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +3 -1
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -10
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +19 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +6 -4
- package/dist/components/wrappers/WpDrawer.vue.js +6 -4
- package/dist/composables/useStripo.js +44 -34
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.d.ts +1 -1
- package/dist/config/migrator/index.js +7 -5
- package/dist/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/date.d.ts +13 -0
- package/dist/enums/date.js +16 -0
- package/dist/enums/defaults.js +4 -0
- package/dist/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/unsubscribe.d.ts +23 -0
- package/dist/enums/unsubscribe.js +43 -6
- package/dist/extensions/Blocks/Checkbox/control.js +55 -53
- package/dist/extensions/Blocks/CouponBlock/block.d.ts +12 -0
- package/dist/extensions/Blocks/CouponBlock/block.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +8 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +24 -0
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
- package/dist/extensions/Blocks/RadioButton/control.js +44 -42
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
- package/dist/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.d.ts +2 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
- package/dist/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
- package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
- package/dist/extensions/Blocks/common-control.d.ts +66 -0
- package/dist/extensions/Blocks/common-control.js +102 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/recommendation.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +83 -71
- package/dist/services/recommendationApi.d.ts +6 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/services/unsubscribeApi.d.ts +4 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/stores/config.d.ts +97 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/editor.d.ts +21 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/unsubscribe.d.ts +253 -5
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/dateUtil.d.ts +2 -1
- package/dist/utils/dateUtil.js +7 -12
- package/dist/utils/genericUtil.d.ts +1 -0
- package/dist/utils/genericUtil.js +8 -7
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +2 -2
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as f, ref as g, computed as o } from "vue";
|
|
2
|
+
import b from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useConfig as D } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTranslations as v } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { DATE_FORMAT_DD_MM_YYYY as _ } from "../../../enums/date.js";
|
|
6
|
+
import h from "../../../static/assets/onboarding-img.svg.js";
|
|
7
|
+
import { useOnboardingStore as y } from "../../../stores/onboarding.js";
|
|
8
|
+
import { isAfterDate as w, formatPatchDate as C } from "../../../utils/dateUtil.js";
|
|
9
|
+
const V = /* @__PURE__ */ f({
|
|
7
10
|
__name: "NewVersionPopup",
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
emits: ["onboarding-finished"],
|
|
12
|
+
setup(M, { emit: a }) {
|
|
13
|
+
const e = v(), t = y(), s = g(!0), { config: p } = D(), i = o(() => p.migrationDate), n = o(() => w(i.value || 0)), u = o(() => C(
|
|
14
|
+
i.value * 1e3,
|
|
15
|
+
_,
|
|
16
|
+
"en-GB"
|
|
17
|
+
)), l = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), m = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
|
|
18
|
+
sunsetDate: u.value
|
|
19
|
+
}) : e("email-editor.onboarding-description")), d = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), c = o(() => ({
|
|
10
20
|
primaryButton: {
|
|
11
21
|
type: "primary",
|
|
12
|
-
labelText:
|
|
22
|
+
labelText: e("left-menu.discover-now")
|
|
13
23
|
},
|
|
14
24
|
secondaryButton: {
|
|
15
25
|
type: "subtle-primary",
|
|
16
|
-
labelText:
|
|
26
|
+
labelText: d.value
|
|
17
27
|
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
})), r = () => {
|
|
29
|
+
s.value = !1, a("onboarding-finished");
|
|
30
|
+
};
|
|
31
|
+
return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: u, popupTitle: l, popupDescription: m, secondaryButtonLabel: d, footerButtonOptions: c, closePopup: r, handleDiscoverNow: () => {
|
|
32
|
+
t.onDiscoverNowClicked(), r();
|
|
21
33
|
}, handleRemindLater: () => {
|
|
22
|
-
|
|
34
|
+
t.onRemindMeLater(), r();
|
|
23
35
|
}, handleClose: () => {
|
|
24
|
-
|
|
25
|
-
}, WpModal:
|
|
36
|
+
t.onNewVersionPopupClose(), r();
|
|
37
|
+
}, WpModal: b, onboardingImageSvg: h };
|
|
26
38
|
}
|
|
27
39
|
});
|
|
28
40
|
export {
|
|
29
|
-
|
|
41
|
+
V as default
|
|
30
42
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
+
"onboarding-finished": () => void;
|
|
3
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
4
|
export default _default;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import t from "./OnboardingWrapper.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var s = function() {
|
|
4
|
-
var n = this, e = n._self._c,
|
|
5
|
-
return e("div", n._l(
|
|
6
|
-
return e(
|
|
4
|
+
var n = this, e = n._self._c, r = n._self._setupProxy;
|
|
5
|
+
return e("div", n._l(r.visibleOnboardings, function(o) {
|
|
6
|
+
return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
|
|
7
|
+
return r.emit("onboarding-finished");
|
|
8
|
+
} } });
|
|
7
9
|
}), 1);
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
11
|
+
t,
|
|
10
12
|
s,
|
|
11
|
-
|
|
13
|
+
_,
|
|
12
14
|
!1,
|
|
13
15
|
null,
|
|
14
16
|
null
|
|
15
17
|
);
|
|
16
|
-
const
|
|
18
|
+
const d = a.exports;
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
d as default
|
|
19
21
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { useOnboardingStore as
|
|
5
|
-
import { usePreviewStore as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
|
+
import { usePartner as u } from "../../../composables/usePartner.js";
|
|
3
|
+
import { useEditorStore as v } from "../../../stores/editor.js";
|
|
4
|
+
import { useOnboardingStore as l } from "../../../stores/onboarding.js";
|
|
5
|
+
import { usePreviewStore as y } from "../../../stores/preview.js";
|
|
6
|
+
import S from "./AMPOnboarding.vue.js";
|
|
7
|
+
import h from "./GenericOnboarding.vue.js";
|
|
8
8
|
import w from "./NewVersionPopup.vue.js";
|
|
9
9
|
import P from "./TextBlockOnboarding.vue.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import _ from "./VersionHistoryOnboarding.vue.js";
|
|
11
|
+
const F = /* @__PURE__ */ b({
|
|
12
12
|
__name: "OnboardingWrapper",
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
emits: ["onboarding-finished"],
|
|
14
|
+
setup(A, { emit: f }) {
|
|
15
|
+
const o = l(), r = v(), s = y(), { isTestPartner: a } = u(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
|
|
15
16
|
{ type: "newVersionPopup", component: w },
|
|
16
|
-
{ type: "genericOnboarding", component:
|
|
17
|
+
{ type: "genericOnboarding", component: h },
|
|
17
18
|
{ type: "textBlockOnboarding", component: P },
|
|
18
|
-
{ type: "versionHistoryOnboarding", component:
|
|
19
|
-
{ type: "ampOnboarding", component:
|
|
20
|
-
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n),
|
|
21
|
-
return
|
|
19
|
+
{ type: "versionHistoryOnboarding", component: _ },
|
|
20
|
+
{ type: "ampOnboarding", component: S }
|
|
21
|
+
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
|
|
22
|
+
return O(async () => {
|
|
22
23
|
await o.fetchUserModalState();
|
|
23
24
|
}), t(
|
|
24
25
|
() => r.isVersionHistoryOpen,
|
|
@@ -35,9 +36,9 @@ const E = /* @__PURE__ */ g({
|
|
|
35
36
|
(n) => {
|
|
36
37
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
37
38
|
}
|
|
38
|
-
), { __sfc: !0, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings:
|
|
39
|
+
), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
F as default
|
|
43
44
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import s from "./UnsubscribeBreadcrumb.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var e = this, t = e._self._c, r = e._self._setupProxy;
|
|
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(
|
|
8
|
+
s,
|
|
9
|
+
o,
|
|
10
|
+
c,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"70835920"
|
|
14
|
+
);
|
|
15
|
+
const f = n.exports;
|
|
16
|
+
export {
|
|
17
|
+
f as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent as o, computed as n } from "vue";
|
|
2
|
+
import { TYPE_TRANSLATIONS as s } from "../../../enums/unsubscribe.js";
|
|
3
|
+
import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
|
|
4
|
+
import { InBreadcrumb as m } from "@useinsider/design-system-vue";
|
|
5
|
+
const f = /* @__PURE__ */ o({
|
|
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;
|
|
11
|
+
}, InBreadcrumb: m };
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
f as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import a from "./UnsubscribePageSelection.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var r = this, e = r._self._c, t = r._self._setupProxy;
|
|
6
|
+
return e(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", size: "large", "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.pageSelectionDrawerStatus, "title-text": t.trans("newsletter.select-a-template") }, on: { cancelOrBackButtonEvent: t.handleBack, onCloseEvent: t.closeModal, primaryButtonEvent: t.handleSave }, scopedSlots: r._u([{ key: "headerBottomSlot", fn: function() {
|
|
7
|
+
return [e(t.UnsubscribeBreadcrumb, { staticClass: "px-5 py-3" })];
|
|
8
|
+
}, proxy: !0 }]) }, [e("div", { staticClass: "d-g templates-wrapper" }, r._l(t.unsubscribeStore.getTemplatesByActiveType, function(s) {
|
|
9
|
+
return e("div", { key: s.id, staticClass: "template-wrapper", on: { click: function(u) {
|
|
10
|
+
return t.selectTemplate(s.id);
|
|
11
|
+
} } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
|
|
12
|
+
}), 0)]);
|
|
13
|
+
}, i = [], c = /* @__PURE__ */ n(
|
|
14
|
+
a,
|
|
15
|
+
o,
|
|
16
|
+
i,
|
|
17
|
+
!1,
|
|
18
|
+
null,
|
|
19
|
+
"a86fc486"
|
|
20
|
+
);
|
|
21
|
+
const _ = c.exports;
|
|
22
|
+
export {
|
|
23
|
+
_ as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as f, ref as y, computed as n, watch as T } from "vue";
|
|
2
|
+
import g from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useToaster as S } from "../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as v } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as B } from "../../../enums/toaster.js";
|
|
6
|
+
import { useUnsubscribeStore as w } from "../../../stores/unsubscribe.js";
|
|
7
|
+
import { InContainer as C } from "@useinsider/design-system-vue";
|
|
8
|
+
import h from "./UnsubscribeBreadcrumb.vue.js";
|
|
9
|
+
const E = /* @__PURE__ */ f({
|
|
10
|
+
__name: "UnsubscribePageSelection",
|
|
11
|
+
setup(_) {
|
|
12
|
+
const s = v(), e = w(), { showToaster: a } = S(), o = y(!1), c = n(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), i = n(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), p = n(() => ({
|
|
13
|
+
primaryButton: {
|
|
14
|
+
styling: "solid",
|
|
15
|
+
type: "primary",
|
|
16
|
+
labelText: c.value,
|
|
17
|
+
loadingStatus: o.value,
|
|
18
|
+
disabledStatus: !1
|
|
19
|
+
},
|
|
20
|
+
cancelOrBackButton: {
|
|
21
|
+
styling: "ghost",
|
|
22
|
+
type: "secondary",
|
|
23
|
+
labelText: i.value,
|
|
24
|
+
disabledStatus: o.value
|
|
25
|
+
}
|
|
26
|
+
})), u = (t) => e.getSelectedTemplateByActiveType === t ? "bor-w-3 bor-s-s bor-c-7" : "bor-w-1 bor-s-s bor-c-6", r = (t) => {
|
|
27
|
+
e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
|
|
28
|
+
t();
|
|
29
|
+
}, 500);
|
|
30
|
+
}, m = () => {
|
|
31
|
+
if (e.isActiveTypeFirstInCollection) {
|
|
32
|
+
r(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
e.setPreviousType();
|
|
36
|
+
}, d = () => {
|
|
37
|
+
if (e.isActiveTypeLastInCollection) {
|
|
38
|
+
o.value = !0;
|
|
39
|
+
const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t);
|
|
40
|
+
e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
|
|
41
|
+
detail: {
|
|
42
|
+
collectionType: t,
|
|
43
|
+
selectedPages: l
|
|
44
|
+
}
|
|
45
|
+
})), r(() => {
|
|
46
|
+
o.value = !1, a({
|
|
47
|
+
type: B.Success,
|
|
48
|
+
message: s("global-unsubscribe.pages-were-attached")
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
e.setNextType();
|
|
54
|
+
}, b = (t) => {
|
|
55
|
+
e.setSelectedTemplate(t);
|
|
56
|
+
};
|
|
57
|
+
return T(() => e.pageSelectionDrawerStatus, (t) => {
|
|
58
|
+
t && e.pageSelectionUpdateStatus && e.fetchTemplates();
|
|
59
|
+
}), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: a, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: p, getBorderClass: u, closeModal: r, handleBack: m, handleSave: d, selectTemplate: b, WpDrawer: g, InContainer: C, UnsubscribeBreadcrumb: h };
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
E as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import n from "./UnsubscribeTypeSelection.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
|
|
7
|
+
}, r = [], c = /* @__PURE__ */ o(
|
|
8
|
+
n,
|
|
9
|
+
i,
|
|
10
|
+
r,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"dd57102d"
|
|
14
|
+
);
|
|
15
|
+
const d = c.exports;
|
|
16
|
+
export {
|
|
17
|
+
d as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
__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(
|
|
13
|
+
"unsubscription-preference.select-unsubscribe-page-description",
|
|
14
|
+
{ action: `<a href="${w}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
15
|
+
), T = m(() => [
|
|
16
|
+
{
|
|
17
|
+
description: e("unsubscription-preference.type-global-unsubscribe-description"),
|
|
18
|
+
icon: "line-contact-global-unsub-page",
|
|
19
|
+
text: e("unsubscription-preference.type-global-unsubscribe"),
|
|
20
|
+
value: l.GLOBAL_UNSUBSCRIBE,
|
|
21
|
+
disable: t.isGlobalUnsubscribeDisabled,
|
|
22
|
+
position: "bottom",
|
|
23
|
+
tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
description: e("unsubscription-preference.type-subscription-preferences-center-description"),
|
|
27
|
+
icon: "line-contact-sub-pref-center-page",
|
|
28
|
+
text: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
29
|
+
value: l.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
30
|
+
disable: t.isSubscriptionPreferencesCenterDisabled,
|
|
31
|
+
tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
|
|
32
|
+
}
|
|
33
|
+
]), y = m(() => ({
|
|
34
|
+
primaryButton: {
|
|
35
|
+
styling: "solid",
|
|
36
|
+
type: "primary",
|
|
37
|
+
labelText: e(
|
|
38
|
+
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
39
|
+
),
|
|
40
|
+
loadingStatus: n.value,
|
|
41
|
+
disabledStatus: !1,
|
|
42
|
+
skeletonStatus: i.value,
|
|
43
|
+
skeletonSizing: { width: 168, height: 40 }
|
|
44
|
+
},
|
|
45
|
+
cancelOrBackButton: {
|
|
46
|
+
styling: "ghost",
|
|
47
|
+
type: "secondary",
|
|
48
|
+
labelText: e("products.cancel"),
|
|
49
|
+
disabledStatus: n.value,
|
|
50
|
+
skeletonStatus: i.value,
|
|
51
|
+
skeletonSizing: { width: 78, height: 40 }
|
|
52
|
+
}
|
|
53
|
+
})), d = (s) => {
|
|
54
|
+
t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
|
|
55
|
+
s();
|
|
56
|
+
}, 500);
|
|
57
|
+
}, E = (s) => {
|
|
58
|
+
o.value = s;
|
|
59
|
+
}, g = () => {
|
|
60
|
+
const s = t.hasTemplatesByCollectionType, r = [];
|
|
61
|
+
if (Object.entries(s).forEach(([c, p]) => {
|
|
62
|
+
p || r.push(Number(c));
|
|
63
|
+
}), r.length === 0)
|
|
64
|
+
return !0;
|
|
65
|
+
const a = r.map((c) => R[c]);
|
|
66
|
+
let u = "";
|
|
67
|
+
if (r.length === 1)
|
|
68
|
+
u = e("unsubscription-preference.create-page-to-continue", {
|
|
69
|
+
page: a[0]
|
|
70
|
+
});
|
|
71
|
+
else if (r.length === 2)
|
|
72
|
+
u = e("unsubscription-preference.create-pages-to-continue", {
|
|
73
|
+
page1: a[0],
|
|
74
|
+
page2: a[1]
|
|
75
|
+
});
|
|
76
|
+
else {
|
|
77
|
+
const c = a.pop() ?? "", p = a.join(", ");
|
|
78
|
+
u = e("unsubscription-preference.create-multiple-pages-to-continue", {
|
|
79
|
+
pages: p,
|
|
80
|
+
lastPage: c
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return f({
|
|
84
|
+
type: U.Warning,
|
|
85
|
+
message: u,
|
|
86
|
+
actionButton: {
|
|
87
|
+
text: "Go to Unsubscribe Pages",
|
|
88
|
+
onClick: () => {
|
|
89
|
+
window.location.href = P;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}), !1;
|
|
93
|
+
}, C = async () => {
|
|
94
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !g()) {
|
|
95
|
+
n.value = !1, d();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
|
|
99
|
+
};
|
|
100
|
+
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
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 };
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
z as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +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,
|
|
9
|
+
_,
|
|
10
|
+
c,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
null
|
|
14
|
+
);
|
|
15
|
+
const l = i.exports;
|
|
16
|
+
export {
|
|
17
|
+
l as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineComponent as t, defineAsyncComponent as e } from "vue";
|
|
2
|
+
import { useConfig as r } from "../../../composables/useConfig.js";
|
|
3
|
+
const m = /* @__PURE__ */ t({
|
|
4
|
+
__name: "UnsubscribeWrapper",
|
|
5
|
+
setup(i) {
|
|
6
|
+
const n = e(() => import("./UnsubscribePageSelection.vue.js")), o = e(() => import("./UnsubscribeTypeSelection.vue.js")), { config: s } = r();
|
|
7
|
+
return { __sfc: !0, UnsubscribePageSelection: n, UnsubscribeTypeSelection: o, config: s };
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
m as default
|
|
12
|
+
};
|
|
@@ -2,7 +2,7 @@ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
id: string;
|
|
4
4
|
className?: string;
|
|
5
|
-
size?:
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
6
|
closeOnOutsideClick?: boolean;
|
|
7
7
|
descriptionStatus?: boolean;
|
|
8
8
|
descriptionText?: string;
|
|
@@ -10,9 +10,11 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var __VLS_12: {};
|
|
13
|
+
declare var __VLS_12: {}, __VLS_14: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
|
|
15
|
+
headerBottomSlot?: (props: typeof __VLS_12) => any;
|
|
16
|
+
} & {
|
|
17
|
+
default?: (props: typeof __VLS_14) => any;
|
|
16
18
|
};
|
|
17
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
18
20
|
className: string;
|
|
@@ -32,7 +34,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
34
|
descriptionText: string;
|
|
33
35
|
}>>>, {
|
|
34
36
|
className: string;
|
|
35
|
-
size:
|
|
37
|
+
size: "small" | "medium" | "large";
|
|
36
38
|
closeOnOutsideClick: boolean;
|
|
37
39
|
descriptionStatus: boolean;
|
|
38
40
|
descriptionText: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "./WpDrawer.vue2.js";
|
|
2
2
|
import s from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var u = function() {
|
|
4
4
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
5
|
return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
|
|
6
6
|
return e.emit("cancelOrBackButtonEvent");
|
|
@@ -8,13 +8,15 @@ var i = function() {
|
|
|
8
8
|
return e.emit("onCloseEvent");
|
|
9
9
|
}, primaryButtonEvent: function(o) {
|
|
10
10
|
return e.emit("primaryButtonEvent");
|
|
11
|
-
} }, scopedSlots: t._u([{ key: "
|
|
11
|
+
} }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
|
|
12
|
+
return [t._t("headerBottomSlot")];
|
|
13
|
+
}, proxy: !0 } : null, { key: "contentSlot", fn: function() {
|
|
12
14
|
return [n("div", [t._t("default")], 2)];
|
|
13
15
|
}, proxy: !0 }], null, !0) });
|
|
14
|
-
},
|
|
16
|
+
}, i = [], c = /* @__PURE__ */ s(
|
|
15
17
|
r,
|
|
16
|
-
i,
|
|
17
18
|
u,
|
|
19
|
+
i,
|
|
18
20
|
!1,
|
|
19
21
|
null,
|
|
20
22
|
null
|