@useinsider/guido 3.11.0 → 3.12.0-beta.1b68f97

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 (66) hide show
  1. package/README.md +33 -0
  2. package/dist/@types/config/schemas.js +131 -98
  3. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  5. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  6. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  7. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  8. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  9. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  10. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -10
  12. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  13. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
  14. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +20 -23
  15. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  16. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +8 -7
  17. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  18. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
  19. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  20. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
  21. package/dist/composables/useModuleDynamicContentRepair.js +37 -0
  22. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  23. package/dist/composables/useRecommendationPreview.js +61 -60
  24. package/dist/composables/useSave.js +43 -24
  25. package/dist/composables/useStripo.js +70 -67
  26. package/dist/composables/validators/useAllowlistValidator.js +31 -0
  27. package/dist/config/migrator/index.js +7 -6
  28. package/dist/config/migrator/socialIconMigrator.js +29 -0
  29. package/dist/enums/academy.js +1 -1
  30. package/dist/enums/date.js +3 -4
  31. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
  32. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  33. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  34. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  35. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  36. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  37. package/dist/extensions/Blocks/controlFactories.js +125 -75
  38. package/dist/guido.css +1 -1
  39. package/dist/node_modules/valibot/dist/index.js +148 -112
  40. package/dist/src/@types/config/schemas.d.ts +59 -0
  41. package/dist/src/@types/generic.d.ts +18 -0
  42. package/dist/src/composables/useConfig.d.ts +10 -0
  43. package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
  44. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  45. package/dist/src/composables/validators/useAllowlistValidator.d.ts +9 -0
  46. package/dist/src/config/migrator/socialIconMigrator.d.ts +1 -0
  47. package/dist/src/enums/academy.d.ts +3 -3
  48. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  49. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  50. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  51. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  52. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  53. package/dist/src/library.d.ts +1 -1
  54. package/dist/src/stores/config.d.ts +90 -0
  55. package/dist/src/utils/dynamicContentConverter.d.ts +27 -0
  56. package/dist/src/utils/environmentUtil.d.ts +5 -2
  57. package/dist/src/utils/genericUtil.d.ts +18 -1
  58. package/dist/src/utils/urlSchemes.d.ts +6 -0
  59. package/dist/utils/dateUtil.js +10 -23
  60. package/dist/utils/dynamicContentConverter.js +31 -0
  61. package/dist/utils/environmentUtil.js +3 -2
  62. package/dist/utils/genericUtil.js +42 -21
  63. package/dist/utils/urlSchemes.js +4 -0
  64. package/package.json +10 -1
  65. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  66. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
@@ -39,6 +39,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
39
39
  value: string;
40
40
  } | undefined;
41
41
  }[];
42
+ dynamicContentList: {
43
+ [x: string]: import("../library").DynamicContentNode[];
44
+ };
42
45
  customFieldAttributes: string[];
43
46
  selectedUnsubscribePages: number[];
44
47
  forceRecreate: boolean;
@@ -98,6 +101,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
98
101
  modulesDisabled: boolean;
99
102
  liquidSyntax: boolean;
100
103
  autosave: boolean;
104
+ allowlistEnabled: boolean;
101
105
  };
102
106
  blocks: {
103
107
  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")[];
@@ -137,6 +141,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
137
141
  };
138
142
  callbacks: {
139
143
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
144
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
140
145
  };
141
146
  } | null;
142
147
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
@@ -173,6 +178,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
173
178
  value: string;
174
179
  } | undefined;
175
180
  }[];
181
+ dynamicContentList: {
182
+ [x: string]: import("../library").DynamicContentNode[];
183
+ };
176
184
  customFieldAttributes: string[];
177
185
  selectedUnsubscribePages: number[];
178
186
  forceRecreate: boolean;
@@ -232,6 +240,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
232
240
  modulesDisabled: boolean;
233
241
  liquidSyntax: boolean;
234
242
  autosave: boolean;
