@mgdis/stencil-helpers 3.2.16 → 3.2.17
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/index.es.js +50 -44
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -11
package/dist/index.es.js
CHANGED
|
@@ -227,7 +227,7 @@ var e = class {
|
|
|
227
227
|
}, T = (e) => {
|
|
228
228
|
let t = O(e, "childNodes");
|
|
229
229
|
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && E(t, e.tagName).forEach((e) => {
|
|
230
|
-
e.nodeType === 1 && e.tagName === "SLOT-FB" && (Ee(e, D(e), !1).length
|
|
230
|
+
e.nodeType === 1 && e.tagName === "SLOT-FB" && (e.hidden = !!Ee(e, D(e), !1).length);
|
|
231
231
|
});
|
|
232
232
|
let n = 0;
|
|
233
233
|
for (n = 0; n < t.length; n++) {
|
|
@@ -291,7 +291,8 @@ function O(e, t) {
|
|
|
291
291
|
if ("__" + t in e) {
|
|
292
292
|
let n = e["__" + t];
|
|
293
293
|
return typeof n == "function" ? n.bind(e) : n;
|
|
294
|
-
}
|
|
294
|
+
}
|
|
295
|
+
return typeof e[t] == "function" ? e[t].bind(e) : e[t];
|
|
295
296
|
}
|
|
296
297
|
var je = (e) => e != null && e !== void 0, Me = (e) => (e = typeof e, e === "object" || e === "function"), Ne = (e, t, ...n) => {
|
|
297
298
|
let r = null, i = !1, a = !1, o = [], s = (e) => {
|
|
@@ -318,40 +319,42 @@ var je = (e) => e != null && e !== void 0, Me = (e) => (e = typeof e, e === "obj
|
|
|
318
319
|
} else if (t === "style") {
|
|
319
320
|
for (let t in n) (!r || r[t] == null) && (t.includes("-") ? e.style.removeProperty(t) : e.style[t] = "");
|
|
320
321
|
for (let t in r) (!n || r[t] !== n[t]) && (t.includes("-") ? e.style.setProperty(t, r[t]) : e.style[t] = r[t]);
|
|
321
|
-
} else if (t !== "key")
|
|
322
|
-
|
|
323
|
-
if (t
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
} else if (t[0] === "a" && t.startsWith("attr:")) {
|
|
328
|
-
let n = t.slice(5), i;
|
|
329
|
-
{
|
|
330
|
-
let t = we(e);
|
|
331
|
-
if (t && t.$cmpMeta$ && t.$cmpMeta$.$members$) {
|
|
332
|
-
let e = t.$cmpMeta$.$members$[n];
|
|
333
|
-
e && e[1] && (i = e[1]);
|
|
322
|
+
} else if (t !== "key") {
|
|
323
|
+
if (t === "ref") r && qe(r, e);
|
|
324
|
+
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
325
|
+
if (t = t[2] === "-" ? t.slice(3) : x(C, c) ? c.slice(2) : c[2] + t.slice(3), n || r) {
|
|
326
|
+
let i = t.endsWith(Re);
|
|
327
|
+
t = t.replace(ze, ""), n && w.rel(e, t, n, i), r && w.ael(e, t, r, i);
|
|
334
328
|
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
return;
|
|
344
|
-
} else {
|
|
345
|
-
let o = Me(r);
|
|
346
|
-
if ((s || o && r !== null) && !i) try {
|
|
347
|
-
if (e.tagName.includes("-")) e[t] !== r && (e[t] = r);
|
|
348
|
-
else {
|
|
349
|
-
let i = r ?? "";
|
|
350
|
-
t === "list" ? s = !1 : (n == null || e[t] !== i) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = i : e.setAttribute(t, i));
|
|
329
|
+
} else if (t[0] === "a" && t.startsWith("attr:")) {
|
|
330
|
+
let n = t.slice(5), i;
|
|
331
|
+
{
|
|
332
|
+
let t = we(e);
|
|
333
|
+
if (t && t.$cmpMeta$ && t.$cmpMeta$.$members$) {
|
|
334
|
+
let e = t.$cmpMeta$.$members$[n];
|
|
335
|
+
e && e[1] && (i = e[1]);
|
|
336
|
+
}
|
|
351
337
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
338
|
+
i ||= n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), r == null || r === !1 ? (r !== !1 || e.getAttribute(i) === "") && e.removeAttribute(i) : e.setAttribute(i, r === !0 ? "" : r);
|
|
339
|
+
return;
|
|
340
|
+
} else if (t[0] === "p" && t.startsWith("prop:")) {
|
|
341
|
+
let n = t.slice(5);
|
|
342
|
+
try {
|
|
343
|
+
e[n] = r;
|
|
344
|
+
} catch {}
|
|
345
|
+
return;
|
|
346
|
+
} else {
|
|
347
|
+
let o = Me(r);
|
|
348
|
+
if ((s || o && r !== null) && !i) try {
|
|
349
|
+
if (e.tagName.includes("-")) e[t] !== r && (e[t] = r);
|
|
350
|
+
else {
|
|
351
|
+
let i = r ?? "";
|
|
352
|
+
t === "list" ? s = !1 : (n == null || e[t] !== i) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = i : e.setAttribute(t, i));
|
|
353
|
+
}
|
|
354
|
+
} catch {}
|
|
355
|
+
let l = !1;
|
|
356
|
+
c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, l = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (l ? e.removeAttributeNS(S, t) : e.removeAttribute(t)) : (!s || a & 4 || i) && !o && e.nodeType === 1 && (r = r === !0 ? "" : r, l ? e.setAttributeNS(S, t, r) : e.setAttribute(t, r));
|
|
357
|
+
}
|
|
355
358
|
}
|
|
356
359
|
}, Le = /\s/, A = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Le)), Re = "Capture", ze = RegExp(Re + "$"), j = (e, t, n, r) => {
|
|
357
360
|
let i = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, a = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
@@ -432,15 +435,17 @@ var M, N, P, F = !1, I = !1, L = !1, R = !1, z = [], B = [], V = (e, t, n) => {
|
|
|
432
435
|
if (e["s-sr"] && (t = e["s-cr"]) && t.parentNode) {
|
|
433
436
|
n = t.parentNode.__childNodes || t.parentNode.childNodes;
|
|
434
437
|
let i = e["s-sn"];
|
|
435
|
-
for (r = n.length - 1; r >= 0; r--) if (t = n[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== e["s-hn"] && (!t["s-sh"] || t["s-sh"] !== e["s-hn"]))
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
$slotRefNode
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
438
|
+
for (r = n.length - 1; r >= 0; r--) if (t = n[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== e["s-hn"] && (!t["s-sh"] || t["s-sh"] !== e["s-hn"])) {
|
|
439
|
+
if (De(t, i)) {
|
|
440
|
+
let n = K.find((e) => e.$nodeToRelocate$ === t);
|
|
441
|
+
I = !0, t["s-sn"] = t["s-sn"] || i, n ? (n.$nodeToRelocate$["s-sh"] = e["s-hn"], n.$slotRefNode$ = e) : (t["s-sh"] = e["s-hn"], K.push({
|
|
442
|
+
$slotRefNode$: e,
|
|
443
|
+
$nodeToRelocate$: t
|
|
444
|
+
})), t["s-sr"] && K.map((e) => {
|
|
445
|
+
De(e.$nodeToRelocate$, t["s-sn"]) && (n = K.find((e) => e.$nodeToRelocate$ === t), n && !e.$slotRefNode$ && (e.$slotRefNode$ = n.$slotRefNode$));
|
|
446
|
+
});
|
|
447
|
+
} else K.some((e) => e.$nodeToRelocate$ === t) || K.push({ $nodeToRelocate$: t });
|
|
448
|
+
}
|
|
444
449
|
}
|
|
445
450
|
e.nodeType === 1 && Ge(e);
|
|
446
451
|
}
|
|
@@ -722,7 +727,8 @@ var gt = (e, t = !1) => (e = e.replace(/<\s*textarea[^>]*>((.|\n)*?)<s*\/\s*text
|
|
|
722
727
|
if (d.length === 1) {
|
|
723
728
|
s[s.length - 1] = s.at(-1) + d;
|
|
724
729
|
return;
|
|
725
|
-
}
|
|
730
|
+
}
|
|
731
|
+
if (s[s.length - 1] = s.at(-1) + d.charAt(0), d = d.slice(1).trim(), d.length === 0) return;
|
|
726
732
|
}
|
|
727
733
|
let _ = n.repeat(g);
|
|
728
734
|
if (f) s.push(d);
|