@useinsider/guido 3.21.2-beta.b6f3ef8 → 3.21.2-beta.d9d48aa

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.
Files changed (36) hide show
  1. package/README.md +13 -34
  2. package/dist/@types/config/schemas.js +35 -33
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +115 -121
  5. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
  6. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
  7. package/dist/composables/useModuleRepair.js +32 -23
  8. package/dist/composables/useStripo.js +82 -94
  9. package/dist/config/migrator/index.js +10 -9
  10. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
  11. package/dist/enums/academy.js +2 -1
  12. package/dist/guido.css +1 -1
  13. package/dist/library.js +10 -12
  14. package/dist/package.json.js +4 -6
  15. package/dist/src/@types/config/schemas.d.ts +4 -0
  16. package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
  17. package/dist/src/composables/useConfig.d.ts +2 -0
  18. package/dist/src/composables/useModuleRepair.d.ts +2 -11
  19. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
  20. package/dist/src/enums/academy.d.ts +1 -0
  21. package/dist/src/library.d.ts +0 -1
  22. package/dist/src/stores/config.d.ts +20 -0
  23. package/dist/src/stores/editor.d.ts +25 -0
  24. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
  25. package/dist/stores/editor.js +15 -14
  26. package/dist/utils/legacyUnsubscribeConversion.js +49 -0
  27. package/package.json +1 -6
  28. package/dist/composables/useEditorOpenMetrics.js +0 -164
  29. package/dist/public/prefetchRuntime.js +0 -4
  30. package/dist/src/composables/useEditorOpenMetrics.d.ts +0 -27
  31. package/dist/src/public/prefetchRuntime.d.ts +0 -1
  32. package/dist/src/utils/runtimePrefetch.d.ts +0 -4
  33. package/dist/src/utils/stripoRuntime.d.ts +0 -2
  34. package/dist/static/stripo-runtime-manifest.json.js +0 -9
  35. package/dist/utils/runtimePrefetch.js +0 -26
  36. package/dist/utils/stripoRuntime.js +0 -9
@@ -109,6 +109,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
109
109
  linkTrackingIds: boolean;
110
110
  allowSaveWithErrors: boolean;
111
111
  reusableRecommendationStrategy: boolean;
112
+ legacyUnsubscribeConversion: boolean;
112
113
  };
113
114
  blocks: {
114
115
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -254,6 +255,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
254
255
  linkTrackingIds: boolean;
255
256
  allowSaveWithErrors: boolean;
256
257
  reusableRecommendationStrategy: boolean;
258
+ legacyUnsubscribeConversion: boolean;
257
259
  };
258
260
  blocks: {
259
261
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -399,6 +401,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
399
401
  linkTrackingIds: boolean;
400
402
  allowSaveWithErrors: boolean;
401
403
  reusableRecommendationStrategy: boolean;
404
+ legacyUnsubscribeConversion: boolean;
402
405
  };
403
406
  blocks: {
404
407
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -544,6 +547,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
544
547
  linkTrackingIds: boolean;
545
548
  allowSaveWithErrors: boolean;
546
549
  reusableRecommendationStrategy: boolean;
550
+ legacyUnsubscribeConversion: boolean;
547
551
  };
548
552
  blocks: {
549
553
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -689,6 +693,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
689
693
  linkTrackingIds: boolean;
690
694
  allowSaveWithErrors: boolean;
691
695
  reusableRecommendationStrategy: boolean;
696
+ legacyUnsubscribeConversion: boolean;
692
697
  };
693
698
  blocks: {
694
699
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -834,6 +839,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
834
839
  linkTrackingIds: boolean;
835
840
  allowSaveWithErrors: boolean;
836
841
  reusableRecommendationStrategy: boolean;
842
+ legacyUnsubscribeConversion: boolean;
837
843
  };
838
844
  blocks: {
839
845
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -979,6 +985,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
979
985
  linkTrackingIds: boolean;
980
986
  allowSaveWithErrors: boolean;
981
987
  reusableRecommendationStrategy: boolean;
988
+ legacyUnsubscribeConversion: boolean;
982
989
  };