243
+ allowlistEnabled: boolean;
235
244
  };
236
245
  blocks: {
237
246
  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")[];
@@ -271,6 +280,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
271
280
  };
272
281
  callbacks: {
273
282
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
283
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
274
284
  };
275
285
  } | null;
276
286
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
@@ -307,6 +317,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
307
317
  value: string;
308
318
  } | undefined;
309
319
  }[];
320
+ dynamicContentList: {
321
+ [x: string]: import("../library").DynamicContentNode[];
322
+ };
310
323
  customFieldAttributes: string[];
311
324
  selectedUnsubscribePages: number[];
312
325
  forceRecreate: boolean;
@@ -366,6 +379,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
366
379
  modulesDisabled: boolean;
367
380
  liquidSyntax: boolean;
368
381
  autosave: boolean;
382
+ allowlistEnabled: boolean;
369
383
  };
370
384
  blocks: {
371
385
  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")[];
@@ -405,6 +419,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
405
419
  };
406
420
  callbacks: {
407
421
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
422
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
408
423
  };
409
424
  } | null;
410
425
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
@@ -441,6 +456,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
441
456
  value: string;
442
457
  } | undefined;
443
458
  }[];
459
+ dynamicContentList: {
460
+ [x: string]: import("../library").DynamicContentNode[];
461
+ };
444
462
  customFieldAttributes: string[];
445
463
  selectedUnsubscribePages: number[];
446
464
  forceRecreate: boolean;
@@ -500,6 +518,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
500
518
  modulesDisabled: boolean;
501
519
  liquidSyntax: boolean;
502
520
  autosave: boolean;
521
+ allowlistEnabled: boolean;
503
522
  };
504
523
  blocks: {
505
524
  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")[];
@@ -539,6 +558,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
539
558
  };
540
559
  callbacks: {
541
560
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
561
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
542
562
  };
543
563
  } | null;
544
564
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
@@ -575,6 +595,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
575
595
  value: string;
576
596
  } | undefined;
577
597
  }[];
598
+ dynamicContentList: {
599
+ [x: string]: import("../library").DynamicContentNode[];
600
+ };
578
601
  customFieldAttributes: string[];
579
602
  selectedUnsubscribePages: number[];
580
603
  forceRecreate: boolean;
@@ -634,6 +657,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
634
657
  modulesDisabled: boolean;
635
658
  liquidSyntax: boolean;
636
659
  autosave: boolean;
660
+ allowlistEnabled: boolean;
637
661
  };
638
662
  blocks: {
639
663
  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")[];
@@ -673,6 +697,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
673
697
  };
674
698
  callbacks: {
675
699
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
700
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
676
701
  };
677
702
  } | null;
678
703
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
@@ -709,6 +734,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
709
734
  value: string;
710
735
  } | undefined;
711
736
  }[];
737
+ dynamicContentList: {
738
+ [x: string]: import("../library").DynamicContentNode[];
739
+ };
712
740
  customFieldAttributes: string[];
713
741
  selectedUnsubscribePages: number[];
714
742
  forceRecreate: boolean;
@@ -768,6 +796,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
768
796
  modulesDisabled: boolean;
769
797
  liquidSyntax: boolean;
770
798
  autosave: boolean;
799
+ allowlistEnabled: boolean;
771
800
  };
772
801
  blocks: {
773
802
  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")[];
@@ -807,6 +836,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
807
836
  };
808
837
  callbacks: {
809
838
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
839
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
810
840
  };
811
841
  } | null;
812
842
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
@@ -843,6 +873,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
843
873
  value: string;
844
874
  } | undefined;
845
875
  }[];
876
+ dynamicContentList: {
877
+ [x: string]: import("../library").DynamicContentNode[];
878
+ };
846
879
  customFieldAttributes: string[];
847
880
  selectedUnsubscribePages: number[];
848
881
  forceRecreate: boolean;
@@ -902,6 +935,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
902
935
  modulesDisabled: boolean;
