@useinsider/guido 3.16.0-beta.20cd2fe → 3.16.0-beta.8645953

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/dist/@types/config/schemas.js +23 -25
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +78 -76
  4. package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
  5. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  6. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  7. package/dist/components/organisms/header/EditorActions.vue.js +11 -11
  8. package/dist/components/organisms/header/EditorActions.vue2.js +81 -34
  9. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  10. package/dist/components/organisms/header/LeftSlot.vue2.js +42 -25
  11. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  12. package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
  13. package/dist/components/organisms/header/RightSlot.vue.js +6 -6
  14. package/dist/components/organisms/header/RightSlot.vue2.js +15 -17
  15. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +34 -43
  16. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  17. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +61 -0
  18. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  19. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  20. package/dist/composables/useHtmlValidator.js +1 -0
  21. package/dist/composables/useSave.js +84 -41
  22. package/dist/composables/useSaveValidation.js +276 -0
  23. package/dist/composables/useSaveValidationRollout.js +9 -0
  24. package/dist/composables/validators/useCouponBlockValidator.js +24 -21
  25. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  26. package/dist/config/i18n/en/labels.json.js +4 -28
  27. package/dist/enums/save-validation.js +4 -0
  28. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -24
  29. package/dist/guido.css +1 -1
  30. package/dist/node_modules/@vueuse/shared/index.js +28 -40
  31. package/dist/src/@types/config/schemas.d.ts +0 -4
  32. package/dist/src/@types/save-validation.d.ts +19 -0
  33. package/dist/src/components/Guido.vue.d.ts +17 -1
  34. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  35. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  36. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  37. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  38. package/dist/src/composables/useActionsApi.d.ts +2 -2
  39. package/dist/src/composables/useConfig.d.ts +0 -2
  40. package/dist/src/composables/useHtmlValidator.d.ts +14 -0
  41. package/dist/src/composables/useSave.d.ts +6 -1
  42. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  43. package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
  44. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  45. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  46. package/dist/src/enums/save-validation.d.ts +27 -0
  47. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
  48. package/dist/src/stores/config.d.ts +5 -18
  49. package/dist/src/stores/editor.d.ts +0 -107
  50. package/dist/src/stores/onboarding.d.ts +0 -377
  51. package/dist/src/stores/save-validation.d.ts +22 -0
  52. package/dist/src/stores/version-history.d.ts +1 -1
  53. package/dist/src/utils/templatePreparation.d.ts +30 -0
  54. package/dist/src/utils/timeUtil.d.ts +0 -10
  55. package/dist/stores/config.js +13 -6
  56. package/dist/stores/editor.js +1 -5
  57. package/dist/stores/onboarding.js +11 -16
  58. package/dist/stores/save-validation.js +30 -0
  59. package/dist/utils/templatePreparation.js +28 -25
  60. package/dist/utils/timeUtil.js +17 -6
  61. package/package.json +1 -1
  62. package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
  63. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -21
  64. package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
  65. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -39
  66. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
  67. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
  68. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
  69. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
  70. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -18
  71. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -74
  72. package/dist/composables/useAccessibilityApi.js +0 -31
  73. package/dist/node_modules/@vueuse/core/index.js +0 -102
  74. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
  75. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
  76. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
  77. package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
  78. /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
  79. /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → validation/ValidationErrorDrawer.vue.d.ts} +0 -0