983
990
  blocks: {
984
991
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1124,6 +1131,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1124
1131
  linkTrackingIds: boolean;
1125
1132
  allowSaveWithErrors: boolean;
1126
1133
  reusableRecommendationStrategy: boolean;
1134
+ legacyUnsubscribeConversion: boolean;
1127
1135
  };
1128
1136
  blocks: {
1129
1137
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1269,6 +1277,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1269
1277
  linkTrackingIds: boolean;
1270
1278
  allowSaveWithErrors: boolean;
1271
1279
  reusableRecommendationStrategy: boolean;
1280
+ legacyUnsubscribeConversion: boolean;
1272
1281
  };
1273
1282
  blocks: {
1274
1283
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1414,6 +1423,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1414
1423
  linkTrackingIds: boolean;
1415
1424
  allowSaveWithErrors: boolean;
1416
1425
  reusableRecommendationStrategy: boolean;
1426
+ legacyUnsubscribeConversion: boolean;
1417
1427
  };
1418
1428
  blocks: {
1419
1429
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1559,6 +1569,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1559
1569
  linkTrackingIds: boolean;
1560
1570
  allowSaveWithErrors: boolean;
1561
1571
  reusableRecommendationStrategy: boolean;
1572
+ legacyUnsubscribeConversion: boolean;
1562
1573
  };
1563
1574
  blocks: {
1564
1575
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1704,6 +1715,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1704
1715
  linkTrackingIds: boolean;
1705
1716
  allowSaveWithErrors: boolean;
1706
1717
  reusableRecommendationStrategy: boolean;
1718
+ legacyUnsubscribeConversion: boolean;
1707
1719
  };
1708
1720
  blocks: {
1709
1721
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1849,6 +1861,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1849
1861
  linkTrackingIds: boolean;
1850
1862
  allowSaveWithErrors: boolean;
1851
1863
  reusableRecommendationStrategy: boolean;
1864
+ legacyUnsubscribeConversion: boolean;
1852
1865
  };
1853
1866
  blocks: {
1854
1867
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1994,6 +2007,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1994
2007
  linkTrackingIds: boolean;
1995
2008
  allowSaveWithErrors: boolean;
1996
2009
  reusableRecommendationStrategy: boolean;
2010
+ legacyUnsubscribeConversion: boolean;
1997
2011
  };
1998
2012
  blocks: {
1999
2013
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2139,6 +2153,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2139
2153
  linkTrackingIds: boolean;
2140
2154
  allowSaveWithErrors: boolean;
2141
2155
  reusableRecommendationStrategy: boolean;
2156
+ legacyUnsubscribeConversion: boolean;
2142
2157
  };
2143
2158
  blocks: {
2144
2159
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2284,6 +2299,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2284
2299
  linkTrackingIds: boolean;
2285
2300
  allowSaveWithErrors: boolean;
2286
2301
  reusableRecommendationStrategy: boolean;
2302
+ legacyUnsubscribeConversion: boolean;
2287
2303
  };
2288
2304
  blocks: {
2289
2305
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2429,6 +2445,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2429
2445
  linkTrackingIds: boolean;
2430
2446
  allowSaveWithErrors: boolean;
2431
2447
  reusableRecommendationStrategy: boolean;
2448
+ legacyUnsubscribeConversion: boolean;
2432
2449
  };
2433
2450
  blocks: {
2434
2451
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2586,6 +2603,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2586
2603
  linkTrackingIds: boolean;
2587
2604
  allowSaveWithErrors: boolean;
2588
2605
  reusableRecommendationStrategy: boolean;
2606
+ legacyUnsubscribeConversion: boolean;
2589
2607
  };
2590
2608
  blocks: {
2591
2609
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2731,6 +2749,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2731
2749
  linkTrackingIds: boolean;
2732
2750
  allowSaveWithErrors: boolean;
2733
2751
  reusableRecommendationStrategy: boolean;
2752
+ legacyUnsubscribeConversion: boolean;
2734
2753
  };