903
936
  liquidSyntax: boolean;
904
937
  autosave: boolean;
938
+ allowlistEnabled: boolean;
905
939
  };
906
940
  blocks: {
907
941
  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")[];
@@ -941,6 +975,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
941
975
  };
942
976
  callbacks: {
943
977
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
978
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
944
979
  };
945
980
  } | null;
946
981
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
@@ -977,6 +1012,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
977
1012
  value: string;
978
1013
  } | undefined;
979
1014
  }[];
1015
+ dynamicContentList: {
1016
+ [x: string]: import("../library").DynamicContentNode[];
1017
+ };
980
1018
  customFieldAttributes: string[];
981
1019
  selectedUnsubscribePages: number[];
982
1020
  forceRecreate: boolean;
@@ -1036,6 +1074,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1036
1074
  modulesDisabled: boolean;
1037
1075
  liquidSyntax: boolean;
1038
1076
  autosave: boolean;
1077
+ allowlistEnabled: boolean;
1039
1078
  };
1040
1079
  blocks: {
1041
1080
  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")[];
@@ -1075,6 +1114,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1075
1114
  };
1076
1115
  callbacks: {
1077
1116
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1117
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1078
1118
  };
1079
1119
  } | null;
1080
1120
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
@@ -1111,6 +1151,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1111
1151
  value: string;
1112
1152
  } | undefined;
1113
1153
  }[];
1154
+ dynamicContentList: {
1155
+ [x: string]: import("../library").DynamicContentNode[];
1156
+ };
1114
1157
  customFieldAttributes: string[];
1115
1158
  selectedUnsubscribePages: number[];
1116
1159
  forceRecreate: boolean;
@@ -1170,6 +1213,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1170
1213
  modulesDisabled: boolean;
1171
1214
  liquidSyntax: boolean;
1172
1215
  autosave: boolean;
1216
+ allowlistEnabled: boolean;
1173
1217
  };
1174
1218
  blocks: {
1175
1219
  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")[];
@@ -1209,6 +1253,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1209
1253
  };
1210
1254
  callbacks: {
1211
1255
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1256
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1212
1257
  };
1213
1258
  } | null;
1214
1259
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
@@ -1245,6 +1290,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1245
1290
  value: string;
1246
1291
  } | undefined;
1247
1292
  }[];
1293
+ dynamicContentList: {
1294
+ [x: string]: import("../library").DynamicContentNode[];
1295
+ };
1248
1296
  customFieldAttributes: string[];
1249
1297
  selectedUnsubscribePages: number[];
1250
1298
  forceRecreate: boolean;
@@ -1304,6 +1352,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1304
1352
  modulesDisabled: boolean;
1305
1353
  liquidSyntax: boolean;
1306
1354
  autosave: boolean;
1355
+ allowlistEnabled: boolean;
1307
1356
  };
1308
1357
  blocks: {
1309
1358
  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")[];
@@ -1343,6 +1392,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1343
1392
  };
1344
1393
  callbacks: {
1345
1394
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1395
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1346
1396
  };
1347
1397
  } | null;
1348
1398
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1379,6 +1429,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1379
1429
  value: string;
1380
1430
  } | undefined;
1381
1431
  }[];
1432
+ dynamicContentList: {
1433
+ [x: string]: import("../library").DynamicContentNode[];
1434
+ };
1382
1435
  customFieldAttributes: string[];
1383
1436
  selectedUnsubscribePages: number[];
1384
1437
  forceRecreate: boolean;
@@ -1438,6 +1491,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1438
1491
  modulesDisabled: boolean;
1439
1492
  liquidSyntax: boolean;
1440
1493
  autosave: boolean;
1494
+ allowlistEnabled: boolean;
1441
1495
  };
1442
1496
  blocks: {
1443
1497
  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")[];
@@ -1477,6 +1531,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1477
1531
  };
1478
1532
  callbacks: {
1479
1533
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1534
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1480
1535
  };
