@useinsider/guido 3.16.0-beta.0faee0c → 3.16.0-beta.20cd2fe
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 +25 -23
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +21 -0
- package/dist/components/organisms/header/EditorActions.vue.js +11 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +39 -0
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +74 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
- package/dist/composables/useAccessibilityApi.js +31 -0
- package/dist/composables/useStripo.js +29 -30
- package/dist/config/i18n/en/labels.json.js +28 -4
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/core/index.js +102 -0
- package/dist/node_modules/@vueuse/shared/index.js +40 -28
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +107 -0
- package/dist/src/stores/onboarding.d.ts +377 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +10 -0
- package/dist/stores/editor.js +5 -1
- package/dist/stores/onboarding.js +16 -11
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as n, optional as e, string as t, picklist as
|
|
1
|
+
import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as l, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
6
6
|
/** Transactional/system emails */
|
|
7
7
|
TRANSACTIONAL: 2
|
|
8
|
-
},
|
|
8
|
+
}, i = {
|
|
9
9
|
/** Standard email campaigns */
|
|
10
10
|
EMAIL: 60,
|
|
11
11
|
/** Architect journey builder */
|
|
@@ -38,16 +38,16 @@ const p = {
|
|
|
38
38
|
),
|
|
39
39
|
/** Product type identifier */
|
|
40
40
|
productType: e(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
l([
|
|
42
|
+
i.EMAIL,
|
|
43
|
+
i.ARCHITECT,
|
|
44
|
+
i.UNSUBSCRIBE_PAGES
|
|
45
45
|
]),
|
|
46
|
-
|
|
46
|
+
i.EMAIL
|
|
47
47
|
),
|
|
48
48
|
/** Message type (promotional or transactional) */
|
|
49
49
|
messageType: e(
|
|
50
|
-
|
|
50
|
+
l([p.PROMOTIONAL, p.TRANSACTIONAL]),
|
|
51
51
|
p.PROMOTIONAL
|
|
52
52
|
),
|
|
53
53
|
/** Display name for the current user */
|
|
@@ -68,17 +68,17 @@ const p = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
71
|
+
}), f = I(() => g({
|
|
72
72
|
text: e(t()),
|
|
73
73
|
// eslint-disable-next-line camelcase -- backend field name
|
|
74
74
|
tag_text: e(t()),
|
|
75
75
|
value: e(t()),
|
|
76
|
-
children: e(c(
|
|
76
|
+
children: e(c(f)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
79
|
-
})), N =
|
|
78
|
+
select_items: e(c(f))
|
|
79
|
+
})), N = k(
|
|
80
80
|
t(),
|
|
81
|
-
R(c(
|
|
81
|
+
R(c(f), [])
|
|
82
82
|
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
* strategy, currency, locale, and layout data.
|
|
133
133
|
*/
|
|
134
134
|
recommendationConfigs: e(
|
|
135
|
-
|
|
135
|
+
k(t(), P),
|
|
136
136
|
{}
|
|
137
137
|
)
|
|
138
138
|
}), x = a({
|
|
@@ -189,9 +189,9 @@ const p = {
|
|
|
189
189
|
/** Email header settings */
|
|
190
190
|
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
191
191
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
192
|
-
savedModulesFolderName: e(t(),
|
|
192
|
+
savedModulesFolderName: e(t(), S.SAVED_MODULES),
|
|
193
193
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
194
|
-
defaultModulesFolderName: e(t(),
|
|
194
|
+
defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
|
|
195
195
|
}), F = a({
|
|
196
196
|
/** Whether to show the header bar */
|
|
197
197
|
showHeader: e(o(), !0),
|
|
@@ -216,11 +216,13 @@ const p = {
|
|
|
216
216
|
liquidSyntax: e(o(), !1),
|
|
217
217
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
218
218
|
autosave: e(o(), !1),
|
|
219
|
+
/** Enable the Stripo Accessibility Checker control in the editor toolbar. */
|
|
220
|
+
accessibilityTesting: e(o(), !1),
|
|
219
221
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
220
222
|
allowlistEnabled: e(o(), !1),
|
|
221
223
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
222
224
|
linkTrackingIds: e(o(), !1)
|
|
223
|
-
}), B =
|
|
225
|
+
}), B = l([
|
|
224
226
|
"amp-accordion",
|
|
225
227
|
"amp-carousel",
|
|
226
228
|
"amp-form-controls",
|
|
@@ -234,7 +236,7 @@ const p = {
|
|
|
234
236
|
"text-block",
|
|
235
237
|
"timer-block",
|
|
236
238
|
"video-block"
|
|
237
|
-
]), w =
|
|
239
|
+
]), w = l([
|
|
238
240
|
"dynamic-content",
|
|
239
241
|
"checkbox-block",
|
|
240
242
|
"radio-button-block",
|
|
@@ -287,7 +289,7 @@ const p = {
|
|
|
287
289
|
...d.entries,
|
|
288
290
|
type: u("custom"),
|
|
289
291
|
/** Custom processor function */
|
|
290
|
-
processor:
|
|
292
|
+
processor: y(
|
|
291
293
|
(s) => typeof s == "function",
|
|
292
294
|
"processor must be a function"
|
|
293
295
|
)
|
|
@@ -307,7 +309,7 @@ const p = {
|
|
|
307
309
|
* Return false to cancel the save operation.
|
|
308
310
|
*/
|
|
309
311
|
externalValidation: e(
|
|
310
|
-
|
|
312
|
+
y(
|
|
311
313
|
(s) => typeof s == "function",
|
|
312
314
|
"externalValidation must be a function"
|
|
313
315
|
)
|
|
@@ -343,7 +345,7 @@ export {
|
|
|
343
345
|
G as CustomRuleSchema,
|
|
344
346
|
B as DefaultBlockTypeSchema,
|
|
345
347
|
N as DynamicContentListSchema,
|
|
346
|
-
|
|
348
|
+
f as DynamicContentNodeSchema,
|
|
347
349
|
E as DynamicContentSchema,
|
|
348
350
|
O as EditorSchema,
|
|
349
351
|
D as EmailHeaderSchema,
|
|
@@ -354,7 +356,7 @@ export {
|
|
|
354
356
|
P as LegacyRecommendationConfigSchema,
|
|
355
357
|
p as MessageType,
|
|
356
358
|
M as PartnerSchema,
|
|
357
|
-
|
|
359
|
+
i as ProductType,
|
|
358
360
|
j as RegexRuleSchema,
|
|
359
361
|
q as RemoveRuleSchema,
|
|
360
362
|
_ as ReplaceRuleSchema,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "./AutoSaveStatus.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var s = this, t = s._self._c, a = s._self._setupProxy;
|
|
5
|
+
return a.isFeatureEnabled("autosave") ? t("div", { staticClass: "d-f a-i-c mr-3 auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? t("span", { staticClass: "d-f a-i-c f-s-1" }, [t(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), t("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? t("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel))]) : s._e()]) : s._e();
|
|
6
|
+
}, _ = [], o = /* @__PURE__ */ r(
|
|
7
|
+
e,
|
|
8
|
+
n,
|
|
9
|
+
_,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const u = o.exports;
|
|
15
|
+
export {
|
|
16
|
+
u as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as i, computed as u } from "vue";
|
|
2
|
+
import { useConfig as d } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as f, AUTOSAVE_STATUS as o } from "../../../stores/autosave.js";
|
|
5
|
+
import { autoSaveTimestamp as S } from "../../../utils/timeUtil.js";
|
|
6
|
+
import { InLoading as c } from "@useinsider/design-system-vue";
|
|
7
|
+
const g = /* @__PURE__ */ i({
|
|
8
|
+
__name: "AutoSaveStatus",
|
|
9
|
+
setup(v) {
|
|
10
|
+
const { isFeatureEnabled: a } = d(), t = f(), e = p(), s = u(() => {
|
|
11
|
+
if (t.status !== o.SAVED || !t.lastSavedAt)
|
|
12
|
+
return "";
|
|
13
|
+
const { isToday: r, time: m, date: n } = S(t.lastSavedAt);
|
|
14
|
+
return r ? e("email-editor.autosaved-at-today", { time: m }) : e("email-editor.autosaved-at-date", { date: n });
|
|
15
|
+
});
|
|
16
|
+
return { __sfc: !0, isFeatureEnabled: a, autosaveStore: t, trans: e, savedLabel: s, AUTOSAVE_STATUS: o, InLoading: c };
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
g as default
|
|
21
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var l = function() {
|
|
5
|
+
var i, s;
|
|
6
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return o("div", { staticClass: "d-f a-i-c editor-actions" }, [(s = (i = t.config) == null ? void 0 : i.features) != null && s.testMessage && !t.editorStore.isPreviewModeOpen ? o(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : o(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? e._e() : o(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }),
|
|
9
|
+
} } }), o(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
12
|
+
}, d = [], c = /* @__PURE__ */ a(
|
|
13
|
+
r,
|
|
13
14
|
l,
|
|
14
|
-
|
|
15
|
-
p,
|
|
15
|
+
d,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"d51fb931"
|
|
19
19
|
);
|
|
20
20
|
const v = c.exports;
|
|
21
21
|
export {
|
|
@@ -1,66 +1,50 @@
|
|
|
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
|
-
|
|
17
|
-
const ut = /* @__PURE__ */ O({
|
|
1
|
+
import { defineComponent as C, ref as g } from "vue";
|
|
2
|
+
import { useActionsApi as y } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as T } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTestEmailClick as M } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useHtmlCompiler as h } from "../../../composables/useHtmlCompiler.js";
|
|
6
|
+
import { useSave as x } from "../../../composables/useSave.js";
|
|
7
|
+
import { useTranslations as A } from "../../../composables/useTranslations.js";
|
|
8
|
+
import { useLiquidValidator as V } from "../../../composables/validators/useLiquidValidator.js";
|
|
9
|
+
import { useEditorStore as q } from "../../../stores/editor.js";
|
|
10
|
+
import { useTemplateStore as w } from "../../../stores/template.js";
|
|
11
|
+
import { getTooltipOptions as H } from "../../../utils/tooltipUtils.js";
|
|
12
|
+
import { InButtonV2 as k } from "@useinsider/design-system-vue";
|
|
13
|
+
import { storeToRefs as F } from "pinia";
|
|
14
|
+
import L from "./EditorActionsMenu.vue.js";
|
|
15
|
+
import R from "./MigrationConfirmModal.vue.js";
|
|
16
|
+
const Z = /* @__PURE__ */ C({
|
|
18
17
|
__name: "EditorActions",
|
|
19
|
-
setup(
|
|
20
|
-
const { config:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
c();
|
|
26
|
-
}, w = async () => {
|
|
27
|
-
i.value = !0, await m(), i.value = !1;
|
|
28
|
-
}, _ = () => {
|
|
29
|
-
e.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
-
}, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
|
|
31
|
-
() => {
|
|
32
|
-
var t, o;
|
|
33
|
-
return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
34
|
-
}
|
|
35
|
-
), V = async (t) => {
|
|
36
|
-
r.value = !0, t || (e.loadingStatus = !0);
|
|
37
|
-
const o = await u(t);
|
|
38
|
-
return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
39
|
-
}, E = (t) => {
|
|
18
|
+
setup(b, { expose: v }) {
|
|
19
|
+
const { config: S, isFeatureEnabled: a } = T(), { save: r } = x(), { getCompiledEmail: s } = y(), { compileHtml: n } = h(), { validateLiquidSyntax: m } = V(), e = q(), l = w(), { hasMigrations: f } = F(l), E = A(), i = g(!1), u = g(), c = M(), p = async (t) => {
|
|
20
|
+
i.value = !0, t || (e.loadingStatus = !0);
|
|
21
|
+
const o = await r(t);
|
|
22
|
+
return i.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
23
|
+
}, d = (t) => {
|
|
40
24
|
var o;
|
|
41
|
-
if (!t &&
|
|
42
|
-
(o =
|
|
25
|
+
if (!t && f.value) {
|
|
26
|
+
(o = u.value) == null || o.open();
|
|
43
27
|
return;
|
|
44
28
|
}
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
29
|
+
return p(t);
|
|
30
|
+
}, _ = async () => {
|
|
31
|
+
if (a("liquidSyntax")) {
|
|
48
32
|
e.loadingStatus = !0;
|
|
49
33
|
try {
|
|
50
|
-
const { html: t } = await
|
|
51
|
-
if (!await
|
|
34
|
+
const { html: t } = await s({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = n(t);
|
|
35
|
+
if (!await m(o))
|
|
52
36
|
return;
|
|
53
37
|
} finally {
|
|
54
38
|
e.loadingStatus = !1;
|
|
55
39
|
}
|
|
56
40
|
}
|
|
57
|
-
|
|
41
|
+
c();
|
|
58
42
|
};
|
|
59
|
-
return
|
|
60
|
-
handleSave:
|
|
61
|
-
}), { __sfc: !0, config:
|
|
43
|
+
return v({
|
|
44
|
+
handleSave: d
|
|
45
|
+
}), { __sfc: !0, config: S, isFeatureEnabled: a, save: r, getCompiledEmail: s, compileHtml: n, validateLiquidSyntax: m, editorStore: e, templateStore: l, hasMigrations: f, trans: E, isSaving: i, migrationModalRef: u, testEmailClick: c, executeSave: p, handleSave: d, handleTestEmail: _, getTooltipOptions: H, InButtonV2: k, EditorActionsMenu: L, MigrationConfirmModal: R };
|
|
62
46
|
}
|
|
63
47
|
});
|
|
64
48
|
export {
|
|
65
|
-
|
|
49
|
+
Z as default
|
|
66
50
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import i from "./EditorActionsMenu.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return s("div", { ref: "root", staticClass: "editor-actions-menu p-r" }, [s(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(l) {
|
|
7
|
+
t.isOpen = !t.isOpen;
|
|
8
|
+
} } }), t.isOpen ? s("div", { staticClass: "editor-actions-menu__panel p-a" }, [t.isAutosaveVisible ? [s("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.preferences")) + " ")]), s("div", { staticClass: "editor-actions-menu__row editor-actions-menu__row_static d-f a-i-c j-c-s-b" }, [s("span", { staticClass: "f-s-2" }, [e._v(e._s(t.trans("email-editor.auto-save")))]), s(t.InToggle, { attrs: { id: "guido__kebab-autosave-toggle", name: "guido-kebab-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggleAutosave } })], 1), s("div", { staticClass: "editor-actions-menu__divider" })] : e._e(), s("p", { staticClass: "editor-actions-menu__section f-s-1 t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.actions")) + " ")]), t.isVersionHistoryVisible ? s("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-version-history", type: "button", disabled: t.editorStore.isVersionHistoryButtonDisabled }, on: { click: t.handleVersionHistory } }, [s(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-architect-version-history", size: "16" } }), s("span", { staticClass: "f-s-2" }, [e._v(e._s(t.trans("newsletter.version-history")))])], 1) : e._e(), t.isAccessibilityVisible ? s("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-accessibility", type: "button", disabled: t.editorStore.loadingStatus }, on: { click: t.handleAccessibility } }, [s("svg", { staticClass: "mr-2 editor-actions-menu__icon", attrs: { "aria-hidden": "true", fill: "currentColor", height: "16", viewBox: "0 0 24 24", width: "16" } }, [s("path", { attrs: { d: "M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2Z" } })]), s("span", { staticClass: "f-s-2" }, [e._v(e._s(t.trans("email-editor.accessibility-test")))])]) : e._e(), t.isSaveAsVisible ? s("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-save-as", type: "button", disabled: t.editorStore.isSaveAsButtonDisabled }, on: { click: t.handleSaveAs } }, [s(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-newsletter-save-as-template", size: "16" } }), s("span", { staticClass: "f-s-2" }, [e._v(e._s(t.trans("newsletter.save-templates")))])], 1) : e._e(), s("button", { staticClass: "editor-actions-menu__row d-f a-i-c", attrs: { id: "guido__kebab-export", type: "button", disabled: t.isExporting || t.editorStore.isExportButtonDisabled }, on: { click: t.handleExport } }, [s(t.InIcons, { staticClass: "mr-2", attrs: { name: "line-export", size: "16" } }), s("span", { staticClass: "f-s-2" }, [e._v(e._s(t.trans("email-editor.export-html")))])], 1)], 2) : e._e()], 1);
|
|
9
|
+
}, n = [], r = /* @__PURE__ */ a(
|
|
10
|
+
i,
|
|
11
|
+
o,
|
|
12
|
+
n,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"cbfbc6ef"
|
|
16
|
+
);
|
|
17
|
+
const b = r.exports;
|
|
18
|
+
export {
|
|
19
|
+
b as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as O, ref as c, computed as t } from "vue";
|
|
2
|
+
import { useAccessibilityApi as x } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
+
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as I } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTranslations as B } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as C } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useAutosaveStore as w } from "../../../stores/autosave.js";
|
|
8
|
+
import { useEditorStore as M } from "../../../stores/editor.js";
|
|
9
|
+
import { getTooltipOptions as k } from "../../../utils/tooltipUtils.js";
|
|
10
|
+
import { InToggle as D, InIcons as F, InButtonV2 as j } from "@useinsider/design-system-vue";
|
|
11
|
+
import { onClickOutside as q } from "../../../node_modules/@vueuse/core/index.js";
|
|
12
|
+
const Y = /* @__PURE__ */ O({
|
|
13
|
+
__name: "EditorActionsMenu",
|
|
14
|
+
setup(z) {
|
|
15
|
+
const { config: i, isFeatureEnabled: n } = h(), { exportHtml: l } = I(), { openVersionHistory: p, closeVersionHistory: u } = C(), { toggleAccessibilityTestingMode: m } = x(), r = M(), f = w(), d = B(), v = c(!1), a = c(!1), A = c(null), y = t(() => n("autosave")), g = t(() => {
|
|
16
|
+
var o, e;
|
|
17
|
+
return !!((e = (o = i.value) == null ? void 0 : o.features) != null && e.versionHistory);
|
|
18
|
+
}), V = t(() => n("accessibilityTesting")), b = t(() => {
|
|
19
|
+
var o, e;
|
|
20
|
+
return !!((e = (o = i.value) == null ? void 0 : o.features) != null && e.saveAsTemplate);
|
|
21
|
+
}), s = () => {
|
|
22
|
+
v.value = !1;
|
|
23
|
+
}, H = () => {
|
|
24
|
+
r.isVersionHistoryOpen ? u() : p(), s();
|
|
25
|
+
}, _ = () => {
|
|
26
|
+
m(), s();
|
|
27
|
+
}, S = () => {
|
|
28
|
+
r.isSaveAsTemplateDrawerOpen = !0, s();
|
|
29
|
+
}, T = async () => {
|
|
30
|
+
a.value = !0, await l(), a.value = !1, s();
|
|
31
|
+
}, E = (o) => {
|
|
32
|
+
f.isOn = o;
|
|
33
|
+
};
|
|
34
|
+
return q(A, s), { __sfc: !0, config: i, isFeatureEnabled: n, exportHtml: l, openVersionHistory: p, closeVersionHistory: u, toggleAccessibilityTestingMode: m, editorStore: r, autosaveStore: f, trans: d, isOpen: v, isExporting: a, root: A, isAutosaveVisible: y, isVersionHistoryVisible: g, isAccessibilityVisible: V, isSaveAsVisible: b, close: s, handleVersionHistory: H, handleAccessibility: _, handleSaveAs: S, handleExport: T, toggleAutosave: E, getTooltipOptions: k, InButtonV2: j, InIcons: F, InToggle: D };
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
Y as default
|
|
39
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import o from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
5
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
6
|
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } })], 1);
|
|
7
|
-
}, i = [], r = /* @__PURE__ */
|
|
7
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
8
8
|
o,
|
|
9
|
-
|
|
9
|
+
a,
|
|
10
10
|
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"2f127fb6"
|
|
14
14
|
);
|
|
15
15
|
const f = r.exports;
|
|
16
16
|
export {
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as p, computed as d, ref as b } from "vue";
|
|
2
|
+
import { useAccessibilityApi as k } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
+
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";
|
|
6
7
|
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import { useDebounceFn as
|
|
10
|
-
const
|
|
8
|
+
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({
|
|
11
12
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
14
|
-
var
|
|
15
|
-
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (
|
|
16
|
-
}),
|
|
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 = () => {
|
|
17
18
|
if (e.isVersionHistoryOpen) {
|
|
18
|
-
|
|
19
|
+
r();
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
if (e.isPreviewModeOpen) {
|
|
22
|
-
|
|
23
|
+
n();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (e.isAccessibilityTestingOpen) {
|
|
27
|
+
c();
|
|
23
28
|
return;
|
|
24
29
|
}
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
30
|
+
s();
|
|
31
|
+
}, u = M(() => {
|
|
32
|
+
a(), i.value = !1;
|
|
28
33
|
}, 500);
|
|
29
|
-
return { __sfc: !0, editorStore: e, handleBack:
|
|
30
|
-
|
|
31
|
-
}, InButtonV2:
|
|
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 };
|
|
32
37
|
}
|
|
33
38
|
});
|
|
34
39
|
export {
|
|
35
|
-
|
|
40
|
+
F as default
|
|
36
41
|
};
|
|
@@ -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, 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);
|
|
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 _ = n.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -2,15 +2,16 @@ 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
|
-
|
|
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({
|
|
9
10
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
11
|
-
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t,
|
|
11
|
+
setup(f) {
|
|
12
|
+
return { __sfc: !0, editorStore: i(), AmpToggle: r, EmailSizeIndicator: t, AccessibilityToolbar: e, EditorToolbar: m, VersionHistory: p, VersionHistoryViewOptions: s };
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
y as default
|
|
16
17
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i 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 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,
|
|
8
8
|
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const u =
|
|
14
|
+
const u = l.exports;
|
|
15
15
|
export {
|
|
16
16
|
u as default
|
|
17
17
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
1
|
+
import { defineComponent as u, ref as f, computed as r } from "vue";
|
|
2
|
+
import { useConfig as c } 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 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({
|
|
10
10
|
__name: "RightSlot",
|
|
11
|
-
setup(
|
|
12
|
-
const { isFeatureEnabled:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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);
|
|
17
19
|
}
|
|
18
|
-
}), { __sfc: !0, isFeatureEnabled:
|
|
20
|
+
}), { __sfc: !0, isFeatureEnabled: t, trans: n, editorStore: o, editorActionsRef: e, isLiquidEnabled: m, isNormalMode: a, InChips: S, AutoSaveStatus: _, EditorActions: h, RestoreButton: v };
|
|
19
21
|
}
|
|
20
22
|
});
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
O as default
|
|
23
25
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import o from "./AccessibilityToolbar.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c accessibility-toolbar" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-no-images", "data-testid": "Accessibility No Images", "left-icon": "line-image", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.imagesHidden, "tooltip-options": t.getTooltipOptions("guido__a11y-no-images"), "tooltip-text": t.imagesTooltip }, on: { click: t.toggleImages } }), e(t.InButtonV2, { attrs: { id: "guido__a11y-code", "data-testid": "Accessibility Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__a11y-code"), "tooltip-text": t.trans("newsletter.html-editor") }, on: { click: t.toggleCodeEditor } }), e("div", { staticClass: "accessibility-toolbar__divider" }), e(t.ColorVisionSelect), e(t.InSegments, { staticClass: "ml-2", attrs: { id: "guido__a11y-view-selection", "with-icon": "", "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
|
|
7
|
+
}, l = [], d = /* @__PURE__ */ s(
|
|
8
|
+
o,
|
|
9
|
+
a,
|
|
10
|
+
l,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"e222d603"
|
|
14
|
+
);
|
|
15
|
+
const g = d.exports;
|
|
16
|
+
export {
|
|
17
|
+
g as default
|
|
18
|
+
};
|