@useinsider/guido 3.22.0-beta.d4e1d48 → 3.22.0-beta.d762f04
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/unsubscribe/UnsubscribePageSelection.vue.js +11 -11
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +9 -9
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +14 -17
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +9 -10
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -13
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +29 -30
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -16
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +25 -26
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +27 -28
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +75 -80
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +7 -7
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +13 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +121 -116
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +8 -8
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +15 -15
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +12 -12
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +1 -1
- package/dist/extensions/Blocks/common-control.js +62 -55
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -2
- package/dist/src/extensions/Blocks/common-control.d.ts +2 -0
- package/dist/src/stores/unsubscribe.d.ts +0 -10
- package/dist/stores/unsubscribe.js +29 -33
- package/package.json +1 -1
|
@@ -26,7 +26,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
26
26
|
createdAt: string;
|
|
27
27
|
updatedAt: string;
|
|
28
28
|
status: number;
|
|
29
|
-
isDefault?: boolean | undefined;
|
|
30
29
|
}[];
|
|
31
30
|
selectedTemplates: Record<number, number>;
|
|
32
31
|
selectedUnsubscribePages: number[];
|
|
@@ -52,7 +51,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
52
51
|
createdAt: string;
|
|
53
52
|
updatedAt: string;
|
|
54
53
|
status: number;
|
|
55
|
-
isDefault?: boolean | undefined;
|
|
56
54
|
}[];
|
|
57
55
|
selectedTemplates: Record<number, number>;
|
|
58
56
|
selectedUnsubscribePages: number[];
|
|
@@ -78,7 +76,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
78
76
|
createdAt: string;
|
|
79
77
|
updatedAt: string;
|
|
80
78
|
status: number;
|
|
81
|
-
isDefault?: boolean | undefined;
|
|
82
79
|
}[];
|
|
83
80
|
selectedTemplates: Record<number, number>;
|
|
84
81
|
selectedUnsubscribePages: number[];
|
|
@@ -102,7 +99,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
102
99
|
createdAt: string;
|
|
103
100
|
updatedAt: string;
|
|
104
101
|
status: number;
|
|
105
|
-
isDefault?: boolean | undefined;
|
|
106
102
|
}[];
|
|
107
103
|
getThumbnailByTemplateId: (state: {
|
|
108
104
|
templates: {
|
|
@@ -117,7 +113,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
117
113
|
createdAt: string;
|
|
118
114
|
updatedAt: string;
|
|
119
115
|
status: number;
|
|
120
|
-
isDefault?: boolean | undefined;
|
|
121
116
|
}[];
|
|
122
117
|
selectedTemplates: Record<number, number>;
|
|
123
118
|
selectedUnsubscribePages: number[];
|
|
@@ -143,7 +138,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
143
138
|
createdAt: string;
|
|
144
139
|
updatedAt: string;
|
|
145
140
|
status: number;
|
|
146
|
-
isDefault?: boolean | undefined;
|
|
147
141
|
}[];
|
|
148
142
|
selectedTemplates: Record<number, number>;
|
|
149
143
|
selectedUnsubscribePages: number[];
|
|
@@ -169,7 +163,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
169
163
|
createdAt: string;
|
|
170
164
|
updatedAt: string;
|
|
171
165
|
status: number;
|
|
172
|
-
isDefault?: boolean | undefined;
|
|
173
166
|
}[];
|
|
174
167
|
selectedTemplates: Record<number, number>;
|
|
175
168
|
selectedUnsubscribePages: number[];
|
|
@@ -195,7 +188,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
195
188
|
createdAt: string;
|
|
196
189
|
updatedAt: string;
|
|
197
190
|
status: number;
|
|
198
|
-
isDefault?: boolean | undefined;
|
|
199
191
|
}[];
|
|
200
192
|
selectedTemplates: Record<number, number>;
|
|
201
193
|
selectedUnsubscribePages: number[];
|
|
@@ -221,7 +213,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
221
213
|
createdAt: string;
|
|
222
214
|
updatedAt: string;
|
|
223
215
|
status: number;
|
|
224
|
-
isDefault?: boolean | undefined;
|
|
225
216
|
}[];
|
|
226
217
|
selectedTemplates: Record<number, number>;
|
|
227
218
|
selectedUnsubscribePages: number[];
|
|
@@ -247,7 +238,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
247
238
|
createdAt: string;
|
|
248
239
|
updatedAt: string;
|
|
249
240
|
status: number;
|
|
250
|
-
isDefault?: boolean | undefined;
|
|
251
241
|
}[];
|
|
252
242
|
selectedTemplates: Record<number, number>;
|
|
253
243
|
selectedUnsubscribePages: number[];
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { TYPE_COLLECTIONS as
|
|
1
|
+
import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
|
|
2
2
|
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
3
|
import { defineStore as u } from "pinia";
|
|
4
|
-
let
|
|
5
|
-
const
|
|
4
|
+
let o = null;
|
|
5
|
+
const r = () => ({
|
|
6
6
|
templates: [],
|
|
7
7
|
selectedTemplates: {},
|
|
8
8
|
selectedUnsubscribePages: [],
|
|
9
|
-
selectedCollectionType:
|
|
10
|
-
activeType:
|
|
9
|
+
selectedCollectionType: p.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
activeType: p.GLOBAL_UNSUBSCRIBE,
|
|
11
11
|
pageSelectionUpdateStatus: !1,
|
|
12
12
|
pageSelectionDrawerStatus: !1,
|
|
13
13
|
typeSelectionDrawerStatus: !1,
|
|
14
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
15
15
|
isSubscriptionPreferencesCenterDisabled: !1,
|
|
16
16
|
pendingBlockId: null
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
return [...e].sort((t, l) => +!!l.isDefault - +!!t.isDefault);
|
|
20
|
-
}
|
|
21
|
-
const f = u("guidoUnsubscribe", {
|
|
22
|
-
state: () => p(),
|
|
17
|
+
}), b = u("guidoUnsubscribe", {
|
|
18
|
+
state: () => r(),
|
|
23
19
|
getters: {
|
|
24
|
-
getSelectedCollection: (e) =>
|
|
20
|
+
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
25
21
|
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
26
22
|
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
27
23
|
getThumbnailByTemplateId: (e) => (t) => {
|
|
@@ -29,31 +25,31 @@ const f = u("guidoUnsubscribe", {
|
|
|
29
25
|
return ((l = e.templates.find((s) => s.id === t)) == null ? void 0 : l.thumbnail) ?? "";
|
|
30
26
|
},
|
|
31
27
|
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
32
|
-
const l =
|
|
28
|
+
const l = i[t];
|
|
33
29
|
if (!l)
|
|
34
30
|
return [];
|
|
35
31
|
const s = /* @__PURE__ */ new Map();
|
|
36
32
|
e.templates.forEach((n) => {
|
|
37
33
|
s.set(n.id, n.type);
|
|
38
34
|
});
|
|
39
|
-
const
|
|
35
|
+
const c = new Set(l);
|
|
40
36
|
return e.selectedUnsubscribePages.filter((n) => {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
37
|
+
const a = s.get(n);
|
|
38
|
+
return a !== void 0 && c.has(a);
|
|
43
39
|
});
|
|
44
40
|
},
|
|
45
41
|
isActiveTypeFirstInCollection: (e) => {
|
|
46
|
-
const t =
|
|
42
|
+
const t = i[e.selectedCollectionType] ?? [];
|
|
47
43
|
return e.activeType === t[0];
|
|
48
44
|
},
|
|
49
45
|
isActiveTypeLastInCollection: (e) => {
|
|
50
|
-
const t =
|
|
46
|
+
const t = i[e.selectedCollectionType] ?? [];
|
|
51
47
|
return e.activeType === t[t.length - 1];
|
|
52
48
|
},
|
|
53
49
|
hasTemplatesByCollectionType: (e) => {
|
|
54
50
|
const t = {};
|
|
55
|
-
return (
|
|
56
|
-
t[s] = e.templates.some((
|
|
51
|
+
return (i[e.selectedCollectionType] ?? []).forEach((s) => {
|
|
52
|
+
t[s] = e.templates.some((c) => c.type === s);
|
|
57
53
|
}), t;
|
|
58
54
|
},
|
|
59
55
|
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
@@ -62,36 +58,36 @@ const f = u("guidoUnsubscribe", {
|
|
|
62
58
|
$reset() {
|
|
63
59
|
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
64
60
|
Object.assign(this, {
|
|
65
|
-
...
|
|
61
|
+
...r(),
|
|
66
62
|
templates: e,
|
|
67
63
|
selectedUnsubscribePages: t
|
|
68
64
|
});
|
|
69
65
|
},
|
|
70
66
|
async fetchTemplates(e = !1) {
|
|
71
|
-
!e && this.templates.length || ((e || !
|
|
67
|
+
!e && this.templates.length || ((e || !o) && (o = (async () => {
|
|
72
68
|
const { getUnsubscribePages: t } = d();
|
|
73
|
-
this.templates =
|
|
69
|
+
this.templates = await t();
|
|
74
70
|
})().finally(() => {
|
|
75
|
-
|
|
76
|
-
})), await
|
|
71
|
+
o = null;
|
|
72
|
+
})), await o);
|
|
77
73
|
},
|
|
78
74
|
setCollection(e) {
|
|
79
75
|
this.selectedCollectionType = e;
|
|
80
|
-
const t =
|
|
76
|
+
const t = i[e];
|
|
81
77
|
if (t && t.length > 0) {
|
|
82
78
|
[this.activeType] = t;
|
|
83
79
|
const l = { ...this.selectedTemplates };
|
|
84
80
|
t.forEach((s) => {
|
|
85
81
|
if (!l[s]) {
|
|
86
|
-
const
|
|
87
|
-
|
|
82
|
+
const c = this.templates.find((n) => n.type === s);
|
|
83
|
+
c && (l[s] = c.id);
|
|
88
84
|
}
|
|
89
85
|
}), this.selectedTemplates = l;
|
|
90
86
|
}
|
|
91
87
|
},
|
|
92
88
|
setCollectionWithoutAutoSelection(e) {
|
|
93
89
|
this.selectedCollectionType = e;
|
|
94
|
-
const t =
|
|
90
|
+
const t = i[e];
|
|
95
91
|
t && t.length > 0 && ([this.activeType] = t);
|
|
96
92
|
},
|
|
97
93
|
setSelectedTemplate(e) {
|
|
@@ -111,12 +107,12 @@ const f = u("guidoUnsubscribe", {
|
|
|
111
107
|
loadSelectedTemplates(e) {
|
|
112
108
|
const t = new Map(this.templates.map((s) => [s.id, s.type])), l = { ...this.selectedTemplates };
|
|
113
109
|
e.forEach((s) => {
|
|
114
|
-
const
|
|
115
|
-
|
|
110
|
+
const c = t.get(s);
|
|
111
|
+
c !== void 0 && (l[c] = s);
|
|
116
112
|
}), this.selectedTemplates = l;
|
|
117
113
|
},
|
|
118
114
|
getSelectedTemplatesByCollection(e) {
|
|
119
|
-
const t =
|
|
115
|
+
const t = i[e], l = [];
|
|
120
116
|
return t.forEach((s) => {
|
|
121
117
|
this.selectedTemplates[s] && l.push(this.selectedTemplates[s]);
|
|
122
118
|
}), l;
|
|
@@ -133,5 +129,5 @@ const f = u("guidoUnsubscribe", {
|
|
|
133
129
|
}
|
|
134
130
|
});
|
|
135
131
|
export {
|
|
136
|
-
|
|
132
|
+
b as useUnsubscribeStore
|
|
137
133
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.22.0-beta.
|
|
3
|
+
"version": "3.22.0-beta.d762f04",
|
|
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",
|