@useinsider/guido 3.17.0-beta.3a4c221 → 3.17.0-beta.3cd7f07

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 (98) hide show
  1. package/README.md +6 -5
  2. package/dist/@types/config/schemas.js +7 -6
  3. package/dist/components/Guido.vue.js +10 -10
  4. package/dist/components/Guido.vue2.js +86 -78
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +21 -0
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +131 -0
  7. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  8. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  9. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue.js +17 -0
  10. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +57 -0
  11. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
  12. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +63 -0
  13. package/dist/composables/useCustomInterfaceAppearance.js +56 -38
  14. package/dist/composables/useLegacyStrategyConversion.js +52 -0
  15. package/dist/composables/useRecommendation.js +41 -34
  16. package/dist/composables/useStripo.js +14 -14
  17. package/dist/config/i18n/en/labels.json.js +1 -1
  18. package/dist/config/migrator/index.js +9 -8
  19. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  20. package/dist/config/migrator/recommendation/extractors.js +29 -24
  21. package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
  22. package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
  23. package/dist/config/migrator/recommendationMigrator.js +31 -25
  24. package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
  25. package/dist/enums/academy.js +2 -1
  26. package/dist/enums/date.js +5 -3
  27. package/dist/enums/extensions/recommendationBlock.js +4 -1
  28. package/dist/extensions/Blocks/Recommendation/block.js +35 -29
  29. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  30. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  31. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +29 -27
  32. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +35 -28
  33. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +309 -236
  34. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +242 -180
  35. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +159 -0
  36. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
  37. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
  38. package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
  39. package/dist/extensions/Blocks/Recommendation/services/configService.js +54 -36
  40. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
  41. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +217 -80
  42. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  43. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
  44. package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
  45. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +58 -0
  46. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +22 -0
  47. package/dist/extensions/Blocks/common-control.js +22 -19
  48. package/dist/guido.css +1 -1
  49. package/dist/services/recommendationApi.js +81 -33
  50. package/dist/src/@types/config/schemas.d.ts +2 -0
  51. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
  52. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  53. package/dist/src/components/organisms/extensions/recommendation/RemoveStrategyModal.vue.d.ts +2 -0
  54. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +15 -0
  55. package/dist/src/composables/useConfig.d.ts +2 -0
  56. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  57. package/dist/src/composables/useRecommendation.d.ts +1 -0
  58. package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
  59. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
  60. package/dist/src/enums/academy.d.ts +1 -0
  61. package/dist/src/enums/date.d.ts +1 -0
  62. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  63. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
  64. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
  65. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +3 -6
  66. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
  67. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -0
  68. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +11 -0
  69. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  70. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +44 -8
  71. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +17 -0
  72. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
  73. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
  74. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +12 -1
  75. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +229 -10
  76. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
  77. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
  78. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +39 -0
  79. package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +31 -0
  80. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  81. package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
  82. package/dist/src/services/recommendationApi.d.ts +5 -1
  83. package/dist/src/stores/config.d.ts +18 -0
  84. package/dist/src/stores/save-as-template.d.ts +4 -3
  85. package/dist/src/utils/genericUtil.d.ts +5 -0
  86. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  87. package/dist/static/assets/icons/line-change.svg.js +5 -0
  88. package/dist/static/assets/icons/line-delete.svg.js +5 -0
  89. package/dist/static/assets/icons/line-info.svg.js +5 -0
  90. package/dist/static/assets/icons/line-plus.svg.js +5 -0
  91. package/dist/static/styles/components/recommendation-strategy.css.js +220 -0
  92. package/dist/static/styles/customEditorStyle.css.js +3 -1
  93. package/dist/utils/dateUtil.js +23 -10
  94. package/dist/utils/genericUtil.js +54 -44
  95. package/dist/utils/templatePreparation.js +35 -34
  96. package/package.json +3 -2
  97. package/dist/src/utils/dynamicContentFormat.d.ts +0 -26
  98. package/dist/utils/dynamicContentFormat.js +0 -37
@@ -104,6 +104,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
104
104
  autosave: boolean;
