@useinsider/guido 3.30.0-beta.6054a97 → 3.30.0-beta.6333231

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.
@@ -12,9 +12,9 @@ var n = function() {
12
12
  t,
13
13
  !1,
14
14
  null,
15
- "0c5f11a1"
15
+ "4eea8564"
16
16
  );
17
- const u = s.exports;
17
+ const c = s.exports;
18
18
  export {
19
- u as default
19
+ c as default
20
20
  };
@@ -1,43 +1,43 @@
1
- import { defineComponent as Se, defineAsyncComponent as a, ref as W, computed as l, watch as $, onMounted as he, onUnmounted as Ee } from "vue";
2
- import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as De } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as we } from "../composables/useEditorOpenMetrics.js";
5
- import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as ke } from "../composables/useGuidoStateBridge.js";
7
- import { usePartner as Fe } from "../composables/usePartner.js";
8
- import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ie } from "../composables/useStripo.js";
10
- import { useTimerClone as Le } from "../composables/useTimerClone.js";
11
- import { useToaster as Re } from "../composables/useToaster.js";
12
- import { useTranslations as Oe } from "../composables/useTranslations.js";
13
- import { migrate as Ue } from "../config/migrator/index.js";
1
+ import { defineComponent as he, defineAsyncComponent as a, ref as W, computed as u, watch as $, onMounted as Ee, onUnmounted as Ce } from "vue";
2
+ import { useCortexBlueprintBridge as De } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as we } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as Te } from "../composables/useEditorOpenMetrics.js";
5
+ import { provideGuidoActions as ke } from "../composables/useGuidoActions.js";
6
+ import { useGuidoStateBridge as Fe } from "../composables/useGuidoStateBridge.js";
7
+ import { usePartner as Me } from "../composables/usePartner.js";
8
+ import { useSaveValidationRollout as Ie } from "../composables/useSaveValidationRollout.js";
9
+ import { useStripo as Le } from "../composables/useStripo.js";
10
+ import { useTimerClone as Re } from "../composables/useTimerClone.js";
11
+ import { useToaster as Oe } from "../composables/useToaster.js";
12
+ import { useTranslations as Ue } from "../composables/useTranslations.js";
13
+ import { migrate as Ae } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as G } from "../enums/defaults.js";
15
- import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
16
- import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
17
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as _e } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as Pe } from "../extensions/Blocks/Unsubscribe/block.js";
19
- import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
20
- import Be from "./organisms/AutoSaveController.vue.js";
21
- import He from "./organisms/base/AuthErrorModal.vue.js";
22
- import Ve from "./organisms/base/Toaster.vue.js";
23
- import We from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
24
- import $e from "./organisms/header/HeaderWrapper.vue.js";
25
- import Ge from "./organisms/LoadingWrapper.vue.js";
26
- import ze from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
27
- import qe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
28
- import Ke from "./organisms/validation/ValidationErrorDrawer.vue.js";
29
- import { useStripoApi as je } from "../services/stripoApi.js";
30
- import { useConfigStore as Je } from "../stores/config.js";
31
- import { useDynamicContentStore as Qe } from "../stores/dynamic-content.js";
15
+ import { RIBBON_SELECTOR as Ne } from "../enums/onboarding.js";
16
+ import { ToasterTypeOptions as _e } from "../enums/toaster.js";
17
+ import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Pe } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
+ import { disposeUnsubscribeListeners as xe } from "../extensions/Blocks/Unsubscribe/block.js";
19
+ import { disposeDisplayConditionRequest as Be } from "../extensions/DisplayConditions/bridge.js";
20
+ import He from "./organisms/AutoSaveController.vue.js";
21
+ import Ve from "./organisms/base/AuthErrorModal.vue.js";
22
+ import We from "./organisms/base/Toaster.vue.js";
23
+ import $e from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
24
+ import Ge from "./organisms/header/HeaderWrapper.vue.js";
25
+ import ze from "./organisms/LoadingWrapper.vue.js";
26
+ import qe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
27
+ import Ke from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
28
+ import je from "./organisms/validation/ValidationErrorDrawer.vue.js";
29
+ import { useStripoApi as Je } from "../services/stripoApi.js";
30
+ import { useConfigStore as Qe } from "../stores/config.js";
31
+ import { useDynamicContentStore as Xe } from "../stores/dynamic-content.js";
32
32
  import { useEditorStore as C } from "../stores/editor.js";
