@useinsider/guido 3.22.0-beta.0951deb → 3.22.0-beta.7c8fae0

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.
Files changed (79) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +39 -41
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +79 -81
  5. package/dist/composables/useBlocksConfig.js +24 -32
  6. package/dist/config/compiler/utils/recommendationCompilerUtils.js +22 -22
  7. package/dist/config/migrator/recommendation/compositionMapper.js +56 -49
  8. package/dist/config/migrator/recommendation/extractors.js +74 -26
  9. package/dist/config/migrator/recommendation/htmlBuilder.js +279 -202
  10. package/dist/config/migrator/recommendation/settingsMapper.js +37 -36
  11. package/dist/config/migrator/recommendationMigrator.js +65 -59
  12. package/dist/enums/academy.js +0 -1
  13. package/dist/extensions/Blocks/Recommendation/block.js +33 -24
  14. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +20 -19
  15. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +148 -163
  16. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +23 -22
  17. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +19 -18
  18. package/dist/extensions/Blocks/Recommendation/templates/utils.js +82 -91
  19. package/dist/extensions/Blocks/Recommendation/utils/inlinePriceOrder.js +12 -0
  20. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +3 -2
  21. package/dist/guido.css +1 -1
  22. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
  23. package/dist/node_modules/valibot/dist/index.js +261 -297
  24. package/dist/src/@types/config/schemas.d.ts +0 -4
  25. package/dist/src/composables/useConfig.d.ts +0 -2
  26. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +3 -1
  27. package/dist/src/config/migrator/recommendation/extractors.d.ts +26 -0
  28. package/dist/src/enums/academy.d.ts +0 -1
  29. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
  30. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -8
  31. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -13
  32. package/dist/src/extensions/Blocks/Recommendation/utils/inlinePriceOrder.d.ts +9 -0
  33. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +2 -19
  34. package/dist/src/stores/config.d.ts +0 -166
  35. package/dist/stores/config.js +6 -13
  36. package/dist/utils/pairProductVariables.js +29 -30
  37. package/package.json +1 -1
  38. package/dist/@types/display-condition.js +0 -25
  39. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
  40. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
  41. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
  42. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
  43. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
  44. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
  45. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
  46. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
  47. package/dist/composables/useDisplayConditions.js +0 -102
  48. package/dist/enums/display-condition.js +0 -12
  49. package/dist/extensions/DisplayConditions/bridge.js +0 -17
  50. package/dist/extensions/DisplayConditions/constants.js +0 -17
  51. package/dist/extensions/DisplayConditions/control.js +0 -178
  52. package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
  53. package/dist/extensions/DisplayConditions/extension.js +0 -28
  54. package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
  55. package/dist/extensions/DisplayConditions/library.js +0 -27
  56. package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
  57. package/dist/services/displayConditionApi.js +0 -39
  58. package/dist/src/@types/display-condition.d.ts +0 -59
  59. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
  60. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
  61. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
  62. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
  63. package/dist/src/composables/useDisplayConditions.d.ts +0 -16
  64. package/dist/src/enums/display-condition.d.ts +0 -15
  65. package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
  66. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
  67. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
  68. package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
  69. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
  70. package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
  71. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
  72. package/dist/src/mock/api/display-conditions.d.ts +0 -2
  73. package/dist/src/services/displayConditionApi.d.ts +0 -8
  74. package/dist/src/stores/display-condition.d.ts +0 -81
  75. package/dist/src/utils/displayCondition.d.ts +0 -10
  76. package/dist/src/utils/protectTableText.d.ts +0 -2
  77. package/dist/stores/display-condition.js +0 -28
  78. package/dist/utils/displayCondition.js +0 -26
  79. package/dist/utils/protectTableText.js +0 -22
