@useinsider/guido 3.19.0-beta.80b64cf → 3.19.0-beta.84c97db

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 (110) hide show
  1. package/dist/@types/config/schemas.js +9 -8
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +104 -86
  4. package/dist/components/organisms/AutoSaveController.vue2.js +18 -8
  5. package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
  6. package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
  7. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  8. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  9. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  10. package/dist/components/organisms/header/EditorActions.vue2.js +37 -52
  11. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  12. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  13. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  14. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  15. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  16. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  17. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  18. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  19. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  20. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  21. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  22. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  23. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  24. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  25. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  26. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  27. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  28. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -38
  29. package/dist/components/wrappers/WpModal.vue.js +1 -1
  30. package/dist/components/wrappers/WpModal.vue2.js +4 -3
  31. package/dist/composables/useAccessibilityApi.js +45 -0
  32. package/dist/composables/useAuthError.js +52 -0
  33. package/dist/composables/useAutoSave.js +11 -11
  34. package/dist/composables/useCortexBlueprintBridge.js +122 -54
  35. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  36. package/dist/composables/useEmailTemplateApplier.js +111 -50
  37. package/dist/composables/useHttp.js +64 -54
  38. package/dist/composables/useLegacyStrategyConversion.js +23 -19
  39. package/dist/composables/useStripo.js +24 -20
  40. package/dist/composables/useToaster.js +17 -15
  41. package/dist/composables/validators/useLiquidValidator.js +15 -15
  42. package/dist/config/i18n/en/labels.json.js +36 -4
  43. package/dist/config/i18n/en/tooltips.json.js +2 -1
  44. package/dist/config/migrator/index.js +14 -13
  45. package/dist/config/migrator/itemsBlockMigrator.js +236 -248
  46. package/dist/config/migrator/recommendationMigrator.js +28 -21
  47. package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
  48. package/dist/enums/extensions/recommendationBlock.js +30 -29
  49. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  50. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  51. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  52. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  53. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  54. package/dist/extensions/Blocks/Items/template.js +219 -204
  55. package/dist/extensions/Blocks/Recommendation/block.js +54 -88
  56. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +32 -51
  57. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +11 -12
  58. package/dist/guido.css +1 -1
  59. package/dist/sprite.svg +10 -0
  60. package/dist/src/@types/config/schemas.d.ts +2 -0
  61. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  62. package/dist/src/components/organisms/header/AutoSaveStatus.vue.d.ts +2 -0
  63. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  64. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  65. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  66. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  67. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  68. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  69. package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
  70. package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
  71. package/dist/src/composables/useActionsApi.d.ts +2 -2
  72. package/dist/src/composables/useAuthError.d.ts +12 -0
  73. package/dist/src/composables/useConfig.d.ts +2 -0
  74. package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
  75. package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
  76. package/dist/src/composables/useGuidoActions.d.ts +2 -0
  77. package/dist/src/composables/useHttp.d.ts +2 -0
  78. package/dist/src/config/migrator/index.d.ts +2 -1
  79. package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
  80. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
  81. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  82. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  83. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  84. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -6
  85. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
  86. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +13 -7
  87. package/dist/src/mock/cortexChatStore.d.ts +12 -0
  88. package/dist/src/stores/autosave.d.ts +73 -1
  89. package/dist/src/stores/config.d.ts +20 -0
  90. package/dist/src/stores/editor.d.ts +109 -0
  91. package/dist/src/stores/guido-email-editor.d.ts +20 -10
  92. package/dist/src/stores/onboarding.d.ts +956 -21
  93. package/dist/src/stores/recommendation.d.ts +5 -0
  94. package/dist/src/stores/version-history.d.ts +1 -1
  95. package/dist/src/utils/dateUtil.d.ts +10 -0
  96. package/dist/src/utils/genericUtil.d.ts +3 -0
  97. package/dist/src/utils/timeUtil.d.ts +5 -0
  98. package/dist/static/styles/components/accessibility.css.js +234 -0
  99. package/dist/static/styles/components/version-history.css.js +2 -6
  100. package/dist/static/styles/variables.css.js +2 -0
  101. package/dist/stores/autosave.js +12 -7
  102. package/dist/stores/editor.js +7 -4
  103. package/dist/stores/guido-email-editor.js +3 -1
  104. package/dist/stores/onboarding.js +47 -21
  105. package/dist/utils/pairProductVariables.js +71 -71
  106. package/dist/utils/timeUtil.js +6 -17
  107. package/package.json +2 -1
  108. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  109. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  110. /package/dist/src/components/organisms/{header/AutoSaveToggle.vue.d.ts → base/AuthErrorModal.vue.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as c, transform as y, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as I, union as h, lazy as T } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
