@useinsider/guido 3.19.0-beta.c604f7d → 3.19.0-beta.cac604e
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 +104 -92
- 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 +51 -37
- 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/useActionsApi.js +52 -47
- package/dist/composables/useCodeEditorApi.js +23 -9
- package/dist/composables/useCustomInterfaceAppearance.js +41 -42
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useVersionHistoryApi.js +33 -24
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/extensions/Blocks/Recommendation/block.js +88 -53
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +42 -22
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +26 -0
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +16 -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 +2 -2
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +27 -0
- package/dist/src/stores/config.d.ts +20 -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/stripoEditorApi.d.ts +4 -0
- package/dist/src/utils/timeUtil.d.ts +0 -5
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- 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/stores/unsubscribe.js +3 -3
- package/dist/utils/stripoEditorApi.js +11 -0
- package/dist/utils/timeUtil.js +17 -6
- package/package.json +2 -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
|
@@ -1,68 +1,50 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { usePreviewStore as N } from "../../../stores/preview.js";
|
|
16
|
-
const Z = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as f, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
|
+
import y from "./AMPOnboarding.vue.js";
|
|
3
|
+
import u from "./GenericOnboarding.vue.js";
|
|
4
|
+
import v from "./ItemsOnboarding.vue.js";
|
|
5
|
+
import S from "./NewVersionPopup.vue.js";
|
|
6
|
+
import l from "./RecommendationLegacyStrategyOnboarding.vue.js";
|
|
7
|
+
import h from "./RecommendationStrategyOnboarding.vue.js";
|
|
8
|
+
import w from "./TextBlockOnboarding.vue.js";
|
|
9
|
+
import P from "./VersionHistoryOnboarding.vue.js";
|
|
10
|
+
import { usePartner as _ } from "../../../composables/usePartner.js";
|
|
11
|
+
import { useEditorStore as A } from "../../../stores/editor.js";
|
|
12
|
+
import { useOnboardingStore as H } from "../../../stores/onboarding.js";
|
|
13
|
+
import { usePreviewStore as M } from "../../../stores/preview.js";
|
|
14
|
+
const U = /* @__PURE__ */ f({
|
|
17
15
|
__name: "OnboardingWrapper",
|
|
18
16
|
emits: ["onboarding-finished"],
|
|
19
|
-
setup(
|
|
20
|
-
const o =
|
|
21
|
-
{ type: "newVersionPopup", component:
|
|
22
|
-
{ type: "genericOnboarding", component:
|
|
23
|
-
{ type: "textBlockOnboarding", component:
|
|
24
|
-
{ type: "versionHistoryOnboarding", component:
|
|
25
|
-
{ type: "ampOnboarding", component:
|
|
26
|
-
{ type: "itemsOnboarding", component:
|
|
27
|
-
{ type: "
|
|
28
|
-
{ type: "
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
S(async () => {
|
|
17
|
+
setup(x, { emit: g }) {
|
|
18
|
+
const o = H(), r = A(), a = M(), { isTestPartner: s } = _(), m = e(() => r.isStripoInitialized), p = e(() => s()), d = [
|
|
19
|
+
{ type: "newVersionPopup", component: S },
|
|
20
|
+
{ type: "genericOnboarding", component: u },
|
|
21
|
+
{ type: "textBlockOnboarding", component: w },
|
|
22
|
+
{ type: "versionHistoryOnboarding", component: P },
|
|
23
|
+
{ type: "ampOnboarding", component: y },
|
|
24
|
+
{ type: "itemsOnboarding", component: v },
|
|
25
|
+
{ type: "recommendationStrategyOnboarding", component: h },
|
|
26
|
+
{ type: "recommendationLegacyStrategyOnboarding", component: l }
|
|
27
|
+
], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), b = e(() => d.filter((n) => c(n.type)));
|
|
28
|
+
return O(async () => {
|
|
32
29
|
await o.fetchUserModalState();
|
|
33
|
-
}),
|
|
34
|
-
() =>
|
|
35
|
-
(n,
|
|
36
|
-
n && !
|
|
30
|
+
}), t(
|
|
31
|
+
() => r.isVersionHistoryOpen,
|
|
32
|
+
(n, i) => {
|
|
33
|
+
n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
|
|
37
34
|
}
|
|
38
|
-
),
|
|
39
|
-
() =>
|
|
40
|
-
(n,
|
|
41
|
-
|
|
35
|
+
), t(
|
|
36
|
+
() => a.emailFormat,
|
|
37
|
+
(n, i) => {
|
|
38
|
+
i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
42
39
|
}
|
|
43
|
-
),
|
|
44
|
-
() =>
|
|
40
|
+
), t(
|
|
41
|
+
() => r.isPreviewModeOpen,
|
|
45
42
|
(n) => {
|
|
46
43
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
47
44
|
}
|
|
48
|
-
);
|
|
49
|
-
const d = h(!1), v = (n) => {
|
|
50
|
-
n === "newVersionPopup" && (d.value = !0), p("onboarding-finished");
|
|
51
|
-
}, m = r(() => i.isNormalMode && !i.isPreviewModeOpen), u = r(() => a.value && o.isFetched && g("accessibilityTesting") && !s.value && m.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
|
|
52
|
-
return e(
|
|
53
|
-
u,
|
|
54
|
-
(n) => {
|
|
55
|
-
n && o.start("editorTabBarOnboarding");
|
|
56
|
-
},
|
|
57
|
-
{ immediate: !0 }
|
|
58
|
-
), e(
|
|
59
|
-
m,
|
|
60
|
-
(n) => {
|
|
61
|
-
!n && o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding");
|
|
62
|
-
}
|
|
63
|
-
), { __sfc: !0, emit: p, onboardingStore: o, editorStore: i, previewStore: c, isTestPartner: b, isFeatureEnabled: g, isStripoReady: a, isTestPartnerActive: s, onboardingConfigs: O, shouldShow: f, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: m, canStartTabBarTour: u };
|
|
45
|
+
), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: a, isTestPartner: s, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: b };
|
|
64
46
|
}
|
|
65
47
|
});
|
|
66
48
|
export {
|
|
67
|
-
|
|
49
|
+
U as default
|
|
68
50
|
};
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { filterAmpErrors as y } from "../utils/ampErrorFilter.js";
|
|
2
|
+
import { getEditorApi as s } from "../utils/stripoEditorApi.js";
|
|
3
|
+
import { useToaster as D } from "./useToaster.js";
|
|
4
|
+
const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
|
|
5
|
+
const f = setTimeout(
|
|
6
|
+
() => p(new Error(`${n} did not report completion within ${l}ms`)),
|
|
6
7
|
l
|
|
7
|
-
),
|
|
8
|
-
clearTimeout(
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
), c = (t) => (e) => {
|
|
9
|
+
clearTimeout(f), t(e);
|
|
10
|
+
}, d = c(p);
|
|
11
|
+
try {
|
|
12
|
+
A(c(C), d);
|
|
13
|
+
} catch (t) {
|
|
14
|
+
d(t);
|
|
15
|
+
}
|
|
16
|
+
}), P = () => {
|
|
17
|
+
const { handleError: n } = D(), l = (t = {}) => r(
|
|
13
18
|
"compileEmail",
|
|
14
|
-
|
|
15
|
-
(e,
|
|
19
|
+
T,
|
|
20
|
+
(e, i) => {
|
|
16
21
|
const o = { ...{
|
|
17
22
|
minimize: !0,
|
|
18
23
|
utmEntity: {
|
|
@@ -32,53 +37,53 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
|
32
37
|
forceAmp: !1,
|
|
33
38
|
resetDataSavedFlag: !1,
|
|
34
39
|
disableLineHeightsReplace: !0
|
|
35
|
-
}, ...t },
|
|
36
|
-
callback: (
|
|
37
|
-
|
|
38
|
-
html:
|
|
39
|
-
ampHtml:
|
|
40
|
-
ampErrors:
|
|
41
|
-
displayConditions:
|
|
40
|
+
}, ...t }, u = {
|
|
41
|
+
callback: (m, g, w, S, v) => {
|
|
42
|
+
m ? i(m) : e({
|
|
43
|
+
html: g,
|
|
44
|
+
ampHtml: w,
|
|
45
|
+
ampErrors: y(S ?? []),
|
|
46
|
+
displayConditions: v
|
|
42
47
|
});
|
|
43
48
|
},
|
|
44
49
|
...o
|
|
45
50
|
};
|
|
46
|
-
|
|
51
|
+
s().actionsApi.compileEmail(u);
|
|
47
52
|
}
|
|
48
53
|
);
|
|
49
54
|
return {
|
|
50
55
|
getCompiledEmail: l,
|
|
51
|
-
getTemplateData: () =>
|
|
56
|
+
getTemplateData: () => r(
|
|
52
57
|
"getTemplateData",
|
|
53
|
-
|
|
58
|
+
T,
|
|
54
59
|
(t) => {
|
|
55
|
-
const e = ({ html:
|
|
56
|
-
html:
|
|
57
|
-
css:
|
|
60
|
+
const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds: m }) => t({
|
|
61
|
+
html: i,
|
|
62
|
+
css: a,
|
|
58
63
|
width: o,
|
|
59
64
|
height: E,
|
|
60
|
-
utmParams:
|
|
61
|
-
syncModulesIds:
|
|
65
|
+
utmParams: u,
|
|
66
|
+
syncModulesIds: m
|
|
62
67
|
});
|
|
63
|
-
|
|
68
|
+
s().actionsApi.getTemplateData(e);
|
|
64
69
|
}
|
|
65
70
|
),
|
|
66
71
|
activateCustomViewStyles: (t = !0) => {
|
|
67
|
-
|
|
72
|
+
s().actionsApi.activateCustomViewStyles(t);
|
|
68
73
|
},
|
|
69
74
|
getPreviewData: async (t) => {
|
|
70
75
|
try {
|
|
71
76
|
const {
|
|
72
77
|
html: e,
|
|
73
|
-
displayConditions:
|
|
74
|
-
ampHtml:
|
|
78
|
+
displayConditions: i,
|
|
79
|
+
ampHtml: a = "",
|
|
75
80
|
ampErrors: o = []
|
|
76
81
|
} = await l({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
77
82
|
return {
|
|
78
83
|
html: e,
|
|
79
|
-
ampHtml:
|
|
84
|
+
ampHtml: a,
|
|
80
85
|
ampErrors: o,
|
|
81
|
-
displayConditions:
|
|
86
|
+
displayConditions: i
|
|
82
87
|
};
|
|
83
88
|
} catch (e) {
|
|
84
89
|
return n(e, "Error loading preview"), {
|
|
@@ -90,30 +95,30 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
|
90
95
|
}
|
|
91
96
|
},
|
|
92
97
|
updateTimerInClonedTemplate: () => new Promise((t) => {
|
|
93
|
-
var e,
|
|
94
|
-
if (typeof ((
|
|
98
|
+
var e, i;
|
|
99
|
+
if (typeof ((i = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : i.updateTimerInClonedTemplate) != "function") {
|
|
95
100
|
t(null);
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
try {
|
|
99
|
-
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((
|
|
100
|
-
|
|
104
|
+
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((a, o) => {
|
|
105
|
+
a ? (n(a, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
101
106
|
});
|
|
102
|
-
} catch (
|
|
103
|
-
n(
|
|
107
|
+
} catch (a) {
|
|
108
|
+
n(a, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
104
109
|
}
|
|
105
110
|
}),
|
|
106
111
|
updateHtmlAndCss: (t, e) => {
|
|
107
|
-
const { actionsApi:
|
|
108
|
-
return
|
|
109
|
-
|
|
112
|
+
const { actionsApi: i } = s();
|
|
113
|
+
return r("updateHtmlAndCss", h, (a) => {
|
|
114
|
+
i.updateHtmlAndCss(t, e, () => a());
|
|
110
115
|
});
|
|
111
116
|
},
|
|
112
|
-
editorSave: () =>
|
|
117
|
+
editorSave: () => r(
|
|
113
118
|
"save",
|
|
114
|
-
|
|
119
|
+
T,
|
|
115
120
|
(t) => {
|
|
116
|
-
|
|
121
|
+
s().actionsApi.save((e) => {
|
|
117
122
|
if (e) {
|
|
118
123
|
n(e, "Failed to save template"), t(!1);
|
|
119
124
|
return;
|
|
@@ -125,5 +130,5 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
|
125
130
|
};
|
|
126
131
|
};
|
|
127
132
|
export {
|
|
128
|
-
|
|
133
|
+
P as useActionsApi
|
|
129
134
|
};
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ToasterTypeOptions as d } from "../enums/toaster.js";
|
|
2
|
+
import { findEditorApi as s, EDITOR_NOT_READY_MESSAGE as p } from "../utils/stripoEditorApi.js";
|
|
3
|
+
import { useToaster as E } from "./useToaster.js";
|
|
4
|
+
const T = () => {
|
|
5
|
+
const { showToaster: i } = E(), t = (o) => {
|
|
6
|
+
var r;
|
|
7
|
+
const e = (r = s()) == null ? void 0 : r.codeEditorApi;
|
|
8
|
+
if (!e) {
|
|
9
|
+
i({ type: d.Error, message: p });
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
o(e);
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
openCodeEditor: () => {
|
|
16
|
+
t((o) => o.openCodeEditor());
|
|
17
|
+
},
|
|
18
|
+
closeCodeEditor: () => {
|
|
19
|
+
t((o) => o.closeCodeEditor());
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
9
23
|
export {
|
|
10
|
-
|
|
24
|
+
T as useCodeEditorApi
|
|
11
25
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import p from "../static/assets/icons/filled-arrow-rising.svg.js";
|
|
2
2
|
import s from "../static/assets/icons/line-change.svg.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import a from "../static/assets/icons/line-delete.svg.js";
|
|
4
|
+
import f from "../static/assets/icons/line-info.svg.js";
|
|
5
5
|
import c from "../static/assets/icons/line-plus.svg.js";
|
|
6
6
|
import l from "../static/styles/base.css.js";
|
|
7
|
-
import C from "../static/styles/components/
|
|
8
|
-
import d from "../static/styles/components/
|
|
9
|
-
import u from "../static/styles/components/
|
|
10
|
-
import h from "../static/styles/components/
|
|
11
|
-
import I from "../static/styles/components/button
|
|
12
|
-
import g from "../static/styles/components/
|
|
13
|
-
import w from "../static/styles/components/
|
|
14
|
-
import y from "../static/styles/components/
|
|
15
|
-
import A from "../static/styles/components/
|
|
16
|
-
import $ from "../static/styles/components/
|
|
17
|
-
import b from "../static/styles/components/
|
|
18
|
-
import B from "../static/styles/components/
|
|
19
|
-
import D from "../static/styles/components/
|
|
20
|
-
import R from "../static/styles/components/
|
|
21
|
-
import P from "../static/styles/components/
|
|
22
|
-
import T from "../static/styles/components/
|
|
23
|
-
import x from "../static/styles/components/
|
|
24
|
-
import M from "../static/styles/components/
|
|
25
|
-
import O from "../static/styles/
|
|
26
|
-
import V from "../static/styles/variables.css.js";
|
|
7
|
+
import C from "../static/styles/components/alert-message.css.js";
|
|
8
|
+
import d from "../static/styles/components/amp-block.css.js";
|
|
9
|
+
import u from "../static/styles/components/base-input.css.js";
|
|
10
|
+
import h from "../static/styles/components/button-group.css.js";
|
|
11
|
+
import I from "../static/styles/components/button.css.js";
|
|
12
|
+
import g from "../static/styles/components/combobox.css.js";
|
|
13
|
+
import w from "../static/styles/components/counter.css.js";
|
|
14
|
+
import y from "../static/styles/components/dropdown-menu.css.js";
|
|
15
|
+
import A from "../static/styles/components/loader.css.js";
|
|
16
|
+
import $ from "../static/styles/components/narrow-panel.css.js";
|
|
17
|
+
import b from "../static/styles/components/popup.css.js";
|
|
18
|
+
import B from "../static/styles/components/recommendation-strategy.css.js";
|
|
19
|
+
import D from "../static/styles/components/skeleton.css.js";
|
|
20
|
+
import R from "../static/styles/components/switcher.css.js";
|
|
21
|
+
import P from "../static/styles/components/tabs.css.js";
|
|
22
|
+
import T from "../static/styles/components/tools.css.js";
|
|
23
|
+
import x from "../static/styles/components/version-history.css.js";
|
|
24
|
+
import M from "../static/styles/components/wide-panel.css.js";
|
|
25
|
+
import O from "../static/styles/variables.css.js";
|
|
27
26
|
function o(i, r) {
|
|
28
27
|
return `--guido-icon-${i}: url("data:image/svg+xml,${encodeURIComponent(r.trim())}");`;
|
|
29
28
|
}
|
|
30
|
-
const
|
|
29
|
+
const V = `:host {
|
|
31
30
|
${o("line-change", s)}
|
|
32
|
-
${o("line-delete",
|
|
31
|
+
${o("line-delete", a)}
|
|
33
32
|
${o("filled-arrow-rising", p)}
|
|
34
|
-
${o("line-info",
|
|
33
|
+
${o("line-info", f)}
|
|
35
34
|
${o("line-plus", c)}
|
|
36
|
-
}`,
|
|
37
|
-
|
|
35
|
+
}`, W = [
|
|
36
|
+
O,
|
|
38
37
|
// Must be on top
|
|
39
|
-
|
|
38
|
+
V,
|
|
40
39
|
l,
|
|
41
40
|
// Must be on top
|
|
41
|
+
C,
|
|
42
42
|
d,
|
|
43
43
|
u,
|
|
44
44
|
h,
|
|
@@ -49,34 +49,33 @@ const W = `:host {
|
|
|
49
49
|
A,
|
|
50
50
|
$,
|
|
51
51
|
b,
|
|
52
|
-
|
|
52
|
+
D,
|
|
53
53
|
R,
|
|
54
54
|
P,
|
|
55
55
|
T,
|
|
56
56
|
x,
|
|
57
57
|
M,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
C
|
|
58
|
+
B
|
|
59
|
+
// Last: overrides button.css / wide-panel.css defaults
|
|
61
60
|
].join(`
|
|
62
61
|
|
|
63
|
-
`),
|
|
62
|
+
`), _ = 3e4;
|
|
64
63
|
let e = null;
|
|
65
|
-
function
|
|
66
|
-
return e || (e = new CSSStyleSheet(), e.replaceSync(
|
|
64
|
+
function k() {
|
|
65
|
+
return e || (e = new CSSStyleSheet(), e.replaceSync(W)), e;
|
|
67
66
|
}
|
|
68
|
-
const
|
|
69
|
-
const r =
|
|
70
|
-
var
|
|
71
|
-
const t = (
|
|
67
|
+
const po = () => ({ importCss: () => {
|
|
68
|
+
const r = k(), S = Date.now() + _, n = () => {
|
|
69
|
+
var m;
|
|
70
|
+
const t = (m = document.querySelector("ui-editor")) == null ? void 0 : m.shadowRoot;
|
|
72
71
|
if (t) {
|
|
73
72
|
t.adoptedStyleSheets.includes(r) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, r]);
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
|
-
Date.now() < S && requestAnimationFrame(
|
|
75
|
+
Date.now() < S && requestAnimationFrame(n);
|
|
77
76
|
};
|
|
78
|
-
|
|
77
|
+
n();
|
|
79
78
|
} });
|
|
80
79
|
export {
|
|
81
|
-
|
|
80
|
+
po as useCustomInterfaceAppearance
|
|
82
81
|
};
|
|
@@ -6,9 +6,10 @@ import { useConfig } from "./useConfig.js";
|
|
|
6
6
|
const useTranslations = () => {
|
|
7
7
|
var o, e;
|
|
8
8
|
const { config } = useConfig(), translationsPath = ((e = (o = config.value) == null ? void 0 : o.editor) == null ? void 0 : e.translationsPath) || DEFAULT_EDITOR.translationsPath, translations = ref(eval(translationsPath)), trans = (t, n) => {
|
|
9
|
-
|
|
9
|
+
var s;
|
|
10
|
+
const r = (s = translations.value) == null ? void 0 : s[t];
|
|
10
11
|
return r ? n ? Object.entries(n).reduce(
|
|
11
|
-
(
|
|
12
|
+
(i, [a, l]) => i.replace(new RegExp(`{${a}}`, "g"), String(l)),
|
|
12
13
|
r
|
|
13
14
|
) : r : (console.warn(`Translation key not found: ${t}`), t);
|
|
14
15
|
};
|
|
@@ -1,54 +1,63 @@
|
|
|
1
1
|
import { ToasterTypeOptions as t } from "../enums/toaster.js";
|
|
2
|
-
import { useVersionHistoryStore as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { useVersionHistoryStore as m } from "../stores/version-history.js";
|
|
3
|
+
import { findEditorApi as w, EDITOR_NOT_READY_MESSAGE as y } from "../utils/stripoEditorApi.js";
|
|
4
|
+
import { useToaster as V } from "./useToaster.js";
|
|
5
|
+
const d = () => {
|
|
6
|
+
const n = m(), { showToaster: i } = V(), o = (e) => {
|
|
7
|
+
var s;
|
|
8
|
+
const r = (s = w()) == null ? void 0 : s.versionHistoryApi;
|
|
9
|
+
if (!r) {
|
|
10
|
+
i({ type: t.Error, message: y });
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
e(r);
|
|
14
|
+
}, p = (e) => {
|
|
15
|
+
n.$reset(), n.updateState(e);
|
|
16
|
+
}, a = () => {
|
|
17
|
+
n.$reset();
|
|
9
18
|
};
|
|
10
19
|
return {
|
|
11
20
|
openVersionHistory: () => {
|
|
12
|
-
|
|
21
|
+
o((e) => e.openVersionHistory(p, a));
|
|
13
22
|
},
|
|
14
23
|
closeVersionHistory: () => {
|
|
15
|
-
|
|
24
|
+
o((e) => e.closeVersionHistory());
|
|
16
25
|
},
|
|
17
26
|
switchToDesktopPreview: () => {
|
|
18
|
-
|
|
27
|
+
o((e) => e.switchToDesktopPreview());
|
|
19
28
|
},
|
|
20
29
|
switchToMobilePreview: () => {
|
|
21
|
-
|
|
30
|
+
o((e) => e.switchToMobilePreview());
|
|
22
31
|
},
|
|
23
32
|
previewVersion: (e) => {
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
33
|
+
o((r) => r.previewVersion(e, (s) => {
|
|
34
|
+
const c = s instanceof Error ? s.message : String(s);
|
|
35
|
+
i({
|
|
27
36
|
type: t.Error,
|
|
28
|
-
message: `Error compiling email: ${
|
|
37
|
+
message: `Error compiling email: ${c}`
|
|
29
38
|
});
|
|
30
|
-
});
|
|
39
|
+
}));
|
|
31
40
|
},
|
|
32
41
|
restoreVersion: (e) => {
|
|
33
|
-
|
|
42
|
+
o((r) => r.restoreVersion(
|
|
34
43
|
e,
|
|
35
44
|
() => {
|
|
36
|
-
|
|
45
|
+
i({
|
|
37
46
|
type: t.Success,
|
|
38
47
|
message: "Your version has been restored successfully."
|
|
39
48
|
});
|
|
40
49
|
},
|
|
41
|
-
(
|
|
42
|
-
const
|
|
43
|
-
|
|
50
|
+
(s) => {
|
|
51
|
+
const c = s instanceof Error ? s.message : String(s);
|
|
52
|
+
i({
|
|
44
53
|
type: t.Error,
|
|
45
|
-
message: `Error compiling email: ${
|
|
54
|
+
message: `Error compiling email: ${c}`
|
|
46
55
|
});
|
|
47
56
|
}
|
|
48
|
-
);
|
|
57
|
+
));
|
|
49
58
|
}
|
|
50
59
|
};
|
|
51
60
|
};
|
|
52
61
|
export {
|
|
53
|
-
|
|
62
|
+
d as useVersionHistoryApi
|
|
54
63
|
};
|
|
@@ -1,51 +1,19 @@
|
|
|
1
|
-
const e = "Items", o = "Default",
|
|
1
|
+
const e = "Items", o = "Default", t = "Custom", s = {
|
|
2
2
|
"Global Styles & Layout": "Global Styles and Layout",
|
|
3
3
|
"Structures & Modules": "Structures and Modules",
|
|
4
4
|
"Recommendation Block": "Recommendation Block",
|
|
5
5
|
Items: e,
|
|
6
6
|
"This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.": "This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.",
|
|
7
7
|
"This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.": "This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.",
|
|
8
|
-
"email-editor.a11y-hide-images": "Hide images",
|
|
9
|
-
"email-editor.a11y-show-images": "Show images",
|
|
10
|
-
"email-editor.cvd-none": "No Color Deficiency",
|
|
11
|
-
"email-editor.cvd-protanopia": "Protanopia",
|
|
12
|
-
"email-editor.cvd-protanopia-description": "Causes red-green confusion and makes reds appear darker.",
|
|
13
|
-
"email-editor.cvd-deuteranopia": "Deuteranopia",
|
|
14
|
-
"email-editor.cvd-deuteranopia-description": "Causes red-green confusion.",
|
|
15
|
-
"email-editor.cvd-tritanopia": "Tritanopia",
|
|
16
|
-
"email-editor.cvd-tritanopia-description": "Causes blue-yellow confusion.",
|
|
17
|
-
"email-editor.cvd-achromatopsia": "Achromatopsia",
|
|
18
|
-
"email-editor.cvd-achromatopsia-description": "Causes complete color blindness.",
|
|
19
|
-
"email-editor.more-actions": "More actions",
|
|
20
|
-
"email-editor.preferences": "Preferences",
|
|
21
|
-
"email-editor.actions": "Actions",
|
|
22
|
-
"email-editor.accessibility-test": "Accessibility Test",
|
|
23
|
-
"email-editor.autosaved-at-today": "{boldStart}Autosaved{boldEnd} at {time}, Today",
|
|
24
|
-
"email-editor.autosaved-at-date": "{boldStart}Autosaved{boldEnd} at {date}",
|
|
25
|
-
"email-editor.export-html": "Export HTML",
|
|
26
|
-
"email-editor.onboarding-kebab-title": "Discover Preferences and Actions",
|
|
27
|
-
"email-editor.onboarding-kebab-description": "You can now access your Preferences and Actions easily such as Autosave, Export HTML, Version History, Accessibility Test and Save As Template.",
|
|
28
|
-
"email-editor.onboarding-autosave-title": "Autosave Your Design",
|
|
29
|
-
"email-editor.onboarding-autosave-description": "You can save your design automatically by enabling Autosave without losing your work.",
|
|
30
|
-
"email-editor.onboarding-accessibility-title": "Test Accessibility of Your Design",
|
|
31
|
-
"email-editor.onboarding-accessibility-description": "You can test the accessibility of your design to see the Failed, Passed items and update the Failed ones accordingly.",
|
|
32
8
|
"Pixel Tracking Opt-in": "Pixel Tracking Opt-in",
|
|
33
9
|
"OPT-IN SELECTION": "OPT-IN SELECTION",
|
|
34
10
|
"UNSUBSCRIBE GROUPS": "UNSUBSCRIBE GROUPS",
|
|
35
11
|
Default: o,
|
|
36
|
-
Custom:
|
|
37
|
-
"Foreground color": "Foreground Color",
|
|
38
|
-
"Contrast ratio": "Contrast Ratio",
|
|
39
|
-
"You’ve fixed all issues!": `No Failed Items
|
|
40
|
-
You have no failed items.`,
|
|
41
|
-
"No accessibility issues found": `No Failed Items
|
|
42
|
-
You have no failed items.`,
|
|
43
|
-
"You have no ignored issues yet": `No Ignored Items
|
|
44
|
-
You have no ignored items.`
|
|
12
|
+
Custom: t
|
|
45
13
|
};
|
|
46
14
|
export {
|
|
47
|
-
|
|
15
|
+
t as Custom,
|
|
48
16
|
o as Default,
|
|
49
17
|
e as Items,
|
|
50
|
-
|
|
18
|
+
s as default
|
|
51
19
|
};
|
|
@@ -76,8 +76,7 @@ const e = {
|
|
|
76
76
|
"The data source link is unavailable. Please, make sure there is an access to the data source.": "Enter an accessible Data Source Link to contiue.",
|
|
77
77
|
"The file should not exceed the maximum resolution of {maxImageResolution}px.": "Upload files up to 1024x512 pixels to continue.",
|
|
78
78
|
"The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor.",
|
|
79
|
-
"Dropdown with a list of available data services, preliminarily created in the Data section → Services tab of the Account.": "Service for Data Collection lets you enter a form submission URL for the recipients to submit."
|
|
80
|
-
'Read more about the issue on <a target="_blank" rel="noopener noreferrer" href="{url}">ACT Rules Community Group forum</a>': 'Read more about the issue on <a target="_blank" rel="noopener noreferrer" href="{url}">ACT Rules Community Group forum.</a>'
|
|
79
|
+
"Dropdown with a list of available data services, preliminarily created in the Data section → Services tab of the Account.": "Service for Data Collection lets you enter a form submission URL for the recipients to submit."
|
|
81
80
|
};
|
|
82
81
|
export {
|
|
83
82
|
e as default
|