@useinsider/guido 3.18.2-beta.eedafd2 → 3.18.2-beta.f42547e

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 (80) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +26 -28
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +70 -72
  5. package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  7. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +70 -51
  8. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
  9. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  10. package/dist/components/organisms/header/EditorActions.vue2.js +56 -86
  11. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  12. package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
  13. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
  14. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  15. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  16. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  17. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  18. package/dist/composables/useCustomInterfaceAppearance.js +56 -46
  19. package/dist/composables/useHtmlCompiler.js +26 -37
  20. package/dist/composables/useHtmlValidator.js +84 -81
  21. package/dist/composables/useRecommendation.js +40 -35
  22. package/dist/composables/useSave.js +45 -90
  23. package/dist/composables/useStripo.js +30 -30
  24. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  25. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  26. package/dist/enums/extensions/recommendationBlock.js +38 -31
  27. package/dist/extensions/Blocks/Recommendation/block.js +43 -39
  28. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  29. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +40 -35
  30. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
  31. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  32. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +181 -89
  33. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  34. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  35. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  36. package/dist/guido.css +1 -1
  37. package/dist/src/@types/config/schemas.d.ts +0 -4
  38. package/dist/src/components/Guido.vue.d.ts +1 -17
  39. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  40. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  41. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  42. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  43. package/dist/src/composables/useConfig.d.ts +0 -2
  44. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  45. package/dist/src/composables/useSave.d.ts +1 -6
  46. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  47. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  48. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  49. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  50. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  51. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  52. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
  53. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  54. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +73 -3
  55. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  56. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  57. package/dist/src/stores/config.d.ts +0 -30
  58. package/dist/src/stores/onboarding.d.ts +377 -0
  59. package/dist/src/utils/templatePreparation.d.ts +0 -30
  60. package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
  61. package/dist/static/styles/components/skeleton.css.js +23 -0
  62. package/dist/stores/config.js +22 -39
  63. package/dist/stores/onboarding.js +41 -36
  64. package/dist/utils/genericUtil.js +61 -64
  65. package/dist/utils/templatePreparation.js +49 -52
  66. package/package.json +1 -1
  67. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  68. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  69. package/dist/composables/useSaveValidation.js +0 -279
  70. package/dist/composables/useSaveValidationRollout.js +0 -9
  71. package/dist/enums/save-validation.js +0 -4
  72. package/dist/src/@types/save-validation.d.ts +0 -19
  73. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  74. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  75. package/dist/src/enums/save-validation.d.ts +0 -27
  76. package/dist/src/stores/save-validation.d.ts +0 -22
  77. package/dist/src/utils/liquidDynamicContent.d.ts +0 -20
  78. package/dist/stores/save-validation.js +0 -30
  79. package/dist/utils/liquidDynamicContent.js +0 -15
  80. /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
