@useinsider/guido 3.17.0-beta.3e9d6e7 → 3.17.0-beta.562c5b1

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 (83) hide show
  1. package/dist/components/Guido.vue.js +6 -6
  2. package/dist/components/Guido.vue2.js +50 -50
  3. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -10
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +43 -41
  5. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
  6. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +13 -0
  7. package/dist/composables/useCustomInterfaceAppearance.js +50 -39
  8. package/dist/composables/useRecommendation.js +31 -30
  9. package/dist/config/migrator/recommendation/settingsMapper.js +19 -17
  10. package/dist/enums/academy.js +2 -1
  11. package/dist/enums/extensions/recommendationBlock.js +25 -24
  12. package/dist/extensions/Blocks/Recommendation/block.js +26 -21
  13. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +32 -32
  14. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +96 -95
  15. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +147 -153
  16. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +41 -31
  17. package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
  18. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +111 -113
  19. package/dist/guido.css +1 -1
  20. package/dist/services/recommendationApi.js +46 -50
  21. package/dist/src/components/organisms/extensions/recommendation/{StrategyInfoBox.vue.d.ts → StrategyInfoBoxContent.vue.d.ts} +4 -11
  22. package/dist/src/enums/academy.d.ts +1 -0
  23. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
  24. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +7 -6
  25. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  26. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +13 -9
  27. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -8
  28. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +14 -18
  29. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -41
  30. package/dist/src/services/recommendationApi.d.ts +1 -1
  31. package/dist/src/utils/strategyInfoBox.d.ts +35 -0
  32. package/dist/static/assets/icons/line-change.svg.js +5 -0
  33. package/dist/static/assets/icons/line-delete.svg.js +5 -0
  34. package/dist/static/assets/icons/line-plus.svg.js +5 -0
  35. package/dist/static/styles/components/recommendation-strategy.css.js +36 -19
  36. package/dist/utils/dateUtil.js +24 -18
  37. package/dist/utils/strategyInfoBox.js +68 -0
  38. package/package.json +2 -2
  39. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +0 -20
  40. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +0 -55
  41. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +0 -526
  42. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +0 -9345
  43. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +0 -174
  44. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +0 -381
  45. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +0 -236
  46. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +0 -70
  47. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +0 -350
  48. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +0 -371
  49. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +0 -152
  50. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +0 -141
  51. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +0 -1047
  52. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +0 -96050
  53. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +0 -2042
  54. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +0 -166
  55. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +0 -1098
  56. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +0 -55
  57. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +0 -265
  58. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +0 -184
  59. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +0 -50
  60. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +0 -453
  61. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +0 -145
  62. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +0 -176
  63. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +0 -266
  64. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +0 -114
  65. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +0 -200
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +0 -451
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +0 -49
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +0 -119
  69. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +0 -4309
  70. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +0 -129
  71. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +0 -503
  72. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +0 -253
  73. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +0 -107
  74. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +0 -134
  75. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +0 -464
  76. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +0 -28
  77. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +0 -23
  78. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +0 -29
  79. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +0 -109
  80. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +0 -2339
  81. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +0 -16
  82. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +0 -17
  83. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +0 -188
@@ -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), e.isRrsEnabled ? r(e.AssignStrategyDrawer) : o._e(), 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
- "f258bc9e"
15
+ "b13f0cfc"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,30 +1,30 @@
1
- import { defineComponent as J, defineAsyncComponent as g, ref as B, computed as U, watch as _, onMounted as Q, onUnmounted as X } from "vue";
2
- import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as Z } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as ee } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as te } from "../composables/usePartner.js";
6
- import { useStripo as oe } from "../composables/useStripo.js";
7
- import { useTimerClone as ne } from "../composables/useTimerClone.js";
1
+ import { defineComponent as Q, defineAsyncComponent as g, ref as U, computed as S, watch as _, onMounted as X, onUnmounted as Y } from "vue";
2
+ import { useCortexBlueprintBridge as Z } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as ee } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as te } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as oe } from "../composables/usePartner.js";
6
+ import { useStripo as ne } from "../composables/useStripo.js";
7
+ import { useTimerClone as re } from "../composables/useTimerClone.js";
8
8
  import { migrate as A } from "../config/migrator/index.js";
