@useinsider/guido 3.28.1 → 3.29.0-beta.eed1ad8
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/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -10
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +42 -41
- package/dist/config/migrator/itemsBlockMigrator.js +186 -187
- package/dist/guido.css +1 -1
- package/dist/package.json.js +4 -4
- package/dist/utils/templatePreparation.js +9 -9
- package/package.json +3 -3
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */
|
|
1
|
+
import r from "./AssignStrategyDrawer.vue2.js";
|
|
3
2
|
/* empty css */
|
|
4
3
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
4
|
var a = function() {
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return t.store.assignStrategyDrawerStatus ? s(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() {
|
|
7
|
+
return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [t.strategiesLoading ? s(t.InSkeleton, { staticClass: "assign-strategy-select-skeleton", attrs: { sizing: t.SELECT_SKELETON_SIZING } }) : s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select w-23-s", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", "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(c) {
|
|
9
8
|
return t.store.openStrategyCreation();
|
|
10
9
|
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
-
}, proxy: !0 }], null, !1,
|
|
10
|
+
}, proxy: !0 }], null, !1, 3648942541) }) : e._e();
|
|
12
11
|
}, n = [], i = /* @__PURE__ */ o(
|
|
13
|
-
|
|
12
|
+
r,
|
|
14
13
|
a,
|
|
15
14
|
n,
|
|
16
15
|
!1,
|
|
17
16
|
null,
|
|
18
|
-
|
|
17
|
+
null
|
|
19
18
|
);
|
|
20
|
-
const
|
|
19
|
+
const u = i.exports;
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
u as default
|
|
23
22
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, defineAsyncComponent as T, ref as w, computed as o, watch as N } 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 R } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as P } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { DOTTED_DATE_LOCALE as U } from "../../../../enums/date.js";
|
|
6
|
+
import { URLS as G } 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 M } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { commitStrategyChange as E } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
|
|
10
|
+
import $ from "./StrategyInfoBoxContent.vue.js";
|
|
11
|
+
import { formatShortDate as z } from "../../../../utils/dateUtil.js";
|
|
12
|
+
import { asText as D } from "../../../../utils/genericUtil.js";
|
|
13
|
+
import { escapeHtml as H } from "../../../../utils/htmlEscape.js";
|
|
14
|
+
import { InSkeleton as O } from "@useinsider/design-system-vue";
|
|
15
|
+
const it = /* @__PURE__ */ b({
|
|
16
16
|
__name: "AssignStrategyDrawer",
|
|
17
|
-
setup(
|
|
17
|
+
setup(F) {
|
|
18
18
|
const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
|
|
19
|
-
render: (
|
|
20
|
-
}),
|
|
19
|
+
render: (s) => s(O, { props: { sizing: { width: t, height: r } } })
|
|
20
|
+
}), I = T({
|
|
21
21
|
loader: async () => (await g()).OrgStrategyDetailModal,
|
|
22
22
|
loadingComponent: p(480, 240),
|
|
23
23
|
delay: 0
|
|
24
|
-
}),
|
|
24
|
+
}), h = T({
|
|
25
25
|
loader: async () => (await g()).OrgStrategyDropdown
|
|
26
|
-
}), i = "guido-edit-strategy-", a =
|
|
27
|
-
|
|
26
|
+
}), i = "guido-edit-strategy-", x = { width: 480, height: 42 }, a = P(), e = M(), { showToaster: c } = R(), n = w(null), d = "legacy", l = w(!1), A = o(() => e.strategiesLoading || e.legacyConversionLoading), C = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: G.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
|
|
27
|
+
N(() => e.assignStrategyDrawerStatus, (t) => {
|
|
28
28
|
if (!t)
|
|
29
29
|
return;
|
|
30
30
|
const { strategyId: r } = e.recommendationConfigs;
|
|
31
|
-
|
|
31
|
+
n.value = r || (e.isLegacyStrategyBlock ? d : 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,27 +36,28 @@ const st = /* @__PURE__ */ B({
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
const f = (t) => {
|
|
39
|
-
const r =
|
|
39
|
+
const r = D(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 s = z(r, U);
|
|
43
|
+
return a("recommendation-strategy.last-updated-on", { value: s });
|
|
44
|
+
}, S = o(() => ({
|
|
45
45
|
text: a("ds-steps.legacy-strategy"),
|
|
46
|
-
value:
|
|
46
|
+
value: d,
|
|
47
47
|
hidden: !0
|
|
48
|
-
})),
|
|
48
|
+
})), m = o(() => 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
|
-
|
|
55
|
+
size: "small",
|
|
56
|
+
class: "assign-strategy-info-box",
|
|
57
|
+
titleText: H(D(t.name)),
|
|
57
58
|
descriptionStatus: !0,
|
|
58
59
|
descriptionText: f(t),
|
|
59
|
-
slot:
|
|
60
|
+
slot: $,
|
|
60
61
|
slotProps: { strategy: t },
|
|
61
62
|
// The info box drops the option's value/text, so the id is the only channel
|
|
62
63
|
// that can carry the strategy back to the click handler.
|
|
@@ -69,17 +70,17 @@ const st = /* @__PURE__ */ B({
|
|
|
69
70
|
icon: "line-open-website"
|
|
70
71
|
}]
|
|
71
72
|
}
|
|
72
|
-
}))),
|
|
73
|
+
}))), L = o(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), B = (t) => {
|
|
73
74
|
var _;
|
|
74
75
|
const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
|
|
75
76
|
if (!r)
|
|
76
77
|
return;
|
|
77
|
-
const
|
|
78
|
-
e.openStrategyEdit(r) && (String(
|
|
79
|
-
}, v =
|
|
80
|
-
const t = e.strategies.find((r) => String(r.strategy_id) === String(
|
|
78
|
+
const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
|
|
79
|
+
e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && E(s, "Removed recommendation strategy")));
|
|
80
|
+
}, v = o(() => {
|
|
81
|
+
const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
|
|
81
82
|
return t ? { ...t, fallback_config: null } : null;
|
|
82
|
-
}),
|
|
83
|
+
}), k = o(() => ({
|
|
83
84
|
primaryButton: {
|
|
84
85
|
styling: "solid",
|
|
85
86
|
type: "primary",
|
|
@@ -91,7 +92,7 @@ const st = /* @__PURE__ */ B({
|
|
|
91
92
|
labelText: a("products.cancel")
|
|
92
93
|
}
|
|
93
94
|
}));
|
|
94
|
-
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal:
|
|
95
|
+
return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: I, OrgStrategyDropdown: h, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: x, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, strategiesLoading: A, drawerDescription: C, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: m, strategyOptions: L, onInfoBoxButtonClick: B, selectedStrategy: v, footerButtonGroupOptions: k, closeDrawer: () => {
|
|
95
96
|
e.closeAssignStrategyDrawer();
|
|
96
97
|
}, assignStrategy: async () => {
|
|
97
98
|
const t = v.value;
|
|
@@ -112,16 +113,16 @@ const st = /* @__PURE__ */ B({
|
|
|
112
113
|
});
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
+
const s = e.currentRecommendationId;
|
|
116
117
|
e.assignStrategy(t), c({
|
|
117
118
|
type: u.Success,
|
|
118
119
|
message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
|
|
119
|
-
}), e.closeAssignStrategyDrawer(),
|
|
120
|
+
}), e.closeAssignStrategyDrawer(), s !== null && await E(s, "Assigned recommendation strategy");
|
|
120
121
|
}, onSelect: (t) => {
|
|
121
|
-
|
|
122
|
-
} };
|
|
122
|
+
n.value = t.value, l.value = !1;
|
|
123
|
+
}, InSkeleton: O };
|
|
123
124
|
}
|
|
124
125
|
});
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
+
it as default
|
|
127
128
|
};
|
|
@@ -1,122 +1,125 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (
|
|
4
|
-
import { BLOCK_ID as
|
|
5
|
-
import { hasZeroWidthDeclaration as
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var N = (o, t, e) => t in o ? V(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var w = (o, t, e) => N(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { BLOCK_ID as H } from "../../extensions/Blocks/Items/block.js";
|
|
5
|
+
import { hasZeroWidthDeclaration as U, withoutZeroWidth as W } 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
|
|
7
|
+
import { getDefaultTemplate as $ } from "../../extensions/Blocks/Items/template.js";
|
|
8
|
+
import { useTemplateStore as F } from "../../stores/template.js";
|
|
9
|
+
import { protectLiquid as P, restoreLiquid as D } from "../../utils/liquidProtection.js";
|
|
10
|
+
const Y = /\{%-?\s*(\w+)(?:(?!\{%)[\s\S])*?%\}/g, z = [
|
|
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 = [
|
|
11
14
|
".es-hidden",
|
|
12
15
|
".ins-product-td",
|
|
13
16
|
"td.esd-cart-items-block",
|
|
14
17
|
"td.esd-browsed-items-block",
|
|
15
18
|
"td.esd-purchased-items-block"
|
|
16
19
|
].join(", ");
|
|
17
|
-
function h(
|
|
18
|
-
const t = Number(
|
|
20
|
+
function h(o) {
|
|
21
|
+
const t = Number(o.getAttribute("width"));
|
|
19
22
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
22
|
-
return Array.from(
|
|
24
|
+
function k(o) {
|
|
25
|
+
return Array.from(o.children).filter((t) => t.tagName === "TBODY").flatMap((t) => Array.from(t.children)).flatMap((t) => Array.from(t.children).filter((e) => e.tagName === "TD"));
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
var e,
|
|
26
|
-
let t = (e =
|
|
27
|
+
function J(o) {
|
|
28
|
+
var e, u;
|
|
29
|
+
let t = (e = o.parentElement) == null ? void 0 : e.closest("table");
|
|
27
30
|
for (; t; ) {
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
31
|
-
t = (
|
|
31
|
+
const a = h(t);
|
|
32
|
+
if (a)
|
|
33
|
+
return a;
|
|
34
|
+
t = (u = t.parentElement) == null ? void 0 : u.closest("table");
|
|
32
35
|
}
|
|
33
36
|
return 0;
|
|
34
37
|
}
|
|
35
|
-
function
|
|
36
|
-
var
|
|
37
|
-
const t = (
|
|
38
|
-
if (!t || !e || !t.matches(
|
|
38
|
+
function q(o) {
|
|
39
|
+
var c, r;
|
|
40
|
+
const t = (r = (c = o.parentElement) == null ? void 0 : c.parentElement) == null ? void 0 : r.parentElement, e = t == null ? void 0 : t.parentElement;
|
|
41
|
+
if (!t || !e || !t.matches(R) || !h(o))
|
|
39
42
|
return !1;
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
43
|
+
const u = k(t), a = u.some((i) => !i.matches(j) && h(i));
|
|
44
|
+
if (!u.includes(o) || a)
|
|
42
45
|
return !1;
|
|
43
|
-
const
|
|
44
|
-
return n > 0 &&
|
|
46
|
+
const l = Array.from(e.children).filter((i) => i.matches(R)).reduce((i, d) => i + Math.max(0, ...k(d).map(h)), 0), n = J(e);
|
|
47
|
+
return n > 0 && l <= n;
|
|
45
48
|
}
|
|
46
|
-
function
|
|
49
|
+
function Z() {
|
|
47
50
|
return String(Date.now() + Math.floor(Math.random() * 1e3));
|
|
48
51
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
52
|
+
function L(o) {
|
|
53
|
+
return o ? {
|
|
51
54
|
CartItems: p.ITEMS_TYPE.CART_ITEMS,
|
|
52
55
|
BrowsedItems: p.ITEMS_TYPE.BROWSED_ITEMS,
|
|
53
56
|
PurchasedItems: p.ITEMS_TYPE.PURCHASED_ITEMS,
|
|
54
57
|
CART_ITEMS: p.ITEMS_TYPE.CART_ITEMS,
|
|
55
58
|
BROWSED_ITEMS: p.ITEMS_TYPE.BROWSED_ITEMS,
|
|
56
59
|
PURCHASED_ITEMS: p.ITEMS_TYPE.PURCHASED_ITEMS
|
|
57
|
-
}[
|
|
60
|
+
}[o] || p.ITEMS_TYPE.CART_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
|
|
58
61
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
62
|
+
function K(o) {
|
|
63
|
+
return o.classList.contains("esd-browsed-items-block") ? p.ITEMS_TYPE.BROWSED_ITEMS : o.classList.contains("esd-purchased-items-block") ? p.ITEMS_TYPE.PURCHASED_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
|
|
61
64
|
}
|
|
62
|
-
function
|
|
63
|
-
var
|
|
64
|
-
const t = (
|
|
65
|
-
let n =
|
|
65
|
+
function B(o) {
|
|
66
|
+
var c;
|
|
67
|
+
const t = (r, i) => r == null ? i : r === "1" || r === "true", e = (r, i) => r || i, u = o["data-type"] || o["data-source"], a = L(u), l = E[a];
|
|
68
|
+
let n = o["data-cart_items_select_control_value"] || ((c = l == null ? void 0 : l[0]) == null ? void 0 : c.value) || S.cartItemsSelectControlValue;
|
|
66
69
|
if (n && !n.includes("{{") && /^\d+$/.test(n)) {
|
|
67
|
-
const
|
|
68
|
-
|
|
70
|
+
const r = parseInt(n) - 1, i = E[a];
|
|
71
|
+
i && i[r] && (n = i[r].value);
|
|
69
72
|
}
|
|
70
73
|
return {
|
|
71
74
|
initialized: !0,
|
|
72
|
-
blockInstanceId: e(
|
|
73
|
-
source:
|
|
74
|
-
type:
|
|
75
|
+
blockInstanceId: e(o["data-block-instance-id"], Z()),
|
|
76
|
+
source: a,
|
|
77
|
+
type: a,
|
|
75
78
|
itemsSelectValue: n,
|
|
76
|
-
orientation:
|
|
77
|
-
nameTrimming: t(
|
|
78
|
-
priceHideDiscount: t(
|
|
79
|
-
priceFormatted: t(
|
|
80
|
-
priceSinglePrice: t(
|
|
79
|
+
orientation: o["data-card_orientation_control_value"] || p.ORIENTATION.VERTICAL,
|
|
80
|
+
nameTrimming: t(o["data-product_name_control_trim"], !0),
|
|
81
|
+
priceHideDiscount: t(o["data-product_price_control_nodup"], !0),
|
|
82
|
+
priceFormatted: t(o["data-product_price_control_formated"], !0),
|
|
83
|
+
priceSinglePrice: t(o["data-product_price_control_single_price"], !1),
|
|
81
84
|
priceCurrencySymbol: e(
|
|
82
|
-
|
|
85
|
+
o["data-product_price_control_currency_symbol"],
|
|
83
86
|
S.productPriceCurrencySymbolControlValue
|
|
84
87
|
),
|
|
85
88
|
priceCurrencyLocation: e(
|
|
86
|
-
|
|
89
|
+
o["data-product_price_currency_location"],
|
|
87
90
|
S.productPriceCurrencyLocationControlValue
|
|
88
91
|
),
|
|
89
|
-
priceOrientation:
|
|
90
|
-
quantityControlEnabled: t(
|
|
91
|
-
buttonLink: e(
|
|
92
|
-
imageLink: e(
|
|
93
|
-
buttonLabel: e(
|
|
94
|
-
buttonFullWidth: t(
|
|
95
|
-
imageVisible: t(
|
|
96
|
-
nameVisible: t(
|
|
97
|
-
quantityVisible: t(
|
|
98
|
-
priceVisible: t(
|
|
99
|
-
originalPriceVisible: t(
|
|
100
|
-
buttonVisible: t(
|
|
92
|
+
priceOrientation: o["data-product_original_price_control_orientation"] || "horizontal",
|
|
93
|
+
quantityControlEnabled: t(o["data-product_quantity_control_enabled"], !0),
|
|
94
|
+
buttonLink: e(o["data-product_button_link"], S.productButtonLinkControlValue),
|
|
95
|
+
imageLink: e(o["data-product_image_link"], S.productImageLinkControlValue),
|
|
96
|
+
buttonLabel: e(o["data-product_button_control_label"], "Buy"),
|
|
97
|
+
buttonFullWidth: t(o["data-product_button_control_atw"], !0),
|
|
98
|
+
imageVisible: t(o["data-product_image_control_enabled"], !0),
|
|
99
|
+
nameVisible: t(o["data-product_name_control_enabled"], !0),
|
|
100
|
+
quantityVisible: t(o["data-product_quantity_control_enabled"], !0),
|
|
101
|
+
priceVisible: t(o["data-product_price_control_enabled"], !0),
|
|
102
|
+
originalPriceVisible: t(o["data-product_original_price_control_enabled"], !0),
|
|
103
|
+
buttonVisible: t(o["data-product_button_control_enabled"], !0)
|
|
101
104
|
};
|
|
102
105
|
}
|
|
103
|
-
function
|
|
106
|
+
function Q(o, t) {
|
|
104
107
|
const e = {
|
|
105
108
|
CART_ITEMS: `{{Abandoned Cart Item (${t}) Image}}`,
|
|
106
109
|
BROWSED_ITEMS: `{{Browsed Item (${t}) Image}}`,
|
|
107
110
|
PURCHASED_ITEMS: `{{Purchased Item (${t}) Image}}`
|
|
108
111
|
};
|
|
109
|
-
return e[
|
|
112
|
+
return e[o] || e.CART_ITEMS;
|
|
110
113
|
}
|
|
111
|
-
function
|
|
114
|
+
function X(o, t) {
|
|
112
115
|
const e = {
|
|
113
116
|
CART_ITEMS: `{{Abandoned Cart Item (${t}) Url}}`,
|
|
114
117
|
BROWSED_ITEMS: `{{Browsed Item (${t}) Url}}`,
|
|
115
118
|
PURCHASED_ITEMS: `{{Purchased Item (${t}) Url}}`
|
|
116
119
|
};
|
|
117
|
-
return e[
|
|
120
|
+
return e[o] || e.CART_ITEMS;
|
|
118
121
|
}
|
|
119
|
-
class
|
|
122
|
+
class tt {
|
|
120
123
|
constructor() {
|
|
121
124
|
w(this, "parser");
|
|
122
125
|
this.parser = new DOMParser();
|
|
@@ -125,41 +128,41 @@ class K {
|
|
|
125
128
|
try {
|
|
126
129
|
if (!this.containsItemsBlock(t))
|
|
127
130
|
return this.backfillV2ProductTdAttributes(t);
|
|
128
|
-
const e = this.removeJinjaConditionals(t),
|
|
131
|
+
const e = this.removeJinjaConditionals(t), u = this.parser.parseFromString(P(e), "text/html"), a = u.querySelectorAll(
|
|
129
132
|
"td.esd-cart-items-block, td.esd-browsed-items-block, td.esd-purchased-items-block"
|
|
130
133
|
);
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
+
if (F().$patch((c) => {
|
|
135
|
+
c.migrations = { ...c.migrations, [H]: a.length };
|
|
136
|
+
}), a.length === 0)
|
|
134
137
|
return console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), this.backfillV2ProductTdAttributes(e);
|
|
135
|
-
const n = new Set(Array.from(
|
|
136
|
-
return
|
|
137
|
-
const
|
|
138
|
-
orientation:
|
|
139
|
-
itemsType:
|
|
140
|
-
itemId:
|
|
141
|
-
currencySymbol:
|
|
142
|
-
currencyLocation:
|
|
143
|
-
formattedPrice:
|
|
144
|
-
configBlockAttributes:
|
|
138
|
+
const n = new Set(Array.from(a).filter(q));
|
|
139
|
+
return a.forEach((c) => {
|
|
140
|
+
const r = this.extractConfiguration(c), i = $({
|
|
141
|
+
orientation: r.orientation,
|
|
142
|
+
itemsType: r.itemsType,
|
|
143
|
+
itemId: r.itemId,
|
|
144
|
+
currencySymbol: r.currencySymbol,
|
|
145
|
+
currencyLocation: r.currencyLocation,
|
|
146
|
+
formattedPrice: r.formattedPrice,
|
|
147
|
+
configBlockAttributes: r.configBlockAttributes,
|
|
145
148
|
migrate: !0,
|
|
146
|
-
nameStyles:
|
|
147
|
-
buttonStyles:
|
|
148
|
-
priceStyles:
|
|
149
|
-
originalPriceStyles:
|
|
150
|
-
quantityStyles:
|
|
151
|
-
nodeConfig:
|
|
149
|
+
nameStyles: r.nameStyles,
|
|
150
|
+
buttonStyles: r.buttonStyles,
|
|
151
|
+
priceStyles: r.priceStyles,
|
|
152
|
+
originalPriceStyles: r.originalPriceStyles,
|
|
153
|
+
quantityStyles: r.quantityStyles,
|
|
154
|
+
nodeConfig: B(r.configBlockAttributes)
|
|
152
155
|
}), s = this.parser.parseFromString(
|
|
153
|
-
`<table><tbody><tr>${
|
|
156
|
+
`<table><tbody><tr>${i}</tr></tbody></table>`,
|
|
154
157
|
"text/html"
|
|
155
158
|
).querySelector("td");
|
|
156
|
-
if (s &&
|
|
157
|
-
const _ =
|
|
159
|
+
if (s && c.parentNode) {
|
|
160
|
+
const _ = B(r.configBlockAttributes);
|
|
158
161
|
s.setAttribute("esd-ext-config", JSON.stringify(_)), s.setAttribute("data-type", _.type);
|
|
159
162
|
const m = s.querySelector("esd-config-block");
|
|
160
|
-
m && m.remove(), n.has(
|
|
163
|
+
m && m.remove(), n.has(c) && (s.setAttribute("width", String(h(c))), s.classList.add("esd-container-frame")), c.parentNode.replaceChild(s, c);
|
|
161
164
|
}
|
|
162
|
-
}), this.backfillV2ProductTdAttributes(
|
|
165
|
+
}), this.backfillV2ProductTdAttributes(D(u.documentElement.outerHTML));
|
|
163
166
|
} catch (e) {
|
|
164
167
|
return console.error("ItemsBlockMigrator failed:", e), t;
|
|
165
168
|
}
|
|
@@ -172,24 +175,24 @@ class K {
|
|
|
172
175
|
*/
|
|
173
176
|
extractConfiguration(t) {
|
|
174
177
|
var M;
|
|
175
|
-
const e =
|
|
176
|
-
this.readSelfOrDescendantAttribute(t, "data-type") ||
|
|
177
|
-
),
|
|
178
|
-
this.applyDomFallbacks(t,
|
|
179
|
-
const
|
|
178
|
+
const e = L(
|
|
179
|
+
this.readSelfOrDescendantAttribute(t, "data-type") || K(t)
|
|
180
|
+
), u = this.readSelfOrDescendantAttribute(t, "data-number") || "1", a = parseInt(u) - 1, l = E[e], n = ((M = l == null ? void 0 : l[a]) == null ? void 0 : M.value) || l[0].value, c = this.extractConfigBlockAttributes(t, e, u);
|
|
181
|
+
this.applyDomFallbacks(t, c);
|
|
182
|
+
const r = t.querySelector('[product-attr="price"]'), i = c["data-product_price_control_currency_symbol"], d = c["data-product_price_currency_location"] || "0", s = c["data-product_price_control_formated"], _ = s !== "false" && s !== "0", A = c["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, v = (r == null ? void 0 : r.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, x = (T == null ? void 0 : T.getAttribute("style")) || void 0, C = t.querySelector('[product-attr="quantity"]'), O = (C == null ? void 0 : C.getAttribute("style")) || void 0;
|
|
180
183
|
return {
|
|
181
184
|
orientation: A,
|
|
182
185
|
itemsType: e,
|
|
183
186
|
itemId: n,
|
|
184
|
-
currencySymbol:
|
|
187
|
+
currencySymbol: i,
|
|
185
188
|
currencyLocation: d,
|
|
186
189
|
formattedPrice: _,
|
|
187
|
-
configBlockAttributes:
|
|
190
|
+
configBlockAttributes: c,
|
|
188
191
|
nameStyles: y,
|
|
189
192
|
buttonStyles: I,
|
|
190
|
-
priceStyles:
|
|
191
|
-
originalPriceStyles:
|
|
192
|
-
quantityStyles:
|
|
193
|
+
priceStyles: v,
|
|
194
|
+
originalPriceStyles: x,
|
|
195
|
+
quantityStyles: O
|
|
193
196
|
};
|
|
194
197
|
}
|
|
195
198
|
/**
|
|
@@ -201,7 +204,7 @@ class K {
|
|
|
201
204
|
*/
|
|
202
205
|
applyDomFallbacks(t, e) {
|
|
203
206
|
var A, g;
|
|
204
|
-
const
|
|
207
|
+
const u = t.querySelector("esd-config-block"), a = (...y) => !u || y.every((b) => !(u.getAttribute(b) ?? "").trim());
|
|
205
208
|
Object.entries({
|
|
206
209
|
image: '[product-attr="imageSrc"]',
|
|
207
210
|
name: '[product-attr="name"]',
|
|
@@ -211,16 +214,16 @@ class K {
|
|
|
211
214
|
button: '[product-attr="button"]'
|
|
212
215
|
}).forEach(([y, b]) => {
|
|
213
216
|
const I = `data-product_${y}_control_enabled`;
|
|
214
|
-
|
|
215
|
-
}),
|
|
216
|
-
const n = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'),
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
const
|
|
221
|
-
s &&
|
|
217
|
+
a(I) && (e[I] = t.querySelector(b) ? "true" : "false");
|
|
218
|
+
}), a("data-card_orientation_control_value") && (e["data-card_orientation_control_value"] = t.querySelector('[colspan="2"]') ? "vertical" : "horizontal");
|
|
219
|
+
const n = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), c = (A = n == null ? void 0 : n.textContent) == null ? void 0 : A.replace(/\s+/g, " ").trim();
|
|
220
|
+
c && a("data-product_button_control_label") && (e["data-product_button_control_label"] = c);
|
|
221
|
+
const r = (n == null ? void 0 : n.getAttribute("style")) || "";
|
|
222
|
+
a("data-product_button_control_atw") && /display:\s*inline/.test(r) && !/(?:^|;)\s*width\s*:\s*100%/.test(r) && (e["data-product_button_control_atw"] = "false");
|
|
223
|
+
const i = t.querySelector('[product-attr="imageSrc"]'), d = i ? this.readImageSize(i) : 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);
|
|
224
|
+
s && a("data-product_image_control_image-height") && (e["data-product_image_control_image-height"] = s), _ && a("data-product_image_control_image-width") && (e["data-product_image_control_image-width"] = _), this.applyPriceDomFallbacks(t, e, a);
|
|
222
225
|
const m = ((g = t.querySelector('[product-attr="name"]')) == null ? void 0 : g.getAttribute("style")) || "";
|
|
223
|
-
|
|
226
|
+
a("data-product_name_control_trim") && /white-space:\s*normal/.test(m) && (e["data-product_name_control_trim"] = "0");
|
|
224
227
|
}
|
|
225
228
|
/**
|
|
226
229
|
* Carries the price cell's own currency/format attributes into the config attributes when
|
|
@@ -229,22 +232,22 @@ class K {
|
|
|
229
232
|
* ₺ but reporting USD/before to the settings panel, and the first unrelated price edit wrote
|
|
230
233
|
* the default back over the real value.
|
|
231
234
|
*/
|
|
232
|
-
applyPriceDomFallbacks(t, e,
|
|
233
|
-
var
|
|
234
|
-
const
|
|
235
|
-
if (!
|
|
235
|
+
applyPriceDomFallbacks(t, e, u) {
|
|
236
|
+
var i;
|
|
237
|
+
const a = t.querySelector('[product-attr="price"]') ?? t.querySelector('[product-attr="originalPrice"]');
|
|
238
|
+
if (!a)
|
|
236
239
|
return;
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
const n =
|
|
240
|
-
if (n &&
|
|
240
|
+
const l = (i = a.getAttribute("data-currency_symbol")) == null ? void 0 : i.trim();
|
|
241
|
+
l && u("data-product_price_control_currency_symbol") && (e["data-product_price_control_currency_symbol"] = l);
|
|
242
|
+
const n = a.getAttribute("data-curency");
|
|
243
|
+
if (n && u("data-product_price_currency_location", "data-product_price_control_curency")) {
|
|
241
244
|
const d = n === "after" ? "1" : "0";
|
|
242
245
|
e["data-product_price_currency_location"] = d, e["data-product_price_control_curency"] = d;
|
|
243
246
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
|
|
247
|
+
const c = a.getAttribute("data-formated");
|
|
248
|
+
c && u("data-product_price_control_formated") && (e["data-product_price_control_formated"] = c);
|
|
249
|
+
const r = a.getAttribute("data-single_price");
|
|
250
|
+
r && u("data-product_price_control_single_price") && (e["data-product_price_control_single_price"] = r);
|
|
248
251
|
}
|
|
249
252
|
/**
|
|
250
253
|
* Reads an attribute from the block element itself before falling back to a descendant.
|
|
@@ -252,8 +255,8 @@ class K {
|
|
|
252
255
|
* esd-config-block; when an author deletes the config block only the td's copy survives.
|
|
253
256
|
*/
|
|
254
257
|
readSelfOrDescendantAttribute(t, e) {
|
|
255
|
-
var
|
|
256
|
-
return t.getAttribute(e) || ((
|
|
258
|
+
var u;
|
|
259
|
+
return t.getAttribute(e) || ((u = t.querySelector(`[${e}]`)) == null ? void 0 : u.getAttribute(e)) || null;
|
|
257
260
|
}
|
|
258
261
|
/**
|
|
259
262
|
* Reads the product image's pixel size — `width`/`height` attributes first, then px values
|
|
@@ -273,15 +276,15 @@ class K {
|
|
|
273
276
|
* to nothing, so only a positive integer counts as an answer.
|
|
274
277
|
*/
|
|
275
278
|
readImageDimension(t, e) {
|
|
276
|
-
var
|
|
277
|
-
const
|
|
279
|
+
var i;
|
|
280
|
+
const u = (d) => {
|
|
278
281
|
const s = (d ?? "").trim().match(/^(\d+(?:\.\d+)?)(?:px)?$/i), _ = s ? Math.floor(parseFloat(s[1])) : 0;
|
|
279
282
|
return _ > 0 ? String(_) : null;
|
|
280
|
-
},
|
|
281
|
-
if (
|
|
282
|
-
return
|
|
283
|
-
const
|
|
284
|
-
return
|
|
283
|
+
}, a = u((i = t.getAttribute(e)) == null ? void 0 : i.trim());
|
|
284
|
+
if (a)
|
|
285
|
+
return a;
|
|
286
|
+
const l = t.getAttribute("style") || "", n = new RegExp(`(?:^|;)\\s*${e}:\\s*(\\d+(?:\\.\\d+)?)px`), c = new RegExp(`max-${e}:\\s*(\\d+(?:\\.\\d+)?)px`), r = l.match(n) || l.match(c);
|
|
287
|
+
return u(r == null ? void 0 : r[1]);
|
|
285
288
|
}
|
|
286
289
|
/**
|
|
287
290
|
* Extracts all data-* attributes from the esd-config-block element
|
|
@@ -290,27 +293,27 @@ class K {
|
|
|
290
293
|
* @param itemsType - The type of items (CART_ITEMS, BROWSED_ITEMS, PURCHASED_ITEMS)
|
|
291
294
|
* @param itemNumber - The item number (1-based index)
|
|
292
295
|
*/
|
|
293
|
-
extractConfigBlockAttributes(t, e,
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
296
|
-
if (Array.from(
|
|
297
|
-
|
|
298
|
-
}),
|
|
299
|
-
const
|
|
300
|
-
if (/^\d+$/.test(
|
|
301
|
-
const
|
|
302
|
-
|
|
296
|
+
extractConfigBlockAttributes(t, e, u) {
|
|
297
|
+
const a = t.querySelector("esd-config-block"), l = {};
|
|
298
|
+
if (a) {
|
|
299
|
+
if (Array.from(a.attributes).forEach((c) => {
|
|
300
|
+
c.name.startsWith("data-") && (l[c.name] = c.value);
|
|
301
|
+
}), l["data-cart_items_select_control_value"]) {
|
|
302
|
+
const c = l["data-cart_items_select_control_value"];
|
|
303
|
+
if (/^\d+$/.test(c)) {
|
|
304
|
+
const r = parseInt(c) - 1, i = E[e];
|
|
305
|
+
i && i[r] && (l["data-cart_items_select_control_value"] = i[r].value);
|
|
303
306
|
}
|
|
304
307
|
}
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
let
|
|
308
|
-
|
|
308
|
+
if (l["data-product_price_control_curency"]) {
|
|
309
|
+
const c = l["data-product_price_control_curency"];
|
|
310
|
+
let r = c;
|
|
311
|
+
c === "before" ? r = "0" : c === "after" && (r = "1"), l["data-product_price_control_curency"] = r, l["data-product_price_currency_location"] = r;
|
|
309
312
|
}
|
|
310
|
-
(!
|
|
313
|
+
(!l["data-product_price_control_currency_symbol"] || l["data-product_price_control_currency_symbol"].trim() === "") && (l["data-product_price_control_currency_symbol"] = "USD");
|
|
311
314
|
}
|
|
312
|
-
const n = { ...this.getDefaultConfigBlockAttributes(), ...
|
|
313
|
-
return n["data-type"] = e, n["data-source"] = e, n["data-product_image_link"] =
|
|
315
|
+
const n = { ...this.getDefaultConfigBlockAttributes(), ...l };
|
|
316
|
+
return n["data-type"] = e, n["data-source"] = e, n["data-product_image_link"] = Q(e, u), n["data-product_button_link"] = X(e, u), n;
|
|
314
317
|
}
|
|
315
318
|
/**
|
|
316
319
|
* Returns default esd-config-block attributes based on the old template structure
|
|
@@ -385,31 +388,31 @@ class K {
|
|
|
385
388
|
backfillV2ProductTdAttributes(t) {
|
|
386
389
|
if (!t.includes("ins-product-td") || !t.includes("esd-ext-config"))
|
|
387
390
|
return t;
|
|
388
|
-
const e = this.parser.parseFromString(
|
|
389
|
-
let
|
|
390
|
-
const
|
|
391
|
-
return
|
|
392
|
-
const
|
|
393
|
-
!
|
|
394
|
-
!
|
|
391
|
+
const e = this.parser.parseFromString(P(t), "text/html");
|
|
392
|
+
let u = !1;
|
|
393
|
+
const a = Array.from(e.querySelectorAll(".ins-product-td")), l = new Set(a.filter(q));
|
|
394
|
+
return a.forEach((n) => {
|
|
395
|
+
const c = l.has(n);
|
|
396
|
+
!c && n.hasAttribute("width") && (n.removeAttribute("width"), u = !0), !c && n.classList.contains("esd-container-frame") && (n.classList.remove("esd-container-frame"), u = !0), n.querySelectorAll("table.ins-product-wrapper").forEach((_) => {
|
|
397
|
+
!c && _.hasAttribute("width") && _.getAttribute("width") !== "100%" && (_.setAttribute("width", "100%"), u = !0);
|
|
395
398
|
const m = _.getAttribute("style");
|
|
396
|
-
m &&
|
|
399
|
+
m && U(m) && (_.setAttribute("style", W(m)), _.setAttribute("width", "100%"), u = !0);
|
|
397
400
|
});
|
|
398
|
-
const
|
|
399
|
-
let
|
|
401
|
+
const r = n.getAttribute("esd-ext-config");
|
|
402
|
+
let i = null;
|
|
400
403
|
try {
|
|
401
|
-
|
|
404
|
+
i = r ? JSON.parse(r) : null;
|
|
402
405
|
} catch {
|
|
403
406
|
}
|
|
404
|
-
if (!
|
|
407
|
+
if (!i || (!n.getAttribute("data-nodup") && typeof i.priceHideDiscount == "boolean" && (n.setAttribute("data-nodup", String(i.priceHideDiscount)), u = !0), n.getAttribute("data-type")))
|
|
405
408
|
return;
|
|
406
|
-
const d =
|
|
409
|
+
const d = i.type || i.source;
|
|
407
410
|
if (!d)
|
|
408
411
|
return;
|
|
409
|
-
n.setAttribute("data-type", d),
|
|
410
|
-
const s = typeof
|
|
412
|
+
n.setAttribute("data-type", d), u = !0;
|
|
413
|
+
const s = typeof i.itemsSelectValue == "string" ? i.itemsSelectValue.match(/\((\d+)\)/) : null;
|
|
411
414
|
s && n.getAttribute("data-number") !== s[1] && n.setAttribute("data-number", s[1]);
|
|
412
|
-
}),
|
|
415
|
+
}), u ? D(e.documentElement.outerHTML) : t;
|
|
413
416
|
}
|
|
414
417
|
/**
|
|
415
418
|
* Fast check for the presence of any items block (cart / browsed / purchased)
|
|
@@ -420,32 +423,28 @@ class K {
|
|
|
420
423
|
return t.includes("esd-cart-items-block") || t.includes("esd-browsed-items-block") || t.includes("esd-purchased-items-block");
|
|
421
424
|
}
|
|
422
425
|
/**
|
|
423
|
-
* Removes
|
|
424
|
-
*
|
|
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.
|
|
426
|
+
* Removes each Items guard opener together with the endif that closes it, and no other tag.
|
|
427
|
+
* Liquid inside esd-custom-display-condition(s) attribute values is skipped.
|
|
431
428
|
*/
|
|
432
429
|
removeJinjaConditionals(t) {
|
|
433
|
-
const e =
|
|
434
|
-
let
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
""
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
430
|
+
const e = [...t.matchAll(G)].map((l) => ({ start: l.index, end: l.index + l[0].length })), u = [];
|
|
431
|
+
let a = t.replace(Y, (l, n, c) => {
|
|
432
|
+
if (e.some(({ start: r, end: i }) => c >= r && c < i))
|
|
433
|
+
return l;
|
|
434
|
+
if (n === "if") {
|
|
435
|
+
const r = z.some((i) => i.test(l));
|
|
436
|
+
return u.push(r), r ? "" : l;
|
|
437
|
+
}
|
|
438
|
+
return n === "endif" && u.pop() ? "" : l;
|
|
439
|
+
});
|
|
440
|
+
return a = a.replace(/\n\s*\n\s*\n/g, `
|
|
442
441
|
|
|
443
|
-
`),
|
|
442
|
+
`), a;
|
|
444
443
|
}
|
|
445
444
|
}
|
|
446
|
-
function
|
|
447
|
-
return new
|
|
445
|
+
function lt(o) {
|
|
446
|
+
return new tt().migrate(o);
|
|
448
447
|
}
|
|
449
448
|
export {
|
|
450
|
-
|
|
449
|
+
lt as migrateItemsBlock
|
|
451
450
|
};
|
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
|
|
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}
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const o = "3.
|
|
1
|
+
const o = "3.29.0-beta.eed1ad8", e = { stripo: { version: "2.86.1" } }, s = {
|
|
2
2
|
version: o,
|
|
3
|
-
guido:
|
|
3
|
+
guido: e
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
s as default,
|
|
7
|
+
e as guido,
|
|
8
8
|
o as version
|
|
9
9
|
};
|
|
@@ -50,17 +50,17 @@ const Y = () => {
|
|
|
50
50
|
const n = L(), s = N(), o = z(), { getCompiledEmail: r, getTemplateData: e } = x(), { writeTrackingIds: i } = F(), { compileHtml: t, compileAmpHtml: c } = I(), { isFeatureEnabled: a } = D();
|
|
51
51
|
return {
|
|
52
52
|
prepareTemplateDetails: async (h) => {
|
|
53
|
-
let { html: m, css:
|
|
53
|
+
let { html: m, css: u, syncModulesIds: f = [] } = h ?? await e();
|
|
54
54
|
if (a("linkTrackingIds")) {
|
|
55
55
|
const { changed: P, nextSeq: E } = i(s.trackIdSessionFloor);
|
|
56
|
-
s.trackIdSessionFloor = E, P && ({ html: m, css:
|
|
56
|
+
s.trackIdSessionFloor = E, P && ({ html: m, css: u, syncModulesIds: f = [] } = await e());
|
|
57
57
|
}
|
|
58
58
|
const { html: T, ampHtml: d = "", ampErrors: w = [] } = await r({
|
|
59
59
|
minimize: !0,
|
|
60
60
|
resetDataSavedFlag: !1
|
|
61
|
-
});
|
|
62
|
-
o.selectedUnsubscribePages.length && await o.fetchTemplates(), await S(m);
|
|
63
|
-
const { compiledHtml: A, stats: l, appliedRules: y } = t(T), C = d && c(d).compiledHtml, k = n.getSelectedDynamicContentList, H = b()
|
|
61
|
+
}), p = M(m);
|
|
62
|
+
(p.length || o.selectedUnsubscribePages.length) && await o.fetchTemplates(), await S(m);
|
|
63
|
+
const { compiledHtml: A, stats: l, appliedRules: y } = t(T), C = d && c(d).compiledHtml, k = n.getSelectedDynamicContentList, H = b();
|
|
64
64
|
return console.debug("HTML Compilation Stats:", {
|
|
65
65
|
originalSize: l.originalSize,
|
|
66
66
|
compiledSize: l.compiledSize,
|
|
@@ -71,17 +71,17 @@ const Y = () => {
|
|
|
71
71
|
dynamicContentList: k,
|
|
72
72
|
compiledHtml: A,
|
|
73
73
|
rawHtml: m,
|
|
74
|
-
css:
|
|
74
|
+
css: u,
|
|
75
75
|
ampHtml: C,
|
|
76
76
|
ampErrors: w,
|
|
77
|
-
modules:
|
|
77
|
+
modules: f.map(Number),
|
|
78
78
|
recommendation: {
|
|
79
79
|
campaignUrls: H.recommendationCampaignUrls,
|
|
80
80
|
configs: {}
|
|
81
81
|
},
|
|
82
82
|
unsubscribe: {
|
|
83
|
-
status:
|
|
84
|
-
config:
|
|
83
|
+
status: p.length > 0,
|
|
84
|
+
config: p
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0-beta.eed1ad8",
|
|
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,8 +60,8 @@
|
|
|
60
60
|
"license": "ISC",
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@stripoinc/ui-editor-extensions": "3.11.0",
|
|
63
|
-
"@useinsider/design-system-organisms": "0.0
|
|
64
|
-
"@useinsider/design-system-vue": "2.
|
|
63
|
+
"@useinsider/design-system-organisms": "0.4.0",
|
|
64
|
+
"@useinsider/design-system-vue": "2.7.0",
|
|
65
65
|
"@vueuse/core": "11.3.0",
|
|
66
66
|
"lodash-es": "4.17.21",
|
|
67
67
|
"pinia": "2.3.1",
|