1481
1536
  } | null;
1482
1537
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1513,6 +1568,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1513
1568
  value: string;
1514
1569
  } | undefined;
1515
1570
  }[];
1571
+ dynamicContentList: {
1572
+ [x: string]: import("../library").DynamicContentNode[];
1573
+ };
1516
1574
  customFieldAttributes: string[];
1517
1575
  selectedUnsubscribePages: number[];
1518
1576
  forceRecreate: boolean;
@@ -1572,6 +1630,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1572
1630
  modulesDisabled: boolean;
1573
1631
  liquidSyntax: boolean;
1574
1632
  autosave: boolean;
1633
+ allowlistEnabled: boolean;
1575
1634
  };
1576
1635
  blocks: {
1577
1636
  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")[];
@@ -1611,6 +1670,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1611
1670
  };
1612
1671
  callbacks: {
1613
1672
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1673
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1614
1674
  };
1615
1675
  } | null;
1616
1676
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1647,6 +1707,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1647
1707
  value: string;
1648
1708
  } | undefined;
1649
1709
  }[];
1710
+ dynamicContentList: {
1711
+ [x: string]: import("../library").DynamicContentNode[];
1712
+ };
1650
1713
  customFieldAttributes: string[];
1651
1714
  selectedUnsubscribePages: number[];
1652
1715
  forceRecreate: boolean;
@@ -1706,6 +1769,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1706
1769
  modulesDisabled: boolean;
1707
1770
  liquidSyntax: boolean;
1708
1771
  autosave: boolean;
1772
+ allowlistEnabled: boolean;
1709
1773
  };
1710
1774
  blocks: {
1711
1775
  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")[];
@@ -1745,6 +1809,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1745
1809
  };
1746
1810
  callbacks: {
1747
1811
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1812
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1748
1813
  };
1749
1814
  } | null;
1750
1815
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -1781,6 +1846,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1781
1846
  value: string;
1782
1847
  } | undefined;
1783
1848
  }[];
1849
+ dynamicContentList: {
1850
+ [x: string]: import("../library").DynamicContentNode[];
1851
+ };
1784
1852
  customFieldAttributes: string[];
1785
1853
  selectedUnsubscribePages: number[];
1786
1854
  forceRecreate: boolean;
@@ -1840,6 +1908,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1840
1908
  modulesDisabled: boolean;
1841
1909
  liquidSyntax: boolean;
1842
1910
  autosave: boolean;
1911
+ allowlistEnabled: boolean;
1843
1912
  };
1844
1913
  blocks: {
1845
1914
  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")[];
@@ -1879,6 +1948,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1879
1948
  };
1880
1949
  callbacks: {
1881
1950
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1951
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
1882
1952
  };
1883
1953
  } | null;
1884
1954
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
@@ -1915,6 +1985,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1915
1985
  value: string;
1916
1986
  } | undefined;
1917
1987
  }[];
1988
+ dynamicContentList: {
1989
+ [x: string]: import("../library").DynamicContentNode[];
1990
+ };
1918
1991
  customFieldAttributes: string[];
1919
1992
  selectedUnsubscribePages: number[];
1920
1993
  forceRecreate: boolean;
@@ -1974,6 +2047,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1974
2047
  modulesDisabled: boolean;
1975
2048
  liquidSyntax: boolean;
1976
2049
  autosave: boolean;
2050
+ allowlistEnabled: boolean;
1977
2051
  };
1978
2052
  blocks: {
1979
2053
  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")[];
@@ -2013,6 +2087,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2013
2087
  };
2014
2088
  callbacks: {
2015
2089
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2090
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2016
2091
  };
2017
2092
  } | null;
2018
2093
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
@@ -2049,6 +2124,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2049
2124
  value: string;
2050
2125
  } | undefined;
2051
2126
  }[];
