@useinsider/guido 3.18.0-beta.41e529d → 3.18.0-beta.88ff219

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 (36) hide show
  1. package/dist/@types/config/schemas.js +1 -3
  2. package/dist/components/Guido.vue.js +4 -4
  3. package/dist/components/Guido.vue2.js +63 -65
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -7
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +76 -85
  6. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
  7. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  8. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +46 -0
  9. package/dist/composables/useCustomInterfaceAppearance.js +42 -46
  10. package/dist/enums/extensions/recommendationBlock.js +35 -31
  11. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
  12. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +33 -64
  13. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +133 -113
  14. package/dist/guido.css +1 -1
  15. package/dist/services/recommendationApi.js +52 -61
  16. package/dist/src/@types/config/schemas.d.ts +0 -4
  17. package/dist/src/composables/useConfig.d.ts +0 -2
  18. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -1
  19. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -1
  20. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +50 -54
  21. package/dist/src/services/recommendationApi.d.ts +1 -2
  22. package/dist/src/stores/config.d.ts +0 -160
  23. package/dist/src/stores/onboarding.d.ts +377 -0
  24. package/dist/static/styles/components/recommendation-strategy.css.js +26 -74
  25. package/dist/stores/config.js +59 -66
  26. package/dist/stores/onboarding.js +41 -36
  27. package/package.json +1 -1
  28. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
  29. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
  30. package/dist/composables/useLegacyStrategyConversion.js +0 -52
  31. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
  32. package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
  33. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
  34. package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
  35. package/dist/static/assets/icons/line-info.svg.js +0 -5
  36. /package/dist/src/components/organisms/{extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
@@ -24,9 +24,7 @@ const p = {
24
24
  b(1, "userId is required")
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
- variationId: e(t()),
28
- /** Optional numeric campaign ID of the host campaign; absent for templates and modules */
29
- campaignId: e(t())
27
+ variationId: e(t())
30
28
  }), L = a({
31
29
  /** Fallback font name (e.g., "Georgia") */
32
30
  name: t(),
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var a = this, r = a._self._c, e = a._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) : a._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 || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
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) : a._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 || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, s = [], n = /* @__PURE__ */ i(
@@ -12,9 +12,9 @@ var t = function() {
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "d1f80922"
15
+ "04935ba3"
16
16
  );
17
- const f = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- f as default
19
+ v as default
20
20
  };
@@ -1,30 +1,30 @@
1
- import { defineComponent as ee, defineAsyncComponent as m, ref as U, computed as u, watch as A, onMounted as te, onUnmounted as oe } from "vue";
2
- import { useCortexBlueprintBridge as ne } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as re } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as se } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as ae } from "../composables/usePartner.js";
6
- import { useStripo as ie } from "../composables/useStripo.js";
7
- import { useTimerClone as ce } from "../composables/useTimerClone.js";
1
+ import { defineComponent as Z, defineAsyncComponent as l, ref as P, computed as u, watch as U, onMounted as ee, onUnmounted as te } from "vue";
2
+ import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as se } from "../composables/usePartner.js";
6
+ import { useStripo as ae } from "../composables/useStripo.js";
7
+ import { useTimerClone as ie } from "../composables/useTimerClone.js";
8
8
  import { migrate as _ } from "../config/migrator/index.js";
9
9
  import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as de } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import me from "./organisms/AutoSaveController.vue.js";
