@useinsider/guido 3.8.0-beta.84f6c0a → 3.8.0-beta.bf9ea20
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/config/compiler/utils/recommendationCompilerUtils.js +25 -19
- package/dist/extensions/Blocks/Items/block.js +48 -29
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +62 -45
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +10 -11
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +26 -24
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +39 -30
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +34 -28
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +333 -285
- package/dist/extensions/Blocks/Recommendation/extension.js +5 -6
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +2 -3
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +173 -142
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -56
- package/dist/extensions/Blocks/Recommendation/templates/index.js +8 -29
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +105 -132
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +23 -44
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +64 -112
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +19 -24
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +22 -30
- package/dist/extensions/Blocks/controlFactories.js +133 -159
- package/dist/src/extensions/Blocks/Items/block.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +1 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +47 -20
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +2 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +11 -165
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +9 -29
- package/dist/src/extensions/Blocks/controlFactories.d.ts +1 -11
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +0 -219
- package/dist/src/extensions/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +0 -78
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import { escapeHtml as
|
|
2
|
-
function
|
|
3
|
-
return "getInnerHTML" in
|
|
1
|
+
import { escapeHtml as m } from "../../../../utils/htmlEscape.js";
|
|
2
|
+
function T(t) {
|
|
3
|
+
return "getInnerHTML" in t && typeof t.getInnerHTML == "function" ? t.getInnerHTML().trim() : "innerHTML" in t ? t.innerHTML : "";
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
function H(t, f) {
|
|
6
|
+
const n = m(f);
|
|
7
|
+
if (!t)
|
|
8
|
+
return n;
|
|
9
|
+
const r = T(t);
|
|
10
|
+
if (!r || r.trim() === "" || !/<(strong|em|u|s|b|i)\b/i.test(r))
|
|
11
|
+
return n;
|
|
12
|
+
const e = [], s = [];
|
|
13
|
+
let o = r.trim();
|
|
8
14
|
for (; ; ) {
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
15
|
+
const u = o.match(/^<(strong|em|u|s|b|i)(\s[^>]*)?>(.*)$/is);
|
|
16
|
+
if (!u)
|
|
11
17
|
break;
|
|
12
|
-
const [, i, a = "",
|
|
13
|
-
if (!
|
|
18
|
+
const [, i, a = "", c] = u, g = new RegExp(`</${i}>$`, "i");
|
|
19
|
+
if (!g.test(c))
|
|
14
20
|
break;
|
|
15
|
-
|
|
21
|
+
e.push(`<${i}${a}>`), s.unshift(`</${i}>`), o = c.replace(g, "").trim();
|
|
16
22
|
}
|
|
17
|
-
return
|
|
18
|
-
}
|
|
19
|
-
function p(n, s) {
|
|
20
|
-
const t = g(s);
|
|
21
|
-
if (!n)
|
|
22
|
-
return t;
|
|
23
|
-
const r = u(n);
|
|
24
|
-
if (!r || r.trim() === "")
|
|
25
|
-
return t;
|
|
26
|
-
const { openTags: e, closeTags: i } = T(r);
|
|
27
|
-
return e ? e + t + i : t;
|
|
23
|
+
return e.length > 0 ? e.join("") + n + s.join("") : n;
|
|
28
24
|
}
|
|
29
25
|
export {
|
|
30
|
-
|
|
31
|
-
p as preserveTextStyles
|
|
26
|
+
H as preserveTextStyles
|
|
32
27
|
};
|
|
@@ -1,54 +1,46 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a(t) {
|
|
2
2
|
return typeof t == "object" && t !== null && "tagName" in t && typeof t.tagName == "string";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function n(t) {
|
|
5
5
|
return typeof t == "object" && t !== null && "getTagName" in t && typeof t.getTagName == "function";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function r(t) {
|
|
8
8
|
return typeof t == "object" && t !== null && "getStyle" in t && typeof t.getStyle == "function";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return typeof t == "object" && t !== null && "getComputedStyle" in t && typeof t.getComputedStyle == "function";
|
|
12
|
-
}
|
|
13
|
-
function y(t) {
|
|
14
|
-
return typeof t == "object" && t !== null && "getAttribute" in t && typeof t.getAttribute == "function";
|
|
15
|
-
}
|
|
16
|
-
function o(t) {
|
|
17
|
-
return typeof t == "object" && t !== null && "querySelectorAll" in t && typeof t.querySelectorAll == "function";
|
|
18
|
-
}
|
|
19
|
-
function l(t) {
|
|
10
|
+
function u(t) {
|
|
20
11
|
return typeof t == "object" && t !== null && "parent" in t && typeof t.parent == "function";
|
|
21
12
|
}
|
|
22
|
-
function g(t
|
|
23
|
-
return
|
|
13
|
+
function g(t) {
|
|
14
|
+
return typeof t == "object" && t !== null && "tagName" in t && t.tagName === "TD";
|
|
24
15
|
}
|
|
25
|
-
function
|
|
26
|
-
return !t || !
|
|
16
|
+
function p(t, e) {
|
|
17
|
+
return !t || !r(t) ? null : t.getStyle(e);
|
|
27
18
|
}
|
|
28
|
-
function
|
|
29
|
-
return t
|
|
19
|
+
function N(t) {
|
|
20
|
+
return !t || !u(t) ? null : t.parent() ?? null;
|
|
21
|
+
}
|
|
22
|
+
function l(t, e = "UNKNOWN") {
|
|
23
|
+
return t ? a(t) ? t.tagName.toUpperCase() : n(t) ? t.getTagName().toUpperCase() : e : e;
|
|
30
24
|
}
|
|
31
25
|
const f = /* @__PURE__ */ new Set(["TD", "BLOCK_IMAGE", "BLOCK_BUTTON"]);
|
|
32
26
|
function i(t) {
|
|
33
27
|
return f.has(t.toUpperCase());
|
|
34
28
|
}
|
|
35
29
|
function c(t) {
|
|
36
|
-
const e =
|
|
30
|
+
const e = l(t);
|
|
37
31
|
return i(e);
|
|
38
32
|
}
|
|
39
|
-
function
|
|
33
|
+
function s(t) {
|
|
40
34
|
return c(t) ? "table-cell" : "table-row";
|
|
41
35
|
}
|
|
42
36
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
n as hasGetStyle,
|
|
48
|
-
l as hasParent,
|
|
49
|
-
o as hasQuerySelectorAll,
|
|
37
|
+
s as getTableDisplayValue,
|
|
38
|
+
l as getTagName,
|
|
39
|
+
r as hasGetStyle,
|
|
40
|
+
u as hasParent,
|
|
50
41
|
c as isTableCellNode,
|
|
51
42
|
i as isTableCellTag,
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
g as isTdNode,
|
|
44
|
+
N as safeGetParent,
|
|
45
|
+
p as safeGetStyle
|
|
54
46
|
};
|
|
@@ -1,276 +1,250 @@
|
|
|
1
|
-
import { TextAlignBuiltInControl as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return class extends a {
|
|
1
|
+
import { TextAlignBuiltInControl as s, TextColorBuiltInControl as l, TextSizeBuiltInControl as u, TextStyleBuiltInControl as i, TextFontFamilyBuiltInControl as c, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as a, ImageSizeBuiltInControl as g, ImageMarginsBuiltInControl as x, ButtonAlignBuiltInControl as C, ButtonBorderBuiltInControl as f, ButtonBorderRadiusBuiltInControl as B, ButtonColorBuiltInControl as T, ButtonFontFamilyBuiltInControl as I, ButtonMarginsBuiltInControl as y, ButtonPaddingsBuiltInControl as m, ButtonTextBuiltInControl as A, ButtonTextSizeBuiltInControl as S, ButtonTextStyleAndFontColorBuiltInControl as N, ButtonFitToContainerBuiltInControl as b, TextLineSpacingBuiltInControl as q } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
function k(o, n, r) {
|
|
3
|
+
return class extends s {
|
|
5
4
|
getId() {
|
|
6
5
|
return o;
|
|
7
6
|
}
|
|
8
|
-
getTargetNodes(
|
|
7
|
+
getTargetNodes(t) {
|
|
9
8
|
if (!n || !r)
|
|
10
|
-
return [
|
|
11
|
-
const
|
|
12
|
-
return
|
|
9
|
+
return [t];
|
|
10
|
+
const e = t.closest(r);
|
|
11
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
return class extends
|
|
15
|
+
function p(o, n, r) {
|
|
16
|
+
return class extends l {
|
|
18
17
|
getId() {
|
|
19
18
|
return o;
|
|
20
19
|
}
|
|
21
|
-
getTargetNodes(
|
|
20
|
+
getTargetNodes(t) {
|
|
22
21
|
if (!n || !r)
|
|
23
|
-
return [
|
|
24
|
-
const
|
|
25
|
-
return
|
|
22
|
+
return [t];
|
|
23
|
+
const e = t.closest(r);
|
|
24
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
|
-
function
|
|
30
|
-
return class extends
|
|
28
|
+
function F(o, n, r) {
|
|
29
|
+
return class extends u {
|
|
31
30
|
getId() {
|
|
32
31
|
return o;
|
|
33
32
|
}
|
|
34
|
-
getTargetNodes(
|
|
33
|
+
getTargetNodes(t) {
|
|
35
34
|
if (!n || !r)
|
|
36
|
-
return [
|
|
37
|
-
const
|
|
38
|
-
return
|
|
35
|
+
return [t];
|
|
36
|
+
const e = t.closest(r);
|
|
37
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
|
-
function
|
|
43
|
-
return class extends
|
|
41
|
+
function z(o, n, r) {
|
|
42
|
+
return class extends i {
|
|
44
43
|
getId() {
|
|
45
44
|
return o;
|
|
46
45
|
}
|
|
47
|
-
getTargetNodes(
|
|
46
|
+
getTargetNodes(t) {
|
|
48
47
|
if (!n || !r)
|
|
49
|
-
return [
|
|
50
|
-
const
|
|
51
|
-
return
|
|
48
|
+
return [t];
|
|
49
|
+
const e = t.closest(r);
|
|
50
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
|
-
function
|
|
56
|
-
return class extends
|
|
54
|
+
function M(o, n, r) {
|
|
55
|
+
return class extends c {
|
|
57
56
|
getId() {
|
|
58
57
|
return o;
|
|
59
58
|
}
|
|
60
|
-
getTargetNodes(
|
|
59
|
+
getTargetNodes(t) {
|
|
61
60
|
if (!n || !r)
|
|
62
|
-
return [
|
|
63
|
-
const
|
|
64
|
-
return
|
|
61
|
+
return [t];
|
|
62
|
+
const e = t.closest(r);
|
|
63
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
65
64
|
}
|
|
66
65
|
};
|
|
67
66
|
}
|
|
68
|
-
function
|
|
69
|
-
return class extends
|
|
67
|
+
function P(o, n, r) {
|
|
68
|
+
return class extends d {
|
|
70
69
|
getId() {
|
|
71
70
|
return o;
|
|
72
71
|
}
|
|
73
|
-
getTargetNodes(
|
|
72
|
+
getTargetNodes(t) {
|
|
74
73
|
if (!n || !r)
|
|
75
|
-
return [
|
|
76
|
-
const
|
|
77
|
-
return
|
|
74
|
+
return [t];
|
|
75
|
+
const e = t.closest(r);
|
|
76
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
79
|
}
|
|
81
|
-
function
|
|
82
|
-
return class extends
|
|
80
|
+
function h(o, n, r) {
|
|
81
|
+
return class extends a {
|
|
83
82
|
getId() {
|
|
84
83
|
return o;
|
|
85
84
|
}
|
|
86
|
-
getTargetNodes(
|
|
85
|
+
getTargetNodes(t) {
|
|
87
86
|
if (!n || !r)
|
|
88
|
-
return [
|
|
89
|
-
const
|
|
90
|
-
return
|
|
87
|
+
return [t];
|
|
88
|
+
const e = t.closest(r);
|
|
89
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
92
|
}
|
|
94
|
-
function
|
|
95
|
-
return class extends
|
|
93
|
+
function L(o, n, r) {
|
|
94
|
+
return class extends q {
|
|
96
95
|
getId() {
|
|
97
96
|
return o;
|
|
98
97
|
}
|
|
99
|
-
getTargetNodes(
|
|
100
|
-
return [
|
|
98
|
+
getTargetNodes(t) {
|
|
99
|
+
return [t];
|
|
101
100
|
}
|
|
102
101
|
};
|
|
103
102
|
}
|
|
104
|
-
function
|
|
105
|
-
return class extends
|
|
103
|
+
function R(o, n, r = ".ins-recommendation-product-container") {
|
|
104
|
+
return class extends C {
|
|
106
105
|
getId() {
|
|
107
106
|
return o;
|
|
108
107
|
}
|
|
109
|
-
getTargetNodes(
|
|
110
|
-
const
|
|
111
|
-
return
|
|
108
|
+
getTargetNodes(t) {
|
|
109
|
+
const e = t.closest(r);
|
|
110
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
112
111
|
}
|
|
113
112
|
};
|
|
114
113
|
}
|
|
115
|
-
function
|
|
116
|
-
return class extends
|
|
114
|
+
function j(o, n, r = ".ins-recommendation-product-container") {
|
|
115
|
+
return class extends T {
|
|
117
116
|
getId() {
|
|
118
117
|
return o;
|
|
119
118
|
}
|
|
120
|
-
getTargetNodes(
|
|
121
|
-
const
|
|
122
|
-
return
|
|
119
|
+
getTargetNodes(t) {
|
|
120
|
+
const e = t.closest(r);
|
|
121
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
123
122
|
}
|
|
124
123
|
};
|
|
125
124
|
}
|
|
126
|
-
function
|
|
127
|
-
return class extends
|
|
125
|
+
function v(o, n, r = ".ins-recommendation-product-container") {
|
|
126
|
+
return class extends f {
|
|
128
127
|
getId() {
|
|
129
128
|
return o;
|
|
130
129
|
}
|
|
131
|
-
getTargetNodes(
|
|
132
|
-
const
|
|
133
|
-
return
|
|
130
|
+
getTargetNodes(t) {
|
|
131
|
+
const e = t.closest(r);
|
|
132
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
134
133
|
}
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
function
|
|
138
|
-
return class extends
|
|
136
|
+
function w(o, n, r = ".ins-recommendation-product-container") {
|
|
137
|
+
return class extends B {
|
|
139
138
|
getId() {
|
|
140
139
|
return o;
|
|
141
140
|
}
|
|
142
|
-
getTargetNodes(
|
|
143
|
-
const
|
|
144
|
-
return
|
|
141
|
+
getTargetNodes(t) {
|
|
142
|
+
const e = t.closest(r);
|
|
143
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
145
144
|
}
|
|
146
145
|
};
|
|
147
146
|
}
|
|
148
|
-
function
|
|
149
|
-
return class extends
|
|
147
|
+
function D(o, n, r = ".ins-recommendation-product-container") {
|
|
148
|
+
return class extends I {
|
|
150
149
|
getId() {
|
|
151
150
|
return o;
|
|
152
151
|
}
|
|
153
|
-
getTargetNodes(
|
|
154
|
-
const
|
|
155
|
-
return
|
|
152
|
+
getTargetNodes(t) {
|
|
153
|
+
const e = t.closest(r);
|
|
154
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
156
155
|
}
|
|
157
156
|
};
|
|
158
157
|
}
|
|
159
|
-
function
|
|
160
|
-
return class extends
|
|
158
|
+
function E(o, n, r = ".ins-recommendation-product-container") {
|
|
159
|
+
return class extends y {
|
|
161
160
|
getId() {
|
|
162
161
|
return o;
|
|
163
162
|
}
|
|
164
|
-
getTargetNodes(
|
|
165
|
-
const
|
|
166
|
-
return
|
|
163
|
+
getTargetNodes(t) {
|
|
164
|
+
const e = t.closest(r);
|
|
165
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
167
166
|
}
|
|
168
167
|
};
|
|
169
168
|
}
|
|
170
|
-
function
|
|
171
|
-
return class extends
|
|
169
|
+
function G(o, n, r = ".ins-recommendation-product-container") {
|
|
170
|
+
return class extends m {
|
|
172
171
|
getId() {
|
|
173
172
|
return o;
|
|
174
173
|
}
|
|
175
|
-
getTargetNodes(
|
|
176
|
-
const
|
|
177
|
-
return
|
|
174
|
+
getTargetNodes(t) {
|
|
175
|
+
const e = t.closest(r);
|
|
176
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
178
177
|
}
|
|
179
178
|
};
|
|
180
179
|
}
|
|
181
|
-
function
|
|
182
|
-
return class extends
|
|
180
|
+
function H(o, n, r = ".ins-recommendation-product-container") {
|
|
181
|
+
return class extends A {
|
|
183
182
|
getId() {
|
|
184
183
|
return o;
|
|
185
184
|
}
|
|
186
|
-
getTargetNodes(
|
|
187
|
-
const
|
|
188
|
-
return
|
|
185
|
+
getTargetNodes(t) {
|
|
186
|
+
const e = t.closest(r);
|
|
187
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
189
188
|
}
|
|
190
189
|
};
|
|
191
190
|
}
|
|
192
|
-
function
|
|
193
|
-
return class extends
|
|
191
|
+
function J(o, n, r = ".ins-recommendation-product-container") {
|
|
192
|
+
return class extends S {
|
|
194
193
|
getId() {
|
|
195
194
|
return o;
|
|
196
195
|
}
|
|
197
|
-
getTargetNodes(
|
|
198
|
-
const
|
|
199
|
-
return
|
|
196
|
+
getTargetNodes(t) {
|
|
197
|
+
const e = t.closest(r);
|
|
198
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
200
199
|
}
|
|
201
200
|
};
|
|
202
201
|
}
|
|
203
|
-
function
|
|
204
|
-
return class extends
|
|
202
|
+
function K(o, n, r) {
|
|
203
|
+
return class extends N {
|
|
205
204
|
getId() {
|
|
206
205
|
return o;
|
|
207
206
|
}
|
|
208
|
-
getTargetNodes(
|
|
209
|
-
const
|
|
210
|
-
return
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Propagates Bold/Italic to ALL product buttons, not just the focused one.
|
|
214
|
-
*
|
|
215
|
-
* Stripo's built-in applies font-color/size to every target node but writes
|
|
216
|
-
* the text-style (font-weight/font-style) only to the selected button. Bold/italic
|
|
217
|
-
* are plain inline CSS on the `<a class="es-button">` (no tags), so we mirror them
|
|
218
|
-
* onto every button's anchor. The toggle state comes from the control's form
|
|
219
|
-
* (`buttonTextStyleForm.{bold,italic}`) because the patched node isn't updated yet
|
|
220
|
-
* when this runs. Returned modifications are merged into the parent control's patch.
|
|
221
|
-
*/
|
|
222
|
-
getAdditionalModifications(e) {
|
|
223
|
-
const t = e.closest(r);
|
|
224
|
-
if (!t)
|
|
225
|
-
return;
|
|
226
|
-
const i = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
|
|
227
|
-
if (!i.length)
|
|
228
|
-
return;
|
|
229
|
-
const s = this.api.getValues()[z];
|
|
230
|
-
if (!s)
|
|
231
|
-
return;
|
|
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);
|
|
235
|
-
}), l;
|
|
207
|
+
getTargetNodes(t) {
|
|
208
|
+
const e = t.closest(r);
|
|
209
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
236
210
|
}
|
|
237
211
|
};
|
|
238
212
|
}
|
|
239
|
-
function
|
|
240
|
-
return class extends
|
|
213
|
+
function O(o, n, r) {
|
|
214
|
+
return class extends b {
|
|
241
215
|
getId() {
|
|
242
216
|
return o;
|
|
243
217
|
}
|
|
244
|
-
getTargetNodes(
|
|
245
|
-
const
|
|
246
|
-
return
|
|
218
|
+
getTargetNodes(t) {
|
|
219
|
+
const e = t.closest(r);
|
|
220
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
247
221
|
}
|
|
248
222
|
};
|
|
249
223
|
}
|
|
250
|
-
function
|
|
251
|
-
return class extends
|
|
224
|
+
function Q(o, n, r) {
|
|
225
|
+
return class extends g {
|
|
252
226
|
getId() {
|
|
253
227
|
return o;
|
|
254
228
|
}
|
|
255
|
-
getTargetNodes(
|
|
229
|
+
getTargetNodes(t) {
|
|
256
230
|
try {
|
|
257
|
-
const
|
|
258
|
-
return
|
|
231
|
+
const e = t.closest(r);
|
|
232
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
259
233
|
} catch {
|
|
260
234
|
return [];
|
|
261
235
|
}
|
|
262
236
|
}
|
|
263
237
|
};
|
|
264
238
|
}
|
|
265
|
-
function
|
|
266
|
-
return class extends
|
|
239
|
+
function U(o, n, r) {
|
|
240
|
+
return class extends x {
|
|
267
241
|
getId() {
|
|
268
242
|
return o;
|
|
269
243
|
}
|
|
270
|
-
getTargetNodes(
|
|
244
|
+
getTargetNodes(t) {
|
|
271
245
|
try {
|
|
272
|
-
const
|
|
273
|
-
return
|
|
246
|
+
const e = t.closest(r);
|
|
247
|
+
return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
274
248
|
} catch {
|
|
275
249
|
return [];
|
|
276
250
|
}
|
|
@@ -278,25 +252,25 @@ function tt(o, n, r) {
|
|
|
278
252
|
};
|
|
279
253
|
}
|
|
280
254
|
export {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
255
|
+
R as createButtonAlignControl,
|
|
256
|
+
v as createButtonBorderControl,
|
|
257
|
+
w as createButtonBorderRadiusControl,
|
|
258
|
+
j as createButtonColorControl,
|
|
259
|
+
O as createButtonFitToContainerControl,
|
|
260
|
+
D as createButtonFontFamilyControl,
|
|
261
|
+
E as createButtonMarginsControl,
|
|
262
|
+
G as createButtonPaddingsControl,
|
|
263
|
+
H as createButtonTextControl,
|
|
264
|
+
J as createButtonTextSizeControl,
|
|
265
|
+
K as createButtonTextStyleAndFontColorControl,
|
|
266
|
+
U as createImageMarginsControl,
|
|
267
|
+
Q as createImageSizeControl,
|
|
268
|
+
h as createPaddingsControl,
|
|
269
|
+
k as createTextAlignControl,
|
|
270
|
+
P as createTextBackgroundColorControl,
|
|
271
|
+
p as createTextColorControl,
|
|
272
|
+
M as createTextFontFamilyControl,
|
|
273
|
+
L as createTextLineSpacingControl,
|
|
274
|
+
F as createTextSizeControl,
|
|
275
|
+
z as createTextStyleControl
|
|
302
276
|
};
|
|
@@ -24,5 +24,13 @@ export declare class ItemsBlock extends Block {
|
|
|
24
24
|
getSettingsPanelTitleHtml(): string;
|
|
25
25
|
getTemplate(): string;
|
|
26
26
|
allowInnerBlocksDND(): boolean;
|
|
27
|
+
canBeSavedAsModule(): boolean;
|
|
27
28
|
onCreated(node: ImmutableHtmlNode): void;
|
|
29
|
+
/**
|
|
30
|
+
* Re-seeds nodeConfig from the persisted esd-ext-config when a saved module
|
|
31
|
+
* surfaces via document load. Stripo strips esd-ext-config and never restores it
|
|
32
|
+
* into nodeConfig, so without this a reused module would reset to defaults.
|
|
33
|
+
* Guarded to the nodeConfig-empty case so it runs once and never loops.
|
|
34
|
+
*/
|
|
35
|
+
onDocumentChanged(node: ImmutableHtmlNode): void;
|
|
28
36
|
}
|
|
@@ -120,11 +120,11 @@ export declare const ButtonControls: {
|
|
|
120
120
|
new (): {
|
|
121
121
|
getId(): string;
|
|
122
122
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
123
|
-
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;
|
|
124
123
|
getParentControlId(): string;
|
|
125
124
|
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
|
|
126
125
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
127
126
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
127
|
+
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;
|
|
128
128
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
@@ -55,7 +55,7 @@ export declare function getItemsBlockContainer(currentNode: ImmutableHtmlNode |
|
|
|
55
55
|
/**
|
|
56
56
|
* Gets the node configuration from the Items block.
|
|
57
57
|
* Uses Stripo V2's getNodeConfig() API.
|
|
58
|
-
* Falls back to
|
|
58
|
+
* Falls back to the persisted esd-ext-config (saved modules), then legacy config block.
|
|
59
59
|
* @param currentNode - The current node from the control
|
|
60
60
|
* @returns The ItemsBlockConfig object or null if not found
|
|
61
61
|
*/
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { RecommendationBlockId } from './blockIds';
|
|
10
10
|
export { RecommendationControlId } from './controlIds';
|
|
11
|
-
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR,
|
|
11
|
+
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
|
|
12
12
|
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
13
|
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -56,8 +56,6 @@ export declare const ATTR_CUSTOM_PREFIX = "customAttr:";
|
|
|
56
56
|
export declare const ATTR_DATA_CUSTOM_ATTRIBUTES = "data-custom-attributes";
|
|
57
57
|
/** HTML attribute on <td> elements identifying the product attribute for compiler template variable generation */
|
|
58
58
|
export declare const ATTR_PRODUCT_ATTR = "product-attr";
|
|
59
|
-
/** Prefix `resolveProductAttrValue` puts on custom (non-default) product attributes in `product-attr` values */
|
|
60
|
-
export declare const PRODUCT_ATTRIBUTE_PREFIX = "product_attribute.";
|
|
61
59
|
/**
|
|
62
60
|
* Default attribute names that are already represented by built-in composition toggle items.
|
|
63
61
|
* Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
|
|
@@ -120,11 +120,11 @@ export declare const ButtonControls: {
|
|
|
120
120
|
new (): {
|
|
121
121
|
getId(): string;
|
|
122
122
|
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
123
|
-
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;
|
|
124
123
|
getParentControlId(): string;
|
|
125
124
|
getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
|
|
126
125
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
127
126
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
127
|
+
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;
|
|
128
128
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
@@ -31,8 +31,7 @@ export declare class LayoutOrientationControl extends CommonControl {
|
|
|
31
31
|
* Regenerates product rows based on the selected layout
|
|
32
32
|
* Uses unified style-preserving regeneration to maintain user customizations
|
|
33
33
|
* @param layout - The layout to use for regeneration (passed explicitly to avoid stale DOM reads)
|
|
34
|
-
* @param composition - The preserved card composition, incl. customAttr:* entries
|
|
35
34
|
*/
|
|
36
|
-
_regenerateProductRows(layout: Orientation
|
|
35
|
+
_regenerateProductRows(layout: Orientation): void;
|
|
37
36
|
_listenToFormUpdates(): void;
|
|
38
37
|
}
|