105
105
  allowlistEnabled: boolean;
106
106
  linkTrackingIds: boolean;
107
+ reusableRecommendationStrategy: boolean;
107
108
  };
108
109
  blocks: {
109
110
  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")[];
@@ -244,6 +245,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
244
245
  autosave: boolean;
245
246
  allowlistEnabled: boolean;
246
247
  linkTrackingIds: boolean;
248
+ reusableRecommendationStrategy: boolean;
247
249
  };
248
250
  blocks: {
249
251
  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")[];
@@ -384,6 +386,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
384
386
  autosave: boolean;
385
387
  allowlistEnabled: boolean;
386
388
  linkTrackingIds: boolean;
389
+ reusableRecommendationStrategy: boolean;
387
390
  };
388
391
  blocks: {
389
392
  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")[];
@@ -524,6 +527,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
524
527
  autosave: boolean;
525
528
  allowlistEnabled: boolean;
526
529
  linkTrackingIds: boolean;
530
+ reusableRecommendationStrategy: boolean;
527
531
  };
528
532
  blocks: {
529
533
  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")[];
@@ -664,6 +668,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
664
668
  autosave: boolean;
665
669
  allowlistEnabled: boolean;
666
670
  linkTrackingIds: boolean;
671
+ reusableRecommendationStrategy: boolean;
667
672
  };
668
673
  blocks: {
669
674
  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")[];
@@ -804,6 +809,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
804
809
  autosave: boolean;
805
810
  allowlistEnabled: boolean;
806
811
  linkTrackingIds: boolean;
812
+ reusableRecommendationStrategy: boolean;
807
813
  };
808
814
  blocks: {
809
815
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -944,6 +950,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
944
950
  autosave: boolean;
945
951
  allowlistEnabled: boolean;
946
952
  linkTrackingIds: boolean;
953
+ reusableRecommendationStrategy: boolean;
947
954
  };
948
955
  blocks: {
949
956
  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")[];
@@ -1084,6 +1091,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1084
1091
  autosave: boolean;
1085
1092
  allowlistEnabled: boolean;
1086
1093
  linkTrackingIds: boolean;
1094
+ reusableRecommendationStrategy: boolean;
1087
1095
  };
1088
1096
  blocks: {
1089
1097
  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")[];
@@ -1224,6 +1232,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1224
1232
  autosave: boolean;
1225
1233
  allowlistEnabled: boolean;
1226
1234
  linkTrackingIds: boolean;
1235
+ reusableRecommendationStrategy: boolean;
1227
1236
  };
1228
1237
  blocks: {
1229
1238
  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")[];
@@ -1364,6 +1373,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1364
1373
  autosave: boolean;
1365
1374
  allowlistEnabled: boolean;
1366
1375
  linkTrackingIds: boolean;
1376
+ reusableRecommendationStrategy: boolean;
1367
1377
  };
1368
1378
  blocks: {
1369
1379
  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")[];
@@ -1504,6 +1514,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1504
1514
  autosave: boolean;
1505
1515
  allowlistEnabled: boolean;
1506
1516
  linkTrackingIds: boolean;
1517
+ reusableRecommendationStrategy: boolean;
1507
1518
  };
1508
1519
  blocks: {
1509
1520
  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")[];
@@ -1644,6 +1655,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1644
1655
  autosave: boolean;
1645
1656
  allowlistEnabled: boolean;
1646
1657
  linkTrackingIds: boolean;
1658
+ reusableRecommendationStrategy: boolean;
1647
1659
  };
1648
1660
  blocks: {
1649
1661
  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")[];
@@ -1784,6 +1796,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1784
1796
  autosave: boolean;
1785
1797
  allowlistEnabled: boolean;
1786
1798
  linkTrackingIds: boolean;
1799
+ reusableRecommendationStrategy: boolean;
1787
1800
  };
1788
1801
  blocks: {
1789
1802
  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")[];
@@ -1924,6 +1937,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1924
1937
  autosave: boolean;
1925
1938
  allowlistEnabled: boolean;
1926
1939
  linkTrackingIds: boolean;
1940
+ reusableRecommendationStrategy: boolean;
1927
1941
  };
