@useinsider/guido 3.18.1-beta.12053dd → 3.18.1-beta.178a3ec

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 (44) hide show
  1. package/dist/components/Guido.vue.js +3 -3
  2. package/dist/components/Guido.vue2.js +30 -30
  3. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +11 -13
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +53 -65
  5. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
  6. package/dist/composables/useCustomInterfaceAppearance.js +46 -56
  7. package/dist/composables/useHtmlValidator.js +79 -84
  8. package/dist/composables/useRecommendation.js +35 -40
  9. package/dist/composables/useStripo.js +30 -30
  10. package/dist/config/migrator/itemsBlockMigrator.js +225 -163
  11. package/dist/enums/extensions/recommendationBlock.js +31 -38
  12. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  13. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  14. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  15. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  16. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  17. package/dist/extensions/Blocks/Items/template.js +212 -201
  18. package/dist/extensions/Blocks/Recommendation/block.js +39 -43
  19. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
  20. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +58 -63
  21. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -84
  22. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +130 -222
  23. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
  24. package/dist/guido.css +1 -1
  25. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  26. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  27. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  28. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  29. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
  30. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  31. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
  32. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -9
  33. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -75
  34. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
  35. package/dist/src/stores/onboarding.d.ts +0 -377
  36. package/dist/static/styles/components/recommendation-strategy.css.js +4 -34
  37. package/dist/stores/onboarding.js +36 -41
  38. package/dist/utils/pairProductVariables.js +71 -71
  39. package/dist/utils/templatePreparation.js +49 -49
  40. package/package.json +1 -1
  41. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
  42. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -47
  43. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
  44. package/dist/static/styles/components/skeleton.css.js +0 -23
@@ -12,9 +12,9 @@ var t = function() {
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "cc5ee925"
15
+ "050dfa52"
16
16
  );
17
- const v = n.exports;
17
+ const f = n.exports;
18
18
  export {
19
- v as default
19
+ f as default
20
20
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ne, defineAsyncComponent as l, ref as O, computed as u, watch as x, onMounted as re, onUnmounted as se } from "vue";
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
2
  import { useCortexBlueprintBridge as ae } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { useEditorLock as ie } from "../composables/useEditorLock.js";
4
4
  import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
@@ -6,10 +6,10 @@ import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js
6
6
  import { usePartner as me } from "../composables/usePartner.js";
7
7
  import { useStripo as le } from "../composables/useStripo.js";
8
8
  import { useTimerClone as ue } from "../composables/useTimerClone.js";
9
- import { migrate as W } from "../config/migrator/index.js";
10
- import { ModuleFolderDefaults as G } from "../enums/defaults.js";
9
+ import { migrate as x } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as W } from "../enums/defaults.js";
11
11
  import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
12
- import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import { useRecommendationExtensionStore as G } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
13
  import fe from "./organisms/AutoSaveController.vue.js";
14
14
  import ye from "./organisms/base/Toaster.vue.js";
15
15
  import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
@@ -41,12 +41,12 @@ const et = /* @__PURE__ */ ne({
41
41
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
42
42
  ), J = l(
43
43
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
44
- ), E = O(), p = O(), f = Ce(), w = Te(), o = we();
44
+ ), h = O(), p = O(), f = Ce(), E = Te(), o = we();
45
45
  a.ready && o.init(a.config);
46
- const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), C = () => {
46
+ const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), w = () => {
47
47
  var t;
48
- return (t = E.value) == null ? void 0 : t.handleSave(!0);
49
- }, D = (t) => {
48
+ return (t = h.value) == null ? void 0 : t.handleSave(!0);
49
+ }, C = (t) => {
50
50
  c.loadingStatus = t;
51
51
  };
52
52
  ae(), de();
@@ -57,16 +57,16 @@ const et = /* @__PURE__ */ ne({
57
57
  userId: o.userId,
58
58
  username: o.username,
59
59
  partnerName: o.partnerName,
60
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
61
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
60
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
61
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
62
62
  };
63
- }, { initPlugin: k, preloadRuntime: T } = le(), { runExclusive: F, beginMount: R, isCurrentMount: I } = ie();
63
+ }, { initPlugin: D, preloadRuntime: k } = le(), { runExclusive: T, beginMount: F, isCurrentMount: I } = ie();
64
64
  let g = 0;
