@useinsider/guido 3.5.1-beta.a51b847 → 3.5.1-beta.c6ca299
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/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +26 -23
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +9 -9
- package/dist/composables/useRecommendation.js +28 -24
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
- package/dist/guido.css +1 -1
- package/package.json +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.test.d.ts +0 -1
|
@@ -17,48 +17,51 @@ import K from "./MigrationConfirmModal.vue.js";
|
|
|
17
17
|
const ut = /* @__PURE__ */ O({
|
|
18
18
|
__name: "EditorActions",
|
|
19
19
|
setup(N, { expose: x }) {
|
|
20
|
-
const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory:
|
|
21
|
-
if (
|
|
22
|
-
|
|
20
|
+
const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: p, closeVersionHistory: c } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), t = I(), y = P(), { hasMigrations: S } = J(y), i = L(), s = n(!1), r = n(!1), g = n(), H = B(), T = () => {
|
|
21
|
+
if (t.isVersionHistoryOpen) {
|
|
22
|
+
c();
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
p();
|
|
26
26
|
}, w = async () => {
|
|
27
|
-
|
|
27
|
+
s.value = !0, await m(), s.value = !1;
|
|
28
28
|
}, _ = () => {
|
|
29
|
-
|
|
30
|
-
}, C = h(() =>
|
|
29
|
+
t.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
+
}, C = h(() => t.isVersionHistoryOpen ? i("newsletter.close-version-history") : i("newsletter.version-history")), A = h(
|
|
31
31
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
32
|
+
var o, e;
|
|
33
|
+
return ((e = (o = a.value) == null ? void 0 : o.features) == null ? void 0 : e.versionHistory) && !t.isPreviewModeOpen;
|
|
34
34
|
}
|
|
35
|
-
), V = async (
|
|
36
|
-
r.value = !0,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
), V = async (o) => {
|
|
36
|
+
r.value = !0, t.loadingStatus = !0;
|
|
37
|
+
try {
|
|
38
|
+
return await u(o);
|
|
39
|
+
} finally {
|
|
40
|
+
r.value = !1, t.loadingStatus = !1;
|
|
41
|
+
}
|
|
42
|
+
}, E = (o) => {
|
|
43
|
+
var e;
|
|
44
|
+
if (!o && S.value) {
|
|
45
|
+
(e = g.value) == null || e.open();
|
|
43
46
|
return;
|
|
44
47
|
}
|
|
45
|
-
return V(
|
|
48
|
+
return V(o);
|
|
46
49
|
}, M = async () => {
|
|
47
50
|
if (l("liquidSyntax")) {
|
|
48
|
-
|
|
51
|
+
t.loadingStatus = !0;
|
|
49
52
|
try {
|
|
50
|
-
const { html:
|
|
51
|
-
if (!await v(
|
|
53
|
+
const { html: o } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = d(o);
|
|
54
|
+
if (!await v(e))
|
|
52
55
|
return;
|
|
53
56
|
} finally {
|
|
54
|
-
|
|
57
|
+
t.loadingStatus = !1;
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
H();
|
|
58
61
|
};
|
|
59
62
|
return x({
|
|
60
63
|
handleSave: E
|
|
61
|
-
}), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory:
|
|
64
|
+
}), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: p, closeVersionHistory: c, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: t, templateStore: y, hasMigrations: S, trans: i, isExporting: s, isSaving: r, migrationModalRef: g, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
export {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as l, computed as
|
|
1
|
+
import { defineComponent as l, computed as p, ref as d } from "vue";
|
|
2
2
|
import { useConfig as k } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useBack as B } from "../../../composables/useGuidoActions.js";
|
|
4
4
|
import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
|
|
5
5
|
import { useTranslations as v } from "../../../composables/useTranslations.js";
|
|
6
6
|
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
7
7
|
import { useEditorStore as V } from "../../../stores/editor.js";
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import { useDebounceFn as
|
|
8
|
+
import { InButtonV2 as w } from "@useinsider/design-system-vue";
|
|
9
|
+
import { useDebounceFn as y } from "../../../node_modules/@vueuse/shared/index.js";
|
|
10
10
|
const D = /* @__PURE__ */ l({
|
|
11
11
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f =
|
|
12
|
+
setup(C) {
|
|
13
|
+
const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f = p(() => {
|
|
14
14
|
var u, m;
|
|
15
15
|
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
16
|
-
}), r =
|
|
16
|
+
}), r = d(!1), c = () => {
|
|
17
17
|
if (e.isVersionHistoryOpen) {
|
|
18
18
|
n();
|
|
19
19
|
return;
|
|
@@ -22,13 +22,13 @@ const D = /* @__PURE__ */ l({
|
|
|
22
22
|
s();
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
}, a =
|
|
25
|
+
i();
|
|
26
|
+
}, a = y(() => {
|
|
27
27
|
c(), r.value = !1;
|
|
28
28
|
}, 500);
|
|
29
29
|
return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
|
|
30
30
|
r.value = !0, a();
|
|
31
|
-
}, InButtonV2:
|
|
31
|
+
}, InButtonV2: w };
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
@@ -5,16 +5,16 @@ import { generateCompleteFilterQuery as h } from "../extensions/Blocks/Recommend
|
|
|
5
5
|
import { useConfigStore as x } from "../stores/config.js";
|
|
6
6
|
const w = () => ({
|
|
7
7
|
calculateCardWidth: ({
|
|
8
|
-
mobileLeftPadding:
|
|
9
|
-
mobileRightPadding:
|
|
10
|
-
cardsInRow:
|
|
8
|
+
mobileLeftPadding: s,
|
|
9
|
+
mobileRightPadding: a,
|
|
10
|
+
cardsInRow: c,
|
|
11
11
|
unresponsive: n
|
|
12
12
|
}) => {
|
|
13
|
-
const r = n ?
|
|
13
|
+
const r = n ? c : 1, e = s + a + (r - 1) * b;
|
|
14
14
|
return (R - e) / r;
|
|
15
15
|
},
|
|
16
|
-
getRecommendationCampaignData: (
|
|
17
|
-
const
|
|
16
|
+
getRecommendationCampaignData: (s) => {
|
|
17
|
+
const a = m(), c = Number(s), n = a.blockStates[c];
|
|
18
18
|
if (!n)
|
|
19
19
|
return {
|
|
20
20
|
textTrimming: !1,
|
|
@@ -42,33 +42,37 @@ const w = () => ({
|
|
|
42
42
|
discountAfterTextValue: ""
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
|
-
buildCampaignUrl: (
|
|
45
|
+
buildCampaignUrl: (s, a) => {
|
|
46
46
|
var l;
|
|
47
|
-
const
|
|
47
|
+
const c = m(), n = x(), r = Number(s);
|
|
48
48
|
let e;
|
|
49
|
-
if (
|
|
50
|
-
e =
|
|
49
|
+
if (a)
|
|
50
|
+
e = a;
|
|
51
51
|
else {
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
52
|
+
const i = c.blockStates[r];
|
|
53
|
+
if (!i)
|
|
54
54
|
return "";
|
|
55
|
-
const { recommendationConfigs:
|
|
55
|
+
const { recommendationConfigs: o } = i;
|
|
56
56
|
e = {
|
|
57
|
-
strategy:
|
|
58
|
-
language:
|
|
59
|
-
currencyCode:
|
|
60
|
-
size:
|
|
61
|
-
productIds:
|
|
62
|
-
filters:
|
|
63
|
-
shuffleProducts:
|
|
57
|
+
strategy: o.strategy,
|
|
58
|
+
language: o.language,
|
|
59
|
+
currencyCode: o.currencySettings.value,
|
|
60
|
+
size: o.size,
|
|
61
|
+
productIds: o.productIds,
|
|
62
|
+
filters: o.filters,
|
|
63
|
+
shuffleProducts: o.shuffleProducts
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
const f = ((l = I().find((
|
|
67
|
-
t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising"
|
|
68
|
-
|
|
66
|
+
const f = ((l = I().find((i) => i.key === e.strategy)) == null ? void 0 : l.path) || "", t = new URLSearchParams();
|
|
67
|
+
if (t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising") {
|
|
68
|
+
const i = parseInt(e.size) || 6;
|
|
69
|
+
t.set("productId", e.productIds.slice(0, i).join(","));
|
|
70
|
+
} else e.strategy === "similarViewed" && t.set("productId", "{itemId}");
|
|
71
|
+
e.strategy === "userBased" && t.set("userId", "{user_id}");
|
|
72
|
+
const g = e.filters.filter((i) => i.isValid), d = h(g);
|
|
69
73
|
d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true");
|
|
70
74
|
const p = decodeURIComponent(t.toString()), u = `${C.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
|
|
71
|
-
return
|
|
75
|
+
return c.recommendationCampaignUrls[s] = u, u;
|
|
72
76
|
}
|
|
73
77
|
});
|
|
74
78
|
export {
|
|
@@ -453,7 +453,7 @@ const N = () => ({
|
|
|
453
453
|
details: !0,
|
|
454
454
|
campaignId: o.variationId
|
|
455
455
|
};
|
|
456
|
-
r.strategy === "manualMerchandising" ? a.productId = r.productIds.join(",") : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), c && (a.filter = c), r.shuffleProducts && (a.shuffle = !0);
|
|
456
|
+
r.strategy === "manualMerchandising" ? a.productId = r.productIds.slice(0, s).join(",") : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), c && (a.filter = c), r.shuffleProducts && (a.shuffle = !0);
|
|
457
457
|
let f;
|
|
458
458
|
try {
|
|
459
459
|
f = await h.fetchRecommendationProducts(i, a);
|
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-42185bb7] .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-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__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-3cc5f2b7]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-b293a2b0]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-b293a2b0]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-b293a2b0]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .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-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{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-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.5.1-beta.
|
|
3
|
+
"version": "3.5.1-beta.c6ca299",
|
|
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 +0,0 @@
|
|
|
1
|
-
export {};
|