@useinsider/guido 3.19.0-beta.c604f7d → 3.19.0-beta.c8d2be8
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 +20 -21
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +47 -54
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- 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 +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +52 -36
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -32
- 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 +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -56
- package/dist/composables/useCustomInterfaceAppearance.js +41 -42
- package/dist/composables/useHttp.js +55 -44
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +0 -2
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -20
- package/dist/src/stores/editor.d.ts +0 -109
- package/dist/src/stores/onboarding.d.ts +21 -952
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +0 -5
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/editor.js +4 -7
- package/dist/stores/onboarding.js +21 -43
- 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 -25
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -98
- 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 -22
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -90
- package/dist/composables/useAccessibilityApi.js +0 -35
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +0 -2
- 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/static/styles/components/accessibility.css.js +0 -234
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
|
@@ -6,8 +6,3 @@
|
|
|
6
6
|
* @example formatLocalTime(date, true) -> 12:20:02 (UTC+3 Istanbul)
|
|
7
7
|
*/
|
|
8
8
|
export declare const formatLocalTime: (date: Date, useTimezone?: boolean) => string;
|
|
9
|
-
export declare const autoSaveTimestamp: (date: Date, now?: Date) => {
|
|
10
|
-
isToday: boolean;
|
|
11
|
-
time: string;
|
|
12
|
-
date: string;
|
|
13
|
-
};
|
|
@@ -14,10 +14,8 @@ const o = `:host {
|
|
|
14
14
|
--guido-color-gray-0: #F9F9F9;
|
|
15
15
|
--guido-color-neutral-800: #222938;
|
|
16
16
|
--guido-color-neutral-700: #2C3546;
|
|
17
|
-
--guido-color-neutral-500: #5D6980;
|
|
18
17
|
--guido-color-neutral-200: #DCDFE6;
|
|
19
18
|
--guido-color-neutral-100: #EFF2F4;
|
|
20
|
-
--guido-color-warning-500: #FFBF00;
|
|
21
19
|
--guido-color-danger-300: #e84342;
|
|
22
20
|
--guido-color-danger-500: #DC2A2A;
|
|
23
21
|
--guido-box-shadow: 0 4px 12px 0 rgba(44,53,70,0.15);
|
package/dist/stores/editor.js
CHANGED
|
@@ -6,9 +6,6 @@ const o = e("guidoEditor", {
|
|
|
6
6
|
isSaveAsTemplateDrawerOpen: !1,
|
|
7
7
|
isVersionHistoryOpen: !1,
|
|
8
8
|
isPreviewModeOpen: !1,
|
|
9
|
-
isAccessibilityTestingOpen: !1,
|
|
10
|
-
imagesHidden: !1,
|
|
11
|
-
colorVisionDeficiency: "",
|
|
12
9
|
editorVisualMode: "desktop",
|
|
13
10
|
hasChanges: !1,
|
|
14
11
|
// Bumped on every Stripo document change. `hasChanges` is a latch that stays
|
|
@@ -24,20 +21,20 @@ const o = e("guidoEditor", {
|
|
|
24
21
|
}),
|
|
25
22
|
getters: {
|
|
26
23
|
// Middle Slot
|
|
27
|
-
isEditorToolbarVisible: (i) => !i.isVersionHistoryOpen && !i.isPreviewModeOpen
|
|
24
|
+
isEditorToolbarVisible: (i) => !i.isVersionHistoryOpen && !i.isPreviewModeOpen,
|
|
28
25
|
isUndoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
|
|
29
26
|
isRedoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
|
|
30
27
|
isCodeEditorButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
|
|
31
28
|
isPreviewButtonDisabled: (i) => i.loadingStatus,
|
|
32
29
|
isViewOptionsDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
|
|
33
30
|
// Right Slot
|
|
34
|
-
isNormalMode: (i) => !i.isVersionHistoryOpen && !i.isAccessibilityTestingOpen,
|
|
35
31
|
isVersionHistoryButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
|
|
36
32
|
isExportButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
|
|
37
33
|
isSaveAsButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
|
|
38
34
|
isTestButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
|
|
39
|
-
isSaveButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen || i.isPreviewModeOpen
|
|
40
|
-
|
|
35
|
+
isSaveButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen || i.isPreviewModeOpen,
|
|
36
|
+
// Autosave
|
|
37
|
+
isInSaveableState: (i) => !i.loadingStatus && !i.isVersionHistoryOpen && !i.isPreviewModeOpen && !i.isCodeEditorOpen
|
|
41
38
|
}
|
|
42
39
|
});
|
|
43
40
|
export {
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { useOnboardingApi as
|
|
1
|
+
import { useOnboardingApi as e } from "../services/onboardingApi.js";
|
|
2
2
|
import { defineStore as s } from "pinia";
|
|
3
|
-
const
|
|
3
|
+
const t = () => ({
|
|
4
4
|
cardIndex: 0,
|
|
5
5
|
isActive: !1,
|
|
6
|
-
config: []
|
|
7
|
-
cardOffset: 0
|
|
6
|
+
config: []
|
|
8
7
|
}), a = () => ({
|
|
9
8
|
onboardings: {
|
|
10
|
-
newVersionPopup:
|
|
11
|
-
genericOnboarding:
|
|
12
|
-
textBlockOnboarding:
|
|
13
|
-
versionHistoryOnboarding:
|
|
14
|
-
ampOnboarding:
|
|
15
|
-
itemsOnboarding:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
recommendationLegacyStrategyOnboarding: e()
|
|
9
|
+
newVersionPopup: t(),
|
|
10
|
+
genericOnboarding: t(),
|
|
11
|
+
textBlockOnboarding: t(),
|
|
12
|
+
versionHistoryOnboarding: t(),
|
|
13
|
+
ampOnboarding: t(),
|
|
14
|
+
itemsOnboarding: t(),
|
|
15
|
+
recommendationStrategyOnboarding: t(),
|
|
16
|
+
recommendationLegacyStrategyOnboarding: t()
|
|
19
17
|
},
|
|
20
18
|
userModalState: {},
|
|
21
|
-
isFetched: !1
|
|
22
|
-
|
|
23
|
-
}), g = s("guidoOnboarding", {
|
|
19
|
+
isFetched: !1
|
|
20
|
+
}), c = s("guidoOnboarding", {
|
|
24
21
|
state: () => a(),
|
|
25
22
|
getters: {
|
|
26
23
|
getOnboarding: (n) => (o) => n.onboardings[o],
|
|
@@ -49,14 +46,6 @@ const e = () => ({
|
|
|
49
46
|
const { itemsOnboarding: o } = n.onboardings;
|
|
50
47
|
return o.config[o.cardIndex];
|
|
51
48
|
},
|
|
52
|
-
getEditorTabBarCurrentCard: (n) => {
|
|
53
|
-
const { editorTabBarOnboarding: o } = n.onboardings;
|
|
54
|
-
return o.config[o.cardIndex];
|
|
55
|
-
},
|
|
56
|
-
isEditorActionsMenuPinned: (n) => {
|
|
57
|
-
const { editorTabBarOnboarding: o } = n.onboardings, i = o.config[o.cardIndex];
|
|
58
|
-
return o.isActive && !!(i != null && i.pinsMenu);
|
|
59
|
-
},
|
|
60
49
|
getRecommendationStrategyCurrentCard: (n) => {
|
|
61
50
|
const { recommendationStrategyOnboarding: o } = n.onboardings;
|
|
62
51
|
return o.config[o.cardIndex];
|
|
@@ -74,10 +63,7 @@ const e = () => ({
|
|
|
74
63
|
closeOtherOnboardings(n) {
|
|
75
64
|
Object.keys(this.onboardings).forEach((o) => {
|
|
76
65
|
const i = o;
|
|
77
|
-
|
|
78
|
-
const r = this.onboardings[i];
|
|
79
|
-
r.cardOffset += r.cardIndex, r.isActive = !1, r.cardIndex = 0, r.config = [];
|
|
80
|
-
}
|
|
66
|
+
i !== n && this.onboardings[i].isActive && (this.onboardings[i].isActive = !1, this.onboardings[i].cardIndex = 0, this.onboardings[i].config = []);
|
|
81
67
|
});
|
|
82
68
|
},
|
|
83
69
|
start(n) {
|
|
@@ -86,16 +72,8 @@ const e = () => ({
|
|
|
86
72
|
startOnboarding(n) {
|
|
87
73
|
this.shouldShowOnboarding(n) && !this.isActive(n) && this.start(n);
|
|
88
74
|
},
|
|
89
|
-
closeForSession(n) {
|
|
90
|
-
this.closedThisSession.includes(n) || this.closedThisSession.push(n), this.onboardings[n].isActive = !1, this.onboardings[n].cardIndex = 0, this.onboardings[n].config = [], this.onboardings[n].cardOffset = 0;
|
|
91
|
-
},
|
|
92
75
|
async close(n) {
|
|
93
|
-
this.
|
|
94
|
-
try {
|
|
95
|
-
await this.setUserModalState(n, "true", "Guido");
|
|
96
|
-
} catch (o) {
|
|
97
|
-
console.warn("guido:onboarding:close-not-persisted", n, o);
|
|
98
|
-
}
|
|
76
|
+
await this.setUserModalState(n, "true", "Guido"), this.onboardings[n].isActive = !1, this.onboardings[n].cardIndex = 0, this.onboardings[n].config = [];
|
|
99
77
|
},
|
|
100
78
|
next(n) {
|
|
101
79
|
this.onboardings[n].cardIndex < this.onboardings[n].config.length - 1 && this.onboardings[n].cardIndex++;
|
|
@@ -107,11 +85,11 @@ const e = () => ({
|
|
|
107
85
|
const r = this.onboardings[n].config[o];
|
|
108
86
|
r && (r.top = i.top, r.position = i.position);
|
|
109
87
|
},
|
|
110
|
-
setConfig(n, o
|
|
111
|
-
this.onboardings[n].config = o ?? [], this.onboardings[n].
|
|
88
|
+
setConfig(n, o) {
|
|
89
|
+
this.onboardings[n].config = o ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
|
|
112
90
|
},
|
|
113
91
|
async onDiscoverNowClicked() {
|
|
114
|
-
|
|
92
|
+
await this.setUserModalState("newVersionPopup", "true", "Guido"), await this.setUserModalState("genericOnboarding", "true", "Guido"), this.start("genericOnboarding");
|
|
115
93
|
},
|
|
116
94
|
onRemindMeLater() {
|
|
117
95
|
sessionStorage.setItem("newVersionPopupDismissed", "true");
|
|
@@ -125,7 +103,7 @@ const e = () => ({
|
|
|
125
103
|
async fetchUserModalState() {
|
|
126
104
|
if (this.isFetched)
|
|
127
105
|
return;
|
|
128
|
-
const { fetchUserModalState: n } =
|
|
106
|
+
const { fetchUserModalState: n } = e();
|
|
129
107
|
try {
|
|
130
108
|
const o = await n();
|
|
131
109
|
this.userModalState = o, this.isFetched = !0;
|
|
@@ -133,11 +111,11 @@ const e = () => ({
|
|
|
133
111
|
}
|
|
134
112
|
},
|
|
135
113
|
async setUserModalState(n, o, i) {
|
|
136
|
-
const { setUserModalState: r } =
|
|
114
|
+
const { setUserModalState: r } = e();
|
|
137
115
|
await r(n, o, i), this.isFetched = !1, await this.fetchUserModalState();
|
|
138
116
|
}
|
|
139
117
|
}
|
|
140
118
|
});
|
|
141
119
|
export {
|
|
142
|
-
|
|
120
|
+
c as useOnboardingStore
|
|
143
121
|
};
|
package/dist/utils/timeUtil.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const r = (t) => {
|
|
2
|
+
const e = -t.getTimezoneOffset(), o = e >= 0 ? "+" : "-", n = Math.abs(e), s = Math.floor(n / 60), i = n % 60;
|
|
3
|
+
return i === 0 ? `UTC${o}${s}` : `UTC${o}${s}:${String(i).padStart(2, "0")}`;
|
|
4
|
+
}, a = () => {
|
|
5
|
+
var e;
|
|
6
|
+
const { timeZone: t } = new Intl.DateTimeFormat().resolvedOptions();
|
|
7
|
+
return ((e = t.split("/").pop()) == null ? void 0 : e.replace(/_/g, " ")) ?? t;
|
|
8
|
+
}, c = (t, e = !1) => {
|
|
9
|
+
const o = t.toLocaleTimeString([], {
|
|
10
|
+
hour: "2-digit",
|
|
11
|
+
hour12: !1,
|
|
12
|
+
minute: "2-digit",
|
|
13
|
+
second: "2-digit"
|
|
14
|
+
});
|
|
15
|
+
return e ? `${o} (${r(t)} ${a()})` : o;
|
|
16
|
+
};
|
|
6
17
|
export {
|
|
7
|
-
|
|
18
|
+
c as formatLocalTime
|
|
8
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.19.0-beta.
|
|
3
|
+
"version": "3.19.0-beta.c8d2be8",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import t from "./AutoSaveStatus.vue2.js";
|
|
2
|
-
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var _ = function() {
|
|
4
|
-
var s = this, e = s._self._c, a = s._self._setupProxy;
|
|
5
|
-
return a.isFeatureEnabled("autosave") ? e("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? e("span", { staticClass: "d-f a-i-c f-s-1" }, [e(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), e("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? e("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel.before)), a.savedLabel.word ? e("span", { staticClass: "f-w-600" }, [s._v(s._s(a.savedLabel.word))]) : s._e(), s._v(s._s(a.savedLabel.after))]) : s._e()]) : s._e();
|
|
6
|
-
}, n = [], o = /* @__PURE__ */ r(
|
|
7
|
-
t,
|
|
8
|
-
_,
|
|
9
|
-
n,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const v = o.exports;
|
|
15
|
-
export {
|
|
16
|
-
v as default
|
|
17
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, computed as S } from "vue";
|
|
2
|
-
import { useConfig as A } from "../../../composables/useConfig.js";
|
|
3
|
-
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { useAutosaveStore as v, AUTOSAVE_STATUS as m } from "../../../stores/autosave.js";
|
|
5
|
-
import { autoSaveTimestamp as b } from "../../../utils/timeUtil.js";
|
|
6
|
-
import { InLoading as D } from "@useinsider/design-system-vue";
|
|
7
|
-
const j = /* @__PURE__ */ p({
|
|
8
|
-
__name: "AutoSaveStatus",
|
|
9
|
-
setup(O) {
|
|
10
|
-
const { isFeatureEnabled: u } = A(), a = v(), n = T(), t = "__BOLD_START__", o = "__BOLD_END__", s = (i) => i.split(t).join("").split(o).join(""), _ = S(() => {
|
|
11
|
-
if (a.status !== m.SAVED || !a.lastSavedAt)
|
|
12
|
-
return null;
|
|
13
|
-
const { isToday: i, time: c, date: f } = b(a.lastSavedAt), l = { boldStart: t, boldEnd: o }, e = i ? n("email-editor.autosaved-at-today", { ...l, time: c }) : n("email-editor.autosaved-at-date", { ...l, date: f }), r = e.indexOf(t), d = e.indexOf(o, r + t.length);
|
|
14
|
-
return r === -1 || d === -1 ? { before: s(e), word: "", after: "" } : {
|
|
15
|
-
before: s(e.slice(0, r)),
|
|
16
|
-
word: s(e.slice(r + t.length, d)),
|
|
17
|
-
after: s(e.slice(d + o.length))
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
j as default
|
|
25
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import i from "./EditorActionsMenu.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var n = function() {
|
|
5
|
-
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return o("div", { staticClass: "editor-actions-menu p-r" }, [o(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.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(d) {
|
|
7
|
-
t.isOpen = !t.isOpen;
|
|
8
|
-
} } }), o(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
|
|
9
|
-
}, a = [], r = /* @__PURE__ */ s(
|
|
10
|
-
i,
|
|
11
|
-
n,
|
|
12
|
-
a,
|
|
13
|
-
!1,
|
|
14
|
-
null,
|
|
15
|
-
"d0e6b57a"
|
|
16
|
-
);
|
|
17
|
-
const _ = r.exports;
|
|
18
|
-
export {
|
|
19
|
-
_ as default
|
|
20
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as C, computed as i, watch as L } from "vue";
|
|
2
|
-
import { useAccessibilityApi as R } from "../../../composables/useAccessibilityApi.js";
|
|
3
|
-
import { useConfig as Y } from "../../../composables/useConfig.js";
|
|
4
|
-
import { useExport as F } from "../../../composables/useExport.js";
|
|
5
|
-
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
6
|
-
import { useVersionHistoryApi as U } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
-
import { useAutosaveStore as X } from "../../../stores/autosave.js";
|
|
8
|
-
import { useEditorStore as j } from "../../../stores/editor.js";
|
|
9
|
-
import { useOnboardingStore as q } from "../../../stores/onboarding.js";
|
|
10
|
-
import { getTooltipOptions as z } from "../../../utils/tooltipUtils.js";
|
|
11
|
-
import { InToggle as G, InDropdownMenu as J, InButtonV2 as K } from "@useinsider/design-system-vue";
|
|
12
|
-
const ce = /* @__PURE__ */ D({
|
|
13
|
-
__name: "EditorActionsMenu",
|
|
14
|
-
setup(Q) {
|
|
15
|
-
const c = "guido__kebab-autosave", u = "guido__kebab-version-history", d = "guido__kebab-accessibility", p = "guido__kebab-save-as", v = "guido__kebab-export", { config: m, isFeatureEnabled: b } = Y(), { exportHtml: y } = F(), { openVersionHistory: A, closeVersionHistory: S } = U(), { toggleAccessibilityTestingMode: _ } = R(), e = j(), a = X(), f = q(), o = N(), g = C(!1), M = i(() => g.value || f.isEditorActionsMenuPinned), r = C(!1), O = i(() => b("autosave")), x = i(
|
|
16
|
-
() => {
|
|
17
|
-
var t, s;
|
|
18
|
-
return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.versionHistory) && !e.isPreviewModeOpen;
|
|
19
|
-
}
|
|
20
|
-
), h = i(
|
|
21
|
-
() => b("accessibilityTesting") && !e.isPreviewModeOpen
|
|
22
|
-
), V = i(() => {
|
|
23
|
-
var t, s;
|
|
24
|
-
return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.saveAsTemplate);
|
|
25
|
-
}), E = i(() => O.value ? [
|
|
26
|
-
{ categoryText: o("email-editor.preferences") },
|
|
27
|
-
{
|
|
28
|
-
text: o("email-editor.auto-save"),
|
|
29
|
-
value: c,
|
|
30
|
-
disable: e.loadingStatus,
|
|
31
|
-
rightSlotComponent: G,
|
|
32
|
-
rightSlotProps: {
|
|
33
|
-
id: "guido__kebab-autosave-toggle",
|
|
34
|
-
name: "guido-kebab-autosave-toggle",
|
|
35
|
-
class: "p-e-n",
|
|
36
|
-
checked: a.isOn,
|
|
37
|
-
disable: e.loadingStatus
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{ divider: "solid" }
|
|
41
|
-
] : []), T = i(() => [
|
|
42
|
-
{ categoryText: o("email-editor.actions") },
|
|
43
|
-
...x.value ? [{
|
|
44
|
-
text: o("newsletter.version-history"),
|
|
45
|
-
value: u,
|
|
46
|
-
iconLeft: "line-architect-version-history",
|
|
47
|
-
disable: e.isVersionHistoryButtonDisabled
|
|
48
|
-
}] : [],
|
|
49
|
-
...h.value ? [{
|
|
50
|
-
text: o("email-editor.accessibility-test"),
|
|
51
|
-
value: d,
|
|
52
|
-
iconLeft: "line-accessibility",
|
|
53
|
-
disable: e.loadingStatus
|
|
54
|
-
}] : [],
|
|
55
|
-
...V.value ? [{
|
|
56
|
-
text: o("newsletter.save-templates"),
|
|
57
|
-
value: p,
|
|
58
|
-
iconLeft: "line-newsletter-save-as-template",
|
|
59
|
-
disable: e.isSaveAsButtonDisabled
|
|
60
|
-
}] : [],
|
|
61
|
-
{
|
|
62
|
-
text: o("email-editor.export-html"),
|
|
63
|
-
value: v,
|
|
64
|
-
iconLeft: "line-export",
|
|
65
|
-
disable: r.value || e.isExportButtonDisabled
|
|
66
|
-
}
|
|
67
|
-
]), P = i(() => [...E.value, ...T.value]), n = () => {
|
|
68
|
-
g.value = !1;
|
|
69
|
-
};
|
|
70
|
-
L(() => f.isEditorActionsMenuPinned, (t) => {
|
|
71
|
-
t || n();
|
|
72
|
-
});
|
|
73
|
-
const k = () => {
|
|
74
|
-
a.isOn = !a.isOn;
|
|
75
|
-
}, w = () => {
|
|
76
|
-
e.isVersionHistoryOpen ? S() : A(), n();
|
|
77
|
-
}, H = () => {
|
|
78
|
-
_(), n();
|
|
79
|
-
}, I = () => {
|
|
80
|
-
e.isSaveAsTemplateDrawerOpen = !0, n();
|
|
81
|
-
}, B = async () => {
|
|
82
|
-
r.value = !0, await y(), r.value = !1, n();
|
|
83
|
-
}, l = {
|
|
84
|
-
[c]: k,
|
|
85
|
-
[u]: w,
|
|
86
|
-
[d]: H,
|
|
87
|
-
[p]: I,
|
|
88
|
-
[v]: B
|
|
89
|
-
};
|
|
90
|
-
return { __sfc: !0, AUTOSAVE: c, VERSION_HISTORY: u, ACCESSIBILITY: d, SAVE_AS: p, EXPORT: v, config: m, isFeatureEnabled: b, exportHtml: y, openVersionHistory: A, closeVersionHistory: S, toggleAccessibilityTestingMode: _, editorStore: e, autosaveStore: a, onboardingStore: f, trans: o, isOpen: g, isPanelOpen: M, isExporting: r, isAutosaveVisible: O, isVersionHistoryVisible: x, isAccessibilityVisible: h, isSaveAsVisible: V, preferenceOptions: E, actionOptions: T, options: P, close: n, toggleAutosave: k, handleVersionHistory: w, handleAccessibility: H, handleSaveAs: I, handleExport: B, optionHandlers: l, handleOptionClick: ({ value: t }) => {
|
|
91
|
-
var s;
|
|
92
|
-
return (s = l[t]) == null ? void 0 : s.call(l);
|
|
93
|
-
}, getTooltipOptions: z, InButtonV2: K, InDropdownMenu: J };
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
export {
|
|
97
|
-
ce as default
|
|
98
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import i from "./AccessibilityToolbar.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var a = function() {
|
|
5
|
-
var o = this, e = o._self._c, t = o._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(t.ColorVisionSelect), e(t.InSegments, { attrs: { id: "guido__a11y-view-selection", "with-icon": "", disable: t.editorStore.loadingStatus, "segment-list": t.segmentList, selected: t.editorStore.editorVisualMode }, on: { click: t.handleView } })], 1);
|
|
7
|
-
}, l = [], d = /* @__PURE__ */ s(
|
|
8
|
-
i,
|
|
9
|
-
a,
|
|
10
|
-
l,
|
|
11
|
-
!1,
|
|
12
|
-
null,
|
|
13
|
-
"c389d28f"
|
|
14
|
-
);
|
|
15
|
-
const _ = d.exports;
|
|
16
|
-
export {
|
|
17
|
-
_ as default
|
|
18
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, computed as n } from "vue";
|
|
2
|
-
import { useAccessibilityApi as c } from "../../../../composables/useAccessibilityApi.js";
|
|
3
|
-
import { useTranslations as g } from "../../../../composables/useTranslations.js";
|
|
4
|
-
import { useEditorStore as u } from "../../../../stores/editor.js";
|
|
5
|
-
import { getTooltipOptions as e } from "../../../../utils/tooltipUtils.js";
|
|
6
|
-
import { InSegments as _, InButtonV2 as f } from "@useinsider/design-system-vue";
|
|
7
|
-
import w from "./ColorVisionSelect.vue.js";
|
|
8
|
-
const A = /* @__PURE__ */ d({
|
|
9
|
-
__name: "AccessibilityToolbar",
|
|
10
|
-
setup(b) {
|
|
11
|
-
const t = u(), o = g(), {
|
|
12
|
-
toggleImages: r,
|
|
13
|
-
toggleCodeEditor: m,
|
|
14
|
-
switchToDesktopPreview: i,
|
|
15
|
-
switchToMobilePreview: s
|
|
16
|
-
} = c(), l = n(() => [
|
|
17
|
-
{
|
|
18
|
-
text: "",
|
|
19
|
-
icon: "line-desktop",
|
|
20
|
-
value: "desktop",
|
|
21
|
-
tooltipText: o("newsletter.desktop"),
|
|
22
|
-
tooltipOptions: e("guido__a11y-view-desktop")
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
text: "",
|
|
26
|
-
icon: "line-menu-mobileapp",
|
|
27
|
-
value: "mobile",
|
|
28
|
-
tooltipText: o("newsletter.mobile"),
|
|
29
|
-
tooltipOptions: e("guido__a11y-view-mobile")
|
|
30
|
-
}
|
|
31
|
-
]), p = n(() => t.imagesHidden ? o("email-editor.a11y-show-images") : o("email-editor.a11y-hide-images"));
|
|
32
|
-
return { __sfc: !0, editorStore: t, trans: o, toggleImages: r, toggleCodeEditor: m, switchToDesktopPreview: i, switchToMobilePreview: s, segmentList: l, imagesTooltip: p, handleView: (a) => a === "mobile" ? s() : i(), getTooltipOptions: e, InButtonV2: f, InSegments: _, ColorVisionSelect: w };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
A as default
|
|
37
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import i from "./ColorVisionSelect.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var l = function() {
|
|
5
|
-
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "color-vision-select p-r" }, [e(t.InButtonV2, { attrs: { id: "guido__a11y-color-vision-trigger", "left-icon": "line-show-on", "right-icon": "line-chevron-small-down", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text": t.selectedOption.text }, on: { click: function(s) {
|
|
7
|
-
t.isOpen = !t.isOpen;
|
|
8
|
-
} } }), e(t.InDropdownMenu, { staticClass: "color-vision-select__dropdown", attrs: { id: "guido__a11y-color-vision-menu", "is-wrapped-description": "", "box-width": "basedOnLongestItem", "static-position": "bottom left", "dynamic-position": !1, "max-height": 400, options: t.options, "pre-selected-values": [t.selectedOption], "select-all-option-status": !1, status: t.isOpen }, on: { clickOutside: function(s) {
|
|
9
|
-
t.isOpen = !1;
|
|
10
|
-
}, optionClick: t.select } })], 1);
|
|
11
|
-
}, r = [], a = /* @__PURE__ */ n(
|
|
12
|
-
i,
|
|
13
|
-
l,
|
|
14
|
-
r,
|
|
15
|
-
!1,
|
|
16
|
-
null,
|
|
17
|
-
"64cb50da"
|
|
18
|
-
);
|
|
19
|
-
const u = a.exports;
|
|
20
|
-
export {
|
|
21
|
-
u as default
|
|
22
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as p, computed as c } from "vue";
|
|
2
|
-
import { useAccessibilityApi as m } from "../../../../composables/useAccessibilityApi.js";
|
|
3
|
-
import { useTranslations as u } from "../../../../composables/useTranslations.js";
|
|
4
|
-
import { useEditorStore as v } from "../../../../stores/editor.js";
|
|
5
|
-
import { InDropdownMenu as f, InButtonV2 as y } from "@useinsider/design-system-vue";
|
|
6
|
-
const C = /* @__PURE__ */ d({
|
|
7
|
-
__name: "ColorVisionSelect",
|
|
8
|
-
setup(K) {
|
|
9
|
-
const i = "none", a = [
|
|
10
|
-
{
|
|
11
|
-
value: i,
|
|
12
|
-
labelKey: "email-editor.cvd-none"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
value: "protanopia",
|
|
16
|
-
labelKey: "email-editor.cvd-protanopia",
|
|
17
|
-
descriptionKey: "email-editor.cvd-protanopia-description"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
value: "deuteranopia",
|
|
21
|
-
labelKey: "email-editor.cvd-deuteranopia",
|
|
22
|
-
descriptionKey: "email-editor.cvd-deuteranopia-description"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: "tritanopia",
|
|
26
|
-
labelKey: "email-editor.cvd-tritanopia",
|
|
27
|
-
descriptionKey: "email-editor.cvd-tritanopia-description"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
value: "achromatopsia",
|
|
31
|
-
labelKey: "email-editor.cvd-achromatopsia",
|
|
32
|
-
descriptionKey: "email-editor.cvd-achromatopsia-description"
|
|
33
|
-
}
|
|
34
|
-
], r = v(), o = u(), { setColorVisionDeficiency: n } = m(), s = p(!1), t = c(() => a.map((e) => ({
|
|
35
|
-
text: o(e.labelKey),
|
|
36
|
-
value: e.value,
|
|
37
|
-
...e.descriptionKey ? { description: o(e.descriptionKey) } : {}
|
|
38
|
-
}))), l = c(
|
|
39
|
-
() => t.value.find((e) => e.value === (r.colorVisionDeficiency || i)) ?? t.value[0]
|
|
40
|
-
);
|
|
41
|
-
return { __sfc: !0, NONE: i, OPTIONS: a, editorStore: r, trans: o, setColorVisionDeficiency: n, isOpen: s, options: t, selectedOption: l, select: ({ value: e }) => {
|
|
42
|
-
n(e === i ? "" : e), s.value = !1;
|
|
43
|
-
}, InButtonV2: y, InDropdownMenu: f };
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
export {
|
|
47
|
-
C as default
|
|
48
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import i from "./EditorTabBarOnboarding.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var s = function() {
|
|
5
|
-
var r, n;
|
|
6
|
-
var t = this, e = t._self._c, o = t._self._setupProxy;
|
|
7
|
-
return o.isVisible ? e(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (r = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : r.classes, attrs: { id: o.CARD_ID, "is-multiple-page": "", visible: "", "image-source": "", title: "", "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.position, "right-position": o.placement.right, "top-position": o.placement.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : t._e();
|
|
8
|
-
}, c = [], d = /* @__PURE__ */ a(
|
|
9
|
-
i,
|
|
10
|
-
s,
|
|
11
|
-
c,
|
|
12
|
-
!1,
|
|
13
|
-
null,
|
|
14
|
-
"42f02a1f"
|
|
15
|
-
);
|
|
16
|
-
const g = d.exports;
|
|
17
|
-
export {
|
|
18
|
-
g as default
|
|
19
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, ref as q, computed as P, watch as N, nextTick as A } from "vue";
|
|
2
|
-
import { useConfig as D } from "../../../composables/useConfig.js";
|
|
3
|
-
import { useRibbonOffset as F } from "../../../composables/useRibbonOffset.js";
|
|
4
|
-
import { useTranslations as G } from "../../../composables/useTranslations.js";
|
|
5
|
-
import { useOnboardingStore as K } from "../../../stores/onboarding.js";
|
|
6
|
-
import { InOnboard as $ } from "@useinsider/design-system-vue";
|
|
7
|
-
const Q = /* @__PURE__ */ M({
|
|
8
|
-
__name: "EditorTabBarOnboarding",
|
|
9
|
-
setup(H) {
|
|
10
|
-
const r = "editorTabBarOnboarding", m = "guido__tab-bar-onboard", a = G(), o = K(), { isFeatureEnabled: B } = D(), { getTopPosition: x } = F(), f = () => o.next(r), k = () => o.previous(r), T = () => void o.close(r), _ = 4, C = 17, c = "#guido__kebab-button", u = ".editor-actions-menu__dropdown", d = (t, e, n) => ({
|
|
11
|
-
classes: "guido-tab-bar-onboarding",
|
|
12
|
-
position: "Right Top",
|
|
13
|
-
title: a(t),
|
|
14
|
-
description: a(e),
|
|
15
|
-
imageSource: "",
|
|
16
|
-
backButtonType: "text",
|
|
17
|
-
backButtonText: a("action-builder.back"),
|
|
18
|
-
backButtonClick: k,
|
|
19
|
-
nextButtonType: "text",
|
|
20
|
-
nextButtonText: a("action-builder.next"),
|
|
21
|
-
nextButtonClick: f,
|
|
22
|
-
...n
|
|
23
|
-
}), b = { backButtonType: void 0, backButtonText: void 0, backButtonClick: () => {
|
|
24
|
-
} }, O = () => B("autosave") ? [{
|
|
25
|
-
card: d("email-editor.onboarding-autosave-title", "email-editor.onboarding-autosave-description", {
|
|
26
|
-
pinsMenu: !0
|
|
27
|
-
}),
|
|
28
|
-
edge: u,
|
|
29
|
-
target: '[data-attr-value="guido__kebab-autosave"]'
|
|
30
|
-
}] : [], v = () => [
|
|
31
|
-
{
|
|
32
|
-
card: d("email-editor.onboarding-kebab-title", "email-editor.onboarding-kebab-description", b),
|
|
33
|
-
edge: c,
|
|
34
|
-
target: c
|
|
35
|
-
},
|
|
36
|
-
...O(),
|
|
37
|
-
{
|
|
38
|
-
card: d("email-editor.onboarding-accessibility-title", "email-editor.onboarding-accessibility-description", {
|
|
39
|
-
nextButtonText: a("action-builder.ok"),
|
|
40
|
-
nextButtonClick: T,
|
|
41
|
-
pinsMenu: !0
|
|
42
|
-
}),
|
|
43
|
-
edge: u,
|
|
44
|
-
target: '[data-attr-value="guido__kebab-accessibility"]'
|
|
45
|
-
}
|
|
46
|
-
], h = (t, e) => {
|
|
47
|
-
if (e <= 0 || e >= t.length)
|
|
48
|
-
return { steps: t, offset: 0 };
|
|
49
|
-
const [n, ...i] = t.slice(e);
|
|
50
|
-
return { steps: [{ ...n, card: { ...n.card, ...b } }, ...i], offset: e };
|
|
51
|
-
}, g = () => ({ top: x(56), right: "150px" });
|
|
52
|
-
let s = [];
|
|
53
|
-
const l = q(g()), p = async () => {
|
|
54
|
-
var R;
|
|
55
|
-
await A();
|
|
56
|
-
const t = s[o.onboardings.editorTabBarOnboarding.cardIndex], e = (R = document.getElementById(m)) == null ? void 0 : R.offsetParent, n = (t && document.querySelector(t.edge)) ?? document.querySelector(c), i = (t && document.querySelector(t.target)) ?? document.querySelector(c);
|
|
57
|
-
if (!e || !n || !i) {
|
|
58
|
-
l.value = g();
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const y = e.getBoundingClientRect(), E = i.getBoundingClientRect();
|
|
62
|
-
l.value = {
|
|
63
|
-
top: `${Math.round(E.top + E.height / 2 - y.top - C)}px`,
|
|
64
|
-
right: `${Math.round(y.right - n.getBoundingClientRect().left - _)}px`
|
|
65
|
-
};
|
|
66
|
-
}, S = P(
|
|
67
|
-
() => o.onboardings.editorTabBarOnboarding.config.length > 0 && o.onboardings.editorTabBarOnboarding.isActive
|
|
68
|
-
), I = () => {
|
|
69
|
-
var t, e;
|
|
70
|
-
(e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
|
|
71
|
-
}, w = () => {
|
|
72
|
-
var t, e;
|
|
73
|
-
(e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
|
|
74
|
-
};
|
|
75
|
-
return N(
|
|
76
|
-
() => o.onboardings.editorTabBarOnboarding.isActive,
|
|
77
|
-
async (t) => {
|
|
78
|
-
if (!t)
|
|
79
|
-
return;
|
|
80
|
-
await A();
|
|
81
|
-
const { cardOffset: e } = o.onboardings.editorTabBarOnboarding, n = h(v(), e);
|
|
82
|
-
({ steps: s } = n), o.setConfig(r, s.map((i) => i.card), n.offset), await p();
|
|
83
|
-
},
|
|
84
|
-
{ immediate: !0 }
|
|
85
|
-
), N(() => o.onboardings.editorTabBarOnboarding.cardIndex, p), { __sfc: !0, ONBOARDING: r, CARD_ID: m, trans: a, onboardingStore: o, isFeatureEnabled: B, getTopPosition: x, goNext: f, goBack: k, finish: T, ANCHOR_GAP: _, POINTER_CENTER: C, KEBAB: c, MENU: u, card: d, NO_BACK: b, autoSaveStep: O, buildSteps: v, resumeFrom: h, designFallback: g, steps: s, placement: l, place: p, isVisible: S, handleNext: I, handleBack: w, InOnboard: $ };
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
export {
|
|
89
|
-
Q as default
|
|
90
|
-
};
|