@useinsider/guido 3.17.0-beta.6b602e7 → 3.17.0-beta.6f780fd

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 (71) hide show
  1. package/dist/@types/config/schemas.js +15 -13
  2. package/dist/components/Guido.vue.js +4 -4
  3. package/dist/components/Guido.vue2.js +46 -48
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
  6. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  7. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +21 -0
  8. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  9. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  10. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  11. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +39 -0
  12. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  13. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  14. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  15. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  16. package/dist/components/organisms/header/RightSlot.vue.js +7 -6
  17. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  18. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  19. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  20. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  21. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  22. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
  23. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +74 -0
  24. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
  25. package/dist/composables/useAccessibilityApi.js +31 -0
  26. package/dist/composables/useCustomInterfaceAppearance.js +44 -45
  27. package/dist/config/i18n/en/labels.json.js +28 -4
  28. package/dist/enums/extensions/recommendationBlock.js +1 -2
  29. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
  30. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +31 -66
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +49 -90
  32. package/dist/guido.css +1 -1
  33. package/dist/node_modules/@vueuse/core/index.js +102 -0
  34. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  35. package/dist/services/recommendationApi.js +52 -61
  36. package/dist/sprite.svg +6 -0
  37. package/dist/src/@types/config/schemas.d.ts +4 -0
  38. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  40. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  41. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  42. package/dist/src/composables/useActionsApi.d.ts +2 -2
  43. package/dist/src/composables/useConfig.d.ts +2 -0
  44. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  45. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -1
  46. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -54
  47. package/dist/src/services/recommendationApi.d.ts +1 -2
  48. package/dist/src/stores/config.d.ts +18 -0
  49. package/dist/src/stores/editor.d.ts +76 -0
  50. package/dist/src/stores/onboarding.d.ts +377 -0
  51. package/dist/src/stores/version-history.d.ts +1 -1
  52. package/dist/src/utils/timeUtil.d.ts +10 -0
  53. package/dist/static/styles/components/accessibility.css.js +137 -0
  54. package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
  55. package/dist/static/styles/variables.css.js +1 -0
  56. package/dist/stores/editor.js +4 -1
  57. package/dist/stores/onboarding.js +16 -11
  58. package/dist/utils/timeUtil.js +7 -17
  59. package/package.json +1 -1
  60. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
  61. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
  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/composables/useLegacyStrategyConversion.js +0 -52
  65. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
  66. package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
  67. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
  68. package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
  69. package/dist/static/assets/icons/line-info.svg.js +0 -5
  70. /package/dist/src/components/organisms/{extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts → header/AutoSaveStatus.vue.d.ts} +0 -0
  71. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → EditorActionsMenu.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,
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = 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, { 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(), 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
9
  }, s = [], n = /* @__PURE__ */ i(
@@ -12,9 +12,9 @@ var t = function() {
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "d1f80922"
15
+ "5c588dc5"
16
16
  );
17
- const f = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- f as default
19
+ v as default
20
20
  };
@@ -1,30 +1,30 @@
1
- import { defineComponent as ee, defineAsyncComponent as m, ref as U, computed as u, watch as A, onMounted as te, onUnmounted as oe } from "vue";
2
- import { useCortexBlueprintBridge as ne } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as re } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as se } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as ae } from "../composables/usePartner.js";
6
- import { useStripo as ie } from "../composables/useStripo.js";
7
- import { useTimerClone as ce } from "../composables/useTimerClone.js";
1
+ import { defineComponent as Z, defineAsyncComponent as l, ref as A, computed as u, watch as U, onMounted as ee, onUnmounted as te } from "vue";
2
+ import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as se } from "../composables/usePartner.js";
6
+ import { useStripo as ae } from "../composables/useStripo.js";
7
+ import { useTimerClone as ie } from "../composables/useTimerClone.js";
8
8
  import { migrate as _ } from "../config/migrator/index.js";
9
9
  import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as de } from "../enums/onboarding.js";
10
+ import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
11
  import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import me from "./organisms/AutoSaveController.vue.js";