33
33
  import { useModuleDynamicContentStore as q } from "../stores/module-dynamic-content.js";
34
- import { useOnboardingStore as Xe } from "../stores/onboarding.js";
35
- import { usePreviewStore as Ye } from "../stores/preview.js";
36
- import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
37
- import { useTemplateStore as et } from "../stores/template.js";
38
- import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
34
+ import { useOnboardingStore as Ye } from "../stores/onboarding.js";
35
+ import { usePreviewStore as Ze } from "../stores/preview.js";
36
+ import { useSaveValidationStore as et } from "../stores/save-validation.js";
37
+ import { useTemplateStore as tt } from "../stores/template.js";
38
+ import { useUnsubscribeStore as ot } from "../stores/unsubscribe.js";
39
39
  import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
40
- const Vt = /* @__PURE__ */ Se({
40
+ const Wt = /* @__PURE__ */ he({
41
41
  __name: "Guido",
42
42
  props: {
43
43
  config: null,
@@ -45,7 +45,7 @@ const Vt = /* @__PURE__ */ Se({
45
45
  },
46
46
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
47
47
  setup(j, { expose: J, emit: i }) {
48
- const c = j, r = we(), Q = a(
48
+ const c = j, r = Te(), Q = a(
49
49
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
50
50
  ), X = a(
51
51
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
@@ -61,13 +61,13 @@ const Vt = /* @__PURE__ */ Se({
61
61
  () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
62
62
  ), ne = a(
63
63
  () => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
64
- ), y = W(), g = Qe(), w = tt(), re = q(), o = Je();
64
+ ), y = W(), g = Xe(), w = ot(), re = q(), o = Qe();
65
65
  c.ready && o.init(c.config);
66
- const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: k } = Re(), F = Oe(), M = () => {
66
+ const d = C(), ie = Ze(), p = u(() => d.hasChanges), { isTestPartner: se } = Me(), { isEnabled: ae, loadRollout: T } = Ie(), { showToaster: k } = Oe(), F = Ue(), M = () => {
67
67
  var t;
68
68
  if (d.isVersionHistoryOpen) {
69
69
  console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
70
- type: Ne.Warning,
70
+ type: _e.Warning,
71
71
  message: F("email-editor.save-blocked-outside-editor")
72
72
  });
73
73
  return;
@@ -76,7 +76,7 @@ const Vt = /* @__PURE__ */ Se({
76
76
  }, I = (t) => {
77
77
  d.loadingStatus = t;
78
78
  };
79
- Ce(), ke();
79
+ De(), Fe();
80
80
  const b = () => {
81
81
  var t, e;
82
82
  return {
@@ -87,17 +87,17 @@ const Vt = /* @__PURE__ */ Se({
87
87
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
88
88
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
89
89
  };
90
- }, { initPlugin: L, preloadRuntime: R } = Ie(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
90
+ }, { initPlugin: L, preloadRuntime: R } = Le(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = we();
91
91
  let f = 0;
92
- const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Le(), ce = l(() => {
92
+ const { getDefaultTemplate: A } = Je(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Re(), ce = u(() => {
93
93
  var t;
94
94
  return !((t = o.ui) != null && t.showHeader);
95
- }), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
95
+ }), de = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = u(() => o.externalDisplayConditions), le = u(
96
96
  () => o.isFeatureEnabled("legacyUnsubscribeConversion")
97
- ), ue = l(
97
+ ), ue = u(
98
98
  () => !!z().recommendationConfigs.strategyId
99
99
  );
100
- Te({
100
+ ke({
101
101
  onBack: () => {
102
102
  console.debug("guido:back"), i("back");
103
103
  },
@@ -121,13 +121,13 @@ const Vt = /* @__PURE__ */ Se({
121
121
  i("on-change", p.value);
122
122
  });
123
123
  const S = (t) => {
124
- const e = t, { attribute: s, position: u } = e.detail;
125
- console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, u);
124
+ const e = t, { attribute: s, position: l } = e.detail;
125
+ console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, l);
126
126
  };
127
127
  let m = null;
128
128
  const h = () => {
129
129
  var e;
130
- const t = document.querySelector(Ae);
130
+ const t = document.querySelector(Ne);
131
131
  (e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
132
132
  }, E = async () => {
133
133
  var t;
@@ -139,7 +139,7 @@ const Vt = /* @__PURE__ */ Se({
139
139
  templateId: o.templateId,
140
140
  variationId: o.variationId
141
141
  });
142
- const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
142
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", l = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
143
143
  w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
144
  const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
145
145
  partnerName: o.partnerName,
@@ -147,15 +147,15 @@ const Vt = /* @__PURE__ */ Se({
147
147
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
148
148
  }, ye = {
149
149
  itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
150
- }, V = (ve) => r.timed(
150
+ }, V = (ve, Se) => r.timed(
151
151
  "migration",
152
- () => Ue(ve, pe, fe, ye)
152
+ () => Ae(ve, pe, fe, ye, Se)
153
153
  );
154
154
  let n = {
155
- html: s && await V(s),
156
- css: u
155
+ html: s && await V(s, l),
156
+ css: l
157
157
  };
158
- n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
158
+ n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html, n.css));
159
159
  const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
160
160
  _(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
161
  const be = {
@@ -169,21 +169,21 @@ const Vt = /* @__PURE__ */ Se({
169
169
  console.error("Failed to initialize Stripo editor:", e), r.markFailed();
170
170
  }
171
171
  };
172
- return he(async () => {
172
+ return Ee(async () => {
173
173
  var e;
174
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), et().$reset(), Ze().$reset(), q().$reset(), Xe().resetOnboarding("recommendationLegacyStrategyOnboarding"), T(), h();
174
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), tt().$reset(), et().$reset(), q().$reset(), Ye().resetOnboarding("recommendationLegacyStrategyOnboarding"), T(), h();
175
175
  const t = (e = y.value) == null ? void 0 : e.parentElement;
176
176
  if (t && (m = new ResizeObserver(h), m.observe(t)), R(), c.ready)
177
177
  await E();
178
178
  else {
179
- const s = $(() => c.ready, (u) => {
180
- u && (s(), E());
179
+ const s = $(() => c.ready, (l) => {
180
+ l && (s(), E());
181
181
  });
182
182
  }
183
183
  document.addEventListener("dynamic-content:open", S);
184
- }), Ee(() => {
185
- if (Pe(), _e(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
186
- xe();
184
+ }), Ce(() => {
185
+ if (xe(), Pe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
186
+ Be();
187
187
  try {
188
188
  const t = C();
189
189
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
@@ -207,9 +207,9 @@ const Vt = /* @__PURE__ */ Se({
207
207
  hasChanges: p,
208
208
  saveSilent: M,
209
209
  setLoading: I
210
- }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: w, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: k, trans: F, saveSilent: M, setLoading: I, emit: i, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: P, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
210
+ }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: w, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: k, trans: F, saveSilent: M, setLoading: I, emit: i, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: P, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: He, AuthErrorModal: Ve, Toaster: We, FilterSelectionDrawer: $e, HeaderWrapper: Ge, LoadingWrapper: ze, SaveAsTemplateDrawer: qe, UnsubscribeWrapper: Ke, ValidationErrorDrawer: je };
211
211
  }
212
212
  });
213
213
  export {
214
- Vt as default
214
+ Wt as default
215
215
  };
@@ -3,7 +3,7 @@ import r from "./AssignStrategyDrawer.vue2.js";
3
3
  import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var a = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
- return t.isRendered ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, show: t.store.assignStrategyDrawerStatus, 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() {
6
+ 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() {
7
7
  return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [t.strategiesLoading ? s(t.InSkeleton, { staticClass: "assign-strategy-select-skeleton", attrs: { sizing: t.SELECT_SKELETON_SIZING } }) : s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select w-23-s", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", "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(c) {
8
8
  return t.store.openStrategyCreation();
9
9
  }, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
@@ -1,57 +1,51 @@
1
- import { defineComponent as N, defineAsyncComponent as E, ref as p, computed as o, watch as R, nextTick as P } from "vue";
1
+ import { defineComponent as b, defineAsyncComponent as T, ref as w, computed as o, watch as N } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as U } from "../../../../composables/useToaster.js";
4
- import { useTranslations as G } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as M } from "../../../../enums/date.js";
6
- import { URLS as $ } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as f } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as z } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitStrategyChange as D } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
- import H from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as F } from "../../../../utils/dateUtil.js";
12
- import { asText as O } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as K } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as I } from "@useinsider/design-system-vue";
15
- const lt = /* @__PURE__ */ N({
3
+ import { useToaster as R } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as P } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as U } from "../../../../enums/date.js";
6
+ import { URLS as G } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as M } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { commitStrategyChange as E } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
+ import $ from "./StrategyInfoBoxContent.vue.js";
11
+ import { formatShortDate as z } from "../../../../utils/dateUtil.js";
12
+ import { asText as D } from "../../../../utils/genericUtil.js";
13
+ import { escapeHtml as H } from "../../../../utils/htmlEscape.js";
14
+ import { InSkeleton as O } from "@useinsider/design-system-vue";
15
+ const it = /* @__PURE__ */ b({
16
16
  __name: "AssignStrategyDrawer",
17
- setup(V) {
18
- const g = () => import("@useinsider/design-system-organisms"), S = (t, r) => ({
19
- render: (s) => s(I, { props: { sizing: { width: t, height: r } } })
20
- }), h = E({
17
+ setup(F) {
18
+ const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
19
+ render: (s) => s(O, { props: { sizing: { width: t, height: r } } })
20
+ }), I = T({
21
21
  loader: async () => (await g()).OrgStrategyDetailModal,
22
- loadingComponent: S(480, 240),
22
+ loadingComponent: p(480, 240),
23
23
  delay: 0
24
- }), x = E({
24
+ }), h = T({
25
25
  loader: async () => (await g()).OrgStrategyDropdown
26
- }), i = "guido-edit-strategy-", A = { width: 480, height: 42 }, a = G(), e = z(), { showToaster: c } = U(), n = p(null), d = "legacy", l = p(!1), m = p(!1), C = o(() => e.strategiesLoading || e.legacyConversionLoading), L = o(() => a(
27
- "email-editor.assign-strategy-description",
28
- { url: $.RECOMMENDATION_STRATEGIES_PANEL_PATH }
29
- ));
30
- R(() => e.assignStrategyDrawerStatus, async (t) => {
31
- if (!t) {
32
- await P(), m.value = e.assignStrategyDrawerStatus;
26
+ }), i = "guido-edit-strategy-", x = { width: 480, height: 42 }, a = P(), e = M(), { showToaster: c } = R(), n = w(null), d = "legacy", l = w(!1), A = o(() => e.strategiesLoading || e.legacyConversionLoading), C = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: G.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
+ N(() => e.assignStrategyDrawerStatus, (t) => {
28
+ if (!t)
33
29
  return;
34
- }
35
- m.value = !0;
36
30
  const { strategyId: r } = e.recommendationConfigs;
37
31
  n.value = r || (e.isLegacyStrategyBlock ? d : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
38
32
  c({
39
- type: f.Error,
33
+ type: u.Error,
40
34
  message: a("discovery-strategy.error-description")
41
35
  });
42
36
  });
43
- }, { immediate: !0 });
44
- const v = (t) => {
45
- const r = O(t.updated_at || t.created_at);
37
+ });
38
+ const f = (t) => {
39
+ const r = D(t.updated_at || t.created_at);
46
40
  if (!r)
47
41
  return "";
48
- const s = F(r, M);
42
+ const s = z(r, U);
49
43
  return a("recommendation-strategy.last-updated-on", { value: s });
50
- }, T = o(() => ({
44
+ }, S = o(() => ({
51
45
  text: a("ds-steps.legacy-strategy"),
52
46
  value: d,
53
47
  hidden: !0
54
- })), u = o(() => e.strategies.map((t) => ({
48
+ })), m = o(() => e.strategies.map((t) => ({
55
49
  text: t.name,
56
50
  value: t.strategy_id,
57
51
  infoBoxProps: {
@@ -60,10 +54,10 @@ const lt = /* @__PURE__ */ N({
60
54
  variant: "information",
61
55
  size: "small",
62
56
  class: "assign-strategy-info-box",
63
- titleText: K(O(t.name)),
57
+ titleText: H(D(t.name)),
64
58
  descriptionStatus: !0,
65
- descriptionText: v(t),
66
- slot: H,
59
+ descriptionText: f(t),
60
+ slot: $,
67
61
  slotProps: { strategy: t },
68
62
  // The info box drops the option's value/text, so the id is the only channel
69
63
  // that can carry the strategy back to the click handler.
@@ -76,17 +70,17 @@ const lt = /* @__PURE__ */ N({
76
70
  icon: "line-open-website"
77
71
  }]
78
72
  }
79
- }))), k = o(() => e.isLegacyStrategyBlock ? [T.value, ...u.value] : u.value), B = (t) => {
80
- var w;
81
- const r = (w = t == null ? void 0 : t.id) != null && w.startsWith(i) ? t.id.slice(i.length) : "";
73
+ }))), L = o(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), B = (t) => {
74
+ var _;
75
+ const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
82
76
  if (!r)
83
77
  return;
84
78
  const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
85
- e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && D(s, "Removed recommendation strategy")));
86
- }, _ = o(() => {
79
+ e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && E(s, "Removed recommendation strategy")));
80
+ }, v = o(() => {
87
81
  const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
88
82
  return t ? { ...t, fallback_config: null } : null;
89
- }), b = o(() => ({
83
+ }), k = o(() => ({
90
84
  primaryButton: {
91
85
  styling: "solid",
92
86
  type: "primary",
@@ -98,10 +92,10 @@ const lt = /* @__PURE__ */ N({
98
92
  labelText: a("products.cancel")
99
93
  }
100
94
  }));
101
- return { __sfc: !0, loadOrganisms: g, skeleton: S, OrgStrategyDetailModal: h, OrgStrategyDropdown: x, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: A, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, isRendered: m, strategiesLoading: C, drawerDescription: L, lastUpdatedText: v, legacyStrategyOption: T, remoteStrategyOptions: u, strategyOptions: k, onInfoBoxButtonClick: B, selectedStrategy: _, footerButtonGroupOptions: b, closeDrawer: () => {
95
+ return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: I, OrgStrategyDropdown: h, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: x, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, strategiesLoading: A, drawerDescription: C, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: m, strategyOptions: L, onInfoBoxButtonClick: B, selectedStrategy: v, footerButtonGroupOptions: k, closeDrawer: () => {
102
96
  e.closeAssignStrategyDrawer();
103
97
  }, assignStrategy: async () => {
104
- const t = _.value;
98
+ const t = v.value;
105
99
  if (!t) {
106
100
  l.value = !0;
107
101
  return;
@@ -114,21 +108,21 @@ const lt = /* @__PURE__ */ N({
114
108
  }
115
109
  if (!r) {
116
110
  c({
117
- type: f.Error,
111
+ type: u.Error,
118
112
  message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
119
113
  });
120
114
  return;
121
115
  }
122
116
  const s = e.currentRecommendationId;
123
117
  e.assignStrategy(t), c({
124
- type: f.Success,
118
+ type: u.Success,
125
119
  message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
126
- }), e.closeAssignStrategyDrawer(), s !== null && await D(s, "Assigned recommendation strategy");
120
+ }), e.closeAssignStrategyDrawer(), s !== null && await E(s, "Assigned recommendation strategy");
127
121
  }, onSelect: (t) => {
128
122
  n.value = t.value, l.value = !1;
129
- }, InSkeleton: I };
123
+ }, InSkeleton: O };
130
124
  }
131
125
  });
132
126
  export {
133
- lt as default
127
+ it as default
134
128
  };
@@ -1,20 +1,20 @@
1
- import { migrateCheckbox as e } from "./checkboxMigrator.js";
2
- import { migrateCouponBlock as a } from "./couponBlockMigrator.js";
3
- import { migrateFullStoryScripts as c } from "./fullStoryScriptMigrator.js";
4
- import { migrateItemsBlock as g } from "./itemsBlockMigrator.js";
5
- import { migrateItemsPriceFormat as n } from "./itemsPriceFormatMigrator.js";
6
- import { migrateLegacyUnsubscribeText as p } from "./legacyUnsubscribeTextMigrator.js";
7
- import { migrateProductNameLink as f } from "./productNameLinkMigrator.js";
8
- import { migrateRadioButton as l } from "./radioButtonMigrator.js";
9
- import { migrateRecommendation as s } from "./recommendationMigrator.js";
10
- import { migrateRecommendationPartnerScope as d } from "./recommendationPartnerMigrator.js";
11
- import { migrateRecommendationTitle as b } from "./recommendationTitleMigrator.js";
12
- import { migrateSocialIcons as k } from "./socialIconMigrator.js";
13
- import { migrateUnsubscribe as P } from "./unsubscribeMigrator.js";
14
- const w = async (t, i = {}, o, r) => {
1
+ import { migrateCheckbox as a } from "./checkboxMigrator.js";
2
+ import { migrateCouponBlock as c } from "./couponBlockMigrator.js";
3
+ import { migrateFullStoryScripts as g } from "./fullStoryScriptMigrator.js";
4
+ import { migrateItemsBlock as n } from "./itemsBlockMigrator.js";
5
+ import { migrateItemsPriceFormat as p } from "./itemsPriceFormatMigrator.js";
6
+ import { migrateLegacyUnsubscribeText as f } from "./legacyUnsubscribeTextMigrator.js";
7
+ import { migrateProductNameLink as l } from "./productNameLinkMigrator.js";
8
+ import { migrateRadioButton as s } from "./radioButtonMigrator.js";
9
+ import { migrateRecommendation as d } from "./recommendationMigrator.js";
10
+ import { migrateRecommendationPartnerScope as b } from "./recommendationPartnerMigrator.js";
11
+ import { migrateRecommendationTitle as k } from "./recommendationTitleMigrator.js";
12
+ import { migrateSocialIcons as P } from "./socialIconMigrator.js";
13
+ import { migrateUnsubscribe as R } from "./unsubscribeMigrator.js";
14
+ const H = async (t, i = {}, o, r, e = "") => {
15
15
  let m = t;
16
- return m = e(m), m = l(m), m = p(m), m = await P(m), m = a(m), m = s(m, i), o && (m = d(m, o)), m = b(m), m = g(m), r != null && r.itemsPriceFormatting && (m = n(m)), m = f(m), m = k(m), m = c(m), m;
16
+ return m = a(m), m = s(m), m = f(m), m = await R(m), m = c(m), m = d(m, i, e), o && (m = b(m, o)), m = k(m), m = n(m), r != null && r.itemsPriceFormatting && (m = p(m)), m = l(m), m = P(m), m = g(m), m;
17
17
  };
18
18
  export {
19
- w as migrate
19
+ H as migrate
20
20
  };