65
- const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: L, hasTimerBlocks: B } = ue(), Y = u(() => {
65
+ const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: R, hasTimerBlocks: L } = ue(), Y = u(() => {
66
66
  var t;
67
67
  return !((t = o.ui) != null && t.showHeader);
68
68
  }), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
69
- () => !!h().recommendationConfigs.strategyId
69
+ () => !!G().recommendationConfigs.strategyId
70
70
  );
71
71
  ce({
72
72
  onBack: () => {
@@ -83,12 +83,12 @@ const et = /* @__PURE__ */ ne({
83
83
  console.debug("guido:test-email:click"), r("test-email:click");
84
84
  }
85
85
  });
86
- const A = (t) => {
86
+ const B = (t) => {
87
87
  console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
88
- }, P = () => {
88
+ }, A = () => {
89
89
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
90
90
  };
91
- x(() => m.value, () => {
91
+ P(() => m.value, () => {
92
92
  r("on-change", m.value);
93
93
  });
94
94
  const v = (t) => {
@@ -105,40 +105,40 @@ const et = /* @__PURE__ */ ne({
105
105
  try {
106
106
  o.initialized || o.init(a.config), c.templateId = o.templateId;
107
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) || [];
108
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
108
+ E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
109
109
  const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
110
110
  let n = {
111
- html: s && await W(s, _),
111
+ html: s && await x(s, _),
112
112
  css: d
113
113
  };
114
- n.html || (n = await M(), n.html = await W(n.html, _));
114
+ n.html || (n = await M(), n.html = await x(n.html, _));
115
115
  const te = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
116
- B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(te, $(n.html)));
116
+ L(n.html) && (n.html = await R(n.html)), N && (c.trackIdSessionFloor = Math.max(te, $(n.html)));
117
117
  const oe = {
118
118
  preselectedDynamicContentList: U,
119
119
  onReady: () => {
120
120
  console.debug("guido:ready"), r("ready");
121
121
  }
122
122
  };
123
- g = R(), await k(n, y(), oe), f.selectedDynamicContentList = U;
123
+ g = F(), await D(n, y(), oe), f.selectedDynamicContentList = U;
124
124
  } catch (e) {
125
125
  console.error("Failed to initialize Stripo editor:", e);
126
126
  }
127
127
  };
128
128
  return re(async () => {
129
129
  var e;
130
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), ke().$reset(), S();
130
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(), ke().$reset(), S();
131
131
  const t = (e = p.value) == null ? void 0 : e.parentElement;
132
- if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
132
+ if (t && (i = new ResizeObserver(S), i.observe(t)), k(), a.ready)
133
133
  await b();
134
134
  else {
135
- const s = x(() => a.ready, (d) => {
135
+ const s = P(() => a.ready, (d) => {
136
136
  d && (s(), b());
137
137
  });
138
138
  }
139
139
  document.addEventListener("dynamic-content:open", v);
140
140
  }), se(() => {
141
- i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
141
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), T(async () => {
142
142
  if (I(g))
143
143
  try {
144
144
  window.UIEditor.removeEditor();
@@ -148,13 +148,13 @@ const et = /* @__PURE__ */ ne({
148
148
  }), o.reset();
149
149
  }), q({
150
150
  dynamicContent: {
151
- insert: A,
152
- close: P
151
+ insert: B,
152
+ close: A
153
153
  },
154
154
  hasChanges: m,
155
- saveSilent: C,
156
- setLoading: D
157
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: R, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: A, closeDynamicContent: P, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
155
+ saveSilent: w,
156
+ setLoading: C
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 };
158
158
  }
159
159
  });
160
160
  export {
@@ -1,21 +1,19 @@
1
- import s from "./AssignStrategyDrawer.vue2.js";
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() {
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();
12
- }, n = [], i = /* @__PURE__ */ o(
13
- s,
14
- a,
4
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var o = 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, "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
+ r,
12
+ o,
15
13
  n,
16
14
  !1,
17
15
  null,
18
- "b447f626"
16
+ "2580a7d9"
19
17
  );
20
18
  const y = i.exports;
21
19
  export {
@@ -1,46 +1,48 @@
1
- import { defineComponent as E, defineAsyncComponent as y, ref as f, computed as c, watch as O } 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 { useToaster as h } from "../../../../composables/useToaster.js";
3
+ import { useToaster as x } from "../../../../composables/useToaster.js";
4
4
  import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as I } from "../../../../enums/date.js";
6
- import { URLS as C } from "../../../../enums/extensions/recommendationBlock.js";
5
+ import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
+ import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
7
  import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as B } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import b from "./StrategyInfoBoxContent.vue.js";
10
- import { formatShortDate as N } from "../../../../utils/dateUtil.js";
11
- import { asText as S } from "../../../../utils/genericUtil.js";
12
- import { escapeHtml as k } from "../../../../utils/htmlEscape.js";
13
- import { InSkeleton as P } from "@useinsider/design-system-vue";
14
- const Y = /* @__PURE__ */ E({
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({
15
15
  __name: "AssignStrategyDrawer",
16
- setup(R) {
17
- const g = () => import("@useinsider/design-system-organisms"), d = (t, e) => ({
18
- render: (a) => a(P, { props: { sizing: { width: t, height: e } } })
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,
21
+ loadingComponent: g(480, 240),
22
+ delay: 0
19
23
  }), T = y({
20
- loader: async () => (await g()).OrgStrategyDetailModal,
21
- loadingComponent: d(480, 240),
24
+ loader: async () => (await c()).OrgStrategyDropdown,
25
+ loadingComponent: g(240, 42),
22
26
  delay: 0
23
- }), _ = y({
24
- loader: async () => (await g()).OrgStrategyDropdown
25
- }), n = "guido-edit-strategy-", s = A(), r = B(), { showToaster: i } = h(), o = f(null), l = f(!1), D = c(() => r.assignStrategyDrawerStatus ? s("email-editor.assign-strategy-description", { url: C.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
26
- O(() => r.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) => {
27
29
  if (!t)
28
30
  return;
29
- const { strategyId: e } = r.recommendationConfigs;
30
- o.value = e || null, l.value = !1, r.fetchStrategies().catch(() => {
31
- i({
31
+ const { strategyId: r } = e.recommendationConfigs;
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
32
34
  type: m.Error,
33
- message: s("discovery-strategy.error-description")
35
+ message: o("discovery-strategy.error-description")
34
36
  });
35
37
  });
36
38
  });
37
39
  const p = (t) => {
38
- const e = S(t.updated_at || t.created_at);
39
- if (!e)
40
+ const r = f(t.updated_at || t.created_at);
41
+ if (!r)
40
42
  return "";
41
- const a = N(e, I);
42
- return s("recommendation-strategy.last-updated-on", { value: a });
43
- }, v = c(() => r.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) => ({
44
46
  text: t.name,
45
47
  value: t.strategy_id,
46
48
  infoBoxProps: {
@@ -48,71 +50,57 @@ const Y = /* @__PURE__ */ E({
48
50
  theme: "light",
49
51
  variant: "information",
50
52
  className: "assign-strategy-info-box",
51
- titleText: k(S(t.name)),
53
+ titleText: N(f(t.name)),
52
54
  descriptionStatus: !0,
53
55
  descriptionText: p(t),
54
- slot: b,
55
- slotProps: { strategy: t },
56
- // The info box drops the option's value/text, so the id is the only channel
57
- // that can carry the strategy back to the click handler.
58
- buttonOptions: [{
59
- id: `${n}${t.strategy_id}`,
60
- text: s("eureka.edit-strategy"),
61
- type: "text",
62
- // Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
63
- // silently render blank space instead of failing.
64
- icon: "line-open-website"
65
- }]
56
+ slot: B,
57
+ slotProps: { strategy: t }
66
58
  }
67
- }))), w = (t) => {
68
- var a;
69
- const e = (a = t == null ? void 0 : t.id) != null && a.startsWith(n) ? t.id.slice(n.length) : "";
70
- e && (String(o.value ?? "") === e && (o.value = null), r.recommendationConfigs.strategyId === e && r.removeStrategy(), r.openStrategyEdit(e));
71
- }, u = c(() => {
72
- const t = r.strategies.find((e) => String(e.strategy_id) === String(o.value ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
73
61
  return t ? { ...t, fallback_config: null } : null;
74
- }), x = c(() => ({
62
+ }), w = l(() => ({
75
63
  primaryButton: {
76
64
  styling: "solid",
77
65
  type: "primary",
78
- labelText: s("products.assign-btn")
66
+ labelText: o("products.assign-btn")
79
67
  },
80
68
  cancelOrBackButton: {
81
69
  styling: "ghost",
82
70
  type: "secondary",
83
- labelText: s("products.cancel")
71
+ labelText: o("products.cancel")
84
72
  }
85
73
  }));
86
- return { __sfc: !0, loadOrganisms: g, skeleton: d, OrgStrategyDetailModal: T, OrgStrategyDropdown: _, EDIT_BUTTON_ID_PREFIX: n, trans: s, store: r, showToaster: i, selectedStrategyId: o, showSelectionError: l, drawerDescription: D, lastUpdatedText: p, strategyOptions: v, onInfoBoxButtonClick: w, selectedStrategy: u, footerButtonGroupOptions: x, closeDrawer: () => {
87
- r.closeAssignStrategyDrawer();
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: () => {
75
+ e.closeAssignStrategyDrawer();
88
76
  }, assignStrategy: async () => {
89
- const t = u.value;
77
+ const t = d.value;
90
78
  if (!t) {
91
- l.value = !0;
79
+ i.value = !0;
92
80
  return;
93
81
  }
94
- let e = "";
82
+ let r = "";
95
83
  try {
96
- e = await r.resolveStrategyUrlTemplate(t, r.recommendationConfigs.currencySettings.value);
84
+ r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
97
85
  } catch (a) {
98
86
  console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
99
87
  }
100
- if (!e) {
101
- i({
88
+ if (!r) {
89
+ s({
102
90
  type: m.Error,
103
- message: s("email-editor.strategy-assign-failed", { strategyName: t.name })
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
104
92
  });
105
93
  return;
106
94
  }
107
- r.assignStrategy(t), i({
95
+ e.assignStrategy(t), s({
108
96
  type: m.Success,
109
- message: s("email-editor.strategy-assigned-success", { strategyName: t.name })
110
- }), r.closeAssignStrategyDrawer();
97
+ message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
98
+ }), e.closeAssignStrategyDrawer();
111
99
  }, onSelect: (t) => {
112
- o.value = t.value, l.value = !1;
100
+ n.value = t.value, i.value = !1;
113
101
  } };
114
102
  }
115
103
  });
116
104
  export {
117
- Y as default
105
+ W as default
118
106
  };
@@ -1,28 +1,26 @@
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 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({
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({
14
13
  __name: "OnboardingWrapper",
15
14
  emits: ["onboarding-finished"],
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 },
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 },
19
18
  { type: "genericOnboarding", component: v },
20
- { type: "textBlockOnboarding", component: h },
21
- { type: "versionHistoryOnboarding", component: w },
19
+ { type: "textBlockOnboarding", component: S },
20
+ { type: "versionHistoryOnboarding", component: h },
22
21
  { type: "ampOnboarding", component: u },
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)));
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)));
26
24
  return O(async () => {
27
25
  await o.fetchUserModalState();
28
26
  }), t(
@@ -40,9 +38,9 @@ const N = /* @__PURE__ */ b({
40
38
  (n) => {
41
39
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
42
40
  }
43
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
41
+ ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
44
42
  }
45
43
  });
46
44
  export {
47
- N as default
45
+ G as default
48
46
  };
@@ -1,77 +1,67 @@
1
- import p from "../static/assets/icons/line-change.svg.js";
2
- import s from "../static/assets/icons/line-delete.svg.js";
3
- import a from "../static/assets/icons/line-plus.svg.js";
4
- import f from "../static/styles/base.css.js";
5
- import C from "../static/styles/components/alert-message.css.js";
6
- import c from "../static/styles/components/amp-block.css.js";
7
- import l from "../static/styles/components/base-input.css.js";
8
- import d from "../static/styles/components/button-group.css.js";
9
- import u from "../static/styles/components/button.css.js";
10
- import h from "../static/styles/components/combobox.css.js";
11
- import g from "../static/styles/components/counter.css.js";
12
- import w from "../static/styles/components/dropdown-menu.css.js";
13
- import y from "../static/styles/components/loader.css.js";
14
- import I from "../static/styles/components/narrow-panel.css.js";
15
- import A from "../static/styles/components/popup.css.js";
16
- import b from "../static/styles/components/recommendation-strategy.css.js";
17
- import B from "../static/styles/components/skeleton.css.js";
18
- import D from "../static/styles/components/switcher.css.js";
19
- import $ from "../static/styles/components/tabs.css.js";
20
- import P from "../static/styles/components/tools.css.js";
21
- import R from "../static/styles/components/version-history.css.js";
22
- import T from "../static/styles/components/wide-panel.css.js";
1
+ import S from "../static/assets/icons/line-change.svg.js";
2
+ import i from "../static/assets/icons/line-delete.svg.js";
3
+ import n from "../static/assets/icons/line-plus.svg.js";
4
+ import p from "../static/styles/base.css.js";
5
+ import s from "../static/styles/components/alert-message.css.js";
6
+ import C from "../static/styles/components/amp-block.css.js";
7
+ import a from "../static/styles/components/base-input.css.js";
8
+ import f from "../static/styles/components/button-group.css.js";
9
+ import c from "../static/styles/components/button.css.js";
10
+ import u from "../static/styles/components/combobox.css.js";
11
+ import l from "../static/styles/components/counter.css.js";
12
+ import d from "../static/styles/components/dropdown-menu.css.js";
13
+ import h from "../static/styles/components/loader.css.js";
14
+ import g from "../static/styles/components/narrow-panel.css.js";
15
+ import I from "../static/styles/components/popup.css.js";
16
+ import w from "../static/styles/components/recommendation-strategy.css.js";
17
+ import y from "../static/styles/components/switcher.css.js";
18
+ import b from "../static/styles/components/tabs.css.js";
19
+ import B from "../static/styles/components/tools.css.js";
20
+ import $ from "../static/styles/components/version-history.css.js";
21
+ import P from "../static/styles/components/wide-panel.css.js";
23
22
  import x from "../static/styles/variables.css.js";
24
- function r(S, o) {
25
- return `--guido-icon-${S}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
23
+ function r(t, o) {
24
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
26
25
  }
27
- const M = `:host {
28
- ${r("line-change", p)}
29
- ${r("line-delete", s)}
30
- ${r("line-plus", a)}
31
- }`, O = [
26
+ const A = `:host {
27
+ ${r("line-change", S)}
28
+ ${r("line-delete", i)}
29
+ ${r("line-plus", n)}
30
+ }`, R = [
32
31
  x,
33
32
  // Must be on top
34
- M,
35
- f,
33
+ A,
34
+ p,
36
35
  // Must be on top
36
+ s,
37
37
  C,
38
+ a,
39
+ f,
38
40
  c,
41
+ u,
39
42
  l,
40
43
  d,
41
- u,
42
44
  h,
43
45
  g,
44
- w,
45
- y,
46
46
  I,
47
- A,
47
+ y,
48
+ b,
48
49
  B,
49
- D,
50
50
  $,
51
51
  P,
52
- R,
53
- T,
54
- b
52
+ w
55
53
  // Last: overrides button.css / wide-panel.css defaults
56
54
  ].join(`
57
55
 
58
- `), V = 3e4;
59
- let e = null;
60
- function W() {
61
- return e || (e = new CSSStyleSheet(), e.replaceSync(O)), e;
62
- }
63
- const So = () => ({ importCss: () => {
64
- const o = W(), i = Date.now() + V, m = () => {
65
- var n;
66
- const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
67
- if (t) {
68
- t.adoptedStyleSheets.includes(o) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, o]);
69
- return;
70
- }
71
- Date.now() < i && requestAnimationFrame(m);
72
- };
73
- m();
56
+ `), Y = () => ({ importCss: () => {
57
+ const o = new CSSStyleSheet();
58
+ o.replaceSync(R);
59
+ const e = document.querySelector("ui-editor");
60
+ if (!e)
61
+ return;
62
+ const m = e.shadowRoot;
63
+ m && (m.adoptedStyleSheets = [o]);
74
64
  } });
75
65
  export {
76
- So as useCustomInterfaceAppearance
66
+ Y as useCustomInterfaceAppearance
77
67
  };