@useinsider/guido 2.0.0-beta.3f24769 → 2.0.0-beta.4178f89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +53 -39
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +7 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +21 -41
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +48 -53
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +78 -50
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +16 -15
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +31 -39
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +17 -14
- package/dist/extensions/Blocks/Recommendation/templates/index.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/vertical/template.js +17 -16
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +27 -16
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +6 -17
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -5
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/stores/config.js +7 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -96,6 +96,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
96
96
|
})[];
|
|
97
97
|
ignoreDefaultRules: boolean;
|
|
98
98
|
};
|
|
99
|
+
callbacks: {
|
|
100
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
101
|
+
};
|
|
99
102
|
} | null;
|
|
100
103
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
101
104
|
/**
|
|
@@ -188,6 +191,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
188
191
|
})[];
|
|
189
192
|
ignoreDefaultRules: boolean;
|
|
190
193
|
};
|
|
194
|
+
callbacks: {
|
|
195
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
196
|
+
};
|
|
191
197
|
} | null;
|
|
192
198
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
193
199
|
/**
|
|
@@ -280,6 +286,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
280
286
|
})[];
|
|
281
287
|
ignoreDefaultRules: boolean;
|
|
282
288
|
};
|
|
289
|
+
callbacks: {
|
|
290
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
291
|
+
};
|
|
283
292
|
} | null;
|
|
284
293
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
285
294
|
/**
|
|
@@ -372,6 +381,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
372
381
|
})[];
|
|
373
382
|
ignoreDefaultRules: boolean;
|
|
374
383
|
};
|
|
384
|
+
callbacks: {
|
|
385
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
386
|
+
};
|
|
375
387
|
} | null;
|
|
376
388
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
377
389
|
/**
|
|
@@ -464,6 +476,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
464
476
|
})[];
|
|
465
477
|
ignoreDefaultRules: boolean;
|
|
466
478
|
};
|
|
479
|
+
callbacks: {
|
|
480
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
481
|
+
};
|
|
467
482
|
} | null;
|
|
468
483
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
469
484
|
/**
|
|
@@ -556,6 +571,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
556
571
|
})[];
|
|
557
572
|
ignoreDefaultRules: boolean;
|
|
558
573
|
};
|
|
574
|
+
callbacks: {
|
|
575
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
576
|
+
};
|
|
559
577
|
} | null;
|
|
560
578
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
561
579
|
/**
|
|
@@ -648,6 +666,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
648
666
|
})[];
|
|
649
667
|
ignoreDefaultRules: boolean;
|
|
650
668
|
};
|
|
669
|
+
callbacks: {
|
|
670
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
671
|
+
};
|
|
651
672
|
} | null;
|
|
652
673
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
653
674
|
/**
|
|
@@ -740,8 +761,106 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
740
761
|
})[];
|
|
741
762
|
ignoreDefaultRules: boolean;
|
|
742
763
|
};
|
|
764
|
+
callbacks: {
|
|
765
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
766
|
+
};
|
|
743
767
|
} | null;
|
|
744
768
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
769
|
+
/**
|
|
770
|
+
* Get the callbacks configuration
|
|
771
|
+
*/
|
|
772
|
+
callbacks: (state: {
|
|
773
|
+
initialized: boolean;
|
|
774
|
+
config: {
|
|
775
|
+
identity: {
|
|
776
|
+
templateId: string;
|
|
777
|
+
userId: string;
|
|
778
|
+
variationId?: string | undefined;
|
|
779
|
+
};
|
|
780
|
+
partner: {
|
|
781
|
+
name: string;
|
|
782
|
+
productType: 60 | 49 | 97;
|
|
783
|
+
messageType: 1 | 2;
|
|
784
|
+
username: string;
|
|
785
|
+
};
|
|
786
|
+
template: {
|
|
787
|
+
html: string;
|
|
788
|
+
css: string;
|
|
789
|
+
preselectedDynamicContent: {
|
|
790
|
+
text: string;
|
|
791
|
+
value: string;
|
|
792
|
+
fallback?: string | undefined;
|
|
793
|
+
format?: {
|
|
794
|
+
key: string;
|
|
795
|
+
value: string;
|
|
796
|
+
} | undefined;
|
|
797
|
+
}[];
|
|
798
|
+
selectedUnsubscribePages: number[];
|
|
799
|
+
forceRecreate: boolean;
|
|
800
|
+
};
|
|
801
|
+
editor: {
|
|
802
|
+
locale: string;
|
|
803
|
+
translationsPath: string;
|
|
804
|
+
migrationDate: number;
|
|
805
|
+
emailHeader: {
|
|
806
|
+
senderName: string;
|
|
807
|
+
subject: string;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
ui: {
|
|
811
|
+
showHeader: boolean;
|
|
812
|
+
backButtonLabel?: string | undefined;
|
|
813
|
+
};
|
|
814
|
+
features: {
|
|
815
|
+
dynamicContent: boolean;
|
|
816
|
+
saveAsTemplate: boolean;
|
|
817
|
+
versionHistory: boolean;
|
|
818
|
+
testMessage: boolean;
|
|
819
|
+
displayConditions: boolean;
|
|
820
|
+
unsubscribe: boolean;
|
|
821
|
+
modulesDisabled: boolean;
|
|
822
|
+
};
|
|
823
|
+
blocks: {
|
|
824
|
+
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")[];
|
|
825
|
+
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
826
|
+
};
|
|
827
|
+
compiler: {
|
|
828
|
+
customRules: ({
|
|
829
|
+
type: "replace";
|
|
830
|
+
search: string;
|
|
831
|
+
replacement: string;
|
|
832
|
+
replaceAll?: boolean | undefined;
|
|
833
|
+
id: string;
|
|
834
|
+
description?: string | undefined;
|
|
835
|
+
priority: number;
|
|
836
|
+
} | {
|
|
837
|
+
type: "regex";
|
|
838
|
+
pattern: string;
|
|
839
|
+
replacement: string;
|
|
840
|
+
flags?: string | undefined;
|
|
841
|
+
id: string;
|
|
842
|
+
description?: string | undefined;
|
|
843
|
+
priority: number;
|
|
844
|
+
} | {
|
|
845
|
+
type: "remove";
|
|
846
|
+
targets: string[];
|
|
847
|
+
id: string;
|
|
848
|
+
description?: string | undefined;
|
|
849
|
+
priority: number;
|
|
850
|
+
} | {
|
|
851
|
+
type: "custom";
|
|
852
|
+
processor: (html: string) => string;
|
|
853
|
+
id: string;
|
|
854
|
+
description?: string | undefined;
|
|
855
|
+
priority: number;
|
|
856
|
+
})[];
|
|
857
|
+
ignoreDefaultRules: boolean;
|
|
858
|
+
};
|
|
859
|
+
callbacks: {
|
|
860
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
861
|
+
};
|
|
862
|
+
} | null;
|
|
863
|
+
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
745
864
|
/**
|
|
746
865
|
* Get the template ID
|
|
747
866
|
*/
|
|
@@ -832,6 +951,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
832
951
|
})[];
|
|
833
952
|
ignoreDefaultRules: boolean;
|
|
834
953
|
};
|
|
954
|
+
callbacks: {
|
|
955
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
956
|
+
};
|
|
835
957
|
} | null;
|
|
836
958
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
837
959
|
/**
|
|
@@ -924,6 +1046,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
924
1046
|
})[];
|
|
925
1047
|
ignoreDefaultRules: boolean;
|
|
926
1048
|
};
|
|
1049
|
+
callbacks: {
|
|
1050
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1051
|
+
};
|
|
927
1052
|
} | null;
|
|
928
1053
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
929
1054
|
/**
|
|
@@ -1016,6 +1141,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1016
1141
|
})[];
|
|
1017
1142
|
ignoreDefaultRules: boolean;
|
|
1018
1143
|
};
|
|
1144
|
+
callbacks: {
|
|
1145
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1146
|
+
};
|
|
1019
1147
|
} | null;
|
|
1020
1148
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1021
1149
|
/**
|
|
@@ -1108,6 +1236,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1108
1236
|
})[];
|
|
1109
1237
|
ignoreDefaultRules: boolean;
|
|
1110
1238
|
};
|
|
1239
|
+
callbacks: {
|
|
1240
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1241
|
+
};
|
|
1111
1242
|
} | null;
|
|
1112
1243
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1113
1244
|
/**
|
|
@@ -1200,6 +1331,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1200
1331
|
})[];
|
|
1201
1332
|
ignoreDefaultRules: boolean;
|
|
1202
1333
|
};
|
|
1334
|
+
callbacks: {
|
|
1335
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1336
|
+
};
|
|
1203
1337
|
} | null;
|
|
1204
1338
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1205
1339
|
/**
|
|
@@ -1292,6 +1426,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1292
1426
|
})[];
|
|
1293
1427
|
ignoreDefaultRules: boolean;
|
|
1294
1428
|
};
|
|
1429
|
+
callbacks: {
|
|
1430
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1431
|
+
};
|
|
1295
1432
|
} | null;
|
|
1296
1433
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1297
1434
|
/**
|
|
@@ -1384,6 +1521,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1384
1521
|
})[];
|
|
1385
1522
|
ignoreDefaultRules: boolean;
|
|
1386
1523
|
};
|
|
1524
|
+
callbacks: {
|
|
1525
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1526
|
+
};
|
|
1387
1527
|
} | null;
|
|
1388
1528
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1389
1529
|
/**
|
|
@@ -1476,6 +1616,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1476
1616
|
})[];
|
|
1477
1617
|
ignoreDefaultRules: boolean;
|
|
1478
1618
|
};
|
|
1619
|
+
callbacks: {
|
|
1620
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1621
|
+
};
|
|
1479
1622
|
} | null;
|
|
1480
1623
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
1481
1624
|
/**
|
|
@@ -1568,6 +1711,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1568
1711
|
})[];
|
|
1569
1712
|
ignoreDefaultRules: boolean;
|
|
1570
1713
|
};
|
|
1714
|
+
callbacks: {
|
|
1715
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1716
|
+
};
|
|
1571
1717
|
} | null;
|
|
1572
1718
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
1573
1719
|
}, {
|
package/dist/stores/config.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "2.0.0-beta.4178f89",
|
|
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",
|