@useinsider/guido 3.23.0-beta.2595053 → 3.23.0-beta.2df7606

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 (79) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +9 -8
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +111 -100
  5. package/dist/components/organisms/AutoSaveController.vue2.js +20 -10
  6. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +1 -1
  7. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +28 -28
  8. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +1 -1
  9. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +25 -25
  10. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  11. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  12. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  13. package/dist/components/organisms/header/EditorActions.vue2.js +58 -73
  14. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  15. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +99 -0
  16. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  17. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  18. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  19. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  20. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  21. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  22. package/dist/components/organisms/header/RightSlot.vue.js +11 -10
  23. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  24. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  25. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  26. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  27. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  28. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  29. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  30. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  31. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +60 -35
  32. package/dist/composables/useAccessibilityApi.js +51 -0
  33. package/dist/composables/useCustomInterfaceAppearance.js +42 -41
  34. package/dist/composables/useDisplayConditions.js +42 -41
  35. package/dist/composables/useTranslations.js +2 -1
  36. package/dist/config/i18n/en/labels.json.js +36 -4
  37. package/dist/config/i18n/en/tooltips.json.js +2 -1
  38. package/dist/extensions/DisplayConditions/control.js +32 -22
  39. package/dist/extensions/LinkTracking/writer.js +29 -23
  40. package/dist/guido.css +1 -1
  41. package/dist/package.json.js +1 -1
  42. package/dist/sprite.svg +10 -0
  43. package/dist/src/@types/config/schemas.d.ts +2 -0
  44. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
  45. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  46. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
  47. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
  48. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  49. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  50. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  51. package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
  52. package/dist/src/composables/useActionsApi.d.ts +2 -2
  53. package/dist/src/composables/useConfig.d.ts +2 -0
  54. package/dist/src/composables/useDisplayConditions.d.ts +1 -0
  55. package/dist/src/extensions/DisplayConditions/control.d.ts +1 -0
  56. package/dist/src/extensions/LinkTracking/writer.d.ts +1 -1
  57. package/dist/src/stores/autosave.d.ts +73 -1
  58. package/dist/src/stores/config.d.ts +21 -0
  59. package/dist/src/stores/editor.d.ts +109 -0
  60. package/dist/src/stores/onboarding.d.ts +966 -35
  61. package/dist/src/stores/version-history.d.ts +1 -1
  62. package/dist/src/utils/displayCondition.d.ts +2 -2
  63. package/dist/src/utils/linkTrackingIds.d.ts +2 -0
  64. package/dist/src/utils/templatePreparation.d.ts +1 -1
  65. package/dist/src/utils/timeUtil.d.ts +5 -8
  66. package/dist/static/stripo-runtime-manifest.json.js +1 -1
  67. package/dist/static/styles/components/accessibility.css.js +234 -0
  68. package/dist/static/styles/variables.css.js +2 -0
  69. package/dist/stores/autosave.js +12 -7
  70. package/dist/stores/editor.js +8 -3
  71. package/dist/stores/onboarding.js +48 -22
  72. package/dist/utils/displayCondition.js +11 -11
  73. package/dist/utils/linkTrackingIds.js +60 -59
  74. package/dist/utils/templatePreparation.js +61 -52
  75. package/dist/utils/timeUtil.js +6 -17
  76. package/package.json +2 -2
  77. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  78. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  79. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
package/README.md CHANGED
@@ -167,6 +167,7 @@ const config: GuidoConfigInput = {
167
167
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
168
168
  allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
169
169
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
170
+ accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
170
171
  },
171
172
 
172
173
  // Optional: Callbacks
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as n, transform as y, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as I, union as h, lazy as T } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
+ import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as n, transform as S, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const p = {
76
76
  value: t()
77
77
  })
78
78
  )
