@useinsider/guido 3.16.0-beta.ff4f1bd → 3.16.1-beta.626490d

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 (73) 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 +30 -31
  5. package/dist/composables/useRecommendation.js +36 -43
  6. package/dist/config/migrator/recommendationMigrator.js +4 -6
  7. package/dist/enums/extensions/recommendationBlock.js +23 -25
  8. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -13
  9. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -112
  10. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +53 -188
  11. package/dist/guido.css +1 -1
  12. package/dist/services/recommendationApi.js +28 -77
  13. package/dist/src/@types/config/schemas.d.ts +0 -12
  14. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  15. package/dist/src/composables/useConfig.d.ts +0 -2
  16. package/dist/src/composables/useRecommendation.d.ts +0 -1
  17. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  18. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -6
  19. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -199
  20. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  21. package/dist/src/services/recommendationApi.d.ts +1 -4
  22. package/dist/src/stores/config.d.ts +0 -18
  23. package/dist/utils/templatePreparation.js +34 -37
  24. package/package.json +1 -2
  25. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -18
  26. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -61
  27. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -106
  28. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-5JHlb8rM.js +0 -524
  29. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -8450
  30. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
  31. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
  32. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
  33. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
  34. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
  35. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
  36. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
  37. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
  38. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
  39. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
  40. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
  41. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
  42. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
  43. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
  44. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
  45. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
  46. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
  47. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
  48. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
  49. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
  50. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
  51. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
  52. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
  53. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
  54. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
  55. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
  56. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
  57. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
  58. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
  59. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
  60. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
  61. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
  62. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
  63. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
  64. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
  65. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
  69. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
  70. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
  71. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
  72. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -26
  73. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -41
package/README.md CHANGED
@@ -162,7 +162,6 @@ const config: GuidoConfigInput = {
162
162
  liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
163
163
  autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
164
164
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
165
- reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
166
165
  },
167
166
 
