@mgdis/stencil-helpers 1.1.8 → 2.0.0
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/README.md +2 -2
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/ide/index.d.ts +25 -4
- package/dist/ide/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +150 -125
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/storybook/index.d.ts +1 -1
- package/dist/storybook/index.d.ts.map +1 -1
- package/dist/tests/index.d.ts.map +1 -0
- package/dist/tests/unit.conf.d.ts.map +1 -0
- package/dist/tests/unit.d.ts.map +1 -0
- package/dist/{locale/index.conf.d.ts → types/index.d.ts} +1 -1
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +8 -7
- package/dist/locale/index.conf.d.ts.map +0 -1
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/unit.conf.d.ts.map +0 -1
- package/dist/test/unit.d.ts.map +0 -1
- /package/dist/{test → tests}/index.d.ts +0 -0
- /package/dist/{test → tests}/unit.conf.d.ts +0 -0
- /package/dist/{test → tests}/unit.d.ts +0 -0
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ var X = (e) => {
|
|
|
4
4
|
};
|
|
5
5
|
var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
6
6
|
var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || X("Cannot " + s);
|
|
7
|
-
var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)),
|
|
7
|
+
var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
8
8
|
const ze = (e = "", t = 10) => {
|
|
9
9
|
const s = new Uint8Array(t);
|
|
10
10
|
crypto.getRandomValues(s);
|
|
@@ -46,7 +46,7 @@ class Ie {
|
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()),
|
|
49
|
+
const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Je = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ke = (e) => {
|
|
50
50
|
const t = te(e), s = se(e);
|
|
51
51
|
return [e, ...t, ...s];
|
|
52
52
|
}, te = (e, t = []) => {
|
|
@@ -63,8 +63,8 @@ const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe =
|
|
|
63
63
|
for (const s of Array.from(e.frames))
|
|
64
64
|
t.push(s), se(s, t);
|
|
65
65
|
return t;
|
|
66
|
-
},
|
|
67
|
-
var
|
|
66
|
+
}, Qe = (e) => typeof e == "string" && e.trim() !== "", Ze = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Ye = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ve = async (e) => e();
|
|
67
|
+
var E = {
|
|
68
68
|
allRenderFn: !1,
|
|
69
69
|
cmpDidLoad: !0,
|
|
70
70
|
cmpDidUnload: !1,
|
|
@@ -147,7 +147,7 @@ var P = {
|
|
|
147
147
|
devTools: !1,
|
|
148
148
|
shadowDelegatesFocus: !0,
|
|
149
149
|
initializeNextTick: !1,
|
|
150
|
-
asyncLoading: !
|
|
150
|
+
asyncLoading: !0,
|
|
151
151
|
asyncQueue: !1,
|
|
152
152
|
transformTagName: !1,
|
|
153
153
|
attachStyles: !0,
|
|
@@ -156,9 +156,9 @@ var P = {
|
|
|
156
156
|
}, me = Object.defineProperty, be = (e, t) => {
|
|
157
157
|
for (var s in t)
|
|
158
158
|
me(e, s, { get: t[s], enumerable: !0 });
|
|
159
|
-
},
|
|
159
|
+
}, J = (e, t) => t in e, K = "http://www.w3.org/1999/xlink", q = typeof window < "u" ? window : {}, _ = q.document || { head: {} };
|
|
160
160
|
q.HTMLElement;
|
|
161
|
-
var
|
|
161
|
+
var L = {
|
|
162
162
|
$flags$: 0,
|
|
163
163
|
$resourcesUrl$: "",
|
|
164
164
|
jmp: (e) => e(),
|
|
@@ -166,7 +166,7 @@ var E = {
|
|
|
166
166
|
ael: (e, t, s, r) => e.addEventListener(t, s, r),
|
|
167
167
|
rel: (e, t, s, r) => e.removeEventListener(t, s, r),
|
|
168
168
|
ce: (e, t) => new CustomEvent(e, t)
|
|
169
|
-
},
|
|
169
|
+
}, Q = {}, Se = "http://www.w3.org/2000/svg", Te = "http://www.w3.org/1999/xhtml", ke = (e) => e != null, re = (e) => (e = typeof e, e === "object" || e === "function"), xe = {};
|
|
170
170
|
be(xe, {
|
|
171
171
|
err: () => oe,
|
|
172
172
|
map: () => Ae,
|
|
@@ -206,12 +206,12 @@ var Ee = (e) => {
|
|
|
206
206
|
let r = null, o = null, n = null, l = !1, a = !1;
|
|
207
207
|
const c = [], d = (i) => {
|
|
208
208
|
for (let $ = 0; $ < i.length; $++)
|
|
209
|
-
r = i[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((l = !re(r)) && (r = String(r)), l && a ? c[c.length - 1].$text$ += r : c.push(l ?
|
|
209
|
+
r = i[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((l = !re(r)) && (r = String(r)), l && a ? c[c.length - 1].$text$ += r : c.push(l ? W(null, r) : r), a = l);
|
|
210
210
|
};
|
|
211
211
|
d(s);
|
|
212
|
-
const f =
|
|
212
|
+
const f = W(e, null);
|
|
213
213
|
return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;
|
|
214
|
-
},
|
|
214
|
+
}, W = (e, t) => {
|
|
215
215
|
const s = {
|
|
216
216
|
$flags$: 0,
|
|
217
217
|
$tag$: e,
|
|
@@ -220,9 +220,9 @@ var Ee = (e) => {
|
|
|
220
220
|
$children$: null
|
|
221
221
|
};
|
|
222
222
|
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
223
|
-
}, Re = {}, Oe = (e) => e && e.$tag$ === Re,
|
|
223
|
+
}, Re = {}, Oe = (e) => e && e.$tag$ === Re, Z = (e, t, s, r, o, n) => {
|
|
224
224
|
if (s !== r) {
|
|
225
|
-
let l =
|
|
225
|
+
let l = J(e, t), a = t.toLowerCase();
|
|
226
226
|
if (t === "class") {
|
|
227
227
|
const c = e.classList, d = Y(s), f = Y(r);
|
|
228
228
|
c.remove(...d.filter((i) => i && !f.includes(i))), c.add(...f.filter((i) => i && !d.includes(i)));
|
|
@@ -234,9 +234,9 @@ var Ee = (e) => {
|
|
|
234
234
|
} else if (t !== "key") if (t === "ref")
|
|
235
235
|
r && r(e);
|
|
236
236
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
237
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
237
|
+
if (t[2] === "-" ? t = t.slice(3) : J(q, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {
|
|
238
238
|
const c = t.endsWith(ne);
|
|
239
|
-
t = t.replace(
|
|
239
|
+
t = t.replace(_e, ""), s && L.rel(e, t, s, c), r && L.ael(e, t, r, c);
|
|
240
240
|
}
|
|
241
241
|
} else {
|
|
242
242
|
const c = re(r);
|
|
@@ -246,20 +246,20 @@ var Ee = (e) => {
|
|
|
246
246
|
e[t] = r;
|
|
247
247
|
else {
|
|
248
248
|
const f = r ?? "";
|
|
249
|
-
t === "list" ? l = !1 : (s == null || e[t] != f) && (e[t] = f);
|
|
249
|
+
t === "list" ? l = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = f : e.setAttribute(t, f));
|
|
250
250
|
}
|
|
251
251
|
} catch {
|
|
252
252
|
}
|
|
253
253
|
let d = !1;
|
|
254
|
-
a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(
|
|
254
|
+
a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!l || n & 4 || o) && !c && (r = r === !0 ? "" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
}, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture",
|
|
258
|
-
const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ ||
|
|
257
|
+
}, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture", _e = new RegExp(ne + "$"), le = (e, t, s) => {
|
|
258
|
+
const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Q, n = t.$attrs$ || Q;
|
|
259
259
|
for (const l of V(Object.keys(o)))
|
|
260
|
-
l in n ||
|
|
260
|
+
l in n || Z(r, l, o[l], void 0, s, t.$flags$);
|
|
261
261
|
for (const l of V(Object.keys(n)))
|
|
262
|
-
|
|
262
|
+
Z(r, l, o[l], n[l], s, t.$flags$);
|
|
263
263
|
};
|
|
264
264
|
function V(e) {
|
|
265
265
|
return e.includes("ref") ? (
|
|
@@ -270,7 +270,7 @@ function V(e) {
|
|
|
270
270
|
e
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
var x,
|
|
273
|
+
var x, H, j, N = !1, F = !1, z = !1, h = !1, C = (e, t, s, r) => {
|
|
274
274
|
var o;
|
|
275
275
|
const n = t.$children$[s];
|
|
276
276
|
let l = 0, a, c, d;
|
|
@@ -284,45 +284,45 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
284
284
|
// where actual slot content should sit next to
|
|
285
285
|
1
|
|
286
286
|
))), n.$text$ !== null)
|
|
287
|
-
a = n.$elm$ =
|
|
287
|
+
a = n.$elm$ = _.createTextNode(n.$text$);
|
|
288
288
|
else if (n.$flags$ & 1)
|
|
289
|
-
a = n.$elm$ =
|
|
289
|
+
a = n.$elm$ = _.createTextNode("");
|
|
290
290
|
else {
|
|
291
|
-
if (h || (h = n.$tag$ === "svg"), a = n.$elm$ =
|
|
291
|
+
if (h || (h = n.$tag$ === "svg"), a = n.$elm$ = _.createElementNS(
|
|
292
292
|
h ? Se : Te,
|
|
293
|
-
!N &&
|
|
294
|
-
), h && n.$tag$ === "foreignObject" && (h = !1), le(null, n, h), ke(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
|
|
293
|
+
!N && E.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
294
|
+
), h && n.$tag$ === "foreignObject" && (h = !1), le(null, n, h), !!a.getRootNode().querySelector("body") && E.scoped && ke(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
|
|
295
295
|
for (l = 0; l < n.$children$.length; ++l)
|
|
296
|
-
c =
|
|
296
|
+
c = C(e, n, l, a), c && a.appendChild(c);
|
|
297
297
|
n.$tag$ === "svg" ? h = !1 : a.tagName === "foreignObject" && (h = !0);
|
|
298
298
|
}
|
|
299
|
-
return a["s-hn"] =
|
|
300
|
-
},
|
|
301
|
-
|
|
299
|
+
return a["s-hn"] = j, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = H, a["s-sn"] = n.$name$ || "", a["s-rf"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && R(e.$elm$, !1)), a;
|
|
300
|
+
}, R = (e, t) => {
|
|
301
|
+
L.$flags$ |= 1;
|
|
302
302
|
const s = Array.from(e.childNodes);
|
|
303
|
-
if (e["s-sr"] &&
|
|
303
|
+
if (e["s-sr"] && E.experimentalSlotFixes) {
|
|
304
304
|
let r = e;
|
|
305
305
|
for (; r = r.nextSibling; )
|
|
306
|
-
r && r["s-sn"] === e["s-sn"] && r["s-sh"] ===
|
|
306
|
+
r && r["s-sn"] === e["s-sn"] && r["s-sh"] === j && s.push(r);
|
|
307
307
|
}
|
|
308
308
|
for (let r = s.length - 1; r >= 0; r--) {
|
|
309
309
|
const o = s[r];
|
|
310
|
-
o["s-hn"] !==
|
|
310
|
+
o["s-hn"] !== j && o["s-ol"] && (T(ce(o), o, I(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, z = !0), t && R(o, t);
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
L.$flags$ &= -2;
|
|
313
313
|
}, ie = (e, t, s, r, o, n) => {
|
|
314
314
|
let l = e["s-cr"] && e["s-cr"].parentNode || e, a;
|
|
315
|
-
for (l.shadowRoot && l.tagName ===
|
|
316
|
-
r[o] && (a =
|
|
315
|
+
for (l.shadowRoot && l.tagName === j && (l = l.shadowRoot); o <= n; ++o)
|
|
316
|
+
r[o] && (a = C(null, s, o, e), a && (r[o].$elm$ = a, T(l, a, I(t))));
|
|
317
317
|
}, ae = (e, t, s) => {
|
|
318
318
|
for (let r = t; r <= s; ++r) {
|
|
319
319
|
const o = e[r];
|
|
320
320
|
if (o) {
|
|
321
321
|
const n = o.$elm$;
|
|
322
|
-
$e(o), n && (
|
|
322
|
+
$e(o), n && (F = !0, n["s-ol"] ? n["s-ol"].remove() : R(n, !0), n.remove());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
},
|
|
325
|
+
}, Ne = (e, t, s, r, o = !1) => {
|
|
326
326
|
let n = 0, l = 0, a = 0, c = 0, d = t.length - 1, f = t[0], i = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;
|
|
327
327
|
for (; n <= d && l <= $; )
|
|
328
328
|
if (f == null)
|
|
@@ -333,21 +333,21 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
333
333
|
u = r[++l];
|
|
334
334
|
else if (p == null)
|
|
335
335
|
p = r[--$];
|
|
336
|
-
else if (
|
|
336
|
+
else if (M(f, u, o))
|
|
337
337
|
A(f, u, o), f = t[++n], u = r[++l];
|
|
338
|
-
else if (
|
|
338
|
+
else if (M(i, p, o))
|
|
339
339
|
A(i, p, o), i = t[--d], p = r[--$];
|
|
340
|
-
else if (
|
|
341
|
-
(f.$tag$ === "slot" || p.$tag$ === "slot") &&
|
|
342
|
-
else if (
|
|
343
|
-
(f.$tag$ === "slot" || p.$tag$ === "slot") &&
|
|
340
|
+
else if (M(f, p, o))
|
|
341
|
+
(f.$tag$ === "slot" || p.$tag$ === "slot") && R(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, i.$elm$.nextSibling), f = t[++n], p = r[--$];
|
|
342
|
+
else if (M(i, u, o))
|
|
343
|
+
(f.$tag$ === "slot" || p.$tag$ === "slot") && R(i.$elm$.parentNode, !1), A(i, u, o), T(e, i.$elm$, f.$elm$), i = t[--d], u = r[++l];
|
|
344
344
|
else {
|
|
345
345
|
for (a = -1, c = n; c <= d; ++c)
|
|
346
346
|
if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {
|
|
347
347
|
a = c;
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
|
-
a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m =
|
|
350
|
+
a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = C(t && t[l], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++l]) : (m = C(t && t[l], s, l, e), u = r[++l]), m && T(ce(f.$elm$), m, I(f.$elm$));
|
|
351
351
|
}
|
|
352
352
|
n > d ? ie(
|
|
353
353
|
e,
|
|
@@ -357,10 +357,19 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
357
357
|
l,
|
|
358
358
|
$
|
|
359
359
|
) : l > $ && ae(t, n, d);
|
|
360
|
-
},
|
|
360
|
+
}, M = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? (
|
|
361
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
362
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
363
|
+
"$nodeId$" in e && s && // `leftNode` is not from type HTMLComment which would cause many
|
|
364
|
+
// hydration comments to be removed
|
|
365
|
+
e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$
|
|
366
|
+
) : s ? !0 : e.$key$ === t.$key$ : !1, I = (e) => e && e["s-ol"] || e, ce = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, A = (e, t, s = !1) => {
|
|
361
367
|
const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, l = t.$tag$, a = t.$text$;
|
|
362
368
|
let c;
|
|
363
|
-
a === null ? (h = l === "svg" ? !0 : l === "foreignObject" ? !1 : h, l === "slot" && !N || le(e, t, h), o !== null && n !== null ?
|
|
369
|
+
a === null ? (h = l === "svg" ? !0 : l === "foreignObject" ? !1 : h, l === "slot" && !N || le(e, t, h), o !== null && n !== null ? Ne(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = ""), ie(r, null, t, n, 0, n.length - 1)) : (
|
|
370
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
371
|
+
!s && E.updatable && o !== null && ae(o, 0, o.length - 1)
|
|
372
|
+
), h && l === "svg" && (h = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);
|
|
364
373
|
}, fe = (e) => {
|
|
365
374
|
const t = e.childNodes;
|
|
366
375
|
for (const s of t)
|
|
@@ -390,10 +399,10 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
390
399
|
s = t.parentNode.childNodes;
|
|
391
400
|
const n = o["s-sn"];
|
|
392
401
|
for (r = s.length - 1; r >= 0; r--)
|
|
393
|
-
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !
|
|
402
|
+
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !E.experimentalSlotFixes)
|
|
394
403
|
if (ee(t, n)) {
|
|
395
404
|
let l = b.find((a) => a.$nodeToRelocate$ === t);
|
|
396
|
-
|
|
405
|
+
F = !0, t["s-sn"] = t["s-sn"] || n, l ? (l.$nodeToRelocate$["s-sh"] = o["s-hn"], l.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
|
|
397
406
|
$slotRefNode$: o,
|
|
398
407
|
$nodeToRelocate$: t
|
|
399
408
|
})), t["s-sr"] && b.map((a) => {
|
|
@@ -428,20 +437,20 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
428
437
|
}
|
|
429
438
|
}, Fe = (e, t, s = !1) => {
|
|
430
439
|
var r, o, n, l, a;
|
|
431
|
-
const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ ||
|
|
432
|
-
if (
|
|
440
|
+
const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), i = Oe(t) ? t : je(null, null, t);
|
|
441
|
+
if (j = c.tagName, d.$attrsToReflect$ && (i.$attrs$ = i.$attrs$ || {}, d.$attrsToReflect$.map(
|
|
433
442
|
([$, u]) => i.$attrs$[u] = c[$]
|
|
434
443
|
)), s && i.$attrs$)
|
|
435
444
|
for (const $ of Object.keys(i.$attrs$))
|
|
436
445
|
c.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (i.$attrs$[$] = c[$]);
|
|
437
|
-
i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], N = (d.$flags$ & 1) !== 0,
|
|
446
|
+
i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], N = (d.$flags$ & 1) !== 0, H = c["s-cr"], F = !1, A(f, i, s);
|
|
438
447
|
{
|
|
439
|
-
if (
|
|
448
|
+
if (L.$flags$ |= 1, z) {
|
|
440
449
|
ue(i.$elm$);
|
|
441
450
|
for (const $ of b) {
|
|
442
451
|
const u = $.$nodeToRelocate$;
|
|
443
452
|
if (!u["s-ol"]) {
|
|
444
|
-
const p =
|
|
453
|
+
const p = _.createTextNode("");
|
|
445
454
|
p["s-nr"] = u, T(u.parentNode, u["s-ol"] = p, u);
|
|
446
455
|
}
|
|
447
456
|
}
|
|
@@ -451,9 +460,9 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
451
460
|
const m = p.parentNode;
|
|
452
461
|
let y = p.nextSibling;
|
|
453
462
|
{
|
|
454
|
-
let
|
|
455
|
-
for (;
|
|
456
|
-
let v = (o =
|
|
463
|
+
let O = (r = u["s-ol"]) == null ? void 0 : r.previousSibling;
|
|
464
|
+
for (; O; ) {
|
|
465
|
+
let v = (o = O["s-nr"]) != null ? o : null;
|
|
457
466
|
if (v && v["s-sn"] === u["s-sn"] && m === v.parentNode) {
|
|
458
467
|
for (v = v.nextSibling; v === u || v != null && v["s-sr"]; )
|
|
459
468
|
v = v == null ? void 0 : v.nextSibling;
|
|
@@ -462,7 +471,7 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
462
471
|
break;
|
|
463
472
|
}
|
|
464
473
|
}
|
|
465
|
-
|
|
474
|
+
O = O.previousSibling;
|
|
466
475
|
}
|
|
467
476
|
}
|
|
468
477
|
(!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u["s-ih"]) != null ? n : !1)), u && typeof p["s-rf"] == "function" && p["s-rf"](u);
|
|
@@ -470,12 +479,12 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
|
|
|
470
479
|
u.nodeType === 1 && (s && (u["s-ih"] = (l = u.hidden) != null ? l : !1), u.hidden = !0);
|
|
471
480
|
}
|
|
472
481
|
}
|
|
473
|
-
|
|
482
|
+
F && fe(i.$elm$), L.$flags$ &= -2, b.length = 0;
|
|
474
483
|
}
|
|
475
|
-
if (
|
|
484
|
+
if (E.experimentalScopedSlotChanges && d.$flags$ & 2)
|
|
476
485
|
for (const $ of i.$elm$.childNodes)
|
|
477
|
-
$["s-hn"] !==
|
|
478
|
-
|
|
486
|
+
$["s-hn"] !== j && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);
|
|
487
|
+
H = void 0;
|
|
479
488
|
};
|
|
480
489
|
const Ce = (e, t, s) => {
|
|
481
490
|
[null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
|
|
@@ -489,7 +498,7 @@ const Ce = (e, t, s) => {
|
|
|
489
498
|
}), s != null && s.innerHTML && (n.innerHTML = s.innerHTML), e.appendChild(n);
|
|
490
499
|
}
|
|
491
500
|
o && (e.innerHTML = o);
|
|
492
|
-
},
|
|
501
|
+
}, et = (e, t) => {
|
|
493
502
|
const s = {};
|
|
494
503
|
if (typeof e != "object")
|
|
495
504
|
throw new Error("filterArgs - args isn't an object.");
|
|
@@ -499,7 +508,7 @@ const Ce = (e, t, s) => {
|
|
|
499
508
|
(!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[n] = o);
|
|
500
509
|
}
|
|
501
510
|
return s;
|
|
502
|
-
},
|
|
511
|
+
}, tt = (e, t) => {
|
|
503
512
|
var r, o;
|
|
504
513
|
const s = document.getElementById("storybook-root");
|
|
505
514
|
if (s !== null)
|
|
@@ -516,17 +525,17 @@ const Ce = (e, t, s) => {
|
|
|
516
525
|
},
|
|
517
526
|
e(t)
|
|
518
527
|
), s.children[s.children.length - 1];
|
|
519
|
-
},
|
|
528
|
+
}, st = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
|
|
520
529
|
const o = document.createElement("div");
|
|
521
530
|
return pe(o, e, t, s, r), o.innerHTML;
|
|
522
|
-
},
|
|
531
|
+
}, D = (e, t) => {
|
|
523
532
|
if (!t)
|
|
524
533
|
return;
|
|
525
534
|
const s = t.split("/");
|
|
526
535
|
return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
527
536
|
};
|
|
528
|
-
var S,
|
|
529
|
-
class
|
|
537
|
+
var S, w;
|
|
538
|
+
class rt {
|
|
530
539
|
constructor(t) {
|
|
531
540
|
/**
|
|
532
541
|
* JsonDocs
|
|
@@ -537,14 +546,14 @@ class st {
|
|
|
537
546
|
* @param tagName - tag name we want to get the data from
|
|
538
547
|
* @returns component data
|
|
539
548
|
*/
|
|
540
|
-
|
|
549
|
+
P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
|
|
541
550
|
/**
|
|
542
551
|
* Get the control for the given prop
|
|
543
552
|
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
544
553
|
* @param prop - prop to get control for
|
|
545
554
|
* @returns control type and options if applicable
|
|
546
555
|
*/
|
|
547
|
-
|
|
556
|
+
P(this, w, (t) => {
|
|
548
557
|
const s = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
|
|
549
558
|
return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r == null ? void 0 : r.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
|
|
550
559
|
});
|
|
@@ -555,7 +564,7 @@ class st {
|
|
|
555
564
|
*/
|
|
556
565
|
g(this, "extractArgTypes", (t) => {
|
|
557
566
|
const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, i) => {
|
|
558
|
-
const { control: $, options: u } = k(this,
|
|
567
|
+
const { control: $, options: u } = k(this, w).call(this, i);
|
|
559
568
|
return {
|
|
560
569
|
...f,
|
|
561
570
|
[i.name]: {
|
|
@@ -630,7 +639,7 @@ class st {
|
|
|
630
639
|
...f,
|
|
631
640
|
[i]: {
|
|
632
641
|
name: i,
|
|
633
|
-
description: `<a href="./?path=/docs/${
|
|
642
|
+
description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
634
643
|
table: {
|
|
635
644
|
category: "depends on",
|
|
636
645
|
type: { summary: void 0 }
|
|
@@ -643,7 +652,7 @@ class st {
|
|
|
643
652
|
...f,
|
|
644
653
|
[i]: {
|
|
645
654
|
name: i,
|
|
646
|
-
description: `<a href="./?path=/docs/${
|
|
655
|
+
description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
|
|
647
656
|
table: {
|
|
648
657
|
category: "used by",
|
|
649
658
|
type: { summary: void 0 }
|
|
@@ -673,7 +682,7 @@ class st {
|
|
|
673
682
|
this.jsonDoc = t;
|
|
674
683
|
}
|
|
675
684
|
}
|
|
676
|
-
S = new WeakMap(),
|
|
685
|
+
S = new WeakMap(), w = new WeakMap();
|
|
677
686
|
const De = (e, t) => {
|
|
678
687
|
if (t)
|
|
679
688
|
return `${e}${t}`;
|
|
@@ -703,9 +712,9 @@ const De = (e, t) => {
|
|
|
703
712
|
`, t += e.slots.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
|
|
704
713
|
`).join(""), t += `
|
|
705
714
|
`), t;
|
|
706
|
-
},
|
|
715
|
+
}, B = (e) => `${e.docs}
|
|
707
716
|
|
|
708
|
-
Type: \`${e.type}\``,
|
|
717
|
+
Type: \`${e.type}\``, ot = (e, t, s, r) => ({
|
|
709
718
|
$schema: "https://json.schemastore.org/web-types",
|
|
710
719
|
name: e,
|
|
711
720
|
version: t,
|
|
@@ -713,14 +722,14 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
|
713
722
|
contributions: {
|
|
714
723
|
html: {
|
|
715
724
|
elements: s.components.map((o) => {
|
|
716
|
-
const n =
|
|
725
|
+
const n = D(r, o.filePath);
|
|
717
726
|
return {
|
|
718
727
|
name: o.tag,
|
|
719
728
|
description: ge(o),
|
|
720
729
|
"doc-url": n,
|
|
721
730
|
attributes: o.props.filter((l) => l.attr).map((l) => ({
|
|
722
731
|
name: l.attr,
|
|
723
|
-
description:
|
|
732
|
+
description: B(l),
|
|
724
733
|
"doc-url": n,
|
|
725
734
|
value: {
|
|
726
735
|
type: l.type,
|
|
@@ -731,7 +740,7 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
|
731
740
|
js: {
|
|
732
741
|
properties: o.props.map((l) => ({
|
|
733
742
|
name: l.name,
|
|
734
|
-
description:
|
|
743
|
+
description: B(l),
|
|
735
744
|
"doc-url": n,
|
|
736
745
|
value: {
|
|
737
746
|
type: l.type,
|
|
@@ -743,45 +752,59 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
|
743
752
|
name: l.event,
|
|
744
753
|
description: l.docs
|
|
745
754
|
}))
|
|
755
|
+
},
|
|
756
|
+
css: {
|
|
757
|
+
properties: o.styles.map((l) => ({
|
|
758
|
+
name: l.name,
|
|
759
|
+
description: l.docs
|
|
760
|
+
}))
|
|
746
761
|
}
|
|
747
762
|
};
|
|
748
763
|
})
|
|
749
764
|
}
|
|
750
765
|
}
|
|
751
|
-
}),
|
|
752
|
-
{ name: "Storybook", url:
|
|
766
|
+
}), we = (e, t, s) => [
|
|
767
|
+
{ name: "Storybook", url: D(e, s) },
|
|
753
768
|
{ name: "Sources", url: De(t, s) }
|
|
754
|
-
],
|
|
769
|
+
], Pe = (e) => {
|
|
755
770
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
756
771
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
757
|
-
},
|
|
758
|
-
version:
|
|
759
|
-
tags:
|
|
760
|
-
const
|
|
772
|
+
}, nt = (e, t, s) => ({
|
|
773
|
+
version: 1.1,
|
|
774
|
+
tags: e.components.map((r) => {
|
|
775
|
+
const o = we(t, s, r.filePath);
|
|
761
776
|
return {
|
|
762
|
-
name:
|
|
763
|
-
description: ge(
|
|
764
|
-
attributes:
|
|
765
|
-
name:
|
|
766
|
-
description:
|
|
767
|
-
values:
|
|
768
|
-
references:
|
|
777
|
+
name: r.tag,
|
|
778
|
+
description: ge(r),
|
|
779
|
+
attributes: r.props.map((n) => ({
|
|
780
|
+
name: n.attr || n.name,
|
|
781
|
+
description: B(n),
|
|
782
|
+
values: Pe(n),
|
|
783
|
+
references: o
|
|
769
784
|
})),
|
|
770
|
-
references:
|
|
785
|
+
references: o
|
|
771
786
|
};
|
|
772
787
|
}),
|
|
773
788
|
globalAttributes: [],
|
|
774
789
|
valueSets: []
|
|
775
|
-
}),
|
|
790
|
+
}), lt = (e) => ({
|
|
791
|
+
version: 1.1,
|
|
792
|
+
properties: e.components.flatMap(
|
|
793
|
+
(t) => t.styles.map((s) => ({
|
|
794
|
+
name: s.name,
|
|
795
|
+
description: s.docs
|
|
796
|
+
}))
|
|
797
|
+
)
|
|
798
|
+
}), it = (e) => {
|
|
776
799
|
const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
777
|
-
return
|
|
778
|
-
},
|
|
800
|
+
return He([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
|
|
801
|
+
}, at = (e) => e.toISOString().split("T")[0], Ue = (e, t, s) => {
|
|
779
802
|
const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, l = n.split("-").shift();
|
|
780
803
|
return {
|
|
781
804
|
locale: n,
|
|
782
805
|
messages: t[l] || t[s]
|
|
783
806
|
};
|
|
784
|
-
},
|
|
807
|
+
}, ct = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), ft = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), We = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, He = (e, t, s) => typeof e != "string" || e === "" || !We.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ut = (e, t) => (s) => Ue(s, e, t), $t = ({ disconnect: e, observe: t, takeRecords: s }) => {
|
|
785
808
|
class r {
|
|
786
809
|
constructor(n) {
|
|
787
810
|
/**
|
|
@@ -810,7 +833,7 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
|
810
833
|
value: r
|
|
811
834
|
});
|
|
812
835
|
}), r;
|
|
813
|
-
},
|
|
836
|
+
}, dt = ({ disconnect: e, observe: t }) => {
|
|
814
837
|
class s {
|
|
815
838
|
constructor(o) {
|
|
816
839
|
/**
|
|
@@ -840,7 +863,7 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
|
|
|
840
863
|
});
|
|
841
864
|
}), s;
|
|
842
865
|
};
|
|
843
|
-
class
|
|
866
|
+
class Be extends Event {
|
|
844
867
|
constructor() {
|
|
845
868
|
super(...arguments);
|
|
846
869
|
/**
|
|
@@ -850,8 +873,8 @@ class We extends Event {
|
|
|
850
873
|
g(this, "detail");
|
|
851
874
|
}
|
|
852
875
|
}
|
|
853
|
-
const
|
|
854
|
-
class e extends
|
|
876
|
+
const pt = () => {
|
|
877
|
+
class e extends Be {
|
|
855
878
|
}
|
|
856
879
|
return [window, global].forEach((t) => {
|
|
857
880
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -863,31 +886,33 @@ const $t = () => {
|
|
|
863
886
|
};
|
|
864
887
|
export {
|
|
865
888
|
Ie as ClassList,
|
|
866
|
-
|
|
889
|
+
rt as StorybookPreview,
|
|
867
890
|
Ge as allItemsAreString,
|
|
868
|
-
|
|
891
|
+
Ye as cleanString,
|
|
869
892
|
ze as createID,
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
893
|
+
We as dateRegExp,
|
|
894
|
+
at as dateToString,
|
|
895
|
+
ut as defineLocales,
|
|
896
|
+
et as filterArgs,
|
|
897
|
+
Je as focusableElements,
|
|
898
|
+
it as getLocaleDatePattern,
|
|
876
899
|
te as getParentWindows,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
900
|
+
st as getStoryHTML,
|
|
901
|
+
D as getStorybookUrl,
|
|
902
|
+
Ke as getWindows,
|
|
880
903
|
Xe as isTagName,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
904
|
+
Qe as isValidString,
|
|
905
|
+
ct as localeCurrency,
|
|
906
|
+
He as localeDate,
|
|
907
|
+
ft as localeNumber,
|
|
908
|
+
Ve as nextTick,
|
|
909
|
+
$t as setupMutationObserverMock,
|
|
910
|
+
dt as setupResizeObserverMock,
|
|
911
|
+
pt as setupSubmitEventMock,
|
|
912
|
+
tt as stencilWrapper,
|
|
913
|
+
Ze as toString,
|
|
914
|
+
lt as vsCodeCssGenerator,
|
|
915
|
+
nt as vsCodeGenerator,
|
|
916
|
+
ot as webTypesGenerator
|
|
892
917
|
};
|
|
893
918
|
//# sourceMappingURL=index.es.js.map
|