@@ -1,48 +1,47 @@
1
- import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
1
+ import { defineComponent as A, defineAsyncComponent as S, ref as T, computed as g, watch as h } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as x } from "../../../../composables/useToaster.js";
4
- import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
- import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import B from "./StrategyInfoBoxContent.vue.js";
10
- import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
- import { asText as f } from "../../../../utils/genericUtil.js";
12
- import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
- import { InSkeleton as b } from "@useinsider/design-system-vue";
14
- const W = /* @__PURE__ */ v({
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({
15
16
  __name: "AssignStrategyDrawer",
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),
17
+ setup(M) {
18
+ const m = () => import("@useinsider/design-system-organisms"), u = (t, r) => ({
19
+ render: (a) => a(L, { props: { sizing: { width: t, height: r } } })
20
+ }), w = S({
21
+ loader: async () => (await m()).OrgStrategyDetailModal,
22
+ loadingComponent: u(480, 240),
22
23
  delay: 0
23
- }), T = y({
24
- loader: async () => (await c()).OrgStrategyDropdown,
25
- loadingComponent: g(240, 42),
26
- delay: 0
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) => {
24
+ }), D = S({
25
+ loader: async () => (await m()).OrgStrategyDropdown
26
+ }), n = "guido-edit-strategy-", o = b(), e = R(), { showToaster: i } = C(), s = T(null), c = T(!1), I = g(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: k.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
+ h(() => e.assignStrategyDrawerStatus, (t) => {
29
28
  if (!t)
30
29
  return;
31
30
  const { strategyId: r } = e.recommendationConfigs;
32
- n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
- s({
34
- type: m.Error,
31
+ s.value = r || null, c.value = !1, e.fetchStrategies().catch(() => {
32
+ i({
33
+ type: d.Error,
35
34
  message: o("discovery-strategy.error-description")
36
35
  });
37
36
  });
38
37
  });
39
- const p = (t) => {
40
- const r = f(t.updated_at || t.created_at);
38
+ const y = (t) => {
39
+ const r = v(t.updated_at || t.created_at);
41
40
  if (!r)
42
41
  return "";
43
- const a = I(r, E);
42
+ const a = P(r, B);
44
43
  return o("recommendation-strategy.last-updated-on", { value: a });
45
- }, D = l(() => e.strategies.map((t) => ({
44
+ }, x = g(() => e.strategies.map((t) => ({
46
45
  text: t.name,
47
46
  value: t.strategy_id,
48
47
  infoBoxProps: {
@@ -50,16 +49,35 @@ const W = /* @__PURE__ */ v({
50
49
  theme: "light",
51
50
  variant: "information",
52
51
  className: "assign-strategy-info-box",
53
- titleText: N(f(t.name)),
52
+ titleText: U(v(t.name)),
54
53
  descriptionStatus: !0,
55
- descriptionText: p(t),
56
- slot: B,
57
- slotProps: { strategy: t }
54
+ descriptionText: y(t),
55
+ slot: N,
56
+ slotProps: { strategy: t },
57
+ // The info box drops the option's value/text, so the id is the only channel
58
+ // that can carry the strategy back to the click handler.
59
+ buttonOptions: [{
60
+ id: `${n}${t.strategy_id}`,
61
+ text: o("eureka.edit-strategy"),
62
+ type: "text",
63
+ // Resolved from Guido's own public/sprite.svg by InIcons; an unknown name would
64
+ // silently render blank space instead of failing.
65
+ icon: "line-open-website"
66
+ }]
58
67
  }
59
- }))), d = l(() => {
60
- const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
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) : "";
71
+ if (!r)
72
+ return;
73
+ const a = e.currentRecommendationId;
74
+ String(s.value ?? "") === r && (s.value = null);
75
+ const l = e.recommendationConfigs.strategyId === r;
76
+ l && e.removeStrategy(), e.openStrategyEdit(r), l && a !== null && _(a, "Removed recommendation strategy");
77
+ }, p = g(() => {
78
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
61
79
  return t ? { ...t, fallback_config: null } : null;
62
- }), w = l(() => ({
80
+ }), O = g(() => ({
63
81
  primaryButton: {
64
82
  styling: "solid",
65
83
  type: "primary",
@@ -71,36 +89,37 @@ const W = /* @__PURE__ */ v({
71
89
  labelText: o("products.cancel")
72
90
  }
73
91
  }));
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: () => {
92
+ return { __sfc: !0, loadOrganisms: m, skeleton: u, OrgStrategyDetailModal: w, OrgStrategyDropdown: D, EDIT_BUTTON_ID_PREFIX: n, trans: o, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: c, drawerDescription: I, lastUpdatedText: y, strategyOptions: x, onInfoBoxButtonClick: E, selectedStrategy: p, footerButtonGroupOptions: O, closeDrawer: () => {
75
93
  e.closeAssignStrategyDrawer();
76
94
  }, assignStrategy: async () => {
77
- const t = d.value;
95
+ const t = p.value;
78
96
  if (!t) {
79
- i.value = !0;
97
+ c.value = !0;
80
98
  return;
81
99
  }
82
100
  let r = "";
83
101
  try {
84
102
  r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
85
- } catch (a) {
86
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
103
+ } catch (l) {
104
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", l);
87
105
  }
88
106
  if (!r) {
89
- s({
90
- type: m.Error,
107
+ i({
108
+ type: d.Error,
91
109
  message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
92
110
  });
93
111
  return;
94
112
  }
95
- e.assignStrategy(t), s({
96
- type: m.Success,
113
+ const a = e.currentRecommendationId;
114
+ e.assignStrategy(t), i({
115
+ type: d.Success,
97
116
  message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
98
- }), e.closeAssignStrategyDrawer();
117
+ }), e.closeAssignStrategyDrawer(), a !== null && await _(a, "Assigned recommendation strategy");
99
118
  }, onSelect: (t) => {
100
- n.value = t.value, i.value = !1;
119
+ s.value = t.value, c.value = !1;
101
120
  } };
102
121
  }
103
122
  });
104
123
  export {
105
- W as default
124
+ rt as default
106
125
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as u, computed as n } from "vue";
2
- import y from "../../../wrappers/WpModal.vue.js";
3
- import { useToaster as f } from "../../../../composables/useToaster.js";
4
- import { useTranslations as _ } from "../../../../composables/useTranslations.js";
5
- import { ToasterTypeOptions as v } from "../../../../enums/toaster.js";
6
- import { useRecommendationExtensionStore as T } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
- import { commitBlockChangeOutsidePanel as h } from "../../../../extensions/Blocks/Recommendation/utils/nodeConfigWriter.js";
8
- import { escapeHtml as R } from "../../../../utils/htmlEscape.js";
9
- const P = /* @__PURE__ */ u({
1
+ import { defineComponent as d, computed as a } from "vue";
2
+ import g from "../../../wrappers/WpModal.vue.js";
3
+ import { useToaster as l } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as y } from "../../../../composables/useTranslations.js";
5
+ import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
6
+ import { useRecommendationExtensionStore as f } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
+ import { commitStrategyChange as _ } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
8
+ import { escapeHtml as T } from "../../../../utils/htmlEscape.js";
9
+ const B = /* @__PURE__ */ d({
10
10
  __name: "RemoveStrategyModal",
11
- setup(S) {
12
- const t = _(), e = T(), { showToaster: a } = f(), i = n(() => ({
11
+ setup(v) {
12
+ const t = y(), e = f(), { showToaster: n } = l(), i = a(() => ({
13
13
  cancelOrBackButton: {
14
14
  type: "secondary",
15
15
  labelText: t("products.cancel"),
@@ -19,39 +19,25 @@ const P = /* @__PURE__ */ u({
19
19
  type: "danger",
20
20
  labelText: t("discovery-strategy.remove")
21
21
  }
22
- })), m = n(() => {
22
+ })), m = a(() => {
23
23
  var o;
24
- const { strategyId: r } = e.recommendationConfigs;
25
- return ((o = e.assignedStrategy) == null ? void 0 : o.name) || `#${r}`;
26
- }), s = "__STRATEGY_NAME__", d = n(() => t("email-editor.remove-strategy-confirm-message", { strategyName: s }).split(s)), c = () => {
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
27
  e.closeRemoveStrategyModal();
28
28
  };
29
- return { __sfc: !0, trans: t, store: e, showToaster: a, footerButtonOptions: i, strategyName: m, NAME_TOKEN: s, messageParts: d, close: c, handleConfirm: async () => {
30
- const r = m.value, o = e.currentRecommendationId;
31
- e.removeStrategy(), c();
32
- const { strategyId: l, size: g } = e.recommendationConfigs;
33
- if (a({
34
- type: v.Success,
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({
32
+ type: u.Success,
35
33
  // The toast renders through a sanitizing v-html, so the name is escaped first.
36
34
  message: t("email-editor.strategy-removed-success", {
37
- strategyName: `<b>${R(r)}</b>`
35
+ strategyName: `<b>${T(s)}</b>`
38
36
  })
39
- }), o !== null) {
40
- try {
41
- await e.fetchRecommendationProducts();
42
- } catch (p) {
43
- console.error("[RemoveStrategyModal] product refetch failed", p);
44
- }
45
- h(
46
- o,
47
- { strategyId: l, size: g },
48
- e.recommendationProducts,
49
- "Removed recommendation strategy"
50
- );
51
- }
52
- }, WpModal: y };
37
+ }), o !== null && await _(o, "Removed recommendation strategy");
38
+ }, WpModal: g };
53
39
  }
54
40
  });
55
41
  export {
56
- P as default
42
+ B as default
57
43
  };
@@ -4,7 +4,7 @@ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var u = function() {
5
5
  var s, i, n, a;
6
6
  var o = this, e = o._self._c, t = o._self._setupProxy;
7
- return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(r) {
7
+ return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(r) {
8
8
  return t.handleSave(!1);
9
9
  } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
10
10
  return t.executeSave(!1);
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "f938f128"
18
+ "1ca6baf0"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,109 +1,79 @@
1
- import { defineComponent as D, computed as u, ref as c } from "vue";
2
- import { useActionsApi as z } from "../../../composables/useActionsApi.js";
3
- import { useConfig as I } from "../../../composables/useConfig.js";
4
- import { useExport as P } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as W } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as j } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as G } from "../../../composables/useSave.js";
8
- import { useSaveValidation as J } from "../../../composables/useSaveValidation.js";
9
- import { useSaveValidationRollout as K } from "../../../composables/useSaveValidationRollout.js";
10
- import { useToaster as N } from "../../../composables/useToaster.js";
11
- import { useTranslations as Q } from "../../../composables/useTranslations.js";
12
- import { useVersionHistoryApi as U } from "../../../composables/useVersionHistoryApi.js";
13
- import { useLiquidValidator as X } from "../../../composables/validators/useLiquidValidator.js";
14
- import { ToasterTypeOptions as Y } from "../../../enums/toaster.js";
15
- import { useConfigStore as Z } from "../../../stores/config.js";
16
- import { useEditorStore as $ } from "../../../stores/editor.js";
17
- import { useSaveValidationStore as tt } from "../../../stores/save-validation.js";
18
- import { useTemplateStore as et } from "../../../stores/template.js";
19
- import { getTooltipOptions as ot } from "../../../utils/tooltipUtils.js";
20
- import { InButtonV2 as rt } from "@useinsider/design-system-vue";
21
- import { storeToRefs as it } from "pinia";
22
- import at from "./MigrationConfirmModal.vue.js";
23
- const Ot = /* @__PURE__ */ D({
1
+ import { defineComponent as q, ref as l, computed as w } from "vue";
2
+ import { useActionsApi as b } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as k } from "../../../composables/useConfig.js";
4
+ import { useExport as B } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as R } from "../../../composables/useSave.js";
8
+ import { useToaster as z } from "../../../composables/useToaster.js";
9
+ import { useTranslations as I } from "../../../composables/useTranslations.js";
10
+ import { useVersionHistoryApi as P } from "../../../composables/useVersionHistoryApi.js";
11
+ import { useLiquidValidator as j } from "../../../composables/validators/useLiquidValidator.js";
12
+ import { useEditorStore as G } from "../../../stores/editor.js";
13
+ import { useTemplateStore as J } from "../../../stores/template.js";
14
+ import { getTooltipOptions as K } from "../../../utils/tooltipUtils.js";
15
+ import { InButtonV2 as N } from "@useinsider/design-system-vue";
16
+ import { storeToRefs as Q } from "pinia";
17
+ import U from "./MigrationConfirmModal.vue.js";
18
+ const ft = /* @__PURE__ */ q({
24
19
  __name: "EditorActions",
25
- setup(st, { expose: M }) {
26
- const { config: p, isFeatureEnabled: f } = I(), { exportHtml: d } = P(), { save: v } = G(), { validateCurrentTemplate: y } = J(), { isEnabled: i } = K(), { showToaster: S, handleError: a } = N(), { openVersionHistory: g, closeVersionHistory: h } = U(), { getCompiledEmail: V } = z(), { compileHtml: w } = j(), { validateLiquidSyntax: T } = X(), E = Z(), o = $(), H = tt(), x = et(), { hasMigrations: C } = it(x), r = Q(), b = u(() => i.value && E.allowSaveWithErrors ? r("email-editor.save-and-continue") : "Save"), s = c(!1), n = c(!1), _ = c(), l = W(), k = () => {
27
- if (o.isVersionHistoryOpen) {
28
- h();
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(), _ = () => {
22
+ if (e.isVersionHistoryOpen) {
23
+ d();
29
24
  return;
30
25
  }
31
- g();
32
- }, F = async () => {
33
- s.value = !0, await d(), s.value = !1;
34
- }, q = () => {
35
- o.isSaveAsTemplateDrawerOpen = !0;
36
- }, B = u(() => o.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), L = u(
26
+ f();
27
+ }, C = async () => {
28
+ i.value = !0, await p(), i.value = !1;
29
+ }, A = () => {
30
+ e.isSaveAsTemplateDrawerOpen = !0;
31
+ }, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
37
32
  () => {
38
- var t, e;
39
- return ((e = (t = p.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
33
+ var t, o;
34
+ return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
40
35
  }
41
- ), A = async (t) => {
42
- n.value = !0, t || (o.loadingStatus = !0);
43
- let e;
36
+ ), E = async (t) => {
37
+ a.value = !0, t || (e.loadingStatus = !0);
38
+ let o;
44
39
  try {
45
- e = await v(t);
46
- } catch (m) {
40
+ o = await u(t);
41
+ } catch (n) {
47
42
  if (t)
48
- throw m;
49
- a(m, "Failed to save template");
43
+ throw n;
44
+ r(n, "Failed to save template");
50
45
  } finally {
51
- n.value = !1, !t && !e && (o.loadingStatus = !1);
46
+ a.value = !1, !t && !o && (e.loadingStatus = !1);
52
47
  }
53
- return e;
54
- }, O = (t) => {
55
- var e;
56
- if (!t && C.value) {
57
- (e = _.value) == null || e.open();
48
+ return o;
49
+ }, T = (t) => {
50
+ var o;
51
+ if (!t && H.value) {
52
+ (o = S.value) == null || o.open();
58
53
  return;
59
54
  }
60
- return A(t);
61
- }, R = async () => {
62
- if (i.value) {
63
- o.loadingStatus = !0;
64
- let t = [];
65
- try {
66
- t = await y();
67
- } catch (e) {
68
- console.warn("Test-path validation failed; sending without the drawer.", e);
69
- } finally {
70
- o.loadingStatus = !1;
71
- }
72
- if (t.length) {
73
- S({
74
- type: Y.Error,
75
- message: r("email-editor.validation-errors-found"),
76
- actionButton: {
77
- text: r("email-editor.check-errors"),
78
- onClick: () => H.open(t, "test")
79
- },
80
- autoHide: !1
81
- });
82
- return;
83
- }
84
- l();
85
- return;
86
- }
87
- if (f("liquidSyntax")) {
88
- o.loadingStatus = !0;
55
+ return E(t);
56
+ }, F = async () => {
57
+ if (c("liquidSyntax")) {
58
+ e.loadingStatus = !0;
89
59
  try {
90
- const { html: t } = await V({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = w(t);
91
- if (!await T(e))
60
+ const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
61
+ if (!await g(o))
92
62
  return;
93
63
  } catch (t) {
94
- a(t, "Failed to prepare test email");
64
+ r(t, "Failed to prepare test email");
95
65
  return;
96
66
  } finally {
97
- o.loadingStatus = !1;
67
+ e.loadingStatus = !1;
98
68
  }
99
69
  }
100
- l();
70
+ V();
101
71
  };
102
- return M({
103
- handleSave: O
104
- }), { __sfc: !0, config: p, isFeatureEnabled: f, exportHtml: d, save: v, validateCurrentTemplate: y, isEnabled: i, showToaster: S, handleError: a, openVersionHistory: g, closeVersionHistory: h, getCompiledEmail: V, compileHtml: w, validateLiquidSyntax: T, configStore: E, editorStore: o, saveValidationStore: H, templateStore: x, hasMigrations: C, trans: r, saveLabel: b, isExporting: s, isSaving: n, migrationModalRef: _, testEmailClick: l, handleVersionHistory: k, handleExport: F, handleSaveAs: q, versionHistoryTooltipText: B, isVersionHistoryButtonVisible: L, executeSave: A, handleSave: O, handleTestEmail: R, getTooltipOptions: ot, InButtonV2: rt, MigrationConfirmModal: at };
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 };
105
75
  }
106
76
  });
107
77
  export {
108
- Ot as default
78
+ ft as default
109
79
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
6
6
  return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
7
- }, i = [], r = /* @__PURE__ */ n(
7
+ }, i = [], r = /* @__PURE__ */ a(
8
8
  o,
9
- a,
9
+ n,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "b8f24f34"
13
+ "73199fa4"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,19 +1,19 @@
1
- import { defineComponent as m, computed as p, ref as d } from "vue";
1
+ import { defineComponent as l, computed as p, ref as d } from "vue";
2
2
  import { useConfig as k } from "../../../composables/useConfig.js";
3
3
  import { useBack as B } from "../../../composables/useGuidoActions.js";
4
4
  import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
5
5
  import { useTranslations as v } from "../../../composables/useTranslations.js";
6
6
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as y } from "../../../stores/editor.js";
7
+ import { useEditorStore as V } from "../../../stores/editor.js";
8
8
  import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
- import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
- const D = /* @__PURE__ */ m({
9
+ import { useDebounceFn as y } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ l({
11
11
  __name: "LeftSlot",
12
12
  setup(C) {
13
- const e = y(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), l = p(() => {
14
- var u, f;
15
- return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (f = (u = t.value) == null ? void 0 : u.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
- }), r = d(!1), a = () => {
13
+ const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f = p(() => {
14
+ var u, m;
15
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
16
+ }), r = d(!1), c = () => {
17
17
  if (e.isVersionHistoryOpen) {
18
18
  n();
19
19
  return;
@@ -23,15 +23,11 @@ const D = /* @__PURE__ */ m({
23
23
  return;
24
24
  }
25
25
  i();
26
- }, c = V(async () => {
27
- try {
28
- await a();
29
- } finally {
30
- r.value = !1;
31
- }
26
+ }, a = y(() => {
27
+ c(), r.value = !1;
32
28
  }, 500);
33
- return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: l, isBackButtonDisabled: r, executeBackAction: a, debouncedBackAction: c, handleBackClick: () => {
34
- r.value = !0, c();
29
+ return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
30
+ r.value = !0, a();
35
31
  }, InButtonV2: w };
36
32
  }
37
33
  });
@@ -1,26 +1,28 @@
1
1
  import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
2
  import u from "./AMPOnboarding.vue.js";
3
3
  import v from "./GenericOnboarding.vue.js";
4
- import l from "./ItemsOnboarding.vue.js";
5
- import y from "./NewVersionPopup.vue.js";
6
- import S from "./TextBlockOnboarding.vue.js";
7
- import h from "./VersionHistoryOnboarding.vue.js";
8
- import { usePartner as w } from "../../../composables/usePartner.js";
9
- import { useEditorStore as P } from "../../../stores/editor.js";
10
- import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
- import { usePreviewStore as A } from "../../../stores/preview.js";
12
- const G = /* @__PURE__ */ b({
4
+ import y from "./ItemsOnboarding.vue.js";
5
+ import l from "./NewVersionPopup.vue.js";
6
+ import S from "./RecommendationStrategyOnboarding.vue.js";
7
+ import h from "./TextBlockOnboarding.vue.js";
8
+ import w from "./VersionHistoryOnboarding.vue.js";
9
+ import { usePartner as P } from "../../../composables/usePartner.js";
10
+ import { useEditorStore as _ } from "../../../stores/editor.js";
11
+ import { useOnboardingStore as A } from "../../../stores/onboarding.js";
12
+ import { usePreviewStore as H } from "../../../stores/preview.js";
13
+ const N = /* @__PURE__ */ b({
13
14
  __name: "OnboardingWrapper",
14
15
  emits: ["onboarding-finished"],
15
- setup(H, { emit: f }) {
16
- const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
- { type: "newVersionPopup", component: y },
16
+ setup(M, { emit: g }) {
17
+ const o = A(), r = _(), s = H(), { isTestPartner: a } = P(), m = e(() => r.isStripoInitialized), p = e(() => a()), d = [
18
+ { type: "newVersionPopup", component: l },
18
19
  { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
20
+ { type: "textBlockOnboarding", component: h },
21
+ { type: "versionHistoryOnboarding", component: w },
21
22
  { type: "ampOnboarding", component: u },
22
- { type: "itemsOnboarding", component: l }
23
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
23
+ { type: "itemsOnboarding", component: y },
24
+ { type: "recommendationStrategyOnboarding", component: S }
25
+ ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => d.filter((n) => c(n.type)));
24
26
  return O(async () => {
25
27
  await o.fetchUserModalState();
26
28
  }), t(
@@ -38,9 +40,9 @@ const G = /* @__PURE__ */ b({
38
40
  (n) => {
39
41
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
42
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
43
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
42
44
  }
43
45
  });
44
46
  export {
45
- G as default
47
+ N as default
46
48
  };
@@ -0,0 +1,21 @@
1
+ import d from "./RecommendationStrategyOnboarding.vue2.js";
2
+ /* empty css */
3
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var m = function() {
5
+ var e, n, r, i, a;
6
+ var t = this, s = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? s(o.InOnboard, { key: "guido__recommendation-strategy-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__recommendation-strategy-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "left-position": (n = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : n.left, "pages-config": o.onboardingStore.onboardings.recommendationStrategyOnboarding.config, "pointer-position": (r = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : r.position, "right-position": (i = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : i.right, "top-position": (a = o.onboardingStore.getRecommendationStrategyCurrentCard) == null ? void 0 : a.top }, on: { close: function(p) {
8
+ return o.onboardingStore.close(o.ONBOARDING_TYPE);
9
+ }, nextButtonClick: o.handleNext } }) : t._e();
10
+ }, c = [], _ = /* @__PURE__ */ g(
11
+ d,
12
+ m,
13
+ c,
14
+ !1,
15
+ null,
16
+ "ec2027ff"
17
+ );
18
+ const S = _.exports;
19
+ export {
20
+ S as default
21
+ };