@useinsider/guido 3.28.1-beta.38d0ae7 → 3.28.1-beta.45fafa1
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/base/Toaster.vue.js +7 -6
- package/dist/components/organisms/base/Toaster.vue2.js +11 -11
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +10 -9
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +41 -42
- package/dist/composables/useStripoNotifications.js +20 -14
- package/dist/config/migrator/itemsBlockMigrator.js +187 -186
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/stores/toaster.d.ts +2 -1
- package/dist/static/stripo-runtime-manifest.json.js +1 -1
- package/dist/stores/toaster.js +13 -6
- package/package.json +3 -3
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import s from "./Toaster.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
4
|
var r = function() {
|
|
4
5
|
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
5
|
-
return e(t.InToasts, { ref: "toastRef", attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
|
-
}, a = [],
|
|
7
|
-
|
|
6
|
+
return e(t.InToasts, { ref: "toastRef", attrs: { id: t.toastId, "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, timeout: 0, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
7
|
+
}, a = [], i = /* @__PURE__ */ n(
|
|
8
|
+
s,
|
|
8
9
|
r,
|
|
9
10
|
a,
|
|
10
11
|
!1,
|
|
11
12
|
null,
|
|
12
13
|
null
|
|
13
14
|
);
|
|
14
|
-
const l =
|
|
15
|
+
const l = i.exports;
|
|
15
16
|
export {
|
|
16
17
|
l as default
|
|
17
18
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useToaster as
|
|
1
|
+
import { defineComponent as u, ref as m, computed as r, onBeforeUnmount as f } from "vue";
|
|
2
|
+
import { useToaster as l } from "../../../composables/useToaster.js";
|
|
3
3
|
import { useToasterStore as p } from "../../../stores/toaster.js";
|
|
4
|
-
import { InToasts as
|
|
5
|
-
const
|
|
4
|
+
import { InToasts as _ } from "@useinsider/design-system-vue";
|
|
5
|
+
const b = /* @__PURE__ */ u({
|
|
6
6
|
__name: "Toaster",
|
|
7
|
-
setup(
|
|
8
|
-
const t = p(), { hideToaster: o } =
|
|
7
|
+
setup(d) {
|
|
8
|
+
const t = p(), { hideToaster: o } = l(), e = m(null), a = r(() => t.actionButton ? [{ text: t.actionButton.text }] : []), c = r(() => t.closeable ? "" : "guido-toast-non-closeable"), i = () => {
|
|
9
9
|
t.actionButton && t.actionButton.onClick(), o();
|
|
10
10
|
};
|
|
11
|
-
return
|
|
12
|
-
var n,
|
|
13
|
-
o(), t.$reset(), (
|
|
14
|
-
}), { __sfc: !0, store: t, hideToaster: o, toastRef: e, actionButtonsConfig:
|
|
11
|
+
return f(() => {
|
|
12
|
+
var n, s;
|
|
13
|
+
o(), t.$reset(), (s = (n = e.value) == null ? void 0 : n.$el) == null || s.remove();
|
|
14
|
+
}), { __sfc: !0, store: t, hideToaster: o, toastRef: e, actionButtonsConfig: a, toastId: c, handleActionClick: i, InToasts: _ };
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
b as default
|
|
19
19
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./AssignStrategyDrawer.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
/* empty css */
|
|
3
4
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
5
|
var a = function() {
|
|
5
|
-
var e = this,
|
|
6
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
7
|
-
return [
|
|
6
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
|
|
8
|
+
return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading || t.store.legacyConversionLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
|
|
8
9
|
return t.store.openStrategyCreation();
|
|
9
10
|
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
10
|
-
}, proxy: !0 }], null, !1,
|
|
11
|
+
}, proxy: !0 }], null, !1, 659108535) }) : e._e();
|
|
11
12
|
}, n = [], i = /* @__PURE__ */ o(
|
|
12
|
-
|
|
13
|
+
s,
|
|
13
14
|
a,
|
|
14
15
|
n,
|
|
15
16
|
!1,
|
|
16
17
|
null,
|
|
17
|
-
|
|
18
|
+
"6ce48dfd"
|
|
18
19
|
);
|
|
19
|
-
const
|
|
20
|
+
const y = i.exports;
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
y as default
|
|
22
23
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as T, ref as w, computed as n, watch as k } from "vue";
|
|
2
2
|
import "@useinsider/design-system-organisms/style";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { DOTTED_DATE_LOCALE as
|
|
6
|
-
import { URLS as
|
|
3
|
+
import { useToaster as b } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as L } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { DOTTED_DATE_LOCALE as N } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as R } from "../../../../enums/extensions/recommendationBlock.js";
|
|
7
7
|
import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import { commitStrategyChange as
|
|
10
|
-
import
|
|
11
|
-
import { formatShortDate as
|
|
12
|
-
import { asText as
|
|
13
|
-
import { escapeHtml as
|
|
14
|
-
import { InSkeleton as
|
|
15
|
-
const
|
|
8
|
+
import { useRecommendationExtensionStore as P } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { commitStrategyChange as D } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
10
|
+
import U from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
+
import { formatShortDate as M } from "../../../../utils/dateUtil.js";
|
|
12
|
+
import { asText as O } from "../../../../utils/genericUtil.js";
|
|
13
|
+
import { escapeHtml as G } from "../../../../utils/htmlEscape.js";
|
|
14
|
+
import { InSkeleton as $ } from "@useinsider/design-system-vue";
|
|
15
|
+
const st = /* @__PURE__ */ B({
|
|
16
16
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
17
|
+
setup(H) {
|
|
18
18
|
const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
19
|
+
render: (o) => o($, { props: { sizing: { width: t, height: r } } })
|
|
20
|
+
}), E = T({
|
|
21
21
|
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
22
22
|
loadingComponent: p(480, 240),
|
|
23
23
|
delay: 0
|
|
24
|
-
}),
|
|
24
|
+
}), I = T({
|
|
25
25
|
loader: async () => (await g()).OrgStrategyDropdown
|
|
26
|
-
}), i = "guido-edit-strategy-",
|
|
27
|
-
|
|
26
|
+
}), i = "guido-edit-strategy-", a = L(), e = P(), { showToaster: c } = b(), s = w(null), m = "legacy", l = w(!1), x = n(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: R.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
|
+
k(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
28
|
if (!t)
|
|
29
29
|
return;
|
|
30
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
31
|
+
s.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
|
|
32
32
|
c({
|
|
33
33
|
type: u.Error,
|
|
34
34
|
message: a("discovery-strategy.error-description")
|
|
@@ -36,28 +36,27 @@ const it = /* @__PURE__ */ b({
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
const f = (t) => {
|
|
39
|
-
const r =
|
|
39
|
+
const r = O(t.updated_at || t.created_at);
|
|
40
40
|
if (!r)
|
|
41
41
|
return "";
|
|
42
|
-
const
|
|
43
|
-
return a("recommendation-strategy.last-updated-on", { value:
|
|
44
|
-
}, S =
|
|
42
|
+
const o = M(r, N);
|
|
43
|
+
return a("recommendation-strategy.last-updated-on", { value: o });
|
|
44
|
+
}, S = n(() => ({
|
|
45
45
|
text: a("ds-steps.legacy-strategy"),
|
|
46
|
-
value:
|
|
46
|
+
value: m,
|
|
47
47
|
hidden: !0
|
|
48
|
-
})),
|
|
48
|
+
})), d = n(() => e.strategies.map((t) => ({
|
|
49
49
|
text: t.name,
|
|
50
50
|
value: t.strategy_id,
|
|
51
51
|
infoBoxProps: {
|
|
52
52
|
id: `strategy-info-${t.strategy_id}`,
|
|
53
53
|
theme: "light",
|
|
54
54
|
variant: "information",
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
titleText: H(D(t.name)),
|
|
55
|
+
className: "assign-strategy-info-box",
|
|
56
|
+
titleText: G(O(t.name)),
|
|
58
57
|
descriptionStatus: !0,
|
|
59
58
|
descriptionText: f(t),
|
|
60
|
-
slot:
|
|
59
|
+
slot: U,
|
|
61
60
|
slotProps: { strategy: t },
|
|
62
61
|
// The info box drops the option's value/text, so the id is the only channel
|
|
63
62
|
// that can carry the strategy back to the click handler.
|
|
@@ -70,17 +69,17 @@ const it = /* @__PURE__ */ b({
|
|
|
70
69
|
icon: "line-open-website"
|
|
71
70
|
}]
|
|
72
71
|
}
|
|
73
|
-
}))),
|
|
72
|
+
}))), A = n(() => e.isLegacyStrategyBlock ? [S.value, ...d.value] : d.value), h = (t) => {
|
|
74
73
|
var _;
|
|
75
74
|
const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
|
|
76
75
|
if (!r)
|
|
77
76
|
return;
|
|
78
|
-
const
|
|
79
|
-
e.openStrategyEdit(r) && (String(
|
|
80
|
-
}, v =
|
|
81
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
77
|
+
const o = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
|
|
78
|
+
e.openStrategyEdit(r) && (String(s.value ?? "") === r && (s.value = null), y && (e.removeStrategy(), o !== null && D(o, "Removed recommendation strategy")));
|
|
79
|
+
}, v = n(() => {
|
|
80
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
|
|
82
81
|
return t ? { ...t, fallback_config: null } : null;
|
|
83
|
-
}),
|
|
82
|
+
}), C = n(() => ({
|
|
84
83
|
primaryButton: {
|
|
85
84
|
styling: "solid",
|
|
86
85
|
type: "primary",
|
|
@@ -92,7 +91,7 @@ const it = /* @__PURE__ */ b({
|
|
|
92
91
|
labelText: a("products.cancel")
|
|
93
92
|
}
|
|
94
93
|
}));
|
|
95
|
-
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal:
|
|
94
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: E, OrgStrategyDropdown: I, EDIT_BUTTON_ID_PREFIX: i, trans: a, store: e, showToaster: c, selectedStrategyId: s, LEGACY_OPTION_VALUE: m, showSelectionError: l, drawerDescription: x, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: d, strategyOptions: A, onInfoBoxButtonClick: h, selectedStrategy: v, footerButtonGroupOptions: C, closeDrawer: () => {
|
|
96
95
|
e.closeAssignStrategyDrawer();
|
|
97
96
|
}, assignStrategy: async () => {
|
|
98
97
|
const t = v.value;
|
|
@@ -113,16 +112,16 @@ const it = /* @__PURE__ */ b({
|
|
|
113
112
|
});
|
|
114
113
|
return;
|
|
115
114
|
}
|
|
116
|
-
const
|
|
115
|
+
const o = e.currentRecommendationId;
|
|
117
116
|
e.assignStrategy(t), c({
|
|
118
117
|
type: u.Success,
|
|
119
118
|
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
120
|
-
}), e.closeAssignStrategyDrawer(),
|
|
119
|
+
}), e.closeAssignStrategyDrawer(), o !== null && await D(o, "Assigned recommendation strategy");
|
|
121
120
|
}, onSelect: (t) => {
|
|
122
|
-
|
|
123
|
-
}
|
|
121
|
+
s.value = t.value, l.value = !1;
|
|
122
|
+
} };
|
|
124
123
|
}
|
|
125
124
|
});
|
|
126
125
|
export {
|
|
127
|
-
|
|
126
|
+
st as default
|
|
128
127
|
};
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import { useToaster as d } from "./useToaster.js";
|
|
2
2
|
import { ToasterTypeOptions as c } from "../enums/toaster.js";
|
|
3
|
-
const
|
|
4
|
-
const { showToaster:
|
|
5
|
-
let
|
|
6
|
-
const n = (o, t,
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
3
|
+
const b = () => {
|
|
4
|
+
const { showToaster: u, hideToaster: f } = d();
|
|
5
|
+
let l = null;
|
|
6
|
+
const n = (o, t, e, i, s = !0) => {
|
|
7
|
+
l = e;
|
|
8
|
+
const r = i != null && i.action ? { text: i.action.label, onClick: i.action.func } : void 0;
|
|
9
|
+
u({
|
|
10
|
+
type: o,
|
|
11
|
+
message: t,
|
|
12
|
+
actionButton: r,
|
|
13
|
+
autoHide: (i == null ? void 0 : i.autoClose) ?? s,
|
|
14
|
+
closeable: (i == null ? void 0 : i.closeable) ?? !0
|
|
15
|
+
});
|
|
10
16
|
};
|
|
11
17
|
return { getStripoNotifications: () => ({
|
|
12
|
-
info: (o, t,
|
|
13
|
-
success: (o, t,
|
|
14
|
-
warn: (o, t,
|
|
15
|
-
error: (o, t,
|
|
18
|
+
info: (o, t, e) => n(c.Info, o, t, e),
|
|
19
|
+
success: (o, t, e) => n(c.Success, o, t, e),
|
|
20
|
+
warn: (o, t, e) => n(c.Warning, o, t, e),
|
|
21
|
+
error: (o, t, e) => n(c.Error, o, t, e),
|
|
16
22
|
// A loader marks an in-progress operation; Stripo dismisses it via hide(id)
|
|
17
23
|
// when finished, so it must not auto-hide.
|
|
18
|
-
loader: (o, t,
|
|
24
|
+
loader: (o, t, e) => n(c.Info, o, t, e, !1),
|
|
19
25
|
hide: (o) => {
|
|
20
|
-
|
|
26
|
+
l === o && (f(), l = null);
|
|
21
27
|
}
|
|
22
28
|
}) };
|
|
23
29
|
};
|
|
24
30
|
export {
|
|
25
|
-
|
|
31
|
+
b as useStripoNotifications
|
|
26
32
|
};
|
|
@@ -1,125 +1,122 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (
|
|
4
|
-
import { BLOCK_ID as
|
|
5
|
-
import { hasZeroWidthDeclaration as
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var x = (r, t, e) => t in r ? O(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var w = (r, t, e) => x(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { BLOCK_ID as V } from "../../extensions/Blocks/Items/block.js";
|
|
5
|
+
import { hasZeroWidthDeclaration as H, withoutZeroWidth as N } from "../../extensions/Blocks/Items/constants/cardWidth.js";
|
|
6
6
|
import { ItemInCartOptions as E, DefaultConfigValues as S, SETTINGS_ENUMS as p } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
|
|
7
|
-
import { getDefaultTemplate as
|
|
8
|
-
import { useTemplateStore as
|
|
9
|
-
import { protectLiquid as
|
|
10
|
-
const
|
|
11
|
-
/\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(>|>)\s*\d+\s*%\}/,
|
|
12
|
-
/\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_\d+\s*(!=|!=)\s*\1_originalprice_\d+\s*%\}/
|
|
13
|
-
], G = /esd-custom-display-conditions?="[^"]*"/g, R = "table.es-left, table.es-right", j = [
|
|
7
|
+
import { getDefaultTemplate as W } from "../../extensions/Blocks/Items/template.js";
|
|
8
|
+
import { useTemplateStore as $ } from "../../stores/template.js";
|
|
9
|
+
import { protectLiquid as F, restoreLiquid as U } from "../../utils/liquidProtection.js";
|
|
10
|
+
const D = "table.es-left, table.es-right", Y = [
|
|
14
11
|
".es-hidden",
|
|
15
12
|
".ins-product-td",
|
|
16
13
|
"td.esd-cart-items-block",
|
|
17
14
|
"td.esd-browsed-items-block",
|
|
18
15
|
"td.esd-purchased-items-block"
|
|
19
16
|
].join(", ");
|
|
20
|
-
function h(
|
|
21
|
-
const t = Number(
|
|
17
|
+
function h(r) {
|
|
18
|
+
const t = Number(r.getAttribute("width"));
|
|
22
19
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
23
20
|
}
|
|
24
|
-
function
|
|
25
|
-
return Array.from(
|
|
21
|
+
function P(r) {
|
|
22
|
+
return Array.from(r.children).filter((t) => t.tagName === "TBODY").flatMap((t) => Array.from(t.children)).flatMap((t) => Array.from(t.children).filter((e) => e.tagName === "TD"));
|
|
26
23
|
}
|
|
27
|
-
function
|
|
28
|
-
var e,
|
|
29
|
-
let t = (e =
|
|
24
|
+
function z(r) {
|
|
25
|
+
var e, i;
|
|
26
|
+
let t = (e = r.parentElement) == null ? void 0 : e.closest("table");
|
|
30
27
|
for (; t; ) {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
t = (
|
|
28
|
+
const o = h(t);
|
|
29
|
+
if (o)
|
|
30
|
+
return o;
|
|
31
|
+
t = (i = t.parentElement) == null ? void 0 : i.closest("table");
|
|
35
32
|
}
|
|
36
33
|
return 0;
|
|
37
34
|
}
|
|
38
|
-
function
|
|
39
|
-
var
|
|
40
|
-
const t = (
|
|
41
|
-
if (!t || !e || !t.matches(
|
|
35
|
+
function k(r) {
|
|
36
|
+
var a, c;
|
|
37
|
+
const t = (c = (a = r.parentElement) == null ? void 0 : a.parentElement) == null ? void 0 : c.parentElement, e = t == null ? void 0 : t.parentElement;
|
|
38
|
+
if (!t || !e || !t.matches(D) || !h(r))
|
|
42
39
|
return !1;
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
40
|
+
const i = P(t), o = i.some((l) => !l.matches(Y) && h(l));
|
|
41
|
+
if (!i.includes(r) || o)
|
|
45
42
|
return !1;
|
|
46
|
-
const
|
|
47
|
-
return n > 0 &&
|
|
43
|
+
const u = Array.from(e.children).filter((l) => l.matches(D)).reduce((l, d) => l + Math.max(0, ...P(d).map(h)), 0), n = z(e);
|
|
44
|
+
return n > 0 && u <= n;
|
|
48
45
|
}
|
|
49
|
-
function
|
|
46
|
+
function j() {
|
|
50
47
|
return String(Date.now() + Math.floor(Math.random() * 1e3));
|
|
51
48
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
49
|
+
function R(r) {
|
|
50
|
+
return r ? {
|
|
54
51
|
CartItems: p.ITEMS_TYPE.CART_ITEMS,
|
|
55
52
|
BrowsedItems: p.ITEMS_TYPE.BROWSED_ITEMS,
|
|
56
53
|
PurchasedItems: p.ITEMS_TYPE.PURCHASED_ITEMS,
|
|
57
54
|
CART_ITEMS: p.ITEMS_TYPE.CART_ITEMS,
|
|
58
55
|
BROWSED_ITEMS: p.ITEMS_TYPE.BROWSED_ITEMS,
|
|
59
56
|
PURCHASED_ITEMS: p.ITEMS_TYPE.PURCHASED_ITEMS
|
|
60
|
-
}[
|
|
57
|
+
}[r] || p.ITEMS_TYPE.CART_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
|
|
61
58
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
59
|
+
function J(r) {
|
|
60
|
+
return r.classList.contains("esd-browsed-items-block") ? p.ITEMS_TYPE.BROWSED_ITEMS : r.classList.contains("esd-purchased-items-block") ? p.ITEMS_TYPE.PURCHASED_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
|
|
64
61
|
}
|
|
65
|
-
function
|
|
66
|
-
var
|
|
67
|
-
const t = (
|
|
68
|
-
let n =
|
|
62
|
+
function q(r) {
|
|
63
|
+
var a;
|
|
64
|
+
const t = (c, l) => c == null ? l : c === "1" || c === "true", e = (c, l) => c || l, i = r["data-type"] || r["data-source"], o = R(i), u = E[o];
|
|
65
|
+
let n = r["data-cart_items_select_control_value"] || ((a = u == null ? void 0 : u[0]) == null ? void 0 : a.value) || S.cartItemsSelectControlValue;
|
|
69
66
|
if (n && !n.includes("{{") && /^\d+$/.test(n)) {
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
const c = parseInt(n) - 1, l = E[o];
|
|
68
|
+
l && l[c] && (n = l[c].value);
|
|
72
69
|
}
|
|
73
70
|
return {
|
|
74
71
|
initialized: !0,
|
|
75
|
-
blockInstanceId: e(
|
|
76
|
-
source:
|
|
77
|
-
type:
|
|
72
|
+
blockInstanceId: e(r["data-block-instance-id"], j()),
|
|
73
|
+
source: o,
|
|
74
|
+
type: o,
|
|
78
75
|
itemsSelectValue: n,
|
|
79
|
-
orientation:
|
|
80
|
-
nameTrimming: t(
|
|
81
|
-
priceHideDiscount: t(
|
|
82
|
-
priceFormatted: t(
|
|
83
|
-
priceSinglePrice: t(
|
|
76
|
+
orientation: r["data-card_orientation_control_value"] || p.ORIENTATION.VERTICAL,
|
|
77
|
+
nameTrimming: t(r["data-product_name_control_trim"], !0),
|
|
78
|
+
priceHideDiscount: t(r["data-product_price_control_nodup"], !0),
|
|
79
|
+
priceFormatted: t(r["data-product_price_control_formated"], !0),
|
|
80
|
+
priceSinglePrice: t(r["data-product_price_control_single_price"], !1),
|
|
84
81
|
priceCurrencySymbol: e(
|
|
85
|
-
|
|
82
|
+
r["data-product_price_control_currency_symbol"],
|
|
86
83
|
S.productPriceCurrencySymbolControlValue
|
|
87
84
|
),
|
|
88
85
|
priceCurrencyLocation: e(
|
|
89
|
-
|
|
86
|
+
r["data-product_price_currency_location"],
|
|
90
87
|
S.productPriceCurrencyLocationControlValue
|
|
91
88
|
),
|
|
92
|
-
priceOrientation:
|
|
93
|
-
quantityControlEnabled: t(
|
|
94
|
-
buttonLink: e(
|
|
95
|
-
imageLink: e(
|
|
96
|
-
buttonLabel: e(
|
|
97
|
-
buttonFullWidth: t(
|
|
98
|
-
imageVisible: t(
|
|
99
|
-
nameVisible: t(
|
|
100
|
-
quantityVisible: t(
|
|
101
|
-
priceVisible: t(
|
|
102
|
-
originalPriceVisible: t(
|
|
103
|
-
buttonVisible: t(
|
|
89
|
+
priceOrientation: r["data-product_original_price_control_orientation"] || "horizontal",
|
|
90
|
+
quantityControlEnabled: t(r["data-product_quantity_control_enabled"], !0),
|
|
91
|
+
buttonLink: e(r["data-product_button_link"], S.productButtonLinkControlValue),
|
|
92
|
+
imageLink: e(r["data-product_image_link"], S.productImageLinkControlValue),
|
|
93
|
+
buttonLabel: e(r["data-product_button_control_label"], "Buy"),
|
|
94
|
+
buttonFullWidth: t(r["data-product_button_control_atw"], !0),
|
|
95
|
+
imageVisible: t(r["data-product_image_control_enabled"], !0),
|
|
96
|
+
nameVisible: t(r["data-product_name_control_enabled"], !0),
|
|
97
|
+
quantityVisible: t(r["data-product_quantity_control_enabled"], !0),
|
|
98
|
+
priceVisible: t(r["data-product_price_control_enabled"], !0),
|
|
99
|
+
originalPriceVisible: t(r["data-product_original_price_control_enabled"], !0),
|
|
100
|
+
buttonVisible: t(r["data-product_button_control_enabled"], !0)
|
|
104
101
|
};
|
|
105
102
|
}
|
|
106
|
-
function
|
|
103
|
+
function Z(r, t) {
|
|
107
104
|
const e = {
|
|
108
105
|
CART_ITEMS: `{{Abandoned Cart Item (${t}) Image}}`,
|
|
109
106
|
BROWSED_ITEMS: `{{Browsed Item (${t}) Image}}`,
|
|
110
107
|
PURCHASED_ITEMS: `{{Purchased Item (${t}) Image}}`
|
|
111
108
|
};
|
|
112
|
-
return e[
|
|
109
|
+
return e[r] || e.CART_ITEMS;
|
|
113
110
|
}
|
|
114
|
-
function
|
|
111
|
+
function G(r, t) {
|
|
115
112
|
const e = {
|
|
116
113
|
CART_ITEMS: `{{Abandoned Cart Item (${t}) Url}}`,
|
|
117
114
|
BROWSED_ITEMS: `{{Browsed Item (${t}) Url}}`,
|
|
118
115
|
PURCHASED_ITEMS: `{{Purchased Item (${t}) Url}}`
|
|
119
116
|
};
|
|
120
|
-
return e[
|
|
117
|
+
return e[r] || e.CART_ITEMS;
|
|
121
118
|
}
|
|
122
|
-
class
|
|
119
|
+
class K {
|
|
123
120
|
constructor() {
|
|
124
121
|
w(this, "parser");
|
|
125
122
|
this.parser = new DOMParser();
|
|
@@ -128,41 +125,41 @@ class tt {
|
|
|
128
125
|
try {
|
|
129
126
|
if (!this.containsItemsBlock(t))
|
|
130
127
|
return this.backfillV2ProductTdAttributes(t);
|
|
131
|
-
const e = this.removeJinjaConditionals(t),
|
|
128
|
+
const e = this.removeJinjaConditionals(t), i = this.parser.parseFromString(e, "text/html"), o = i.querySelectorAll(
|
|
132
129
|
"td.esd-cart-items-block, td.esd-browsed-items-block, td.esd-purchased-items-block"
|
|
133
130
|
);
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
}),
|
|
131
|
+
if ($().$patch((a) => {
|
|
132
|
+
a.migrations = { ...a.migrations, [V]: o.length };
|
|
133
|
+
}), o.length === 0)
|
|
137
134
|
return console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), this.backfillV2ProductTdAttributes(e);
|
|
138
|
-
const n = new Set(Array.from(
|
|
139
|
-
return
|
|
140
|
-
const
|
|
141
|
-
orientation:
|
|
142
|
-
itemsType:
|
|
143
|
-
itemId:
|
|
144
|
-
currencySymbol:
|
|
145
|
-
currencyLocation:
|
|
146
|
-
formattedPrice:
|
|
147
|
-
configBlockAttributes:
|
|
135
|
+
const n = new Set(Array.from(o).filter(k));
|
|
136
|
+
return o.forEach((a) => {
|
|
137
|
+
const c = this.extractConfiguration(a), l = W({
|
|
138
|
+
orientation: c.orientation,
|
|
139
|
+
itemsType: c.itemsType,
|
|
140
|
+
itemId: c.itemId,
|
|
141
|
+
currencySymbol: c.currencySymbol,
|
|
142
|
+
currencyLocation: c.currencyLocation,
|
|
143
|
+
formattedPrice: c.formattedPrice,
|
|
144
|
+
configBlockAttributes: c.configBlockAttributes,
|
|
148
145
|
migrate: !0,
|
|
149
|
-
nameStyles:
|
|
150
|
-
buttonStyles:
|
|
151
|
-
priceStyles:
|
|
152
|
-
originalPriceStyles:
|
|
153
|
-
quantityStyles:
|
|
154
|
-
nodeConfig:
|
|
146
|
+
nameStyles: c.nameStyles,
|
|
147
|
+
buttonStyles: c.buttonStyles,
|
|
148
|
+
priceStyles: c.priceStyles,
|
|
149
|
+
originalPriceStyles: c.originalPriceStyles,
|
|
150
|
+
quantityStyles: c.quantityStyles,
|
|
151
|
+
nodeConfig: q(c.configBlockAttributes)
|
|
155
152
|
}), s = this.parser.parseFromString(
|
|
156
|
-
`<table><tbody><tr>${
|
|
153
|
+
`<table><tbody><tr>${l}</tr></tbody></table>`,
|
|
157
154
|
"text/html"
|
|
158
155
|
).querySelector("td");
|
|
159
|
-
if (s &&
|
|
160
|
-
const _ =
|
|
156
|
+
if (s && a.parentNode) {
|
|
157
|
+
const _ = q(c.configBlockAttributes);
|
|
161
158
|
s.setAttribute("esd-ext-config", JSON.stringify(_)), s.setAttribute("data-type", _.type);
|
|
162
159
|
const m = s.querySelector("esd-config-block");
|
|
163
|
-
m && m.remove(), n.has(
|
|
160
|
+
m && m.remove(), n.has(a) && (s.setAttribute("width", String(h(a))), s.classList.add("esd-container-frame")), a.parentNode.replaceChild(s, a);
|
|
164
161
|
}
|
|
165
|
-
}), this.backfillV2ProductTdAttributes(
|
|
162
|
+
}), this.backfillV2ProductTdAttributes(i.documentElement.outerHTML);
|
|
166
163
|
} catch (e) {
|
|
167
164
|
return console.error("ItemsBlockMigrator failed:", e), t;
|
|
168
165
|
}
|
|
@@ -175,24 +172,24 @@ class tt {
|
|
|
175
172
|
*/
|
|
176
173
|
extractConfiguration(t) {
|
|
177
174
|
var M;
|
|
178
|
-
const e =
|
|
179
|
-
this.readSelfOrDescendantAttribute(t, "data-type") ||
|
|
180
|
-
),
|
|
181
|
-
this.applyDomFallbacks(t,
|
|
182
|
-
const
|
|
175
|
+
const e = R(
|
|
176
|
+
this.readSelfOrDescendantAttribute(t, "data-type") || J(t)
|
|
177
|
+
), i = this.readSelfOrDescendantAttribute(t, "data-number") || "1", o = parseInt(i) - 1, u = E[e], n = ((M = u == null ? void 0 : u[o]) == null ? void 0 : M.value) || u[0].value, a = this.extractConfigBlockAttributes(t, e, i);
|
|
178
|
+
this.applyDomFallbacks(t, a);
|
|
179
|
+
const c = t.querySelector('[product-attr="price"]'), l = a["data-product_price_control_currency_symbol"], d = a["data-product_price_currency_location"] || "0", s = a["data-product_price_control_formated"], _ = s !== "false" && s !== "0", A = a["data-card_orientation_control_value"] === "horizontal" ? "horizontal" : "vertical", g = t.querySelector('a[product-attr="name"]'), y = (g == null ? void 0 : g.getAttribute("style")) || void 0, b = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), I = (b == null ? void 0 : b.getAttribute("style")) || void 0, B = (c == null ? void 0 : c.getAttribute("style")) || void 0, f = t.querySelector("p.original-price") ?? t.querySelector('[product-attr="originalPrice"]'), T = f != null && f.getAttribute("style") ? f : (f == null ? void 0 : f.closest("p")) ?? f, L = (T == null ? void 0 : T.getAttribute("style")) || void 0, C = t.querySelector('[product-attr="quantity"]'), v = (C == null ? void 0 : C.getAttribute("style")) || void 0;
|
|
183
180
|
return {
|
|
184
181
|
orientation: A,
|
|
185
182
|
itemsType: e,
|
|
186
183
|
itemId: n,
|
|
187
|
-
currencySymbol:
|
|
184
|
+
currencySymbol: l,
|
|
188
185
|
currencyLocation: d,
|
|
189
186
|
formattedPrice: _,
|
|
190
|
-
configBlockAttributes:
|
|
187
|
+
configBlockAttributes: a,
|
|
191
188
|
nameStyles: y,
|
|
192
189
|
buttonStyles: I,
|
|
193
|
-
priceStyles:
|
|
194
|
-
originalPriceStyles:
|
|
195
|
-
quantityStyles:
|
|
190
|
+
priceStyles: B,
|
|
191
|
+
originalPriceStyles: L,
|
|
192
|
+
quantityStyles: v
|
|
196
193
|
};
|
|
197
194
|
}
|
|
198
195
|
/**
|
|
@@ -204,7 +201,7 @@ class tt {
|
|
|
204
201
|
*/
|
|
205
202
|
applyDomFallbacks(t, e) {
|
|
206
203
|
var A, g;
|
|
207
|
-
const
|
|
204
|
+
const i = t.querySelector("esd-config-block"), o = (...y) => !i || y.every((b) => !(i.getAttribute(b) ?? "").trim());
|
|
208
205
|
Object.entries({
|
|
209
206
|
image: '[product-attr="imageSrc"]',
|
|
210
207
|
name: '[product-attr="name"]',
|
|
@@ -214,16 +211,16 @@ class tt {
|
|
|
214
211
|
button: '[product-attr="button"]'
|
|
215
212
|
}).forEach(([y, b]) => {
|
|
216
213
|
const I = `data-product_${y}_control_enabled`;
|
|
217
|
-
|
|
218
|
-
}),
|
|
219
|
-
const n = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'),
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
s &&
|
|
214
|
+
o(I) && (e[I] = t.querySelector(b) ? "true" : "false");
|
|
215
|
+
}), o("data-card_orientation_control_value") && (e["data-card_orientation_control_value"] = t.querySelector('[colspan="2"]') ? "vertical" : "horizontal");
|
|
216
|
+
const n = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), a = (A = n == null ? void 0 : n.textContent) == null ? void 0 : A.replace(/\s+/g, " ").trim();
|
|
217
|
+
a && o("data-product_button_control_label") && (e["data-product_button_control_label"] = a);
|
|
218
|
+
const c = (n == null ? void 0 : n.getAttribute("style")) || "";
|
|
219
|
+
o("data-product_button_control_atw") && /display:\s*inline/.test(c) && !/(?:^|;)\s*width\s*:\s*100%/.test(c) && (e["data-product_button_control_atw"] = "false");
|
|
220
|
+
const l = t.querySelector('[product-attr="imageSrc"]'), d = l ? this.readImageSize(l) : null, s = (d == null ? void 0 : d.height) ?? (d == null ? void 0 : d.width), _ = (d == null ? void 0 : d.width) ?? (d == null ? void 0 : d.height);
|
|
221
|
+
s && o("data-product_image_control_image-height") && (e["data-product_image_control_image-height"] = s), _ && o("data-product_image_control_image-width") && (e["data-product_image_control_image-width"] = _), this.applyPriceDomFallbacks(t, e, o);
|
|
225
222
|
const m = ((g = t.querySelector('[product-attr="name"]')) == null ? void 0 : g.getAttribute("style")) || "";
|
|
226
|
-
|
|
223
|
+
o("data-product_name_control_trim") && /white-space:\s*normal/.test(m) && (e["data-product_name_control_trim"] = "0");
|
|
227
224
|
}
|
|
228
225
|
/**
|
|
229
226
|
* Carries the price cell's own currency/format attributes into the config attributes when
|
|
@@ -232,22 +229,22 @@ class tt {
|
|
|
232
229
|
* ₺ but reporting USD/before to the settings panel, and the first unrelated price edit wrote
|
|
233
230
|
* the default back over the real value.
|
|
234
231
|
*/
|
|
235
|
-
applyPriceDomFallbacks(t, e,
|
|
236
|
-
var
|
|
237
|
-
const
|
|
238
|
-
if (!
|
|
232
|
+
applyPriceDomFallbacks(t, e, i) {
|
|
233
|
+
var l;
|
|
234
|
+
const o = t.querySelector('[product-attr="price"]') ?? t.querySelector('[product-attr="originalPrice"]');
|
|
235
|
+
if (!o)
|
|
239
236
|
return;
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
const n =
|
|
243
|
-
if (n &&
|
|
237
|
+
const u = (l = o.getAttribute("data-currency_symbol")) == null ? void 0 : l.trim();
|
|
238
|
+
u && i("data-product_price_control_currency_symbol") && (e["data-product_price_control_currency_symbol"] = u);
|
|
239
|
+
const n = o.getAttribute("data-curency");
|
|
240
|
+
if (n && i("data-product_price_currency_location", "data-product_price_control_curency")) {
|
|
244
241
|
const d = n === "after" ? "1" : "0";
|
|
245
242
|
e["data-product_price_currency_location"] = d, e["data-product_price_control_curency"] = d;
|
|
246
243
|
}
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
|
|
244
|
+
const a = o.getAttribute("data-formated");
|
|
245
|
+
a && i("data-product_price_control_formated") && (e["data-product_price_control_formated"] = a);
|
|
246
|
+
const c = o.getAttribute("data-single_price");
|
|
247
|
+
c && i("data-product_price_control_single_price") && (e["data-product_price_control_single_price"] = c);
|
|
251
248
|
}
|
|
252
249
|
/**
|
|
253
250
|
* Reads an attribute from the block element itself before falling back to a descendant.
|
|
@@ -255,8 +252,8 @@ class tt {
|
|
|
255
252
|
* esd-config-block; when an author deletes the config block only the td's copy survives.
|
|
256
253
|
*/
|
|
257
254
|
readSelfOrDescendantAttribute(t, e) {
|
|
258
|
-
var
|
|
259
|
-
return t.getAttribute(e) || ((
|
|
255
|
+
var i;
|
|
256
|
+
return t.getAttribute(e) || ((i = t.querySelector(`[${e}]`)) == null ? void 0 : i.getAttribute(e)) || null;
|
|
260
257
|
}
|
|
261
258
|
/**
|
|
262
259
|
* Reads the product image's pixel size — `width`/`height` attributes first, then px values
|
|
@@ -276,15 +273,15 @@ class tt {
|
|
|
276
273
|
* to nothing, so only a positive integer counts as an answer.
|
|
277
274
|
*/
|
|
278
275
|
readImageDimension(t, e) {
|
|
279
|
-
var
|
|
280
|
-
const
|
|
276
|
+
var l;
|
|
277
|
+
const i = (d) => {
|
|
281
278
|
const s = (d ?? "").trim().match(/^(\d+(?:\.\d+)?)(?:px)?$/i), _ = s ? Math.floor(parseFloat(s[1])) : 0;
|
|
282
279
|
return _ > 0 ? String(_) : null;
|
|
283
|
-
},
|
|
284
|
-
if (
|
|
285
|
-
return
|
|
286
|
-
const
|
|
287
|
-
return
|
|
280
|
+
}, o = i((l = t.getAttribute(e)) == null ? void 0 : l.trim());
|
|
281
|
+
if (o)
|
|
282
|
+
return o;
|
|
283
|
+
const u = t.getAttribute("style") || "", n = new RegExp(`(?:^|;)\\s*${e}:\\s*(\\d+(?:\\.\\d+)?)px`), a = new RegExp(`max-${e}:\\s*(\\d+(?:\\.\\d+)?)px`), c = u.match(n) || u.match(a);
|
|
284
|
+
return i(c == null ? void 0 : c[1]);
|
|
288
285
|
}
|
|
289
286
|
/**
|
|
290
287
|
* Extracts all data-* attributes from the esd-config-block element
|
|
@@ -293,27 +290,27 @@ class tt {
|
|
|
293
290
|
* @param itemsType - The type of items (CART_ITEMS, BROWSED_ITEMS, PURCHASED_ITEMS)
|
|
294
291
|
* @param itemNumber - The item number (1-based index)
|
|
295
292
|
*/
|
|
296
|
-
extractConfigBlockAttributes(t, e,
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
299
|
-
if (Array.from(
|
|
300
|
-
|
|
301
|
-
}),
|
|
302
|
-
const
|
|
303
|
-
if (/^\d+$/.test(
|
|
304
|
-
const
|
|
305
|
-
|
|
293
|
+
extractConfigBlockAttributes(t, e, i) {
|
|
294
|
+
const o = t.querySelector("esd-config-block"), u = {};
|
|
295
|
+
if (o) {
|
|
296
|
+
if (Array.from(o.attributes).forEach((a) => {
|
|
297
|
+
a.name.startsWith("data-") && (u[a.name] = a.value);
|
|
298
|
+
}), u["data-cart_items_select_control_value"]) {
|
|
299
|
+
const a = u["data-cart_items_select_control_value"];
|
|
300
|
+
if (/^\d+$/.test(a)) {
|
|
301
|
+
const c = parseInt(a) - 1, l = E[e];
|
|
302
|
+
l && l[c] && (u["data-cart_items_select_control_value"] = l[c].value);
|
|
306
303
|
}
|
|
307
304
|
}
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
let
|
|
311
|
-
|
|
305
|
+
if (u["data-product_price_control_curency"]) {
|
|
306
|
+
const a = u["data-product_price_control_curency"];
|
|
307
|
+
let c = a;
|
|
308
|
+
a === "before" ? c = "0" : a === "after" && (c = "1"), u["data-product_price_control_curency"] = c, u["data-product_price_currency_location"] = c;
|
|
312
309
|
}
|
|
313
|
-
(!
|
|
310
|
+
(!u["data-product_price_control_currency_symbol"] || u["data-product_price_control_currency_symbol"].trim() === "") && (u["data-product_price_control_currency_symbol"] = "USD");
|
|
314
311
|
}
|
|
315
|
-
const n = { ...this.getDefaultConfigBlockAttributes(), ...
|
|
316
|
-
return n["data-type"] = e, n["data-source"] = e, n["data-product_image_link"] =
|
|
312
|
+
const n = { ...this.getDefaultConfigBlockAttributes(), ...u };
|
|
313
|
+
return n["data-type"] = e, n["data-source"] = e, n["data-product_image_link"] = Z(e, i), n["data-product_button_link"] = G(e, i), n;
|
|
317
314
|
}
|
|
318
315
|
/**
|
|
319
316
|
* Returns default esd-config-block attributes based on the old template structure
|
|
@@ -388,31 +385,31 @@ class tt {
|
|
|
388
385
|
backfillV2ProductTdAttributes(t) {
|
|
389
386
|
if (!t.includes("ins-product-td") || !t.includes("esd-ext-config"))
|
|
390
387
|
return t;
|
|
391
|
-
const e = this.parser.parseFromString(
|
|
392
|
-
let
|
|
393
|
-
const
|
|
394
|
-
return
|
|
395
|
-
const
|
|
396
|
-
!
|
|
397
|
-
!
|
|
388
|
+
const e = this.parser.parseFromString(F(t), "text/html");
|
|
389
|
+
let i = !1;
|
|
390
|
+
const o = Array.from(e.querySelectorAll(".ins-product-td")), u = new Set(o.filter(k));
|
|
391
|
+
return o.forEach((n) => {
|
|
392
|
+
const a = u.has(n);
|
|
393
|
+
!a && n.hasAttribute("width") && (n.removeAttribute("width"), i = !0), !a && n.classList.contains("esd-container-frame") && (n.classList.remove("esd-container-frame"), i = !0), n.querySelectorAll("table.ins-product-wrapper").forEach((_) => {
|
|
394
|
+
!a && _.hasAttribute("width") && _.getAttribute("width") !== "100%" && (_.setAttribute("width", "100%"), i = !0);
|
|
398
395
|
const m = _.getAttribute("style");
|
|
399
|
-
m &&
|
|
396
|
+
m && H(m) && (_.setAttribute("style", N(m)), _.setAttribute("width", "100%"), i = !0);
|
|
400
397
|
});
|
|
401
|
-
const
|
|
402
|
-
let
|
|
398
|
+
const c = n.getAttribute("esd-ext-config");
|
|
399
|
+
let l = null;
|
|
403
400
|
try {
|
|
404
|
-
|
|
401
|
+
l = c ? JSON.parse(c) : null;
|
|
405
402
|
} catch {
|
|
406
403
|
}
|
|
407
|
-
if (!
|
|
404
|
+
if (!l || (!n.getAttribute("data-nodup") && typeof l.priceHideDiscount == "boolean" && (n.setAttribute("data-nodup", String(l.priceHideDiscount)), i = !0), n.getAttribute("data-type")))
|
|
408
405
|
return;
|
|
409
|
-
const d =
|
|
406
|
+
const d = l.type || l.source;
|
|
410
407
|
if (!d)
|
|
411
408
|
return;
|
|
412
|
-
n.setAttribute("data-type", d),
|
|
413
|
-
const s = typeof
|
|
409
|
+
n.setAttribute("data-type", d), i = !0;
|
|
410
|
+
const s = typeof l.itemsSelectValue == "string" ? l.itemsSelectValue.match(/\((\d+)\)/) : null;
|
|
414
411
|
s && n.getAttribute("data-number") !== s[1] && n.setAttribute("data-number", s[1]);
|
|
415
|
-
}),
|
|
412
|
+
}), i ? U(e.documentElement.outerHTML) : t;
|
|
416
413
|
}
|
|
417
414
|
/**
|
|
418
415
|
* Fast check for the presence of any items block (cart / browsed / purchased)
|
|
@@ -423,28 +420,32 @@ class tt {
|
|
|
423
420
|
return t.includes("esd-cart-items-block") || t.includes("esd-browsed-items-block") || t.includes("esd-purchased-items-block");
|
|
424
421
|
}
|
|
425
422
|
/**
|
|
426
|
-
* Removes
|
|
427
|
-
*
|
|
423
|
+
* Removes Jinja2 conditional statements from HTML
|
|
424
|
+
* Handles all items block types:
|
|
425
|
+
* - Cart Items: ins_apr_total_product_kind, ins_apr_price_N, ins_apr_originalprice_N
|
|
426
|
+
* - Browsed Items: browsed_item_total_product_kind, browsed_item_price_N, browsed_item_originalprice_N
|
|
427
|
+
* - Purchased Items: purchased_item_total_product_kind, purchased_item_price_N, purchased_item_originalprice_N
|
|
428
|
+
*
|
|
429
|
+
* IMPORTANT: Preserves the esd-custom-display-conditions attribute on <body> which
|
|
430
|
+
* contains display condition Jinja scripts that should NOT be removed.
|
|
428
431
|
*/
|
|
429
432
|
removeJinjaConditionals(t) {
|
|
430
|
-
const e =
|
|
431
|
-
let
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
});
|
|
440
|
-
return a = a.replace(/\n\s*\n\s*\n/g, `
|
|
433
|
+
const e = "__ESD_DISPLAY_CONDITIONS_PLACEHOLDER__", i = t.match(/esd-custom-display-conditions="[^"]*"/);
|
|
434
|
+
let o = i ? t.replace(i[0], e) : t;
|
|
435
|
+
return o = o.replace(
|
|
436
|
+
/\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(>|>)\s*\d+\s*%\}/g,
|
|
437
|
+
""
|
|
438
|
+
), o = o.replace(
|
|
439
|
+
/\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_\d+\s*(!=|!=)\s*\1_originalprice_\d+\s*%\}/g,
|
|
440
|
+
""
|
|
441
|
+
), o = o.replace(/\{%\s*endif\s*%\}/g, ""), i && (o = o.replace(e, i[0])), o = o.replace(/\n\s*\n\s*\n/g, `
|
|
441
442
|
|
|
442
|
-
`),
|
|
443
|
+
`), o;
|
|
443
444
|
}
|
|
444
445
|
}
|
|
445
|
-
function
|
|
446
|
-
return new
|
|
446
|
+
function nt(r) {
|
|
447
|
+
return new K().migrate(r);
|
|
447
448
|
}
|
|
448
449
|
export {
|
|
449
|
-
|
|
450
|
+
nt as migrateItemsBlock
|
|
450
451
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[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}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}#guido-toast-non-closeable .in-toasts-wrapper__close{display:none}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[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}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const o = "3.28.1-beta.
|
|
1
|
+
const o = "3.28.1-beta.45fafa1", s = { stripo: { version: "2.86.1" } }, a = {
|
|
2
2
|
version: o,
|
|
3
3
|
guido: s
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default,
|
|
7
7
|
s as guido,
|
|
8
8
|
o as version
|
|
9
9
|
};
|
|
@@ -6,12 +6,13 @@ export declare const useToasterStore: import("pinia").StoreDefinition<"guidoToas
|
|
|
6
6
|
text: string;
|
|
7
7
|
withoutLeftMargin: boolean;
|
|
8
8
|
autoHide: boolean;
|
|
9
|
+
closeable: boolean;
|
|
9
10
|
actionButton?: {
|
|
10
11
|
text: string;
|
|
11
12
|
onClick: () => void;
|
|
12
13
|
} | undefined;
|
|
13
14
|
} & import("pinia").PiniaCustomStateProperties<ToasterState>) => boolean;
|
|
14
15
|
}, {
|
|
15
|
-
showToaster(this: ToasterState, { type, message, actionButton, autoHide }: ToasterOptions): void;
|
|
16
|
+
showToaster(this: ToasterState, { type, message, actionButton, autoHide, closeable, }: ToasterOptions): void;
|
|
16
17
|
hideToaster(this: ToasterState): void;
|
|
17
18
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const s = "2.
|
|
1
|
+
const s = "2.86.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-QEKXZ3YR.js", "chunk-5T7CEBI5.js", "chunk-62K3AMOD.js", "chunk-66LFOY5U.js", "chunk-AMCKJHBC.js", "chunk-BOERNIOQ.js", "chunk-BVZUBVXH.js", "chunk-I2DLD5I4.js", "chunk-IEC5XOV2.js", "chunk-ILRQX7FO.js", "chunk-LBYVYY25.js", "chunk-LC3XAPU2.js", "chunk-OZSNTS6D.js", "chunk-PBUSX63H.js", "chunk-PYISBD2D.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], c = {
|
|
2
2
|
version: s,
|
|
3
3
|
files: n
|
|
4
4
|
};
|
package/dist/stores/toaster.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { ToasterTypeOptions as e } from "../enums/toaster.js";
|
|
2
|
-
import { defineStore as
|
|
3
|
-
const
|
|
2
|
+
import { defineStore as u } from "pinia";
|
|
3
|
+
const r = () => ({
|
|
4
4
|
status: !1,
|
|
5
5
|
type: e.Success,
|
|
6
6
|
text: "",
|
|
7
7
|
withoutLeftMargin: !1,
|
|
8
8
|
autoHide: !0,
|
|
9
|
+
closeable: !0,
|
|
9
10
|
actionButton: void 0
|
|
10
|
-
}), h =
|
|
11
|
-
state: () =>
|
|
11
|
+
}), h = u("guidoToaster", {
|
|
12
|
+
state: () => r(),
|
|
12
13
|
getters: {
|
|
13
14
|
// A toast without auto-hide (e.g. Stripo `loader`) stays until hideToaster.
|
|
14
15
|
shouldAutoHide: (t) => t.status && !!t.text && t.autoHide
|
|
15
16
|
},
|
|
16
17
|
actions: {
|
|
17
|
-
showToaster({
|
|
18
|
-
|
|
18
|
+
showToaster({
|
|
19
|
+
type: t = e.Success,
|
|
20
|
+
message: s,
|
|
21
|
+
actionButton: o,
|
|
22
|
+
autoHide: a = !0,
|
|
23
|
+
closeable: i = !0
|
|
24
|
+
}) {
|
|
25
|
+
this.status = !0, this.text = s, this.type = t, this.actionButton = o, this.autoHide = a, this.closeable = i;
|
|
19
26
|
},
|
|
20
27
|
hideToaster() {
|
|
21
28
|
this.status = !1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.28.1-beta.
|
|
3
|
+
"version": "3.28.1-beta.45fafa1",
|
|
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",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"license": "ISC",
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@stripoinc/ui-editor-extensions": "3.11.0",
|
|
63
|
-
"@useinsider/design-system-organisms": "0.
|
|
63
|
+
"@useinsider/design-system-organisms": "0.0.3-beta.d816f06",
|
|
64
64
|
"@useinsider/design-system-vue": "2.5.0",
|
|
65
65
|
"@vueuse/core": "11.3.0",
|
|
66
66
|
"lodash-es": "4.17.21",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
},
|
|
137
137
|
"guido": {
|
|
138
138
|
"stripo": {
|
|
139
|
-
"version": "2.
|
|
139
|
+
"version": "2.86.1"
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|