9
9
  import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as re } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as se } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import ae from "./organisms/AutoSaveController.vue.js";
13
- import ie from "./organisms/base/Toaster.vue.js";
14
- import ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import de from "./organisms/header/HeaderWrapper.vue.js";
16
- import me from "./organisms/LoadingWrapper.vue.js";
17
- import le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ue from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as pe } from "../services/stripoApi.js";
20
- import { useConfigStore as fe } from "../stores/config.js";
21
- import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
10
+ import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as ae } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import ie from "./organisms/AutoSaveController.vue.js";
13
+ import ce from "./organisms/base/Toaster.vue.js";
14
+ import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import me from "./organisms/header/HeaderWrapper.vue.js";
16
+ import le from "./organisms/LoadingWrapper.vue.js";
17
+ import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as fe } from "../services/stripoApi.js";
20
+ import { useConfigStore as ye } from "../stores/config.js";
21
+ import { useDynamicContentStore as ve } from "../stores/dynamic-content.js";
22
22
  import { useEditorStore as O } from "../stores/editor.js";
23
- import { usePreviewStore as ve } from "../stores/preview.js";
24
- import { useTemplateStore as ge } from "../stores/template.js";
25
- import { useUnsubscribeStore as Se } from "../stores/unsubscribe.js";
23
+ import { usePreviewStore as ge } from "../stores/preview.js";
24
+ import { useTemplateStore as Se } from "../stores/template.js";
25
+ import { useUnsubscribeStore as be } from "../stores/unsubscribe.js";
26
26
  import { readTrackFloor as P } from "../utils/linkTrackingIds.js";
