@useinsider/guido 3.17.0-beta.3e9d6e7 → 3.17.0-beta.3ff6ea0

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 (111) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +6 -12
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +61 -63
  5. package/dist/composables/useCustomInterfaceAppearance.js +16 -19
  6. package/dist/composables/useRecommendation.js +34 -41
  7. package/dist/composables/useStripo.js +14 -14
  8. package/dist/config/migrator/index.js +9 -8
  9. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  10. package/dist/config/migrator/recommendation/extractors.js +29 -24
  11. package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
  12. package/dist/config/migrator/recommendationMigrator.js +16 -15
  13. package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
  14. package/dist/enums/date.js +3 -4
  15. package/dist/enums/extensions/recommendationBlock.js +23 -25
  16. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  17. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  18. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
  19. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +34 -28
  20. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +306 -238
  21. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +95 -122
  22. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
  23. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
  24. package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
  25. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
  26. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +53 -199
  27. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  28. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
  29. package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
  30. package/dist/extensions/Blocks/common-control.js +19 -22
  31. package/dist/guido.css +1 -1
  32. package/dist/services/recommendationApi.js +28 -77
  33. package/dist/src/@types/config/schemas.d.ts +0 -12
  34. package/dist/src/composables/useConfig.d.ts +0 -2
  35. package/dist/src/composables/useRecommendation.d.ts +0 -1
  36. package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
  37. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
  38. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  39. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
  40. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
  41. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  42. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  43. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +10 -0
  44. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +10 -0
  45. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  46. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -12
  47. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
  48. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
  49. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -210
  50. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
  51. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  52. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  53. package/dist/src/services/recommendationApi.d.ts +1 -4
  54. package/dist/src/stores/config.d.ts +0 -18
  55. package/dist/static/styles/customEditorStyle.css.js +3 -1
  56. package/dist/utils/dateUtil.js +10 -23
  57. package/dist/utils/templatePreparation.js +34 -37
  58. package/package.json +1 -2
  59. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  60. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -67
  61. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  62. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  63. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -132
  64. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +0 -526
  65. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -9345
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
  69. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
  70. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
  71. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
  72. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
  73. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
  74. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
  75. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
  76. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
  77. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
  78. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
  79. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
  80. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
  81. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
  82. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
  83. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
  84. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
  85. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
  86. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
  87. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
  88. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
  89. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
  90. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
  91. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
  92. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
  93. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
  94. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
  95. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
  96. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
  97. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
  98. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
  99. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
  100. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
  101. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
  102. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
  103. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
  104. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
  105. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
  106. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
  107. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
  108. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +0 -24
  109. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -37
  110. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -43
  111. package/dist/static/styles/components/recommendation-strategy.css.js +0 -171
@@ -1,39 +1,36 @@
1
1
  var f = Object.defineProperty;
