@useinsider/guido 3.18.0-beta.19e1253 → 3.18.0-beta.206bb3f

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 (59) hide show
  1. package/dist/@types/config/schemas.js +15 -13
  2. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -15
  3. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +41 -43
  4. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  5. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +27 -0
  6. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  7. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  8. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  9. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +43 -0
  10. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  12. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  13. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  14. package/dist/components/organisms/header/RightSlot.vue.js +7 -6
  15. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  16. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  17. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  18. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  19. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  20. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
  21. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +81 -0
  22. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
  23. package/dist/composables/useAccessibilityApi.js +31 -0
  24. package/dist/composables/useCustomInterfaceAppearance.js +31 -28
  25. package/dist/config/i18n/en/labels.json.js +28 -4
  26. package/dist/config/i18n/en/tooltips.json.js +2 -1
  27. package/dist/enums/extensions/recommendationBlock.js +11 -12
  28. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +20 -19
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +70 -98
  30. package/dist/guido.css +1 -1
  31. package/dist/node_modules/@vueuse/core/index.js +102 -0
  32. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  33. package/dist/package.json.js +1 -1
  34. package/dist/sprite.svg +6 -0
  35. package/dist/src/@types/config/schemas.d.ts +4 -0
  36. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  37. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  40. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  41. package/dist/src/composables/useActionsApi.d.ts +2 -2
  42. package/dist/src/composables/useConfig.d.ts +2 -0
  43. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  44. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -18
  45. package/dist/src/stores/config.d.ts +18 -0
  46. package/dist/src/stores/editor.d.ts +76 -0
  47. package/dist/src/stores/onboarding.d.ts +377 -0
  48. package/dist/src/stores/version-history.d.ts +1 -1
  49. package/dist/src/utils/timeUtil.d.ts +10 -0
  50. package/dist/static/styles/components/accessibility.css.js +140 -0
  51. package/dist/static/styles/components/recommendation-strategy.css.js +4 -1
  52. package/dist/static/styles/variables.css.js +1 -0
  53. package/dist/stores/editor.js +4 -1
  54. package/dist/stores/onboarding.js +16 -11
  55. package/dist/utils/timeUtil.js +7 -17
  56. package/package.json +2 -2
  57. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  58. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  59. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as h, boolean as o, 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,
