@useinsider/guido 2.1.0-beta.5ec7b79 → 2.1.0-beta.65ad66c
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/README.md +1 -39
- package/dist/@types/config/schemas.js +65 -70
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +58 -69
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/composables/useBlocksConfig.js +16 -26
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/composables/useSave.js +12 -16
- package/dist/composables/useStripo.js +54 -58
- package/dist/composables/useStripoEventHandler.js +12 -27
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +116 -0
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +4 -8
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +16 -15
- package/dist/enums/unsubscribe.js +21 -25
- package/dist/extensions/Blocks/Recommendation/block.js +132 -9
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +65 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +20 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +249 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +110 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +286 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
- package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +69 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +118 -0
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +224 -238
- package/dist/services/recommendationApi.js +11 -8
- package/dist/services/stripoApi.js +14 -50
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +0 -8
- package/dist/src/@types/events.d.ts +2 -34
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/enums/defaults.d.ts +0 -4
- package/dist/src/enums/unsubscribe.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +42 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +214 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +39 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +57 -0
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +160 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
- package/dist/src/services/stripoApi.d.ts +0 -5
- package/dist/src/stores/config.d.ts +0 -36
- package/dist/src/stores/editor.d.ts +0 -23
- package/dist/static/styles/customEditorStyle.css.js +25 -2
- package/dist/stores/editor.js +1 -2
- package/dist/utils/pairProductVariables.js +57 -56
- package/dist/utils/templatePreparation.js +15 -14
- package/package.json +1 -1
- package/dist/composables/useSyncModuleExtractor.js +0 -33
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/control.js +0 -336
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/extensions/ModulesTabIcons/extension.js +0 -17
- package/dist/src/composables/useSyncModuleExtractor.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +0 -2
- package/dist/src/mock/api/settings.d.ts +0 -2
|
@@ -46,8 +46,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
46
46
|
senderName: string;
|
|
47
47
|
subject: string;
|
|
48
48
|
};
|
|
49
|
-
savedModulesFolderName: string;
|
|
50
|
-
defaultModulesFolderName: string;
|
|
51
49
|
};
|
|
52
50
|
ui: {
|
|
53
51
|
showHeader: boolean;
|
|
@@ -143,8 +141,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
143
141
|
senderName: string;
|
|
144
142
|
subject: string;
|
|
145
143
|
};
|
|
146
|
-
savedModulesFolderName: string;
|
|
147
|
-
defaultModulesFolderName: string;
|
|
148
144
|
};
|
|
149
145
|
ui: {
|
|
150
146
|
showHeader: boolean;
|
|
@@ -240,8 +236,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
240
236
|
senderName: string;
|
|
241
237
|
subject: string;
|
|
242
238
|
};
|
|
243
|
-
savedModulesFolderName: string;
|
|
244
|
-
defaultModulesFolderName: string;
|
|
245
239
|
};
|
|
246
240
|
ui: {
|
|
247
241
|
showHeader: boolean;
|
|
@@ -337,8 +331,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
337
331
|
senderName: string;
|
|
338
332
|
subject: string;
|
|
339
333
|
};
|
|
340
|
-
savedModulesFolderName: string;
|
|
341
|
-
defaultModulesFolderName: string;
|
|
342
334
|
};
|
|
343
335
|
ui: {
|
|
344
336
|
showHeader: boolean;
|
|
@@ -434,8 +426,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
434
426
|
senderName: string;
|
|
435
427
|
subject: string;
|
|
436
428
|
};
|
|
437
|
-
savedModulesFolderName: string;
|
|
438
|
-
defaultModulesFolderName: string;
|
|
439
429
|
};
|
|
440
430
|
ui: {
|
|
441
431
|
showHeader: boolean;
|
|
@@ -531,8 +521,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
531
521
|
senderName: string;
|
|
532
522
|
subject: string;
|
|
533
523
|
};
|
|
534
|
-
savedModulesFolderName: string;
|
|
535
|
-
defaultModulesFolderName: string;
|
|
536
524
|
};
|
|
537
525
|
ui: {
|
|
538
526
|
showHeader: boolean;
|
|
@@ -628,8 +616,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
628
616
|
senderName: string;
|
|
629
617
|
subject: string;
|
|
630
618
|
};
|
|
631
|
-
savedModulesFolderName: string;
|
|
632
|
-
defaultModulesFolderName: string;
|
|
633
619
|
};
|
|
634
620
|
ui: {
|
|
635
621
|
showHeader: boolean;
|
|
@@ -725,8 +711,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
725
711
|
senderName: string;
|
|
726
712
|
subject: string;
|
|
727
713
|
};
|
|
728
|
-
savedModulesFolderName: string;
|
|
729
|
-
defaultModulesFolderName: string;
|
|
730
714
|
};
|
|
731
715
|
ui: {
|
|
732
716
|
showHeader: boolean;
|
|
@@ -822,8 +806,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
822
806
|
senderName: string;
|
|
823
807
|
subject: string;
|
|
824
808
|
};
|
|
825
|
-
savedModulesFolderName: string;
|
|
826
|
-
defaultModulesFolderName: string;
|
|
827
809
|
};
|
|
828
810
|
ui: {
|
|
829
811
|
showHeader: boolean;
|
|
@@ -919,8 +901,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
919
901
|
senderName: string;
|
|
920
902
|
subject: string;
|
|
921
903
|
};
|
|
922
|
-
savedModulesFolderName: string;
|
|
923
|
-
defaultModulesFolderName: string;
|
|
924
904
|
};
|
|
925
905
|
ui: {
|
|
926
906
|
showHeader: boolean;
|
|
@@ -1016,8 +996,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1016
996
|
senderName: string;
|
|
1017
997
|
subject: string;
|
|
1018
998
|
};
|
|
1019
|
-
savedModulesFolderName: string;
|
|
1020
|
-
defaultModulesFolderName: string;
|
|
1021
999
|
};
|
|
1022
1000
|
ui: {
|
|
1023
1001
|
showHeader: boolean;
|
|
@@ -1113,8 +1091,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1113
1091
|
senderName: string;
|
|
1114
1092
|
subject: string;
|
|
1115
1093
|
};
|
|
1116
|
-
savedModulesFolderName: string;
|
|
1117
|
-
defaultModulesFolderName: string;
|
|
1118
1094
|
};
|
|
1119
1095
|
ui: {
|
|
1120
1096
|
showHeader: boolean;
|
|
@@ -1210,8 +1186,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1210
1186
|
senderName: string;
|
|
1211
1187
|
subject: string;
|
|
1212
1188
|
};
|
|
1213
|
-
savedModulesFolderName: string;
|
|
1214
|
-
defaultModulesFolderName: string;
|
|
1215
1189
|
};
|
|
1216
1190
|
ui: {
|
|
1217
1191
|
showHeader: boolean;
|
|
@@ -1307,8 +1281,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1307
1281
|
senderName: string;
|
|
1308
1282
|
subject: string;
|
|
1309
1283
|
};
|
|
1310
|
-
savedModulesFolderName: string;
|
|
1311
|
-
defaultModulesFolderName: string;
|
|
1312
1284
|
};
|
|
1313
1285
|
ui: {
|
|
1314
1286
|
showHeader: boolean;
|
|
@@ -1404,8 +1376,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1404
1376
|
senderName: string;
|
|
1405
1377
|
subject: string;
|
|
1406
1378
|
};
|
|
1407
|
-
savedModulesFolderName: string;
|
|
1408
|
-
defaultModulesFolderName: string;
|
|
1409
1379
|
};
|
|
1410
1380
|
ui: {
|
|
1411
1381
|
showHeader: boolean;
|
|
@@ -1501,8 +1471,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1501
1471
|
senderName: string;
|
|
1502
1472
|
subject: string;
|
|
1503
1473
|
};
|
|
1504
|
-
savedModulesFolderName: string;
|
|
1505
|
-
defaultModulesFolderName: string;
|
|
1506
1474
|
};
|
|
1507
1475
|
ui: {
|
|
1508
1476
|
showHeader: boolean;
|
|
@@ -1598,8 +1566,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1598
1566
|
senderName: string;
|
|
1599
1567
|
subject: string;
|
|
1600
1568
|
};
|
|
1601
|
-
savedModulesFolderName: string;
|
|
1602
|
-
defaultModulesFolderName: string;
|
|
1603
1569
|
};
|
|
1604
1570
|
ui: {
|
|
1605
1571
|
showHeader: boolean;
|
|
@@ -1695,8 +1661,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1695
1661
|
senderName: string;
|
|
1696
1662
|
subject: string;
|
|
1697
1663
|
};
|
|
1698
|
-
savedModulesFolderName: string;
|
|
1699
|
-
defaultModulesFolderName: string;
|
|
1700
1664
|
};
|
|
1701
1665
|
ui: {
|
|
1702
1666
|
showHeader: boolean;
|
|
@@ -8,7 +8,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
8
8
|
hasChanges: boolean;
|
|
9
9
|
isStripoInitialized: boolean;
|
|
10
10
|
templateId: string;
|
|
11
|
-
syncModulesEnabled: boolean;
|
|
12
11
|
}, {
|
|
13
12
|
isEditorToolbarVisible: (state: {
|
|
14
13
|
loadingStatus: boolean;
|
|
@@ -20,7 +19,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
20
19
|
hasChanges: boolean;
|
|
21
20
|
isStripoInitialized: boolean;
|
|
22
21
|
templateId: string;
|
|
23
|
-
syncModulesEnabled: boolean;
|
|
24
22
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
25
23
|
loadingStatus: boolean;
|
|
26
24
|
isCodeEditorOpen: boolean;
|
|
@@ -31,7 +29,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
31
29
|
hasChanges: boolean;
|
|
32
30
|
isStripoInitialized: boolean;
|
|
33
31
|
templateId: string;
|
|
34
|
-
syncModulesEnabled: boolean;
|
|
35
32
|
}>) => boolean;
|
|
36
33
|
isUndoButtonDisabled: (state: {
|
|
37
34
|
loadingStatus: boolean;
|
|
@@ -43,7 +40,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
43
40
|
hasChanges: boolean;
|
|
44
41
|
isStripoInitialized: boolean;
|
|
45
42
|
templateId: string;
|
|
46
|
-
syncModulesEnabled: boolean;
|
|
47
43
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
48
44
|
loadingStatus: boolean;
|
|
49
45
|
isCodeEditorOpen: boolean;
|
|
@@ -54,7 +50,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
54
50
|
hasChanges: boolean;
|
|
55
51
|
isStripoInitialized: boolean;
|
|
56
52
|
templateId: string;
|
|
57
|
-
syncModulesEnabled: boolean;
|
|
58
53
|
}>) => boolean;
|
|
59
54
|
isRedoButtonDisabled: (state: {
|
|
60
55
|
loadingStatus: boolean;
|
|
@@ -66,7 +61,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
66
61
|
hasChanges: boolean;
|
|
67
62
|
isStripoInitialized: boolean;
|
|
68
63
|
templateId: string;
|
|
69
|
-
syncModulesEnabled: boolean;
|
|
70
64
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
71
65
|
loadingStatus: boolean;
|
|
72
66
|
isCodeEditorOpen: boolean;
|
|
@@ -77,7 +71,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
77
71
|
hasChanges: boolean;
|
|
78
72
|
isStripoInitialized: boolean;
|
|
79
73
|
templateId: string;
|
|
80
|
-
syncModulesEnabled: boolean;
|
|
81
74
|
}>) => boolean;
|
|
82
75
|
isCodeEditorButtonDisabled: (state: {
|
|
83
76
|
loadingStatus: boolean;
|
|
@@ -89,7 +82,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
89
82
|
hasChanges: boolean;
|
|
90
83
|
isStripoInitialized: boolean;
|
|
91
84
|
templateId: string;
|
|
92
|
-
syncModulesEnabled: boolean;
|
|
93
85
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
94
86
|
loadingStatus: boolean;
|
|
95
87
|
isCodeEditorOpen: boolean;
|
|
@@ -100,7 +92,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
100
92
|
hasChanges: boolean;
|
|
101
93
|
isStripoInitialized: boolean;
|
|
102
94
|
templateId: string;
|
|
103
|
-
syncModulesEnabled: boolean;
|
|
104
95
|
}>) => boolean;
|
|
105
96
|
isPreviewButtonDisabled: (state: {
|
|
106
97
|
loadingStatus: boolean;
|
|
@@ -112,7 +103,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
112
103
|
hasChanges: boolean;
|
|
113
104
|
isStripoInitialized: boolean;
|
|
114
105
|
templateId: string;
|
|
115
|
-
syncModulesEnabled: boolean;
|
|
116
106
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
117
107
|
loadingStatus: boolean;
|
|
118
108
|
isCodeEditorOpen: boolean;
|
|
@@ -123,7 +113,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
123
113
|
hasChanges: boolean;
|
|
124
114
|
isStripoInitialized: boolean;
|
|
125
115
|
templateId: string;
|
|
126
|
-
syncModulesEnabled: boolean;
|
|
127
116
|
}>) => boolean;
|
|
128
117
|
isViewOptionsDisabled: (state: {
|
|
129
118
|
loadingStatus: boolean;
|
|
@@ -135,7 +124,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
135
124
|
hasChanges: boolean;
|
|
136
125
|
isStripoInitialized: boolean;
|
|
137
126
|
templateId: string;
|
|
138
|
-
syncModulesEnabled: boolean;
|
|
139
127
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
140
128
|
loadingStatus: boolean;
|
|
141
129
|
isCodeEditorOpen: boolean;
|
|
@@ -146,7 +134,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
146
134
|
hasChanges: boolean;
|
|
147
135
|
isStripoInitialized: boolean;
|
|
148
136
|
templateId: string;
|
|
149
|
-
syncModulesEnabled: boolean;
|
|
150
137
|
}>) => boolean;
|
|
151
138
|
isVersionHistoryButtonDisabled: (state: {
|
|
152
139
|
loadingStatus: boolean;
|
|
@@ -158,7 +145,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
158
145
|
hasChanges: boolean;
|
|
159
146
|
isStripoInitialized: boolean;
|
|
160
147
|
templateId: string;
|
|
161
|
-
syncModulesEnabled: boolean;
|
|
162
148
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
163
149
|
loadingStatus: boolean;
|
|
164
150
|
isCodeEditorOpen: boolean;
|
|
@@ -169,7 +155,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
169
155
|
hasChanges: boolean;
|
|
170
156
|
isStripoInitialized: boolean;
|
|
171
157
|
templateId: string;
|
|
172
|
-
syncModulesEnabled: boolean;
|
|
173
158
|
}>) => boolean;
|
|
174
159
|
isExportButtonDisabled: (state: {
|
|
175
160
|
loadingStatus: boolean;
|
|
@@ -181,7 +166,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
181
166
|
hasChanges: boolean;
|
|
182
167
|
isStripoInitialized: boolean;
|
|
183
168
|
templateId: string;
|
|
184
|
-
syncModulesEnabled: boolean;
|
|
185
169
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
186
170
|
loadingStatus: boolean;
|
|
187
171
|
isCodeEditorOpen: boolean;
|
|
@@ -192,7 +176,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
192
176
|
hasChanges: boolean;
|
|
193
177
|
isStripoInitialized: boolean;
|
|
194
178
|
templateId: string;
|
|
195
|
-
syncModulesEnabled: boolean;
|
|
196
179
|
}>) => boolean;
|
|
197
180
|
isSaveAsButtonDisabled: (state: {
|
|
198
181
|
loadingStatus: boolean;
|
|
@@ -204,7 +187,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
204
187
|
hasChanges: boolean;
|
|
205
188
|
isStripoInitialized: boolean;
|
|
206
189
|
templateId: string;
|
|
207
|
-
syncModulesEnabled: boolean;
|
|
208
190
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
209
191
|
loadingStatus: boolean;
|
|
210
192
|
isCodeEditorOpen: boolean;
|
|
@@ -215,7 +197,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
215
197
|
hasChanges: boolean;
|
|
216
198
|
isStripoInitialized: boolean;
|
|
217
199
|
templateId: string;
|
|
218
|
-
syncModulesEnabled: boolean;
|
|
219
200
|
}>) => boolean;
|
|
220
201
|
isTestButtonDisabled: (state: {
|
|
221
202
|
loadingStatus: boolean;
|
|
@@ -227,7 +208,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
227
208
|
hasChanges: boolean;
|
|
228
209
|
isStripoInitialized: boolean;
|
|
229
210
|
templateId: string;
|
|
230
|
-
syncModulesEnabled: boolean;
|
|
231
211
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
232
212
|
loadingStatus: boolean;
|
|
233
213
|
isCodeEditorOpen: boolean;
|
|
@@ -238,7 +218,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
238
218
|
hasChanges: boolean;
|
|
239
219
|
isStripoInitialized: boolean;
|
|
240
220
|
templateId: string;
|
|
241
|
-
syncModulesEnabled: boolean;
|
|
242
221
|
}>) => boolean;
|
|
243
222
|
isSaveButtonDisabled: (state: {
|
|
244
223
|
loadingStatus: boolean;
|
|
@@ -250,7 +229,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
250
229
|
hasChanges: boolean;
|
|
251
230
|
isStripoInitialized: boolean;
|
|
252
231
|
templateId: string;
|
|
253
|
-
syncModulesEnabled: boolean;
|
|
254
232
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
255
233
|
loadingStatus: boolean;
|
|
256
234
|
isCodeEditorOpen: boolean;
|
|
@@ -261,6 +239,5 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
261
239
|
hasChanges: boolean;
|
|
262
240
|
isStripoInitialized: boolean;
|
|
263
241
|
templateId: string;
|
|
264
|
-
syncModulesEnabled: boolean;
|
|
265
242
|
}>) => boolean;
|
|
266
243
|
}, {}>;
|
|
@@ -19,8 +19,31 @@ const n = `.esd-x,
|
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
}
|
|
21
21
|
.ins-product-cart ue-node-actions,
|
|
22
|
-
|
|
23
|
-
.ins-recommendation-v3-block-v2 .product-
|
|
22
|
+
/* Horizontal layout - hide for info, image, and button cells */
|
|
23
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-actions,
|
|
24
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-panel,
|
|
25
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-actions,
|
|
26
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-panel,
|
|
27
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-actions,
|
|
28
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-panel,
|
|
29
|
+
/* Vertical layout - hide for product-card-segment inner cells */
|
|
30
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-actions,
|
|
31
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-panel,
|
|
32
|
+
/* Hide for specific product attribute cells in both layouts */
|
|
33
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-actions,
|
|
34
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-panel,
|
|
35
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-actions,
|
|
36
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-panel,
|
|
37
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-actions,
|
|
38
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-panel,
|
|
39
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-actions,
|
|
40
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-panel,
|
|
41
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-actions,
|
|
42
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-panel,
|
|
43
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-actions,
|
|
44
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-panel,
|
|
45
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-actions,
|
|
46
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-panel {
|
|
24
47
|
display: none !important;
|
|
25
48
|
}
|
|
26
49
|
|
package/dist/stores/editor.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { productPairs as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
Object.entries(
|
|
5
|
-
$.querySelectorAll(".ins-product-td").forEach((
|
|
6
|
-
const E =
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
const
|
|
1
|
+
import { productPairs as P } from "../extensions/Blocks/Items/enums/productEnums.js";
|
|
2
|
+
function L(F) {
|
|
3
|
+
const R = F.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), $ = new DOMParser().parseFromString(R, "text/html"), y = P.PAIRS_FOR_EXTENSION;
|
|
4
|
+
Object.entries(y).forEach(([n, l]) => {
|
|
5
|
+
$.querySelectorAll(".ins-product-td").forEach((c) => {
|
|
6
|
+
const E = c.getAttribute("data-number") || "1", T = c.getAttribute("data-type") || "CART_ITEMS";
|
|
7
|
+
c.querySelectorAll(`[product-attr="${n}"]`).forEach((e) => {
|
|
8
|
+
var H;
|
|
9
|
+
const b = e.getAttribute("data-type") || T, u = e.getAttribute("data-number") || E, p = l[b];
|
|
10
10
|
if (p)
|
|
11
11
|
switch (n) {
|
|
12
12
|
case "imageSrc": {
|
|
13
|
-
let t = null,
|
|
14
|
-
if (e.tagName === "IMG" ? (t = e,
|
|
13
|
+
let t = null, o = null;
|
|
14
|
+
if (e.tagName === "IMG" ? (t = e, o = t.closest("a")) : (t = e.querySelector("img"), o = e.querySelector("a") || e.closest("a")), !t)
|
|
15
15
|
break;
|
|
16
16
|
const i = p.DEFAULT, a = p.ATTR;
|
|
17
17
|
if (i && t.src) {
|
|
18
18
|
const r = t.src;
|
|
19
|
-
i.some((
|
|
20
|
-
const s =
|
|
21
|
-
return r.includes(
|
|
19
|
+
i.some((f) => {
|
|
20
|
+
const s = f.split("/").pop() || "", _ = r.split("/").pop() || "";
|
|
21
|
+
return r.includes(f) || r.includes(s) || _ === s;
|
|
22
22
|
}) && (t.src = `{{${a}_${u}}}`);
|
|
23
23
|
}
|
|
24
|
-
if (
|
|
25
|
-
const r = (
|
|
24
|
+
if (o) {
|
|
25
|
+
const r = (H = y.itemLink) == null ? void 0 : H[b];
|
|
26
26
|
if (r) {
|
|
27
|
-
const
|
|
28
|
-
(s === "#" || s === "" || s.endsWith("#!") || s.endsWith(
|
|
27
|
+
const d = r.HREF, f = r.DEFAULT_HREF || "#!", s = o.href;
|
|
28
|
+
(s === "#" || s === "" || s.endsWith("#!") || s.endsWith(f) || s === `${window.location.href}${f}` || !s || s === window.location.href) && (o.href = `{{${d}_${u}}}`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
case "name": {
|
|
34
|
-
const t = p,
|
|
35
|
-
e.textContent && (e.textContent = `{{${
|
|
34
|
+
const t = p, o = t.ATTR, i = t.DEFAULT_HREF || "#!", a = t.HREF;
|
|
35
|
+
e.textContent && (e.textContent = `{{${o}_${u}}}`);
|
|
36
36
|
const r = e.closest("a") || (e.tagName === "A" ? e : null);
|
|
37
37
|
if (r && a) {
|
|
38
|
-
const
|
|
39
|
-
(
|
|
38
|
+
const d = r.href, f = `${window.location.href}${i}`;
|
|
39
|
+
(d === f || d.endsWith(i)) && (r.href = `{{${a}_${u}}}`);
|
|
40
40
|
}
|
|
41
41
|
break;
|
|
42
42
|
}
|
|
43
43
|
case "price":
|
|
44
44
|
case "originalPrice": {
|
|
45
|
-
const t = p,
|
|
46
|
-
let
|
|
47
|
-
r ?
|
|
45
|
+
const t = p, o = e.getAttribute("data-formated"), i = e.getAttribute("data-single_price"), a = o === "true", r = i === "true", d = e.getAttribute("data-curency") || "before";
|
|
46
|
+
let f;
|
|
47
|
+
r ? f = a ? t.SINGLE_PRICE_FORMATTED : t.SINGLE_PRICE : f = a ? t.PRICE_FORMATTED : t.PRICE;
|
|
48
48
|
const s = t.CURRENCY;
|
|
49
|
-
let _ = `{{${
|
|
49
|
+
let _ = `{{${f}_${u}}}`;
|
|
50
50
|
if (s) {
|
|
51
|
-
const
|
|
52
|
-
_ =
|
|
51
|
+
const k = `{{${s}_${u}}}`;
|
|
52
|
+
_ = d === "after" ? `${_} ${k}` : `${k} ${_}`;
|
|
53
53
|
}
|
|
54
54
|
e.textContent = _;
|
|
55
55
|
break;
|
|
56
56
|
}
|
|
57
57
|
case "quantity": {
|
|
58
|
-
const t = p,
|
|
59
|
-
e.textContent && e.textContent.trim() === i && (e.textContent = `{{${
|
|
58
|
+
const t = p, o = t.ATTR, i = t.DEFAULT;
|
|
59
|
+
e.textContent && e.textContent.trim() === i && (e.textContent = `{{${o}_${u}}}`);
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
case "button": {
|
|
63
|
-
const t = p,
|
|
63
|
+
const t = p, o = t.HREF, i = t.DEFAULT_HREF || "#!", a = e.tagName === "A" ? e : e.querySelector("a");
|
|
64
64
|
if (a) {
|
|
65
|
-
const r = a.href || "",
|
|
66
|
-
(r === "" || r === "#" || r ===
|
|
65
|
+
const r = a.href || "", d = `${window.location.href}${i}`;
|
|
66
|
+
(r === "" || r === "#" || r === d || r.endsWith(i) || r.endsWith("#!") || r === window.location.href) && (a.href = `{{${o}_${u}}}`);
|
|
67
67
|
}
|
|
68
68
|
break;
|
|
69
69
|
}
|
|
70
70
|
case "itemLink": {
|
|
71
|
-
const t = p,
|
|
71
|
+
const t = p, o = t.HREF, i = t.DEFAULT_HREF || "#!", a = e;
|
|
72
72
|
if (a.href) {
|
|
73
|
-
const r = a.href,
|
|
74
|
-
(r ===
|
|
73
|
+
const r = a.href, d = `${window.location.href}${i}`;
|
|
74
|
+
(r === d || r.endsWith(i)) && (a.href = `{{${o}_${u}}}`);
|
|
75
75
|
}
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
@@ -86,44 +86,45 @@ function P(k) {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
const S = R.match(/<!DOCTYPE[^>]*>/i), I = S ? `${S[0]}
|
|
90
|
+
` : "", w = $.querySelectorAll(".ins-product-td"), m = [];
|
|
91
|
+
w.forEach((n) => {
|
|
92
|
+
const l = n.getAttribute("data-type") || "CART_ITEMS", A = n.getAttribute("data-number") || "1", c = n.getAttribute("data-nodup"), E = n.outerHTML;
|
|
93
|
+
m.push({
|
|
93
94
|
element: n,
|
|
94
95
|
outerHtml: E,
|
|
95
96
|
type: l,
|
|
96
97
|
number: A,
|
|
97
|
-
nodup:
|
|
98
|
+
nodup: c || void 0
|
|
98
99
|
});
|
|
99
100
|
});
|
|
100
|
-
let h = $.
|
|
101
|
-
|
|
102
|
-
let
|
|
101
|
+
let h = I + $.documentElement.outerHTML;
|
|
102
|
+
m.reverse().forEach(({ outerHtml: n, type: l, number: A }) => {
|
|
103
|
+
let c = "";
|
|
103
104
|
switch (l) {
|
|
104
105
|
case "CART_ITEMS":
|
|
105
|
-
|
|
106
|
+
c = "ins_apr_total_product_kind";
|
|
106
107
|
break;
|
|
107
108
|
case "BROWSED_ITEMS":
|
|
108
|
-
|
|
109
|
+
c = "browsed_item_total_product_kind";
|
|
109
110
|
break;
|
|
110
111
|
case "PURCHASED_ITEMS":
|
|
111
|
-
|
|
112
|
+
c = "purchased_item_total_product_kind";
|
|
112
113
|
break;
|
|
113
114
|
}
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
116
|
-
h = h.replace(n,
|
|
115
|
+
if (c) {
|
|
116
|
+
const T = parseInt(A) - 1, b = `${`{% if ${c} > ${T} %}`}${n}{% endif %}`;
|
|
117
|
+
h = h.replace(n, b);
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
|
-
const
|
|
120
|
-
return
|
|
120
|
+
const M = $.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), g = [];
|
|
121
|
+
return M.forEach((n) => {
|
|
121
122
|
const l = n.getAttribute("data-number"), A = n.getAttribute("data-type");
|
|
122
123
|
if (!l || A !== "CART_ITEMS")
|
|
123
124
|
return;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
const E =
|
|
125
|
+
const c = n.closest(".product-original-price-class");
|
|
126
|
+
if (c) {
|
|
127
|
+
const E = c.outerHTML;
|
|
127
128
|
g.some((C) => C.tdOuterHtml === E) || g.push({ tdOuterHtml: E, number: l });
|
|
128
129
|
}
|
|
129
130
|
}), g.reverse().forEach(({ tdOuterHtml: n, number: l }) => {
|
|
@@ -135,5 +136,5 @@ function P(k) {
|
|
|
135
136
|
}), h.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
136
137
|
}
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
+
L as pairProductVariables
|
|
139
140
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useHtmlCompiler as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useActionsApi as f } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useHtmlCompiler as C } from "../composables/useHtmlCompiler.js";
|
|
3
|
+
import { useRecommendationExtensionStore as T } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { useDynamicContentStore as x } from "../stores/dynamic-content.js";
|
|
5
|
+
import { useUnsubscribeStore as y } from "../stores/unsubscribe.js";
|
|
6
|
+
const E = () => {
|
|
7
|
+
const o = x(), t = y(), { getCompiledEmail: i, getTemplateData: n, editorSave: s } = f(), { compileHtml: m } = C();
|
|
7
8
|
return {
|
|
8
9
|
prepareTemplateDetails: async () => {
|
|
9
|
-
const { html:
|
|
10
|
+
const { html: a, ampHtml: r = "", ampErrors: c = [] } = await i({
|
|
10
11
|
minimize: !0,
|
|
11
12
|
resetDataSavedFlag: !1
|
|
12
|
-
}), { html: l, css: p, syncModulesIds: u = [] } = await
|
|
13
|
-
return
|
|
13
|
+
}), { html: l, css: p, syncModulesIds: u = [] } = await n(), { compiledHtml: d, stats: e, appliedRules: S } = m(a), g = o.getSelectedDynamicContentList, b = T();
|
|
14
|
+
return s(), console.debug("HTML Compilation Stats:", {
|
|
14
15
|
originalSize: e.originalSize,
|
|
15
16
|
compiledSize: e.compiledSize,
|
|
16
17
|
reduction: `${e.reductionPercentage.toFixed(2)}%`,
|
|
17
|
-
appliedRules:
|
|
18
|
+
appliedRules: S,
|
|
18
19
|
executionTime: `${e.executionTime.toFixed(2)}ms`
|
|
19
20
|
}), {
|
|
20
|
-
dynamicContentList:
|
|
21
|
+
dynamicContentList: g,
|
|
21
22
|
compiledHtml: d,
|
|
22
23
|
rawHtml: l,
|
|
23
24
|
css: p,
|
|
24
|
-
ampHtml:
|
|
25
|
+
ampHtml: r,
|
|
25
26
|
ampErrors: c,
|
|
26
27
|
modules: u,
|
|
27
28
|
recommendation: {
|
|
28
|
-
campaignUrls:
|
|
29
|
+
campaignUrls: b.recommendationCampaignUrls,
|
|
29
30
|
configs: {}
|
|
30
31
|
},
|
|
31
32
|
unsubscribe: {
|
|
@@ -37,5 +38,5 @@ const P = () => {
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
E as useTemplatePreparation
|
|
41
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.65ad66c",
|
|
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",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { UNSUBSCRIBE_SYNC_MODULE_TYPES as S } from "../enums/unsubscribe.js";
|
|
2
|
-
import { DATA_ATTRIBUTES as a } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
3
|
-
import { useEditorStore as d } from "../stores/editor.js";
|
|
4
|
-
const T = ".esd-synchronizable-module", m = '[esd-extension-block-id="unsubscribe-block"]', A = "esd-custom-block-id", M = () => {
|
|
5
|
-
const l = d();
|
|
6
|
-
return { extractSyncModuleUnsubscribeData: (p) => {
|
|
7
|
-
if (!l.syncModulesEnabled)
|
|
8
|
-
return [];
|
|
9
|
-
const E = new DOMParser().parseFromString(p, "text/html").querySelectorAll(T), e = [];
|
|
10
|
-
return E.forEach((r) => {
|
|
11
|
-
const s = r.getAttribute(A);
|
|
12
|
-
if (!s)
|
|
13
|
-
return;
|
|
14
|
-
r.querySelectorAll(m).forEach((o) => {
|
|
15
|
-
const n = o.getAttribute(a.PAGE_LIST), c = o.getAttribute(a.PAGE_TYPE);
|
|
16
|
-
if (!n || !c)
|
|
17
|
-
return;
|
|
18
|
-
const b = parseInt(c), u = S[b];
|
|
19
|
-
if (!u)
|
|
20
|
-
return;
|
|
21
|
-
const i = n.split(",").map((t) => parseInt(t.trim())).filter((t) => !Number.isNaN(t));
|
|
22
|
-
i.length !== 0 && e.push({
|
|
23
|
-
stripoModuleId: s,
|
|
24
|
-
unsubscriptionPreferencePages: i,
|
|
25
|
-
type: u
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}), e;
|
|
29
|
-
} };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
M as useSyncModuleExtractor
|
|
33
|
-
};
|