1928
1942
  blocks: {
1929
1943
  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")[];
@@ -2064,6 +2078,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2064
2078
  autosave: boolean;
2065
2079
  allowlistEnabled: boolean;
2066
2080
  linkTrackingIds: boolean;
2081
+ reusableRecommendationStrategy: boolean;
2067
2082
  };
2068
2083
  blocks: {
2069
2084
  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")[];
@@ -2204,6 +2219,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2204
2219
  autosave: boolean;
2205
2220
  allowlistEnabled: boolean;
2206
2221
  linkTrackingIds: boolean;
2222
+ reusableRecommendationStrategy: boolean;
2207
2223
  };
2208
2224
  blocks: {
2209
2225
  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")[];
@@ -2344,6 +2360,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2344
2360
  autosave: boolean;
2345
2361
  allowlistEnabled: boolean;
2346
2362
  linkTrackingIds: boolean;
2363
+ reusableRecommendationStrategy: boolean;
2347
2364
  };
2348
2365
  blocks: {
2349
2366
  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")[];
@@ -2486,6 +2503,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2486
2503
  autosave: boolean;
2487
2504
  allowlistEnabled: boolean;
2488
2505
  linkTrackingIds: boolean;
2506
+ reusableRecommendationStrategy: boolean;
2489
2507
  };