@@ -68,22 +68,22 @@ const p = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), S = I(() => g({
71
+ }), f = I(() => g({
72
72
  text: e(t()),
73
73
  // eslint-disable-next-line camelcase -- backend field name
74
74
  tag_text: e(t()),
75
75
  value: e(t()),
76
- children: e(c(S)),
76
+ children: e(c(f)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(S))
78
+ select_items: e(c(f))
79
79
  })), N = k(
80
80
  t(),
81
- R(c(S), [])
81
+ R(c(f), [])
82
82
  ), P = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
86
- decimalCount: e(h([t(), n()])),
86
+ decimalCount: e(y([t(), n()])),
87
87
  /** Pinned product IDs (empty array when filter-driven) */
88
88
  productIds: e(c(r())),
89
89
  /** Whether the block requested live products at send time */
@@ -117,7 +117,7 @@ const p = {
117
117
  /** Block type marker used by some legacy variants */
118
118
  blockType: e(t()),
119
119
  /** Size variant marker (legacy data may use string or number) */
120
- size: e(h([t(), n()])),
120
+ size: e(y([t(), n()])),
121
121
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
122
  verticalResponsiveness: e(o()),
123
123
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -189,9 +189,9 @@ const p = {
189
189
  /** Email header settings */
190
190
  emailHeader: e(D, { senderName: "", subject: "" }),
191
191
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
192
- savedModulesFolderName: e(t(), f.SAVED_MODULES),
192
+ savedModulesFolderName: e(t(), S.SAVED_MODULES),
193
193
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
194
- defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
194
+ defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
195
195
  }), F = a({
196
196
  /** Whether to show the header bar */
197
197
  showHeader: e(o(), !0),
@@ -216,6 +216,8 @@ const p = {
216
216
  liquidSyntax: e(o(), !1),
217
217
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
218
218
  autosave: e(o(), !1),
219
+ /** Enable the Stripo Accessibility Checker control in the editor toolbar. */
220
+ accessibilityTesting: e(o(), !1),
219
221
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
220
222
  allowlistEnabled: e(o(), !1),
221
223
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
@@ -288,7 +290,7 @@ const p = {
288
290
  ...d.entries,
289
291
  type: u("custom"),
290
292
  /** Custom processor function */
291
- processor: y(
293
+ processor: h(
292
294
  (s) => typeof s == "function",
293
295
  "processor must be a function"
294
296
  )
@@ -308,7 +310,7 @@ const p = {
308
310
  * Return false to cancel the save operation.
309
311
  */
310
312
  externalValidation: e(
311
- y(
313
+ h(
312
314
  (s) => typeof s == "function",
313
315
  "externalValidation must be a function"
314
316
  )
@@ -344,7 +346,7 @@ export {
344
346
  G as CustomRuleSchema,
345
347
  B as DefaultBlockTypeSchema,
346
348
  N as DynamicContentListSchema,
347
- S as DynamicContentNodeSchema,
349
+ f as DynamicContentNodeSchema,
348
350
  E as DynamicContentSchema,
349
351
  O as EditorSchema,
350
352
  D as EmailHeaderSchema,
@@ -1,23 +1,21 @@
1
- import s from "./AssignStrategyDrawer.vue2.js";
1
+ import r from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
- var a = function() {
6
- var e = this, r = e._self._c, t = e._self._setupProxy;
7
- return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
- return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
9
- return t.store.openStrategyCreation();
10
- }, select: t.onSelect } })], 1)];
11
- }, proxy: !0 }], null, !1, 4266143898) }) : e._e();
12
- }, n = [], i = /* @__PURE__ */ o(
13
- s,
14
- a,
4
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var o = function() {
6
+ var e = this, s = e._self._c, t = e._self._setupProxy;
7
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
+ return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { select: t.onSelect } })], 1)];
9
+ }, proxy: !0 }], null, !1, 2542767044) }) : e._e();
10
+ }, n = [], i = /* @__PURE__ */ a(
11
+ r,
12
+ o,
15
13
  n,
16
14
  !1,
17
15
  null,
18
- "598fd738"
16
+ "2580a7d9"
19
17
  );
20
- const u = i.exports;
18
+ const y = i.exports;
21
19
  export {
22
- u as default
20
+ y as default
23
21
  };
@@ -1,50 +1,48 @@
1
- import { defineComponent as O, defineAsyncComponent as u, ref as f, computed as l, watch as S } from "vue";
1
+ import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
3
  import { useToaster as x } from "../../../../composables/useToaster.js";
4
4
  import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
5
  import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
6
  import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as d } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as I } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
+ import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
9
  import B from "./StrategyInfoBoxContent.vue.js";
