@useinsider/guido 3.17.0-beta.dc7f4d2 → 3.17.0-beta.e39d9c6
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.
|
@@ -1,59 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useBack as
|
|
4
|
-
import { usePreviewMode as
|
|
5
|
-
import {
|
|
6
|
-
import { useSaveValidationRollout as V } from "../../../composables/useSaveValidationRollout.js";
|
|
7
|
-
import { useTranslations as h } from "../../../composables/useTranslations.js";
|
|
1
|
+
import { defineComponent as m, computed as p, ref as d } from "vue";
|
|
2
|
+
import { useConfig as k } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useBack as B } from "../../../composables/useGuidoActions.js";
|
|
4
|
+
import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
|
|
5
|
+
import { useTranslations as v } from "../../../composables/useTranslations.js";
|
|
8
6
|
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
import { useDebounceFn as O } from "../../../node_modules/@vueuse/shared/index.js";
|
|
14
|
-
const N = /* @__PURE__ */ v({
|
|
7
|
+
import { useEditorStore as y } from "../../../stores/editor.js";
|
|
8
|
+
import { InButtonV2 as w } from "@useinsider/design-system-vue";
|
|
9
|
+
import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
|
|
10
|
+
const D = /* @__PURE__ */ m({
|
|
15
11
|
__name: "LeftSlot",
|
|
16
|
-
setup(
|
|
17
|
-
const e =
|
|
18
|
-
var
|
|
19
|
-
return e.isVersionHistoryOpen || e.isPreviewModeOpen ?
|
|
20
|
-
}),
|
|
12
|
+
setup(C) {
|
|
13
|
+
const e = y(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), l = p(() => {
|
|
14
|
+
var u, f;
|
|
15
|
+
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (f = (u = t.value) == null ? void 0 : u.ui) != null && f.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
16
|
+
}), r = d(!1), a = () => {
|
|
21
17
|
if (e.isVersionHistoryOpen) {
|
|
22
|
-
|
|
18
|
+
n();
|
|
23
19
|
return;
|
|
24
20
|
}
|
|
25
21
|
if (e.isPreviewModeOpen) {
|
|
26
|
-
|
|
22
|
+
s();
|
|
27
23
|
return;
|
|
28
24
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let o = [];
|
|
32
|
-
try {
|
|
33
|
-
o = await l();
|
|
34
|
-
} catch (t) {
|
|
35
|
-
console.warn("Back-path validation failed; leaving without the drawer.", t);
|
|
36
|
-
} finally {
|
|
37
|
-
e.loadingStatus = !1;
|
|
38
|
-
}
|
|
39
|
-
if (o.length) {
|
|
40
|
-
f.open(o, "back");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
a();
|
|
45
|
-
}, p = O(async () => {
|
|
25
|
+
i();
|
|
26
|
+
}, c = V(async () => {
|
|
46
27
|
try {
|
|
47
|
-
await
|
|
28
|
+
await a();
|
|
48
29
|
} finally {
|
|
49
|
-
|
|
30
|
+
r.value = !1;
|
|
50
31
|
}
|
|
51
32
|
}, 500);
|
|
52
|
-
return { __sfc: !0, editorStore: e, handleBack:
|
|
53
|
-
|
|
54
|
-
}, InButtonV2:
|
|
33
|
+
return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: l, isBackButtonDisabled: r, executeBackAction: a, debouncedBackAction: c, handleBackClick: () => {
|
|
34
|
+
r.value = !0, c();
|
|
35
|
+
}, InButtonV2: w };
|
|
55
36
|
}
|
|
56
37
|
});
|
|
57
38
|
export {
|
|
58
|
-
|
|
39
|
+
D as default
|
|
59
40
|
};
|
|
@@ -17,14 +17,14 @@ import { useCouponBlockValidator as Q } from "./validators/useCouponBlockValidat
|
|
|
17
17
|
import { useLiquidValidator as X } from "./validators/useLiquidValidator.js";
|
|
18
18
|
import { useUnsubscribeBlockValidator as Y } from "./validators/useUnsubscribeBlockValidator.js";
|
|
19
19
|
const bt = () => {
|
|
20
|
-
const
|
|
20
|
+
const r = A(), u = q(), { validateHtml: d } = K(), { validateLiquidSyntax: f } = X(), { validateCouponBlockTags: p } = Q(), { validateUnsubscribeBlockUniqueness: v, validateUnsubscribeBlockHasTemplate: y } = Y(), { callbacks: a, isFeatureEnabled: c } = L(), { extractSyncModuleData: S } = O(), { setSyncModuleUnsubscriptionPages: b } = D(), { editorSave: g, getTemplateData: w } = h(), { showToaster: H } = N(), { getBlockedDomains: V, resolveToast: E } = J(), { prepareTemplateDetails: m } = G(), { collectSaveValidationErrors: C } = M(), { isEnabled: x } = R(), k = z(), T = j(), B = F(), n = async (t, e, o) => {
|
|
21
21
|
if (!c("allowlistEnabled"))
|
|
22
22
|
return !1;
|
|
23
23
|
const i = await V(t, e);
|
|
24
24
|
if (!i.length)
|
|
25
25
|
return !1;
|
|
26
26
|
if (!o) {
|
|
27
|
-
const s = await
|
|
27
|
+
const s = await E(i);
|
|
28
28
|
s != null && s.message && H({
|
|
29
29
|
type: W.Warning,
|
|
30
30
|
message: s.message,
|
|
@@ -32,22 +32,22 @@ const bt = () => {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
return !0;
|
|
35
|
-
}, P = async (t) => !p(t.compiledHtml) || !v(t.compiledHtml) || !y(t.compiledHtml) ? !1 : c("liquidSyntax") ? f(t.compiledHtml) :
|
|
35
|
+
}, P = async (t) => !p(t.compiledHtml) || !v(t.compiledHtml) || !y(t.compiledHtml) ? !1 : c("liquidSyntax") ? f(t.compiledHtml) : d(t.compiledHtml, t.dynamicContentList, !0), l = async (t, e) => {
|
|
36
36
|
if (!await g())
|
|
37
37
|
return;
|
|
38
38
|
const { unsubscribePayload: i, stripoModules: s } = S(t.rawHtml);
|
|
39
39
|
if (await b(i), t.modules = s, !e.suppress) {
|
|
40
40
|
const U = e.blankCompiled ? { compiledHtml: "", ampHtml: "" } : {};
|
|
41
|
-
|
|
41
|
+
u({ ...t, ...U, silent: e.silent });
|
|
42
42
|
}
|
|
43
43
|
return t;
|
|
44
44
|
};
|
|
45
45
|
return { save: async (t = !1, e = !1) => {
|
|
46
46
|
var i;
|
|
47
|
-
|
|
47
|
+
r();
|
|
48
48
|
const o = await m();
|
|
49
|
-
if (x.value && !
|
|
50
|
-
const s = await
|
|
49
|
+
if (x.value && !e) {
|
|
50
|
+
const s = await C(
|
|
51
51
|
o.compiledHtml,
|
|
52
52
|
o.dynamicContentList
|
|
53
53
|
);
|
|
@@ -57,20 +57,20 @@ const bt = () => {
|
|
|
57
57
|
}
|
|
58
58
|
} else if (!await P(o))
|
|
59
59
|
return;
|
|
60
|
-
if (!((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(o)) && !await
|
|
60
|
+
if (!((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(o)) && !await n(o.compiledHtml, o.css, e))
|
|
61
61
|
return l(o, { silent: e, suppress: t });
|
|
62
62
|
}, saveWithErrors: async () => {
|
|
63
63
|
var e;
|
|
64
64
|
if (B.isTransactional)
|
|
65
65
|
return;
|
|
66
|
-
|
|
66
|
+
r();
|
|
67
67
|
const t = await m();
|
|
68
|
-
if (!((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)) && !await
|
|
68
|
+
if (!((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)) && !await n(t.compiledHtml, t.css, !1))
|
|
69
69
|
return l(t, { silent: !1, blankCompiled: !0 });
|
|
70
70
|
}, saveRawOnly: async () => {
|
|
71
|
-
|
|
71
|
+
r();
|
|
72
72
|
const { html: t, css: e } = await w();
|
|
73
|
-
if (await
|
|
73
|
+
if (await n(t, e, !0))
|
|
74
74
|
return;
|
|
75
75
|
const o = I(t), i = {
|
|
76
76
|
dynamicContentList: T.getSelectedDynamicContentList,
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-44d8e7c8]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-856367aa]{gap:16px}.validation-error-row[data-v-856367aa]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-856367aa]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-856367aa]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-f02fdde0]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-f02fdde0]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-f02fdde0]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.17.0-beta.
|
|
3
|
+
"version": "3.17.0-beta.e39d9c6",
|
|
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",
|