13
- import le from "./organisms/base/Toaster.vue.js";
14
- import ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import pe from "./organisms/header/HeaderWrapper.vue.js";
16
- import fe from "./organisms/LoadingWrapper.vue.js";
17
- import ye from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import ge from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as ve } from "../services/stripoApi.js";
20
- import { useConfigStore as Se } from "../stores/config.js";
21
- import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
12
+ import de from "./organisms/AutoSaveController.vue.js";
13
+ import me from "./organisms/base/Toaster.vue.js";
14
+ import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ue from "./organisms/header/HeaderWrapper.vue.js";
16
+ import pe from "./organisms/LoadingWrapper.vue.js";
17
+ import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ge } from "../services/stripoApi.js";
20
+ import { useConfigStore as ve } from "../stores/config.js";
21
+ import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
22
22
  import { useEditorStore as P } from "../stores/editor.js";
23
- import { usePreviewStore as be } from "../stores/preview.js";
24
- import { useTemplateStore as Ee } from "../stores/template.js";
25
- import { useUnsubscribeStore as we } from "../stores/unsubscribe.js";
23
+ import { usePreviewStore as he } from "../stores/preview.js";
24
+ import { useTemplateStore as be } from "../stores/template.js";
25
+ import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
26
26
  import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
27
- const Je = /* @__PURE__ */ ee({
27
+ const je = /* @__PURE__ */ Z({
28
28
  __name: "Guido",
29
29
  props: {
30
30
  config: null,
@@ -32,25 +32,23 @@ const Je = /* @__PURE__ */ ee({
32
32
  },
33
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
34
  setup(x, { expose: G, emit: r }) {
35
- const a = x, H = m(
35
+ const a = x, H = l(
36
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), $ = m(
37
+ ), $ = l(
38
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), z = m(
39
+ ), z = l(
40
40
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), q = m(
41
+ ), q = l(
42
42
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
43
- ), K = m(
44
- () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
45
- ), h = U(), p = U(), f = he(), b = we(), o = Se();
43
+ ), h = A(), p = A(), f = Se(), b = Ee(), o = ve();
46
44
  a.ready && o.init(a.config);
47
- const c = P(), V = be(), l = u(() => c.hasChanges), { isTestPartner: j } = ae(), E = () => {
45
+ const c = P(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), E = () => {
48
46
  var t;
49
47
  return (t = h.value) == null ? void 0 : t.handleSave(!0);
50
48
  }, w = (t) => {
51
49
  c.loadingStatus = t;
52
50
  };
53
- ne(), se();
51
+ oe(), re();
54
52
  const y = () => {
55
53
  var t, e;
56
54
  return {
@@ -61,13 +59,13 @@ const Je = /* @__PURE__ */ ee({
61
59
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
62
60
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
63
61
  };
64
- }, { initPlugin: C, preloadRuntime: D } = ie(), { getDefaultTemplate: k } = ve(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ce(), J = u(() => {
62
+ }, { initPlugin: C, preloadRuntime: D } = ae(), { getDefaultTemplate: k } = ge(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ie(), j = u(() => {
65
63
  var t;
66
64
  return !((t = o.ui) != null && t.showHeader);
67
- }), Q = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), X = u(
65
+ }), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
68
66
  () => !!O().recommendationConfigs.strategyId
69
67
  );
70
- re({
68
+ ne({
71
69
  onBack: () => {
72
70
  console.debug("guido:back"), r("back");
73
71
  },
@@ -87,8 +85,8 @@ const Je = /* @__PURE__ */ ee({
87
85
  }, R = () => {
88
86
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
89
87
  };
90
- A(() => l.value, () => {
91
- r("on-change", l.value);
88
+ U(() => m.value, () => {
89
+ r("on-change", m.value);
92
90
  });
93
91
  const g = (t) => {
94
92
  const e = t, { attribute: s, position: d } = e.detail;
@@ -97,7 +95,7 @@ const Je = /* @__PURE__ */ ee({
97
95
  let i = null;
98
96
  const v = () => {
99
97
  var e;
100
- const t = document.querySelector(de);
98
+ const t = document.querySelector(ce);
101
99
  (e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
102
100
  }, S = async () => {
103
101
  var t;
@@ -111,32 +109,32 @@ const Je = /* @__PURE__ */ ee({
111
109
  css: d
112
110
  };
113
111
  n.html || (n = await k(), n.html = await _(n.html, M));
114
- const Y = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
115
- F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(Y, W(n.html)));
116
- const Z = {
112
+ const X = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
113
+ F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(X, W(n.html)));
114
+ const Y = {
117
115
  preselectedDynamicContentList: L,
118
116
  onReady: () => {
119
117
  console.debug("guido:ready"), r("ready");
120
118
  }
121
119
  };
122
- await C(n, y(), Z), f.selectedDynamicContentList = L;
120
+ await C(n, y(), Y), f.selectedDynamicContentList = L;
123
121
  } catch (e) {
124
122
  console.error("Failed to initialize Stripo editor:", e);
125
123
  }
126
124
  };
127
- return te(async () => {
125
+ return ee(async () => {
128
126
  var e;
129
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), Ee().$reset(), v();
127
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), be().$reset(), v();
130
128
  const t = (e = p.value) == null ? void 0 : e.parentElement;
131
129
  if (t && (i = new ResizeObserver(v), i.observe(t)), D(), a.ready)
132
130
  await S();
133
131
  else {
134
- const s = A(() => a.ready, (d) => {
132
+ const s = U(() => a.ready, (d) => {
135
133
  d && (s(), S());
136
134
  });
137
135
  }
138
136
  document.addEventListener("dynamic-content:open", g);
139
- }), oe(() => {
137
+ }), te(() => {
140
138
  i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
141
139
  try {
142
140
  window.UIEditor.removeEditor();
@@ -149,12 +147,12 @@ const Je = /* @__PURE__ */ ee({
149
147
  insert: I,
150
148
  close: R
151
149
  },
152
- hasChanges: l,
150
+ hasChanges: m,
153
151
  saveSilent: E,
154
152
  setLoading: w
155
- }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, LegacyStrategyUpdatedModal: K, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: V, hasChanges: l, isTestPartner: j, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: J, isRrsEnabled: Q, hasAssignedStrategy: X, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: me, Toaster: le, FilterSelectionDrawer: ue, HeaderWrapper: pe, LoadingWrapper: fe, SaveAsTemplateDrawer: ye, UnsubscribeWrapper: ge };
153
+ }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: j, isRrsEnabled: J, hasAssignedStrategy: Q, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: de, Toaster: me, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ye };
156
154
  }
157
155
  });
158
156
  export {
159
- Je as default
157
+ je as default
160
158
  };
@@ -1,19 +1,19 @@
1
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() {
4
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var o = function() {
6
6
  var e = this, s = e._self._c, t = e._self._setupProxy;
7
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 || t.store.legacyConversionLoading, "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: { infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
9
- }, proxy: !0 }], null, !1, 239334473) }) : e._e();
10
- }, n = [], i = /* @__PURE__ */ o(
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
11
  r,
12
- a,
12
+ o,
13
13
  n,
14
14
  !1,
15
15
  null,
16
- "4019dc4d"
16
+ "2580a7d9"
17
17
  );
18
18
  const y = i.exports;
19
19
  export {
@@ -1,73 +1,48 @@
1
- import { defineComponent as h, defineAsyncComponent as T, ref as _, computed as s, watch as B } 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
- import { useLegacyStrategyConversion as I } from "../../../../composables/useLegacyStrategyConversion.js";
4
- import { useToaster as N } from "../../../../composables/useToaster.js";
5
- import { useTranslations as k } from "../../../../composables/useTranslations.js";
6
- import { DOTTED_DATE_LOCALE as P } from "../../../../enums/date.js";
7
- import { URLS as U } from "../../../../enums/extensions/recommendationBlock.js";
8
- import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
9
- import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
10
- import G from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as M } from "../../../../utils/dateUtil.js";
12
- import { asText as D } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as x } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as R } from "@useinsider/design-system-vue";
15
- const st = /* @__PURE__ */ h({
3
+ import { useToaster as x } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
+ import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import B from "./StrategyInfoBoxContent.vue.js";
10
+ import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
+ import { asText as f } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as b } from "@useinsider/design-system-vue";
14
+ const W = /* @__PURE__ */ v({
16
15
  __name: "AssignStrategyDrawer",
17
- setup(H) {
18
- const l = () => import("@useinsider/design-system-organisms"), g = (t, a) => ({
19
- render: (n) => n(R, { props: { sizing: { width: t, height: a } } })
20
- }), O = T({
21
- loader: async () => (await l()).OrgStrategyDetailModal,
16
+ setup(k) {
17
+ const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
18
+ render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
19
+ }), S = y({
20
+ loader: async () => (await c()).OrgStrategyDetailModal,
22
21
  loadingComponent: g(480, 240),
23
22
  delay: 0
24
- }), w = T({
25
- loader: async () => (await l()).OrgStrategyDropdown,
23
+ }), T = y({
24
+ loader: async () => (await c()).OrgStrategyDropdown,
26
25
  loadingComponent: g(240, 42),
27
26
  delay: 0
28
- }), r = k(), e = b(), { showToaster: i } = N(), { convertLegacyStrategy: u } = I(), o = _(null), y = "legacy", d = "guido__btn-update-legacy-strategy", c = _(!1), A = s(() => e.assignStrategyDrawerStatus ? r("email-editor.assign-strategy-description", { url: U.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
29
- B(() => 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) => {
30
29
  if (!t)
31
30
  return;
32
- const { strategyId: a } = e.recommendationConfigs;
33
- o.value = a || (e.isLegacyStrategyBlock ? y : null), c.value = !1, e.fetchStrategies().catch(() => {
34
- i({
35
- type: p.Error,
36
- message: r("discovery-strategy.error-description")
31
+ const { strategyId: r } = e.recommendationConfigs;
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
34
+ type: m.Error,
35
+ message: o("discovery-strategy.error-description")
37
36
  });
38
37
  });
39
38
  });
40
- const f = (t) => {
41
- const a = D(t.updated_at || t.created_at);
42
- if (!a)
39
+ const p = (t) => {
40
+ const r = f(t.updated_at || t.created_at);
41
+ if (!r)
43
42
  return "";
44
- const n = M(a, P);
45
- return r("recommendation-strategy.last-updated-on", { value: n });
46
- }, S = s(() => ({
47
- text: r("ds-steps.legacy-strategy"),
48
- value: y,
49
- infoBoxProps: {
50
- id: "strategy-info-legacy",
51
- theme: "light",
52
- variant: "information",
53
- className: "assign-strategy-info-box",
54
- titleText: x(r("ds-steps.legacy-strategy")),
55
- descriptionStatus: !0,
56
- descriptionText: r("statistics.legacy-strategy-description"),
57
- buttonOptions: [{
58
- id: d,
59
- type: "primary",
60
- text: r("ds-steps.update"),
61
- loadingStatus: e.legacyConversionLoading,
62
- disabledStatus: e.legacyConversionLoading
63
- }]
64
- }
65
- })), E = async (t) => {
66
- if ((t == null ? void 0 : t.id) !== d)
67
- return;
68
- const a = await u();
69
- a && (o.value = a);
70
- }, m = s(() => 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) => ({
71
46
  text: t.name,
72
47
  value: t.strategy_id,
73
48
  infoBoxProps: {
@@ -75,57 +50,57 @@ const st = /* @__PURE__ */ h({
75
50
  theme: "light",
76
51
  variant: "information",
77
52
  className: "assign-strategy-info-box",
78
- titleText: x(D(t.name)),
53
+ titleText: N(f(t.name)),
79
54
  descriptionStatus: !0,
80
- descriptionText: f(t),
81
- slot: G,
55
+ descriptionText: p(t),
56
+ slot: B,
82
57
  slotProps: { strategy: t }
83
58
  }
84
- }))), C = s(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), v = s(() => {
85
- const t = e.strategies.find((a) => String(a.strategy_id) === String(o.value ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
86
61
  return t ? { ...t, fallback_config: null } : null;
87
- }), L = s(() => ({
62
+ }), w = l(() => ({
88
63
  primaryButton: {
89
64
  styling: "solid",
90
65
  type: "primary",
91
- labelText: r("products.assign-btn")
66
+ labelText: o("products.assign-btn")
92
67
  },
93
68
  cancelOrBackButton: {
94
69
  styling: "ghost",
95
70
  type: "secondary",
96
- labelText: r("products.cancel")
71
+ labelText: o("products.cancel")
97
72
  }
98
73
  }));
99
- return { __sfc: !0, loadOrganisms: l, skeleton: g, OrgStrategyDetailModal: O, OrgStrategyDropdown: w, trans: r, store: e, showToaster: i, convertLegacyStrategy: u, selectedStrategyId: o, LEGACY_OPTION_VALUE: y, LEGACY_UPDATE_BUTTON_ID: d, showSelectionError: c, drawerDescription: A, lastUpdatedText: f, legacyStrategyOption: S, onInfoBoxButtonClick: E, remoteStrategyOptions: m, strategyOptions: C, selectedStrategy: v, footerButtonGroupOptions: L, 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: () => {
100
75
  e.closeAssignStrategyDrawer();
101
76
  }, assignStrategy: async () => {
102
- const t = v.value;
77
+ const t = d.value;
103
78
  if (!t) {
104
- c.value = !0;
79
+ i.value = !0;
105
80
  return;
106
81
  }
107
- let a = "";
82
+ let r = "";
108
83
  try {
109
- a = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
110
- } catch (n) {
111
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
84
+ r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
85
+ } catch (a) {
86
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
112
87
  }
113
- if (!a) {
114
- i({
115
- type: p.Error,
116
- message: r("email-editor.strategy-assign-failed", { strategyName: t.name })
88
+ if (!r) {
89
+ s({
90
+ type: m.Error,
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
117
92
  });
118
93
  return;
119
94
  }
120
- e.assignStrategy(t), i({
121
- type: p.Success,
122
- message: r("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 })
123
98
  }), e.closeAssignStrategyDrawer();
124
99
  }, onSelect: (t) => {
125
- o.value = t.value, c.value = !1;
100
+ n.value = t.value, i.value = !1;
126
101
  } };
127
102
  }
128
103
  });
129
104
  export {
130
- st as default
105
+ W as default
131
106
  };
@@ -0,0 +1,17 @@
1
+ import e from "./AutoSaveStatus.vue2.js";
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var s = this, t = s._self._c, a = s._self._setupProxy;
5
+ return a.isFeatureEnabled("autosave") ? t("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? t("span", { staticClass: "d-f a-i-c f-s-1" }, [t(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), t("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? t("span", { staticClass: "f-s-1 t-c-53", domProps: { innerHTML: s._s(a.savedLabel) } }) : s._e()]) : s._e();
6
+ }, o = [], _ = /* @__PURE__ */ n(
7
+ e,
8
+ r,
9
+ o,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const u = _.exports;
15
+ export {
16
+ u as default
17
+ };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as i, computed as u } from "vue";
2
+ import { useConfig as d } from "../../../composables/useConfig.js";
3
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
4
+ import { useAutosaveStore as f, AUTOSAVE_STATUS as o } from "../../../stores/autosave.js";
5
+ import { autoSaveTimestamp as S } from "../../../utils/timeUtil.js";
6
+ import { InLoading as c } from "@useinsider/design-system-vue";
7
+ const g = /* @__PURE__ */ i({
8
+ __name: "AutoSaveStatus",
9
+ setup(v) {
10
+ const { isFeatureEnabled: a } = d(), t = f(), e = p(), s = u(() => {
11
+ if (t.status !== o.SAVED || !t.lastSavedAt)
12
+ return "";
13
+ const { isToday: r, time: m, date: n } = S(t.lastSavedAt);
14
+ return r ? e("email-editor.autosaved-at-today", { time: m }) : e("email-editor.autosaved-at-date", { date: n });
15
+ });
16
+ return { __sfc: !0, isFeatureEnabled: a, autosaveStore: t, trans: e, savedLabel: s, AUTOSAVE_STATUS: o, InLoading: c };
17
+ }
18
+ });
19
+ export {
20
+ g as default
21
+ };
@@ -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 e = this, i = e._self._c, t = e._self._setupProxy;
7
+ return i("div", { staticClass: "d-f a-i-c editor-actions" }, [t.editorStore.isPreviewModeOpen ? e._e() : i("div", { staticClass: "editor-actions__divider" }), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage && !t.editorStore.isPreviewModeOpen ? i(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 } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : i(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? e._e() : i("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? e._e() : i(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
+ } } }), i(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
+ "8aa5b2ca"
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
  };