@useinsider/guido 2.1.0-beta.ff1bc98 → 2.1.0-beta.ff9b498

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 (159) hide show
  1. package/README.md +39 -1
  2. package/dist/@types/config/schemas.js +70 -65
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +69 -58
  5. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +14 -15
  6. package/dist/composables/useBlocksConfig.js +26 -16
  7. package/dist/composables/useHtmlValidator.js +104 -114
  8. package/dist/composables/useRecommendation.js +21 -54
  9. package/dist/composables/useSave.js +16 -12
  10. package/dist/composables/useStripo.js +58 -54
  11. package/dist/composables/useStripoEventHandler.js +27 -12
  12. package/dist/composables/useSyncModuleExtractor.js +33 -0
  13. package/dist/config/compiler/recommendationCompilerRules.js +39 -45
  14. package/dist/config/migrator/itemsBlockMigrator.js +101 -97
  15. package/dist/config/migrator/recommendationMigrator.js +2 -2
  16. package/dist/enums/defaults.js +8 -4
  17. package/dist/enums/extensions/recommendationBlock.js +1 -1
  18. package/dist/enums/recommendation.js +15 -16
  19. package/dist/enums/unsubscribe.js +25 -21
  20. package/dist/extensions/Blocks/Recommendation/block.js +9 -133
  21. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +187 -0
  22. package/dist/extensions/Blocks/Recommendation/constants.js +13 -0
  23. package/dist/extensions/Blocks/Recommendation/control.js +336 -0
  24. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
  25. package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
  26. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
  27. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textAfter.js → omnibusDiscountTextAfterControl.js} +14 -16
  28. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textBefore.js → omnibusDiscountTextBeforeControl.js} +14 -16
  29. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textAfter.js → omnibusPriceTextAfterControl.js} +14 -16
  30. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textBefore.js → omnibusPriceTextBeforeControl.js} +12 -14
  31. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
  32. package/dist/extensions/Blocks/Recommendation/extension.js +17 -40
  33. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +3 -19
  34. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -13
  35. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +10 -21
  36. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +207 -254
  37. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +181 -0
  38. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +189 -0
  39. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +209 -0
  40. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
  41. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +15 -26
  42. package/dist/extensions/Blocks/controlFactories.js +93 -125
  43. package/dist/extensions/ModulesTabIcons/extension.js +17 -0
  44. package/dist/guido.css +1 -1
  45. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +237 -225
  46. package/dist/services/recommendationApi.js +8 -11
  47. package/dist/services/stripoApi.js +50 -14
  48. package/dist/services/templateLibraryApi.js +13 -16
  49. package/dist/src/@types/config/schemas.d.ts +8 -0
  50. package/dist/src/@types/events.d.ts +34 -2
  51. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
  52. package/dist/src/composables/useConfig.d.ts +4 -0
  53. package/dist/src/composables/useRecommendation.d.ts +0 -1
  54. package/dist/src/composables/useSyncModuleExtractor.d.ts +4 -0
  55. package/dist/src/enums/defaults.d.ts +4 -0
  56. package/dist/src/enums/unsubscribe.d.ts +3 -0
  57. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -67
  58. package/dist/src/extensions/Blocks/Recommendation/{controls/cardComposition/index.d.ts → cardCompositionControl.d.ts} +3 -23
  59. package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +24 -0
  60. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +38 -0
  61. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +589 -21
  62. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
  63. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
  64. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +468 -138
  65. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
  66. package/dist/src/extensions/Blocks/Recommendation/templates/{grid/migration.d.ts → migrationTemplate.d.ts} +4 -11
  67. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +52 -0
  68. package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
  69. package/dist/src/mock/api/settings.d.ts +2 -0
  70. package/dist/src/services/stripoApi.d.ts +5 -0
  71. package/dist/src/stores/config.d.ts +36 -0
  72. package/dist/src/stores/editor.d.ts +23 -0
  73. package/dist/static/styles/customEditorStyle.css.js +11 -35
  74. package/dist/stores/editor.js +2 -1
  75. package/dist/utils/pairProductVariables.js +56 -57
  76. package/dist/utils/templatePreparation.js +14 -15
  77. package/package.json +1 -1
  78. package/dist/config/compiler/utils/recommendationCompilerUtils.js +0 -116
  79. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
  80. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
  81. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +0 -66
  82. package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -22
  83. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -21
  84. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
  85. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -80
  86. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -232
  87. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
  88. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +0 -92
  89. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +0 -102
  90. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +0 -209
  91. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +0 -52
  92. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +0 -250
  93. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -70
  94. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -160
  95. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -67
  96. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -307
  97. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +0 -21
  98. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
  99. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -108
  100. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
  101. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
  102. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
  103. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
  104. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -222
  105. package/dist/extensions/Blocks/Recommendation/services/configService.js +0 -240
  106. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +0 -233
  107. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  108. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +0 -66
  109. package/dist/extensions/Blocks/Recommendation/templates/index.js +0 -12
  110. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +0 -174
  111. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +0 -73
  112. package/dist/extensions/Blocks/Recommendation/templates/utils.js +0 -134
  113. package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +0 -6
  114. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +0 -29
  115. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +0 -46
  116. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +0 -17
  117. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
  118. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -49
  119. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -13
  120. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +0 -41
  121. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -35
  122. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
  123. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -31
  124. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
  125. package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +0 -37
  126. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -29
  127. package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +0 -52
  128. package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +0 -22
  129. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -79
  130. package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +0 -24
  131. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -60
  132. package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -23
  133. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -221
  134. package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +0 -29
  135. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
  136. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -34
  137. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
  138. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
  139. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
  140. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
  141. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
  142. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
  143. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
  144. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
  145. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -83
  146. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +0 -151
  147. package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +0 -6
  148. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -20
  149. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +0 -33
  150. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +0 -41
  151. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -8
  152. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +0 -25
  153. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +0 -18
  154. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +0 -66
  155. package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +0 -7
  156. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -166
  157. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -33
  158. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +0 -113
  159. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +0 -77
