@useinsider/guido 3.19.0-beta.acb00a2 → 3.19.0-beta.c604f7d

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 (64) hide show
  1. package/dist/@types/config/schemas.js +21 -20
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +72 -71
  4. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  5. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  6. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  7. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  8. package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
  9. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  10. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  11. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  12. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  13. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  14. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  15. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  16. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  17. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  18. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  19. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  20. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  21. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  22. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  23. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  24. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +56 -38
  27. package/dist/composables/useAccessibilityApi.js +35 -0
  28. package/dist/composables/useActionsApi.js +20 -24
  29. package/dist/composables/useCortexBlueprintBridge.js +54 -122
  30. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  31. package/dist/composables/useEmailTemplateApplier.js +52 -108
  32. package/dist/config/i18n/en/labels.json.js +36 -4
  33. package/dist/config/i18n/en/tooltips.json.js +2 -1
  34. package/dist/guido.css +1 -1
  35. package/dist/sprite.svg +6 -0
  36. package/dist/src/@types/config/schemas.d.ts +2 -0
  37. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  38. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  40. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  41. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  42. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  43. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  44. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  45. package/dist/src/composables/useActionsApi.d.ts +2 -2
  46. package/dist/src/composables/useConfig.d.ts +2 -0
  47. package/dist/src/composables/useCortexBlueprintBridge.d.ts +3 -2
  48. package/dist/src/composables/useEmailTemplateApplier.d.ts +5 -18
  49. package/dist/src/stores/config.d.ts +20 -0
  50. package/dist/src/stores/editor.d.ts +109 -0
  51. package/dist/src/stores/guido-email-editor.d.ts +10 -20
  52. package/dist/src/stores/onboarding.d.ts +952 -21
  53. package/dist/src/stores/version-history.d.ts +1 -1
  54. package/dist/src/utils/timeUtil.d.ts +5 -0
  55. package/dist/static/styles/components/accessibility.css.js +234 -0
  56. package/dist/static/styles/variables.css.js +2 -0
  57. package/dist/stores/editor.js +7 -4
  58. package/dist/stores/guido-email-editor.js +1 -3
  59. package/dist/stores/onboarding.js +43 -21
  60. package/dist/utils/timeUtil.js +6 -17
  61. package/package.json +1 -1
  62. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  63. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  64. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