168
167
  // Optional: Callbacks
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as k, boolean as o, array as c, transform as C, record as y, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const p = {
76
76
  children: e(c(S)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
78
  select_items: e(c(S))
79
- })), N = k(
79
+ })), N = y(
80
80
  t(),
81
81
  R(c(S), [])
82
82
  ), P = g({
@@ -132,7 +132,7 @@ const p = {
132
132
  * strategy, currency, locale, and layout data.
133
133
  */
134
134
  recommendationConfigs: e(
135
- k(t(), P),
135
+ y(t(), P),
136
136
  {}
137
137
  )
138
138
  }), x = a({
@@ -219,13 +219,7 @@ const p = {
219
219
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
220
220
  allowlistEnabled: e(o(), !1),
221
221
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
222
- linkTrackingIds: e(o(), !1),
223
- /**
224
- * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
225
- * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
226
- * (they live on the strategy) and adds the Assign Strategy flow.
227
- */
228
- reusableRecommendationStrategy: e(o(), !1)
222
+ linkTrackingIds: e(o(), !1)
229
223
  }), B = i([
230
224
  "amp-accordion",
231
225
  "amp-carousel",
@@ -293,7 +287,7 @@ const p = {
293
287
  ...d.entries,
294
288
  type: u("custom"),
295
289
  /** Custom processor function */
296
- processor: y(
290
+ processor: k(
297
291
  (s) => typeof s == "function",
298
292
  "processor must be a function"
299
293
  )
@@ -313,7 +307,7 @@ const p = {
313
307
  * Return false to cancel the save operation.
314
308
  */
315
309
  externalValidation: e(
316
- y(
310
+ k(
317
311
  (s) => typeof s == "function",
318
312
  "externalValidation must be a function"
319
313
  )
@@ -1,18 +1,18 @@
1
- import a from "./Guido.vue2.js";
1
+ import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.configStore.isFeatureEnabled("reusableRecommendationStrategy") ? r(e.AssignStrategyDrawer) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, n = [], s = /* @__PURE__ */ i(
10
- a,
9
+ }, n = [], s = /* @__PURE__ */ a(
10
+ i,
11
11
  t,
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "e9d4540f"
15
+ "b0d3b445"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -5,27 +5,26 @@ import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js"
5
5
  import { usePartner as ee } from "../composables/usePartner.js";
6
6
  import { useStripo as te } from "../composables/useStripo.js";
7
7
  import { useTimerClone as oe } from "../composables/useTimerClone.js";
8
- import { migrate as A } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as N } from "../enums/defaults.js";
8
+ import { migrate as N } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as O } from "../enums/defaults.js";
10
10
  import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
11
11
  import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
12
  import se from "./organisms/AutoSaveController.vue.js";
13
13
  import ae from "./organisms/base/Toaster.vue.js";
14
- import ie from "./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js";
15
- import ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import de from "./organisms/header/HeaderWrapper.vue.js";
17
- import me from "./organisms/LoadingWrapper.vue.js";
18
- import le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import ue from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as pe } from "../services/stripoApi.js";
21
- import { useConfigStore as fe } from "../stores/config.js";
22
- import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
23
- import { useEditorStore as O } from "../stores/editor.js";
24
- import { usePreviewStore as ve } from "../stores/preview.js";
25
- import { useTemplateStore as ge } from "../stores/template.js";
26
- import { useUnsubscribeStore as Se } from "../stores/unsubscribe.js";
27
- import { readTrackFloor as P } from "../utils/linkTrackingIds.js";
28
- const Ke = /* @__PURE__ */ j({
14
+ import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ce from "./organisms/header/HeaderWrapper.vue.js";
16
+ import de from "./organisms/LoadingWrapper.vue.js";
17
+ import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ue } from "../services/stripoApi.js";
20
+ import { useConfigStore as pe } from "../stores/config.js";
21
+ import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
22
+ import { useEditorStore as P } from "../stores/editor.js";
23
+ import { usePreviewStore as ye } from "../stores/preview.js";
24
+ import { useTemplateStore as ve } from "../stores/template.js";
25
+ import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
26
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
+ const ze = /* @__PURE__ */ j({
29
28
  __name: "Guido",
30
29
  props: {
31
30
  config: null,
@@ -37,11 +36,11 @@ const Ke = /* @__PURE__ */ j({
37
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
37
  ), H = R(
39
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), g = B(), l = B(), u = ye(), S = Se(), o = fe();
39
+ ), h = B(), l = B(), u = fe(), S = he(), o = pe();
41
40
  a.ready && o.init(a.config);
42
- const c = O(), $ = ve(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), h = () => {
41
+ const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
43
42
  var t;
44
- return (t = g.value) == null ? void 0 : t.handleSave(!0);
43
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
45
44
  }, b = (t) => {
46
45
  c.loadingStatus = t;
47
46
  };
@@ -53,10 +52,10 @@ const Ke = /* @__PURE__ */ j({
53
52
  userId: o.userId,
54
53
  username: o.username,
55
54
  partnerName: o.partnerName,
56
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
57
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
55
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
56
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
58
57
  };
59
- }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: D } = pe(), { cloneTimersOnSave: C, hasTimerBlocks: k } = oe(), q = U(() => {
58
+ }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
60
59
  var t;
61
60
  return !((t = o.ui) != null && t.showHeader);
62
61
  });
@@ -100,12 +99,12 @@ const Ke = /* @__PURE__ */ j({
100
99
  S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
101
100
  const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
102
101
  let n = {
103
- html: s && await A(s, L),
102
+ html: s && await N(s, L),
104
103
  css: d
105
104
  };
106
- n.html || (n = await D(), n.html = await A(n.html, L));
107
- const K = M ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
108
- k(n.html) && (n.html = await C(n.html)), M && (c.trackIdSessionFloor = Math.max(K, P(n.html)));
105
+ n.html || (n = await C(), n.html = await N(n.html, L));
106
+ const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
107
+ k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
109
108
  const V = {
110
109
  preselectedDynamicContentList: I,
111
110
  onReady: () => {
@@ -119,7 +118,7 @@ const Ke = /* @__PURE__ */ j({
119
118
  };
120
119
  return J(async () => {
121
120
  var e;
122
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), O().$reset(), ge().$reset(), y();
121
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
123
122
  const t = (e = l.value) == null ? void 0 : e.parentElement;
124
123
  if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
125
124
  await v();
@@ -143,11 +142,11 @@ const Ke = /* @__PURE__ */ j({
143
142
  close: F
144
143
  },
145
144
  hasChanges: m,
146
- saveSilent: h,
145
+ saveSilent: g,
147
146
  setLoading: b
148
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: g, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: h, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: D, cloneTimersOnSave: C, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, AssignStrategyDrawer: ie, FilterSelectionDrawer: ce, HeaderWrapper: de, LoadingWrapper: me, SaveAsTemplateDrawer: le, UnsubscribeWrapper: ue };
147
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
149
148
  }
150
149
  });
151
150
  export {
152
- Ke as default
151
+ ze as default
153
152
  };
@@ -1,21 +1,21 @@
1
- import { getRecommendationFeedSourceMaps as y, URLS as I } from "../enums/extensions/recommendationBlock.js";
2
- import { MinDeviceViewport as C, DefaultPadding as R } from "../enums/recommendation.js";
3
- import { useRecommendationExtensionStore as m } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
- import { getPartnerRecommendationParams as h } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
1
+ import { getRecommendationFeedSourceMaps as I, URLS as R } from "../enums/extensions/recommendationBlock.js";
2
+ import { MinDeviceViewport as C, DefaultPadding as b } from "../enums/recommendation.js";
3
+ import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
+ import { generateCompleteFilterQuery as h } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
+ import { getPartnerRecommendationParams as y } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
6
6
  import { useConfigStore as x } from "../stores/config.js";
7
7
  const k = () => ({
8
8
  calculateCardWidth: ({
9
- mobileLeftPadding: i,
10
- mobileRightPadding: c,
11
- cardsInRow: s,
9
+ mobileLeftPadding: a,
10
+ mobileRightPadding: s,
11
+ cardsInRow: c,
12
12
  unresponsive: o
13
13
  }) => {
14
- const n = o ? s : 1, e = i + c + (n - 1) * R;
15
- return (C - e) / n;
14
+ const r = o ? c : 1, e = a + s + (r - 1) * b;
15
+ return (C - e) / r;
16
16
  },
17
- getRecommendationCampaignData: (i) => {
18
- const c = m(), s = Number(i), o = c.blockStates[s];
17
+ getRecommendationCampaignData: (a) => {
18
+ const s = l(), c = Number(a), o = s.blockStates[c];
19
19
  if (!o)
20
20
  return {
21
21
  textTrimming: !1,
@@ -29,54 +29,47 @@ const k = () => ({
29
29
  discountBeforeTextValue: "",
30
30
  discountAfterTextValue: ""
31
31
  };
32
- const { recommendationConfigs: n } = o, e = n.orientation === "grid" ? "vertical" : "horizontal";
32
+ const { recommendationConfigs: r } = o, e = r.orientation === "grid" ? "vertical" : "horizontal";
33
33
  return {
34
- textTrimming: n.textTrimming,
34
+ textTrimming: r.textTrimming,
35
35
  orientation: e,
36
36
  mobileLeftPadding: 0,
37
37
  mobileRightPadding: 0,
38
- cardsInRow: n.cardsInRow,
39
- unresponsive: n.unresponsive,
38
+ cardsInRow: r.cardsInRow,
39
+ unresponsive: r.unresponsive,
40
40
  priceBeforeTextValue: "",
41
41
  priceAfterTextValue: "",
42
42
  discountBeforeTextValue: "",
43
43
  discountAfterTextValue: ""
44
44
  };
45
45
  },
46
- buildCampaignUrl: (i, c) => {
47
- var l;
48
- const s = m(), o = x(), n = Number(i);
46
+ buildCampaignUrl: (a, s) => {
47
+ var m;
48
+ const c = l(), o = x(), r = Number(a);
49
49
  let e;
50
- if (c)
51
- e = c;
50
+ if (s)
51
+ e = s;
52
52
  else {
53
- const a = s.blockStates[n];
54
- if (!a)
53
+ const i = c.blockStates[r];
54
+ if (!i)
55
55
  return "";
56
- const { recommendationConfigs: r } = a;
56
+ const { recommendationConfigs: n } = i;
57
57
  e = {
58
- strategy: r.strategy,
59
- strategyId: r.strategyId,
60
- language: r.language,
61
- currencyCode: r.currencySettings.value,
62
- size: r.size,
63
- productIds: r.productIds,
64
- filters: r.filters,
65
- shuffleProducts: r.shuffleProducts
58
+ strategy: n.strategy,
59
+ language: n.language,
60
+ currencyCode: n.currencySettings.value,
61
+ size: n.size,
62
+ productIds: n.productIds,
63
+ filters: n.filters,
64
+ shuffleProducts: n.shuffleProducts
66
65
  };
67
66
  }
68
- if (e.strategyId)
69
- return s.recommendationCampaignUrls[i] = {
70
- strategyId: e.strategyId,
71
- locale: e.language,
72
- currency: e.currencyCode
73
- }, "";
74
- const g = ((l = y().find((a) => a.key === e.strategy)) == null ? void 0 : l.path) || "", t = new URLSearchParams();
67
+ const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
75
68
  t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
76
- const f = e.filters.filter((a) => a.isValid), d = b(f);
77
- d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(o.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
78
- const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${g}?${p}`;
79
- return s.recommendationCampaignUrls[i] = u, u;
69
+ const g = e.filters.filter((i) => i.isValid), d = h(g);
70
+ d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(y(o.partnerName, e.strategy)).forEach(([i, n]) => t.set(i, n));
71
+ const p = decodeURIComponent(t.toString()), u = `${R.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
72
+ return c.recommendationCampaignUrls[a] = u, u;
80
73
  }
81
74
  });
82
75
  export {
@@ -1,6 +1,6 @@
1
1
  import { BlockId as f } from "../../enums/block.js";
2
- import { useTemplateStore as y } from "../../stores/template.js";
3
- import { mapComposition as b } from "./recommendation/compositionMapper.js";
2
+ import { useTemplateStore as b } from "../../stores/template.js";
3
+ import { mapComposition as y } from "./recommendation/compositionMapper.js";
4
4
  import { extractCurrencyFromBlock as v, extractTitleText as C, extractCardBgColor as M, isPartnerManagedBlock as S } from "./recommendation/extractors.js";
5
5
  import { buildBlockHtml as w } from "./recommendation/htmlBuilder.js";
6
6
  import { parseRecommendationId as x, parseLegacyConfig as R } from "./recommendation/parseLegacyConfig.js";
@@ -20,10 +20,8 @@ function B(i, t, a) {
20
20
  ), !1;
21
21
  const n = a[String(o)] ?? {
22
22
  currencySettings: v(t)
23
- }, c = T(n, r, o), e = b((d = r.composition) == null ? void 0 : d.variables), l = C(t), g = M(t), p = {
23
+ }, c = T(n, r, o), e = y((d = r.composition) == null ? void 0 : d.variables), l = C(t), g = M(t), p = {
24
24
  ...c,
25
- // Legacy blocks predate RRS — never strategy-backed.
26
- strategyId: "",
27
25
  composition: e.composition,
28
26
  visibility: e.visibility,
29
27
  textTrimming: e.anyTextTrimming
@@ -58,7 +56,7 @@ function B(i, t, a) {
58
56
  function q(i, t = {}) {
59
57
  const a = new DOMParser(), o = a.parseFromString(i, "text/html"), r = Array.from(o.querySelectorAll(h));
60
58
  try {
61
- y().$patch((e) => {
59
+ b().$patch((e) => {
62
60
  e.migrations = {
63
61
  ...e.migrations,
64
62
  [f.Recommendation]: r.length
@@ -2,11 +2,10 @@ import { useTranslations as r } from "../../composables/useTranslations.js";
2
2
  const l = {
3
3
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com",
4
4
  // Relative path → same-origin as the embedding inone dashboard.
5
- PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
6
- RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies"
7
- }, c = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", d = {
5
+ PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes"
6
+ }, c = {
8
7
  CLIENT_ID: "clientId"
9
- }, m = () => {
8
+ }, d = () => {
10
9
  const e = r();
11
10
  return [
12
11
  {
@@ -70,14 +69,14 @@ const l = {
70
69
  path: "top-sellers"
71
70
  }
72
71
  ];
73
- }, p = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], v = [
72
+ }, m = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], p = [
74
73
  { text: "before the amount", value: "0" },
75
74
  { text: "after the amount", value: "1" }
76
- ], h = [
75
+ ], v = [
77
76
  { text: "dot(.)", value: "." },
78
77
  { text: "comma(,)", value: "," },
79
78
  { text: "space( )", value: " " }
80
- ], x = [
79
+ ], h = [
81
80
  { text: "0", value: "0" },
82
81
  { text: "1", value: "1" },
83
82
  { text: "2", value: "2" },
@@ -89,55 +88,54 @@ const l = {
89
88
  { text: "contains", value: "~" },
90
89
  { text: "does not contain", value: "!~" },
91
90
  { text: "any of", value: a }
92
- ], s = [
91
+ ], n = [
93
92
  { text: "is exactly", value: "=" },
94
93
  { text: "is not exactly", value: "!==" },
95
94
  { text: "contains", value: "~" },
96
95
  { text: "does not contain", value: "!~" },
97
96
  { text: "any of", value: a }
98
- ], n = [
97
+ ], o = [
99
98
  { text: "is equal to", value: "=" },
100
99
  { text: "is greater than", value: ">" },
101
100
  { text: "is less than", value: "<" }
102
- ], o = [
101
+ ], s = [
103
102
  { text: "is equal to", value: "=" },
104
103
  { text: "after", value: ">" },
105
104
  { text: "before", value: "<" }
106
105
  ], i = [
107
106
  { text: "true", value: "==" },
108
107
  { text: "false", value: "!=" }
109
- ], b = (e) => {
108
+ ], x = (e) => {
110
109
  if (!e)
111
110
  return t;
112
111
  switch (e) {
113
112
  case "Boolean":
114
113
  return i;
115
114
  case "Date":
116
- return o;
115
+ return s;
117
116
  case "Number":
118
- return n;
117
+ return o;
119
118
  case "String":
120
119
  return t;
121
120
  case "Strings":
122
- return s;
121
+ return n;
123
122
  default:
124
123
  return t;
125
124
  }
126
125
  };
127
126
  export {
128
127
  a as OP_ANY_OF,
129
- p as PriceAttributes,
130
- d as QUERY_PARAMS,
131
- c as RRS_ACTIVE_EMAIL_FILTER,
128
+ m as PriceAttributes,
129
+ c as QUERY_PARAMS,
132
130
  l as URLS,
133
- x as currencyDecimalCounts,
134
- v as currencyLocationMaps,
135
- h as currencyOperators,
136
- b as getOperatorOptions,
137
- m as getRecommendationFeedSourceMaps,
138
- s as operatorOptionsForArrayOfStrings,
131
+ h as currencyDecimalCounts,
132
+ p as currencyLocationMaps,
133
+ v as currencyOperators,
134
+ x as getOperatorOptions,
135
+ d as getRecommendationFeedSourceMaps,
136
+ n as operatorOptionsForArrayOfStrings,
139
137
  i as operatorOptionsForBooleans,
140
- o as operatorOptionsForDates,
141
- n as operatorOptionsForNumbers,
138
+ s as operatorOptionsForDates,
139
+ o as operatorOptionsForNumbers,
142
140
  t as operatorOptionsForStrings
143
141
  };
@@ -1,16 +1,16 @@
1
- import { DEFAULT_COLUMN_SPACING as n, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as R, DEFAULT_MOBILE_COLUMN_SPACING as U, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as a } from "./layout.js";
1
+ import { DEFAULT_COLUMN_SPACING as n, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as R, DEFAULT_MOBILE_COLUMN_SPACING as U, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
2
  import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as r, ATTR_PRODUCT_OMNIBUS_DISCOUNT as i, ATTR_PRODUCT_BUTTON as I } from "./selectors.js";
3
- const C = {
3
+ const D = {
4
4
  code: "USD",
5
5
  symbol: "USD",
6
6
  alignment: "after",
7
7
  decimalCount: 2,
8
8
  decimalSeparator: ".",
9
9
  thousandSeparator: ","
10
- }, D = {
10
+ }, O = {
11
11
  textBefore: "",
12
12
  textAfter: ""
13
- }, O = {
13
+ }, a = {
14
14
  textBefore: "",
15
15
  textAfter: ""
16
16
  }, A = [
@@ -36,13 +36,11 @@ const C = {
36
36
  size: "6",
37
37
  shuffleProducts: !1,
38
38
  language: "en_US",
39
- currency: C,
39
+ currency: D,
40
40
  filters: [],
41
- // Version NOT bumped: mergeWithDefaults() backfills '' for older configs.
42
- strategyId: "",
43
41
  // Layout
44
42
  layout: "grid",
45
- cardsInRow: a,
43
+ cardsInRow: C,
46
44
  mobileCardsInRow: e,
47
45
  mobileLayoutEnabled: !1,
48
46
  previousMobileCardsInRow: e,
@@ -54,8 +52,8 @@ const C = {
54
52
  composition: A,
55
53
  visibility: c,
56
54
  // Element settings
57
- omnibusPrice: D,
58
- omnibusDiscount: O,
55
+ omnibusPrice: O,
56
+ omnibusDiscount: a,
59
57
  textTrimming: !1,
60
58
  // Price placement (block-level, affects all cards)
61
59
  // Default ON = current stacked look, so existing templates are unaffected.
@@ -73,10 +71,10 @@ const C = {
73
71
  export {
74
72
  m as CURRENT_CONFIG_VERSION,
75
73
  A as DEFAULT_COMPOSITION,
76
- C as DEFAULT_CURRENCY,
74
+ D as DEFAULT_CURRENCY,
77
75
  l as DEFAULT_NODE_CONFIG,
78
- O as DEFAULT_OMNIBUS_DISCOUNT,
79
- D as DEFAULT_OMNIBUS_PRICE,
76
+ a as DEFAULT_OMNIBUS_DISCOUNT,
77
+ O as DEFAULT_OMNIBUS_PRICE,
80
78
  c as DEFAULT_VISIBILITY,
81
79
  N as EXCLUDED_ALGORITHM_IDS
82
80
  };