@useinsider/guido 3.18.1-beta.8d3bf29 → 3.18.1

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 (40) 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 +53 -55
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
  6. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +24 -28
  7. package/dist/composables/useCustomInterfaceAppearance.js +42 -46
  8. package/dist/enums/extensions/recommendationBlock.js +1 -2
  9. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
  10. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +28 -67
  11. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +56 -98
  12. package/dist/guido.css +1 -1
  13. package/dist/services/recommendationApi.js +52 -61
  14. package/dist/src/@types/config/schemas.d.ts +0 -4
  15. package/dist/src/composables/useConfig.d.ts +0 -2
  16. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  17. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
  18. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -54
  19. package/dist/src/services/recommendationApi.d.ts +1 -2
  20. package/dist/src/stores/config.d.ts +0 -160
  21. package/dist/src/stores/onboarding.d.ts +10 -808
  22. package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
  23. package/dist/stores/config.js +59 -66
  24. package/dist/stores/onboarding.js +36 -46
  25. package/package.json +1 -1
  26. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
  27. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
  28. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
  29. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
  30. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
  31. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -46
  32. package/dist/composables/useLegacyStrategyConversion.js +0 -54
  33. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
  34. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
  35. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
  36. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
  37. package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
  38. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
  39. package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
  40. package/dist/static/assets/icons/line-info.svg.js +0 -5
@@ -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
- "17b3c665"
15
+ "050dfa52"
16
16
  );
17
- const g = n.exports;
17
+ const f = n.exports;
18
18
  export {
19
- g as default
19
+ f as default
20
20
  };
@@ -1,31 +1,31 @@
1
- import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as P, onMounted as se, onUnmounted as ae } from "vue";
2
- import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as ce } from "../composables/useEditorLock.js";
4
- import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
5
- import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
6
- import { usePartner as le } from "../composables/usePartner.js";
7
- import { useStripo as ue } from "../composables/useStripo.js";
8
- import { useTimerClone as pe } from "../composables/useTimerClone.js";
1
+ import { defineComponent as ne, defineAsyncComponent as l, ref as O, computed as u, watch as P, onMounted as re, onUnmounted as se } from "vue";
2
+ import { useCortexBlueprintBridge as ae } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as ie } from "../composables/useEditorLock.js";
4
+ import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
5
+ import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js";
6
+ import { usePartner as me } from "../composables/usePartner.js";
7
+ import { useStripo as le } from "../composables/useStripo.js";
8
+ import { useTimerClone as ue } from "../composables/useTimerClone.js";
9
9
  import { migrate as x } from "../config/migrator/index.js";
10
10
  import { ModuleFolderDefaults as W } from "../enums/defaults.js";
11
- import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
11
+ import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
12
12
  import { useRecommendationExtensionStore as G } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
- import ye from "./organisms/AutoSaveController.vue.js";
14
- import ge from "./organisms/base/Toaster.vue.js";
15
- import ve from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import Se from "./organisms/header/HeaderWrapper.vue.js";
17
- import be from "./organisms/LoadingWrapper.vue.js";
18
- import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as we } from "../services/stripoApi.js";
21
- import { useConfigStore as Ce } from "../stores/config.js";
22
- import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
13
+ import fe from "./organisms/AutoSaveController.vue.js";
14
+ import ye from "./organisms/base/Toaster.vue.js";
15
+ import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
+ import ve from "./organisms/header/HeaderWrapper.vue.js";
17
+ import Se from "./organisms/LoadingWrapper.vue.js";
18
+ import be from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
+ import he from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
+ import { useStripoApi as Ee } from "../services/stripoApi.js";
21
+ import { useConfigStore as we } from "../stores/config.js";
22
+ import { useDynamicContentStore as Ce } from "../stores/dynamic-content.js";
23
23
  import { useEditorStore as H } from "../stores/editor.js";
24
- import { usePreviewStore as ke } from "../stores/preview.js";
25
- import { useTemplateStore as Te } from "../stores/template.js";
26
- import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
24
+ import { usePreviewStore as De } from "../stores/preview.js";
25
+ import { useTemplateStore as ke } from "../stores/template.js";
26
+ import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
27
27
  import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
