@useinsider/guido 3.19.0-beta.2854f4f → 3.19.0-beta.3303d1f

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 (60) hide show
  1. package/README.md +21 -3
  2. package/dist/@types/config/schemas.js +59 -51
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +57 -55
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +3 -3
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +56 -52
  7. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  8. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  9. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +18 -18
  10. package/dist/components/organisms/header/EditorActions.vue.js +4 -4
  11. package/dist/components/organisms/header/EditorActions.vue2.js +23 -25
  12. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -26
  13. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  14. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  15. package/dist/composables/useActionsApi.js +52 -47
  16. package/dist/composables/useCodeEditorApi.js +23 -9
  17. package/dist/composables/useCustomInterfaceAppearance.js +54 -50
  18. package/dist/composables/useLegacyStrategyConversion.js +61 -0
  19. package/dist/composables/useTranslations.js +3 -2
  20. package/dist/composables/useVersionHistoryApi.js +33 -24
  21. package/dist/config/migrator/itemsBlockMigrator.js +236 -248
  22. package/dist/enums/extensions/recommendationBlock.js +34 -25
  23. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  24. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  25. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  26. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  27. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  28. package/dist/extensions/Blocks/Items/template.js +219 -204
  29. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +73 -72
  30. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +81 -38
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +169 -108
  32. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  33. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +10 -10
  34. package/dist/guido.css +1 -1
  35. package/dist/services/recommendationApi.js +46 -37
  36. package/dist/src/@types/config/schemas.d.ts +16 -0
  37. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  39. package/dist/src/composables/useConfig.d.ts +4 -0
  40. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  41. package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -1
  42. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  43. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  44. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  45. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -0
  46. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +76 -1
  47. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  48. package/dist/src/services/recommendationApi.d.ts +2 -1
  49. package/dist/src/stores/config.d.ts +322 -0
  50. package/dist/src/stores/onboarding.d.ts +421 -0
  51. package/dist/src/utils/stripoEditorApi.d.ts +4 -0
  52. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  53. package/dist/static/assets/icons/line-info.svg.js +5 -0
  54. package/dist/static/styles/components/recommendation-strategy.css.js +70 -5
  55. package/dist/stores/config.js +74 -60
  56. package/dist/stores/onboarding.js +6 -1
  57. package/dist/stores/unsubscribe.js +3 -3
  58. package/dist/utils/pairProductVariables.js +71 -71
  59. package/dist/utils/stripoEditorApi.js +11 -0
  60. package/package.json +2 -1