2
- var g = (d, a, t) => a in d ? f(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
3
- var s = (d, a, t) => g(d, typeof a != "symbol" ? a + "" : a, t);
4
- import { useConfig as p } from "../../../../../composables/useConfig.js";
5
- import { CommonControl as y } from "../../../common-control.js";
6
- import { DEFAULT_NODE_CONFIG as l } from "../../constants/defaultConfig.js";
7
- import { RecommendationConfigService as m } from "../../services/configService.js";
8
- import { useRecommendationExtensionStore as N } from "../../store/recommendation.js";
9
- import { AlgorithmControl as I } from "./algorithm.js";
10
- import { ALGORITHM_CONTROL_ID as nt } from "./algorithm.js";
2
+ var p = (d, l, t) => l in d ? f(d, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[l] = t;
3
+ var s = (d, l, t) => p(d, typeof l != "symbol" ? l + "" : l, t);
4
+ import { CommonControl as g } from "../../../common-control.js";
5
+ import { DEFAULT_NODE_CONFIG as c } from "../../constants/defaultConfig.js";
6
+ import { RecommendationConfigService as h } from "../../services/configService.js";
7
+ import { useRecommendationExtensionStore as y } from "../../store/recommendation.js";
8
+ import { AlgorithmControl as N } from "./algorithm.js";
9
+ import { ALGORITHM_CONTROL_ID as tt } from "./algorithm.js";
11
10
  import { CurrencyControl as R } from "./currency.js";
12
- import { CURRENCY_CONTROL_ID as st } from "./currency.js";
13
- import { FiltersControl as T } from "./filters.js";
14
- import { FILTERS_CONTROL_ID as at } from "./filters.js";
11
+ import { CURRENCY_CONTROL_ID as ot } from "./currency.js";
12
+ import { FiltersControl as I } from "./filters.js";
13
+ import { FILTERS_CONTROL_ID as nt } from "./filters.js";
15
14
  import { LayoutOrientationControl as b } from "./layoutOrientation.js";
16
- import { LAYOUT_ORIENTATION_CONTROL_ID as ut } from "./layoutOrientation.js";
15
+ import { LAYOUT_ORIENTATION_CONTROL_ID as st } from "./layoutOrientation.js";
17
16
  import { LocaleControl as _ } from "./locale.js";
18
- import { LOCALE_CONTROL_ID as mt } from "./locale.js";
19
- import { PricePlacementControl as O } from "./pricePlacement.js";
20
- import { PRICE_PLACEMENT_CONTROL_ID as Ct } from "./pricePlacement.js";
21
- import { ProductCountControl as P } from "./productCount.js";
22
- import { PRODUCT_COUNT_CONTROL_ID as gt } from "./productCount.js";
23
- import { ProductLayoutControl as S } from "./productLayout.js";
24
- import { PRODUCT_LAYOUT_CONTROL_ID as yt } from "./productLayout.js";
25
- import { ShuffleControl as L } from "./shuffle.js";
26
- import { SHUFFLE_CONTROL_ID as It } from "./shuffle.js";
27
- import { StrategyControl as k } from "./strategy.js";
28
- import { STRATEGY_CONTROL_ID as Tt } from "./strategy.js";
29
- import { setCurrencyAttributes as D, getBlockElement as E, isPartnerManagedBlock as v, updateProductContentInPlace as A, regenerateProductRowsWithStyles as w } from "./utils.js";
30
- import { adjustProductsToSize as _t, formatProductPrice as Ot, getCardComposition as Pt, getCurrentLayout as St, regenerateMobileProductRows as Lt, updatePricesInPlace as kt, updateSingleProductContent as Dt } from "./utils.js";
31
- import { useDebounceFn as h } from "../../../../../node_modules/@vueuse/shared/index.js";
32
- const x = "recommendation-id", B = "ui-elements-recommendation-block";
33
- class et extends y {
17
+ import { LOCALE_CONTROL_ID as lt } from "./locale.js";
18
+ import { PricePlacementControl as T } from "./pricePlacement.js";
19
+ import { PRICE_PLACEMENT_CONTROL_ID as ut } from "./pricePlacement.js";
20
+ import { ProductCountControl as O } from "./productCount.js";
21
+ import { PRODUCT_COUNT_CONTROL_ID as ht } from "./productCount.js";
22
+ import { ProductLayoutControl as P } from "./productLayout.js";
23
+ import { PRODUCT_LAYOUT_CONTROL_ID as Ct } from "./productLayout.js";
24
+ import { ShuffleControl as S } from "./shuffle.js";
25
+ import { SHUFFLE_CONTROL_ID as pt } from "./shuffle.js";
26
+ import { setCurrencyAttributes as L, getBlockElement as k, isPartnerManagedBlock as D, updateProductContentInPlace as E, regenerateProductRowsWithStyles as A } from "./utils.js";
27
+ import { adjustProductsToSize as yt, formatProductPrice as Nt, getCardComposition as Rt, getCurrentLayout as It, getMainContainerTbody as bt, regenerateMobileProductRows as _t, updatePricesInPlace as Tt, updateSingleProductContent as Ot } from "./utils.js";
28
+ import { useDebounceFn as m } from "../../../../../node_modules/@vueuse/shared/index.js";
29
+ const v = "recommendation-id", w = "ui-elements-recommendation-block";
30
+ class Q extends g {
34
31
  constructor() {
35
32
  super(...arguments);
36
- s(this, "store", N());
33
+ s(this, "store", y());
37
34
  s(this, "storeUnsubscription", () => {
38
35
  });
39
36
  s(this, "syncedBlockIds", /* @__PURE__ */ new Set());
@@ -47,11 +44,10 @@ class et extends y {
47
44
  s(this, "shuffleControl", null);
48
45
  s(this, "pricePlacementControl", null);
49
46
  s(this, "layoutOrientationControl", null);
50
- s(this, "strategyControl", null);
51
47
  /**
52
48
  * Debounced product fetch to prevent rapid API calls during config changes
53
49
  */
54
- s(this, "_debouncedFetchProducts", h(() => {
50
+ s(this, "_debouncedFetchProducts", m(() => {
55
51
  this.store.fetchRecommendationProducts();
56
52
  }, 500));
57
53
  /**
@@ -65,16 +61,16 @@ class et extends y {
65
61
  * count. The store pads products to the configured size, so in-place only
66
62
  * fails when the size actually changed.
67
63
  */
68
- s(this, "_debouncedRegenerateWithProducts", h(() => {
64
+ s(this, "_debouncedRegenerateWithProducts", m(() => {
69
65
  const t = this.store.recommendationProducts;
70
- if (!this.currentNode || !this.api || v(this.currentNode))
66
+ if (!this.currentNode || !this.api || D(this.currentNode))
71
67
  return;
72
68
  const e = this.api.getDocumentModifier();
73
- A({
69
+ E({
74
70
  currentNode: this.currentNode,
75
71
  documentModifier: e,
76
72
  products: t
77
- }) || w({
73
+ }) || A({
78
74
  currentNode: this.currentNode,
79
75
  documentModifier: e,
80
76
  products: t
@@ -82,11 +78,10 @@ class et extends y {
82
78
  }, 100));
83
79
  }
84
80
  getId() {
85
- return B;
81
+ return w;
86
82
  }
87
83
  getTemplate() {
88
- const t = p().isFeatureEnabled("reusableRecommendationStrategy");
89
- return this.algorithmControl = t ? null : new I(), this.localeControl = new _(), this.currencyControl = new R(), this.productCountControl = t ? null : new P(), this.productLayoutControl = new S(), this.filtersControl = t ? null : new T(), this.shuffleControl = t ? null : new L(), this.pricePlacementControl = new O(), this.layoutOrientationControl = new b(), this.strategyControl = t ? new k() : null, [
84
+ return this.algorithmControl = new N(), this.localeControl = new _(), this.currencyControl = new R(), this.productCountControl = new O(), this.productLayoutControl = new P(), this.filtersControl = new I(), this.shuffleControl = new S(), this.pricePlacementControl = new T(), this.layoutOrientationControl = new b(), [
90
85
  this.algorithmControl,
91
86
  this.localeControl,
92
87
  this.currencyControl,
@@ -95,20 +90,10 @@ class et extends y {
95
90
  this.filtersControl,
96
91
  this.shuffleControl,
97
92
  this.pricePlacementControl,
98
- this.layoutOrientationControl,
99
- this.strategyControl
100
- ].forEach((o) => {
101
- o && (o.api = this.api);
102
- }), t ? `
103
- <div class="recommendation-controls-container">
104
- ${this.strategyControl.getTemplate()}
105
- ${this.layoutOrientationControl.getTemplate()}
106
- ${this.localeControl.getTemplate()}
107
- ${this.currencyControl.getTemplate()}
108
- ${this.pricePlacementControl.getTemplate()}
109
- ${this.productLayoutControl.getTemplate()}
110
- </div>
111
- ` : `
93
+ this.layoutOrientationControl
94
+ ].forEach((e) => {
95
+ e.api = this.api;
96
+ }), `
112
97
  <div class="recommendation-controls-container">
113
98
  ${this.layoutOrientationControl.getTemplate()}
114
99
  ${this.productCountControl.getTemplate()}
@@ -146,8 +131,7 @@ class et extends y {
146
131
  this.productLayoutControl,
147
132
  this.filtersControl,
148
133
  this.shuffleControl,
149
- this.pricePlacementControl,
150
- this.strategyControl
134
+ this.pricePlacementControl
151
135
  ].forEach((n) => {
152
136
  var i;
153
137
  n != null && n.api && (n.currentNode = t, (i = n.onTemplateNodeUpdated) == null || i.call(n, t));
@@ -163,8 +147,7 @@ class et extends y {
163
147
  this.productLayoutControl,
164
148
  this.filtersControl,
165
149
  this.shuffleControl,
166
- this.pricePlacementControl,
167
- this.strategyControl
150
+ this.pricePlacementControl
168
151
  ].forEach((e) => {
169
152
  var o;
170
153
  return (o = e == null ? void 0 : e.onDestroy) == null ? void 0 : o.call(e);
@@ -184,8 +167,7 @@ class et extends y {
184
167
  this.productLayoutControl,
185
168
  this.filtersControl,
186
169
  this.shuffleControl,
187
- this.pricePlacementControl,
188
- this.strategyControl
170
+ this.pricePlacementControl
189
171
  ].forEach((e) => {
190
172
  var o;
191
173
  e && (e.api = this.api, e.currentNode = this.currentNode, (o = e.onRender) == null || o.call(e));
@@ -204,10 +186,9 @@ class et extends y {
204
186
  */
205
187
  _syncNodeConfigToStore() {
206
188
  var r;
207
- const t = m.getConfig(this.currentNode), e = this.store.currentRecommendationId, o = e !== null && ((r = this.store.blockStates[e]) == null ? void 0 : r.isInitialized);
189
+ const t = h.getConfig(this.currentNode), e = this.store.currentRecommendationId, o = e !== null && ((r = this.store.blockStates[e]) == null ? void 0 : r.isInitialized);
208
190
  this.store.patchCurrentBlockConfig({
209
191
  strategy: t.strategy,
210
- strategyId: t.strategyId,
211
192
  language: t.language,
212
193
  size: t.size,
213
194
  productIds: t.productIds,
@@ -268,36 +249,36 @@ class et extends y {
268
249
  _applySmartDefaults() {
269
250
  if (!this.currentNode || !this.api)
270
251
  return;
271
- const t = m.getConfig(this.currentNode), e = {};
252
+ const t = h.getConfig(this.currentNode), e = {};
272
253
  let o = null, r = null, n = null;
273
- if (t.currency.code === l.currency.code) {
254
+ if (t.currency.code === c.currency.code) {
274
255
  const { currencyList: i } = this.store;
275
256
  i.length > 0 && (i.some(
276
- (u) => u.value === `price.${l.currency.code}`
257
+ (u) => u.value === `price.${c.currency.code}`
277
258
  ) || (o = i[0].value.replace("price.", ""), e.currency = {
278
- ...l.currency,
259
+ ...c.currency,
279
260
  code: o,
280
261
  symbol: o
281
262
  }));
282
263
  }
283
- if (t.strategy === l.strategy) {
264
+ if (t.strategy === c.strategy) {
284
265
  const i = this.store.getActivePredictiveAlgorithms;
285
266
  i.length > 0 && (i.some(
286
- (u) => u.value === l.strategy
267
+ (u) => u.value === c.strategy
287
268
  ) || (r = i[0].value, e.strategy = r));
288
269
  }
289
- if (t.language === l.language) {
270
+ if (t.language === c.language) {
290
271
  const i = this.store.getLanguages;
291
272
  i.length > 0 && (i.some(
292
- (u) => u.value === l.language
273
+ (u) => u.value === c.language
293
274
  ) || (n = i[0].value, e.language = n));
294
275
  }
295
- !o && !r && !n || (m.updateConfig(
276
+ !o && !r && !n || (h.updateConfig(
296
277
  this.api,
297
278
  this.currentNode,
298
279
  e,
299
280
  "Applied smart defaults"
300
- ), o && e.currency && D({
281
+ ), o && e.currency && L({
301
282
  currentNode: this.currentNode,
302
283
  documentModifier: this.api.getDocumentModifier(),
303
284
  currency: e.currency
@@ -307,10 +288,10 @@ class et extends y {
307
288
  name: o,
308
289
  value: o,
309
290
  symbol: o,
310
- alignment: l.currency.alignment === "before" ? "0" : "1",
311
- decimalCount: l.currency.decimalCount.toString(),
312
- decimalSeparator: l.currency.decimalSeparator,
313
- thousandSeparator: l.currency.thousandSeparator
291
+ alignment: c.currency.alignment === "before" ? "0" : "1",
292
+ decimalCount: c.currency.decimalCount.toString(),
293
+ decimalSeparator: c.currency.decimalSeparator,
294
+ thousandSeparator: c.currency.thousandSeparator
314
295
  }
315
296
  } : {},
316
297
  ...r ? { strategy: r } : {},
@@ -321,10 +302,10 @@ class et extends y {
321
302
  * Reads the recommendation-id attribute from the block element within the node
322
303
  */
323
304
  _getRecommendationIdFromNode(t) {
324
- const e = E(t);
305
+ const e = k(t);
325
306
  if (!e || !("getAttribute" in e))
326
307
  return null;
327
- const o = e.getAttribute(x);
308
+ const o = e.getAttribute(v);
328
309
  if (!o)
329
310
  return null;
330
311
  const r = parseInt(o);
@@ -354,66 +335,58 @@ class et extends y {
354
335
  }
355
336
  const i = t.$state.configVersion;
356
337
  i !== o && (o = i, this._persistFiltersToNodeConfig(), this._debouncedFetchProducts());
357
- const c = t.recommendationProducts, u = c !== e, C = Array.isArray(c) && c.length > 0;
358
- u && C && (e = c, this._debouncedRegenerateWithProducts());
338
+ const a = t.recommendationProducts, u = a !== e, C = Array.isArray(a) && a.length > 0;
339
+ u && C && (e = a, this._debouncedRegenerateWithProducts());
359
340
  });
360
341
  }
361
342
  /**
362
- * Persists the current filter + strategy state from Pinia store to the
363
- * Stripo node config. This ensures they survive template save/reload cycles
364
- * (strategyId must be in esd-ext-config before any save — SD-149105).
365
- *
366
- * `size` rides along because assigning a strategy overwrites it in the
367
- * store only. Without this write, `_syncNodeConfigToStore` re-seeds the
368
- * store from the stale node config on the next panel open, and a block
369
- * whose saved HTML has the strategy's slot count gets rebuilt against the
370
- * old one — resetting migrator-applied per-element styles.
343
+ * Persists the current filter state from Pinia store to the Stripo node config.
344
+ * This ensures filters survive template save/reload cycles.
371
345
  */
372
346
  _persistFiltersToNodeConfig() {
373
347
  if (!this.currentNode || !this.api)
374
348
  return;
375
- const { filters: t, strategyId: e, size: o } = this.store.recommendationConfigs, r = m.getConfig(this.currentNode);
376
- JSON.stringify(r.filters) === JSON.stringify(t) && r.strategyId === e && r.size === o || m.updateConfig(
349
+ const { filters: t } = this.store.recommendationConfigs, e = h.getConfig(this.currentNode).filters;
350
+ JSON.stringify(e) !== JSON.stringify(t) && h.updateConfig(
377
351
  this.api,
378
352
  this.currentNode,
379
- { filters: t, strategyId: e, size: o },
353
+ { filters: t },
380
354
  "Update recommendation filters"
381
355
  );
382
356
  }
383
357
  }
384
358
  export {
385
- nt as ALGORITHM_CONTROL_ID,
386
- I as AlgorithmControl,
387
- B as CONTROL_BLOCK_ID,
388
- st as CURRENCY_CONTROL_ID,
359
+ tt as ALGORITHM_CONTROL_ID,
360
+ N as AlgorithmControl,
361
+ w as CONTROL_BLOCK_ID,
362
+ ot as CURRENCY_CONTROL_ID,
389
363
  R as CurrencyControl,
390
- at as FILTERS_CONTROL_ID,
391
- T as FiltersControl,
392
- ut as LAYOUT_ORIENTATION_CONTROL_ID,
393
- mt as LOCALE_CONTROL_ID,
364
+ nt as FILTERS_CONTROL_ID,
365
+ I as FiltersControl,
366
+ st as LAYOUT_ORIENTATION_CONTROL_ID,
367
+ lt as LOCALE_CONTROL_ID,
394
368
  b as LayoutOrientationControl,
395
369
  _ as LocaleControl,
396
- Ct as PRICE_PLACEMENT_CONTROL_ID,
397
- gt as PRODUCT_COUNT_CONTROL_ID,
398
- yt as PRODUCT_LAYOUT_CONTROL_ID,
399
- O as PricePlacementControl,
400
- P as ProductCountControl,
401
- S as ProductLayoutControl,
402
- et as RecommendationBlockControl,
403
- It as SHUFFLE_CONTROL_ID,
404
- Tt as STRATEGY_CONTROL_ID,
405
- L as ShuffleControl,
406
- k as StrategyControl,
407
- _t as adjustProductsToSize,
408
- Ot as formatProductPrice,
409
- E as getBlockElement,
410
- Pt as getCardComposition,
411
- St as getCurrentLayout,
412
- v as isPartnerManagedBlock,
413
- Lt as regenerateMobileProductRows,
414
- w as regenerateProductRowsWithStyles,
415
- D as setCurrencyAttributes,
416
- kt as updatePricesInPlace,
417
- A as updateProductContentInPlace,
418
- Dt as updateSingleProductContent
370
+ ut as PRICE_PLACEMENT_CONTROL_ID,
371
+ ht as PRODUCT_COUNT_CONTROL_ID,
372
+ Ct as PRODUCT_LAYOUT_CONTROL_ID,
373
+ T as PricePlacementControl,
374
+ O as ProductCountControl,
375
+ P as ProductLayoutControl,
376
+ Q as RecommendationBlockControl,
377
+ pt as SHUFFLE_CONTROL_ID,
378
+ S as ShuffleControl,
379
+ yt as adjustProductsToSize,
380
+ Nt as formatProductPrice,
381
+ k as getBlockElement,
382
+ Rt as getCardComposition,
383
+ It as getCurrentLayout,
384
+ bt as getMainContainerTbody,
385
+ D as isPartnerManagedBlock,
386
+ _t as regenerateMobileProductRows,
387
+ A as regenerateProductRowsWithStyles,
388
+ L as setCurrencyAttributes,
389
+ Tt as updatePricesInPlace,
390
+ E as updateProductContentInPlace,
391
+ Ot as updateSingleProductContent
419
392
  };
@@ -438,6 +438,7 @@ export {
438
438
  C as getBlockElement,
439
439
  U as getCardComposition,
440
440
  P as getCurrentLayout,
441
+ oe as getMainContainerTbody,
441
442
  ee as isPartnerManagedBlock,
442
443
  Pe as regenerateMobileProductRows,
443
444
  Te as regenerateProductRowsWithStyles,
@@ -0,0 +1,44 @@
1
+ import { createPaddingsControl as r, createTextBackgroundColorControl as T, createTextFontFamilyControl as e, createTextStyleControl as l, createTextSizeControl as C, createTextColorControl as c, createTextAlignControl as I } from "../../../controlFactories.js";
2
+ import { RecommendationBlockId as o } from "../../constants/blockIds.js";
3
+ import { RecommendationControlId as t } from "../../constants/controlIds.js";
4
+ import { BLOCK_ROOT_SELECTOR as n } from "../../constants/selectors.js";
5
+ const L = I(
6
+ t.TITLE_ALIGN,
7
+ o.TITLE,
8
+ n
9
+ ), a = c(
10
+ t.TITLE_COLOR,
11
+ o.TITLE,
12
+ n
13
+ ), i = C(
14
+ t.TITLE_SIZE,
15
+ o.TITLE,
16
+ n
17
+ ), E = l(
18
+ t.TITLE_STYLE,
19
+ o.TITLE,
20
+ n
21
+ ), m = e(
22
+ t.TITLE_FONT_FAMILY,
23
+ o.TITLE,
24
+ n
25
+ ), s = T(
26
+ t.TITLE_BACKGROUND,
27
+ o.TITLE,
28
+ n
29
+ ), d = r(
30
+ t.TITLE_PADDINGS,
31
+ o.TITLE,
32
+ n
33
+ ), x = {
34
+ align: L,
35
+ color: a,
36
+ size: i,
37
+ style: E,
38
+ fontFamily: m,
39
+ background: s,
40
+ paddings: d
41
+ };
42
+ export {
43
+ x as TitleControls
44
+ };
@@ -5,23 +5,24 @@ import { RecommendationBlockControl as i } from "./controls/main/index.js";
5
5
  import "./constants/selectors.js";
6
6
  import "./store/recommendation.js";
7
7
  import "./utils/captureStyleTemplates.js";
8
- import { NameControls as e } from "./controls/name/index.js";
9
- import { PriceControls as l } from "./controls/price/index.js";
10
- import { OldPriceControls as s } from "./controls/oldPrice/index.js";
11
- import { OmnibusPriceControls as p } from "./controls/omnibusPrice/index.js";
12
- import { OmnibusDiscountControls as a } from "./controls/omnibusDiscount/index.js";
13
- import { ButtonControls as c } from "./controls/button/index.js";
14
- import { ImageControls as C } from "./controls/image/index.js";
15
- import { CustomAttributeControls as f } from "./controls/customAttribute/index.js";
16
- import { SpacingControl as d } from "./controls/spacing/index.js";
17
- import { BlockBackgroundColorControl as u } from "./controls/blockBackground/index.js";
18
- import { CardBackgroundColorControl as g } from "./controls/cardBackground/index.js";
19
- import { RecommendationCardCompositionControl as y } from "./controls/cardComposition/index.js";
20
- import { SyncInfoMessageControl as B } from "./controls/syncInfoMessage.js";
21
- import { RecommendationIconsRegistry as P } from "./iconsRegistry.js";
22
- import R from "./recommendation.css.js";
23
- import { SettingsPanel as S } from "./settingsPanel.js";
24
- const k = [
8
+ import { TitleControls as e } from "./controls/title/index.js";
9
+ import { NameControls as l } from "./controls/name/index.js";
10
+ import { PriceControls as s } from "./controls/price/index.js";
11
+ import { OldPriceControls as p } from "./controls/oldPrice/index.js";
12
+ import { OmnibusPriceControls as a } from "./controls/omnibusPrice/index.js";
13
+ import { OmnibusDiscountControls as c } from "./controls/omnibusDiscount/index.js";
14
+ import { ButtonControls as C } from "./controls/button/index.js";
15
+ import { ImageControls as f } from "./controls/image/index.js";
16
+ import { CustomAttributeControls as d } from "./controls/customAttribute/index.js";
17
+ import { SpacingControl as u } from "./controls/spacing/index.js";
18
+ import { BlockBackgroundColorControl as g } from "./controls/blockBackground/index.js";
19
+ import { CardBackgroundColorControl as y } from "./controls/cardBackground/index.js";
20
+ import { RecommendationCardCompositionControl as B } from "./controls/cardComposition/index.js";
21
+ import { SyncInfoMessageControl as P } from "./controls/syncInfoMessage.js";
22
+ import { RecommendationIconsRegistry as R } from "./iconsRegistry.js";
23
+ import S from "./recommendation.css.js";
24
+ import { SettingsPanel as k } from "./settingsPanel.js";
25
+ const w = [
25
26
  e,
26
27
  l,
27
28
  s,
@@ -29,21 +30,22 @@ const k = [
29
30
  a,
30
31
  c,
31
32
  C,
32
- f
33
- ], w = [
33
+ f,
34
+ d
35
+ ], b = [
34
36
  i,
35
- u,
36
37
  g,
37
- d,
38
38
  y,
39
- B
40
- ], b = [
41
- ...w,
42
- ...k.flatMap((o) => Object.values(o))
43
- ], W = b.reduce(
39
+ u,
40
+ B,
41
+ P
42
+ ], v = [
43
+ ...b,
44
+ ...w.flatMap((o) => Object.values(o))
45
+ ], Y = v.reduce(
44
46
  (o, r) => o.addControl(r),
45
- new t().addBlock(m).withSettingsPanelRegistry(S)
46
- ).addStyles(R).withPreviewStyles(n).withIconsRegistry(P).build();
47
+ new t().addBlock(m).withSettingsPanelRegistry(k)
48
+ ).addStyles(S).withPreviewStyles(n).withIconsRegistry(R).build();
47
49
  export {
48
- W as default
50
+ Y as default
49
51
  };
@@ -3,9 +3,10 @@ import { BLOCK_ID as R } from "./block.js";
3
3
  import { RecommendationBlockId as S } from "./constants/blockIds.js";
4
4
  import { RecommendationControlId as T } from "./constants/controlIds.js";
5
5
  import "./constants/selectors.js";
6
- import { CONTROL_BLOCK_ID as U } from "./controls/main/index.js";
6
+ import { CONTROL_BLOCK_ID as L } from "./controls/main/index.js";
7
7
  import "./store/recommendation.js";
8
8
  import "./utils/captureStyleTemplates.js";
9
+ import "./controls/title/index.js";
9
10
  import "./controls/name/index.js";
10
11
  import "./controls/price/index.js";
11
12
  import "./controls/oldPrice/index.js";
@@ -15,7 +16,7 @@ import "./controls/button/index.js";
15
16
  import "./controls/image/index.js";
16
17
  import { SPACING_CONTROL_ID as A } from "./controls/spacing/index.js";
17
18
  import "./controls/blockBackground/index.js";
18
- import { CARD_BACKGROUND_COLOR_CONTROL_ID as L } from "./controls/cardBackground/index.js";
19
+ import { CARD_BACKGROUND_COLOR_CONTROL_ID as U } from "./controls/cardBackground/index.js";
19
20
  import { COMPOSITION_CONTROL_BLOCK_ID as D } from "./controls/cardComposition/index.js";
20
21
  import { SYNC_INFO_MESSAGE_CONTROL_ID as N } from "./controls/syncInfoMessage.js";
21
22
  class s extends E {
@@ -24,7 +25,7 @@ class s extends E {
24
25
  new _(
25
26
  I.SETTINGS,
26
27
  [
27
- U,
28
+ L,
28
29
  C.EXTERNAL_INDENTS
29
30
  ]
30
31
  ),
@@ -32,7 +33,7 @@ class s extends E {
32
33
  I.STYLES,
33
34
  [
34
35
  T.BLOCK_BACKGROUND,
35
- L,
36
+ U,
36
37
  A
37
38
  ]
38
39
  ),
@@ -42,6 +43,24 @@ class s extends E {
42
43
  D
43
44
  ]
44
45
  ).withLabel(this.api.translate("Card Composition"))
46
+ ], O[S.TITLE] = [
47
+ new _(
48
+ I.SETTINGS,
49
+ [
50
+ T.TITLE_STYLE,
51
+ T.TITLE_ALIGN,
52
+ T.TITLE_PADDINGS
53
+ ]
54
+ ),
55
+ new _(
56
+ I.STYLES,
57
+ [
58
+ T.TITLE_BACKGROUND,
59
+ T.TITLE_FONT_FAMILY,
60
+ T.TITLE_SIZE,
61
+ T.TITLE_COLOR
62
+ ]
63
+ )
45
64
  ], O[S.NAME] = [
46
65
  new _(
47
66
  I.SETTINGS,