@spscommerce/ds-web-components 8.56.2 → 8.56.3
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/lib/components/file-upload/file-upload.d.ts +2 -1
- package/dist/lib/index.js +1082 -1375
- package/dist/lib/index.umd.cjs +38 -38
- package/dist/package.json +1 -1
- package/lib/components/file-upload/file-upload.d.ts +2 -1
- package/lib/index.js +1082 -1375
- package/lib/index.umd.cjs +38 -38
- package/package.json +7 -7
package/dist/lib/index.js
CHANGED
|
@@ -1,914 +1,779 @@
|
|
|
1
|
-
import { SpsIcon as
|
|
2
|
-
import {
|
|
3
|
-
import { i18nWoodland as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
Le(x, oe(), null), v = x, x = x.parentNode;
|
|
332
|
-
}
|
|
333
|
-
function $e(t, n) {
|
|
334
|
-
return fe(), Ie(t, n), Fe(), x;
|
|
335
|
-
}
|
|
336
|
-
function Be() {
|
|
337
|
-
return process.env.NODE_ENV !== "production" && se(!1), Re(), v;
|
|
338
|
-
}
|
|
339
|
-
function yt() {
|
|
340
|
-
return fe(), Ie("#text", null), v;
|
|
341
|
-
}
|
|
342
|
-
function St() {
|
|
343
|
-
return process.env.NODE_ENV !== "production" && (ye("currentElement", T), W("currentElement")), x;
|
|
344
|
-
}
|
|
345
|
-
function At() {
|
|
346
|
-
return process.env.NODE_ENV !== "production" && (ye("currentPointer", T), W("currentPointer")), oe();
|
|
347
|
-
}
|
|
348
|
-
function Ot() {
|
|
349
|
-
process.env.NODE_ENV !== "production" && (it("skip", v), se(!0)), v = x.lastChild;
|
|
350
|
-
}
|
|
351
|
-
var je = 3, I = r();
|
|
352
|
-
function Dt(t, n, a) {
|
|
353
|
-
if (n.staticsApplied = !0, !(!a || !a.length)) {
|
|
354
|
-
if (n.hasEmptyAttrsArr()) {
|
|
355
|
-
for (var l = 0; l < a.length; l += 2)
|
|
356
|
-
Y(t, a[l], a[l + 1]);
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
for (var l = 0; l < a.length; l += 2)
|
|
360
|
-
I[a[l]] = l + 1;
|
|
361
|
-
for (var d = n.getAttrsArr(0), h = 0, l = 0; l < d.length; l += 2) {
|
|
362
|
-
var y = d[l], C = d[l + 1], S = I[y];
|
|
363
|
-
if (S) {
|
|
364
|
-
a[S] === C && delete I[y];
|
|
365
|
-
continue;
|
|
366
|
-
}
|
|
367
|
-
d[h] = y, d[h + 1] = C, h += 2;
|
|
368
|
-
}
|
|
369
|
-
p(d, h);
|
|
370
|
-
for (var y in I)
|
|
371
|
-
Y(t, y, a[I[y]]), delete I[y];
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
function ge(t, n, a) {
|
|
375
|
-
process.env.NODE_ENV !== "production" && (W("elementOpen"), Se("elementOpen"));
|
|
376
|
-
var l = $e(t, n), d = H(l);
|
|
377
|
-
d.staticsApplied || Dt(l, d, a);
|
|
378
|
-
var h = Math.max(0, arguments.length - je), y = d.hasEmptyAttrsArr();
|
|
379
|
-
if (!h && y)
|
|
380
|
-
return l;
|
|
381
|
-
for (var C = d.getAttrsArr(h), S = je, w = 0; S < arguments.length; S += 2, w += 2) {
|
|
382
|
-
var O = arguments[S];
|
|
383
|
-
if (y)
|
|
384
|
-
C[w] = O;
|
|
385
|
-
else if (C[w] !== O)
|
|
386
|
-
break;
|
|
387
|
-
var F = arguments[S + 1];
|
|
388
|
-
(y || C[w + 1] !== F) && (C[w + 1] = F, Y(l, O, F));
|
|
389
|
-
}
|
|
390
|
-
if (S < arguments.length || w < C.length) {
|
|
391
|
-
for (var le = w; w < C.length; w += 2)
|
|
392
|
-
I[C[w]] = C[w + 1];
|
|
393
|
-
for (w = le; S < arguments.length; S += 2, w += 2) {
|
|
394
|
-
var O = arguments[S], F = arguments[S + 1];
|
|
395
|
-
I[O] !== F && Y(l, O, F), C[w] = O, C[w + 1] = F, delete I[O];
|
|
396
|
-
}
|
|
397
|
-
p(C, w);
|
|
398
|
-
for (var O in I)
|
|
399
|
-
Y(l, O, void 0), delete I[O];
|
|
400
|
-
}
|
|
401
|
-
return l;
|
|
402
|
-
}
|
|
403
|
-
function Pt(t, n, a) {
|
|
404
|
-
var l = ae();
|
|
405
|
-
process.env.NODE_ENV !== "production" && (W("elementOpenStart"), te(!0)), l[0] = t, l[1] = n, l[2] = a;
|
|
406
|
-
}
|
|
407
|
-
function Et(t) {
|
|
408
|
-
var n = ae();
|
|
409
|
-
process.env.NODE_ENV !== "production" && (de("key"), ne(n)), n[1] = t;
|
|
410
|
-
}
|
|
411
|
-
function kt(t, n) {
|
|
412
|
-
var a = ae();
|
|
413
|
-
process.env.NODE_ENV !== "production" && de("attr"), a.push(t), a.push(n);
|
|
414
|
-
}
|
|
415
|
-
function It() {
|
|
416
|
-
var t = ae();
|
|
417
|
-
process.env.NODE_ENV !== "production" && (de("elementOpenEnd"), te(!1)), ne(t);
|
|
418
|
-
var n = ge.apply(null, t);
|
|
419
|
-
return p(t, 0), n;
|
|
420
|
-
}
|
|
421
|
-
function Te(t) {
|
|
422
|
-
process.env.NODE_ENV !== "production" && W("elementClose");
|
|
423
|
-
var n = Be();
|
|
424
|
-
return process.env.NODE_ENV !== "production" && nt(H(n).nameOrCtor, t), n;
|
|
425
|
-
}
|
|
426
|
-
function Lt(t, n, a) {
|
|
427
|
-
return ge.apply(null, arguments), Te(t);
|
|
428
|
-
}
|
|
429
|
-
function Ft(t) {
|
|
430
|
-
process.env.NODE_ENV !== "production" && (W("text"), Se("text"));
|
|
431
|
-
var n = yt(), a = H(n);
|
|
432
|
-
if (a.text !== t) {
|
|
433
|
-
a.text = t;
|
|
434
|
-
for (var l = t, d = 1; d < arguments.length; d += 1) {
|
|
435
|
-
var h = arguments[d];
|
|
436
|
-
l = h(l);
|
|
437
|
-
}
|
|
438
|
-
n.data = l;
|
|
439
|
-
}
|
|
440
|
-
return n;
|
|
441
|
-
}
|
|
442
|
-
return g.applyAttr = V, g.applyProp = xe, g.attributes = Z, g.close = Be, g.currentElement = St, g.currentPointer = At, g.open = $e, g.patch = Ee, g.patchInner = Ee, g.patchOuter = _t, g.skip = Ot, g.skipNode = fe, g.getKey = mt, g.clearCache = De, g.importNode = Oe, g.isDataInitialized = gt, g.notifications = M, g.symbols = e, g.attr = kt, g.elementClose = Te, g.elementOpen = ge, g.elementOpenEnd = It, g.elementOpenStart = Pt, g.elementVoid = Lt, g.text = Ft, g.key = Et, g;
|
|
443
|
-
}
|
|
444
|
-
var A = Tt();
|
|
445
|
-
function Ve(e) {
|
|
446
|
-
let s = A.currentPointer();
|
|
447
|
-
return s instanceof Comment && s.data !== e ? s.data = e : (s = document.createComment(e), A.currentElement().appendChild(s)), A.skipNode(), s;
|
|
1
|
+
import { SpsIcon as e, SpsInsightCardIcons as t, SpsInsightCardKind as n } from "@spscommerce/ds-shared";
|
|
2
|
+
import { code as r, parseFileSize as i } from "@spscommerce/utils";
|
|
3
|
+
import { i18nWoodland as a } from "@spscommerce/i18n";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = {}, c = (/* @__PURE__ */ o(((e) => {
|
|
6
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
7
|
+
var t = { default: "__default" }, n = Object.prototype.hasOwnProperty;
|
|
8
|
+
function r() {}
|
|
9
|
+
r.prototype = Object.create(null);
|
|
10
|
+
function i(e, t) {
|
|
11
|
+
return n.call(e, t);
|
|
12
|
+
}
|
|
13
|
+
function a() {
|
|
14
|
+
return new r();
|
|
15
|
+
}
|
|
16
|
+
function o(e, t) {
|
|
17
|
+
for (; e.length > t;) e.pop();
|
|
18
|
+
}
|
|
19
|
+
function s(e) {
|
|
20
|
+
if (e.lastIndexOf("xml:", 0) === 0) return "http://www.w3.org/XML/1998/namespace";
|
|
21
|
+
if (e.lastIndexOf("xlink:", 0) === 0) return "http://www.w3.org/1999/xlink";
|
|
22
|
+
}
|
|
23
|
+
function c(e, t, n) {
|
|
24
|
+
if (n == null) e.removeAttribute(t);
|
|
25
|
+
else {
|
|
26
|
+
var r = s(t);
|
|
27
|
+
r ? e.setAttributeNS(r, t, String(n)) : e.setAttribute(t, String(n));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function l(e, t, n) {
|
|
31
|
+
e[t] = n;
|
|
32
|
+
}
|
|
33
|
+
function u(e, t, n) {
|
|
34
|
+
t.indexOf("-") >= 0 ? e.setProperty(t, n) : e[t] = n;
|
|
35
|
+
}
|
|
36
|
+
function d(e, t, n) {
|
|
37
|
+
if (typeof n == "string") e.style.cssText = n;
|
|
38
|
+
else {
|
|
39
|
+
e.style.cssText = "";
|
|
40
|
+
var r = e.style;
|
|
41
|
+
for (var a in n) i(n, a) && u(r, a, n[a]);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function f(e, t, n) {
|
|
45
|
+
var r = typeof n;
|
|
46
|
+
r === "object" || r === "function" ? l(e, t, n) : c(e, t, n);
|
|
47
|
+
}
|
|
48
|
+
var p = a();
|
|
49
|
+
p[t.default] = f, p.style = d;
|
|
50
|
+
function m(e, n, r) {
|
|
51
|
+
(p[n] || p[t.default])(e, n, r);
|
|
52
|
+
}
|
|
53
|
+
var h = !1, g = !1;
|
|
54
|
+
function _(e, t) {
|
|
55
|
+
if (!t) throw Error("Cannot call " + e + "() unless in patch.");
|
|
56
|
+
}
|
|
57
|
+
function ee(e, t) {
|
|
58
|
+
if (e !== t) {
|
|
59
|
+
for (var n = e, r = []; n && n !== t;) r.push(n.nodeName.toLowerCase()), n = n.parentNode;
|
|
60
|
+
throw Error("One or more tags were not closed:\n" + r.join("\n"));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function v(e) {
|
|
64
|
+
if (h) throw Error(e + "() can not be called between elementOpenStart() and elementOpenEnd().");
|
|
65
|
+
}
|
|
66
|
+
function y(e) {
|
|
67
|
+
if (g) throw Error(e + "() may not be called inside an element that has called skip().");
|
|
68
|
+
}
|
|
69
|
+
function b(e) {
|
|
70
|
+
if (!h) throw Error(e + "() can only be called after calling elementOpenStart().");
|
|
71
|
+
}
|
|
72
|
+
function x() {
|
|
73
|
+
if (h) throw Error("elementOpenEnd() must be called after calling elementOpenStart().");
|
|
74
|
+
}
|
|
75
|
+
function S(e, t) {
|
|
76
|
+
if (e !== t) throw Error("Received a call to close \"" + t + "\" but \"" + e + "\" was open.");
|
|
77
|
+
}
|
|
78
|
+
function C(e) {
|
|
79
|
+
var t = h;
|
|
80
|
+
return h = e, t;
|
|
81
|
+
}
|
|
82
|
+
function w(e) {
|
|
83
|
+
var t = g;
|
|
84
|
+
return g = e, t;
|
|
85
|
+
}
|
|
86
|
+
function T(e) {
|
|
87
|
+
if (process.env.NODE_ENV !== "production" && !e) throw Error("Expected value to be defined");
|
|
88
|
+
return e;
|
|
89
|
+
}
|
|
90
|
+
var E = {
|
|
91
|
+
nodesCreated: null,
|
|
92
|
+
nodesDeleted: null
|
|
93
|
+
}, D = function() {
|
|
94
|
+
function e() {
|
|
95
|
+
this.created = [], this.deleted = [];
|
|
96
|
+
}
|
|
97
|
+
return e.prototype.markCreated = function(e) {
|
|
98
|
+
this.created.push(e);
|
|
99
|
+
}, e.prototype.markDeleted = function(e) {
|
|
100
|
+
this.deleted.push(e);
|
|
101
|
+
}, e.prototype.notifyChanges = function() {
|
|
102
|
+
E.nodesCreated && this.created.length > 0 && E.nodesCreated(this.created), E.nodesDeleted && this.deleted.length > 0 && E.nodesDeleted(this.deleted);
|
|
103
|
+
}, e;
|
|
104
|
+
}();
|
|
105
|
+
function O(e) {
|
|
106
|
+
return e.nodeType === 11 || e.nodeType === 9;
|
|
107
|
+
}
|
|
108
|
+
function k(e) {
|
|
109
|
+
return e.nodeType === 1;
|
|
110
|
+
}
|
|
111
|
+
function A(e) {
|
|
112
|
+
return e.nodeType === 3;
|
|
113
|
+
}
|
|
114
|
+
function j(e, t) {
|
|
115
|
+
for (var n = [], r = e; r !== t;) {
|
|
116
|
+
var i = r;
|
|
117
|
+
n.push(i), r = i.parentNode;
|
|
118
|
+
}
|
|
119
|
+
return n;
|
|
120
|
+
}
|
|
121
|
+
var M = Node.prototype.getRootNode || function() {
|
|
122
|
+
for (var e = this, t = e; e;) t = e, e = e.parentNode;
|
|
123
|
+
return t;
|
|
124
|
+
};
|
|
125
|
+
function N(e) {
|
|
126
|
+
var t = M.call(e);
|
|
127
|
+
return O(t) ? t.activeElement : null;
|
|
128
|
+
}
|
|
129
|
+
function P(e, t) {
|
|
130
|
+
var n = N(e);
|
|
131
|
+
return !n || !e.contains(n) ? [] : j(n, t);
|
|
132
|
+
}
|
|
133
|
+
function F(e, t, n) {
|
|
134
|
+
for (var r = t.nextSibling, i = n; i !== null && i !== t;) {
|
|
135
|
+
var a = i.nextSibling;
|
|
136
|
+
e.insertBefore(i, r), i = a;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
var I = function() {
|
|
140
|
+
function e(e, t, n) {
|
|
141
|
+
this._attrsArr = null, this.staticsApplied = !1, this.nameOrCtor = e, this.key = t, this.text = n;
|
|
142
|
+
}
|
|
143
|
+
return e.prototype.hasEmptyAttrsArr = function() {
|
|
144
|
+
var e = this._attrsArr;
|
|
145
|
+
return !e || !e.length;
|
|
146
|
+
}, e.prototype.getAttrsArr = function(e) {
|
|
147
|
+
return this._attrsArr ||= Array(e);
|
|
148
|
+
}, e;
|
|
149
|
+
}();
|
|
150
|
+
function L(e, t, n, r) {
|
|
151
|
+
var i = new I(t, n, r);
|
|
152
|
+
return e.__incrementalDOMData = i, i;
|
|
153
|
+
}
|
|
154
|
+
function R(e, t) {
|
|
155
|
+
return z(e, t);
|
|
156
|
+
}
|
|
157
|
+
function z(e, t) {
|
|
158
|
+
if (e.__incrementalDOMData) return e.__incrementalDOMData;
|
|
159
|
+
var n = L(e, k(e) ? e.localName : e.nodeName, k(e) ? e.getAttribute("key") || t : null, A(e) ? e.data : void 0);
|
|
160
|
+
return k(e) && B(e, n), n;
|
|
161
|
+
}
|
|
162
|
+
function B(e, t) {
|
|
163
|
+
var n = e.attributes, r = n.length;
|
|
164
|
+
if (r) for (var i = t.getAttrsArr(r), a = 0, o = 0; a < r; a += 1, o += 2) {
|
|
165
|
+
var s = n[a], c = s.name, l = s.value;
|
|
166
|
+
i[o] = c, i[o + 1] = l;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function V(e, t) {
|
|
170
|
+
return e === "svg" ? "http://www.w3.org/2000/svg" : e === "math" ? "http://www.w3.org/1998/Math/MathML" : t == null || R(t).nameOrCtor === "foreignObject" ? null : t.namespaceURI;
|
|
171
|
+
}
|
|
172
|
+
function te(e, t, n, r) {
|
|
173
|
+
var i;
|
|
174
|
+
if (typeof n == "function") i = new n();
|
|
175
|
+
else {
|
|
176
|
+
var a = V(n, t);
|
|
177
|
+
i = a ? e.createElementNS(a, n) : e.createElement(n);
|
|
178
|
+
}
|
|
179
|
+
return L(i, n, r), i;
|
|
180
|
+
}
|
|
181
|
+
function H(e) {
|
|
182
|
+
var t = e.createTextNode("");
|
|
183
|
+
return L(t, "#text", null), t;
|
|
184
|
+
}
|
|
185
|
+
var U = null, W = null, G = null, K = null, q = [], J = [];
|
|
186
|
+
function Y() {
|
|
187
|
+
return J;
|
|
188
|
+
}
|
|
189
|
+
function ne(e) {
|
|
190
|
+
return function(t, n, r) {
|
|
191
|
+
var i = U, a = K, o = q, s = J, c = W, l = G, u = !1, d = !1;
|
|
192
|
+
U = new D(), K = t.ownerDocument, J = [], G = t.parentNode, q = P(t, G), process.env.NODE_ENV !== "production" && (u = C(!1), d = w(!1));
|
|
193
|
+
try {
|
|
194
|
+
var f = e(t, n, r);
|
|
195
|
+
return process.env.NODE_ENV !== "production" && x(), f;
|
|
196
|
+
} finally {
|
|
197
|
+
K = a, J = s, W = c, G = l, q = o, U.notifyChanges(), C(u), w(d), U = i;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
var re = ne(function(e, t, n) {
|
|
202
|
+
return W = e, ce(), t(n), le(), process.env.NODE_ENV !== "production" && ee(W, e), e;
|
|
203
|
+
});
|
|
204
|
+
function X(e, t, n) {
|
|
205
|
+
var r = R(e, n);
|
|
206
|
+
return t == r.nameOrCtor && n == r.key;
|
|
207
|
+
}
|
|
208
|
+
function ie(e, t, n) {
|
|
209
|
+
if (!e) return null;
|
|
210
|
+
if (X(e, t, n)) return e;
|
|
211
|
+
if (n) {
|
|
212
|
+
for (; e = e.nextSibling;) if (X(e, t, n)) return e;
|
|
213
|
+
}
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
function ae(e, t) {
|
|
217
|
+
var n = e === "#text" ? H(K) : te(K, G, e, t);
|
|
218
|
+
return U.markCreated(n), n;
|
|
219
|
+
}
|
|
220
|
+
function oe(e, t) {
|
|
221
|
+
var n = ie(W, e, t) || ae(e, t);
|
|
222
|
+
n !== W && (q.indexOf(n) >= 0 ? F(G, n, W) : G.insertBefore(n, W), W = n);
|
|
223
|
+
}
|
|
224
|
+
function se(e, t, n) {
|
|
225
|
+
for (var r = e, i = t; i !== n;) {
|
|
226
|
+
var a = i.nextSibling;
|
|
227
|
+
r.removeChild(i), U.markDeleted(i), i = a;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function ce() {
|
|
231
|
+
G = W, W = null;
|
|
232
|
+
}
|
|
233
|
+
function Z() {
|
|
234
|
+
return W ? W.nextSibling : G.firstChild;
|
|
235
|
+
}
|
|
236
|
+
function Q() {
|
|
237
|
+
W = Z();
|
|
238
|
+
}
|
|
239
|
+
function le() {
|
|
240
|
+
se(G, Z(), null), W = G, G = G.parentNode;
|
|
241
|
+
}
|
|
242
|
+
function ue(e, t) {
|
|
243
|
+
return Q(), oe(e, t), ce(), G;
|
|
244
|
+
}
|
|
245
|
+
function de() {
|
|
246
|
+
return process.env.NODE_ENV !== "production" && w(!1), le(), W;
|
|
247
|
+
}
|
|
248
|
+
function fe() {
|
|
249
|
+
return Q(), oe("#text", null), W;
|
|
250
|
+
}
|
|
251
|
+
function pe() {
|
|
252
|
+
return process.env.NODE_ENV !== "production" && (_("currentElement", K), v("currentElement")), G;
|
|
253
|
+
}
|
|
254
|
+
function me() {
|
|
255
|
+
return process.env.NODE_ENV !== "production" && (_("currentPointer", K), v("currentPointer")), Z();
|
|
256
|
+
}
|
|
257
|
+
var he = 3, $ = a();
|
|
258
|
+
function ge(e, t, n) {
|
|
259
|
+
if (t.staticsApplied = !0, n && n.length) {
|
|
260
|
+
if (t.hasEmptyAttrsArr()) for (var r = 0; r < n.length; r += 2) m(e, n[r], n[r + 1]);
|
|
261
|
+
else {
|
|
262
|
+
for (var r = 0; r < n.length; r += 2) $[n[r]] = r + 1;
|
|
263
|
+
for (var i = t.getAttrsArr(0), a = 0, r = 0; r < i.length; r += 2) {
|
|
264
|
+
var s = i[r], c = i[r + 1], l = $[s];
|
|
265
|
+
l ? n[l] === c && delete $[s] : (i[a] = s, i[a + 1] = c, a += 2);
|
|
266
|
+
}
|
|
267
|
+
for (var s in o(i, a), $) m(e, s, n[$[s]]), delete $[s];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function _e(e, t, n) {
|
|
272
|
+
process.env.NODE_ENV !== "production" && (v("elementOpen"), y("elementOpen"));
|
|
273
|
+
var r = ue(e, t), i = R(r);
|
|
274
|
+
i.staticsApplied || ge(r, i, n);
|
|
275
|
+
var a = Math.max(0, arguments.length - he), s = i.hasEmptyAttrsArr();
|
|
276
|
+
if (!a && s) return r;
|
|
277
|
+
for (var c = i.getAttrsArr(a), l = he, u = 0; l < arguments.length; l += 2, u += 2) {
|
|
278
|
+
var d = arguments[l];
|
|
279
|
+
if (s) c[u] = d;
|
|
280
|
+
else if (c[u] !== d) break;
|
|
281
|
+
var f = arguments[l + 1];
|
|
282
|
+
(s || c[u + 1] !== f) && (c[u + 1] = f, m(r, d, f));
|
|
283
|
+
}
|
|
284
|
+
if (l < arguments.length || u < c.length) {
|
|
285
|
+
for (var p = u; u < c.length; u += 2) $[c[u]] = c[u + 1];
|
|
286
|
+
for (u = p; l < arguments.length; l += 2, u += 2) {
|
|
287
|
+
var d = arguments[l], f = arguments[l + 1];
|
|
288
|
+
$[d] !== f && m(r, d, f), c[u] = d, c[u + 1] = f, delete $[d];
|
|
289
|
+
}
|
|
290
|
+
for (var d in o(c, u), $) m(r, d, void 0), delete $[d];
|
|
291
|
+
}
|
|
292
|
+
return r;
|
|
293
|
+
}
|
|
294
|
+
function ve(e, t, n) {
|
|
295
|
+
var r = Y();
|
|
296
|
+
process.env.NODE_ENV !== "production" && (v("elementOpenStart"), C(!0)), r[0] = e, r[1] = t, r[2] = n;
|
|
297
|
+
}
|
|
298
|
+
function ye(e, t) {
|
|
299
|
+
var n = Y();
|
|
300
|
+
process.env.NODE_ENV !== "production" && b("attr"), n.push(e), n.push(t);
|
|
301
|
+
}
|
|
302
|
+
function be() {
|
|
303
|
+
var e = Y();
|
|
304
|
+
process.env.NODE_ENV !== "production" && (b("elementOpenEnd"), C(!1)), T(e);
|
|
305
|
+
var t = _e.apply(null, e);
|
|
306
|
+
return o(e, 0), t;
|
|
307
|
+
}
|
|
308
|
+
function xe(e) {
|
|
309
|
+
process.env.NODE_ENV !== "production" && v("elementClose");
|
|
310
|
+
var t = de();
|
|
311
|
+
return process.env.NODE_ENV !== "production" && S(R(t).nameOrCtor, e), t;
|
|
312
|
+
}
|
|
313
|
+
function Se(e) {
|
|
314
|
+
process.env.NODE_ENV !== "production" && (v("text"), y("text"));
|
|
315
|
+
var t = fe(), n = R(t);
|
|
316
|
+
if (n.text !== e) {
|
|
317
|
+
n.text = e;
|
|
318
|
+
for (var r = e, i = 1; i < arguments.length; i += 1) {
|
|
319
|
+
var a = arguments[i];
|
|
320
|
+
r = a(r);
|
|
321
|
+
}
|
|
322
|
+
t.data = r;
|
|
323
|
+
}
|
|
324
|
+
return t;
|
|
325
|
+
}
|
|
326
|
+
e.currentElement = pe, e.currentPointer = me, e.patch = re, e.skipNode = Q, e.attr = ye, e.elementClose = xe, e.elementOpenEnd = be, e.elementOpenStart = ve, e.text = Se;
|
|
327
|
+
})))();
|
|
328
|
+
function l(e) {
|
|
329
|
+
let t = (0, c.currentPointer)();
|
|
330
|
+
return t instanceof Comment && t.data !== e ? t.data = e : (t = document.createComment(e), (0, c.currentElement)().appendChild(t)), (0, c.skipNode)(), t;
|
|
448
331
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
for (; i && i.data !== me; )
|
|
476
|
-
A.skipNode(), i = A.currentPointer();
|
|
477
|
-
Ve(me);
|
|
478
|
-
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/utils/metadata.ts
|
|
334
|
+
var u = Symbol("ComponentMetadata"), d = Object.freeze({
|
|
335
|
+
has(e, t) {
|
|
336
|
+
return !!(e[u] && Object.prototype.hasOwnProperty.call(e[u], t));
|
|
337
|
+
},
|
|
338
|
+
add(e, t) {
|
|
339
|
+
e[u] ? Object.assign(e[u], t) : e[u] = t;
|
|
340
|
+
},
|
|
341
|
+
get(e, t, n) {
|
|
342
|
+
return e[u] && e[u][t] || n;
|
|
343
|
+
}
|
|
344
|
+
}), f = Symbol("ds-web-components:pragma:listeners-attached"), p = "idom-pragma:content-begin", m = "idom-pragma:content-end";
|
|
345
|
+
function h(e) {
|
|
346
|
+
for (let t of e) if (typeof t == "function") t();
|
|
347
|
+
else if (typeof t == "string") (0, c.text)(t);
|
|
348
|
+
else if (t instanceof Set) h(Array.from(t));
|
|
349
|
+
else if (Array.isArray(t) && t.length > 0) {
|
|
350
|
+
let e = (0, c.currentPointer)();
|
|
351
|
+
if (l(p), e === null) {
|
|
352
|
+
let e = (0, c.currentElement)();
|
|
353
|
+
for (let n = 0; n < t.length; n += 1) e.contains(t[n]) || e.appendChild(t[n]), (0, c.skipNode)();
|
|
354
|
+
}
|
|
355
|
+
for (; e && e.data !== "idom-pragma:content-end";) (0, c.skipNode)(), e = (0, c.currentPointer)();
|
|
356
|
+
l(m);
|
|
357
|
+
}
|
|
479
358
|
}
|
|
480
|
-
function
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
r.addEventListener(p.substr(2).toLowerCase(), s[p]);
|
|
497
|
-
r[We] = !0;
|
|
498
|
-
}
|
|
499
|
-
ve(i), A.elementClose(e);
|
|
500
|
-
};
|
|
359
|
+
function g(e, t, ...n) {
|
|
360
|
+
if (t) {
|
|
361
|
+
for (let e of Object.keys(t)) if (e.toUpperCase() === "DATA-FRAGMENT") return () => h(n);
|
|
362
|
+
}
|
|
363
|
+
return () => {
|
|
364
|
+
(0, c.elementOpenStart)(e);
|
|
365
|
+
let r = [];
|
|
366
|
+
if (t) for (let e of Object.keys(t)) e.toUpperCase() === "CLASSNAME" ? (0, c.attr)("class", t[e]) : /^on[A-Z]/.test(e) ? r.push(e) : (0, c.attr)(e, t[e]);
|
|
367
|
+
(0, c.elementOpenEnd)(e);
|
|
368
|
+
let i = (0, c.currentElement)();
|
|
369
|
+
if (!i[f]) {
|
|
370
|
+
for (let e of r) i.addEventListener(e.substr(2).toLowerCase(), t[e]);
|
|
371
|
+
i[f] = !0;
|
|
372
|
+
}
|
|
373
|
+
h(n), (0, c.elementClose)(e);
|
|
374
|
+
};
|
|
501
375
|
}
|
|
502
|
-
|
|
503
|
-
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/utils/register.ts
|
|
378
|
+
function _(e, t) {
|
|
379
|
+
customElements.get(e) || customElements.define(e, t);
|
|
504
380
|
}
|
|
505
|
-
function
|
|
506
|
-
|
|
507
|
-
Ge(E.get(s, "tag"), s);
|
|
381
|
+
function ee(...e) {
|
|
382
|
+
for (let t of e) _(d.get(t, "tag"), t);
|
|
508
383
|
}
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
Ge(r, o);
|
|
514
|
-
}
|
|
515
|
-
};
|
|
384
|
+
function v(e) {
|
|
385
|
+
return function(...t) {
|
|
386
|
+
for (let n of t) _(`${e}${d.get(n, "tag").substr(3)}`, n);
|
|
387
|
+
};
|
|
516
388
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
e.__updateChildQueries(), e.__updateHostBindings();
|
|
598
|
-
}, 0);
|
|
599
|
-
}, 0);
|
|
600
|
-
},
|
|
601
|
-
disconnectedCallback() {
|
|
602
|
-
const e = this;
|
|
603
|
-
e.__cbDisconnected && e.__cbDisconnected();
|
|
604
|
-
for (const [s, i] of E.get(e.constructor, "eventListeners", []))
|
|
605
|
-
e.removeEventListener(s, e[i]);
|
|
606
|
-
e.__stopMutObs();
|
|
607
|
-
}
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/decorators/component.ts
|
|
391
|
+
var y = Symbol("Component Attribute Bindings"), b = Symbol("Component Class Bindings"), x = Symbol("Component Style Bindings"), S = {
|
|
392
|
+
__initialized: !1,
|
|
393
|
+
__observer: null,
|
|
394
|
+
__queuedUpdate: null,
|
|
395
|
+
__managedClasses: /* @__PURE__ */ new Set(),
|
|
396
|
+
__updateHostBindings() {
|
|
397
|
+
let e = this;
|
|
398
|
+
for (let t of Object.keys(e[y] || {})) e.setAttribute(t, e[y][t]);
|
|
399
|
+
for (let t of Object.keys(e[x] || {})) e.style[t] = e[x][t];
|
|
400
|
+
for (let t of e.__managedClasses) e.classList.remove(t);
|
|
401
|
+
for (let t of (e[b] || []).filter(Boolean)) e.__managedClasses.add(t), e.classList.add(t);
|
|
402
|
+
for (let t of (e.getAttribute("classname") || "").split(/\w+/).filter(Boolean)) e.classList.add(t);
|
|
403
|
+
},
|
|
404
|
+
__updateChildQueries(e) {
|
|
405
|
+
let t = this;
|
|
406
|
+
for (let n of d.get(t.constructor, "childQueries", [])) if (!e || e && n.refresh) {
|
|
407
|
+
let e = n.all ? t.querySelectorAll : t.querySelector;
|
|
408
|
+
t[n.key] = e.call(t, n.selector);
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
__gatherChildren() {
|
|
412
|
+
let e = this, t = Array.from(e.childNodes), n = null, r = t.length;
|
|
413
|
+
for (let e = 0; e < t.length; e += 1) {
|
|
414
|
+
let i = t[e];
|
|
415
|
+
i instanceof Comment && (i.data === "idom-pragma:content-begin" ? n = e + 1 : i.data === "idom-pragma:content-end" && (r = e - 1));
|
|
416
|
+
}
|
|
417
|
+
if (n === null) for (let e of t) e.parentNode.removeChild(e);
|
|
418
|
+
else t = t.slice(n, r);
|
|
419
|
+
d.has(e.constructor, "contentProp") && (e[d.get(e.constructor, "contentProp")] = t);
|
|
420
|
+
},
|
|
421
|
+
__startMutObs() {
|
|
422
|
+
let e = this;
|
|
423
|
+
e.__observer ||= new MutationObserver(() => {
|
|
424
|
+
e.contentChangedCallback && e.contentChangedCallback(), e.__gatherChildren(), e.update();
|
|
425
|
+
}), e.__observer.observe(e, { childList: !0 });
|
|
426
|
+
},
|
|
427
|
+
__stopMutObs() {
|
|
428
|
+
let e = this;
|
|
429
|
+
e.__observer && e.__observer.disconnect();
|
|
430
|
+
},
|
|
431
|
+
__doRender() {
|
|
432
|
+
let e = this;
|
|
433
|
+
e.__stopMutObs(), (0, c.patch)(e, e.render()), e.__startMutObs();
|
|
434
|
+
},
|
|
435
|
+
update() {
|
|
436
|
+
let e = this;
|
|
437
|
+
e.__initialized && !e.__queuedUpdate && (e.__queuedUpdate = window.requestAnimationFrame(() => {
|
|
438
|
+
e.__doRender(), setTimeout(() => {
|
|
439
|
+
e.__updateChildQueries(!0), e.__updateHostBindings();
|
|
440
|
+
}, 0), e.__queuedUpdate = null;
|
|
441
|
+
}));
|
|
442
|
+
},
|
|
443
|
+
attributeChangedCallback(e, t, n) {
|
|
444
|
+
let r = this, i = n === "" || n;
|
|
445
|
+
i !== t && (r.__cbAttributeChanged && r.__cbAttributeChanged(e, r[e], i), e !== "style" && (r[e] = i), r.__initialized && r.update());
|
|
446
|
+
},
|
|
447
|
+
connectedCallback() {
|
|
448
|
+
let e = this;
|
|
449
|
+
e.__cbConnected && e.__cbConnected();
|
|
450
|
+
let t = d.get(e.constructor, "eventListeners", []);
|
|
451
|
+
setTimeout(() => {
|
|
452
|
+
if (!e.__initialized) {
|
|
453
|
+
e.__gatherChildren();
|
|
454
|
+
for (let [, n] of t) e[n] = e[n].bind(e);
|
|
455
|
+
e.__initialized = !0;
|
|
456
|
+
}
|
|
457
|
+
for (let [n, r] of t) e.addEventListener(n, e[r]);
|
|
458
|
+
e.__doRender(), setTimeout(() => {
|
|
459
|
+
e.__updateChildQueries(), e.__updateHostBindings();
|
|
460
|
+
}, 0);
|
|
461
|
+
}, 0);
|
|
462
|
+
},
|
|
463
|
+
disconnectedCallback() {
|
|
464
|
+
let e = this;
|
|
465
|
+
e.__cbDisconnected && e.__cbDisconnected();
|
|
466
|
+
for (let [t, n] of d.get(e.constructor, "eventListeners", [])) e.removeEventListener(t, e[n]);
|
|
467
|
+
e.__stopMutObs();
|
|
468
|
+
}
|
|
608
469
|
};
|
|
609
|
-
function
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
470
|
+
function C(e) {
|
|
471
|
+
return (t) => {
|
|
472
|
+
d.add(t, e), Object.assign(t.prototype, {
|
|
473
|
+
__cbAttributeChanged: t.prototype.attributeChangedCallback,
|
|
474
|
+
__cbConnected: t.prototype.connectedCallback,
|
|
475
|
+
__cbDisconnected: t.prototype.disconnectedCallback
|
|
476
|
+
}, S);
|
|
477
|
+
};
|
|
617
478
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/decorators/content.ts
|
|
481
|
+
function w() {
|
|
482
|
+
return (e, t) => {
|
|
483
|
+
d.add(e.constructor, { contentProp: t });
|
|
484
|
+
};
|
|
622
485
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
});
|
|
638
|
-
};
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/decorators/event-dispatcher.ts
|
|
488
|
+
function T(e) {
|
|
489
|
+
return (t, n) => {
|
|
490
|
+
Object.defineProperty(t, n, {
|
|
491
|
+
get() {
|
|
492
|
+
return Object.defineProperty(this, n, { value: { dispatch: (t) => {
|
|
493
|
+
let r = new CustomEvent(e || n, { detail: t });
|
|
494
|
+
return this.dispatchEvent(r), r;
|
|
495
|
+
} } }), this[n];
|
|
496
|
+
},
|
|
497
|
+
configurable: !0
|
|
498
|
+
});
|
|
499
|
+
};
|
|
639
500
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/decorators/event-listener.ts
|
|
503
|
+
function E(e) {
|
|
504
|
+
return (t, n) => {
|
|
505
|
+
let r = d.get(t.constructor, "eventListeners", []);
|
|
506
|
+
r.push([e, n]), d.add(t.constructor, { eventListeners: r });
|
|
507
|
+
};
|
|
645
508
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region src/decorators/prop.ts
|
|
511
|
+
function D(e) {
|
|
512
|
+
return (t, n) => {
|
|
513
|
+
let r = t.constructor, i = n.toLowerCase();
|
|
514
|
+
if (r.observedAttributes = r.observedAttributes || [
|
|
515
|
+
"classname",
|
|
516
|
+
"className",
|
|
517
|
+
"style"
|
|
518
|
+
], r.observedAttributes.push(n), r.observedAttributes.push(i), i !== n && Object.defineProperty(t, n, {
|
|
519
|
+
get() {
|
|
520
|
+
return this[i];
|
|
521
|
+
},
|
|
522
|
+
set(e) {
|
|
523
|
+
this[i] = e;
|
|
524
|
+
}
|
|
525
|
+
}), e) {
|
|
526
|
+
let r = Symbol.for(n);
|
|
527
|
+
Object.defineProperty(t, i, {
|
|
528
|
+
get() {
|
|
529
|
+
return this[r];
|
|
530
|
+
},
|
|
531
|
+
set(t) {
|
|
532
|
+
let n = t;
|
|
533
|
+
n = e === Boolean && typeof t == "string" && t.toLowerCase() === "false" ? !1 : e(t), this[r] = n;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
};
|
|
673
538
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/decorators/query-selector.ts
|
|
541
|
+
function O(e, t, n) {
|
|
542
|
+
return (r, i) => {
|
|
543
|
+
let a = d.get(r.constructor, "childQueries", []);
|
|
544
|
+
a.push({
|
|
545
|
+
key: i,
|
|
546
|
+
selector: e,
|
|
547
|
+
all: n,
|
|
548
|
+
refresh: t.refresh
|
|
549
|
+
}), d.add(r.constructor, { childQueries: a });
|
|
550
|
+
};
|
|
684
551
|
}
|
|
685
|
-
function
|
|
686
|
-
|
|
552
|
+
function k(e, t = {}) {
|
|
553
|
+
return O(e, t);
|
|
687
554
|
}
|
|
688
|
-
function
|
|
689
|
-
|
|
555
|
+
function A(e, t = {}) {
|
|
556
|
+
return O(e, t, !0);
|
|
690
557
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region src/decorators/watch.ts
|
|
560
|
+
function j() {
|
|
561
|
+
return (e, t) => {
|
|
562
|
+
let n = Symbol(t);
|
|
563
|
+
Object.defineProperties(e, {
|
|
564
|
+
[n]: {
|
|
565
|
+
writable: !0,
|
|
566
|
+
enumerable: !1,
|
|
567
|
+
configurable: !1,
|
|
568
|
+
value: e[t]
|
|
569
|
+
},
|
|
570
|
+
[t]: {
|
|
571
|
+
get() {
|
|
572
|
+
return this[n];
|
|
573
|
+
},
|
|
574
|
+
set(e) {
|
|
575
|
+
this[n] !== e && (this[n] = e, this.update());
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
};
|
|
711
580
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
581
|
+
//#endregion
|
|
582
|
+
//#region src/components/file-upload/mime-type.enum.ts
|
|
583
|
+
var M = /* @__PURE__ */ function(e) {
|
|
584
|
+
return e["7Z"] = "application/x-7z-compressed", e.AAC = "audio/aac", e.ABW = "application/x-abiword", e.ARC = "application/octet-stream", e.AVI = "video/x-msvideo", e.AZW = "application/vnd.amazon.ebook", e.BIN = "application/octet-stream", e.BMP = "image/bmp", e.BZ = "application/x-bzip", e.BZ2 = "application/x-bzip2", e.CER = "application/pkix-cert", e.CSH = "application/x-csh", e.CSS = "text/css", e.CSV = "text/csv,application/vnd.ms-excel", e.DOC = "application/msword", e.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", e.EOT = "application/vnd.ms-fontobject", e.EPUB = "application/epub+zip", e.ES = "application/ecmascript", e.FLV = "video/x-flv", e.GIF = "image/gif", e.GZ = "application/x-gzip", e.HTM = "text/html", e.HTML = "text/html", e.ICO = "image/x-icon", e.ICS = "text/calendar", e.JAR = "application/java-archive", e.JPEG = "image/jpeg", e.JPG = "image/jpeg", e.JS = "application/javascript", e.JSON = "application/json", e.M3U = "audio/x-mpequrl", e.MID = "audio/midi", e.MIDI = "audio/midi", e.MOV = "video/quicktime", e.MP3 = "audio/mpeg3", e.MP4 = "video/mp4", e.MPEG = "video/mpeg", e.MPKG = "application/vnd.apple.installer+xml", e.ODP = "application/vnd.oasis.opendocument.presentation", e.ODS = "application/vnd.oasis.opendocument.spreadsheet", e.ODT = "application/vnd.oasis.opendocument.text", e.OGA = "audio/ogg", e.OGV = "video/ogg", e.OGX = "application/ogg", e.OTF = "font/otf", e.PNG = "image/png", e.PDF = "application/pdf", e.PPT = "application/vnd.ms-powerpoint", e.PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation", e.RAR = "application/x-rar-compressed", e.RTF = "application/rtf", e.SH = "application/x-sh", e.SVG = "image/svg+xml", e.SWF = "application/x-shockwave-flash", e.TAR = "application/x-tar", e.TIF = "image/tiff", e.TIFF = "image/tiff", e.TS = "application/typescript", e.TTF = "font/ttf", e.TXT = "text/plain", e.VSD = "application/vnd.visio", e.WAV = "audio/wav", e.WEBA = "audio/webm", e.WEBM = "video/webm", e.WEBP = "image/webp", e.WOFF = "font/woff", e.WOFF2 = "font/woff2", e.XHTML = "application/xhtml+xml", e.XLS = "application/vnd.ms-excel", e.XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", e.XML = "application/xml", e.XUL = "application/vnd.mozilla.xul+xml", e.ZIP = "application/zip", e;
|
|
585
|
+
}({});
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateMetadata.js
|
|
588
|
+
function N(e, t) {
|
|
589
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
590
|
+
}
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
593
|
+
function P(e, t, n, r) {
|
|
594
|
+
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
595
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
596
|
+
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
597
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
598
|
+
}
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region src/components/file-upload/file-upload.tsx
|
|
601
|
+
var F = "sps-file-upload", I = class extends HTMLElement {
|
|
602
|
+
static {
|
|
603
|
+
this.displayName = F;
|
|
604
|
+
}
|
|
605
|
+
static {
|
|
606
|
+
this.props = {
|
|
607
|
+
description: "string",
|
|
608
|
+
multiple: "boolean",
|
|
609
|
+
dismissable: "boolean",
|
|
610
|
+
processing: "boolean",
|
|
611
|
+
mini: "boolean",
|
|
612
|
+
downloadLabel: "string",
|
|
613
|
+
acceptExtensions: "Array<string> | string",
|
|
614
|
+
maxSize: "string",
|
|
615
|
+
customRequirement: "string",
|
|
616
|
+
selection: {
|
|
617
|
+
event: !0,
|
|
618
|
+
type: "CustomEvent<Array<File>>"
|
|
619
|
+
},
|
|
620
|
+
dismissal: {
|
|
621
|
+
event: !0,
|
|
622
|
+
type: "CustomEvent<void>"
|
|
623
|
+
},
|
|
624
|
+
download: {
|
|
625
|
+
event: !0,
|
|
626
|
+
type: "CustomEvent<void>"
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
get [b]() {
|
|
631
|
+
return [
|
|
632
|
+
F,
|
|
633
|
+
this.active && `${F}--active`,
|
|
634
|
+
this.error && `${F}--error`,
|
|
635
|
+
!this.shown && `${F}--hidden`,
|
|
636
|
+
this.mini && `${F}--mini`,
|
|
637
|
+
this.constrainContentWidth && `${F}--constrained-content-width`
|
|
638
|
+
];
|
|
639
|
+
}
|
|
640
|
+
constructor() {
|
|
641
|
+
super(), this.shown = !0, this.files = [], this.acceptMIMETypes = /* @__PURE__ */ new Set(), this.active = !1, this.error = !1, this.namesOfUnsupportedFiles = [], this.handleBrowseLinkClick = this.handleBrowseLinkClick.bind(this), this.handleDownloadButtonClick = this.handleDownloadButtonClick.bind(this), this.handleFileInputChange = this.handleFileInputChange.bind(this), this.dismiss = this.dismiss.bind(this);
|
|
642
|
+
}
|
|
643
|
+
connectedCallback() {
|
|
644
|
+
this.description = this.description || (this.multiple ? "Files" : "File"), this.acceptExtensions && this.processAcceptExtensions(this.acceptExtensions), this.maxSize && this.parseAndValidateMaxSize(this.maxSize);
|
|
645
|
+
}
|
|
646
|
+
attributeChangedCallback(e, t, n) {
|
|
647
|
+
e === "acceptExtensions" && this.processAcceptExtensions(n), e === "maxSize" && this.parseAndValidateMaxSize(n);
|
|
648
|
+
}
|
|
649
|
+
dismiss() {
|
|
650
|
+
this.dismissable && (this.shown = !1, this.update(), this.dismissal.dispatch());
|
|
651
|
+
}
|
|
652
|
+
show() {
|
|
653
|
+
this.dismissable && (this.shown = !0, this.update());
|
|
654
|
+
}
|
|
655
|
+
render() {
|
|
656
|
+
let t = this.error ? e.EXCLAMATION_CIRCLE : e.UPLOAD_CLOUD, n = (this.multiple ? a.t("fileUpload.instructions.other", { defaultValue: "Drag and drop your files here or |browse for files| on your desktop." }) : a.t("fileUpload.instructions.one", { defaultValue: "Drag and drop your file here or |browse for a file| on your desktop." })).split("|");
|
|
657
|
+
return /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("div", { className: `${F}__content` }, this.processing ? /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("i", {
|
|
658
|
+
className: "sps-spinner sps-spinner--medium",
|
|
659
|
+
"aria-hidden": "true"
|
|
660
|
+
}), /* @__PURE__ */ g("div", { className: `${F}__instructions` }, a.t("fileUpload.processing", { defaultValue: "Processing Upload..." }))) : /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("i", {
|
|
661
|
+
className: `sps-icon sps-icon-${t} ${F}__icon-primary`,
|
|
662
|
+
"aria-hidden": "true"
|
|
663
|
+
}), /* @__PURE__ */ g("div", { className: `${F}__title` }, this.error ? /* @__PURE__ */ g("div", { "data-fragment": !0 }, a.t(this.namesOfUnsupportedFiles.length > 1 ? "fileUpload.cancelled_plural" : "fileUpload.cancelled", { defaultValue: this.namesOfUnsupportedFiles.length > 1 ? "File Upload(s) Failed" : "File Upload Failed" })) : /* @__PURE__ */ g("div", { "data-fragment": !0 }, a.t("fileUpload.title", {
|
|
664
|
+
description: this.description,
|
|
665
|
+
defaultValue: `Upload Your ${this.description}`
|
|
666
|
+
}))), this.error ? /* @__PURE__ */ g("div", { className: `${F}__errored-files` }, new Set(this.namesOfUnsupportedFiles.map((e, t) => {
|
|
667
|
+
let n = Math.floor(e.length / 2);
|
|
668
|
+
return /* @__PURE__ */ g("div", {
|
|
669
|
+
className: `${F}__errored-filename`,
|
|
670
|
+
key: e
|
|
671
|
+
}, /* @__PURE__ */ g("span", { className: `${F}__errored-filename-segment` }, e.substr(0, n)), /* @__PURE__ */ g("div", { className: `${F}__errored-filename-segment` }, /* @__PURE__ */ g("span", null, e.substr(n))), t < this.namesOfUnsupportedFiles.length - 1 ? "," : "");
|
|
672
|
+
}))) : /* @__PURE__ */ g("span", null), /* @__PURE__ */ g("div", { className: `${F}__instructions` }, /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("span", null, n[0]), /* @__PURE__ */ g("a", {
|
|
673
|
+
href: "",
|
|
674
|
+
onClick: this.handleBrowseLinkClick
|
|
675
|
+
}, n[1]), /* @__PURE__ */ g("span", null, n[2]))), /* @__PURE__ */ g("div", { className: `${F}__requirements` }, this.acceptExtensions ? /* @__PURE__ */ g("span", null, "(", " ", a.t("fileUpload.acceptedTypes", {
|
|
676
|
+
fileTypes: this.acceptExtensionsDescription,
|
|
677
|
+
defaultValue: `${this.acceptExtensionsDescription} format accepted`
|
|
678
|
+
}), " ", ")") : "", this.maxSize ? /* @__PURE__ */ g("span", null, "(", " ", a.t("fileUpload.maximumSize", {
|
|
679
|
+
size: this.maxSize,
|
|
680
|
+
defaultValue: `${this.maxSize} maximum`
|
|
681
|
+
}), " ", ")") : "", this.customRequirement ? /* @__PURE__ */ g("span", null, " ", this.customRequirement, " ") : ""), this.downloadLabel && /* @__PURE__ */ g("div", {
|
|
682
|
+
className: `sps-button sps-button--link ${F}__download-button`,
|
|
683
|
+
onClick: this.handleDownloadButtonClick
|
|
684
|
+
}, /* @__PURE__ */ g("button", { type: "button" }, /* @__PURE__ */ g("i", {
|
|
685
|
+
className: "sps-icon sps-icon-download-cloud",
|
|
686
|
+
"aria-hidden": "true"
|
|
687
|
+
}), " ", this.downloadLabel)))), this.dismissable && !this.processing && /* @__PURE__ */ g("div", {
|
|
688
|
+
className: `sps-button sps-button--icon ${F}__close-button`,
|
|
689
|
+
onClick: this.dismiss
|
|
690
|
+
}, /* @__PURE__ */ g("button", {
|
|
691
|
+
type: "button",
|
|
692
|
+
title: a.t("fileUpload.close", { defaultValue: "Close" })
|
|
693
|
+
}, /* @__PURE__ */ g("i", {
|
|
694
|
+
className: "sps-icon sps-icon-x",
|
|
695
|
+
"aria-hidden": "true"
|
|
696
|
+
}))), /* @__PURE__ */ g("form", null, /* @__PURE__ */ g("input", {
|
|
697
|
+
type: "file",
|
|
698
|
+
accept: this.accept || "*/*",
|
|
699
|
+
multiple: this.multiple || null,
|
|
700
|
+
onChange: this.handleFileInputChange
|
|
701
|
+
})));
|
|
702
|
+
}
|
|
703
|
+
parseAndValidateMaxSize(e) {
|
|
704
|
+
try {
|
|
705
|
+
this.maxSizeBytes = i(e);
|
|
706
|
+
} catch {
|
|
707
|
+
throw Error(`Could not parse "${e}" as a file size.`);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
processAcceptExtensions(e) {
|
|
711
|
+
let t = (Array.isArray(e) ? e : e.trim().split(/\s?,\s?/)).map((e) => e.replace(/^\./, "")), n = t.map((e) => `.${e}`.toLowerCase());
|
|
712
|
+
this.acceptExtensionsDescription = n.map((e, t) => t > 0 && t === n.length - 1 ? `or ${e}` : e).join(n.length > 2 ? ", " : " "), this.acceptMIMETypes.clear();
|
|
713
|
+
for (let e of t) for (let t of M[e.toUpperCase()].split(",")) this.acceptMIMETypes.add(t);
|
|
714
|
+
this.accept = n.concat(Array.from(this.acceptMIMETypes)).join(",");
|
|
715
|
+
}
|
|
716
|
+
selectFiles(e) {
|
|
717
|
+
this.namesOfUnsupportedFiles = [];
|
|
718
|
+
let t = Array.from(e);
|
|
719
|
+
for (let e of t) this.acceptExtensions && !this.acceptMIMETypes.has(e.type) && this.namesOfUnsupportedFiles.push(e.name), this.maxSize && e.size > this.maxSizeBytes && !this.namesOfUnsupportedFiles.includes(e.name) && this.namesOfUnsupportedFiles.push(e.name);
|
|
720
|
+
this.namesOfUnsupportedFiles.length ? (this.error = !0, this.fileInput.value = null, this.update()) : (this.files = t, this.selection.dispatch(t));
|
|
721
|
+
}
|
|
722
|
+
handleDragOver(e) {
|
|
723
|
+
e.preventDefault(), e.stopPropagation();
|
|
724
|
+
}
|
|
725
|
+
handleDragEnter(e) {
|
|
726
|
+
e.preventDefault(), this.active = !0, this.error = !1, this.update();
|
|
727
|
+
}
|
|
728
|
+
handleDragLeave(e) {
|
|
729
|
+
e.preventDefault(), this.active = !1, this.update();
|
|
730
|
+
}
|
|
731
|
+
handleDrop(e) {
|
|
732
|
+
e.preventDefault(), e.stopPropagation(), this.active = !1, e.dataTransfer.items ? this.selectFiles(Array.from(e.dataTransfer.items).map((e) => e.getAsFile())) : this.selectFiles(e.dataTransfer.files), this.update();
|
|
733
|
+
}
|
|
734
|
+
handleBrowseLinkClick(e) {
|
|
735
|
+
e.preventDefault(), this.error = !1, this.update(), this.fileInput.click();
|
|
736
|
+
}
|
|
737
|
+
handleDownloadButtonClick() {
|
|
738
|
+
this.download.dispatch();
|
|
739
|
+
}
|
|
740
|
+
handleFileInputChange(e) {
|
|
741
|
+
e.stopPropagation(), this.selectFiles(e.target.files);
|
|
742
|
+
}
|
|
841
743
|
};
|
|
842
|
-
N([
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
N([
|
|
846
|
-
|
|
847
|
-
],
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
N(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
N(
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
N([
|
|
861
|
-
|
|
862
|
-
],
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
N([
|
|
870
|
-
m()
|
|
871
|
-
], b.prototype, "maxSize", 2);
|
|
872
|
-
N([
|
|
873
|
-
m()
|
|
874
|
-
], b.prototype, "customRequirement", 2);
|
|
875
|
-
N([
|
|
876
|
-
we()
|
|
877
|
-
], b.prototype, "selection", 2);
|
|
878
|
-
N([
|
|
879
|
-
we()
|
|
880
|
-
], b.prototype, "dismissal", 2);
|
|
881
|
-
N([
|
|
882
|
-
we()
|
|
883
|
-
], b.prototype, "download", 2);
|
|
884
|
-
N([
|
|
885
|
-
_e("input[type='file']")
|
|
886
|
-
], b.prototype, "fileInput", 2);
|
|
887
|
-
N([
|
|
888
|
-
ce("dragover")
|
|
889
|
-
], b.prototype, "handleDragOver", 1);
|
|
890
|
-
N([
|
|
891
|
-
ce("dragenter")
|
|
892
|
-
], b.prototype, "handleDragEnter", 1);
|
|
893
|
-
N([
|
|
894
|
-
ce("dragleave")
|
|
895
|
-
], b.prototype, "handleDragLeave", 1);
|
|
896
|
-
N([
|
|
897
|
-
ce("drop")
|
|
898
|
-
], b.prototype, "handleDrop", 1);
|
|
899
|
-
b = N([
|
|
900
|
-
Q({ tag: _ })
|
|
901
|
-
], b);
|
|
902
|
-
const os = {
|
|
903
|
-
basic: {
|
|
904
|
-
label: "Basic File Upload",
|
|
905
|
-
description: u`
|
|
744
|
+
P([D(), N("design:type", Object)], I.prototype, "description", void 0), P([D(Boolean), N("design:type", Boolean)], I.prototype, "multiple", void 0), P([D(Boolean), N("design:type", Object)], I.prototype, "shown", void 0), P([D(Boolean), N("design:type", Boolean)], I.prototype, "dismissable", void 0), P([D(Boolean), N("design:type", Boolean)], I.prototype, "processing", void 0), P([D(Boolean), N("design:type", Boolean)], I.prototype, "mini", void 0), P([D(Boolean), N("design:type", Boolean)], I.prototype, "constrainContentWidth", void 0), P([D(), N("design:type", String)], I.prototype, "downloadLabel", void 0), P([D(), N("design:type", Object)], I.prototype, "acceptExtensions", void 0), P([D(), N("design:type", String)], I.prototype, "maxSize", void 0), P([D(), N("design:type", String)], I.prototype, "customRequirement", void 0), P([T(), N("design:type", Object)], I.prototype, "selection", void 0), P([T(), N("design:type", Object)], I.prototype, "dismissal", void 0), P([T(), N("design:type", Object)], I.prototype, "download", void 0), P([k("input[type='file']"), N("design:type", typeof HTMLInputElement > "u" ? Object : HTMLInputElement)], I.prototype, "fileInput", void 0), P([
|
|
745
|
+
E("dragover"),
|
|
746
|
+
N("design:type", Function),
|
|
747
|
+
N("design:paramtypes", [typeof Event > "u" ? Object : Event]),
|
|
748
|
+
N("design:returntype", void 0)
|
|
749
|
+
], I.prototype, "handleDragOver", null), P([
|
|
750
|
+
E("dragenter"),
|
|
751
|
+
N("design:type", Function),
|
|
752
|
+
N("design:paramtypes", [typeof Event > "u" ? Object : Event]),
|
|
753
|
+
N("design:returntype", void 0)
|
|
754
|
+
], I.prototype, "handleDragEnter", null), P([
|
|
755
|
+
E("dragleave"),
|
|
756
|
+
N("design:type", Function),
|
|
757
|
+
N("design:paramtypes", [typeof Event > "u" ? Object : Event]),
|
|
758
|
+
N("design:returntype", void 0)
|
|
759
|
+
], I.prototype, "handleDragLeave", null), P([
|
|
760
|
+
E("drop"),
|
|
761
|
+
N("design:type", Function),
|
|
762
|
+
N("design:paramtypes", [Object]),
|
|
763
|
+
N("design:returntype", void 0)
|
|
764
|
+
], I.prototype, "handleDrop", null), I = P([C({ tag: F }), N("design:paramtypes", [])], I);
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/components/file-upload/file-upload.examples.ts
|
|
767
|
+
var L = {
|
|
768
|
+
basic: {
|
|
769
|
+
label: "Basic File Upload",
|
|
770
|
+
description: r`
|
|
906
771
|
<p>Simply allow the user to drag-and-drop or select either a single file or multiple files at once.</p>
|
|
907
772
|
`,
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
773
|
+
examples: {
|
|
774
|
+
single: {
|
|
775
|
+
description: "<p>Single file upload</p>",
|
|
776
|
+
react: r`
|
|
912
777
|
function Component() {
|
|
913
778
|
const ref = React.useRef()
|
|
914
779
|
|
|
@@ -932,10 +797,10 @@ const os = {
|
|
|
932
797
|
)
|
|
933
798
|
}
|
|
934
799
|
`
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
800
|
+
},
|
|
801
|
+
multiple: {
|
|
802
|
+
description: "<p>Multiple file upload</p>",
|
|
803
|
+
react: r`
|
|
939
804
|
function Component() {
|
|
940
805
|
const ref = React.useRef()
|
|
941
806
|
|
|
@@ -959,18 +824,18 @@ const os = {
|
|
|
959
824
|
)
|
|
960
825
|
}
|
|
961
826
|
`
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
restrictions: {
|
|
831
|
+
label: "Restrictions",
|
|
832
|
+
description: r`
|
|
968
833
|
<p>You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.</p>
|
|
969
834
|
`,
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
835
|
+
examples: {
|
|
836
|
+
size: {
|
|
837
|
+
description: "<p>Maximum size</p>",
|
|
838
|
+
react: r`
|
|
974
839
|
function Component() {
|
|
975
840
|
const ref = React.useRef()
|
|
976
841
|
|
|
@@ -994,10 +859,10 @@ const os = {
|
|
|
994
859
|
)
|
|
995
860
|
}
|
|
996
861
|
`
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
862
|
+
},
|
|
863
|
+
type: {
|
|
864
|
+
description: "<p>File type whitelist</p>",
|
|
865
|
+
react: r`
|
|
1001
866
|
function Component() {
|
|
1002
867
|
const ref = React.useRef()
|
|
1003
868
|
|
|
@@ -1026,10 +891,10 @@ const os = {
|
|
|
1026
891
|
)
|
|
1027
892
|
}
|
|
1028
893
|
`
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
894
|
+
},
|
|
895
|
+
both: {
|
|
896
|
+
description: "<p>Both restrictions</p>",
|
|
897
|
+
react: r`
|
|
1033
898
|
function Component() {
|
|
1034
899
|
const ref = React.useRef()
|
|
1035
900
|
|
|
@@ -1059,18 +924,16 @@ const os = {
|
|
|
1059
924
|
)
|
|
1060
925
|
}
|
|
1061
926
|
`
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
dismissable: {
|
|
931
|
+
label: "Dismissable",
|
|
932
|
+
description: r`
|
|
1068
933
|
<p>With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can
|
|
1069
934
|
show it again programmatically if you need to.</p>
|
|
1070
935
|
`,
|
|
1071
|
-
|
|
1072
|
-
dismissable: {
|
|
1073
|
-
react: u`
|
|
936
|
+
examples: { dismissable: { react: r`
|
|
1074
937
|
function Component() {
|
|
1075
938
|
const [showFileUpload, setShowFileUpload] = React.useState(true)
|
|
1076
939
|
const ref = React.useRef()
|
|
@@ -1103,19 +966,15 @@ const os = {
|
|
|
1103
966
|
</div>
|
|
1104
967
|
)
|
|
1105
968
|
}
|
|
1106
|
-
`
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
label: "Download Button",
|
|
1112
|
-
description: u`
|
|
969
|
+
` } }
|
|
970
|
+
},
|
|
971
|
+
downloadButton: {
|
|
972
|
+
label: "Download Button",
|
|
973
|
+
description: r`
|
|
1113
974
|
<p>You can optionally provide a button to download a file. Typically this will be a template for
|
|
1114
975
|
whatever the user is expected to upload. They can then fill out the template, save it, and upload it.</p>
|
|
1115
976
|
`,
|
|
1116
|
-
|
|
1117
|
-
downloadButton: {
|
|
1118
|
-
react: u`
|
|
977
|
+
examples: { downloadButton: { react: r`
|
|
1119
978
|
function Component() {
|
|
1120
979
|
const ref = React.useRef()
|
|
1121
980
|
|
|
@@ -1143,19 +1002,15 @@ const os = {
|
|
|
1143
1002
|
</div>
|
|
1144
1003
|
)
|
|
1145
1004
|
}
|
|
1146
|
-
`
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
label: "Mini File Upload",
|
|
1152
|
-
description: u`
|
|
1005
|
+
` } }
|
|
1006
|
+
},
|
|
1007
|
+
mini: {
|
|
1008
|
+
label: "Mini File Upload",
|
|
1009
|
+
description: r`
|
|
1153
1010
|
<p>When the file upload component is to be placed in a small container,
|
|
1154
1011
|
it should be marked as a mini file upload so that everything fits.</p>
|
|
1155
1012
|
`,
|
|
1156
|
-
|
|
1157
|
-
single: {
|
|
1158
|
-
react: u`
|
|
1013
|
+
examples: { single: { react: r`
|
|
1159
1014
|
function Component() {
|
|
1160
1015
|
const ref = React.useRef()
|
|
1161
1016
|
|
|
@@ -1178,20 +1033,16 @@ const os = {
|
|
|
1178
1033
|
</div>
|
|
1179
1034
|
)
|
|
1180
1035
|
}
|
|
1181
|
-
`
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
label: "Constrain Content Width",
|
|
1187
|
-
description: u`
|
|
1036
|
+
` } }
|
|
1037
|
+
},
|
|
1038
|
+
constrainContentWidth: {
|
|
1039
|
+
label: "Constrain Content Width",
|
|
1040
|
+
description: r`
|
|
1188
1041
|
<p>If this prop is provided, the content will be restricted to 50% of
|
|
1189
1042
|
the overall width of the component. Consult your product designer if
|
|
1190
1043
|
you're not sure whether to use this variant.</p>
|
|
1191
1044
|
`,
|
|
1192
|
-
|
|
1193
|
-
constrainContentWidth: {
|
|
1194
|
-
react: u`
|
|
1045
|
+
examples: { constrainContentWidth: { react: r`
|
|
1195
1046
|
function Component() {
|
|
1196
1047
|
const ref = React.useRef()
|
|
1197
1048
|
|
|
@@ -1214,133 +1065,85 @@ const os = {
|
|
|
1214
1065
|
</div>
|
|
1215
1066
|
)
|
|
1216
1067
|
}
|
|
1217
|
-
`
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1068
|
+
` } }
|
|
1069
|
+
}
|
|
1070
|
+
}, R = "sps-insight-card", z = class extends HTMLElement {
|
|
1071
|
+
constructor(...e) {
|
|
1072
|
+
super(...e), this.kind = n.GENERAL;
|
|
1073
|
+
}
|
|
1074
|
+
static {
|
|
1075
|
+
this.displayName = R;
|
|
1076
|
+
}
|
|
1077
|
+
static {
|
|
1078
|
+
this.props = {
|
|
1079
|
+
icon: "SpsIcon",
|
|
1080
|
+
kind: "SpsInsightCardKind",
|
|
1081
|
+
title: "string",
|
|
1082
|
+
metric: "number",
|
|
1083
|
+
partnerCount: "number",
|
|
1084
|
+
totalPartners: "number",
|
|
1085
|
+
secondary: "boolean"
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
get [b]() {
|
|
1089
|
+
return [
|
|
1090
|
+
R,
|
|
1091
|
+
`${R}--${this.kind}`,
|
|
1092
|
+
this.detail && this.detail.children.length ? `${R}--has-detail` : null
|
|
1093
|
+
];
|
|
1094
|
+
}
|
|
1095
|
+
render() {
|
|
1096
|
+
let e = /* @__PURE__ */ g("div", { className: `${R}__metric-count` }, this.metric), n = /* @__PURE__ */ g("div", { className: `${R}__description` }, /* @__PURE__ */ g("div", {
|
|
1097
|
+
className: `${R}__title`,
|
|
1098
|
+
style: { "-webkit-box-orient": "vertical" }
|
|
1099
|
+
}, this.title), /* @__PURE__ */ g("div", { className: `${R}__detail` }, this.content)), r = this.partnercount, i = this.totalpartners, [o, s, c] = (r ? a.t("insightCard.partnerCount", {
|
|
1100
|
+
count: r,
|
|
1101
|
+
total: i,
|
|
1102
|
+
defaultValue: `${r} |of| ${i}`
|
|
1103
|
+
}) : "").split("|");
|
|
1104
|
+
return /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("div", { className: `${R}__body` }, this.icon ? /* @__PURE__ */ g("i", { className: `sps-icon sps-icon-${this.icon}` }) : /* @__PURE__ */ g("i", { className: `sps-icon sps-icon-${t[this.kind]}` }), e, n), r && /* @__PURE__ */ g("div", { className: `${R}__partner-count` }, r === i ? /* @__PURE__ */ g("div", null, a.t("insightCard.all", { defaultValue: "ALL" })) : /* @__PURE__ */ g("div", { "data-fragment": !0 }, /* @__PURE__ */ g("div", null, o), /* @__PURE__ */ g("div", null, s), /* @__PURE__ */ g("div", null, c)), /* @__PURE__ */ g("div", { className: `${R}__partners-text` }, a.t("insightCard.partners", { defaultValue: "PARTNERS" }))));
|
|
1105
|
+
}
|
|
1254
1106
|
};
|
|
1255
|
-
k.
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1107
|
+
P([D(), N("design:type", e === void 0 ? Object : e)], z.prototype, "icon", void 0), P([D(), N("design:type", Object)], z.prototype, "kind", void 0), P([D(), N("design:type", String)], z.prototype, "title", void 0), P([D(), N("design:type", Number)], z.prototype, "metric", void 0), P([D(), N("design:type", Number)], z.prototype, "partnerCount", void 0), P([D(), N("design:type", Number)], z.prototype, "totalPartners", void 0), P([D(), N("design:type", Boolean)], z.prototype, "secondary", void 0), P([w(), N("design:type", Object)], z.prototype, "content", void 0), P([k(`.${R}__detail`), N("design:type", Object)], z.prototype, "detail", void 0), z = P([C({ tag: R })], z);
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region src/components/insight-card/insights.tsx
|
|
1110
|
+
var B = "sps-insights", V = class extends HTMLElement {
|
|
1111
|
+
static {
|
|
1112
|
+
this.displayName = B;
|
|
1113
|
+
}
|
|
1114
|
+
static {
|
|
1115
|
+
this.props = {};
|
|
1116
|
+
}
|
|
1117
|
+
get [b]() {
|
|
1118
|
+
return [
|
|
1119
|
+
B,
|
|
1120
|
+
this.showAdditionalInsights && `${B}--show-additional`,
|
|
1121
|
+
this.details && Array.from(this.details).every((e) => !e.textContent) ? `${B}--no-details` : null,
|
|
1122
|
+
this.content.length === 6 ? `${B}--break-4` : null,
|
|
1123
|
+
this.content.length === 7 ? `${B}--break-5` : null,
|
|
1124
|
+
this.content.length === 8 ? `${B}--break-5` : null
|
|
1125
|
+
];
|
|
1126
|
+
}
|
|
1127
|
+
constructor() {
|
|
1128
|
+
super(), this.content = [], this.showAdditionalInsights = !1, this.toggleAdditionalInsights = this.toggleAdditionalInsights.bind(this);
|
|
1129
|
+
}
|
|
1130
|
+
toggleAdditionalInsights() {
|
|
1131
|
+
this.showAdditionalInsights = !this.showAdditionalInsights, this.update();
|
|
1132
|
+
}
|
|
1133
|
+
render() {
|
|
1134
|
+
return /* @__PURE__ */ g("div", { "data-fragment": !0 }, this.content, this.content.length > 10 && /* @__PURE__ */ g("div", {
|
|
1135
|
+
className: "sps-button sps-button--link",
|
|
1136
|
+
onClick: this.toggleAdditionalInsights
|
|
1137
|
+
}, /* @__PURE__ */ g("button", { type: "button" }, this.showAdditionalInsights ? a.t("insights.hideAdditionalInsights", { defaultValue: "Hide Additional Insights" }) : a.t("insights.showAdditionalInsights", { defaultValue: "Show Additional Insights" }))));
|
|
1138
|
+
}
|
|
1264
1139
|
};
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
m()
|
|
1273
|
-
], k.prototype, "title", 2);
|
|
1274
|
-
$([
|
|
1275
|
-
m()
|
|
1276
|
-
], k.prototype, "metric", 2);
|
|
1277
|
-
$([
|
|
1278
|
-
m()
|
|
1279
|
-
], k.prototype, "partnerCount", 2);
|
|
1280
|
-
$([
|
|
1281
|
-
m()
|
|
1282
|
-
], k.prototype, "totalPartners", 2);
|
|
1283
|
-
$([
|
|
1284
|
-
m()
|
|
1285
|
-
], k.prototype, "secondary", 2);
|
|
1286
|
-
$([
|
|
1287
|
-
Ce()
|
|
1288
|
-
], k.prototype, "content", 2);
|
|
1289
|
-
$([
|
|
1290
|
-
_e(`.${D}__detail`)
|
|
1291
|
-
], k.prototype, "detail", 2);
|
|
1292
|
-
k = $([
|
|
1293
|
-
Q({ tag: D })
|
|
1294
|
-
], k);
|
|
1295
|
-
var Gt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Ne = (e, s, i, o) => {
|
|
1296
|
-
for (var r = o > 1 ? void 0 : o ? Xt(s, i) : s, p = e.length - 1, f; p >= 0; p--)
|
|
1297
|
-
(f = e[p]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1298
|
-
return o && r && Gt(s, i, r), r;
|
|
1299
|
-
};
|
|
1300
|
-
const B = "sps-insights";
|
|
1301
|
-
let X = class extends HTMLElement {
|
|
1302
|
-
constructor() {
|
|
1303
|
-
super(), this.content = [], this.showAdditionalInsights = !1, this.toggleAdditionalInsights = this.toggleAdditionalInsights.bind(this);
|
|
1304
|
-
}
|
|
1305
|
-
get [K]() {
|
|
1306
|
-
return [
|
|
1307
|
-
B,
|
|
1308
|
-
this.showAdditionalInsights && `${B}--show-additional`,
|
|
1309
|
-
this.details && Array.from(this.details).every((e) => !e.textContent) ? `${B}--no-details` : null,
|
|
1310
|
-
this.content.length === 6 ? `${B}--break-4` : null,
|
|
1311
|
-
this.content.length === 7 ? `${B}--break-5` : null,
|
|
1312
|
-
this.content.length === 8 ? `${B}--break-5` : null
|
|
1313
|
-
];
|
|
1314
|
-
}
|
|
1315
|
-
/**
|
|
1316
|
-
* Only the first ten Insight Cards are visible by default; the rest are behind
|
|
1317
|
-
* the "Show Additional Insights"/"Hide Additional Insights" button. This method
|
|
1318
|
-
* will toggle the additional insights.
|
|
1319
|
-
*/
|
|
1320
|
-
toggleAdditionalInsights() {
|
|
1321
|
-
this.showAdditionalInsights = !this.showAdditionalInsights, this.update();
|
|
1322
|
-
}
|
|
1323
|
-
render() {
|
|
1324
|
-
return /* @__PURE__ */ c("div", { "data-fragment": !0 }, this.content, this.content.length > 10 && /* @__PURE__ */ c("div", { className: "sps-button sps-button--link", onClick: this.toggleAdditionalInsights }, /* @__PURE__ */ c("button", { type: "button" }, this.showAdditionalInsights ? P.t("insights.hideAdditionalInsights", { defaultValue: "Hide Additional Insights" }) : P.t("insights.showAdditionalInsights", { defaultValue: "Show Additional Insights" }))));
|
|
1325
|
-
}
|
|
1326
|
-
};
|
|
1327
|
-
X.displayName = B;
|
|
1328
|
-
X.props = {};
|
|
1329
|
-
Ne([
|
|
1330
|
-
Ce()
|
|
1331
|
-
], X.prototype, "content", 2);
|
|
1332
|
-
Ne([
|
|
1333
|
-
zt(".sps-insight-card__detail")
|
|
1334
|
-
], X.prototype, "details", 2);
|
|
1335
|
-
X = Ne([
|
|
1336
|
-
Q({ tag: B })
|
|
1337
|
-
], X);
|
|
1338
|
-
const ls = {
|
|
1339
|
-
basic: {
|
|
1340
|
-
label: "Basic Insight Cards",
|
|
1341
|
-
examples: {
|
|
1342
|
-
basic: {
|
|
1343
|
-
jsx: u`
|
|
1140
|
+
P([w(), N("design:type", Object)], V.prototype, "content", void 0), P([A(".sps-insight-card__detail"), N("design:type", typeof NodeList > "u" ? Object : NodeList)], V.prototype, "details", void 0), V = P([C({ tag: B }), N("design:paramtypes", [])], V);
|
|
1141
|
+
//#endregion
|
|
1142
|
+
//#region src/components/insight-card/insight-card.examples.ts
|
|
1143
|
+
var te = {
|
|
1144
|
+
basic: {
|
|
1145
|
+
label: "Basic Insight Cards",
|
|
1146
|
+
examples: { basic: { jsx: r`
|
|
1344
1147
|
<sps-insights>
|
|
1345
1148
|
<sps-insight-card kind="general"
|
|
1346
1149
|
metric="1234"
|
|
@@ -1363,15 +1166,11 @@ const ls = {
|
|
|
1363
1166
|
title="Insight Card Title"
|
|
1364
1167
|
></sps-insight-card>
|
|
1365
1168
|
</sps-insights>
|
|
1366
|
-
`
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
label: "With Details",
|
|
1372
|
-
examples: {
|
|
1373
|
-
details: {
|
|
1374
|
-
jsx: u`
|
|
1169
|
+
` } }
|
|
1170
|
+
},
|
|
1171
|
+
details: {
|
|
1172
|
+
label: "With Details",
|
|
1173
|
+
examples: { details: { jsx: r`
|
|
1375
1174
|
<sps-insights>
|
|
1376
1175
|
<sps-insight-card kind="general"
|
|
1377
1176
|
metric="1234"
|
|
@@ -1416,15 +1215,11 @@ const ls = {
|
|
|
1416
1215
|
<span className="gray600 font-weight-bold">Detail:</span> 792 units
|
|
1417
1216
|
</sps-insight-card>
|
|
1418
1217
|
</sps-insights>
|
|
1419
|
-
`
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
label: "Partner Count",
|
|
1425
|
-
examples: {
|
|
1426
|
-
partner_count: {
|
|
1427
|
-
jsx: u`
|
|
1218
|
+
` } }
|
|
1219
|
+
},
|
|
1220
|
+
partner_count: {
|
|
1221
|
+
label: "Partner Count",
|
|
1222
|
+
examples: { partner_count: { jsx: r`
|
|
1428
1223
|
<sps-insights>
|
|
1429
1224
|
<sps-insight-card kind="general"
|
|
1430
1225
|
metric="1234"
|
|
@@ -1457,15 +1252,11 @@ const ls = {
|
|
|
1457
1252
|
totalPartners="250"
|
|
1458
1253
|
></sps-insight-card>
|
|
1459
1254
|
</sps-insights>
|
|
1460
|
-
`
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
label: "10+ Insight Cards",
|
|
1466
|
-
examples: {
|
|
1467
|
-
expansion: {
|
|
1468
|
-
jsx: u`
|
|
1255
|
+
` } }
|
|
1256
|
+
},
|
|
1257
|
+
expansion: {
|
|
1258
|
+
label: "10+ Insight Cards",
|
|
1259
|
+
examples: { expansion: { jsx: r`
|
|
1469
1260
|
<sps-insights>
|
|
1470
1261
|
<sps-insight-card kind="general"
|
|
1471
1262
|
metric="1234"
|
|
@@ -1574,19 +1365,15 @@ const ls = {
|
|
|
1574
1365
|
<span className="gray600 font-weight-bold">Detail:</span> 792 units
|
|
1575
1366
|
</sps-insight-card>
|
|
1576
1367
|
</sps-insights>
|
|
1577
|
-
`
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
label: "Adding a click handler",
|
|
1583
|
-
description: u`
|
|
1368
|
+
` } }
|
|
1369
|
+
},
|
|
1370
|
+
events: {
|
|
1371
|
+
label: "Adding a click handler",
|
|
1372
|
+
description: r`
|
|
1584
1373
|
<p>Attaching event handlers to native web components in React cannot be done the usual way at this time.
|
|
1585
1374
|
Here is how to do it:</p>
|
|
1586
1375
|
`,
|
|
1587
|
-
|
|
1588
|
-
events: {
|
|
1589
|
-
react: u`
|
|
1376
|
+
examples: { events: { react: r`
|
|
1590
1377
|
function Component() {
|
|
1591
1378
|
function handleClick() {
|
|
1592
1379
|
window.alert("Insight card clicked");
|
|
@@ -1618,15 +1405,11 @@ const ls = {
|
|
|
1618
1405
|
</sps-insights>
|
|
1619
1406
|
);
|
|
1620
1407
|
}
|
|
1621
|
-
`
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
label: "Using alternate icons",
|
|
1627
|
-
examples: {
|
|
1628
|
-
basic: {
|
|
1629
|
-
react: u`
|
|
1408
|
+
` } }
|
|
1409
|
+
},
|
|
1410
|
+
alternateIcon: {
|
|
1411
|
+
label: "Using alternate icons",
|
|
1412
|
+
examples: { basic: { react: r`
|
|
1630
1413
|
function DemoComponent() {
|
|
1631
1414
|
return (
|
|
1632
1415
|
<sps-insights>
|
|
@@ -1663,90 +1446,63 @@ const ls = {
|
|
|
1663
1446
|
</sps-insights>
|
|
1664
1447
|
)
|
|
1665
1448
|
}
|
|
1666
|
-
`
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1449
|
+
` } }
|
|
1450
|
+
}
|
|
1451
|
+
}, H = class extends HTMLElement {
|
|
1452
|
+
constructor(...e) {
|
|
1453
|
+
super(...e), this.active = !1, this.label = "", this.tag = "";
|
|
1454
|
+
}
|
|
1455
|
+
static {
|
|
1456
|
+
this.displayName = "sps-nav-tab";
|
|
1457
|
+
}
|
|
1458
|
+
static {
|
|
1459
|
+
this.props = {
|
|
1460
|
+
active: "boolean",
|
|
1461
|
+
label: "string",
|
|
1462
|
+
icon: "SpsIcon",
|
|
1463
|
+
tag: "string",
|
|
1464
|
+
href: "string",
|
|
1465
|
+
target: "string"
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
get [b]() {
|
|
1469
|
+
return ["sps-tabbed-nav__nav-item", this.active && "sps-tabbed-nav__nav-item--active"];
|
|
1470
|
+
}
|
|
1471
|
+
render() {
|
|
1472
|
+
return /* @__PURE__ */ g("a", {
|
|
1473
|
+
href: this.href,
|
|
1474
|
+
target: this.target,
|
|
1475
|
+
className: "sps-tabbed-nav__nav-item-link",
|
|
1476
|
+
tabIndex: 0
|
|
1477
|
+
}, this.icon && /* @__PURE__ */ g("i", { className: `sps-icon sps-icon-${this.icon}` }), this.label && /* @__PURE__ */ g("span", null, this.label), this.tag && /* @__PURE__ */ g("span", { className: "sps-tag sps-tag--default" }, this.tag));
|
|
1478
|
+
}
|
|
1689
1479
|
};
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1480
|
+
P([D(), N("design:type", Object)], H.prototype, "active", void 0), P([D(), N("design:type", Object)], H.prototype, "label", void 0), P([D(), N("design:type", e === void 0 ? Object : e)], H.prototype, "icon", void 0), P([D(), N("design:type", Object)], H.prototype, "tag", void 0), P([D(), N("design:type", String)], H.prototype, "href", void 0), P([D(), N("design:type", String)], H.prototype, "target", void 0), H = P([C({ tag: "sps-nav-tab" })], H);
|
|
1481
|
+
//#endregion
|
|
1482
|
+
//#region src/components/nav-tabs/nav-tab-set.tsx
|
|
1483
|
+
var U = class extends HTMLElement {
|
|
1484
|
+
constructor(...e) {
|
|
1485
|
+
super(...e), this.content = [];
|
|
1486
|
+
}
|
|
1487
|
+
static {
|
|
1488
|
+
this.displayName = "sps-nav-tab-set";
|
|
1489
|
+
}
|
|
1490
|
+
static {
|
|
1491
|
+
this.props = {};
|
|
1492
|
+
}
|
|
1493
|
+
render() {
|
|
1494
|
+
return /* @__PURE__ */ g("nav", { className: "sps-tabbed-nav" }, this.content);
|
|
1495
|
+
}
|
|
1698
1496
|
};
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
z([
|
|
1706
|
-
m()
|
|
1707
|
-
], R.prototype, "icon", 2);
|
|
1708
|
-
z([
|
|
1709
|
-
m()
|
|
1710
|
-
], R.prototype, "tag", 2);
|
|
1711
|
-
z([
|
|
1712
|
-
m()
|
|
1713
|
-
], R.prototype, "href", 2);
|
|
1714
|
-
z([
|
|
1715
|
-
m()
|
|
1716
|
-
], R.prototype, "target", 2);
|
|
1717
|
-
R = z([
|
|
1718
|
-
Q({ tag: "sps-nav-tab" })
|
|
1719
|
-
], R);
|
|
1720
|
-
var Zt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ze = (e, s, i, o) => {
|
|
1721
|
-
for (var r = o > 1 ? void 0 : o ? Yt(s, i) : s, p = e.length - 1, f; p >= 0; p--)
|
|
1722
|
-
(f = e[p]) && (r = (o ? f(s, i, r) : f(r)) || r);
|
|
1723
|
-
return o && r && Zt(s, i, r), r;
|
|
1724
|
-
};
|
|
1725
|
-
let ee = class extends HTMLElement {
|
|
1726
|
-
constructor() {
|
|
1727
|
-
super(...arguments), this.content = [];
|
|
1728
|
-
}
|
|
1729
|
-
render() {
|
|
1730
|
-
return /* @__PURE__ */ c("nav", { className: "sps-tabbed-nav" }, this.content);
|
|
1731
|
-
}
|
|
1732
|
-
};
|
|
1733
|
-
ee.displayName = "sps-nav-tab-set";
|
|
1734
|
-
ee.props = {};
|
|
1735
|
-
Ze([
|
|
1736
|
-
Ce()
|
|
1737
|
-
], ee.prototype, "content", 2);
|
|
1738
|
-
ee = Ze([
|
|
1739
|
-
Q({ tag: "sps-nav-tab-set" })
|
|
1740
|
-
], ee);
|
|
1741
|
-
const cs = {
|
|
1742
|
-
basic: {
|
|
1743
|
-
label: "Basic Navigation Tabs",
|
|
1744
|
-
description: u`
|
|
1497
|
+
P([w(), N("design:type", Object)], U.prototype, "content", void 0), U = P([C({ tag: "sps-nav-tab-set" })], U);
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region src/components/nav-tabs/nav-tabs.examples.ts
|
|
1500
|
+
var W = { basic: {
|
|
1501
|
+
label: "Basic Navigation Tabs",
|
|
1502
|
+
description: r`
|
|
1745
1503
|
<p>Navigation tabs native web component</p>
|
|
1746
1504
|
`,
|
|
1747
|
-
|
|
1748
|
-
basic: {
|
|
1749
|
-
react: u`
|
|
1505
|
+
examples: { basic: { react: r`
|
|
1750
1506
|
function DemoComponent() {
|
|
1751
1507
|
const tabs = [
|
|
1752
1508
|
{ label: "Tab A", icon: "chart-line" },
|
|
@@ -1771,102 +1527,84 @@ const cs = {
|
|
|
1771
1527
|
</sps-nav-tab-set>
|
|
1772
1528
|
)
|
|
1773
1529
|
}
|
|
1774
|
-
`
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
}
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1530
|
+
` } }
|
|
1531
|
+
} }, G = /* @__PURE__ */ function(e) {
|
|
1532
|
+
return e.FIT = "fit", e.FILL = "fill", e;
|
|
1533
|
+
}({}), K = "sps-photo", q = class extends HTMLElement {
|
|
1534
|
+
constructor(...e) {
|
|
1535
|
+
super(...e), this.mode = "fill";
|
|
1536
|
+
}
|
|
1537
|
+
static {
|
|
1538
|
+
this.displayName = K;
|
|
1539
|
+
}
|
|
1540
|
+
static {
|
|
1541
|
+
this.props = {
|
|
1542
|
+
src: "string",
|
|
1543
|
+
altText: "string",
|
|
1544
|
+
mode: "SpsPhotoDisplayMode",
|
|
1545
|
+
placeholderIcon: "SpsIcon"
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
get image() {
|
|
1549
|
+
return this.imageInternal;
|
|
1550
|
+
}
|
|
1551
|
+
set image(e) {
|
|
1552
|
+
this.imageInternal = e, e && (this.waitForImgHeightInterval && window.clearInterval(this.waitForImgHeightInterval), this.waitForImgHeightInterval = window.setInterval(() => {
|
|
1553
|
+
let t = e.getBoundingClientRect();
|
|
1554
|
+
if (t.height) {
|
|
1555
|
+
window.clearInterval(this.waitForImgHeightInterval), delete this.waitForImgHeightInterval;
|
|
1556
|
+
let e = t.width / t.height > 1;
|
|
1557
|
+
this.fitWidth = e === (this.mode === "fit");
|
|
1558
|
+
}
|
|
1559
|
+
}, 1e3 / 60));
|
|
1560
|
+
}
|
|
1561
|
+
get [b]() {
|
|
1562
|
+
return [
|
|
1563
|
+
K,
|
|
1564
|
+
this.fitWidth ? `${K}--fit-width` : `${K}--fit-height`,
|
|
1565
|
+
this.placeholderIcon && `${K}--placeholder`
|
|
1566
|
+
];
|
|
1567
|
+
}
|
|
1568
|
+
get [x]() {
|
|
1569
|
+
return {
|
|
1570
|
+
fontSize: `${this.width * .05}rem`,
|
|
1571
|
+
width: `${this.width}rem`,
|
|
1572
|
+
height: `${.75 * this.width}rem`
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
connectedCallback() {
|
|
1576
|
+
this.waitForWidthInterval = window.setInterval(() => {
|
|
1577
|
+
let e = this.getBoundingClientRect();
|
|
1578
|
+
e.width && (this.setWidth(e.width), window.clearInterval(this.waitForWidthInterval), delete this.waitForWidthInterval);
|
|
1579
|
+
}, 1e3 / 60);
|
|
1580
|
+
}
|
|
1581
|
+
disconnectedCallback() {
|
|
1582
|
+
this.waitForWidthInterval && window.clearInterval(this.waitForWidthInterval), this.waitForImgHeightInterval && window.clearInterval(this.waitForImgHeightInterval);
|
|
1583
|
+
}
|
|
1584
|
+
render() {
|
|
1585
|
+
return this.src ? this.width ? /* @__PURE__ */ g("img", {
|
|
1586
|
+
src: this.src,
|
|
1587
|
+
alt: this.altText
|
|
1588
|
+
}) : /* @__PURE__ */ g("span", null) : /* @__PURE__ */ g("i", { className: `sps-icon sps-icon-${this.placeholderIcon}` });
|
|
1589
|
+
}
|
|
1590
|
+
setWidth(e) {
|
|
1591
|
+
if (e && !this.width) {
|
|
1592
|
+
let t = document.body.parentElement.style.fontSize || "16px", n = Number(t.substr(0, t.length - 2));
|
|
1593
|
+
this.width = e / n;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1834
1596
|
};
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
m()
|
|
1847
|
-
], L.prototype, "altText", 2);
|
|
1848
|
-
j([
|
|
1849
|
-
m()
|
|
1850
|
-
], L.prototype, "mode", 2);
|
|
1851
|
-
j([
|
|
1852
|
-
m()
|
|
1853
|
-
], L.prototype, "placeholderIcon", 2);
|
|
1854
|
-
j([
|
|
1855
|
-
Ke()
|
|
1856
|
-
], L.prototype, "width", 2);
|
|
1857
|
-
j([
|
|
1858
|
-
Ke()
|
|
1859
|
-
], L.prototype, "fitWidth", 2);
|
|
1860
|
-
j([
|
|
1861
|
-
_e("img", { refresh: !0 })
|
|
1862
|
-
], L.prototype, "image", 1);
|
|
1863
|
-
L = j([
|
|
1864
|
-
Q({ tag: G })
|
|
1865
|
-
], L);
|
|
1866
|
-
const ps = {
|
|
1867
|
-
sizing: {
|
|
1868
|
-
label: "Sizing",
|
|
1869
|
-
description: u`
|
|
1597
|
+
P([D(), N("design:type", String)], q.prototype, "src", void 0), P([D(), N("design:type", String)], q.prototype, "altText", void 0), P([D(), N("design:type", Object)], q.prototype, "mode", void 0), P([D(), N("design:type", e === void 0 ? Object : e)], q.prototype, "placeholderIcon", void 0), P([j(), N("design:type", Number)], q.prototype, "width", void 0), P([j(), N("design:type", Object)], q.prototype, "fitWidth", void 0), P([
|
|
1598
|
+
k("img", { refresh: !0 }),
|
|
1599
|
+
N("design:type", Object),
|
|
1600
|
+
N("design:paramtypes", [])
|
|
1601
|
+
], q.prototype, "image", null), q = P([C({ tag: K })], q);
|
|
1602
|
+
//#endregion
|
|
1603
|
+
//#region src/components/photo/photo.examples.ts
|
|
1604
|
+
var J = {
|
|
1605
|
+
sizing: {
|
|
1606
|
+
label: "Sizing",
|
|
1607
|
+
description: r`
|
|
1870
1608
|
<p>
|
|
1871
1609
|
Photos are block elements, so a photo fills its container's width unless
|
|
1872
1610
|
an explicit width is set. It is always a 4:3 aspect ratio. In this example,
|
|
@@ -1874,9 +1612,7 @@ const ps = {
|
|
|
1874
1612
|
column grid.
|
|
1875
1613
|
</p>
|
|
1876
1614
|
`,
|
|
1877
|
-
|
|
1878
|
-
basic: {
|
|
1879
|
-
jsx: u`
|
|
1615
|
+
examples: { basic: { jsx: r`
|
|
1880
1616
|
<div className="sfg-row">
|
|
1881
1617
|
<div className="sfg-col-2">
|
|
1882
1618
|
<sps-card>
|
|
@@ -1894,13 +1630,11 @@ const ps = {
|
|
|
1894
1630
|
</sps-card>
|
|
1895
1631
|
</div>
|
|
1896
1632
|
</div>
|
|
1897
|
-
`
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
label: "Fill vs. Fit",
|
|
1903
|
-
description: u`
|
|
1633
|
+
` } }
|
|
1634
|
+
},
|
|
1635
|
+
displayMode: {
|
|
1636
|
+
label: "Fill vs. Fit",
|
|
1637
|
+
description: r`
|
|
1904
1638
|
<p>
|
|
1905
1639
|
There are two display modes available:
|
|
1906
1640
|
<ul>
|
|
@@ -1909,10 +1643,10 @@ const ps = {
|
|
|
1909
1643
|
</ul>
|
|
1910
1644
|
</p>
|
|
1911
1645
|
`,
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1646
|
+
examples: {
|
|
1647
|
+
landscape: {
|
|
1648
|
+
description: "<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",
|
|
1649
|
+
jsx: r`
|
|
1916
1650
|
<div className="sfg-row">
|
|
1917
1651
|
<div className="sfg-col-4">
|
|
1918
1652
|
<sps-photo src="assets/images/photo-landscape.jpg" mode="fill"></sps-photo>
|
|
@@ -1922,10 +1656,10 @@ const ps = {
|
|
|
1922
1656
|
</div>
|
|
1923
1657
|
</div>
|
|
1924
1658
|
`
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1659
|
+
},
|
|
1660
|
+
portrait: {
|
|
1661
|
+
description: "<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",
|
|
1662
|
+
jsx: r`
|
|
1929
1663
|
<div className="sfg-row">
|
|
1930
1664
|
<div className="sfg-col-4">
|
|
1931
1665
|
<sps-photo src="assets/images/photo-portrait.jpg" mode="fill"></sps-photo>
|
|
@@ -1935,12 +1669,12 @@ const ps = {
|
|
|
1935
1669
|
</div>
|
|
1936
1670
|
</div>
|
|
1937
1671
|
`
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
},
|
|
1675
|
+
placeholder: {
|
|
1676
|
+
label: "Placeholders",
|
|
1677
|
+
description: r`
|
|
1944
1678
|
<p>
|
|
1945
1679
|
When an image is not provided for a particular use case (such as a user avatar,
|
|
1946
1680
|
a company photo, item image, etc.), a placeholder should be shown in its place.
|
|
@@ -1949,86 +1683,59 @@ const ps = {
|
|
|
1949
1683
|
type of image it is substituting for.
|
|
1950
1684
|
</p>
|
|
1951
1685
|
`,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1686
|
+
examples: {
|
|
1687
|
+
general: {
|
|
1688
|
+
description: "<p>General Photo</p>",
|
|
1689
|
+
jsx: r`
|
|
1956
1690
|
<div className="sfg-row">
|
|
1957
1691
|
<div className="sfg-col-3">
|
|
1958
1692
|
<sps-photo placeholderIcon="photo"></sps-photo>
|
|
1959
1693
|
</div>
|
|
1960
1694
|
</div>
|
|
1961
1695
|
`
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1696
|
+
},
|
|
1697
|
+
photoAlt: {
|
|
1698
|
+
description: "<p>Photo Alt</p>",
|
|
1699
|
+
jsx: r`
|
|
1966
1700
|
<div className="sfg-row">
|
|
1967
1701
|
<div className="sfg-col-3">
|
|
1968
1702
|
<sps-photo placeholderIcon="camera"></sps-photo>
|
|
1969
1703
|
</div>
|
|
1970
1704
|
</div>
|
|
1971
1705
|
`
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1706
|
+
},
|
|
1707
|
+
user: {
|
|
1708
|
+
description: "<p>User / Single Person</p>",
|
|
1709
|
+
jsx: r`
|
|
1976
1710
|
<div className="sfg-row">
|
|
1977
1711
|
<div className="sfg-col-3">
|
|
1978
1712
|
<sps-photo placeholderIcon="user"></sps-photo>
|
|
1979
1713
|
</div>
|
|
1980
1714
|
</div>
|
|
1981
1715
|
`
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1716
|
+
},
|
|
1717
|
+
group: {
|
|
1718
|
+
description: "<p>Group / Multiple People</p>",
|
|
1719
|
+
jsx: r`
|
|
1986
1720
|
<div className="sfg-row">
|
|
1987
1721
|
<div className="sfg-col-3">
|
|
1988
1722
|
<sps-photo placeholderIcon="group"></sps-photo>
|
|
1989
1723
|
</div>
|
|
1990
1724
|
</div>
|
|
1991
1725
|
`
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1726
|
+
},
|
|
1727
|
+
company: {
|
|
1728
|
+
description: "<p>Company / Building</p>",
|
|
1729
|
+
jsx: r`
|
|
1996
1730
|
<div className="sfg-row">
|
|
1997
1731
|
<div className="sfg-col-3">
|
|
1998
1732
|
<sps-photo placeholderIcon="building"></sps-photo>
|
|
1999
1733
|
</div>
|
|
2000
1734
|
</div>
|
|
2001
1735
|
`
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
};
|
|
2006
|
-
export {
|
|
2007
|
-
He as AttrBindings,
|
|
2008
|
-
K as ClassBindings,
|
|
2009
|
-
Q as Component,
|
|
2010
|
-
Ce as Content,
|
|
2011
|
-
we as EventDispatcher,
|
|
2012
|
-
ce as EventListener,
|
|
2013
|
-
is as MANIFEST,
|
|
2014
|
-
Qe as MIMEType,
|
|
2015
|
-
m as Prop,
|
|
2016
|
-
_e as QuerySelector,
|
|
2017
|
-
zt as QuerySelectorAll,
|
|
2018
|
-
b as SpsFileUploadComponent,
|
|
2019
|
-
os as SpsFileUploadExamples,
|
|
2020
|
-
k as SpsInsightCardComponent,
|
|
2021
|
-
ls as SpsInsightCardExamples,
|
|
2022
|
-
X as SpsInsightsComponent,
|
|
2023
|
-
R as SpsNavTabComponent,
|
|
2024
|
-
ee as SpsNavTabSetComponent,
|
|
2025
|
-
cs as SpsNavTabsExamples,
|
|
2026
|
-
L as SpsPhotoComponent,
|
|
2027
|
-
es as SpsPhotoDisplayMode,
|
|
2028
|
-
ps as SpsPhotoExamples,
|
|
2029
|
-
be as StyleBindings,
|
|
2030
|
-
Ke as Watch,
|
|
2031
|
-
c as h,
|
|
2032
|
-
as as namespaceOverrideRegistrar,
|
|
2033
|
-
rs as register
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
2034
1739
|
};
|
|
1740
|
+
//#endregion
|
|
1741
|
+
export { y as AttrBindings, b as ClassBindings, C as Component, w as Content, T as EventDispatcher, E as EventListener, s as MANIFEST, M as MIMEType, D as Prop, k as QuerySelector, A as QuerySelectorAll, I as SpsFileUploadComponent, L as SpsFileUploadExamples, z as SpsInsightCardComponent, te as SpsInsightCardExamples, V as SpsInsightsComponent, H as SpsNavTabComponent, U as SpsNavTabSetComponent, W as SpsNavTabsExamples, q as SpsPhotoComponent, G as SpsPhotoDisplayMode, J as SpsPhotoExamples, x as StyleBindings, j as Watch, g as h, v as namespaceOverrideRegistrar, ee as register };
|