2735
2754
  blocks: {
2736
2755
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2878,6 +2897,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2878
2897
  linkTrackingIds: boolean;
2879
2898
  allowSaveWithErrors: boolean;
2880
2899
  reusableRecommendationStrategy: boolean;
2900
+ legacyUnsubscribeConversion: boolean;
2881
2901
  };
2882
2902
  blocks: {
2883
2903
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -8,6 +8,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
8
8
  hasChanges: boolean;
9
9
  changeSeq: number;
10
10
  isStripoInitialized: boolean;
11
+ isLegacyUnsubscribeModalRequested: boolean;
11
12
  templateId: string;
12
13
  syncModulesEnabled: boolean;
13
14
  trackIdSessionFloor: number;
@@ -22,6 +23,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
22
23
  hasChanges: boolean;
23
24
  changeSeq: number;
24
25
  isStripoInitialized: boolean;
26
+ isLegacyUnsubscribeModalRequested: boolean;
25
27
  templateId: string;
26
28
  syncModulesEnabled: boolean;
27
29
  trackIdSessionFloor: number;
@@ -35,6 +37,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
35
37
  hasChanges: boolean;
36
38
  changeSeq: number;
37
39
  isStripoInitialized: boolean;
40
+ isLegacyUnsubscribeModalRequested: boolean;
38
41
  templateId: string;
39
42
  syncModulesEnabled: boolean;
40
43
  trackIdSessionFloor: number;
@@ -49,6 +52,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
49
52
  hasChanges: boolean;
50
53
  changeSeq: number;
51
54
  isStripoInitialized: boolean;
55
+ isLegacyUnsubscribeModalRequested: boolean;
52
56
  templateId: string;
53
57
  syncModulesEnabled: boolean;
54
58
  trackIdSessionFloor: number;
@@ -62,6 +66,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
62
66
  hasChanges: boolean;
63
67
  changeSeq: number;
64
68
  isStripoInitialized: boolean;
69
+ isLegacyUnsubscribeModalRequested: boolean;
65
70
  templateId: string;
66
71
  syncModulesEnabled: boolean;
67
72
  trackIdSessionFloor: number;
@@ -76,6 +81,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
76
81
  hasChanges: boolean;
77
82
  changeSeq: number;
78
83
  isStripoInitialized: boolean;
84
+ isLegacyUnsubscribeModalRequested: boolean;
79
85
  templateId: string;
80
86
  syncModulesEnabled: boolean;
81
87
  trackIdSessionFloor: number;
@@ -89,6 +95,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
89
95
  hasChanges: boolean;
90
96
  changeSeq: number;
91
97
  isStripoInitialized: boolean;
98
+ isLegacyUnsubscribeModalRequested: boolean;
92
99
  templateId: string;
93
100
  syncModulesEnabled: boolean;
94
101
  trackIdSessionFloor: number;
@@ -103,6 +110,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
103
110
  hasChanges: boolean;
104
111
  changeSeq: number;
105
112
  isStripoInitialized: boolean;
113
+ isLegacyUnsubscribeModalRequested: boolean;
106
114
  templateId: string;
107
115
  syncModulesEnabled: boolean;
108
116
  trackIdSessionFloor: number;
@@ -116,6 +124,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
116
124
  hasChanges: boolean;
117
125
  changeSeq: number;
118
126
  isStripoInitialized: boolean;
127
+ isLegacyUnsubscribeModalRequested: boolean;
119
128
  templateId: string;
120
129
  syncModulesEnabled: boolean;
121
130
  trackIdSessionFloor: number;
@@ -130,6 +139,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
130
139
  hasChanges: boolean;
131
140
  changeSeq: number;
132
141
  isStripoInitialized: boolean;
142
+ isLegacyUnsubscribeModalRequested: boolean;
133
143
  templateId: string;
134
144
  syncModulesEnabled: boolean;
135
145
  trackIdSessionFloor: number;
@@ -143,6 +153,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
143
153
  hasChanges: boolean;
144
154
  changeSeq: number;
145
155
  isStripoInitialized: boolean;
156
+ isLegacyUnsubscribeModalRequested: boolean;
146
157
  templateId: string;
147
158
  syncModulesEnabled: boolean;
148
159
  trackIdSessionFloor: number;
@@ -157,6 +168,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
157
168
  hasChanges: boolean;
158
169
  changeSeq: number;
159
170
  isStripoInitialized: boolean;
171
+ isLegacyUnsubscribeModalRequested: boolean;
160
172
  templateId: string;
161
173
  syncModulesEnabled: boolean;
162
174
  trackIdSessionFloor: number;
@@ -170,6 +182,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
170
182
  hasChanges: boolean;
171
183
  changeSeq: number;
172
184
  isStripoInitialized: boolean;
185
+ isLegacyUnsubscribeModalRequested: boolean;
173
186
  templateId: string;
174
187
  syncModulesEnabled: boolean;
175
188
  trackIdSessionFloor: number;
@@ -184,6 +197,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
184
197
  hasChanges: boolean;
185
198
  changeSeq: number;
186
199
  isStripoInitialized: boolean;
200
+ isLegacyUnsubscribeModalRequested: boolean;
187
201
  templateId: string;
188
202
  syncModulesEnabled: boolean;
189
203
  trackIdSessionFloor: number;
@@ -197,6 +211,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
197
211
  hasChanges: boolean;
198
212
  changeSeq: number;
199
213
  isStripoInitialized: boolean;
214
+ isLegacyUnsubscribeModalRequested: boolean;
200
215
  templateId: string;
201
216
  syncModulesEnabled: boolean;
202
217
  trackIdSessionFloor: number;
@@ -211,6 +226,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
211
226
  hasChanges: boolean;
212
227
  changeSeq: number;
213
228
  isStripoInitialized: boolean;
229
+ isLegacyUnsubscribeModalRequested: boolean;
214
230
  templateId: string;
215
231
  syncModulesEnabled: boolean;
216
232
  trackIdSessionFloor: number;
@@ -224,6 +240,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
224
240
  hasChanges: boolean;
225
241
  changeSeq: number;
226
242
  isStripoInitialized: boolean;
243
+ isLegacyUnsubscribeModalRequested: boolean;
227
244
  templateId: string;
228
245
  syncModulesEnabled: boolean;
229
246
  trackIdSessionFloor: number;
@@ -238,6 +255,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
238
255
  hasChanges: boolean;
239
256
  changeSeq: number;
240
257
  isStripoInitialized: boolean;
258
+ isLegacyUnsubscribeModalRequested: boolean;
241
259
  templateId: string;
242
260
  syncModulesEnabled: boolean;
243
261
  trackIdSessionFloor: number;
@@ -251,6 +269,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
251
269
  hasChanges: boolean;
252
270
  changeSeq: number;
253
271
  isStripoInitialized: boolean;
272
+ isLegacyUnsubscribeModalRequested: boolean;
254
273
  templateId: string;
255
274
  syncModulesEnabled: boolean;
256
275
  trackIdSessionFloor: number;
@@ -265,6 +284,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
265
284
  hasChanges: boolean;
266
285
  changeSeq: number;
267
286
  isStripoInitialized: boolean;
287
+ isLegacyUnsubscribeModalRequested: boolean;
268
288
  templateId: string;
269
289
  syncModulesEnabled: boolean;
270
290
  trackIdSessionFloor: number;
@@ -278,6 +298,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
278
298
  hasChanges: boolean;
279
299
  changeSeq: number;
280
300
  isStripoInitialized: boolean;
301
+ isLegacyUnsubscribeModalRequested: boolean;
281
302
  templateId: string;
282
303
  syncModulesEnabled: boolean;
283
304
  trackIdSessionFloor: number;
@@ -292,6 +313,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
292
313
  hasChanges: boolean;
293
314
  changeSeq: number;
294
315
  isStripoInitialized: boolean;
316
+ isLegacyUnsubscribeModalRequested: boolean;
295
317
  templateId: string;
296
318
  syncModulesEnabled: boolean;
297
319
  trackIdSessionFloor: number;
@@ -305,6 +327,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
305
327
  hasChanges: boolean;
306
328
  changeSeq: number;
307
329
  isStripoInitialized: boolean;
330
+ isLegacyUnsubscribeModalRequested: boolean;
308
331
  templateId: string;
309
332
  syncModulesEnabled: boolean;
310
333
  trackIdSessionFloor: number;
@@ -319,6 +342,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
319
342
  hasChanges: boolean;
320
343
  changeSeq: number;
321
344
  isStripoInitialized: boolean;
345
+ isLegacyUnsubscribeModalRequested: boolean;
322
346
  templateId: string;
323
347
  syncModulesEnabled: boolean;
324
348
  trackIdSessionFloor: number;
@@ -332,6 +356,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
332
356
  hasChanges: boolean;
333
357
  changeSeq: number;
334
358
  isStripoInitialized: boolean;
359
+ isLegacyUnsubscribeModalRequested: boolean;
335
360
  templateId: string;
336
361
  syncModulesEnabled: boolean;
337
362
  trackIdSessionFloor: number;
@@ -0,0 +1,10 @@
1
+ export declare const LEGACY_UNSUBSCRIBE_SELECTOR = "td.unsubscribe-block";
2
+ export declare const LEGACY_UNSUBSCRIBE_LINK_SELECTORS: readonly ["a.unsubscribe-link", "a[href*=\"unsubscribe\"]"];
3
+ export interface LegacyUnsubscribeConversionResult {
4
+ html: string;
5
+ converted: boolean;
6
+ }
7
+ export declare const hasLegacyUnsubscribeClass: (html: string) => boolean;
8
+ export declare const convertLinklessLegacyUnsubscribeBlocks: (root: ParentNode) => number;
9
+ export declare const convertLegacyUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
10
+ export declare const convertLegacyUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
@@ -1,5 +1,5 @@
1
- import { defineStore as e } from "pinia";
2
- const o = e("guidoEditor", {
1
+ import { defineStore as i } from "pinia";
2
+ const o = i("guidoEditor", {
3
3
  state: () => ({
4
4
  loadingStatus: !0,
5
5
  isCodeEditorOpen: !1,
@@ -13,6 +13,7 @@ const o = e("guidoEditor", {
13
13
  // that need every change (the outbound state bridge) watch this instead.
14
14
  changeSeq: 0,
15
15
  isStripoInitialized: !1,
16
+ isLegacyUnsubscribeModalRequested: !1,
16
17
  templateId: "",
17
18
  syncModulesEnabled: !1,
18
19
  // In-session id high-water mark; floors tracking-id minting so ids
@@ -21,20 +22,20 @@ const o = e("guidoEditor", {
21
22
  }),
22
23
  getters: {
23
24
  // Middle Slot
24
- isEditorToolbarVisible: (i) => !i.isVersionHistoryOpen && !i.isPreviewModeOpen,
25
- isUndoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
26
- isRedoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
27
- isCodeEditorButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
28
- isPreviewButtonDisabled: (i) => i.loadingStatus,
29
- isViewOptionsDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
25
+ isEditorToolbarVisible: (e) => !e.isVersionHistoryOpen && !e.isPreviewModeOpen,
26
+ isUndoButtonDisabled: (e) => e.loadingStatus || e.isPreviewModeOpen,
27
+ isRedoButtonDisabled: (e) => e.loadingStatus || e.isPreviewModeOpen,
28
+ isCodeEditorButtonDisabled: (e) => e.loadingStatus || e.isPreviewModeOpen,
29
+ isPreviewButtonDisabled: (e) => e.loadingStatus,
30
+ isViewOptionsDisabled: (e) => e.loadingStatus || e.isPreviewModeOpen,
30
31
  // Right Slot
31
- isVersionHistoryButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
32
- isExportButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
33
- isSaveAsButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
34
- isTestButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
35
- isSaveButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen || i.isPreviewModeOpen,
32
+ isVersionHistoryButtonDisabled: (e) => e.loadingStatus || e.isPreviewModeOpen,
33
+ isExportButtonDisabled: (e) => e.loadingStatus || e.isVersionHistoryOpen,
34
+ isSaveAsButtonDisabled: (e) => e.loadingStatus || e.isVersionHistoryOpen,
35
+ isTestButtonDisabled: (e) => e.loadingStatus || e.isVersionHistoryOpen,
36
+ isSaveButtonDisabled: (e) => e.loadingStatus || e.isVersionHistoryOpen || e.isPreviewModeOpen,
36
37
  // Autosave
37
- isInSaveableState: (i) => !i.loadingStatus && !i.isVersionHistoryOpen && !i.isPreviewModeOpen && !i.isCodeEditorOpen
38
+ isInSaveableState: (e) => !e.loadingStatus && !e.isVersionHistoryOpen && !e.isPreviewModeOpen && !e.isCodeEditorOpen
38
39
  }
39
40
  });
40
41
  export {
@@ -0,0 +1,49 @@
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 = [
3
+ "unsubscribe-block",
4
+ "esd-extension",
5
+ "esd-extension-block",
6
+ "esd-unsubscribe-block",
7
+ "esd-block-unsubscribe"
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) => {
14
+ const t = e.trimStart(), r = new DOMParser();
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);
16
+ }, c = (e) => {
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;
18
+ return t < 0 || s <= t ? { head: "", root: e, tail: "" } : { head: e.slice(0, t), root: e.slice(t, s), tail: e.slice(s) };
19
+ }, i = (e, t, r, s) => {
20
+ if (!p(e))
21
+ return { html: e, converted: !1 };
22
+ try {
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 };
25
+ } catch (o) {
26
+ return console.error(`Failed to convert legacy unsubscribe blocks in ${s}:`, o), { html: e, converted: !1 };
27
+ }
28
+ }, C = (e) => i(
29
+ e,
30
+ v,
31
+ (t) => t.innerHTML,
32
+ "module"
33
+ ), _ = (e) => i(
34
+ e,
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
+ },
40
+ "document"
41
+ );
42
+ export {
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
49
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.21.2-beta.b6f3ef8",
3
+ "version": "3.21.2-beta.d9d48aa",
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",
@@ -22,10 +22,6 @@
22
22
  "types": "./dist/src/public/editorState.d.ts",
23
23
  "import": "./dist/public/editorState.js"
24
24
  },
25
- "./prefetch": {
26
- "types": "./dist/src/public/prefetchRuntime.d.ts",
27
- "import": "./dist/public/prefetchRuntime.js"
28
- },
29
25
  "./style": "./dist/guido.css"
30
26
  },
31
27
  "scripts": {
@@ -49,7 +45,6 @@
49
45
  "coverage:e2e:report": "nyc report --reporter=lcov --reporter=text-summary --report-dir=coverage/e2e",
50
46
  "test:mutation": "stryker run",
51
47
  "test:mutation:since": "CHANGED=$(git diff --name-only --diff-filter=AMR origin/develop...HEAD -- 'src/**/*.ts' ':(glob)src/components/organisms/onboarding/**/*.vue' ':(glob)src/components/organisms/header/**/*.vue' ':(glob)src/components/organisms/unsubscribe/**/*.vue' ':(glob)src/components/organisms/save-as-template/**/*.vue' ':(glob)src/components/organisms/email-preview/**/*.vue' ':(glob)src/components/wrappers/**/*.vue' 'src/components/Guido.vue' ':(exclude)src/**/*.test.ts' ':(exclude)src/**/index.ts' ':(exclude)src/@types/**' ':(exclude)src/enums/**' ':(exclude)src/mock/**' ':(exclude)src/**/_Boilerplate/**' | paste -sd, -); if [ -n \"$CHANGED\" ]; then stryker run --incremental --mutate \"$CHANGED\"; else echo \"No changed mutatable src files vs origin/develop\"; fi",
52
- "stripo:manifest": "node scripts/stripo-runtime-manifest.mjs",
53
48
  "prepare": "husky",
54
49
  "preinstall": "rm -rf ./node_modules/.vite"
55
50
  },
@@ -1,164 +0,0 @@
1
- import { SYNC_MODULE_CLASS as w } from "./useSyncModuleExtractor.js";
2
- import { readRuntimePrefetchState as M } from "../utils/runtimePrefetch.js";
3
- import f from "../package.json.js";
4
- const s = "guido:open:", k = "total", A = [
5
- "setup",
6
- "host_ready",
7
- "migration_start",
8
- "migration_end",
9
- "default_template_start",
10
- "default_template_end",
11
- "timer_clone_start",
12
- "timer_clone_end",
13
- "plugin_start",
14
- "script_ready",
15
- "fonts_sync_ready",
16
- "blocks_config_ready",
17
- "init_editor",
18
- "token_start",
19
- "token_end",
20
- "ready"
21
- ], p = [
22
- ["host_wait", "setup", "host_ready"],
23
- ["migration", "migration_start", "migration_end"],
24
- ["default_template", "default_template_start", "default_template_end"],
25
- ["timer_clone", "timer_clone_start", "timer_clone_end"],
26
- ["script", "plugin_start", "script_ready"],
27
- ["fonts_sync", "script_ready", "fonts_sync_ready"],
28
- ["blocks_config", "fonts_sync_ready", "blocks_config_ready"],
29
- ["editor_config", "blocks_config_ready", "init_editor"],
30
- ["stripo_load", "init_editor", "ready"],
31
- ["token", "token_start", "token_end"]
32
- ], b = (e) => new RegExp(`(?:^|[\\s"'])(?:${e})(?=[\\s"'])`, "g"), N = /<img\b/gi, $ = b(w), C = /\srecommendation-id=/g, O = b("items-block-v2|esd-(?:cart|browsed|purchased)-items-block"), I = "esd-timer-id", g = {
33
- html_bytes: null,
34
- css_bytes: null,
35
- image_count: null,
36
- synced_module_count: null,
37
- recommendation_block_count: null,
38
- items_block_count: null,
39
- has_timers: null,
40
- force_recreate: null
41
- };
42
- let d = null;
43
- const i = (e) => {
44
- try {
45
- e();
46
- } catch (t) {
47
- console.debug("guido:open: metrics step failed", t);
48
- }
49
- }, E = () => window.DD_RUM, y = (e, t) => e === void 0 || t === void 0 ? null : Math.round(t - e), _ = (e, t) => {
50
- var r;
51
- return ((r = e.match(t)) == null ? void 0 : r.length) ?? 0;
52
- }, h = (e) => new TextEncoder().encode(e).length, L = (e) => {
53
- if (!e)
54
- return g;
55
- try {
56
- const { html: t, css: r, forceRecreate: o } = e;
57
- return {
58
- html_bytes: h(t),
59
- css_bytes: h(r),
60
- image_count: _(t, N),
61
- synced_module_count: _(t, $),
62
- recommendation_block_count: _(t, C),
63
- items_block_count: _(t, O),
64
- has_timers: t.includes(I),
65
- force_recreate: o
66
- };
67
- } catch (t) {
68
- return console.debug("guido:open: template weight failed", t), g;
69
- }
70
- }, T = () => {
71
- i(() => {
72
- A.forEach((e) => performance.clearMarks(`${s}${e}`)), [...p.map(([e]) => e), k].forEach((e) => performance.clearMeasures(`${s}${e}`));
73
- });
74
- }, v = (e) => {
75
- const t = {
76
- marks: {},
77
- context: null,
78
- template: null,
79
- scriptPreloaded: null,
80
- runtimePrefetch: null,
81
- wasBackgrounded: document.visibilityState === "hidden",
82
- finished: e,
83
- onVisibilityChange: () => {
84
- document.visibilityState === "hidden" && (t.wasBackgrounded = !0);
85
- }
86
- };
87
- return t;
88
- }, l = (e, t) => {
89
- if (e.finished || e.marks[t] !== void 0)
90
- return;
91
- const r = performance.now();
92
- e.marks[t] = r, e === d && i(() => performance.mark(`${s}${t}`, { startTime: r }));
93
- }, u = (e) => {
94
- e.finished = !0, document.removeEventListener("visibilitychange", e.onVisibilityChange);
95
- }, B = (e, t) => {
96
- const { marks: r } = e, o = p.map(([n, a, c]) => [n, r[a], r[c]]);
97
- o.push([k, r.setup, t]), o.forEach(([n, a, c]) => {
98
- a !== void 0 && c !== void 0 && i(() => performance.measure(`${s}${n}`, { start: a, end: c }));
99
- });
100
- }, D = (e, t, r) => {
101
- const { marks: o, context: n } = e, a = Object.fromEntries(
102
- p.map(([c, R, S]) => [`${c}_ms`, y(o[R], o[S])])
103
- );
104
- return {
105
- outcome: t,
106
- open_ms: y(o.setup, r),
107
- ...a,
108
- script_preloaded: e.scriptPreloaded,
109
- runtime_prefetch: e.runtimePrefetch,
110
- ...L(e.template),
111
- partner_name: (n == null ? void 0 : n.partnerName) ?? null,
112
- product_type: (n == null ? void 0 : n.productType) ?? null,
113
- template_id: (n == null ? void 0 : n.templateId) ?? null,
114
- variation_id: (n == null ? void 0 : n.variationId) ?? null,
115
- guido_version: f.version,
116
- stripo_version: f.guido.stripo.version,
117
- was_backgrounded: e.wasBackgrounded
118
- };
119
- }, m = (e, t) => {
120
- i(() => {
121
- const r = e.marks.ready ?? performance.now(), o = D(e, t, r);
122
- e.template = null, e === d && B(e, r), console.debug("guido:open", o), i(() => {
123
- var n, a;
124
- return (a = (n = E()) == null ? void 0 : n.addAction) == null ? void 0 : a.call(n, "guido_editor_open", o);
125
- });
126
- });
127
- }, P = (e) => ({
128
- mark: (t) => l(e, t),
129
- timed: async (t, r) => {
130
- l(e, `${t}_start`);
131
- const o = await r();
132
- return l(e, `${t}_end`), o;
133
- },
134
- setContext: (t) => {
135
- e.context = t;
136
- },
137
- setTemplate: (t) => {
138
- e.template = t;
139
- },
140
- setScriptPreloaded: (t) => {
141
- e.scriptPreloaded = t;
142
- },
143
- markReady: () => {
144
- e.finished || (l(e, "ready"), u(e), i(() => {
145
- var t, r;
146
- return (r = (t = E()) == null ? void 0 : t.addTiming) == null ? void 0 : r.call(t, "guido_editor_ready");
147
- }), setTimeout(() => m(e, "ready"), 0));
148
- },
149
- markFailed: () => {
150
- e.finished || (u(e), m(e, "error"));
151
- },
152
- dispose: () => {
153
- e.finished || (u(e), m(e, "abandoned")), e === d && (T(), d = null);
154
- }
155
- }), F = () => {
156
- const e = v(!1);
157
- return T(), d = e, i(() => {
158
- e.runtimePrefetch = M();
159
- }), document.addEventListener("visibilitychange", e.onVisibilityChange), l(e, "setup"), P(e);
160
- }, G = () => P(d ?? v(!0));
161
- export {
162
- F as startEditorOpenMetrics,
163
- G as useEditorOpenMetrics
164
- };
@@ -1,4 +0,0 @@
1
- import { prefetchGuidoRuntime as r } from "../utils/runtimePrefetch.js";
2
- export {
3
- r as prefetchGuidoRuntime
4
- };