13
- import le from "./organisms/base/Toaster.vue.js";
14
- import ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import pe from "./organisms/header/HeaderWrapper.vue.js";
16
- import fe from "./organisms/LoadingWrapper.vue.js";
17
- import ye from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ge from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as ve } from "../services/stripoApi.js";
20
- import { useConfigStore as Se } from "../stores/config.js";
21
- import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
22
- import { useEditorStore as P } from "../stores/editor.js";
23
- import { usePreviewStore as be } from "../stores/preview.js";
24
- import { useTemplateStore as Ee } from "../stores/template.js";
25
- import { useUnsubscribeStore as we } from "../stores/unsubscribe.js";
10
+ import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import de from "./organisms/AutoSaveController.vue.js";
13
+ import me from "./organisms/base/Toaster.vue.js";
14
+ import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ue from "./organisms/header/HeaderWrapper.vue.js";
16
+ import pe from "./organisms/LoadingWrapper.vue.js";
17
+ import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ge } from "../services/stripoApi.js";
20
+ import { useConfigStore as ve } from "../stores/config.js";
21
+ import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
22
+ import { useEditorStore as O } from "../stores/editor.js";
23
+ import { usePreviewStore as he } from "../stores/preview.js";
24
+ import { useTemplateStore as be } from "../stores/template.js";
25
+ import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
26
26
  import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
