@useinsider/guido 3.18.1-beta.e39fb14 → 3.18.1-beta.e489d08

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 (67) 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 +65 -53
  8. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  9. package/dist/components/organisms/header/EditorActions.vue2.js +56 -86
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
  12. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
  13. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  14. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  15. package/dist/components/wrappers/WpDrawer.vue.js +7 -9
  16. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  17. package/dist/composables/useCustomInterfaceAppearance.js +46 -41
  18. package/dist/composables/useHtmlCompiler.js +26 -37
  19. package/dist/composables/useHtmlValidator.js +84 -81
  20. package/dist/composables/useRecommendation.js +21 -18
  21. package/dist/composables/useSave.js +45 -90
  22. package/dist/composables/useStripo.js +7 -7
  23. package/dist/composables/validators/useCouponBlockValidator.js +21 -24
  24. package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
  25. package/dist/enums/extensions/recommendationBlock.js +38 -31
  26. package/dist/extensions/Blocks/Recommendation/block.js +43 -39
  27. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +62 -57
  28. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +80 -52
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +145 -75
  30. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  31. package/dist/guido.css +1 -1
  32. package/dist/src/@types/config/schemas.d.ts +0 -4
  33. package/dist/src/components/Guido.vue.d.ts +1 -17
  34. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
  35. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
  36. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
  37. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
  38. package/dist/src/composables/useConfig.d.ts +0 -2
  39. package/dist/src/composables/useHtmlValidator.d.ts +0 -21
  40. package/dist/src/composables/useSave.d.ts +1 -6
  41. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
  42. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
  43. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  44. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  45. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
  46. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +59 -3
  47. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  48. package/dist/src/stores/config.d.ts +0 -30
  49. package/dist/src/stores/onboarding.d.ts +377 -0
  50. package/dist/src/utils/templatePreparation.d.ts +0 -30
  51. package/dist/static/styles/components/recommendation-strategy.css.js +51 -4
  52. package/dist/stores/config.js +22 -39
  53. package/dist/stores/onboarding.js +41 -36
  54. package/dist/utils/templatePreparation.js +47 -50
  55. package/package.json +1 -1
  56. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
  57. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
  58. package/dist/composables/useSaveValidation.js +0 -279
  59. package/dist/composables/useSaveValidationRollout.js +0 -9
  60. package/dist/enums/save-validation.js +0 -4
  61. package/dist/src/@types/save-validation.d.ts +0 -19
  62. package/dist/src/composables/useSaveValidation.d.ts +0 -6
  63. package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
  64. package/dist/src/enums/save-validation.d.ts +0 -27
  65. package/dist/src/stores/save-validation.d.ts +0 -22
  66. package/dist/stores/save-validation.js +0 -30
  67. /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
