@useinsider/guido 3.19.0 → 3.20.0-beta.05ce01c

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 (151) hide show
  1. package/README.md +22 -3
  2. package/dist/@types/config/schemas.js +76 -53
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +105 -89
  5. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  6. package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
  7. package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
  8. package/dist/components/organisms/base/Toaster.vue2.js +13 -12
  9. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  10. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +78 -57
  11. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  12. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  13. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +28 -42
  14. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  15. package/dist/components/organisms/header/EditorActions.vue2.js +83 -48
  16. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  17. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
  18. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -24
  19. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  20. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  21. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  22. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  23. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  24. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +50 -0
  25. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  26. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  27. package/dist/components/wrappers/WpModal.vue.js +1 -1
  28. package/dist/components/wrappers/WpModal.vue2.js +4 -3
  29. package/dist/composables/useActionsApi.js +52 -47
  30. package/dist/composables/useAuthError.js +52 -0
  31. package/dist/composables/useAutoSave.js +44 -42
  32. package/dist/composables/useCodeEditorApi.js +23 -9
  33. package/dist/composables/useCortexBlueprintBridge.js +122 -54
  34. package/dist/composables/useCustomInterfaceAppearance.js +65 -51
  35. package/dist/composables/useEmailTemplateApplier.js +111 -50
  36. package/dist/composables/useHtmlCompiler.js +37 -26
  37. package/dist/composables/useHtmlValidator.js +89 -82
  38. package/dist/composables/useHttp.js +64 -54
  39. package/dist/composables/useLegacyStrategyConversion.js +65 -0
  40. package/dist/composables/useRecommendation.js +40 -35
  41. package/dist/composables/useSave.js +93 -45
  42. package/dist/composables/useSaveValidation.js +284 -0
  43. package/dist/composables/useSaveValidationRollout.js +20 -0
  44. package/dist/composables/useStripo.js +43 -39
  45. package/dist/composables/useToaster.js +18 -22
  46. package/dist/composables/useTranslations.js +3 -2
  47. package/dist/composables/useVersionHistoryApi.js +33 -24
  48. package/dist/composables/validators/useCouponBlockValidator.js +24 -21
  49. package/dist/composables/validators/useLiquidValidator.js +15 -15
  50. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  51. package/dist/config/migrator/index.js +14 -13
  52. package/dist/config/migrator/itemsBlockMigrator.js +236 -248
  53. package/dist/config/migrator/recommendationMigrator.js +28 -21
  54. package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
  55. package/dist/enums/extensions/recommendationBlock.js +51 -34
  56. package/dist/enums/save-validation.js +4 -0
  57. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  58. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  59. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  60. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  61. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  62. package/dist/extensions/Blocks/Items/template.js +219 -204
  63. package/dist/extensions/Blocks/Recommendation/block.js +65 -45
  64. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  65. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +103 -90
  66. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +150 -52
  67. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  68. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +274 -92
  69. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  70. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  71. package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
  72. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
  73. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  74. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  75. package/dist/guido.css +1 -1
  76. package/dist/services/recommendationApi.js +46 -37
  77. package/dist/services/settingsApi.js +11 -0
  78. package/dist/src/@types/config/schemas.d.ts +36 -0
  79. package/dist/src/@types/save-validation.d.ts +19 -0
  80. package/dist/src/components/Guido.vue.d.ts +17 -1
  81. package/dist/src/components/organisms/base/AuthErrorModal.vue.d.ts +2 -0
  82. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  83. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  84. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  85. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  86. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  87. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  88. package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +2 -0
  89. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  90. package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
  91. package/dist/src/composables/useAuthError.d.ts +12 -0
  92. package/dist/src/composables/useAutoSave.d.ts +4 -1
  93. package/dist/src/composables/useConfig.d.ts +8 -0
  94. package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
  95. package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
  96. package/dist/src/composables/useGuidoActions.d.ts +2 -0
  97. package/dist/src/composables/useHtmlValidator.d.ts +21 -0
  98. package/dist/src/composables/useHttp.d.ts +2 -0
  99. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  100. package/dist/src/composables/useSave.d.ts +6 -1
  101. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  102. package/dist/src/composables/useSaveValidationRollout.d.ts +4 -0
  103. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  104. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  105. package/dist/src/config/migrator/index.d.ts +2 -1
  106. package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
  107. package/dist/src/enums/extensions/recommendationBlock.d.ts +7 -1
  108. package/dist/src/enums/save-validation.d.ts +27 -0
  109. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  110. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  111. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  112. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  113. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  114. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  115. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +10 -0
  117. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  118. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +162 -1
  119. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  120. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  121. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
  122. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  123. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  124. package/dist/src/mock/cortexChatStore.d.ts +12 -0
  125. package/dist/src/services/recommendationApi.d.ts +2 -1
  126. package/dist/src/services/settingsApi.d.ts +6 -0
  127. package/dist/src/stores/config.d.ts +374 -0
  128. package/dist/src/stores/guido-email-editor.d.ts +20 -10
  129. package/dist/src/stores/onboarding.d.ts +812 -10
  130. package/dist/src/stores/recommendation.d.ts +5 -0
  131. package/dist/src/stores/save-validation.d.ts +22 -0
  132. package/dist/src/stores/setup-settings.d.ts +4 -0
  133. package/dist/src/utils/dateUtil.d.ts +10 -0
  134. package/dist/src/utils/genericUtil.d.ts +3 -0
  135. package/dist/src/utils/stripoEditorApi.d.ts +4 -0
  136. package/dist/src/utils/templatePreparation.d.ts +30 -0
  137. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  138. package/dist/static/assets/icons/line-info.svg.js +5 -0
  139. package/dist/static/styles/components/recommendation-strategy.css.js +113 -9
  140. package/dist/static/styles/components/skeleton.css.js +23 -0
  141. package/dist/static/styles/components/version-history.css.js +2 -6
  142. package/dist/stores/config.js +55 -24
  143. package/dist/stores/guido-email-editor.js +3 -1
  144. package/dist/stores/onboarding.js +50 -36
  145. package/dist/stores/save-validation.js +30 -0
  146. package/dist/stores/setup-settings.js +10 -0
  147. package/dist/stores/unsubscribe.js +3 -3
  148. package/dist/utils/pairProductVariables.js +71 -71
  149. package/dist/utils/stripoEditorApi.js +11 -0
  150. package/dist/utils/templatePreparation.js +54 -51
  151. package/package.json +2 -1