2127
+ dynamicContentList: {
2128
+ [x: string]: import("../library").DynamicContentNode[];
2129
+ };
2052
2130
  customFieldAttributes: string[];
2053
2131
  selectedUnsubscribePages: number[];
2054
2132
  forceRecreate: boolean;
@@ -2108,6 +2186,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2108
2186
  modulesDisabled: boolean;
2109
2187
  liquidSyntax: boolean;
2110
2188
  autosave: boolean;
2189
+ allowlistEnabled: boolean;
2111
2190
  };
2112
2191
  blocks: {
2113
2192
  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")[];
@@ -2147,6 +2226,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2147
2226
  };
2148
2227
  callbacks: {
2149
2228
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2229
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2150
2230
  };
2151
2231
  } | null;
2152
2232
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
@@ -2183,6 +2263,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2183
2263
  value: string;
2184
2264
  } | undefined;
2185
2265
  }[];
2266
+ dynamicContentList: {
2267
+ [x: string]: import("../library").DynamicContentNode[];
2268
+ };
2186
2269
  customFieldAttributes: string[];
2187
2270
  selectedUnsubscribePages: number[];
2188
2271
  forceRecreate: boolean;
@@ -2242,6 +2325,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2242
2325
  modulesDisabled: boolean;
2243
2326
  liquidSyntax: boolean;
2244
2327
  autosave: boolean;
2328
+ allowlistEnabled: boolean;
2245
2329
  };
2246
2330
  blocks: {
2247
2331
  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")[];
@@ -2281,6 +2365,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2281
2365
  };
2282
2366
  callbacks: {
2283
2367
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2368
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2284
2369
  };
2285
2370
  } | null;
2286
2371
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
@@ -2317,6 +2402,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2317
2402
  value: string;
2318
2403
  } | undefined;
2319
2404
  }[];
2405
+ dynamicContentList: {
2406
+ [x: string]: import("../library").DynamicContentNode[];
2407
+ };
2320
2408
  customFieldAttributes: string[];
2321
2409
  selectedUnsubscribePages: number[];
2322
2410
  forceRecreate: boolean;
@@ -2376,6 +2464,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2376
2464
  modulesDisabled: boolean;
2377
2465
  liquidSyntax: boolean;
2378
2466
  autosave: boolean;
2467
+ allowlistEnabled: boolean;
2379
2468
  };
2380
2469
  blocks: {
2381
2470
  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")[];
@@ -2415,6 +2504,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2415
2504
  };
2416
2505
  callbacks: {
2417
2506
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2507
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
2418
2508
  };
2419
2509
  } | null;
2420
2510
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
@@ -0,0 +1,27 @@
1
+ import type { DynamicContent } from '@@/Types/generic';
2
+ export interface DynamicContentConversionResult {
3
+ html: string;
4
+ /** Distinct tokens that matched neither a known value nor a known label (reported to the user). */
5
+ unresolved: string[];
6
+ }
7
+ /**
8
+ * Builds a label→item lookup from one or more dynamic-content lists, keyed by
9
+ * normalized label (trimmed, lowercased). When lists overlap, a later list wins
10
+ * for a shared key.
11
+ */
12
+ export declare const buildDynamicContentLookup: (...lists: DynamicContent[][]) => Map<string, DynamicContent>;
13
+ /**
14
+ * Repairs dynamic-content tokens in a dropped module's HTML, using `lookup`
15
+ * (label→item) built from the account's full dynamic-content list. Returns the
16
+ * rewritten HTML plus the tokens it could not resolve.
17
+ *
18
+ * A token is rewritten to its canonical `{{value}}` form when its name matches a
19
+ * display label (`{{ Phone Number }}` → `{{phone_number}}`). Left untouched: an
20
+ * exact canonical value (already correct — this also stops a valid token being
21
+ * rewritten just because it coincides with an unrelated label), Liquid nested
22
+ * tokens (dotted, e.g. `coupon.code`), recommendation-block variables
23
+ * (`123_0_attr`), allowed system tokens, and `data-*` product tags. The account
24
+ * list is exhaustive, so any remaining token matching neither a value nor a label
25
+ * is reported in `unresolved`; the text itself is always left in place.
26
+ */
27
+ export declare const convertModuleDynamicContent: (html: string, lookup: Map<string, DynamicContent>, liquidSyntax: boolean) => DynamicContentConversionResult;
@@ -1,5 +1,8 @@
1
+ /** Production default — pony-express builds unsubscribe links on mail.useinsider.com. */
2
+ export declare const DEFAULT_ENVIRONMENT_PREFIX = "useinsider";
1
3
  /**
2
- * Gets the appropriate environment prefix by parsing from current hostname
3
- * Extracts environment prefix from domains by splitting hostname
4
+ * Gets the environment prefix by parsing the current hostname (third segment),
5
+ * falling back to the production default when that segment is absent or empty —
6
+ * so unsubscribe links never compile to `https://mail.undefined.com/...` (SD-145225).
4
7
  */