@@ -1,50 +1,97 @@
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({
1
+ import { defineComponent as R, computed as l, ref as m } from "vue";
2
+ import { useActionsApi as D } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as F } from "../../../composables/useConfig.js";
4
+ import { useExport as z } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as I } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as P } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as j } from "../../../composables/useSave.js";
8
+ import { useSaveValidation as G } from "../../../composables/useSaveValidation.js";
9
+ import { useSaveValidationRollout as J } from "../../../composables/useSaveValidationRollout.js";
10
+ import { useToaster as K } from "../../../composables/useToaster.js";
11
+ import { useTranslations as N } from "../../../composables/useTranslations.js";
12
+ import { useVersionHistoryApi as Q } from "../../../composables/useVersionHistoryApi.js";
13
+ import { useLiquidValidator as U } from "../../../composables/validators/useLiquidValidator.js";
14
+ import { ToasterTypeOptions as W } from "../../../enums/toaster.js";
15
+ import { useConfigStore as X } from "../../../stores/config.js";
16
+ import { useEditorStore as Y } from "../../../stores/editor.js";
17
+ import { useSaveValidationStore as Z } from "../../../stores/save-validation.js";
18
+ import { useTemplateStore as $ } from "../../../stores/template.js";
19
+ import { getTooltipOptions as tt } from "../../../utils/tooltipUtils.js";
20
+ import { InButtonV2 as ot } from "@useinsider/design-system-vue";
21
+ import { storeToRefs as et } from "pinia";
22
+ import rt from "./MigrationConfirmModal.vue.js";
23
+ const At = /* @__PURE__ */ R({
17
24
  __name: "EditorActions",
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) => {
25
+ setup(it, { expose: A }) {
26
+ const { config: u, isFeatureEnabled: c } = F(), { exportHtml: f } = z(), { save: p } = j(), { validateCurrentTemplate: d } = G(), { isEnabled: i } = J(), { showToaster: v } = K(), { openVersionHistory: S, closeVersionHistory: y } = Q(), { getCompiledEmail: g } = D(), { compileHtml: h } = P(), { validateLiquidSyntax: T } = U(), V = X(), e = Y(), H = Z(), w = $(), { hasMigrations: E } = et(w), r = N(), O = l(() => i.value && !V.isTransactional ? r("email-editor.save-and-continue") : "Save"), s = m(!1), a = m(!1), x = m(), n = I(), M = () => {
27
+ if (e.isVersionHistoryOpen) {
28
+ y();
29
+ return;
30
+ }
31
+ S();
32
+ }, b = async () => {
33
+ s.value = !0, await f(), s.value = !1;
34
+ }, k = () => {
35
+ e.isSaveAsTemplateDrawerOpen = !0;
36
+ }, q = l(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), B = l(
37
+ () => {
38
+ var t, o;
39
+ return ((o = (t = u.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
40
+ }
41
+ ), C = async (t) => {
42
+ a.value = !0, t || (e.loadingStatus = !0);
43
+ const o = await p(t);
44
+ return a.value = !1, !t && !o && (e.loadingStatus = !1), o;
45
+ }, _ = (t) => {
24
46
  var o;
25
- if (!t && f.value) {
26
- (o = u.value) == null || o.open();
47
+ if (!t && E.value) {
48
+ (o = x.value) == null || o.open();
49
+ return;
50
+ }
51
+ return C(t);
52
+ }, L = async () => {
53
+ if (i.value) {
54
+ e.loadingStatus = !0;
55
+ let t = [];
56
+ try {
57
+ t = await d();
58
+ } catch (o) {
59
+ console.warn("Test-path validation failed; sending without the drawer.", o);
60
+ } finally {
61
+ e.loadingStatus = !1;
62
+ }
63
+ if (t.length) {
64
+ v({
65
+ type: W.Error,
66
+ message: r("email-editor.validation-errors-found"),
67
+ actionButton: {
68
+ text: r("email-editor.check-errors"),
69
+ onClick: () => H.open(t, "test")
70
+ },
71
+ autoHide: !1
72
+ });
73
+ return;
74
+ }
75
+ n();
27
76
  return;
28
77
  }
29
- return p(t);
30
- }, _ = async () => {
31
- if (a("liquidSyntax")) {
78
+ if (c("liquidSyntax")) {
32
79
  e.loadingStatus = !0;
33
80
  try {
34
- const { html: t } = await s({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = n(t);
35
- if (!await m(o))
81
+ const { html: t } = await g({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = h(t);
82
+ if (!await T(o))
36
83
  return;
37
84
  } finally {
38
85
  e.loadingStatus = !1;
39
86
  }
40
87
  }
41
- c();
88
+ n();
42
89
  };
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 };
90
+ return A({
91
+ handleSave: _
92
+ }), { __sfc: !0, config: u, isFeatureEnabled: c, exportHtml: f, save: p, validateCurrentTemplate: d, isEnabled: i, showToaster: v, openVersionHistory: S, closeVersionHistory: y, getCompiledEmail: g, compileHtml: h, validateLiquidSyntax: T, configStore: V, editorStore: e, saveValidationStore: H, templateStore: w, hasMigrations: E, trans: r, saveLabel: O, isExporting: s, isSaving: a, migrationModalRef: x, testEmailClick: n, handleVersionHistory: M, handleExport: b, handleSaveAs: k, versionHistoryTooltipText: q, isVersionHistoryButtonVisible: B, executeSave: C, handleSave: _, handleTestEmail: L, getTooltipOptions: tt, InButtonV2: ot, MigrationConfirmModal: rt };
46
93
  }
47
94
  });
48
95
  export {
49
- Z as default
96
+ At as default
50
97
  };
@@ -10,7 +10,7 @@ var a = function() {
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "2f127fb6"
13
+ "ee2d4f7d"
14
14
  );
15
15
  const f = r.exports;
16
16
  export {
@@ -1,41 +1,58 @@
1
- import { defineComponent as p, computed as d, ref as b } from "vue";
2
- import { useAccessibilityApi as k } from "../../../composables/useAccessibilityApi.js";
1
+ import { defineComponent as k, computed as v, ref as b } from "vue";
3
2
  import { useConfig as B } from "../../../composables/useConfig.js";
4
- import { useBack as v } from "../../../composables/useGuidoActions.js";
5
- import { usePreviewMode as y } from "../../../composables/usePreviewMode.js";
6
- import { useTranslations as A } from "../../../composables/useTranslations.js";
3
+ import { useBack as y } from "../../../composables/useGuidoActions.js";
4
+ import { usePreviewMode as S } from "../../../composables/usePreviewMode.js";
5
+ import { useSaveValidation as w } from "../../../composables/useSaveValidation.js";
6
+ import { useSaveValidationRollout as V } from "../../../composables/useSaveValidationRollout.js";
7
+ import { useTranslations as h } from "../../../composables/useTranslations.js";
7
8
  import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
8
9
  import { useEditorStore as g } from "../../../stores/editor.js";
9
- import { InButtonV2 as O } from "@useinsider/design-system-vue";
10
- import { useDebounceFn as M } from "../../../node_modules/@vueuse/shared/index.js";
11
- const F = /* @__PURE__ */ p({
10
+ import { useSaveValidationStore as C } from "../../../stores/save-validation.js";
11
+ import { InButtonV2 as H } from "@useinsider/design-system-vue";
12
+ import { useDebounceFn as L } from "../../../node_modules/@vueuse/shared/index.js";
13
+ const G = /* @__PURE__ */ k({
12
14
  __name: "LeftSlot",
13
- setup(V) {
14
- const e = g(), s = v(), { closeVersionHistory: r } = _(), { closePreviewMode: n } = y(), { closeAccessibilityTestingMode: c } = k(), o = A(), { config: t } = B(), f = d(() => {
15
- var l, m;
16
- return e.isVersionHistoryOpen || e.isPreviewModeOpen || e.isAccessibilityTestingOpen ? o("email-editor.back-to-editor") : (m = (l = t.value) == null ? void 0 : l.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
17
- }), i = b(!1), a = () => {
15
+ setup(M) {
16
+ const e = g(), n = y(), { closeVersionHistory: s } = _(), { closePreviewMode: c } = S(), { validateCurrentTemplate: l } = w(), { isEnabled: u } = V(), f = C(), r = h(), { config: i } = B(), p = v(() => {
17
+ var t, o;
18
+ return e.isVersionHistoryOpen || e.isPreviewModeOpen ? r("email-editor.back-to-editor") : (o = (t = i.value) == null ? void 0 : t.ui) != null && o.backButtonLabel ? i.value.ui.backButtonLabel : r("email-editor.back-to-design");
19
+ }), a = b(!1), m = async () => {
18
20
  if (e.isVersionHistoryOpen) {
19
- r();
21
+ s();
20
22
  return;
21
23
  }
22
24
  if (e.isPreviewModeOpen) {
23
- n();
24
- return;
25
- }
26
- if (e.isAccessibilityTestingOpen) {
27
25
  c();
28
26
  return;
29
27
  }
30
- s();
31
- }, u = M(() => {
32
- a(), i.value = !1;
28
+ if (u.value) {
29
+ e.loadingStatus = !0;
30
+ let t = [];
31
+ try {
32
+ t = await l();
33
+ } catch (o) {
34
+ console.warn("Back-path validation failed; leaving without the drawer.", o);
35
+ } finally {
36
+ e.loadingStatus = !1;
37
+ }
38
+ if (t.length) {
39
+ f.open(t, "back");
40
+ return;
41
+ }
42
+ }
43
+ n();
44
+ }, d = L(async () => {
45
+ try {
46
+ await m();
47
+ } finally {
48
+ a.value = !1;
49
+ }
33
50
  }, 500);
34
- return { __sfc: !0, editorStore: e, handleBack: s, closeVersionHistory: r, closePreviewMode: n, closeAccessibilityTestingMode: c, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: i, executeBackAction: a, debouncedBackAction: u, handleBackClick: () => {
35
- i.value = !0, u();
36
- }, InButtonV2: O };
51
+ return { __sfc: !0, editorStore: e, handleBack: n, closeVersionHistory: s, closePreviewMode: c, validateCurrentTemplate: l, isEnabled: u, saveValidationStore: f, trans: r, config: i, backButtonLabel: p, isBackButtonDisabled: a, executeBackAction: m, debouncedBackAction: d, handleBackClick: () => {
52
+ a.value = !0, d();
53
+ }, InButtonV2: H };
37
54
  }
38
55
  });
39
56
  export {
40
- F as default
57
+ G as default
41
58
  };
@@ -1,8 +1,8 @@
1
1
  import r from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var t = function() {
4
- var o = this, i = o._self._c, e = o._self._setupProxy;
5
- return i("div", { staticClass: "d-f a-i-c" }, [e.editorStore.isVersionHistoryOpen ? i("div", { staticClass: "d-f" }, [i(e.VersionHistory), i(e.VersionHistoryViewOptions)], 1) : e.editorStore.isPreviewModeOpen ? i("div", { staticClass: "d-f" }, [i(e.EmailSizeIndicator), i(e.AmpToggle)], 1) : e.editorStore.isAccessibilityTestingOpen ? i(e.AccessibilityToolbar) : o._e(), i(e.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: e.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
4
+ var o = this, e = o._self._c, i = o._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [i.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(i.VersionHistory), e(i.VersionHistoryViewOptions)], 1) : i.editorStore.isPreviewModeOpen ? e("div", { staticClass: "d-f" }, [e(i.EmailSizeIndicator), e(i.AmpToggle)], 1) : o._e(), e(i.EditorToolbar, { directives: [{ name: "show", rawName: "v-show", value: i.editorStore.isEditorToolbarVisible, expression: "editorStore.isEditorToolbarVisible" }] })], 1);
6
6
  }, a = [], n = /* @__PURE__ */ s(
7
7
  r,
8
8
  t,
@@ -11,7 +11,7 @@ var t = function() {
11
11
  null,
12
12
  null
13
13
  );
14
- const _ = n.exports;
14
+ const c = n.exports;
15
15
  export {
16
- _ as default
16
+ c as default
17
17
  };
@@ -2,16 +2,15 @@ import { defineComponent as o } from "vue";
2
2
  import r from "../email-preview/amp/AmpToggle.vue.js";
3
3
  import t from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
4
4
  import { useEditorStore as i } from "../../../stores/editor.js";
5
- import e from "./accessibility/AccessibilityToolbar.vue.js";
6
- import m from "./EditorToolbar.vue.js";
7
- import p from "./version-history/VersionHistory.vue.js";
8
- import s from "./version-history/ViewOptions.vue.js";
9
- const y = /* @__PURE__ */ o({
5
+ import e from "./EditorToolbar.vue.js";
6
+ import m from "./version-history/VersionHistory.vue.js";
7
+ import p from "./version-history/ViewOptions.vue.js";
8
+ const S = /* @__PURE__ */ o({
10
9
  __name: "MiddleSlot",
11
- setup(f) {
12
- return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, AccessibilityToolbar: e, EditorToolbar: m, VersionHistory: p, VersionHistoryViewOptions: s };
10
+ setup(s) {
11
+ return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, EditorToolbar: e, VersionHistory: m, VersionHistoryViewOptions: p };
13
12
  }
14
13
  });
15
14
  export {
16
- y as default
15
+ S as default
17
16
  };
@@ -1,17 +1,17 @@
1
- import i from "./RightSlot.vue2.js";
1
+ import s from "./RightSlot.vue2.js";
2
2
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var r = function() {
4
- var e = this, s = e._self._c, t = e._self._setupProxy;
5
- return s("div", { staticClass: "d-f a-i-c" }, [t.isNormalMode ? s(t.AutoSaveStatus) : e._e(), t.isLiquidEnabled && t.isNormalMode ? s(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : e._e(), t.isNormalMode ? s(t.EditorActions, { ref: "editorActionsRef" }) : t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton) : e._e()], 1);
6
- }, a = [], l = /* @__PURE__ */ o(
7
- i,
4
+ var i = this, e = i._self._c, t = i._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
+ }, a = [], n = /* @__PURE__ */ o(
7
+ s,
8
8
  r,
9
9
  a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const u = n.exports;
15
15
  export {
16
16
  u as default
17
17
  };
@@ -1,25 +1,23 @@
1
- import { defineComponent as u, ref as f, computed as r } from "vue";
2
- import { useConfig as c } from "../../../composables/useConfig.js";
1
+ import { defineComponent as a, ref as f, computed as p } from "vue";
2
+ import { useConfig as u } from "../../../composables/useConfig.js";
3
3
  import { useTranslations as d } from "../../../composables/useTranslations.js";
4
4
  import { useEditorStore as l } from "../../../stores/editor.js";
5
- import { InChips as S } from "@useinsider/design-system-vue";
6
- import _ from "./AutoSaveStatus.vue.js";
7
- import h from "./EditorActions.vue.js";
8
- import v from "./version-history/RestoreButton.vue.js";
9
- const O = /* @__PURE__ */ u({
5
+ import { InChips as c } from "@useinsider/design-system-vue";
6
+ import _ from "./AutoSaveToggle.vue.js";
7
+ import S from "./EditorActions.vue.js";
8
+ import g from "./version-history/RestoreButton.vue.js";
9
+ const T = /* @__PURE__ */ a({
10
10
  __name: "RightSlot",
11
- setup(A, { expose: s }) {
12
- const { isFeatureEnabled: t } = c(), n = d(), o = l(), e = f(null), m = r(() => t("liquidSyntax")), a = r(
13
- () => !o.isVersionHistoryOpen && !o.isAccessibilityTestingOpen
14
- );
15
- return s({
16
- handleSave: (p) => {
17
- var i;
18
- return (i = e.value) == null ? void 0 : i.handleSave(p);
11
+ setup(h, { expose: r }) {
12
+ const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
13
+ return r({
14
+ handleSave: (m) => {
15
+ var e;
16
+ return (e = t.value) == null ? void 0 : e.handleSave(m);
19
17
  }
20
- }), { __sfc: !0, isFeatureEnabled: t, trans: n, editorStore: o, editorActionsRef: e, isLiquidEnabled: m, isNormalMode: a, InChips: S, AutoSaveStatus: _, EditorActions: h, RestoreButton: v };
18
+ }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
21
19
  }
22
20
  });
23
21
  export {
24
- O as default
22
+ T as default
25
23
  };
@@ -1,55 +1,46 @@
1
- import { defineComponent as O, computed as a, onMounted as u, watch as e } from "vue";
2
- import l from "./AMPOnboarding.vue.js";
3
- import v from "./EditorTabBarOnboarding.vue.js";
4
- import y from "./GenericOnboarding.vue.js";
5
- import S from "./ItemsOnboarding.vue.js";
6
- import h from "./NewVersionPopup.vue.js";
7
- import w from "./TextBlockOnboarding.vue.js";
8
- import P from "./VersionHistoryOnboarding.vue.js";
9
- import { useConfig as A } from "../../../composables/useConfig.js";
10
- import { usePartner as T } from "../../../composables/usePartner.js";
11
- import { useEditorStore as _ } from "../../../stores/editor.js";
12
- import { useOnboardingStore as H } from "../../../stores/onboarding.js";
13
- import { usePreviewStore as B } from "../../../stores/preview.js";
14
- const j = /* @__PURE__ */ O({
1
+ import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
+ import u from "./AMPOnboarding.vue.js";
3
+ import v from "./GenericOnboarding.vue.js";
4
+ import l from "./ItemsOnboarding.vue.js";
5
+ import y from "./NewVersionPopup.vue.js";
6
+ import S from "./TextBlockOnboarding.vue.js";
7
+ import h from "./VersionHistoryOnboarding.vue.js";
8
+ import { usePartner as w } from "../../../composables/usePartner.js";
9
+ import { useEditorStore as P } from "../../../stores/editor.js";
10
+ import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
+ import { usePreviewStore as A } from "../../../stores/preview.js";
12
+ const G = /* @__PURE__ */ b({
15
13
  __name: "OnboardingWrapper",
16
14
  emits: ["onboarding-finished"],
17
- setup(M, { emit: g }) {
18
- const o = H(), i = _(), d = B(), { isTestPartner: p } = T(), { isFeatureEnabled: m } = A(), t = a(() => i.isStripoInitialized), s = a(() => p()), b = [
19
- { type: "newVersionPopup", component: h },
20
- { type: "genericOnboarding", component: y },
21
- { type: "textBlockOnboarding", component: w },
22
- { type: "versionHistoryOnboarding", component: P },
23
- { type: "ampOnboarding", component: l },
24
- { type: "itemsOnboarding", component: S },
25
- { type: "editorTabBarOnboarding", component: v }
26
- ], c = (n) => s.value || !t.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = a(() => b.filter((n) => c(n.type)));
27
- return u(async () => {
15
+ setup(H, { emit: f }) {
16
+ const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
+ { type: "newVersionPopup", component: y },
18
+ { type: "genericOnboarding", component: v },
19
+ { type: "textBlockOnboarding", component: S },
20
+ { type: "versionHistoryOnboarding", component: h },
21
+ { type: "ampOnboarding", component: u },
22
+ { type: "itemsOnboarding", component: l }
23
+ ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
24
+ return O(async () => {
28
25
  await o.fetchUserModalState();
29
- }), e(
30
- () => i.isVersionHistoryOpen,
31
- (n, r) => {
32
- n && !r && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && r && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
26
+ }), t(
27
+ () => r.isVersionHistoryOpen,
28
+ (n, i) => {
29
+ n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
33
30
  }
34
- ), e(
35
- () => d.emailFormat,
36
- (n, r) => {
37
- r !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
31
+ ), t(
32
+ () => s.emailFormat,
33
+ (n, i) => {
34
+ i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
38
35
  }
39
- ), e(
40
- () => i.isPreviewModeOpen,
36
+ ), t(
37
+ () => r.isPreviewModeOpen,
41
38
  (n) => {
42
39
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
43
40
  }
44
- ), e(
45
- t,
46
- (n) => {
47
- n && m("accessibilityTesting") && !s.value && !o.isOnboardingActive() && o.shouldShowOnboarding("editorTabBarOnboarding") && o.start("editorTabBarOnboarding");
48
- },
49
- { immediate: !0 }
50
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: i, previewStore: d, isTestPartner: p, isFeatureEnabled: m, isStripoReady: t, isTestPartnerActive: s, onboardingConfigs: b, shouldShow: c, visibleOnboardings: f };
41
+ ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
51
42
  }
52
43
  });
53
44
  export {
54
- j as default
45
+ G as default
55
46
  };
@@ -0,0 +1,20 @@
1
+ import n from "./ValidationErrorDrawer.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var r = this, o = r._self._c, t = r._self._setupProxy;
6
+ return o(t.WpDrawer, { attrs: { id: "guido__validation-error-drawer", size: "small", "footer-button-group-options": t.footerButtonGroupOptions, status: t.store.isDrawerOpen, "title-text": t.titleText }, on: { onCloseEvent: t.handleClose, primaryButtonEvent: t.handleClose, secondaryButtonEvent: t.handleSecondary } }, [o("div", { staticClass: "d-f f-d-c validation-error-list" }, r._l(t.rows, function(e, a) {
7
+ return o("div", { key: a, staticClass: "d-f a-i-c validation-error-row" }, [o(t.InIcons, { staticClass: "validation-error-row__icon i-c-12", attrs: { name: "filled-caution-triangle" } }), o("span", { staticClass: "validation-error-row__text" }, [r._v(r._s(e))])], 1);
8
+ }), 0)]);
9
+ }, l = [], _ = /* @__PURE__ */ s(
10
+ n,
11
+ i,
12
+ l,
13
+ !1,
14
+ null,
15
+ "31b677b4"
16
+ );
17
+ const u = _.exports;
18
+ export {
19
+ u as default
20
+ };
@@ -0,0 +1,61 @@
1
+ import { defineComponent as S, ref as v, computed as a } from "vue";
2
+ import g from "../../wrappers/WpDrawer.vue.js";
3
+ import { useBack as h } from "../../../composables/useGuidoActions.js";
4
+ import { useSave as _ } from "../../../composables/useSave.js";
5
+ import { useTranslations as b } from "../../../composables/useTranslations.js";
6
+ import { useConfigStore as w } from "../../../stores/config.js";
7
+ import { useEditorStore as B } from "../../../stores/editor.js";
8
+ import { useSaveValidationStore as T } from "../../../stores/save-validation.js";
9
+ import { InIcons as x } from "@useinsider/design-system-vue";
10
+ const L = /* @__PURE__ */ S({
11
+ __name: "ValidationErrorDrawer",
12
+ setup(C) {
13
+ const o = b(), t = T(), n = B(), s = w(), { saveWithErrors: i } = _(), l = h(), r = v(!1), d = a(() => `${o("email-editor.validation-errors")} (${t.errorCount})`), m = a(() => {
14
+ const e = {
15
+ primaryButton: {
16
+ styling: "solid",
17
+ type: "primary",
18
+ labelText: o("email-editor.update-design")
19
+ }
20
+ };
21
+ return t.intent === "back" ? e.secondaryButton = {
22
+ styling: "solid",
23
+ type: "subtle-primary",
24
+ labelText: o("email-editor.leave-without-saving")
25
+ } : !s.isTransactional && t.intent !== "test" && (e.secondaryButton = {
26
+ styling: "solid",
27
+ type: "subtle-primary",
28
+ labelText: o("email-editor.save-and-continue"),
29
+ loadingStatus: r.value
30
+ }), e;
31
+ }), p = a(() => t.errors.map((e) => {
32
+ const y = e.detail ? ` (${e.detail})` : "";
33
+ return `${e.message}${y}`;
34
+ })), f = () => {
35
+ t.isDrawerOpen && t.close();
36
+ }, c = async () => {
37
+ if (!r.value) {
38
+ r.value = !0, n.loadingStatus = !0;
39
+ try {
40
+ await i() ? t.close() : n.loadingStatus = !1;
41
+ } catch {
42
+ n.loadingStatus = !1;
43
+ } finally {
44
+ r.value = !1;
45
+ }
46
+ }
47
+ }, u = () => {
48
+ t.close(), l();
49
+ };
50
+ return { __sfc: !0, trans: o, store: t, editorStore: n, configStore: s, saveWithErrors: i, handleBack: l, isSaving: r, titleText: d, footerButtonGroupOptions: m, rows: p, handleClose: f, handleSaveAndContinue: c, handleDiscardAndLeave: u, handleSecondary: () => {
51
+ if (t.intent === "back") {
52
+ u();
53
+ return;
54
+ }
55
+ c();
56
+ }, WpDrawer: g, InIcons: x };
57
+ }
58
+ });
59
+ export {
60
+ L as default
61
+ };
@@ -1,17 +1,19 @@
1
1
  import r from "./WpDrawer.vue2.js";
2
2
  import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var u = function() {
4
- var t = this, n = t._self._c, e = t._self._setupProxy;
5
- return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
4
+ var t = this, o = t._self._c, e = t._self._setupProxy;
5
+ return o(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(n) {
6
6
  return e.emit("cancelOrBackButtonEvent");
7
- }, onCloseEvent: function(o) {
7
+ }, onCloseEvent: function(n) {
8
8
  return e.emit("onCloseEvent");
9
- }, primaryButtonEvent: function(o) {
9
+ }, primaryButtonEvent: function(n) {
10
10
  return e.emit("primaryButtonEvent");
11
+ }, secondaryButtonEvent: function(n) {
12
+ return e.emit("secondaryButtonEvent");
11
13
  } }, scopedSlots: t._u([t.$slots.headerBottomSlot ? { key: "headerBottomSlot", fn: function() {
12
14
  return [t._t("headerBottomSlot")];
13
15
  }, proxy: !0 } : null, { key: "contentSlot", fn: function() {
14
- return [n("div", [t._t("default")], 2)];
16
+ return [o("div", [t._t("default")], 2)];
15
17
  }, proxy: !0 }], null, !0) });
16
18
  }, i = [], c = /* @__PURE__ */ s(
17
19
  r,
@@ -21,7 +23,7 @@ var u = function() {
21
23
  null,
22
24
  null
23
25
  );
24
- const f = c.exports;
26
+ const p = c.exports;
25
27
  export {
26
- f as default
28
+ p as default
27
29
  };
@@ -13,7 +13,7 @@ const r = /* @__PURE__ */ e({
13
13
  status: { type: Boolean },
14
14
  titleText: null
15
15
  },
16
- emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent"],
16
+ emits: ["cancelOrBackButtonEvent", "onCloseEvent", "primaryButtonEvent", "secondaryButtonEvent"],
17
17
  setup(n, { emit: t }) {
18
18
  return { __sfc: !0, emit: t, InDrawer: o };
19
19
  }
@@ -221,6 +221,7 @@ const De = () => {
221
221
  export {
222
222
  de as buildPartnerAttributeNameSet,
223
223
  fe as findInvalidCustomFields,
224
+ pe as getInvalidDynamicContentTags,
224
225
  ue as parseRecommendationVariable,
225
226
  De as useHtmlValidator
226
227
  };