@@ -384,8 +384,6 @@ export declare const UISchema: v.ObjectSchema<{
384
384
  readonly showHeader: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
385
385
  /** Custom label for back button (if shown) */
386
386
  readonly backButtonLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
387
- /** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
388
- readonly externalDisplayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
389
387
  }, undefined>;
390
388
  /**
391
389
  * Features configuration - enable/disable editor features
@@ -806,8 +804,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
806
804
  readonly showHeader: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
807
805
  /** Custom label for back button (if shown) */
808
806
  readonly backButtonLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
809
- /** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
810
- readonly externalDisplayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
811
807
  }, undefined>, {}>;
812
808
  /** Feature toggles */
813
809
  readonly features: v.OptionalSchema<v.ObjectSchema<{
@@ -89,7 +89,6 @@ export declare const useConfig: () => {
89
89
  ui: {
90
90
  showHeader: boolean;
91
91
  backButtonLabel?: string | undefined;
92
- externalDisplayConditions: boolean;
93
92
  };
94
93
  features: {
95
94
  dynamicContent: boolean;
@@ -229,7 +228,6 @@ export declare const useConfig: () => {
229
228
  ui: import("vue").ComputedRef<{
230
229
  showHeader: boolean;
231
230
  backButtonLabel?: string | undefined;
232
- externalDisplayConditions: boolean;
233
231
  } | null>;
234
232
  features: import("vue").ComputedRef<{
235
233
  dynamicContent: boolean;
@@ -1,2 +1,4 @@
1
1
  import { type LegacyVariable, type MappedComposition } from './types';
2
- export declare function mapComposition(variables: LegacyVariable[] | undefined): MappedComposition;
2
+ export declare function mapComposition(variables: LegacyVariable[] | undefined, { oldPriceFirst }?: {
3
+ oldPriceFirst?: boolean;
4
+ }): MappedComposition;
@@ -1,3 +1,4 @@
1
+ import type { LegacyVariable } from './types';
1
2
  export declare function extractTitleText(block: Element): string;
2
3
  /**
3
4
  * Fallback for legacy configs that carry no `p_recommendation_title` variable:
@@ -7,6 +8,31 @@ export declare function extractTitleText(block: Element): string;
7
8
  * @returns True when the legacy block renders a visible title
8
9
  */
9
10
  export declare function hasVisibleTitle(block: Element): boolean;
11
+ /**
12
+ * A rendered title container with no text showed the user no title, whatever the config's `hidden` flag says.
13
+ * @param block - The legacy recommendation block element
14
+ * @returns True when the legacy block renders an empty title container
15
+ */
16
+ export declare function hasEmptyTitle(block: Element): boolean;
17
+ /**
18
+ * Reads which price the legacy card renders first. Prices sharing a `positionIdx` are ordered by this.
19
+ * @param block - The legacy recommendation block element
20
+ * @returns True only when both prices render and the original price comes first
21
+ */
22
+ export declare function isOldPriceFirst(block: Element): boolean;
23
+ /**
24
+ * Reads the legacy "Move to next line" state from the rendered card, for blocks whose config does not carry it.
25
+ * @param block - The legacy recommendation block element
26
+ * @returns True only when both prices render in separate rows and neither row is laid out inline (`table-cell`)
27
+ */
28
+ export declare function isPriceOnNextLine(block: Element): boolean;
29
+ /**
30
+ * Legacy keeps the text color and the name's trim toggle in the rendered `<p>`, not in the config theme.
31
+ * @param variables - The legacy composition variables
32
+ * @param block - The legacy recommendation block element
33
+ * @returns The variables, with `textColor` / `textTrimming` filled from the rendered HTML where the theme lacks them
34
+ */
35
+ export declare function withRenderedTextTheme(variables: LegacyVariable[] | undefined, block: Element): LegacyVariable[] | undefined;
10
36
  /**
11
37
  * Card background lives on either the block (`bgcolor`/`style`) or per-card
12
38
  * cells (`.product-card`). Returns empty string when no background is set —
@@ -8,7 +8,6 @@ export declare const ACADEMY_LINKS: {
8
8
  readonly EMAIL_EDITOR: "https://academy.insiderone.com/docs/email-drag-and-drop-editor";
9
9
  readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
10
10
  readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
11
- readonly EMAIL_DISPLAY_CONDITIONS: "https://academy.insiderone.com/docs/new-editor-add-display-conditions-to-an-email";
12
11
  readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
13
12
  };
14
13
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -65,6 +65,7 @@ export declare class RecommendationBlock extends Block {
65
65
  */
66
66
  onDelete(node: ImmutableHtmlNode): void;
67
67
  private _ensureMobileFitRule;
68
+ private _ensureTextTrimCss;
68
69
  private _syncHeightBound;
69
70
  /**
70
71
  * Warns (dark advisory toaster) when the design holds more than one live
@@ -121,14 +121,8 @@ export declare class RecommendationBlockControl extends CommonControl {
121
121
  private _fetchBlockData;
122
122
  private _isPanelOn;
123
123
  /**
124
- * Applies smart defaults for newly dropped blocks.
125
- *
126
- * For new blocks (config still matches hardcoded defaults), validates that
127
- * the default currency and algorithm are available from the API response.
128
- * If not, falls back to the first available option.
129
- *
130
- * Saved templates with user-customized config are left unchanged because
131
- * their values won't match the hardcoded defaults.
124
+ * Falls back to the first available option when the block's currency or locale is not offered (a new block on
125
+ * the hard-coded default, or a block copied from another account). Only the default strategy gets an algorithm.
132
126
  */
133
127
  private _applySmartDefaults;
134
128
  /**
@@ -1,6 +1,7 @@
1
1
  import type { CurrencyConfig } from '../types/nodeConfig';
2
2
  import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
3
3
  import { ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON } from '../constants';
4
+ export { resolveInlinePriceOrder } from '../utils/inlinePriceOrder';
4
5
  type PriceKey = 'price' | 'original_price' | 'discount';
5
6
  /**
6
7
  * Current currency configuration from the store, in CurrencyConfig shape.
@@ -22,18 +23,6 @@ export declare function isSamePrice(product: RecommendationProduct): boolean;
22
23
  * e.g., "rating_star" → "Rating Star"
23
24
  */
24
25
  export declare function toDisplayName(attrName: string): string;
25
- /**
26
- * Resolves the inline (side-by-side) price layout from the composition order so
27
- * it matches the stacked order. `anchor` is whichever of price / original price
28
- * comes first in the composition (the merged cell renders there); `skip` is the
29
- * other (dropped, since it's merged in); `originalFirst` puts the original price
30
- * on the left when it precedes the sale price (the default composition order).
31
- */
32
- export declare function resolveInlinePriceOrder(composition: string[]): {
33
- originalFirst: boolean;
34
- anchor: string;
35
- skip: string;
36
- };
37
26
  /**
38
27
  * Reduces a raw product-attribute value to a displayable scalar string.
39
28
  * Array-type attributes (filter types `Strings`/`Numbers`) are substituted with
@@ -328,4 +317,3 @@ export declare function getDefaultProducts(count?: number): RecommendationProduc
328
317
  * @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} (grid only) placeholders
329
318
  */
330
319
  export declare function createBlockTemplate(layout?: Orientation, instanceClass?: string): string;
331
- export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resolves the inline price layout from the composition order: `anchor` is whichever price comes first (the merged
3
+ * cell renders there), `skip` is the other; `originalFirst` puts the original price on the left.
4
+ */
5
+ export declare function resolveInlinePriceOrder(composition: string[]): {
6
+ originalFirst: boolean;
7
+ anchor: string;
8
+ skip: string;
9
+ };
@@ -1,22 +1,5 @@
1
1
  /**
2
- * Maps legacy algorithm strategy keys (used by templates authored against the
3
- * old recommendation system) to the new keys used by `RecommendationFeedSourceMaps`.
4
- *
5
- * Renames are matched by feed-source id:
6
- * - `viewedTogether` → `similarViewed` (id 11, path `viewed-together`)
7
- * - `purchasedTogether` → `similarBought` (id 12, path `purchased-together`)
8
- * - `trending` → `trendingProducts` (id 40, path `trending`)
9
- * - `mostValuable` → `mostValuableOfPartner` (id 46, path `most-valuable`)
10
- * - `topSellers` → `mostPurchased` (id 62, path `top-sellers`)
11
- * - `mostViewed` → `mostPopular` (id 61, path `most-popular`)
12
- *
13
- * Used at two boundaries:
14
- * 1. The migrator (`settingsMapper`), so freshly migrated node configs carry
15
- * the new key.
16
- * 2. The algorithm dropdown control, so already-saved blocks that still carry
17
- * a legacy key resolve to a matching dropdown option.
18
- *
19
- * Unknown values pass through untouched so a future-added algorithm doesn't
20
- * silently default.
2
+ * Maps legacy strategy keys to `RecommendationFeedSourceMaps` keys; product-bound ones (ids 11, 12, excluded from the
3
+ * dropdown) become `mostPopular`. Unknown keys pass through so a future algorithm is not silently defaulted.
21
4
  */
22
5
  export declare function mapLegacyStrategy(legacy: string | undefined): string | undefined;
@@ -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;
@@ -240,7 +239,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
240
239
  ui: {
241
240
  showHeader: boolean;
242
241
  backButtonLabel?: string | undefined;
243
- externalDisplayConditions: boolean;
244
242
  };
245
243
  features: {
246
244
  dynamicContent: boolean;
@@ -386,7 +384,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
386
384
  ui: {
387
385
  showHeader: boolean;
388
386
  backButtonLabel?: string | undefined;
389
- externalDisplayConditions: boolean;
390
387
  };
391
388
  features: {
392
389
  dynamicContent: boolean;
@@ -532,7 +529,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
532
529
  ui: {
533
530
  showHeader: boolean;
534
531
  backButtonLabel?: string | undefined;
535
- externalDisplayConditions: boolean;
536
532
  };
537
533
  features: {
538
534
  dynamicContent: boolean;
@@ -678,7 +674,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
678
674
  ui: {
679
675
  showHeader: boolean;
680
676
  backButtonLabel?: string | undefined;
681
- externalDisplayConditions: boolean;
682
677
  };
683
678
  features: {
684
679
  dynamicContent: boolean;
@@ -824,7 +819,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
824
819
  ui: {
825
820
  showHeader: boolean;
826
821
  backButtonLabel?: string | undefined;
827
- externalDisplayConditions: boolean;
828
822
  };
829
823
  features: {
830
824
  dynamicContent: boolean;
@@ -970,7 +964,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
970
964
  ui: {
971
965
  showHeader: boolean;
972
966
  backButtonLabel?: string | undefined;
973
- externalDisplayConditions: boolean;
974
967
  };
975
968
  features: {
976
969
  dynamicContent: boolean;
@@ -1116,7 +1109,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1116
1109
  ui: {
1117
1110
  showHeader: boolean;
1118
1111
  backButtonLabel?: string | undefined;
1119
- externalDisplayConditions: boolean;
1120
1112
  };
1121
1113
  features: {
1122
1114
  dynamicContent: boolean;
@@ -1262,7 +1254,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1262
1254
  ui: {
1263
1255
  showHeader: boolean;
1264
1256
  backButtonLabel?: string | undefined;
1265
- externalDisplayConditions: boolean;
1266
1257
  };
1267
1258
  features: {
1268
1259
  dynamicContent: boolean;
@@ -1408,7 +1399,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1408
1399
  ui: {
1409
1400
  showHeader: boolean;
1410
1401
  backButtonLabel?: string | undefined;
1411
- externalDisplayConditions: boolean;
1412
1402
  };
1413
1403
  features: {
1414
1404
  dynamicContent: boolean;
@@ -1554,7 +1544,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1554
1544
  ui: {
1555
1545
  showHeader: boolean;
1556
1546
  backButtonLabel?: string | undefined;
1557
- externalDisplayConditions: boolean;
1558
1547
  };
1559
1548
  features: {
1560
1549
  dynamicContent: boolean;
@@ -1700,7 +1689,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1700
1689
  ui: {
1701
1690
  showHeader: boolean;
1702
1691
  backButtonLabel?: string | undefined;
1703
- externalDisplayConditions: boolean;
1704
1692
  };
1705
1693
  features: {
1706
1694
  dynamicContent: boolean;
@@ -1846,7 +1834,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1846
1834
  ui: {
1847
1835
  showHeader: boolean;
1848
1836
  backButtonLabel?: string | undefined;
1849
- externalDisplayConditions: boolean;
1850
1837
  };
1851
1838
  features: {
1852
1839
  dynamicContent: boolean;
@@ -1992,7 +1979,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1992
1979
  ui: {
1993
1980
  showHeader: boolean;
1994
1981
  backButtonLabel?: string | undefined;
1995
- externalDisplayConditions: boolean;
1996
1982
  };
1997
1983
  features: {
1998
1984
  dynamicContent: boolean;
@@ -2138,7 +2124,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2138
2124
  ui: {
2139
2125
  showHeader: boolean;
2140
2126
  backButtonLabel?: string | undefined;
2141
- externalDisplayConditions: boolean;
2142
2127
  };
2143
2128
  features: {
2144
2129
  dynamicContent: boolean;
@@ -2284,7 +2269,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2284
2269
  ui: {
2285
2270
  showHeader: boolean;
2286
2271
  backButtonLabel?: string | undefined;
2287
- externalDisplayConditions: boolean;
2288
2272
  };
2289
2273
  features: {
2290
2274
  dynamicContent: boolean;
@@ -2430,7 +2414,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2430
2414
  ui: {
2431
2415
  showHeader: boolean;
2432
2416
  backButtonLabel?: string | undefined;
2433
- externalDisplayConditions: boolean;
2434
2417
  };
2435
2418
  features: {
2436
2419
  dynamicContent: boolean;
@@ -2588,7 +2571,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2588
2571
  ui: {
2589
2572
  showHeader: boolean;
2590
2573
  backButtonLabel?: string | undefined;
2591
- externalDisplayConditions: boolean;
2592
2574
  };
2593
2575
  features: {
2594
2576
  dynamicContent: boolean;
@@ -2734,153 +2716,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2734
2716
  ui: {
2735
2717
  showHeader: boolean;
2736
2718
  backButtonLabel?: string | undefined;
2737
- externalDisplayConditions: boolean;
2738
- };
2739
- features: {
2740
- dynamicContent: boolean;
2741
- saveAsTemplate: boolean;
2742
- versionHistory: boolean;
2743
- testMessage: boolean;
2744
- displayConditions: boolean;
2745
- unsubscribe: boolean;
2746
- modulesDisabled: boolean;
2747
- liquidSyntax: boolean;
2748
- autosave: boolean;
2749
- allowlistEnabled: boolean;
2750
- linkTrackingIds: boolean;
2751
- allowSaveWithErrors: boolean;
2752
- reusableRecommendationStrategy: boolean;
2753
- };
2754
- blocks: {
2755
- 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")[];
2756
- includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
2757
- };
2758
- compiler: {
2759
- customRules: ({
2760
- type: "replace";
2761
- search: string;
2762
- replacement: string;
2763
- replaceAll?: boolean | undefined;
2764
- id: string;
2765
- description?: string | undefined;
2766
- priority: number;
2767
- } | {
2768
- type: "regex";
2769
- pattern: string;
2770
- replacement: string;
2771
- flags?: string | undefined;
2772
- id: string;
2773
- description?: string | undefined;
2774
- priority: number;
2775
- } | {
2776
- type: "remove";
2777
- targets: string[];
2778
- id: string;
2779
- description?: string | undefined;
2780
- priority: number;
2781
- } | {
2782
- type: "custom";
2783
- processor: (html: string) => string;
2784
- id: string;
2785
- description?: string | undefined;
2786
- priority: number;
2787
- })[];
2788
- ignoreDefaultRules: boolean;
2789
- };
2790
- callbacks: {
2791
- externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2792
- };
2793
- } | null;
2794
- } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
2795
- /**
2796
- * Check if the Insider display-condition UI replaces Stripo's
2797
- */
2798
- externalDisplayConditions: (state: {
2799
- initialized: boolean;
2800
- config: {
2801
- identity: {
2802
- templateId: string;
2803
- userId: string;
2804
- variationId?: string | undefined;
2805
- campaignId?: string | undefined;
2806
- templateLibraryId?: string | undefined;
2807
- };
2808
- partner: {
2809
- name: string;
2810
- productType: 60 | 49 | 97;
2811
- messageType: 1 | 2;
2812
- username: string;
2813
- fallbackFont?: {
2814
- name: string;
2815
- family: string;
2816
- } | undefined;
2817
- };
2818
- template: {
2819
- html: string;
2820
- css: string;
2821
- preselectedDynamicContent: {
2822
- text: string;
2823
- value: string;
2824
- fallback?: string | undefined;
2825
- format?: {
2826
- key: string;
2827
- value: string;
2828
- } | undefined;
2829
- }[];
2830
- dynamicContentList: {
2831
- [x: string]: import("../library").DynamicContentNode[];
2832
- };
2833
- customFieldAttributes: string[];
2834
- selectedUnsubscribePages: number[];
2835
- forceRecreate: boolean;
2836
- trackIdCounter: number;
2837
- recommendationCampaignUrls?: Record<string, unknown> | undefined;
2838
- migration: {
2839
- recommendationConfigs: {
2840
- [x: string]: {
2841
- id?: number | undefined;
2842
- decimalCount?: string | number | undefined;
2843
- productIds?: unknown[] | undefined;
2844
- sendProductRequestFlag?: boolean | undefined;
2845
- shuffleProducts?: boolean | undefined;
2846
- filters?: unknown[] | undefined;
2847
- currency?: string | undefined;
2848
- currencySettings?: unknown;
2849
- language?: string | undefined;
2850
- strategy?: string | undefined;
2851
- recommendedProducts?: unknown[] | undefined;
2852
- cardsInRow?: number | undefined;
2853
- mobileRightPadding?: number | undefined;
2854
- mobileLeftPadding?: number | undefined;
2855
- unresponsive?: boolean | undefined;
2856
- orientation?: string | undefined;
2857
- textTrimming?: boolean | undefined;
2858
- blockType?: string | undefined;
2859
- size?: string | number | undefined;
2860
- verticalResponsiveness?: boolean | undefined;
2861
- isPriceMovedToNextLine?: boolean | undefined;
2862
- isPriceDeletedForZeroSale?: boolean | undefined;
2863
- } & {
2864
- [key: string]: unknown;
2865
- };
2866
- };
2867
- };
2868
- };
2869
- editor: {
2870
- locale: string;
2871
- translationsPath: string;
2872
- migrationDate: number;
2873
- emailHeader: {
2874
- senderName: string;
2875
- subject: string;
2876
- };
2877
- savedModulesFolderName: string;
2878
- defaultModulesFolderName: string;
2879
- };
2880
- ui: {
2881
- showHeader: boolean;
2882
- backButtonLabel?: string | undefined;
2883
- externalDisplayConditions: boolean;
2884
2719
  };
2885
2720
  features: {
2886
2721
  dynamicContent: boolean;
@@ -3028,7 +2863,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
3028
2863
  ui: {
3029
2864
  showHeader: boolean;
3030
2865
  backButtonLabel?: string | undefined;
3031
- externalDisplayConditions: boolean;
3032
2866
  };
3033
2867
  features: {
3034
2868
  dynamicContent: boolean;
@@ -1,8 +1,8 @@
1
- import { MessageType as a } from "../@types/config/schemas.js";
1
+ import { MessageType as r } from "../@types/config/schemas.js";
2
2
  import "../@types/config/defaults.js";
3
- import { parseConfig as o } from "../@types/config/validator.js";
4
- import { defineStore as l } from "pinia";
5
- const g = l("guido-config", {
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 === a.TRANSACTIONAL;
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 = o(i);
177
+ const e = a(i);
185
178
  this.config = e, this.initialized = !0;
186
179
  },
187
180
  /**