27
- const Je = /* @__PURE__ */ ee({
27
+ const je = /* @__PURE__ */ Z({
28
28
  __name: "Guido",
29
29
  props: {
30
30
  config: null,
@@ -32,25 +32,23 @@ const Je = /* @__PURE__ */ ee({
32
32
  },
33
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
34
  setup(x, { expose: G, emit: r }) {
35
- const a = x, H = m(
35
+ const a = x, H = l(
36
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), $ = m(
37
+ ), $ = l(
38
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), z = m(
39
+ ), z = l(
40
40
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), q = m(
41
+ ), q = l(
42
42
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
43
- ), K = m(
44
- () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
45
- ), h = U(), p = U(), f = he(), b = we(), o = Se();
43
+ ), b = P(), p = P(), f = Se(), E = Ee(), o = ve();
46
44
  a.ready && o.init(a.config);
47
- const c = P(), V = be(), l = u(() => c.hasChanges), { isTestPartner: j } = ae(), E = () => {
45
+ const c = O(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), w = () => {
48
46
  var t;
49
- return (t = h.value) == null ? void 0 : t.handleSave(!0);
50
- }, w = (t) => {
47
+ return (t = b.value) == null ? void 0 : t.handleSave(!0);
48
+ }, C = (t) => {
51
49
  c.loadingStatus = t;
52
50
  };
53
- ne(), se();
51
+ oe(), re();
54
52
  const y = () => {
55
53
  var t, e;
56
54
  return {
@@ -61,13 +59,13 @@ const Je = /* @__PURE__ */ ee({
61
59
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
62
60
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
63
61
  };
64
- }, { initPlugin: C, preloadRuntime: D } = ie(), { getDefaultTemplate: k } = ve(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ce(), J = u(() => {
62
+ }, { initPlugin: D, preloadRuntime: k } = ae(), { getDefaultTemplate: T } = ge(), { cloneTimersOnSave: F, hasTimerBlocks: R } = ie(), j = u(() => {
65
63
  var t;
66
64
  return !((t = o.ui) != null && t.showHeader);
67
- }), Q = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), X = u(
68
- () => !!O().recommendationConfigs.strategyId
65
+ }), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
66
+ () => !!h().recommendationConfigs.strategyId
69
67
  );
70
- re({
68
+ ne({
71
69
  onBack: () => {
72
70
  console.debug("guido:back"), r("back");
73
71
  },
@@ -84,11 +82,11 @@ const Je = /* @__PURE__ */ ee({
84
82
  });
85
83
  const I = (t) => {
86
84
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
87
- }, R = () => {
85
+ }, L = () => {
88
86
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
89
87
  };
90
- A(() => l.value, () => {
91
- r("on-change", l.value);
88
+ U(() => m.value, () => {
89
+ r("on-change", m.value);
92
90
  });
93
91
  const g = (t) => {
94
92
  const e = t, { attribute: s, position: d } = e.detail;
@@ -97,47 +95,47 @@ const Je = /* @__PURE__ */ ee({
97
95
  let i = null;
98
96
  const v = () => {
99
97
  var e;
100
- const t = document.querySelector(de);
98
+ const t = document.querySelector(ce);
101
99
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
102
100
  }, S = async () => {
103
101
  var t;
104
102
  try {
105
103
  o.initialized || o.init(a.config), c.templateId = o.templateId;
106
- 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) || [];
107
- b.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
108
- const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
104
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", M = (e == null ? void 0 : e.preselectedDynamicContent) || [];
105
+ E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
106
+ const B = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, A = o.isFeatureEnabled("linkTrackingIds");
109
107
  let n = {
110
- html: s && await _(s, M),
108
+ html: s && await _(s, B),
111
109
  css: d
112
110
  };
113
- n.html || (n = await k(), n.html = await _(n.html, M));
114
- const Y = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
115
- F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(Y, W(n.html)));
116
- const Z = {
117
- preselectedDynamicContentList: L,
111
+ n.html || (n = await T(), n.html = await _(n.html, B));
112
+ const X = A ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
113
+ R(n.html) && (n.html = await F(n.html)), A && (c.trackIdSessionFloor = Math.max(X, W(n.html)));
114
+ const Y = {
115
+ preselectedDynamicContentList: M,
118
116
  onReady: () => {
119
117
  console.debug("guido:ready"), r("ready");
120
118
  }
121
119
  };
122
- await C(n, y(), Z), f.selectedDynamicContentList = L;
120
+ await D(n, y(), Y), f.selectedDynamicContentList = M;
123
121
  } catch (e) {
124
122
  console.error("Failed to initialize Stripo editor:", e);
125
123
  }
126
124
  };
127
- return te(async () => {
125
+ return ee(async () => {
128
126
  var e;
129
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), Ee().$reset(), v();
127
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), O().$reset(), be().$reset(), v();
130
128
  const t = (e = p.value) == null ? void 0 : e.parentElement;
131
- if (t && (i = new ResizeObserver(v), i.observe(t)), D(), a.ready)
129
+ if (t && (i = new ResizeObserver(v), i.observe(t)), k(), a.ready)
132
130
  await S();
133
131
  else {
134
- const s = A(() => a.ready, (d) => {
132
+ const s = U(() => a.ready, (d) => {
135
133
  d && (s(), S());
136
134
  });
137
135
  }
138
136
  document.addEventListener("dynamic-content:open", g);
139
- }), oe(() => {
140
- i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
137
+ }), te(() => {
138
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g), h().disposeStrategyPageReturn();
141
139
  try {
142
140
  window.UIEditor.removeEditor();
143
141
  } catch {
@@ -147,14 +145,14 @@ const Je = /* @__PURE__ */ ee({
147
145
  }), G({
148
146
  dynamicContent: {
149
147
  insert: I,
150
- close: R
148
+ close: L
151
149
  },
152
- hasChanges: l,
153
- saveSilent: E,
154
- setLoading: w
155
- }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, LegacyStrategyUpdatedModal: K, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: V, hasChanges: l, isTestPartner: j, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: J, isRrsEnabled: Q, hasAssignedStrategy: X, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: me, Toaster: le, FilterSelectionDrawer: ue, HeaderWrapper: pe, LoadingWrapper: fe, SaveAsTemplateDrawer: ye, UnsubscribeWrapper: ge };
150
+ hasChanges: m,
151
+ saveSilent: w,
152
+ setLoading: C
153
+ }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, headerWrapperRef: b, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, getDefaultTemplate: T, cloneTimersOnSave: F, hasTimerBlocks: R, noHeader: j, isRrsEnabled: J, hasAssignedStrategy: Q, insertDynamicContent: I, closeDynamicContent: L, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: de, Toaster: me, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ye };
156
154
  }
157
155
  });
158
156
  export {
159
- Je as default
157
+ je as default
160
158
  };
@@ -1,19 +1,21 @@
1
- import r from "./AssignStrategyDrawer.vue2.js";
1
+ import s from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
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 || t.store.legacyConversionLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "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: { infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
9
- }, proxy: !0 }], null, !1, 239334473) }) : e._e();
6
+ var e = this, r = e._self._c, t = e._self._setupProxy;
7
+ return t.store.assignStrategyDrawerStatus ? r(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 [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "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: { create: function(l) {
9
+ return t.store.openStrategyCreation();
10
+ }, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
11
+ }, proxy: !0 }], null, !1, 1517791821) }) : e._e();
10
12
  }, n = [], i = /* @__PURE__ */ o(
11
- r,
13
+ s,
12
14
  a,
13
15
  n,
14
16
  !1,
15
17
  null,
16
- "4019dc4d"
18
+ "0b3e3cba"
17
19
  );
18
20
  const y = i.exports;
19
21
  export {
@@ -1,73 +1,50 @@
1
- import { defineComponent as h, defineAsyncComponent as T, ref as _, computed as s, watch as B } from "vue";
1
+ import { defineComponent as I, defineAsyncComponent as f, ref as S, computed as c, watch as T } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useLegacyStrategyConversion as I } from "../../../../composables/useLegacyStrategyConversion.js";
4
- import { useToaster as N } from "../../../../composables/useToaster.js";
5
- import { useTranslations as k } from "../../../../composables/useTranslations.js";
6
- import { DOTTED_DATE_LOCALE as P } from "../../../../enums/date.js";
7
- import { URLS as U } from "../../../../enums/extensions/recommendationBlock.js";
8
- import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
3
+ import { useToaster as O } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as h } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as A } from "../../../../enums/date.js";
6
+ import { URLS as B } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as y } from "../../../../enums/toaster.js";
9
8
  import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
10
- import G from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as M } from "../../../../utils/dateUtil.js";
12
- import { asText as D } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as x } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as R } from "@useinsider/design-system-vue";
15
- const st = /* @__PURE__ */ h({
9
+ import N from "./StrategyInfoBoxContent.vue.js";
10
+ import { formatShortDate as k } from "../../../../utils/dateUtil.js";
11
+ import { asText as _ } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as L } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as P } from "@useinsider/design-system-vue";
14
+ const Z = /* @__PURE__ */ I({
16
15
  __name: "AssignStrategyDrawer",
17
- setup(H) {
18
- const l = () => import("@useinsider/design-system-organisms"), g = (t, a) => ({
19
- render: (n) => n(R, { props: { sizing: { width: t, height: a } } })
20
- }), O = T({
21
- loader: async () => (await l()).OrgStrategyDetailModal,
22
- loadingComponent: g(480, 240),
16
+ setup(R) {
17
+ const g = () => import("@useinsider/design-system-organisms"), d = (t, r) => ({
18
+ render: (s) => s(P, { props: { sizing: { width: t, height: r } } })
19
+ }), D = f({
20
+ loader: async () => (await g()).OrgStrategyDetailModal,
21
+ loadingComponent: d(480, 240),
23
22
  delay: 0
24
- }), w = T({
25
- loader: async () => (await l()).OrgStrategyDropdown,
26
- loadingComponent: g(240, 42),
23
+ }), v = f({
24
+ loader: async () => (await g()).OrgStrategyDropdown,
25
+ loadingComponent: d(240, 42),
27
26
  delay: 0
28
- }), r = k(), e = b(), { showToaster: i } = N(), { convertLegacyStrategy: u } = I(), o = _(null), y = "legacy", d = "guido__btn-update-legacy-strategy", c = _(!1), A = s(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: U.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
29
- B(() => e.assignStrategyDrawerStatus, (t) => {
27
+ }), i = "guido-edit-strategy-", a = h(), e = b(), { showToaster: l } = O(), o = S(null), n = S(!1), w = c(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: B.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : ""), m = () => {
28
+ e.lastCreatedStrategyId && (o.value = e.lastCreatedStrategyId, n.value = !1, e.lastCreatedStrategyId = null);
29
+ };
30
+ T(() => e.assignStrategyDrawerStatus, (t) => {
30
31
  if (!t)
31
32
  return;
32
- const { strategyId: a } = e.recommendationConfigs;
33
- o.value = a || (e.isLegacyStrategyBlock ? y : null), c.value = !1, e.fetchStrategies().catch(() => {
34
- i({
35
- type: p.Error,
36
- message: r("discovery-strategy.error-description")
33
+ const { strategyId: r } = e.recommendationConfigs;
34
+ o.value = r || null, n.value = !1, e.fetchStrategies().then(m).catch(() => {
35
+ l({
36
+ type: y.Error,
37
+ message: a("discovery-strategy.error-description")
37
38
  });
38
39
  });
39
- });
40
- const f = (t) => {
41
- const a = D(t.updated_at || t.created_at);
42
- if (!a)
40
+ }), T(() => e.lastCreatedStrategyId, m);
41
+ const p = (t) => {
42
+ const r = _(t.updated_at || t.created_at);
43
+ if (!r)
43
44
  return "";
44
- const n = M(a, P);
45
- return r("recommendation-strategy.last-updated-on", { value: n });
46
- }, S = s(() => ({
47
- text: r("ds-steps.legacy-strategy"),
48
- value: y,
49
- infoBoxProps: {
50
- id: "strategy-info-legacy",
51
- theme: "light",
52
- variant: "information",
53
- className: "assign-strategy-info-box",
54
- titleText: x(r("ds-steps.legacy-strategy")),
55
- descriptionStatus: !0,
56
- descriptionText: r("statistics.legacy-strategy-description"),
57
- buttonOptions: [{
58
- id: d,
59
- type: "primary",
60
- text: r("ds-steps.update"),
61
- loadingStatus: e.legacyConversionLoading,
62
- disabledStatus: e.legacyConversionLoading
63
- }]
64
- }
65
- })), E = async (t) => {
66
- if ((t == null ? void 0 : t.id) !== d)
67
- return;
68
- const a = await u();
69
- a && (o.value = a);
70
- }, m = s(() => e.strategies.map((t) => ({
45
+ const s = k(r, A);
46
+ return a("recommendation-strategy.last-updated-on", { value: s });
47
+ }, x = c(() => e.strategies.map((t) => ({
71
48
  text: t.name,
72
49
  value: t.strategy_id,
73
50
  infoBoxProps: {
@@ -75,57 +52,71 @@ const st = /* @__PURE__ */ h({
75
52
  theme: "light",
76
53
  variant: "information",
77
54
  className: "assign-strategy-info-box",
78
- titleText: x(D(t.name)),
55
+ titleText: L(_(t.name)),
79
56
  descriptionStatus: !0,
80
- descriptionText: f(t),
81
- slot: G,
82
- slotProps: { strategy: t }
57
+ descriptionText: p(t),
58
+ slot: N,
59
+ slotProps: { strategy: t },
60
+ // The info box drops the option's value/text, so the id is the only channel
61
+ // that can carry the strategy back to the click handler.
62
+ buttonOptions: [{
63
+ id: `${i}${t.strategy_id}`,
64
+ text: a("eureka.edit-strategy"),
65
+ type: "text",
66
+ // Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
67
+ // silently render blank space instead of failing.
68
+ icon: "line-open-website"
69
+ }]
83
70
  }
84
- }))), C = s(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), v = s(() => {
85
- const t = e.strategies.find((a) => String(a.strategy_id) === String(o.value ?? ""));
71
+ }))), C = (t) => {
72
+ var s;
73
+ const r = (s = t == null ? void 0 : t.id) != null && s.startsWith(i) ? t.id.slice(i.length) : "";
74
+ r && e.openStrategyEdit(r);
75
+ }, u = c(() => {
76
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(o.value ?? ""));
86
77
  return t ? { ...t, fallback_config: null } : null;
87
- }), L = s(() => ({
78
+ }), E = c(() => ({
88
79
  primaryButton: {
89
80
  styling: "solid",
90
81
  type: "primary",
91
- labelText: r("products.assign-btn")
82
+ labelText: a("products.assign-btn")
92
83
  },
93
84
  cancelOrBackButton: {
94
85
  styling: "ghost",
95
86
  type: "secondary",
96
- labelText: r("products.cancel")
87
+ labelText: a("products.cancel")
97
88
  }
98
89
  }));
99
- return { __sfc: !0, loadOrganisms: l, skeleton: g, OrgStrategyDetailModal: O, OrgStrategyDropdown: w, trans: r, store: e, showToaster: i, convertLegacyStrategy: u, selectedStrategyId: o, LEGACY_OPTION_VALUE: y, LEGACY_UPDATE_BUTTON_ID: d, showSelectionError: c, drawerDescription: A, lastUpdatedText: f, legacyStrategyOption: S, onInfoBoxButtonClick: E, remoteStrategyOptions: m, strategyOptions: C, selectedStrategy: v, footerButtonGroupOptions: L, closeDrawer: () => {
90
+ return { __sfc: !0, loadOrganisms: g, skeleton: d, OrgStrategyDetailModal: D, OrgStrategyDropdown: v, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: l, selectedStrategyId: o, showSelectionError: n, drawerDescription: w, consumeLastCreatedStrategy: m, lastUpdatedText: p, strategyOptions: x, onInfoBoxButtonClick: C, selectedStrategy: u, footerButtonGroupOptions: E, closeDrawer: () => {
100
91
  e.closeAssignStrategyDrawer();
101
92
  }, assignStrategy: async () => {
102
- const t = v.value;
93
+ const t = u.value;
103
94
  if (!t) {
104
- c.value = !0;
95
+ n.value = !0;
105
96
  return;
106
97
  }
107
- let a = "";
98
+ let r = "";
108
99
  try {
109
- a = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
110
- } catch (n) {
111
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
100
+ r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
101
+ } catch (s) {
102
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", s);
112
103
  }
113
- if (!a) {
114
- i({
115
- type: p.Error,
116
- message: r("email-editor.strategy-assign-failed", { strategyName: t.name })
104
+ if (!r) {
105
+ l({
106
+ type: y.Error,
107
+ message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
117
108
  });
118
109
  return;
119
110
  }
120
- e.assignStrategy(t), i({
121
- type: p.Success,
122
- message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
111
+ e.assignStrategy(t), l({
112
+ type: y.Success,
113
+ message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
123
114
  }), e.closeAssignStrategyDrawer();
124
115
  }, onSelect: (t) => {
125
- o.value = t.value, c.value = !1;
116
+ o.value = t.value, n.value = !1;
126
117
  } };
127
118
  }
128
119
  });
129
120
  export {
130
- st as default
121
+ Z as default
131
122
  };
@@ -1,26 +1,28 @@
1
1
  import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
2
  import u from "./AMPOnboarding.vue.js";
3
3
  import v from "./GenericOnboarding.vue.js";
4
- import l from "./ItemsOnboarding.vue.js";
5
- import y from "./NewVersionPopup.vue.js";
6
- import S from "./TextBlockOnboarding.vue.js";
7
- import h from "./VersionHistoryOnboarding.vue.js";
8
- import { usePartner as w } from "../../../composables/usePartner.js";
9
- import { useEditorStore as P } from "../../../stores/editor.js";
10
- import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
- import { usePreviewStore as A } from "../../../stores/preview.js";
12
- const G = /* @__PURE__ */ b({
4
+ import y from "./ItemsOnboarding.vue.js";
5
+ import l from "./NewVersionPopup.vue.js";
6
+ import S from "./RecommendationStrategyOnboarding.vue.js";
7
+ import h from "./TextBlockOnboarding.vue.js";
8
+ import w from "./VersionHistoryOnboarding.vue.js";
9
+ import { usePartner as P } from "../../../composables/usePartner.js";
10
+ import { useEditorStore as _ } from "../../../stores/editor.js";
11
+ import { useOnboardingStore as A } from "../../../stores/onboarding.js";
12
+ import { usePreviewStore as H } from "../../../stores/preview.js";
13
+ const N = /* @__PURE__ */ b({
13
14
  __name: "OnboardingWrapper",
14
15
  emits: ["onboarding-finished"],
15
- setup(H, { emit: f }) {
16
- const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
- { type: "newVersionPopup", component: y },
16
+ setup(M, { emit: g }) {
17
+ const o = A(), r = _(), s = H(), { isTestPartner: a } = P(), m = e(() => r.isStripoInitialized), p = e(() => a()), d = [
18
+ { type: "newVersionPopup", component: l },
18
19
  { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
20
+ { type: "textBlockOnboarding", component: h },
21
+ { type: "versionHistoryOnboarding", component: w },
21
22
  { type: "ampOnboarding", component: u },
22
- { type: "itemsOnboarding", component: l }
23
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
23
+ { type: "itemsOnboarding", component: y },
24
+ { type: "recommendationStrategyOnboarding", component: S }
25
+ ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => d.filter((n) => c(n.type)));
24
26
  return O(async () => {
25
27
  await o.fetchUserModalState();
26
28
  }), t(
@@ -38,9 +40,9 @@ const G = /* @__PURE__ */ b({
38
40
  (n) => {
39
41
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
42
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
43
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
42
44
  }
43
45
  });
44
46
  export {
45
- G as default
47
+ N as default
46
48
  };
@@ -0,0 +1,21 @@
1
+ import d from "./RecommendationStrategyOnboarding.vue2.js";
2
+ /* empty css */
3
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var m = function() {
5
+ var e, n, r, a, i;
6
+ var t = this, s = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? s(o.InOnboard, { key: "guido__recommendation-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__recommendation-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": o.onboardingStore.onboardings.recommendationStrategyOnboarding.config, "pointer-position": (r = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.top }, on: { close: function(p) {
8
+ return o.onboardingStore.close(o.ONBOARDING_TYPE);
9
+ }, nextButtonClick: o.handleNext } }) : t._e();
10
+ }, c = [], _ = /* @__PURE__ */ g(
11
+ d,
12
+ m,
13
+ c,
14
+ !1,
15
+ null,
16
+ "1f4a4044"
17
+ );
18
+ const S = _.exports;
19
+ export {
20
+ S as default
21
+ };
@@ -0,0 +1,46 @@
1
+ import { defineComponent as c, computed as g, watch as b } from "vue";
2
+ import { useRibbonOffset as p } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as u } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as l } from "../../../enums/academy.js";
5
+ import { useOnboardingStore as f } from "../../../stores/onboarding.js";
6
+ import { InOnboard as O } from "@useinsider/design-system-vue";
7
+ const B = /* @__PURE__ */ c({
8
+ __name: "RecommendationStrategyOnboarding",
9
+ setup(_) {
10
+ const e = "recommendationStrategyOnboarding", n = u(), t = f(), { getTopPosition: i } = p(), r = `<a href="${l.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${n("action-builder.visit-academy")}</a>`, a = () => [
11
+ {
12
+ classes: "guido-recommendation-strategy-onboarding",
13
+ // Sits in the gap left of the settings panel and points at the strategy section, which
14
+ // starts 208px down: the panel header and its tab row are fixed chrome above it.
15
+ right: "426px",
16
+ top: i(208),
17
+ position: "Right Top",
18
+ title: n("email-editor.onboarding-recommendation-strategy-title"),
19
+ description: n("email-editor.onboarding-recommendation-strategy-description", {
20
+ academyLink: r
21
+ }),
22
+ imageSource: "",
23
+ backButtonClick: () => {
24
+ },
25
+ nextButtonType: "text",
26
+ nextButtonText: n("action-builder.ok"),
27
+ nextButtonClick: () => {
28
+ t.close(e);
29
+ }
30
+ }
31
+ ], m = g(() => t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
32
+ var o, s;
33
+ (s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
34
+ };
35
+ return b(
36
+ () => t.isActive(e),
37
+ (o) => {
38
+ o && t.setConfig(e, a());
39
+ },
40
+ { immediate: !0 }
41
+ ), { __sfc: !0, ONBOARDING_TYPE: e, trans: n, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: m, handleNext: d, InOnboard: O };
42
+ }
43
+ });
44
+ export {
45
+ B as default
46
+ };