5
8
  export declare const getEnvironmentPrefix: () => string;
@@ -1,6 +1,23 @@
1
- import type { DynamicContent, MergeTag } from '@@/Types/generic';
1
+ import type { DynamicContent, DynamicContentList, MergeTag } from '@@/Types/generic';
2
2
  export declare const mergeTagToDynamicContent: (mergeTag: MergeTag) => DynamicContent;
3
3
  export declare const dynamicContentToMergeTags: (dynamicContentList: DynamicContent[], liquidSyntax?: boolean) => MergeTag[];
4
+ /**
5
+ * Flattens the partner-keyed dynamic-content tree into a deduped flat list of the
6
+ * ACTIVE partner's leaf attributes. A single editor session targets one partner,
7
+ * so only the FIRST partner entry is used (the sole entry for a single-partner
8
+ * host like email-fe; merging all partners would risk cross-partner label
9
+ * collisions). A node carrying `children`/`select_items` is a category grouping:
10
+ * recursed into but never collected itself — only real leaf attributes
11
+ * (`text`/`tag_text` + `value`) become `{ text, value }` pairs.
12
+ */
13
+ export declare const flattenDynamicContentList: (list: DynamicContentList | undefined | null) => DynamicContent[];
14
+ /**
15
+ * Builds the editor merge-tag entries from the template's preselected list plus
16
+ * the account's full available list, deduped by token value (preselected wins so
17
+ * its fallback/format is kept). Registering the full list lets every recognized
18
+ * token — including ones repaired on module drop — render as a chip.
19
+ */
20
+ export declare const buildMergeTagEntries: (preselected: DynamicContent[], available: DynamicContent[], liquidSyntax?: boolean) => MergeTag[];
4
21
  export declare const getCsrfToken: () => string;
5
22
  /**
6
23
  * URL Parameter utilities
@@ -0,0 +1,6 @@
1
+ /**
2
+ * URL schemes that are safe to follow from partner-authored email HTML. Shared so a
3
+ * future bypass fix lands in one place — the preview guard and the recommendation
4
+ * sanitizer both gate on it. Stored with the trailing colon to match `anchor.protocol`.
5
+ */
6
+ export declare const BASE_SAFE_URL_SCHEMES: readonly string[];
@@ -1,19 +1,10 @@
1
- import { DEFAULT_LOCALE as r, DEFAULT as a, DEFAULT_TZ as c } from "../enums/date.js";
2
- const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length === 10 ? new Date(Number(t) * 1e3) : new Date(t) : typeof t == "number" ? t.toString().length === 10 ? new Date(t * 1e3) : new Date(t) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), s = () => {
1
+ import { DEFAULT_LOCALE as r, DEFAULT as o } from "../enums/date.js";
2
+ const c = () => {
3
3
  const t = window.l10n;
4
- return (t == null ? void 0 : t.locale) === a ? r : (t == null ? void 0 : t.locale) || r;
5
- }, u = new Intl.DateTimeFormat().resolvedOptions().timeZone, f = () => {
6
- const t = window.l10n;
7
- return (t == null ? void 0 : t.timezone) || u || c;
8
- }, D = (t, e = s(), n = f()) => {
9
- const o = {
10
- year: "numeric",
11
- month: "2-digit",
12
- day: "2-digit",
13
- timeZone: n
14
- }, i = m(t);
15
- return new Intl.DateTimeFormat(e, o).format(i);
16
- }, T = (t) => {
4
+ return (t == null ? void 0 : t.locale) === o ? r : (t == null ? void 0 : t.locale) || r;
5
+ };
6
+ new Intl.DateTimeFormat().resolvedOptions().timeZone;
7
+ const i = (t) => {
17
8
  if (!t)
18
9
  return "";
19
10
  const e = new Date(t);
@@ -25,13 +16,9 @@ const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length ===
25
16
  second: "2-digit",
26
17
  hour12: !1
27
18
  }).format(e);