@@ -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,57 +1,43 @@
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 p, computed as a } from "vue";
2
+ import d 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__ */ p({
10
10
  __name: "RemoveStrategyModal",
11
- setup(S) {
12
- const t = _(), e = T(), { showToaster: a } = f(), i = n(() => ({
11
+ setup(v) {
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
- })), m = n(() => {
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 = () => {
27
- e.closeRemoveStrategyModal();
22
+ })), m = a(() => {
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: 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: 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
+ type: u.Success,
35
33
  // The toast renders through a sanitizing v-html, so the name is escaped first.
36
- message: t("email-editor.strategy-removed-success", {
37
- strategyName: `<b>${R(r)}</b>`
34
+ message: e("email-editor.strategy-removed-success", {
35
+ strategyName: `<b>${T(o)}</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
+ }), s !== null && await _(s, "Removed recommendation strategy");
38
+ }, WpModal: d };
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", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "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", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "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
- "1ca6baf0"
18
+ "baf7a5dd"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,79 +1,114 @@
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({
1
+ import { defineComponent as I, computed as u, ref as c } from "vue";
2
+ import { useActionsApi as P } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as j } from "../../../composables/useConfig.js";
4
+ import { useExport as G } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as J } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as K } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as N } from "../../../composables/useSave.js";
8
+ import { useSaveValidation as Q } from "../../../composables/useSaveValidation.js";
9
+ import { useSaveValidationRollout as U } from "../../../composables/useSaveValidationRollout.js";
10
+ import { useToaster as W } from "../../../composables/useToaster.js";
11
+ import { useTranslations as X } from "../../../composables/useTranslations.js";
12
+ import { useVersionHistoryApi as Y } from "../../../composables/useVersionHistoryApi.js";
13
+ import { useLiquidValidator as Z } from "../../../composables/validators/useLiquidValidator.js";
14
+ import { ToasterTypeOptions as $ } from "../../../enums/toaster.js";
15
+ import { useEditorStore as tt } from "../../../stores/editor.js";
16
+ import { useSaveValidationStore as et } from "../../../stores/save-validation.js";
17
+ import { useTemplateStore as ot } from "../../../stores/template.js";
18
+ import { getTooltipOptions as rt } from "../../../utils/tooltipUtils.js";
19
+ import { InButtonV2 as it } from "@useinsider/design-system-vue";
20
+ import { storeToRefs as st } from "pinia";
21
+ import at from "./MigrationConfirmModal.vue.js";
22
+ const Ot = /* @__PURE__ */ I({
19
23
  __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(), _ = () => {
24
+ setup(nt, { expose: b }) {
25
+ const { config: p, isFeatureEnabled: f } = j(), { exportHtml: d } = G(), { save: v } = N(), { validateCurrentTemplate: y } = Q(), { isEnabled: s } = U(), { showToaster: S, hideToaster: g, handleError: i } = W(), { openVersionHistory: h, closeVersionHistory: T } = Y(), { getCompiledEmail: V } = P(), { compileHtml: E } = K(), { validateLiquidSyntax: H } = Z(), e = tt(), w = et(), x = ot(), { hasMigrations: C } = st(x), r = X(), k = u(() => s.value ? r("email-editor.save-and-continue") : "Save"), a = c(!1), n = c(!1), _ = c(), l = J(), q = () => {
22
26
  if (e.isVersionHistoryOpen) {
23
- d();
27
+ T();
24
28
  return;
25
29
  }
26
- f();
27
- }, C = async () => {
28
- i.value = !0, await p(), i.value = !1;
29
- }, A = () => {
30
+ h();
31
+ }, B = async () => {
32
+ a.value = !0, await d(), a.value = !1;
33
+ }, L = () => {
30
34
  e.isSaveAsTemplateDrawerOpen = !0;
31
- }, M = w(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = w(
35
+ }, R = u(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), D = u(
32
36
  () => {
33
37
  var t, o;
34
- return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
38
+ return ((o = (t = p.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
39
  }
36
- ), E = async (t) => {
37
- a.value = !0, t || (e.loadingStatus = !0);
40
+ ), A = async (t) => {
41
+ n.value = !0, t || (e.loadingStatus = !0);
38
42
  let o;
39
43
  try {
40
- o = await u(t);
41
- } catch (n) {
42
- if (t)
43
- throw n;
44
- r(n, "Failed to save template");
44
+ o = await v(t);
45
+ } catch (M) {
46
+ i(M, "Failed to save template");
45
47
  } finally {
46
- a.value = !1, !t && !o && (e.loadingStatus = !1);
48
+ n.value = !1, !t && !o && (e.loadingStatus = !1);
47
49
  }
48
50
  return o;
49
- }, T = (t) => {
51
+ }, O = (t) => {
50
52
  var o;
51
- if (!t && H.value) {
52
- (o = S.value) == null || o.open();
53
+ if (!t && C.value) {
54
+ (o = _.value) == null || o.open();
53
55
  return;
54
56
  }
55
- return E(t);
57
+ return A(t);
58
+ }, m = async () => {
59
+ e.loadingStatus = !0;
60
+ try {
61
+ return await y();
62
+ } catch (t) {
63
+ return i(t, "Failed to prepare test email"), null;
64
+ } finally {
65
+ e.loadingStatus = !1;
66
+ }
56
67
  }, F = async () => {
57
- if (c("liquidSyntax")) {
68
+ const t = await m();
69
+ t != null && t.length ? w.open(t, "test") : t && g();
70
+ }, z = async () => {
71
+ if (s.value) {
72
+ const t = await m();
73
+ if (!t)
74
+ return;
75
+ if (t.length) {
76
+ S({
77
+ type: $.Error,
78
+ message: r("email-editor.validation-errors-found"),
79
+ actionButton: {
80
+ text: r("email-editor.check-errors"),
81
+ onClick: () => {
82
+ F();
83
+ }
84
+ },
85
+ autoHide: !1
86
+ });
87
+ return;
88
+ }
89
+ l();
90
+ return;
91
+ }
92
+ if (f("liquidSyntax")) {
58
93
  e.loadingStatus = !0;
59
94
  try {
60
- const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
61
- if (!await g(o))
95
+ const { html: t } = await V({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = E(t);
96
+ if (!await H(o))
62
97
  return;
63
98
  } catch (t) {
64
- r(t, "Failed to prepare test email");
99
+ i(t, "Failed to prepare test email");
65
100
  return;
66
101
  } finally {
67
102
  e.loadingStatus = !1;
68
103
  }
69
104
  }
70
- V();
105
+ l();
71
106
  };
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 };
107
+ return b({
108
+ handleSave: O
109
+ }), { __sfc: !0, config: p, isFeatureEnabled: f, exportHtml: d, save: v, validateCurrentTemplate: y, isEnabled: s, showToaster: S, hideToaster: g, handleError: i, openVersionHistory: h, closeVersionHistory: T, getCompiledEmail: V, compileHtml: E, validateLiquidSyntax: H, editorStore: e, saveValidationStore: w, templateStore: x, hasMigrations: C, trans: r, saveLabel: k, isExporting: a, isSaving: n, migrationModalRef: _, testEmailClick: l, handleVersionHistory: q, handleExport: B, handleSaveAs: L, versionHistoryTooltipText: R, isVersionHistoryButtonVisible: D, executeSave: A, handleSave: O, collectTestErrors: m, openTestErrors: F, handleTestEmail: z, getTooltipOptions: rt, InButtonV2: it, MigrationConfirmModal: at };
75
110
  }
76
111
  });
77
112
  export {
78
- ft as default
113
+ Ot as default
79
114
  };
@@ -1,16 +1,16 @@
1
1
  import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = 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__ */ a(
7
+ }, i = [], r = /* @__PURE__ */ n(
8
8
  o,
9
- n,
9
+ a,
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "73199fa4"
13
+ "b8f24f34"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,19 +1,19 @@
1
- import { defineComponent as l, computed as p, ref as d } from "vue";
1
+ import { defineComponent as m, 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 V } from "../../../stores/editor.js";
7
+ import { useEditorStore as y } from "../../../stores/editor.js";
8
8
  import { InButtonV2 as w } from "@useinsider/design-system-vue";
9
- import { useDebounceFn as y } from "../../../node_modules/@vueuse/shared/index.js";
10
- const D = /* @__PURE__ */ l({
9
+ import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const D = /* @__PURE__ */ m({
11
11
  __name: "LeftSlot",
12
12
  setup(C) {
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 = () => {
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 = () => {
17
17
  if (e.isVersionHistoryOpen) {
18
18
  n();
19
19
  return;
@@ -23,11 +23,15 @@ const D = /* @__PURE__ */ l({
23
23
  return;
24
24
  }
25
25
  i();
26
- }, a = y(() => {
27
- c(), r.value = !1;
26
+ }, c = V(async () => {
27
+ try {
28
+ await a();
29
+ } finally {
30
+ r.value = !1;
31
+ }
28
32
  }, 500);
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();
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();
31
35
  }, InButtonV2: w };
32
36
  }
33
37
  });
@@ -1,26 +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 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({
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({
13
15
  __name: "OnboardingWrapper",
14
16
  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 },
18
- { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
21
- { 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)));
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)));
24
28
  return O(async () => {
25
29
  await o.fetchUserModalState();
26
30
  }), t(
@@ -29,7 +33,7 @@ const G = /* @__PURE__ */ b({
29
33
  n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
34
  }
31
35
  ), t(
32
- () => s.emailFormat,
36
+ () => a.emailFormat,
33
37
  (n, i) => {
34
38
  i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
39
  }
@@ -38,9 +42,9 @@ const G = /* @__PURE__ */ b({
38
42
  (n) => {
39
43
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
44
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
45
+ ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
42
46
  }
43
47
  });
44
48
  export {
45
- G as default
49
+ U as default
46
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
+ };
@@ -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
+ };