@useinsider/guido 3.14.0-beta.a865e56 → 3.14.0-beta.a90f01a
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/composables/useHtmlValidator.js +89 -91
- package/dist/composables/useRecommendation.js +20 -19
- package/dist/config/migrator/checkboxMigrator.js +19 -20
- package/dist/config/migrator/radioButtonMigrator.js +25 -26
- package/dist/extensions/Blocks/Checkbox/extension.js +5 -6
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +14 -15
- package/dist/extensions/Blocks/Checkbox/template.js +9 -10
- package/dist/extensions/Blocks/RadioButton/extension.js +4 -5
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +11 -12
- package/dist/extensions/Blocks/RadioButton/template.js +9 -16
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +33 -34
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +13 -12
- package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
- package/dist/extensions/Blocks/controlFactories.js +115 -117
- package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
- package/package.json +1 -1
- package/dist/extensions/Blocks/Checkbox/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/Checkbox/constants/selectors.js +0 -6
- package/dist/extensions/Blocks/Checkbox/controls/blockBackground/index.js +0 -10
- package/dist/extensions/Blocks/RadioButton/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/RadioButton/constants/selectors.js +0 -6
- package/dist/extensions/Blocks/RadioButton/controls/blockBackground/index.js +0 -10
- package/dist/src/extensions/Blocks/Checkbox/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/Checkbox/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/Checkbox/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +0 -14
- package/dist/src/extensions/Blocks/RadioButton/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/RadioButton/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/RadioButton/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +0 -14
- package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
- package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -14
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { TextAlignBuiltInControl as C, TextColorBuiltInControl as x, TextSizeBuiltInControl as T, TextStyleBuiltInControl as B, TextFontFamilyBuiltInControl as m, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as y, ImageSizeBuiltInControl as b, ImageMarginsBuiltInControl as I, ButtonAlignBuiltInControl as S, ButtonBorderBuiltInControl as A, ButtonBorderRadiusBuiltInControl as k, ButtonColorBuiltInControl as N, ButtonFontFamilyBuiltInControl as h, ButtonMarginsBuiltInControl as p, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as q, ButtonTextSizeBuiltInControl as F, ButtonTextStyleAndFontColorBuiltInControl as v, ButtonFitToContainerBuiltInControl as R, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
const O = "buttonTextStyleForm", a = "backgroundColor", g = /* @__PURE__ */ new Set(["", "transparent", "rgba(0, 0, 0, 0)"]), _ = ["elementColor", a], E = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3
|
-
function P(o,
|
|
3
|
+
function P(o, n, r) {
|
|
4
4
|
return class extends C {
|
|
5
5
|
getId() {
|
|
6
6
|
return o;
|
|
7
7
|
}
|
|
8
|
-
getTargetNodes(
|
|
9
|
-
if (!
|
|
10
|
-
return [
|
|
11
|
-
const t =
|
|
12
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
8
|
+
getTargetNodes(e) {
|
|
9
|
+
if (!n || !r)
|
|
10
|
+
return [e];
|
|
11
|
+
const t = e.closest(r);
|
|
12
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function H(o,
|
|
16
|
+
function H(o, n, r) {
|
|
17
17
|
return class extends x {
|
|
18
18
|
getId() {
|
|
19
19
|
return o;
|
|
20
20
|
}
|
|
21
|
-
getTargetNodes(
|
|
22
|
-
if (!
|
|
23
|
-
return [
|
|
24
|
-
const t =
|
|
25
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
21
|
+
getTargetNodes(e) {
|
|
22
|
+
if (!n || !r)
|
|
23
|
+
return [e];
|
|
24
|
+
const t = e.closest(r);
|
|
25
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function U(o,
|
|
29
|
+
function U(o, n, r) {
|
|
30
30
|
return class extends T {
|
|
31
31
|
getId() {
|
|
32
32
|
return o;
|
|
33
33
|
}
|
|
34
|
-
getTargetNodes(
|
|
35
|
-
if (!
|
|
36
|
-
return [
|
|
37
|
-
const t =
|
|
38
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
34
|
+
getTargetNodes(e) {
|
|
35
|
+
if (!n || !r)
|
|
36
|
+
return [e];
|
|
37
|
+
const t = e.closest(r);
|
|
38
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function Y(o,
|
|
42
|
+
function Y(o, n, r) {
|
|
43
43
|
return class extends B {
|
|
44
44
|
getId() {
|
|
45
45
|
return o;
|
|
46
46
|
}
|
|
47
|
-
getTargetNodes(
|
|
48
|
-
if (!
|
|
49
|
-
return [
|
|
50
|
-
const t =
|
|
51
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
47
|
+
getTargetNodes(e) {
|
|
48
|
+
if (!n || !r)
|
|
49
|
+
return [e];
|
|
50
|
+
const t = e.closest(r);
|
|
51
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function G(o,
|
|
55
|
+
function G(o, n, r) {
|
|
56
56
|
return class extends m {
|
|
57
57
|
getId() {
|
|
58
58
|
return o;
|
|
59
59
|
}
|
|
60
|
-
getTargetNodes(
|
|
61
|
-
if (!
|
|
62
|
-
return [
|
|
63
|
-
const t =
|
|
64
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
60
|
+
getTargetNodes(e) {
|
|
61
|
+
if (!n || !r)
|
|
62
|
+
return [e];
|
|
63
|
+
const t = e.closest(r);
|
|
64
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function V(o,
|
|
68
|
+
function V(o, n, r) {
|
|
69
69
|
return class extends d {
|
|
70
70
|
getId() {
|
|
71
71
|
return o;
|
|
72
72
|
}
|
|
73
|
-
getTargetNodes(
|
|
74
|
-
if (!
|
|
75
|
-
return [
|
|
76
|
-
const t =
|
|
77
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
73
|
+
getTargetNodes(e) {
|
|
74
|
+
if (!n || !r)
|
|
75
|
+
return [e];
|
|
76
|
+
const t = e.closest(r);
|
|
77
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Mirrors the picked background onto each target cell as an INLINE style.
|
|
@@ -85,8 +85,8 @@ function V(o, e, r) {
|
|
|
85
85
|
* (SD-143023). Writing the inline here keeps it the single source of truth and in
|
|
86
86
|
* sync on every edit. Merged into the parent control's single patch (no extra apply).
|
|
87
87
|
*/
|
|
88
|
-
getAdditionalModifications(
|
|
89
|
-
const t = this.getTargetNodes(
|
|
88
|
+
getAdditionalModifications(e) {
|
|
89
|
+
const t = this.getTargetNodes(e);
|
|
90
90
|
if (!t.length)
|
|
91
91
|
return;
|
|
92
92
|
const i = this.api.getValues()[a], l = !i || g.has(i), s = this.api.getDocumentModifier();
|
|
@@ -98,25 +98,23 @@ function V(o, e, r) {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
function K(o) {
|
|
101
|
-
const
|
|
102
|
-
if (!
|
|
101
|
+
const n = _.find((e) => e in o);
|
|
102
|
+
if (!n)
|
|
103
103
|
return;
|
|
104
|
-
const r = o[
|
|
104
|
+
const r = o[n];
|
|
105
105
|
return typeof r == "string" ? r : "";
|
|
106
106
|
}
|
|
107
|
-
function L(o,
|
|
108
|
-
return
|
|
107
|
+
function L(o, n) {
|
|
108
|
+
return n.startsWith(".") && "hasClass" in o && o.hasClass(n.slice(1));
|
|
109
109
|
}
|
|
110
|
-
function z(o,
|
|
111
|
-
if (!e)
|
|
112
|
-
return o;
|
|
110
|
+
function z(o, n) {
|
|
113
111
|
try {
|
|
114
|
-
return L(o,
|
|
112
|
+
return L(o, n) ? o : o.closest(n) ?? void 0;
|
|
115
113
|
} catch {
|
|
116
114
|
return;
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
|
-
function w(o,
|
|
117
|
+
function w(o, n) {
|
|
120
118
|
return class extends d {
|
|
121
119
|
getId() {
|
|
122
120
|
return o;
|
|
@@ -127,8 +125,8 @@ function w(o, e) {
|
|
|
127
125
|
}
|
|
128
126
|
/** Guard: redirect the borrowed button parent onto the block `<td>` so it never paints the Buy buttons. */
|
|
129
127
|
getTargetNodes(r) {
|
|
130
|
-
const
|
|
131
|
-
return
|
|
128
|
+
const e = z(r, n);
|
|
129
|
+
return e ? [e] : [];
|
|
132
130
|
}
|
|
133
131
|
/**
|
|
134
132
|
* Writes the picked background onto the block as an inline style plus a `bgcolor`
|
|
@@ -137,147 +135,147 @@ function w(o, e) {
|
|
|
137
135
|
* channel Outlook honours on a `<td>`, and matches what the migrator emits.
|
|
138
136
|
*/
|
|
139
137
|
getAdditionalModifications(r) {
|
|
140
|
-
const [
|
|
141
|
-
if (!
|
|
138
|
+
const [e] = this.getTargetNodes(r);
|
|
139
|
+
if (!e)
|
|
142
140
|
return;
|
|
143
141
|
const t = K(this.api.getValues());
|
|
144
142
|
if (t === void 0)
|
|
145
143
|
return;
|
|
146
|
-
const i = !t || g.has(t), l = this.api.getDocumentModifier(), s = l.modifyHtml(
|
|
144
|
+
const i = !t || g.has(t), l = this.api.getDocumentModifier(), s = l.modifyHtml(e);
|
|
147
145
|
return i ? s.removeStyle("background-color").removeAttribute("bgcolor") : (s.setStyle("background-color", t), E.test(t) ? s.setAttribute("bgcolor", t) : s.removeAttribute("bgcolor")), l;
|
|
148
146
|
}
|
|
149
147
|
};
|
|
150
148
|
}
|
|
151
|
-
function W(o,
|
|
149
|
+
function W(o, n, r) {
|
|
152
150
|
return class extends y {
|
|
153
151
|
getId() {
|
|
154
152
|
return o;
|
|
155
153
|
}
|
|
156
|
-
getTargetNodes(
|
|
157
|
-
if (!
|
|
158
|
-
return [
|
|
159
|
-
const t =
|
|
160
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
154
|
+
getTargetNodes(e) {
|
|
155
|
+
if (!n || !r)
|
|
156
|
+
return [e];
|
|
157
|
+
const t = e.closest(r);
|
|
158
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
161
159
|
}
|
|
162
160
|
};
|
|
163
161
|
}
|
|
164
|
-
function X(o,
|
|
162
|
+
function X(o, n, r) {
|
|
165
163
|
return class extends M {
|
|
166
164
|
getId() {
|
|
167
165
|
return o;
|
|
168
166
|
}
|
|
169
|
-
getTargetNodes(
|
|
170
|
-
return [
|
|
167
|
+
getTargetNodes(e) {
|
|
168
|
+
return [e];
|
|
171
169
|
}
|
|
172
170
|
};
|
|
173
171
|
}
|
|
174
|
-
function j(o,
|
|
172
|
+
function j(o, n, r = ".ins-recommendation-product-container") {
|
|
175
173
|
return class extends S {
|
|
176
174
|
getId() {
|
|
177
175
|
return o;
|
|
178
176
|
}
|
|
179
|
-
getTargetNodes(
|
|
180
|
-
const t =
|
|
181
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
177
|
+
getTargetNodes(e) {
|
|
178
|
+
const t = e.closest(r);
|
|
179
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
182
180
|
}
|
|
183
181
|
};
|
|
184
182
|
}
|
|
185
|
-
function J(o,
|
|
183
|
+
function J(o, n, r = ".ins-recommendation-product-container") {
|
|
186
184
|
return class extends N {
|
|
187
185
|
getId() {
|
|
188
186
|
return o;
|
|
189
187
|
}
|
|
190
|
-
getTargetNodes(
|
|
191
|
-
const t =
|
|
192
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
188
|
+
getTargetNodes(e) {
|
|
189
|
+
const t = e.closest(r);
|
|
190
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
193
191
|
}
|
|
194
192
|
};
|
|
195
193
|
}
|
|
196
|
-
function Q(o,
|
|
194
|
+
function Q(o, n, r = ".ins-recommendation-product-container") {
|
|
197
195
|
return class extends A {
|
|
198
196
|
getId() {
|
|
199
197
|
return o;
|
|
200
198
|
}
|
|
201
|
-
getTargetNodes(
|
|
202
|
-
const t =
|
|
203
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
199
|
+
getTargetNodes(e) {
|
|
200
|
+
const t = e.closest(r);
|
|
201
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
204
202
|
}
|
|
205
203
|
};
|
|
206
204
|
}
|
|
207
|
-
function Z(o,
|
|
205
|
+
function Z(o, n, r = ".ins-recommendation-product-container") {
|
|
208
206
|
return class extends k {
|
|
209
207
|
getId() {
|
|
210
208
|
return o;
|
|
211
209
|
}
|
|
212
|
-
getTargetNodes(
|
|
213
|
-
const t =
|
|
214
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
210
|
+
getTargetNodes(e) {
|
|
211
|
+
const t = e.closest(r);
|
|
212
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
215
213
|
}
|
|
216
214
|
};
|
|
217
215
|
}
|
|
218
|
-
function tt(o,
|
|
216
|
+
function tt(o, n, r = ".ins-recommendation-product-container") {
|
|
219
217
|
return class extends h {
|
|
220
218
|
getId() {
|
|
221
219
|
return o;
|
|
222
220
|
}
|
|
223
|
-
getTargetNodes(
|
|
224
|
-
const t =
|
|
225
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
221
|
+
getTargetNodes(e) {
|
|
222
|
+
const t = e.closest(r);
|
|
223
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
226
224
|
}
|
|
227
225
|
};
|
|
228
226
|
}
|
|
229
|
-
function et(o,
|
|
227
|
+
function et(o, n, r = ".ins-recommendation-product-container") {
|
|
230
228
|
return class extends p {
|
|
231
229
|
getId() {
|
|
232
230
|
return o;
|
|
233
231
|
}
|
|
234
|
-
getTargetNodes(
|
|
235
|
-
const t =
|
|
236
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
232
|
+
getTargetNodes(e) {
|
|
233
|
+
const t = e.closest(r);
|
|
234
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
237
235
|
}
|
|
238
236
|
};
|
|
239
237
|
}
|
|
240
|
-
function nt(o,
|
|
238
|
+
function nt(o, n, r = ".ins-recommendation-product-container") {
|
|
241
239
|
return class extends $ {
|
|
242
240
|
getId() {
|
|
243
241
|
return o;
|
|
244
242
|
}
|
|
245
|
-
getTargetNodes(
|
|
246
|
-
const t =
|
|
247
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
243
|
+
getTargetNodes(e) {
|
|
244
|
+
const t = e.closest(r);
|
|
245
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
248
246
|
}
|
|
249
247
|
};
|
|
250
248
|
}
|
|
251
|
-
function rt(o,
|
|
249
|
+
function rt(o, n, r = ".ins-recommendation-product-container") {
|
|
252
250
|
return class extends q {
|
|
253
251
|
getId() {
|
|
254
252
|
return o;
|
|
255
253
|
}
|
|
256
|
-
getTargetNodes(
|
|
257
|
-
const t =
|
|
258
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
254
|
+
getTargetNodes(e) {
|
|
255
|
+
const t = e.closest(r);
|
|
256
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
259
257
|
}
|
|
260
258
|
};
|
|
261
259
|
}
|
|
262
|
-
function ot(o,
|
|
260
|
+
function ot(o, n, r = ".ins-recommendation-product-container") {
|
|
263
261
|
return class extends F {
|
|
264
262
|
getId() {
|
|
265
263
|
return o;
|
|
266
264
|
}
|
|
267
|
-
getTargetNodes(
|
|
268
|
-
const t =
|
|
269
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
265
|
+
getTargetNodes(e) {
|
|
266
|
+
const t = e.closest(r);
|
|
267
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
270
268
|
}
|
|
271
269
|
};
|
|
272
270
|
}
|
|
273
|
-
function st(o,
|
|
271
|
+
function st(o, n, r) {
|
|
274
272
|
return class extends v {
|
|
275
273
|
getId() {
|
|
276
274
|
return o;
|
|
277
275
|
}
|
|
278
|
-
getTargetNodes(
|
|
279
|
-
const t =
|
|
280
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
276
|
+
getTargetNodes(e) {
|
|
277
|
+
const t = e.closest(r);
|
|
278
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
281
279
|
}
|
|
282
280
|
/**
|
|
283
281
|
* Propagates Bold/Italic to ALL product buttons, not just the focused one.
|
|
@@ -289,11 +287,11 @@ function st(o, e, r) {
|
|
|
289
287
|
* (`buttonTextStyleForm.{bold,italic}`) because the patched node isn't updated yet
|
|
290
288
|
* when this runs. Returned modifications are merged into the parent control's patch.
|
|
291
289
|
*/
|
|
292
|
-
getAdditionalModifications(
|
|
293
|
-
const t =
|
|
290
|
+
getAdditionalModifications(e) {
|
|
291
|
+
const t = e.closest(r);
|
|
294
292
|
if (!t)
|
|
295
293
|
return;
|
|
296
|
-
const i = t.querySelectorAll(`[esd-extension-block-id="${
|
|
294
|
+
const i = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
|
|
297
295
|
if (!i.length)
|
|
298
296
|
return;
|
|
299
297
|
const l = this.api.getValues()[O];
|
|
@@ -306,41 +304,41 @@ function st(o, e, r) {
|
|
|
306
304
|
}
|
|
307
305
|
};
|
|
308
306
|
}
|
|
309
|
-
function it(o,
|
|
307
|
+
function it(o, n, r) {
|
|
310
308
|
return class extends R {
|
|
311
309
|
getId() {
|
|
312
310
|
return o;
|
|
313
311
|
}
|
|
314
|
-
getTargetNodes(
|
|
315
|
-
const t =
|
|
316
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
312
|
+
getTargetNodes(e) {
|
|
313
|
+
const t = e.closest(r);
|
|
314
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
317
315
|
}
|
|
318
316
|
};
|
|
319
317
|
}
|
|
320
|
-
function lt(o,
|
|
318
|
+
function lt(o, n, r) {
|
|
321
319
|
return class extends b {
|
|
322
320
|
getId() {
|
|
323
321
|
return o;
|
|
324
322
|
}
|
|
325
|
-
getTargetNodes(
|
|
323
|
+
getTargetNodes(e) {
|
|
326
324
|
try {
|
|
327
|
-
const t =
|
|
328
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
325
|
+
const t = e.closest(r);
|
|
326
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
329
327
|
} catch {
|
|
330
328
|
return [];
|
|
331
329
|
}
|
|
332
330
|
}
|
|
333
331
|
};
|
|
334
332
|
}
|
|
335
|
-
function ct(o,
|
|
333
|
+
function ct(o, n, r) {
|
|
336
334
|
return class extends I {
|
|
337
335
|
getId() {
|
|
338
336
|
return o;
|
|
339
337
|
}
|
|
340
|
-
getTargetNodes(
|
|
338
|
+
getTargetNodes(e) {
|
|
341
339
|
try {
|
|
342
|
-
const t =
|
|
343
|
-
return t ? t.querySelectorAll(`[esd-extension-block-id="${
|
|
340
|
+
const t = e.closest(r);
|
|
341
|
+
return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
|
|
344
342
|
} catch {
|
|
345
343
|
return [];
|
|
346
344
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the request/URL `productId` value from raw product ID segments.
|
|
3
|
+
* Trimming happens here — NOT on input change — so the user's in-progress
|
|
4
|
+
* text (trailing commas, spaces) is never rewritten under the caret (SD-147111).
|
|
5
|
+
*/
|
|
6
|
+
export declare function sanitizeProductIds(ids: string[]): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.14.0-beta.
|
|
3
|
+
"version": "3.14.0-beta.a90f01a",
|
|
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",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
|
|
2
|
-
import { CheckboxControlId as r } from "../../constants/controlIds.js";
|
|
3
|
-
import { BLOCK_ROOT_SELECTOR as C } from "../../constants/selectors.js";
|
|
4
|
-
const k = o(
|
|
5
|
-
r.BLOCK_BACKGROUND,
|
|
6
|
-
C
|
|
7
|
-
);
|
|
8
|
-
export {
|
|
9
|
-
k as CheckboxBlockBackgroundControl
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createBlockBackgroundColorControl as o } from "../../../controlFactories.js";
|
|
2
|
-
import { RadioButtonControlId as r } from "../../constants/controlIds.js";
|
|
3
|
-
import { BLOCK_ROOT_SELECTOR as t } from "../../constants/selectors.js";
|
|
4
|
-
const c = o(
|
|
5
|
-
r.BLOCK_BACKGROUND,
|
|
6
|
-
t
|
|
7
|
-
);
|
|
8
|
-
export {
|
|
9
|
-
c as RadioButtonBlockBackgroundControl
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checkbox Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the Checkbox extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { CheckboxControlId, BLOCK_ROOT_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { CheckboxControlId } from './controlIds';
|
|
10
|
-
export { BLOCK_ROOT_SELECTOR, CSS_CLASS_CHECKBOX_BLOCK, CSS_CLASS_CHECKBOX_BLOCK_V2, } from './selectors';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and class names used across the Checkbox extension
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Stable contract class present on BOTH legacy and v2 markup — the backend submit
|
|
6
|
-
* script selects by it. Renaming it silently breaks form submission.
|
|
7
|
-
*/
|
|
8
|
-
export declare const CSS_CLASS_CHECKBOX_BLOCK = "checkbox-block";
|
|
9
|
-
/** Current block class — what the template emits and the migrator upgrades legacy blocks to. */
|
|
10
|
-
export declare const CSS_CLASS_CHECKBOX_BLOCK_V2 = "checkbox-block-v2";
|
|
11
|
-
/**
|
|
12
|
-
* Block root selector — the block `<td>` itself.
|
|
13
|
-
* Used across block-level controls so edits apply to the whole block, not the title cell.
|
|
14
|
-
* Derived from the class so a rename cannot half-land.
|
|
15
|
-
*/
|
|
16
|
-
export declare const BLOCK_ROOT_SELECTOR = ".checkbox-block-v2";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const CheckboxBlockBackgroundControl: {
|
|
2
|
-
new (): {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getLabels(): {
|
|
5
|
-
title: string;
|
|
6
|
-
};
|
|
7
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
8
|
-
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;
|
|
9
|
-
getParentControlId(): string;
|
|
10
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
11
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
12
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RadioButton Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the RadioButton extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { RadioButtonControlId, BLOCK_ROOT_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { RadioButtonControlId } from './controlIds';
|
|
10
|
-
export { BLOCK_ROOT_SELECTOR, CSS_CLASS_RADIO_BUTTON_BLOCK, CSS_CLASS_RADIO_BUTTON_BLOCK_V2, } from './selectors';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and class names used across the RadioButton extension
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Stable contract class present on BOTH legacy and v2 markup — the backend submit
|
|
6
|
-
* script selects by it. Renaming it silently breaks form submission.
|
|
7
|
-
*/
|
|
8
|
-
export declare const CSS_CLASS_RADIO_BUTTON_BLOCK = "radio-button-block";
|
|
9
|
-
/** Current block class — what the template emits and the migrator upgrades legacy blocks to. */
|
|
10
|
-
export declare const CSS_CLASS_RADIO_BUTTON_BLOCK_V2 = "radio-button-v2";
|
|
11
|
-
/**
|
|
12
|
-
* Block root selector — the block `<td>` itself.
|
|
13
|
-
* Used across block-level controls so edits apply to the whole block, not the title cell.
|
|
14
|
-
* Derived from the class so a rename cannot half-land.
|
|
15
|
-
*/
|
|
16
|
-
export declare const BLOCK_ROOT_SELECTOR = ".radio-button-v2";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const RadioButtonBlockBackgroundControl: {
|
|
2
|
-
new (): {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getLabels(): {
|
|
5
|
-
title: string;
|
|
6
|
-
};
|
|
7
|
-
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
8
|
-
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;
|
|
9
|
-
getParentControlId(): string;
|
|
10
|
-
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
11
|
-
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
12
|
-
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { BlockControlId, BLOCK_ROOT_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { BlockControlId } from './controlIds';
|
|
10
|
-
export { BLOCK_ROOT_SELECTOR, CSS_CLASS_BLOCK, CSS_CLASS_BLOCK_V2, } from './selectors';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and class names used across the extension
|
|
3
|
-
*
|
|
4
|
-
* Declare them ONCE here and import everywhere (template, migrator, save validator,
|
|
5
|
-
* controls). The same literal re-typed across those files is how a rename half-lands.
|
|
6
|
-
*/
|
|
7
|
-
/** Stable contract class, if the backend selects this block by name. Renaming breaks it. */
|
|
8
|
-
export declare const CSS_CLASS_BLOCK = "{{your-block}}";
|
|
9
|
-
/** Current block class — what the template emits and the migrator upgrades legacy blocks to. */
|
|
10
|
-
export declare const CSS_CLASS_BLOCK_V2 = "{{your-block}}-v2";
|
|
11
|
-
/**
|
|
12
|
-
* Block root selector — the block `<td>` itself.
|
|
13
|
-
* Used across block-level controls so edits apply to the whole block, not the title cell.
|
|
14
|
-
* Derived from the class so a rename cannot half-land.
|
|
15
|
-
*/
|
|
16
|
-
export declare const BLOCK_ROOT_SELECTOR = ".{{your-block}}-v2";
|