@useinsider/guido 3.30.0-beta.a94eba0 → 3.30.0-beta.b86be87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -12
- package/dist/components/Guido.vue.js +10 -10
- package/dist/components/Guido.vue2.js +140 -123
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue.js +22 -0
- package/dist/components/organisms/dynamic-content/InvalidDynamicContentCard.vue2.js +21 -0
- package/dist/composables/useInvalidDynamicContentMarking.js +113 -0
- package/dist/composables/useModuleRepair.js +50 -56
- package/dist/composables/useStripo.js +63 -67
- package/dist/config/migrator/index.js +9 -10
- package/dist/enums/academy.js +1 -2
- package/dist/extensions/DynamicContent/dynamic-content.js +28 -26
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/@types/generic.d.ts +11 -0
- package/dist/src/components/Guido.vue.d.ts +5 -1
- package/dist/src/components/organisms/dynamic-content/InvalidDynamicContentCard.vue.d.ts +22 -0
- package/dist/src/composables/useInvalidDynamicContentMarking.d.ts +4 -0
- package/dist/src/composables/useModuleRepair.d.ts +1 -1
- package/dist/src/enums/academy.d.ts +0 -1
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/dynamic-content.d.ts +42 -1
- package/dist/src/stores/editor.d.ts +0 -54
- package/dist/src/utils/legacyUnsubscribeConversion.d.ts +0 -3
- package/dist/static/styles/customEditorStyle.css.js +4 -0
- package/dist/stores/dynamic-content.js +19 -7
- package/dist/stores/editor.js +0 -2
- package/dist/utils/legacyUnsubscribeConversion.js +28 -69
- package/package.json +1 -1
- package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.js +0 -17
- package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue2.js +0 -30
- package/dist/config/migrator/sfmcUnsubscribeTextMigrator.js +0 -20
- package/dist/src/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.d.ts +0 -2
- package/dist/src/config/migrator/sfmcUnsubscribeTextMigrator.d.ts +0 -1
|
@@ -4,7 +4,7 @@ import { type DynamicContentConversionResult } from '@@/Utils/dynamicContentConv
|
|
|
4
4
|
export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
|
|
5
5
|
export declare const registerUsedAttributes: (html: string, candidates: DynamicContentCandidate[]) => void;
|
|
6
6
|
/**
|
|
7
|
-
* Repairs dropped/copied saved modules (items currency, unsubscribe → text block,
|
|
7
|
+
* Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
|
|
8
8
|
* dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
|
|
9
9
|
*/
|
|
10
10
|
export declare const useModuleRepair: () => {
|
|
@@ -11,6 +11,5 @@ export declare const ACADEMY_LINKS: {
|
|
|
11
11
|
readonly EMAIL_DISPLAY_CONDITIONS: "https://academy.insiderone.com/docs/new-editor-add-display-conditions-to-an-email";
|
|
12
12
|
readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
|
|
13
13
|
readonly LEGACY_UNSUBSCRIBE_MODULE: "https://academy.insiderone.com/docs/new-editor-add-unsubscribe-pages-into-emails";
|
|
14
|
-
readonly SFMC_RELAY: "https://academy.insiderone.com/docs/sfmc-relay";
|
|
15
14
|
};
|
|
16
15
|
export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export { useGuidoEmailEditorStore } from './public/editorState';
|
|
|
6
6
|
export type { GuidoEmailEditorState } from './public/editorState';
|
|
7
7
|
export { prefetchGuidoRuntime } from './public/prefetchRuntime';
|
|
8
8
|
export type { StripoEventType } from './@types/events';
|
|
9
|
-
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
9
|
+
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, InvalidDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { DynamicContent } from '@@/Types/generic';
|
|
1
|
+
import type { DynamicContent, InvalidDynamicContent } from '@@/Types/generic';
|
|
2
2
|
export declare const useDynamicContentStore: import("pinia").StoreDefinition<"guidoDynamicContent", {
|
|
3
3
|
selectedDynamicContent: DynamicContent;
|
|
4
4
|
selectedDynamicContentList: DynamicContent[];
|
|
5
|
+
invalidDynamicContentList: InvalidDynamicContent[];
|
|
5
6
|
}, {
|
|
6
7
|
getSelectedDynamicContentList: (state: {
|
|
7
8
|
selectedDynamicContent: {
|
|
@@ -22,9 +23,17 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
|
|
|
22
23
|
} | undefined;
|
|
23
24
|
text: string;
|
|
24
25
|
}[];
|
|
26
|
+
invalidDynamicContentList: {
|
|
27
|
+
value: string;
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
actionLabel: string;
|
|
31
|
+
actionAvailable: boolean;
|
|
32
|
+
}[];
|
|
25
33
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
26
34
|
selectedDynamicContent: DynamicContent;
|
|
27
35
|
selectedDynamicContentList: DynamicContent[];
|
|
36
|
+
invalidDynamicContentList: InvalidDynamicContent[];
|
|
28
37
|
}>) => {
|
|
29
38
|
text: string;
|
|
30
39
|
value: string;
|
|
@@ -34,6 +43,37 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
|
|
|
34
43
|
value: string;
|
|
35
44
|
} | undefined;
|
|
36
45
|
}[];
|
|
46
|
+
getInvalidDynamicContent: (state: {
|
|
47
|
+
selectedDynamicContent: {
|
|
48
|
+
value: string;
|
|
49
|
+
fallback?: string | undefined;
|
|
50
|
+
format?: {
|
|
51
|
+
key: string;
|
|
52
|
+
value: string;
|
|
53
|
+
} | undefined;
|
|
54
|
+
text: string;
|
|
55
|
+
};
|
|
56
|
+
selectedDynamicContentList: {
|
|
57
|
+
value: string;
|
|
58
|
+
fallback?: string | undefined;
|
|
59
|
+
format?: {
|
|
60
|
+
key: string;
|
|
61
|
+
value: string;
|
|
62
|
+
} | undefined;
|
|
63
|
+
text: string;
|
|
64
|
+
}[];
|
|
65
|
+
invalidDynamicContentList: {
|
|
66
|
+
value: string;
|
|
67
|
+
title: string;
|
|
68
|
+
description: string;
|
|
69
|
+
actionLabel: string;
|
|
70
|
+
actionAvailable: boolean;
|
|
71
|
+
}[];
|
|
72
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
73
|
+
selectedDynamicContent: DynamicContent;
|
|
74
|
+
selectedDynamicContentList: DynamicContent[];
|
|
75
|
+
invalidDynamicContentList: InvalidDynamicContent[];
|
|
76
|
+
}>) => (value: string) => InvalidDynamicContent | undefined;
|
|
37
77
|
}, {
|
|
38
78
|
setSelectedDynamicContent(dynamicContent: DynamicContent): void;
|
|
39
79
|
/**
|
|
@@ -44,4 +84,5 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
|
|
|
44
84
|
* reactivity can't write a later mutation back into the host's catalog.
|
|
45
85
|
*/
|
|
46
86
|
registerDynamicContent(items: DynamicContent[]): void;
|
|
87
|
+
setInvalidDynamicContent(list: unknown): void;
|
|
47
88
|
}>;
|
|
@@ -13,8 +13,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
13
13
|
changeSeq: number;
|
|
14
14
|
isStripoInitialized: boolean;
|
|
15
15
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
16
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
17
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
18
16
|
templateId: string;
|
|
19
17
|
syncModulesEnabled: boolean;
|
|
20
18
|
trackIdSessionFloor: number;
|
|
@@ -33,8 +31,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
33
31
|
changeSeq: number;
|
|
34
32
|
isStripoInitialized: boolean;
|
|
35
33
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
36
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
37
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
38
34
|
templateId: string;
|
|
39
35
|
syncModulesEnabled: boolean;
|
|
40
36
|
trackIdSessionFloor: number;
|
|
@@ -52,8 +48,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
52
48
|
changeSeq: number;
|
|
53
49
|
isStripoInitialized: boolean;
|
|
54
50
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
55
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
56
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
57
51
|
templateId: string;
|
|
58
52
|
syncModulesEnabled: boolean;
|
|
59
53
|
trackIdSessionFloor: number;
|
|
@@ -72,8 +66,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
72
66
|
changeSeq: number;
|
|
73
67
|
isStripoInitialized: boolean;
|
|
74
68
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
75
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
76
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
77
69
|
templateId: string;
|
|
78
70
|
syncModulesEnabled: boolean;
|
|
79
71
|
trackIdSessionFloor: number;
|
|
@@ -91,8 +83,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
91
83
|
changeSeq: number;
|
|
92
84
|
isStripoInitialized: boolean;
|
|
93
85
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
94
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
95
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
96
86
|
templateId: string;
|
|
97
87
|
syncModulesEnabled: boolean;
|
|
98
88
|
trackIdSessionFloor: number;
|
|
@@ -111,8 +101,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
111
101
|
changeSeq: number;
|
|
112
102
|
isStripoInitialized: boolean;
|
|
113
103
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
114
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
115
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
116
104
|
templateId: string;
|
|
117
105
|
syncModulesEnabled: boolean;
|
|
118
106
|
trackIdSessionFloor: number;
|
|
@@ -130,8 +118,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
130
118
|
changeSeq: number;
|
|
131
119
|
isStripoInitialized: boolean;
|
|
132
120
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
133
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
134
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
135
121
|
templateId: string;
|
|
136
122
|
syncModulesEnabled: boolean;
|
|
137
123
|
trackIdSessionFloor: number;
|
|
@@ -150,8 +136,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
150
136
|
changeSeq: number;
|
|
151
137
|
isStripoInitialized: boolean;
|
|
152
138
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
153
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
154
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
155
139
|
templateId: string;
|
|
156
140
|
syncModulesEnabled: boolean;
|
|
157
141
|
trackIdSessionFloor: number;
|
|
@@ -169,8 +153,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
169
153
|
changeSeq: number;
|
|
170
154
|
isStripoInitialized: boolean;
|
|
171
155
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
172
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
173
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
174
156
|
templateId: string;
|
|
175
157
|
syncModulesEnabled: boolean;
|
|
176
158
|
trackIdSessionFloor: number;
|
|
@@ -189,8 +171,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
189
171
|
changeSeq: number;
|
|
190
172
|
isStripoInitialized: boolean;
|
|
191
173
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
192
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
193
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
194
174
|
templateId: string;
|
|
195
175
|
syncModulesEnabled: boolean;
|
|
196
176
|
trackIdSessionFloor: number;
|
|
@@ -208,8 +188,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
208
188
|
changeSeq: number;
|
|
209
189
|
isStripoInitialized: boolean;
|
|
210
190
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
211
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
212
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
213
191
|
templateId: string;
|
|
214
192
|
syncModulesEnabled: boolean;
|
|
215
193
|
trackIdSessionFloor: number;
|
|
@@ -228,8 +206,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
228
206
|
changeSeq: number;
|
|
229
207
|
isStripoInitialized: boolean;
|
|
230
208
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
231
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
232
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
233
209
|
templateId: string;
|
|
234
210
|
syncModulesEnabled: boolean;
|
|
235
211
|
trackIdSessionFloor: number;
|
|
@@ -247,8 +223,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
247
223
|
changeSeq: number;
|
|
248
224
|
isStripoInitialized: boolean;
|
|
249
225
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
250
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
251
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
252
226
|
templateId: string;
|
|
253
227
|
syncModulesEnabled: boolean;
|
|
254
228
|
trackIdSessionFloor: number;
|
|
@@ -267,8 +241,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
267
241
|
changeSeq: number;
|
|
268
242
|
isStripoInitialized: boolean;
|
|
269
243
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
270
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
271
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
272
244
|
templateId: string;
|
|
273
245
|
syncModulesEnabled: boolean;
|
|
274
246
|
trackIdSessionFloor: number;
|
|
@@ -286,8 +258,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
286
258
|
changeSeq: number;
|
|
287
259
|
isStripoInitialized: boolean;
|
|
288
260
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
289
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
290
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
291
261
|
templateId: string;
|
|
292
262
|
syncModulesEnabled: boolean;
|
|
293
263
|
trackIdSessionFloor: number;
|
|
@@ -306,8 +276,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
306
276
|
changeSeq: number;
|
|
307
277
|
isStripoInitialized: boolean;
|
|
308
278
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
309
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
310
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
311
279
|
templateId: string;
|
|
312
280
|
syncModulesEnabled: boolean;
|
|
313
281
|
trackIdSessionFloor: number;
|
|
@@ -325,8 +293,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
325
293
|
changeSeq: number;
|
|
326
294
|
isStripoInitialized: boolean;
|
|
327
295
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
328
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
329
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
330
296
|
templateId: string;
|
|
331
297
|
syncModulesEnabled: boolean;
|
|
332
298
|
trackIdSessionFloor: number;
|
|
@@ -345,8 +311,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
345
311
|
changeSeq: number;
|
|
346
312
|
isStripoInitialized: boolean;
|
|
347
313
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
348
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
349
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
350
314
|
templateId: string;
|
|
351
315
|
syncModulesEnabled: boolean;
|
|
352
316
|
trackIdSessionFloor: number;
|
|
@@ -364,8 +328,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
364
328
|
changeSeq: number;
|
|
365
329
|
isStripoInitialized: boolean;
|
|
366
330
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
367
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
368
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
369
331
|
templateId: string;
|
|
370
332
|
syncModulesEnabled: boolean;
|
|
371
333
|
trackIdSessionFloor: number;
|
|
@@ -384,8 +346,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
384
346
|
changeSeq: number;
|
|
385
347
|
isStripoInitialized: boolean;
|
|
386
348
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
387
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
388
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
389
349
|
templateId: string;
|
|
390
350
|
syncModulesEnabled: boolean;
|
|
391
351
|
trackIdSessionFloor: number;
|
|
@@ -403,8 +363,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
403
363
|
changeSeq: number;
|
|
404
364
|
isStripoInitialized: boolean;
|
|
405
365
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
406
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
407
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
408
366
|
templateId: string;
|
|
409
367
|
syncModulesEnabled: boolean;
|
|
410
368
|
trackIdSessionFloor: number;
|
|
@@ -423,8 +381,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
423
381
|
changeSeq: number;
|
|
424
382
|
isStripoInitialized: boolean;
|
|
425
383
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
426
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
427
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
428
384
|
templateId: string;
|
|
429
385
|
syncModulesEnabled: boolean;
|
|
430
386
|
trackIdSessionFloor: number;
|
|
@@ -442,8 +398,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
442
398
|
changeSeq: number;
|
|
443
399
|
isStripoInitialized: boolean;
|
|
444
400
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
445
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
446
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
447
401
|
templateId: string;
|
|
448
402
|
syncModulesEnabled: boolean;
|
|
449
403
|
trackIdSessionFloor: number;
|
|
@@ -462,8 +416,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
462
416
|
changeSeq: number;
|
|
463
417
|
isStripoInitialized: boolean;
|
|
464
418
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
465
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
466
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
467
419
|
templateId: string;
|
|
468
420
|
syncModulesEnabled: boolean;
|
|
469
421
|
trackIdSessionFloor: number;
|
|
@@ -481,8 +433,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
481
433
|
changeSeq: number;
|
|
482
434
|
isStripoInitialized: boolean;
|
|
483
435
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
484
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
485
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
486
436
|
templateId: string;
|
|
487
437
|
syncModulesEnabled: boolean;
|
|
488
438
|
trackIdSessionFloor: number;
|
|
@@ -501,8 +451,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
501
451
|
changeSeq: number;
|
|
502
452
|
isStripoInitialized: boolean;
|
|
503
453
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
504
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
505
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
506
454
|
templateId: string;
|
|
507
455
|
syncModulesEnabled: boolean;
|
|
508
456
|
trackIdSessionFloor: number;
|
|
@@ -520,8 +468,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
520
468
|
changeSeq: number;
|
|
521
469
|
isStripoInitialized: boolean;
|
|
522
470
|
isLegacyUnsubscribeModalRequested: boolean;
|
|
523
|
-
isSfmcUnsubscribeModalRequested: boolean;
|
|
524
|
-
isUnsubscribeConvertedOnLoad: boolean;
|
|
525
471
|
templateId: string;
|
|
526
472
|
syncModulesEnabled: boolean;
|
|
527
473
|
trackIdSessionFloor: number;
|
|
@@ -5,9 +5,6 @@ export interface LegacyUnsubscribeConversionResult {
|
|
|
5
5
|
converted: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare const hasLegacyUnsubscribeClass: (html: string) => boolean;
|
|
8
|
-
export declare const hasAnyUnsubscribeClass: (html: string) => boolean;
|
|
9
8
|
export declare const convertLinklessLegacyUnsubscribeBlocks: (root: ParentNode) => number;
|
|
10
9
|
export declare const convertLegacyUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
|
11
10
|
export declare const convertLegacyUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
|
12
|
-
export declare const convertAllUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
|
13
|
-
export declare const convertAllUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
|
@@ -9,6 +9,10 @@ const n = `.esd-x,
|
|
|
9
9
|
border-radius: 4px !important;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
merge-tag-selector {
|
|
13
|
+
--guido-dc-invalid-color: #dc2a2a;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
.ue-preview-control-wrapper ue-icon-component:not([disabled=true]):not(.stripo-static-icon):hover {
|
|
13
17
|
background: none;
|
|
14
18
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { removeDuplicatesFromArray as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { removeDuplicatesFromArray as i } from "../utils/arrayUtil.js";
|
|
2
|
+
import { isPlainObject as o } from "../utils/genericUtil.js";
|
|
3
|
+
import { defineStore as l } from "pinia";
|
|
4
|
+
const n = (t) => typeof t == "string" ? t : "", c = (t) => !o(t) || typeof t.value != "string" || t.value === "" ? null : {
|
|
5
|
+
value: t.value,
|
|
6
|
+
title: n(t.title),
|
|
7
|
+
description: n(t.description),
|
|
8
|
+
actionLabel: n(t.actionLabel),
|
|
9
|
+
actionAvailable: t.actionAvailable === !0
|
|
10
|
+
}, m = l("guidoDynamicContent", {
|
|
4
11
|
state: () => ({
|
|
5
12
|
selectedDynamicContent: { text: "", value: "" },
|
|
6
|
-
selectedDynamicContentList: []
|
|
13
|
+
selectedDynamicContentList: [],
|
|
14
|
+
invalidDynamicContentList: []
|
|
7
15
|
}),
|
|
8
16
|
actions: {
|
|
9
17
|
setSelectedDynamicContent(t) {
|
|
@@ -18,17 +26,21 @@ const c = a("guidoDynamicContent", {
|
|
|
18
26
|
*/
|
|
19
27
|
registerDynamicContent(t) {
|
|
20
28
|
this.selectedDynamicContentList.push(...t.map((e) => ({ ...e })));
|
|
29
|
+
},
|
|
30
|
+
setInvalidDynamicContent(t) {
|
|
31
|
+
this.invalidDynamicContentList = Array.isArray(t) ? t.map(c).filter((e) => e !== null) : [];
|
|
21
32
|
}
|
|
22
33
|
},
|
|
23
34
|
getters: {
|
|
24
|
-
getSelectedDynamicContentList: (t) =>
|
|
35
|
+
getSelectedDynamicContentList: (t) => i(t.selectedDynamicContentList).map((e) => ({
|
|
25
36
|
text: e.text,
|
|
26
37
|
value: e.value,
|
|
27
38
|
fallback: e.fallback,
|
|
28
39
|
format: e.format
|
|
29
|
-
}))
|
|
40
|
+
})),
|
|
41
|
+
getInvalidDynamicContent: (t) => (e) => t.invalidDynamicContentList.find((a) => a.value === e)
|
|
30
42
|
}
|
|
31
43
|
});
|
|
32
44
|
export {
|
|
33
|
-
|
|
45
|
+
m as useDynamicContentStore
|
|
34
46
|
};
|
package/dist/stores/editor.js
CHANGED
|
@@ -17,8 +17,6 @@ const o = e("guidoEditor", {
|
|
|
17
17
|
changeSeq: 0,
|
|
18
18
|
isStripoInitialized: !1,
|
|
19
19
|
isLegacyUnsubscribeModalRequested: !1,
|
|
20
|
-
isSfmcUnsubscribeModalRequested: !1,
|
|
21
|
-
isUnsubscribeConvertedOnLoad: !1,
|
|
22
20
|
templateId: "",
|
|
23
21
|
syncModulesEnabled: !1,
|
|
24
22
|
// In-session id high-water mark; floors tracking-id minting so ids
|
|
@@ -1,90 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { protectLiquid as C, restoreLiquid as _ } from "./liquidProtection.js";
|
|
4
|
-
const u = "td.unsubscribe-block", p = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], v = `${u}, .unsubscribe-block-v2`, y = "esd-block-text", U = [
|
|
1
|
+
import { protectLiquid as a, restoreLiquid as u } from "./liquidProtection.js";
|
|
2
|
+
const b = "td.unsubscribe-block", l = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], d = "esd-block-text", m = [
|
|
5
3
|
"unsubscribe-block",
|
|
6
4
|
"esd-extension",
|
|
7
5
|
"esd-extension-block",
|
|
8
6
|
"esd-unsubscribe-block",
|
|
9
7
|
"esd-block-unsubscribe"
|
|
10
|
-
],
|
|
11
|
-
e.classList.remove(...
|
|
12
|
-
},
|
|
13
|
-
const t = e.
|
|
14
|
-
return
|
|
15
|
-
},
|
|
16
|
-
e.classList.remove(g), e.classList.length === 0 && e.removeAttribute("class"), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(l)).forEach(({ name: t }) => e.removeAttribute(t));
|
|
17
|
-
}, x = (e) => {
|
|
18
|
-
Array.from(e.querySelectorAll("a")).forEach((t) => {
|
|
19
|
-
if (O(t)) {
|
|
20
|
-
t.replaceWith(...Array.from(t.childNodes));
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
M(t);
|
|
24
|
-
});
|
|
25
|
-
}, q = (e) => typeof e == "string" && N.test(e), D = (e) => {
|
|
26
|
-
const t = Array.from(e.querySelectorAll(v));
|
|
27
|
-
return t.forEach((r) => {
|
|
28
|
-
r.classList.remove(h), x(r), b(r);
|
|
29
|
-
}), t.length;
|
|
30
|
-
}, H = (e) => {
|
|
31
|
-
const t = Array.from(e.querySelectorAll(u)).filter((r) => !B(r));
|
|
32
|
-
return t.forEach(b), t.length;
|
|
33
|
-
}, a = (e) => {
|
|
8
|
+
], L = "esd-extension-block-id", S = "data-unsubscribe-", E = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", f = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), p = (e) => typeof e == "string" && f.test(e), y = (e) => l.some((t) => e.querySelector(t) !== null), g = (e) => {
|
|
9
|
+
e.classList.remove(...m), e.classList.add(d), e.removeAttribute(L), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(S)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(E) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
|
|
10
|
+
}, h = (e) => {
|
|
11
|
+
const t = Array.from(e.querySelectorAll(b)).filter((r) => !y(r));
|
|
12
|
+
return t.forEach(g), t.length;
|
|
13
|
+
}, v = (e) => {
|
|
34
14
|
const t = e.trimStart(), r = new DOMParser();
|
|
35
15
|
return /^<t[dh][\s>]/i.test(t) ? r.parseFromString(`<table><tbody><tr>${e}</tr></tbody></table>`, "text/html").querySelector("tr") : /^<tr[\s>]/i.test(t) ? r.parseFromString(`<table><tbody>${e}</tbody></table>`, "text/html").querySelector("tbody") : /^<table[\s>]/i.test(t) ? r.parseFromString(e, "text/html").body : (console.debug("[LegacyUnsubscribeConversion] Skipped module with a non-table root"), null);
|
|
36
|
-
},
|
|
16
|
+
}, c = (e) => {
|
|
37
17
|
const t = e.search(/<html[\s>]/i), r = [...e.matchAll(/<\/html\s*>/gi)].at(-1), s = (r == null ? void 0 : r.index) === void 0 ? -1 : r.index + r[0].length;
|
|
38
18
|
return t < 0 || s <= t ? { head: "", root: e, tail: "" } : { head: e.slice(0, t), root: e.slice(t, s), tail: e.slice(s) };
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
convertCells: H
|
|
42
|
-
}, S = {
|
|
43
|
-
detect: q,
|
|
44
|
-
convertCells: D
|
|
45
|
-
}, n = (e, t, r, s, i = K) => {
|
|
46
|
-
if (!i.detect(e))
|
|
19
|
+
}, i = (e, t, r, s) => {
|
|
20
|
+
if (!p(e))
|
|
47
21
|
return { html: e, converted: !1 };
|
|
48
22
|
try {
|
|
49
|
-
const o =
|
|
50
|
-
return !
|
|
23
|
+
const o = a(e), n = t(o);
|
|
24
|
+
return !n || h(n) === 0 ? { html: e, converted: !1 } : { html: u(r(n, o)), converted: !0 };
|
|
51
25
|
} catch (o) {
|
|
52
26
|
return console.error(`Failed to convert legacy unsubscribe blocks in ${s}:`, o), { html: e, converted: !1 };
|
|
53
27
|
}
|
|
54
|
-
},
|
|
55
|
-
const { head: r, tail: s } = d(t);
|
|
56
|
-
return `${r}${e.documentElement.outerHTML}${s}`;
|
|
57
|
-
}, F = (e) => n(
|
|
28
|
+
}, C = (e) => i(
|
|
58
29
|
e,
|
|
59
|
-
|
|
60
|
-
|
|
30
|
+
v,
|
|
31
|
+
(t) => t.innerHTML,
|
|
61
32
|
"module"
|
|
62
|
-
),
|
|
33
|
+
), _ = (e) => i(
|
|
63
34
|
e,
|
|
64
|
-
|
|
65
|
-
|
|
35
|
+
(t) => new DOMParser().parseFromString(c(t).root, "text/html"),
|
|
36
|
+
(t, r) => {
|
|
37
|
+
const { head: s, tail: o } = c(r);
|
|
38
|
+
return `${s}${t.documentElement.outerHTML}${o}`;
|
|
39
|
+
},
|
|
66
40
|
"document"
|
|
67
|
-
), P = (e) => n(
|
|
68
|
-
e,
|
|
69
|
-
a,
|
|
70
|
-
m,
|
|
71
|
-
"module",
|
|
72
|
-
S
|
|
73
|
-
), V = (e) => n(
|
|
74
|
-
e,
|
|
75
|
-
E,
|
|
76
|
-
L,
|
|
77
|
-
"document",
|
|
78
|
-
S
|
|
79
41
|
);
|
|
80
42
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
H as convertLinklessLegacyUnsubscribeBlocks,
|
|
88
|
-
q as hasAnyUnsubscribeClass,
|
|
89
|
-
R as hasLegacyUnsubscribeClass
|
|
43
|
+
l as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
|
|
44
|
+
b as LEGACY_UNSUBSCRIBE_SELECTOR,
|
|
45
|
+
_ as convertLegacyUnsubscribeInDocumentHtml,
|
|
46
|
+
C as convertLegacyUnsubscribeInModuleHtml,
|
|
47
|
+
h as convertLinklessLegacyUnsubscribeBlocks,
|
|
48
|
+
p as hasLegacyUnsubscribeClass
|
|
90
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.30.0-beta.
|
|
3
|
+
"version": "3.30.0-beta.b86be87",
|
|
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",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import t from "./SfmcUnsubscribeConvertedModal.vue2.js";
|
|
2
|
-
import r 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: "guido__sfmc-unsubscribe-converted-modal", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.sfmc-unsubscribe-converted-modal-title") }, on: { close: e.close, "primary-action": e.close, "secondary-action": e.openAcademy } }, [s("p", [o._v(o._s(e.trans("email-editor.sfmc-unsubscribe-converted-modal-message")))])]) : o._e();
|
|
6
|
-
}, c = [], i = /* @__PURE__ */ r(
|
|
7
|
-
t,
|
|
8
|
-
n,
|
|
9
|
-
c,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const m = i.exports;
|
|
15
|
-
export {
|
|
16
|
-
m as default
|
|
17
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, computed as t } from "vue";
|
|
2
|
-
import i from "../../wrappers/WpModal.vue.js";
|
|
3
|
-
import { useTranslations as a } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
|
|
5
|
-
import { useEditorStore as m } from "../../../stores/editor.js";
|
|
6
|
-
const S = /* @__PURE__ */ n({
|
|
7
|
-
__name: "SfmcUnsubscribeConvertedModal",
|
|
8
|
-
setup(p) {
|
|
9
|
-
const o = a(), e = m(), r = t(
|
|
10
|
-
() => e.isSfmcUnsubscribeModalRequested && e.isStripoInitialized
|
|
11
|
-
), s = t(() => ({
|
|
12
|
-
secondaryButton: {
|
|
13
|
-
type: "subtle-primary",
|
|
14
|
-
labelText: o("email-editor.legacy-unsubscribe-converted-modal-visit-academy")
|
|
15
|
-
},
|
|
16
|
-
primaryButton: {
|
|
17
|
-
type: "primary",
|
|
18
|
-
labelText: o("action-builder.ok")
|
|
19
|
-
}
|
|
20
|
-
}));
|
|
21
|
-
return { __sfc: !0, trans: o, editorStore: e, isVisible: r, footerButtonOptions: s, close: () => {
|
|
22
|
-
e.isSfmcUnsubscribeModalRequested = !1;
|
|
23
|
-
}, openAcademy: () => {
|
|
24
|
-
window.open(c.SFMC_RELAY, "_blank", "noopener,noreferrer");
|
|
25
|
-
}, WpModal: i };
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
S as default
|
|
30
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useConfigStore as s } from "../../stores/config.js";
|
|
2
|
-
import { useEditorStore as n } from "../../stores/editor.js";
|
|
3
|
-
import { hasAnyUnsubscribeClass as i, convertAllUnsubscribeInDocumentHtml as c } from "../../utils/legacyUnsubscribeConversion.js";
|
|
4
|
-
const a = (r) => {
|
|
5
|
-
try {
|
|
6
|
-
if (!i(r) || !s().isFeatureEnabled("blockUnsubscribeLinks"))
|
|
7
|
-
return r;
|
|
8
|
-
const { html: e, converted: o } = c(r);
|
|
9
|
-
if (o) {
|
|
10
|
-
const t = n();
|
|
11
|
-
t.isSfmcUnsubscribeModalRequested = !0, t.isUnsubscribeConvertedOnLoad = !0;
|
|
12
|
-
}
|
|
13
|
-
return e;
|
|
14
|
-
} catch (e) {
|
|
15
|
-
return console.error("SfmcUnsubscribeTextMigrator failed:", e), r;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
a as migrateSfmcUnsubscribeText
|
|
20
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const migrateSfmcUnsubscribeText: (html: string) => string;
|