10
- import { formatShortDate as N } from "../../../../utils/dateUtil.js";
11
- import { asText as T } from "../../../../utils/genericUtil.js";
12
- import { escapeHtml as b } from "../../../../utils/htmlEscape.js";
13
- import { InSkeleton as L } from "@useinsider/design-system-vue";
14
- const X = /* @__PURE__ */ O({
10
+ import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
+ import { asText as f } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as b } from "@useinsider/design-system-vue";
14
+ const W = /* @__PURE__ */ v({
15
15
  __name: "AssignStrategyDrawer",
16
16
  setup(k) {
17
17
  const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
18
- render: (n) => n(L, { props: { sizing: { width: t, height: r } } })
19
- }), _ = u({
18
+ render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
19
+ }), S = y({
20
20
  loader: async () => (await c()).OrgStrategyDetailModal,
21
21
  loadingComponent: g(480, 240),
22
22
  delay: 0
23
- }), v = u({
23
+ }), T = y({
24
24
  loader: async () => (await c()).OrgStrategyDropdown,
25
25
  loadingComponent: g(240, 42),
26
26
  delay: 0
27
- }), a = A(), e = I(), { showToaster: i } = x(), s = f(null), o = f(!1), D = l(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : ""), m = () => {
28
- e.lastCreatedStrategyId && (s.value = e.lastCreatedStrategyId, o.value = !1, e.lastCreatedStrategyId = null);
29
- };
30
- S(() => e.assignStrategyDrawerStatus, (t) => {
27
+ }), o = A(), e = C(), { showToaster: s } = x(), n = u(null), i = u(!1), _ = l(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
28
+ O(() => e.assignStrategyDrawerStatus, (t) => {
31
29
  if (!t)
32
30
  return;
33
31
  const { strategyId: r } = e.recommendationConfigs;
34
- s.value = r || null, o.value = !1, e.fetchStrategies().then(m).catch(() => {
35
- i({
36
- type: d.Error,
37
- message: a("discovery-strategy.error-description")
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
34
+ type: m.Error,
35
+ message: o("discovery-strategy.error-description")
38
36
  });
39
37
  });
40
- }), S(() => e.lastCreatedStrategyId, m);
38
+ });
41
39
  const p = (t) => {
42
- const r = T(t.updated_at || t.created_at);
40
+ const r = f(t.updated_at || t.created_at);
43
41
  if (!r)
44
42
  return "";
45
- const n = N(r, E);
46
- return a("recommendation-strategy.last-updated-on", { value: n });
47
- }, w = l(() => e.strategies.map((t) => ({
43
+ const a = I(r, E);
44
+ return o("recommendation-strategy.last-updated-on", { value: a });
45
+ }, D = l(() => e.strategies.map((t) => ({
48
46
  text: t.name,
49
47
  value: t.strategy_id,
50
48
  infoBoxProps: {
@@ -52,57 +50,57 @@ const X = /* @__PURE__ */ O({
52
50
  theme: "light",
53
51
  variant: "information",
54
52
  className: "assign-strategy-info-box",
55
- titleText: b(T(t.name)),
53
+ titleText: N(f(t.name)),
56
54
  descriptionStatus: !0,
57
55
  descriptionText: p(t),
58
56
  slot: B,
59
57
  slotProps: { strategy: t }
60
58
  }
61
- }))), y = l(() => {
62
- const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
63
61
  return t ? { ...t, fallback_config: null } : null;
64
- }), C = l(() => ({
62
+ }), w = l(() => ({
65
63
  primaryButton: {
66
64
  styling: "solid",
67
65
  type: "primary",
68
- labelText: a("products.assign-btn")
66
+ labelText: o("products.assign-btn")
69
67
  },
70
68
  cancelOrBackButton: {
71
69
  styling: "ghost",
72
70
  type: "secondary",
73
- labelText: a("products.cancel")
71
+ labelText: o("products.cancel")
74
72
  }
75
73
  }));
76
- return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: _, OrgStrategyDropdown: v, trans: a, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: o, drawerDescription: D, consumeLastCreatedStrategy: m, lastUpdatedText: p, strategyOptions: w, selectedStrategy: y, footerButtonGroupOptions: C, closeDrawer: () => {
74
+ return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: S, OrgStrategyDropdown: T, trans: o, store: e, showToaster: s, selectedStrategyId: n, showSelectionError: i, drawerDescription: _, lastUpdatedText: p, strategyOptions: D, selectedStrategy: d, footerButtonGroupOptions: w, closeDrawer: () => {
77
75
  e.closeAssignStrategyDrawer();
78
76
  }, assignStrategy: async () => {
79
- const t = y.value;
77
+ const t = d.value;
80
78
  if (!t) {
81
- o.value = !0;
79
+ i.value = !0;
82
80
  return;
83
81
  }
84
82
  let r = "";
85
83
  try {
86
84
  r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
87
- } catch (n) {
88
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
85
+ } catch (a) {
86
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
89
87
  }
90
88
  if (!r) {
91
- i({
92
- type: d.Error,
93
- message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
89
+ s({
90
+ type: m.Error,
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
94
92
  });
95
93
  return;
96
94
  }
97
- e.assignStrategy(t), i({
98
- type: d.Success,
99
- message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
95
+ e.assignStrategy(t), s({
96
+ type: m.Success,
97
+ message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
100
98
  }), e.closeAssignStrategyDrawer();
101
99
  }, onSelect: (t) => {
102
- s.value = t.value, o.value = !1;
100
+ n.value = t.value, i.value = !1;
103
101
  } };
104
102
  }
105
103
  });
106
104
  export {
107
- X as default
105
+ W as default
108
106
  };
@@ -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,27 @@
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
+ // Stripped like the other two: copy that emits {boldEnd} before {boldStart} leaves a
16
+ // stray marker in this slice, which is exactly the leak the guard above prevents.
17
+ before: s(e.slice(0, r)),
18
+ word: s(e.slice(r + t.length, d)),
19
+ after: s(e.slice(d + o.length))
20
+ };
21
+ });
22
+ return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
23
+ }
24
+ });
25
+ export {
26
+ j as default
27
+ };
@@ -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
- "6e711fd7"
18
+ "55bd627b"
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,66 +1,50 @@
1
- import { defineComponent as O, ref as n, computed as h } from "vue";
2
- import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
- import { useConfig as b } from "../../../composables/useConfig.js";
4
- import { useExport as k } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as F } from "../../../composables/useSave.js";
8
- import { useTranslations as L } from "../../../composables/useTranslations.js";
9
- import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
- import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
- import { useEditorStore as I } from "../../../stores/editor.js";
12
- import { useTemplateStore as P } from "../../../stores/template.js";
13
- import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
- import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
- import { storeToRefs as J } from "pinia";
16
- import K from "./MigrationConfirmModal.vue.js";
17
- const ut = /* @__PURE__ */ O({
1
+ import { defineComponent as C, ref as g } from "vue";
2
+ import { useActionsApi as y } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as T } from "../../../composables/useConfig.js";
4
+ import { useTestEmailClick as M } from "../../../composables/useGuidoActions.js";
5
+ import { useHtmlCompiler as h } from "../../../composables/useHtmlCompiler.js";
6
+ import { useSave as x } from "../../../composables/useSave.js";
7
+ import { useTranslations as A } from "../../../composables/useTranslations.js";
8
+ import { useLiquidValidator as V } from "../../../composables/validators/useLiquidValidator.js";
9
+ import { useEditorStore as q } from "../../../stores/editor.js";
10
+ import { useTemplateStore as w } from "../../../stores/template.js";
11
+ import { getTooltipOptions as H } from "../../../utils/tooltipUtils.js";
12
+ import { InButtonV2 as k } from "@useinsider/design-system-vue";
13
+ import { storeToRefs as F } from "pinia";
14
+ import L from "./EditorActionsMenu.vue.js";
15
+ import R from "./MigrationConfirmModal.vue.js";
16
+ const Z = /* @__PURE__ */ C({
18
17
  __name: "EditorActions",
19
- setup(N, { expose: x }) {
20
- const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
21
- if (e.isVersionHistoryOpen) {
22
- p();
23
- return;
24
- }
25
- c();
26
- }, w = async () => {
27
- i.value = !0, await m(), i.value = !1;
28
- }, _ = () => {
29
- e.isSaveAsTemplateDrawerOpen = !0;
30
- }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
31
- () => {
32
- var t, o;
33
- return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
- }
35
- ), V = async (t) => {
36
- r.value = !0, t || (e.loadingStatus = !0);
37
- const o = await u(t);
38
- return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
39
- }, E = (t) => {
18
+ setup(b, { expose: v }) {
19
+ const { config: S, isFeatureEnabled: a } = T(), { save: r } = x(), { getCompiledEmail: s } = y(), { compileHtml: n } = h(), { validateLiquidSyntax: m } = V(), e = q(), l = w(), { hasMigrations: f } = F(l), E = A(), i = g(!1), u = g(), c = M(), p = async (t) => {
20
+ i.value = !0, t || (e.loadingStatus = !0);
21
+ const o = await r(t);
22
+ return i.value = !1, !t && !o && (e.loadingStatus = !1), o;
23
+ }, d = (t) => {
40
24
  var o;
41
- if (!t && g.value) {
42
- (o = S.value) == null || o.open();
25
+ if (!t && f.value) {
26
+ (o = u.value) == null || o.open();
43
27
  return;
44
28
  }
45
- return V(t);
46
- }, M = async () => {
47
- if (l("liquidSyntax")) {
29
+ return p(t);
30
+ }, _ = async () => {
31
+ if (a("liquidSyntax")) {
48
32
  e.loadingStatus = !0;
49
33
  try {
50
- const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
- if (!await v(o))
34
+ const { html: t } = await s({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = n(t);
35
+ if (!await m(o))
52
36
  return;
53
37
  } finally {
54
38
  e.loadingStatus = !1;
55
39
  }
56
40
  }
57
- H();
41
+ c();
58
42
  };
59
- return x({
60
- handleSave: E
61
- }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
43
+ return v({
44
+ handleSave: d
45
+ }), { __sfc: !0, config: S, isFeatureEnabled: a, save: r, getCompiledEmail: s, compileHtml: n, validateLiquidSyntax: m, editorStore: e, templateStore: l, hasMigrations: f, trans: E, isSaving: i, migrationModalRef: u, testEmailClick: c, executeSave: p, handleSave: d, handleTestEmail: _, getTooltipOptions: H, InButtonV2: k, EditorActionsMenu: L, MigrationConfirmModal: R };
62
46
  }
63
47
  });
64
48
  export {
65
- ut as default
49
+ Z as default
66
50
  };
@@ -0,0 +1,20 @@
1
+ import i from "./EditorActionsMenu.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { ref: "root", staticClass: "editor-actions-menu p-r" }, [e(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(l) {
7
+ t.isOpen = !t.isOpen;
8
+ } } }), t.isOpen ? e("div", { staticClass: "editor-actions-menu__panel p-a" }, [t.isAutosaveVisible ? [e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-53" }, [s._v(" " + s._s(t.trans("email-editor.preferences")) + " ")]), e("div", { staticClass: "editor-actions-menu__row editor-actions-menu__row_static d-f a-i-c j-c-s-b" }, [e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.auto-save")))]), e(t.InToggle, { attrs: { id: "guido__kebab-autosave-toggle", name: "guido-kebab-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggleAutosave } })], 1), e("div", { staticClass: "editor-actions-menu__divider" })] : s._e(), e("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-53" }, [s._v(" " + s._s(t.trans("email-editor.actions")) + " ")]), t.isVersionHistoryVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-version-history", type: "button", disabled: t.editorStore.isVersionHistoryButtonDisabled }, on: { click: t.handleVersionHistory } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-architect-version-history", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.version-history")))])], 1) : s._e(), t.isAccessibilityVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-accessibility", type: "button", disabled: t.editorStore.loadingStatus }, on: { click: t.handleAccessibility } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-accessibility", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.accessibility-test")))])], 1) : s._e(), t.isSaveAsVisible ? e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-save-as", type: "button", disabled: t.editorStore.isSaveAsButtonDisabled }, on: { click: t.handleSaveAs } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-newsletter-save-as-template", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("newsletter.save-templates")))])], 1) : s._e(), e("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-export", type: "button", disabled: t.isExporting || t.editorStore.isExportButtonDisabled }, on: { click: t.handleExport } }, [e(t.InIcons, { staticClass: "mr-2 editor-actions-menu__icon", attrs: { name: "line-export", size: "24" } }), e("span", { staticClass: "f-s-2" }, [s._v(s._s(t.trans("email-editor.export-html")))])], 1)], 2) : s._e()], 1);
9
+ }, n = [], r = /* @__PURE__ */ a(
10
+ i,
11
+ o,
12
+ n,
13
+ !1,
14
+ null,
15
+ "398fffb4"
16
+ );
17
+ const b = r.exports;
18
+ export {
19
+ b as default
20
+ };
@@ -0,0 +1,43 @@
1
+ import { defineComponent as E, ref as c, computed as i } from "vue";
2
+ import { useAccessibilityApi as x } from "../../../composables/useAccessibilityApi.js";
3
+ import { useConfig as h } from "../../../composables/useConfig.js";
4
+ import { useExport as w } from "../../../composables/useExport.js";
5
+ import { useTranslations as I } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as M } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useAutosaveStore as B } from "../../../stores/autosave.js";
8
+ import { useEditorStore as C } from "../../../stores/editor.js";
9
+ import { getTooltipOptions as P } from "../../../utils/tooltipUtils.js";
10
+ import { InToggle as k, InIcons as D, InButtonV2 as F } from "@useinsider/design-system-vue";
11
+ import { onClickOutside as j } from "../../../node_modules/@vueuse/core/index.js";
12
+ const Y = /* @__PURE__ */ E({
13
+ __name: "EditorActionsMenu",
14
+ setup(q) {
15
+ const { config: n, isFeatureEnabled: r } = h(), { exportHtml: l } = w(), { openVersionHistory: p, closeVersionHistory: u } = M(), { toggleAccessibilityTestingMode: m } = x(), s = C(), f = B(), A = I(), v = c(!1), a = c(!1), d = c(null), y = i(() => r("autosave")), g = i(
16
+ () => {
17
+ var e, t;
18
+ return !!((t = (e = n.value) == null ? void 0 : e.features) != null && t.versionHistory) && !s.isPreviewModeOpen;
19
+ }
20
+ ), V = i(
21
+ () => r("accessibilityTesting") && !s.isPreviewModeOpen
22
+ ), b = i(() => {
23
+ var e, t;
24
+ return !!((t = (e = n.value) == null ? void 0 : e.features) != null && t.saveAsTemplate);
25
+ }), o = () => {
26
+ v.value = !1;
27
+ }, H = () => {
28
+ s.isVersionHistoryOpen ? u() : p(), o();
29
+ }, O = () => {
30
+ m(), o();
31
+ }, _ = () => {
32
+ s.isSaveAsTemplateDrawerOpen = !0, o();
33
+ }, S = async () => {
34
+ a.value = !0, await l(), a.value = !1, o();
35
+ }, T = (e) => {
36
+ f.isOn = e;
37
+ };
38
+ return j(d, o), { __sfc: !0, config: n, isFeatureEnabled: r, exportHtml: l, openVersionHistory: p, closeVersionHistory: u, toggleAccessibilityTestingMode: m, editorStore: s, autosaveStore: f, trans: A, isOpen: v, isExporting: a, root: d, isAutosaveVisible: y, isVersionHistoryVisible: g, isAccessibilityVisible: V, isSaveAsVisible: b, close: o, handleVersionHistory: H, handleAccessibility: O, handleSaveAs: _, handleExport: S, toggleAutosave: T, getTooltipOptions: P, InButtonV2: F, InIcons: D, InToggle: k };
39
+ }
40
+ });
41
+ export {
42
+ Y as default
43
+ };
@@ -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
+ "2f127fb6"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {