@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.
- package/dist/@types/config/schemas.js +23 -25
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +78 -76
- package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +11 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +81 -34
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +42 -25
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +15 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +34 -43
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +61 -0
- package/dist/components/wrappers/WpDrawer.vue.js +9 -7
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useHtmlValidator.js +1 -0
- package/dist/composables/useSave.js +84 -41
- package/dist/composables/useSaveValidation.js +276 -0
- package/dist/composables/useSaveValidationRollout.js +9 -0
- package/dist/composables/validators/useCouponBlockValidator.js +24 -21
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
- package/dist/config/i18n/en/labels.json.js +4 -28
- package/dist/enums/save-validation.js +4 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -24
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/shared/index.js +28 -40
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/@types/save-validation.d.ts +19 -0
- package/dist/src/components/Guido.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useHtmlValidator.d.ts +14 -0
- package/dist/src/composables/useSave.d.ts +6 -1
- package/dist/src/composables/useSaveValidation.d.ts +6 -0
- package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
- package/dist/src/enums/save-validation.d.ts +27 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
- package/dist/src/stores/config.d.ts +5 -18
- package/dist/src/stores/editor.d.ts +0 -107
- package/dist/src/stores/onboarding.d.ts +0 -377
- package/dist/src/stores/save-validation.d.ts +22 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/templatePreparation.d.ts +30 -0
- package/dist/src/utils/timeUtil.d.ts +0 -10
- package/dist/stores/config.js +13 -6
- package/dist/stores/editor.js +1 -5
- package/dist/stores/onboarding.js +11 -16
- package/dist/stores/save-validation.js +30 -0
- package/dist/utils/templatePreparation.js +28 -25
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -21
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -39
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -18
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -74
- package/dist/composables/useAccessibilityApi.js +0 -31
- package/dist/node_modules/@vueuse/core/index.js +0 -102
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
- /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
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
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(
|
|
19
|
-
const { config:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 &&
|
|
26
|
-
(o =
|
|
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
|
-
|
|
30
|
-
}, _ = async () => {
|
|
31
|
-
if (a("liquidSyntax")) {
|
|
78
|
+
if (c("liquidSyntax")) {
|
|
32
79
|
e.loadingStatus = !0;
|
|
33
80
|
try {
|
|
34
|
-
const { html: t } = await
|
|
35
|
-
if (!await
|
|
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
|
-
|
|
88
|
+
n();
|
|
42
89
|
};
|
|
43
|
-
return
|
|
44
|
-
handleSave:
|
|
45
|
-
}), { __sfc: !0, config:
|
|
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
|
-
|
|
96
|
+
At as default
|
|
50
97
|
};
|
|
@@ -1,41 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
|
|
5
|
-
import { usePreviewMode as
|
|
6
|
-
import {
|
|
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 {
|
|
10
|
-
import {
|
|
11
|
-
|
|
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(
|
|
14
|
-
const e = g(),
|
|
15
|
-
var
|
|
16
|
-
return e.isVersionHistoryOpen || e.isPreviewModeOpen
|
|
17
|
-
}),
|
|
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
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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:
|
|
35
|
-
|
|
36
|
-
}, InButtonV2:
|
|
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
|
-
|
|
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,
|
|
5
|
-
return
|
|
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
|
|
14
|
+
const c = n.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
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 "./
|
|
6
|
-
import m from "./
|
|
7
|
-
import p from "./version-history/
|
|
8
|
-
|
|
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(
|
|
12
|
-
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t,
|
|
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
|
-
|
|
15
|
+
S as default
|
|
17
16
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./RightSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var r = function() {
|
|
4
|
-
var
|
|
5
|
-
return
|
|
6
|
-
}, a = [],
|
|
7
|
-
|
|
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 =
|
|
14
|
+
const u = n.exports;
|
|
15
15
|
export {
|
|
16
16
|
u as default
|
|
17
17
|
};
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
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
|
|
6
|
-
import _ from "./
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
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(
|
|
12
|
-
const { isFeatureEnabled:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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:
|
|
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
|
-
|
|
22
|
+
T as default
|
|
25
23
|
};
|
|
@@ -1,55 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import v from "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
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(
|
|
18
|
-
const o =
|
|
19
|
-
{ type: "newVersionPopup", component:
|
|
20
|
-
{ type: "genericOnboarding", component:
|
|
21
|
-
{ type: "textBlockOnboarding", component:
|
|
22
|
-
{ type: "versionHistoryOnboarding", component:
|
|
23
|
-
{ type: "ampOnboarding", component:
|
|
24
|
-
{ type: "itemsOnboarding", component:
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
}),
|
|
30
|
-
() =>
|
|
31
|
-
(n,
|
|
32
|
-
n && !
|
|
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
|
-
),
|
|
35
|
-
() =>
|
|
36
|
-
(n,
|
|
37
|
-
|
|
31
|
+
), t(
|
|
32
|
+
() => s.emailFormat,
|
|
33
|
+
(n, i) => {
|
|
34
|
+
i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
38
35
|
}
|
|
39
|
-
),
|
|
40
|
-
() =>
|
|
36
|
+
), t(
|
|
37
|
+
() => r.isPreviewModeOpen,
|
|
41
38
|
(n) => {
|
|
42
39
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
43
40
|
}
|
|
44
|
-
),
|
|
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
|
-
|
|
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,
|
|
5
|
-
return
|
|
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(
|
|
7
|
+
}, onCloseEvent: function(n) {
|
|
8
8
|
return e.emit("onCloseEvent");
|
|
9
|
-
}, primaryButtonEvent: function(
|
|
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 [
|
|
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
|
|
26
|
+
const p = c.exports;
|
|
25
27
|
export {
|
|
26
|
-
|
|
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
|
}
|