28
- }, h = (t) => t ? Math.floor(Date.now() / 1e3) >= t : !1;
19
+ }, m = (t) => t ? Math.floor(Date.now() / 1e3) >= t : !1;
29
20
  export {
30
- m as convertToDateObject,
31
- T as formatPatchDate,
32
- D as formatShortDate,
33
- h as isAfterDate,
34
- u as localTz,
35
- s as locale,
36
- f as timezone
21
+ i as formatPatchDate,
22
+ m as isAfterDate,
23
+ c as locale
37
24
  };
@@ -0,0 +1,31 @@
1
+ import { DATA_ATTRIBUTE_REGEX as A, DYNAMIC_CONTENT_TAG_REGEX as m, ALLOWED_DYNAMIC_SYSTEM_TOKENS as D } from "../enums/html-validator.js";
2
+ import { dynamicContentToMergeTags as T } from "./genericUtil.js";
3
+ const p = "guidoDataMask", M = "EndDataMask", f = /guidoDataMask(\d+)EndDataMask/g, h = /^\d+_\d+_.+$/, E = (o) => o.trim().toLowerCase(), I = (...o) => {
4
+ const r = /* @__PURE__ */ new Map();
5
+ return o.forEach((i) => {
6
+ i.forEach((s) => {
7
+ const a = E(s.text);
8
+ a && r.set(a, s);
9
+ });
10
+ }), r;
11
+ }, w = (o, r, i) => {
12
+ const s = /* @__PURE__ */ new Set(), a = new Set([...r.values()].map((e) => e.value)), u = [];
13
+ return { html: o.replace(A, (e) => (u.push(e), `${p}${u.length - 1}${M}`)).replace(m, (e) => {
14
+ const n = e.slice(2, -2), c = n.indexOf("|"), l = c === -1 ? n : n.slice(0, c), t = l.trim();
15
+ if (t === "" || D.includes(t) || t.includes(".") || h.test(t) || a.has(t))
16
+ return e;
17
+ const d = r.get(E(t));
18
+ if (d) {
19
+ if (c !== -1) {
20
+ const _ = n.slice(c);
21
+ return `{{${l.replace(t, () => d.value)}${_}}}`;
22
+ }
23
+ return T([d], i)[0].value;
24
+ }
25
+ return s.add(t), e;
26
+ }).replace(f, (e, n) => u[Number(n)]), unresolved: [...s] };
27
+ };
28
+ export {
29
+ I as buildDynamicContentLookup,
30
+ w as convertModuleDynamicContent
31
+ };
@@ -1,4 +1,5 @@
1
- const n = () => window.location.hostname.split(".")[2];
1
+ const n = "useinsider", o = () => window.location.hostname.split(".")[2] || n;
2
2
  export {
3
- n as getEnvironmentPrefix
3
+ n as DEFAULT_ENVIRONMENT_PREFIX,
4
+ o as getEnvironmentPrefix
4
5
  };