@useinsider/guido 3.17.0-beta.a6988b3 → 3.17.0-beta.ab974c6
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/extensions/Blocks/Items/block.js +105 -49
- package/dist/extensions/Blocks/Items/constants/currency.js +17 -0
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +25 -24
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -11
- package/dist/extensions/Blocks/Items/template.js +153 -152
- package/dist/package.json.js +1 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +29 -0
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +26 -0
- package/dist/utils/pairProductVariables.js +58 -58
- package/package.json +2 -2
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var D = Object.defineProperty;
|
|
2
|
+
var S = (m, u, e) => u in m ? D(m, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[u] = e;
|
|
3
|
+
var I = (m, u, e) => S(m, typeof u != "symbol" ? u + "" : u, e);
|
|
4
|
+
import { BlockId as _ } from "../../../enums/block.js";
|
|
5
|
+
import { useOnboardingStore as N } from "../../../stores/onboarding.js";
|
|
6
|
+
import { getMigrationBannerHtml as T } from "../../../utils/migrationBannerHtml.js";
|
|
7
|
+
import { Block as A, BlockCompositionType as M, ModificationDescription as f } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
8
|
+
import { isCustomCurrencySymbol as R, ITEMS_CURRENCY_ATTR as y, currencyPositionFromLocation as H } from "./constants/currency.js";
|
|
9
|
+
import { ItemsBlockId as O } from "./enums/controlEnums.js";
|
|
10
|
+
import { SETTINGS_ENUMS as h, DefaultConfigValues as C } from "./enums/settingsEnums.js";
|
|
11
|
+
import { getDefaultTemplate as E } from "./template.js";
|
|
12
|
+
import { getItemsBlockContainer as b, getItemsBlockConfig as g, deriveItemNumber as B, getDefaultItemsBlockConfig as P } from "./utils/nodeConfigUtils.js";
|
|
13
|
+
const k = _.Items, w = "Reconcile Items currency DOM attributes";
|
|
14
|
+
class K extends A {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/** Block instances whose currency attrs were already self-healed this session (SD-147588 — undo-safe). */
|
|
18
|
+
I(this, "_currencyHealed", /* @__PURE__ */ new Set());
|
|
19
|
+
}
|
|
10
20
|
getId() {
|
|
11
|
-
return
|
|
21
|
+
return k;
|
|
12
22
|
}
|
|
13
23
|
getIcon() {
|
|
14
24
|
return "items-icon";
|
|
15
25
|
}
|
|
16
26
|
getBlockCompositionType() {
|
|
17
|
-
return
|
|
27
|
+
return M.CONTAINER;
|
|
18
28
|
}
|
|
19
29
|
getName() {
|
|
20
30
|
return this.api.translate("Items");
|
|
@@ -23,20 +33,20 @@ class E extends C {
|
|
|
23
33
|
return this.api.translate("Items lets you display personalized products based on user behavior.");
|
|
24
34
|
}
|
|
25
35
|
getSettingsPanelTitleHtml() {
|
|
26
|
-
return
|
|
27
|
-
|
|
36
|
+
return T(
|
|
37
|
+
k,
|
|
28
38
|
this.api.translate("Items"),
|
|
29
39
|
this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
|
|
30
40
|
);
|
|
31
41
|
}
|
|
32
42
|
getTemplate() {
|
|
33
|
-
return
|
|
34
|
-
orientation:
|
|
35
|
-
itemsType:
|
|
43
|
+
return E({
|
|
44
|
+
orientation: h.ORIENTATION.VERTICAL,
|
|
45
|
+
itemsType: h.ITEMS_TYPE.CART_ITEMS,
|
|
36
46
|
itemId: "{{Abandoned Cart Item (1) Url}}",
|
|
37
|
-
currencySymbol:
|
|
38
|
-
currencyLocation:
|
|
39
|
-
formattedPrice:
|
|
47
|
+
currencySymbol: C.productPriceCurrencySymbolControlValue,
|
|
48
|
+
currencyLocation: C.productPriceCurrencyLocationControlValue,
|
|
49
|
+
formattedPrice: C.productPriceFormattedControlValue === "1"
|
|
40
50
|
});
|
|
41
51
|
}
|
|
42
52
|
allowInnerBlocksDND() {
|
|
@@ -45,24 +55,27 @@ class E extends C {
|
|
|
45
55
|
canBeSavedAsModule() {
|
|
46
56
|
return !0;
|
|
47
57
|
}
|
|
48
|
-
onCreated(
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
58
|
+
onCreated(e) {
|
|
59
|
+
const r = this.api.getDocumentModifier(), s = this.api.getDocumentRootCssNode();
|
|
60
|
+
s.querySelector('[product-attr="imageSrc"] img') || r.modifyCss(s).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
|
|
61
|
+
const o = b(e);
|
|
62
|
+
if (!o)
|
|
53
63
|
return;
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
s.modifyHtml(e).setNodeConfig(i), this._stampProductTdDomAttributes(e, i, s), s.apply(new c("Migrate legacy config to nodeConfig"));
|
|
64
|
+
const i = o.getNodeConfig(), n = i && Object.keys(i).length > 0, t = g(e);
|
|
65
|
+
if (t != null && t.initialized) {
|
|
66
|
+
if (!n) {
|
|
67
|
+
const c = this.api.getDocumentModifier();
|
|
68
|
+
c.modifyHtml(o).setNodeConfig(t), this._stampProductTdDomAttributes(o, t, c), this._shouldReconcileCurrency(t) && this._reconcileCurrencyDomAttributes(o, t, c), c.apply(new f("Migrate legacy config to nodeConfig")), this._markCurrencyHealed(t.blockInstanceId);
|
|
69
|
+
return;
|
|
61
70
|
}
|
|
62
|
-
else {
|
|
63
|
-
const
|
|
64
|
-
|
|
71
|
+
} else {
|
|
72
|
+
const c = P(), p = this.api.getDocumentModifier();
|
|
73
|
+
p.modifyHtml(o).setNodeConfig(c), this._stampProductTdDomAttributes(o, c, p, !0), p.apply(new f("Initialize Items block with default configuration")), N().startOnboarding("itemsOnboarding");
|
|
74
|
+
return;
|
|
65
75
|
}
|
|
76
|
+
const a = t.blockInstanceId || String(Date.now()), d = this.api.getDocumentModifier();
|
|
77
|
+
let l = !1;
|
|
78
|
+
t.blockInstanceId || (d.modifyHtml(o).setNodeConfig({ ...t, blockInstanceId: a }), l = !0), this._shouldReconcileCurrency(t) && this._reconcileCurrencyDomAttributes(o, t, d) && (l = !0), l && d.apply(new f("Assign Items block instance ID and reconcile currency")), this._markCurrencyHealed(a);
|
|
66
79
|
}
|
|
67
80
|
/**
|
|
68
81
|
* Re-seeds nodeConfig from the persisted esd-ext-config when a saved module
|
|
@@ -70,18 +83,24 @@ class E extends C {
|
|
|
70
83
|
* into nodeConfig, so without this a reused module would reset to defaults.
|
|
71
84
|
* Guarded to the nodeConfig-empty case so it runs once and never loops.
|
|
72
85
|
*/
|
|
73
|
-
onDocumentChanged(
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
86
|
+
onDocumentChanged(e) {
|
|
87
|
+
const r = b(e);
|
|
88
|
+
if (!r)
|
|
76
89
|
return;
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
90
|
+
const s = r.getNodeConfig();
|
|
91
|
+
if (s && Object.keys(s).length > 0) {
|
|
92
|
+
const t = g(e);
|
|
93
|
+
if (t != null && t.initialized && this._shouldReconcileCurrency(t)) {
|
|
94
|
+
const a = this.api.getDocumentModifier();
|
|
95
|
+
this._reconcileCurrencyDomAttributes(r, t, a) && a.apply(new f(w)), this._markCurrencyHealed(t.blockInstanceId);
|
|
96
|
+
}
|
|
79
97
|
return;
|
|
80
|
-
|
|
81
|
-
|
|
98
|
+
}
|
|
99
|
+
const i = g(e);
|
|
100
|
+
if (!(i != null && i.initialized))
|
|
82
101
|
return;
|
|
83
|
-
const
|
|
84
|
-
|
|
102
|
+
const n = this.api.getDocumentModifier();
|
|
103
|
+
n.modifyHtml(r).setNodeConfig(i), this._stampProductTdDomAttributes(r, i, n), this._shouldReconcileCurrency(i) && this._reconcileCurrencyDomAttributes(r, i, n), n.apply(new f("Recover Items block config from saved module")), this._markCurrencyHealed(i.blockInstanceId);
|
|
85
104
|
}
|
|
86
105
|
/**
|
|
87
106
|
* Bakes the compiler-read DOM attributes (`data-type`, `data-number`, `data-nodup`) onto the
|
|
@@ -91,14 +110,51 @@ class E extends C {
|
|
|
91
110
|
* restored before export. The name `<a>` carries no data-type/data-number of its own and
|
|
92
111
|
* relies on this td-level fallback in pairProductVariables.
|
|
93
112
|
*/
|
|
94
|
-
_stampProductTdDomAttributes(
|
|
95
|
-
const
|
|
96
|
-
|
|
113
|
+
_stampProductTdDomAttributes(e, r, s, o = !1) {
|
|
114
|
+
const i = B(r.itemsSelectValue, r.type), n = (t, a) => {
|
|
115
|
+
o && e.getAttribute(t) || s.modifyHtml(e).setAttribute(t, a);
|
|
97
116
|
};
|
|
98
|
-
|
|
117
|
+
n("data-type", r.type), n("data-number", i), n("data-nodup", String(r.priceHideDiscount));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Whether a currency self-heal pass should run for this block (SD-147588). The only gate here is
|
|
121
|
+
* once-per-session: heal each instance at most once, so the auto-fix can't fight undo (undo
|
|
122
|
+
* re-drifts the attr, which would otherwise re-trigger the heal forever). The position-vs-symbol
|
|
123
|
+
* authority split lives in `_reconcileCurrencyDomAttributes` — position is always authoritative,
|
|
124
|
+
* the symbol write alone is skipped for the 'USD' sentinel — so we must NOT gate the whole pass
|
|
125
|
+
* on symbol customization here, or a default-symbol block with a toggled location never heals.
|
|
126
|
+
*/
|
|
127
|
+
_shouldReconcileCurrency(e) {
|
|
128
|
+
return !e.blockInstanceId || !this._currencyHealed.has(e.blockInstanceId);
|
|
129
|
+
}
|
|
130
|
+
/** Marks a block instance's currency as reconciled so it is not healed again (undo-safe). */
|
|
131
|
+
_markCurrencyHealed(e) {
|
|
132
|
+
e && this._currencyHealed.add(e);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
|
|
136
|
+
* attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
|
|
137
|
+
* Config is the source of truth — never derive from visible text.
|
|
138
|
+
*
|
|
139
|
+
* Position and symbol differ in authority (SD-147588):
|
|
140
|
+
* - `data-curency` (position) comes from `priceCurrencyLocation`, captured independently of the
|
|
141
|
+
* symbol, so it is ALWAYS authoritative and healed whenever it drifts — even with a default
|
|
142
|
+
* symbol (otherwise the default-symbol + toggled-location case stays broken on export).
|
|
143
|
+
* - `data-currency_symbol` is stamped only for a customized symbol; the 'USD' sentinel may be a
|
|
144
|
+
* migrator default, so we trust the DOM's real value over it and never overwrite.
|
|
145
|
+
*
|
|
146
|
+
* Returns true only when an attr actually changed, so the caller can skip an empty apply that
|
|
147
|
+
* would otherwise re-trigger onDocumentChanged and loop.
|
|
148
|
+
*/
|
|
149
|
+
_reconcileCurrencyDomAttributes(e, r, s) {
|
|
150
|
+
const o = r.priceCurrencyLocation, i = o != null && String(o).trim() !== "", n = H(o), t = (r.priceCurrencySymbol ?? "").trim(), a = R(t), d = e.querySelectorAll(`.${O.PRICE} p`);
|
|
151
|
+
let l = !1;
|
|
152
|
+
return d.forEach((c) => {
|
|
153
|
+
i && c.getAttribute(y.POSITION) !== n && (s.modifyHtml(c).setAttribute(y.POSITION, n), l = !0), a && c.getAttribute(y.SYMBOL) !== t && (s.modifyHtml(c).setAttribute(y.SYMBOL, t), l = !0);
|
|
154
|
+
}), l;
|
|
99
155
|
}
|
|
100
156
|
}
|
|
101
157
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
158
|
+
k as BLOCK_ID,
|
|
159
|
+
K as ItemsBlock
|
|
104
160
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefaultConfigValues as t } from "../enums/settingsEnums.js";
|
|
2
|
+
const e = {
|
|
3
|
+
POSITION: "data-curency",
|
|
4
|
+
SYMBOL: "data-currency_symbol"
|
|
5
|
+
};
|
|
6
|
+
function c(r) {
|
|
7
|
+
return r === "1" ? "after" : "before";
|
|
8
|
+
}
|
|
9
|
+
function u(r) {
|
|
10
|
+
const o = (r ?? "").trim();
|
|
11
|
+
return o !== "" && o !== t.productPriceCurrencySymbolControlValue;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
e as ITEMS_CURRENCY_ATTR,
|
|
15
|
+
c as currencyPositionFromLocation,
|
|
16
|
+
u as isCustomCurrencySymbol
|
|
17
|
+
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { currencyLocationMaps as
|
|
2
|
-
import { UEAttr as
|
|
3
|
-
import { CommonControl as
|
|
1
|
+
import { currencyLocationMaps as p } from "../../../../../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { UEAttr as N, ModificationDescription as I } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
import { CommonControl as L } from "../../../common-control.js";
|
|
4
|
+
import { ITEMS_CURRENCY_ATTR as T, currencyPositionFromLocation as E } from "../../constants/currency.js";
|
|
4
5
|
import { ItemsBlockControlId as m } from "../../enums/controlEnums.js";
|
|
5
|
-
import { getItemsBlockConfig as
|
|
6
|
-
const
|
|
6
|
+
import { getItemsBlockConfig as l, setItemsBlockConfig as O, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
|
|
7
|
+
const b = m.PRICE_CURRENCY_LOCATION, c = {
|
|
7
8
|
CURRENCY_LOCATION: "currencyLocation"
|
|
8
9
|
};
|
|
9
|
-
class
|
|
10
|
+
class Y extends L {
|
|
10
11
|
getId() {
|
|
11
|
-
return
|
|
12
|
+
return b;
|
|
12
13
|
}
|
|
13
14
|
getTemplate() {
|
|
14
15
|
return `
|
|
@@ -18,32 +19,32 @@ class A extends N {
|
|
|
18
19
|
`;
|
|
19
20
|
}
|
|
20
21
|
onRender() {
|
|
21
|
-
const e =
|
|
22
|
-
this.api.setUIEAttribute(c.CURRENCY_LOCATION,
|
|
22
|
+
const e = l(this.currentNode);
|
|
23
|
+
this.api.setUIEAttribute(c.CURRENCY_LOCATION, N.SELECTPICKER.items, p), this.api.updateValues({ [c.CURRENCY_LOCATION]: (e == null ? void 0 : e.priceCurrencyLocation) ?? "0" }), this.api.onValueChanged(c.CURRENCY_LOCATION, (t) => {
|
|
23
24
|
this._onCurrencyLocationChange(t);
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
onTemplateNodeUpdated(e) {
|
|
27
28
|
super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(() => {
|
|
28
|
-
const t =
|
|
29
|
+
const t = l(this.currentNode);
|
|
29
30
|
this.api.updateValues({ [c.CURRENCY_LOCATION]: (t == null ? void 0 : t.priceCurrencyLocation) ?? "0" });
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
_onCurrencyLocationChange(e) {
|
|
33
|
-
if (console.debug("Currency location changed to: ", e),
|
|
34
|
+
if (console.debug("Currency location changed to: ", e), O(this.currentNode, this.api, { priceCurrencyLocation: e }), !this.currentNode)
|
|
34
35
|
return;
|
|
35
36
|
const t = this._getPriceBlocks();
|
|
36
37
|
if (!t || t.length === 0)
|
|
37
38
|
return;
|
|
38
|
-
const r =
|
|
39
|
-
t.forEach((
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
39
|
+
const r = l(this.currentNode), n = e || "0", o = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", i = E(n), s = this.api.getDocumentModifier();
|
|
40
|
+
t.forEach((h) => {
|
|
41
|
+
const a = this._getParagraph(h);
|
|
42
|
+
if (!a)
|
|
42
43
|
return;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
`Updated currency location to ${
|
|
44
|
+
const d = a.getInnerHTML().trim() || "", C = a.getInnerText().trim() || "", u = (o == null ? void 0 : o.trim()) || "", _ = this._removeCurrencySymbol(C, u), g = this._detectSymbolInText(C) || u, R = this._buildPriceContent(_, g, n), y = d.replace(C, f(R));
|
|
45
|
+
s.modifyHtml(a).setInnerHtml(y).setAttribute(T.POSITION, i);
|
|
46
|
+
}), s.apply(new I(
|
|
47
|
+
`Updated currency location to ${i}`
|
|
47
48
|
));
|
|
48
49
|
}
|
|
49
50
|
_getPriceBlocks() {
|
|
@@ -65,8 +66,8 @@ class A extends N {
|
|
|
65
66
|
} else {
|
|
66
67
|
const o = r.match(/([^0-9.,\s]+)/);
|
|
67
68
|
if (o && o[1]) {
|
|
68
|
-
const i = o[1].trim(),
|
|
69
|
-
n = r.replace(
|
|
69
|
+
const i = o[1].trim(), s = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
|
|
70
|
+
n = r.replace(s, "").trim();
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
return n;
|
|
@@ -85,13 +86,13 @@ class A extends N {
|
|
|
85
86
|
this._GuSelect({
|
|
86
87
|
name: c.CURRENCY_LOCATION,
|
|
87
88
|
placeholder: "",
|
|
88
|
-
options:
|
|
89
|
+
options: p
|
|
89
90
|
})
|
|
90
91
|
])}
|
|
91
92
|
`;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
b as CONTROL_BLOCK_ID,
|
|
97
|
+
Y as PriceCurrencyLocationControl
|
|
97
98
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
2
|
var N = (s, c, e) => c in s ? R(s, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[c] = e;
|
|
3
3
|
var h = (s, c, e) => N(s, typeof c != "symbol" ? c + "" : c, e);
|
|
4
|
-
import { ModificationDescription as
|
|
5
|
-
import { CommonControl as
|
|
4
|
+
import { ModificationDescription as E } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as B } from "../../../common-control.js";
|
|
6
|
+
import { ITEMS_CURRENCY_ATTR as T } from "../../constants/currency.js";
|
|
6
7
|
import { ItemsBlockControlId as y } from "../../enums/controlEnums.js";
|
|
7
|
-
import { getItemsBlockConfig as p, setItemsBlockConfig as
|
|
8
|
-
const
|
|
8
|
+
import { getItemsBlockConfig as p, setItemsBlockConfig as Y, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
|
|
9
|
+
const x = y.PRICE_CURRENCY_SYMBOL, u = {
|
|
9
10
|
CURRENCY_SYMBOL: "currencySymbol"
|
|
10
11
|
};
|
|
11
|
-
class
|
|
12
|
+
class $ extends B {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
h(this, "originalPriceContents", /* @__PURE__ */ new Map());
|
|
15
16
|
}
|
|
16
17
|
getId() {
|
|
17
|
-
return
|
|
18
|
+
return x;
|
|
18
19
|
}
|
|
19
20
|
getTemplate() {
|
|
20
21
|
return `
|
|
@@ -42,7 +43,7 @@ class P extends E {
|
|
|
42
43
|
var a;
|
|
43
44
|
console.debug("Currency symbol changed to: ", e);
|
|
44
45
|
const t = p(this.currentNode), o = ((a = t == null ? void 0 : t.priceCurrencySymbol) == null ? void 0 : a.trim()) || "";
|
|
45
|
-
if (
|
|
46
|
+
if (Y(this.currentNode, this.api, { priceCurrencySymbol: e }), !this.currentNode)
|
|
46
47
|
return;
|
|
47
48
|
const r = this._getPriceBlocks();
|
|
48
49
|
if (!r || r.length === 0)
|
|
@@ -53,8 +54,8 @@ class P extends E {
|
|
|
53
54
|
if (!m)
|
|
54
55
|
return;
|
|
55
56
|
const g = m.getInnerHTML().trim() || "", C = m.getInnerText().trim() || "", _ = this._removeCurrencySymbol(C, o), S = this._buildPriceContent(_, n, l), b = g.replace(C, f(S));
|
|
56
|
-
i.modifyHtml(m).setInnerHtml(b).setAttribute(
|
|
57
|
-
}), i.apply(new
|
|
57
|
+
i.modifyHtml(m).setInnerHtml(b).setAttribute(T.SYMBOL, n);
|
|
58
|
+
}), i.apply(new E(
|
|
58
59
|
`Updated currency symbol to ${n || "removed"}`
|
|
59
60
|
));
|
|
60
61
|
}
|
|
@@ -115,6 +116,6 @@ class P extends E {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
x as CONTROL_BLOCK_ID,
|
|
120
|
+
$ as PriceCurrencySymbolControl
|
|
120
121
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { escapeHtml as m } from "../../../utils/htmlEscape.js";
|
|
2
|
-
import { BlockType as R, BlockAttr as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { BlockType as R, BlockAttr as w } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
import { ITEMS_CURRENCY_ATTR as U, currencyPositionFromLocation as z } from "./constants/currency.js";
|
|
4
|
+
import { ItemsBlockId as _ } from "./enums/controlEnums.js";
|
|
5
|
+
import { productPairs as h, templateFirstLine as j } from "./enums/productEnums.js";
|
|
6
|
+
import { ItemInCartOptions as J, SETTINGS_ENUMS as y, DefaultConfigValues as k } from "./enums/settingsEnums.js";
|
|
7
|
+
import Z from "./layouts/horizontal.html.js";
|
|
8
|
+
import f from "./layouts/vertical.html.js";
|
|
9
|
+
import { deriveItemNumber as tt, escapeReplacement as g } from "./utils/nodeConfigUtils.js";
|
|
10
|
+
let [G] = h.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [F] = h.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [L] = h.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [x] = h.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [v] = h.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
|
|
11
|
+
const M = (a, e) => a.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), V = (a) => M(a, "text-align"), S = (a, e) => {
|
|
12
|
+
const r = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), s = a.match(r);
|
|
13
|
+
return s ? s[1].trim() : null;
|
|
14
|
+
}, N = (a) => `<tr>${a}</tr>`, et = (a, e, r, s) => {
|
|
15
|
+
const i = r || k.productImageHeight, d = (s == null ? void 0 : s.imageVisible) === !1 ? "display: none; " : "";
|
|
16
|
+
return N(`
|
|
16
17
|
<td class="esd-block-image document-node-component default-block-component selectable ng-star-inserted"
|
|
17
18
|
align="center"
|
|
18
|
-
esd-extension-block-id="${
|
|
19
|
+
esd-extension-block-id="${_.IMAGE}"
|
|
19
20
|
data-slot-1=""
|
|
20
21
|
product-attr="imageSrc"
|
|
21
|
-
data-type="${
|
|
22
|
+
data-type="${a}"
|
|
22
23
|
data-number="${e}"
|
|
23
24
|
style="${d}font-size: 0px;">
|
|
24
25
|
<a class="document-node-component ng-star-inserted"
|
|
@@ -26,27 +27,27 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
26
27
|
href="#!">
|
|
27
28
|
<img class="adapt-img document-node-component ng-star-inserted"
|
|
28
29
|
style="object-fit: contain;"
|
|
29
|
-
src="${
|
|
30
|
+
src="${G}"
|
|
30
31
|
alt="${F}"
|
|
31
32
|
width="${i}"
|
|
32
33
|
height="${i}">
|
|
33
34
|
</a>
|
|
34
35
|
</td>
|
|
35
36
|
`);
|
|
36
|
-
},
|
|
37
|
+
}, at = (a, e) => `
|
|
37
38
|
<${R.BLOCK_IMAGE}
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
${
|
|
41
|
-
${
|
|
42
|
-
${
|
|
43
|
-
esd-extension-block-id="${
|
|
39
|
+
${w.BLOCK_IMAGE.src}="${G}"
|
|
40
|
+
${w.BLOCK_IMAGE.alt}="${F}"
|
|
41
|
+
${w.BLOCK_IMAGE.href}="#!"
|
|
42
|
+
${w.BLOCK_IMAGE.width}="${k.productImageWidth}"
|
|
43
|
+
${w.BLOCK_IMAGE.height}="${k.productImageWidth}"
|
|
44
|
+
esd-extension-block-id="${_.IMAGE}"
|
|
44
45
|
data-slot-1
|
|
45
46
|
product-attr="imageSrc"
|
|
46
|
-
data-type="${
|
|
47
|
+
data-type="${a}"
|
|
47
48
|
data-number="${e}"
|
|
48
49
|
/>
|
|
49
|
-
`,
|
|
50
|
+
`, st = (a, e, r, s) => {
|
|
50
51
|
const i = `
|
|
51
52
|
word-wrap: break-word;
|
|
52
53
|
white-space: nowrap;
|
|
@@ -56,27 +57,27 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
56
57
|
max-width: 100%;
|
|
57
58
|
`;
|
|
58
59
|
if (e) {
|
|
59
|
-
const d =
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const d = S(r || "", "text-align") || "center", n = V(r || i), c = S(n, "font-weight"), l = S(n, "font-style"), o = c === "bold" || c === "700", t = l === "italic", p = M(
|
|
61
|
+
M(
|
|
62
|
+
M(n, "font-weight"),
|
|
62
63
|
"font-style"
|
|
63
64
|
),
|
|
64
65
|
"text-decoration"
|
|
65
|
-
), T = (
|
|
66
|
-
let
|
|
67
|
-
return o && (
|
|
66
|
+
), T = (s == null ? void 0 : s.nameVisible) === !1 ? "display: none;" : "display: table-cell;", u = p ? ` style="${m(p)}"` : "";
|
|
67
|
+
let $ = F;
|
|
68
|
+
return o && ($ = `<strong>${$}</strong>`), t && ($ = `<em>${$}</em>`), N(`
|
|
68
69
|
<td class="esd-block-text es-p10"
|
|
69
70
|
align="${d}"
|
|
70
71
|
width="100%"
|
|
71
72
|
colspan="2"
|
|
72
|
-
data-type="${
|
|
73
|
-
esd-extension-block-id="${
|
|
73
|
+
data-type="${a}"
|
|
74
|
+
esd-extension-block-id="${_.NAME}"
|
|
74
75
|
style="${T}">
|
|
75
76
|
<p contenteditable="false"
|
|
76
77
|
path="1"
|
|
77
78
|
product-attr="name"
|
|
78
|
-
data-slot-2${
|
|
79
|
-
${
|
|
79
|
+
data-slot-2${u}>
|
|
80
|
+
${$}
|
|
80
81
|
</p>
|
|
81
82
|
</td>
|
|
82
83
|
`);
|
|
@@ -86,8 +87,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
86
87
|
align="center"
|
|
87
88
|
colspan="2"
|
|
88
89
|
class="es-p10"
|
|
89
|
-
data-type="${
|
|
90
|
-
esd-extension-block-id="${
|
|
90
|
+
data-type="${a}"
|
|
91
|
+
esd-extension-block-id="${_.NAME}"
|
|
91
92
|
>
|
|
92
93
|
<p contenteditable="false"
|
|
93
94
|
product-attr="name"
|
|
@@ -97,31 +98,31 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
97
98
|
</p>
|
|
98
99
|
</${R.BLOCK_TEXT}>
|
|
99
100
|
`;
|
|
100
|
-
},
|
|
101
|
-
let t =
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
t = (i || "0") === "1" ? `${
|
|
101
|
+
}, lt = (a, e, r, s, i, d, n, c, l, o) => {
|
|
102
|
+
let t = L;
|
|
103
|
+
if (s && s.trim()) {
|
|
104
|
+
const E = `${s.trim()}`;
|
|
105
|
+
t = (i || "0") === "1" ? `${L} ${E}` : `${E} ${L}`;
|
|
105
106
|
}
|
|
106
|
-
const p = i
|
|
107
|
+
const p = z(i), T = `data-formated="${r ? "true" : "false"}"`, u = `${U.POSITION}="${p}"`, $ = s ? `${U.SYMBOL}="${s}"` : "", O = `data-single_price="${c ? "true" : "false"}"`, b = l === y.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
|
|
107
108
|
if (d) {
|
|
108
|
-
const
|
|
109
|
-
return
|
|
110
|
-
<td class="esd-block-text items-block-price${
|
|
109
|
+
const I = V(n || "color: #060606; white-space: nowrap; font-size: 20px;"), P = o ? "" : ' style="display: none;"';
|
|
110
|
+
return N(`
|
|
111
|
+
<td class="esd-block-text items-block-price${b}"
|
|
111
112
|
align="center"
|
|
112
|
-
esd-extension-block-id="${
|
|
113
|
+
esd-extension-block-id="${_.PRICE}"
|
|
113
114
|
width="100%"
|
|
114
|
-
${
|
|
115
|
+
${P}>
|
|
115
116
|
<p product-attr="price"
|
|
116
117
|
contenteditable="false"
|
|
117
118
|
data-slot-4
|
|
118
|
-
data-type="${
|
|
119
|
+
data-type="${a}"
|
|
119
120
|
data-number="${e}"
|
|
120
121
|
${T}
|
|
121
|
-
${_}
|
|
122
|
-
${E}
|
|
123
122
|
${u}
|
|
124
|
-
|
|
123
|
+
${$}
|
|
124
|
+
${O}
|
|
125
|
+
style="${m(I)}">
|
|
125
126
|
${t}
|
|
126
127
|
</p>
|
|
127
128
|
</td>
|
|
@@ -129,8 +130,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
129
130
|
}
|
|
130
131
|
return `
|
|
131
132
|
<${R.BLOCK_TEXT}
|
|
132
|
-
esd-extension-block-id="${
|
|
133
|
-
class="items-block-price ${
|
|
133
|
+
esd-extension-block-id="${_.PRICE}"
|
|
134
|
+
class="items-block-price ${b}"
|
|
134
135
|
width="100%"
|
|
135
136
|
align="center"
|
|
136
137
|
>
|
|
@@ -138,42 +139,42 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
138
139
|
product-attr="price"
|
|
139
140
|
contenteditable="false"
|
|
140
141
|
data-slot-4
|
|
141
|
-
data-type="${
|
|
142
|
+
data-type="${a}"
|
|
142
143
|
data-number="${e}"
|
|
143
144
|
${T}
|
|
144
|
-
${_}
|
|
145
|
-
${a ? `data-currency_symbol="${a}"` : ""}
|
|
146
145
|
${u}
|
|
146
|
+
${$}
|
|
147
|
+
${O}
|
|
147
148
|
>
|
|
148
149
|
${t}
|
|
149
150
|
</p>
|
|
150
151
|
</${R.BLOCK_TEXT}>
|
|
151
152
|
`;
|
|
152
|
-
},
|
|
153
|
-
let t =
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
t = (i || "0") === "1" ? `${
|
|
153
|
+
}, rt = (a, e, r, s, i, d, n = !0, c, l, o) => {
|
|
154
|
+
let t = x;
|
|
155
|
+
if (s && s.trim()) {
|
|
156
|
+
const I = `${s.trim()}`;
|
|
157
|
+
t = (i || "0") === "1" ? `${x} ${I}` : `${I} ${x}`;
|
|
157
158
|
}
|
|
158
|
-
const p = i
|
|
159
|
+
const p = z(i), T = `data-formated="${r ? "true" : "false"}"`, u = `${U.POSITION}="${p}"`, $ = s ? `${U.SYMBOL}="${s}"` : "", O = n ? "" : ' style="display: none;"', A = `data-single_price="${l ? "true" : "false"}"`, E = o === y.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
|
|
159
160
|
if (d) {
|
|
160
|
-
const
|
|
161
|
-
return
|
|
162
|
-
<td class="esd-block-text items-block-price${
|
|
163
|
-
esd-extension-block-id="${
|
|
161
|
+
const P = V(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
|
|
162
|
+
return N(`
|
|
163
|
+
<td class="esd-block-text items-block-price${E}"
|
|
164
|
+
esd-extension-block-id="${_.ORIGINAL_PRICE}"
|
|
164
165
|
width="100%"
|
|
165
|
-
align="center"${
|
|
166
|
+
align="center"${O}>
|
|
166
167
|
<p
|
|
167
168
|
product-attr="originalPrice"
|
|
168
169
|
contenteditable="false"
|
|
169
170
|
data-slot-5
|
|
170
|
-
data-type="${
|
|
171
|
+
data-type="${a}"
|
|
171
172
|
data-number="${e}"
|
|
172
173
|
${T}
|
|
173
|
-
${_}
|
|
174
|
-
${a ? `data-currency_symbol="${a}"` : ""}
|
|
175
174
|
${u}
|
|
176
|
-
|
|
175
|
+
${$}
|
|
176
|
+
${A}
|
|
177
|
+
style="${m(P)}">
|
|
177
178
|
<s>${t}</s>
|
|
178
179
|
</p>
|
|
179
180
|
</td>
|
|
@@ -181,8 +182,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
181
182
|
}
|
|
182
183
|
return `
|
|
183
184
|
<${R.BLOCK_TEXT}
|
|
184
|
-
class="items-block-price ${
|
|
185
|
-
esd-extension-block-id="${
|
|
185
|
+
class="items-block-price ${E}"
|
|
186
|
+
esd-extension-block-id="${_.ORIGINAL_PRICE}"
|
|
186
187
|
width="100%"
|
|
187
188
|
align="center"
|
|
188
189
|
${n ? "" : 'style="display: none;"'}
|
|
@@ -192,33 +193,33 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
192
193
|
contenteditable="false"
|
|
193
194
|
data-slot-5
|
|
194
195
|
style="color: #cc0000"
|
|
195
|
-
data-type="${
|
|
196
|
+
data-type="${a}"
|
|
196
197
|
data-number="${e}"
|
|
197
198
|
${T}
|
|
198
|
-
${_}
|
|
199
|
-
${a ? `data-currency_symbol="${a}"` : ""}
|
|
200
199
|
${u}
|
|
200
|
+
${$}
|
|
201
|
+
${A}
|
|
201
202
|
>
|
|
202
203
|
<s>${t}</s>
|
|
203
204
|
</p>
|
|
204
205
|
</${R.BLOCK_TEXT}>
|
|
205
206
|
`;
|
|
206
|
-
},
|
|
207
|
-
const
|
|
207
|
+
}, ct = (a = !0, e, r) => {
|
|
208
|
+
const s = a ? "" : 'style="display: none;"';
|
|
208
209
|
if (e) {
|
|
209
|
-
const i = "font-size: 14px;", d =
|
|
210
|
-
return
|
|
210
|
+
const i = "font-size: 14px;", d = S(r || "", "text-align") || "center", n = V(r || i);
|
|
211
|
+
return N(`
|
|
211
212
|
<td class="esd-block-text es-p10 document-node-component default-block-component selectable"
|
|
212
213
|
width="100%" align="${d}"
|
|
213
|
-
esd-extension-block-id="${
|
|
214
|
-
${
|
|
214
|
+
esd-extension-block-id="${_.QUANTITY}"
|
|
215
|
+
${s}>
|
|
215
216
|
<p product-attr="quantity"
|
|
216
217
|
data-slot-3=""
|
|
217
218
|
contenteditable="false"
|
|
218
219
|
width="100%"
|
|
219
220
|
path="1"
|
|
220
221
|
style="${m(n)}">
|
|
221
|
-
${
|
|
222
|
+
${v}
|
|
222
223
|
</p>
|
|
223
224
|
</td>
|
|
224
225
|
`);
|
|
@@ -228,26 +229,26 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
228
229
|
width="100%"
|
|
229
230
|
align="center"
|
|
230
231
|
class="es-p10"
|
|
231
|
-
esd-extension-block-id="${
|
|
232
|
-
${
|
|
232
|
+
esd-extension-block-id="${_.QUANTITY}"
|
|
233
|
+
${a ? "" : 'style="display: none;"'}
|
|
233
234
|
>
|
|
234
235
|
<p
|
|
235
236
|
product-attr="quantity"
|
|
236
237
|
data-slot-3
|
|
237
238
|
contenteditable="false"
|
|
238
239
|
width="100%">
|
|
239
|
-
${
|
|
240
|
+
${v}
|
|
240
241
|
</p>
|
|
241
242
|
</${R.BLOCK_TEXT}>
|
|
242
243
|
`;
|
|
243
|
-
},
|
|
244
|
-
if (
|
|
245
|
-
const c =
|
|
246
|
-
return
|
|
244
|
+
}, it = (a, e, r = "Buy", s, i, d = !0, n = !0) => {
|
|
245
|
+
if (s) {
|
|
246
|
+
const c = S(i || "", "background") || S(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", o = d ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
|
|
247
|
+
return N(`
|
|
247
248
|
<td class="esd-block-button ins-button default-block-component selectable"
|
|
248
249
|
align="center" width="100%" name="buy-button" caption="${r}"
|
|
249
|
-
esd-extension-block-id="${
|
|
250
|
-
product-attr="button" data-slot-6="" data-type="${
|
|
250
|
+
esd-extension-block-id="${_.BUTTON}"
|
|
251
|
+
product-attr="button" data-slot-6="" data-type="${a}" data-number="${e}"
|
|
251
252
|
${n ? "" : ' style="display: none;"'}>
|
|
252
253
|
<span class="es-button-border ${o}" style="${m(l)}">
|
|
253
254
|
<a
|
|
@@ -268,19 +269,19 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
268
269
|
name="buy-button"
|
|
269
270
|
caption="${r}"
|
|
270
271
|
align="center"
|
|
271
|
-
esd-extension-block-id="${
|
|
272
|
+
esd-extension-block-id="${_.BUTTON}"
|
|
272
273
|
product-attr="button"
|
|
273
274
|
data-slot-6
|
|
274
|
-
data-type="${
|
|
275
|
+
data-type="${a}"
|
|
275
276
|
data-number="${e}"
|
|
276
277
|
>${r}
|
|
277
278
|
</${R.BLOCK_BUTTON}>
|
|
278
279
|
`;
|
|
279
|
-
},
|
|
280
|
-
const d = e ===
|
|
280
|
+
}, nt = (a, e, r, s = !0, i = !0) => {
|
|
281
|
+
const d = e === y.ORIENTATION.VERTICAL, n = r === "horizontal";
|
|
281
282
|
if (d) {
|
|
282
|
-
const c = !n, l = c || !i ? "100%" : "50%", o = c || !
|
|
283
|
-
let t =
|
|
283
|
+
const c = !n, l = c || !i ? "100%" : "50%", o = c || !s ? "100%" : "50%";
|
|
284
|
+
let t = a.replace(
|
|
284
285
|
/<td\s+[^>]*class="([^"]*product-price-class[^"]*)"[^>]*>/gi,
|
|
285
286
|
(p) => p.replace(/width="[^"]*"/gi, `width="${l}"`).replace(/width:\s*[^;]+;/gi, `width: ${l};`)
|
|
286
287
|
);
|
|
@@ -289,64 +290,64 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
|
|
|
289
290
|
(p) => p.replace(/width="[^"]*"/gi, `width="${o}"`).replace(/width:\s*[^;]+;/gi, `width: ${o};`)
|
|
290
291
|
), t;
|
|
291
292
|
}
|
|
292
|
-
return n ?
|
|
293
|
+
return n ? a : a.replace(
|
|
293
294
|
/<td\s+[^>]*class="[^"]*horizontal-price[^"]*"[^>]*>/gi,
|
|
294
295
|
(c) => /style\s*=\s*"/i.test(c) ? c.replace(/style\s*=\s*"([^"]*)"/i, 'style="display: none; $1"') : c.replace(/>$/, ' style="display: none;">')
|
|
295
296
|
).replace(
|
|
296
297
|
/<td\s+[^>]*class="[^"]*vertical-price[^"]*"[^>]*>/gi,
|
|
297
298
|
(c) => c.replace(/display:\s*none;?/gi, "display: table-cell;")
|
|
298
299
|
);
|
|
299
|
-
},
|
|
300
|
+
}, dt = (a) => a ? `<td align="center"
|
|
300
301
|
esd-extension-block-id="items-block"
|
|
301
|
-
class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` :
|
|
302
|
-
const
|
|
302
|
+
class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : j, W = (a, e, r, s, i, d, n, c, l, o, t, p, T, u = "horizontal", $, O, A, b) => {
|
|
303
|
+
const E = o !== void 0 ? ` data-nodup="${o}"` : "", P = `${`data-type="${e}" data-number="${r}"`} data-orientation="${s}"${E}`, D = l == null ? void 0 : l["data-product_image_control_image-height"], X = d ? et(e, r, D, t) : at(e, r), H = (t == null ? void 0 : t.buttonLabel) || "Buy", Q = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, Y = e === y.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, q = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (l == null ? void 0 : l["data-product_button_control_enabled"]) !== "false", K = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (l == null ? void 0 : l["data-product_price_control_enabled"]) !== "false", B = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (l == null ? void 0 : l["data-product_original_price_control_enabled"]) !== "false", C = a.replace("{-{-TEMPLATE_FIRST_LINE-}-}", dt(d)).replace("{-{-PRODUCT_IMAGE-}-}", X).replace("{-{-PRODUCT_NAME-}-}", st(e, d, p, t)).replaceAll(
|
|
303
304
|
"{-{-PRODUCT_PRICE-}-}",
|
|
304
|
-
g(
|
|
305
|
+
g(lt(
|
|
305
306
|
e,
|
|
306
307
|
r,
|
|
307
308
|
i,
|
|
308
309
|
n,
|
|
309
310
|
c,
|
|
310
311
|
d,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
$,
|
|
313
|
+
b,
|
|
314
|
+
s,
|
|
315
|
+
K
|
|
315
316
|
))
|
|
316
317
|
).replaceAll(
|
|
317
318
|
"{-{-PRODUCT_ORIGINAL_PRICE-}-}",
|
|
318
|
-
g(
|
|
319
|
+
g(rt(
|
|
319
320
|
e,
|
|
320
321
|
r,
|
|
321
322
|
i,
|
|
322
323
|
n,
|
|
323
324
|
c,
|
|
324
325
|
d,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
326
|
+
B,
|
|
327
|
+
O,
|
|
328
|
+
b,
|
|
329
|
+
s
|
|
329
330
|
))
|
|
330
|
-
).replace("{-{-PRODUCT_QUANTITY-}-}",
|
|
331
|
+
).replace("{-{-PRODUCT_QUANTITY-}-}", ct(Y, d, A)).replace(
|
|
331
332
|
"{-{-PRODUCT_BUTTON-}-}",
|
|
332
|
-
|
|
333
|
+
it(e, r, H, d, T, Q, q)
|
|
333
334
|
).replace(
|
|
334
335
|
/<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
|
|
335
|
-
`<td$1 ${
|
|
336
|
+
`<td$1 ${P}>`
|
|
336
337
|
);
|
|
337
|
-
return
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
return nt(
|
|
339
|
+
C,
|
|
340
|
+
s,
|
|
341
|
+
u,
|
|
342
|
+
K,
|
|
343
|
+
B
|
|
343
344
|
);
|
|
344
345
|
};
|
|
345
|
-
function
|
|
346
|
-
orientation:
|
|
347
|
-
itemsType: e =
|
|
346
|
+
function bt({
|
|
347
|
+
orientation: a,
|
|
348
|
+
itemsType: e = y.ITEMS_TYPE.CART_ITEMS,
|
|
348
349
|
itemId: r,
|
|
349
|
-
currencySymbol:
|
|
350
|
+
currencySymbol: s,
|
|
350
351
|
currencyLocation: i,
|
|
351
352
|
migrate: d = !1,
|
|
352
353
|
formattedPrice: n = !0,
|
|
@@ -356,22 +357,22 @@ function It({
|
|
|
356
357
|
buttonStyles: t,
|
|
357
358
|
priceStyles: p,
|
|
358
359
|
originalPriceStyles: T,
|
|
359
|
-
quantityStyles:
|
|
360
|
-
priceOrientation:
|
|
360
|
+
quantityStyles: u,
|
|
361
|
+
priceOrientation: $
|
|
361
362
|
}) {
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
return
|
|
368
|
-
|
|
363
|
+
const O = J[e].findIndex((X) => X.value === r), A = tt(r, e), b = (l == null ? void 0 : l.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
|
|
364
|
+
G = h.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[O >= 0 ? O : 0], F = h.PAIRS_FOR_EXTENSION.name[e].DEFAULT[O >= 0 ? O : 0];
|
|
365
|
+
const E = h.PAIRS_FOR_EXTENSION.price[e], I = h.PAIRS_FOR_EXTENSION.originalPrice[e];
|
|
366
|
+
b ? (L = n ? E.DEFAULT_SINGLE_PRICE_FORMATTED : E.DEFAULT_SINGLE_PRICE, x = n ? I.DEFAULT_SINGLE_PRICE_FORMATTED : I.DEFAULT_SINGLE_PRICE) : (L = n ? E.DEFAULT_PRICE_FORMATTED : E.DEFAULT_PRICE, x = n ? I.DEFAULT_PRICE_FORMATTED : I.DEFAULT_PRICE), v = h.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
|
|
367
|
+
const P = $ || (l == null ? void 0 : l.priceOrientation) || "horizontal", D = (l == null ? void 0 : l.priceHideDiscount) ?? k.productPriceHideDiscountControlValue === "1";
|
|
368
|
+
return a === y.ORIENTATION.VERTICAL ? W(
|
|
369
|
+
f,
|
|
369
370
|
e,
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
A,
|
|
372
|
+
a,
|
|
372
373
|
n,
|
|
373
374
|
d,
|
|
374
|
-
|
|
375
|
+
s,
|
|
375
376
|
i,
|
|
376
377
|
c,
|
|
377
378
|
String(D),
|
|
@@ -379,19 +380,19 @@ function It({
|
|
|
379
380
|
l,
|
|
380
381
|
o,
|
|
381
382
|
t,
|
|
382
|
-
|
|
383
|
+
P,
|
|
383
384
|
p,
|
|
384
385
|
T,
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
) :
|
|
388
|
-
|
|
386
|
+
u,
|
|
387
|
+
b
|
|
388
|
+
) : W(
|
|
389
|
+
Z,
|
|
389
390
|
e,
|
|
390
|
-
|
|
391
|
-
|
|
391
|
+
A,
|
|
392
|
+
a,
|
|
392
393
|
n,
|
|
393
394
|
d,
|
|
394
|
-
|
|
395
|
+
s,
|
|
395
396
|
i,
|
|
396
397
|
c,
|
|
397
398
|
String(D),
|
|
@@ -399,14 +400,14 @@ function It({
|
|
|
399
400
|
l,
|
|
400
401
|
o,
|
|
401
402
|
t,
|
|
402
|
-
|
|
403
|
+
P,
|
|
403
404
|
p,
|
|
404
405
|
T,
|
|
405
|
-
|
|
406
|
-
|
|
406
|
+
u,
|
|
407
|
+
b
|
|
407
408
|
);
|
|
408
409
|
}
|
|
409
410
|
export {
|
|
410
|
-
|
|
411
|
-
|
|
411
|
+
bt as getDefaultTemplate,
|
|
412
|
+
N as wrapInTableRow
|
|
412
413
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -16,6 +16,8 @@ export declare const BLOCK_ID: BlockId;
|
|
|
16
16
|
* - Onboarding support
|
|
17
17
|
*/
|
|
18
18
|
export declare class ItemsBlock extends Block {
|
|
19
|
+
/** Block instances whose currency attrs were already self-healed this session (SD-147588 — undo-safe). */
|
|
20
|
+
private _currencyHealed;
|
|
19
21
|
getId(): string;
|
|
20
22
|
getIcon(): string;
|
|
21
23
|
getBlockCompositionType(): BlockCompositionType;
|
|
@@ -42,4 +44,31 @@ export declare class ItemsBlock extends Block {
|
|
|
42
44
|
* relies on this td-level fallback in pairProductVariables.
|
|
43
45
|
*/
|
|
44
46
|
private _stampProductTdDomAttributes;
|
|
47
|
+
/**
|
|
48
|
+
* Whether a currency self-heal pass should run for this block (SD-147588). The only gate here is
|
|
49
|
+
* once-per-session: heal each instance at most once, so the auto-fix can't fight undo (undo
|
|
50
|
+
* re-drifts the attr, which would otherwise re-trigger the heal forever). The position-vs-symbol
|
|
51
|
+
* authority split lives in `_reconcileCurrencyDomAttributes` — position is always authoritative,
|
|
52
|
+
* the symbol write alone is skipped for the 'USD' sentinel — so we must NOT gate the whole pass
|
|
53
|
+
* on symbol customization here, or a default-symbol block with a toggled location never heals.
|
|
54
|
+
*/
|
|
55
|
+
private _shouldReconcileCurrency;
|
|
56
|
+
/** Marks a block instance's currency as reconciled so it is not healed again (undo-safe). */
|
|
57
|
+
private _markCurrencyHealed;
|
|
58
|
+
/**
|
|
59
|
+
* Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
|
|
60
|
+
* attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
|
|
61
|
+
* Config is the source of truth — never derive from visible text.
|
|
62
|
+
*
|
|
63
|
+
* Position and symbol differ in authority (SD-147588):
|
|
64
|
+
* - `data-curency` (position) comes from `priceCurrencyLocation`, captured independently of the
|
|
65
|
+
* symbol, so it is ALWAYS authoritative and healed whenever it drifts — even with a default
|
|
66
|
+
* symbol (otherwise the default-symbol + toggled-location case stays broken on export).
|
|
67
|
+
* - `data-currency_symbol` is stamped only for a customized symbol; the 'USD' sentinel may be a
|
|
68
|
+
* migrator default, so we trust the DOM's real value over it and never overwrite.
|
|
69
|
+
*
|
|
70
|
+
* Returns true only when an attr actually changed, so the caller can skip an empty apply that
|
|
71
|
+
* would otherwise re-trigger onDocumentChanged and loop.
|
|
72
|
+
*/
|
|
73
|
+
private _reconcileCurrencyDomAttributes;
|
|
45
74
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single owner for the Items price currency export contract (SD-147588).
|
|
3
|
+
*
|
|
4
|
+
* `data-curency` is deliberately misspelled (one `r`) — it is the attribute the
|
|
5
|
+
* server-side export transform (pairProductVariables) actually reads, so every
|
|
6
|
+
* layer that writes it and the live reader (template, controls, block self-heal,
|
|
7
|
+
* pairProductVariables) MUST go through these constants. A typo fix or mapping change
|
|
8
|
+
* in one of them would otherwise silently break sync with the others and ship the wrong
|
|
9
|
+
* currency position/token to the inbox. Mirrors the Recommendation block's `CURRENCY_ATTR`.
|
|
10
|
+
*
|
|
11
|
+
* Exception: the legacy migrator reads the raw misspelled string on purpose — it parses
|
|
12
|
+
* old templates frozen with that exact attr name, so it must NOT follow a future rename here.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ITEMS_CURRENCY_ATTR: {
|
|
15
|
+
readonly POSITION: "data-curency";
|
|
16
|
+
readonly SYMBOL: "data-currency_symbol";
|
|
17
|
+
};
|
|
18
|
+
/** Currency location select value `'1'` = after (price then symbol), anything else = before. */
|
|
19
|
+
export declare function currencyPositionFromLocation(location: string | undefined): 'after' | 'before';
|
|
20
|
+
/**
|
|
21
|
+
* Whether a currency symbol is a partner customization vs the 'USD' default sentinel (SD-144644).
|
|
22
|
+
* The default value means "use the catalog currency", so it is treated as NOT customized — the one
|
|
23
|
+
* rule shared by the export transform (pairProductVariables) and the block self-heal, kept here so
|
|
24
|
+
* the two layers can never drift. Trims first so a whitespace-only value is not read as custom.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isCustomCurrencySymbol(symbol: string | null | undefined): boolean;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
+
import { ITEMS_CURRENCY_ATTR as D, isCustomCurrencySymbol as G } from "../extensions/Blocks/Items/constants/currency.js";
|
|
1
2
|
import { productPairs as L } from "../extensions/Blocks/Items/enums/productEnums.js";
|
|
2
|
-
import {
|
|
3
|
-
import { escapeReplacement as G } from "../extensions/Blocks/Items/utils/nodeConfigUtils.js";
|
|
3
|
+
import { escapeReplacement as X } from "../extensions/Blocks/Items/utils/nodeConfigUtils.js";
|
|
4
4
|
import { preserveTextStyles as F } from "./preserveTextStyles.js";
|
|
5
|
-
import { unwrapProductNameLinks as
|
|
5
|
+
import { unwrapProductNameLinks as Y } from "./unwrapProductNameLink.js";
|
|
6
6
|
const x = {
|
|
7
7
|
CART_ITEMS: "ins_apr",
|
|
8
8
|
BROWSED_ITEMS: "browsed_item",
|
|
9
9
|
PURCHASED_ITEMS: "purchased_item"
|
|
10
|
-
},
|
|
11
|
-
function v(S,
|
|
12
|
-
let
|
|
13
|
-
for (;
|
|
14
|
-
|
|
15
|
-
return
|
|
10
|
+
}, O = (S) => S.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->");
|
|
11
|
+
function v(S, y, b) {
|
|
12
|
+
let h = y;
|
|
13
|
+
for (; h > 0 && /\s/.test(S[h - 1]); )
|
|
14
|
+
h -= 1;
|
|
15
|
+
return b.some((I) => S.endsWith(I, h));
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
Object.entries(
|
|
22
|
-
|
|
17
|
+
function K(S) {
|
|
18
|
+
const y = O(S), b = new DOMParser().parseFromString(y, "text/html");
|
|
19
|
+
Y(b);
|
|
20
|
+
const h = L.PAIRS_FOR_EXTENSION;
|
|
21
|
+
Object.entries(h).forEach(([n, d]) => {
|
|
22
|
+
b.querySelectorAll(".ins-product-td").forEach((r) => {
|
|
23
23
|
const E = r.getAttribute("data-number") || "1", m = r.getAttribute("data-type") || "CART_ITEMS";
|
|
24
24
|
r.querySelectorAll(`[product-attr="${n}"]`).forEach((t) => {
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
25
|
+
var $, H, N;
|
|
26
|
+
const g = t.getAttribute("data-type") || m, o = t.getAttribute("data-number") || E, u = d[g];
|
|
27
|
+
if (u)
|
|
28
28
|
switch (n) {
|
|
29
29
|
case "imageSrc": {
|
|
30
30
|
let e = null, s = null;
|
|
31
31
|
if (t.tagName === "IMG" ? (e = t, s = e.closest("a")) : (e = t.querySelector("img"), s = t.querySelector("a") || t.closest("a")), !e)
|
|
32
32
|
break;
|
|
33
|
-
const a =
|
|
33
|
+
const a = u.DEFAULT, l = u.ATTR;
|
|
34
34
|
if (a && e.src) {
|
|
35
35
|
const i = e.src;
|
|
36
|
-
a.some((
|
|
37
|
-
const
|
|
38
|
-
return i.includes(
|
|
36
|
+
a.some((_) => {
|
|
37
|
+
const f = _.split("/").pop() || "", P = i.split("/").pop() || "";
|
|
38
|
+
return i.includes(_) || i.includes(f) || P === f;
|
|
39
39
|
}) && (e.src = `{{${l}_${o}}}`);
|
|
40
40
|
}
|
|
41
|
-
const c = (
|
|
41
|
+
const c = (H = ($ = h.name) == null ? void 0 : $[g]) == null ? void 0 : H.ATTR;
|
|
42
42
|
if (c && e.setAttribute("alt", `{{${c}_${o}}}`), s) {
|
|
43
|
-
const i = (
|
|
43
|
+
const i = (N = h.itemLink) == null ? void 0 : N[g];
|
|
44
44
|
if (i) {
|
|
45
|
-
const
|
|
46
|
-
(
|
|
45
|
+
const R = i.HREF, _ = i.DEFAULT_HREF || "#!", f = s.href;
|
|
46
|
+
(f === "#" || f === "" || f.endsWith("#!") || f.endsWith(_) || f === `${window.location.href}${_}` || !f || f === window.location.href) && (s.href = `{{${R}_${o}}}`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
51
|
case "name": {
|
|
52
|
-
const e =
|
|
52
|
+
const e = u, s = e.ATTR, a = e.DEFAULT_HREF || "#!", l = e.HREF;
|
|
53
53
|
t.textContent && (t.innerHTML = F(t, `{{${s}_${o}}}`));
|
|
54
54
|
const c = t.closest("a") || (t.tagName === "A" ? t : null);
|
|
55
55
|
if (c && l) {
|
|
56
|
-
const i = c.href,
|
|
57
|
-
(i ===
|
|
56
|
+
const i = c.href, R = `${window.location.href}${a}`;
|
|
57
|
+
(i === R || i.endsWith(a)) && (c.href = `{{${l}_${o}}}`);
|
|
58
58
|
}
|
|
59
59
|
break;
|
|
60
60
|
}
|
|
61
61
|
case "price":
|
|
62
62
|
case "originalPrice": {
|
|
63
|
-
const e =
|
|
64
|
-
let
|
|
65
|
-
c ?
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
const
|
|
63
|
+
const e = u, s = t.getAttribute("data-formated"), a = t.getAttribute("data-single_price"), l = s === "true", c = a === "true", i = t.getAttribute(D.POSITION) || "before";
|
|
64
|
+
let R;
|
|
65
|
+
c ? R = l ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : R = l ? e.PRICE_FORMATTED : e.PRICE;
|
|
66
|
+
const _ = e.CURRENCY;
|
|
67
|
+
let f = `{{${R}_${o}}}`;
|
|
68
|
+
const P = (t.getAttribute(D.SYMBOL) || "").trim(), V = G(P);
|
|
69
69
|
let C = "";
|
|
70
|
-
|
|
70
|
+
V ? C = P : _ && (C = `{{${_}_${o}}}`), C && (f = i === "after" ? `${f} ${C}` : `${C} ${f}`), t.innerHTML = F(t, f);
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
case "quantity": {
|
|
74
|
-
const e =
|
|
74
|
+
const e = u, s = e.ATTR, a = e.DEFAULT;
|
|
75
75
|
t.textContent && t.textContent.trim() === a && (t.innerHTML = F(t, `{{${s}_${o}}}`));
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
case "button": {
|
|
79
|
-
const e =
|
|
79
|
+
const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t.tagName === "A" ? t : t.querySelector("a");
|
|
80
80
|
if (l) {
|
|
81
81
|
const c = l.href || "", i = `${window.location.href}${a}`;
|
|
82
82
|
(c === "" || c === "#" || c === i || c.endsWith(a) || c.endsWith("#!") || c === window.location.href) && (l.href = `{{${s}_${o}}}`);
|
|
@@ -84,7 +84,7 @@ function J(S) {
|
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
case "itemLink": {
|
|
87
|
-
const e =
|
|
87
|
+
const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t;
|
|
88
88
|
if (l.href) {
|
|
89
89
|
const c = l.href, i = `${window.location.href}${a}`;
|
|
90
90
|
(c === i || c.endsWith(a)) && (l.href = `{{${s}_${o}}}`);
|
|
@@ -92,8 +92,8 @@ function J(S) {
|
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
default: {
|
|
95
|
-
if ("ATTR" in
|
|
96
|
-
const e =
|
|
95
|
+
if ("ATTR" in u) {
|
|
96
|
+
const e = u.ATTR;
|
|
97
97
|
t.textContent && (t.innerHTML = F(t, `{{${e}_${o}}}`));
|
|
98
98
|
}
|
|
99
99
|
break;
|
|
@@ -102,9 +102,9 @@ function J(S) {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
|
-
const I =
|
|
106
|
-
` : "",
|
|
107
|
-
|
|
105
|
+
const I = y.match(/<!DOCTYPE[^>]*>/i), q = I ? `${I[0]}
|
|
106
|
+
` : "", U = b.querySelectorAll(".ins-product-td"), M = [];
|
|
107
|
+
U.forEach((n) => {
|
|
108
108
|
const d = n.getAttribute("data-type") || "CART_ITEMS", p = n.getAttribute("data-number") || "1", r = n.outerHTML;
|
|
109
109
|
M.push({
|
|
110
110
|
element: n,
|
|
@@ -113,16 +113,16 @@ function J(S) {
|
|
|
113
113
|
number: p
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
|
-
let A =
|
|
116
|
+
let A = q + b.documentElement.outerHTML;
|
|
117
117
|
M.reverse().forEach(({ outerHtml: n, type: d, number: p }) => {
|
|
118
118
|
const r = x[d], E = r ? `${r}_total_product_kind` : "";
|
|
119
119
|
if (E) {
|
|
120
|
-
const
|
|
121
|
-
A = A.replace(n,
|
|
120
|
+
const T = parseInt(p) - 1, o = `${`{% if ${E} > ${T} %}`}${n}{% endif %}`;
|
|
121
|
+
A = A.replace(n, X(o));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
const
|
|
125
|
-
return
|
|
124
|
+
const W = b.querySelectorAll('[product-attr="originalPrice"][data-type]'), w = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Set();
|
|
125
|
+
return W.forEach((n) => {
|
|
126
126
|
var t;
|
|
127
127
|
const d = n.getAttribute("data-number"), p = n.getAttribute("data-type");
|
|
128
128
|
if (!d || !x[p])
|
|
@@ -131,20 +131,20 @@ function J(S) {
|
|
|
131
131
|
if (!r || k.has(r))
|
|
132
132
|
return;
|
|
133
133
|
k.add(r);
|
|
134
|
-
const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"),
|
|
135
|
-
|
|
134
|
+
const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"), T = w.get(E) ?? { number: d, type: p, wrap: [] };
|
|
135
|
+
T.wrap.push(m !== "false"), w.set(E, T);
|
|
136
136
|
}), w.forEach(({ number: n, type: d, wrap: p }, r) => {
|
|
137
137
|
if (r.includes("{% if") || !p.some(Boolean))
|
|
138
138
|
return;
|
|
139
|
-
const E = L.PAIRS_FOR_EXTENSION.price[d].PRICE, m = L.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE,
|
|
140
|
-
let
|
|
141
|
-
for (;
|
|
142
|
-
const
|
|
143
|
-
|
|
139
|
+
const E = L.PAIRS_FOR_EXTENSION.price[d].PRICE, m = L.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE, T = `{% if ${E}_${n} != ${m}_${n} %}`, t = [T, O(T)];
|
|
140
|
+
let g = "", o = 0, u = 0, $ = A.indexOf(r);
|
|
141
|
+
for (; $ !== -1; ) {
|
|
142
|
+
const H = p[u] === !0 && !v(A, $, t);
|
|
143
|
+
g += A.slice(o, $) + (H ? `${T}${r}{% endif %}` : r), o = $ + r.length, u += 1, $ = A.indexOf(r, o);
|
|
144
144
|
}
|
|
145
|
-
A =
|
|
145
|
+
A = g + A.slice(o);
|
|
146
146
|
}), A.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
147
147
|
}
|
|
148
148
|
export {
|
|
149
|
-
|
|
149
|
+
K as pairProductVariables
|
|
150
150
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.17.0-beta.
|
|
3
|
+
"version": "3.17.0-beta.ab974c6",
|
|
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",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
"guido": {
|
|
120
120
|
"stripo": {
|
|
121
|
-
"version": "2.
|
|
121
|
+
"version": "2.72.1"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|