- import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as o, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as a, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as I, union as y, unknown as r, lazy as T } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
+ import { object as o, number as n, optional as e, string as t, picklist as l, pipe as m, minLength as b, custom as h, boolean as a, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as y, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
6
6
  /** Transactional/system emails */
7
7
  TRANSACTIONAL: 2
8
- }, l = {
8
+ }, i = {
9
9
  /** Standard email campaigns */
10
10
  EMAIL: 60,
11
11
  /** Architect journey builder */
@@ -46,16 +46,16 @@ const p = {
46
46
  ),
47
47
  /** Product type identifier */
48
48
  productType: e(
49
- i([
50
- l.EMAIL,
51
- l.ARCHITECT,
52
- l.UNSUBSCRIBE_PAGES
49
+ l([
50
+ i.EMAIL,
51
+ i.ARCHITECT,
52
+ i.UNSUBSCRIBE_PAGES
53
53
  ]),
54
- l.EMAIL
54
+ i.EMAIL
55
55
  ),
56
56
  /** Message type (promotional or transactional) */
57
57
  messageType: e(
58
- i([p.PROMOTIONAL, p.TRANSACTIONAL]),
58
+ l([p.PROMOTIONAL, p.TRANSACTIONAL]),
59
59
  p.PROMOTIONAL
60
60
  ),
61
61
  /** Display name for the current user */
@@ -76,17 +76,17 @@ const p = {
76
76
  value: t()
77
77
  })
78
78
  )
79
- }), S = T(() => g({
79
+ }), f = I(() => g({
80
80
  text: e(t()),
81
81
  // eslint-disable-next-line camelcase -- backend field name
82
82
  tag_text: e(t()),
83
83
  value: e(t()),
84
- children: e(c(S)),
84
+ children: e(c(f)),
85
85
  // eslint-disable-next-line camelcase -- backend field name
86
- select_items: e(c(S))
86
+ select_items: e(c(f))
87
87
  })), N = k(
88
88
  t(),
89
- R(c(S), [])
89
+ R(c(f), [])
90
90
  ), P = g({
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
92
  id: e(n()),
@@ -197,9 +197,9 @@ const p = {
197
197
  /** Email header settings */
198
198
  emailHeader: e(D, { senderName: "", subject: "" }),
199
199
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
200
- savedModulesFolderName: e(t(), f.SAVED_MODULES),
200
+ savedModulesFolderName: e(t(), S.SAVED_MODULES),
201
201
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
202
- defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
202
+ defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
203
203
  }), F = o({
204
204
  /** Whether to show the header bar */
205
205
  showHeader: e(a(), !0),
@@ -224,12 +224,13 @@ const p = {
224
224
  liquidSyntax: e(a(), !1),
225
225
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
226
226
  autosave: e(a(), !1),
227
+ accessibilityTesting: e(a(), !1),
227
228
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
228
229
  allowlistEnabled: e(a(), !1),
229
230
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
230
231
  linkTrackingIds: e(a(), !1),
231
232
  reusableRecommendationStrategy: e(a(), !1)
232
- }), B = i([
233
+ }), B = l([
233
234
  "amp-accordion",
234
235
  "amp-carousel",
235
236
  "amp-form-controls",
@@ -243,7 +244,7 @@ const p = {
243
244
  "text-block",
244
245
  "timer-block",
245
246
  "video-block"
246
- ]), w = i([
247
+ ]), w = l([
247
248
  "dynamic-content",
248
249
  "checkbox-block",
249
250
  "radio-button-block",
@@ -300,7 +301,7 @@ const p = {
300
301
  (s) => typeof s == "function",
301
302
  "processor must be a function"
302
303
  )
303
- }), V = I("type", [
304
+ }), V = T("type", [
304
305
  _,
305
306
  j,
306
307
  q,
@@ -352,7 +353,7 @@ export {
352
353
  G as CustomRuleSchema,
353
354
  B as DefaultBlockTypeSchema,
354
355
  N as DynamicContentListSchema,
355
- S as DynamicContentNodeSchema,
356
+ f as DynamicContentNodeSchema,
356
357
  E as DynamicContentSchema,
357
358
  O as EditorSchema,
358
359
  D as EmailHeaderSchema,
@@ -363,7 +364,7 @@ export {
363
364
  P as LegacyRecommendationConfigSchema,
364
365
  p as MessageType,
365
366
  M as PartnerSchema,
366
- l as ProductType,
367
+ i as ProductType,
367
368
  j as RegexRuleSchema,
368
369
  q as RemoveRuleSchema,
369
370
  _ as ReplaceRuleSchema,
@@ -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.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
- "59690055"
15
+ "b5af7c3e"
16
16
  );
17
- const g = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- g as default
19
+ v as default
20
20
  };
@@ -1,30 +1,30 @@
1
- import { defineComponent as re, defineAsyncComponent as m, ref as x, computed as p, watch as W, onMounted as se, onUnmounted as ae } from "vue";
2
- import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
1
+ import { defineComponent as re, defineAsyncComponent as m, ref as _, computed as u, watch as x, onMounted as se, onUnmounted as ie } from "vue";
2
+ import { useCortexBlueprintBridge as ae } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { useEditorLock as ce } from "../composables/useEditorLock.js";
4
4
  import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
5
5
  import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
6
6
  import { usePartner as le } from "../composables/usePartner.js";
7
7
  import { useStripo as ue } from "../composables/useStripo.js";
8
8
  import { useTimerClone as pe } from "../composables/useTimerClone.js";
9
- import { migrate as G } from "../config/migrator/index.js";
10
- import { ModuleFolderDefaults as z } from "../enums/defaults.js";
9
+ import { migrate as H } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as W } from "../enums/defaults.js";
11
11
  import { RIBBON_SELECTOR as fe } from "../enums/onboarding.js";
12
- import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
13
  import ye from "./organisms/AutoSaveController.vue.js";
14
14
  import ge from "./organisms/base/Toaster.vue.js";
15
15
  import ve from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
16
  import Se from "./organisms/header/HeaderWrapper.vue.js";
17
- import he from "./organisms/LoadingWrapper.vue.js";
18
- import be from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
17
+ import be from "./organisms/LoadingWrapper.vue.js";
18
+ import he from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
19
  import Ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
20
  import { useStripoApi as we } from "../services/stripoApi.js";
21
21
  import { useConfigStore as Ce } from "../stores/config.js";
22
- import { useDynamicContentStore as De } from "../stores/dynamic-content.js";
23
- import { useEditorStore as w } from "../stores/editor.js";
24
- import { usePreviewStore as ke } from "../stores/preview.js";
25
- import { useTemplateStore as Fe } from "../stores/template.js";
26
- import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
27
- import { readTrackFloor as H } from "../utils/linkTrackingIds.js";
22
+ import { useDynamicContentStore as ke } from "../stores/dynamic-content.js";
23
+ import { useEditorStore as G } from "../stores/editor.js";
24
+ import { usePreviewStore as De } from "../stores/preview.js";
25
+ import { useTemplateStore as Te } from "../stores/template.js";
26
+ import { useUnsubscribeStore as Me } from "../stores/unsubscribe.js";
27
+ import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
28
28
  const tt = /* @__PURE__ */ re({
29
29
  __name: "Guido",
30
30
  props: {
@@ -32,43 +32,50 @@ const tt = /* @__PURE__ */ re({
32
32
  ready: { type: Boolean, default: !0 }
33
33
  },
34
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup($, { expose: q, emit: r }) {
36
- const a = $, K = m(
35
+ setup(z, { expose: V, emit: r }) {
36
+ const a = z, q = m(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), V = m(
38
+ ), K = m(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
40
  ), j = m(
41
41
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
42
42
  ), J = m(
43
43
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
44
- ), Q = m(
44
+ ), E = _(), Q = m(
45
45
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
46
- ), C = x(), f = x(), y = De(), D = Te(), o = Ce();
46
+ ), p = _(), f = ke(), w = Me(), o = Ce();
47
47
  a.ready && o.init(a.config);
48
- const c = w(), X = ke(), l = p(() => c.hasChanges), { isTestPartner: Y } = le(), k = () => {
48
+ const s = G(), X = De(), l = u(() => s.hasChanges), { isTestPartner: Y } = le(), C = () => {
49
49
  var t;
50
- return (t = C.value) == null ? void 0 : t.handleSave(!0);
51
- }, F = (t) => {
52
- c.loadingStatus = t;
50
+ if (!s.isNormalMode) {
51
+ console.debug("guido:save:silent:blocked", {
52
+ isVersionHistoryOpen: s.isVersionHistoryOpen,
53
+ isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
54
+ });
55
+ return;
56
+ }
57
+ return (t = E.value) == null ? void 0 : t.saveSilent();
58
+ }, k = (t) => {
59
+ s.loadingStatus = t;
53
60
  };
54
- ie(), me();
55
- const g = () => {
61
+ ae(), me();
62
+ const y = () => {
56
63
  var t, e;
57
64
  return {
58
65
  emailId: o.templateId,
59
66
  userId: o.userId,
60
67
  username: o.username,
61
68
  partnerName: o.partnerName,
62
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || z.SAVED_MODULES,
63
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || z.DEFAULT_MODULES
69
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
70
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
64
71
  };
65
- }, { initPlugin: T, preloadRuntime: I } = ue(), { runExclusive: M, beginMount: R, isCurrentMount: v } = ce();
66
- let u = 0;
67
- const { getDefaultTemplate: L } = we(), { cloneTimersOnSave: B, hasTimerBlocks: U } = pe(), Z = p(() => {
72
+ }, { initPlugin: D, preloadRuntime: T } = ue(), { runExclusive: M, beginMount: F, isCurrentMount: R } = ce();
73
+ let g = 0;
74
+ const { getDefaultTemplate: I } = we(), { cloneTimersOnSave: L, hasTimerBlocks: O } = pe(), Z = u(() => {
68
75
  var t;
69
76
  return !((t = o.ui) != null && t.showHeader);
70
- }), ee = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = p(
71
- () => !!E().recommendationConfigs.strategyId
77
+ }), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
78
+ () => !!h().recommendationConfigs.strategyId
72
79
  );
73
80
  de({
74
81
  onBack: () => {
@@ -78,7 +85,7 @@ const tt = /* @__PURE__ */ re({
78
85
  console.debug("guido:save:start"), r("save:start");
79
86
  },
80
87
  onSaveComplete: (t) => {
81
- const e = { ...t, metadata: g() };
88
+ const e = { ...t, metadata: y() };
82
89
  console.debug("guido:save:complete", e), r("save:complete", e);
83
90
  },
84
91
  onTestEmailClick: () => {
@@ -86,83 +93,77 @@ const tt = /* @__PURE__ */ re({
86
93
  }
87
94
  });
88
95
  const A = (t) => {
89
- console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
90
- }, P = () => {
96
+ console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
97
+ }, B = () => {
91
98
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
92
99
  };
93
- W(() => l.value, () => {
100
+ x(() => l.value, () => {
94
101
  r("on-change", l.value);
95
102
  });
96
- const S = (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);
103
+ const v = (t) => {
104
+ const e = t, { attribute: i, position: d } = e.detail;
105
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
99
106
  };
100
- let i = null;
101
- const h = () => {
107
+ let c = null;
108
+ const S = () => {
102
109
  var e;
103
110
  const t = document.querySelector(fe);
104
- (e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
111
+ (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
105
112
  }, b = async () => {
106
113
  var t;
107
114
  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) || "", _ = (e == null ? void 0 : e.preselectedDynamicContent) || [];
110
- D.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
111
- const N = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, O = o.isFeatureEnabled("linkTrackingIds");
115
+ o.initialized || o.init(a.config), s.templateId = o.templateId;
116
+ const e = o.template, i = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", U = (e == null ? void 0 : e.preselectedDynamicContent) || [];
117
+ w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
118
+ const N = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, P = o.isFeatureEnabled("linkTrackingIds");
112
119
  let n = {
113
- html: s && await G(s, N),
120
+ html: i && await H(i, N),
114
121
  css: d
115
122
  };
116
- n.html || (n = await L(), n.html = await G(n.html, N));
117
- const oe = O ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
118
- U(n.html) && (n.html = await B(n.html)), O && (c.trackIdSessionFloor = Math.max(oe, H(n.html)));
123
+ n.html || (n = await I(), n.html = await H(n.html, N));
124
+ const oe = P ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
125
+ O(n.html) && (n.html = await L(n.html)), P && (s.trackIdSessionFloor = Math.max(oe, $(n.html)));
119
126
  const ne = {
120
- preselectedDynamicContentList: _,
127
+ preselectedDynamicContentList: U,
121
128
  onReady: () => {
122
129
  console.debug("guido:ready"), r("ready");
123
130
  }
124
131
  };
125
- u = R(), await T(n, g(), ne), y.selectedDynamicContentList = _;
132
+ g = F(), await D(n, y(), ne), f.selectedDynamicContentList = U;
126
133
  } catch (e) {
127
134
  console.error("Failed to initialize Stripo editor:", e);
128
135
  }
129
136
  };
130
137
  return se(async () => {
131
138
  var e;
132
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E().$reset(), w().$reset(), Fe().$reset(), h();
133
- const t = (e = f.value) == null ? void 0 : e.parentElement;
134
- if (t && (i = new ResizeObserver(h), i.observe(t)), I(), a.ready)
139
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), G().$reset(), Te().$reset(), S();
140
+ const t = (e = p.value) == null ? void 0 : e.parentElement;
141
+ if (t && (c = new ResizeObserver(S), c.observe(t)), T(), a.ready)
135
142
  await b();
136
143
  else {
137
- const s = W(() => a.ready, (d) => {
138
- d && (s(), b());
144
+ const i = x(() => a.ready, (d) => {
145
+ d && (i(), b());
139
146
  });
140
147
  }
141
- document.addEventListener("dynamic-content:open", S);
142
- }), ae(() => {
143
- if (i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", S), E().disposeStrategyPageReturn(), v(u))
144
- try {
145
- w().isStripoInitialized = !1;
146
- } catch (t) {
147
- console.debug("Failed to close the editor readiness gate on unmount", t);
148
- }
149
- M(async () => {
150
- if (v(u))
148
+ document.addEventListener("dynamic-content:open", v);
149
+ }), ie(() => {
150
+ c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), M(async () => {
151
+ if (R(g))
151
152
  try {
152
153
  window.UIEditor.removeEditor();
153
154
  } catch {
154
155
  console.debug("Failed to remove Stripo editor: No editor found");
155
156
  }
156
157
  }), o.reset();
157
- }), q({
158
+ }), V({
158
159
  dynamicContent: {
159
160
  insert: A,
160
- close: P
161
+ close: B
161
162
  },
162
163
  hasChanges: l,
163
- saveSilent: k,
164
- setLoading: F
165
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, LegacyStrategyUpdatedModal: Q, headerWrapperRef: C, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: D, props: a, configStore: o, editorStore: c, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: k, setLoading: F, emit: r, buildMetadata: g, initPlugin: T, preloadRuntime: I, runExclusive: M, beginMount: R, isCurrentMount: v, mountGeneration: u, getDefaultTemplate: L, cloneTimersOnSave: B, hasTimerBlocks: U, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: A, closeDynamicContent: P, handleDynamicContentOpen: S, ribbonObserver: i, updateRibbonOffset: h, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: he, SaveAsTemplateDrawer: be, UnsubscribeWrapper: Ee };
164
+ saveSilent: C,
165
+ setLoading: k
166
+ }), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, AssignStrategyDrawer: j, RemoveStrategyModal: J, autoSaveControllerRef: E, LegacyStrategyUpdatedModal: Q, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: s, previewStore: X, hasChanges: l, isTestPartner: Y, saveSilent: C, setLoading: k, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: T, runExclusive: M, beginMount: F, isCurrentMount: R, mountGeneration: g, getDefaultTemplate: I, cloneTimersOnSave: L, hasTimerBlocks: O, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: A, closeDynamicContent: B, handleDynamicContentOpen: v, ribbonObserver: c, updateRibbonOffset: S, startEditor: b, AutoSaveController: ye, Toaster: ge, FilterSelectionDrawer: ve, HeaderWrapper: Se, LoadingWrapper: be, SaveAsTemplateDrawer: he, UnsubscribeWrapper: Ee };
166
167
  }
167
168
  });
168
169
  export {
@@ -1,13 +1,15 @@
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 r } from "vue";
2
+ import { useAutoSave as s } from "../../composables/useAutoSave.js";
3
+ import { useSave as a } from "../../composables/useSave.js";
4
+ const p = /* @__PURE__ */ r({
5
5
  __name: "AutoSaveController",
6
- setup(a) {
7
- const { save: e } = s(), o = () => e(!1, !0);
8
- return r(o), { __sfc: !0, save: e, backgroundSave: o };
6
+ setup(n, { expose: t }) {
7
+ const { save: e } = a(), o = () => e(!1, !0);
8
+ return s(o), t({
9
+ saveSilent: () => e(!0)
10
+ }), { __sfc: !0, save: e, backgroundSave: o };
9
11
  }
10
12
  });
11
13
  export {
12
- f as default
14
+ p as default
13
15
  };
@@ -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 r 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 a 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 ? i._e() : e("div", { staticClass: "editor-actions__divider" }), (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
- }, p = [], c = /* @__PURE__ */ d(
12
+ }, l = [], c = /* @__PURE__ */ a(
13
+ r,
14
+ d,
13
15
  l,
14
- u,
15
- p,
16
16
  !1,
17
17
  null,
18
- "1ca6baf0"
18
+ "4036dff9"
19
19
  );
20
- const v = c.exports;
20
+ const p = c.exports;
21
21
  export {
22
- v as default
22
+ p as default
23
23
  };
@@ -1,64 +1,48 @@
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 C, ref as S } from "vue";
2
+ import { useActionsApi as T } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as M } from "../../../composables/useConfig.js";
4
+ import { useTestEmailClick as w } from "../../../composables/useGuidoActions.js";
5
+ import { useHtmlCompiler as x } from "../../../composables/useHtmlCompiler.js";
6
+ import { useSave as A } from "../../../composables/useSave.js";
7
+ import { useToaster as F } from "../../../composables/useToaster.js";
8
+ import { useTranslations as V } from "../../../composables/useTranslations.js";
9
+ import { useLiquidValidator as q } from "../../../composables/validators/useLiquidValidator.js";
10
+ import { useEditorStore as H } from "../../../stores/editor.js";
11
+ import { useTemplateStore as k } from "../../../stores/template.js";
12
+ import { getTooltipOptions as L } from "../../../utils/tooltipUtils.js";
13
+ import { InButtonV2 as R } from "@useinsider/design-system-vue";
14
+ import { storeToRefs as b } from "pinia";
15
+ import z from "./EditorActionsMenu.vue.js";
16
+ import B from "./MigrationConfirmModal.vue.js";
17
+ const ot = /* @__PURE__ */ C({
19
18
  __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(), _ = () => {
22
- if (e.isVersionHistoryOpen) {
23
- d();
24
- return;
25
- }
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(
32
- () => {
33
- var t, o;
34
- return ((o = (t = m.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
- }
36
- ), E = async (t) => {
19
+ setup(D, { expose: E }) {
20
+ const { config: h, isFeatureEnabled: s } = M(), { save: n } = A(), { getCompiledEmail: m } = T(), { compileHtml: l } = x(), { validateLiquidSyntax: f } = q(), { handleError: r } = F(), e = H(), u = k(), { hasMigrations: c } = b(u), y = V(), a = S(!1), p = S(), d = w(), g = async (t) => {
37
21
  a.value = !0, t || (e.loadingStatus = !0);
38
22
  let o;
39
23
  try {
40
- o = await u(t);
41
- } catch (n) {
24
+ o = await n(t);
25
+ } catch (i) {
42
26
  if (t)
43
- throw n;
44
- r(n, "Failed to save template");
27
+ throw i;
28
+ r(i, "Failed to save template");
45
29
  } finally {
46
30
  a.value = !1, !t && !o && (e.loadingStatus = !1);
47
31
  }
48
32
  return o;
49
- }, T = (t) => {
33
+ }, v = (t) => {
50
34
  var o;
51
- if (!t && H.value) {
52
- (o = S.value) == null || o.open();
35
+ if (!t && c.value) {
36
+ (o = p.value) == null || o.open();
53
37
  return;
54
38
  }
55
- return E(t);
56
- }, F = async () => {
57
- if (c("liquidSyntax")) {
39
+ return g(t);
40
+ }, _ = async () => {
41
+ if (s("liquidSyntax")) {
58
42
  e.loadingStatus = !0;
59
43
  try {
60
- const { html: t } = await v({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = y(t);
61
- if (!await g(o))
44
+ const { html: t } = await m({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = l(t);
45
+ if (!await f(o))
62
46
  return;
63
47
  } catch (t) {
64
48
  r(t, "Failed to prepare test email");
@@ -67,13 +51,13 @@ const ft = /* @__PURE__ */ q({
67
51
  e.loadingStatus = !1;
68
52
  }
69
53
  }
70
- V();
54
+ d();
71
55
  };
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 };
56
+ return E({
57
+ handleSave: v
58
+ }), { __sfc: !0, config: h, isFeatureEnabled: s, save: n, getCompiledEmail: m, compileHtml: l, validateLiquidSyntax: f, handleError: r, editorStore: e, templateStore: u, hasMigrations: c, trans: y, isSaving: a, migrationModalRef: p, testEmailClick: d, executeSave: g, handleSave: v, handleTestEmail: _, getTooltipOptions: L, InButtonV2: R, EditorActionsMenu: z, MigrationConfirmModal: B };
75
59
  }
76
60
  });
77
61
  export {
78
- ft as default
62
+ ot as default
79
63
  };