@useinsider/guido 1.0.3-beta.d8a9e56 → 1.0.3-beta.dbf4a88
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/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +74 -69
- 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.js +24 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -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.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
- package/dist/components/wrappers/WpDrawer.vue.js +6 -4
- package/dist/composables/useStripo.js +41 -34
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/index.js +7 -6
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/defaults.js +6 -3
- package/dist/enums/unsubscribe.js +43 -6
- package/dist/extensions/Blocks/Checkbox/control.js +55 -53
- package/dist/extensions/Blocks/RadioButton/control.js +44 -42
- package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -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.js +10 -0
- package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +2 -1
- package/dist/package.json.js +7 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/{@types → src/@types}/generic.d.ts +9 -0
- package/dist/{components → src/components}/Guido.vue.d.ts +2 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
- package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
- package/dist/{components → src/components}/wrappers/WpDrawer.vue.d.ts +6 -4
- package/dist/src/config/migrator/index.d.ts +1 -0
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/src/enums/unsubscribe.d.ts +38 -0
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
- package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
- package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/src/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/src/services/unsubscribeApi.d.ts +4 -0
- package/dist/src/stores/config.d.ts +96 -0
- package/dist/src/stores/unsubscribe.d.ts +256 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +6 -1
- package/dist/config/migrator/index.d.ts +0 -1
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/stores/unsubscribe.d.ts +0 -8
- /package/dist/{@types → src/@types}/events.d.ts +0 -0
- /package/dist/{@types → src/@types}/save-as-template.d.ts +0 -0
- /package/dist/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dist/{components → src/components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/base/Toaster.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/LeftSlot.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/RightSlot.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
- /package/dist/{components → src/components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/wrappers/WpModal.vue.d.ts +0 -0
- /package/dist/{composables → src/composables}/useActionsApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useApiExample.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/useConfig.d.ts +0 -0
- /package/dist/{composables → src/composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebounce.d.ts +0 -0
- /package/dist/{composables → src/composables}/useExport.d.ts +0 -0
- /package/dist/{composables → src/composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHtmlValidator.d.ts +0 -0
- /package/dist/{composables → src/composables}/useHttp.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePartner.d.ts +0 -0
- /package/dist/{composables → src/composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{composables → src/composables}/useProvideInject.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRecommendation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{composables → src/composables}/useSave.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripo.d.ts +0 -0
- /package/dist/{composables → src/composables}/useStripoEventHandler.d.ts +0 -0
- /package/dist/{composables → src/composables}/useToaster.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTranslations.d.ts +0 -0
- /package/dist/{composables → src/composables}/useValidation.d.ts +0 -0
- /package/dist/{composables → src/composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{composables → src/composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/couponBlockMigrator.d.ts +0 -0
- /package/dist/{config → src/config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{enums → src/enums}/defaults.d.ts +0 -0
- /package/dist/{enums → src/enums}/displayConditions.d.ts +0 -0
- /package/dist/{enums → src/enums}/html-validator.d.ts +0 -0
- /package/dist/{enums → src/enums}/onboarding.d.ts +0 -0
- /package/dist/{enums → src/enums}/preview.d.ts +0 -0
- /package/dist/{enums → src/enums}/recommendation.d.ts +0 -0
- /package/dist/{enums → src/enums}/toaster.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/CouponBlock/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
- /package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/settingsPanel.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{extensions/DynamicContent → src/extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
- /package/dist/{extensions → src/extensions}/DynamicContent/dynamic-content.d.ts +0 -0
- /package/dist/{library.d.ts → src/library.d.ts} +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{mock → src/mock}/api/auth.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/default-template.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/template-library.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/unsubscribe.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/user-modal-state.d.ts +0 -0
- /package/dist/{mock → src/mock}/api/validator.d.ts +0 -0
- /package/dist/{mock → src/mock}/browser.d.ts +0 -0
- /package/dist/{mock → src/mock}/handlers.d.ts +0 -0
- /package/dist/{services → src/services}/onboardingApi.d.ts +0 -0
- /package/dist/{services → src/services}/stripoApi.d.ts +0 -0
- /package/dist/{services → src/services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{stores → src/stores}/dynamic-content.d.ts +0 -0
- /package/dist/{stores → src/stores}/editor.d.ts +0 -0
- /package/dist/{stores → src/stores}/onboarding.d.ts +0 -0
- /package/dist/{stores → src/stores}/preview.d.ts +0 -0
- /package/dist/{stores → src/stores}/recommendation.d.ts +0 -0
- /package/dist/{stores → src/stores}/save-as-template.d.ts +0 -0
- /package/dist/{stores → src/stores}/toaster.d.ts +0 -0
- /package/dist/{stores → src/stores}/version-history.d.ts +0 -0
- /package/dist/{utils → src/utils}/arrayUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/base64.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/genericUtil.d.ts +0 -0
- /package/dist/{utils → src/utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{utils → src/utils}/templatePreparation.d.ts +0 -0
- /package/dist/{utils → src/utils}/tooltipUtils.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefaultGuidoConfig as e } from "../enums/defaults.js";
|
|
2
|
+
import { defineStore as i } from "pinia";
|
|
3
|
+
const r = i("config", {
|
|
4
|
+
state: () => ({
|
|
5
|
+
guidoConfig: e,
|
|
6
|
+
templateConfig: {}
|
|
7
|
+
}),
|
|
8
|
+
getters: {
|
|
9
|
+
getVariationId: (t) => {
|
|
10
|
+
var o;
|
|
11
|
+
return ((o = t.templateConfig) == null ? void 0 : o.variationId) ?? "";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
r as useConfigStore
|
|
17
|
+
};
|
|
@@ -1,9 +1,129 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TYPE_COLLECTIONS as i, PAGE_TYPES as a } from "../enums/unsubscribe.js";
|
|
2
|
+
import { useUnsubscribeApi as r } from "../services/unsubscribeApi.js";
|
|
3
|
+
import { defineStore as d } from "pinia";
|
|
4
|
+
const p = () => ({
|
|
5
|
+
templates: [],
|
|
6
|
+
selectedTemplates: {},
|
|
7
|
+
selectedUnsubscribePages: [],
|
|
8
|
+
selectedCollectionType: a.GLOBAL_UNSUBSCRIBE,
|
|
9
|
+
activeType: a.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
pageSelectionUpdateStatus: !1,
|
|
11
|
+
pageSelectionDrawerStatus: !1,
|
|
12
|
+
typeSelectionDrawerStatus: !1,
|
|
13
|
+
isGlobalUnsubscribeDisabled: !1,
|
|
14
|
+
isSubscriptionPreferencesCenterDisabled: !1
|
|
15
|
+
}), g = d("unsubscribe", {
|
|
16
|
+
state: () => p(),
|
|
17
|
+
getters: {
|
|
18
|
+
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
19
|
+
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
20
|
+
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
21
|
+
getThumbnailByTemplateId: (e) => (t) => {
|
|
22
|
+
var c;
|
|
23
|
+
return ((c = e.templates.find((s) => s.id === t)) == null ? void 0 : c.thumbnail) ?? "";
|
|
24
|
+
},
|
|
25
|
+
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
26
|
+
const c = i[t];
|
|
27
|
+
if (!c)
|
|
28
|
+
return [];
|
|
29
|
+
const s = /* @__PURE__ */ new Map();
|
|
30
|
+
e.templates.forEach((n) => {
|
|
31
|
+
s.set(n.id, n.type);
|
|
32
|
+
});
|
|
33
|
+
const l = new Set(c);
|
|
34
|
+
return e.selectedUnsubscribePages.filter((n) => {
|
|
35
|
+
const o = s.get(n);
|
|
36
|
+
return o !== void 0 && l.has(o);
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
isActiveTypeFirstInCollection: (e) => {
|
|
40
|
+
const t = i[e.selectedCollectionType];
|
|
41
|
+
return e.activeType === t[0];
|
|
42
|
+
},
|
|
43
|
+
isActiveTypeLastInCollection: (e) => {
|
|
44
|
+
const t = i[e.selectedCollectionType];
|
|
45
|
+
return e.activeType === t[t.length - 1];
|
|
46
|
+
},
|
|
47
|
+
hasTemplatesByCollectionType: (e) => {
|
|
48
|
+
const t = {};
|
|
49
|
+
return i[e.selectedCollectionType].forEach((s) => {
|
|
50
|
+
t[s] = e.templates.some((l) => l.type === s);
|
|
51
|
+
}), t;
|
|
52
|
+
},
|
|
53
|
+
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
54
|
+
},
|
|
55
|
+
actions: {
|
|
56
|
+
$reset() {
|
|
57
|
+
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
58
|
+
Object.assign(this, {
|
|
59
|
+
...p(),
|
|
60
|
+
templates: e,
|
|
61
|
+
selectedUnsubscribePages: t
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
async fetchTemplates() {
|
|
65
|
+
if (this.templates.length)
|
|
66
|
+
return;
|
|
67
|
+
const { getUnsubscribePages: e } = r(), t = await e();
|
|
68
|
+
this.templates = t;
|
|
69
|
+
},
|
|
70
|
+
setCollection(e) {
|
|
71
|
+
this.selectedCollectionType = e;
|
|
72
|
+
const t = i[e];
|
|
73
|
+
if (t && t.length > 0) {
|
|
74
|
+
[this.activeType] = t;
|
|
75
|
+
const c = { ...this.selectedTemplates };
|
|
76
|
+
t.forEach((s) => {
|
|
77
|
+
if (!c[s]) {
|
|
78
|
+
const l = this.templates.find((n) => n.type === s);
|
|
79
|
+
l && (c[s] = l.id);
|
|
80
|
+
}
|
|
81
|
+
}), this.selectedTemplates = c;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
setCollectionWithoutAutoSelection(e) {
|
|
85
|
+
this.selectedCollectionType = e;
|
|
86
|
+
const t = i[e];
|
|
87
|
+
t && t.length > 0 && ([this.activeType] = t);
|
|
88
|
+
},
|
|
89
|
+
setSelectedTemplate(e) {
|
|
90
|
+
this.selectedTemplates = {
|
|
91
|
+
...this.selectedTemplates,
|
|
92
|
+
[this.activeType]: e
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
setNextType() {
|
|
96
|
+
const t = this.getSelectedCollection.indexOf(this.activeType) + 1;
|
|
97
|
+
t < this.getSelectedCollection.length && (this.activeType = this.getSelectedCollection[t]);
|
|
98
|
+
},
|
|
99
|
+
setPreviousType() {
|
|
100
|
+
const t = this.getSelectedCollection.indexOf(this.activeType) - 1;
|
|
101
|
+
t >= 0 && (this.activeType = this.getSelectedCollection[t]);
|
|
102
|
+
},
|
|
103
|
+
loadSelectedTemplates(e) {
|
|
104
|
+
const t = new Map(this.templates.map((s) => [s.id, s.type])), c = { ...this.selectedTemplates };
|
|
105
|
+
e.forEach((s) => {
|
|
106
|
+
const l = t.get(s);
|
|
107
|
+
l !== void 0 && (c[l] = s);
|
|
108
|
+
}), this.selectedTemplates = c;
|
|
109
|
+
},
|
|
110
|
+
getSelectedTemplatesByCollection(e) {
|
|
111
|
+
const t = i[e], c = [];
|
|
112
|
+
return t.forEach((s) => {
|
|
113
|
+
this.selectedTemplates[s] && c.push(this.selectedTemplates[s]);
|
|
114
|
+
}), c;
|
|
115
|
+
},
|
|
116
|
+
addUnsubscribePages(e) {
|
|
117
|
+
const t = /* @__PURE__ */ new Set([...this.selectedUnsubscribePages, ...e]);
|
|
118
|
+
this.selectedUnsubscribePages = Array.from(t);
|
|
119
|
+
},
|
|
120
|
+
removeUnsubscribePages(e) {
|
|
121
|
+
this.selectedUnsubscribePages = this.selectedUnsubscribePages.filter(
|
|
122
|
+
(t) => !e.includes(t)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
6
126
|
});
|
|
7
127
|
export {
|
|
8
|
-
|
|
128
|
+
g as useUnsubscribeStore
|
|
9
129
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useHtmlCompiler as
|
|
1
|
+
import { useActionsApi as S } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useHtmlCompiler as b } from "../composables/useHtmlCompiler.js";
|
|
3
3
|
import { useDynamicContentStore as f } from "../stores/dynamic-content.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { useUnsubscribeStore as C } from "../stores/unsubscribe.js";
|
|
5
|
+
const z = () => {
|
|
6
|
+
const i = f(), t = C(), { getCompiledEmail: o, getTemplateData: s } = S(), { compileHtml: n } = b();
|
|
6
7
|
return {
|
|
7
8
|
prepareTemplateDetails: async () => {
|
|
8
|
-
const { html: a, ampHtml:
|
|
9
|
+
const { html: a, ampHtml: m = "", ampErrors: r = [] } = await o({
|
|
9
10
|
minimize: !0,
|
|
10
11
|
resetDataSavedFlag: !1
|
|
11
|
-
}), { html:
|
|
12
|
+
}), { html: c, css: l, syncModulesIds: p = [] } = await s(), { compiledHtml: u, stats: e, appliedRules: d } = n(a), g = i.getSelectedDynamicContentList;
|
|
12
13
|
return console.debug("HTML Compilation Stats:", {
|
|
13
14
|
originalSize: e.originalSize,
|
|
14
15
|
compiledSize: e.compiledSize,
|
|
@@ -16,25 +17,25 @@ const H = () => {
|
|
|
16
17
|
appliedRules: d,
|
|
17
18
|
executionTime: `${e.executionTime.toFixed(2)}ms`
|
|
18
19
|
}), {
|
|
19
|
-
dynamicContentList:
|
|
20
|
-
compiledHtml:
|
|
21
|
-
rawHtml:
|
|
22
|
-
css:
|
|
23
|
-
ampHtml:
|
|
24
|
-
ampErrors:
|
|
25
|
-
modules:
|
|
20
|
+
dynamicContentList: g,
|
|
21
|
+
compiledHtml: u,
|
|
22
|
+
rawHtml: c,
|
|
23
|
+
css: l,
|
|
24
|
+
ampHtml: m,
|
|
25
|
+
ampErrors: r,
|
|
26
|
+
modules: p,
|
|
26
27
|
recommendation: {
|
|
27
28
|
campaignUrls: {},
|
|
28
29
|
configs: {}
|
|
29
30
|
},
|
|
30
31
|
unsubscribe: {
|
|
31
|
-
status:
|
|
32
|
-
config:
|
|
32
|
+
status: t.unsubscribePagesStatus,
|
|
33
|
+
config: t.selectedUnsubscribePages
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
z as useTemplatePreparation
|
|
40
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.dbf4a88",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -80,5 +80,10 @@
|
|
|
80
80
|
},
|
|
81
81
|
"msw": {
|
|
82
82
|
"workerDirectory": "public"
|
|
83
|
+
},
|
|
84
|
+
"guido": {
|
|
85
|
+
"stripo": {
|
|
86
|
+
"version": "2.42.0"
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const migrate: (html: string) => string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const LINK_TYPES: {
|
|
2
|
-
UNSUBSCRIBE_LINK_TYPE: number;
|
|
3
|
-
PREFERENCES_LINK_TYPE: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const LINK_REGEXES: {
|
|
6
|
-
UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
7
|
-
DATA_OGSB_BUTTON_CSS_REGEX: string;
|
|
8
|
-
GLOBAL_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
9
|
-
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
10
|
-
};
|
|
11
|
-
export declare const URLS: {
|
|
12
|
-
UNSUBSCRIBE_URL: string;
|
|
13
|
-
PREFERENCES_URL: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const INSIDER_ID = "iid";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/organisms/email-preview/PreviewContainer.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/organisms/header/version-history/RestoreButton.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/organisms/header/version-history/VersionHistory.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/organisms/header/version-history/ViewOptions.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{extensions/Blocks/_Boilerplate → src/extensions/Blocks/Unsubscribe}/extension.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{extensions/DynamicContent → src/extensions/Blocks/_Boilerplate}/extension.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|