@@ -1,47 +1,51 @@
1
- import { defineComponent as A, defineAsyncComponent as S, ref as T, computed as l, watch as h } from "vue";
1
+ import { defineComponent as B, defineAsyncComponent as T, ref as w, computed as n, watch as k } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as C } from "../../../../composables/useToaster.js";
4
- import { useTranslations as b } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as B } from "../../../../enums/date.js";
6
- import { URLS as k } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as d } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as R } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
- import N from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as P } from "../../../../utils/dateUtil.js";
12
- import { asText as v } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as U } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as L } from "@useinsider/design-system-vue";
15
- const rt = /* @__PURE__ */ A({
3
+ import { useToaster as b } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as L } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as N } from "../../../../enums/date.js";
6
+ import { URLS as R } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as P } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { commitStrategyChange as D } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
+ import U from "./StrategyInfoBoxContent.vue.js";
11
+ import { formatShortDate as M } from "../../../../utils/dateUtil.js";
12
+ import { asText as O } from "../../../../utils/genericUtil.js";
13
+ import { escapeHtml as G } from "../../../../utils/htmlEscape.js";
14
+ import { InSkeleton as $ } from "@useinsider/design-system-vue";
15
+ const st = /* @__PURE__ */ B({
16
16
  __name: "AssignStrategyDrawer",
17
- setup(M) {
18
- const g = () => import("@useinsider/design-system-organisms"), u = (t, r) => ({
19
- render: (o) => o(L, { props: { sizing: { width: t, height: r } } })
20
- }), w = S({
17
+ setup(H) {
18
+ const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
19
+ render: (o) => o($, { props: { sizing: { width: t, height: r } } })
20
+ }), E = T({
21
21
  loader: async () => (await g()).OrgStrategyDetailModal,
22
- loadingComponent: u(480, 240),
22
+ loadingComponent: p(480, 240),
23
23
  delay: 0
24
- }), D = S({
24
+ }), I = T({
25
25
  loader: async () => (await g()).OrgStrategyDropdown
26
- }), n = "guido-edit-strategy-", a = b(), e = R(), { showToaster: i } = C(), s = T(null), c = T(!1), I = l(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: k.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
- h(() => e.assignStrategyDrawerStatus, (t) => {
26
+ }), i = "guido-edit-strategy-", a = L(), e = P(), { showToaster: c } = b(), s = w(null), m = "legacy", l = w(!1), x = n(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: R.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
+ k(() => e.assignStrategyDrawerStatus, (t) => {
28
28
  if (!t)
29
29
  return;
30
30
  const { strategyId: r } = e.recommendationConfigs;
31
- s.value = r || null, c.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
32
- i({
33
- type: d.Error,
31
+ s.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
32
+ c({
33
+ type: u.Error,
34
34
  message: a("discovery-strategy.error-description")
35
35
  });
36
36
  });
37
37
  });
38
- const y = (t) => {
39
- const r = v(t.updated_at || t.created_at);
38
+ const f = (t) => {
39
+ const r = O(t.updated_at || t.created_at);
40
40
  if (!r)
41
41
  return "";
42
- const o = P(r, B);
42
+ const o = M(r, N);
43
43
  return a("recommendation-strategy.last-updated-on", { value: o });
44
- }, x = l(() => e.strategies.map((t) => ({
44
+ }, S = n(() => ({
45
+ text: a("ds-steps.legacy-strategy"),
46
+ value: m,
47
+ hidden: !0
48
+ })), d = n(() => e.strategies.map((t) => ({
45
49
  text: t.name,
46
50
  value: t.strategy_id,
47
51
  infoBoxProps: {
@@ -49,15 +53,15 @@ const rt = /* @__PURE__ */ A({
49
53
  theme: "light",
50
54
  variant: "information",
51
55
  className: "assign-strategy-info-box",
52
- titleText: U(v(t.name)),
56
+ titleText: G(O(t.name)),
53
57
  descriptionStatus: !0,
54
- descriptionText: y(t),
55
- slot: N,
58
+ descriptionText: f(t),
59
+ slot: U,
56
60
  slotProps: { strategy: t },
57
61
  // The info box drops the option's value/text, so the id is the only channel
58
62
  // that can carry the strategy back to the click handler.
59
63
  buttonOptions: [{
60
- id: `${n}${t.strategy_id}`,
64
+ id: `${i}${t.strategy_id}`,
61
65
  text: a("eureka.edit-strategy"),
62
66
  type: "text",
63
67
  // Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
@@ -65,17 +69,17 @@ const rt = /* @__PURE__ */ A({
65
69
  icon: "line-open-website"
66
70
  }]
67
71
  }
68
- }))), E = (t) => {
69
- var f;
70
- const r = (f = t == null ? void 0 : t.id) != null && f.startsWith(n) ? t.id.slice(n.length) : "";
72
+ }))), A = n(() => e.isLegacyStrategyBlock ? [S.value, ...d.value] : d.value), h = (t) => {
73
+ var _;
74
+ const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
71
75
  if (!r)
72
76
  return;
73
- const o = e.currentRecommendationId, m = e.recommendationConfigs.strategyId === r;
74
- e.openStrategyEdit(r) && (String(s.value ?? "") === r && (s.value = null), m && (e.removeStrategy(), o !== null && _(o, "Removed recommendation strategy")));
75
- }, p = l(() => {
77
+ const o = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
78
+ e.openStrategyEdit(r) && (String(s.value ?? "") === r && (s.value = null), y && (e.removeStrategy(), o !== null && D(o, "Removed recommendation strategy")));
79
+ }, v = n(() => {
76
80
  const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
77
81
  return t ? { ...t, fallback_config: null } : null;
78
- }), O = l(() => ({
82
+ }), C = n(() => ({
79
83
  primaryButton: {
80
84
  styling: "solid",
81
85
  type: "primary",
@@ -87,37 +91,37 @@ const rt = /* @__PURE__ */ A({
87
91
  labelText: a("products.cancel")
88
92
  }
89
93
  }));
90
- return { __sfc: !0, loadOrganisms: g, skeleton: u, OrgStrategyDetailModal: w, OrgStrategyDropdown: D, EDIT_BUTTON_ID_PREFIX: n, trans: a, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: c, drawerDescription: I, lastUpdatedText: y, strategyOptions: x, onInfoBoxButtonClick: E, selectedStrategy: p, footerButtonGroupOptions: O, closeDrawer: () => {
94
+ return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: E, OrgStrategyDropdown: I, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: c, selectedStrategyId: s, LEGACY_OPTION_VALUE: m, showSelectionError: l, drawerDescription: x, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: d, strategyOptions: A, onInfoBoxButtonClick: h, selectedStrategy: v, footerButtonGroupOptions: C, closeDrawer: () => {
91
95
  e.closeAssignStrategyDrawer();
92
96
  }, assignStrategy: async () => {
93
- const t = p.value;
97
+ const t = v.value;
94
98
  if (!t) {
95
- c.value = !0;
99
+ l.value = !0;
96
100
  return;
97
101
  }
98
102
  let r = "";
99
103
  try {
100
104
  r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
101
- } catch (m) {
102
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", m);
105
+ } catch (y) {
106
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", y);
103
107
  }
104
108
  if (!r) {
105
- i({
106
- type: d.Error,
109
+ c({
110
+ type: u.Error,
107
111
  message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
108
112
  });
109
113
  return;
110
114
  }
111
115
  const o = e.currentRecommendationId;
112
- e.assignStrategy(t), i({
113
- type: d.Success,
116
+ e.assignStrategy(t), c({
117
+ type: u.Success,
114
118
  message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
115
- }), e.closeAssignStrategyDrawer(), o !== null && await _(o, "Assigned recommendation strategy");
119
+ }), e.closeAssignStrategyDrawer(), o !== null && await D(o, "Assigned recommendation strategy");
116
120
  }, onSelect: (t) => {
117
- s.value = t.value, c.value = !1;
121
+ s.value = t.value, l.value = !1;
118
122
  } };
119
123
  }
120
124
  });
121
125
  export {
122
- rt as default
126
+ st as default
123
127
  };
@@ -0,0 +1,18 @@
1
+ import s from "./LegacyStrategyUpdatedModal.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, a = t._self._c, e = t._self._setupProxy;
6
+ return e.store.legacyStrategyUpdatedModalStatus ? a("div", { staticClass: "legacy-strategy-updated-modal" }, [a(e.WpModal, { attrs: { id: "guido__legacy-strategy-updated-modal", size: "small", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("ds-steps.recommendation-strategy-migration-modal-title") }, on: { close: e.close, "primary-action": e.close } }, [a("p", [t._v(t._s(e.messageParts[0])), a("b", [t._v(t._s(e.strategyName))]), t._v(t._s(e.messageParts[1]))])])], 1) : t._e();
7
+ }, l = [], n = /* @__PURE__ */ o(
8
+ s,
9
+ r,
10
+ l,
11
+ !1,
12
+ null,
13
+ "da2225a1"
14
+ );
15
+ const m = n.exports;
16
+ export {
17
+ m as default
18
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as i, computed as s } from "vue";
2
+ import p from "../../../wrappers/WpModal.vue.js";
3
+ import { useTranslations as d } from "../../../../composables/useTranslations.js";
4
+ import { useRecommendationExtensionStore as g } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ const M = /* @__PURE__ */ i({
6
+ __name: "LegacyStrategyUpdatedModal",
7
+ setup(l) {
8
+ const e = d(), t = g(), n = s(() => ({
9
+ primaryButton: {
10
+ type: "primary",
11
+ labelText: e("action-builder.ok")
12
+ }
13
+ })), m = s(() => {
14
+ var r;
15
+ const { strategyId: a } = t.recommendationConfigs;
16
+ return ((r = t.assignedStrategy) == null ? void 0 : r.name) || `#${a}`;
17
+ }), o = "__STRATEGY_NAME__", c = s(() => e("email-editor.legacy-strategy-updated-message", { strategyName: o }).split(o));
18
+ return { __sfc: !0, trans: e, store: t, footerButtonOptions: n, strategyName: m, NAME_TOKEN: o, messageParts: c, close: () => {
19
+ t.closeLegacyStrategyUpdatedModal();
20
+ }, WpModal: p };
21
+ }
22
+ });
23
+ export {
24
+ M as default
25
+ };
@@ -1,41 +1,41 @@
1
- import { defineComponent as d, computed as a } from "vue";
2
- import g from "../../../wrappers/WpModal.vue.js";
1
+ import { defineComponent as p, computed as a } from "vue";
2
+ import d from "../../../wrappers/WpModal.vue.js";
3
3
  import { useToaster as l } from "../../../../composables/useToaster.js";
4
4
  import { useTranslations as y } from "../../../../composables/useTranslations.js";
5
5
  import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
6
6
  import { useRecommendationExtensionStore as f } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
7
  import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
8
8
  import { escapeHtml as T } from "../../../../utils/htmlEscape.js";
9
- const B = /* @__PURE__ */ d({
9
+ const B = /* @__PURE__ */ p({
10
10
  __name: "RemoveStrategyModal",
11
11
  setup(v) {
12
- const t = y(), e = f(), { showToaster: n } = l(), i = a(() => ({
12
+ const e = y(), t = f(), { showToaster: n } = l(), i = a(() => ({
13
13
  cancelOrBackButton: {
14
14
  type: "secondary",
15
- labelText: t("products.cancel"),
15
+ labelText: e("products.cancel"),
16
16
  styling: "ghost"
17
17
  },
18
18
  primaryButton: {
19
19
  type: "danger",
20
- labelText: t("discovery-strategy.remove")
20
+ labelText: e("discovery-strategy.remove")
21
21
  }
22
22
  })), m = a(() => {
23
- var o;
24
- const { strategyId: s } = e.recommendationConfigs;
25
- return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${s}`;
26
- }), r = "__STRATEGY_NAME__", p = a(() => t("email-editor.remove-strategy-confirm-message", { strategyName: r }).split(r)), c = () => {
27
- e.closeRemoveStrategyModal();
23
+ var s;
24
+ const { strategyId: o } = t.recommendationConfigs;
25
+ return o ? ((s = t.assignedStrategy) == null ? void 0 : s.name) || `#${o}` : e("ds-steps.legacy-strategy");
26
+ }), r = "__STRATEGY_NAME__", g = a(() => e("email-editor.remove-strategy-confirm-message", { strategyName: r }).split(r)), c = () => {
27
+ t.closeRemoveStrategyModal();
28
28
  };
29
- return { __sfc: !0, trans: t, store: e, showToaster: n, footerButtonOptions: i, strategyName: m, NAME_TOKEN: r, messageParts: p, close: c, handleConfirm: async () => {
30
- const s = m.value, o = e.currentRecommendationId;
31
- e.removeStrategy(), c(), n({
29
+ return { __sfc: !0, trans: e, store: t, showToaster: n, footerButtonOptions: i, strategyName: m, NAME_TOKEN: r, messageParts: g, close: c, handleConfirm: async () => {
30
+ const o = m.value, s = t.currentRecommendationId;
31
+ t.removeStrategy(), c(), n({
32
32
  type: u.Success,
33
33
  // The toast renders through a sanitizing v-html, so the name is escaped first.
34
- message: t("email-editor.strategy-removed-success", {
35
- strategyName: `<b>${T(s)}</b>`
34
+ message: e("email-editor.strategy-removed-success", {
35
+ strategyName: `<b>${T(o)}</b>`
36
36
  })
37
- }), o !== null && await _(o, "Removed recommendation strategy");
38
- }, WpModal: g };
37
+ }), s !== null && await _(s, "Removed recommendation strategy");
38
+ }, WpModal: d };
39
39
  }
40
40
  });
41
41
  export {
@@ -9,15 +9,15 @@ var u = function() {
9
9
  } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
10
10
  return t.executeSave(!1);
11
11
  } } })], 1);
12
- }, p = [], c = /* @__PURE__ */ d(
12
+ }, c = [], p = /* @__PURE__ */ d(
13
13
  l,
14
14
  u,
15
- p,
15
+ c,
16
16
  !1,
17
17
  null,
18
- "1ca6baf0"
18
+ "c61cc8ea"
19
19
  );
20
- const v = c.exports;
20
+ const v = p.exports;
21
21
  export {
22
22
  v as default
23
23
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, ref as l, computed as w } from "vue";
1
+ import { defineComponent as q, ref as n, computed as x } from "vue";
2
2
  import { useActionsApi as b } from "../../../composables/useActionsApi.js";
3
3
  import { useConfig as k } from "../../../composables/useConfig.js";
4
4
  import { useExport as B } from "../../../composables/useExport.js";
@@ -17,48 +17,46 @@ import { storeToRefs as Q } from "pinia";
17
17
  import U from "./MigrationConfirmModal.vue.js";
18
18
  const ft = /* @__PURE__ */ q({
19
19
  __name: "EditorActions",
20
- setup(W, { expose: x }) {
21
- const { config: m, isFeatureEnabled: c } = k(), { exportHtml: p } = B(), { save: u } = R(), { openVersionHistory: f, closeVersionHistory: d } = P(), { getCompiledEmail: v } = b(), { compileHtml: y } = L(), { validateLiquidSyntax: g } = j(), { handleError: r } = z(), e = G(), h = J(), { hasMigrations: H } = Q(h), s = I(), i = l(!1), a = l(!1), S = l(), V = D(), _ = () => {
20
+ setup(W, { expose: w }) {
21
+ const { config: l, isFeatureEnabled: m } = k(), { exportHtml: c } = B(), { save: p } = R(), { openVersionHistory: u, closeVersionHistory: f } = P(), { getCompiledEmail: d } = b(), { compileHtml: v } = L(), { validateLiquidSyntax: y } = j(), { handleError: r } = z(), e = G(), g = J(), { hasMigrations: S } = Q(g), s = I(), i = n(!1), a = n(!1), H = n(), h = D(), _ = () => {
22
22
  if (e.isVersionHistoryOpen) {
23
- d();
23
+ f();
24
24
  return;
25
25
  }
26
- f();
26
+ u();
27
27
  }, C = async () => {
28
- i.value = !0, await p(), i.value = !1;
28
+ i.value = !0, await c(), i.value = !1;
29
29
  }, A = () => {
30
30
  e.isSaveAsTemplateDrawerOpen = !0;
31
- }, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
31
+ }, M = x(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = x(
32
32
  () => {
33
33
  var t, o;
34
- return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
+ return ((o = (t = l.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
35
  }
36
- ), E = async (t) => {
36
+ ), V = async (t) => {
37
37
  a.value = !0, t || (e.loadingStatus = !0);
38
38
  let o;
39
39
  try {
40
- o = await u(t);
41
- } catch (n) {
42
- if (t)
43
- throw n;
44
- r(n, "Failed to save template");
40
+ o = await p(t);
41
+ } catch (T) {
42
+ r(T, "Failed to save template");
45
43
  } finally {
46
44
  a.value = !1, !t && !o && (e.loadingStatus = !1);
47
45
  }
48
46
  return o;
49
- }, T = (t) => {
47
+ }, E = (t) => {
50
48
  var o;
51
- if (!t && H.value) {
52
- (o = S.value) == null || o.open();
49
+ if (!t && S.value) {
50
+ (o = H.value) == null || o.open();
53
51
  return;
54
52
  }
55
- return E(t);
53
+ return V(t);
56
54
  }, F = async () => {
57
- if (c("liquidSyntax")) {
55
+ if (m("liquidSyntax")) {
58
56
  e.loadingStatus = !0;
59
57
  try {
60
- const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
61
- if (!await g(o))
58
+ const { html: t } = await d({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = v(t);
59
+ if (!await y(o))
62
60
  return;
63
61
  } catch (t) {
64
62
  r(t, "Failed to prepare test email");
@@ -67,11 +65,11 @@ const ft = /* @__PURE__ */ q({
67
65
  e.loadingStatus = !1;
68
66
  }
69
67
  }
70
- V();
68
+ h();
71
69
  };
72
- return x({
73
- handleSave: T
74
- }), { __sfc: !0, config: m, isFeatureEnabled: c, exportHtml: p, save: u, openVersionHistory: f, closeVersionHistory: d, getCompiledEmail: v, compileHtml: y, validateLiquidSyntax: g, handleError: r, editorStore: e, templateStore: h, hasMigrations: H, trans: s, isExporting: i, isSaving: a, migrationModalRef: S, testEmailClick: V, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: E, handleSave: T, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
70
+ return w({
71
+ handleSave: E
72
+ }), { __sfc: !0, config: l, isFeatureEnabled: m, exportHtml: c, save: p, openVersionHistory: u, closeVersionHistory: f, getCompiledEmail: d, compileHtml: v, validateLiquidSyntax: y, handleError: r, editorStore: e, templateStore: g, hasMigrations: S, trans: s, isExporting: i, isSaving: a, migrationModalRef: H, testEmailClick: h, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: V, handleSave: E, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
75
73
  }
76
74
  });
77
75
  export {
@@ -1,28 +1,30 @@
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 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({
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({
14
15
  __name: "OnboardingWrapper",
15
16
  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 },
19
- { type: "genericOnboarding", component: v },
20
- { type: "textBlockOnboarding", component: h },
21
- { type: "versionHistoryOnboarding", component: w },
22
- { 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)));
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)));
26
28
  return O(async () => {
27
29
  await o.fetchUserModalState();
28
30
  }), t(
@@ -31,7 +33,7 @@ const N = /* @__PURE__ */ b({
31
33
  n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
32
34
  }
33
35
  ), t(
34
- () => s.emailFormat,
36
+ () => a.emailFormat,
35
37
  (n, i) => {
36
38
  i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
37
39
  }
@@ -40,9 +42,9 @@ const N = /* @__PURE__ */ b({
40
42
  (n) => {
41
43
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
42
44
  }
43
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
45
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
44
46
  }
45
47
  });
46
48
  export {
47
- N as default
49
+ U as default
48
50
  };
@@ -0,0 +1,21 @@
1
+ import s from "./RecommendationLegacyStrategyOnboarding.vue2.js";
2
+ /* empty css */
3
+ import c from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var d = function() {
5
+ var t, n, r, a, i;
6
+ var o = this, g = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? g(e.InOnboard, { key: "guido__recommendation-legacy-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (t = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__recommendation-legacy-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": e.onboardingStore.onboardings.recommendationLegacyStrategyOnboarding.config, "pointer-position": (r = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (a = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : a.right, "top-position": (i = e.onboardingStore.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : i.top }, on: { close: function(p) {
8
+ return e.onboardingStore.close(e.ONBOARDING_TYPE);
9
+ }, nextButtonClick: e.handleNext } }) : o._e();
10
+ }, m = [], l = /* @__PURE__ */ c(
11
+ s,
12
+ d,
13
+ m,
14
+ !1,
15
+ null,
16
+ "19d8cb42"
17
+ );
18
+ const f = l.exports;
19
+ export {
20
+ f as default
21
+ };
@@ -0,0 +1,46 @@
1
+ import { defineComponent as d, computed as g, watch as l } from "vue";
2
+ import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as u } from "../../../enums/academy.js";
5
+ import { useOnboardingStore as y } from "../../../stores/onboarding.js";
6
+ import { InOnboard as f } from "@useinsider/design-system-vue";
7
+ const A = /* @__PURE__ */ d({
8
+ __name: "RecommendationLegacyStrategyOnboarding",
9
+ setup(O) {
10
+ const n = "recommendationLegacyStrategyOnboarding", o = p(), t = y(), { getTopPosition: i } = b(), r = `<a href="${u.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${o("action-builder.visit-academy")}</a>`, a = () => [
11
+ {
12
+ classes: "guido-recommendation-legacy-strategy-onboarding",
13
+ right: "40px",
14
+ top: i(485),
15
+ position: "Top Right",
16
+ title: o("email-editor.onboarding-recommendation-strategy-legacy-title"),
17
+ description: o("email-editor.onboarding-recommendation-strategy-legacy-description", {
18
+ academyLink: r
19
+ }),
20
+ imageSource: "",
21
+ backButtonClick: () => {
22
+ },
23
+ nextButtonType: "text",
24
+ nextButtonText: o("action-builder.ok"),
25
+ nextButtonClick: () => {
26
+ t.close(n);
27
+ }
28
+ }
29
+ ], s = g(
30
+ () => t.onboardings.recommendationLegacyStrategyOnboarding.config.length > 0 && t.onboardings.recommendationLegacyStrategyOnboarding.isActive
31
+ ), m = () => {
32
+ var e, c;
33
+ (c = (e = t.getRecommendationLegacyStrategyCurrentCard) == null ? void 0 : e.nextButtonClick) == null || c.call(e);
34
+ };
35
+ return l(
36
+ () => t.isActive(n),
37
+ (e) => {
38
+ e && t.setConfig(n, a());
39
+ },
40
+ { immediate: !0 }
41
+ ), { __sfc: !0, ONBOARDING_TYPE: n, trans: o, onboardingStore: t, getTopPosition: i, academyLink: r, buildOnboardingCards: a, isVisible: s, handleNext: m, InOnboard: f };
42
+ }
43
+ });
44
+ export {
45
+ A as default
46
+ };