@useinsider/guido 2.0.0-beta.81f9c55 → 2.0.0-beta.86a694f

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.
@@ -1,4 +1,4 @@
1
- import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
1
+ import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, CallbacksConfig } from '@@/Types/config';
2
2
  interface ConfigStoreState {
3
3
  /** Whether the config has been initialized */
4
4
  initialized: boolean;
@@ -57,7 +57,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
57
57
  testMessage: boolean;
58
58
  displayConditions: boolean;
59
59
  unsubscribe: boolean;
60
- modulesDisabled: boolean;
61
60
  };
62
61
  blocks: {
63
62
  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")[];
@@ -95,6 +94,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
95
94
  })[];
96
95
  ignoreDefaultRules: boolean;
97
96
  };
97
+ callbacks: {
98
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
99
+ };
98
100
  } | null;
99
101
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
100
102
  /**
@@ -148,7 +150,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
148
150
  testMessage: boolean;
149
151
  displayConditions: boolean;
150
152
  unsubscribe: boolean;
151
- modulesDisabled: boolean;
152
153
  };
153
154
  blocks: {
154
155
  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")[];
@@ -186,6 +187,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
186
187
  })[];
187
188
  ignoreDefaultRules: boolean;
188
189
  };
190
+ callbacks: {
191
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
192
+ };
189
193
  } | null;
190
194
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
191
195
  /**
@@ -239,7 +243,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
239
243
  testMessage: boolean;
240
244
  displayConditions: boolean;
241
245
  unsubscribe: boolean;
242
- modulesDisabled: boolean;
243
246
  };
244
247
  blocks: {
245
248
  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")[];
@@ -277,6 +280,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
277
280
  })[];
278
281
  ignoreDefaultRules: boolean;
279
282
  };
283
+ callbacks: {
284
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
285
+ };
280
286
  } | null;
281
287
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
282
288
  /**
@@ -330,7 +336,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
330
336
  testMessage: boolean;
331
337
  displayConditions: boolean;
332
338
  unsubscribe: boolean;
333
- modulesDisabled: boolean;
334
339
  };
335
340
  blocks: {
336
341
  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")[];
@@ -368,6 +373,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
368
373
  })[];
369
374
  ignoreDefaultRules: boolean;
370
375
  };
376
+ callbacks: {
377
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
378
+ };
371
379
  } | null;
372
380
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
373
381
  /**
@@ -421,7 +429,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
421
429
  testMessage: boolean;
422
430
  displayConditions: boolean;
423
431
  unsubscribe: boolean;
424
- modulesDisabled: boolean;
425
432
  };
426
433
  blocks: {
427
434
  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")[];
@@ -459,6 +466,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
459
466
  })[];
460
467
  ignoreDefaultRules: boolean;
461
468
  };
469
+ callbacks: {
470
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
471
+ };
462
472
  } | null;
463
473
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
464
474
  /**
@@ -512,7 +522,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
512
522
  testMessage: boolean;
513
523
  displayConditions: boolean;
514
524
  unsubscribe: boolean;
515
- modulesDisabled: boolean;
516
525
  };
517
526
  blocks: {
518
527
  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")[];
@@ -550,6 +559,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
550
559
  })[];
551
560
  ignoreDefaultRules: boolean;
552
561
  };
562
+ callbacks: {
563
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
564
+ };
553
565
  } | null;
554
566
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
555
567
  /**
@@ -603,7 +615,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
603
615
  testMessage: boolean;
604
616
  displayConditions: boolean;
605
617
  unsubscribe: boolean;
606
- modulesDisabled: boolean;
607
618
  };
608
619
  blocks: {
609
620
  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")[];
@@ -641,6 +652,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
641
652
  })[];
642
653
  ignoreDefaultRules: boolean;
643
654
  };
655
+ callbacks: {
656
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
657
+ };
644
658
  } | null;
645
659
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
646
660
  /**
@@ -694,7 +708,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
694
708
  testMessage: boolean;
695
709
  displayConditions: boolean;
696
710
  unsubscribe: boolean;
697
- modulesDisabled: boolean;
698
711
  };
699
712
  blocks: {
700
713
  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")[];
@@ -732,8 +745,104 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
732
745
  })[];
733
746
  ignoreDefaultRules: boolean;
734
747
  };
748
+ callbacks: {
749
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
750
+ };
735
751
  } | null;
736
752
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
753
+ /**
754
+ * Get the callbacks configuration
755
+ */
756
+ callbacks: (state: {
757
+ initialized: boolean;
758
+ config: {
759
+ identity: {
760
+ templateId: string;
761
+ userId: string;
762
+ variationId?: string | undefined;
763
+ };
764
+ partner: {
765
+ name: string;
766
+ productType: 60 | 49 | 97;
767
+ messageType: 1 | 2;
768
+ username: string;
769
+ };
770
+ template: {
771
+ html: string;
772
+ css: string;
773
+ preselectedDynamicContent: {
774
+ text: string;
775
+ value: string;
776
+ fallback?: string | undefined;
777
+ format?: {
778
+ key: string;
779
+ value: string;
780
+ } | undefined;
781
+ }[];
782
+ selectedUnsubscribePages: number[];
783
+ };
784
+ editor: {
785
+ locale: string;
786
+ translationsPath: string;
787
+ migrationDate: number;
788
+ emailHeader: {
789
+ senderName: string;
790
+ subject: string;
791
+ };
792
+ };
793
+ ui: {
794
+ showHeader: boolean;
795
+ backButtonLabel?: string | undefined;
796
+ };
797
+ features: {
798
+ dynamicContent: boolean;
799
+ saveAsTemplate: boolean;
800
+ versionHistory: boolean;
801
+ testMessage: boolean;
802
+ displayConditions: boolean;
803
+ unsubscribe: boolean;
804
+ };
805
+ blocks: {
806
+ 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
+ includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
808
+ };
809
+ compiler: {
810
+ customRules: ({
811
+ type: "replace";
812
+ search: string;
813
+ replacement: string;
814
+ replaceAll?: boolean | undefined;
815
+ id: string;
816
+ description?: string | undefined;
817
+ priority: number;
818
+ } | {
819
+ type: "regex";
820
+ pattern: string;
821
+ replacement: string;
822
+ flags?: string | undefined;
823
+ id: string;
824
+ description?: string | undefined;
825
+ priority: number;
826
+ } | {
827
+ type: "remove";
828
+ targets: string[];
829
+ id: string;
830
+ description?: string | undefined;
831
+ priority: number;
832
+ } | {
833
+ type: "custom";
834
+ processor: (html: string) => string;
835
+ id: string;
836
+ description?: string | undefined;
837
+ priority: number;
838
+ })[];
839
+ ignoreDefaultRules: boolean;
840
+ };
841
+ callbacks: {
842
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
843
+ };
844
+ } | null;
845
+ } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
737
846
  /**
738
847
  * Get the template ID
739
848
  */
@@ -785,7 +894,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
785
894
  testMessage: boolean;
786
895
  displayConditions: boolean;
787
896
  unsubscribe: boolean;
788
- modulesDisabled: boolean;
789
897
  };