79
- }), f = T(() => C({
79
+ }), f = I(() => C({
80
80
  text: e(t()),
81
81
  // eslint-disable-next-line camelcase -- backend field name
82
82
  tag_text: e(t()),
@@ -176,7 +176,7 @@ const p = {
176
176
  trackIdCounter: e(
177
177
  i(
178
178
  s(),
179
- y((c) => Number.isFinite(c) ? Math.max(0, Math.floor(c)) : 0)
179
+ S((c) => Number.isFinite(c) ? Math.max(0, Math.floor(c)) : 0)
180
180
  ),
181
181
  0
182
182
  ),
@@ -190,7 +190,7 @@ const p = {
190
190
  recommendationCampaignUrls: e(
191
191
  i(
192
192
  r(),
193
- y((c) => c && typeof c == "object" ? { ...c } : void 0)
193
+ S((c) => c && typeof c == "object" ? { ...c } : void 0)
194
194
  )
195
195
  ),
196
196
  /** Migration-only inputs (legacy block configs) */
@@ -210,9 +210,9 @@ const p = {
210
210
  /** Email header settings */
211
211
  emailHeader: e(v, { senderName: "", subject: "" }),
212
212
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
213
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
213
+ savedModulesFolderName: e(t(), y.SAVED_MODULES),
214
214
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
215
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
215
+ defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
216
216
  }), F = a({
217
217
  /** Whether to show the header bar */
218
218
  showHeader: e(o(), !0),
@@ -239,6 +239,7 @@ const p = {
239
239
  liquidSyntax: e(o(), !1),
240
240
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
241
241
  autosave: e(o(), !1),
242
+ accessibilityTesting: e(o(), !1),
242
243
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
243
244
  allowlistEnabled: e(o(), !1),
244
245
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
@@ -317,7 +318,7 @@ const p = {
317
318
  (c) => typeof c == "function",
318
319
  "processor must be a function"
319
320
  )
320
- }), V = I("type", [
321
+ }), V = T("type", [
321
322
  H,
322
323
  _,
323
324
  q,
@@ -1,20 +1,20 @@
1
- import i from "./Guido.vue2.js";
1
+ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import o from "../_virtual/_plugin-vue2_normalizer.js";
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.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, s = [], n = /* @__PURE__ */ o(
10
- i,
9
+ }, s = [], n = /* @__PURE__ */ i(
10
+ o,
11
11
  t,
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "e96ff469"
15
+ "ab777dca"
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,67 +1,77 @@
1
- import { defineComponent as le, defineAsyncComponent as d, ref as W, computed as p, watch as H, onMounted as pe, onUnmounted as ue } from "vue";
2
- import { useCortexBlueprintBridge as fe } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as ye } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as ge } from "../composables/useEditorOpenMetrics.js";
5
- import { provideGuidoActions as ve } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as Se } from "../composables/useGuidoStateBridge.js";
7
- import { usePartner as be } from "../composables/usePartner.js";
8
- import { useSaveValidationRollout as he } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ee } from "../composables/useStripo.js";
10
- import { useTimerClone as Ce } from "../composables/useTimerClone.js";
11
- import { migrate as De } from "../config/migrator/index.js";
12
- import { ModuleFolderDefaults as G } from "../enums/defaults.js";
13
- import { RIBBON_SELECTOR as we } from "../enums/onboarding.js";
14
- import { useRecommendationExtensionStore as V, disposeStrategyPageReturnListeners as ke } from "../extensions/Blocks/Recommendation/store/recommendation.js";
15
- import { disposeUnsubscribeListeners as Ie } from "../extensions/Blocks/Unsubscribe/block.js";
16
- import { disposeDisplayConditionRequest as Re } from "../extensions/DisplayConditions/bridge.js";
17
- import { disposeTrackingIdWriter as Te } from "../extensions/LinkTracking/writer.js";
18
- import Fe from "./organisms/AutoSaveController.vue.js";
19
- import Me from "./organisms/base/AuthErrorModal.vue.js";
20
- import Le from "./organisms/base/Toaster.vue.js";
21
- import Ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
22
- import Ne from "./organisms/header/HeaderWrapper.vue.js";
23
- import _e from "./organisms/LoadingWrapper.vue.js";
24
- import xe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
25
- import Ae from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
26
- import Be from "./organisms/validation/ValidationErrorDrawer.vue.js";
27
- import { useStripoApi as Oe } from "../services/stripoApi.js";
28
- import { useConfigStore as Pe } from "../stores/config.js";
29
- import { useDynamicContentStore as We } from "../stores/dynamic-content.js";
1
+ import { defineComponent as ue, defineAsyncComponent as m, ref as W, computed as p, watch as G, onMounted as fe, onUnmounted as ye } from "vue";
2
+ import { useCortexBlueprintBridge as ge } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as ve } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as be } from "../composables/useEditorOpenMetrics.js";
5
+ import { provideGuidoActions as Se } from "../composables/useGuidoActions.js";
6
+ import { useGuidoStateBridge as he } from "../composables/useGuidoStateBridge.js";
7
+ import { usePartner as Ee } from "../composables/usePartner.js";
8
+ import { useSaveValidationRollout as Ce } from "../composables/useSaveValidationRollout.js";
9
+ import { useStripo as De } from "../composables/useStripo.js";
10
+ import { useTimerClone as Te } from "../composables/useTimerClone.js";
11
+ import { useToaster as ke } from "../composables/useToaster.js";
12
+ import { useTranslations as we } from "../composables/useTranslations.js";
13
+ import { migrate as Ie } from "../config/migrator/index.js";
14
+ import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
15
+ import { RIBBON_SELECTOR as Re } from "../enums/onboarding.js";
16
+ import { ToasterTypeOptions as Fe } from "../enums/toaster.js";
17
+ import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Me } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
+ import { disposeUnsubscribeListeners as Le } from "../extensions/Blocks/Unsubscribe/block.js";
19
+ import { disposeDisplayConditionRequest as Oe } from "../extensions/DisplayConditions/bridge.js";
20
+ import { disposeTrackingIdWriter as Ue } from "../extensions/LinkTracking/writer.js";
21
+ import Ne from "./organisms/AutoSaveController.vue.js";
22
+ import _e from "./organisms/base/AuthErrorModal.vue.js";
23
+ import Ae from "./organisms/base/Toaster.vue.js";
24
+ import xe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
25
+ import Be from "./organisms/header/HeaderWrapper.vue.js";
26
+ import He from "./organisms/LoadingWrapper.vue.js";
27
+ import Pe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
28
+ import Ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
29
+ import We from "./organisms/validation/ValidationErrorDrawer.vue.js";
30
+ import { useStripoApi as Ge } from "../services/stripoApi.js";
31
+ import { useConfigStore as $e } from "../stores/config.js";
32
+ import { useDynamicContentStore as ze } from "../stores/dynamic-content.js";
30
33
  import { useEditorStore as C } from "../stores/editor.js";
31
- import { usePreviewStore as He } from "../stores/preview.js";
32
- import { useSaveValidationStore as Ge } from "../stores/save-validation.js";
33
- import { useTemplateStore as Ve } from "../stores/template.js";
34
- import { useUnsubscribeStore as $e } from "../stores/unsubscribe.js";
35
- import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
36
- const It = /* @__PURE__ */ le({
34
+ import { usePreviewStore as qe } from "../stores/preview.js";
35
+ import { useSaveValidationStore as Ke } from "../stores/save-validation.js";
36
+ import { useTemplateStore as je } from "../stores/template.js";
37
+ import { useUnsubscribeStore as Je } from "../stores/unsubscribe.js";
38
+ import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
39
+ const Nt = /* @__PURE__ */ ue({
37
40
  __name: "Guido",
38
41
  props: {
39
42
  config: null,
40
43
  ready: { type: Boolean, default: !0 }
41
44
  },
42
45
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
43
- setup(z, { expose: q, emit: a }) {
44
- const s = z, n = ge(), K = d(
46
+ setup(K, { expose: j, emit: i }) {
47
+ const a = K, n = be(), J = m(
45
48
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
46
- ), j = d(
49
+ ), Q = m(
47
50
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
48
- ), J = d(
51
+ ), X = m(
49
52
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
50
- ), Q = d(
53
+ ), Y = m(
51
54
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
52
- ), X = d(
55
+ ), Z = m(
53
56
  () => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
54
- ), Y = d(
57
+ ), D = W(), ee = m(
55
58
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
56
- ), D = W(), y = W(), g = We(), w = $e(), o = Pe();
57
- s.ready && o.init(s.config);
58
- const m = C(), Z = He(), u = p(() => m.hasChanges), { isTestPartner: ee } = be(), { isEnabled: te, loadRollout: k } = he(), I = () => {
59
+ ), y = W(), g = ze(), T = Je(), o = $e();
60
+ a.ready && o.init(a.config);
61
+ const c = C(), te = qe(), u = p(() => c.hasChanges), { isTestPartner: oe } = Ee(), { isEnabled: re, loadRollout: k } = Ce(), { showToaster: w } = ke(), I = we(), R = () => {
59
62
  var t;
60
- return (t = D.value) == null ? void 0 : t.handleSave(!0);
61
- }, R = (t) => {
62
- m.loadingStatus = t;
63
+ if (c.isVersionHistoryOpen) {
64
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
65
+ type: Fe.Warning,
66
+ message: I("email-editor.save-blocked-outside-editor")
67
+ });
68
+ return;
69
+ }
70
+ return (t = D.value) == null ? void 0 : t.saveSilent();
71
+ }, F = (t) => {
72
+ c.loadingStatus = t;
63
73
  };
64
- fe(), Se();
74
+ ge(), he();
65
75
  const v = () => {
66
76
  var t, e;
67
77
  return {
@@ -69,127 +79,128 @@ const It = /* @__PURE__ */ le({
69
79
  userId: o.userId,
70
80
  username: o.username,
71
81
  partnerName: o.partnerName,
72
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
73
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
82
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
83
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
74
84
  };
75
- }, { initPlugin: T, preloadRuntime: F } = Ee(n), { runExclusive: M, beginMount: L, isCurrentMount: S } = ye();
85
+ }, { initPlugin: M, preloadRuntime: L } = De(n), { runExclusive: O, beginMount: U, isCurrentMount: b } = ve();
76
86
  let f = 0;
77
- const { getDefaultTemplate: U } = Oe(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Ce(), oe = p(() => {
87
+ const { getDefaultTemplate: N } = Ge(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Te(), ne = p(() => {
78
88
  var t;
79
89
  return !((t = o.ui) != null && t.showHeader);
80
- }), re = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ne = p(() => o.externalDisplayConditions), ae = p(
81
- () => !!V().recommendationConfigs.strategyId
90
+ }), ie = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), se = p(() => o.externalDisplayConditions), ae = p(
91
+ () => !!z().recommendationConfigs.strategyId
82
92
  );
83
- ve({
93
+ Se({
84
94
  onBack: () => {
85
- console.debug("guido:back"), a("back");
95
+ console.debug("guido:back"), i("back");
86
96
  },
87
97
  onSaveStart: () => {
88
- console.debug("guido:save:start"), a("save:start");
98
+ console.debug("guido:save:start"), i("save:start");
89
99
  },
90
100
  onSaveComplete: (t) => {
91
101
  const e = { ...t, metadata: v() };
92
- console.debug("guido:save:complete", e), a("save:complete", e);
102
+ console.debug("guido:save:complete", e), i("save:complete", e);
93
103
  },
94
104
  onTestEmailClick: () => {
95
- console.debug("guido:test-email:click"), a("test-email:click");
105
+ console.debug("guido:test-email:click"), i("test-email:click");
96
106
  }
97
107
  });
98
108
  const x = (t) => {
99
109
  console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
100
- }, A = () => {
110
+ }, B = () => {
101
111
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
102
112
  };
103
- H(() => u.value, () => {
104
- a("on-change", u.value);
113
+ G(() => u.value, () => {
114
+ i("on-change", u.value);
105
115
  });
106
- const b = (t) => {
107
- const e = t, { attribute: i, position: l } = e.detail;
108
- console.debug("dynamic-content:open", e.detail), a("dynamic-content:open", i, l);
116
+ const S = (t) => {
117
+ const e = t, { attribute: s, position: l } = e.detail;
118
+ console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, l);
109
119
  };
110
- let c = null;
120
+ let d = null;
111
121
  const h = () => {
112
122
  var e;
113
- const t = document.querySelector(we);
123
+ const t = document.querySelector(Re);
114
124
  (e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
115
125
  }, E = async () => {
116
126
  var t;
117
127
  n.mark("host_ready");
118
128
  try {
119
- o.initialized || o.init(s.config), m.templateId = o.templateId, n.setContext({
129
+ o.initialized || o.init(a.config), c.templateId = o.templateId, n.setContext({
120
130
  partnerName: o.partnerName,
121
131
  productType: o.productType,
122
132
  templateId: o.templateId,
123
133
  variationId: o.variationId
124
134
  });
125
- const e = o.template, i = (e == null ? void 0 : e.html) || "", l = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
126
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
127
- const ie = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, O = o.isFeatureEnabled("linkTrackingIds"), se = {
135
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", l = (e == null ? void 0 : e.css) || "", H = (e == null ? void 0 : e.preselectedDynamicContent) || [];
136
+ T.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
137
+ const ce = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, P = o.isFeatureEnabled("linkTrackingIds"), de = {
128
138
  partnerName: o.partnerName,
129
139
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
130
140
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
131
- }, P = (me) => n.timed(
141
+ }, V = (pe) => n.timed(
132
142
  "migration",
133
- () => De(me, ie, se)
143
+ () => Ie(pe, ce, de)
134
144
  );
135
145
  let r = {
136
- html: i && await P(i),
146
+ html: s && await V(s),
137
147
  css: l
138
148
  };
139
- r.html || (r = await n.timed("default_template", () => U()), r.html = await P(r.html));
140
- const ce = O ? $(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
141
- _(r.html) && (r.html = await n.timed("timer_clone", () => N(r.html))), O && (m.trackIdSessionFloor = Math.max(ce, $(r.html)));
142
- const de = {
143
- preselectedDynamicContentList: B,
149
+ r.html || (r = await n.timed("default_template", () => N()), r.html = await V(r.html));
150
+ const me = P ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
151
+ A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), P && (c.trackIdSessionFloor = Math.max(me, q(r.html)));
152
+ const le = {
153
+ preselectedDynamicContentList: H,
144
154
  onReady: () => {
145
- console.debug("guido:ready"), a("ready");
155
+ console.debug("guido:ready"), i("ready");
146
156
  }
147
157
  };
148
- f = L(), await T(r, v(), de), g.selectedDynamicContentList = B;
158
+ f = U(), await M(r, v(), le), g.selectedDynamicContentList = H;
149
159
  } catch (e) {
150
160
  console.error("Failed to initialize Stripo editor:", e), n.markFailed();
151
161
  }
152
162
  };
153
- return pe(async () => {
163
+ return fe(async () => {
154
164
  var e;
155
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), V().$reset(), C().$reset(), Ve().$reset(), Ge().$reset(), k(), h();
165
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), je().$reset(), Ke().$reset(), k(), h();
156
166
  const t = (e = y.value) == null ? void 0 : e.parentElement;
157
- if (t && (c = new ResizeObserver(h), c.observe(t)), F(), s.ready)
167
+ if (t && (d = new ResizeObserver(h), d.observe(t)), L(), a.ready)
158
168
  await E();
159
169
  else {
160
- const i = H(() => s.ready, (l) => {
161
- l && (i(), E());
170
+ const s = G(() => a.ready, (l) => {
171
+ l && (s(), E());
162
172
  });
163
173
  }
164
- document.addEventListener("dynamic-content:open", b);
165
- }), ue(() => {
166
- if (Ie(), ke(), n.dispose(), c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", b), S(f)) {
167
- Re(), Te();
174
+ document.addEventListener("dynamic-content:open", S);
175
+ }), ye(() => {
176
+ if (Le(), Me(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), b(f)) {
177
+ Oe(), Ue();
168
178
  try {
169
- C().isStripoInitialized = !1;
179
+ const t = C();
180
+ t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
170
181
  } catch (t) {
171
182
  console.debug("Failed to close the editor readiness gate on unmount", t);
172
183
  }
173
184
  }
174
- M(async () => {
175
- if (S(f))
185
+ O(async () => {
186
+ if (b(f))
176
187
  try {
177
188
  window.UIEditor.removeEditor();
178
189
  } catch {
179
190
  console.debug("Failed to remove Stripo editor: No editor found");
180
191
  }
181
192
  }), o.reset();
182
- }), q({
193
+ }), j({
183
194
  dynamicContent: {
184
195
  insert: x,
185
- close: A
196
+ close: B
186
197
  },
187
198
  hasChanges: u,
188
- saveSilent: I,
189
- setLoading: R
190
- }), { __sfc: !0, openMetrics: n, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, DisplayConditionsHost: X, LegacyStrategyUpdatedModal: Y, headerWrapperRef: D, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: w, props: s, configStore: o, editorStore: m, previewStore: Z, hasChanges: u, isTestPartner: ee, isSaveValidationEnabled: te, loadRollout: k, saveSilent: I, setLoading: R, emit: a, buildMetadata: v, initPlugin: T, preloadRuntime: F, runExclusive: M, beginMount: L, isCurrentMount: S, mountGeneration: f, getDefaultTemplate: U, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: oe, isRrsEnabled: re, isExternalDisplayConditionsEnabled: ne, hasAssignedStrategy: ae, insertDynamicContent: x, closeDynamicContent: A, handleDynamicContentOpen: b, ribbonObserver: c, updateRibbonOffset: h, startEditor: E, AutoSaveController: Fe, AuthErrorModal: Me, Toaster: Le, FilterSelectionDrawer: Ue, HeaderWrapper: Ne, LoadingWrapper: _e, SaveAsTemplateDrawer: xe, UnsubscribeWrapper: Ae, ValidationErrorDrawer: Be };
199
+ saveSilent: R,
200
+ setLoading: F
201
+ }), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: T, props: a, configStore: o, editorStore: c, previewStore: te, hasChanges: u, isTestPartner: oe, isSaveValidationEnabled: re, loadRollout: k, showToaster: w, trans: I, saveSilent: R, setLoading: F, emit: i, buildMetadata: v, initPlugin: M, preloadRuntime: L, runExclusive: O, beginMount: U, isCurrentMount: b, mountGeneration: f, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: ne, isRrsEnabled: ie, isExternalDisplayConditionsEnabled: se, hasAssignedStrategy: ae, insertDynamicContent: x, closeDynamicContent: B, handleDynamicContentOpen: S, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Ne, AuthErrorModal: _e, Toaster: Ae, FilterSelectionDrawer: xe, HeaderWrapper: Be, LoadingWrapper: He, SaveAsTemplateDrawer: Pe, UnsubscribeWrapper: Ve, ValidationErrorDrawer: We };
191
202
  }
192
203
  });
193
204
  export {
194
- It as default
205
+ Nt as default
195
206
  };
@@ -1,15 +1,25 @@
1
- import { defineComponent as n } from "vue";
2
- import { useAutoSave as u } from "../../composables/useAutoSave.js";
3
- import { useSave as i } from "../../composables/useSave.js";
4
- import { useSaveValidationRollout as l } from "../../composables/useSaveValidationRollout.js";
5
- import { useConfigStore as m } from "../../stores/config.js";
6
- const d = /* @__PURE__ */ n({
1
+ import { defineComponent as c } from "vue";
2
+ import { useAutoSave as m } from "../../composables/useAutoSave.js";
3
+ import { useSave as f } from "../../composables/useSave.js";
4
+ import { useSaveValidationRollout as v } from "../../composables/useSaveValidationRollout.js";
5
+ import { useToaster as p } from "../../composables/useToaster.js";
6
+ import { useConfigStore as S } from "../../stores/config.js";
7
+ const A = /* @__PURE__ */ c({
7
8
  __name: "AutoSaveController",
8
- setup(f) {
9
- const { save: e, saveRawOnly: t } = i(), { isEnabled: r } = l(), a = m(), o = () => r.value && a.allowSaveWithErrors, s = () => o() ? t() : e(!1, !0);
10
- return u(s, { clearsChanges: () => !o() }), { __sfc: !0, save: e, saveRawOnly: t, isEnabled: r, configStore: a, isRawAutosave: o, backgroundSave: s };
9
+ setup(d, { expose: u }) {
10
+ const { save: e, saveRawOnly: t } = f(), { isEnabled: r } = v(), { handleError: a } = p(), s = S(), o = () => r.value && s.allowSaveWithErrors, n = () => o() ? t() : e(!1, !0);
11
+ m(n, { clearsChanges: () => !o() });
12
+ const i = async () => {
13
+ try {
14
+ return await e(!0);
15
+ } catch (l) {
16
+ a(l, "Failed to save template");
17
+ return;
18
+ }
19
+ };
20
+ return u({ saveSilent: i }), { __sfc: !0, save: e, saveRawOnly: t, isEnabled: r, handleError: a, configStore: s, isRawAutosave: o, backgroundSave: n, saveSilent: i };
11
21
  }
12
22
  });
13
23
  export {
14
- d as default
24
+ A as default
15
25
  };
@@ -22,7 +22,7 @@ var n = function() {
22
22
  s,
23
23
  !1,
24
24
  null,
25
- "bd3200fd"
25
+ "cf448043"
26
26
  );
27
27
  const f = d.exports;
28
28
  export {
@@ -1,24 +1,24 @@
1
- import { defineComponent as w, reactive as k, ref as c, computed as u, watch as L } from "vue";
1
+ import { defineComponent as w, reactive as L, ref as c, computed as u, watch as N } from "vue";
2
2
  import R from "../../wrappers/WpDrawer.vue.js";
3
- import { useDisplayConditions as j } from "../../../composables/useDisplayConditions.js";
4
- import { useTranslations as E } from "../../../composables/useTranslations.js";
5
- import { DISPLAY_CONDITION_LIMITS as F } from "../../../enums/display-condition.js";
6
- import { useDisplayConditionStore as G } from "../../../stores/display-condition.js";
7
- import { InRadioButton as N, InBasicTextInput as P } from "@useinsider/design-system-vue";
8
- import W from "./CodeEditorField.vue.js";
3
+ import { useDisplayConditions as k, DISPLAY_CONDITIONS_TRANS_KEY as i } from "../../../composables/useDisplayConditions.js";
4
+ import { useTranslations as Y } from "../../../composables/useTranslations.js";
5
+ import { DISPLAY_CONDITION_LIMITS as j } from "../../../enums/display-condition.js";
6
+ import { useDisplayConditionStore as E } from "../../../stores/display-condition.js";
7
+ import { InRadioButton as P, InBasicTextInput as F } from "@useinsider/design-system-vue";
8
+ import G from "./CodeEditorField.vue.js";
9
9
  const Z = /* @__PURE__ */ w({
10
10
  __name: "DisplayConditionCreateDrawer",
11
- setup(Y) {
12
- const n = "email-editor.display-conditions", r = E(), p = G(), {
11
+ setup(K) {
12
+ const n = Y(), p = E(), {
13
13
  validate: v,
14
14
  notifyInvalid: f,
15
15
  createInline: y,
16
- createAndSave: b,
17
- cancel: B,
18
- describeWithAcademyLink: g
19
- } = j(), m = () => ({ name: "", description: "", codeBefore: "", codeAfter: "" }), e = k(m()), o = c({}), i = c(!1), l = c(!1), s = u(() => i.value || l.value), _ = c(), I = c();
16
+ createAndSave: _,
17
+ cancel: b,
18
+ describeWithAcademyLink: B
19
+ } = k(), m = () => ({ name: "", description: "", codeBefore: "", codeAfter: "" }), e = L(m()), o = c({}), r = c(!1), l = c(!1), s = u(() => r.value || l.value), g = c(), I = c();
20
20
  let d = 0;
21
- L(() => p.isCreateOpen, (a) => {
21
+ N(() => p.isCreateOpen, (a) => {
22
22
  if (d += 1, !a)
23
23
  return;
24
24
  const { editing: t } = p;
@@ -27,37 +27,37 @@ const Z = /* @__PURE__ */ w({
27
27
  description: t.description,
28
28
  codeBefore: t.beforeScript,
29
29
  codeAfter: t.afterScript
30
- } : m()), o.value = {}, i.value = !1;
30
+ } : m()), o.value = {}, r.value = !1;
31
31
  }, { immediate: !0 });
32
- const C = u(() => g("create-description")), D = u(() => ({
32
+ const C = u(() => B("create-description")), D = u(() => ({
33
33
  cancelOrBackButton: {
34
34
  styling: "ghost",
35
35
  type: "secondary",
36
- labelText: r(`${n}.cancel`),
36
+ labelText: n(`${i}.cancel`),
37
37
  disabledStatus: s.value
38
38
  },
39
39
  secondaryButton: {
40
40
  styling: "solid",
41
41
  type: "subtle-primary",
42
- labelText: r(`${n}.create-and-save`),
43
- loadingStatus: i.value
42
+ labelText: n(`${i}.create-and-save`),
43
+ loadingStatus: r.value
44
44
  },
45
45
  primaryButton: {
46
46
  styling: "solid",
47
47
  type: "primary",
48
- labelText: r(`${n}.create`),
48
+ labelText: n(`${i}.create`),
49
49
  disabledStatus: s.value
50
50
  }
51
51
  })), O = (a, t) => {
52
52
  t !== e[a] && (e[a] = t, o.value[a] && (o.value = { ...o.value, [a]: void 0 }));
53
- }, T = u(() => `${r(`${n}.condition-description`)} <span class="guido-display-condition-create__optional">(${r(`${n}.optional`)})</span>`);
54
- return { __sfc: !0, KEY: n, trans: r, store: p, validate: v, notifyInvalid: f, createInline: y, createAndSave: b, cancel: B, describeWithAcademyLink: g, emptyDraft: m, draft: e, errors: o, isSaving: i, isReadingCode: l, isBusy: s, codeBeforeRef: _, codeAfterRef: I, openGeneration: d, descriptionText: C, footerButtonGroupOptions: D, updateField: O, descriptionLabel: T, submit: async (a) => {
53
+ }, T = u(() => `${n(`${i}.condition-description`)} <span class="guido-display-condition-create__optional">(${n(`${i}.optional`)})</span>`);
54
+ return { __sfc: !0, trans: n, store: p, validate: v, notifyInvalid: f, createInline: y, createAndSave: _, cancel: b, describeWithAcademyLink: B, emptyDraft: m, draft: e, errors: o, isSaving: r, isReadingCode: l, isBusy: s, codeBeforeRef: g, codeAfterRef: I, openGeneration: d, descriptionText: C, footerButtonGroupOptions: D, updateField: O, descriptionLabel: T, submit: async (a) => {
55
55
  var S, A;
56
56
  if (s.value)
57
57
  return;
58
58
  const t = d;
59
59
  l.value = !0;
60
- const [$, x] = await Promise.all([(S = _.value) == null ? void 0 : S.read(), (A = I.value) == null ? void 0 : A.read()]);
60
+ const [$, x] = await Promise.all([(S = g.value) == null ? void 0 : S.read(), (A = I.value) == null ? void 0 : A.read()]);
61
61
  if (l.value = !1, t !== d)
62
62
  return;
63
63
  if (e.codeBefore = $ ?? e.codeBefore, e.codeAfter = x ?? e.codeAfter, o.value = v(e), Object.keys(o.value).length) {
@@ -68,12 +68,12 @@ const Z = /* @__PURE__ */ w({
68
68
  y({ ...e });
69
69
  return;
70
70
  }
71
- i.value = !0;
72
- const h = await b({ ...e });
73
- i.value = !1, o.value = h ?? {}, Object.keys(o.value).length && f();
71
+ r.value = !0;
72
+ const h = await _({ ...e });
73
+ r.value = !1, o.value = h ?? {}, Object.keys(o.value).length && f();
74
74
  }, close: () => {
75
- s.value || B();
76
- }, WpDrawer: R, DISPLAY_CONDITION_LIMITS: F, InBasicTextInput: P, InRadioButton: N, CodeEditorField: W };
75
+ s.value || b();
76
+ }, WpDrawer: R, KEY: i, DISPLAY_CONDITION_LIMITS: j, InBasicTextInput: F, InRadioButton: P, CodeEditorField: G };
77
77
  }
78
78
  });
79
79
  export {
@@ -26,7 +26,7 @@ var o = function() {
26
26
  l,
27
27
  !1,
28
28
  null,
29
- "fe2f4a6c"
29
+ "21acc8d8"
30
30
  );
31
31
  const f = c.exports;
32
32
  export {