@useinsider/guido 2.1.0-beta.d4a1ced → 2.1.0-beta.d770bbd
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/organisms/base/Toaster.vue.js +4 -4
- package/dist/components/organisms/base/Toaster.vue2.js +12 -9
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/header/EditorActions.vue.js +8 -10
- package/dist/components/organisms/header/EditorActions.vue2.js +31 -40
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/config/i18n/en/labels.json.js +3 -8
- package/dist/config/migrator/itemsBlockMigrator.js +134 -136
- package/dist/config/migrator/recommendationMigrator.js +40 -42
- package/dist/extensions/Blocks/Items/block.js +25 -45
- package/dist/extensions/Blocks/Items/iconsRegistry.js +5 -6
- package/dist/extensions/Blocks/Items/items.css.js +0 -48
- package/dist/extensions/Blocks/Recommendation/block.js +29 -49
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +3 -4
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -48
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/Blocks/common-control.js +4 -12
- package/dist/guido.css +1 -1
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
- package/dist/src/extensions/Blocks/Items/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -5
- package/dist/stores/unsubscribe.js +37 -34
- package/package.json +2 -2
- package/dist/components/organisms/header/MigrationConfirmModal.vue.js +0 -17
- package/dist/components/organisms/header/MigrationConfirmModal.vue2.js +0 -41
- package/dist/extensions/Blocks/common-icons.js +0 -39
- package/dist/src/components/organisms/header/MigrationConfirmModal.vue.d.ts +0 -6
- package/dist/src/extensions/Blocks/common-icons.d.ts +0 -1
- package/dist/src/stores/template.d.ts +0 -3
- package/dist/stores/template.js +0 -9
|
@@ -29,12 +29,42 @@ const n = `/* Unsubscribe Extension Styles */
|
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
|
+
position: relative;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
.unsubscribe-preview-image {
|
|
35
|
+
.unsubscribe-preview-image-container .unsubscribe-preview-image {
|
|
35
36
|
object-fit: cover;
|
|
36
37
|
width: 100%;
|
|
37
38
|
height: auto;
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.unsubscribe-preview-image-container.is-loaded .unsubscribe-preview-image {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.unsubscribe-preview-image-container.is-loaded .unsubscribe-preview-loader {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Loading shimmer */
|
|
51
|
+
.unsubscribe-preview-loader {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 200px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
56
|
+
background-size: 200% 100%;
|
|
57
|
+
animation: unsubscribe-shimmer 1.5s infinite;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes unsubscribe-shimmer {
|
|
61
|
+
0% {
|
|
62
|
+
background-position: 200% 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
100% {
|
|
66
|
+
background-position: -200% 0;
|
|
67
|
+
}
|
|
38
68
|
}
|
|
39
69
|
`;
|
|
40
70
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var O = (T, r, e) => r in T ?
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var O = (T, r, e) => r in T ? I(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
|
|
3
3
|
var u = (T, r, e) => O(T, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { Control as c, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
class _ extends c {
|
|
@@ -129,14 +129,6 @@ class _ extends c {
|
|
|
129
129
|
</${n.BUTTON}>
|
|
130
130
|
`;
|
|
131
131
|
}
|
|
132
|
-
_GuIcon({ src: e, className: t = "" }) {
|
|
133
|
-
return `
|
|
134
|
-
<${n.ICON}
|
|
135
|
-
${$.ICON.src}="${e}"
|
|
136
|
-
${t ? `class="${t}"` : ""}>
|
|
137
|
-
</${n.ICON}>
|
|
138
|
-
`;
|
|
139
|
-
}
|
|
140
132
|
/**
|
|
141
133
|
*
|
|
142
134
|
* @param param0
|
|
@@ -175,9 +167,9 @@ class _ extends c {
|
|
|
175
167
|
_GuOrderable(e, t) {
|
|
176
168
|
let E = "";
|
|
177
169
|
t.forEach((a) => {
|
|
178
|
-
const
|
|
170
|
+
const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
|
|
179
171
|
E += `
|
|
180
|
-
<${n.ORDERABLE_ITEM} ${
|
|
172
|
+
<${n.ORDERABLE_ITEM} ${l}="${a.key}">
|
|
181
173
|
${a.content}
|
|
182
174
|
</${n.ORDERABLE_ITEM}>
|
|
183
175
|
`;
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-16abb398]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-16abb398]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-16abb398]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
11
11
|
close: () => void;
|
|
12
12
|
};
|
|
13
13
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
14
|
-
saveSilent: () =>
|
|
14
|
+
saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
|
|
15
15
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
16
|
"dynamic-content:open": (detail: {
|
|
17
17
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo").SavedTemplateDetails | undefined>;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
size?: '
|
|
6
|
+
size?: 'small' | 'medium' | 'large';
|
|
7
7
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
8
|
closeButtonStatus?: boolean;
|
|
9
9
|
closeOnOutsideClick?: boolean;
|
|
@@ -33,7 +33,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
35
|
description: string;
|
|
36
|
-
size: "
|
|
36
|
+
size: "small" | "medium" | "large";
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -20,7 +20,6 @@ export declare class ItemsBlock extends Block {
|
|
|
20
20
|
getBlockCompositionType(): BlockCompositionType;
|
|
21
21
|
getName(): string;
|
|
22
22
|
getDescription(): string;
|
|
23
|
-
getSettingsPanelTitleHtml(): string;
|
|
24
23
|
getTemplate(): string;
|
|
25
24
|
allowInnerBlocksDND(): boolean;
|
|
26
25
|
onCreated(node: ImmutableHtmlNode): void;
|
|
@@ -20,7 +20,6 @@ export declare class RecommendationBlock extends Block {
|
|
|
20
20
|
getBlockCompositionType(): BlockCompositionType;
|
|
21
21
|
getName(): string;
|
|
22
22
|
getDescription(): string;
|
|
23
|
-
getSettingsPanelTitleHtml(): string;
|
|
24
23
|
/**
|
|
25
24
|
* Returns the template HTML for a new recommendation block.
|
|
26
25
|
* Generates a unique recommendation ID and embeds the instance class
|
|
@@ -11,10 +11,6 @@ interface LabelProps {
|
|
|
11
11
|
name?: string;
|
|
12
12
|
position?: 'top' | 'left';
|
|
13
13
|
}
|
|
14
|
-
interface IconProps {
|
|
15
|
-
src: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
14
|
interface IconButtonProps {
|
|
19
15
|
name: string;
|
|
20
16
|
icon: string;
|
|
@@ -93,7 +89,6 @@ export declare abstract class CommonControl extends Control {
|
|
|
93
89
|
}): string;
|
|
94
90
|
_GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
|
|
95
91
|
_GuButton({ name, label, id }: ButtonProps): string;
|
|
96
|
-
_GuIcon({ src, className }: IconProps): string;
|
|
97
92
|
/**
|
|
98
93
|
*
|
|
99
94
|
* @param param0
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { TYPE_COLLECTIONS as i, PAGE_TYPES as
|
|
2
|
-
import { useUnsubscribeApi as
|
|
3
|
-
import { defineStore as
|
|
4
|
-
|
|
1
|
+
import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
|
|
2
|
+
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
|
+
import { defineStore as h } from "pinia";
|
|
4
|
+
let o = null;
|
|
5
|
+
const r = () => ({
|
|
5
6
|
templates: [],
|
|
6
7
|
selectedTemplates: {},
|
|
7
8
|
selectedUnsubscribePages: [],
|
|
8
|
-
selectedCollectionType:
|
|
9
|
-
activeType:
|
|
9
|
+
selectedCollectionType: p.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
activeType: p.GLOBAL_UNSUBSCRIBE,
|
|
10
11
|
pageSelectionUpdateStatus: !1,
|
|
11
12
|
pageSelectionDrawerStatus: !1,
|
|
12
13
|
typeSelectionDrawerStatus: !1,
|
|
13
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
14
15
|
isSubscriptionPreferencesCenterDisabled: !1
|
|
15
|
-
}),
|
|
16
|
-
state: () =>
|
|
16
|
+
}), b = h("guidoUnsubscribe", {
|
|
17
|
+
state: () => r(),
|
|
17
18
|
getters: {
|
|
18
19
|
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
19
20
|
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
20
21
|
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
21
22
|
getThumbnailByTemplateId: (e) => (t) => {
|
|
22
|
-
var
|
|
23
|
-
return ((
|
|
23
|
+
var l;
|
|
24
|
+
return ((l = e.templates.find((s) => s.id === t)) == null ? void 0 : l.thumbnail) ?? "";
|
|
24
25
|
},
|
|
25
26
|
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
27
|
+
const l = i[t];
|
|
28
|
+
if (!l)
|
|
28
29
|
return [];
|
|
29
30
|
const s = /* @__PURE__ */ new Map();
|
|
30
31
|
e.templates.forEach((n) => {
|
|
31
32
|
s.set(n.id, n.type);
|
|
32
33
|
});
|
|
33
|
-
const
|
|
34
|
+
const c = new Set(l);
|
|
34
35
|
return e.selectedUnsubscribePages.filter((n) => {
|
|
35
|
-
const
|
|
36
|
-
return
|
|
36
|
+
const a = s.get(n);
|
|
37
|
+
return a !== void 0 && c.has(a);
|
|
37
38
|
});
|
|
38
39
|
},
|
|
39
40
|
isActiveTypeFirstInCollection: (e) => {
|
|
@@ -47,7 +48,7 @@ const p = () => ({
|
|
|
47
48
|
hasTemplatesByCollectionType: (e) => {
|
|
48
49
|
const t = {};
|
|
49
50
|
return i[e.selectedCollectionType].forEach((s) => {
|
|
50
|
-
t[s] = e.templates.some((
|
|
51
|
+
t[s] = e.templates.some((c) => c.type === s);
|
|
51
52
|
}), t;
|
|
52
53
|
},
|
|
53
54
|
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
@@ -56,29 +57,31 @@ const p = () => ({
|
|
|
56
57
|
$reset() {
|
|
57
58
|
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
58
59
|
Object.assign(this, {
|
|
59
|
-
...
|
|
60
|
+
...r(),
|
|
60
61
|
templates: e,
|
|
61
62
|
selectedUnsubscribePages: t
|
|
62
63
|
});
|
|
63
64
|
},
|
|
64
65
|
async fetchTemplates() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
this.templates.length || (o || (o = (async () => {
|
|
67
|
+
const { getUnsubscribePages: e } = d();
|
|
68
|
+
this.templates = await e();
|
|
69
|
+
})().finally(() => {
|
|
70
|
+
o = null;
|
|
71
|
+
})), await o);
|
|
69
72
|
},
|
|
70
73
|
setCollection(e) {
|
|
71
74
|
this.selectedCollectionType = e;
|
|
72
75
|
const t = i[e];
|
|
73
76
|
if (t && t.length > 0) {
|
|
74
77
|
[this.activeType] = t;
|
|
75
|
-
const
|
|
78
|
+
const l = { ...this.selectedTemplates };
|
|
76
79
|
t.forEach((s) => {
|
|
77
|
-
if (!
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
+
if (!l[s]) {
|
|
81
|
+
const c = this.templates.find((n) => n.type === s);
|
|
82
|
+
c && (l[s] = c.id);
|
|
80
83
|
}
|
|
81
|
-
}), this.selectedTemplates =
|
|
84
|
+
}), this.selectedTemplates = l;
|
|
82
85
|
}
|
|
83
86
|
},
|
|
84
87
|
setCollectionWithoutAutoSelection(e) {
|
|
@@ -101,17 +104,17 @@ const p = () => ({
|
|
|
101
104
|
t >= 0 && (this.activeType = this.getSelectedCollection[t]);
|
|
102
105
|
},
|
|
103
106
|
loadSelectedTemplates(e) {
|
|
104
|
-
const t = new Map(this.templates.map((s) => [s.id, s.type])),
|
|
107
|
+
const t = new Map(this.templates.map((s) => [s.id, s.type])), l = { ...this.selectedTemplates };
|
|
105
108
|
e.forEach((s) => {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
}), this.selectedTemplates =
|
|
109
|
+
const c = t.get(s);
|
|
110
|
+
c !== void 0 && (l[c] = s);
|
|
111
|
+
}), this.selectedTemplates = l;
|
|
109
112
|
},
|
|
110
113
|
getSelectedTemplatesByCollection(e) {
|
|
111
|
-
const t = i[e],
|
|
114
|
+
const t = i[e], l = [];
|
|
112
115
|
return t.forEach((s) => {
|
|
113
|
-
this.selectedTemplates[s] &&
|
|
114
|
-
}),
|
|
116
|
+
this.selectedTemplates[s] && l.push(this.selectedTemplates[s]);
|
|
117
|
+
}), l;
|
|
115
118
|
},
|
|
116
119
|
addUnsubscribePages(e) {
|
|
117
120
|
const t = /* @__PURE__ */ new Set([...this.selectedUnsubscribePages, ...e]);
|
|
@@ -125,5 +128,5 @@ const p = () => ({
|
|
|
125
128
|
}
|
|
126
129
|
});
|
|
127
130
|
export {
|
|
128
|
-
|
|
131
|
+
b as useUnsubscribeStore
|
|
129
132
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.d770bbd",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
35
|
-
"@useinsider/design-system-vue": "0.14.
|
|
35
|
+
"@useinsider/design-system-vue": "0.14.28",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
38
38
|
"pinia": "2.3.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import r from "./MigrationConfirmModal.vue2.js";
|
|
2
|
-
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var n = function() {
|
|
4
|
-
var o = this, s = o._self._c, e = o._self._setupProxy;
|
|
5
|
-
return e.isVisible ? s(e.WpModal, { attrs: { id: "migration-confirm-modal", size: "X-small", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.migration-confirm-save") }, on: { close: e.close, "primary-action": e.handleConfirm } }, [s("p", [o._v(" " + o._s(e.confirmMessage.prefix)), s("strong", [o._v(o._s(e.blockNames))]), o._v(o._s(e.confirmMessage.suffix) + " ")])]) : o._e();
|
|
6
|
-
}, t = [], a = /* @__PURE__ */ i(
|
|
7
|
-
r,
|
|
8
|
-
n,
|
|
9
|
-
t,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const m = a.exports;
|
|
15
|
-
export {
|
|
16
|
-
m as default
|
|
17
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, ref as a, computed as c } from "vue";
|
|
2
|
-
import x from "../../wrappers/WpModal.vue.js";
|
|
3
|
-
import { useTranslations as y } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { useTemplateStore as k } from "../../../stores/template.js";
|
|
5
|
-
const C = /* @__PURE__ */ _({
|
|
6
|
-
__name: "MigrationConfirmModal",
|
|
7
|
-
emits: ["confirm"],
|
|
8
|
-
setup(h, { expose: l, emit: m }) {
|
|
9
|
-
const t = a(!1), n = k(), e = y(), f = a({
|
|
10
|
-
cancelOrBackButton: {
|
|
11
|
-
type: "secondary",
|
|
12
|
-
labelText: e("campaign-builder.cancel"),
|
|
13
|
-
styling: "ghost"
|
|
14
|
-
},
|
|
15
|
-
primaryButton: {
|
|
16
|
-
type: "primary",
|
|
17
|
-
labelText: e("email-editor.migration-confirm-save")
|
|
18
|
-
}
|
|
19
|
-
}), p = c(() => {
|
|
20
|
-
const i = n.migrations["recommendation-block"] > 0, o = n.migrations["items-block"] > 0;
|
|
21
|
-
if (i && o) {
|
|
22
|
-
const g = e("email-recommendation.recommendation"), b = e("email-items.items");
|
|
23
|
-
return `${g} ${e("campaign-builder.or")} ${b}`;
|
|
24
|
-
}
|
|
25
|
-
return e(o ? "email-items.items" : "email-recommendation.recommendation");
|
|
26
|
-
}), u = c(() => {
|
|
27
|
-
const [i, o] = e("email-editor.migration-confirm-message").split("{blockNames}");
|
|
28
|
-
return { prefix: i || "", suffix: o || "" };
|
|
29
|
-
}), r = () => {
|
|
30
|
-
t.value = !0;
|
|
31
|
-
}, s = () => {
|
|
32
|
-
t.value = !1;
|
|
33
|
-
}, d = () => {
|
|
34
|
-
s(), m("confirm");
|
|
35
|
-
};
|
|
36
|
-
return l({ open: r }), { __sfc: !0, emit: m, isVisible: t, templateStore: n, trans: e, footerButtonOptions: f, blockNames: p, confirmMessage: u, open: r, close: s, handleConfirm: d, WpModal: x };
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
C as default
|
|
41
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const C = `
|
|
2
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<g transform="translate(3, 2.5)">
|
|
4
|
-
<path d="M6.87812 0.141942C10.7873 -0.580665 14.6797 1.51065 16.201 5.16436C17.7344
|
|
5
|
-
8.84685 16.432 13.0909 13.0906 15.3015C9.77511 17.4946 5.36819 17.08 2.52785
|
|
6
|
-
14.3193L2.46105 14.2536C0.882709 12.6854 -0.00259777 10.5591 5.72603e-06
|
|
7
|
-
8.34301L0.000643642 8.24974C0.0491816 4.30543 2.87651 0.926565 6.78576
|
|
8
|
-
0.159555L6.87812 0.141942ZM14.5911 5.82406C13.3749 2.90345 10.2486 1.24158 7.12372
|
|
9
|
-
1.85468C3.99888 2.46779 1.74568 5.18516 1.74194 8.34505C1.73988 10.1027 2.44203
|
|
10
|
-
11.789 3.69379 13.0328C5.94435 15.269 9.4739 15.617 12.1241 13.8638C14.7742 12.1106
|
|
11
|
-
15.8071 8.74458 14.5911 5.82406Z" fill="#258DDE"/>
|
|
12
|
-
<path d="M12.5195 13.5806C12.8537 13.2479 13.3933 13.2417 13.7351 13.5628L13.7512
|
|
13
|
-
13.5783L17.7437 17.5239C18.0845 17.8607 18.0856 18.4077 17.7461 18.7458C17.4066
|
|
14
|
-
19.0838 16.8551 19.0849 16.5143 18.7481L12.5218 14.8025L12.5061 14.7866C12.1811
|
|
15
|
-
14.4487 12.1853 13.9134 12.5195 13.5806Z" fill="#258DDE"/>
|
|
16
|
-
<path d="M6.71262 5.42913C6.37248 5.09172 5.82105 5.09172 5.48092 5.42913C5.14079
|
|
17
|
-
5.76655 5.14079 6.3136 5.48092 6.65104L6.71262 5.42913ZM7.80353 8.95504C8.14367
|
|
18
|
-
9.29246 8.69506 9.29246 9.0352 8.95504C9.37534 8.61762 9.37534 8.07053 9.0352
|
|
19
|
-
7.73311L7.80353 8.95504ZM9.0352 7.73311C8.69506 7.39569 8.14367 7.39569 7.80353
|
|
20
|
-
7.73311C7.46339 8.07053 7.46339 8.61762 7.80353 8.95504L9.0352 7.73311ZM10.1261
|
|
21
|
-
11.259C10.4663 11.5965 11.0176 11.5965 11.3578 11.259C11.6979 10.9216 11.6979
|
|
22
|
-
10.3745 11.3578 10.0371L10.1261 11.259ZM9.0352 8.95504C9.37534 8.61762 9.37534
|
|
23
|
-
8.07053 9.0352 7.73311C8.69506 7.39569 8.14367 7.39569 7.80353 7.73311L9.0352
|
|
24
|
-
8.95504ZM5.48092 10.0371C5.14079 10.3745 5.14079 10.9216 5.48092 11.259C5.82105
|
|
25
|
-
11.5965 6.37248 11.5965 6.71262 11.259L5.48092 10.0371ZM7.80353 7.73311C7.46339
|
|
26
|
-
8.07053 7.46339 8.61762 7.80353 8.95504C8.14367 9.29246 8.69506 9.29246 9.0352
|
|
27
|
-
8.95504L7.80353 7.73311ZM11.3578 6.65104C11.6979 6.3136 11.6979 5.76655 11.3578
|
|
28
|
-
5.42913C11.0176 5.09172 10.4663 5.09172 10.1261 5.42913L11.3578 6.65104ZM5.48092
|
|
29
|
-
6.65104L7.80353 8.95504L9.0352 7.73311L6.71262 5.42913L5.48092 6.65104ZM7.80353
|
|
30
|
-
8.95504L10.1261 11.259L11.3578 10.0371L9.0352 7.73311L7.80353 8.95504ZM7.80353
|
|
31
|
-
7.73311L5.48092 10.0371L6.71262 11.259L9.0352 8.95504L7.80353 7.73311ZM9.0352
|
|
32
|
-
8.95504L11.3578 6.65104L10.1261 5.42913L7.80353 7.73311L9.0352 8.95504Z"
|
|
33
|
-
fill="#258DDE"/>
|
|
34
|
-
</g>
|
|
35
|
-
</svg>
|
|
36
|
-
`;
|
|
37
|
-
export {
|
|
38
|
-
C as MIGRATION_INFO_ICON
|
|
39
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
open: () => void;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
4
|
-
confirm: () => void;
|
|
5
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
6
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MIGRATION_INFO_ICON = "\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g transform=\"translate(3, 2.5)\">\n <path d=\"M6.87812 0.141942C10.7873 -0.580665 14.6797 1.51065 16.201 5.16436C17.7344\n 8.84685 16.432 13.0909 13.0906 15.3015C9.77511 17.4946 5.36819 17.08 2.52785\n 14.3193L2.46105 14.2536C0.882709 12.6854 -0.00259777 10.5591 5.72603e-06\n 8.34301L0.000643642 8.24974C0.0491816 4.30543 2.87651 0.926565 6.78576\n 0.159555L6.87812 0.141942ZM14.5911 5.82406C13.3749 2.90345 10.2486 1.24158 7.12372\n 1.85468C3.99888 2.46779 1.74568 5.18516 1.74194 8.34505C1.73988 10.1027 2.44203\n 11.789 3.69379 13.0328C5.94435 15.269 9.4739 15.617 12.1241 13.8638C14.7742 12.1106\n 15.8071 8.74458 14.5911 5.82406Z\" fill=\"#258DDE\"/>\n <path d=\"M12.5195 13.5806C12.8537 13.2479 13.3933 13.2417 13.7351 13.5628L13.7512\n 13.5783L17.7437 17.5239C18.0845 17.8607 18.0856 18.4077 17.7461 18.7458C17.4066\n 19.0838 16.8551 19.0849 16.5143 18.7481L12.5218 14.8025L12.5061 14.7866C12.1811\n 14.4487 12.1853 13.9134 12.5195 13.5806Z\" fill=\"#258DDE\"/>\n <path d=\"M6.71262 5.42913C6.37248 5.09172 5.82105 5.09172 5.48092 5.42913C5.14079\n 5.76655 5.14079 6.3136 5.48092 6.65104L6.71262 5.42913ZM7.80353 8.95504C8.14367\n 9.29246 8.69506 9.29246 9.0352 8.95504C9.37534 8.61762 9.37534 8.07053 9.0352\n 7.73311L7.80353 8.95504ZM9.0352 7.73311C8.69506 7.39569 8.14367 7.39569 7.80353\n 7.73311C7.46339 8.07053 7.46339 8.61762 7.80353 8.95504L9.0352 7.73311ZM10.1261\n 11.259C10.4663 11.5965 11.0176 11.5965 11.3578 11.259C11.6979 10.9216 11.6979\n 10.3745 11.3578 10.0371L10.1261 11.259ZM9.0352 8.95504C9.37534 8.61762 9.37534\n 8.07053 9.0352 7.73311C8.69506 7.39569 8.14367 7.39569 7.80353 7.73311L9.0352\n 8.95504ZM5.48092 10.0371C5.14079 10.3745 5.14079 10.9216 5.48092 11.259C5.82105\n 11.5965 6.37248 11.5965 6.71262 11.259L5.48092 10.0371ZM7.80353 7.73311C7.46339\n 8.07053 7.46339 8.61762 7.80353 8.95504C8.14367 9.29246 8.69506 9.29246 9.0352\n 8.95504L7.80353 7.73311ZM11.3578 6.65104C11.6979 6.3136 11.6979 5.76655 11.3578\n 5.42913C11.0176 5.09172 10.4663 5.09172 10.1261 5.42913L11.3578 6.65104ZM5.48092\n 6.65104L7.80353 8.95504L9.0352 7.73311L6.71262 5.42913L5.48092 6.65104ZM7.80353\n 8.95504L10.1261 11.259L11.3578 10.0371L9.0352 7.73311L7.80353 8.95504ZM7.80353\n 7.73311L5.48092 10.0371L6.71262 11.259L9.0352 8.95504L7.80353 7.73311ZM9.0352\n 8.95504L11.3578 6.65104L10.1261 5.42913L7.80353 7.73311L9.0352 8.95504Z\"\n fill=\"#258DDE\"/>\n </g>\n </svg>\n";
|