27
- const qe = /* @__PURE__ */ J({
27
+ const Ke = /* @__PURE__ */ Q({
28
28
  __name: "Guido",
29
29
  props: {
30
30
  config: null,
@@ -38,15 +38,15 @@ const qe = /* @__PURE__ */ J({
38
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
39
  ), $ = g(
40
40
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), S = B(), l = B(), u = ye(), h = Se(), o = fe();
41
+ ), b = U(), l = U(), u = ve(), h = be(), o = ye();
42
42
  a.ready && o.init(a.config);
43
- const c = O(), z = ve(), m = U(() => c.hasChanges), { isTestPartner: q } = te(), b = () => {
43
+ const c = O(), z = ge(), m = S(() => c.hasChanges), { isTestPartner: q } = oe(), E = () => {
44
44
  var t;
45
- return (t = S.value) == null ? void 0 : t.handleSave(!0);
46
- }, E = (t) => {
45
+ return (t = b.value) == null ? void 0 : t.handleSave(!0);
46
+ }, w = (t) => {
47
47
  c.loadingStatus = t;
48
48
  };
49
- Y(), ee();
49
+ Z(), te();
50
50
  const p = () => {
51
51
  var t, e;
52
52
  return {
@@ -57,11 +57,11 @@ const qe = /* @__PURE__ */ J({
57
57
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
58
58
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
59
59
  };
60
- }, { initPlugin: w, preloadRuntime: D } = oe(), { getDefaultTemplate: C } = pe(), { cloneTimersOnSave: k, hasTimerBlocks: T } = ne(), K = U(() => {
60
+ }, { initPlugin: D, preloadRuntime: C } = ne(), { getDefaultTemplate: k } = fe(), { cloneTimersOnSave: T, hasTimerBlocks: F } = re(), K = S(() => {
61
61
  var t;
62
62
  return !((t = o.ui) != null && t.showHeader);
63
- });
64
- Z({
63
+ }), V = S(() => o.isFeatureEnabled("reusableRecommendationStrategy"));
64
+ ee({
65
65
  onBack: () => {
66
66
  console.debug("guido:back"), r("back");
67
67
  },
@@ -76,9 +76,9 @@ const qe = /* @__PURE__ */ J({
76
76
  console.debug("guido:test-email:click"), r("test-email:click");
77
77
  }
78
78
  });
79
- const F = (t) => {
79
+ const I = (t) => {
80
80
  console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
81
- }, I = () => {
81
+ }, R = () => {
82
82
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
83
  };
84
84
  _(() => m.value, () => {
@@ -91,7 +91,7 @@ const qe = /* @__PURE__ */ J({
91
91
  let i = null;
92
92
  const y = () => {
93
93
  var e;
94
- const t = document.querySelector(re);
94
+ const t = document.querySelector(se);
95
95
  (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
96
96
  }, v = async () => {
97
97
  var t;
@@ -99,30 +99,30 @@ const qe = /* @__PURE__ */ J({
99
99
  o.initialized || o.init(a.config), c.templateId = o.templateId;
100
100
  const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
101
101
  h.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
102
- const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, R = o.isFeatureEnabled("linkTrackingIds");
102
+ const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
103
103
  let n = {
104
104
  html: s && await A(s, M),
105
105
  css: d
106
106
  };
107
- n.html || (n = await C(), n.html = await A(n.html, M));
108
- const V = R ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
109
- T(n.html) && (n.html = await k(n.html)), R && (c.trackIdSessionFloor = Math.max(V, P(n.html)));
110
- const j = {
107
+ n.html || (n = await k(), n.html = await A(n.html, M));
108
+ const j = B ? P(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
109
+ F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(j, P(n.html)));
110
+ const J = {
111
111
  preselectedDynamicContentList: L,
112
112
  onReady: () => {
113
113
  console.debug("guido:ready"), r("ready");
114
114
  }
115
115
  };
116
- await w(n, p(), j), u.selectedDynamicContentList = L;
116
+ await D(n, p(), J), u.selectedDynamicContentList = L;
117
117
  } catch (e) {
118
118
  console.error("Failed to initialize Stripo editor:", e);
119
119
  }
120
120
  };
121
- return Q(async () => {
121
+ return X(async () => {
122
122
  var e;
123
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), se().$reset(), O().$reset(), ge().$reset(), y();
123
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ae().$reset(), O().$reset(), Se().$reset(), y();
124
124
  const t = (e = l.value) == null ? void 0 : e.parentElement;
125
- if (t && (i = new ResizeObserver(y), i.observe(t)), D(), a.ready)
125
+ if (t && (i = new ResizeObserver(y), i.observe(t)), C(), a.ready)
126
126
  await v();
127
127
  else {
128
128
  const s = _(() => a.ready, (d) => {
@@ -130,7 +130,7 @@ const qe = /* @__PURE__ */ J({
130
130
  });
131
131
  }
132
132
  document.addEventListener("dynamic-content:open", f);
133
- }), X(() => {
133
+ }), Y(() => {
134
134
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
135
135
  try {
136
136
  window.UIEditor.removeEditor();
@@ -140,15 +140,15 @@ const qe = /* @__PURE__ */ J({
140
140
  o.reset();
141
141
  }), x({
142
142
  dynamicContent: {
143
- insert: F,
144
- close: I
143
+ insert: I,
144
+ close: R
145
145
  },
146
146
  hasChanges: m,
147
- saveSilent: b,
148
- setLoading: E
149
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef: S, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: b, setLoading: E, emit: r, buildMetadata: p, initPlugin: w, preloadRuntime: D, getDefaultTemplate: C, cloneTimersOnSave: k, hasTimerBlocks: T, noHeader: K, insertDynamicContent: F, closeDynamicContent: I, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: ae, Toaster: ie, FilterSelectionDrawer: ce, HeaderWrapper: de, LoadingWrapper: me, SaveAsTemplateDrawer: le, UnsubscribeWrapper: ue };
147
+ saveSilent: E,
148
+ setLoading: w
149
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, AssignStrategyDrawer: $, headerWrapperRef: b, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: h, props: a, configStore: o, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: E, setLoading: w, emit: r, buildMetadata: p, initPlugin: D, preloadRuntime: C, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: K, isRrsEnabled: V, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: ie, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe };
150
150
  }
151
151
  });
152
152
  export {
153
- qe as default
153
+ Ke as default
154
154
  };
@@ -1,18 +1,21 @@
1
- import a from "./AssignStrategyDrawer.vue2.js";
1
+ import r from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e(t.WpDrawer, { attrs: { id: "assign-strategy-drawer", "description-status": "", size: "medium", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.assignStrategyDrawerStatus, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { cancelOrBackButtonEvent: t.closeDrawer, onCloseEvent: t.closeDrawer, primaryButtonEvent: t.assignStrategy } }, [t.store.assignStrategyDrawerStatus ? e("div", { staticClass: "assign-strategy-drawer-content" }, [e(t.InSelect, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "search-status": "", "static-child-position": "bottom right", "button-status": !1, "dynamic-child-position": !1, "label-text": t.trans("ds-steps.recommendation-strategy"), options: t.strategyOptions, "placeholder-text": t.trans("ds-steps.select-strategy"), "skeleton-sizing": { width: 240, height: 42 }, "skeleton-status": t.store.strategiesLoading, value: t.selectValue }, on: { select: t.onSelect } }), t.selectedStrategy ? e("div", { key: String(t.selectedStrategy.strategy_id), staticClass: "assign-strategy-detail" }, [e(t.OrgStrategyDetailModal, { attrs: { show: "", "campaign-details-tab-status": t.campaignTabSupported, "footer-status": !1, strategy: t.selectedStrategy } })], 1) : s._e()], 1) : s._e()]);
7
- }, o = [], i = /* @__PURE__ */ r(
3
+ /* empty css */
4
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var a = function() {
6
+ var e = this, s = e._self._c, t = e._self._setupProxy;
7
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
+ return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading, "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { select: t.onSelect } })], 1)];
9
+ }, proxy: !0 }], null, !1, 5799417) }) : e._e();
10
+ }, n = [], i = /* @__PURE__ */ o(
11
+ r,
8
12
  a,
9
13
  n,
10
- o,
11
14
  !1,
12
15
  null,
13
- "2fb85559"
16
+ "110d75e5"
14
17
  );
15
- const p = i.exports;
18
+ const y = i.exports;
16
19
  export {
17
- p as default
20
+ y as default
18
21
  };
@@ -1,67 +1,69 @@
1
- import { defineComponent as v, ref as l, computed as o, watch as _ } from "vue";
2
- /* empty css */
3
- import w from "../../../wrappers/WpDrawer.vue.js";
4
- import { useToaster as D } from "../../../../composables/useToaster.js";
5
- import { useTranslations as T } from "../../../../composables/useTranslations.js";
6
- import { ToasterTypeOptions as b } from "../../../../enums/toaster.js";
7
- import { useRecommendationExtensionStore as h } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
8
- import { OrgStrategyDetailModal as x } from "../../../../node_modules/@useinsider/design-system-organisms/dist/index.js";
9
- import { InSelect as B } from "@useinsider/design-system-vue";
10
- import O from "./StrategyInfoBox.vue.js";
11
- const $ = /* @__PURE__ */ v({
1
+ import { defineComponent as f, defineAsyncComponent as g, ref as l, computed as a, watch as w } from "vue";
2
+ import "@useinsider/design-system-organisms/style";
3
+ import { useToaster as _ } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as D } from "../../../../composables/useTranslations.js";
5
+ import { URLS as v } from "../../../../enums/extensions/recommendationBlock.js";
6
+ import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
7
+ import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
8
+ import O from "./StrategyInfoBoxContent.vue.js";
9
+ import { buildStrategyInfoBoxProps as x } from "../../../../utils/strategyInfoBox.js";
10
+ const L = /* @__PURE__ */ f({
12
11
  __name: "AssignStrategyDrawer",
13
12
  setup(A) {
14
- const c = "/discovery/recommendation-strategies", s = T(), e = h(), { showToaster: g, handleError: u } = D(), r = l(null), a = l(!1), m = l(!1), d = o(() => e.assignStrategyDrawerStatus ? s("email-editor.assign-strategy-description", { url: c }) : "");
15
- _(() => e.assignStrategyDrawerStatus, (t) => {
13
+ const m = g(
14
+ async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDetailModal
15
+ ), y = g(
16
+ async () => (await import("@useinsider/design-system-organisms")).OrgStrategyDropdown
17
+ ), r = D(), e = T(), { showToaster: n } = _(), s = l(null), o = l(!1), u = a(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: v.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
18
+ w(() => e.assignStrategyDrawerStatus, (t) => {
16
19
  if (!t)
17
20
  return;
18
21
  const { strategyId: i } = e.recommendationConfigs;
19
- r.value = i || null, m.value = !!window.l10n, e.fetchStrategies().catch((S) => {
20
- u(S, s("discovery-strategy.error-description"));
22
+ s.value = i || null, o.value = !1, e.fetchStrategies().catch(() => {
23
+ n({
24
+ type: p.Error,
25
+ message: r("discovery-strategy.error-description")
26
+ });
21
27
  });
22
28
  });
23
- const p = o(() => e.strategies.map((t) => ({
29
+ const d = a(() => e.strategies.map((t) => ({
24
30
  text: t.name,
25
31
  value: t.strategy_id,
26
- infoBoxProps: {
27
- id: `strategy-info-${t.strategy_id}`,
28
- theme: "light",
29
- variant: "information",
30
- className: "assign-strategy-info-box",
31
- slot: O,
32
- slotProps: { strategy: t }
33
- }
34
- }))), y = o(() => [{ value: r.value }]), n = o(() => {
35
- const t = e.strategies.find((i) => String(i.strategy_id) === String(r.value ?? ""));
32
+ // `slot` lives here, not in the util: the design system renders it with
33
+ // `<component :is>` inside its own info box, and a util must not import one.
34
+ infoBoxProps: { ...x(t, r), slot: O }
35
+ }))), c = a(() => {
36
+ const t = e.strategies.find((i) => String(i.strategy_id) === String(s.value ?? ""));
36
37
  return t ? { ...t, fallback_config: null } : null;
37
- }), f = o(() => ({
38
+ }), S = a(() => ({
38
39
  primaryButton: {
39
40
  styling: "solid",
40
41
  type: "primary",
41
- labelText: s("products.assign-btn"),
42
- loadingStatus: a.value,
43
- disabledStatus: !n.value
42
+ labelText: r("products.assign-btn")
44
43
  },
45
44
  cancelOrBackButton: {
46
45
  styling: "ghost",
47
46
  type: "secondary",
48
- labelText: s("products.cancel"),
49
- disabledStatus: a.value
47
+ labelText: r("products.cancel")
50
48
  }
51
49
  }));
52
- return { __sfc: !0, RRS_PANEL_PATH: c, trans: s, store: e, showToaster: g, handleError: u, selectedStrategyId: r, isAssigning: a, campaignTabSupported: m, drawerDescription: d, strategyOptions: p, selectValue: y, selectedStrategy: n, footerButtonGroupOptions: f, closeDrawer: () => {
50
+ return { __sfc: !0, OrgStrategyDetailModal: m, OrgStrategyDropdown: y, trans: r, store: e, showToaster: n, selectedStrategyId: s, showSelectionError: o, drawerDescription: u, strategyOptions: d, selectedStrategy: c, footerButtonGroupOptions: S, closeDrawer: () => {
53
51
  e.closeAssignStrategyDrawer();
54
52
  }, assignStrategy: () => {
55
- const t = n.value;
56
- t && (a.value = !0, e.assignStrategy(t), g({
57
- type: b.Success,
58
- message: s("email-editor.strategy-assigned-success", { strategyName: t.name })
59
- }), e.closeAssignStrategyDrawer(), a.value = !1);
53
+ const t = c.value;
54
+ if (!t) {
55
+ o.value = !0;
56
+ return;
57
+ }
58
+ e.assignStrategy(t), n({
59
+ type: p.Success,
60
+ message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
61
+ }), e.closeAssignStrategyDrawer();
60
62
  }, onSelect: (t) => {
61
- r.value = t.value;
62
- }, WpDrawer: w, OrgStrategyDetailModal: x, InSelect: B };
63
+ s.value = t.value, o.value = !1;
64
+ } };
63
65
  }
64
66
  });
65
67
  export {
66
- $ as default
68
+ L as default
67
69
  };
@@ -0,0 +1,19 @@
1
+ import a from "./StrategyInfoBoxContent.vue2.js";
2
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var t = this, s = t._self._c;
5
+ return t._self._setupProxy, s("div", { staticClass: "d-f f-d-c mt-3" }, t._l(t.details, function(n, e) {
6
+ return s("div", { key: n.title, staticClass: "d-f f-d-c", class: { "mt-2": e > 0 } }, [s("span", { staticClass: "f-s-1 f-w-600 l-h-1 t-c-52 mb-12" }, [t._v(t._s(n.title))]), s("span", { staticClass: "f-s-1 l-h-6 t-c-55 w-b-b-w" }, [t._v(t._s(n.value))])]);
7
+ }), 0);
8
+ }, c = [], f = /* @__PURE__ */ r(
9
+ a,
10
+ _,
11
+ c,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const m = f.exports;
17
+ export {
18
+ m as default
19
+ };
@@ -0,0 +1,13 @@
1
+ import { defineComponent as t } from "vue";
2
+ const o = /* @__PURE__ */ t({
3
+ __name: "StrategyInfoBoxContent",
4
+ props: {
5
+ details: null
6
+ },
7
+ setup(e) {
8
+ return { __sfc: !0 };
9
+ }
10
+ });
11
+ export {
12
+ o as default
13
+ };
@@ -1,56 +1,67 @@
1
- import S from "../static/styles/base.css.js";
2
- import m from "../static/styles/components/alert-message.css.js";
3
- import e from "../static/styles/components/amp-block.css.js";
4
- import i from "../static/styles/components/base-input.css.js";
5
- import p from "../static/styles/components/button-group.css.js";
6
- import n from "../static/styles/components/button.css.js";
7
- import C from "../static/styles/components/combobox.css.js";
8
- import s from "../static/styles/components/counter.css.js";
9
- import f from "../static/styles/components/dropdown-menu.css.js";
10
- import a from "../static/styles/components/loader.css.js";
11
- import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/popup.css.js";
13
- import d from "../static/styles/components/recommendation-strategy.css.js";
14
- import l from "../static/styles/components/switcher.css.js";
15
- import h from "../static/styles/components/tabs.css.js";
16
- import w from "../static/styles/components/tools.css.js";
17
- import y from "../static/styles/components/version-history.css.js";
18
- import B from "../static/styles/components/wide-panel.css.js";
19
- import b from "../static/styles/variables.css.js";
20
- const A = [
21
- b,
22
- // Must be on top
23
- S,
1
+ import S from "../static/assets/icons/line-change.svg.js";
2
+ import i from "../static/assets/icons/line-delete.svg.js";
3
+ import n from "../static/assets/icons/line-plus.svg.js";
4
+ import p from "../static/styles/base.css.js";
5
+ import s from "../static/styles/components/alert-message.css.js";
6
+ import C from "../static/styles/components/amp-block.css.js";
7
+ import a from "../static/styles/components/base-input.css.js";
8
+ import f from "../static/styles/components/button-group.css.js";
9
+ import c from "../static/styles/components/button.css.js";
10
+ import u from "../static/styles/components/combobox.css.js";
11
+ import l from "../static/styles/components/counter.css.js";
12
+ import d from "../static/styles/components/dropdown-menu.css.js";
13
+ import h from "../static/styles/components/loader.css.js";
14
+ import g from "../static/styles/components/narrow-panel.css.js";
15
+ import I from "../static/styles/components/popup.css.js";
16
+ import w from "../static/styles/components/recommendation-strategy.css.js";
17
+ import y from "../static/styles/components/switcher.css.js";
18
+ import b from "../static/styles/components/tabs.css.js";
19
+ import B from "../static/styles/components/tools.css.js";
20
+ import $ from "../static/styles/components/version-history.css.js";
21
+ import P from "../static/styles/components/wide-panel.css.js";
22
+ import x from "../static/styles/variables.css.js";
23
+ function r(t, o) {
24
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
25
+ }
26
+ const A = `:host {
27
+ ${r("line-change", S)}
28
+ ${r("line-delete", i)}
29
+ ${r("line-plus", n)}
30
+ }`, R = [
31
+ x,
24
32
  // Must be on top
25
- m,
26
- e,
27
- i,
33
+ A,
28
34
  p,
29
- n,
30
- C,
35
+ // Must be on top
31
36
  s,
32
- f,
37
+ C,
33
38
  a,
34
- u,
39
+ f,
35
40
  c,
41
+ u,
36
42
  l,
43
+ d,
37
44
  h,
38
- w,
45
+ g,
46
+ I,
39
47
  y,
48
+ b,
40
49
  B,
41
- d
50
+ $,
51
+ P,
52
+ w
42
53
  // Last: overrides button.css / wide-panel.css defaults
43
54
  ].join(`
44
55
 
45
- `), F = () => ({ importCss: () => {
56
+ `), Y = () => ({ importCss: () => {
46
57
  const o = new CSSStyleSheet();
47
- o.replaceSync(A);
48
- const r = document.querySelector("ui-editor");
49
- if (!r)
58
+ o.replaceSync(R);
59
+ const e = document.querySelector("ui-editor");
60
+ if (!e)
50
61
  return;
51
- const t = r.shadowRoot;
52
- t && (t.adoptedStyleSheets = [o]);
62
+ const m = e.shadowRoot;
63
+ m && (m.adoptedStyleSheets = [o]);
53
64
  } });
54
65
  export {
55
- F as useCustomInterfaceAppearance
66
+ Y as useCustomInterfaceAppearance
56
67
  };
@@ -1,22 +1,23 @@
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 l } 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";
6
- import { sanitizeProductIds as x } from "../extensions/Blocks/Recommendation/utils/productIds.js";
7
- import { useConfigStore as P } from "../stores/config.js";
8
- const B = () => ({
1
+ import { useConfig as I } from "./useConfig.js";
2
+ import { getRecommendationFeedSourceMaps as C, URLS as R } from "../enums/extensions/recommendationBlock.js";
3
+ import { MinDeviceViewport as b, DefaultPadding as h } from "../enums/recommendation.js";
4
+ import { useRecommendationExtensionStore as f } from "../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { generateCompleteFilterQuery as x } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
6
+ import { getPartnerRecommendationParams as P } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
7
+ import { sanitizeProductIds as S } from "../extensions/Blocks/Recommendation/utils/productIds.js";
8
+ import { useConfigStore as T } from "../stores/config.js";
9
+ const L = () => ({
9
10
  calculateCardWidth: ({
10
- mobileLeftPadding: a,
11
+ mobileLeftPadding: i,
11
12
  mobileRightPadding: c,
12
13
  cardsInRow: s,
13
14
  unresponsive: o
14
15
  }) => {
15
- const n = o ? s : 1, e = a + c + (n - 1) * R;
16
- return (C - e) / n;
16
+ const n = o ? s : 1, d = i + c + (n - 1) * h;
17
+ return (b - d) / n;
17
18
  },
18
- getRecommendationCampaignData: (a) => {
19
- const c = l(), s = Number(a), o = c.blockStates[s];
19
+ getRecommendationCampaignData: (i) => {
20
+ const c = f(), s = Number(i), o = c.blockStates[s];
20
21
  if (!o)
21
22
  return {
22
23
  textTrimming: !1,
@@ -30,10 +31,10 @@ const B = () => ({
30
31
  discountBeforeTextValue: "",
31
32
  discountAfterTextValue: ""
32
33
  };
33
- const { recommendationConfigs: n } = o, e = n.orientation === "grid" ? "vertical" : "horizontal";
34
+ const { recommendationConfigs: n } = o, d = n.orientation === "grid" ? "vertical" : "horizontal";
34
35
  return {
35
36
  textTrimming: n.textTrimming,
36
- orientation: e,
37
+ orientation: d,
37
38
  mobileLeftPadding: 0,
38
39
  mobileRightPadding: 0,
39
40
  cardsInRow: n.cardsInRow,
@@ -44,17 +45,17 @@ const B = () => ({
44
45
  discountAfterTextValue: ""
45
46
  };
46
47
  },
47
- buildCampaignUrl: (a, c) => {
48
- var m;
49
- const s = l(), o = P(), n = Number(a);
48
+ buildCampaignUrl: (i, c) => {
49
+ var l;
50
+ const s = f(), o = T(), { isFeatureEnabled: n } = I(), d = Number(i);
50
51
  let e;
51
52
  if (c)
52
53
  e = c;
53
54
  else {
54
- const i = s.blockStates[n];
55
- if (!i)
55
+ const a = s.blockStates[d];
56
+ if (!a)
56
57
  return "";
57
- const { recommendationConfigs: r } = i;
58
+ const { recommendationConfigs: r } = a;
58
59
  e = {
59
60
  strategy: r.strategy,
60
61
  strategyId: r.strategyId,
@@ -66,20 +67,20 @@ const B = () => ({
66
67
  shuffleProducts: r.shuffleProducts
67
68
  };
68
69
  }
69
- if (e.strategyId)
70
- return s.recommendationCampaignUrls[a] = {
70
+ if (n("reusableRecommendationStrategy") && e.strategyId)
71
+ return s.recommendationCampaignUrls[i] = {
71
72
  strategyId: e.strategyId,
72
73
  locale: e.language,
73
74
  currency: e.currencyCode
74
75
  }, "";
75
- const f = ((m = y().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
76
- 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", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
77
- const g = e.filters.filter((i) => i.isValid), d = b(g);
78
- d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(o.partnerName, e.strategy)).forEach(([i, r]) => t.set(i, r));
79
- const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
80
- return s.recommendationCampaignUrls[a] = u, u;
76
+ const g = ((l = C().find((a) => a.key === e.strategy)) == null ? void 0 : l.path) || "", t = new URLSearchParams();
77
+ 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", S(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
78
+ const p = e.filters.filter((a) => a.isValid), u = x(p);
79
+ u && t.set("filter", u), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(P(o.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
80
+ const y = decodeURIComponent(t.toString()), m = `${R.RECOMMENDATION_API_URL}/v2/${g}?${y}`;
81
+ return s.recommendationCampaignUrls[i] = m, m;
81
82
  }
82
83
  });
83
84
  export {
84
- B as useRecommendation
85
+ L as useRecommendation
85
86
  };