@useinsider/guido 3.8.1-beta.6c0ee3f → 3.8.1-beta.84abfcd
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/Recommendation/block.js +1 -4
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +137 -154
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +10 -10
- package/dist/extensions/Blocks/controlFactories.js +57 -76
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +1 -10
- package/package.json +1 -1
|
@@ -48,11 +48,8 @@ class H extends D {
|
|
|
48
48
|
allowInnerBlocksDND() {
|
|
49
49
|
return !1;
|
|
50
50
|
}
|
|
51
|
-
// A saved module carries its config in the esd-config blob, restored on
|
|
52
|
-
// re-drop by migrateFromDataAttributes; per-element styles ride the
|
|
53
|
-
// preserved inner HTML. (onCreated early-returns for re-drops, never clobbers.)
|
|
54
51
|
canBeSavedAsModule() {
|
|
55
|
-
return !
|
|
52
|
+
return !1;
|
|
56
53
|
}
|
|
57
54
|
/**
|
|
58
55
|
* Returns the template HTML for a new recommendation block.
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (p,
|
|
4
|
-
import { UIElementType as f, UEAttr as
|
|
5
|
-
import { CommonControl as
|
|
6
|
-
import { ATTR_PRODUCT_IMAGE as
|
|
7
|
-
import { DEFAULT_COMPOSITION as P, DEFAULT_VISIBILITY as
|
|
8
|
-
import { RecommendationConfigService as
|
|
1
|
+
var J = Object.defineProperty;
|
|
2
|
+
var Q = (p, _, t) => _ in p ? J(p, _, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[_] = t;
|
|
3
|
+
var T = (p, _, t) => Q(p, typeof _ != "symbol" ? _ + "" : _, t);
|
|
4
|
+
import { UIElementType as f, UEAttr as I, ModificationDescription as A } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as Z } from "../../../common-control.js";
|
|
6
|
+
import { ATTR_PRODUCT_IMAGE as L, ATTR_PRODUCT_NAME as tt, ATTR_PRODUCT_PRICE as et, ATTR_PRODUCT_OLD_PRICE as rt, ATTR_PRODUCT_OMNIBUS_PRICE as ot, ATTR_PRODUCT_OMNIBUS_DISCOUNT as st, ATTR_PRODUCT_BUTTON as B, ATTR_DATA_CUSTOM_ATTRIBUTES as q, ATTR_CUSTOM_PREFIX as m, BUILT_IN_DEFAULT_ATTRIBUTES as it } from "../../constants/selectors.js";
|
|
7
|
+
import { DEFAULT_COMPOSITION as P, DEFAULT_VISIBILITY as F } from "../../constants/defaultConfig.js";
|
|
8
|
+
import { RecommendationConfigService as nt } from "../../services/configService.js";
|
|
9
9
|
import { useRecommendationExtensionStore as lt } from "../../store/recommendation.js";
|
|
10
10
|
import { ATTRIBUTE_CELL_CLASS as at, gridElementRenderer as ct, DEFAULT_CELL_PADDING as ut, buildFillerCell as dt } from "../../templates/grid/elementRenderer.js";
|
|
11
11
|
import { listElementRenderer as mt } from "../../templates/list/elementRenderer.js";
|
|
12
|
-
import { toDisplayName as ht, isDefaultAttribute as pt, toDisplayableAttributeValue as
|
|
12
|
+
import { toDisplayName as ht, isDefaultAttribute as pt, toDisplayableAttributeValue as _t, buildElementRenderer as w } from "../../templates/utils.js";
|
|
13
13
|
import { getTableDisplayValue as ft } from "../../utils/tagName.js";
|
|
14
|
-
import { isPartnerManagedBlock as
|
|
15
|
-
const yt = "ui-elements-recommendation-card-composition",
|
|
14
|
+
import { isPartnerManagedBlock as gt, getCurrentLayout as bt } from "../main/utils.js";
|
|
15
|
+
const yt = "ui-elements-recommendation-card-composition", S = ".recommendation-attribute-row", N = ".product-card-wrapper > tbody", M = ".product-info-cell > table > tbody", V = "data-card-composition", y = "data-attribute-type", v = "data-visibility", x = {
|
|
16
16
|
ADD_ATTRIBUTE: "addAttribute"
|
|
17
|
-
},
|
|
18
|
-
{ key:
|
|
19
|
-
{ key:
|
|
20
|
-
{ key:
|
|
21
|
-
{ key:
|
|
22
|
-
{ key:
|
|
23
|
-
{ key:
|
|
24
|
-
{ key:
|
|
25
|
-
],
|
|
26
|
-
class
|
|
17
|
+
}, g = 5, E = "reorderIcon_", h = [
|
|
18
|
+
{ key: L, label: "Product Image" },
|
|
19
|
+
{ key: tt, label: "Product Name" },
|
|
20
|
+
{ key: et, label: "Product Price" },
|
|
21
|
+
{ key: rt, label: "Product Original Price" },
|
|
22
|
+
{ key: ot, label: "Omnibus Price" },
|
|
23
|
+
{ key: st, label: "Omnibus Discount" },
|
|
24
|
+
{ key: B, label: "Product Button" }
|
|
25
|
+
], At = new Set(h.map((p) => p.key)), C = "customAttr_", R = "deleteAttr_";
|
|
26
|
+
class Ut extends Z {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments);
|
|
29
29
|
T(this, "store", lt());
|
|
@@ -47,23 +47,23 @@ class Ht extends tt {
|
|
|
47
47
|
${this._GuToggle(`visibility_${l.key}`)}
|
|
48
48
|
</div>
|
|
49
49
|
`).join(""), r = Array.from(
|
|
50
|
-
{ length:
|
|
50
|
+
{ length: g },
|
|
51
51
|
(l, u) => `
|
|
52
|
-
<div data-custom-select-key="${
|
|
52
|
+
<div data-custom-select-key="${C}${u}" style="display: none;">
|
|
53
53
|
${this._GuSelect({
|
|
54
|
-
name: `${
|
|
54
|
+
name: `${C}${u}`,
|
|
55
55
|
placeholder: this.api.translate("Select Attribute"),
|
|
56
56
|
options: []
|
|
57
57
|
})}
|
|
58
58
|
</div>
|
|
59
59
|
`
|
|
60
|
-
).join(""), e = h.length +
|
|
60
|
+
).join(""), e = h.length + g, o = Array.from(
|
|
61
61
|
{ length: e },
|
|
62
62
|
(l, u) => `
|
|
63
63
|
<div data-reorder-icon-key="${E}${u}" style="display: none;">
|
|
64
64
|
<${f.BUTTON}
|
|
65
65
|
class="drag-handle-btn flat-inline flat-white"
|
|
66
|
-
${
|
|
66
|
+
${I.BUTTON.name}="${E}${u}"
|
|
67
67
|
>
|
|
68
68
|
<${f.ICON}
|
|
69
69
|
src="reorder"
|
|
@@ -73,12 +73,12 @@ class Ht extends tt {
|
|
|
73
73
|
</div>
|
|
74
74
|
`
|
|
75
75
|
).join(""), s = Array.from(
|
|
76
|
-
{ length:
|
|
76
|
+
{ length: g },
|
|
77
77
|
(l, u) => `
|
|
78
78
|
<div data-custom-delete-key="${R}${u}" style="display: none;">
|
|
79
79
|
<${f.BUTTON}
|
|
80
80
|
class="custom-attr-delete flat-inline flat-white"
|
|
81
|
-
${
|
|
81
|
+
${I.BUTTON.name}="${R}${u}"
|
|
82
82
|
>
|
|
83
83
|
<${f.ICON}
|
|
84
84
|
src="delete"
|
|
@@ -89,15 +89,15 @@ class Ht extends tt {
|
|
|
89
89
|
`
|
|
90
90
|
).join(""), i = "https://academy.insiderone.com/docs/new-editor-email-recommendation-block", n = this.api.translate(
|
|
91
91
|
"Drag and drop the card elements to reorder them, adjust their visibility or add new attributes up to 5."
|
|
92
|
-
),
|
|
92
|
+
), a = this.api.translate("For more information, you can"), c = this.api.translate("visit Academy");
|
|
93
93
|
return `
|
|
94
94
|
<div class="recommendation-controls-container" data-card-composition-control>
|
|
95
95
|
<div class="container">
|
|
96
96
|
<p class="card-composition-description">
|
|
97
97
|
${n}
|
|
98
|
-
${
|
|
98
|
+
${a}
|
|
99
99
|
<!-- cspell:disable-next-line -->
|
|
100
|
-
<a href="${i}" target="_blank" rel="noopener noreferrer">${
|
|
100
|
+
<a href="${i}" target="_blank" rel="noopener noreferrer">${c}</a>.
|
|
101
101
|
</p>
|
|
102
102
|
</div>
|
|
103
103
|
|
|
@@ -120,7 +120,7 @@ class Ht extends tt {
|
|
|
120
120
|
<div class="orderable-list" data-composition-list></div>
|
|
121
121
|
|
|
122
122
|
${this._GuButton({
|
|
123
|
-
name:
|
|
123
|
+
name: x.ADD_ATTRIBUTE,
|
|
124
124
|
label: this.api.translate("Add Attribute"),
|
|
125
125
|
id: "guido__btn-add-attribute"
|
|
126
126
|
})}
|
|
@@ -141,7 +141,7 @@ class Ht extends tt {
|
|
|
141
141
|
const t = (e = this.getContainer()) == null ? void 0 : e.querySelector("[data-card-composition-control]");
|
|
142
142
|
if (!t)
|
|
143
143
|
return;
|
|
144
|
-
const r =
|
|
144
|
+
const r = gt(this.currentNode);
|
|
145
145
|
t.style.pointerEvents = r ? "none" : "", t.style.opacity = r ? "0.5" : "";
|
|
146
146
|
}
|
|
147
147
|
onTemplateNodeUpdated(t) {
|
|
@@ -163,8 +163,8 @@ class Ht extends tt {
|
|
|
163
163
|
this._applyVisibilityToBlock(t.key, r);
|
|
164
164
|
});
|
|
165
165
|
});
|
|
166
|
-
for (let t = 0; t <
|
|
167
|
-
const r = `${
|
|
166
|
+
for (let t = 0; t < g; t++) {
|
|
167
|
+
const r = `${C}${t}`, e = t;
|
|
168
168
|
this.api.onValueChanged(r, (o) => {
|
|
169
169
|
this._onCustomAttributeChanged(e, o);
|
|
170
170
|
});
|
|
@@ -176,42 +176,36 @@ class Ht extends tt {
|
|
|
176
176
|
_readCompositionFromNode() {
|
|
177
177
|
if (!this.currentNode || !("getAttribute" in this.currentNode))
|
|
178
178
|
return [...P];
|
|
179
|
-
const t = this.currentNode.getAttribute(
|
|
180
|
-
|
|
181
|
-
return t.split(",").filter(Boolean);
|
|
182
|
-
const { composition: r } = $.getConfig(this.currentNode);
|
|
183
|
-
return r != null && r.length ? [...r] : [...P];
|
|
179
|
+
const t = this.currentNode.getAttribute(V);
|
|
180
|
+
return t ? t.split(",").filter(Boolean) : [...P];
|
|
184
181
|
}
|
|
185
182
|
_readCustomAttributesFromNode() {
|
|
186
183
|
if (!this.currentNode || !("getAttribute" in this.currentNode))
|
|
187
184
|
return [];
|
|
188
|
-
const t = this.currentNode.getAttribute(
|
|
189
|
-
if (t)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
185
|
+
const t = this.currentNode.getAttribute(q);
|
|
186
|
+
if (!t)
|
|
187
|
+
return [];
|
|
188
|
+
try {
|
|
189
|
+
return JSON.parse(t);
|
|
190
|
+
} catch {
|
|
191
|
+
return [];
|
|
192
|
+
}
|
|
196
193
|
}
|
|
197
194
|
_readVisibilityFromRows() {
|
|
198
195
|
if (!this.currentNode)
|
|
199
196
|
return this._getDefaultVisibilities();
|
|
200
|
-
const t = Array.from(this.currentNode.querySelectorAll(
|
|
201
|
-
|
|
202
|
-
return this._mergeWithDefaults(r);
|
|
203
|
-
const e = $.getConfig(this.currentNode).visibility;
|
|
204
|
-
return this._mergeWithDefaults({ ...e });
|
|
197
|
+
const t = Array.from(this.currentNode.querySelectorAll(S)), r = this._extractVisibilityFromRows(t);
|
|
198
|
+
return this._mergeWithDefaults(r);
|
|
205
199
|
}
|
|
206
200
|
_getDefaultVisibilities() {
|
|
207
|
-
return { ...
|
|
201
|
+
return { ...F };
|
|
208
202
|
}
|
|
209
203
|
_extractVisibilityFromRows(t) {
|
|
210
204
|
const r = {};
|
|
211
205
|
return t.forEach((e) => {
|
|
212
206
|
if (!("getAttribute" in e))
|
|
213
207
|
return;
|
|
214
|
-
const o = e.getAttribute(y), s = e.getAttribute(
|
|
208
|
+
const o = e.getAttribute(y), s = e.getAttribute(v);
|
|
215
209
|
o && s !== null && (r[o] = this._parseVisibilityValue(s));
|
|
216
210
|
}), r;
|
|
217
211
|
}
|
|
@@ -219,7 +213,7 @@ class Ht extends tt {
|
|
|
219
213
|
return t === "1" || t === "true";
|
|
220
214
|
}
|
|
221
215
|
_mergeWithDefaults(t) {
|
|
222
|
-
return Object.entries(
|
|
216
|
+
return Object.entries(F).forEach(([r, e]) => {
|
|
223
217
|
r in t || (t[r] = e);
|
|
224
218
|
}), t;
|
|
225
219
|
}
|
|
@@ -243,19 +237,19 @@ class Ht extends tt {
|
|
|
243
237
|
return !1;
|
|
244
238
|
const s = new Set(r);
|
|
245
239
|
let i = 0, n = 0;
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
const l = h.find((u) => u.key ===
|
|
240
|
+
const a = t.map((c) => {
|
|
241
|
+
if (At.has(c)) {
|
|
242
|
+
const l = h.find((u) => u.key === c);
|
|
249
243
|
return this._createBuiltInItemHtml(l, n++);
|
|
250
244
|
}
|
|
251
|
-
if (
|
|
252
|
-
const l =
|
|
245
|
+
if (c.startsWith(m)) {
|
|
246
|
+
const l = c.substring(m.length);
|
|
253
247
|
if (s.has(l))
|
|
254
|
-
return this._createCustomItemHtml(
|
|
248
|
+
return this._createCustomItemHtml(c, i++, n++);
|
|
255
249
|
}
|
|
256
250
|
return "";
|
|
257
251
|
}).join("");
|
|
258
|
-
return this._rescueTogglesToStore(e), this._rescueSelectsToStore(e), this._rescueDeleteButtonsToStore(e), this._rescueReorderIconsToStore(e), o.innerHTML =
|
|
252
|
+
return this._rescueTogglesToStore(e), this._rescueSelectsToStore(e), this._rescueDeleteButtonsToStore(e), this._rescueReorderIconsToStore(e), o.innerHTML = a, this._moveTogglesIntoItems(e), this._moveSelectsIntoItems(e, r.length), this._moveDeleteButtonsIntoItems(e, r.length), this._moveReorderIconsIntoItems(e, n), !0;
|
|
259
253
|
}
|
|
260
254
|
/**
|
|
261
255
|
* Attempts to reorder existing orderable-item elements to match the composition order.
|
|
@@ -267,27 +261,27 @@ class Ht extends tt {
|
|
|
267
261
|
const e = Array.from(t.querySelectorAll(".orderable-item"));
|
|
268
262
|
if (e.length !== r.length)
|
|
269
263
|
return !1;
|
|
270
|
-
const o = e.map((
|
|
264
|
+
const o = e.map((c) => c.dataset.key).filter(Boolean);
|
|
271
265
|
if (o.length !== r.length)
|
|
272
266
|
return !1;
|
|
273
267
|
const s = [...o].sort().join(","), i = [...r].sort().join(",");
|
|
274
|
-
if (s !== i || r.some((
|
|
268
|
+
if (s !== i || r.some((c) => c.startsWith(m)))
|
|
275
269
|
return !1;
|
|
276
270
|
const n = /* @__PURE__ */ new Map();
|
|
277
|
-
e.forEach((
|
|
278
|
-
const { key: l } =
|
|
271
|
+
e.forEach((c) => {
|
|
272
|
+
const { key: l } = c.dataset;
|
|
279
273
|
if (l) {
|
|
280
274
|
const u = n.get(l) || [];
|
|
281
|
-
u.push(
|
|
275
|
+
u.push(c), n.set(l, u);
|
|
282
276
|
}
|
|
283
277
|
});
|
|
284
|
-
const
|
|
285
|
-
return r.forEach((
|
|
286
|
-
const l = n.get(
|
|
278
|
+
const a = /* @__PURE__ */ new Map();
|
|
279
|
+
return r.forEach((c) => {
|
|
280
|
+
const l = n.get(c);
|
|
287
281
|
if (!l)
|
|
288
282
|
return;
|
|
289
|
-
const u =
|
|
290
|
-
|
|
283
|
+
const u = a.get(c) || 0;
|
|
284
|
+
a.set(c, u + 1), l[u] && t.appendChild(l[u]);
|
|
291
285
|
}), !0;
|
|
292
286
|
}
|
|
293
287
|
_createBuiltInItemHtml(t, r) {
|
|
@@ -335,8 +329,8 @@ class Ht extends tt {
|
|
|
335
329
|
_initializeCustomSelects(t) {
|
|
336
330
|
t.length !== 0 && setTimeout(() => {
|
|
337
331
|
t.forEach((r, e) => {
|
|
338
|
-
const o = `${
|
|
339
|
-
this.api.setUIEAttribute(o,
|
|
332
|
+
const o = `${C}${e}`, s = this._getSelectOptions(r, t);
|
|
333
|
+
this.api.setUIEAttribute(o, I.SELECTPICKER.items, s), this.api.updateValues({ [o]: r });
|
|
340
334
|
});
|
|
341
335
|
}, 0);
|
|
342
336
|
}
|
|
@@ -359,7 +353,7 @@ class Ht extends tt {
|
|
|
359
353
|
*/
|
|
360
354
|
_moveSelectsIntoItems(t, r) {
|
|
361
355
|
for (let e = 0; e < r; e++) {
|
|
362
|
-
const o = `${
|
|
356
|
+
const o = `${C}${e}`, s = t.querySelector(`[data-custom-select-key="${o}"]`), i = t.querySelector(`[data-custom-select-slot="${e}"]`);
|
|
363
357
|
if (s && i) {
|
|
364
358
|
const n = s.querySelector("ue-select");
|
|
365
359
|
n && i.appendChild(n);
|
|
@@ -386,8 +380,8 @@ class Ht extends tt {
|
|
|
386
380
|
* Same rescue pattern as _rescueTogglesToStore — prevents innerHTML from destroying them.
|
|
387
381
|
*/
|
|
388
382
|
_rescueSelectsToStore(t) {
|
|
389
|
-
for (let r = 0; r <
|
|
390
|
-
const e = `${
|
|
383
|
+
for (let r = 0; r < g; r++) {
|
|
384
|
+
const e = `${C}${r}`, o = t.querySelector(`[data-custom-select-key="${e}"]`), s = t.querySelector(`[data-custom-select-slot="${r}"]`);
|
|
391
385
|
if (s) {
|
|
392
386
|
const i = s.querySelector("ue-select");
|
|
393
387
|
i && o && o.appendChild(i);
|
|
@@ -412,7 +406,7 @@ class Ht extends tt {
|
|
|
412
406
|
* Same rescue pattern as _rescueSelectsToStore — prevents innerHTML from destroying them.
|
|
413
407
|
*/
|
|
414
408
|
_rescueDeleteButtonsToStore(t) {
|
|
415
|
-
for (let r = 0; r <
|
|
409
|
+
for (let r = 0; r < g; r++) {
|
|
416
410
|
const e = `${R}${r}`, o = t.querySelector(`[data-custom-delete-key="${e}"]`), s = t.querySelector(`[data-custom-delete-slot="${r}"]`);
|
|
417
411
|
if (s) {
|
|
418
412
|
const i = s.querySelector("ue-button");
|
|
@@ -438,7 +432,7 @@ class Ht extends tt {
|
|
|
438
432
|
* Same rescue pattern as _rescueDeleteButtonsToStore — prevents innerHTML from destroying them.
|
|
439
433
|
*/
|
|
440
434
|
_rescueReorderIconsToStore(t) {
|
|
441
|
-
const r = h.length +
|
|
435
|
+
const r = h.length + g;
|
|
442
436
|
for (let e = 0; e < r; e++) {
|
|
443
437
|
const o = `${E}${e}`, s = t.querySelector(`[data-reorder-icon-key="${o}"]`), i = t.querySelector(`[data-reorder-icon-slot="${e}"]`);
|
|
444
438
|
if (i) {
|
|
@@ -464,24 +458,24 @@ class Ht extends tt {
|
|
|
464
458
|
_setupDragAndDrop(t, r) {
|
|
465
459
|
let e = null, o = null;
|
|
466
460
|
t.addEventListener("dragstart", (s) => {
|
|
467
|
-
var
|
|
461
|
+
var a;
|
|
468
462
|
const n = s.target.closest(".orderable-item");
|
|
469
|
-
n && (e = n, n.classList.add("dragging"), (
|
|
463
|
+
n && (e = n, n.classList.add("dragging"), (a = s.dataTransfer) == null || a.setData("text/plain", n.dataset.key || ""));
|
|
470
464
|
}, { signal: r }), t.addEventListener("dragend", () => {
|
|
471
465
|
e && e.classList.remove("dragging"), e = null, o == null || o.classList.remove("drag-over"), o = null;
|
|
472
466
|
}, { signal: r }), t.addEventListener("dragover", (s) => {
|
|
473
467
|
s.preventDefault();
|
|
474
|
-
const n = s.target.closest(".orderable-item"),
|
|
475
|
-
|
|
468
|
+
const n = s.target.closest(".orderable-item"), a = n && n !== e ? n : null;
|
|
469
|
+
a !== o && (o == null || o.classList.remove("drag-over"), o = a, o == null || o.classList.add("drag-over"));
|
|
476
470
|
}, { signal: r }), t.addEventListener("drop", (s) => {
|
|
477
471
|
s.preventDefault();
|
|
478
472
|
const n = s.target.closest(".orderable-item");
|
|
479
473
|
if (!n || !e || n === e)
|
|
480
474
|
return;
|
|
481
|
-
const
|
|
482
|
-
s.clientY <
|
|
483
|
-
const u = t.querySelectorAll(".orderable-item"),
|
|
484
|
-
this._onReorder(
|
|
475
|
+
const a = n.getBoundingClientRect(), c = a.top + a.height / 2;
|
|
476
|
+
s.clientY < c ? t.insertBefore(e, n) : t.insertBefore(e, n.nextSibling), o == null || o.classList.remove("drag-over"), o = null, e.classList.remove("dragging");
|
|
477
|
+
const u = t.querySelectorAll(".orderable-item"), d = Array.from(u).map((b) => b.dataset.key).filter(Boolean);
|
|
478
|
+
this._onReorder(d), e = null;
|
|
485
479
|
}, { signal: r });
|
|
486
480
|
}
|
|
487
481
|
_setupDeleteHandler(t, r) {
|
|
@@ -497,7 +491,7 @@ class Ht extends tt {
|
|
|
497
491
|
// Actions (Add, Delete, Reorder)
|
|
498
492
|
// ========================================================================
|
|
499
493
|
_onAddAttribute(t, r) {
|
|
500
|
-
const e = `${
|
|
494
|
+
const e = `${m}${t}`, o = this._readCompositionFromNode();
|
|
501
495
|
o.push(e);
|
|
502
496
|
const s = [...this._readCustomAttributesFromNode(), t];
|
|
503
497
|
this._updateBothAttributes(o, s), this._injectCustomAttributeHtml(t, r, e, o), this._renderOrderableItems(o, s), this._initializeCustomSelects(s), this._updateAddButtonState();
|
|
@@ -510,7 +504,7 @@ class Ht extends tt {
|
|
|
510
504
|
const r = this._readCustomAttributesFromNode();
|
|
511
505
|
if (r[t] === void 0)
|
|
512
506
|
return;
|
|
513
|
-
const o = this._readCompositionFromNode(), s = this._findNthCustomKeyIndex(o, t), i = o.filter((
|
|
507
|
+
const o = this._readCompositionFromNode(), s = this._findNthCustomKeyIndex(o, t), i = o.filter((a, c) => c !== s), n = r.filter((a, c) => c !== t);
|
|
514
508
|
this._updateBothAttributes(i, n), this._removeCustomAttributeHtml(i), this._renderOrderableItems(i, n), this._initializeCustomSelects(n), this._updateAddButtonState();
|
|
515
509
|
}
|
|
516
510
|
/**
|
|
@@ -521,13 +515,13 @@ class Ht extends tt {
|
|
|
521
515
|
const e = this._readCustomAttributesFromNode(), o = e[t];
|
|
522
516
|
if (o === void 0 || o === r)
|
|
523
517
|
return;
|
|
524
|
-
const s = `${
|
|
518
|
+
const s = `${m}${r}`, i = this._readCompositionFromNode(), n = this._findNthCustomKeyIndex(i, t);
|
|
525
519
|
n !== -1 && (i[n] = s), e[t] = r;
|
|
526
|
-
const
|
|
527
|
-
this._updateBothAttributes(i, e), this._injectCustomAttributeHtml(r,
|
|
520
|
+
const a = this._getDisplayNameForAttribute(r);
|
|
521
|
+
this._updateBothAttributes(i, e), this._injectCustomAttributeHtml(r, a, s, i), this._renderOrderableItems(i, e), this._initializeCustomSelects(e);
|
|
528
522
|
}
|
|
529
523
|
_onReorder(t) {
|
|
530
|
-
const r = t.filter((e) => e.startsWith(
|
|
524
|
+
const r = t.filter((e) => e.startsWith(m)).map((e) => e.substring(m.length));
|
|
531
525
|
this.reorderInProgress = !0;
|
|
532
526
|
try {
|
|
533
527
|
this._updateBothAttributes(t, r), this._getCurrentLayout() === "grid" && this._reorderProductAttributes(t);
|
|
@@ -545,61 +539,61 @@ class Ht extends tt {
|
|
|
545
539
|
this._getCurrentLayout() === "grid" ? this._injectGridAttributeRow(t, r, e, o) : this._injectListAttributeRow(t, r, e, o);
|
|
546
540
|
}
|
|
547
541
|
_injectGridAttributeRow(t, r, e, o) {
|
|
548
|
-
const s = this.currentNode.querySelectorAll(
|
|
542
|
+
const s = this.currentNode.querySelectorAll(N);
|
|
549
543
|
if (!(s != null && s.length))
|
|
550
544
|
return;
|
|
551
|
-
const i =
|
|
545
|
+
const i = nt.getConfig(this.currentNode), a = `0 ${Math.floor(i.columnSpacing / 2)}px`, c = this.api.getDocumentModifier(), l = this.store.recommendationProducts.length;
|
|
552
546
|
let u = 0;
|
|
553
|
-
s.forEach((
|
|
547
|
+
s.forEach((d) => {
|
|
554
548
|
var k;
|
|
555
|
-
const b =
|
|
556
|
-
if (
|
|
557
|
-
const
|
|
549
|
+
const b = d.querySelector(S), $ = ((k = b == null ? void 0 : b.querySelectorAll(`.${at}`)) == null ? void 0 : k.length) || 1, U = (100 / $).toFixed(2), { bgStyle: j, bgAttr: W } = this._extractSegmentBgFromCard(d), O = l > 0 ? Math.min($, l - u) : $, K = o.map((H) => {
|
|
550
|
+
if (H === e) {
|
|
551
|
+
const z = Array.from(
|
|
558
552
|
{ length: O },
|
|
559
|
-
(
|
|
560
|
-
const
|
|
553
|
+
(St, Y) => {
|
|
554
|
+
const X = this._resolveAttributeContent(
|
|
561
555
|
t,
|
|
562
556
|
r,
|
|
563
|
-
u +
|
|
557
|
+
u + Y
|
|
564
558
|
);
|
|
565
559
|
return this._getGridCellHtml(
|
|
566
560
|
t,
|
|
567
|
-
|
|
561
|
+
X,
|
|
568
562
|
U,
|
|
563
|
+
j,
|
|
569
564
|
W,
|
|
570
|
-
|
|
571
|
-
c
|
|
565
|
+
a
|
|
572
566
|
);
|
|
573
567
|
}
|
|
574
|
-
).join(""),
|
|
575
|
-
return `<tr class="recommendation-attribute-row" ${y}="${e}" ${
|
|
568
|
+
).join(""), G = dt(U, a).repeat($ - O);
|
|
569
|
+
return `<tr class="recommendation-attribute-row" ${y}="${e}" ${v}="1">${z}${G}</tr>`;
|
|
576
570
|
}
|
|
577
|
-
const D =
|
|
578
|
-
`${
|
|
571
|
+
const D = d.querySelector(
|
|
572
|
+
`${S}[${y}="${H}"]`
|
|
579
573
|
);
|
|
580
574
|
return D && "getOuterHTML" in D ? D.getOuterHTML() : "";
|
|
581
575
|
}).join("");
|
|
582
|
-
u += O, l > 0 && u >= l && (u = 0),
|
|
583
|
-
}),
|
|
576
|
+
u += O, l > 0 && u >= l && (u = 0), c.modifyHtml(d).setInnerHtml(K);
|
|
577
|
+
}), c.apply(new A(`${this.api.translate("Add custom attribute")}: ${r}`));
|
|
584
578
|
}
|
|
585
579
|
_injectListAttributeRow(t, r, e, o) {
|
|
586
|
-
const s = this.currentNode.querySelectorAll(
|
|
580
|
+
const s = this.currentNode.querySelectorAll(M);
|
|
587
581
|
if (!(s != null && s.length))
|
|
588
582
|
return;
|
|
589
|
-
const i = o.filter((
|
|
590
|
-
s.forEach((
|
|
583
|
+
const i = o.filter((a) => a !== L && a !== B), n = this.api.getDocumentModifier();
|
|
584
|
+
s.forEach((a, c) => {
|
|
591
585
|
const l = i.map((u) => {
|
|
592
586
|
if (u === e) {
|
|
593
|
-
const b = this._resolveAttributeContent(t, r,
|
|
587
|
+
const b = this._resolveAttributeContent(t, r, c);
|
|
594
588
|
return this._getListRowHtml(t, b, e);
|
|
595
589
|
}
|
|
596
|
-
const
|
|
597
|
-
`${
|
|
590
|
+
const d = a.querySelector(
|
|
591
|
+
`${S}[${y}="${u}"]`
|
|
598
592
|
);
|
|
599
|
-
return
|
|
593
|
+
return d && "getOuterHTML" in d ? d.getOuterHTML() : "";
|
|
600
594
|
}).join("");
|
|
601
|
-
n.modifyHtml(
|
|
602
|
-
}), n.apply(new
|
|
595
|
+
n.modifyHtml(a).setInnerHtml(l);
|
|
596
|
+
}), n.apply(new A(`${this.api.translate("Add custom attribute")}: ${r}`));
|
|
603
597
|
}
|
|
604
598
|
/**
|
|
605
599
|
* Removes a custom attribute by rebuilding product card content without it.
|
|
@@ -610,19 +604,19 @@ class Ht extends tt {
|
|
|
610
604
|
return;
|
|
611
605
|
const r = this._getCurrentLayout(), e = this.api.getDocumentModifier();
|
|
612
606
|
if (r === "grid") {
|
|
613
|
-
const o = this.currentNode.querySelectorAll(
|
|
607
|
+
const o = this.currentNode.querySelectorAll(N);
|
|
614
608
|
o == null || o.forEach((s) => {
|
|
615
609
|
const i = this._buildCompositionHtml(s, t);
|
|
616
610
|
e.modifyHtml(s).setInnerHtml(i);
|
|
617
611
|
});
|
|
618
612
|
} else {
|
|
619
|
-
const o = t.filter((i) => i !==
|
|
613
|
+
const o = t.filter((i) => i !== L && i !== B), s = this.currentNode.querySelectorAll(M);
|
|
620
614
|
s == null || s.forEach((i) => {
|
|
621
615
|
const n = this._buildCompositionHtml(i, o);
|
|
622
616
|
e.modifyHtml(i).setInnerHtml(n);
|
|
623
617
|
});
|
|
624
618
|
}
|
|
625
|
-
e.apply(new
|
|
619
|
+
e.apply(new A(this.api.translate("Remove custom attribute")));
|
|
626
620
|
}
|
|
627
621
|
// ========================================================================
|
|
628
622
|
// DOM Mutation (Block Root Attributes, Reorder)
|
|
@@ -635,13 +629,7 @@ class Ht extends tt {
|
|
|
635
629
|
* producing a flicker on the custom attribute dropdowns.
|
|
636
630
|
*/
|
|
637
631
|
_updateBothAttributes(t, r) {
|
|
638
|
-
|
|
639
|
-
return;
|
|
640
|
-
const e = {
|
|
641
|
-
...$.getConfig(this.currentNode),
|
|
642
|
-
composition: t
|
|
643
|
-
};
|
|
644
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(x, t.join(",")).setAttribute(F, JSON.stringify(r)).setNodeConfig(e).apply(new C(this.api.translate("Update card composition")));
|
|
632
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(V, t.join(",")).setAttribute(q, JSON.stringify(r)).apply(new A(this.api.translate("Update card composition")));
|
|
645
633
|
}
|
|
646
634
|
/**
|
|
647
635
|
* Reorders attribute rows within each product card based on composition order.
|
|
@@ -650,14 +638,14 @@ class Ht extends tt {
|
|
|
650
638
|
_reorderProductAttributes(t) {
|
|
651
639
|
if (!this.currentNode)
|
|
652
640
|
return;
|
|
653
|
-
const r = this.currentNode.querySelectorAll(
|
|
641
|
+
const r = this.currentNode.querySelectorAll(N);
|
|
654
642
|
if (!(r != null && r.length))
|
|
655
643
|
return;
|
|
656
644
|
const e = this.api.getDocumentModifier();
|
|
657
645
|
r.forEach((o) => {
|
|
658
646
|
const s = this._buildCompositionHtml(o, t);
|
|
659
647
|
e.modifyHtml(o).setInnerHtml(s);
|
|
660
|
-
}), e.apply(new
|
|
648
|
+
}), e.apply(new A(this.api.translate("Reorder product attributes")));
|
|
661
649
|
}
|
|
662
650
|
/**
|
|
663
651
|
* Builds HTML string with attributes ordered according to composition.
|
|
@@ -665,7 +653,7 @@ class Ht extends tt {
|
|
|
665
653
|
*/
|
|
666
654
|
_buildCompositionHtml(t, r) {
|
|
667
655
|
return r.reduce((e, o) => {
|
|
668
|
-
const s = t.querySelector(`${
|
|
656
|
+
const s = t.querySelector(`${S}[${y}="${o}"]`);
|
|
669
657
|
return s && "getOuterHTML" in s ? e + s.getOuterHTML() : e;
|
|
670
658
|
}, "");
|
|
671
659
|
}
|
|
@@ -675,19 +663,14 @@ class Ht extends tt {
|
|
|
675
663
|
_applyVisibilityToBlock(t, r) {
|
|
676
664
|
if (!this.currentNode)
|
|
677
665
|
return;
|
|
678
|
-
const e = this.currentNode.querySelectorAll(`${
|
|
666
|
+
const e = this.currentNode.querySelectorAll(`${S}[${y}="${t}"]`);
|
|
679
667
|
if (!(e != null && e.length))
|
|
680
668
|
return;
|
|
681
669
|
const o = r ? "1" : "0", s = r ? this.api.translate("visible") : this.api.translate("hidden"), i = `${this.api.translate("Set visibility")}: ${t} → ${s}`, n = this.api.getDocumentModifier();
|
|
682
670
|
e.forEach((a) => {
|
|
683
|
-
const
|
|
684
|
-
n.modifyHtml(a).setStyle("display",
|
|
685
|
-
});
|
|
686
|
-
const c = {
|
|
687
|
-
...$.getConfig(this.currentNode),
|
|
688
|
-
visibility: { ...this._readVisibilityFromRows(), [t]: r }
|
|
689
|
-
};
|
|
690
|
-
n.modifyHtml(this.currentNode).setNodeConfig(c), n.apply(new C(i));
|
|
671
|
+
const c = ft(a), l = r ? c : "none";
|
|
672
|
+
n.modifyHtml(a).setStyle("display", l).setAttribute(v, o);
|
|
673
|
+
}), n.apply(new A(i));
|
|
691
674
|
}
|
|
692
675
|
// ========================================================================
|
|
693
676
|
// Utilities
|
|
@@ -700,7 +683,7 @@ class Ht extends tt {
|
|
|
700
683
|
_findNthCustomKeyIndex(t, r) {
|
|
701
684
|
let e = 0;
|
|
702
685
|
for (let o = 0; o < t.length; o++)
|
|
703
|
-
if (t[o].startsWith(
|
|
686
|
+
if (t[o].startsWith(m)) {
|
|
704
687
|
if (e === r)
|
|
705
688
|
return o;
|
|
706
689
|
e++;
|
|
@@ -759,10 +742,10 @@ class Ht extends tt {
|
|
|
759
742
|
* or when all available filters have already been added (no unused attributes left).
|
|
760
743
|
*/
|
|
761
744
|
_updateAddButtonState() {
|
|
762
|
-
const t = this._readCustomAttributesFromNode(), r = t.length >=
|
|
745
|
+
const t = this._readCustomAttributesFromNode(), r = t.length >= g, e = new Set(t), o = this._getAddableFilters(), s = o.length > 0 && o.every((i) => e.has(i.attributeName));
|
|
763
746
|
this.api.setUIEAttribute(
|
|
764
|
-
|
|
765
|
-
|
|
747
|
+
x.ADD_ATTRIBUTE,
|
|
748
|
+
I.BUTTON.disabled,
|
|
766
749
|
r || s ? "true" : "false"
|
|
767
750
|
);
|
|
768
751
|
}
|
|
@@ -785,7 +768,7 @@ class Ht extends tt {
|
|
|
785
768
|
* excluding default attributes already covered by built-in toggle items.
|
|
786
769
|
*/
|
|
787
770
|
_getAddableFilters() {
|
|
788
|
-
return Object.values(this.store.filterList).filter((t) => !(t.type === "defaultAttribute" &&
|
|
771
|
+
return Object.values(this.store.filterList).filter((t) => !(t.type === "defaultAttribute" && it.has(t.attributeName)));
|
|
789
772
|
}
|
|
790
773
|
/**
|
|
791
774
|
* Looks up the display name for an attribute from the store's filterList.
|
|
@@ -802,28 +785,28 @@ class Ht extends tt {
|
|
|
802
785
|
_resolveAttributeContent(t, r, e) {
|
|
803
786
|
var n;
|
|
804
787
|
const s = this.store.recommendationProducts[e], i = pt(t, this.store.filterList) ? s == null ? void 0 : s[t] : (n = s == null ? void 0 : s.product_attributes) == null ? void 0 : n[t];
|
|
805
|
-
return
|
|
788
|
+
return _t(i) ?? r;
|
|
806
789
|
}
|
|
807
790
|
_getGridCellHtml(t, r, e, o = "", s = "", i = "") {
|
|
808
|
-
const n = `${
|
|
791
|
+
const n = `${m}${t}`, a = w(ct, [n], this.store.filterList), c = {
|
|
809
792
|
[t]: r,
|
|
810
793
|
product_attributes: { [t]: r }
|
|
811
794
|
};
|
|
812
|
-
let l =
|
|
795
|
+
let l = a[n](c);
|
|
813
796
|
return l = l.replace("<td", `<td width="${e}%"`), i && (l = l.replace(
|
|
814
797
|
`padding: ${ut}`,
|
|
815
798
|
`padding: ${i}`
|
|
816
799
|
)), o && (l = l.replace(/style="table-layout: fixed;"/, `style="table-layout: fixed; ${o}"`)), s && (l = l.replace(/border="0"/, `border="0" bgcolor="${s}"`)), l;
|
|
817
800
|
}
|
|
818
801
|
_getListRowHtml(t, r, e) {
|
|
819
|
-
const o =
|
|
802
|
+
const o = w(mt, [e], this.store.filterList), s = {
|
|
820
803
|
[t]: r,
|
|
821
804
|
product_attributes: { [t]: r }
|
|
822
805
|
}, n = o[e](s).replace(/<tr>/, "").replace(/<\/tr>/, "");
|
|
823
|
-
return `<tr class="recommendation-attribute-row" ${y}="${e}" ${
|
|
806
|
+
return `<tr class="recommendation-attribute-row" ${y}="${e}" ${v}="1">${n}</tr>`;
|
|
824
807
|
}
|
|
825
808
|
}
|
|
826
809
|
export {
|
|
827
810
|
yt as COMPOSITION_CONTROL_BLOCK_ID,
|
|
828
|
-
|
|
811
|
+
Ut as RecommendationCardCompositionControl
|
|
829
812
|
};
|
|
@@ -93,8 +93,8 @@ function $(e, t = {}) {
|
|
|
93
93
|
productsPerRow: c.mobileCardsInRow,
|
|
94
94
|
composition: d,
|
|
95
95
|
filterList: l.filterList,
|
|
96
|
-
//
|
|
97
|
-
cellPadding:
|
|
96
|
+
// Match the initial render's gutter so a regeneration never changes block height (SD-143023).
|
|
97
|
+
cellPadding: U(c.mobileColumnSpacing),
|
|
98
98
|
rowSpacingPx: c.mobileRowSpacing,
|
|
99
99
|
...t
|
|
100
100
|
})}</table></td>`, E = n.querySelector(N);
|
|
@@ -120,8 +120,8 @@ function ee(e, t = {}) {
|
|
|
120
120
|
productsPerRow: a,
|
|
121
121
|
composition: d,
|
|
122
122
|
filterList: c.filterList,
|
|
123
|
-
//
|
|
124
|
-
cellPadding:
|
|
123
|
+
// Match the initial render's gutter so a regeneration never changes block height (SD-143023).
|
|
124
|
+
cellPadding: U(p.columnSpacing),
|
|
125
125
|
rowSpacingPx: p.rowSpacing,
|
|
126
126
|
...t
|
|
127
127
|
});
|
|
@@ -277,7 +277,7 @@ function re(e, t, n) {
|
|
|
277
277
|
});
|
|
278
278
|
}), s;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function h(e, t, n) {
|
|
281
281
|
if (!("querySelectorAll" in e))
|
|
282
282
|
return !1;
|
|
283
283
|
const o = e.querySelectorAll(
|
|
@@ -321,12 +321,12 @@ function ge(e) {
|
|
|
321
321
|
`[esd-extension-block-id="${m.IMAGE}"]`
|
|
322
322
|
).length !== o.length)
|
|
323
323
|
return !1;
|
|
324
|
-
let i =
|
|
324
|
+
let i = h(r, n, o);
|
|
325
325
|
const u = C(t), c = S.getConfig(t);
|
|
326
326
|
if (u !== "list" && c.mobileLayoutEnabled && "querySelector" in t) {
|
|
327
327
|
const l = t.querySelector(O);
|
|
328
328
|
if (l) {
|
|
329
|
-
const a =
|
|
329
|
+
const a = h(
|
|
330
330
|
l,
|
|
331
331
|
n,
|
|
332
332
|
o
|
|
@@ -336,7 +336,7 @@ function ge(e) {
|
|
|
336
336
|
}
|
|
337
337
|
return i && n.apply(new g("Updated product content in-place")), !0;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function I(e, t, n) {
|
|
340
340
|
if (!("querySelectorAll" in e))
|
|
341
341
|
return !1;
|
|
342
342
|
const o = e.querySelectorAll(
|
|
@@ -370,12 +370,12 @@ function Se(e) {
|
|
|
370
370
|
if (r.length === 0)
|
|
371
371
|
return !1;
|
|
372
372
|
const s = j(t);
|
|
373
|
-
let i =
|
|
373
|
+
let i = I(s, n, r);
|
|
374
374
|
const u = C(t), c = S.getConfig(t);
|
|
375
375
|
if (u !== "list" && c.mobileLayoutEnabled && "querySelector" in t) {
|
|
376
376
|
const l = t.querySelector(O);
|
|
377
377
|
if (l) {
|
|
378
|
-
const a =
|
|
378
|
+
const a = I(l, n, r);
|
|
379
379
|
i = i || a;
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextAlignBuiltInControl as a, TextColorBuiltInControl as g, TextSizeBuiltInControl as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import { TextAlignBuiltInControl as a, TextColorBuiltInControl as g, TextSizeBuiltInControl as x, TextStyleBuiltInControl as f, TextFontFamilyBuiltInControl as C, ButtonBackgroundColorBuiltInControl as T, TextPaddingsBuiltInControl as B, ImageSizeBuiltInControl as I, ImageMarginsBuiltInControl as y, ButtonAlignBuiltInControl as m, ButtonBorderBuiltInControl as S, ButtonBorderRadiusBuiltInControl as A, ButtonColorBuiltInControl as b, ButtonFontFamilyBuiltInControl as N, ButtonMarginsBuiltInControl as q, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as k, ButtonTextSizeBuiltInControl as p, ButtonTextStyleAndFontColorBuiltInControl as F, ButtonFitToContainerBuiltInControl as h, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
const z = "buttonTextStyleForm";
|
|
3
|
+
function P(o, n, r) {
|
|
4
4
|
return class extends a {
|
|
5
5
|
getId() {
|
|
6
6
|
return o;
|
|
@@ -13,7 +13,7 @@ function z(o, n, r) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function _(o, n, r) {
|
|
17
17
|
return class extends g {
|
|
18
18
|
getId() {
|
|
19
19
|
return o;
|
|
@@ -26,8 +26,8 @@ function v(o, n, r) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return class extends
|
|
29
|
+
function v(o, n, r) {
|
|
30
|
+
return class extends x {
|
|
31
31
|
getId() {
|
|
32
32
|
return o;
|
|
33
33
|
}
|
|
@@ -39,8 +39,8 @@ function P(o, n, r) {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return class extends
|
|
42
|
+
function L(o, n, r) {
|
|
43
|
+
return class extends f {
|
|
44
44
|
getId() {
|
|
45
45
|
return o;
|
|
46
46
|
}
|
|
@@ -52,7 +52,7 @@ function D(o, n, r) {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function R(o, n, r) {
|
|
56
56
|
return class extends C {
|
|
57
57
|
getId() {
|
|
58
58
|
return o;
|
|
@@ -65,7 +65,7 @@ function K(o, n, r) {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function O(o, n, r) {
|
|
69
69
|
return class extends T {
|
|
70
70
|
getId() {
|
|
71
71
|
return o;
|
|
@@ -76,28 +76,9 @@ function L(o, n, r) {
|
|
|
76
76
|
const t = e.closest(r);
|
|
77
77
|
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
78
78
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Mirrors the picked background onto each target cell as an INLINE style.
|
|
81
|
-
*
|
|
82
|
-
* Stripo's built-in applies the background as a stylesheet rule, not inline. On
|
|
83
|
-
* regeneration we re-bake the captured color inline (cellBgStyleAttr); inline then
|
|
84
|
-
* outranks Stripo's rule in the cascade, so a later re-edit silently has no effect
|
|
85
|
-
* (SD-143023). Writing the inline here keeps it the single source of truth and in
|
|
86
|
-
* sync on every edit. Merged into the parent control's single patch (no extra apply).
|
|
87
|
-
*/
|
|
88
|
-
getAdditionalModifications(e) {
|
|
89
|
-
const t = this.getTargetNodes(e);
|
|
90
|
-
if (!t.length)
|
|
91
|
-
return;
|
|
92
|
-
const s = this.api.getValues()[_], i = !s || E.has(s), c = this.api.getDocumentModifier();
|
|
93
|
-
return t.forEach((u) => {
|
|
94
|
-
const l = c.modifyHtml(u);
|
|
95
|
-
i ? l.removeStyle("background-color") : l.setStyle("background-color", s);
|
|
96
|
-
}), c;
|
|
97
|
-
}
|
|
98
79
|
};
|
|
99
80
|
}
|
|
100
|
-
function
|
|
81
|
+
function Y(o, n, r) {
|
|
101
82
|
return class extends B {
|
|
102
83
|
getId() {
|
|
103
84
|
return o;
|
|
@@ -110,7 +91,7 @@ function U(o, n, r) {
|
|
|
110
91
|
}
|
|
111
92
|
};
|
|
112
93
|
}
|
|
113
|
-
function
|
|
94
|
+
function w(o, n, r) {
|
|
114
95
|
return class extends M {
|
|
115
96
|
getId() {
|
|
116
97
|
return o;
|
|
@@ -120,8 +101,8 @@ function Y(o, n, r) {
|
|
|
120
101
|
}
|
|
121
102
|
};
|
|
122
103
|
}
|
|
123
|
-
function
|
|
124
|
-
return class extends
|
|
104
|
+
function D(o, n, r = ".ins-recommendation-product-container") {
|
|
105
|
+
return class extends m {
|
|
125
106
|
getId() {
|
|
126
107
|
return o;
|
|
127
108
|
}
|
|
@@ -131,7 +112,7 @@ function w(o, n, r = ".ins-recommendation-product-container") {
|
|
|
131
112
|
}
|
|
132
113
|
};
|
|
133
114
|
}
|
|
134
|
-
function
|
|
115
|
+
function H(o, n, r = ".ins-recommendation-product-container") {
|
|
135
116
|
return class extends b {
|
|
136
117
|
getId() {
|
|
137
118
|
return o;
|
|
@@ -142,7 +123,7 @@ function G(o, n, r = ".ins-recommendation-product-container") {
|
|
|
142
123
|
}
|
|
143
124
|
};
|
|
144
125
|
}
|
|
145
|
-
function
|
|
126
|
+
function K(o, n, r = ".ins-recommendation-product-container") {
|
|
146
127
|
return class extends S {
|
|
147
128
|
getId() {
|
|
148
129
|
return o;
|
|
@@ -153,7 +134,7 @@ function H(o, n, r = ".ins-recommendation-product-container") {
|
|
|
153
134
|
}
|
|
154
135
|
};
|
|
155
136
|
}
|
|
156
|
-
function
|
|
137
|
+
function U(o, n, r = ".ins-recommendation-product-container") {
|
|
157
138
|
return class extends A {
|
|
158
139
|
getId() {
|
|
159
140
|
return o;
|
|
@@ -164,7 +145,7 @@ function V(o, n, r = ".ins-recommendation-product-container") {
|
|
|
164
145
|
}
|
|
165
146
|
};
|
|
166
147
|
}
|
|
167
|
-
function
|
|
148
|
+
function V(o, n, r = ".ins-recommendation-product-container") {
|
|
168
149
|
return class extends N {
|
|
169
150
|
getId() {
|
|
170
151
|
return o;
|
|
@@ -175,7 +156,7 @@ function W(o, n, r = ".ins-recommendation-product-container") {
|
|
|
175
156
|
}
|
|
176
157
|
};
|
|
177
158
|
}
|
|
178
|
-
function
|
|
159
|
+
function W(o, n, r = ".ins-recommendation-product-container") {
|
|
179
160
|
return class extends q {
|
|
180
161
|
getId() {
|
|
181
162
|
return o;
|
|
@@ -186,7 +167,7 @@ function X(o, n, r = ".ins-recommendation-product-container") {
|
|
|
186
167
|
}
|
|
187
168
|
};
|
|
188
169
|
}
|
|
189
|
-
function
|
|
170
|
+
function X(o, n, r = ".ins-recommendation-product-container") {
|
|
190
171
|
return class extends $ {
|
|
191
172
|
getId() {
|
|
192
173
|
return o;
|
|
@@ -197,7 +178,7 @@ function j(o, n, r = ".ins-recommendation-product-container") {
|
|
|
197
178
|
}
|
|
198
179
|
};
|
|
199
180
|
}
|
|
200
|
-
function
|
|
181
|
+
function j(o, n, r = ".ins-recommendation-product-container") {
|
|
201
182
|
return class extends k {
|
|
202
183
|
getId() {
|
|
203
184
|
return o;
|
|
@@ -208,7 +189,7 @@ function J(o, n, r = ".ins-recommendation-product-container") {
|
|
|
208
189
|
}
|
|
209
190
|
};
|
|
210
191
|
}
|
|
211
|
-
function
|
|
192
|
+
function G(o, n, r = ".ins-recommendation-product-container") {
|
|
212
193
|
return class extends p {
|
|
213
194
|
getId() {
|
|
214
195
|
return o;
|
|
@@ -219,8 +200,8 @@ function Q(o, n, r = ".ins-recommendation-product-container") {
|
|
|
219
200
|
}
|
|
220
201
|
};
|
|
221
202
|
}
|
|
222
|
-
function
|
|
223
|
-
return class extends
|
|
203
|
+
function J(o, n, r) {
|
|
204
|
+
return class extends F {
|
|
224
205
|
getId() {
|
|
225
206
|
return o;
|
|
226
207
|
}
|
|
@@ -242,21 +223,21 @@ function Z(o, n, r) {
|
|
|
242
223
|
const t = e.closest(r);
|
|
243
224
|
if (!t)
|
|
244
225
|
return;
|
|
245
|
-
const
|
|
246
|
-
if (!
|
|
226
|
+
const i = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
|
|
227
|
+
if (!i.length)
|
|
247
228
|
return;
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
229
|
+
const s = this.api.getValues()[z];
|
|
230
|
+
if (!s)
|
|
250
231
|
return;
|
|
251
|
-
const
|
|
252
|
-
return
|
|
253
|
-
l.modifyHtml(d).setStyle("font-weight",
|
|
232
|
+
const u = s.bold ? "bold" : "normal", c = s.italic ? "italic" : "normal", l = this.api.getDocumentModifier();
|
|
233
|
+
return i.forEach((d) => {
|
|
234
|
+
l.modifyHtml(d).setStyle("font-weight", u).setStyle("font-style", c);
|
|
254
235
|
}), l;
|
|
255
236
|
}
|
|
256
237
|
};
|
|
257
238
|
}
|
|
258
|
-
function
|
|
259
|
-
return class extends
|
|
239
|
+
function Q(o, n, r) {
|
|
240
|
+
return class extends h {
|
|
260
241
|
getId() {
|
|
261
242
|
return o;
|
|
262
243
|
}
|
|
@@ -266,8 +247,8 @@ function tt(o, n, r) {
|
|
|
266
247
|
}
|
|
267
248
|
};
|
|
268
249
|
}
|
|
269
|
-
function
|
|
270
|
-
return class extends
|
|
250
|
+
function Z(o, n, r) {
|
|
251
|
+
return class extends I {
|
|
271
252
|
getId() {
|
|
272
253
|
return o;
|
|
273
254
|
}
|
|
@@ -281,7 +262,7 @@ function et(o, n, r) {
|
|
|
281
262
|
}
|
|
282
263
|
};
|
|
283
264
|
}
|
|
284
|
-
function
|
|
265
|
+
function tt(o, n, r) {
|
|
285
266
|
return class extends y {
|
|
286
267
|
getId() {
|
|
287
268
|
return o;
|
|
@@ -297,25 +278,25 @@ function nt(o, n, r) {
|
|
|
297
278
|
};
|
|
298
279
|
}
|
|
299
280
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
281
|
+
D as createButtonAlignControl,
|
|
282
|
+
K as createButtonBorderControl,
|
|
283
|
+
U as createButtonBorderRadiusControl,
|
|
284
|
+
H as createButtonColorControl,
|
|
285
|
+
Q as createButtonFitToContainerControl,
|
|
286
|
+
V as createButtonFontFamilyControl,
|
|
287
|
+
W as createButtonMarginsControl,
|
|
288
|
+
X as createButtonPaddingsControl,
|
|
289
|
+
j as createButtonTextControl,
|
|
290
|
+
G as createButtonTextSizeControl,
|
|
291
|
+
J as createButtonTextStyleAndFontColorControl,
|
|
292
|
+
tt as createImageMarginsControl,
|
|
293
|
+
Z as createImageSizeControl,
|
|
294
|
+
Y as createPaddingsControl,
|
|
295
|
+
P as createTextAlignControl,
|
|
296
|
+
O as createTextBackgroundColorControl,
|
|
297
|
+
_ as createTextColorControl,
|
|
298
|
+
R as createTextFontFamilyControl,
|
|
299
|
+
w as createTextLineSpacingControl,
|
|
300
|
+
v as createTextSizeControl,
|
|
301
|
+
L as createTextStyleControl
|
|
321
302
|
};
|
|
@@ -74,11 +74,11 @@ export declare const TextBackgroundControl: {
|
|
|
74
74
|
new (): {
|
|
75
75
|
getId(): string;
|
|
76
76
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
77
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
78
77
|
getParentControlId(): string;
|
|
79
78
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
80
79
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
81
80
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
81
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
82
82
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
83
83
|
};
|
|
84
84
|
};
|
|
@@ -232,11 +232,11 @@ export declare const OriginalPriceControls: {
|
|
|
232
232
|
new (): {
|
|
233
233
|
getId(): string;
|
|
234
234
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
235
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
236
235
|
getParentControlId(): string;
|
|
237
236
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
238
237
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
239
238
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
239
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
240
240
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
241
241
|
};
|
|
242
242
|
};
|
|
@@ -318,11 +318,11 @@ export declare const PriceControls: {
|
|
|
318
318
|
new (): {
|
|
319
319
|
getId(): string;
|
|
320
320
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
321
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
322
321
|
getParentControlId(): string;
|
|
323
322
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
324
323
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
325
324
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
325
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
326
326
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
327
327
|
};
|
|
328
328
|
};
|
|
@@ -404,11 +404,11 @@ export declare const NameControls: {
|
|
|
404
404
|
new (): {
|
|
405
405
|
getId(): string;
|
|
406
406
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
407
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
408
407
|
getParentControlId(): string;
|
|
409
408
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
410
409
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
411
410
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
411
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
412
412
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
413
413
|
};
|
|
414
414
|
};
|
|
@@ -73,11 +73,11 @@ export declare const NameControls: {
|
|
|
73
73
|
new (): {
|
|
74
74
|
getId(): string;
|
|
75
75
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
76
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
77
76
|
getParentControlId(): string;
|
|
78
77
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
79
78
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
80
79
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
80
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
81
81
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
@@ -72,11 +72,11 @@ export declare const OldPriceControls: {
|
|
|
72
72
|
new (): {
|
|
73
73
|
getId(): string;
|
|
74
74
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
75
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
76
75
|
getParentControlId(): string;
|
|
77
76
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
78
77
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
79
78
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
79
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
80
80
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -75,11 +75,11 @@ export declare const OmnibusDiscountControls: {
|
|
|
75
75
|
new (): {
|
|
76
76
|
getId(): string;
|
|
77
77
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
78
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
79
78
|
getParentControlId(): string;
|
|
80
79
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
81
80
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
82
81
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
82
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
83
83
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
@@ -75,11 +75,11 @@ export declare const OmnibusPriceControls: {
|
|
|
75
75
|
new (): {
|
|
76
76
|
getId(): string;
|
|
77
77
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
78
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
79
78
|
getParentControlId(): string;
|
|
80
79
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
81
80
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
82
81
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
82
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
83
83
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
@@ -72,11 +72,11 @@ export declare const PriceControls: {
|
|
|
72
72
|
new (): {
|
|
73
73
|
getId(): string;
|
|
74
74
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
75
|
-
getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
76
75
|
getParentControlId(): string;
|
|
77
76
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
78
77
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
79
78
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
79
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
80
80
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -98,20 +98,11 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
|
|
|
98
98
|
new (): {
|
|
99
99
|
getId(): string;
|
|
100
100
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
101
|
-
/**
|
|
102
|
-
* Mirrors the picked background onto each target cell as an INLINE style.
|
|
103
|
-
*
|
|
104
|
-
* Stripo's built-in applies the background as a stylesheet rule, not inline. On
|
|
105
|
-
* regeneration we re-bake the captured color inline (cellBgStyleAttr); inline then
|
|
106
|
-
* outranks Stripo's rule in the cascade, so a later re-edit silently has no effect
|
|
107
|
-
* (SD-143023). Writing the inline here keeps it the single source of truth and in
|
|
108
|
-
* sync on every edit. Merged into the parent control's single patch (no extra apply).
|
|
109
|
-
*/
|
|
110
|
-
getAdditionalModifications(root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
111
101
|
getParentControlId(): string;
|
|
112
102
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
113
103
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
114
104
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
105
|
+
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
115
106
|
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
116
107
|
};
|
|
117
108
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.8.1-beta.
|
|
3
|
+
"version": "3.8.1-beta.84abfcd",
|
|
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",
|