790
898
  blocks: {
791
899
  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")[];
@@ -823,6 +931,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
823
931
  })[];
824
932
  ignoreDefaultRules: boolean;
825
933
  };
934
+ callbacks: {
935
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
936
+ };
826
937
  } | null;
827
938
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
828
939
  /**
@@ -876,7 +987,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
876
987
  testMessage: boolean;
877
988
  displayConditions: boolean;
878
989
  unsubscribe: boolean;
879
- modulesDisabled: boolean;
880
990
  };
881
991
  blocks: {
882
992
  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")[];
@@ -914,6 +1024,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
914
1024
  })[];
915
1025
  ignoreDefaultRules: boolean;
916
1026
  };
1027
+ callbacks: {
1028
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1029
+ };
917
1030
  } | null;
918
1031
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
919
1032
  /**
@@ -967,7 +1080,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
967
1080
  testMessage: boolean;
968
1081
  displayConditions: boolean;
969
1082
  unsubscribe: boolean;
970
- modulesDisabled: boolean;
971
1083
  };
972
1084
  blocks: {
973
1085
  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")[];
@@ -1005,6 +1117,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1005
1117
  })[];
1006
1118
  ignoreDefaultRules: boolean;
1007
1119
  };
1120
+ callbacks: {
1121
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1122
+ };
1008
1123
  } | null;
1009
1124
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
1010
1125
  /**
@@ -1058,7 +1173,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1058
1173
  testMessage: boolean;
1059
1174
  displayConditions: boolean;
1060
1175
  unsubscribe: boolean;
1061
- modulesDisabled: boolean;
1062
1176
  };
1063
1177
  blocks: {
1064
1178
  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")[];
@@ -1096,6 +1210,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1096
1210
  })[];
1097
1211
  ignoreDefaultRules: boolean;
1098
1212
  };
1213
+ callbacks: {
1214
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1215
+ };
1099
1216
  } | null;
1100
1217
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
1101
1218
  /**
@@ -1149,7 +1266,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1149
1266
  testMessage: boolean;
1150
1267
  displayConditions: boolean;
1151
1268
  unsubscribe: boolean;
1152
- modulesDisabled: boolean;
1153
1269
  };
1154
1270
  blocks: {
1155
1271
  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")[];
@@ -1187,6 +1303,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1187
1303
  })[];
1188
1304
  ignoreDefaultRules: boolean;
1189
1305
  };
1306
+ callbacks: {
1307
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1308
+ };
1190
1309
  } | null;
1191
1310
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
1192
1311
  /**
@@ -1240,7 +1359,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1240
1359
  testMessage: boolean;
1241
1360
  displayConditions: boolean;
1242
1361
  unsubscribe: boolean;
1243
- modulesDisabled: boolean;
1244
1362
  };
1245
1363
  blocks: {
1246
1364
  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")[];
@@ -1278,6 +1396,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1278
1396
  })[];
1279
1397
  ignoreDefaultRules: boolean;
1280
1398
  };
1399
+ callbacks: {
1400
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1401
+ };
1281
1402
  } | null;
1282
1403
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
1283
1404
  /**
@@ -1331,7 +1452,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1331
1452
  testMessage: boolean;
1332
1453
  displayConditions: boolean;
1333
1454
  unsubscribe: boolean;
1334
- modulesDisabled: boolean;
1335
1455
  };
1336
1456
  blocks: {
1337
1457
  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")[];
@@ -1369,6 +1489,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1369
1489
  })[];
1370
1490
  ignoreDefaultRules: boolean;
1371
1491
  };
1492
+ callbacks: {
1493
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1494
+ };
1372
1495
  } | null;
1373
1496
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
1374
1497
  /**
@@ -1422,7 +1545,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1422
1545
  testMessage: boolean;
1423
1546
  displayConditions: boolean;
1424
1547
  unsubscribe: boolean;
1425
- modulesDisabled: boolean;
1426
1548
  };
1427
1549
  blocks: {
1428
1550
  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")[];
@@ -1460,6 +1582,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1460
1582
  })[];
1461
1583
  ignoreDefaultRules: boolean;
1462
1584
  };
1585
+ callbacks: {
1586
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1587
+ };
1463
1588
  } | null;
1464
1589
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
1465
1590
  /**
@@ -1513,7 +1638,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1513
1638
  testMessage: boolean;
1514
1639
  displayConditions: boolean;
1515
1640
  unsubscribe: boolean;
1516
- modulesDisabled: boolean;
1517
1641
  };
1518
1642
  blocks: {
1519
1643
  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")[];
@@ -1551,6 +1675,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1551
1675
  })[];
1552
1676
  ignoreDefaultRules: boolean;
1553
1677
  };
1678
+ callbacks: {
1679
+ externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
1680
+ };
1554
1681
  } | null;
1555
1682
  } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
1556
1683
  }, {
@@ -48,7 +48,7 @@ const o = `.control-shadow-wrapper:has(.button) {
48
48
  }
49
49
 
50
50
  .e2e-text-insert-controls .control-shadow-wrapper:not(:last-of-type) {
51
- margin-right: 16px;
51
+ margin-right: 6px;
52
52
  }
53
53
 
54
54
  .flat-white > .button {
@@ -32,6 +32,16 @@ ue-stripe-thumb:hover:not(.disabled),
32
32
  padding: 0 16px 16px;
33
33
  grid-row-gap: 16px;
34
34
  }
35
+
36
+ /* TODO: will be removed after we find another way to hide stripo custom modules */
37
+ #moduleTab_tab1,
38
+ button[aria-label="Default Modules"],
39
+ button[aria-controls="moduleTab_tab1_content"],
40
+ #moduleTab_tab2,
41
+ button[aria-label="Pre-Built AMP"],
42
+ button[aria-controls="moduleTab_tab2_content"] {
43
+ display: none !important;
44
+ }
35
45
  `;
36
46
  export {
37
47
  o as default
@@ -64,6 +64,13 @@ const s = o("guido-config", {
64
64
  var e;
65
65
  return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
66
66
  },
67
+ /**
68
+ * Get the callbacks configuration
69
+ */
70
+ callbacks: (i) => {
71
+ var e;
72
+ return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
73
+ },
67
74
  /**
68
75
  * Get the template ID
69
76
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "2.0.0-beta.81f9c55",
3
+ "version": "2.0.0-beta.86a694f",
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",