@mgdis/stencil-helpers 2.2.2 → 2.2.4
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 +341 -415
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/tests/unit.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/index.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var W = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
5
|
+
var ve = (e, t, s) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
6
|
+
var p = (e, t, s) => ve(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || W("Cannot " + s);
|
|
7
|
+
var x = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
8
|
+
const Ge = (e = "", t = 10) => {
|
|
9
9
|
const s = new Uint8Array(t);
|
|
10
10
|
crypto.getRandomValues(s);
|
|
11
11
|
const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
12
12
|
return e !== "" ? `${e}-${r}` : r;
|
|
13
|
-
},
|
|
14
|
-
class
|
|
13
|
+
}, Xe = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
|
|
14
|
+
class Ze {
|
|
15
15
|
constructor(t = []) {
|
|
16
16
|
/**
|
|
17
17
|
* Available classes
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
p(this, "classes");
|
|
20
20
|
/**
|
|
21
21
|
* Add class
|
|
22
22
|
* @param className - class name to add
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
p(this, "add", (t) => {
|
|
25
25
|
this.has(t) || this.classes.push(t);
|
|
26
26
|
});
|
|
27
27
|
/**
|
|
28
28
|
* Delete class
|
|
29
29
|
* @param className - class name to delete
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
p(this, "delete", (t) => {
|
|
32
32
|
const s = this.classes.indexOf(t);
|
|
33
33
|
s > -1 && this.classes.splice(s, 1);
|
|
34
34
|
});
|
|
@@ -37,128 +37,42 @@ class Ge {
|
|
|
37
37
|
* @param className - class name to check
|
|
38
38
|
* @returns class name is in the list
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
p(this, "has", (t) => this.classes.includes(t));
|
|
41
41
|
/**
|
|
42
42
|
* Join classes seperated by spaces
|
|
43
43
|
* @returns joined values
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
p(this, "join", () => this.classes.join(" "));
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const t =
|
|
49
|
+
const Je = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ye = (e) => {
|
|
50
|
+
const t = Y(e), s = V(e);
|
|
51
51
|
return [e, ...t, ...s];
|
|
52
|
-
},
|
|
52
|
+
}, Y = (e, t = []) => {
|
|
53
53
|
if (e.self !== e.top)
|
|
54
54
|
try {
|
|
55
55
|
const s = e.parent;
|
|
56
|
-
return s ? (t.push(s),
|
|
56
|
+
return s ? (t.push(s), Y(s, t)) : t;
|
|
57
57
|
} catch (s) {
|
|
58
58
|
return console.error("Different hosts between iframes:", s), t;
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
61
|
+
}, V = (e, t = []) => {
|
|
62
62
|
if (e.frames.length > 0)
|
|
63
63
|
for (const s of Array.from(e.frames))
|
|
64
|
-
t.push(s),
|
|
64
|
+
t.push(s), V(s, t);
|
|
65
65
|
return t;
|
|
66
|
-
},
|
|
67
|
-
var
|
|
68
|
-
allRenderFn: !1,
|
|
69
|
-
cmpDidLoad: !0,
|
|
70
|
-
cmpDidUnload: !1,
|
|
71
|
-
cmpDidUpdate: !0,
|
|
72
|
-
cmpDidRender: !0,
|
|
73
|
-
cmpWillLoad: !0,
|
|
74
|
-
cmpWillUpdate: !0,
|
|
75
|
-
cmpWillRender: !0,
|
|
76
|
-
connectedCallback: !0,
|
|
77
|
-
disconnectedCallback: !0,
|
|
78
|
-
element: !0,
|
|
79
|
-
event: !0,
|
|
80
|
-
hasRenderFn: !0,
|
|
81
|
-
lifecycle: !0,
|
|
82
|
-
hostListener: !0,
|
|
83
|
-
hostListenerTargetWindow: !0,
|
|
84
|
-
hostListenerTargetDocument: !0,
|
|
85
|
-
hostListenerTargetBody: !0,
|
|
86
|
-
hostListenerTargetParent: !1,
|
|
87
|
-
hostListenerTarget: !0,
|
|
88
|
-
member: !0,
|
|
89
|
-
method: !0,
|
|
90
|
-
mode: !0,
|
|
91
|
-
observeAttribute: !0,
|
|
92
|
-
prop: !0,
|
|
93
|
-
propMutable: !0,
|
|
94
|
-
reflect: !0,
|
|
95
|
-
scoped: !0,
|
|
96
|
-
shadowDom: !0,
|
|
97
|
-
slot: !0,
|
|
98
|
-
cssAnnotations: !0,
|
|
99
|
-
state: !0,
|
|
100
|
-
style: !0,
|
|
101
|
-
formAssociated: !1,
|
|
102
|
-
svg: !0,
|
|
66
|
+
}, me = (e) => typeof e == "string" && e.trim() !== "", Ve = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, et = (e) => typeof e == "number" && !Number.isNaN(e), tt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, st = async (e) => e();
|
|
67
|
+
var C = {
|
|
103
68
|
updatable: !0,
|
|
104
|
-
vdomAttribute: !0,
|
|
105
|
-
vdomXlink: !0,
|
|
106
|
-
vdomClass: !0,
|
|
107
|
-
vdomFunctional: !0,
|
|
108
|
-
vdomKey: !0,
|
|
109
|
-
vdomListener: !0,
|
|
110
|
-
vdomRef: !0,
|
|
111
|
-
vdomPropOrAttr: !0,
|
|
112
|
-
vdomRender: !0,
|
|
113
|
-
vdomStyle: !0,
|
|
114
|
-
vdomText: !0,
|
|
115
|
-
watchCallback: !0,
|
|
116
|
-
taskQueue: !0,
|
|
117
|
-
hotModuleReplacement: !1,
|
|
118
|
-
isDebug: !1,
|
|
119
|
-
isDev: !1,
|
|
120
|
-
isTesting: !1,
|
|
121
|
-
hydrateServerSide: !1,
|
|
122
|
-
hydrateClientSide: !1,
|
|
123
|
-
lifecycleDOMEvents: !1,
|
|
124
|
-
lazyLoad: !1,
|
|
125
|
-
profile: !1,
|
|
126
69
|
slotRelocation: !0,
|
|
127
70
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
128
|
-
appendChildSlotFix: !1,
|
|
129
|
-
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
130
|
-
cloneNodeFix: !1,
|
|
131
|
-
hydratedAttribute: !1,
|
|
132
|
-
hydratedClass: !0,
|
|
133
|
-
// TODO(STENCIL-1305): remove this option
|
|
134
|
-
scriptDataOpts: !1,
|
|
135
|
-
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
136
|
-
scopedSlotTextContentFix: !1,
|
|
137
|
-
// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
138
|
-
shadowDomShim: !1,
|
|
139
|
-
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
140
|
-
slotChildNodesFix: !1,
|
|
141
|
-
invisiblePrehydration: !0,
|
|
142
|
-
propBoolean: !0,
|
|
143
|
-
propNumber: !0,
|
|
144
|
-
propString: !0,
|
|
145
|
-
constructableCSS: !0,
|
|
146
|
-
cmpShouldUpdate: !0,
|
|
147
|
-
devTools: !1,
|
|
148
|
-
shadowDelegatesFocus: !0,
|
|
149
|
-
initializeNextTick: !1,
|
|
150
|
-
asyncLoading: !0,
|
|
151
|
-
asyncQueue: !1,
|
|
152
|
-
transformTagName: !1,
|
|
153
|
-
attachStyles: !0,
|
|
154
|
-
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
155
71
|
experimentalSlotFixes: !1
|
|
156
|
-
},
|
|
72
|
+
}, be = Object.defineProperty, Se = (e, t) => {
|
|
157
73
|
for (var s in t)
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
z.HTMLElement;
|
|
161
|
-
var A = {
|
|
74
|
+
be(e, s, { get: t[s], enumerable: !0 });
|
|
75
|
+
}, ke = "http://www.w3.org/2000/svg", xe = "http://www.w3.org/1999/xhtml", G = (e, t) => t in e, X = "http://www.w3.org/1999/xlink", ee = typeof window < "u" ? window : {}, L = ee.document || { head: {} }, _ = {
|
|
162
76
|
$flags$: 0,
|
|
163
77
|
$resourcesUrl$: "",
|
|
164
78
|
jmp: (e) => e(),
|
|
@@ -166,13 +80,13 @@ var A = {
|
|
|
166
80
|
ael: (e, t, s, r) => e.addEventListener(t, s, r),
|
|
167
81
|
rel: (e, t, s, r) => e.removeEventListener(t, s, r),
|
|
168
82
|
ce: (e, t) => new CustomEvent(e, t)
|
|
169
|
-
},
|
|
170
|
-
|
|
83
|
+
}, Te = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), _e = {};
|
|
84
|
+
Se(_e, {
|
|
171
85
|
err: () => se,
|
|
172
|
-
map: () =>
|
|
86
|
+
map: () => Ee,
|
|
173
87
|
ok: () => P,
|
|
174
88
|
unwrap: () => Ae,
|
|
175
|
-
unwrapErr: () =>
|
|
89
|
+
unwrapErr: () => je
|
|
176
90
|
});
|
|
177
91
|
var P = (e) => ({
|
|
178
92
|
isOk: !0,
|
|
@@ -183,7 +97,7 @@ var P = (e) => ({
|
|
|
183
97
|
isErr: !0,
|
|
184
98
|
value: e
|
|
185
99
|
});
|
|
186
|
-
function
|
|
100
|
+
function Ee(e, t) {
|
|
187
101
|
if (e.isOk) {
|
|
188
102
|
const s = t(e.value);
|
|
189
103
|
return s instanceof Promise ? s.then((r) => P(r)) : P(s);
|
|
@@ -198,7 +112,7 @@ var Ae = (e) => {
|
|
|
198
112
|
if (e.isOk)
|
|
199
113
|
return e.value;
|
|
200
114
|
throw e.value;
|
|
201
|
-
},
|
|
115
|
+
}, je = (e) => {
|
|
202
116
|
if (e.isErr)
|
|
203
117
|
return e.value;
|
|
204
118
|
throw e.value;
|
|
@@ -206,30 +120,32 @@ var Ae = (e) => {
|
|
|
206
120
|
const t = e.__childNodes || e.childNodes;
|
|
207
121
|
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && ne(t, e.tagName).forEach((s) => {
|
|
208
122
|
var r;
|
|
209
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r =
|
|
123
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Oe(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
|
|
210
124
|
});
|
|
211
125
|
for (const s of t)
|
|
212
126
|
s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);
|
|
213
|
-
}
|
|
214
|
-
|
|
127
|
+
};
|
|
128
|
+
function ne(e, t, s) {
|
|
129
|
+
let r = 0, n = [], i;
|
|
215
130
|
for (; r < e.length; r++)
|
|
216
|
-
|
|
131
|
+
i = e[r], i["s-sr"] && i["s-hn"] === t && s === void 0 && n.push(i), n = [...n, ...ne(i.childNodes, t, s)];
|
|
217
132
|
return n;
|
|
218
|
-
}
|
|
133
|
+
}
|
|
134
|
+
var Oe = (e, t, s = !0) => {
|
|
219
135
|
const r = [];
|
|
220
136
|
for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
|
|
221
137
|
r.push(e);
|
|
222
138
|
return r;
|
|
223
|
-
},
|
|
224
|
-
let r = null, n = null,
|
|
225
|
-
const
|
|
139
|
+
}, Z = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Re = (e, t, ...s) => {
|
|
140
|
+
let r = null, n = null, i = null, o = !1, f = !1;
|
|
141
|
+
const c = [], $ = (l) => {
|
|
226
142
|
for (let d = 0; d < l.length; d++)
|
|
227
|
-
r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != "boolean" && ((
|
|
143
|
+
r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != "boolean" && ((o = !te(r)) && (r = String(r)), o && f ? c[c.length - 1].$text$ += r : c.push(o ? w(null, r) : r), f = o);
|
|
228
144
|
};
|
|
229
145
|
$(s);
|
|
230
|
-
const
|
|
231
|
-
return
|
|
232
|
-
},
|
|
146
|
+
const u = w(e, null);
|
|
147
|
+
return u.$attrs$ = t, c.length > 0 && (u.$children$ = c), u.$key$ = n, u.$name$ = i, u;
|
|
148
|
+
}, w = (e, t) => {
|
|
233
149
|
const s = {
|
|
234
150
|
$flags$: 0,
|
|
235
151
|
$tag$: e,
|
|
@@ -238,51 +154,63 @@ var Ae = (e) => {
|
|
|
238
154
|
$children$: null
|
|
239
155
|
};
|
|
240
156
|
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
241
|
-
}, Le = {},
|
|
157
|
+
}, Le = {}, Me = (e) => e && e.$tag$ === Le, J = (e, t, s, r, n, i, o) => {
|
|
242
158
|
if (s !== r) {
|
|
243
|
-
let
|
|
159
|
+
let f = G(e, t), c = t.toLowerCase();
|
|
244
160
|
if (t === "class") {
|
|
245
|
-
const
|
|
246
|
-
let
|
|
247
|
-
|
|
248
|
-
l.startsWith(e["s-si"]) && f.push(l);
|
|
249
|
-
}), f = [...new Set(f)], a.add(...f), delete e["s-si"]) : (a.remove(...$.filter((l) => l && !f.includes(l))), a.add(...f.filter((l) => l && !$.includes(l))));
|
|
161
|
+
const $ = e.classList, u = K(s);
|
|
162
|
+
let l = K(r);
|
|
163
|
+
$.remove(...u.filter((d) => d && !l.includes(d))), $.add(...l.filter((d) => d && !u.includes(d)));
|
|
250
164
|
} else if (t === "style") {
|
|
251
|
-
for (const
|
|
252
|
-
(!r || r[
|
|
253
|
-
for (const
|
|
254
|
-
(!s || r[
|
|
165
|
+
for (const $ in s)
|
|
166
|
+
(!r || r[$] == null) && ($.includes("-") ? e.style.removeProperty($) : e.style[$] = "");
|
|
167
|
+
for (const $ in r)
|
|
168
|
+
(!s || r[$] !== s[$]) && ($.includes("-") ? e.style.setProperty($, r[$]) : e.style[$] = r[$]);
|
|
255
169
|
} else if (t !== "key") if (t === "ref")
|
|
256
170
|
r && r(e);
|
|
257
171
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
258
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
259
|
-
const
|
|
260
|
-
t = t.replace(
|
|
172
|
+
if (t[2] === "-" ? t = t.slice(3) : G(ee, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
|
|
173
|
+
const $ = t.endsWith(ie);
|
|
174
|
+
t = t.replace(Ne, ""), s && _.rel(e, t, s, $), r && _.ael(e, t, r, $);
|
|
261
175
|
}
|
|
262
176
|
} else {
|
|
263
|
-
const
|
|
264
|
-
if ((
|
|
177
|
+
const $ = te(r);
|
|
178
|
+
if ((f || $ && r !== null) && !n)
|
|
265
179
|
try {
|
|
266
180
|
if (e.tagName.includes("-"))
|
|
267
|
-
e[t] = r;
|
|
181
|
+
e[t] !== r && (e[t] = r);
|
|
268
182
|
else {
|
|
269
|
-
const
|
|
270
|
-
t === "list" ?
|
|
183
|
+
const l = r ?? "";
|
|
184
|
+
t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
|
|
271
185
|
}
|
|
272
186
|
} catch {
|
|
273
187
|
}
|
|
274
|
-
let
|
|
275
|
-
|
|
188
|
+
let u = !1;
|
|
189
|
+
c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, u = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (u ? e.removeAttributeNS(X, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !$ && (r = r === !0 ? "" : r, u ? e.setAttributeNS(X, t, r) : e.setAttribute(t, r));
|
|
276
190
|
}
|
|
277
191
|
}
|
|
278
|
-
},
|
|
279
|
-
const
|
|
280
|
-
for (const
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
192
|
+
}, Fe = /\s/, K = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Fe)), ie = "Capture", Ne = new RegExp(ie + "$"), oe = (e, t, s, r) => {
|
|
193
|
+
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
194
|
+
for (const f of Q(Object.keys(i)))
|
|
195
|
+
f in o || J(
|
|
196
|
+
n,
|
|
197
|
+
f,
|
|
198
|
+
i[f],
|
|
199
|
+
void 0,
|
|
200
|
+
s,
|
|
201
|
+
t.$flags$
|
|
202
|
+
);
|
|
203
|
+
for (const f of Q(Object.keys(o)))
|
|
204
|
+
J(
|
|
205
|
+
n,
|
|
206
|
+
f,
|
|
207
|
+
i[f],
|
|
208
|
+
o[f],
|
|
209
|
+
s,
|
|
210
|
+
t.$flags$
|
|
211
|
+
);
|
|
284
212
|
};
|
|
285
|
-
function
|
|
213
|
+
function Q(e) {
|
|
286
214
|
return e.includes("ref") ? (
|
|
287
215
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
288
216
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -291,11 +219,11 @@ function Y(e) {
|
|
|
291
219
|
e
|
|
292
220
|
);
|
|
293
221
|
}
|
|
294
|
-
var
|
|
222
|
+
var M, F, E, N = !1, H = !1, I = !1, v = !1, D = (e, t, s) => {
|
|
295
223
|
var r;
|
|
296
224
|
const n = t.$children$[s];
|
|
297
|
-
let
|
|
298
|
-
if (
|
|
225
|
+
let i = 0, o, f, c;
|
|
226
|
+
if (N || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
299
227
|
// slot element has fallback content
|
|
300
228
|
// still create an element that "mocks" the slot element
|
|
301
229
|
2
|
|
@@ -305,214 +233,212 @@ var F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
|
|
|
305
233
|
// where actual slot content should sit next to
|
|
306
234
|
1
|
|
307
235
|
))), n.$text$ !== null)
|
|
308
|
-
|
|
236
|
+
o = n.$elm$ = L.createTextNode(n.$text$);
|
|
309
237
|
else if (n.$flags$ & 1)
|
|
310
|
-
|
|
238
|
+
o = n.$elm$ = L.createTextNode("");
|
|
311
239
|
else {
|
|
312
|
-
if (
|
|
313
|
-
|
|
314
|
-
!
|
|
315
|
-
),
|
|
316
|
-
for (
|
|
317
|
-
|
|
318
|
-
n.$tag$ === "svg" ?
|
|
240
|
+
if (v || (v = n.$tag$ === "svg"), o = n.$elm$ = L.createElementNS(
|
|
241
|
+
v ? ke : xe,
|
|
242
|
+
!N && C.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
243
|
+
), v && n.$tag$ === "foreignObject" && (v = !1), oe(null, n, v), Te(M) && o["s-si"] !== M && o.classList.add(o["s-si"] = M), n.$children$)
|
|
244
|
+
for (i = 0; i < n.$children$.length; ++i)
|
|
245
|
+
f = D(e, n, i), f && o.appendChild(f);
|
|
246
|
+
n.$tag$ === "svg" ? v = !1 : o.tagName === "foreignObject" && (v = !0);
|
|
319
247
|
}
|
|
320
|
-
return
|
|
321
|
-
},
|
|
322
|
-
|
|
248
|
+
return o["s-hn"] = E, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = F, o["s-sn"] = n.$name$ || "", o["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, c = e && e.$children$ && e.$children$[s], c && c.$tag$ === n.$tag$ && e.$elm$ && A(e.$elm$, !1), $e(F, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
|
|
249
|
+
}, A = (e, t) => {
|
|
250
|
+
_.$flags$ |= 1;
|
|
323
251
|
const s = Array.from(e.__childNodes || e.childNodes);
|
|
324
|
-
e["s-sr"] &&
|
|
252
|
+
e["s-sr"] && C.experimentalSlotFixes;
|
|
325
253
|
for (let r = s.length - 1; r >= 0; r--) {
|
|
326
254
|
const n = s[r];
|
|
327
|
-
n["s-hn"] !== E && n["s-ol"] && (k(
|
|
255
|
+
n["s-hn"] !== E && n["s-ol"] && (k(j(n).parentNode, n, j(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && A(n, t);
|
|
328
256
|
}
|
|
329
|
-
|
|
330
|
-
}, le = (e, t, s, r, n,
|
|
331
|
-
let
|
|
332
|
-
for (
|
|
333
|
-
r[n] && (
|
|
257
|
+
_.$flags$ &= -2;
|
|
258
|
+
}, le = (e, t, s, r, n, i) => {
|
|
259
|
+
let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
|
|
260
|
+
for (o.shadowRoot && o.tagName === E && (o = o.shadowRoot); n <= i; ++n)
|
|
261
|
+
r[n] && (f = D(null, s, n), f && (r[n].$elm$ = f, k(o, f, j(t))));
|
|
334
262
|
}, ae = (e, t, s) => {
|
|
335
263
|
for (let r = t; r <= s; ++r) {
|
|
336
264
|
const n = e[r];
|
|
337
265
|
if (n) {
|
|
338
|
-
const
|
|
339
|
-
fe(n),
|
|
266
|
+
const i = n.$elm$;
|
|
267
|
+
fe(n), i && (H = !0, i["s-ol"] ? i["s-ol"].remove() : A(i, !0), i.remove());
|
|
340
268
|
}
|
|
341
269
|
}
|
|
342
|
-
},
|
|
343
|
-
let
|
|
344
|
-
for (;
|
|
345
|
-
if (
|
|
346
|
-
|
|
270
|
+
}, He = (e, t, s, r, n = !1) => {
|
|
271
|
+
let i = 0, o = 0, f = 0, c = 0, $ = t.length - 1, u = t[0], l = t[$], d = r.length - 1, a = r[0], g = r[d], m, y;
|
|
272
|
+
for (; i <= $ && o <= d; )
|
|
273
|
+
if (u == null)
|
|
274
|
+
u = t[++i];
|
|
347
275
|
else if (l == null)
|
|
348
276
|
l = t[--$];
|
|
349
|
-
else if (
|
|
350
|
-
|
|
351
|
-
else if (
|
|
352
|
-
|
|
353
|
-
else if (
|
|
354
|
-
|
|
355
|
-
else if (
|
|
356
|
-
|
|
357
|
-
else if (
|
|
358
|
-
(
|
|
359
|
-
else if (
|
|
360
|
-
(
|
|
277
|
+
else if (a == null)
|
|
278
|
+
a = r[++o];
|
|
279
|
+
else if (g == null)
|
|
280
|
+
g = r[--d];
|
|
281
|
+
else if (R(u, a, n))
|
|
282
|
+
T(u, a, n), u = t[++i], a = r[++o];
|
|
283
|
+
else if (R(l, g, n))
|
|
284
|
+
T(l, g, n), l = t[--$], g = r[--d];
|
|
285
|
+
else if (R(u, g, n))
|
|
286
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && A(u.$elm$.parentNode, !1), T(u, g, n), k(e, u.$elm$, l.$elm$.nextSibling), u = t[++i], g = r[--d];
|
|
287
|
+
else if (R(l, a, n))
|
|
288
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && A(l.$elm$.parentNode, !1), T(l, a, n), k(e, l.$elm$, u.$elm$), l = t[--$], a = r[++o];
|
|
361
289
|
else {
|
|
362
|
-
for (
|
|
363
|
-
if (t[
|
|
364
|
-
|
|
290
|
+
for (f = -1, c = i; c <= $; ++c)
|
|
291
|
+
if (t[c] && t[c].$key$ !== null && t[c].$key$ === a.$key$) {
|
|
292
|
+
f = c;
|
|
365
293
|
break;
|
|
366
294
|
}
|
|
367
|
-
|
|
368
|
-
|
|
295
|
+
f >= 0 ? (y = t[f], y.$tag$ !== a.$tag$ ? m = D(t && t[o], s, f) : (T(y, a, n), t[f] = void 0, m = y.$elm$), a = r[++o]) : (m = D(t && t[o], s, o), a = r[++o]), m && k(
|
|
296
|
+
j(u.$elm$).parentNode,
|
|
369
297
|
m,
|
|
370
|
-
|
|
298
|
+
j(u.$elm$)
|
|
371
299
|
);
|
|
372
300
|
}
|
|
373
|
-
|
|
301
|
+
i > $ ? le(
|
|
374
302
|
e,
|
|
375
303
|
r[d + 1] == null ? null : r[d + 1].$elm$,
|
|
376
304
|
s,
|
|
377
305
|
r,
|
|
378
|
-
|
|
306
|
+
o,
|
|
379
307
|
d
|
|
380
|
-
) :
|
|
381
|
-
},
|
|
382
|
-
const r = t.$elm$ = e.$elm$, n = e.$children$,
|
|
383
|
-
let
|
|
384
|
-
|
|
308
|
+
) : o > d && ae(t, i, $);
|
|
309
|
+
}, R = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, j = (e) => e && e["s-ol"] || e, T = (e, t, s = !1) => {
|
|
310
|
+
const r = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
|
|
311
|
+
let c;
|
|
312
|
+
f === null ? (v = o === "svg" ? !0 : o === "foreignObject" ? !1 : v, o === "slot" && !N || oe(e, t, v), n !== null && i !== null ? He(r, n, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, i, 0, i.length - 1)) : (
|
|
385
313
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
386
|
-
!s &&
|
|
387
|
-
),
|
|
314
|
+
!s && C.updatable && n !== null && ae(n, 0, n.length - 1)
|
|
315
|
+
), v && o === "svg" && (v = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (r.data = f);
|
|
388
316
|
}, b = [], ce = (e) => {
|
|
389
317
|
let t, s, r;
|
|
390
318
|
const n = e.__childNodes || e.childNodes;
|
|
391
|
-
for (const
|
|
392
|
-
if (
|
|
319
|
+
for (const i of n) {
|
|
320
|
+
if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
|
|
393
321
|
s = t.parentNode.__childNodes || t.parentNode.childNodes;
|
|
394
|
-
const
|
|
322
|
+
const o = i["s-sn"];
|
|
395
323
|
for (r = s.length - 1; r >= 0; r--)
|
|
396
|
-
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !==
|
|
397
|
-
if (
|
|
398
|
-
let
|
|
399
|
-
|
|
400
|
-
$slotRefNode$:
|
|
324
|
+
if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
325
|
+
if (Z(t, o)) {
|
|
326
|
+
let f = b.find((c) => c.$nodeToRelocate$ === t);
|
|
327
|
+
H = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], b.push({
|
|
328
|
+
$slotRefNode$: i,
|
|
401
329
|
$nodeToRelocate$: t
|
|
402
|
-
})), t["s-sr"] && b.map((
|
|
403
|
-
|
|
330
|
+
})), t["s-sr"] && b.map((c) => {
|
|
331
|
+
Z(c.$nodeToRelocate$, t["s-sn"]) && (f = b.find(($) => $.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
|
|
404
332
|
});
|
|
405
|
-
} else b.some((
|
|
333
|
+
} else b.some((f) => f.$nodeToRelocate$ === t) || b.push({
|
|
406
334
|
$nodeToRelocate$: t
|
|
407
335
|
});
|
|
408
336
|
}
|
|
409
|
-
|
|
337
|
+
i.nodeType === 1 && ce(i);
|
|
410
338
|
}
|
|
411
339
|
}, fe = (e) => {
|
|
412
340
|
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
|
|
413
|
-
}, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] &&
|
|
414
|
-
function
|
|
341
|
+
}, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && $e(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
|
|
342
|
+
function $e(e, t, s, r) {
|
|
415
343
|
var n;
|
|
416
|
-
let
|
|
417
|
-
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (
|
|
418
|
-
const
|
|
419
|
-
if ((n = s.classList) == null || n.add(
|
|
420
|
-
let
|
|
421
|
-
for (;
|
|
422
|
-
if (
|
|
344
|
+
let i;
|
|
345
|
+
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
|
|
346
|
+
const o = t["s-sn"], f = t["s-hn"];
|
|
347
|
+
if ((n = s.classList) == null || n.add(i + "-s"), r && r.classList.contains(i + "-s")) {
|
|
348
|
+
let c = (r.__childNodes || r.childNodes)[0], $ = !1;
|
|
349
|
+
for (; c; ) {
|
|
350
|
+
if (c["s-sn"] !== o && c["s-hn"] === f && c["s-sr"]) {
|
|
423
351
|
$ = !0;
|
|
424
352
|
break;
|
|
425
353
|
}
|
|
426
|
-
|
|
354
|
+
c = c.nextSibling;
|
|
427
355
|
}
|
|
428
|
-
$ || r.classList.remove(
|
|
356
|
+
$ || r.classList.remove(i + "-s");
|
|
429
357
|
}
|
|
430
358
|
}
|
|
431
359
|
}
|
|
432
|
-
var
|
|
433
|
-
var r, n,
|
|
434
|
-
const
|
|
435
|
-
if (E =
|
|
436
|
-
([d,
|
|
360
|
+
var De = (e, t, s = !1) => {
|
|
361
|
+
var r, n, i, o, f;
|
|
362
|
+
const c = e.$hostElement$, $ = e.$cmpMeta$, u = e.$vnode$ || w(null, null), l = Me(t) ? t : Re(null, null, t);
|
|
363
|
+
if (E = c.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(
|
|
364
|
+
([d, a]) => l.$attrs$[a] = c[d]
|
|
437
365
|
)), s && l.$attrs$)
|
|
438
366
|
for (const d of Object.keys(l.$attrs$))
|
|
439
|
-
|
|
440
|
-
l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ =
|
|
367
|
+
c.hasAttribute(d) && !["key", "ref", "style", "class"].includes(d) && (l.$attrs$[d] = c[d]);
|
|
368
|
+
l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = u.$elm$ = c.shadowRoot || c, M = c["s-sc"], N = ($.$flags$ & 1) !== 0, F = c["s-cr"], H = !1, T(u, l, s);
|
|
441
369
|
{
|
|
442
|
-
if (
|
|
370
|
+
if (_.$flags$ |= 1, I) {
|
|
443
371
|
ce(l.$elm$);
|
|
444
372
|
for (const d of b) {
|
|
445
|
-
const
|
|
446
|
-
if (!
|
|
447
|
-
const
|
|
448
|
-
|
|
373
|
+
const a = d.$nodeToRelocate$;
|
|
374
|
+
if (!a["s-ol"]) {
|
|
375
|
+
const g = L.createTextNode("");
|
|
376
|
+
g["s-nr"] = a, k(a.parentNode, a["s-ol"] = g, a);
|
|
449
377
|
}
|
|
450
378
|
}
|
|
451
379
|
for (const d of b) {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
454
|
-
const m =
|
|
455
|
-
let
|
|
380
|
+
const a = d.$nodeToRelocate$, g = d.$slotRefNode$;
|
|
381
|
+
if (g) {
|
|
382
|
+
const m = g.parentNode;
|
|
383
|
+
let y = g.nextSibling;
|
|
456
384
|
{
|
|
457
|
-
let
|
|
458
|
-
for (;
|
|
459
|
-
let h = (n =
|
|
460
|
-
if (h && h["s-sn"] ===
|
|
461
|
-
for (h = h.nextSibling; h ===
|
|
385
|
+
let O = (r = a["s-ol"]) == null ? void 0 : r.previousSibling;
|
|
386
|
+
for (; O; ) {
|
|
387
|
+
let h = (n = O["s-nr"]) != null ? n : null;
|
|
388
|
+
if (h && h["s-sn"] === a["s-sn"] && m === (h.__parentNode || h.parentNode)) {
|
|
389
|
+
for (h = h.nextSibling; h === a || h != null && h["s-sr"]; )
|
|
462
390
|
h = h == null ? void 0 : h.nextSibling;
|
|
463
391
|
if (!h || !h["s-nr"]) {
|
|
464
|
-
|
|
392
|
+
y = h;
|
|
465
393
|
break;
|
|
466
394
|
}
|
|
467
395
|
}
|
|
468
|
-
|
|
396
|
+
O = O.previousSibling;
|
|
469
397
|
}
|
|
470
398
|
}
|
|
471
|
-
|
|
399
|
+
const ge = a.__parentNode || a.parentNode, pe = a.__nextSibling || a.nextSibling;
|
|
400
|
+
(!y && m !== ge || pe !== y) && a !== y && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), k(m, a, y), a.nodeType === 1 && a.tagName !== "SLOT-FB" && (a.hidden = (i = a["s-ih"]) != null ? i : !1)), a && typeof g["s-rf"] == "function" && g["s-rf"](a);
|
|
472
401
|
} else
|
|
473
|
-
|
|
402
|
+
a.nodeType === 1 && (s && (a["s-ih"] = (o = a.hidden) != null ? o : !1), a.hidden = !0);
|
|
474
403
|
}
|
|
475
404
|
}
|
|
476
|
-
|
|
405
|
+
H && re(l.$elm$), _.$flags$ &= -2, b.length = 0;
|
|
477
406
|
}
|
|
478
|
-
if (
|
|
407
|
+
if (C.experimentalScopedSlotChanges && $.$flags$ & 2) {
|
|
479
408
|
const d = l.$elm$.__childNodes || l.$elm$.childNodes;
|
|
480
|
-
for (const
|
|
481
|
-
|
|
409
|
+
for (const a of d)
|
|
410
|
+
a["s-hn"] !== E && !a["s-sh"] && (s && a["s-ih"] == null && (a["s-ih"] = (f = a.hidden) != null ? f : !1), a.hidden = !0);
|
|
482
411
|
}
|
|
483
|
-
|
|
412
|
+
F = void 0;
|
|
484
413
|
};
|
|
485
|
-
const
|
|
414
|
+
const Ue = (e, t, s) => {
|
|
486
415
|
[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);
|
|
487
|
-
},
|
|
416
|
+
}, ue = (e, t, s, r, n) => {
|
|
488
417
|
if (t && typeof t == "string") {
|
|
489
|
-
const
|
|
490
|
-
Object.keys(s || {}).forEach((
|
|
491
|
-
|
|
492
|
-
}), r == null || r.forEach((
|
|
493
|
-
|
|
494
|
-
}), s != null && s.innerHTML && (
|
|
418
|
+
const i = document.createElement(t);
|
|
419
|
+
Object.keys(s || {}).forEach((o) => {
|
|
420
|
+
Ue(i, o, s[o]);
|
|
421
|
+
}), r == null || r.forEach((o) => {
|
|
422
|
+
ue(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
423
|
+
}), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
|
|
495
424
|
}
|
|
496
425
|
n && (e.innerHTML = n);
|
|
497
|
-
},
|
|
426
|
+
}, rt = (e, t) => {
|
|
498
427
|
const s = {};
|
|
499
428
|
if (typeof e != "object")
|
|
500
429
|
throw new Error("filterArgs - args isn't an object.");
|
|
501
430
|
for (const r in e)
|
|
502
431
|
if (!r.startsWith("slot")) {
|
|
503
|
-
const n = e[r],
|
|
504
|
-
(!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[
|
|
432
|
+
const n = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
433
|
+
(!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[i] = n);
|
|
505
434
|
}
|
|
506
435
|
return s;
|
|
507
|
-
},
|
|
436
|
+
}, nt = (e, t) => {
|
|
508
437
|
var r, n;
|
|
509
438
|
const s = document.getElementById("storybook-root");
|
|
510
439
|
if (s !== null)
|
|
511
|
-
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"),
|
|
440
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), De(
|
|
512
441
|
{
|
|
513
|
-
$ancestorComponent$: void 0,
|
|
514
|
-
$flags$: 0,
|
|
515
|
-
$modeName$: void 0,
|
|
516
442
|
$cmpMeta$: {
|
|
517
443
|
$flags$: 0,
|
|
518
444
|
$tagName$: s.tagName
|
|
@@ -521,22 +447,22 @@ const De = (e, t, s) => {
|
|
|
521
447
|
},
|
|
522
448
|
e(t)
|
|
523
449
|
), s.children[s.children.length - 1];
|
|
524
|
-
},
|
|
450
|
+
}, it = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
|
|
525
451
|
const n = document.createElement("div");
|
|
526
|
-
return
|
|
452
|
+
return ue(n, e, t, s, r), n.innerHTML;
|
|
527
453
|
}, U = (e, t) => {
|
|
528
454
|
if (!t)
|
|
529
455
|
return;
|
|
530
456
|
const s = t.split("/");
|
|
531
457
|
return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
532
458
|
};
|
|
533
|
-
var S,
|
|
534
|
-
class
|
|
459
|
+
var S, q;
|
|
460
|
+
class ot {
|
|
535
461
|
constructor(t) {
|
|
536
462
|
/**
|
|
537
463
|
* JsonDocs
|
|
538
464
|
*/
|
|
539
|
-
|
|
465
|
+
p(this, "jsonDoc");
|
|
540
466
|
/**
|
|
541
467
|
* Get component data from the jsonDoc
|
|
542
468
|
* @param tagName - tag name we want to get the data from
|
|
@@ -549,7 +475,7 @@ class nt {
|
|
|
549
475
|
* @param prop - prop to get control for
|
|
550
476
|
* @returns control type and options if applicable
|
|
551
477
|
*/
|
|
552
|
-
B(this,
|
|
478
|
+
B(this, q, (t) => {
|
|
553
479
|
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, "|"));
|
|
554
480
|
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" } };
|
|
555
481
|
});
|
|
@@ -558,11 +484,11 @@ class nt {
|
|
|
558
484
|
* @param tagName - tag name we want to extract the arg types from
|
|
559
485
|
* @returns component arg types
|
|
560
486
|
*/
|
|
561
|
-
|
|
562
|
-
const s =
|
|
563
|
-
const { control: d, options:
|
|
487
|
+
p(this, "extractArgTypes", (t) => {
|
|
488
|
+
const s = x(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((u, l) => {
|
|
489
|
+
const { control: d, options: a } = x(this, q).call(this, l);
|
|
564
490
|
return {
|
|
565
|
-
...
|
|
491
|
+
...u,
|
|
566
492
|
[l.name]: {
|
|
567
493
|
name: l.attr || l.name,
|
|
568
494
|
description: l.docs,
|
|
@@ -573,12 +499,12 @@ class nt {
|
|
|
573
499
|
defaultValue: { summary: l.default }
|
|
574
500
|
},
|
|
575
501
|
control: d,
|
|
576
|
-
options:
|
|
502
|
+
options: a
|
|
577
503
|
}
|
|
578
504
|
};
|
|
579
505
|
}, {}), n = s == null ? void 0 : s.events.reduce(
|
|
580
|
-
(
|
|
581
|
-
...
|
|
506
|
+
(u, l) => ({
|
|
507
|
+
...u,
|
|
582
508
|
[l.event]: {
|
|
583
509
|
name: l.event,
|
|
584
510
|
description: l.docs,
|
|
@@ -589,9 +515,9 @@ class nt {
|
|
|
589
515
|
}
|
|
590
516
|
}),
|
|
591
517
|
{}
|
|
592
|
-
),
|
|
593
|
-
(
|
|
594
|
-
...
|
|
518
|
+
), i = s == null ? void 0 : s.methods.reduce(
|
|
519
|
+
(u, l) => ({
|
|
520
|
+
...u,
|
|
595
521
|
[l.name]: {
|
|
596
522
|
name: l.name,
|
|
597
523
|
description: l.docs,
|
|
@@ -602,9 +528,9 @@ class nt {
|
|
|
602
528
|
}
|
|
603
529
|
}),
|
|
604
530
|
{}
|
|
605
|
-
),
|
|
606
|
-
(
|
|
607
|
-
...
|
|
531
|
+
), o = s == null ? void 0 : s.slots.reduce(
|
|
532
|
+
(u, l) => ({
|
|
533
|
+
...u,
|
|
608
534
|
[l.name]: {
|
|
609
535
|
name: l.name !== "" ? l.name : "default",
|
|
610
536
|
// default slot are unnamed
|
|
@@ -616,9 +542,9 @@ class nt {
|
|
|
616
542
|
}
|
|
617
543
|
}),
|
|
618
544
|
{}
|
|
619
|
-
),
|
|
620
|
-
(
|
|
621
|
-
...
|
|
545
|
+
), f = s == null ? void 0 : s.styles.reduce(
|
|
546
|
+
(u, l) => ({
|
|
547
|
+
...u,
|
|
622
548
|
[l.name]: {
|
|
623
549
|
name: l.name,
|
|
624
550
|
description: l.docs,
|
|
@@ -629,10 +555,10 @@ class nt {
|
|
|
629
555
|
}
|
|
630
556
|
}),
|
|
631
557
|
{}
|
|
632
|
-
),
|
|
633
|
-
const d =
|
|
558
|
+
), c = s == null ? void 0 : s.dependencies.reduce((u, l) => {
|
|
559
|
+
const d = x(this, S).call(this, l);
|
|
634
560
|
return {
|
|
635
|
-
...
|
|
561
|
+
...u,
|
|
636
562
|
[l]: {
|
|
637
563
|
name: l,
|
|
638
564
|
description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
|
|
@@ -642,10 +568,10 @@ class nt {
|
|
|
642
568
|
}
|
|
643
569
|
}
|
|
644
570
|
};
|
|
645
|
-
}, {}), $ = s == null ? void 0 : s.dependents.reduce((
|
|
646
|
-
const d =
|
|
571
|
+
}, {}), $ = s == null ? void 0 : s.dependents.reduce((u, l) => {
|
|
572
|
+
const d = x(this, S).call(this, l);
|
|
647
573
|
return {
|
|
648
|
-
...
|
|
574
|
+
...u,
|
|
649
575
|
[l]: {
|
|
650
576
|
name: l,
|
|
651
577
|
description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
|
|
@@ -659,10 +585,10 @@ class nt {
|
|
|
659
585
|
return {
|
|
660
586
|
...r,
|
|
661
587
|
...n,
|
|
662
|
-
...o,
|
|
663
588
|
...i,
|
|
664
|
-
...
|
|
665
|
-
...
|
|
589
|
+
...o,
|
|
590
|
+
...f,
|
|
591
|
+
...c,
|
|
666
592
|
...$
|
|
667
593
|
};
|
|
668
594
|
});
|
|
@@ -671,46 +597,46 @@ class nt {
|
|
|
671
597
|
* @param tagName - tag name we want to extract the description from
|
|
672
598
|
* @returns component description
|
|
673
599
|
*/
|
|
674
|
-
|
|
675
|
-
const s =
|
|
600
|
+
p(this, "extractComponentDescription", (t) => {
|
|
601
|
+
const s = x(this, S).call(this, t);
|
|
676
602
|
return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
|
|
677
603
|
});
|
|
678
604
|
this.jsonDoc = t;
|
|
679
605
|
}
|
|
680
606
|
}
|
|
681
|
-
S = new WeakMap(),
|
|
682
|
-
const
|
|
607
|
+
S = new WeakMap(), q = new WeakMap();
|
|
608
|
+
const qe = (e, t) => {
|
|
683
609
|
if (t)
|
|
684
610
|
return `${e}${t}`;
|
|
685
|
-
},
|
|
611
|
+
}, de = (e) => {
|
|
686
612
|
let t = e.overview ? `${e.overview}
|
|
687
613
|
|
|
688
614
|
` : "";
|
|
689
615
|
const s = e.props.filter(({ attr: n }) => n !== void 0);
|
|
690
616
|
s.length && (t += `Attributes:
|
|
691
|
-
`, t += s.map(({ attr: n, docs:
|
|
617
|
+
`, t += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
|
|
692
618
|
`).join(""), t += `
|
|
693
619
|
`);
|
|
694
620
|
const r = e.props.filter(({ attr: n }) => n === void 0);
|
|
695
621
|
return r.length && (t += `Properties:
|
|
696
|
-
`, t += r.map(({ name: n, docs:
|
|
622
|
+
`, t += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
697
623
|
`).join(""), t += `
|
|
698
624
|
`), e.methods.length && (t += `Methods:
|
|
699
|
-
`, t += e.methods.map(({ name: n, docs:
|
|
625
|
+
`, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
700
626
|
`).join(""), t += `
|
|
701
627
|
`), e.events.length && (t += `Events:
|
|
702
|
-
`, t += e.events.map(({ event: n, docs:
|
|
628
|
+
`, t += e.events.map(({ event: n, docs: i }) => `- \`${n}\`: ${i}
|
|
703
629
|
`).join(""), t += `
|
|
704
630
|
`), e.listeners.length && (t += `Listeners:
|
|
705
631
|
`, t += e.listeners.map(({ event: n }) => `- \`${n}\`
|
|
706
632
|
`).join(""), t += `
|
|
707
633
|
`), e.slots.length && (t += `Slots:
|
|
708
|
-
`, t += e.slots.map(({ name: n, docs:
|
|
634
|
+
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
709
635
|
`).join(""), t += `
|
|
710
636
|
`), t;
|
|
711
|
-
},
|
|
637
|
+
}, z = (e) => `${e.docs}
|
|
712
638
|
|
|
713
|
-
Type: \`${e.type}\``,
|
|
639
|
+
Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
714
640
|
$schema: "https://json.schemastore.org/web-types",
|
|
715
641
|
name: e,
|
|
716
642
|
version: t,
|
|
@@ -718,64 +644,64 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
718
644
|
contributions: {
|
|
719
645
|
html: {
|
|
720
646
|
elements: s.components.map((n) => {
|
|
721
|
-
const
|
|
647
|
+
const i = U(r, n.filePath);
|
|
722
648
|
return {
|
|
723
649
|
name: n.tag,
|
|
724
|
-
description:
|
|
725
|
-
"doc-url":
|
|
726
|
-
attributes: n.props.filter((
|
|
727
|
-
name:
|
|
728
|
-
description:
|
|
729
|
-
"doc-url":
|
|
650
|
+
description: de(n),
|
|
651
|
+
"doc-url": i,
|
|
652
|
+
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
653
|
+
name: o.attr,
|
|
654
|
+
description: z(o),
|
|
655
|
+
"doc-url": i,
|
|
730
656
|
value: {
|
|
731
|
-
type:
|
|
732
|
-
default:
|
|
733
|
-
required:
|
|
657
|
+
type: o.type,
|
|
658
|
+
default: o.default,
|
|
659
|
+
required: o.required
|
|
734
660
|
}
|
|
735
661
|
})),
|
|
736
662
|
js: {
|
|
737
|
-
properties: n.props.map((
|
|
738
|
-
name:
|
|
739
|
-
description:
|
|
740
|
-
"doc-url":
|
|
663
|
+
properties: n.props.map((o) => ({
|
|
664
|
+
name: o.name,
|
|
665
|
+
description: z(o),
|
|
666
|
+
"doc-url": i,
|
|
741
667
|
value: {
|
|
742
|
-
type:
|
|
743
|
-
default:
|
|
744
|
-
required:
|
|
668
|
+
type: o.type,
|
|
669
|
+
default: o.default,
|
|
670
|
+
required: o.required
|
|
745
671
|
}
|
|
746
672
|
})),
|
|
747
|
-
events: n.events.map((
|
|
748
|
-
name:
|
|
749
|
-
description:
|
|
673
|
+
events: n.events.map((o) => ({
|
|
674
|
+
name: o.event,
|
|
675
|
+
description: o.docs
|
|
750
676
|
}))
|
|
751
677
|
},
|
|
752
678
|
css: {
|
|
753
|
-
properties: n.styles.map((
|
|
754
|
-
name:
|
|
755
|
-
description:
|
|
679
|
+
properties: n.styles.map((o) => ({
|
|
680
|
+
name: o.name,
|
|
681
|
+
description: o.docs
|
|
756
682
|
}))
|
|
757
683
|
}
|
|
758
684
|
};
|
|
759
685
|
})
|
|
760
686
|
}
|
|
761
687
|
}
|
|
762
|
-
}),
|
|
688
|
+
}), Ce = (e, t, s) => [
|
|
763
689
|
{ name: "Storybook", url: U(e, s) },
|
|
764
|
-
{ name: "Sources", url:
|
|
765
|
-
],
|
|
690
|
+
{ name: "Sources", url: qe(t, s) }
|
|
691
|
+
], Be = (e) => {
|
|
766
692
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
767
693
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
768
|
-
},
|
|
694
|
+
}, at = (e, t, s) => ({
|
|
769
695
|
version: 1.1,
|
|
770
696
|
tags: e.components.map((r) => {
|
|
771
|
-
const n =
|
|
697
|
+
const n = Ce(t, s, r.filePath);
|
|
772
698
|
return {
|
|
773
699
|
name: r.tag,
|
|
774
|
-
description:
|
|
775
|
-
attributes: r.props.map((
|
|
776
|
-
name:
|
|
777
|
-
description:
|
|
778
|
-
values:
|
|
700
|
+
description: de(r),
|
|
701
|
+
attributes: r.props.map((i) => ({
|
|
702
|
+
name: i.attr || i.name,
|
|
703
|
+
description: z(i),
|
|
704
|
+
values: Be(i),
|
|
779
705
|
references: n
|
|
780
706
|
})),
|
|
781
707
|
references: n
|
|
@@ -783,7 +709,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
783
709
|
}),
|
|
784
710
|
globalAttributes: [],
|
|
785
711
|
valueSets: []
|
|
786
|
-
}),
|
|
712
|
+
}), ct = (e) => ({
|
|
787
713
|
version: 1.1,
|
|
788
714
|
properties: e.components.flatMap(
|
|
789
715
|
(t) => t.styles.map((s) => ({
|
|
@@ -791,48 +717,48 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
791
717
|
description: s.docs
|
|
792
718
|
}))
|
|
793
719
|
)
|
|
794
|
-
}),
|
|
720
|
+
}), ft = (e) => {
|
|
795
721
|
const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
796
|
-
return
|
|
797
|
-
},
|
|
798
|
-
const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang),
|
|
722
|
+
return ze([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);
|
|
723
|
+
}, $t = (e) => e.toISOString().split("T")[0], Pe = (e, t, s) => {
|
|
724
|
+
const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = i.split("-").shift();
|
|
799
725
|
return Object.keys(t).length === 0 ? {
|
|
800
|
-
locale:
|
|
726
|
+
locale: i,
|
|
801
727
|
messages: { lang: s }
|
|
802
728
|
} : {
|
|
803
|
-
locale:
|
|
804
|
-
messages: t[
|
|
729
|
+
locale: i,
|
|
730
|
+
messages: t[o] || t[s] || { lang: s }
|
|
805
731
|
};
|
|
806
|
-
},
|
|
732
|
+
}, ut = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), gt = (e, t, s = 0) => new Intl.NumberFormat(t, {
|
|
807
733
|
style: "percent",
|
|
808
734
|
minimumFractionDigits: s,
|
|
809
735
|
maximumFractionDigits: s
|
|
810
|
-
}).format(e),
|
|
736
|
+
}).format(e), pt = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
811
737
|
style: "unit",
|
|
812
738
|
unit: s,
|
|
813
739
|
unitDisplay: r,
|
|
814
740
|
minimumFractionDigits: n,
|
|
815
741
|
maximumFractionDigits: n
|
|
816
|
-
}).format(e),
|
|
742
|
+
}).format(e), we = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ze = (e, t, s) => typeof e != "string" || e === "" || !we.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ht = (e, t) => (s) => Pe(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {
|
|
817
743
|
class r {
|
|
818
|
-
constructor(
|
|
744
|
+
constructor(i) {
|
|
819
745
|
/**
|
|
820
746
|
*
|
|
821
747
|
*/
|
|
822
|
-
|
|
748
|
+
p(this, "disconnect", e);
|
|
823
749
|
/**
|
|
824
750
|
*
|
|
825
751
|
*/
|
|
826
|
-
|
|
752
|
+
p(this, "observe", t);
|
|
827
753
|
/**
|
|
828
754
|
*
|
|
829
755
|
*/
|
|
830
|
-
|
|
756
|
+
p(this, "takeRecords", s);
|
|
831
757
|
/**
|
|
832
758
|
*
|
|
833
759
|
*/
|
|
834
|
-
|
|
835
|
-
this.cb =
|
|
760
|
+
p(this, "cb");
|
|
761
|
+
this.cb = i;
|
|
836
762
|
}
|
|
837
763
|
}
|
|
838
764
|
return [window, global].forEach((n) => {
|
|
@@ -842,25 +768,25 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
842
768
|
value: r
|
|
843
769
|
});
|
|
844
770
|
}), r;
|
|
845
|
-
},
|
|
771
|
+
}, yt = ({ disconnect: e, observe: t }) => {
|
|
846
772
|
class s {
|
|
847
773
|
constructor(n) {
|
|
848
774
|
/**
|
|
849
775
|
*
|
|
850
776
|
*/
|
|
851
|
-
|
|
777
|
+
p(this, "disconnect", e);
|
|
852
778
|
/**
|
|
853
779
|
*
|
|
854
780
|
*/
|
|
855
|
-
|
|
781
|
+
p(this, "observe", t);
|
|
856
782
|
/**
|
|
857
783
|
*
|
|
858
784
|
*/
|
|
859
|
-
|
|
785
|
+
p(this, "unobserve");
|
|
860
786
|
/**
|
|
861
787
|
*
|
|
862
788
|
*/
|
|
863
|
-
|
|
789
|
+
p(this, "cb");
|
|
864
790
|
this.cb = n;
|
|
865
791
|
}
|
|
866
792
|
}
|
|
@@ -872,18 +798,18 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
|
|
|
872
798
|
});
|
|
873
799
|
}), s;
|
|
874
800
|
};
|
|
875
|
-
class
|
|
801
|
+
class Ie extends Event {
|
|
876
802
|
constructor() {
|
|
877
803
|
super(...arguments);
|
|
878
804
|
/**
|
|
879
805
|
*
|
|
880
806
|
*/
|
|
881
|
-
|
|
807
|
+
p(this, "detail");
|
|
882
808
|
}
|
|
883
809
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
884
810
|
}
|
|
885
|
-
const
|
|
886
|
-
class e extends
|
|
811
|
+
const mt = () => {
|
|
812
|
+
class e extends Ie {
|
|
887
813
|
}
|
|
888
814
|
return [window, global].forEach((t) => {
|
|
889
815
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -892,7 +818,7 @@ const yt = () => {
|
|
|
892
818
|
value: e
|
|
893
819
|
});
|
|
894
820
|
}), e;
|
|
895
|
-
},
|
|
821
|
+
}, bt = (e) => {
|
|
896
822
|
const t = (s) => (setTimeout(s, 1), e(), 0);
|
|
897
823
|
return [window, global].forEach((s) => {
|
|
898
824
|
Object.defineProperty(s, "requestAnimationFrame", {
|
|
@@ -903,39 +829,39 @@ const yt = () => {
|
|
|
903
829
|
}), t;
|
|
904
830
|
};
|
|
905
831
|
export {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
832
|
+
Ze as ClassList,
|
|
833
|
+
ot as StorybookPreview,
|
|
834
|
+
Je as allItemsAreString,
|
|
835
|
+
tt as cleanString,
|
|
836
|
+
Ge as createID,
|
|
837
|
+
we as dateRegExp,
|
|
838
|
+
$t as dateToString,
|
|
839
|
+
ht as defineLocales,
|
|
840
|
+
rt as filterArgs,
|
|
915
841
|
Qe as focusableElements,
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
842
|
+
ft as getLocaleDatePattern,
|
|
843
|
+
Y as getParentWindows,
|
|
844
|
+
it as getStoryHTML,
|
|
919
845
|
U as getStorybookUrl,
|
|
920
|
-
|
|
846
|
+
Ye as getWindows,
|
|
921
847
|
Ke as isTagName,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
848
|
+
et as isValidNumber,
|
|
849
|
+
me as isValidString,
|
|
850
|
+
Xe as isValideID,
|
|
851
|
+
ut as localeCurrency,
|
|
852
|
+
ze as localeDate,
|
|
853
|
+
dt as localeNumber,
|
|
854
|
+
gt as localePercent,
|
|
855
|
+
pt as localeUnit,
|
|
856
|
+
st as nextTick,
|
|
857
|
+
bt as setUpRequestAnimationFrameMock,
|
|
858
|
+
vt as setupMutationObserverMock,
|
|
859
|
+
yt as setupResizeObserverMock,
|
|
860
|
+
mt as setupSubmitEventMock,
|
|
861
|
+
nt as stencilWrapper,
|
|
862
|
+
Ve as toString,
|
|
863
|
+
ct as vsCodeCssGenerator,
|
|
864
|
+
at as vsCodeGenerator,
|
|
865
|
+
lt as webTypesGenerator
|
|
940
866
|
};
|
|
941
867
|
//# sourceMappingURL=index.es.js.map
|