2490
2508
  blocks: {
2491
2509
  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,4 @@
1
+ import type { RecommendationCampaignUrlValue } from '@@/Types/recommendation';
1
2
  import type { MappedCategory } from '@@/Types/save-as-template';
2
3
  interface StoreState {
3
4
  templateName: string;
@@ -5,7 +6,7 @@ interface StoreState {
5
6
  selectedCategories: MappedCategory[];
6
7
  skeletonStatus: boolean;
7
8
  recommendation: {
8
- campaignUrls: Record<string, string>;
9
+ campaignUrls: Record<string, RecommendationCampaignUrlValue>;
9
10
  configs: Record<string, string>;
10
11
  };
11
12
  unsubscribe: {
@@ -30,7 +31,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
30
31
  }[];
31
32
  skeletonStatus: boolean;
32
33
  recommendation: {
33
- campaignUrls: Record<string, string>;
34
+ campaignUrls: Record<string, RecommendationCampaignUrlValue>;
34
35
  configs: Record<string, string>;
35
36
  };
36
37
  unsubscribe: {
@@ -54,7 +55,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
54
55
  }[];
55
56
  skeletonStatus: boolean;
56
57
  recommendation: {
57
- campaignUrls: Record<string, string>;
58
+ campaignUrls: Record<string, RecommendationCampaignUrlValue>;
58
59
  configs: Record<string, string>;
59
60
  };
60
61
  unsubscribe: {
@@ -25,3 +25,8 @@ export declare const getCsrfToken: () => string;
25
25
  export declare const getUrlParams: () => URLSearchParams;
26
26
  export declare const getUrlParam: (paramName: string, defaultValue?: string) => string;
27
27
  export declare const replaceString: (string?: string, values?: Record<string, string | number>, isRemoveEmptyValues?: boolean) => string;
28
+ /**
29
+ * Narrows an unknown API value to a printable string; anything that is neither
30
+ * a string nor a number becomes ''.
31
+ */
32
+ export declare const asText: (value: unknown) => string;
@@ -0,0 +1,5 @@
1
+ const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.9403 5.51003L17.6328 11.0273C17.8845 11.3769 18.0068 11.8382 17.9997 12.2963L18 12.3333C18 13.2538 17.4627 14 16.8 14H15V15C15 15.5523 14.5523 16 14 16H10C9.44772 16 9 15.5523 9 15V14H7.2C6.53726 14 6 13.2538 6 12.3333L6.00029 12.2963C5.9932 11.8382 6.11551 11.3769 6.36722 11.0273L11.0597 5.51003C11.3182 5.15101 11.6615 4.98153 12 5.00159C12.3386 4.98153 12.6818 5.15101 12.9403 5.51003Z"/><path d="M10 18C9.44772 18 9 18.4477 9 19C9 19.5523 9.44772 20 10 20H14C14.5523 20 15 19.5523 15 19C15 18.4477 14.5523 18 14 18H10Z"/></svg>
2
+ `;
3
+ export {
4
+ C as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const l = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.768 11.694a1.03 1.03 0 0 1-1.465 0 1.051 1.051 0 0 1 0-1.478L17.51 9H9a1 1 0 1 1 0-2h8.509l-1.206-1.216a1.051 1.051 0 0 1 0-1.478 1.03 1.03 0 0 1 1.465 0l2.929 2.955c.404.408.404 1.07 0 1.478l-2.93 2.955zM3.303 15.261a1.051 1.051 0 0 0 0 1.478l2.93 2.955a1.03 1.03 0 0 0 1.464 0 1.051 1.051 0 0 0 0-1.478L6.49 17H15a1 1 0 1 0 0-2H6.491l1.206-1.216a1.051 1.051 0 0 0 0-1.478 1.03 1.03 0 0 0-1.465 0l-2.929 2.955z"/></svg>
2
+ `;
3
+ export {
4
+ l as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const a = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 3a2 2 0 0 0-2 2v2H5a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9h1a1 1 0 1 0 0-2h-3V5a2 2 0 0 0-2-2h-4zm4 4h-4V5h4v2zm-4 2h6v10H8V9h2zm2 2a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1z"></path></svg>
2
+ `;
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4ZM12 5.6C10.3026 5.6 8.67475 6.27428 7.47452 7.47452C6.27428 8.67475 5.6 10.3026 5.6 12C5.6 13.6974 6.27428 15.3253 7.47452 16.5255C8.67475 17.7257 10.3026 18.4 12 18.4C13.6974 18.4 15.3253 17.7257 16.5255 16.5255C17.7257 15.3253 18.4 13.6974 18.4 12C18.4 10.3026 17.7257 8.67475 16.5255 7.47452C15.3253 6.27428 13.6974 5.6 12 5.6ZM11.496 10.448C11.928 10.448 12.264 10.552 12.496 10.768C12.736 10.976 12.848 11.248 12.848 11.584V11.688L12.824 11.944C12.816 12.064 12.8 12.176 12.776 12.28L12.736 12.432L12.288 14.024L12.248 14.152C12.1976 14.376 12.1629 14.6032 12.144 14.832C12.144 15.04 12.192 15.184 12.288 15.264C12.384 15.344 12.544 15.376 12.776 15.376C12.888 15.376 13.016 15.36 13.152 15.32L13.392 15.24L13.448 15.216L13.328 15.712L12.848 15.896L12.584 15.992L12.464 16.032C12.248 16.112 12 16.144 11.72 16.144C11.28 16.144 10.944 16.04 10.696 15.824C10.5803 15.7241 10.488 15.5998 10.4258 15.4602C10.3636 15.3205 10.3329 15.1689 10.336 15.016C10.3355 14.787 10.3624 14.5587 10.416 14.336L10.448 14.176L10.896 12.576L10.936 12.424L11 12.144C11.024 12.008 11.04 11.88 11.04 11.768C11.04 11.56 11 11.424 10.912 11.344C10.832 11.264 10.672 11.224 10.432 11.224C10.312 11.224 10.192 11.24 10.072 11.272L9.856 11.352L9.76 11.376L9.88 10.888L10.168 10.776C10.36 10.696 10.544 10.632 10.728 10.576C11 10.496 11.256 10.448 11.496 10.448ZM12.496 7.536C12.792 7.536 13.04 7.632 13.248 7.832C13.464 8.024 13.568 8.264 13.568 8.544C13.568 8.816 13.464 9.056 13.248 9.248C13.04 9.44 12.792 9.544 12.496 9.544C12.2 9.544 11.944 9.44 11.736 9.248C11.52 9.056 11.416 8.816 11.416 8.544C11.416 8.264 11.52 8.024 11.736 7.824C11.944 7.632 12.2 7.536 12.496 7.536Z"/></svg>
2
+ `;
3
+ export {
4
+ C as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const a = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 5a1 1 0 0 0-1 1v5H6a1 1 0 1 0 0 2h5v5a1 1 0 1 0 2 0v-5h5a1 1 0 1 0 0-2h-5V6a1 1 0 0 0-1-1z"></path></svg>
2
+ `;
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,220 @@
1
+ const n = `.strategy-control-header {
2
+ padding: 16px 16px 0;
3
+ }
4
+
5
+ .strategy-control-title {
6
+ margin: 0;
7
+ color: var(--guido-color-gray-800);
8
+ font-size: 16px;
9
+ font-weight: 600;
10
+ line-height: 24px;
11
+ }
12
+
13
+ .strategy-control-description-row {
14
+ padding: 8px 16px 16px;
15
+ }
16
+
17
+ .strategy-control-description {
18
+ margin: 0;
19
+ color: var(--guido-color-gray-600);
20
+ font-size: 13px;
21
+ line-height: 16px;
22
+ }
23
+
24
+ .strategy-control-description a {
25
+ color: var(--guido-color-primary-500);
26
+ text-decoration: underline;
27
+ }
28
+
29
+ .strategy-control-notice-row {
30
+ padding: 0 16px 16px;
31
+ }
32
+
33
+ .strategy-control-notice {
34
+ display: flex;
35
+ gap: 8px;
36
+ align-items: center;
37
+ padding: 12px;
38
+ border: 1px solid var(--guido-color-border-onpage-message-info);
39
+ border-radius: 4px;
40
+ background-color: var(--guido-color-background-onpage-message-info);
41
+ }
42
+
43
+ .strategy-control-notice::before {
44
+ content: '';
45
+ flex: none;
46
+ width: 24px;
47
+ height: 24px;
48
+ background-color: var(--guido-color-border-onpage-message-info);
49
+ mask-image: var(--guido-icon-line-info);
50
+ mask-repeat: no-repeat;
51
+ mask-position: center;
52
+ mask-size: 24px 24px;
53
+ }
54
+
55
+ .strategy-control-notice-text {
56
+ margin: 0;
57
+ padding: 4px 0;
58
+ color: var(--guido-color-neutral-700);
59
+ font-size: 13px;
60
+ line-height: 16px;
61
+ }
62
+
63
+ .recommendation-controls-container .container.strategy-control-cta-row {
64
+ grid-template-columns: repeat(2, minmax(0, 180px));
65
+ justify-content: start;
66
+ gap: 16px;
67
+ padding: 0 16px 16px;
68
+ }
69
+
70
+ .strategy-control-cta {
71
+ width: 100%;
72
+ }
73
+
74
+ .strategy-control-cta > .button {
75
+ display: flex;
76
+ gap: 8px;
77
+ justify-content: center;
78
+ width: 100%;
79
+ border: none;
80
+ font-size: 15px;
81
+ font-weight: 400;
82
+ line-height: 24px;
83
+ white-space: nowrap;
84
+ }
85
+
86
+ .strategy-control-cta.primary > .button:disabled,
87
+ .strategy-control-cta.primary > .button.disabled {
88
+ opacity: 1;
89
+ color: var(--guido-color-gray-800);
90
+ cursor: default;
91
+ }
92
+
93
+ .strategy-control-name-band {
94
+ display: flex;
95
+ align-items: center;
96
+ min-height: 48px;
97
+ padding: 0 16px;
98
+ background-color: var(--guido-color-gray-0);
99
+ }
100
+
101
+ /* Figma gives the legacy band a 59px row: 17.5px above and below its 24px content. */
102
+ [data-strategy-legacy-state] .strategy-control-name-band {
103
+ gap: 8px;
104
+ justify-content: space-between;
105
+ min-height: auto;
106
+ padding: 17.5px 16px;
107
+ }
108
+
109
+ .strategy-control-name {
110
+ color: var(--guido-color-gray-800);
111
+ font-size: 15px;
112
+ font-weight: 600;
113
+ line-height: 24px;
114
+ }
115
+
116
+ .strategy-control-actions {
117
+ display: flex;
118
+ align-items: center;
119
+ padding: 16px;
120
+ }
121
+
122
+ .strategy-control-action {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ padding: 0;
126
+ border: none;
127
+ background: none;
128
+ font-size: 15px;
129
+ font-weight: 400;
130
+ line-height: 24px;
131
+ cursor: pointer;
132
+ }
133
+
134
+ .strategy-control-action > span {
135
+ padding: 0 8px;
136
+ }
137
+
138
+ .strategy-control-action::before,
139
+ .strategy-control-cta.on > .button::before {
140
+ content: '';
141
+ flex: none;
142
+ width: 24px;
143
+ height: 24px;
144
+ background-color: currentcolor;
145
+ mask-repeat: no-repeat;
146
+ mask-position: center;
147
+ mask-size: 24px 24px;
148
+ }
149
+
150
+ .strategy-control-action--change::before {
151
+ mask-image: var(--guido-icon-line-change);
152
+ }
153
+
154
+ .strategy-control-action--remove::before {
155
+ mask-image: var(--guido-icon-line-delete);
156
+ }
157
+
158
+ .strategy-control-cta.on > .button::before {
159
+ mask-image: var(--guido-icon-line-plus);
160
+ }
161
+
162
+ .strategy-control-action--update::before {
163
+ mask-image: var(--guido-icon-filled-arrow-rising);
164
+ }
165
+
166
+ .strategy-control-name-band .strategy-control-action > span {
167
+ padding: 0 0 0 8px;
168
+ }
169
+
170
+ .strategy-control-action--update,
171
+ .strategy-control-action--change {
172
+ color: var(--guido-color-primary-500);
173
+ }
174
+
175
+ .strategy-control-action--remove {
176
+ color: var(--guido-color-danger-500);
177
+ }
178
+
179
+ .strategy-control-action:hover {
180
+ text-decoration: underline;
181
+ }
182
+
183
+ .strategy-control-action:disabled,
184
+ .strategy-control-action:disabled:hover {
185
+ color: var(--guido-color-gray-700);
186
+ text-decoration: none;
187
+ cursor: default;
188
+ }
189
+
190
+ .recommendation-controls-container:not(.strategy-block):not(.legacy-strategy-block) .strategy-control-container,
191
+ .recommendation-controls-container.strategy-block .product-count-control-container,
192
+ .recommendation-controls-container.strategy-block .algorithm-control-container,
193
+ .recommendation-controls-container.strategy-block .filters-control-container,
194
+ .recommendation-controls-container.strategy-block .shuffle-control-container,
195
+ .recommendation-controls-container.legacy-strategy-block .product-count-control-container,
196
+ .recommendation-controls-container.legacy-strategy-block .algorithm-control-container,
197
+ .recommendation-controls-container.legacy-strategy-block .filters-control-container,
198
+ .recommendation-controls-container.legacy-strategy-block .shuffle-control-container {
199
+ display: none;
200
+ }
201
+
202
+ .recommendation-controls-container.strategy-block,
203
+ .recommendation-controls-container.legacy-strategy-block {
204
+ display: flex;
205
+ flex-direction: column;
206
+ }
207
+
208
+ .recommendation-controls-container.strategy-block .price-placement-control-container,
209
+ .recommendation-controls-container.legacy-strategy-block .price-placement-control-container {
210
+ order: 1;
211
+ }
212
+
213
+ .recommendation-controls-container.strategy-block .product-layout-control-container,
214
+ .recommendation-controls-container.legacy-strategy-block .product-layout-control-container {
215
+ order: 2;
216
+ }
217
+ `;
218
+ export {
219
+ n as default
220
+ };
@@ -43,7 +43,9 @@ const n = `.esd-x,
43
43
  .recommendation-block-v2 .product-omnibus-discount ue-node-actions,
44
44
  .recommendation-block-v2 .product-omnibus-discount ue-node-panel,
45
45
  .recommendation-block-v2 .product-button ue-node-actions,
46
- .recommendation-block-v2 .product-button ue-node-panel {
46
+ .recommendation-block-v2 .product-button ue-node-panel,
47
+ .recommendation-block-v2 .ins-recommendation-title ue-node-actions,
48
+ .recommendation-block-v2 .ins-recommendation-title ue-node-panel {
47
49
  display: none !important;
48
50
  }
49
51
 
@@ -1,10 +1,19 @@
1
- import { DEFAULT_LOCALE as r, DEFAULT as o } from "../enums/date.js";
2
- const c = () => {
1
+ import { DEFAULT_LOCALE as n, DEFAULT as a, DEFAULT_TZ as c } from "../enums/date.js";
2
+ const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length === 10 && !Number.isNaN(Number(t)) ? new Date(Number(t) * 1e3) : new Date(t) : typeof t == "number" ? t.toString().length === 10 ? new Date(t * 1e3) : new Date(t) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), s = () => {
3
3
  const t = window.l10n;
4
- return (t == null ? void 0 : t.locale) === o ? r : (t == null ? void 0 : t.locale) || r;
5
- };
6
- new Intl.DateTimeFormat().resolvedOptions().timeZone;
7
- const i = (t) => {
4
+ return (t == null ? void 0 : t.locale) === a ? n : (t == null ? void 0 : t.locale) || n;
5
+ }, u = new Intl.DateTimeFormat().resolvedOptions().timeZone, f = () => {
6
+ const t = window.l10n;
7
+ return (t == null ? void 0 : t.timezone) || u || c;
8
+ }, D = (t, e = s(), r = f()) => {
9
+ const o = {
10
+ year: "numeric",
11
+ month: "2-digit",
12
+ day: "2-digit",
13
+ timeZone: r
14
+ }, i = m(t);
15
+ return new Intl.DateTimeFormat(e, o).format(i);
16
+ }, T = (t) => {
8
17
  if (!t)
9
18
  return "";
10
19
  const e = new Date(t);
@@ -16,9 +25,13 @@ const i = (t) => {
16
25
  second: "2-digit",
17
26
  hour12: !1
18
27
  }).format(e);
19
- }, m = (t) => t ? Math.floor(Date.now() / 1e3) >= t : !1;
28
+ }, h = (t) => t ? Math.floor(Date.now() / 1e3) >= t : !1;
20
29
  export {
21
- i as formatPatchDate,
22
- m as isAfterDate,
23
- c as locale
30
+ m as convertToDateObject,
31
+ T as formatPatchDate,
32
+ D as formatShortDate,
33
+ h as isAfterDate,
34
+ u as localTz,
35
+ s as locale,
36
+ f as timezone
24
37
  };
@@ -1,59 +1,69 @@
1
- import { buildLiquidTag as f, isLiquidDefaultFilter as i, readLiquidDefault as v, liquidFilterToFormat as b } from "./dynamicContentFormat.js";
2
- const k = (t) => {
3
- if (i(t))
4
- return { fallback: v(t) };
5
- const e = b(t) ?? (t.includes("=") ? { key: t.split("=")[0].trim(), value: t.split("=")[1].trim() } : null);
6
- return e ? { format: e } : { fallback: t };
7
- }, $ = (t) => {
8
- const a = t.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((u) => u.trim()), [r] = a;
9
- return a.slice(1).reduce(
10
- (u, l) => Object.assign(u, k(l)),
11
- { text: t.label, value: r || "" }
12
- );
13
- }, o = (t, e = !1) => t.map((a) => {
14
- var u;
15
- const r = e ? f(a) : null;
16
- if (r) {
17
- const l = [(u = a.format) == null ? void 0 : u.value, a.fallback].filter(Boolean);
1
+ const o = (t) => {
2
+ const a = t.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((l) => l.trim()), [s] = a, r = {
3
+ text: t.label,
4
+ value: s || ""
5
+ };
6
+ if (a.length >= 2) {
7
+ const [, l, e] = a;
8
+ if (l.startsWith("default:")) {
9
+ let n = l.slice(8).trim();
10
+ n.startsWith('"') && n.endsWith('"') && (n = n.slice(1, -1)), r.fallback = n;
11
+ } else {
12
+ const n = l.includes("=") ? { key: l.split("=")[0].trim(), value: l.split("=")[1].trim() } : null;
13
+ n ? r.format = n : e || (r.fallback = l), e && (r.fallback = e);
14
+ }
15
+ }
16
+ return r;
17
+ }, f = (t, c = !1) => t.map((a) => {
18
+ if (a.format)
18
19
  return {
19
- label: [a.text, ...l].join(" | "),
20
- value: r
20
+ label: `${a.text} | ${a.format.key}=${a.format.value}`,
21
+ value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
22
+ };
23
+ if (c) {
24
+ if (!a.fallback)
25
+ return {
26
+ label: a.text,
27
+ value: `{{ ${a.value} }}`
28
+ };
29
+ const r = !Number.isNaN(Number(a.fallback)) && a.fallback.trim() !== "" ? a.fallback : `"${a.fallback}"`;
30
+ return {
31
+ label: `${a.text} | ${a.fallback}`,
32
+ value: `{{ ${a.value} | default: ${r} }}`
21
33
  };
22
34
  }
23
- return a.format ? {
24
- label: `${a.text} | ${a.format.key}=${a.format.value}`,
25
- value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
26
- } : {
35
+ return {
27
36
  label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
28
37
  value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
29
38
  };
30
- }), p = (t) => {
31
- const e = [], a = /* @__PURE__ */ new Set(), r = (l) => {
32
- Array.isArray(l) && l.forEach((n) => {
33
- const c = [...n.children ?? [], ...n.select_items ?? []];
34
- if (c.length > 0) {
35
- r(c);
39
+ }), b = (t) => {
40
+ const c = [], a = /* @__PURE__ */ new Set(), s = (l) => {
41
+ Array.isArray(l) && l.forEach((e) => {
42
+ const n = [...e.children ?? [], ...e.select_items ?? []];
43
+ if (n.length > 0) {
44
+ s(n);
36
45
  return;
37
46
  }
38
- const s = n.text || n.tag_text;
39
- s && n.value && !a.has(n.value) && (a.add(n.value), e.push({ text: s, value: n.value }));
47
+ const u = e.text || e.tag_text;
48
+ u && e.value && !a.has(e.value) && (a.add(e.value), c.push({ text: u, value: e.value }));
40
49
  });
41
- }, [u] = Object.values(t ?? {});
42
- return r(u), e;
43
- }, d = (t, e, a = !1) => {
44
- const r = new Set(t.map((l) => l.value)), u = e.filter((l) => r.has(l.value) ? !1 : (r.add(l.value), !0));
50
+ }, [r] = Object.values(t ?? {});
51
+ return s(r), c;
52
+ }, i = (t, c, a = !1) => {
53
+ const s = new Set(t.map((l) => l.value)), r = c.filter((l) => s.has(l.value) ? !1 : (s.add(l.value), !0));
45
54
  return [
46
- ...o(t, a),
47
- ...o(u, a)
55
+ ...f(t, a),
56
+ ...f(r, a)
48
57
  ];
49
- }, y = () => {
58
+ }, v = () => {
50
59
  var t;
51
60
  return ((t = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : t.getAttribute("content")) ?? "";
52
- };
61
+ }, k = (t) => typeof t == "string" ? t : typeof t == "number" ? String(t) : "";
53
62
  export {
54
- d as buildMergeTagEntries,
55
- o as dynamicContentToMergeTags,
56
- p as flattenDynamicContentList,
57
- y as getCsrfToken,
58
- $ as mergeTagToDynamicContent
63
+ k as asText,
64
+ i as buildMergeTagEntries,
65
+ f as dynamicContentToMergeTags,
66
+ b as flattenDynamicContentList,
67
+ v as getCsrfToken,
68
+ o as mergeTagToDynamicContent
59
69
  };