@useinsider/guido 2.0.0-beta.6b24cb0 → 2.0.0-beta.6da018c
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 +36 -50
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +59 -57
- package/dist/components/organisms/base/Toaster.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +0 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +0 -6
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +1 -146
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/stores/config.js +0 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig
|
|
1
|
+
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
|
|
2
2
|
interface ConfigStoreState {
|
|
3
3
|
/** Whether the config has been initialized */
|
|
4
4
|
initialized: boolean;
|
|
@@ -95,9 +95,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
95
95
|
})[];
|
|
96
96
|
ignoreDefaultRules: boolean;
|
|
97
97
|
};
|
|
98
|
-
callbacks: {
|
|
99
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
100
|
-
};
|
|
101
98
|
} | null;
|
|
102
99
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
103
100
|
/**
|
|
@@ -189,9 +186,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
189
186
|
})[];
|
|
190
187
|
ignoreDefaultRules: boolean;
|
|
191
188
|
};
|
|
192
|
-
callbacks: {
|
|
193
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
194
|
-
};
|
|
195
189
|
} | null;
|
|
196
190
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
197
191
|
/**
|
|
@@ -283,9 +277,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
283
277
|
})[];
|
|
284
278
|
ignoreDefaultRules: boolean;
|
|
285
279
|
};
|
|
286
|
-
callbacks: {
|
|
287
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
288
|
-
};
|
|
289
280
|
} | null;
|
|
290
281
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
291
282
|
/**
|
|
@@ -377,9 +368,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
377
368
|
})[];
|
|
378
369
|
ignoreDefaultRules: boolean;
|
|
379
370
|
};
|
|
380
|
-
callbacks: {
|
|
381
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
382
|
-
};
|
|
383
371
|
} | null;
|
|
384
372
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
385
373
|
/**
|
|
@@ -471,9 +459,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
471
459
|
})[];
|
|
472
460
|
ignoreDefaultRules: boolean;
|
|
473
461
|
};
|
|
474
|
-
callbacks: {
|
|
475
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
476
|
-
};
|
|
477
462
|
} | null;
|
|
478
463
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
479
464
|
/**
|
|
@@ -565,9 +550,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
565
550
|
})[];
|
|
566
551
|
ignoreDefaultRules: boolean;
|
|
567
552
|
};
|
|
568
|
-
callbacks: {
|
|
569
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
570
|
-
};
|
|
571
553
|
} | null;
|
|
572
554
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
573
555
|
/**
|
|
@@ -659,9 +641,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
659
641
|
})[];
|
|
660
642
|
ignoreDefaultRules: boolean;
|
|
661
643
|
};
|
|
662
|
-
callbacks: {
|
|
663
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
664
|
-
};
|
|
665
644
|
} | null;
|
|
666
645
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
667
646
|
/**
|
|
@@ -753,105 +732,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
753
732
|
})[];
|
|
754
733
|
ignoreDefaultRules: boolean;
|
|
755
734
|
};
|
|
756
|
-
callbacks: {
|
|
757
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
758
|
-
};
|
|
759
735
|
} | null;
|
|
760
736
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
761
|
-
/**
|
|
762
|
-
* Get the callbacks configuration
|
|
763
|
-
*/
|
|
764
|
-
callbacks: (state: {
|
|
765
|
-
initialized: boolean;
|
|
766
|
-
config: {
|
|
767
|
-
identity: {
|
|
768
|
-
templateId: string;
|
|
769
|
-
userId: string;
|
|
770
|
-
variationId?: string | undefined;
|
|
771
|
-
};
|
|
772
|
-
partner: {
|
|
773
|
-
name: string;
|
|
774
|
-
productType: 60 | 49 | 97;
|
|
775
|
-
messageType: 1 | 2;
|
|
776
|
-
username: string;
|
|
777
|
-
};
|
|
778
|
-
template: {
|
|
779
|
-
html: string;
|
|
780
|
-
css: string;
|
|
781
|
-
preselectedDynamicContent: {
|
|
782
|
-
text: string;
|
|
783
|
-
value: string;
|
|
784
|
-
fallback?: string | undefined;
|
|
785
|
-
format?: {
|
|
786
|
-
key: string;
|
|
787
|
-
value: string;
|
|
788
|
-
} | undefined;
|
|
789
|
-
}[];
|
|
790
|
-
selectedUnsubscribePages: number[];
|
|
791
|
-
};
|
|
792
|
-
editor: {
|
|
793
|
-
locale: string;
|
|
794
|
-
translationsPath: string;
|
|
795
|
-
migrationDate: number;
|
|
796
|
-
emailHeader: {
|
|
797
|
-
senderName: string;
|
|
798
|
-
subject: string;
|
|
799
|
-
};
|
|
800
|
-
};
|
|
801
|
-
ui: {
|
|
802
|
-
showHeader: boolean;
|
|
803
|
-
backButtonLabel?: string | undefined;
|
|
804
|
-
};
|
|
805
|
-
features: {
|
|
806
|
-
dynamicContent: boolean;
|
|
807
|
-
saveAsTemplate: boolean;
|
|
808
|
-
versionHistory: boolean;
|
|
809
|
-
testMessage: boolean;
|
|
810
|
-
displayConditions: boolean;
|
|
811
|
-
unsubscribe: boolean;
|
|
812
|
-
modulesDisabled: boolean;
|
|
813
|
-
};
|
|
814
|
-
blocks: {
|
|
815
|
-
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")[];
|
|
816
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
817
|
-
};
|
|
818
|
-
compiler: {
|
|
819
|
-
customRules: ({
|
|
820
|
-
type: "replace";
|
|
821
|
-
search: string;
|
|
822
|
-
replacement: string;
|
|
823
|
-
replaceAll?: boolean | undefined;
|
|
824
|
-
id: string;
|
|
825
|
-
description?: string | undefined;
|
|
826
|
-
priority: number;
|
|
827
|
-
} | {
|
|
828
|
-
type: "regex";
|
|
829
|
-
pattern: string;
|
|
830
|
-
replacement: string;
|
|
831
|
-
flags?: string | undefined;
|
|
832
|
-
id: string;
|
|
833
|
-
description?: string | undefined;
|
|
834
|
-
priority: number;
|
|
835
|
-
} | {
|
|
836
|
-
type: "remove";
|
|
837
|
-
targets: string[];
|
|
838
|
-
id: string;
|
|
839
|
-
description?: string | undefined;
|
|
840
|
-
priority: number;
|
|
841
|
-
} | {
|
|
842
|
-
type: "custom";
|
|
843
|
-
processor: (html: string) => string;
|
|
844
|
-
id: string;
|
|
845
|
-
description?: string | undefined;
|
|
846
|
-
priority: number;
|
|
847
|
-
})[];
|
|
848
|
-
ignoreDefaultRules: boolean;
|
|
849
|
-
};
|
|
850
|
-
callbacks: {
|
|
851
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
852
|
-
};
|
|
853
|
-
} | null;
|
|
854
|
-
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
855
737
|
/**
|
|
856
738
|
* Get the template ID
|
|
857
739
|
*/
|
|
@@ -941,9 +823,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
941
823
|
})[];
|
|
942
824
|
ignoreDefaultRules: boolean;
|
|
943
825
|
};
|
|
944
|
-
callbacks: {
|
|
945
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
946
|
-
};
|
|
947
826
|
} | null;
|
|
948
827
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
949
828
|
/**
|
|
@@ -1035,9 +914,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1035
914
|
})[];
|
|
1036
915
|
ignoreDefaultRules: boolean;
|
|
1037
916
|
};
|
|
1038
|
-
callbacks: {
|
|
1039
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1040
|
-
};
|
|
1041
917
|
} | null;
|
|
1042
918
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1043
919
|
/**
|
|
@@ -1129,9 +1005,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1129
1005
|
})[];
|
|
1130
1006
|
ignoreDefaultRules: boolean;
|
|
1131
1007
|
};
|
|
1132
|
-
callbacks: {
|
|
1133
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1134
|
-
};
|
|
1135
1008
|
} | null;
|
|
1136
1009
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1137
1010
|
/**
|
|
@@ -1223,9 +1096,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1223
1096
|
})[];
|
|
1224
1097
|
ignoreDefaultRules: boolean;
|
|
1225
1098
|
};
|
|
1226
|
-
callbacks: {
|
|
1227
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1228
|
-
};
|
|
1229
1099
|
} | null;
|
|
1230
1100
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1231
1101
|
/**
|
|
@@ -1317,9 +1187,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1317
1187
|
})[];
|
|
1318
1188
|
ignoreDefaultRules: boolean;
|
|
1319
1189
|
};
|
|
1320
|
-
callbacks: {
|
|
1321
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1322
|
-
};
|
|
1323
1190
|
} | null;
|
|
1324
1191
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1325
1192
|
/**
|
|
@@ -1411,9 +1278,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1411
1278
|
})[];
|
|
1412
1279
|
ignoreDefaultRules: boolean;
|
|
1413
1280
|
};
|
|
1414
|
-
callbacks: {
|
|
1415
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1416
|
-
};
|
|
1417
1281
|
} | null;
|
|
1418
1282
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1419
1283
|
/**
|
|
@@ -1505,9 +1369,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1505
1369
|
})[];
|
|
1506
1370
|
ignoreDefaultRules: boolean;
|
|
1507
1371
|
};
|
|
1508
|
-
callbacks: {
|
|
1509
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1510
|
-
};
|
|
1511
1372
|
} | null;
|
|
1512
1373
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1513
1374
|
/**
|
|
@@ -1599,9 +1460,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1599
1460
|
})[];
|
|
1600
1461
|
ignoreDefaultRules: boolean;
|
|
1601
1462
|
};
|
|
1602
|
-
callbacks: {
|
|
1603
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1604
|
-
};
|
|
1605
1463
|
} | null;
|
|
1606
1464
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
1607
1465
|
/**
|
|
@@ -1693,9 +1551,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1693
1551
|
})[];
|
|
1694
1552
|
ignoreDefaultRules: boolean;
|
|
1695
1553
|
};
|
|
1696
|
-
callbacks: {
|
|
1697
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1698
|
-
};
|
|
1699
1554
|
} | null;
|
|
1700
1555
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
1701
1556
|
}, {
|
package/dist/stores/config.js
CHANGED
|
@@ -64,13 +64,6 @@ 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
|
-
},
|
|
74
67
|
/**
|
|
75
68
|
* Get the template ID
|
|
76
69
|
*/
|
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.6da018c",
|
|
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",
|