+ import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as c, transform as S, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const p = {
76
76
  value: t()
77
77
  })
78
78
  )
79
- }), f = T(() => C({
79
+ }), f = I(() => C({
80
80
  text: e(t()),
81
81
  // eslint-disable-next-line camelcase -- backend field name
82
82
  tag_text: e(t()),
@@ -176,7 +176,7 @@ const p = {
176
176
  trackIdCounter: e(
177
177
  i(
178
178
  s(),
179
- y((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
179
+ S((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
180
180
  ),
181
181
  0
182
182
  ),
@@ -190,7 +190,7 @@ const p = {
190
190
  recommendationCampaignUrls: e(
191
191
  i(
192
192
  r(),
193
- y((n) => n && typeof n == "object" ? { ...n } : void 0)
193
+ S((n) => n && typeof n == "object" ? { ...n } : void 0)
194
194
  )
195
195
  ),
196
196
  /** Migration-only inputs (legacy block configs) */
@@ -210,9 +210,9 @@ const p = {
210
210
  /** Email header settings */
211
211
  emailHeader: e(O, { senderName: "", subject: "" }),
212
212
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
213
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
213
+ savedModulesFolderName: e(t(), y.SAVED_MODULES),
214
214
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
215
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
215
+ defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
216
216
  }), F = a({
217
217
  /** Whether to show the header bar */
218
218
  showHeader: e(o(), !0),
@@ -237,6 +237,7 @@ const p = {
237
237
  liquidSyntax: e(o(), !1),
238
238
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
239
239
  autosave: e(o(), !1),
240
+ accessibilityTesting: e(o(), !1),
240
241
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
241
242
  allowlistEnabled: e(o(), !1),
242
243
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
@@ -313,7 +314,7 @@ const p = {
313
314
  (n) => typeof n == "function",
314
315
  "processor must be a function"
315
316
  )
316
- }), V = I("type", [
317
+ }), V = T("type", [
317
318
  H,
318
319
  _,
319
320
  q,
@@ -1,20 +1,20 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var t = function() {
3
+ import t from "../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
5
  var a = this, r = a._self._c, e = a._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, s = [], n = /* @__PURE__ */ i(
9
+ }, s = [], n = /* @__PURE__ */ t(
10
10
  o,
11
- t,
11
+ i,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "36867e2e"
15
+ "ecfaf815"
16
16
  );
17
- const g = n.exports;
17
+ const f = n.exports;
18
18
  export {
19
- g as default
19
+ f as default
20
20
  };
@@ -1,76 +1,84 @@
1
- import { defineComponent as re, defineAsyncComponent as m, ref as O, computed as u, watch as x, onMounted as se, onUnmounted as ae } from "vue";
2
- import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as ce } from "../composables/useEditorLock.js";
4
- import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
5
- import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
6
- import { usePartner as le } from "../composables/usePartner.js";
7
- import { useStripo as ue } from "../composables/useStripo.js";
8
- import { useTimerClone as pe } from "../composables/useTimerClone.js";
9
- import { migrate as W } from "../config/migrator/index.js";
10
- import { ModuleFolderDefaults as G } from "../enums/defaults.js";
11
- import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
12
- import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
- import ye from "./organisms/AutoSaveController.vue.js";
14
- import ge from "./organisms/base/Toaster.vue.js";
15
- import ve from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import Se from "./organisms/header/HeaderWrapper.vue.js";
17
- import be from "./organisms/LoadingWrapper.vue.js";
18
- import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as we } from "../services/stripoApi.js";
21
- import { useConfigStore as Ce } from "../stores/config.js";
22
- import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
23
- import { useEditorStore as H } from "../stores/editor.js";
24
- import { usePreviewStore as ke } from "../stores/preview.js";
25
- import { useTemplateStore as Te } from "../stores/template.js";
26
- import { useUnsubscribeStore as Fe } from "../stores/unsubscribe.js";
1
+ import { defineComponent as se, defineAsyncComponent as m, ref as H, computed as p, watch as W, onMounted as ie, onUnmounted as ae } from "vue";
2
+ import { useCortexBlueprintBridge as ce } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as de } from "../composables/useEditorLock.js";
4
+ import { provideGuidoActions as me } from "../composables/useGuidoActions.js";
5
+ import { useGuidoStateBridge as le } from "../composables/useGuidoStateBridge.js";
6
+ import { usePartner as ue } from "../composables/usePartner.js";
7
+ import { useStripo as pe } from "../composables/useStripo.js";
8
+ import { useTimerClone as fe } from "../composables/useTimerClone.js";
9
+ import { migrate as G } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as z } from "../enums/defaults.js";
11
+ import { RIBBON_SELECTOR as ye } from "../enums/onboarding.js";
12
+ import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
+ import ge from "./organisms/AutoSaveController.vue.js";
14
+ import ve from "./organisms/base/AuthErrorModal.vue.js";
15
+ import Se from "./organisms/base/Toaster.vue.js";
16
+ import be from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
17
+ import he from "./organisms/header/HeaderWrapper.vue.js";
18
+ import Ee from "./organisms/LoadingWrapper.vue.js";
19
+ import we from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
20
+ import Ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
21
+ import { useStripoApi as ke } from "../services/stripoApi.js";
22
+ import { useConfigStore as De } from "../stores/config.js";
23
+ import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
24
+ import { useEditorStore as w } from "../stores/editor.js";
25
+ import { usePreviewStore as Fe } from "../stores/preview.js";
26
+ import { useTemplateStore as Me } from "../stores/template.js";
27
+ import { useUnsubscribeStore as Re } from "../stores/unsubscribe.js";
27
28
  import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
28
- const tt = /* @__PURE__ */ re({
29
+ const rt = /* @__PURE__ */ se({
29
30
  __name: "Guido",
30
31
  props: {
31
32
  config: null,
32
33
  ready: { type: Boolean, default: !0 }
33
34
  },
34
35
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup(z, { expose: q, emit: r }) {
36
- const a = z, K = m(
36
+ setup(V, { expose: q, emit: r }) {
37
+ const a = V, K = m(
37
38
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), V = m(
39
- () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
39
  ), j = m(
41
- () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
40
+ () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
42
41
  ), J = m(
43
- () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
42
+ () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
44
43
  ), Q = m(
44
+ () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
45
+ ), C = H(), X = m(
45
46
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
46
- ), E = O(), p = O(), f = De(), w = Fe(), o = Ce();
47
+ ), f = H(), y = Te(), k = Re(), o = De();
47
48
  a.ready && o.init(a.config);
48
- const c = H(), X = ke(), l = u(() => c.hasChanges), { isTestPartner: Y } = le(), C = () => {
49
+ const s = w(), Y = Fe(), l = p(() => s.hasChanges), { isTestPartner: Z } = ue(), D = () => {
49
50
  var t;
50
- return (t = E.value) == null ? void 0 : t.handleSave(!0);
51
- }, D = (t) => {
52
- c.loadingStatus = t;
51
+ if (!s.isNormalMode) {
52
+ console.debug("guido:save:silent:blocked", {
53
+ isVersionHistoryOpen: s.isVersionHistoryOpen,
54
+ isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
55
+ });
56
+ return;
57
+ }
58
+ return (t = C.value) == null ? void 0 : t.saveSilent();
59
+ }, T = (t) => {
60
+ s.loadingStatus = t;
53
61
  };
54
- ie(), me();
55
- const y = () => {
62
+ ce(), le();
63
+ const g = () => {
56
64
  var t, e;
57
65
  return {
58
66
  emailId: o.templateId,
59
67
  userId: o.userId,
60
68
  username: o.username,
61
69
  partnerName: o.partnerName,
62
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
63
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
70
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || z.SAVED_MODULES,
71
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || z.DEFAULT_MODULES
64
72
  };
65
- }, { initPlugin: k, preloadRuntime: T } = ue(), { runExclusive: F, beginMount: M, isCurrentMount: R } = ce();
66
- let g = 0;
67
- const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: B } = pe(), Z = u(() => {
73
+ }, { initPlugin: F, preloadRuntime: M } = pe(), { runExclusive: R, beginMount: I, isCurrentMount: v } = de();
74
+ let u = 0;
75
+ const { getDefaultTemplate: L } = ke(), { cloneTimersOnSave: A, hasTimerBlocks: O } = fe(), ee = p(() => {
68
76
  var t;
69
77
  return !((t = o.ui) != null && t.showHeader);
70
- }), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
71
- () => !!h().recommendationConfigs.strategyId
78
+ }), te = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), oe = p(
79
+ () => !!E().recommendationConfigs.strategyId
72
80
  );
73
- de({
81
+ me({
74
82
  onBack: () => {
75
83
  console.debug("guido:back"), r("back");
76
84
  },
@@ -78,7 +86,7 @@ const tt = /* @__PURE__ */ re({
78
86
  console.debug("guido:save:start"), r("save:start");
79
87
  },
80
88
  onSaveComplete: (t) => {
81
- const e = { ...t, metadata: y() };
89
+ const e = { ...t, metadata: g() };
82
90
  console.debug("guido:save:complete", e), r("save:complete", e);
83
91
  },
84
92
  onTestEmailClick: () => {
@@ -86,62 +94,72 @@ const tt = /* @__PURE__ */ re({
86
94
  }
87
95
  });
88
96
  const U = (t) => {
89
- console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
90
- }, A = () => {
97
+ console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
98
+ }, N = () => {
91
99
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
92
100
  };
93
- x(() => l.value, () => {
101
+ W(() => l.value, () => {
94
102
  r("on-change", l.value);
95
103
  });
96
- const v = (t) => {
97
- const e = t, { attribute: s, position: d } = e.detail;
98
- console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
104
+ const S = (t) => {
105
+ const e = t, { attribute: i, position: d } = e.detail;
106
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
99
107
  };
100
- let i = null;
101
- const S = () => {
108
+ let c = null;
109
+ const b = () => {
102
110
  var e;
103
- const t = document.querySelector(fe);
104
- (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
105
- }, b = async () => {
111
+ const t = document.querySelector(ye);
112
+ (e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
113
+ }, h = async () => {
106
114
  var t;
107
115
  try {
108
- o.initialized || o.init(a.config), c.templateId = o.templateId;
109
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", P = (e == null ? void 0 : e.preselectedDynamicContent) || [];
110
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
111
- const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
116
+ o.initialized || o.init(a.config), s.templateId = o.templateId;
117
+ const e = o.template, i = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
118
+ k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
119
+ const P = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, _ = o.isFeatureEnabled("linkTrackingIds"), x = {
120
+ partnerName: o.partnerName,
121
+ campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
122
+ rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
123
+ };
112
124
  let n = {
113
- html: s && await W(s, _),
125
+ html: i && await G(i, P, x),
114
126
  css: d
115
127
  };
116
- n.html || (n = await I(), n.html = await W(n.html, _));
117
- const oe = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
118
- B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, $(n.html)));
119
- const ne = {
120
- preselectedDynamicContentList: P,
128
+ n.html || (n = await L(), n.html = await G(n.html, P, x));
129
+ const ne = _ ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
130
+ O(n.html) && (n.html = await A(n.html)), _ && (s.trackIdSessionFloor = Math.max(ne, $(n.html)));
131
+ const re = {
132
+ preselectedDynamicContentList: B,
121
133
  onReady: () => {
122
134
  console.debug("guido:ready"), r("ready");
123
135
  }
124
136
  };
125
- g = M(), await k(n, y(), ne), f.selectedDynamicContentList = P;
137
+ u = I(), await F(n, g(), re), y.selectedDynamicContentList = B;
126
138
  } catch (e) {
127
139
  console.error("Failed to initialize Stripo editor:", e);
128
140
  }
129
141
  };
130
- return se(async () => {
142
+ return ie(async () => {
131
143
  var e;
132
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), Te().$reset(), S();
133
- const t = (e = p.value) == null ? void 0 : e.parentElement;
134
- if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
135
- await b();
144
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E().$reset(), w().$reset(), Me().$reset(), b();
145
+ const t = (e = f.value) == null ? void 0 : e.parentElement;
146
+ if (t && (c = new ResizeObserver(b), c.observe(t)), M(), a.ready)
147
+ await h();
136
148
  else {
137
- const s = x(() => a.ready, (d) => {
138
- d && (s(), b());
149
+ const i = W(() => a.ready, (d) => {
150
+ d && (i(), h());
139
151
  });
140
152
  }
141
- document.addEventListener("dynamic-content:open", v);
153
+ document.addEventListener("dynamic-content:open", S);
142
154
  }), ae(() => {
143
- i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
144
- if (R(g))
155
+ if (c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", S), E().disposeStrategyPageReturn(), v(u))
156
+ try {
157
+ w().isStripoInitialized = !1;
158
+ } catch (t) {
159
+ console.debug("Failed to close the editor readiness gate on unmount", t);
160
+ }
161
+ R(async () => {
162
+ if (v(u))
145
163
  try {
146
164
  window.UIEditor.removeEditor();
147
165
  } catch {
@@ -151,14 +169,14 @@ const tt = /* @__PURE__ */ re({
151
169
  }), q({
152
170
  dynamicContent: {
153
171
  insert: U,
154
- close: A
172
+ close: N
155
173
  },
156
174
  hasChanges: l,
157
- saveSilent: C,
158
- setLoading: D
159
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: M, isCurrentMount: R, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: U, closeDynamicContent: A, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
175
+ saveSilent: D,
176
+ setLoading: T
177
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, autoSaveControllerRef: C, LegacyStrategyUpdatedModal: X, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: k, props: a, configStore: o, editorStore: s, previewStore: Y, hasChanges: l, isTestPartner: Z, saveSilent: D, setLoading: T, emit: r, buildMetadata: g, initPlugin: F, preloadRuntime: M, runExclusive: R, beginMount: I, isCurrentMount: v, mountGeneration: u, getDefaultTemplate: L, cloneTimersOnSave: A, hasTimerBlocks: O, noHeader: ee, isRrsEnabled: te, hasAssignedStrategy: oe, insertDynamicContent: U, closeDynamicContent: N, handleDynamicContentOpen: S, ribbonObserver: c, updateRibbonOffset: b, startEditor: h, AutoSaveController: ge, AuthErrorModal: ve, Toaster: Se, FilterSelectionDrawer: be, HeaderWrapper: he, LoadingWrapper: Ee, SaveAsTemplateDrawer: we, UnsubscribeWrapper: Ce };
160
178
  }
161
179
  });
162
180
  export {
163
- tt as default
181
+ rt as default
164
182
  };
@@ -1,13 +1,23 @@
1
- import { defineComponent as t } from "vue";
2
- import { useAutoSave as r } from "../../composables/useAutoSave.js";
3
- import { useSave as s } from "../../composables/useSave.js";
4
- const f = /* @__PURE__ */ t({
1
+ import { defineComponent as n } from "vue";
2
+ import { useAutoSave as u } from "../../composables/useAutoSave.js";
3
+ import { useSave as m } from "../../composables/useSave.js";
4
+ import { useToaster as c } from "../../composables/useToaster.js";
5
+ const _ = /* @__PURE__ */ n({
5
6
  __name: "AutoSaveController",
6
- setup(a) {
7
- const { save: e } = s(), o = () => e(!1, !0);
8
- return r(o), { __sfc: !0, save: e, backgroundSave: o };
7
+ setup(i, { expose: a }) {
8
+ const { save: e } = m(), { handleError: r } = c(), t = () => e(!1, !0);
9
+ u(t);
10
+ const o = async () => {
11
+ try {
12
+ return await e(!0);
13
+ } catch (s) {
14
+ r(s, "Failed to save template");
15
+ return;
16
+ }
17
+ };
18
+ return a({ saveSilent: o }), { __sfc: !0, save: e, handleError: r, backgroundSave: t, saveSilent: o };
9
19
  }
10
20
  });
11
21
  export {
12
- f as default
22
+ _ as default
13
23
  };
@@ -0,0 +1,18 @@
1
+ import e from "./AuthErrorModal.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var o = this, r = o._self._c, t = o._self._setupProxy;
6
+ return t.authError ? r("div", { staticClass: "auth-error-modal" }, [r(t.WpModal, { attrs: { id: "guido__auth-error-modal", state: "warning", "close-button-status": !1, "close-on-outside-click": !1, "footer-button-options": t.footerButtonOptions, title: t.title }, on: { close: t.dismiss, "primary-action": t.recover } }, [r("p", [o._v(o._s(t.message))])])], 1) : o._e();
7
+ }, n = [], i = /* @__PURE__ */ s(
8
+ e,
9
+ a,
10
+ n,
11
+ !1,
12
+ null,
13
+ "b4d7ae51"
14
+ );
15
+ const m = i.exports;
16
+ export {
17
+ m as default
18
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as c, computed as n } from "vue";
2
+ import p from "../../wrappers/WpModal.vue.js";
3
+ import { useAuthError as d } from "../../../composables/useAuthError.js";
4
+ import { useTranslations as m } from "../../../composables/useTranslations.js";
5
+ const _ = /* @__PURE__ */ c({
6
+ __name: "AuthErrorModal",
7
+ setup(v) {
8
+ const e = m(), { authError: t } = d(), r = n(() => {
9
+ var o;
10
+ return ((o = t.value) == null ? void 0 : o.status) === 419 && t.value.data !== null;
11
+ }), s = n(() => {
12
+ var o;
13
+ return ((o = t.value) == null ? void 0 : o.status) === 419 && t.value.data === null;
14
+ }), i = n(() => r.value ? e("integration-hub.reload-this-page") : e("action-builder.session-expired")), u = n(() => r.value ? e("auth.error-occurred-refresh") : s.value ? e("settings.session-on-another-device") : e("journey-builder.login-session-expired")), l = n(() => ({
15
+ primaryButton: {
16
+ type: "primary",
17
+ labelText: r.value ? e("integration-hub.reload") : e("journey-builder.login-popup-button")
18
+ },
19
+ cancelOrBackButton: {
20
+ type: "secondary",
21
+ styling: "ghost",
22
+ labelText: e("settings.cancel")
23
+ }
24
+ })), a = () => {
25
+ if (r.value) {
26
+ window.location.reload();
27
+ return;
28
+ }
29
+ window.location.replace("/");
30
+ };
31
+ return { __sfc: !0, trans: e, authError: t, isPageExpired: r, isTakenOver: s, title: i, message: u, footerButtonOptions: l, recover: a, dismiss: () => {
32
+ if (r.value) {
33
+ t.value = null;
34
+ return;
35
+ }
36
+ a();
37
+ }, WpModal: p };
38
+ }
39
+ });
40
+ export {
41
+ _ as default
42
+ };
@@ -0,0 +1,17 @@
1
+ import t from "./AutoSaveStatus.vue2.js";
2
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var s = this, e = s._self._c, a = s._self._setupProxy;
5
+ return a.isFeatureEnabled("autosave") ? e("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? e("span", { staticClass: "d-f a-i-c f-s-1" }, [e(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), e("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? e("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel.before)), a.savedLabel.word ? e("span", { staticClass: "f-w-600" }, [s._v(s._s(a.savedLabel.word))]) : s._e(), s._v(s._s(a.savedLabel.after))]) : s._e()]) : s._e();
6
+ }, n = [], o = /* @__PURE__ */ r(
7
+ t,
8
+ _,
9
+ n,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const v = o.exports;
15
+ export {
16
+ v as default
17
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as p, computed as S } from "vue";
2
+ import { useConfig as A } from "../../../composables/useConfig.js";
3
+ import { useTranslations as T } from "../../../composables/useTranslations.js";
4
+ import { useAutosaveStore as v, AUTOSAVE_STATUS as m } from "../../../stores/autosave.js";
5
+ import { autoSaveTimestamp as b } from "../../../utils/timeUtil.js";
6
+ import { InLoading as D } from "@useinsider/design-system-vue";
7
+ const j = /* @__PURE__ */ p({
8
+ __name: "AutoSaveStatus",
9
+ setup(O) {
10
+ const { isFeatureEnabled: u } = A(), a = v(), n = T(), t = "__BOLD_START__", o = "__BOLD_END__", s = (i) => i.split(t).join("").split(o).join(""), _ = S(() => {
11
+ if (a.status !== m.SAVED || !a.lastSavedAt)
12
+ return null;
13
+ const { isToday: i, time: c, date: f } = b(a.lastSavedAt), l = { boldStart: t, boldEnd: o }, e = i ? n("email-editor.autosaved-at-today", { ...l, time: c }) : n("email-editor.autosaved-at-date", { ...l, date: f }), r = e.indexOf(t), d = e.indexOf(o, r + t.length);
14
+ return r === -1 || d === -1 ? { before: s(e), word: "", after: "" } : {
15
+ before: s(e.slice(0, r)),
16
+ word: s(e.slice(r + t.length, d)),
17
+ after: s(e.slice(d + o.length))
18
+ };
19
+ });
20
+ return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
21
+ }
22
+ });
23
+ export {
24
+ j as default
25
+ };
@@ -1,23 +1,23 @@
1
- import l from "./EditorActions.vue2.js";
1
+ import a from "./EditorActions.vue2.js";
2
2
  /* empty css */
3
- import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var u = function() {
5
- var s, i, n, a;
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) {
3
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var d = function() {
5
+ var o, s;
6
+ var i = this, e = i._self._c, t = i._self._setupProxy;
7
+ return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.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 } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
8
8
  return t.handleSave(!1);
9
- } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
9
+ } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
10
10
  return t.executeSave(!1);
11
11
  } } })], 1);
12
- }, c = [], p = /* @__PURE__ */ d(
12
+ }, l = [], c = /* @__PURE__ */ r(
13
+ a,
14
+ d,
13
15
  l,
14
- u,
15
- c,
16
16
  !1,
17
17
  null,
18
- "c61cc8ea"
18
+ "23b54db0"
19
19
  );
20
- const v = p.exports;
20
+ const p = c.exports;
21
21
  export {
22
- v as default
22
+ p as default
23
23
  };