28
- const tt = /* @__PURE__ */ re({
28
+ const et = /* @__PURE__ */ ne({
29
29
  __name: "Guido",
30
30
  props: {
31
31
  config: null,
@@ -33,25 +33,23 @@ const tt = /* @__PURE__ */ re({
33
33
  },
34
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
35
  setup(z, { expose: q, emit: r }) {
36
- const a = z, K = m(
36
+ const a = z, K = l(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), V = m(
38
+ ), V = l(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), j = m(
40
+ ), j = l(
41
41
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
42
- ), J = m(
42
+ ), J = l(
43
43
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
44
- ), Q = m(
45
- () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
46
- ), h = O(), p = O(), f = De(), E = Fe(), o = Ce();
44
+ ), h = O(), p = O(), f = Ce(), E = Te(), o = we();
47
45
  a.ready && o.init(a.config);
48
- const c = H(), X = ke(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), w = () => {
46
+ const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), w = () => {
49
47
  var t;
50
48
  return (t = h.value) == null ? void 0 : t.handleSave(!0);
51
49
  }, C = (t) => {
52
50
  c.loadingStatus = t;
53
51
  };
54
- ie(), me();
52
+ ae(), de();
55
53
  const y = () => {
56
54
  var t, e;
57
55
  return {
@@ -62,15 +60,15 @@ const tt = /* @__PURE__ */ re({
62
60
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
63
61
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
64
62
  };
65
- }, { initPlugin: D, preloadRuntime: k } = ue(), { runExclusive: T, beginMount: F, isCurrentMount: M } = ce();
63
+ }, { initPlugin: D, preloadRuntime: k } = le(), { runExclusive: T, beginMount: F, isCurrentMount: I } = ie();
66
64
  let g = 0;
67
- const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: R } = pe(), Z = u(() => {
65
+ const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: R, hasTimerBlocks: L } = ue(), Y = u(() => {
68
66
  var t;
69
67
  return !((t = o.ui) != null && t.showHeader);
70
- }), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
68
+ }), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
71
69
  () => !!G().recommendationConfigs.strategyId
72
70
  );
73
- de({
71
+ ce({
74
72
  onBack: () => {
75
73
  console.debug("guido:back"), r("back");
76
74
  },
@@ -87,11 +85,11 @@ const tt = /* @__PURE__ */ re({
87
85
  });
88
86
  const B = (t) => {
89
87
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
90
- }, U = () => {
88
+ }, A = () => {
91
89
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
92
90
  };
93
- P(() => l.value, () => {
94
- r("on-change", l.value);
91
+ P(() => m.value, () => {
92
+ r("on-change", m.value);
95
93
  });
96
94
  const v = (t) => {
97
95
  const e = t, { attribute: s, position: d } = e.detail;
@@ -100,36 +98,36 @@ const tt = /* @__PURE__ */ re({
100
98
  let i = null;
101
99
  const S = () => {
102
100
  var e;
103
- const t = document.querySelector(fe);
101
+ const t = document.querySelector(pe);
104
102
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
105
103
  }, b = async () => {
106
104
  var t;
107
105
  try {
108
106
  o.initialized || o.init(a.config), c.templateId = o.templateId;
109
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", A = (e == null ? void 0 : e.preselectedDynamicContent) || [];
107
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", U = (e == null ? void 0 : e.preselectedDynamicContent) || [];
110
108
  E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
111
109
  const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
112
110
  let n = {
113
111
  html: s && await x(s, _),
114
112
  css: d
115
113
  };
116
- n.html || (n = await I(), n.html = await x(n.html, _));
117
- const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
118
- R(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
119
- const ne = {
120
- preselectedDynamicContentList: A,
114
+ n.html || (n = await M(), n.html = await x(n.html, _));
115
+ const te = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
116
+ L(n.html) && (n.html = await R(n.html)), N && (c.trackIdSessionFloor = Math.max(te, $(n.html)));
117
+ const oe = {
118
+ preselectedDynamicContentList: U,
121
119
  onReady: () => {
122
120
  console.debug("guido:ready"), r("ready");
123
121
  }
124
122
  };
125
- g = F(), await D(n, y(), ne), f.selectedDynamicContentList = A;
123
+ g = F(), await D(n, y(), oe), f.selectedDynamicContentList = U;
126
124
  } catch (e) {
127
125
  console.error("Failed to initialize Stripo editor:", e);
128
126
  }
129
127
  };
130
- return se(async () => {
128
+ return re(async () => {
131
129
  var e;
132
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(), Te().$reset(), S();
130
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(), ke().$reset(), S();
133
131
  const t = (e = p.value) == null ? void 0 : e.parentElement;
134
132
  if (t && (i = new ResizeObserver(S), i.observe(t)), k(), a.ready)
135
133
  await b();
@@ -139,9 +137,9 @@ const tt = /* @__PURE__ */ re({
139
137
  });
140
138
  }
141
139
  document.addEventListener("dynamic-content:open", v);
142
- }), ae(() => {
140
+ }), se(() => {
143
141
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), T(async () => {
144
- if (M(g))
142
+ if (I(g))
145
143
  try {
146
144
  window.UIEditor.removeEditor();
147
145
  } catch {
@@ -151,14 +149,14 @@ const tt = /* @__PURE__ */ re({
151
149
  }), q({
152
150
  dynamicContent: {
153
151
  insert: B,
154
- close: U
152
+ close: A
155
153
  },
156
- hasChanges: l,
154
+ hasChanges: m,
157
155
  saveSilent: w,
158
156
  setLoading: C
159
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: M, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: R, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: B, closeDynamicContent: U, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
157
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: R, hasTimerBlocks: L, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: B, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
160
158
  }
161
159
  });
162
160
  export {
163
- tt as default
161
+ et as default
164
162
  };
@@ -1,19 +1,19 @@
1
1
  import r from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
- var a = function() {
4
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var o = function() {
6
6
  var e = this, s = e._self._c, t = e._self._setupProxy;
7
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();
10
- }, n = [], i = /* @__PURE__ */ o(
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, "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: { select: t.onSelect } })], 1)];
9
+ }, proxy: !0 }], null, !1, 2542767044) }) : e._e();
10
+ }, n = [], i = /* @__PURE__ */ a(
11
11
  r,
12
- a,
12
+ o,
13
13
  n,
14
14
  !1,
15
15
  null,
16
- "4019dc4d"
16
+ "2580a7d9"
17
17
  );
18
18
  const y = i.exports;
19
19
  export {
@@ -1,73 +1,48 @@
1
- import { defineComponent as h, defineAsyncComponent as T, ref as _, computed as s, watch as B } from "vue";
1
+ import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } 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";
9
- 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({
3
+ import { useToaster as x } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
+ import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import B from "./StrategyInfoBoxContent.vue.js";
10
+ import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
+ import { asText as f } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as b } from "@useinsider/design-system-vue";
14
+ const W = /* @__PURE__ */ v({
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,
16
+ setup(k) {
17
+ const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
18
+ render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
19
+ }), S = y({
20
+ loader: async () => (await c()).OrgStrategyDetailModal,
22
21
  loadingComponent: g(480, 240),
23
22
  delay: 0
24
- }), w = T({
25
- loader: async () => (await l()).OrgStrategyDropdown,
23
+ }), T = y({
24
+ loader: async () => (await c()).OrgStrategyDropdown,
26
25
  loadingComponent: g(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
+ }), o = A(), e = C(), { showToaster: s } = x(), n = u(null), i = u(!1), _ = l(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
28
+ O(() => e.assignStrategyDrawerStatus, (t) => {
30
29
  if (!t)
31
30
  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")
31
+ const { strategyId: r } = e.recommendationConfigs;
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
34
+ type: m.Error,
35
+ message: o("discovery-strategy.error-description")
37
36
  });
38
37
  });
39
38
  });
40
- const f = (t) => {
41
- const a = D(t.updated_at || t.created_at);
42
- if (!a)
39
+ const p = (t) => {
40
+ const r = f(t.updated_at || t.created_at);
41
+ if (!r)
43
42
  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) => ({
43
+ const a = I(r, E);
44
+ return o("recommendation-strategy.last-updated-on", { value: a });
45
+ }, D = l(() => e.strategies.map((t) => ({
71
46
  text: t.name,
72
47
  value: t.strategy_id,
73
48
  infoBoxProps: {
@@ -75,57 +50,57 @@ const st = /* @__PURE__ */ h({
75
50
  theme: "light",
76
51
  variant: "information",
77
52
  className: "assign-strategy-info-box",
78
- titleText: x(D(t.name)),
53
+ titleText: N(f(t.name)),
79
54
  descriptionStatus: !0,
80
- descriptionText: f(t),
81
- slot: G,
55
+ descriptionText: p(t),
56
+ slot: B,
82
57
  slotProps: { strategy: t }
83
58
  }
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 ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
86
61
  return t ? { ...t, fallback_config: null } : null;
87
- }), L = s(() => ({
62
+ }), w = l(() => ({
88
63
  primaryButton: {
89
64
  styling: "solid",
90
65
  type: "primary",
91
- labelText: r("products.assign-btn")
66
+ labelText: o("products.assign-btn")
92
67
  },
93
68
  cancelOrBackButton: {
94
69
  styling: "ghost",
95
70
  type: "secondary",
96
- labelText: r("products.cancel")
71
+ labelText: o("products.cancel")
97
72
  }
98
73
  }));
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: () => {
74
+ return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: S, OrgStrategyDropdown: T, trans: o, store: e, showToaster: s, selectedStrategyId: n, showSelectionError: i, drawerDescription: _, lastUpdatedText: p, strategyOptions: D, selectedStrategy: d, footerButtonGroupOptions: w, closeDrawer: () => {
100
75
  e.closeAssignStrategyDrawer();
101
76
  }, assignStrategy: async () => {
102
- const t = v.value;
77
+ const t = d.value;
103
78
  if (!t) {
104
- c.value = !0;
79
+ i.value = !0;
105
80
  return;
106
81
  }
107
- let a = "";
82
+ let r = "";
108
83
  try {
109
- a = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
110
- } catch (n) {
111
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
84
+ r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
85
+ } catch (a) {
86
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
112
87
  }
113
- if (!a) {
114
- i({
115
- type: p.Error,
116
- message: r("email-editor.strategy-assign-failed", { strategyName: t.name })
88
+ if (!r) {
89
+ s({
90
+ type: m.Error,
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
117
92
  });
118
93
  return;
119
94
  }
120
- e.assignStrategy(t), i({
121
- type: p.Success,
122
- message: r("email-editor.strategy-assigned-success", { strategyName: t.name })
95
+ e.assignStrategy(t), s({
96
+ type: m.Success,
97
+ message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
123
98
  }), e.closeAssignStrategyDrawer();
124
99
  }, onSelect: (t) => {
125
- o.value = t.value, c.value = !1;
100
+ n.value = t.value, i.value = !1;
126
101
  } };
127
102
  }
128
103
  });
129
104
  export {
130
- st as default
105
+ W as default
131
106
  };
@@ -1,30 +1,26 @@
1
- import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
2
- import y from "./AMPOnboarding.vue.js";
3
- import u from "./GenericOnboarding.vue.js";
4
- import v from "./ItemsOnboarding.vue.js";
5
- import S from "./NewVersionPopup.vue.js";
6
- import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
7
- import h from "./RecommendationStrategyOnboarding.vue.js";
8
- import w from "./TextBlockOnboarding.vue.js";
9
- import P from "./VersionHistoryOnboarding.vue.js";
10
- import { usePartner as _ } from "../../../composables/usePartner.js";
11
- import { useEditorStore as A } from "../../../stores/editor.js";
12
- import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
- import { usePreviewStore as M } from "../../../stores/preview.js";
14
- const U = /* @__PURE__ */ f({
1
+ import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
+ import u from "./AMPOnboarding.vue.js";
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({
15
13
  __name: "OnboardingWrapper",
16
14
  emits: ["onboarding-finished"],
17
- setup(x, { emit: g }) {
18
- const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
19
- { type: "newVersionPopup", component: S },
20
- { type: "genericOnboarding", component: u },
21
- { type: "textBlockOnboarding", component: w },
22
- { type: "versionHistoryOnboarding", component: P },
23
- { type: "ampOnboarding", component: y },
24
- { type: "itemsOnboarding", component: v },
25
- { type: "recommendationStrategyOnboarding", component: h },
26
- { type: "recommendationLegacyStrategyOnboarding", component: l }
27
- ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
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 },
18
+ { type: "genericOnboarding", component: v },
19
+ { type: "textBlockOnboarding", component: S },
20
+ { type: "versionHistoryOnboarding", component: h },
21
+ { 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)));
28
24
  return O(async () => {
29
25
  await o.fetchUserModalState();
30
26
  }), t(
@@ -33,7 +29,7 @@ const U = /* @__PURE__ */ f({
33
29
  n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
34
30
  }
35
31
  ), t(
36
- () => a.emailFormat,
32
+ () => s.emailFormat,
37
33
  (n, i) => {
38
34
  i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
39
35
  }
@@ -42,9 +38,9 @@ const U = /* @__PURE__ */ f({
42
38
  (n) => {
43
39
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
44
40
  }
45
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
41
+ ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
46
42
  }
47
43
  });
48
44
  export {
49
- U as default
45
+ G as default
50
46
  };