@useinsider/guido 3.24.0-beta.89982ef → 3.24.0-beta.9312ed2
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 +2 -1
- package/dist/@types/config/schemas.js +49 -47
- package/dist/components/Guido.vue.js +2 -2
- package/dist/components/Guido.vue2.js +81 -85
- package/dist/composables/useActionsApi.js +2 -2
- package/dist/composables/useBlocksConfig.js +20 -31
- package/dist/composables/useEditorTrackingIds.js +49 -0
- package/dist/composables/useModuleRepair.js +14 -12
- package/dist/composables/useSave.js +57 -52
- package/dist/composables/useSaveValidation.js +118 -110
- package/dist/composables/useTranslations.js +1 -2
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +48 -33
- package/dist/config/compiler/utils/itemsCompilerUtils.js +42 -43
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +64 -67
- package/dist/config/migrator/index.js +16 -15
- package/dist/config/migrator/itemsPriceFormatMigrator.js +20 -0
- package/dist/enums/academy.js +0 -1
- package/dist/enums/save-validation.js +1 -1
- package/dist/extensions/Blocks/Items/block.js +115 -77
- package/dist/extensions/Blocks/Items/constants/currency.js +59 -14
- package/dist/extensions/Blocks/Items/controls/blockBackground/index.js +11 -0
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +34 -23
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +62 -51
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +18 -17
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +42 -31
- package/dist/extensions/Blocks/Items/controls/priceFormat.js +135 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +141 -120
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/extension.js +15 -13
- package/dist/extensions/Blocks/Items/items.css.js +19 -0
- package/dist/extensions/Blocks/Items/settingsPanel.js +35 -25
- package/dist/extensions/Blocks/Items/template.js +250 -212
- package/dist/extensions/Blocks/Items/utils/priceFormatOps.js +185 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +10 -8
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +28 -24
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +23 -22
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +1 -0
- package/dist/extensions/Blocks/controlFactories.js +104 -104
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
- package/dist/node_modules/valibot/dist/index.js +261 -297
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +39 -36
- package/dist/src/@types/config/schemas.d.ts +8 -4
- package/dist/src/composables/useConfig.d.ts +4 -2
- package/dist/src/composables/useEditorTrackingIds.d.ts +7 -0
- package/dist/src/composables/useSaveValidation.d.ts +1 -1
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +4 -0
- package/dist/src/config/migrator/index.d.ts +4 -1
- package/dist/src/config/migrator/itemsPriceFormatMigrator.d.ts +1 -0
- package/dist/src/enums/academy.d.ts +0 -1
- package/dist/src/enums/save-validation.d.ts +2 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +6 -9
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +32 -0
- package/dist/src/extensions/Blocks/Items/controls/blockBackground/index.d.ts +15 -0
- package/dist/src/extensions/Blocks/Items/controls/priceFormat.d.ts +24 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +4 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/utils/priceFormatOps.d.ts +66 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +12 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +1 -1
- package/dist/src/stores/config.d.ts +40 -167
- package/dist/src/utils/itemsCurrencyRepair.d.ts +5 -1
- package/dist/src/utils/linkTrackingIds.d.ts +24 -22
- package/dist/static/styles/variables.css.js +0 -1
- package/dist/stores/config.js +6 -13
- package/dist/utils/itemsCurrencyRepair.js +29 -24
- package/dist/utils/linkTrackingIds.js +72 -72
- package/dist/utils/pairProductVariables.js +119 -100
- package/dist/utils/templatePreparation.js +59 -72
- package/package.json +1 -1
- package/dist/@types/display-condition.js +0 -25
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -17
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -41
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -81
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +0 -17
- package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +0 -45
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -36
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -63
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
- package/dist/composables/useDisplayConditions.js +0 -117
- package/dist/enums/display-condition.js +0 -12
- package/dist/extensions/DisplayConditions/bridge.js +0 -25
- package/dist/extensions/DisplayConditions/constants.js +0 -26
- package/dist/extensions/DisplayConditions/control.js +0 -215
- package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -226
- package/dist/extensions/DisplayConditions/extension.js +0 -28
- package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
- package/dist/extensions/DisplayConditions/library.js +0 -30
- package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
- package/dist/extensions/LinkTracking/extension.js +0 -17
- package/dist/extensions/LinkTracking/writer.js +0 -41
- package/dist/services/displayConditionApi.js +0 -39
- package/dist/src/@types/display-condition.d.ts +0 -61
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +0 -18
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
- package/dist/src/composables/useDisplayConditions.d.ts +0 -18
- package/dist/src/enums/display-condition.d.ts +0 -15
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -7
- package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -23
- package/dist/src/extensions/DisplayConditions/control.d.ts +0 -25
- package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
- package/dist/src/extensions/LinkTracking/extension.d.ts +0 -2
- package/dist/src/extensions/LinkTracking/writer.d.ts +0 -13
- package/dist/src/mock/api/display-conditions.d.ts +0 -2
- package/dist/src/services/displayConditionApi.d.ts +0 -8
- package/dist/src/stores/display-condition.d.ts +0 -86
- package/dist/src/utils/displayCondition.d.ts +0 -11
- package/dist/src/utils/protectTableText.d.ts +0 -2
- package/dist/stores/display-condition.js +0 -29
- package/dist/utils/displayCondition.js +0 -29
- package/dist/utils/protectTableText.js +0 -22
|
@@ -94,7 +94,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
94
94
|
ui: {
|
|
95
95
|
showHeader: boolean;
|
|
96
96
|
backButtonLabel?: string | undefined;
|
|
97
|
-
externalDisplayConditions: boolean;
|
|
98
97
|
};
|
|
99
98
|
features: {
|
|
100
99
|
dynamicContent: boolean;
|
|
@@ -111,6 +110,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
111
110
|
linkTrackingIds: boolean;
|
|
112
111
|
allowSaveWithErrors: boolean;
|
|
113
112
|
reusableRecommendationStrategy: boolean;
|
|
113
|
+
itemsPriceFormatting: boolean;
|
|
114
|
+
blockUnsubscribeLinks: boolean;
|
|
114
115
|
};
|
|
115
116
|
blocks: {
|
|
116
117
|
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")[];
|
|
@@ -241,7 +242,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
241
242
|
ui: {
|
|
242
243
|
showHeader: boolean;
|
|
243
244
|
backButtonLabel?: string | undefined;
|
|
244
|
-
externalDisplayConditions: boolean;
|
|
245
245
|
};
|
|
246
246
|
features: {
|
|
247
247
|
dynamicContent: boolean;
|
|
@@ -258,6 +258,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
258
258
|
linkTrackingIds: boolean;
|
|
259
259
|
allowSaveWithErrors: boolean;
|
|
260
260
|
reusableRecommendationStrategy: boolean;
|
|
261
|
+
itemsPriceFormatting: boolean;
|
|
262
|
+
blockUnsubscribeLinks: boolean;
|
|
261
263
|
};
|
|
262
264
|
blocks: {
|
|
263
265
|
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")[];
|
|
@@ -388,7 +390,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
388
390
|
ui: {
|
|
389
391
|
showHeader: boolean;
|
|
390
392
|
backButtonLabel?: string | undefined;
|
|
391
|
-
externalDisplayConditions: boolean;
|
|
392
393
|
};
|
|
393
394
|
features: {
|
|
394
395
|
dynamicContent: boolean;
|
|
@@ -405,6 +406,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
405
406
|
linkTrackingIds: boolean;
|
|
406
407
|
allowSaveWithErrors: boolean;
|
|
407
408
|
reusableRecommendationStrategy: boolean;
|
|
409
|
+
itemsPriceFormatting: boolean;
|
|
410
|
+
blockUnsubscribeLinks: boolean;
|
|
408
411
|
};
|
|
409
412
|
blocks: {
|
|
410
413
|
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")[];
|
|
@@ -535,7 +538,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
535
538
|
ui: {
|
|
536
539
|
showHeader: boolean;
|
|
537
540
|
backButtonLabel?: string | undefined;
|
|
538
|
-
externalDisplayConditions: boolean;
|
|
539
541
|
};
|
|
540
542
|
features: {
|
|
541
543
|
dynamicContent: boolean;
|
|
@@ -552,6 +554,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
552
554
|
linkTrackingIds: boolean;
|
|
553
555
|
allowSaveWithErrors: boolean;
|
|
554
556
|
reusableRecommendationStrategy: boolean;
|
|
557
|
+
itemsPriceFormatting: boolean;
|
|
558
|
+
blockUnsubscribeLinks: boolean;
|
|
555
559
|
};
|
|
556
560
|
blocks: {
|
|
557
561
|
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")[];
|
|
@@ -682,7 +686,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
682
686
|
ui: {
|
|
683
687
|
showHeader: boolean;
|
|
684
688
|
backButtonLabel?: string | undefined;
|
|
685
|
-
externalDisplayConditions: boolean;
|
|
686
689
|
};
|
|
687
690
|
features: {
|
|
688
691
|
dynamicContent: boolean;
|
|
@@ -699,6 +702,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
699
702
|
linkTrackingIds: boolean;
|
|
700
703
|
allowSaveWithErrors: boolean;
|
|
701
704
|
reusableRecommendationStrategy: boolean;
|
|
705
|
+
itemsPriceFormatting: boolean;
|
|
706
|
+
blockUnsubscribeLinks: boolean;
|
|
702
707
|
};
|
|
703
708
|
blocks: {
|
|
704
709
|
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")[];
|
|
@@ -829,7 +834,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
829
834
|
ui: {
|
|
830
835
|
showHeader: boolean;
|
|
831
836
|
backButtonLabel?: string | undefined;
|
|
832
|
-
externalDisplayConditions: boolean;
|
|
833
837
|
};
|
|
834
838
|
features: {
|
|
835
839
|
dynamicContent: boolean;
|
|
@@ -846,6 +850,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
846
850
|
linkTrackingIds: boolean;
|
|
847
851
|
allowSaveWithErrors: boolean;
|
|
848
852
|
reusableRecommendationStrategy: boolean;
|
|
853
|
+
itemsPriceFormatting: boolean;
|
|
854
|
+
blockUnsubscribeLinks: boolean;
|
|
849
855
|
};
|
|
850
856
|
blocks: {
|
|
851
857
|
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")[];
|
|
@@ -976,7 +982,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
976
982
|
ui: {
|
|
977
983
|
showHeader: boolean;
|
|
978
984
|
backButtonLabel?: string | undefined;
|
|
979
|
-
externalDisplayConditions: boolean;
|
|
980
985
|
};
|
|
981
986
|
features: {
|
|
982
987
|
dynamicContent: boolean;
|
|
@@ -993,6 +998,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
993
998
|
linkTrackingIds: boolean;
|
|
994
999
|
allowSaveWithErrors: boolean;
|
|
995
1000
|
reusableRecommendationStrategy: boolean;
|
|
1001
|
+
itemsPriceFormatting: boolean;
|
|
1002
|
+
blockUnsubscribeLinks: boolean;
|
|
996
1003
|
};
|
|
997
1004
|
blocks: {
|
|
998
1005
|
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")[];
|
|
@@ -1123,7 +1130,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1123
1130
|
ui: {
|
|
1124
1131
|
showHeader: boolean;
|
|
1125
1132
|
backButtonLabel?: string | undefined;
|
|
1126
|
-
externalDisplayConditions: boolean;
|
|
1127
1133
|
};
|
|
1128
1134
|
features: {
|
|
1129
1135
|
dynamicContent: boolean;
|
|
@@ -1140,6 +1146,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1140
1146
|
linkTrackingIds: boolean;
|
|
1141
1147
|
allowSaveWithErrors: boolean;
|
|
1142
1148
|
reusableRecommendationStrategy: boolean;
|
|
1149
|
+
itemsPriceFormatting: boolean;
|
|
1150
|
+
blockUnsubscribeLinks: boolean;
|
|
1143
1151
|
};
|
|
1144
1152
|
blocks: {
|
|
1145
1153
|
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")[];
|
|
@@ -1270,7 +1278,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1270
1278
|
ui: {
|
|
1271
1279
|
showHeader: boolean;
|
|
1272
1280
|
backButtonLabel?: string | undefined;
|
|
1273
|
-
externalDisplayConditions: boolean;
|
|
1274
1281
|
};
|
|
1275
1282
|
features: {
|
|
1276
1283
|
dynamicContent: boolean;
|
|
@@ -1287,6 +1294,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1287
1294
|
linkTrackingIds: boolean;
|
|
1288
1295
|
allowSaveWithErrors: boolean;
|
|
1289
1296
|
reusableRecommendationStrategy: boolean;
|
|
1297
|
+
itemsPriceFormatting: boolean;
|
|
1298
|
+
blockUnsubscribeLinks: boolean;
|
|
1290
1299
|
};
|
|
1291
1300
|
blocks: {
|
|
1292
1301
|
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")[];
|
|
@@ -1417,7 +1426,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1417
1426
|
ui: {
|
|
1418
1427
|
showHeader: boolean;
|
|
1419
1428
|
backButtonLabel?: string | undefined;
|
|
1420
|
-
externalDisplayConditions: boolean;
|
|
1421
1429
|
};
|
|
1422
1430
|
features: {
|
|
1423
1431
|
dynamicContent: boolean;
|
|
@@ -1434,6 +1442,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1434
1442
|
linkTrackingIds: boolean;
|
|
1435
1443
|
allowSaveWithErrors: boolean;
|
|
1436
1444
|
reusableRecommendationStrategy: boolean;
|
|
1445
|
+
itemsPriceFormatting: boolean;
|
|
1446
|
+
blockUnsubscribeLinks: boolean;
|
|
1437
1447
|
};
|
|
1438
1448
|
blocks: {
|
|
1439
1449
|
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")[];
|
|
@@ -1564,7 +1574,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1564
1574
|
ui: {
|
|
1565
1575
|
showHeader: boolean;
|
|
1566
1576
|
backButtonLabel?: string | undefined;
|
|
1567
|
-
externalDisplayConditions: boolean;
|
|
1568
1577
|
};
|
|
1569
1578
|
features: {
|
|
1570
1579
|
dynamicContent: boolean;
|
|
@@ -1581,6 +1590,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1581
1590
|
linkTrackingIds: boolean;
|
|
1582
1591
|
allowSaveWithErrors: boolean;
|
|
1583
1592
|
reusableRecommendationStrategy: boolean;
|
|
1593
|
+
itemsPriceFormatting: boolean;
|
|
1594
|
+
blockUnsubscribeLinks: boolean;
|
|
1584
1595
|
};
|
|
1585
1596
|
blocks: {
|
|
1586
1597
|
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")[];
|
|
@@ -1711,7 +1722,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1711
1722
|
ui: {
|
|
1712
1723
|
showHeader: boolean;
|
|
1713
1724
|
backButtonLabel?: string | undefined;
|
|
1714
|
-
externalDisplayConditions: boolean;
|
|
1715
1725
|
};
|
|
1716
1726
|
features: {
|
|
1717
1727
|
dynamicContent: boolean;
|
|
@@ -1728,6 +1738,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1728
1738
|
linkTrackingIds: boolean;
|
|
1729
1739
|
allowSaveWithErrors: boolean;
|
|
1730
1740
|
reusableRecommendationStrategy: boolean;
|
|
1741
|
+
itemsPriceFormatting: boolean;
|
|
1742
|
+
blockUnsubscribeLinks: boolean;
|
|
1731
1743
|
};
|
|
1732
1744
|
blocks: {
|
|
1733
1745
|
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")[];
|
|
@@ -1858,7 +1870,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1858
1870
|
ui: {
|
|
1859
1871
|
showHeader: boolean;
|
|
1860
1872
|
backButtonLabel?: string | undefined;
|
|
1861
|
-
externalDisplayConditions: boolean;
|
|
1862
1873
|
};
|
|
1863
1874
|
features: {
|
|
1864
1875
|
dynamicContent: boolean;
|
|
@@ -1875,6 +1886,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1875
1886
|
linkTrackingIds: boolean;
|
|
1876
1887
|
allowSaveWithErrors: boolean;
|
|
1877
1888
|
reusableRecommendationStrategy: boolean;
|
|
1889
|
+
itemsPriceFormatting: boolean;
|
|
1890
|
+
blockUnsubscribeLinks: boolean;
|
|
1878
1891
|
};
|
|
1879
1892
|
blocks: {
|
|
1880
1893
|
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")[];
|
|
@@ -2005,7 +2018,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2005
2018
|
ui: {
|
|
2006
2019
|
showHeader: boolean;
|
|
2007
2020
|
backButtonLabel?: string | undefined;
|
|
2008
|
-
externalDisplayConditions: boolean;
|
|
2009
2021
|
};
|
|
2010
2022
|
features: {
|
|
2011
2023
|
dynamicContent: boolean;
|
|
@@ -2022,6 +2034,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2022
2034
|
linkTrackingIds: boolean;
|
|
2023
2035
|
allowSaveWithErrors: boolean;
|
|
2024
2036
|
reusableRecommendationStrategy: boolean;
|
|
2037
|
+
itemsPriceFormatting: boolean;
|
|
2038
|
+
blockUnsubscribeLinks: boolean;
|
|
2025
2039
|
};
|
|
2026
2040
|
blocks: {
|
|
2027
2041
|
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")[];
|
|
@@ -2152,7 +2166,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2152
2166
|
ui: {
|
|
2153
2167
|
showHeader: boolean;
|
|
2154
2168
|
backButtonLabel?: string | undefined;
|
|
2155
|
-
externalDisplayConditions: boolean;
|
|
2156
2169
|
};
|
|
2157
2170
|
features: {
|
|
2158
2171
|
dynamicContent: boolean;
|
|
@@ -2169,6 +2182,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2169
2182
|
linkTrackingIds: boolean;
|
|
2170
2183
|
allowSaveWithErrors: boolean;
|
|
2171
2184
|
reusableRecommendationStrategy: boolean;
|
|
2185
|
+
itemsPriceFormatting: boolean;
|
|
2186
|
+
blockUnsubscribeLinks: boolean;
|
|
2172
2187
|
};
|
|
2173
2188
|
blocks: {
|
|
2174
2189
|
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")[];
|
|
@@ -2299,7 +2314,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2299
2314
|
ui: {
|
|
2300
2315
|
showHeader: boolean;
|
|
2301
2316
|
backButtonLabel?: string | undefined;
|
|
2302
|
-
externalDisplayConditions: boolean;
|
|
2303
2317
|
};
|
|
2304
2318
|
features: {
|
|
2305
2319
|
dynamicContent: boolean;
|
|
@@ -2316,6 +2330,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2316
2330
|
linkTrackingIds: boolean;
|
|
2317
2331
|
allowSaveWithErrors: boolean;
|
|
2318
2332
|
reusableRecommendationStrategy: boolean;
|
|
2333
|
+
itemsPriceFormatting: boolean;
|
|
2334
|
+
blockUnsubscribeLinks: boolean;
|
|
2319
2335
|
};
|
|
2320
2336
|
blocks: {
|
|
2321
2337
|
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")[];
|
|
@@ -2446,7 +2462,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2446
2462
|
ui: {
|
|
2447
2463
|
showHeader: boolean;
|
|
2448
2464
|
backButtonLabel?: string | undefined;
|
|
2449
|
-
externalDisplayConditions: boolean;
|
|
2450
2465
|
};
|
|
2451
2466
|
features: {
|
|
2452
2467
|
dynamicContent: boolean;
|
|
@@ -2463,6 +2478,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2463
2478
|
linkTrackingIds: boolean;
|
|
2464
2479
|
allowSaveWithErrors: boolean;
|
|
2465
2480
|
reusableRecommendationStrategy: boolean;
|
|
2481
|
+
itemsPriceFormatting: boolean;
|
|
2482
|
+
blockUnsubscribeLinks: boolean;
|
|
2466
2483
|
};
|
|
2467
2484
|
blocks: {
|
|
2468
2485
|
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")[];
|
|
@@ -2605,7 +2622,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2605
2622
|
ui: {
|
|
2606
2623
|
showHeader: boolean;
|
|
2607
2624
|
backButtonLabel?: string | undefined;
|
|
2608
|
-
externalDisplayConditions: boolean;
|
|
2609
2625
|
};
|
|
2610
2626
|
features: {
|
|
2611
2627
|
dynamicContent: boolean;
|
|
@@ -2622,6 +2638,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2622
2638
|
linkTrackingIds: boolean;
|
|
2623
2639
|
allowSaveWithErrors: boolean;
|
|
2624
2640
|
reusableRecommendationStrategy: boolean;
|
|
2641
|
+
itemsPriceFormatting: boolean;
|
|
2642
|
+
blockUnsubscribeLinks: boolean;
|
|
2625
2643
|
};
|
|
2626
2644
|
blocks: {
|
|
2627
2645
|
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")[];
|
|
@@ -2752,154 +2770,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2752
2770
|
ui: {
|
|
2753
2771
|
showHeader: boolean;
|
|
2754
2772
|
backButtonLabel?: string | undefined;
|
|
2755
|
-
externalDisplayConditions: boolean;
|
|
2756
|
-
};
|
|
2757
|
-
features: {
|
|
2758
|
-
dynamicContent: boolean;
|
|
2759
|
-
saveAsTemplate: boolean;
|
|
2760
|
-
versionHistory: boolean;
|
|
2761
|
-
testMessage: boolean;
|
|
2762
|
-
displayConditions: boolean;
|
|
2763
|
-
unsubscribe: boolean;
|
|
2764
|
-
modulesDisabled: boolean;
|
|
2765
|
-
liquidSyntax: boolean;
|
|
2766
|
-
autosave: boolean;
|
|
2767
|
-
accessibilityTesting: boolean;
|
|
2768
|
-
allowlistEnabled: boolean;
|
|
2769
|
-
linkTrackingIds: boolean;
|
|
2770
|
-
allowSaveWithErrors: boolean;
|
|
2771
|
-
reusableRecommendationStrategy: boolean;
|
|
2772
|
-
};
|
|
2773
|
-
blocks: {
|
|
2774
|
-
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")[];
|
|
2775
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
2776
|
-
};
|
|
2777
|
-
compiler: {
|
|
2778
|
-
customRules: ({
|
|
2779
|
-
type: "replace";
|
|
2780
|
-
search: string;
|
|
2781
|
-
replacement: string;
|
|
2782
|
-
replaceAll?: boolean | undefined;
|
|
2783
|
-
id: string;
|
|
2784
|
-
description?: string | undefined;
|
|
2785
|
-
priority: number;
|
|
2786
|
-
} | {
|
|
2787
|
-
type: "regex";
|
|
2788
|
-
pattern: string;
|
|
2789
|
-
replacement: string;
|
|
2790
|
-
flags?: string | undefined;
|
|
2791
|
-
id: string;
|
|
2792
|
-
description?: string | undefined;
|
|
2793
|
-
priority: number;
|
|
2794
|
-
} | {
|
|
2795
|
-
type: "remove";
|
|
2796
|
-
targets: string[];
|
|
2797
|
-
id: string;
|
|
2798
|
-
description?: string | undefined;
|
|
2799
|
-
priority: number;
|
|
2800
|
-
} | {
|
|
2801
|
-
type: "custom";
|
|
2802
|
-
processor: (html: string) => string;
|
|
2803
|
-
id: string;
|
|
2804
|
-
description?: string | undefined;
|
|
2805
|
-
priority: number;
|
|
2806
|
-
})[];
|
|
2807
|
-
ignoreDefaultRules: boolean;
|
|
2808
|
-
};
|
|
2809
|
-
callbacks: {
|
|
2810
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2811
|
-
};
|
|
2812
|
-
} | null;
|
|
2813
|
-
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
2814
|
-
/**
|
|
2815
|
-
* Check if the Insider display-condition UI replaces Stripo's
|
|
2816
|
-
*/
|
|
2817
|
-
externalDisplayConditions: (state: {
|
|
2818
|
-
initialized: boolean;
|
|
2819
|
-
config: {
|
|
2820
|
-
identity: {
|
|
2821
|
-
templateId: string;
|
|
2822
|
-
userId: string;
|
|
2823
|
-
variationId?: string | undefined;
|
|
2824
|
-
campaignId?: string | undefined;
|
|
2825
|
-
templateLibraryId?: string | undefined;
|
|
2826
|
-
};
|
|
2827
|
-
partner: {
|
|
2828
|
-
name: string;
|
|
2829
|
-
productType: 60 | 49 | 97;
|
|
2830
|
-
messageType: 1 | 2;
|
|
2831
|
-
username: string;
|
|
2832
|
-
fallbackFont?: {
|
|
2833
|
-
name: string;
|
|
2834
|
-
family: string;
|
|
2835
|
-
} | undefined;
|
|
2836
|
-
};
|
|
2837
|
-
template: {
|
|
2838
|
-
html: string;
|
|
2839
|
-
css: string;
|
|
2840
|
-
preselectedDynamicContent: {
|
|
2841
|
-
text: string;
|
|
2842
|
-
value: string;
|
|
2843
|
-
fallback?: string | undefined;
|
|
2844
|
-
format?: {
|
|
2845
|
-
key: string;
|
|
2846
|
-
value: string;
|
|
2847
|
-
} | undefined;
|
|
2848
|
-
}[];
|
|
2849
|
-
dynamicContentList: {
|
|
2850
|
-
[x: string]: import("../library").DynamicContentNode[];
|
|
2851
|
-
};
|
|
2852
|
-
customFieldAttributes: string[];
|
|
2853
|
-
selectedUnsubscribePages: number[];
|
|
2854
|
-
forceRecreate: boolean;
|
|
2855
|
-
trackIdCounter: number;
|
|
2856
|
-
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2857
|
-
migration: {
|
|
2858
|
-
recommendationConfigs: {
|
|
2859
|
-
[x: string]: {
|
|
2860
|
-
id?: number | undefined;
|
|
2861
|
-
decimalCount?: string | number | undefined;
|
|
2862
|
-
productIds?: unknown[] | undefined;
|
|
2863
|
-
sendProductRequestFlag?: boolean | undefined;
|
|
2864
|
-
shuffleProducts?: boolean | undefined;
|
|
2865
|
-
filters?: unknown[] | undefined;
|
|
2866
|
-
currency?: string | undefined;
|
|
2867
|
-
currencySettings?: unknown;
|
|
2868
|
-
language?: string | undefined;
|
|
2869
|
-
strategy?: string | undefined;
|
|
2870
|
-
recommendedProducts?: unknown[] | undefined;
|
|
2871
|
-
cardsInRow?: number | undefined;
|
|
2872
|
-
mobileRightPadding?: number | undefined;
|
|
2873
|
-
mobileLeftPadding?: number | undefined;
|
|
2874
|
-
unresponsive?: boolean | undefined;
|
|
2875
|
-
orientation?: string | undefined;
|
|
2876
|
-
textTrimming?: boolean | undefined;
|
|
2877
|
-
blockType?: string | undefined;
|
|
2878
|
-
size?: string | number | undefined;
|
|
2879
|
-
verticalResponsiveness?: boolean | undefined;
|
|
2880
|
-
isPriceMovedToNextLine?: boolean | undefined;
|
|
2881
|
-
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
2882
|
-
} & {
|
|
2883
|
-
[key: string]: unknown;
|
|
2884
|
-
};
|
|
2885
|
-
};
|
|
2886
|
-
};
|
|
2887
|
-
};
|
|
2888
|
-
editor: {
|
|
2889
|
-
locale: string;
|
|
2890
|
-
translationsPath: string;
|
|
2891
|
-
migrationDate: number;
|
|
2892
|
-
emailHeader: {
|
|
2893
|
-
senderName: string;
|
|
2894
|
-
subject: string;
|
|
2895
|
-
};
|
|
2896
|
-
savedModulesFolderName: string;
|
|
2897
|
-
defaultModulesFolderName: string;
|
|
2898
|
-
};
|
|
2899
|
-
ui: {
|
|
2900
|
-
showHeader: boolean;
|
|
2901
|
-
backButtonLabel?: string | undefined;
|
|
2902
|
-
externalDisplayConditions: boolean;
|
|
2903
2773
|
};
|
|
2904
2774
|
features: {
|
|
2905
2775
|
dynamicContent: boolean;
|
|
@@ -2916,6 +2786,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2916
2786
|
linkTrackingIds: boolean;
|
|
2917
2787
|
allowSaveWithErrors: boolean;
|
|
2918
2788
|
reusableRecommendationStrategy: boolean;
|
|
2789
|
+
itemsPriceFormatting: boolean;
|
|
2790
|
+
blockUnsubscribeLinks: boolean;
|
|
2919
2791
|
};
|
|
2920
2792
|
blocks: {
|
|
2921
2793
|
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")[];
|
|
@@ -3048,7 +2920,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
3048
2920
|
ui: {
|
|
3049
2921
|
showHeader: boolean;
|
|
3050
2922
|
backButtonLabel?: string | undefined;
|
|
3051
|
-
externalDisplayConditions: boolean;
|
|
3052
2923
|
};
|
|
3053
2924
|
features: {
|
|
3054
2925
|
dynamicContent: boolean;
|
|
@@ -3065,6 +2936,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
3065
2936
|
linkTrackingIds: boolean;
|
|
3066
2937
|
allowSaveWithErrors: boolean;
|
|
3067
2938
|
reusableRecommendationStrategy: boolean;
|
|
2939
|
+
itemsPriceFormatting: boolean;
|
|
2940
|
+
blockUnsubscribeLinks: boolean;
|
|
3068
2941
|
};
|
|
3069
2942
|
blocks: {
|
|
3070
2943
|
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")[];
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export interface ItemsCurrencyRepairOptions {
|
|
2
|
+
/** Convert legacy-model blocks to the root price-format contract (itemsPriceFormatting). */
|
|
3
|
+
convertToPriceFormat?: boolean;
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* Heals stale price currency attributes on every v2 Items block inside a dropped
|
|
3
7
|
* saved module, driving `data-curency` / `data-currency_symbol` from each block's
|
|
@@ -14,4 +18,4 @@
|
|
|
14
18
|
* recommendationMigrator wraps). If the wrap fails to capture the blocks (non-`<td>`
|
|
15
19
|
* root foster-parented out), it bails to the original string.
|
|
16
20
|
*/
|
|
17
|
-
export declare function repairItemsCurrencyAttributes(html: string): string;
|
|
21
|
+
export declare function repairItemsCurrencyAttributes(html: string, { convertToPriceFormat }?: ItemsCurrencyRepairOptions): string;
|
|
@@ -10,13 +10,6 @@ export interface TrackingIdResult {
|
|
|
10
10
|
changed: boolean;
|
|
11
11
|
nextSeq: number;
|
|
12
12
|
}
|
|
13
|
-
export interface TrackingIdPlan {
|
|
14
|
-
/** Anchor index in document order → id to write. Anchors keeping their id are absent. */
|
|
15
|
-
assignments: Map<number, number>;
|
|
16
|
-
nextSeq: number;
|
|
17
|
-
seqChanged: boolean;
|
|
18
|
-
changed: boolean;
|
|
19
|
-
}
|
|
20
13
|
/**
|
|
21
14
|
* Reads the persisted id high-water mark: <body> attr, then <html> attr,
|
|
22
15
|
* then the leading comment fallback. Returns 0 when absent.
|
|
@@ -27,21 +20,30 @@ export declare function readTrackSeq(html: string): number;
|
|
|
27
20
|
* Scans the document because a rewrite can strip the seq host but keep the ids.
|
|
28
21
|
*/
|
|
29
22
|
export declare function readTrackFloor(html: string, persistedCounter?: number): number;
|
|
23
|
+
export interface TrackingIdPlan {
|
|
24
|
+
/** Final id per anchor, in the order the raw values were given. */
|
|
25
|
+
ids: number[];
|
|
26
|
+
reassigned: boolean[];
|
|
27
|
+
nextSeq: number;
|
|
28
|
+
seqChanged: boolean;
|
|
29
|
+
changed: boolean;
|
|
30
|
+
}
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
32
|
+
* The id rule shared by the string transform and the editor-model writer: `rawIds` are the
|
|
33
|
+
* anchors' current `data-ins-track-id` values in document order ('' when absent).
|
|
34
|
+
*/
|
|
35
|
+
export declare function planTrackingIds(rawIds: readonly string[], persistedSeq: number, floor?: number): TrackingIdPlan;
|
|
36
|
+
/** Reads a `data-ins-track-seq` attribute value the way readTrackSeq reads it from HTML. */
|
|
37
|
+
export declare function parseTrackSeq(value: string | null): number;
|
|
38
|
+
/** The `data-ins-track-id` value of every `<a>` opening tag in `html`, in order ('' when absent). */
|
|
39
|
+
export declare function readAnchorTrackIds(html: string): string[];
|
|
40
|
+
/** Writes `ids[i]` onto the i-th `<a>` opening tag of `html`; `null` or a missing entry leaves it untouched. */
|
|
41
|
+
export declare function writeAnchorTrackIds(html: string, ids: readonly (number | null)[]): string;
|
|
42
|
+
/**
|
|
43
|
+
* Ensures every <a> opening tag carries a unique positive-integer id and the
|
|
44
|
+
* document records the id high-water mark. Ids are minted above
|
|
45
|
+
* max(persisted seq, max id in document, floor) so deleted ids are never
|
|
46
|
+
* reused — even after a version restore or paste-over (floor = session floor).
|
|
47
|
+
* Idempotent: a document already normalized returns changed=false.
|
|
33
48
|
*/
|
|
34
|
-
export declare function planTrackingIds(rawIds: (string | null)[], persistedSeq: number, floor?: number): TrackingIdPlan;
|
|
35
|
-
export interface DocumentTrackingIdPlan {
|
|
36
|
-
/** data-ins-track-id per anchor in document order; '' when absent. */
|
|
37
|
-
anchorIds: string[];
|
|
38
|
-
/** Per anchor: inside an HTML comment (e.g. Stripo's `<!--[if mso]>` button copy), absent from the node tree. */
|
|
39
|
-
inComment: boolean[];
|
|
40
|
-
plan: TrackingIdPlan;
|
|
41
|
-
}
|
|
42
|
-
/** Plans the ids for an HTML document without rewriting it. */
|
|
43
|
-
export declare function planDocumentTrackingIds(html: string, floor?: number): DocumentTrackingIdPlan;
|
|
44
|
-
/** Writes a plan into the HTML string: anchor ids by document order, then the seq host. */
|
|
45
|
-
export declare function renderTrackingIdPlan(html: string, { plan }: DocumentTrackingIdPlan): string;
|
|
46
|
-
/** Gives every <a> a unique positive-integer id and records the high-water mark; idempotent. */
|
|
47
49
|
export declare function assignTrackingIds(html: string, floor?: number): TrackingIdResult;
|
|
@@ -12,7 +12,6 @@ const o = `:host {
|
|
|
12
12
|
--guido-color-gray-100: #F5F5F5;
|
|
13
13
|
--guido-color-gray-1: #F0F0F0;
|
|
14
14
|
--guido-color-gray-0: #F9F9F9;
|
|
15
|
-
--guido-color-neutral-900: #0A0F19;
|
|
16
15
|
--guido-color-neutral-800: #222938;
|
|
17
16
|
--guido-color-neutral-700: #2C3546;
|
|
18
17
|
--guido-color-neutral-500: #5D6980;
|
package/dist/stores/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MessageType as
|
|
1
|
+
import { MessageType as r } from "../@types/config/schemas.js";
|
|
2
2
|
import "../@types/config/defaults.js";
|
|
3
|
-
import { parseConfig as
|
|
4
|
-
import { defineStore as
|
|
5
|
-
const g =
|
|
3
|
+
import { parseConfig as a } from "../@types/config/validator.js";
|
|
4
|
+
import { defineStore as o } from "pinia";
|
|
5
|
+
const g = o("guido-config", {
|
|
6
6
|
state: () => ({
|
|
7
7
|
initialized: !1,
|
|
8
8
|
config: null
|
|
@@ -132,7 +132,7 @@ const g = l("guido-config", {
|
|
|
132
132
|
* consumers stay safe in setup where a raw config read snapshots null (SD-147945).
|
|
133
133
|
*/
|
|
134
134
|
isTransactional() {
|
|
135
|
-
return this.messageType ===
|
|
135
|
+
return this.messageType === r.TRANSACTIONAL;
|
|
136
136
|
},
|
|
137
137
|
/**
|
|
138
138
|
* Soft-save policy: may the editor persist a template with validation errors?
|
|
@@ -158,13 +158,6 @@ const g = l("guido-config", {
|
|
|
158
158
|
var e, t;
|
|
159
159
|
return ((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.showHeader) ?? !0;
|
|
160
160
|
},
|
|
161
|
-
/**
|
|
162
|
-
* Check if the Insider display-condition UI replaces Stripo's
|
|
163
|
-
*/
|
|
164
|
-
externalDisplayConditions: (i) => {
|
|
165
|
-
var e, t, n, r;
|
|
166
|
-
return (((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.externalDisplayConditions) ?? !1) && (((r = (n = i.config) == null ? void 0 : n.features) == null ? void 0 : r.displayConditions) ?? !0);
|
|
167
|
-
},
|
|
168
161
|
/**
|
|
169
162
|
* Check if a specific feature is enabled.
|
|
170
163
|
* Returns false before init (config null) so header controls don't
|
|
@@ -181,7 +174,7 @@ const g = l("guido-config", {
|
|
|
181
174
|
* Initialize the config store with validated configuration
|
|
182
175
|
*/
|
|
183
176
|
init(i) {
|
|
184
|
-
const e =
|
|
177
|
+
const e = a(i);
|
|
185
178
|
this.config = e, this.initialized = !0;
|
|
186
179
|
},
|
|
187
180
|
/**
|