@@ -1,16 +1,15 @@
1
- import { useRecommendation as f } from "../../composables/useRecommendation.js";
2
- import { DUMMY_IMAGE_MAPPINGS as P, REGEX as m, VerticalOrientation as g, CSS as e, ATTRIBUTES as a, CONDITIONS as A, HTML as h } from "../../enums/recommendation.js";
3
- import { prepareRecommendationBlocks as D } from "./utils/recommendationCompilerUtils.js";
4
- const G = [
1
+ import { useRecommendation as u } from "../../composables/useRecommendation.js";
2
+ import { DUMMY_IMAGE_MAPPINGS as P, REGEX as i, CSS as e, CONDITIONS as E, ATTRIBUTES as r, HTML as h } from "../../enums/recommendation.js";
3
+ const H = [
5
4
  {
6
5
  id: "replace-images-with-variable-names",
7
6
  description: "Replacing dummy images with variable names in recommendation module",
8
7
  type: "custom",
9
- processor: (s) => {
10
- let t = s;
11
- return Object.entries(P).forEach(([, l]) => {
12
- Object.entries(l).forEach(([n, o]) => {
13
- t = t.replaceAll(o, `{{${n}}}`);
8
+ processor: (a) => {
9
+ let t = a;
10
+ return Object.entries(P).forEach(([, n]) => {
11
+ Object.entries(n).forEach(([s, o]) => {
12
+ t = t.replaceAll(o, `{{${s}}}`);
14
13
  });
15
14
  }), t;
16
15
  },
@@ -29,17 +28,17 @@ const G = [
29
28
  id: "add-recommendation-unresponsive-css",
30
29
  description: "Adding recommendation unresponsive css",
31
30
  type: "custom",
32
- processor: (s) => {
33
- const { calculateCardWidth: t, getRecommendationCampaignData: l } = f();
34
- let n = s;
35
- const o = n.match(m.ID);
36
- if (o) {
37
- const d = [];
38
- if (o.forEach((c) => {
39
- const E = /recommendation-id="(.*?)"/i.exec(c), I = E ? E[1].trim() : "", p = l(I);
40
- p.textTrimming && p.orientation === g && d.push(t(p));
41
- }), d.length) {
42
- const c = `width:${Math.min(...d)}px!important;`;
31
+ processor: (a) => {
32
+ const { getRecommendationCampaignData: t } = u();
33
+ let n = a;
34
+ const s = n.match(i.ID);
35
+ if (s) {
36
+ const o = [];
37
+ if (s.forEach((c) => {
38
+ const m = c.slice(35, c.length - 1).trim();
39
+ t(m);
40
+ }), o.length) {
41
+ const c = `width:${Math.min(...o)}px!important;`;
43
42
  n = n.replace(e.REGULAR_NAME_HEIGHT, `${e.TRIMMED_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.REGULAR_NAME_CONTAINER_HEIGHT, e.TRIMMED_NAME_CONTAINER_CSS).replace(e.RESPONSIVE_NAME_SIZE, `${e.RESPONSIVE_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.RESPONSIVE_NAME_CONTAINER_HEIGHT, e.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
44
43
  }
45
44
  }
@@ -47,37 +46,32 @@ const G = [
47
46
  },
48
47
  priority: 52
49
48
  },
50
- {
51
- id: "prepare-recommendations",
52
- description: "Replacing product data with template variables in recommendation blocks",
53
- type: "custom",
54
- processor: (s) => D(s),
55
- priority: 48
56
- },
49
+ // TODO: prepareRecommendations
50
+ // TODO: addRecommendationCustomFields
57
51
  {
58
52
  id: "add-discount-conditions",
59
53
  description: "Adding discount conditions to the recommendation block",
60
54
  type: "custom",
61
- processor: (s) => {
62
- let t = s;
63
- const l = t.match(m.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = f();
64
- return l !== null && l.forEach((o) => {
65
- const d = o.match(m.CUSTOM_FIELD);
66
- if (!d)
55
+ processor: (a) => {
56
+ let t = a;
57
+ const n = t.match(i.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: s } = u();
58
+ return n !== null && n.forEach((o) => {
59
+ const c = o.match(i.CUSTOM_FIELD);
60
+ if (!c)
67
61
  return;
68
- const [c] = d, E = c.match(m.CUSTOM_FIELD_INDEXES_PART), I = c.match(m.CUSTOM_FIELD_NAME_PART), p = o.match(m.ATTRIBUTE_PARAGRAPH_START_TAG);
69
- if (!E || !I || !p)
62
+ const [m] = c, p = m.match(i.CUSTOM_FIELD_INDEXES_PART), A = m.match(i.CUSTOM_FIELD_NAME_PART), _ = o.match(i.ATTRIBUTE_PARAGRAPH_START_TAG);
63
+ if (!p || !A || !_)
70
64
  return;
71
- const [u] = E, [R] = I, [_] = p, T = R.substring(1, R.length - 2), S = _.match(m.COMPOSITION) !== null;
72
- let i = c;
73
- if (S) {
74
- const $ = u.substring(2, u.length - 3), r = n($);
75
- T === a.OMNIBUS_PRICE && (r.priceBeforeTextValue && (i = `${r.priceBeforeTextValue}${i}`), r.priceAfterTextValue && (i = `${i}${r.priceAfterTextValue}`)), T === a.OMNIBUS_DISCOUNT && (r.discountBeforeTextValue && (i = `${r.discountBeforeTextValue}${i}`), r.discountAfterTextValue && (i = `${i}${r.discountAfterTextValue}`));
65
+ const [l] = p, [T] = A, [d] = _, N = T.substring(1, T.length - 2), R = d.match(i.COMPOSITION) !== null;
66
+ let O = m;
67
+ if (R) {
68
+ const M = l.substring(2, l.length - 3);
69
+ s(M);
76
70
  }
77
- const N = u.substring(2);
78
- let M = "";
79
- T in A.IF && (M = A.IF[T].replaceAll(`{${a.DISCOUNT}}`, `${N}${a.DISCOUNT}`).replaceAll(`{${a.OMNIBUS_DISCOUNT}}`, `${N}${a.OMNIBUS_DISCOUNT}`).replaceAll(`{${a.OMNIBUS_PRICE}}`, `${N}${a.OMNIBUS_PRICE}`));
80
- const O = `${_}${i}${h.PARAGRAPH_END_TAG}`, C = `${M}${S ? O : o}${A.ELSE}${_}${h.PARAGRAPH_END_TAG}${A.END_IF}`;
71
+ const I = l.substring(2);
72
+ let S = "";
73
+ N in E.IF && (S = E.IF[N].replaceAll(`{${r.DISCOUNT}}`, `${I}${r.DISCOUNT}`).replaceAll(`{${r.OMNIBUS_DISCOUNT}}`, `${I}${r.OMNIBUS_DISCOUNT}`).replaceAll(`{${r.OMNIBUS_PRICE}}`, `${I}${r.OMNIBUS_PRICE}`));
74
+ const $ = `${d}${O}${h.PARAGRAPH_END_TAG}`, C = `${S}${R ? $ : o}${E.ELSE}${d}${h.PARAGRAPH_END_TAG}${E.END_IF}`;
81
75
  t = t.replace(o, C);
82
76
  }), t;
83
77
  },
@@ -85,5 +79,5 @@ const G = [
85
79
  }
86
80
  ];
87
81
  export {
88
- G as recommendationCompilerRules
82
+ H as recommendationCompilerRules
89
83
  };
@@ -1,8 +1,8 @@
1
1
  var B = Object.defineProperty;
2
- var U = (r, t, e) => t in r ? B(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var M = (r, t, e) => U(r, typeof t != "symbol" ? t + "" : t, e);
2
+ var U = (e, t, r) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var M = (e, t, r) => U(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import { productPairs as v } from "../../extensions/Blocks/Items/enums/productEnums.js";
5
- import { ItemInCartOptions as E, DefaultConfigValues as g, SETTINGS_ENUMS as d } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
5
+ import { ItemInCartOptions as E, DefaultConfigValues as g, SETTINGS_ENUMS as u } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
6
6
  import { getDefaultTemplate as K } from "../../extensions/Blocks/Items/template.js";
7
7
  const w = {
8
8
  img: {
@@ -74,76 +74,76 @@ const w = {
74
74
  function F() {
75
75
  return String(Date.now() + Math.floor(Math.random() * 1e3));
76
76
  }
77
- function q(r) {
78
- return r ? {
79
- CartItems: d.ITEMS_TYPE.CART_ITEMS,
80
- BrowsedItems: d.ITEMS_TYPE.BROWSED_ITEMS,
81
- PurchasedItems: d.ITEMS_TYPE.PURCHASED_ITEMS,
82
- CART_ITEMS: d.ITEMS_TYPE.CART_ITEMS,
83
- BROWSED_ITEMS: d.ITEMS_TYPE.BROWSED_ITEMS,
84
- PURCHASED_ITEMS: d.ITEMS_TYPE.PURCHASED_ITEMS
85
- }[r] || d.ITEMS_TYPE.CART_ITEMS : d.ITEMS_TYPE.CART_ITEMS;
77
+ function q(e) {
78
+ return e ? {
79
+ CartItems: u.ITEMS_TYPE.CART_ITEMS,
80
+ BrowsedItems: u.ITEMS_TYPE.BROWSED_ITEMS,
81
+ PurchasedItems: u.ITEMS_TYPE.PURCHASED_ITEMS,
82
+ CART_ITEMS: u.ITEMS_TYPE.CART_ITEMS,
83
+ BROWSED_ITEMS: u.ITEMS_TYPE.BROWSED_ITEMS,
84
+ PURCHASED_ITEMS: u.ITEMS_TYPE.PURCHASED_ITEMS
85
+ }[e] || u.ITEMS_TYPE.CART_ITEMS : u.ITEMS_TYPE.CART_ITEMS;
86
86
  }
87
- function R(r) {
88
- const t = (a, o) => a == null ? o : a === "1" || a === "true", e = (a, o) => a || o, i = r["data-type"] || r["data-source"], l = q(i);
89
- let n = r["data-cart_items_select_control_value"] || g.cartItemsSelectControlValue;
87
+ function R(e) {
88
+ const t = (a, o) => a == null ? o : a === "1" || a === "true", r = (a, o) => a || o, c = e["data-type"] || e["data-source"], i = q(c);
89
+ let n = e["data-cart_items_select_control_value"] || g.cartItemsSelectControlValue;
90
90
  if (n && !n.includes("{{") && /^\d+$/.test(n)) {
91
- const a = parseInt(n) - 1, o = E[l];
91
+ const a = parseInt(n) - 1, o = E[i];
92
92
  o && o[a] && (n = o[a].value);
93
93
  }
94
94
  return {
95
95
  initialized: !0,
96
- blockInstanceId: e(r["data-block-instance-id"], F()),
97
- source: l,
98
- type: l,
96
+ blockInstanceId: r(e["data-block-instance-id"], F()),
97
+ source: i,
98
+ type: i,
99
99
  itemsSelectValue: n,
100
- orientation: r["data-card_orientation_control_value"] || d.ORIENTATION.VERTICAL,
101
- nameTrimming: t(r["data-product_name_control_trim"], !0),
102
- priceHideDiscount: t(r["data-product_price_control_nodup"], !0),
103
- priceFormatted: t(r["data-product_price_control_formated"], !0),
104
- priceSinglePrice: t(r["data-product_price_control_single_price"], !1),
105
- priceCurrencySymbol: e(
106
- r["data-product_price_control_currency_symbol"],
100
+ orientation: e["data-card_orientation_control_value"] || u.ORIENTATION.VERTICAL,
101
+ nameTrimming: t(e["data-product_name_control_trim"], !0),
102
+ priceHideDiscount: t(e["data-product_price_control_nodup"], !0),
103
+ priceFormatted: t(e["data-product_price_control_formated"], !0),
104
+ priceSinglePrice: t(e["data-product_price_control_single_price"], !1),
105
+ priceCurrencySymbol: r(
106
+ e["data-product_price_control_currency_symbol"],
107
107
  g.productPriceCurrencySymbolControlValue
108
108
  ),
109
- priceCurrencyLocation: e(
110
- r["data-product_price_currency_location"],
109
+ priceCurrencyLocation: r(
110
+ e["data-product_price_currency_location"],
111
111
  g.productPriceCurrencyLocationControlValue
112
112
  ),
113
- priceOrientation: r["data-product_original_price_control_orientation"] || "horizontal",
114
- quantityControlEnabled: t(r["data-product_quantity_control_enabled"], !0),
115
- buttonLink: e(r["data-product_button_link"], g.productButtonLinkControlValue),
116
- imageLink: e(r["data-product_image_link"], g.productImageLinkControlValue),
117
- buttonLabel: e(r["data-product_button_control_label"], "Buy"),
118
- buttonFullWidth: t(r["data-product_button_control_atw"], !0),
119
- imageVisible: t(r["data-product_image_control_enabled"], !0),
120
- nameVisible: t(r["data-product_name_control_enabled"], !0),
121
- quantityVisible: t(r["data-product_quantity_control_enabled"], !0),
122
- priceVisible: t(r["data-product_price_control_enabled"], !0),
123
- originalPriceVisible: t(r["data-product_original_price_control_enabled"], !0),
124
- buttonVisible: t(r["data-product_button_control_enabled"], !0)
113
+ priceOrientation: e["data-product_original_price_control_orientation"] || "horizontal",
114
+ quantityControlEnabled: t(e["data-product_quantity_control_enabled"], !0),
115
+ buttonLink: r(e["data-product_button_link"], g.productButtonLinkControlValue),
116
+ imageLink: r(e["data-product_image_link"], g.productImageLinkControlValue),
117
+ buttonLabel: r(e["data-product_button_control_label"], "Buy"),
118
+ buttonFullWidth: t(e["data-product_button_control_atw"], !0),
119
+ imageVisible: t(e["data-product_image_control_enabled"], !0),
120
+ nameVisible: t(e["data-product_name_control_enabled"], !0),
121
+ quantityVisible: t(e["data-product_quantity_control_enabled"], !0),
122
+ priceVisible: t(e["data-product_price_control_enabled"], !0),
123
+ originalPriceVisible: t(e["data-product_original_price_control_enabled"], !0),
124
+ buttonVisible: t(e["data-product_button_control_enabled"], !0)
125
125
  };
126
126
  }
127
- const $ = {
127
+ const O = {
128
128
  ins_apr: "CART_ITEMS",
129
129
  browsed_item: "BROWSED_ITEMS",
130
130
  purchased_item: "PURCHASED_ITEMS"
131
131
  };
132
- function x(r, t) {
133
- const e = {
132
+ function $(e, t) {
133
+ const r = {
134
134
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Image}}`,
135
135
  BROWSED_ITEMS: `{{Browsed Item (${t}) Image}}`,
136
136
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Image}}`
137
137
  };
138
- return e[r] || e.CART_ITEMS;
138
+ return r[e] || r.CART_ITEMS;
139
139
  }
140
- function O(r, t) {
141
- const e = {
140
+ function x(e, t) {
141
+ const r = {
142
142
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Url}}`,
143
143
  BROWSED_ITEMS: `{{Browsed Item (${t}) Url}}`,
144
144
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Url}}`
145
145
  };
146
- return e[r] || e.CART_ITEMS;
146
+ return r[e] || r.CART_ITEMS;
147
147
  }
148
148
  class V {
149
149
  constructor() {
@@ -152,12 +152,12 @@ class V {
152
152
  }
153
153
  migrate(t) {
154
154
  try {
155
- let e = this.removeJinjaConditionals(t);
156
- e = this.replaceTemplateVariables(e);
157
- const i = this.parser.parseFromString(e, "text/html"), l = i.querySelectorAll(
155
+ let r = this.removeJinjaConditionals(t);
156
+ r = this.replaceTemplateVariables(r);
157
+ const c = this.parser.parseFromString(r, "text/html"), i = c.querySelectorAll(
158
158
  "td.esd-cart-items-block, td.esd-browsed-items-block, td.esd-purchased-items-block"
159
159
  );
160
- return l.length === 0 ? (console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), e) : (l.forEach((n) => {
160
+ return i.length === 0 ? (console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), r) : (i.forEach((n) => {
161
161
  const a = this.extractConfiguration(n), o = K({
162
162
  orientation: a.orientation,
163
163
  itemsType: a.itemsType,
@@ -173,19 +173,19 @@ class V {
173
173
  originalPriceStyles: a.originalPriceStyles,
174
174
  quantityStyles: a.quantityStyles,
175
175
  nodeConfig: R(a.configBlockAttributes)
176
- }), c = this.parser.parseFromString(
176
+ }), l = this.parser.parseFromString(
177
177
  `<table><tbody><tr>${o}</tr></tbody></table>`,
178
178
  "text/html"
179
179
  ).querySelector("td");
180
- if (c && n.parentNode) {
180
+ if (l && n.parentNode) {
181
181
  const f = R(a.configBlockAttributes);
182
- c.setAttribute("esd-ext-config", JSON.stringify(f));
183
- const u = c.querySelector("esd-config-block");
184
- u && u.remove(), n.parentNode.replaceChild(c, n);
182
+ l.setAttribute("esd-ext-config", JSON.stringify(f));
183
+ const d = l.querySelector("esd-config-block");
184
+ d && d.remove(), n.parentNode.replaceChild(l, n);
185
185
  }
186
- }), i.documentElement.outerHTML);
187
- } catch (e) {
188
- return console.error("ItemsBlockMigrator failed:", e), t;
186
+ }), c.documentElement.outerHTML);
187
+ } catch (r) {
188
+ return console.error("ItemsBlockMigrator failed:", r), t;
189
189
  }
190
190
  }
191
191
  /**
@@ -196,22 +196,22 @@ class V {
196
196
  */
197
197
  extractConfiguration(t) {
198
198
  var C, D, P;
199
- const e = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", i = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", l = parseInt(i) - 1, n = E[e], a = ((P = n == null ? void 0 : n[l]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", u = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, e, i), b = s["data-card_orientation_control_value"];
200
- let S;
201
- b ? S = b === "horizontal" ? "horizontal" : "vertical" : S = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
202
- const p = t.querySelector('a[product-attr="name"]'), T = (p == null ? void 0 : p.getAttribute("style")) || void 0, y = t.querySelector('a[product-attr="button"]'), m = (y == null ? void 0 : y.getAttribute("style")) || void 0, k = (o == null ? void 0 : o.getAttribute("style")) || void 0, I = t.querySelector("p.original-price"), h = (I == null ? void 0 : I.getAttribute("style")) || void 0, A = t.querySelector('[product-attr="quantity"]'), L = (A == null ? void 0 : A.getAttribute("style")) || void 0;
199
+ const r = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", c = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", i = parseInt(c) - 1, n = E[r], a = ((P = n == null ? void 0 : n[i]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", d = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, r, c), S = s["data-card_orientation_control_value"];
200
+ let b;
201
+ S ? b = S === "horizontal" ? "horizontal" : "vertical" : b = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
202
+ const p = t.querySelector('a[product-attr="name"]'), I = (p == null ? void 0 : p.getAttribute("style")) || void 0, y = t.querySelector('a[product-attr="button"]'), m = (y == null ? void 0 : y.getAttribute("style")) || void 0, h = (o == null ? void 0 : o.getAttribute("style")) || void 0, T = t.querySelector("p.original-price"), k = (T == null ? void 0 : T.getAttribute("style")) || void 0, A = t.querySelector('[product-attr="quantity"]'), L = (A == null ? void 0 : A.getAttribute("style")) || void 0;
203
203
  return {
204
- orientation: S,
205
- itemsType: e,
204
+ orientation: b,
205
+ itemsType: r,
206
206
  itemId: a,
207
207
  currencySymbol: _,
208
208
  currencyLocation: f,
209
- formattedPrice: u,
209
+ formattedPrice: d,
210
210
  configBlockAttributes: s,
211
- nameStyles: T,
211
+ nameStyles: I,
212
212
  buttonStyles: m,
213
- priceStyles: k,
214
- originalPriceStyles: h,
213
+ priceStyles: h,
214
+ originalPriceStyles: k,
215
215
  quantityStyles: L
216
216
  };
217
217
  }
@@ -222,17 +222,17 @@ class V {
222
222
  * @param itemsType - The type of items (CART_ITEMS, BROWSED_ITEMS, PURCHASED_ITEMS)
223
223
  * @param itemNumber - The item number (1-based index)
224
224
  */
225
- extractConfigBlockAttributes(t, e, i) {
226
- const l = t.querySelector("esd-config-block"), n = {};
227
- if (!l)
225
+ extractConfigBlockAttributes(t, r, c) {
226
+ const i = t.querySelector("esd-config-block"), n = {};
227
+ if (!i)
228
228
  return this.getDefaultConfigBlockAttributes();
229
- if (Array.from(l.attributes).forEach((o) => {
229
+ if (Array.from(i.attributes).forEach((o) => {
230
230
  o.name.startsWith("data-") && (n[o.name] = o.value);
231
231
  }), n["data-cart_items_select_control_value"]) {
232
232
  const o = n["data-cart_items_select_control_value"];
233
233
  if (/^\d+$/.test(o)) {
234
- const _ = parseInt(o) - 1, c = E[e];
235
- c && c[_] && (n["data-cart_items_select_control_value"] = c[_].value);
234
+ const _ = parseInt(o) - 1, l = E[r];
235
+ l && l[_] && (n["data-cart_items_select_control_value"] = l[_].value);
236
236
  }
237
237
  }
238
238
  if (n["data-product_price_control_curency"]) {
@@ -242,7 +242,7 @@ class V {
242
242
  }
243
243
  (!n["data-product_price_control_currency_symbol"] || n["data-product_price_control_currency_symbol"].trim() === "") && (n["data-product_price_control_currency_symbol"] = "USD");
244
244
  const a = { ...this.getDefaultConfigBlockAttributes(), ...n };
245
- return a["data-type"] = e, a["data-source"] = e, a["data-product_image_link"] = x(e, i), a["data-product_button_link"] = O(e, i), a;
245
+ return a["data-type"] = r, a["data-source"] = r, a["data-product_image_link"] = $(r, c), a["data-product_button_link"] = x(r, c), a;
246
246
  }
247
247
  /**
248
248
  * Returns default esd-config-block attributes based on the old template structure
@@ -297,18 +297,22 @@ class V {
297
297
  * - Cart Items: ins_apr_total_product_kind, ins_apr_price_N, ins_apr_originalprice_N
298
298
  * - Browsed Items: browsed_item_total_product_kind, browsed_item_price_N, browsed_item_originalprice_N
299
299
  * - Purchased Items: purchased_item_total_product_kind, purchased_item_price_N, purchased_item_originalprice_N
300
+ *
301
+ * IMPORTANT: Preserves the esd-custom-display-conditions attribute on <body> which
302
+ * contains display condition Jinja scripts that should NOT be removed.
300
303
  */
301
304
  removeJinjaConditionals(t) {
302
- let e = t.replace(
305
+ const r = "__ESD_DISPLAY_CONDITIONS_PLACEHOLDER__", c = t.match(/esd-custom-display-conditions="[^"]*"/);
306
+ let i = c ? t.replace(c[0], r) : t;
307
+ return i = i.replace(
303
308
  /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(&gt;|>)\s*\d+\s*%\}/g,
304
309
  ""
305
- );
306
- return e = e.replace(
310
+ ), i = i.replace(
307
311
  /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_\d+\s*(!&#61;|!=)\s*\1_originalprice_\d+\s*%\}/g,
308
312
  ""
309
- ), e = e.replace(/\{%\s*endif\s*%\}/g, ""), e = e.replace(/\n\s*\n\s*\n/g, `
313
+ ), i = i.replace(/\{%\s*endif\s*%\}/g, ""), c && (i = i.replace(r, c[0])), i = i.replace(/\n\s*\n\s*\n/g, `
310
314
 
311
- `), e;
315
+ `), i;
312
316
  }
313
317
  /**
314
318
  * Replaces template variables with default values from productPairs
@@ -320,31 +324,31 @@ class V {
320
324
  * - {{purchased_item_formattedprice_5}} → '1,490.49' (PURCHASED_ITEMS)
321
325
  */
322
326
  replaceTemplateVariables(t) {
323
- const { PAIRS_FOR_EXTENSION: e } = v;
324
- return t.replace(/{{([^}]+)}}/g, (i, l) => {
325
- const n = l.match(/^(ins_apr|browsed_item|purchased_item)_([a-z_]+)_(\d+)$/);
327
+ const { PAIRS_FOR_EXTENSION: r } = v;
328
+ return t.replace(/{{([^}]+)}}/g, (c, i) => {
329
+ const n = i.match(/^(ins_apr|browsed_item|purchased_item)_([a-z_]+)_(\d+)$/);
326
330
  if (!n)
327
- return i;
328
- const [, a, o, _] = n, c = $[a];
329
- if (!c)
330
- return console.warn(`Unknown variable prefix: ${a}`), i;
331
+ return c;
332
+ const [, a, o, _] = n, l = O[a];
333
+ if (!l)
334
+ return console.warn(`Unknown variable prefix: ${a}`), c;
331
335
  const f = w[o];
332
336
  if (!f)
333
- return console.warn(`Unknown variable suffix mapping for: ${o}`), i;
334
- const { pairsKey: u, defaultKey: s, isArray: b } = f, p = e[u][c];
337
+ return console.warn(`Unknown variable suffix mapping for: ${o}`), c;
338
+ const { pairsKey: d, defaultKey: s, isArray: S } = f, p = r[d][l];
335
339
  if (!p)
336
- return console.warn(`No data found for: ${u}.${c}`), i;
337
- if (b) {
340
+ return console.warn(`No data found for: ${d}.${l}`), c;
341
+ if (S) {
338
342
  const y = parseInt(_) - 1, m = p[s];
339
- return Array.isArray(m) && m[y] ? m[y] : (console.warn(`Array value not found: ${u}.${c}.${s}[${y}]`), i);
343
+ return Array.isArray(m) && m[y] ? m[y] : (console.warn(`Array value not found: ${d}.${l}.${s}[${y}]`), c);
340
344
  }
341
- const T = p[s];
342
- return T !== void 0 ? String(T) : (console.warn(`Default value not found: ${u}.${c}.${s}`), i);
345
+ const I = p[s];
346
+ return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${d}.${l}.${s}`), c);
343
347
  });
344
348
  }
345
349
  }
346
- function G(r) {
347
- return new V().migrate(r);
350
+ function G(e) {
351
+ return new V().migrate(e);
348
352
  }
349
353
  export {
350
354
  G as migrateItemsBlock
@@ -1,8 +1,8 @@
1
1
  var h = Object.defineProperty;
2
2
  var T = (A, e, t) => e in A ? h(A, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : A[e] = t;
3
3
  var m = (A, e, t) => T(A, typeof e != "symbol" ? e + "" : e, t);
4
- import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/grid/migration.js";
5
- import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/utils.js";
4
+ import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/migrationTemplate.js";
5
+ import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/templateUtils.js";
6
6
  class w {
7
7
  constructor() {
8
8
  m(this, "parser");
@@ -1,8 +1,12 @@
1
- const t = {
1
+ const e = {
2
2
  transactional: 2
3
- }, o = 2, T = 13;
3
+ }, o = 2, t = 13, s = {
4
+ SAVED_MODULES: "savedModules",
5
+ DEFAULT_MODULES: "defaultModules"
6
+ };
4
7
  export {
5
8
  o as EditorType,
6
- T as MAX_DEFAULT_TEMPLATE_ID,
7
- t as TemplateTypes
9
+ t as MAX_DEFAULT_TEMPLATE_ID,
10
+ s as ModuleFolderDefaults,
11
+ e as TemplateTypes
8
12
  };
@@ -1,5 +1,5 @@
1
1
  const s = {
2
- RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
2
+ RECOMMENDATION_API_URL: "http://recommendationv2.api.useinsider.com"
3
3
  }, i = [
4
4
  { id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
5
5
  { id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
@@ -1,4 +1,4 @@
1
- const e = 20, s = 320, t = "vertical", m = {
1
+ const s = 20, e = 320, t = {
2
2
  CART_ABANDONMENT: {
3
3
  ins_apr_img_1: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_1.png",
4
4
  ins_apr_img_2: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_2.png",
@@ -15,7 +15,7 @@ const e = 20, s = 320, t = "vertical", m = {
15
15
  DISCOUNT: "discount",
16
16
  OMNIBUS_DISCOUNT: "omnibus_discount",
17
17
  OMNIBUS_PRICE: "omnibus_price"
18
- }, _ = {
18
+ }, m = {
19
19
  IF: {
20
20
  discount: `{% if {${i.DISCOUNT}} != "0%" and {${i.DISCOUNT}} != "" %}`,
21
21
  omnibus_discount: `{% if {${i.DISCOUNT}} != "0%" and {${i.DISCOUNT}} != "" and {${i.OMNIBUS_DISCOUNT}} != "0%" and {${i.OMNIBUS_DISCOUNT}} != "" %}`,
@@ -23,17 +23,17 @@ const e = 20, s = 320, t = "vertical", m = {
23
23
  },
24
24
  ELSE: "{% else %}",
25
25
  END_IF: "{% endif %}"
26
- }, a = {
27
- ID: /recommendation-id="(.*?)"/gi,
28
- ATTRIBUTE_PARAGRAPH: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>[\S\s]*?<\/p>/gm,
29
- ATTRIBUTE_PARAGRAPH_START_TAG: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>/gm,
26
+ }, _ = {
27
+ ID: /ins-recommendation-v3-campaign-id="(.*?)"/gi,
28
+ ATTRIBUTE_PARAGRAPH: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)">[\S\s]*?<\/p>/gm,
29
+ ATTRIBUTE_PARAGRAPH_START_TAG: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)">/gm,
30
30
  COMPOSITION: /composition="true"/gm,
31
31
  CUSTOM_FIELD: /{{[0-9]+_[0-8]_(discount|omnibus_discount|omnibus_price)}}/gm,
32
32
  CUSTOM_FIELD_INDEXES_PART: /{{[0-9]+_[0-8]_/gm,
33
33
  CUSTOM_FIELD_NAME_PART: /_(discount|omnibus_discount|omnibus_price)}}/gm
34
- }, n = {
34
+ }, a = {
35
35
  PARAGRAPH_END_TAG: "</p>"
36
- }, o = {
36
+ }, n = {
37
37
  REGULAR_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:90px!important;",
38
38
  TRIMMED_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:18px!important;",
39
39
  ELLIPSIS: "text-overflow:ellipsis!important; white-space:nowrap!important;",
@@ -46,12 +46,11 @@ const e = 20, s = 320, t = "vertical", m = {
46
46
  };
47
47
  export {
48
48
  i as ATTRIBUTES,
49
- _ as CONDITIONS,
50
- o as CSS,
51
- m as DUMMY_IMAGE_MAPPINGS,
52
- e as DefaultPadding,
53
- n as HTML,
54
- s as MinDeviceViewport,
55
- a as REGEX,
56
- t as VerticalOrientation
49
+ m as CONDITIONS,
50
+ n as CSS,
51
+ t as DUMMY_IMAGE_MAPPINGS,
52
+ s as DefaultPadding,
53
+ a as HTML,
54
+ e as MinDeviceViewport,
55
+ _ as REGEX
57
56
  };
@@ -1,17 +1,17 @@
1
1
  import { useTranslations as e } from "../composables/useTranslations.js";
2
2
  import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
3
- const I = {
3
+ const _ = {
4
4
  UNSUBSCRIBE_LINK_TYPE: 1,
5
5
  PREFERENCES_LINK_TYPE: 3
6
- }, r = {
6
+ }, I = {
7
7
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
8
8
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
9
9
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
10
10
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
11
- }, s = R(), _ = {
12
- UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
13
- PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
14
- }, i = "iid", B = {
11
+ }, n = R(), r = {
12
+ UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
13
+ PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
14
+ }, B = "iid", i = {
15
15
  name: "Global Unsubscribe",
16
16
  sendGridId: "G"
17
17
  }, C = "/email/unsubscribe-pages", E = {
@@ -20,6 +20,9 @@ const I = {
20
20
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
21
21
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
22
22
  RESUBSCRIBE: 5
23
+ }, U = {
24
+ [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
25
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
23
26
  }, t = {
24
27
  [E.GLOBAL_UNSUBSCRIBE]: [
25
28
  E.GLOBAL_UNSUBSCRIBE,
@@ -30,29 +33,30 @@ const I = {
30
33
  E.SUBSCRIPTION_PREFERENCE_CENTER,
31
34
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
32
35
  ]
33
- }, U = () => {
34
- const n = e();
36
+ }, c = () => {
37
+ const s = e();
35
38
  return {
36
- [E.GLOBAL_UNSUBSCRIBE]: n("unsubscription-preference.type-global-unsubscribe"),
37
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: n("unsubscription-preference.type-global-unsubscription-confirmation"),
38
- [E.RESUBSCRIBE]: n("unsubscription-preference.type-resubscribe"),
39
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: n("unsubscription-preference.type-subscription-preferences-center"),
40
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: n("unsubscription-preference.type-subscription-preferences-confirmation")
39
+ [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
40
+ [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
41
+ [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
42
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
43
+ [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
41
44
  };
42
- }, c = {
45
+ }, o = {
43
46
  default: "{{ins-unsubscribe-link}}",
44
47
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
45
48
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
46
49
  };
47
50
  export {
48
- B as DEFAULT_UNSUBSCRIBE_GROUP,
49
- i as INSIDER_ID,
50
- r as LINK_REGEXES,
51
- I as LINK_TYPES,
52
- c as MERGE_TAGS,
51
+ i as DEFAULT_UNSUBSCRIBE_GROUP,
52
+ B as INSIDER_ID,
53
+ I as LINK_REGEXES,
54
+ _ as LINK_TYPES,
55
+ o as MERGE_TAGS,
53
56
  E as PAGE_TYPES,
54
57
  t as TYPE_COLLECTIONS,
55
58
  C as UNSUBSCRIBE_PAGES_LINK,
56
- _ as URLS,
57
- U as getTypeTranslations
59
+ U as UNSUBSCRIBE_SYNC_MODULE_TYPES,
60
+ r as URLS,
61
+ c as getTypeTranslations
58
62
  };