@@ -1,48 +1,46 @@
1
- import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
1
+ import { defineComponent as E, defineAsyncComponent as y, ref as f, computed as c, watch as O } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as x } from "../../../../composables/useToaster.js";
3
+ import { useToaster as h } from "../../../../composables/useToaster.js";
4
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";
5
+ import { DOTTED_DATE_LOCALE as I } from "../../../../enums/date.js";
6
+ import { URLS as C } from "../../../../enums/extensions/recommendationBlock.js";
7
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({
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({
15
15
  __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),
22
- delay: 0
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 } } })
23
19
  }), T = y({
24
- loader: async () => (await c()).OrgStrategyDropdown,
25
- loadingComponent: g(240, 42),
20
+ loader: async () => (await g()).OrgStrategyDetailModal,
21
+ loadingComponent: d(480, 240),
26
22
  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) => {
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) => {
29
27
  if (!t)
30
28
  return;
31
- const { strategyId: r } = e.recommendationConfigs;
32
- n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
- s({
29
+ const { strategyId: e } = r.recommendationConfigs;
30
+ o.value = e || null, l.value = !1, r.fetchStrategies().catch(() => {
31
+ i({
34
32
  type: m.Error,
35
- message: o("discovery-strategy.error-description")
33
+ message: s("discovery-strategy.error-description")
36
34
  });
37
35
  });
38
36
  });
39
37
  const p = (t) => {
40
- const r = f(t.updated_at || t.created_at);
41
- if (!r)
38
+ const e = S(t.updated_at || t.created_at);
39
+ if (!e)
42
40
  return "";
43
- const a = I(r, E);
44
- return o("recommendation-strategy.last-updated-on", { value: a });
45
- }, D = l(() => e.strategies.map((t) => ({
41
+ const a = N(e, I);
42
+ return s("recommendation-strategy.last-updated-on", { value: a });
43
+ }, v = c(() => r.strategies.map((t) => ({
46
44
  text: t.name,
47
45
  value: t.strategy_id,
48
46
  infoBoxProps: {
@@ -50,57 +48,71 @@ const W = /* @__PURE__ */ v({
50
48
  theme: "light",
51
49
  variant: "information",
52
50
  className: "assign-strategy-info-box",
53
- titleText: N(f(t.name)),
51
+ titleText: k(S(t.name)),
54
52
  descriptionStatus: !0,
55
53
  descriptionText: p(t),
56
- slot: B,
57
- slotProps: { strategy: 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
+ }]
58
66
  }
59
- }))), d = l(() => {
60
- const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
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 ?? ""));
61
73
  return t ? { ...t, fallback_config: null } : null;
62
- }), w = l(() => ({
74
+ }), x = c(() => ({
63
75
  primaryButton: {
64
76
  styling: "solid",
65
77
  type: "primary",
66
- labelText: o("products.assign-btn")
78
+ labelText: s("products.assign-btn")
67
79
  },
68
80
  cancelOrBackButton: {
69
81
  styling: "ghost",
70
82
  type: "secondary",
71
- labelText: o("products.cancel")
83
+ labelText: s("products.cancel")
72
84
  }
73
85
  }));
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();
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();
76
88
  }, assignStrategy: async () => {
77
- const t = d.value;
89
+ const t = u.value;
78
90
  if (!t) {
79
- i.value = !0;
91
+ l.value = !0;
80
92
  return;
81
93
  }
82
- let r = "";
94
+ let e = "";
83
95
  try {
84
- r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
96
+ e = await r.resolveStrategyUrlTemplate(t, r.recommendationConfigs.currencySettings.value);
85
97
  } catch (a) {
86
98
  console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
87
99
  }
88
- if (!r) {
89
- s({
100
+ if (!e) {
101
+ i({
90
102
  type: m.Error,
91
- message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
103
+ message: s("email-editor.strategy-assign-failed", { strategyName: t.name })
92
104
  });
93
105
  return;
94
106
  }
95
- e.assignStrategy(t), s({
107
+ r.assignStrategy(t), i({
96
108
  type: m.Success,
97
- message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
98
- }), e.closeAssignStrategyDrawer();
109
+ message: s("email-editor.strategy-assigned-success", { strategyName: t.name })
110
+ }), r.closeAssignStrategyDrawer();
99
111
  }, onSelect: (t) => {
100
- n.value = t.value, i.value = !1;
112
+ o.value = t.value, l.value = !1;
101
113
  } };
102
114
  }
103
115
  });
104
116
  export {
105
- W as default
117
+ Y as default
106
118
  };
@@ -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
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent as g, computed as p, watch as b } from "vue";
2
+ import { useRibbonOffset as u } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as l } from "../../../composables/useTranslations.js";
4
+ import { ACADEMY_LINKS as f } from "../../../enums/academy.js";
5
+ import { useRecommendationExtensionStore as O } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
6
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
7
+ import { InOnboard as y } from "@useinsider/design-system-vue";
8
+ const h = /* @__PURE__ */ g({
9
+ __name: "RecommendationStrategyOnboarding",
10
+ setup(C) {
11
+ const n = "recommendationStrategyOnboarding", e = l(), t = _(), i = O(), { getTopPosition: r } = u(), a = `<a href="${f.EMAIL_RECOMMENDATION_BLOCK}" target="_blank" rel="noopener noreferrer">${e("action-builder.visit-academy")}</a>`, m = () => [
12
+ {
13
+ classes: "guido-recommendation-strategy-onboarding",
14
+ // Sits in the gap left of the settings panel and points at the strategy section, which
15
+ // starts 208px down: the panel header and its tab row are fixed chrome above it.
16
+ right: "426px",
17
+ top: r(208),
18
+ position: "Right Top",
19
+ title: e("email-editor.onboarding-recommendation-strategy-title"),
20
+ description: e("email-editor.onboarding-recommendation-strategy-description", {
21
+ academyLink: a
22
+ }),
23
+ imageSource: "",
24
+ backButtonClick: () => {
25
+ },
26
+ nextButtonType: "text",
27
+ nextButtonText: e("action-builder.ok"),
28
+ nextButtonClick: () => {
29
+ t.close(n);
30
+ }
31
+ }
32
+ ], c = p(() => i.strategyPanelOpen && t.onboardings.recommendationStrategyOnboarding.config.length > 0 && t.onboardings.recommendationStrategyOnboarding.isActive), d = () => {
33
+ var o, s;
34
+ (s = (o = t.getRecommendationStrategyCurrentCard) == null ? void 0 : o.nextButtonClick) == null || s.call(o);
35
+ };
36
+ return b(
37
+ () => t.isActive(n),
38
+ (o) => {
39
+ o && t.setConfig(n, m());
40
+ },
41
+ { immediate: !0 }
42
+ ), { __sfc: !0, ONBOARDING_TYPE: n, trans: e, onboardingStore: t, recommendationStore: i, getTopPosition: r, academyLink: a, buildOnboardingCards: m, isVisible: c, handleNext: d, InOnboard: y };
43
+ }
44
+ });
45
+ export {
46
+ h as default
47
+ };
@@ -1,19 +1,17 @@
1
1
  import r from "./WpDrawer.vue2.js";
2
2
  import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var u = function() {
4
- var t = this, o = t._self._c, e = t._self._setupProxy;
5
- return o(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(n) {
4
+ var t = this, n = t._self._c, e = t._self._setupProxy;
5
+ return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
6
6
  return e.emit("cancelOrBackButtonEvent");
7
- }, onCloseEvent: function(n) {
7
+ }, onCloseEvent: function(o) {
8
8
  return e.emit("onCloseEvent");
9
- }, primaryButtonEvent: function(n) {
9
+ }, primaryButtonEvent: function(o) {
10
10
  return e.emit("primaryButtonEvent");
11
- }, secondaryButtonEvent: function(n) {
12
- return e.emit("secondaryButtonEvent");
13
11
  } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
14
12
  return [t._t("headerBottomSlot")];
15
13
  }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
16
- return [o("div", [t._t("default")], 2)];
14
+ return [n("div", [t._t("default")], 2)];
17
15
  }, proxy: !0 }], null, !0) });
18
16
  }, i = [], c = /* @__PURE__ */ s(
19
17
  r,
@@ -23,7 +21,7 @@ var u = function() {
23
21
  null,
24
22
  null
25
23
  );
26
- const p = c.exports;
24
+ const f = c.exports;
27
25
  export {
28
- p as default
26
+ f as default
29
27
  };
@@ -13,7 +13,7 @@ const r = /* @__PURE__ */ e({
13
13
  status: { type: Boolean },
14
14
  titleText: null
15
15
  },
16
- emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent", "secondaryButtonEvent"],
16
+ emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent"],
17
17
  setup(n, { emit: t }) {
18
18
  return { __sfc: !0, emit: t, InDrawer: o };
19
19
  }