@capillaryjs/capillary-ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -3
- package/README.md +23 -13
- package/dist/Components/data/listview/listview.d.ts +3 -3
- package/dist/Components/data/listview/listview.d.ts.map +1 -1
- package/dist/Components/data/table/DataTable.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeader.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeview.d.ts +2 -2
- package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
- package/dist/index.js +847 -832
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/structural.css +19 -5
- package/themes/minimal/theme.css +3 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (t, r, e) =>
|
|
4
|
-
import { C as
|
|
5
|
-
import { S as
|
|
6
|
-
import { Emitter as $, DerivedEmitter as We, FetchState as I, QueryArg as
|
|
7
|
-
class bt extends
|
|
1
|
+
var Ar = Object.defineProperty;
|
|
2
|
+
var qr = (t, r, e) => r in t ? Ar(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
+
var a = (t, r, e) => qr(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { C as y, j as h, c as x, h as F, F as we, a as v, i as ee, b as jr } from "./jsx-dev-runtime-D3UnwrKT.js";
|
|
5
|
+
import { S as Pn, d as Dn, e as Mn, f as An, g as qn, k as jn, l as Un, m as Vn, n as Hn, p as Kn, s as Fn } from "./jsx-dev-runtime-D3UnwrKT.js";
|
|
6
|
+
import { Emitter as $, DerivedEmitter as We, FetchState as I, QueryArg as Ht, LiveQuery as Ur, RestQueryHandler as Vr } from "@capillaryjs/capillary";
|
|
7
|
+
class bt extends y {
|
|
8
8
|
render() {
|
|
9
9
|
return this.props.children ?? [];
|
|
10
10
|
}
|
|
@@ -19,7 +19,7 @@ function Fe(t, r, e = "Layout component") {
|
|
|
19
19
|
if (r != null) return r;
|
|
20
20
|
throw new TypeError(`${e} requires either horizontal or vertical`);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function pr(t) {
|
|
23
23
|
if (t === "horizontal") return "cap-layout-horizontal";
|
|
24
24
|
if (t === "vertical") return "cap-layout-vertical";
|
|
25
25
|
throw new TypeError("Layout direction must be horizontal or vertical");
|
|
@@ -31,7 +31,7 @@ function gt(t) {
|
|
|
31
31
|
throw new TypeError("Layout allocation must be natural or flexible");
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const k = {
|
|
35
35
|
/** Deny mode: Excludes items that match the filter. */
|
|
36
36
|
Deny: "deny",
|
|
37
37
|
/** Require mode: Includes only items that match the filter. */
|
|
@@ -42,30 +42,30 @@ const x = {
|
|
|
42
42
|
Neutral: "neutral"
|
|
43
43
|
};
|
|
44
44
|
function Ge(t) {
|
|
45
|
-
return Object.values(
|
|
45
|
+
return Object.values(k).some((r) => r === t);
|
|
46
46
|
}
|
|
47
|
-
let
|
|
48
|
-
function
|
|
49
|
-
return r != null && String(r).length > 0 ? String(r) : `cap-${t}-${
|
|
47
|
+
let Hr = 1;
|
|
48
|
+
function R(t, r) {
|
|
49
|
+
return r != null && String(r).length > 0 ? String(r) : `cap-${t}-${Hr++}`;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function j(t, r, e, i) {
|
|
52
52
|
if (r.valueEmitter != null)
|
|
53
|
-
return
|
|
53
|
+
return Kr(r.valueEmitter, "valueEmitter"), r.valueEmitter;
|
|
54
54
|
const o = r.defaultValue ?? r.value ?? r.initialValue ?? e, n = { owner: t, purpose: i };
|
|
55
55
|
return new $(o, n);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Kr(t, r = "emitter") {
|
|
58
58
|
if (t == null || typeof t != "object" && typeof t != "function" || typeof Reflect.get(t, "get") != "function" || typeof Reflect.get(t, "set") != "function" || typeof Reflect.get(t, "subscribe") != "function")
|
|
59
59
|
throw new TypeError(`${r} must be an emitter`);
|
|
60
60
|
}
|
|
61
61
|
function ve(...t) {
|
|
62
62
|
return t.flatMap((r) => typeof r == "string" ? r.split(/\s+/) : []).filter(Boolean).join(" ");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function T(t) {
|
|
65
65
|
return t.className ?? t.class ?? "";
|
|
66
66
|
}
|
|
67
67
|
function xe(t) {
|
|
68
|
-
return ve(
|
|
68
|
+
return ve(T(t), gt(t.allocation));
|
|
69
69
|
}
|
|
70
70
|
function O(t, ...r) {
|
|
71
71
|
if (t != null) {
|
|
@@ -76,19 +76,19 @@ function O(t, ...r) {
|
|
|
76
76
|
function _e(t, r = "options") {
|
|
77
77
|
if (!Array.isArray(t)) throw new TypeError(`${r} must be an array`);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Fr(t) {
|
|
80
80
|
return Ge(t) ? t : String(t);
|
|
81
81
|
}
|
|
82
|
-
class ue extends
|
|
82
|
+
class ue extends y {
|
|
83
83
|
constructor(e = {}) {
|
|
84
84
|
var n;
|
|
85
85
|
super(e);
|
|
86
86
|
a(this, "valueEmitter");
|
|
87
87
|
a(this, "activeTabEmitter");
|
|
88
88
|
const i = e.tabs ?? [];
|
|
89
|
-
|
|
89
|
+
Kt(i);
|
|
90
90
|
const o = { ...e };
|
|
91
|
-
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter =
|
|
91
|
+
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter = j(
|
|
92
92
|
this,
|
|
93
93
|
o,
|
|
94
94
|
((n = i.find((s) => !s.disabled)) == null ? void 0 : n.id) ?? null,
|
|
@@ -107,23 +107,23 @@ class ue extends g {
|
|
|
107
107
|
label: i = this.capillaryUiMessage("tabLineLabel"),
|
|
108
108
|
baseId: o = "cap-tabs"
|
|
109
109
|
} = this.props;
|
|
110
|
-
|
|
110
|
+
Kt(e);
|
|
111
111
|
const n = this.valueEmitter.get(), s = this.Host;
|
|
112
112
|
return /* @__PURE__ */ h(
|
|
113
113
|
s,
|
|
114
114
|
{
|
|
115
115
|
role: "tablist",
|
|
116
|
-
className:
|
|
116
|
+
className: T(this.props) || null,
|
|
117
117
|
"aria-label": i,
|
|
118
118
|
children: e.map((l, c) => /* @__PURE__ */ h(
|
|
119
119
|
"button",
|
|
120
120
|
{
|
|
121
|
-
id:
|
|
121
|
+
id: mr(o, l.id),
|
|
122
122
|
type: "button",
|
|
123
123
|
role: "tab",
|
|
124
124
|
disabled: !!l.disabled,
|
|
125
125
|
"aria-selected": Object.is(n, l.id) ? "true" : "false",
|
|
126
|
-
"aria-controls":
|
|
126
|
+
"aria-controls": fr(o, l.id),
|
|
127
127
|
tabIndex: Object.is(n, l.id) ? 0 : -1,
|
|
128
128
|
onClick: (u) => this.selectTab(l, u),
|
|
129
129
|
onKeyDown: (u) => this.handleKeyDown(u, c, e),
|
|
@@ -155,7 +155,7 @@ class ue extends g {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
a(ue, "liveProps", []), a(ue, "hostName", "tab-line"), a(ue, "css",
|
|
158
|
+
a(ue, "liveProps", []), a(ue, "hostName", "tab-line"), a(ue, "css", x`
|
|
159
159
|
& {
|
|
160
160
|
display: flex;
|
|
161
161
|
background: var(--tabline-background);
|
|
@@ -219,16 +219,16 @@ a(ue, "liveProps", []), a(ue, "hostName", "tab-line"), a(ue, "css", w`
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
`);
|
|
222
|
-
function
|
|
223
|
-
return `${t}-tab-${
|
|
222
|
+
function mr(t, r) {
|
|
223
|
+
return `${t}-tab-${br(r)}`;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return `${t}-panel-${
|
|
225
|
+
function fr(t, r) {
|
|
226
|
+
return `${t}-panel-${br(r)}`;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function br(t) {
|
|
229
229
|
return encodeURIComponent(String(t)).replaceAll("%", "-");
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Kt(t) {
|
|
232
232
|
if (!Array.isArray(t)) throw new TypeError("TabLine tabs must be an array");
|
|
233
233
|
const r = /* @__PURE__ */ new Set();
|
|
234
234
|
for (const e of t) {
|
|
@@ -237,7 +237,7 @@ function Vt(t) {
|
|
|
237
237
|
r.add(e.id);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class ke extends y {
|
|
241
241
|
constructor() {
|
|
242
242
|
super(...arguments);
|
|
243
243
|
a(this, "closeScope", null);
|
|
@@ -262,8 +262,8 @@ class Ee extends g {
|
|
|
262
262
|
(e = this.closeScope) == null || e.call(this), this.closeScope = null;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
a(
|
|
266
|
-
class
|
|
265
|
+
a(ke, "liveProps", []);
|
|
266
|
+
class gr {
|
|
267
267
|
constructor(r, e, i) {
|
|
268
268
|
a(this, "routeContexts", /* @__PURE__ */ new Map());
|
|
269
269
|
a(this, "mountedIds", /* @__PURE__ */ new Set());
|
|
@@ -299,7 +299,7 @@ class fr {
|
|
|
299
299
|
}
|
|
300
300
|
scopedContent(r, e) {
|
|
301
301
|
const i = r.route == null ? null : this.routeContexts.get(r.route);
|
|
302
|
-
return i == null ? e : F(
|
|
302
|
+
return i == null ? e : F(ke, { key: i.pathname, context: i }, e);
|
|
303
303
|
}
|
|
304
304
|
dispose() {
|
|
305
305
|
this.registeredRouter != null && this.registeredParent != null && this.registeredRouter.unregisterRoutes(this.registeredParent, this.owner), this.registeredRouter = null, this.registeredParent = null, this.routeContexts.clear(), this.mountedIds.clear();
|
|
@@ -344,7 +344,7 @@ function J(t, r) {
|
|
|
344
344
|
throw new TypeError(`${r} mountPolicy must be eager, lazy, or active-only`);
|
|
345
345
|
return e;
|
|
346
346
|
}
|
|
347
|
-
class Te extends
|
|
347
|
+
class Te extends y {
|
|
348
348
|
constructor(e = {}) {
|
|
349
349
|
var n;
|
|
350
350
|
super(e);
|
|
@@ -353,12 +353,12 @@ class Te extends g {
|
|
|
353
353
|
a(this, "baseId");
|
|
354
354
|
a(this, "selection");
|
|
355
355
|
const i = ne(e), o = { ...e };
|
|
356
|
-
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter =
|
|
356
|
+
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter = j(
|
|
357
357
|
this,
|
|
358
358
|
o,
|
|
359
359
|
((n = i.find((s) => !s.disabled)) == null ? void 0 : n.id) ?? null,
|
|
360
360
|
"active tab"
|
|
361
|
-
), this.activeTabEmitter = this.valueEmitter, this.baseId =
|
|
361
|
+
), this.activeTabEmitter = this.valueEmitter, this.baseId = R("tabs", e.id), this.selection = new gr(this, this.valueEmitter, {
|
|
362
362
|
subject: "tabs",
|
|
363
363
|
restoredCause: "route tab restored",
|
|
364
364
|
pendingCause: "pending route tab selected",
|
|
@@ -375,11 +375,11 @@ class Te extends g {
|
|
|
375
375
|
render() {
|
|
376
376
|
var l;
|
|
377
377
|
const e = ne(this.props), i = J(this.props.mountPolicy, "TabPanel"), o = (l = this.selection.selected(e)) == null ? void 0 : l.id, n = this.selection.updateMounted(e, i), s = this.Host;
|
|
378
|
-
return /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ v(
|
|
379
379
|
s,
|
|
380
380
|
{
|
|
381
381
|
id: this.baseId,
|
|
382
|
-
className:
|
|
382
|
+
className: T(this.props) || null,
|
|
383
383
|
children: [
|
|
384
384
|
/* @__PURE__ */ h(
|
|
385
385
|
ue,
|
|
@@ -398,9 +398,9 @@ class Te extends g {
|
|
|
398
398
|
return /* @__PURE__ */ h(
|
|
399
399
|
"section",
|
|
400
400
|
{
|
|
401
|
-
id:
|
|
401
|
+
id: fr(this.baseId, c.id),
|
|
402
402
|
role: "tabpanel",
|
|
403
|
-
"aria-labelledby":
|
|
403
|
+
"aria-labelledby": mr(this.baseId, c.id),
|
|
404
404
|
tabIndex: u ? 0 : -1,
|
|
405
405
|
hidden: !u,
|
|
406
406
|
children: n.has(c.id) ? this.selection.scopedContent(c, c.content) : null
|
|
@@ -420,7 +420,7 @@ class Te extends g {
|
|
|
420
420
|
o != null && this.selection.select(o);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
a(Te, "liveProps", []), a(Te, "dependencies", [
|
|
423
|
+
a(Te, "liveProps", []), a(Te, "dependencies", [ke, ue, bt]), a(Te, "hostName", "tab-panel"), a(Te, "css", x`
|
|
424
424
|
& {
|
|
425
425
|
background: var(--panel-background);
|
|
426
426
|
border-radius: var(--panel-radius);
|
|
@@ -490,16 +490,16 @@ class vt extends Error {
|
|
|
490
490
|
a(this, "name", "RouteUnavailableError");
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
const
|
|
493
|
+
const _o = Object.freeze({
|
|
494
494
|
parse: (t) => t,
|
|
495
495
|
format: (t) => t
|
|
496
|
-
}),
|
|
496
|
+
}), Bo = Object.freeze({
|
|
497
497
|
parse(t) {
|
|
498
498
|
if (t.length !== 1) throw new TypeError("Expected one query value");
|
|
499
499
|
return t[0] ?? "";
|
|
500
500
|
},
|
|
501
501
|
format: (t) => [t]
|
|
502
|
-
}),
|
|
502
|
+
}), Qo = Object.freeze({
|
|
503
503
|
parse(t) {
|
|
504
504
|
if (t.length !== 1 || t[0] !== "true" && t[0] !== "false")
|
|
505
505
|
throw new TypeError("Expected one boolean query value");
|
|
@@ -507,17 +507,17 @@ const Ko = Object.freeze({
|
|
|
507
507
|
},
|
|
508
508
|
format: (t) => [String(t)]
|
|
509
509
|
});
|
|
510
|
-
function
|
|
511
|
-
const e = ut(t, "Route id"), i =
|
|
510
|
+
function Wo(t, r = t) {
|
|
511
|
+
const e = ut(t, "Route id"), i = Wr(r, "Route path"), o = Object.freeze({
|
|
512
512
|
id: e,
|
|
513
513
|
kind: "literal",
|
|
514
514
|
path: i
|
|
515
515
|
});
|
|
516
516
|
return yt.add(o), o;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Go(t, r, e = t) {
|
|
519
519
|
const i = ut(t, "Route id"), o = ut(e, "Route parameter name");
|
|
520
|
-
|
|
520
|
+
Br(r);
|
|
521
521
|
const n = Object.freeze({
|
|
522
522
|
id: i,
|
|
523
523
|
kind: "parameter",
|
|
@@ -526,29 +526,29 @@ function Qo(t, r, e = t) {
|
|
|
526
526
|
});
|
|
527
527
|
return yt.add(n), n;
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Yo(t, r) {
|
|
530
530
|
if (X(t), t.kind !== "parameter")
|
|
531
531
|
throw new TypeError("routeParameter requires a parameter route");
|
|
532
532
|
const e = t.codec.format(r);
|
|
533
|
-
return
|
|
533
|
+
return kt(e, t.name), Object.freeze({ route: t, value: r });
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Jo(...t) {
|
|
536
536
|
if (t.length === 0) throw new TypeError("routeTarget requires at least one route");
|
|
537
537
|
for (const e of t)
|
|
538
|
-
if (
|
|
538
|
+
if (yr(e))
|
|
539
539
|
X(e.route);
|
|
540
540
|
else if (X(e), e.kind !== "literal")
|
|
541
541
|
throw new TypeError("Parameter routes require routeParameter(route, value)");
|
|
542
542
|
const r = Object.freeze({ routes: Object.freeze([...t]) });
|
|
543
543
|
return wt.add(r), r;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Xo(t, r) {
|
|
546
546
|
if (Ye(t), r == null || typeof r != "object" || Array.isArray(r))
|
|
547
547
|
throw new TypeError("Route target query must be an object");
|
|
548
548
|
const e = Object.freeze({ routes: t.routes, query: Object.freeze({ ...r }) });
|
|
549
549
|
return wt.add(e), e;
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function Zo(t) {
|
|
552
552
|
return new dt(t);
|
|
553
553
|
}
|
|
554
554
|
function xt(t) {
|
|
@@ -558,26 +558,26 @@ function X(t) {
|
|
|
558
558
|
if (!xt(t))
|
|
559
559
|
throw new TypeError("Expected a route created by defineRoute() or defineRouteParameter()");
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function _r(t) {
|
|
562
562
|
return t != null && typeof t == "object" && wt.has(t);
|
|
563
563
|
}
|
|
564
564
|
function Ye(t) {
|
|
565
|
-
if (!
|
|
565
|
+
if (!_r(t)) throw new TypeError("Expected a target created by routeTarget()");
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Br(t) {
|
|
568
568
|
if (t == null || typeof t != "object" || typeof t.parse != "function" || typeof t.format != "function")
|
|
569
569
|
throw new TypeError("Route codec requires parse and format functions");
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Qr(t) {
|
|
572
572
|
if (t == null || typeof t != "object" || typeof t.parse != "function" || typeof t.format != "function")
|
|
573
573
|
throw new TypeError("Route query codec requires parse and format functions");
|
|
574
574
|
}
|
|
575
575
|
function Ze(t) {
|
|
576
576
|
Ye(t);
|
|
577
577
|
const r = t.routes.map((o) => {
|
|
578
|
-
if (
|
|
578
|
+
if (yr(o)) {
|
|
579
579
|
const n = o.route.codec.format(o.value);
|
|
580
|
-
return
|
|
580
|
+
return kt(n, o.route.name), encodeURIComponent(n);
|
|
581
581
|
}
|
|
582
582
|
return encodeURIComponent(o.path);
|
|
583
583
|
}), e = new URLSearchParams();
|
|
@@ -589,7 +589,7 @@ function Ze(t) {
|
|
|
589
589
|
const i = e.toString();
|
|
590
590
|
return `/${r.join("/")}${i === "" ? "" : `?${i}`}`;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function yr(t) {
|
|
593
593
|
return t != null && typeof t == "object" && "route" in t && "value" in t && xt(t.route) && t.route.kind === "parameter";
|
|
594
594
|
}
|
|
595
595
|
function ut(t, r) {
|
|
@@ -597,21 +597,21 @@ function ut(t, r) {
|
|
|
597
597
|
throw new TypeError(`${r} must be a lowercase kebab-case name`);
|
|
598
598
|
return t;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Wr(t, r) {
|
|
601
601
|
if (typeof t != "string" || t === "" || t === "." || t === ".." || t.includes("/") || t.includes("?") || t.includes("#"))
|
|
602
602
|
throw new TypeError(`${r} must be one non-empty path segment`);
|
|
603
603
|
try {
|
|
604
|
-
|
|
604
|
+
kt(decodeURIComponent(t), r);
|
|
605
605
|
} catch {
|
|
606
606
|
throw new TypeError(`${r} must use valid percent encoding`);
|
|
607
607
|
}
|
|
608
608
|
return t;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function kt(t, r) {
|
|
611
611
|
if (typeof t != "string" || t === "" || t.includes("/"))
|
|
612
612
|
throw new TypeError(`${r} codec must format one non-empty path segment`);
|
|
613
613
|
}
|
|
614
|
-
class fe extends
|
|
614
|
+
class fe extends y {
|
|
615
615
|
initialize() {
|
|
616
616
|
const r = this._runtime.router;
|
|
617
617
|
if (r == null) throw new Error("RouteLink requires a router in CapillaryUiRuntime");
|
|
@@ -632,26 +632,26 @@ class fe extends g {
|
|
|
632
632
|
href: r.href(e),
|
|
633
633
|
"aria-current": r.isActive(e, o) ? "page" : null,
|
|
634
634
|
onClick: (c) => {
|
|
635
|
-
s == null || s(c),
|
|
635
|
+
s == null || s(c), Gr(c, l.target, l.download) && (c.preventDefault(), r.navigate(e));
|
|
636
636
|
}
|
|
637
637
|
}, n);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
a(fe, "liveProps", []);
|
|
641
|
-
function
|
|
641
|
+
function Gr(t, r, e) {
|
|
642
642
|
return !(t.defaultPrevented || t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || e != null && e !== !1 || r != null && r !== "" && r !== "_self");
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function wr(t) {
|
|
645
645
|
return t != null && typeof t == "object" && t.kind === "external";
|
|
646
646
|
}
|
|
647
|
-
class ze extends
|
|
647
|
+
class ze extends y {
|
|
648
648
|
constructor(r) {
|
|
649
|
-
super(r),
|
|
649
|
+
super(r), Ft(r);
|
|
650
650
|
}
|
|
651
651
|
render() {
|
|
652
|
-
|
|
652
|
+
Ft(this.props);
|
|
653
653
|
const r = this.Host;
|
|
654
|
-
return /* @__PURE__ */ h(r, { className: xe(this.props) || null, children: /* @__PURE__ */ h("nav", { "aria-label": this.props.label, children: /* @__PURE__ */ h("ul", { children: this.props.items.map((e) => /* @__PURE__ */ h("li", { children: e.disabled ? /* @__PURE__ */ h("span", { "aria-disabled": "true", title: e.title, children: e.label }) :
|
|
654
|
+
return /* @__PURE__ */ h(r, { className: xe(this.props) || null, children: /* @__PURE__ */ h("nav", { "aria-label": this.props.label, children: /* @__PURE__ */ h("ul", { children: this.props.items.map((e) => /* @__PURE__ */ h("li", { children: e.disabled ? /* @__PURE__ */ h("span", { "aria-disabled": "true", title: e.title, children: e.label }) : wr(e.to) ? /* @__PURE__ */ h(
|
|
655
655
|
"a",
|
|
656
656
|
{
|
|
657
657
|
href: e.to.href,
|
|
@@ -675,7 +675,7 @@ class ze extends g {
|
|
|
675
675
|
) }, String(e.id))) }) }) });
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
a(ze, "liveProps", []), a(ze, "dependencies", [fe]), a(ze, "hostName", "navigation-bar"), a(ze, "css",
|
|
678
|
+
a(ze, "liveProps", []), a(ze, "dependencies", [fe]), a(ze, "hostName", "navigation-bar"), a(ze, "css", x`
|
|
679
679
|
& {
|
|
680
680
|
display: block;
|
|
681
681
|
flex: 0 0 auto;
|
|
@@ -757,7 +757,7 @@ a(ze, "liveProps", []), a(ze, "dependencies", [fe]), a(ze, "hostName", "navigati
|
|
|
757
757
|
cursor: not-allowed;
|
|
758
758
|
}
|
|
759
759
|
`);
|
|
760
|
-
function
|
|
760
|
+
function Ft(t) {
|
|
761
761
|
if (typeof t.label != "string" || t.label.trim() === "")
|
|
762
762
|
throw new TypeError("NavigationBar label must be a non-empty string");
|
|
763
763
|
if (!Array.isArray(t.items)) throw new TypeError("NavigationBar items must be an array");
|
|
@@ -766,7 +766,7 @@ function Ht(t) {
|
|
|
766
766
|
if (e == null || e.id == null) throw new TypeError("Each navigation item requires an id");
|
|
767
767
|
if (e.label == null) throw new TypeError("Each navigation item requires a label");
|
|
768
768
|
if (e.to == null) throw new TypeError("Each navigation item requires a destination");
|
|
769
|
-
if (
|
|
769
|
+
if (wr(e.to)) {
|
|
770
770
|
if (typeof e.to.href != "string" || e.to.href.trim() === "")
|
|
771
771
|
throw new TypeError("External navigation item requires a non-blank href");
|
|
772
772
|
if (e.exact != null)
|
|
@@ -778,14 +778,14 @@ function Ht(t) {
|
|
|
778
778
|
r.add(e.id);
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
class Ce extends
|
|
781
|
+
class Ce extends y {
|
|
782
782
|
constructor(r) {
|
|
783
|
-
super(r),
|
|
783
|
+
super(r), _t(r);
|
|
784
784
|
}
|
|
785
785
|
render() {
|
|
786
|
-
|
|
786
|
+
_t(this.props);
|
|
787
787
|
const r = this.Host, e = this.props.items, i = e.length - 1;
|
|
788
|
-
return /* @__PURE__ */ h(r, { className:
|
|
788
|
+
return /* @__PURE__ */ h(r, { className: T(this.props) || null, children: /* @__PURE__ */ h("nav", { "aria-label": this.props.label ?? this.capillaryUiMessage("breadcrumbLabel"), children: /* @__PURE__ */ h("ol", { children: e.map((o, n) => /* @__PURE__ */ h("li", { children: n === i ? /* @__PURE__ */ h("span", { "aria-current": "page", ...o.title == null ? {} : { title: o.title }, children: o.label }) : o.to != null ? /* @__PURE__ */ h(
|
|
789
789
|
fe,
|
|
790
790
|
{
|
|
791
791
|
to: o.to,
|
|
@@ -806,7 +806,7 @@ class Ce extends g {
|
|
|
806
806
|
) : /* @__PURE__ */ h("span", { ...o.title == null ? {} : { title: o.title }, children: o.label }) }, String(o.id))) }) }) });
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
a(Ce, "liveProps", []), a(Ce, "dependencies", [fe]), a(Ce, "hostName", "breadcrumb"), a(Ce, "css",
|
|
809
|
+
a(Ce, "liveProps", []), a(Ce, "dependencies", [fe]), a(Ce, "hostName", "breadcrumb"), a(Ce, "css", x`
|
|
810
810
|
& {
|
|
811
811
|
display: block;
|
|
812
812
|
min-width: 0;
|
|
@@ -851,7 +851,7 @@ a(Ce, "liveProps", []), a(Ce, "dependencies", [fe]), a(Ce, "hostName", "breadcru
|
|
|
851
851
|
font-weight: var(--breadcrumb-current-font-weight, 600);
|
|
852
852
|
}
|
|
853
853
|
`);
|
|
854
|
-
function
|
|
854
|
+
function _t(t) {
|
|
855
855
|
if (!Array.isArray(t.items)) throw new TypeError("Breadcrumb items must be an array");
|
|
856
856
|
const r = /* @__PURE__ */ new Set();
|
|
857
857
|
for (const e of t.items) {
|
|
@@ -863,10 +863,10 @@ function Kt(t) {
|
|
|
863
863
|
r.add(e.id);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
class
|
|
866
|
+
class Bt extends y {
|
|
867
867
|
mount(r = null, e = null) {
|
|
868
868
|
if (r != null) {
|
|
869
|
-
const i =
|
|
869
|
+
const i = vr(r, "CapillaryUiApp.mount"), o = this.constructor;
|
|
870
870
|
this._runtime.registerStyles(o).injectStyles(i);
|
|
871
871
|
}
|
|
872
872
|
return super.mount(r, e);
|
|
@@ -885,24 +885,24 @@ class Ft extends g {
|
|
|
885
885
|
layout: l,
|
|
886
886
|
landmark: c = "main",
|
|
887
887
|
...u
|
|
888
|
-
} = this.props, p = this.Host, m =
|
|
888
|
+
} = this.props, p = this.Host, m = Xr(
|
|
889
889
|
i,
|
|
890
890
|
o,
|
|
891
|
-
|
|
892
|
-
l == null ? void 0 :
|
|
891
|
+
Yr(s),
|
|
892
|
+
l == null ? void 0 : pr(l)
|
|
893
893
|
);
|
|
894
894
|
return /* @__PURE__ */ h(
|
|
895
895
|
p,
|
|
896
896
|
{
|
|
897
897
|
...u,
|
|
898
|
-
role:
|
|
898
|
+
role: Jr(c),
|
|
899
899
|
...m == null ? {} : { className: m },
|
|
900
900
|
children: this.renderContent()
|
|
901
901
|
}
|
|
902
902
|
);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
a(
|
|
905
|
+
a(Bt, "hostName", "app"), a(Bt, "css", x`
|
|
906
906
|
& {
|
|
907
907
|
box-sizing: border-box;
|
|
908
908
|
display: block;
|
|
@@ -913,13 +913,13 @@ a(Ft, "hostName", "app"), a(Ft, "css", w`
|
|
|
913
913
|
line-height: var(--line-height);
|
|
914
914
|
}
|
|
915
915
|
`);
|
|
916
|
-
function
|
|
917
|
-
if (!(t instanceof
|
|
916
|
+
function en(t, r, e, ...i) {
|
|
917
|
+
if (!(t instanceof jr))
|
|
918
918
|
throw new TypeError("mountCapillaryUiApp requires a CapillaryUiRuntime");
|
|
919
|
-
const o =
|
|
919
|
+
const o = vr(e, "mountCapillaryUiApp");
|
|
920
920
|
return t.registerStyles(r).injectStyles(o), t.mount(t.create(r, ...i), e);
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function vr(t, r) {
|
|
923
923
|
if (t == null || typeof t != "object" || !("ownerDocument" in t))
|
|
924
924
|
throw new TypeError(`${r} requires a DOM parent node`);
|
|
925
925
|
const e = t.ownerDocument ?? (t.nodeType === 9 ? t : null);
|
|
@@ -927,7 +927,7 @@ function yr(t, r) {
|
|
|
927
927
|
throw new TypeError(`${r} requires a parent associated with a document head`);
|
|
928
928
|
return e;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Yr(t) {
|
|
931
931
|
switch (t) {
|
|
932
932
|
case "embedded":
|
|
933
933
|
return;
|
|
@@ -943,21 +943,21 @@ function Wr(t) {
|
|
|
943
943
|
);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function Jr(t) {
|
|
947
947
|
if (t === "main") return "main";
|
|
948
948
|
if (t === "none") return null;
|
|
949
949
|
throw new TypeError("CapillaryUiApp landmark must be main or none");
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Xr(...t) {
|
|
952
952
|
const r = t.flatMap((e) => (e == null ? void 0 : e.trim().split(/\s+/)) ?? []).filter(Boolean).join(" ");
|
|
953
953
|
return r.length === 0 ? void 0 : r;
|
|
954
954
|
}
|
|
955
|
-
class
|
|
955
|
+
class D extends y {
|
|
956
956
|
constructor(e = {}) {
|
|
957
957
|
super(e);
|
|
958
958
|
a(this, "headerId");
|
|
959
959
|
a(this, "headingId");
|
|
960
|
-
this.headerId =
|
|
960
|
+
this.headerId = R("header", e.id), this.headingId = R("header-title", e.headingId ?? `${this.headerId}-title`);
|
|
961
961
|
}
|
|
962
962
|
render() {
|
|
963
963
|
const { level: e = 2, children: i = [] } = this.props;
|
|
@@ -977,7 +977,7 @@ class M extends g {
|
|
|
977
977
|
);
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
a(
|
|
980
|
+
a(D, "liveProps", []), a(D, "hostName", "header"), a(D, "css", x`
|
|
981
981
|
& {
|
|
982
982
|
display: block;
|
|
983
983
|
color: var(--section-header-color);
|
|
@@ -1000,29 +1000,29 @@ a(M, "liveProps", []), a(M, "hostName", "header"), a(M, "css", w`
|
|
|
1000
1000
|
font: inherit;
|
|
1001
1001
|
}
|
|
1002
1002
|
`);
|
|
1003
|
-
class ce extends
|
|
1003
|
+
class ce extends y {
|
|
1004
1004
|
constructor(e) {
|
|
1005
1005
|
super(e);
|
|
1006
1006
|
a(this, "panelId");
|
|
1007
1007
|
a(this, "headerId");
|
|
1008
|
-
this.panelId =
|
|
1008
|
+
this.panelId = R("group-box", e.id), this.headerId = `${this.panelId}-title`;
|
|
1009
1009
|
}
|
|
1010
1010
|
render() {
|
|
1011
1011
|
const { header: e, children: i = [] } = this.props;
|
|
1012
1012
|
return this.renderGroupBox(e, i);
|
|
1013
1013
|
}
|
|
1014
1014
|
renderGroupBox(e, i) {
|
|
1015
|
-
const o = this.Host, n =
|
|
1016
|
-
return /* @__PURE__ */
|
|
1015
|
+
const o = this.Host, n = Zr(this.props.variant);
|
|
1016
|
+
return /* @__PURE__ */ v(
|
|
1017
1017
|
o,
|
|
1018
1018
|
{
|
|
1019
1019
|
id: this.panelId,
|
|
1020
1020
|
role: "group",
|
|
1021
|
-
className: ve(
|
|
1021
|
+
className: ve(T(this.props), n) || null,
|
|
1022
1022
|
"aria-labelledby": this.headerId,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
/* @__PURE__ */ h(
|
|
1025
|
-
|
|
1025
|
+
D,
|
|
1026
1026
|
{
|
|
1027
1027
|
id: `${this.panelId}-header`,
|
|
1028
1028
|
headingId: this.headerId,
|
|
@@ -1035,7 +1035,7 @@ class ce extends g {
|
|
|
1035
1035
|
);
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
a(ce, "liveProps", []), a(ce, "hostName", "group-box"), a(ce, "dependencies", [
|
|
1038
|
+
a(ce, "liveProps", []), a(ce, "hostName", "group-box"), a(ce, "dependencies", [D]), a(ce, "css", x`
|
|
1039
1039
|
& {
|
|
1040
1040
|
display: flex;
|
|
1041
1041
|
flex-flow: var(--cap-groupbox-flow, row nowrap);
|
|
@@ -1280,28 +1280,28 @@ a(ce, "liveProps", []), a(ce, "hostName", "group-box"), a(ce, "dependencies", [M
|
|
|
1280
1280
|
padding-block-end: 0;
|
|
1281
1281
|
}
|
|
1282
1282
|
`);
|
|
1283
|
-
function
|
|
1283
|
+
function Zr(t) {
|
|
1284
1284
|
if (t != null) {
|
|
1285
1285
|
if (t === "section" || t === "column") return `cap-groupbox-${t}`;
|
|
1286
1286
|
throw new TypeError("GroupBox variant must be section or column");
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
|
-
class be extends
|
|
1289
|
+
class be extends y {
|
|
1290
1290
|
}
|
|
1291
|
-
a(be, "hostName", null), a(be, "css",
|
|
1291
|
+
a(be, "hostName", null), a(be, "css", x`
|
|
1292
1292
|
@keyframes cap-working-progress {
|
|
1293
1293
|
from { background-position: 0 0, 0 0; }
|
|
1294
1294
|
to { background-position: 2rem 0, 0 0; }
|
|
1295
1295
|
}
|
|
1296
1296
|
`);
|
|
1297
|
-
class
|
|
1297
|
+
class E extends y {
|
|
1298
1298
|
render() {
|
|
1299
|
-
const r =
|
|
1300
|
-
return /* @__PURE__ */
|
|
1299
|
+
const r = xr(this.props.error, this.props.fallback ?? ""), e = this.Host;
|
|
1300
|
+
return /* @__PURE__ */ v(
|
|
1301
1301
|
e,
|
|
1302
1302
|
{
|
|
1303
1303
|
id: this.props.id,
|
|
1304
|
-
className:
|
|
1304
|
+
className: T(this.props) || null,
|
|
1305
1305
|
role: "alert",
|
|
1306
1306
|
tabIndex: 0,
|
|
1307
1307
|
"aria-label": r,
|
|
@@ -1313,7 +1313,7 @@ class k extends g {
|
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
a(
|
|
1316
|
+
a(E, "hostName", "error"), a(E, "dependencies", [be]), a(E, "css", x`
|
|
1317
1317
|
& {
|
|
1318
1318
|
position: absolute;
|
|
1319
1319
|
z-index: 1200;
|
|
@@ -1396,21 +1396,21 @@ a(k, "hostName", "error"), a(k, "dependencies", [be]), a(k, "css", w`
|
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
`);
|
|
1399
|
-
function
|
|
1400
|
-
if (t instanceof Error ||
|
|
1401
|
-
if (
|
|
1402
|
-
const e = t.map((i) =>
|
|
1399
|
+
function xr(t, r) {
|
|
1400
|
+
if (t instanceof Error || ei(t)) return t.message;
|
|
1401
|
+
if (ti(t)) {
|
|
1402
|
+
const e = t.map((i) => xr(i.error, "")).filter((i) => i.length > 0);
|
|
1403
1403
|
if (e.length > 0) return [...new Set(e)].join("; ");
|
|
1404
1404
|
}
|
|
1405
1405
|
return t == null ? r : String(t);
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function ei(t) {
|
|
1408
1408
|
return t != null && typeof t == "object" && typeof Reflect.get(t, "message") == "string";
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function ti(t) {
|
|
1411
1411
|
return Array.isArray(t) && t.every((r) => r != null && typeof r == "object" && Object.hasOwn(r, "error"));
|
|
1412
1412
|
}
|
|
1413
|
-
class ie extends
|
|
1413
|
+
class ie extends y {
|
|
1414
1414
|
render() {
|
|
1415
1415
|
throw new Error(`${this.constructor.name} must be a direct child of its documented parent`);
|
|
1416
1416
|
}
|
|
@@ -1425,7 +1425,7 @@ function Je(t, r, e, i = {}) {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
const u = o.find(([, m]) => c.type === m);
|
|
1427
1427
|
if (u == null) {
|
|
1428
|
-
if (
|
|
1428
|
+
if (ri(c.type))
|
|
1429
1429
|
throw new Error(`${t} does not support region: ${c.type.name}`);
|
|
1430
1430
|
n.push(c);
|
|
1431
1431
|
continue;
|
|
@@ -1443,24 +1443,24 @@ function Je(t, r, e, i = {}) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
return { content: n, regions: s };
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function ri(t) {
|
|
1447
1447
|
return typeof t == "function" && t.prototype instanceof ie;
|
|
1448
1448
|
}
|
|
1449
|
-
class
|
|
1449
|
+
class Qt extends ie {
|
|
1450
1450
|
}
|
|
1451
|
-
const
|
|
1452
|
-
class Re extends
|
|
1451
|
+
const ii = ["disabled", "required", "busy", "error"];
|
|
1452
|
+
class Re extends y {
|
|
1453
1453
|
constructor(e) {
|
|
1454
1454
|
super(e);
|
|
1455
1455
|
a(this, "groupId");
|
|
1456
1456
|
a(this, "errorId");
|
|
1457
|
-
this.groupId =
|
|
1457
|
+
this.groupId = R("option-group", e.id), this.errorId = `${this.groupId}-error`;
|
|
1458
1458
|
}
|
|
1459
1459
|
render() {
|
|
1460
1460
|
if (this.props.headerEnd != null)
|
|
1461
1461
|
throw new Error("OptionGroup trailing header content must use a direct OptionGroupHeaderEnd child");
|
|
1462
1462
|
const { content: e, regions: i } = Je("OptionGroup", this.props.children, {
|
|
1463
|
-
headerEnd:
|
|
1463
|
+
headerEnd: Qt
|
|
1464
1464
|
});
|
|
1465
1465
|
return this.renderOptionGroup(e, i.headerEnd ?? null);
|
|
1466
1466
|
}
|
|
@@ -1473,8 +1473,8 @@ class Re extends g {
|
|
|
1473
1473
|
busy: u = !1,
|
|
1474
1474
|
error: p = null
|
|
1475
1475
|
} = this.props;
|
|
1476
|
-
return /* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ v(o, { className: T(this.props) || null, children: [
|
|
1477
|
+
/* @__PURE__ */ v(
|
|
1478
1478
|
"fieldset",
|
|
1479
1479
|
{
|
|
1480
1480
|
id: this.groupId,
|
|
@@ -1485,7 +1485,7 @@ class Re extends g {
|
|
|
1485
1485
|
"aria-invalid": p == null ? null : "true",
|
|
1486
1486
|
"aria-describedby": p == null ? null : this.errorId,
|
|
1487
1487
|
children: [
|
|
1488
|
-
n != null || i != null ? /* @__PURE__ */
|
|
1488
|
+
n != null || i != null ? /* @__PURE__ */ v("legend", { children: [
|
|
1489
1489
|
n != null ? /* @__PURE__ */ h("span", { children: n }) : null,
|
|
1490
1490
|
i
|
|
1491
1491
|
] }) : null,
|
|
@@ -1498,10 +1498,10 @@ class Re extends g {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
/** Shared error anatomy for OptionGroup specializations. */
|
|
1500
1500
|
renderOptionGroupError(e) {
|
|
1501
|
-
return e == null ? null : /* @__PURE__ */ h(
|
|
1501
|
+
return e == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: e });
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
|
-
a(Re, "liveProps",
|
|
1504
|
+
a(Re, "liveProps", ii), a(Re, "hostName", "option-group"), a(Re, "dependencies", [Qt, E]), a(Re, "css", x`
|
|
1505
1505
|
& {
|
|
1506
1506
|
display: block;
|
|
1507
1507
|
position: relative;
|
|
@@ -1561,9 +1561,9 @@ a(Re, "liveProps", ti), a(Re, "hostName", "option-group"), a(Re, "dependencies",
|
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
`);
|
|
1564
|
-
class
|
|
1564
|
+
class Wt extends ce {
|
|
1565
1565
|
}
|
|
1566
|
-
a(
|
|
1566
|
+
a(Wt, "hostName", "options-box"), a(Wt, "css", x`
|
|
1567
1567
|
& > cap-content {
|
|
1568
1568
|
display: flex;
|
|
1569
1569
|
flex-direction: column;
|
|
@@ -1600,7 +1600,7 @@ a(Bt, "hostName", "options-box"), a(Bt, "css", w`
|
|
|
1600
1600
|
padding: .25em 0 .5em 0;
|
|
1601
1601
|
}
|
|
1602
1602
|
`);
|
|
1603
|
-
class ge extends
|
|
1603
|
+
class ge extends y {
|
|
1604
1604
|
defaultDirection() {
|
|
1605
1605
|
}
|
|
1606
1606
|
defaultScroll() {
|
|
@@ -1627,8 +1627,8 @@ class ge extends g {
|
|
|
1627
1627
|
"data-cap-context": this.props.context ?? null,
|
|
1628
1628
|
...this.hostAccessibilityProps(),
|
|
1629
1629
|
className: ve(
|
|
1630
|
-
|
|
1631
|
-
|
|
1630
|
+
T(this.props),
|
|
1631
|
+
pr(r),
|
|
1632
1632
|
gt(this.props.allocation),
|
|
1633
1633
|
e ? "cap-scroll" : void 0
|
|
1634
1634
|
) || null,
|
|
@@ -1638,15 +1638,15 @@ class ge extends g {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
a(ge, "liveProps", []), a(ge, "hostName", "layout");
|
|
1641
|
-
const
|
|
1642
|
-
class
|
|
1641
|
+
const oi = ["disabled"];
|
|
1642
|
+
class Gt extends ie {
|
|
1643
1643
|
}
|
|
1644
|
-
class $e extends
|
|
1644
|
+
class $e extends y {
|
|
1645
1645
|
constructor(e = {}) {
|
|
1646
1646
|
super(e);
|
|
1647
1647
|
a(this, "panelId");
|
|
1648
1648
|
a(this, "headerId");
|
|
1649
|
-
this.panelId =
|
|
1649
|
+
this.panelId = R("panel", e.id), this.headerId = `${this.panelId}-title`;
|
|
1650
1650
|
}
|
|
1651
1651
|
render() {
|
|
1652
1652
|
if (this.props.toolbar != null)
|
|
@@ -1659,7 +1659,7 @@ class $e extends g {
|
|
|
1659
1659
|
disabled: s = !1,
|
|
1660
1660
|
context: l = null
|
|
1661
1661
|
} = this.props, { content: c, regions: u } = Je("Panel", i, {
|
|
1662
|
-
toolbar:
|
|
1662
|
+
toolbar: Gt
|
|
1663
1663
|
});
|
|
1664
1664
|
if (o != null && !["horizontal", "vertical"].includes(o))
|
|
1665
1665
|
throw new TypeError("Panel orientation must be horizontal or vertical");
|
|
@@ -1670,14 +1670,14 @@ class $e extends g {
|
|
|
1670
1670
|
o ?? "vertical",
|
|
1671
1671
|
"Panel"
|
|
1672
1672
|
), m = this.Host, f = e == null ? null : /* @__PURE__ */ h(
|
|
1673
|
-
|
|
1673
|
+
D,
|
|
1674
1674
|
{
|
|
1675
1675
|
id: `${this.panelId}-header`,
|
|
1676
1676
|
headingId: this.headerId,
|
|
1677
1677
|
children: e
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ v(
|
|
1681
1681
|
m,
|
|
1682
1682
|
{
|
|
1683
1683
|
id: this.panelId,
|
|
@@ -1703,7 +1703,7 @@ class $e extends g {
|
|
|
1703
1703
|
);
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
a($e, "liveProps",
|
|
1706
|
+
a($e, "liveProps", oi), a($e, "hostName", "panel"), a($e, "dependencies", [D, ge, Gt]), a($e, "css", x`
|
|
1707
1707
|
& {
|
|
1708
1708
|
background: var(--panel-background);
|
|
1709
1709
|
border: var(--panel-border);
|
|
@@ -1734,14 +1734,14 @@ a($e, "liveProps", ri), a($e, "hostName", "panel"), a($e, "dependencies", [M, ge
|
|
|
1734
1734
|
opacity: .65;
|
|
1735
1735
|
}
|
|
1736
1736
|
`);
|
|
1737
|
-
class
|
|
1737
|
+
class Yt extends ie {
|
|
1738
1738
|
}
|
|
1739
|
-
class Oe extends
|
|
1739
|
+
class Oe extends y {
|
|
1740
1740
|
constructor(e = {}) {
|
|
1741
1741
|
super(e);
|
|
1742
1742
|
a(this, "sidebarId");
|
|
1743
1743
|
a(this, "headerId");
|
|
1744
|
-
this.sidebarId =
|
|
1744
|
+
this.sidebarId = R("sidebar", e.id), this.headerId = `${this.sidebarId}-title`;
|
|
1745
1745
|
}
|
|
1746
1746
|
render() {
|
|
1747
1747
|
if (this.props.toolbar != null)
|
|
@@ -1751,16 +1751,16 @@ class Oe extends g {
|
|
|
1751
1751
|
ariaLabel: i,
|
|
1752
1752
|
children: o = []
|
|
1753
1753
|
} = this.props, { content: n, regions: s } = Je("Sidebar", o, {
|
|
1754
|
-
toolbar:
|
|
1754
|
+
toolbar: Yt
|
|
1755
1755
|
}), l = this.Host, c = e == null ? null : /* @__PURE__ */ h(
|
|
1756
|
-
|
|
1756
|
+
D,
|
|
1757
1757
|
{
|
|
1758
1758
|
id: `${this.sidebarId}-header`,
|
|
1759
1759
|
headingId: this.headerId,
|
|
1760
1760
|
children: e
|
|
1761
1761
|
}
|
|
1762
1762
|
);
|
|
1763
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ v(
|
|
1764
1764
|
l,
|
|
1765
1765
|
{
|
|
1766
1766
|
id: this.sidebarId,
|
|
@@ -1777,7 +1777,7 @@ class Oe extends g {
|
|
|
1777
1777
|
);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
a(Oe, "liveProps", []), a(Oe, "hostName", "sidebar"), a(Oe, "dependencies", [
|
|
1780
|
+
a(Oe, "liveProps", []), a(Oe, "hostName", "sidebar"), a(Oe, "dependencies", [D, Yt]), a(Oe, "css", x`
|
|
1781
1781
|
& {
|
|
1782
1782
|
display: flex;
|
|
1783
1783
|
flex-direction: column;
|
|
@@ -1803,7 +1803,7 @@ a(Oe, "liveProps", []), a(Oe, "hostName", "sidebar"), a(Oe, "dependencies", [M,
|
|
|
1803
1803
|
overflow: auto;
|
|
1804
1804
|
}
|
|
1805
1805
|
`);
|
|
1806
|
-
class
|
|
1806
|
+
class kr extends ge {
|
|
1807
1807
|
render() {
|
|
1808
1808
|
if (this.props.allocation != null)
|
|
1809
1809
|
throw new TypeError("SplitView owns SplitPrimary and SplitSecondary allocation");
|
|
@@ -1824,13 +1824,13 @@ class vr extends ge {
|
|
|
1824
1824
|
};
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
|
-
class
|
|
1827
|
+
class Et extends kr {
|
|
1828
1828
|
}
|
|
1829
|
-
a(
|
|
1830
|
-
class St extends
|
|
1829
|
+
a(Et, "hostName", "primary");
|
|
1830
|
+
class St extends kr {
|
|
1831
1831
|
}
|
|
1832
1832
|
a(St, "hostName", "secondary");
|
|
1833
|
-
class Ne extends
|
|
1833
|
+
class Ne extends y {
|
|
1834
1834
|
constructor() {
|
|
1835
1835
|
super(...arguments);
|
|
1836
1836
|
a(this, "pointerResize", null);
|
|
@@ -1896,13 +1896,13 @@ class Ne extends g {
|
|
|
1896
1896
|
if (e != null && (this.props.horizontal && e !== "horizontal" || this.props.vertical && e !== "vertical"))
|
|
1897
1897
|
throw new TypeError("SplitView direction modifier conflicts with direction");
|
|
1898
1898
|
const m = Fe(this.props, e ?? "horizontal", "SplitView");
|
|
1899
|
-
|
|
1900
|
-
const { primary: f, secondary: b } =
|
|
1901
|
-
return /* @__PURE__ */
|
|
1902
|
-
|
|
1899
|
+
si(i, "primarySize"), Xt(s, "primaryMinSize"), Xt(l, "secondaryMinSize"), li(c, "resizeStep");
|
|
1900
|
+
const { primary: f, secondary: b } = ni(this.props.children), g = this.Host;
|
|
1901
|
+
return /* @__PURE__ */ v(
|
|
1902
|
+
g,
|
|
1903
1903
|
{
|
|
1904
1904
|
className: ve(
|
|
1905
|
-
|
|
1905
|
+
T(this.props),
|
|
1906
1906
|
gt(this.props.allocation),
|
|
1907
1907
|
m
|
|
1908
1908
|
) || null,
|
|
@@ -1913,7 +1913,7 @@ class Ne extends g {
|
|
|
1913
1913
|
},
|
|
1914
1914
|
"data-resizable": p ? "true" : "false",
|
|
1915
1915
|
children: [
|
|
1916
|
-
|
|
1916
|
+
Jt(f, o),
|
|
1917
1917
|
/* @__PURE__ */ h(
|
|
1918
1918
|
"cap-separator",
|
|
1919
1919
|
{
|
|
@@ -1934,7 +1934,7 @@ class Ne extends g {
|
|
|
1934
1934
|
} : {}
|
|
1935
1935
|
}
|
|
1936
1936
|
),
|
|
1937
|
-
|
|
1937
|
+
Jt(b, n)
|
|
1938
1938
|
]
|
|
1939
1939
|
}
|
|
1940
1940
|
);
|
|
@@ -1985,7 +1985,7 @@ class Ne extends g {
|
|
|
1985
1985
|
return ((e = this.hostElement()) == null ? void 0 : e.querySelector(":scope > cap-separator")) ?? null;
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
|
-
a(Ne, "liveProps", []), a(Ne, "hostName", "split-view"), a(Ne, "dependencies", [
|
|
1988
|
+
a(Ne, "liveProps", []), a(Ne, "hostName", "split-view"), a(Ne, "dependencies", [Et, St]), a(Ne, "css", x`
|
|
1989
1989
|
& {
|
|
1990
1990
|
display: flex;
|
|
1991
1991
|
flex: 1 1 auto;
|
|
@@ -2072,13 +2072,13 @@ a(Ne, "liveProps", []), a(Ne, "hostName", "split-view"), a(Ne, "dependencies", [
|
|
|
2072
2072
|
cursor: default;
|
|
2073
2073
|
}
|
|
2074
2074
|
`);
|
|
2075
|
-
function
|
|
2075
|
+
function ni(t) {
|
|
2076
2076
|
let r = null, e = null;
|
|
2077
|
-
const i =
|
|
2077
|
+
const i = ai(t);
|
|
2078
2078
|
for (const o of i) {
|
|
2079
2079
|
if (!ee(o))
|
|
2080
2080
|
throw new Error("SplitView accepts only direct SplitPrimary and SplitSecondary children");
|
|
2081
|
-
if (o.type ===
|
|
2081
|
+
if (o.type === Et) {
|
|
2082
2082
|
if (r != null) throw new Error("SplitView received duplicate SplitPrimary");
|
|
2083
2083
|
r = o;
|
|
2084
2084
|
} else if (o.type === St) {
|
|
@@ -2091,7 +2091,7 @@ function ii(t) {
|
|
|
2091
2091
|
if (e == null) throw new Error("SplitView requires SplitSecondary");
|
|
2092
2092
|
return { primary: r, secondary: e };
|
|
2093
2093
|
}
|
|
2094
|
-
function
|
|
2094
|
+
function ai(t) {
|
|
2095
2095
|
const r = [], e = (i) => {
|
|
2096
2096
|
if (Array.isArray(i))
|
|
2097
2097
|
for (const o of i) e(o);
|
|
@@ -2099,7 +2099,7 @@ function oi(t) {
|
|
|
2099
2099
|
};
|
|
2100
2100
|
return e(t ?? []), r;
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2102
|
+
function Jt(t, r) {
|
|
2103
2103
|
if (r == null || t.props.label != null) return t;
|
|
2104
2104
|
const { children: e, ...i } = t.props;
|
|
2105
2105
|
return F(t.type, {
|
|
@@ -2108,19 +2108,19 @@ function Gt(t, r) {
|
|
|
2108
2108
|
label: r
|
|
2109
2109
|
}, e);
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function si(t, r) {
|
|
2112
2112
|
if (t != null && (typeof t != "string" || t.length === 0))
|
|
2113
2113
|
throw new TypeError(`SplitView ${r} must be a non-empty CSS size`);
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function Xt(t, r) {
|
|
2116
2116
|
if (typeof t != "number" || !Number.isFinite(t) || t < 0)
|
|
2117
2117
|
throw new TypeError(`SplitView ${r} must be a finite non-negative number`);
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function li(t, r) {
|
|
2120
2120
|
if (typeof t != "number" || !Number.isFinite(t) || t <= 0)
|
|
2121
2121
|
throw new TypeError(`SplitView ${r} must be a finite positive number`);
|
|
2122
2122
|
}
|
|
2123
|
-
class
|
|
2123
|
+
class Er extends y {
|
|
2124
2124
|
render() {
|
|
2125
2125
|
const { term: r, value: e, children: i = [] } = this.props;
|
|
2126
2126
|
return [
|
|
@@ -2129,14 +2129,14 @@ class xr extends g {
|
|
|
2129
2129
|
];
|
|
2130
2130
|
}
|
|
2131
2131
|
}
|
|
2132
|
-
a(
|
|
2133
|
-
class Le extends
|
|
2132
|
+
a(Er, "liveProps", []);
|
|
2133
|
+
class Le extends y {
|
|
2134
2134
|
render() {
|
|
2135
2135
|
const r = this.Host;
|
|
2136
|
-
return /* @__PURE__ */ h(r, { className:
|
|
2136
|
+
return /* @__PURE__ */ h(r, { className: T(this.props) || null, children: /* @__PURE__ */ h("dl", { "aria-label": this.props.label, children: this.props.children ?? [] }) });
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
|
-
a(Le, "liveProps", []), a(Le, "hostName", "descriptionlist"), a(Le, "dependencies", [
|
|
2139
|
+
a(Le, "liveProps", []), a(Le, "hostName", "descriptionlist"), a(Le, "dependencies", [Er]), a(Le, "css", x`
|
|
2140
2140
|
& {
|
|
2141
2141
|
display: block;
|
|
2142
2142
|
user-select: none;
|
|
@@ -2147,7 +2147,7 @@ a(Le, "liveProps", []), a(Le, "hostName", "descriptionlist"), a(Le, "dependencie
|
|
|
2147
2147
|
margin: 0;
|
|
2148
2148
|
}
|
|
2149
2149
|
`);
|
|
2150
|
-
class
|
|
2150
|
+
class Sr extends y {
|
|
2151
2151
|
render() {
|
|
2152
2152
|
const { label: r, value: e, children: i = [] } = this.props;
|
|
2153
2153
|
return [
|
|
@@ -2156,29 +2156,29 @@ class Er extends g {
|
|
|
2156
2156
|
];
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
2159
|
-
a(
|
|
2160
|
-
class Pe extends
|
|
2159
|
+
a(Sr, "liveProps", []);
|
|
2160
|
+
class Pe extends y {
|
|
2161
2161
|
constructor(e = {}) {
|
|
2162
2162
|
super(e);
|
|
2163
2163
|
a(this, "panelId");
|
|
2164
2164
|
a(this, "headerId");
|
|
2165
|
-
this.panelId =
|
|
2165
|
+
this.panelId = R("info-panel", e.id), this.headerId = `${this.panelId}-title`;
|
|
2166
2166
|
}
|
|
2167
2167
|
render() {
|
|
2168
2168
|
const { title: e = null, label: i, children: o = [] } = this.props, n = this.Host, s = e == null ? null : /* @__PURE__ */ h(
|
|
2169
|
-
|
|
2169
|
+
D,
|
|
2170
2170
|
{
|
|
2171
2171
|
id: `${this.panelId}-header`,
|
|
2172
2172
|
headingId: this.headerId,
|
|
2173
2173
|
children: e
|
|
2174
2174
|
}
|
|
2175
2175
|
);
|
|
2176
|
-
return /* @__PURE__ */
|
|
2176
|
+
return /* @__PURE__ */ v(
|
|
2177
2177
|
n,
|
|
2178
2178
|
{
|
|
2179
2179
|
id: this.panelId,
|
|
2180
2180
|
role: e == null ? null : "region",
|
|
2181
|
-
className:
|
|
2181
|
+
className: T(this.props) || null,
|
|
2182
2182
|
"aria-labelledby": e == null ? null : this.headerId,
|
|
2183
2183
|
children: [
|
|
2184
2184
|
s,
|
|
@@ -2188,7 +2188,7 @@ class Pe extends g {
|
|
|
2188
2188
|
);
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
a(Pe, "liveProps", []), a(Pe, "hostName", "infopanel"), a(Pe, "dependencies", [
|
|
2191
|
+
a(Pe, "liveProps", []), a(Pe, "hostName", "infopanel"), a(Pe, "dependencies", [D, Sr]), a(Pe, "css", x`
|
|
2192
2192
|
& {
|
|
2193
2193
|
background: var(--panel-background);
|
|
2194
2194
|
border: var(--panel-border);
|
|
@@ -2218,13 +2218,13 @@ a(Pe, "liveProps", []), a(Pe, "hostName", "infopanel"), a(Pe, "dependencies", [M
|
|
|
2218
2218
|
margin: 0;
|
|
2219
2219
|
}
|
|
2220
2220
|
`);
|
|
2221
|
-
class
|
|
2221
|
+
class A extends y {
|
|
2222
2222
|
render() {
|
|
2223
|
-
const r =
|
|
2223
|
+
const r = ci(this.props.width ?? 65), e = this.Host;
|
|
2224
2224
|
return /* @__PURE__ */ h(e, { style: { width: `${r}%` }, "aria-hidden": "true" });
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
a(
|
|
2227
|
+
a(A, "liveProps", []), a(A, "dependencies", [be]), a(A, "hostName", "placeholder"), a(A, "css", x`
|
|
2228
2228
|
& {
|
|
2229
2229
|
display: block;
|
|
2230
2230
|
width: 5em;
|
|
@@ -2268,48 +2268,48 @@ a(q, "liveProps", []), a(q, "dependencies", [be]), a(q, "hostName", "placeholder
|
|
|
2268
2268
|
}
|
|
2269
2269
|
}
|
|
2270
2270
|
`);
|
|
2271
|
-
function
|
|
2271
|
+
function ci(t) {
|
|
2272
2272
|
const r = Number(t);
|
|
2273
2273
|
if (!Number.isFinite(r)) throw new TypeError("Placeholder width must be numeric");
|
|
2274
2274
|
return Math.min(100, Math.max(10, r));
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2276
|
+
function Ir(t, r, e) {
|
|
2277
2277
|
It(e);
|
|
2278
2278
|
for (const i of e) {
|
|
2279
2279
|
const o = r[i.key];
|
|
2280
2280
|
if (o == null) continue;
|
|
2281
2281
|
const n = i.options.flatMap((c) => {
|
|
2282
2282
|
const u = o[c.key];
|
|
2283
|
-
return u == null || u ===
|
|
2283
|
+
return u == null || u === k.Neutral ? [] : [{ option: c, mode: u }];
|
|
2284
2284
|
});
|
|
2285
|
-
if (n.some(({ option: c, mode: u }) => u ===
|
|
2285
|
+
if (n.some(({ option: c, mode: u }) => u === k.Deny && c.matches(t)) || n.filter(({ mode: c }) => c === k.Require).some(({ option: c }) => !c.matches(t)))
|
|
2286
2286
|
return !1;
|
|
2287
|
-
const l = n.filter(({ mode: c }) => c ===
|
|
2287
|
+
const l = n.filter(({ mode: c }) => c === k.Prefer);
|
|
2288
2288
|
if (l.length > 0 && !l.some(({ option: c }) => c.matches(t)))
|
|
2289
2289
|
return !1;
|
|
2290
2290
|
}
|
|
2291
2291
|
return !0;
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function di(t, r, e) {
|
|
2294
2294
|
if (!Array.isArray(t)) throw new TypeError("Filtered items must be an array");
|
|
2295
|
-
return t.filter((i) =>
|
|
2295
|
+
return t.filter((i) => Ir(i, r, e));
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function tn(t, r, e = null) {
|
|
2298
2298
|
return It(r), new We(
|
|
2299
2299
|
[t],
|
|
2300
|
-
([i]) => (o) =>
|
|
2300
|
+
([i]) => (o) => Ir(o, i, r),
|
|
2301
2301
|
{ owner: e, purpose: "filter predicate" }
|
|
2302
2302
|
);
|
|
2303
2303
|
}
|
|
2304
|
-
function
|
|
2304
|
+
function rn(t, r, e, i = null) {
|
|
2305
2305
|
return It(e), new We(
|
|
2306
2306
|
[t, r],
|
|
2307
|
-
([o, n]) =>
|
|
2307
|
+
([o, n]) => di(o, n, e),
|
|
2308
2308
|
{ owner: i, purpose: "filtered items" }
|
|
2309
2309
|
);
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2312
|
-
|
|
2311
|
+
function on(t) {
|
|
2312
|
+
ui(t);
|
|
2313
2313
|
const r = {};
|
|
2314
2314
|
for (const e of Object.keys(t).sort()) {
|
|
2315
2315
|
const i = {}, o = t[e];
|
|
@@ -2319,7 +2319,7 @@ function tn(t) {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
return { version: 1, dimensions: r };
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function nn(t) {
|
|
2323
2323
|
if (!he(t) || t.version !== 1 || !he(t.dimensions))
|
|
2324
2324
|
throw new TypeError("Filter state must use version 1 with a dimensions object");
|
|
2325
2325
|
const r = {};
|
|
@@ -2338,7 +2338,7 @@ function rn(t) {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
return r;
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function ui(t) {
|
|
2342
2342
|
if (!he(t)) throw new TypeError("Filter state must be an object");
|
|
2343
2343
|
for (const [r, e] of Object.entries(t)) {
|
|
2344
2344
|
if (te(r, "Filter dimension"), !he(e))
|
|
@@ -2374,7 +2374,7 @@ function te(t, r) {
|
|
|
2374
2374
|
function he(t) {
|
|
2375
2375
|
return t != null && typeof t == "object" && !Array.isArray(t);
|
|
2376
2376
|
}
|
|
2377
|
-
class
|
|
2377
|
+
class Tr {
|
|
2378
2378
|
constructor({
|
|
2379
2379
|
getItems: r,
|
|
2380
2380
|
getKey: e = zt,
|
|
@@ -2406,7 +2406,7 @@ class Sr {
|
|
|
2406
2406
|
this.getItems = r, this.getKey = e, this.ownedSelectedItemsEmitter = i == null ? new $([], { owner: o, purpose: "selected items" }) : null, this.selectedItemsEmitter = i ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.ownsSelectedItemsEmitter = this.ownedSelectedItemsEmitter != null;
|
|
2407
2407
|
}
|
|
2408
2408
|
rowsUpdated(r) {
|
|
2409
|
-
this.destroyed || (this.releaseRows(), this.rows = Array.from(r ?? []), this.rows.forEach((e, i) => this.wireRow(e, i)), this.activeIndex =
|
|
2409
|
+
this.destroyed || (this.releaseRows(), this.rows = Array.from(r ?? []), this.rows.forEach((e, i) => this.wireRow(e, i)), this.activeIndex = mi(this.activeIndex, this.rows.length), this.reconcileSelectedItems(), this.syncRows());
|
|
2410
2410
|
}
|
|
2411
2411
|
wireRow(r, e) {
|
|
2412
2412
|
const i = (l) => this.handleClick(e, l), o = (l) => this.handleKeyDown(e, l), n = (l) => this.handleMouseDown(e, l, r), s = (l) => this.handleMouseEnter(e, l);
|
|
@@ -2494,7 +2494,7 @@ class Sr {
|
|
|
2494
2494
|
this.destroyed || (this.destroyed = !0, this.finishDrag(!1), this.clearClickSuppression(), this.releaseRows(), (r = this.ownedSelectedItemsEmitter) == null || r.dispose());
|
|
2495
2495
|
}
|
|
2496
2496
|
}
|
|
2497
|
-
class Tt extends
|
|
2497
|
+
class Tt extends Tr {
|
|
2498
2498
|
constructor(e) {
|
|
2499
2499
|
const i = e.selectedItemEmitter == null ? new $(null, {
|
|
2500
2500
|
owner: e.owner,
|
|
@@ -2504,7 +2504,7 @@ class Tt extends Sr {
|
|
|
2504
2504
|
getItems: e.getItems,
|
|
2505
2505
|
...e.getKey == null ? {} : { getKey: e.getKey },
|
|
2506
2506
|
...e.owner === void 0 ? {} : { owner: e.owner },
|
|
2507
|
-
selectedItemsEmitter: new
|
|
2507
|
+
selectedItemsEmitter: new pi(o)
|
|
2508
2508
|
});
|
|
2509
2509
|
a(this, "selectedItemEmitter");
|
|
2510
2510
|
a(this, "selectedItem$");
|
|
@@ -2523,12 +2523,12 @@ class Tt extends Sr {
|
|
|
2523
2523
|
super.destroy(), (e = this.ownedSelectedItemEmitter) == null || e.dispose();
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
2526
|
-
class
|
|
2526
|
+
class hi extends Tr {
|
|
2527
2527
|
selectIndex(r, e) {
|
|
2528
2528
|
const i = this.getItems(), o = i[r];
|
|
2529
2529
|
if (o !== void 0) {
|
|
2530
2530
|
if (e.shiftKey && this.anchorIndex != null) {
|
|
2531
|
-
const n = Math.min(this.anchorIndex, r), s = Math.max(this.anchorIndex, r), l = i[this.anchorIndex], c = l !== void 0 && this.anchorSelected == null ?
|
|
2531
|
+
const n = Math.min(this.anchorIndex, r), s = Math.max(this.anchorIndex, r), l = i[this.anchorIndex], c = l !== void 0 && this.anchorSelected == null ? bi(this.getSelectedItems(), l, this.anchorIndex, this.getKey) : this.anchorSelected === !0, u = gi(
|
|
2532
2532
|
i,
|
|
2533
2533
|
this.getSelectedItems(),
|
|
2534
2534
|
n,
|
|
@@ -2539,7 +2539,7 @@ class di extends Sr {
|
|
|
2539
2539
|
this.setSelectedItems(u, "range selection changed");
|
|
2540
2540
|
return;
|
|
2541
2541
|
}
|
|
2542
|
-
if (
|
|
2542
|
+
if (Zt(e) || "key" in e && e.key === " ") {
|
|
2543
2543
|
const n = this.getSelectedItems(), s = this.getKey(o, r), l = n.some((u, p) => Object.is(this.getKey(u, p), s)), c = l ? n.filter((u, p) => !Object.is(this.getKey(u, p), s)) : [...n, o];
|
|
2544
2544
|
this.anchorIndex = r, this.anchorSelected = !l, this.setSelectedItems(c, "multi selection toggled");
|
|
2545
2545
|
return;
|
|
@@ -2554,14 +2554,14 @@ class di extends Sr {
|
|
|
2554
2554
|
return !0;
|
|
2555
2555
|
}
|
|
2556
2556
|
selectDragRange(r, e, i) {
|
|
2557
|
-
const o = this.getItems(), n = Math.min(r, e), s = Math.max(r, e), l = o.slice(n, s + 1), c =
|
|
2557
|
+
const o = this.getItems(), n = Math.min(r, e), s = Math.max(r, e), l = o.slice(n, s + 1), c = Zt(i) ? fi(this.getSelectedItems(), l, this.getKey) : [...l];
|
|
2558
2558
|
this.anchorIndex = r, this.anchorSelected = !0, this.setSelectedItems(c, "drag selection changed");
|
|
2559
2559
|
}
|
|
2560
2560
|
}
|
|
2561
2561
|
function Be(t) {
|
|
2562
|
-
return t.multiSelect ? new
|
|
2562
|
+
return t.multiSelect ? new hi(t) : new Tt(t);
|
|
2563
2563
|
}
|
|
2564
|
-
class
|
|
2564
|
+
class pi {
|
|
2565
2565
|
constructor(r) {
|
|
2566
2566
|
this.source = r;
|
|
2567
2567
|
}
|
|
@@ -2595,13 +2595,13 @@ function zt(t, r) {
|
|
|
2595
2595
|
`Selection item at index ${r} needs an id or an explicit itemKey/rowKey`
|
|
2596
2596
|
);
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Zt(t) {
|
|
2599
2599
|
return !!(t.ctrlKey || t.metaKey);
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2601
|
+
function mi(t, r) {
|
|
2602
2602
|
return r <= 0 ? 0 : Math.min(Math.max(t, 0), r - 1);
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2604
|
+
function fi(t, r, e) {
|
|
2605
2605
|
const i = [...t], o = new Set(t.map((n, s) => e(n, s)));
|
|
2606
2606
|
for (const n of r) {
|
|
2607
2607
|
const s = e(n, i.length);
|
|
@@ -2609,17 +2609,17 @@ function pi(t, r, e) {
|
|
|
2609
2609
|
}
|
|
2610
2610
|
return i;
|
|
2611
2611
|
}
|
|
2612
|
-
function
|
|
2612
|
+
function bi(t, r, e, i) {
|
|
2613
2613
|
const o = i(r, e);
|
|
2614
2614
|
return t.some((n, s) => Object.is(i(n, s), o));
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function gi(t, r, e, i, o, n) {
|
|
2617
2617
|
const s = new Set(t.slice(e, i + 1).map((c, u) => n(c, e + u))), l = new Set(r.map((c, u) => n(c, u)));
|
|
2618
2618
|
for (const c of s)
|
|
2619
2619
|
o ? l.add(c) : l.delete(c);
|
|
2620
2620
|
return t.filter((c, u) => l.has(n(c, u)));
|
|
2621
2621
|
}
|
|
2622
|
-
class ae extends
|
|
2622
|
+
class ae extends y {
|
|
2623
2623
|
constructor(e = {}) {
|
|
2624
2624
|
super(e);
|
|
2625
2625
|
a(this, "itemsEmitter");
|
|
@@ -2631,25 +2631,25 @@ class ae extends g {
|
|
|
2631
2631
|
a(this, "getItemKey");
|
|
2632
2632
|
a(this, "selectionHandler");
|
|
2633
2633
|
a(this, "ownedItemsEmitter");
|
|
2634
|
-
|
|
2634
|
+
er(e.items) ? (this.itemsEmitter = e.items, this.ownedItemsEmitter = null) : (this.ownedItemsEmitter = new $(e.items ?? [], {
|
|
2635
2635
|
owner: this,
|
|
2636
2636
|
purpose: "list items"
|
|
2637
|
-
}), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.getItemKey =
|
|
2637
|
+
}), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.getItemKey = yi(e.itemKey), this.selectionHandler = e.multiSelect === !0 ? Be({
|
|
2638
2638
|
owner: this,
|
|
2639
2639
|
multiSelect: !0,
|
|
2640
2640
|
...e.selectedItemsEmitter == null ? {} : { selectedItemsEmitter: e.selectedItemsEmitter },
|
|
2641
|
-
getItems: () => this.itemsEmitter.get(),
|
|
2641
|
+
getItems: () => this.itemsEmitter.get() ?? [],
|
|
2642
2642
|
getKey: this.getItemKey
|
|
2643
2643
|
}) : Be({
|
|
2644
2644
|
owner: this,
|
|
2645
2645
|
...e.selectedItemEmitter == null ? {} : { selectedItemEmitter: e.selectedItemEmitter },
|
|
2646
|
-
getItems: () => this.itemsEmitter.get(),
|
|
2646
|
+
getItems: () => this.itemsEmitter.get() ?? [],
|
|
2647
2647
|
getKey: this.getItemKey
|
|
2648
2648
|
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof Tt ? this.selectionHandler.selectedItemEmitter : null, this.selectedItem$ = this.selectedItemEmitter;
|
|
2649
2649
|
}
|
|
2650
2650
|
setProps(e) {
|
|
2651
2651
|
if (this.ownedItemsEmitter != null) {
|
|
2652
|
-
if (
|
|
2652
|
+
if (er(e.items))
|
|
2653
2653
|
throw new TypeError(
|
|
2654
2654
|
"ListView cannot replace static or declarative items with an emitter"
|
|
2655
2655
|
);
|
|
@@ -2662,46 +2662,47 @@ class ae extends g {
|
|
|
2662
2662
|
}
|
|
2663
2663
|
render() {
|
|
2664
2664
|
const e = this.itemsEmitter.get();
|
|
2665
|
-
if (!Array.isArray(e))
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2665
|
+
if (e !== void 0 && !Array.isArray(e))
|
|
2666
|
+
throw new TypeError("ListView items must be an array");
|
|
2667
|
+
const i = e ?? [], o = this.itemsEmitter.getFetchState(), n = this.itemsEmitter.getError(), s = o === I.Initial || o === I.Loading, l = o === I.Initial || o === I.Loading && e === void 0, c = new Set(this.selectedItemsEmitter.get().map((p, m) => this.getItemKey(p, m))), u = this.Host;
|
|
2668
|
+
return /* @__PURE__ */ v(
|
|
2669
|
+
u,
|
|
2669
2670
|
{
|
|
2670
|
-
className:
|
|
2671
|
-
"aria-busy":
|
|
2671
|
+
className: T(this.props) || null,
|
|
2672
|
+
"aria-busy": s ? "true" : null,
|
|
2672
2673
|
children: [
|
|
2673
|
-
|
|
2674
|
-
|
|
2674
|
+
o === I.Error ? /* @__PURE__ */ h(
|
|
2675
|
+
E,
|
|
2675
2676
|
{
|
|
2676
2677
|
className: "cap-error-banner",
|
|
2677
|
-
error:
|
|
2678
|
+
error: n,
|
|
2678
2679
|
fallback: this.capillaryUiMessage("listViewLoadError")
|
|
2679
2680
|
}
|
|
2680
2681
|
) : null,
|
|
2681
|
-
|
|
2682
|
+
l ? /* @__PURE__ */ v(we, { children: [
|
|
2682
2683
|
/* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("listViewLoading") }),
|
|
2683
|
-
/* @__PURE__ */ h("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (
|
|
2684
|
+
/* @__PURE__ */ h("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (p, m) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(A, { width: 45 + m * 7 }) }, `placeholder-${m}`)) })
|
|
2684
2685
|
] }) : null,
|
|
2685
|
-
|
|
2686
|
-
!
|
|
2686
|
+
o === I.Ready && i.length === 0 ? /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("listViewEmpty") }) : null,
|
|
2687
|
+
!l && i.length > 0 ? /* @__PURE__ */ h(
|
|
2687
2688
|
"ul",
|
|
2688
2689
|
{
|
|
2689
2690
|
role: "listbox",
|
|
2690
2691
|
"aria-label": this.props.label ?? this.capillaryUiMessage("listViewLabel"),
|
|
2691
|
-
"aria-busy":
|
|
2692
|
+
"aria-busy": s ? "true" : null,
|
|
2692
2693
|
"aria-multiselectable": this.props.multiSelect ? "true" : null,
|
|
2693
|
-
children:
|
|
2694
|
-
const
|
|
2694
|
+
children: i.map((p, m) => {
|
|
2695
|
+
const f = this.getItemKey(p, m), b = c.has(f), g = this.props.renderItem ? this.props.renderItem(p, m) : wi(p);
|
|
2695
2696
|
return /* @__PURE__ */ h(
|
|
2696
2697
|
"li",
|
|
2697
2698
|
{
|
|
2698
2699
|
role: "option",
|
|
2699
2700
|
"data-cap-selectable-row": "",
|
|
2700
|
-
"aria-selected": String(
|
|
2701
|
-
tabIndex:
|
|
2702
|
-
children:
|
|
2701
|
+
"aria-selected": String(b),
|
|
2702
|
+
tabIndex: m === 0 ? 0 : -1,
|
|
2703
|
+
children: g
|
|
2703
2704
|
},
|
|
2704
|
-
String(
|
|
2705
|
+
String(f)
|
|
2705
2706
|
);
|
|
2706
2707
|
})
|
|
2707
2708
|
}
|
|
@@ -2732,13 +2733,16 @@ class ae extends g {
|
|
|
2732
2733
|
this.selectionHandler.destroy(), (e = this.ownedItemsEmitter) == null || e.dispose();
|
|
2733
2734
|
}
|
|
2734
2735
|
}
|
|
2735
|
-
a(ae, "liveProps", []), a(ae, "dependencies", [
|
|
2736
|
+
a(ae, "liveProps", []), a(ae, "dependencies", [A, E]), a(ae, "hostName", "listview"), a(ae, "dataSurface", "data"), a(ae, "css", x`
|
|
2736
2737
|
& {
|
|
2737
2738
|
display: flex;
|
|
2738
2739
|
position: relative;
|
|
2740
|
+
flex: 1 1 auto;
|
|
2739
2741
|
flex-direction: column;
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
+
min-inline-size: 0;
|
|
2743
|
+
min-block-size: 0;
|
|
2744
|
+
max-block-size: 100%;
|
|
2745
|
+
overflow: auto;
|
|
2742
2746
|
padding: var(--ui-padding-v) var(--ui-padding-h);
|
|
2743
2747
|
color: var(--ui-text-color);
|
|
2744
2748
|
background: var(--ui-input-bg);
|
|
@@ -2803,7 +2807,7 @@ a(ae, "liveProps", []), a(ae, "dependencies", [q, k]), a(ae, "hostName", "listvi
|
|
|
2803
2807
|
}
|
|
2804
2808
|
}
|
|
2805
2809
|
`);
|
|
2806
|
-
function
|
|
2810
|
+
function yi(t) {
|
|
2807
2811
|
if (t == null) return zt;
|
|
2808
2812
|
if (typeof t == "function") return t;
|
|
2809
2813
|
if (typeof t == "string" && t.length > 0)
|
|
@@ -2817,22 +2821,22 @@ function bi(t) {
|
|
|
2817
2821
|
};
|
|
2818
2822
|
throw new TypeError("ListView itemKey must be a function or property name");
|
|
2819
2823
|
}
|
|
2820
|
-
function
|
|
2824
|
+
function er(t) {
|
|
2821
2825
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
2822
2826
|
}
|
|
2823
|
-
function
|
|
2827
|
+
function wi(t) {
|
|
2824
2828
|
if (t != null && (typeof t == "object" || typeof t == "function")) {
|
|
2825
2829
|
const r = Reflect.get(t, "label");
|
|
2826
|
-
if (
|
|
2830
|
+
if (vi(r)) return r;
|
|
2827
2831
|
}
|
|
2828
2832
|
return String(t);
|
|
2829
2833
|
}
|
|
2830
|
-
function
|
|
2834
|
+
function vi(t) {
|
|
2831
2835
|
return t == null || typeof t == "string" || typeof t == "number";
|
|
2832
2836
|
}
|
|
2833
|
-
class Ct extends
|
|
2837
|
+
class Ct extends y {
|
|
2834
2838
|
}
|
|
2835
|
-
a(Ct, "css",
|
|
2839
|
+
a(Ct, "css", x`
|
|
2836
2840
|
& {
|
|
2837
2841
|
display: inline-flex;
|
|
2838
2842
|
position: relative;
|
|
@@ -2944,8 +2948,8 @@ a(Ct, "css", w`
|
|
|
2944
2948
|
}
|
|
2945
2949
|
}
|
|
2946
2950
|
`);
|
|
2947
|
-
const
|
|
2948
|
-
class
|
|
2951
|
+
const xi = ["disabled", "required", "busy", "error"];
|
|
2952
|
+
class P extends Ct {
|
|
2949
2953
|
constructor(e = {}) {
|
|
2950
2954
|
super(e);
|
|
2951
2955
|
a(this, "symbols");
|
|
@@ -2953,11 +2957,11 @@ class D extends Ct {
|
|
|
2953
2957
|
a(this, "semanticStateEmitter");
|
|
2954
2958
|
a(this, "inputId");
|
|
2955
2959
|
a(this, "errorId");
|
|
2956
|
-
this.inputId =
|
|
2960
|
+
this.inputId = R("checkbox", e.id), this.errorId = `${this.inputId}-error`;
|
|
2957
2961
|
const i = this.constructor;
|
|
2958
|
-
this.symbols = e.symbols ?? i.symbols,
|
|
2962
|
+
this.symbols = e.symbols ?? i.symbols, Ei(this.symbols);
|
|
2959
2963
|
const o = e.initialSemanticState ?? i.defaultSemanticState ?? this.symbols[0][1], n = { ...e };
|
|
2960
|
-
n.defaultValue == null && e.initialSemanticState != null && (n.defaultValue = e.initialSemanticState), this.valueEmitter =
|
|
2964
|
+
n.defaultValue == null && e.initialSemanticState != null && (n.defaultValue = e.initialSemanticState), this.valueEmitter = j(
|
|
2961
2965
|
this,
|
|
2962
2966
|
n,
|
|
2963
2967
|
o,
|
|
@@ -2980,55 +2984,55 @@ class D extends Ct {
|
|
|
2980
2984
|
required: n = !1,
|
|
2981
2985
|
busy: s = !1,
|
|
2982
2986
|
error: l = null
|
|
2983
|
-
} = this.props, c = this.valueEmitter.get(), u = this.symbols.findIndex(([,
|
|
2984
|
-
return /* @__PURE__ */
|
|
2985
|
-
|
|
2987
|
+
} = this.props, c = this.valueEmitter.get(), u = this.symbols.findIndex(([, S]) => Object.is(S, c)), [p] = this.symbols[u] ?? ["?", c], m = p === "☐" ? null : p, f = Fr(c), b = this.localizedStateName(c, f), g = i ?? ki(e), w = tr(this.symbols, c), z = this.Host;
|
|
2988
|
+
return /* @__PURE__ */ v(
|
|
2989
|
+
z,
|
|
2986
2990
|
{
|
|
2987
|
-
className:
|
|
2991
|
+
className: T(this.props) || null,
|
|
2988
2992
|
"data-state": f,
|
|
2989
2993
|
children: [
|
|
2990
|
-
/* @__PURE__ */
|
|
2994
|
+
/* @__PURE__ */ v("label", { children: [
|
|
2991
2995
|
/* @__PURE__ */ h(
|
|
2992
2996
|
"input",
|
|
2993
2997
|
{
|
|
2994
2998
|
id: this.inputId,
|
|
2995
2999
|
type: "checkbox",
|
|
2996
|
-
checked:
|
|
3000
|
+
checked: w,
|
|
2997
3001
|
disabled: o,
|
|
2998
3002
|
required: n,
|
|
2999
3003
|
name: this.props.name,
|
|
3000
3004
|
value: String(c),
|
|
3001
3005
|
"aria-busy": s ? "true" : null,
|
|
3002
|
-
"aria-label":
|
|
3006
|
+
"aria-label": g == null ? null : this.capillaryUiMessage("checkboxStateLabel")(g, b),
|
|
3003
3007
|
"aria-invalid": l == null ? null : "true",
|
|
3004
3008
|
"aria-describedby": l == null ? null : this.errorId,
|
|
3005
|
-
onChange: (
|
|
3006
|
-
this.cycleState(1,
|
|
3009
|
+
onChange: (S) => {
|
|
3010
|
+
this.cycleState(1, S), S.currentTarget.checked = tr(
|
|
3007
3011
|
this.symbols,
|
|
3008
3012
|
this.valueEmitter.get()
|
|
3009
3013
|
);
|
|
3010
3014
|
},
|
|
3011
|
-
onKeyDown: (
|
|
3012
|
-
|
|
3015
|
+
onKeyDown: (S) => {
|
|
3016
|
+
S.key === "ArrowRight" || S.key === "ArrowDown" ? (S.preventDefault(), this.cycleState(1, S)) : (S.key === "ArrowLeft" || S.key === "ArrowUp") && (S.preventDefault(), this.cycleState(-1, S));
|
|
3013
3017
|
}
|
|
3014
3018
|
}
|
|
3015
3019
|
),
|
|
3016
3020
|
/* @__PURE__ */ h("cap-checkshell", { "aria-hidden": "true", children: m }),
|
|
3017
3021
|
e
|
|
3018
3022
|
] }),
|
|
3019
|
-
l == null ? null : /* @__PURE__ */ h(
|
|
3023
|
+
l == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: l })
|
|
3020
3024
|
]
|
|
3021
3025
|
}
|
|
3022
3026
|
);
|
|
3023
3027
|
}
|
|
3024
3028
|
localizedStateName(e, i) {
|
|
3025
|
-
return e ===
|
|
3029
|
+
return e === k.Deny ? this.capillaryUiMessage("filterModeDenyLabel") : e === k.Neutral ? this.capillaryUiMessage("filterModeNeutralLabel") : e === k.Prefer ? this.capillaryUiMessage("filterModePreferLabel") : e === k.Require ? this.capillaryUiMessage("filterModeRequireLabel") : i;
|
|
3026
3030
|
}
|
|
3027
3031
|
}
|
|
3028
|
-
a(
|
|
3029
|
-
["☐",
|
|
3030
|
-
["✓",
|
|
3031
|
-
]), a(
|
|
3032
|
+
a(P, "liveProps", xi), a(P, "dependencies", [E]), a(P, "symbols", [
|
|
3033
|
+
["☐", k.Neutral],
|
|
3034
|
+
["✓", k.Prefer]
|
|
3035
|
+
]), a(P, "defaultSemanticState", k.Neutral), a(P, "hostName", "check-box"), a(P, "css", x`
|
|
3032
3036
|
& > label > input[value="require"] + cap-checkshell {
|
|
3033
3037
|
color: var(--palette-contrast-light);
|
|
3034
3038
|
background: var(--palette-green);
|
|
@@ -3041,49 +3045,49 @@ a(D, "liveProps", wi), a(D, "dependencies", [k]), a(D, "symbols", [
|
|
|
3041
3045
|
box-shadow: var(--checkbox-box-shadow-checked);
|
|
3042
3046
|
}
|
|
3043
3047
|
`);
|
|
3044
|
-
function
|
|
3048
|
+
function ki(t) {
|
|
3045
3049
|
return typeof t == "string" || typeof t == "number" ? String(t) : null;
|
|
3046
3050
|
}
|
|
3047
|
-
function
|
|
3051
|
+
function Ei(t) {
|
|
3048
3052
|
if (!Array.isArray(t) || t.length === 0)
|
|
3049
3053
|
throw new TypeError("Checkbox symbols must be a non-empty tuple array");
|
|
3050
3054
|
for (const r of t)
|
|
3051
3055
|
if (!Array.isArray(r) || r.length < 2)
|
|
3052
3056
|
throw new TypeError("Checkbox symbols must be [symbol, state] tuples");
|
|
3053
3057
|
}
|
|
3054
|
-
function
|
|
3058
|
+
function tr(t, r) {
|
|
3055
3059
|
const e = t.findIndex(([, i]) => Object.is(i, r));
|
|
3056
|
-
return r ===
|
|
3060
|
+
return r === k.Prefer || r === k.Require || t.length === 2 && e === 1;
|
|
3057
3061
|
}
|
|
3058
|
-
class B extends
|
|
3062
|
+
class B extends y {
|
|
3059
3063
|
constructor(e = {}) {
|
|
3060
3064
|
super(e);
|
|
3061
3065
|
a(this, "optionsEmitter");
|
|
3062
3066
|
a(this, "optionStateEmitters", /* @__PURE__ */ new Map());
|
|
3063
3067
|
a(this, "staleOptionValues", /* @__PURE__ */ new Set());
|
|
3064
|
-
this.optionsEmitter =
|
|
3068
|
+
this.optionsEmitter = Ci(e.options) ? e.options : null;
|
|
3065
3069
|
}
|
|
3066
3070
|
initialize() {
|
|
3067
3071
|
this.optionsEmitter && this.watch(this.optionsEmitter);
|
|
3068
3072
|
}
|
|
3069
3073
|
render() {
|
|
3070
|
-
var f, b,
|
|
3074
|
+
var f, b, g;
|
|
3071
3075
|
const e = ((f = this.optionsEmitter) == null ? void 0 : f.get()) ?? (Array.isArray(this.props.options) ? this.props.options : []);
|
|
3072
3076
|
if (!Array.isArray(e))
|
|
3073
3077
|
throw new TypeError("FilterPanel options must be an array or emitter of arrays");
|
|
3074
|
-
const i = ((b = this.optionsEmitter) == null ? void 0 : b.getFetchState()) ?? I.Ready, o = (
|
|
3078
|
+
const i = ((b = this.optionsEmitter) == null ? void 0 : b.getFetchState()) ?? I.Ready, o = (g = this.optionsEmitter) == null ? void 0 : g.getError(), n = rr(this.props.filters), s = this.props.filterModes ?? P.symbols, l = this.props.defaultSemanticState ?? k.Neutral, c = new Set(e.map(ht));
|
|
3075
3079
|
this.staleOptionValues = new Set(
|
|
3076
|
-
[...this.optionStateEmitters.keys()].filter((
|
|
3080
|
+
[...this.optionStateEmitters.keys()].filter((w) => !c.has(w))
|
|
3077
3081
|
);
|
|
3078
|
-
const u = this.Host, p = i === I.Initial || i === I.Loading, m =
|
|
3082
|
+
const u = this.Host, p = i === I.Initial || i === I.Loading, m = T(this.props) || null;
|
|
3079
3083
|
return i === I.Error && e.length === 0 ? /* @__PURE__ */ h(u, { className: m, children: /* @__PURE__ */ h(
|
|
3080
|
-
|
|
3084
|
+
E,
|
|
3081
3085
|
{
|
|
3082
3086
|
className: "cap-error-banner",
|
|
3083
3087
|
error: o,
|
|
3084
3088
|
fallback: this.capillaryUiMessage("filterPanelLoadError")
|
|
3085
3089
|
}
|
|
3086
|
-
) }) : p && e.length === 0 ? /* @__PURE__ */ h(u, { className: m, "aria-busy": "true", children: /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("filterPanelLoading") }) }) : /* @__PURE__ */
|
|
3090
|
+
) }) : p && e.length === 0 ? /* @__PURE__ */ h(u, { className: m, "aria-busy": "true", children: /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("filterPanelLoading") }) }) : /* @__PURE__ */ v(
|
|
3087
3091
|
u,
|
|
3088
3092
|
{
|
|
3089
3093
|
className: m,
|
|
@@ -3092,7 +3096,7 @@ class B extends g {
|
|
|
3092
3096
|
"aria-busy": p ? "true" : null,
|
|
3093
3097
|
children: [
|
|
3094
3098
|
i === I.Error ? /* @__PURE__ */ h(
|
|
3095
|
-
|
|
3099
|
+
E,
|
|
3096
3100
|
{
|
|
3097
3101
|
className: "cap-error-banner",
|
|
3098
3102
|
error: o,
|
|
@@ -3100,22 +3104,22 @@ class B extends g {
|
|
|
3100
3104
|
}
|
|
3101
3105
|
) : null,
|
|
3102
3106
|
p ? /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("filterPanelLoading") }) : null,
|
|
3103
|
-
e.length === 0 ? /* @__PURE__ */ h("p", { children: this.capillaryUiMessage("filterPanelEmpty") }) : e.map((
|
|
3104
|
-
const
|
|
3107
|
+
e.length === 0 ? /* @__PURE__ */ h("p", { children: this.capillaryUiMessage("filterPanelEmpty") }) : e.map((w) => {
|
|
3108
|
+
const z = ht(w), S = Ii(w), U = n.get(z) ?? l, C = this.optionEmitter(z, U);
|
|
3105
3109
|
return /* @__PURE__ */ h(
|
|
3106
|
-
|
|
3110
|
+
Si,
|
|
3107
3111
|
{
|
|
3108
|
-
label:
|
|
3112
|
+
label: S,
|
|
3109
3113
|
valueEmitter: C,
|
|
3110
3114
|
symbols: s,
|
|
3111
|
-
onChange: (V,
|
|
3115
|
+
onChange: (V, M) => {
|
|
3112
3116
|
var H, oe;
|
|
3113
|
-
|
|
3114
|
-
const N =
|
|
3115
|
-
V ===
|
|
3117
|
+
M == null || M.stopPropagation();
|
|
3118
|
+
const N = rr(this.props.filters);
|
|
3119
|
+
V === k.Neutral ? N.delete(z) : N.set(z, V), (oe = (H = this.props).onChange) == null || oe.call(H, N, M);
|
|
3116
3120
|
}
|
|
3117
3121
|
},
|
|
3118
|
-
|
|
3122
|
+
Ti(z)
|
|
3119
3123
|
);
|
|
3120
3124
|
})
|
|
3121
3125
|
]
|
|
@@ -3140,7 +3144,7 @@ class B extends g {
|
|
|
3140
3144
|
return this.optionStateEmitters.set(e, n), n;
|
|
3141
3145
|
}
|
|
3142
3146
|
}
|
|
3143
|
-
a(B, "liveProps", []), a(B, "dependencies", [
|
|
3147
|
+
a(B, "liveProps", []), a(B, "dependencies", [P, E]), a(B, "hostName", "filter-panel"), a(B, "css", x`
|
|
3144
3148
|
& {
|
|
3145
3149
|
position: absolute;
|
|
3146
3150
|
background: white;
|
|
@@ -3183,8 +3187,8 @@ a(B, "liveProps", []), a(B, "dependencies", [D, k]), a(B, "hostName", "filter-pa
|
|
|
3183
3187
|
}
|
|
3184
3188
|
}
|
|
3185
3189
|
`);
|
|
3186
|
-
const
|
|
3187
|
-
function
|
|
3190
|
+
const Si = P;
|
|
3191
|
+
function rr(t) {
|
|
3188
3192
|
if (t == null) return /* @__PURE__ */ new Map();
|
|
3189
3193
|
if (t instanceof Map) return new Map(t);
|
|
3190
3194
|
if (Array.isArray(t)) return new Map(t);
|
|
@@ -3198,23 +3202,23 @@ function ht(t) {
|
|
|
3198
3202
|
}
|
|
3199
3203
|
throw new TypeError("Filter options must be strings, numbers, or value/label objects");
|
|
3200
3204
|
}
|
|
3201
|
-
function
|
|
3205
|
+
function Ii(t) {
|
|
3202
3206
|
if (t != null && typeof t == "object") {
|
|
3203
3207
|
const r = Reflect.get(t, "label");
|
|
3204
|
-
if (r != null) return
|
|
3208
|
+
if (r != null) return zi(r) ? r : String(r);
|
|
3205
3209
|
}
|
|
3206
3210
|
return String(ht(t));
|
|
3207
3211
|
}
|
|
3208
|
-
function
|
|
3212
|
+
function Ti(t) {
|
|
3209
3213
|
return `${typeof t}:${String(t)}`;
|
|
3210
3214
|
}
|
|
3211
|
-
function
|
|
3215
|
+
function zi(t) {
|
|
3212
3216
|
return typeof t == "string" || typeof t == "number";
|
|
3213
3217
|
}
|
|
3214
|
-
function
|
|
3218
|
+
function Ci(t) {
|
|
3215
3219
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
3216
3220
|
}
|
|
3217
|
-
class pe extends
|
|
3221
|
+
class pe extends y {
|
|
3218
3222
|
constructor() {
|
|
3219
3223
|
super(...arguments);
|
|
3220
3224
|
a(this, "filterVisible", !1);
|
|
@@ -3241,8 +3245,8 @@ class pe extends g {
|
|
|
3241
3245
|
}
|
|
3242
3246
|
render() {
|
|
3243
3247
|
const e = this.props.sortEmitter.get(), i = (e == null ? void 0 : e.field) === this.props.field ? e.direction : null, o = new Map(
|
|
3244
|
-
(this.props.filtersEmitter.get()[this.props.field] ?? []).filter(
|
|
3245
|
-
), n = this.props.label ?? String(this.props.field), s = this.props.ariaLabel ??
|
|
3248
|
+
(this.props.filtersEmitter.get()[this.props.field] ?? []).filter($i)
|
|
3249
|
+
), n = this.props.label ?? String(this.props.field), s = this.props.ariaLabel ?? Ri(n) ?? String(this.props.field), l = this.capillaryUiMessage("tableFilterColumnLabel")(s);
|
|
3246
3250
|
let c = null;
|
|
3247
3251
|
return this.filterVisible && this.props.filterOptions != null && (c = /* @__PURE__ */ h(
|
|
3248
3252
|
B,
|
|
@@ -3255,14 +3259,14 @@ class pe extends g {
|
|
|
3255
3259
|
...this.props.defaultSemanticState == null ? {} : { defaultSemanticState: this.props.defaultSemanticState }
|
|
3256
3260
|
},
|
|
3257
3261
|
"filter-panel"
|
|
3258
|
-
)), /* @__PURE__ */
|
|
3262
|
+
)), /* @__PURE__ */ v(
|
|
3259
3263
|
"th",
|
|
3260
3264
|
{
|
|
3261
3265
|
scope: "col",
|
|
3262
3266
|
"aria-sort": i === "asc" ? "ascending" : i === "desc" ? "descending" : "none",
|
|
3263
3267
|
style: { zIndex: this.filterVisible ? 1200 : null },
|
|
3264
3268
|
children: [
|
|
3265
|
-
this.props.sortable ? /* @__PURE__ */
|
|
3269
|
+
this.props.sortable ? /* @__PURE__ */ v(
|
|
3266
3270
|
"button",
|
|
3267
3271
|
{
|
|
3268
3272
|
type: "button",
|
|
@@ -3292,9 +3296,10 @@ class pe extends g {
|
|
|
3292
3296
|
);
|
|
3293
3297
|
}
|
|
3294
3298
|
}
|
|
3295
|
-
a(pe, "liveProps", []), a(pe, "dependencies", [B]), a(pe, "css",
|
|
3299
|
+
a(pe, "liveProps", []), a(pe, "dependencies", [B]), a(pe, "css", x`
|
|
3296
3300
|
cap-datatable > table > thead > tr > th[aria-sort] {
|
|
3297
|
-
position:
|
|
3301
|
+
position: sticky;
|
|
3302
|
+
inset-block-start: 0;
|
|
3298
3303
|
padding-right: 24px;
|
|
3299
3304
|
user-select: var(--noselect-user-select);
|
|
3300
3305
|
cursor: var(--noselect-cursor);
|
|
@@ -3348,13 +3353,13 @@ a(pe, "liveProps", []), a(pe, "dependencies", [B]), a(pe, "css", w`
|
|
|
3348
3353
|
opacity: 1;
|
|
3349
3354
|
}
|
|
3350
3355
|
`);
|
|
3351
|
-
function
|
|
3356
|
+
function Ri(t) {
|
|
3352
3357
|
return typeof t == "string" || typeof t == "number" ? String(t) : null;
|
|
3353
3358
|
}
|
|
3354
|
-
function
|
|
3359
|
+
function $i(t) {
|
|
3355
3360
|
return typeof t[0] == "string" || typeof t[0] == "number";
|
|
3356
3361
|
}
|
|
3357
|
-
class me extends
|
|
3362
|
+
class me extends y {
|
|
3358
3363
|
render() {
|
|
3359
3364
|
return /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", { children: this.props.columns.map((r) => /* @__PURE__ */ h(
|
|
3360
3365
|
pe,
|
|
@@ -3374,13 +3379,17 @@ class me extends g {
|
|
|
3374
3379
|
)) }) });
|
|
3375
3380
|
}
|
|
3376
3381
|
}
|
|
3377
|
-
a(me, "liveProps", []), a(me, "dependencies", [pe]), a(me, "css",
|
|
3382
|
+
a(me, "liveProps", []), a(me, "dependencies", [pe]), a(me, "css", x`
|
|
3378
3383
|
cap-datatable > table > thead {
|
|
3379
3384
|
color: var(--table-header-color);
|
|
3380
3385
|
background: var(--ui-gradient);
|
|
3381
3386
|
}
|
|
3382
3387
|
|
|
3383
3388
|
cap-datatable > table > thead > tr > th {
|
|
3389
|
+
position: sticky;
|
|
3390
|
+
inset-block-start: 0;
|
|
3391
|
+
z-index: 2;
|
|
3392
|
+
background: var(--ui-gradient);
|
|
3384
3393
|
border: 2px groove #fff7;
|
|
3385
3394
|
border-left: none;
|
|
3386
3395
|
}
|
|
@@ -3389,77 +3398,77 @@ a(me, "liveProps", []), a(me, "dependencies", [pe]), a(me, "css", w`
|
|
|
3389
3398
|
border-right: none;
|
|
3390
3399
|
}
|
|
3391
3400
|
`);
|
|
3392
|
-
const
|
|
3393
|
-
[
|
|
3394
|
-
[
|
|
3395
|
-
[
|
|
3396
|
-
[
|
|
3401
|
+
const Oi = {
|
|
3402
|
+
[k.Neutral]: "☐",
|
|
3403
|
+
[k.Prefer]: "",
|
|
3404
|
+
[k.Require]: "_",
|
|
3405
|
+
[k.Deny]: "!"
|
|
3397
3406
|
};
|
|
3398
|
-
function
|
|
3399
|
-
|
|
3407
|
+
function Ni(t, { sort: r = null, filters: e = {} } = {}) {
|
|
3408
|
+
Ai(t), r != null && (zr(r), t.searchParams.set("sort", `${r.field}:${r.direction}`));
|
|
3400
3409
|
for (const [i, o] of Object.entries(e))
|
|
3401
3410
|
for (const [n, s] of o) {
|
|
3402
3411
|
if (!Ge(s))
|
|
3403
3412
|
throw new TypeError(`Unknown filter mode for ${i}: ${String(s)}`);
|
|
3404
3413
|
t.searchParams.append(
|
|
3405
3414
|
"filter",
|
|
3406
|
-
`${i}:${
|
|
3415
|
+
`${i}:${Oi[s]}:${JSON.stringify(n)}`
|
|
3407
3416
|
);
|
|
3408
3417
|
}
|
|
3409
3418
|
return t;
|
|
3410
3419
|
}
|
|
3411
|
-
function
|
|
3420
|
+
function Li(t, r, e) {
|
|
3412
3421
|
if (!Array.isArray(t)) throw new TypeError("Local table data must be an array");
|
|
3413
|
-
const i = t.filter((n) =>
|
|
3422
|
+
const i = t.filter((n) => Pi(n, e));
|
|
3414
3423
|
if (r == null) return i;
|
|
3415
|
-
|
|
3424
|
+
zr(r);
|
|
3416
3425
|
const o = r.direction === "asc" ? 1 : -1;
|
|
3417
|
-
return [...i].sort((n, s) =>
|
|
3426
|
+
return [...i].sort((n, s) => Mi(pt(n, r.field), pt(s, r.field)) * o);
|
|
3418
3427
|
}
|
|
3419
|
-
function
|
|
3428
|
+
function Pi(t, r) {
|
|
3420
3429
|
for (const [e, i] of Object.entries(r)) {
|
|
3421
3430
|
const o = pt(t, e);
|
|
3422
|
-
if (i.filter(([, c]) => c ===
|
|
3423
|
-
const s = i.filter(([, c]) => c ===
|
|
3431
|
+
if (i.filter(([, c]) => c === k.Deny).some(([c]) => Object.is(c, o))) return !1;
|
|
3432
|
+
const s = i.filter(([, c]) => c === k.Require);
|
|
3424
3433
|
if (s.length > 0 && !s.some(([c]) => Object.is(c, o))) return !1;
|
|
3425
|
-
const l = i.filter(([, c]) => c ===
|
|
3434
|
+
const l = i.filter(([, c]) => c === k.Prefer);
|
|
3426
3435
|
if (l.length > 0 && !l.some(([c]) => Object.is(c, o))) return !1;
|
|
3427
3436
|
}
|
|
3428
3437
|
return !0;
|
|
3429
3438
|
}
|
|
3430
|
-
function
|
|
3431
|
-
if (t == null || typeof t != "object" || typeof Reflect.get(t, "field") != "string" || !
|
|
3439
|
+
function zr(t) {
|
|
3440
|
+
if (t == null || typeof t != "object" || typeof Reflect.get(t, "field") != "string" || !Di(Reflect.get(t, "direction")))
|
|
3432
3441
|
throw new TypeError("Table sort must contain a field and asc/desc direction");
|
|
3433
3442
|
}
|
|
3434
|
-
function
|
|
3443
|
+
function Di(t) {
|
|
3435
3444
|
return t === "asc" || t === "desc";
|
|
3436
3445
|
}
|
|
3437
|
-
function
|
|
3446
|
+
function Mi(t, r) {
|
|
3438
3447
|
return Object.is(t, r) ? 0 : t == null ? -1 : r == null ? 1 : typeof t == "number" && typeof r == "number" ? t - r : String(t).localeCompare(String(r));
|
|
3439
3448
|
}
|
|
3440
3449
|
function pt(t, r) {
|
|
3441
3450
|
if (!(t == null || typeof t != "object" && typeof t != "function"))
|
|
3442
3451
|
return Reflect.get(t, r);
|
|
3443
3452
|
}
|
|
3444
|
-
function
|
|
3453
|
+
function Ai(t) {
|
|
3445
3454
|
if (t == null || typeof t != "object" && typeof t != "function" || typeof Reflect.get(t, "toString") != "function")
|
|
3446
3455
|
throw new TypeError("Table serializer requires a URL");
|
|
3447
3456
|
const r = Reflect.get(t, "searchParams");
|
|
3448
3457
|
if (r == null || typeof Reflect.get(r, "set") != "function" || typeof Reflect.get(r, "append") != "function")
|
|
3449
3458
|
throw new TypeError("Table serializer requires URL search parameters");
|
|
3450
3459
|
}
|
|
3451
|
-
function
|
|
3452
|
-
const r = $t(t), e =
|
|
3460
|
+
function qi(t) {
|
|
3461
|
+
const r = $t(t), e = Rr(t.data) ? null : new $(t.data, {
|
|
3453
3462
|
owner: t.owner,
|
|
3454
3463
|
purpose: "local table data"
|
|
3455
|
-
}), i = e ?? t.data, o =
|
|
3464
|
+
}), i = e ?? t.data, o = Cr(i, r, t.owner);
|
|
3456
3465
|
return new Rt(o, r, () => {
|
|
3457
3466
|
o.dispose(), e == null || e.dispose();
|
|
3458
3467
|
});
|
|
3459
3468
|
}
|
|
3460
|
-
function
|
|
3461
|
-
|
|
3462
|
-
const r = $t(t), e =
|
|
3469
|
+
function an(t) {
|
|
3470
|
+
Vi(t.query);
|
|
3471
|
+
const r = $t(t), e = Cr(t.query, r, t.owner), i = t.query.retry;
|
|
3463
3472
|
return new Rt(
|
|
3464
3473
|
e,
|
|
3465
3474
|
r,
|
|
@@ -3470,16 +3479,16 @@ function on(t) {
|
|
|
3470
3479
|
}
|
|
3471
3480
|
);
|
|
3472
3481
|
}
|
|
3473
|
-
function
|
|
3482
|
+
function ji(t) {
|
|
3474
3483
|
if (t.handler == null || typeof t.handler.fetch != "function")
|
|
3475
3484
|
throw new TypeError("Table data-source handler must implement fetch");
|
|
3476
|
-
const r = $t(t), e = new
|
|
3485
|
+
const r = $t(t), e = new Ht("sort", r.sortEmitter, {
|
|
3477
3486
|
owner: t.owner,
|
|
3478
3487
|
purpose: "table sort argument"
|
|
3479
|
-
}), i = new
|
|
3488
|
+
}), i = new Ht("filters", r.filtersEmitter, {
|
|
3480
3489
|
owner: t.owner,
|
|
3481
3490
|
purpose: "table filters argument"
|
|
3482
|
-
}), o = new
|
|
3491
|
+
}), o = new Ur({
|
|
3483
3492
|
handler: t.handler,
|
|
3484
3493
|
args: { sort: e, filters: i },
|
|
3485
3494
|
owner: t.owner,
|
|
@@ -3490,15 +3499,15 @@ function Ai(t) {
|
|
|
3490
3499
|
o.dispose(), e.dispose(), i.dispose();
|
|
3491
3500
|
});
|
|
3492
3501
|
}
|
|
3493
|
-
function
|
|
3502
|
+
function Ui(t) {
|
|
3494
3503
|
if (typeof t.url != "string" || t.url.length === 0)
|
|
3495
3504
|
throw new TypeError("REST table data source requires a URL");
|
|
3496
3505
|
const r = {
|
|
3497
3506
|
url: t.url,
|
|
3498
|
-
serialize: t.serializeQuery ??
|
|
3507
|
+
serialize: t.serializeQuery ?? Ni
|
|
3499
3508
|
};
|
|
3500
|
-
return t.baseUrl != null && (r.baseUrl = t.baseUrl), t.fetch != null && (r.fetch = t.fetch),
|
|
3501
|
-
handler: new
|
|
3509
|
+
return t.baseUrl != null && (r.baseUrl = t.baseUrl), t.fetch != null && (r.fetch = t.fetch), ji({
|
|
3510
|
+
handler: new Vr(r),
|
|
3502
3511
|
...t.sortEmitter == null ? {} : { sortEmitter: t.sortEmitter },
|
|
3503
3512
|
...t.filtersEmitter == null ? {} : { filtersEmitter: t.filtersEmitter },
|
|
3504
3513
|
...t.owner === void 0 ? {} : { owner: t.owner }
|
|
@@ -3517,10 +3526,10 @@ class Rt {
|
|
|
3517
3526
|
this.disposed || (this.disposed = !0, (r = this.disposeQuery) == null || r.call(this), (e = this.state.ownedSortEmitter) == null || e.dispose(), (i = this.state.ownedFiltersEmitter) == null || i.dispose());
|
|
3518
3527
|
}
|
|
3519
3528
|
}
|
|
3520
|
-
function
|
|
3529
|
+
function Cr(t, r, e) {
|
|
3521
3530
|
return new We(
|
|
3522
3531
|
[t, r.sortEmitter, r.filtersEmitter],
|
|
3523
|
-
([i, o, n]) => i == null ? void 0 :
|
|
3532
|
+
([i, o, n]) => i == null ? void 0 : Li(i, o, n),
|
|
3524
3533
|
{ owner: e, purpose: "local table view" }
|
|
3525
3534
|
);
|
|
3526
3535
|
}
|
|
@@ -3539,14 +3548,14 @@ function $t(t) {
|
|
|
3539
3548
|
ownedFiltersEmitter: e
|
|
3540
3549
|
};
|
|
3541
3550
|
}
|
|
3542
|
-
function
|
|
3551
|
+
function Rr(t) {
|
|
3543
3552
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function" && typeof Reflect.get(t, "getFetchState") == "function" && typeof Reflect.get(t, "getError") == "function";
|
|
3544
3553
|
}
|
|
3545
|
-
function
|
|
3546
|
-
if (!
|
|
3554
|
+
function Vi(t) {
|
|
3555
|
+
if (!Rr(t))
|
|
3547
3556
|
throw new TypeError("Table query must be an emitter");
|
|
3548
3557
|
}
|
|
3549
|
-
class se extends
|
|
3558
|
+
class se extends y {
|
|
3550
3559
|
constructor(e) {
|
|
3551
3560
|
var i, o;
|
|
3552
3561
|
super(e);
|
|
@@ -3563,7 +3572,7 @@ class se extends g {
|
|
|
3563
3572
|
a(this, "ownedSortEmitter");
|
|
3564
3573
|
a(this, "ownedFiltersEmitter");
|
|
3565
3574
|
a(this, "ownedDataSource", null);
|
|
3566
|
-
|
|
3575
|
+
Ki(e), this.columns = Hi(e.columns), this.rowKey = Fi(e.rowKey), this.suppliedDataSource = e.dataSource ?? null, this.ownedSortEmitter = this.suppliedDataSource == null ? new $(null, { owner: this, purpose: "table sort" }) : null, this.ownedFiltersEmitter = this.suppliedDataSource == null ? new $({}, { owner: this, purpose: "table filters" }) : null, this.sortEmitter = ((i = this.suppliedDataSource) == null ? void 0 : i.sortEmitter) ?? this.ownedSortEmitter, this.filtersEmitter = ((o = this.suppliedDataSource) == null ? void 0 : o.filtersEmitter) ?? this.ownedFiltersEmitter, this.selectionHandler = e.multiSelect === !0 ? Be({
|
|
3567
3576
|
owner: this,
|
|
3568
3577
|
multiSelect: !0,
|
|
3569
3578
|
...e.selectedItemsEmitter == null ? {} : { selectedItemsEmitter: e.selectedItemsEmitter },
|
|
@@ -3583,12 +3592,12 @@ class se extends g {
|
|
|
3583
3592
|
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof Tt ? this.selectionHandler.selectedItemEmitter : null;
|
|
3584
3593
|
}
|
|
3585
3594
|
initialize() {
|
|
3586
|
-
this.suppliedDataSource != null ? this.dataSource = this.suppliedDataSource : this.props.rest != null ? (this.ownedDataSource =
|
|
3595
|
+
this.suppliedDataSource != null ? this.dataSource = this.suppliedDataSource : this.props.rest != null ? (this.ownedDataSource = Ui({
|
|
3587
3596
|
...this.props.rest,
|
|
3588
3597
|
sortEmitter: this.sortEmitter,
|
|
3589
3598
|
filtersEmitter: this.filtersEmitter,
|
|
3590
3599
|
owner: this
|
|
3591
|
-
}), this.dataSource = this.ownedDataSource) : (this.ownedDataSource =
|
|
3600
|
+
}), this.dataSource = this.ownedDataSource) : (this.ownedDataSource = qi({
|
|
3592
3601
|
data: this.props.data ?? [],
|
|
3593
3602
|
sortEmitter: this.sortEmitter,
|
|
3594
3603
|
filtersEmitter: this.filtersEmitter,
|
|
@@ -3596,38 +3605,38 @@ class se extends g {
|
|
|
3596
3605
|
}), this.dataSource = this.ownedDataSource), this.query = this.dataSource.query, this.watch(this.query, this.selectedItemsEmitter);
|
|
3597
3606
|
}
|
|
3598
3607
|
render() {
|
|
3599
|
-
var
|
|
3600
|
-
const e = (
|
|
3601
|
-
if (!Array.isArray(
|
|
3602
|
-
const
|
|
3603
|
-
this.selectedItemsEmitter.get().map((
|
|
3604
|
-
),
|
|
3605
|
-
return /* @__PURE__ */
|
|
3606
|
-
|
|
3608
|
+
var p, m, f, b;
|
|
3609
|
+
const e = (p = this.query) == null ? void 0 : p.get(), i = e ?? [];
|
|
3610
|
+
if (!Array.isArray(i)) throw new TypeError("DataTable query value must be an array");
|
|
3611
|
+
const o = ((m = this.query) == null ? void 0 : m.getFetchState()) ?? I.Initial, n = (f = this.query) == null ? void 0 : f.getError(), s = o === I.Initial || o === I.Loading, l = o === I.Initial || o === I.Loading && e === void 0, c = new Set(
|
|
3612
|
+
this.selectedItemsEmitter.get().map((g, w) => this.rowKey(g, w))
|
|
3613
|
+
), u = this.Host;
|
|
3614
|
+
return /* @__PURE__ */ v(
|
|
3615
|
+
u,
|
|
3607
3616
|
{
|
|
3608
|
-
className:
|
|
3617
|
+
className: T(this.props) || null,
|
|
3609
3618
|
children: [
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3619
|
+
l ? /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("dataTableLoading") }) : null,
|
|
3620
|
+
o === I.Error ? /* @__PURE__ */ h(
|
|
3621
|
+
E,
|
|
3613
3622
|
{
|
|
3614
3623
|
className: "cap-error-banner",
|
|
3615
|
-
error:
|
|
3624
|
+
error: n,
|
|
3616
3625
|
fallback: this.capillaryUiMessage("dataTableLoadError")
|
|
3617
3626
|
}
|
|
3618
3627
|
) : null,
|
|
3619
|
-
|
|
3628
|
+
o === I.Error && typeof ((b = this.dataSource) == null ? void 0 : b.retry) == "function" ? /* @__PURE__ */ h(
|
|
3620
3629
|
"button",
|
|
3621
3630
|
{
|
|
3622
3631
|
type: "button",
|
|
3623
3632
|
onClick: () => {
|
|
3624
|
-
var
|
|
3625
|
-
return (
|
|
3633
|
+
var g, w;
|
|
3634
|
+
return (w = (g = this.dataSource) == null ? void 0 : g.retry) == null ? void 0 : w.call(g, "table retry");
|
|
3626
3635
|
},
|
|
3627
3636
|
children: this.capillaryUiMessage("dataTableRetry")
|
|
3628
3637
|
}
|
|
3629
3638
|
) : null,
|
|
3630
|
-
/* @__PURE__ */
|
|
3639
|
+
/* @__PURE__ */ v("table", { "aria-busy": s ? "true" : null, children: [
|
|
3631
3640
|
this.props.caption == null ? null : /* @__PURE__ */ h("caption", { children: this.props.caption }),
|
|
3632
3641
|
/* @__PURE__ */ h(
|
|
3633
3642
|
me,
|
|
@@ -3641,7 +3650,7 @@ class se extends g {
|
|
|
3641
3650
|
},
|
|
3642
3651
|
"header"
|
|
3643
3652
|
),
|
|
3644
|
-
/* @__PURE__ */ h("tbody", { children:
|
|
3653
|
+
/* @__PURE__ */ h("tbody", { children: l ? this.renderPlaceholders() : i.length > 0 ? i.map((g, w) => this.renderRow(g, w, c)) : o === I.Error ? null : /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", { colSpan: this.columns.length, children: this.props.emptyMessage ?? this.capillaryUiMessage("dataTableEmpty") }) }, "empty") })
|
|
3645
3654
|
] })
|
|
3646
3655
|
]
|
|
3647
3656
|
}
|
|
@@ -3655,7 +3664,7 @@ class se extends g {
|
|
|
3655
3664
|
"data-cap-selectable-row": "",
|
|
3656
3665
|
"aria-selected": String(s),
|
|
3657
3666
|
tabIndex: i === 0 ? 0 : -1,
|
|
3658
|
-
children: this.columns.map((l) => /* @__PURE__ */ h("td", { children: l.render ? l.render(e, i) :
|
|
3667
|
+
children: this.columns.map((l) => /* @__PURE__ */ h("td", { children: l.render ? l.render(e, i) : _i(e[l.field]) }, String(l.field)))
|
|
3659
3668
|
},
|
|
3660
3669
|
String(n)
|
|
3661
3670
|
);
|
|
@@ -3663,7 +3672,7 @@ class se extends g {
|
|
|
3663
3672
|
renderPlaceholders() {
|
|
3664
3673
|
const e = this.props.placeholderCount ?? 5;
|
|
3665
3674
|
return Array.from({ length: e }, (i, o) => /* @__PURE__ */ h("tr", { "aria-hidden": "true", children: this.columns.map((n, s) => /* @__PURE__ */ h("td", { children: /* @__PURE__ */ h(
|
|
3666
|
-
|
|
3675
|
+
A,
|
|
3667
3676
|
{
|
|
3668
3677
|
width: 45 + (o + s) % 6 * 8
|
|
3669
3678
|
}
|
|
@@ -3691,10 +3700,14 @@ class se extends g {
|
|
|
3691
3700
|
this.selectionHandler.destroy(), (e = this.ownedDataSource) == null || e.dispose(), (i = this.ownedSortEmitter) == null || i.dispose(), (o = this.ownedFiltersEmitter) == null || o.dispose();
|
|
3692
3701
|
}
|
|
3693
3702
|
}
|
|
3694
|
-
a(se, "liveProps", []), a(se, "dependencies", [
|
|
3703
|
+
a(se, "liveProps", []), a(se, "dependencies", [A, me, E]), a(se, "hostName", "data-table"), a(se, "dataSurface", "data"), a(se, "css", x`
|
|
3695
3704
|
& {
|
|
3696
3705
|
display: block;
|
|
3697
3706
|
position: relative;
|
|
3707
|
+
flex: 1 1 auto;
|
|
3708
|
+
min-inline-size: 0;
|
|
3709
|
+
min-block-size: 0;
|
|
3710
|
+
max-block-size: 100%;
|
|
3698
3711
|
overflow: auto;
|
|
3699
3712
|
}
|
|
3700
3713
|
|
|
@@ -3769,7 +3782,7 @@ a(se, "liveProps", []), a(se, "dependencies", [q, me, k]), a(se, "hostName", "da
|
|
|
3769
3782
|
}
|
|
3770
3783
|
|
|
3771
3784
|
`);
|
|
3772
|
-
function
|
|
3785
|
+
function Hi(t) {
|
|
3773
3786
|
if (!Array.isArray(t) || t.length === 0)
|
|
3774
3787
|
throw new TypeError("DataTable columns must be a non-empty array");
|
|
3775
3788
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -3787,7 +3800,7 @@ function Ui(t) {
|
|
|
3787
3800
|
return e;
|
|
3788
3801
|
});
|
|
3789
3802
|
}
|
|
3790
|
-
function
|
|
3803
|
+
function Ki(t) {
|
|
3791
3804
|
var s, l;
|
|
3792
3805
|
const e = [
|
|
3793
3806
|
"mode",
|
|
@@ -3811,7 +3824,7 @@ function Vi(t) {
|
|
|
3811
3824
|
throw new TypeError("DataTable dataSource must implement the table data-source contract");
|
|
3812
3825
|
}
|
|
3813
3826
|
}
|
|
3814
|
-
function
|
|
3827
|
+
function Fi(t) {
|
|
3815
3828
|
if (t == null) return zt;
|
|
3816
3829
|
if (typeof t == "function") return t;
|
|
3817
3830
|
if (typeof t == "string" && t.length > 0)
|
|
@@ -3823,10 +3836,10 @@ function Hi(t) {
|
|
|
3823
3836
|
};
|
|
3824
3837
|
throw new TypeError("DataTable rowKey must be a function or property name");
|
|
3825
3838
|
}
|
|
3826
|
-
function
|
|
3839
|
+
function _i(t) {
|
|
3827
3840
|
return t == null || typeof t == "string" || typeof t == "number" ? t : String(t);
|
|
3828
3841
|
}
|
|
3829
|
-
class Ot extends
|
|
3842
|
+
class Ot extends y {
|
|
3830
3843
|
render() {
|
|
3831
3844
|
return this.props.children ?? [];
|
|
3832
3845
|
}
|
|
@@ -3846,17 +3859,17 @@ function re(t) {
|
|
|
3846
3859
|
};
|
|
3847
3860
|
e(t);
|
|
3848
3861
|
}
|
|
3849
|
-
function
|
|
3862
|
+
function sn(t, r) {
|
|
3850
3863
|
return re(t), Nt(t, r);
|
|
3851
3864
|
}
|
|
3852
|
-
function
|
|
3865
|
+
function ln(t, r, e = null) {
|
|
3853
3866
|
return new We(
|
|
3854
3867
|
[t, r],
|
|
3855
3868
|
([i, o]) => (re(i), o == null ? null : Nt(i, o)),
|
|
3856
3869
|
{ owner: e, purpose: "tree node projection" }
|
|
3857
3870
|
);
|
|
3858
3871
|
}
|
|
3859
|
-
function
|
|
3872
|
+
function Bi(t, r, e) {
|
|
3860
3873
|
if (re(t), typeof e != "function") throw new TypeError("Tree node update must be a function");
|
|
3861
3874
|
const i = (n) => {
|
|
3862
3875
|
for (let s = 0; s < n.length; s += 1) {
|
|
@@ -3881,8 +3894,8 @@ function Fi(t, r, e) {
|
|
|
3881
3894
|
}, o = i(t);
|
|
3882
3895
|
return Object.is(o, t) || re(o), o;
|
|
3883
3896
|
}
|
|
3884
|
-
function
|
|
3885
|
-
const o = t.get(), n =
|
|
3897
|
+
function cn(t, r, e, i = "tree node updated") {
|
|
3898
|
+
const o = t.get(), n = Bi(o, r, e);
|
|
3886
3899
|
return Object.is(n, o) ? !1 : t.set(n, i);
|
|
3887
3900
|
}
|
|
3888
3901
|
function Nt(t, r) {
|
|
@@ -3893,7 +3906,7 @@ function Nt(t, r) {
|
|
|
3893
3906
|
}
|
|
3894
3907
|
return null;
|
|
3895
3908
|
}
|
|
3896
|
-
class le extends
|
|
3909
|
+
class le extends y {
|
|
3897
3910
|
constructor(e) {
|
|
3898
3911
|
super(e);
|
|
3899
3912
|
a(this, "nodesEmitter");
|
|
@@ -3905,7 +3918,7 @@ class le extends g {
|
|
|
3905
3918
|
a(this, "focusedKey", null);
|
|
3906
3919
|
a(this, "typeahead", "");
|
|
3907
3920
|
a(this, "typeaheadTimer", null);
|
|
3908
|
-
if (
|
|
3921
|
+
if (or(e.nodes))
|
|
3909
3922
|
this.nodesEmitter = e.nodes, this.ownedNodesEmitter = null;
|
|
3910
3923
|
else {
|
|
3911
3924
|
const i = e.nodes ?? mt(e.children);
|
|
@@ -3917,13 +3930,13 @@ class le extends g {
|
|
|
3917
3930
|
this.ownedSelectedEmitter = e.selectedKeyEmitter == null ? new $(null, { owner: this, purpose: "selected tree key" }) : null, this.selectedKeyEmitter = e.selectedKeyEmitter ?? this.ownedSelectedEmitter, this.ownedExpandedEmitter = e.expandedKeysEmitter == null ? new $([], { owner: this, purpose: "expanded tree keys" }) : null, this.expandedKeysEmitter = e.expandedKeysEmitter ?? this.ownedExpandedEmitter;
|
|
3918
3931
|
}
|
|
3919
3932
|
initialize() {
|
|
3920
|
-
this.reconcile(this.nodesEmitter.get()), this.watch(this.nodesEmitter, this.selectedKeyEmitter, this.expandedKeysEmitter), this.onCleanup(this.nodesEmitter.subscribe(({ value: e }) => this.reconcile(e), {
|
|
3933
|
+
this.reconcile(this.nodesEmitter.get() ?? []), this.watch(this.nodesEmitter, this.selectedKeyEmitter, this.expandedKeysEmitter), this.onCleanup(this.nodesEmitter.subscribe(({ value: e }) => this.reconcile(e ?? []), {
|
|
3921
3934
|
emitCurrent: !1
|
|
3922
3935
|
}));
|
|
3923
3936
|
}
|
|
3924
3937
|
setProps(e) {
|
|
3925
3938
|
if (this.ownedNodesEmitter != null) {
|
|
3926
|
-
if (
|
|
3939
|
+
if (or(e.nodes))
|
|
3927
3940
|
throw new TypeError(
|
|
3928
3941
|
"TreeView cannot replace static or declarative nodes with an emitter"
|
|
3929
3942
|
);
|
|
@@ -3935,86 +3948,86 @@ class le extends g {
|
|
|
3935
3948
|
return super.setProps(e);
|
|
3936
3949
|
}
|
|
3937
3950
|
render() {
|
|
3938
|
-
const e = this.nodesEmitter.get();
|
|
3939
|
-
re(
|
|
3940
|
-
const
|
|
3941
|
-
this.focusedKey = (
|
|
3942
|
-
const
|
|
3943
|
-
return /* @__PURE__ */
|
|
3944
|
-
|
|
3951
|
+
const e = this.nodesEmitter.get(), i = e ?? [];
|
|
3952
|
+
re(i);
|
|
3953
|
+
const o = this.nodesEmitter.getFetchState(), n = this.nodesEmitter.getError(), s = o === I.Initial || o === I.Loading, l = o === I.Initial || o === I.Loading && e === void 0, c = new Set(this.expandedKeysEmitter.get()), u = ir(i, c), p = this.selectedKeyEmitter.get(), m = u.find(({ node: b }) => Object.is(b.id, this.focusedKey)) ?? u.find(({ node: b }) => Object.is(b.id, p)) ?? u[0] ?? null;
|
|
3954
|
+
this.focusedKey = (m == null ? void 0 : m.node.id) ?? null;
|
|
3955
|
+
const f = this.Host;
|
|
3956
|
+
return /* @__PURE__ */ v(
|
|
3957
|
+
f,
|
|
3945
3958
|
{
|
|
3946
|
-
className:
|
|
3947
|
-
"aria-busy":
|
|
3959
|
+
className: T(this.props) || null,
|
|
3960
|
+
"aria-busy": s ? "true" : null,
|
|
3948
3961
|
children: [
|
|
3949
|
-
|
|
3950
|
-
|
|
3962
|
+
o === I.Error ? /* @__PURE__ */ h(
|
|
3963
|
+
E,
|
|
3951
3964
|
{
|
|
3952
3965
|
className: "cap-error-banner",
|
|
3953
|
-
error:
|
|
3966
|
+
error: n,
|
|
3954
3967
|
fallback: this.capillaryUiMessage("treeViewLoadError")
|
|
3955
3968
|
}
|
|
3956
3969
|
) : null,
|
|
3957
|
-
|
|
3970
|
+
l ? /* @__PURE__ */ v(we, { children: [
|
|
3958
3971
|
/* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("treeViewLoading") }),
|
|
3959
|
-
/* @__PURE__ */ h("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (
|
|
3960
|
-
const
|
|
3961
|
-
return /* @__PURE__ */
|
|
3972
|
+
/* @__PURE__ */ h("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (b, g) => {
|
|
3973
|
+
const w = [0, 1, 2, 1, 0][g % 5] ?? 0;
|
|
3974
|
+
return /* @__PURE__ */ v(
|
|
3962
3975
|
"li",
|
|
3963
3976
|
{
|
|
3964
|
-
style: { "--tree-depth":
|
|
3977
|
+
style: { "--tree-depth": w },
|
|
3965
3978
|
children: [
|
|
3966
3979
|
/* @__PURE__ */ h("cap-expander", { children: "•" }),
|
|
3967
|
-
/* @__PURE__ */ h(
|
|
3980
|
+
/* @__PURE__ */ h(A, { width: 42 + g % 5 * 9 })
|
|
3968
3981
|
]
|
|
3969
3982
|
},
|
|
3970
|
-
`placeholder-${
|
|
3983
|
+
`placeholder-${g}`
|
|
3971
3984
|
);
|
|
3972
3985
|
}) })
|
|
3973
3986
|
] }) : null,
|
|
3974
|
-
|
|
3975
|
-
!
|
|
3987
|
+
o === I.Ready && u.length === 0 ? /* @__PURE__ */ h("p", { role: "status", children: this.capillaryUiMessage("treeViewEmpty") }) : null,
|
|
3988
|
+
!l && u.length > 0 ? /* @__PURE__ */ h(
|
|
3976
3989
|
"ul",
|
|
3977
3990
|
{
|
|
3978
3991
|
role: "tree",
|
|
3979
3992
|
"aria-label": this.props.label,
|
|
3980
|
-
"aria-busy":
|
|
3981
|
-
children:
|
|
3982
|
-
var
|
|
3983
|
-
const { node:
|
|
3984
|
-
return /* @__PURE__ */
|
|
3993
|
+
"aria-busy": s ? "true" : null,
|
|
3994
|
+
children: u.map((b, g) => {
|
|
3995
|
+
var Dt, Mt, At, qt, jt, Ut, Vt;
|
|
3996
|
+
const { node: w, depth: z, position: S, setSize: U } = b, C = (((Dt = w.children) == null ? void 0 : Dt.length) ?? 0) > 0, V = C && c.has(w.id), M = Object.is(w.id, p), N = ((At = (Mt = this.props).renderItem) == null ? void 0 : At.call(Mt, w, z)) ?? w.label, H = (jt = (qt = this.props).itemLabelClassName) == null ? void 0 : jt.call(qt, w, z), oe = (Vt = (Ut = this.props).itemLabelStyle) == null ? void 0 : Vt.call(Ut, w, z);
|
|
3997
|
+
return /* @__PURE__ */ v(
|
|
3985
3998
|
"li",
|
|
3986
3999
|
{
|
|
3987
4000
|
role: "treeitem",
|
|
3988
|
-
"data-index":
|
|
3989
|
-
"aria-level":
|
|
3990
|
-
"aria-posinset":
|
|
3991
|
-
"aria-setsize":
|
|
3992
|
-
"aria-expanded":
|
|
3993
|
-
"aria-selected": String(
|
|
3994
|
-
tabIndex: Object.is(
|
|
3995
|
-
style: { "--tree-depth":
|
|
4001
|
+
"data-index": g,
|
|
4002
|
+
"aria-level": z + 1,
|
|
4003
|
+
"aria-posinset": S,
|
|
4004
|
+
"aria-setsize": U,
|
|
4005
|
+
"aria-expanded": C ? String(V) : null,
|
|
4006
|
+
"aria-selected": String(M),
|
|
4007
|
+
tabIndex: Object.is(w.id, m == null ? void 0 : m.node.id) ? 0 : -1,
|
|
4008
|
+
style: { "--tree-depth": z },
|
|
3996
4009
|
onClick: (Ie) => {
|
|
3997
|
-
if (this.focusedKey =
|
|
3998
|
-
this.toggleExpanded(
|
|
4010
|
+
if (this.focusedKey = w.id, Yi(Ie.target) && C) {
|
|
4011
|
+
this.toggleExpanded(w.id), this.focusRow(w.id);
|
|
3999
4012
|
return;
|
|
4000
4013
|
}
|
|
4001
|
-
this.selectNode(
|
|
4014
|
+
this.selectNode(w, Ie);
|
|
4002
4015
|
},
|
|
4003
|
-
onFocus: () => this.focusedKey =
|
|
4004
|
-
onKeyDown: (Ie) => this.handleKeyDown(Ie,
|
|
4016
|
+
onFocus: () => this.focusedKey = w.id,
|
|
4017
|
+
onKeyDown: (Ie) => this.handleKeyDown(Ie, g, u),
|
|
4005
4018
|
children: [
|
|
4006
|
-
/* @__PURE__ */ h("cap-expander", { "aria-hidden": "true", children:
|
|
4019
|
+
/* @__PURE__ */ h("cap-expander", { "aria-hidden": "true", children: C ? V ? "▾" : "▸" : "•" }),
|
|
4007
4020
|
/* @__PURE__ */ h(
|
|
4008
4021
|
"cap-label",
|
|
4009
4022
|
{
|
|
4010
|
-
...
|
|
4011
|
-
...
|
|
4012
|
-
children:
|
|
4023
|
+
...H == null ? {} : { className: H },
|
|
4024
|
+
...oe == null ? {} : { style: oe },
|
|
4025
|
+
children: N
|
|
4013
4026
|
}
|
|
4014
4027
|
)
|
|
4015
4028
|
]
|
|
4016
4029
|
},
|
|
4017
|
-
|
|
4030
|
+
w.id
|
|
4018
4031
|
);
|
|
4019
4032
|
})
|
|
4020
4033
|
}
|
|
@@ -4029,10 +4042,10 @@ class le extends g {
|
|
|
4029
4042
|
}
|
|
4030
4043
|
reconcile(e) {
|
|
4031
4044
|
re(e);
|
|
4032
|
-
const i = new Set(
|
|
4045
|
+
const i = new Set(Qi(e).map(({ node: l }) => l.id)), o = this.selectedKeyEmitter.get();
|
|
4033
4046
|
this.ownedSelectedEmitter != null && o != null && !i.has(o) && this.selectedKeyEmitter.set(null, "selected tree item removed");
|
|
4034
4047
|
const n = this.expandedKeysEmitter.get(), s = n.filter((l) => i.has(l));
|
|
4035
|
-
this.ownedExpandedEmitter != null && !
|
|
4048
|
+
this.ownedExpandedEmitter != null && !Gi(n, s) && this.expandedKeysEmitter.set(s, "removed tree expansions reconciled"), this.focusedKey != null && !i.has(this.focusedKey) && (this.focusedKey = null);
|
|
4036
4049
|
}
|
|
4037
4050
|
selectNode(e, i) {
|
|
4038
4051
|
this.selectedKeyEmitter.set(e.id, "tree item selected"), O(this.props.onSelect, e, i), this.focusRow(e.id);
|
|
@@ -4078,8 +4091,8 @@ class le extends g {
|
|
|
4078
4091
|
this.focusedKey = e;
|
|
4079
4092
|
const i = this.dom instanceof Element ? [...this.dom.querySelectorAll('[role="treeitem"]')] : [];
|
|
4080
4093
|
for (const n of i) {
|
|
4081
|
-
const s = Number(n.dataset.index), l =
|
|
4082
|
-
this.nodesEmitter.get(),
|
|
4094
|
+
const s = Number(n.dataset.index), l = ir(
|
|
4095
|
+
this.nodesEmitter.get() ?? [],
|
|
4083
4096
|
new Set(this.expandedKeysEmitter.get())
|
|
4084
4097
|
), c = Object.is((o = l[s]) == null ? void 0 : o.node.id, e);
|
|
4085
4098
|
n.tabIndex = c ? 0 : -1, c && n.focus();
|
|
@@ -4089,17 +4102,19 @@ class le extends g {
|
|
|
4089
4102
|
e.preventDefault(), this.typeaheadTimer != null && clearTimeout(this.typeaheadTimer), this.typeahead += e.key.toLocaleLowerCase(), this.typeaheadTimer = setTimeout(() => {
|
|
4090
4103
|
this.typeahead = "", this.typeaheadTimer = null;
|
|
4091
4104
|
}, 650);
|
|
4092
|
-
const s = [...i.slice(o + 1), ...i.slice(0, o + 1)].find(({ node: l }) =>
|
|
4105
|
+
const s = [...i.slice(o + 1), ...i.slice(0, o + 1)].find(({ node: l }) => Wi(l).toLocaleLowerCase().startsWith(this.typeahead));
|
|
4093
4106
|
s != null && this.focusRow(s.node.id);
|
|
4094
4107
|
}
|
|
4095
4108
|
}
|
|
4096
|
-
a(le, "liveProps", []), a(le, "dependencies", [Ot,
|
|
4109
|
+
a(le, "liveProps", []), a(le, "dependencies", [Ot, A, E]), a(le, "hostName", "tree-view"), a(le, "dataSurface", "data"), a(le, "css", x`
|
|
4097
4110
|
& {
|
|
4098
4111
|
display: flex;
|
|
4099
4112
|
position: relative;
|
|
4113
|
+
flex: 1 1 auto;
|
|
4100
4114
|
flex-direction: column;
|
|
4101
|
-
min-
|
|
4102
|
-
min-
|
|
4115
|
+
min-inline-size: 0;
|
|
4116
|
+
min-block-size: 0;
|
|
4117
|
+
max-block-size: 100%;
|
|
4103
4118
|
overflow: auto;
|
|
4104
4119
|
}
|
|
4105
4120
|
|
|
@@ -4195,7 +4210,7 @@ function mt(t) {
|
|
|
4195
4210
|
};
|
|
4196
4211
|
});
|
|
4197
4212
|
}
|
|
4198
|
-
function
|
|
4213
|
+
function ir(t, r) {
|
|
4199
4214
|
const e = [], i = (o, n, s) => {
|
|
4200
4215
|
o.forEach((l, c) => {
|
|
4201
4216
|
var u;
|
|
@@ -4204,7 +4219,7 @@ function tr(t, r) {
|
|
|
4204
4219
|
};
|
|
4205
4220
|
return i(t, 0, null), e;
|
|
4206
4221
|
}
|
|
4207
|
-
function
|
|
4222
|
+
function Qi(t) {
|
|
4208
4223
|
const r = /* @__PURE__ */ new Set(), e = [], i = (o, n, s) => {
|
|
4209
4224
|
o.forEach((l, c) => {
|
|
4210
4225
|
if (r.has(l.id)) throw new Error(`Duplicate tree item id: ${String(l.id)}`);
|
|
@@ -4213,24 +4228,24 @@ function _i(t) {
|
|
|
4213
4228
|
};
|
|
4214
4229
|
return i(t, 0, null), e;
|
|
4215
4230
|
}
|
|
4216
|
-
function
|
|
4231
|
+
function Wi(t) {
|
|
4217
4232
|
return t.textValue != null ? t.textValue : typeof t.label == "string" || typeof t.label == "number" ? String(t.label) : String(t.id);
|
|
4218
4233
|
}
|
|
4219
|
-
function
|
|
4234
|
+
function Gi(t, r) {
|
|
4220
4235
|
return t.length === r.length && t.every((e, i) => Object.is(e, r[i]));
|
|
4221
4236
|
}
|
|
4222
|
-
function
|
|
4237
|
+
function or(t) {
|
|
4223
4238
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
4224
4239
|
}
|
|
4225
|
-
function
|
|
4240
|
+
function Yi(t) {
|
|
4226
4241
|
return t instanceof Element && t.closest("cap-expander") != null;
|
|
4227
4242
|
}
|
|
4228
|
-
const
|
|
4229
|
-
class Q extends
|
|
4243
|
+
const Ji = ["disabled", "pressed", "busy", "error"];
|
|
4244
|
+
class Q extends y {
|
|
4230
4245
|
constructor(e = {}) {
|
|
4231
4246
|
super(e);
|
|
4232
4247
|
a(this, "errorId");
|
|
4233
|
-
if (this.errorId = `${
|
|
4248
|
+
if (this.errorId = `${R("button", e.id)}-error`, e.onClick != null && typeof e.onClick != "function")
|
|
4234
4249
|
throw new TypeError("Button onClick must be a function");
|
|
4235
4250
|
}
|
|
4236
4251
|
render() {
|
|
@@ -4247,10 +4262,10 @@ class Q extends g {
|
|
|
4247
4262
|
name: m,
|
|
4248
4263
|
value: f,
|
|
4249
4264
|
title: b,
|
|
4250
|
-
ariaLabel:
|
|
4251
|
-
onClick:
|
|
4252
|
-
} = this.props,
|
|
4253
|
-
return /* @__PURE__ */
|
|
4265
|
+
ariaLabel: g,
|
|
4266
|
+
onClick: w
|
|
4267
|
+
} = this.props, S = (Array.isArray(e) ? e.length > 0 : e != null && typeof e != "boolean") ? e : i ?? "", U = l ? c ?? S : S, C = n || l, V = this.Host;
|
|
4268
|
+
return /* @__PURE__ */ v(V, { className: T(this.props) || null, children: [
|
|
4254
4269
|
/* @__PURE__ */ h(
|
|
4255
4270
|
"button",
|
|
4256
4271
|
{
|
|
@@ -4260,22 +4275,22 @@ class Q extends g {
|
|
|
4260
4275
|
title: b,
|
|
4261
4276
|
type: o,
|
|
4262
4277
|
disabled: C,
|
|
4263
|
-
"aria-label":
|
|
4278
|
+
"aria-label": g,
|
|
4264
4279
|
"aria-pressed": s == null ? null : String(!!s),
|
|
4265
4280
|
"aria-busy": l ? "true" : null,
|
|
4266
4281
|
"aria-invalid": u == null ? null : "true",
|
|
4267
4282
|
"aria-describedby": u == null ? null : this.errorId,
|
|
4268
|
-
onClick: (
|
|
4269
|
-
C || O(
|
|
4283
|
+
onClick: (M) => {
|
|
4284
|
+
C || O(w, M);
|
|
4270
4285
|
},
|
|
4271
|
-
children:
|
|
4286
|
+
children: U
|
|
4272
4287
|
}
|
|
4273
4288
|
),
|
|
4274
|
-
u == null ? null : /* @__PURE__ */ h(
|
|
4289
|
+
u == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: u })
|
|
4275
4290
|
] });
|
|
4276
4291
|
}
|
|
4277
4292
|
}
|
|
4278
|
-
a(Q, "liveProps",
|
|
4293
|
+
a(Q, "liveProps", Ji), a(Q, "dependencies", [E]), a(Q, "hostName", "button"), a(Q, "css", x`
|
|
4279
4294
|
& > button {
|
|
4280
4295
|
display: inline-flex;
|
|
4281
4296
|
align-items: center;
|
|
@@ -4355,10 +4370,10 @@ a(Q, "liveProps", Gi), a(Q, "dependencies", [k]), a(Q, "hostName", "button"), a(
|
|
|
4355
4370
|
}
|
|
4356
4371
|
}
|
|
4357
4372
|
`);
|
|
4358
|
-
const
|
|
4359
|
-
class
|
|
4373
|
+
const Xi = ["showCloseButton"];
|
|
4374
|
+
class nr extends ie {
|
|
4360
4375
|
}
|
|
4361
|
-
class De extends
|
|
4376
|
+
class De extends y {
|
|
4362
4377
|
constructor(e) {
|
|
4363
4378
|
super(e);
|
|
4364
4379
|
a(this, "openEmitter");
|
|
@@ -4368,7 +4383,7 @@ class De extends g {
|
|
|
4368
4383
|
a(this, "dialogElement", null);
|
|
4369
4384
|
a(this, "restoreFocusTo", null);
|
|
4370
4385
|
a(this, "synchronizedOpen", !1);
|
|
4371
|
-
this.openEmitter =
|
|
4386
|
+
this.openEmitter = j(this, e, !1, "dialog open state"), this.dialogId = R("dialog", e.id), this.titleId = `${this.dialogId}-title`, this.descriptionId = `${this.dialogId}-description`;
|
|
4372
4387
|
}
|
|
4373
4388
|
initialize() {
|
|
4374
4389
|
this.watch(this.openEmitter);
|
|
@@ -4383,9 +4398,9 @@ class De extends g {
|
|
|
4383
4398
|
showCloseButton: n = !0,
|
|
4384
4399
|
children: s = []
|
|
4385
4400
|
} = this.props, { content: l, regions: c } = Je("Dialog", s, {
|
|
4386
|
-
actions:
|
|
4401
|
+
actions: nr
|
|
4387
4402
|
}), u = this.Host;
|
|
4388
|
-
return /* @__PURE__ */ h(u, { className:
|
|
4403
|
+
return /* @__PURE__ */ h(u, { className: T(this.props) || null, children: /* @__PURE__ */ v(
|
|
4389
4404
|
"dialog",
|
|
4390
4405
|
{
|
|
4391
4406
|
id: this.dialogId,
|
|
@@ -4397,7 +4412,7 @@ class De extends g {
|
|
|
4397
4412
|
/* @__PURE__ */ h("header", { children: /* @__PURE__ */ h("h2", { id: this.titleId, children: e }) }),
|
|
4398
4413
|
i == null ? null : /* @__PURE__ */ h("p", { id: this.descriptionId, children: i }),
|
|
4399
4414
|
/* @__PURE__ */ h("cap-content", { children: l }),
|
|
4400
|
-
c.actions == null && !n ? null : /* @__PURE__ */
|
|
4415
|
+
c.actions == null && !n ? null : /* @__PURE__ */ v("footer", { children: [
|
|
4401
4416
|
c.actions,
|
|
4402
4417
|
n ? /* @__PURE__ */ h(
|
|
4403
4418
|
Q,
|
|
@@ -4438,7 +4453,7 @@ class De extends g {
|
|
|
4438
4453
|
const i = this.openEmitter.get();
|
|
4439
4454
|
if (i && !e.open) {
|
|
4440
4455
|
const o = document.activeElement;
|
|
4441
|
-
this.restoreFocusTo = o instanceof HTMLElement ? o : null,
|
|
4456
|
+
this.restoreFocusTo = o instanceof HTMLElement ? o : null, Zi(e), this.synchronizedOpen = !0, eo(e, this.props.initialFocusRef);
|
|
4442
4457
|
return;
|
|
4443
4458
|
}
|
|
4444
4459
|
if (!i && e.open) {
|
|
@@ -4454,7 +4469,7 @@ class De extends g {
|
|
|
4454
4469
|
this.restoreFocusTo = null, (e == null ? void 0 : e.isConnected) === !0 && e.focus(), O(this.props.onClose);
|
|
4455
4470
|
}
|
|
4456
4471
|
}
|
|
4457
|
-
a(De, "liveProps",
|
|
4472
|
+
a(De, "liveProps", Xi), a(De, "hostName", "dialog"), a(De, "dependencies", [Q, nr]), a(De, "css", x`
|
|
4458
4473
|
& > dialog {
|
|
4459
4474
|
z-index: 2;
|
|
4460
4475
|
width: min(38rem, calc(100vw - 2rem));
|
|
@@ -4529,7 +4544,7 @@ a(De, "liveProps", Yi), a(De, "hostName", "dialog"), a(De, "dependencies", [Q, i
|
|
|
4529
4544
|
}
|
|
4530
4545
|
}
|
|
4531
4546
|
`);
|
|
4532
|
-
function
|
|
4547
|
+
function Zi(t) {
|
|
4533
4548
|
if (!t.open) {
|
|
4534
4549
|
if (typeof t.showModal == "function") {
|
|
4535
4550
|
t.showModal();
|
|
@@ -4538,38 +4553,38 @@ function Ji(t) {
|
|
|
4538
4553
|
t.setAttribute("open", "");
|
|
4539
4554
|
}
|
|
4540
4555
|
}
|
|
4541
|
-
function
|
|
4556
|
+
function eo(t, r) {
|
|
4542
4557
|
const i = (r == null || typeof r == "function" ? null : r.current) ?? t.querySelector(
|
|
4543
4558
|
'[autofocus], button, input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
4544
4559
|
);
|
|
4545
4560
|
i == null || i.focus();
|
|
4546
4561
|
}
|
|
4547
|
-
const G = class G extends
|
|
4562
|
+
const G = class G extends P {
|
|
4548
4563
|
constructor(r = {}) {
|
|
4549
4564
|
super({ ...r, symbols: G.symbols });
|
|
4550
4565
|
}
|
|
4551
4566
|
};
|
|
4552
4567
|
a(G, "hostName", "quadcheckbox"), a(G, "symbols", [
|
|
4553
|
-
["×",
|
|
4554
|
-
["☐",
|
|
4555
|
-
["✓",
|
|
4556
|
-
["+",
|
|
4557
|
-
]), a(G, "defaultSemanticState",
|
|
4558
|
-
let
|
|
4559
|
-
const Y = class Y extends
|
|
4568
|
+
["×", k.Deny],
|
|
4569
|
+
["☐", k.Neutral],
|
|
4570
|
+
["✓", k.Prefer],
|
|
4571
|
+
["+", k.Require]
|
|
4572
|
+
]), a(G, "defaultSemanticState", k.Neutral);
|
|
4573
|
+
let ar = G;
|
|
4574
|
+
const Y = class Y extends P {
|
|
4560
4575
|
constructor(r = {}) {
|
|
4561
4576
|
super({ ...r, symbols: Y.symbols });
|
|
4562
4577
|
}
|
|
4563
4578
|
};
|
|
4564
4579
|
a(Y, "hostName", "tricheckbox"), a(Y, "symbols", [
|
|
4565
|
-
["×",
|
|
4566
|
-
["☐",
|
|
4567
|
-
["✓",
|
|
4568
|
-
]), a(Y, "defaultSemanticState",
|
|
4569
|
-
let
|
|
4570
|
-
class
|
|
4571
|
-
}
|
|
4572
|
-
a(
|
|
4580
|
+
["×", k.Deny],
|
|
4581
|
+
["☐", k.Neutral],
|
|
4582
|
+
["✓", k.Prefer]
|
|
4583
|
+
]), a(Y, "defaultSemanticState", k.Neutral);
|
|
4584
|
+
let sr = Y;
|
|
4585
|
+
class Ee extends y {
|
|
4586
|
+
}
|
|
4587
|
+
a(Ee, "css", x`
|
|
4573
4588
|
& {
|
|
4574
4589
|
display: flex;
|
|
4575
4590
|
flex-flow: row nowrap;
|
|
@@ -4596,9 +4611,9 @@ a(ke, "css", w`
|
|
|
4596
4611
|
}
|
|
4597
4612
|
|
|
4598
4613
|
`);
|
|
4599
|
-
class
|
|
4614
|
+
class $r extends Ee {
|
|
4600
4615
|
}
|
|
4601
|
-
a(
|
|
4616
|
+
a($r, "css", x`
|
|
4602
4617
|
& {
|
|
4603
4618
|
display: grid;
|
|
4604
4619
|
grid-template-columns: minmax(var(--input-min-width, 6rem), 1fr);
|
|
@@ -4746,8 +4761,8 @@ a(Cr, "css", w`
|
|
|
4746
4761
|
}
|
|
4747
4762
|
}
|
|
4748
4763
|
`);
|
|
4749
|
-
const
|
|
4750
|
-
class de extends
|
|
4764
|
+
const to = ["disabled", "required", "busy", "error"];
|
|
4765
|
+
class de extends $r {
|
|
4751
4766
|
constructor(e = {}) {
|
|
4752
4767
|
var n;
|
|
4753
4768
|
super(e);
|
|
@@ -4756,14 +4771,14 @@ class de extends Cr {
|
|
|
4756
4771
|
a(this, "optionsEmitter");
|
|
4757
4772
|
a(this, "valueEmitter");
|
|
4758
4773
|
a(this, "ownsOptionsEmitter");
|
|
4759
|
-
this.inputId =
|
|
4774
|
+
this.inputId = R("dropdown", e.id), this.errorId = `${this.inputId}-error`;
|
|
4760
4775
|
const i = e.options ?? [];
|
|
4761
|
-
|
|
4776
|
+
ro(i) ? (this.optionsEmitter = i, this.ownsOptionsEmitter = !1) : (_e(i), this.optionsEmitter = new $(i, {
|
|
4762
4777
|
owner: this,
|
|
4763
4778
|
purpose: "dropdown options"
|
|
4764
4779
|
}), this.ownsOptionsEmitter = !0);
|
|
4765
4780
|
const o = ((n = this.optionsEmitter.get()[0]) == null ? void 0 : n.value) ?? "";
|
|
4766
|
-
this.valueEmitter =
|
|
4781
|
+
this.valueEmitter = j(this, e, o, "dropdown value");
|
|
4767
4782
|
}
|
|
4768
4783
|
initialize() {
|
|
4769
4784
|
this.watch(this.valueEmitter, this.optionsEmitter);
|
|
@@ -4780,14 +4795,14 @@ class de extends Cr {
|
|
|
4780
4795
|
ariaLabel: u
|
|
4781
4796
|
} = this.props, p = this.optionsEmitter.get() ?? [];
|
|
4782
4797
|
_e(p);
|
|
4783
|
-
const m = this.valueEmitter.get(), f = this.optionsEmitter.getFetchState(), b = !this.ownsOptionsEmitter && (f === I.Initial || f === I.Loading),
|
|
4784
|
-
return /* @__PURE__ */
|
|
4785
|
-
|
|
4798
|
+
const m = this.valueEmitter.get(), f = this.optionsEmitter.getFetchState(), b = !this.ownsOptionsEmitter && (f === I.Initial || f === I.Loading), g = !this.ownsOptionsEmitter && f === I.Error, w = g ? this.optionsEmitter.getError() : null, z = l ?? (g ? w ?? this.capillaryUiMessage("dropdownLoadError") : null), S = s || b, U = this.Host;
|
|
4799
|
+
return /* @__PURE__ */ v(
|
|
4800
|
+
U,
|
|
4786
4801
|
{
|
|
4787
4802
|
className: this.hostClass(),
|
|
4788
4803
|
children: [
|
|
4789
4804
|
e == null ? null : /* @__PURE__ */ h("label", { htmlFor: this.inputId, children: e }),
|
|
4790
|
-
/* @__PURE__ */ h("cap-selectshell", { children: /* @__PURE__ */
|
|
4805
|
+
/* @__PURE__ */ h("cap-selectshell", { children: /* @__PURE__ */ v(
|
|
4791
4806
|
"select",
|
|
4792
4807
|
{
|
|
4793
4808
|
id: this.inputId,
|
|
@@ -4796,9 +4811,9 @@ class de extends Cr {
|
|
|
4796
4811
|
disabled: o,
|
|
4797
4812
|
required: n,
|
|
4798
4813
|
"aria-label": e == null ? u : null,
|
|
4799
|
-
"aria-busy":
|
|
4800
|
-
"aria-invalid":
|
|
4801
|
-
"aria-describedby":
|
|
4814
|
+
"aria-busy": S ? "true" : null,
|
|
4815
|
+
"aria-invalid": z == null ? null : "true",
|
|
4816
|
+
"aria-describedby": z == null ? null : this.errorId,
|
|
4802
4817
|
onChange: (C) => this.selectOption(C),
|
|
4803
4818
|
children: [
|
|
4804
4819
|
m == null || m === "" ? /* @__PURE__ */ h("option", { value: "", disabled: n, selected: !0, children: c }) : null,
|
|
@@ -4819,14 +4834,14 @@ class de extends Cr {
|
|
|
4819
4834
|
]
|
|
4820
4835
|
}
|
|
4821
4836
|
) }),
|
|
4822
|
-
|
|
4837
|
+
z == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: z })
|
|
4823
4838
|
]
|
|
4824
4839
|
}
|
|
4825
4840
|
);
|
|
4826
4841
|
}
|
|
4827
4842
|
/** Host class list. Subclasses may prepend a stable marker class. */
|
|
4828
4843
|
hostClass() {
|
|
4829
|
-
return
|
|
4844
|
+
return T(this.props);
|
|
4830
4845
|
}
|
|
4831
4846
|
/** Resolve the rendered label for one option. */
|
|
4832
4847
|
optionLabel(e) {
|
|
@@ -4834,7 +4849,7 @@ class de extends Cr {
|
|
|
4834
4849
|
}
|
|
4835
4850
|
/** Handle a native select change: resolve the option, update the value, emit. */
|
|
4836
4851
|
selectOption(e) {
|
|
4837
|
-
const i =
|
|
4852
|
+
const i = io(e, "dropdown change"), n = (this.optionsEmitter.get() ?? []).find(({ value: l }) => String(l) === i), s = (n == null ? void 0 : n.value) ?? i;
|
|
4838
4853
|
this.valueEmitter.set(s, "dropdown selection"), this.emitChange(s, n, e);
|
|
4839
4854
|
}
|
|
4840
4855
|
/** Emit the public change callback. Subclasses may forward extra detail. */
|
|
@@ -4842,24 +4857,24 @@ class de extends Cr {
|
|
|
4842
4857
|
O(this.props.onChange, e, o);
|
|
4843
4858
|
}
|
|
4844
4859
|
}
|
|
4845
|
-
a(de, "liveProps",
|
|
4846
|
-
function
|
|
4860
|
+
a(de, "liveProps", to), a(de, "dependencies", [E]), a(de, "hostName", "dropdown"), a(de, "css", "");
|
|
4861
|
+
function ro(t) {
|
|
4847
4862
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function" && typeof Reflect.get(t, "getFetchState") == "function" && typeof Reflect.get(t, "getError") == "function";
|
|
4848
4863
|
}
|
|
4849
|
-
function
|
|
4864
|
+
function io(t, r) {
|
|
4850
4865
|
const e = t.currentTarget;
|
|
4851
4866
|
if (e == null || typeof Reflect.get(e, "value") != "string")
|
|
4852
4867
|
throw new TypeError(`${r} requires a value-bearing event target`);
|
|
4853
4868
|
return Reflect.get(e, "value");
|
|
4854
4869
|
}
|
|
4855
|
-
const
|
|
4856
|
-
class
|
|
4870
|
+
const oo = ["text"];
|
|
4871
|
+
class no extends y {
|
|
4857
4872
|
render() {
|
|
4858
4873
|
const { text: r, htmlFor: e, children: i } = this.props;
|
|
4859
4874
|
return /* @__PURE__ */ h(
|
|
4860
4875
|
"label",
|
|
4861
4876
|
{
|
|
4862
|
-
className:
|
|
4877
|
+
className: T(this.props) || void 0,
|
|
4863
4878
|
htmlFor: e,
|
|
4864
4879
|
"data-cap-component": "label",
|
|
4865
4880
|
children: r ?? i
|
|
@@ -4867,14 +4882,14 @@ class io extends g {
|
|
|
4867
4882
|
);
|
|
4868
4883
|
}
|
|
4869
4884
|
}
|
|
4870
|
-
a(
|
|
4871
|
-
const
|
|
4885
|
+
a(no, "liveProps", oo);
|
|
4886
|
+
const ao = ["checked", "disabled", "required", "busy", "error"], so = ["disabled", "required", "busy", "error"];
|
|
4872
4887
|
class W extends Ct {
|
|
4873
4888
|
constructor(e = {}) {
|
|
4874
4889
|
super(e);
|
|
4875
4890
|
a(this, "inputId");
|
|
4876
4891
|
a(this, "errorId");
|
|
4877
|
-
this.inputId =
|
|
4892
|
+
this.inputId = R("radio", e.id), this.errorId = `${this.inputId}-error`;
|
|
4878
4893
|
}
|
|
4879
4894
|
render() {
|
|
4880
4895
|
const {
|
|
@@ -4885,8 +4900,8 @@ class W extends Ct {
|
|
|
4885
4900
|
busy: s = !1,
|
|
4886
4901
|
error: l = null
|
|
4887
4902
|
} = this.props, c = this.Host;
|
|
4888
|
-
return /* @__PURE__ */
|
|
4889
|
-
/* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ v(c, { className: T(this.props) || null, children: [
|
|
4904
|
+
/* @__PURE__ */ v("label", { htmlFor: this.inputId, children: [
|
|
4890
4905
|
/* @__PURE__ */ h(
|
|
4891
4906
|
"input",
|
|
4892
4907
|
{
|
|
@@ -4910,11 +4925,11 @@ class W extends Ct {
|
|
|
4910
4925
|
/* @__PURE__ */ h("cap-checkshell", { "aria-hidden": "true" }),
|
|
4911
4926
|
e
|
|
4912
4927
|
] }),
|
|
4913
|
-
l == null ? null : /* @__PURE__ */ h(
|
|
4928
|
+
l == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: l })
|
|
4914
4929
|
] });
|
|
4915
4930
|
}
|
|
4916
4931
|
}
|
|
4917
|
-
a(W, "liveProps",
|
|
4932
|
+
a(W, "liveProps", ao), a(W, "dependencies", [E]), a(W, "hostName", "radio-button"), a(W, "css", x`
|
|
4918
4933
|
& > label > input[type="radio"] + cap-checkshell {
|
|
4919
4934
|
border-radius: 50%;
|
|
4920
4935
|
}
|
|
@@ -4927,7 +4942,7 @@ a(W, "liveProps", oo), a(W, "dependencies", [k]), a(W, "hostName", "radio-button
|
|
|
4927
4942
|
background: var(--checkbox-symbol-color);
|
|
4928
4943
|
}
|
|
4929
4944
|
`);
|
|
4930
|
-
class Me extends
|
|
4945
|
+
class Me extends y {
|
|
4931
4946
|
constructor(e = {}) {
|
|
4932
4947
|
var n;
|
|
4933
4948
|
super(e);
|
|
@@ -4937,7 +4952,7 @@ class Me extends g {
|
|
|
4937
4952
|
const i = e.options ?? [];
|
|
4938
4953
|
et(i);
|
|
4939
4954
|
const o = ((n = i[0]) == null ? void 0 : n[0]) ?? null;
|
|
4940
|
-
this.valueEmitter =
|
|
4955
|
+
this.valueEmitter = j(this, e, o, "radio group value"), this.groupId = R("radio-group", e.id), this.errorId = `${this.groupId}-error`;
|
|
4941
4956
|
}
|
|
4942
4957
|
initialize() {
|
|
4943
4958
|
this.watch(this.valueEmitter);
|
|
@@ -4960,12 +4975,12 @@ class Me extends g {
|
|
|
4960
4975
|
} = this.props;
|
|
4961
4976
|
et(e);
|
|
4962
4977
|
const c = this.valueEmitter.get(), u = this.Host;
|
|
4963
|
-
return /* @__PURE__ */
|
|
4978
|
+
return /* @__PURE__ */ v(
|
|
4964
4979
|
u,
|
|
4965
4980
|
{
|
|
4966
|
-
className:
|
|
4981
|
+
className: T(this.props) || null,
|
|
4967
4982
|
children: [
|
|
4968
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ v(
|
|
4969
4984
|
"fieldset",
|
|
4970
4985
|
{
|
|
4971
4986
|
id: this.groupId,
|
|
@@ -4988,8 +5003,8 @@ class Me extends g {
|
|
|
4988
5003
|
disabled: o,
|
|
4989
5004
|
required: n,
|
|
4990
5005
|
busy: s && l == null,
|
|
4991
|
-
onChange: (b,
|
|
4992
|
-
b && this.selectOption(p,
|
|
5006
|
+
onChange: (b, g) => {
|
|
5007
|
+
b && this.selectOption(p, g);
|
|
4993
5008
|
}
|
|
4994
5009
|
},
|
|
4995
5010
|
String(p)
|
|
@@ -4997,7 +5012,7 @@ class Me extends g {
|
|
|
4997
5012
|
]
|
|
4998
5013
|
}
|
|
4999
5014
|
),
|
|
5000
|
-
l == null ? null : /* @__PURE__ */ h(
|
|
5015
|
+
l == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: l })
|
|
5001
5016
|
]
|
|
5002
5017
|
}
|
|
5003
5018
|
);
|
|
@@ -5010,7 +5025,7 @@ class Me extends g {
|
|
|
5010
5025
|
);
|
|
5011
5026
|
}
|
|
5012
5027
|
}
|
|
5013
|
-
a(Me, "dependencies", [W,
|
|
5028
|
+
a(Me, "dependencies", [W, E]), a(Me, "liveProps", so), a(Me, "hostName", "radio-group"), a(Me, "css", x`
|
|
5014
5029
|
& > fieldset {
|
|
5015
5030
|
display: flex;
|
|
5016
5031
|
flex-flow: column wrap;
|
|
@@ -5054,14 +5069,14 @@ function et(t) {
|
|
|
5054
5069
|
if (!Array.isArray(r) || r.length < 2)
|
|
5055
5070
|
throw new TypeError("Radio group options must be [value, label] tuples");
|
|
5056
5071
|
}
|
|
5057
|
-
const
|
|
5058
|
-
class Ae extends
|
|
5072
|
+
const lo = ["disabled", "required", "readOnly", "busy", "error"];
|
|
5073
|
+
class Ae extends Ee {
|
|
5059
5074
|
constructor(e = {}) {
|
|
5060
5075
|
super(e);
|
|
5061
5076
|
a(this, "inputId");
|
|
5062
5077
|
a(this, "errorId");
|
|
5063
5078
|
a(this, "valueEmitter");
|
|
5064
|
-
this.inputId =
|
|
5079
|
+
this.inputId = R("textbox", e.id), this.errorId = `${this.inputId}-error`, this.valueEmitter = j(this, e, "", "textbox value");
|
|
5065
5080
|
}
|
|
5066
5081
|
initialize() {
|
|
5067
5082
|
this.watch(this.valueEmitter);
|
|
@@ -5080,14 +5095,14 @@ class Ae extends ke {
|
|
|
5080
5095
|
autoComplete: m,
|
|
5081
5096
|
inputMode: f,
|
|
5082
5097
|
minLength: b,
|
|
5083
|
-
maxLength:
|
|
5084
|
-
pattern:
|
|
5085
|
-
ariaLabel:
|
|
5086
|
-
inputRef:
|
|
5087
|
-
onInput:
|
|
5098
|
+
maxLength: g,
|
|
5099
|
+
pattern: w,
|
|
5100
|
+
ariaLabel: z,
|
|
5101
|
+
inputRef: S,
|
|
5102
|
+
onInput: U,
|
|
5088
5103
|
onChange: C
|
|
5089
|
-
} = this.props, V = this.valueEmitter.get() ?? "",
|
|
5090
|
-
return /* @__PURE__ */
|
|
5104
|
+
} = this.props, V = this.valueEmitter.get() ?? "", M = this.Host;
|
|
5105
|
+
return /* @__PURE__ */ v(M, { className: T(this.props) || null, children: [
|
|
5091
5106
|
e == null ? null : /* @__PURE__ */ h("label", { htmlFor: this.inputId, children: e }),
|
|
5092
5107
|
/* @__PURE__ */ h(
|
|
5093
5108
|
"input",
|
|
@@ -5103,29 +5118,29 @@ class Ae extends ke {
|
|
|
5103
5118
|
autoComplete: m,
|
|
5104
5119
|
inputMode: f,
|
|
5105
5120
|
minLength: b,
|
|
5106
|
-
maxLength:
|
|
5107
|
-
pattern:
|
|
5108
|
-
ref:
|
|
5109
|
-
"aria-label": e == null ?
|
|
5121
|
+
maxLength: g,
|
|
5122
|
+
pattern: w,
|
|
5123
|
+
ref: S,
|
|
5124
|
+
"aria-label": e == null ? z : null,
|
|
5110
5125
|
"aria-busy": u ? "true" : null,
|
|
5111
5126
|
"aria-invalid": p == null ? null : "true",
|
|
5112
5127
|
"aria-describedby": p == null ? null : this.errorId,
|
|
5113
5128
|
onInput: (N) => {
|
|
5114
|
-
const H =
|
|
5115
|
-
this.valueEmitter.set(H, "textbox input"), O(
|
|
5129
|
+
const H = lr(N, "textbox input");
|
|
5130
|
+
this.valueEmitter.set(H, "textbox input"), O(U, H, N);
|
|
5116
5131
|
},
|
|
5117
5132
|
onChange: (N) => O(
|
|
5118
5133
|
C,
|
|
5119
|
-
|
|
5134
|
+
lr(N, "textbox change"),
|
|
5120
5135
|
N
|
|
5121
5136
|
)
|
|
5122
5137
|
}
|
|
5123
5138
|
),
|
|
5124
|
-
p == null ? null : /* @__PURE__ */ h(
|
|
5139
|
+
p == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: p })
|
|
5125
5140
|
] });
|
|
5126
5141
|
}
|
|
5127
5142
|
}
|
|
5128
|
-
a(Ae, "liveProps",
|
|
5143
|
+
a(Ae, "liveProps", lo), a(Ae, "dependencies", [E]), a(Ae, "hostName", "textbox"), a(Ae, "css", x`
|
|
5129
5144
|
& {
|
|
5130
5145
|
display: grid;
|
|
5131
5146
|
grid-template-columns: minmax(var(--input-min-width, 6rem), 1fr);
|
|
@@ -5202,14 +5217,14 @@ a(Ae, "liveProps", ao), a(Ae, "dependencies", [k]), a(Ae, "hostName", "textbox")
|
|
|
5202
5217
|
}
|
|
5203
5218
|
}
|
|
5204
5219
|
`);
|
|
5205
|
-
function
|
|
5220
|
+
function lr(t, r) {
|
|
5206
5221
|
const e = t.currentTarget;
|
|
5207
5222
|
if (e == null || typeof Reflect.get(e, "value") != "string")
|
|
5208
5223
|
throw new TypeError(`${r} requires a value-bearing event target`);
|
|
5209
5224
|
return Reflect.get(e, "value");
|
|
5210
5225
|
}
|
|
5211
|
-
const
|
|
5212
|
-
class qe extends
|
|
5226
|
+
const co = ["disabled", "required", "busy", "error"];
|
|
5227
|
+
class qe extends Ee {
|
|
5213
5228
|
constructor(e = {}) {
|
|
5214
5229
|
var n;
|
|
5215
5230
|
super(e);
|
|
@@ -5220,12 +5235,12 @@ class qe extends ke {
|
|
|
5220
5235
|
const i = e.options ?? [];
|
|
5221
5236
|
tt(i);
|
|
5222
5237
|
const o = ((n = i[0]) == null ? void 0 : n[0]) ?? null;
|
|
5223
|
-
this.valueEmitter =
|
|
5238
|
+
this.valueEmitter = j(
|
|
5224
5239
|
this,
|
|
5225
5240
|
e,
|
|
5226
5241
|
o ?? null,
|
|
5227
5242
|
"toggle value"
|
|
5228
|
-
), this.groupId =
|
|
5243
|
+
), this.groupId = R("toggle", e.id), this.legendId = `${this.groupId}-label`, this.errorId = `${this.groupId}-error`;
|
|
5229
5244
|
}
|
|
5230
5245
|
initialize() {
|
|
5231
5246
|
this.selectFirstAvailableOption(this.props.options ?? []), this.watch(this.valueEmitter);
|
|
@@ -5251,7 +5266,7 @@ class qe extends ke {
|
|
|
5251
5266
|
0,
|
|
5252
5267
|
e.findIndex(([m]) => Object.is(m, c))
|
|
5253
5268
|
), p = this.Host;
|
|
5254
|
-
return /* @__PURE__ */
|
|
5269
|
+
return /* @__PURE__ */ v(p, { id: this.groupId, className: T(this.props) || null, children: [
|
|
5255
5270
|
i == null ? null : /* @__PURE__ */ h("cap-label", { id: this.legendId, children: i }),
|
|
5256
5271
|
/* @__PURE__ */ h(
|
|
5257
5272
|
"cap-options",
|
|
@@ -5271,15 +5286,15 @@ class qe extends ke {
|
|
|
5271
5286
|
disabled: o,
|
|
5272
5287
|
"aria-checked": Object.is(c, m) ? "true" : "false",
|
|
5273
5288
|
tabIndex: b === u ? 0 : -1,
|
|
5274
|
-
onClick: (
|
|
5275
|
-
onKeyDown: (
|
|
5289
|
+
onClick: (g) => this.selectOption(m, g),
|
|
5290
|
+
onKeyDown: (g) => this.handleKeyDown(g, b, e),
|
|
5276
5291
|
children: f
|
|
5277
5292
|
},
|
|
5278
5293
|
String(m)
|
|
5279
5294
|
))
|
|
5280
5295
|
}
|
|
5281
5296
|
),
|
|
5282
|
-
l == null ? null : /* @__PURE__ */ h(
|
|
5297
|
+
l == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: l })
|
|
5283
5298
|
] });
|
|
5284
5299
|
}
|
|
5285
5300
|
handleKeyDown(e, i, o) {
|
|
@@ -5306,7 +5321,7 @@ class qe extends ke {
|
|
|
5306
5321
|
);
|
|
5307
5322
|
}
|
|
5308
5323
|
}
|
|
5309
|
-
a(qe, "liveProps",
|
|
5324
|
+
a(qe, "liveProps", co), a(qe, "dependencies", [E]), a(qe, "hostName", "toggle"), a(qe, "css", x`
|
|
5310
5325
|
& {
|
|
5311
5326
|
min-height: var(--control-min-height, 2em);
|
|
5312
5327
|
display: flex;
|
|
@@ -5474,15 +5489,15 @@ function tt(t) {
|
|
|
5474
5489
|
if (!Array.isArray(r) || r.length < 2)
|
|
5475
5490
|
throw new TypeError("Toggle options must be [value, label] tuples");
|
|
5476
5491
|
}
|
|
5477
|
-
const
|
|
5478
|
-
class Z extends
|
|
5492
|
+
const uo = ["disabled", "required", "readOnly", "busy", "error"];
|
|
5493
|
+
class Z extends Ee {
|
|
5479
5494
|
constructor(e) {
|
|
5480
5495
|
super(e);
|
|
5481
5496
|
a(this, "inputId");
|
|
5482
5497
|
a(this, "errorId");
|
|
5483
5498
|
a(this, "valueEmitter");
|
|
5484
5499
|
const i = this.constructor.hostName;
|
|
5485
|
-
this.inputId =
|
|
5500
|
+
this.inputId = R(i ?? "temporal", e.id), this.errorId = `${this.inputId}-error`, this.valueEmitter = j(this, e, null, `${i ?? "temporal"} value`);
|
|
5486
5501
|
}
|
|
5487
5502
|
initialize() {
|
|
5488
5503
|
this.watch(this.valueEmitter);
|
|
@@ -5507,9 +5522,9 @@ class Z extends ke {
|
|
|
5507
5522
|
min: m,
|
|
5508
5523
|
max: f,
|
|
5509
5524
|
step: b,
|
|
5510
|
-
inputRef:
|
|
5511
|
-
} = this.props,
|
|
5512
|
-
return /* @__PURE__ */
|
|
5525
|
+
inputRef: g
|
|
5526
|
+
} = this.props, w = this.valueEmitter.get(), z = this.Host;
|
|
5527
|
+
return /* @__PURE__ */ v(z, { className: T(this.props) || null, children: [
|
|
5513
5528
|
e == null ? null : /* @__PURE__ */ h("label", { htmlFor: this.inputId, children: e }),
|
|
5514
5529
|
/* @__PURE__ */ h(
|
|
5515
5530
|
"input",
|
|
@@ -5517,7 +5532,7 @@ class Z extends ke {
|
|
|
5517
5532
|
id: this.inputId,
|
|
5518
5533
|
name: o,
|
|
5519
5534
|
type: this.inputType,
|
|
5520
|
-
value:
|
|
5535
|
+
value: w ?? "",
|
|
5521
5536
|
min: m,
|
|
5522
5537
|
max: f,
|
|
5523
5538
|
step: b,
|
|
@@ -5525,20 +5540,20 @@ class Z extends ke {
|
|
|
5525
5540
|
disabled: s,
|
|
5526
5541
|
required: l,
|
|
5527
5542
|
readOnly: c,
|
|
5528
|
-
ref:
|
|
5543
|
+
ref: g,
|
|
5529
5544
|
"aria-label": e == null ? i : null,
|
|
5530
5545
|
"aria-busy": u ? "true" : null,
|
|
5531
5546
|
"aria-invalid": p == null ? null : "true",
|
|
5532
5547
|
"aria-describedby": p == null ? null : this.errorId,
|
|
5533
|
-
onInput: (
|
|
5534
|
-
onChange: (
|
|
5548
|
+
onInput: (S) => this.handleEvent(S),
|
|
5549
|
+
onChange: (S) => this.handleEvent(S)
|
|
5535
5550
|
}
|
|
5536
5551
|
),
|
|
5537
|
-
p == null ? null : /* @__PURE__ */ h(
|
|
5552
|
+
p == null ? null : /* @__PURE__ */ h(E, { id: this.errorId, error: p })
|
|
5538
5553
|
] });
|
|
5539
5554
|
}
|
|
5540
5555
|
}
|
|
5541
|
-
a(Z, "liveProps",
|
|
5556
|
+
a(Z, "liveProps", uo), a(Z, "dependencies", [E]), a(Z, "css", x`
|
|
5542
5557
|
& {
|
|
5543
5558
|
display: grid;
|
|
5544
5559
|
grid-template-columns: minmax(var(--input-min-width, 6rem), 1fr);
|
|
@@ -5611,18 +5626,18 @@ a(Z, "liveProps", lo), a(Z, "dependencies", [k]), a(Z, "css", w`
|
|
|
5611
5626
|
}
|
|
5612
5627
|
}
|
|
5613
5628
|
`);
|
|
5614
|
-
const
|
|
5615
|
-
function
|
|
5616
|
-
return typeof t != "string" ? !1 :
|
|
5629
|
+
const Or = /^(\d{4})-(\d{2})-(\d{2})$/, Lt = 864e5;
|
|
5630
|
+
function ho(t) {
|
|
5631
|
+
return typeof t != "string" ? !1 : Or.test(t) && Se(t) != null;
|
|
5617
5632
|
}
|
|
5618
5633
|
function Se(t) {
|
|
5619
5634
|
if (t == null) return null;
|
|
5620
|
-
const r =
|
|
5635
|
+
const r = Or.exec(t);
|
|
5621
5636
|
if (r == null) return null;
|
|
5622
5637
|
const e = Number(r[1]), i = Number(r[2]), o = Number(r[3]), n = Date.UTC(e, i - 1, o), s = new Date(n);
|
|
5623
5638
|
return Number.isNaN(n) || s.getUTCFullYear() !== e || s.getUTCMonth() !== i - 1 || s.getUTCDate() !== o ? null : { year: e, month: i, day: o };
|
|
5624
5639
|
}
|
|
5625
|
-
function
|
|
5640
|
+
function Nr(t) {
|
|
5626
5641
|
const r = String(t.year).padStart(4, "0"), e = String(t.month).padStart(2, "0"), i = String(t.day).padStart(2, "0"), o = `${r}-${e}-${i}`;
|
|
5627
5642
|
if (Se(o) == null)
|
|
5628
5643
|
throw new TypeError(`Invalid civil date: ${o}`);
|
|
@@ -5633,52 +5648,52 @@ function ft(t) {
|
|
|
5633
5648
|
if (r == null) throw new TypeError(`Invalid civil date: ${t}`);
|
|
5634
5649
|
return Math.floor(Date.UTC(r.year, r.month - 1, r.day) / Lt);
|
|
5635
5650
|
}
|
|
5636
|
-
function
|
|
5651
|
+
function po(t) {
|
|
5637
5652
|
if (!Number.isInteger(t)) throw new TypeError("Civil day must be an integer");
|
|
5638
5653
|
return new Date(t * Lt).toISOString().slice(0, 10);
|
|
5639
5654
|
}
|
|
5640
|
-
function
|
|
5655
|
+
function dn(t, r) {
|
|
5641
5656
|
if (!Number.isInteger(r)) throw new TypeError("Civil date offset must be an integer");
|
|
5642
|
-
return
|
|
5657
|
+
return po(ft(t) + r);
|
|
5643
5658
|
}
|
|
5644
|
-
function
|
|
5659
|
+
function un(t = /* @__PURE__ */ new Date()) {
|
|
5645
5660
|
if (!(t instanceof Date) || Number.isNaN(t.getTime()))
|
|
5646
5661
|
throw new TypeError("todayCivilDate requires a valid Date");
|
|
5647
5662
|
return `${String(t.getFullYear()).padStart(4, "0")}-${String(
|
|
5648
5663
|
t.getMonth() + 1
|
|
5649
5664
|
).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
|
|
5650
5665
|
}
|
|
5651
|
-
function
|
|
5666
|
+
function hn(t, r) {
|
|
5652
5667
|
return ft(t) - ft(r);
|
|
5653
5668
|
}
|
|
5654
|
-
function
|
|
5669
|
+
function pn(t, r) {
|
|
5655
5670
|
const e = r === 12 ? { year: t + 1, month: 1 } : { year: t, month: r + 1 }, i = Date.UTC(e.year, e.month - 1, 1);
|
|
5656
5671
|
return new Date(i - Lt).getUTCDate();
|
|
5657
5672
|
}
|
|
5658
|
-
function
|
|
5673
|
+
function mn(t, r) {
|
|
5659
5674
|
return new Date(Date.UTC(t, r - 1, 1)).getUTCDay();
|
|
5660
5675
|
}
|
|
5661
|
-
function
|
|
5676
|
+
function fn(t, r, e) {
|
|
5662
5677
|
const i = t * 12 + (r - 1) + e, o = Math.floor(i / 12), n = (i % 12 + 12) % 12 + 1;
|
|
5663
5678
|
return { year: o, month: n };
|
|
5664
5679
|
}
|
|
5665
|
-
class
|
|
5680
|
+
class mo extends Z {
|
|
5666
5681
|
constructor() {
|
|
5667
5682
|
super(...arguments);
|
|
5668
5683
|
a(this, "inputType", "date");
|
|
5669
5684
|
}
|
|
5670
5685
|
isValidValue(e) {
|
|
5671
|
-
return
|
|
5686
|
+
return ho(e);
|
|
5672
5687
|
}
|
|
5673
5688
|
}
|
|
5674
|
-
a(
|
|
5675
|
-
const
|
|
5676
|
-
function
|
|
5677
|
-
return typeof t != "string" ? !1 :
|
|
5689
|
+
a(mo, "hostName", "datepicker");
|
|
5690
|
+
const Lr = /^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;
|
|
5691
|
+
function fo(t) {
|
|
5692
|
+
return typeof t != "string" ? !1 : Lr.test(t) && Xe(t) != null;
|
|
5678
5693
|
}
|
|
5679
5694
|
function Xe(t) {
|
|
5680
5695
|
if (t == null) return null;
|
|
5681
|
-
const r =
|
|
5696
|
+
const r = Lr.exec(t);
|
|
5682
5697
|
if (r == null) return null;
|
|
5683
5698
|
const e = Number(r[1]), i = Number(r[2]), o = r[3] == null ? 0 : Number(r[3]), n = r[4] == null ? 0 : Number(r[4].padEnd(3, "0"));
|
|
5684
5699
|
return e > 23 || i > 59 || o > 59 ? null : { hours: e, minutes: i, seconds: o, milliseconds: n };
|
|
@@ -5691,68 +5706,68 @@ function Pt(t) {
|
|
|
5691
5706
|
let n = `${i}:${o}`;
|
|
5692
5707
|
return (r !== 0 || e !== 0) && (n += `:${String(r).padStart(2, "0")}`, e !== 0 && (n += `.${String(e).padStart(3, "0")}`)), n;
|
|
5693
5708
|
}
|
|
5694
|
-
function
|
|
5709
|
+
function cr(t) {
|
|
5695
5710
|
const r = Xe(t);
|
|
5696
5711
|
if (r == null) throw new TypeError(`Invalid time: ${t}`);
|
|
5697
5712
|
return r.hours * 60 + r.minutes;
|
|
5698
5713
|
}
|
|
5699
|
-
function
|
|
5714
|
+
function bo(t) {
|
|
5700
5715
|
if (!Number.isInteger(t) || t < 0 || t >= 1440)
|
|
5701
5716
|
throw new TypeError(`Invalid time minutes: ${t}`);
|
|
5702
5717
|
return Pt({ hours: Math.floor(t / 60), minutes: t % 60 });
|
|
5703
5718
|
}
|
|
5704
|
-
function
|
|
5719
|
+
function bn(t, r, e) {
|
|
5705
5720
|
if (!Number.isInteger(e) || e <= 0) throw new TypeError("Time step must be a positive integer");
|
|
5706
|
-
const i = t == null ? 0 :
|
|
5721
|
+
const i = t == null ? 0 : cr(t), o = r == null ? 1439 : cr(r);
|
|
5707
5722
|
if (o < i) throw new TypeError("max time must be >= min time");
|
|
5708
5723
|
const n = [];
|
|
5709
5724
|
for (let s = i; s <= o; s += e) {
|
|
5710
|
-
const l =
|
|
5725
|
+
const l = bo(s);
|
|
5711
5726
|
n.push({ value: l, label: l });
|
|
5712
5727
|
}
|
|
5713
5728
|
return n;
|
|
5714
5729
|
}
|
|
5715
|
-
class
|
|
5730
|
+
class go extends Z {
|
|
5716
5731
|
constructor() {
|
|
5717
5732
|
super(...arguments);
|
|
5718
5733
|
a(this, "inputType", "time");
|
|
5719
5734
|
}
|
|
5720
5735
|
isValidValue(e) {
|
|
5721
|
-
return
|
|
5736
|
+
return fo(e);
|
|
5722
5737
|
}
|
|
5723
5738
|
}
|
|
5724
|
-
a(
|
|
5725
|
-
const
|
|
5726
|
-
function
|
|
5739
|
+
a(go, "hostName", "timepicker");
|
|
5740
|
+
const yo = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?)$/;
|
|
5741
|
+
function wo(t) {
|
|
5727
5742
|
return typeof t == "string" && ye(t) != null;
|
|
5728
5743
|
}
|
|
5729
5744
|
function ye(t) {
|
|
5730
5745
|
if (t == null) return null;
|
|
5731
|
-
const r =
|
|
5746
|
+
const r = yo.exec(t);
|
|
5732
5747
|
if (r == null) return null;
|
|
5733
5748
|
const e = Se(r[1]), i = Xe(r[2]);
|
|
5734
5749
|
return e == null || i == null ? null : { ...e, ...i };
|
|
5735
5750
|
}
|
|
5736
|
-
function
|
|
5737
|
-
return `${
|
|
5751
|
+
function Pr(t) {
|
|
5752
|
+
return `${Nr(t)}T${Pt(t)}`;
|
|
5738
5753
|
}
|
|
5739
|
-
function
|
|
5754
|
+
function gn(t, r) {
|
|
5740
5755
|
const e = ye(t), i = ye(r);
|
|
5741
5756
|
if (e == null || i == null)
|
|
5742
5757
|
throw new TypeError(`Invalid local date-time: ${e == null ? t : r}`);
|
|
5743
5758
|
return e.year - i.year || e.month - i.month || e.day - i.day || e.hours - i.hours || e.minutes - i.minutes || (e.seconds ?? 0) - (i.seconds ?? 0) || (e.milliseconds ?? 0) - (i.milliseconds ?? 0);
|
|
5744
5759
|
}
|
|
5745
|
-
function
|
|
5760
|
+
function yn(t) {
|
|
5746
5761
|
const r = ye(t);
|
|
5747
|
-
return r == null ? null : { date:
|
|
5762
|
+
return r == null ? null : { date: Nr(r), time: Pt(r) };
|
|
5748
5763
|
}
|
|
5749
|
-
function
|
|
5764
|
+
function wn(t, r) {
|
|
5750
5765
|
const e = Se(t);
|
|
5751
5766
|
if (e == null) return null;
|
|
5752
5767
|
const i = r == null ? { hours: 0, minutes: 0 } : Xe(r);
|
|
5753
|
-
return i == null ? null :
|
|
5768
|
+
return i == null ? null : Pr({ ...e, ...i });
|
|
5754
5769
|
}
|
|
5755
|
-
function
|
|
5770
|
+
function vn(t) {
|
|
5756
5771
|
const r = ye(t);
|
|
5757
5772
|
if (r == null) throw new TypeError(`Invalid local date-time: ${t}`);
|
|
5758
5773
|
return new Date(
|
|
@@ -5765,10 +5780,10 @@ function yn(t) {
|
|
|
5765
5780
|
r.milliseconds ?? 0
|
|
5766
5781
|
);
|
|
5767
5782
|
}
|
|
5768
|
-
function
|
|
5783
|
+
function vo(t) {
|
|
5769
5784
|
if (!(t instanceof Date) || Number.isNaN(t.getTime()))
|
|
5770
5785
|
throw new TypeError("dateToLocalDateTime requires a valid Date");
|
|
5771
|
-
return
|
|
5786
|
+
return Pr({
|
|
5772
5787
|
year: t.getFullYear(),
|
|
5773
5788
|
month: t.getMonth() + 1,
|
|
5774
5789
|
day: t.getDate(),
|
|
@@ -5778,20 +5793,20 @@ function yo(t) {
|
|
|
5778
5793
|
milliseconds: t.getMilliseconds()
|
|
5779
5794
|
});
|
|
5780
5795
|
}
|
|
5781
|
-
function
|
|
5782
|
-
return
|
|
5796
|
+
function xn(t = /* @__PURE__ */ new Date()) {
|
|
5797
|
+
return vo(t);
|
|
5783
5798
|
}
|
|
5784
|
-
class
|
|
5799
|
+
class xo extends Z {
|
|
5785
5800
|
constructor() {
|
|
5786
5801
|
super(...arguments);
|
|
5787
5802
|
a(this, "inputType", "datetime-local");
|
|
5788
5803
|
}
|
|
5789
5804
|
isValidValue(e) {
|
|
5790
|
-
return
|
|
5805
|
+
return wo(e);
|
|
5791
5806
|
}
|
|
5792
5807
|
}
|
|
5793
|
-
a(
|
|
5794
|
-
class rt extends
|
|
5808
|
+
a(xo, "hostName", "datetimepicker");
|
|
5809
|
+
class rt extends y {
|
|
5795
5810
|
render() {
|
|
5796
5811
|
const {
|
|
5797
5812
|
children: r = [],
|
|
@@ -5815,7 +5830,7 @@ class rt extends g {
|
|
|
5815
5830
|
);
|
|
5816
5831
|
}
|
|
5817
5832
|
}
|
|
5818
|
-
a(rt, "liveProps", []), a(rt, "hostName", "toolbar"), a(rt, "css",
|
|
5833
|
+
a(rt, "liveProps", []), a(rt, "hostName", "toolbar"), a(rt, "css", x`
|
|
5819
5834
|
& {
|
|
5820
5835
|
display: flex;
|
|
5821
5836
|
flex-wrap: wrap;
|
|
@@ -5838,11 +5853,11 @@ a(rt, "liveProps", []), a(rt, "hostName", "toolbar"), a(rt, "css", w`
|
|
|
5838
5853
|
align-items: stretch;
|
|
5839
5854
|
}
|
|
5840
5855
|
`);
|
|
5841
|
-
class je extends
|
|
5856
|
+
class je extends y {
|
|
5842
5857
|
constructor(e) {
|
|
5843
5858
|
super(e);
|
|
5844
5859
|
a(this, "progressId");
|
|
5845
|
-
if (this.progressId =
|
|
5860
|
+
if (this.progressId = R("progress", e.id), e.valueEmitter != null && !ko(e.valueEmitter))
|
|
5846
5861
|
throw new TypeError("ProgressBar valueEmitter must be a readable emitter");
|
|
5847
5862
|
}
|
|
5848
5863
|
render() {
|
|
@@ -5853,7 +5868,7 @@ class je extends g {
|
|
|
5853
5868
|
if (i != null && (!Number.isFinite(i) || i < 0))
|
|
5854
5869
|
throw new RangeError("ProgressBar value must be null or a non-negative finite number");
|
|
5855
5870
|
const o = i == null ? null : Math.min(i, e), n = o == null ? null : o / e * 100, s = this.props.valueText ?? (o == null ? this.capillaryUiMessage("progressInProgress") : `${Math.round(o / e * 100)}%`), l = this.Host;
|
|
5856
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ v(l, { className: T(this.props) || null, children: [
|
|
5857
5872
|
/* @__PURE__ */ h("label", { htmlFor: this.progressId, children: this.props.label }),
|
|
5858
5873
|
/* @__PURE__ */ h(
|
|
5859
5874
|
"progress",
|
|
@@ -5865,7 +5880,7 @@ class je extends g {
|
|
|
5865
5880
|
children: s
|
|
5866
5881
|
}
|
|
5867
5882
|
),
|
|
5868
|
-
/* @__PURE__ */
|
|
5883
|
+
/* @__PURE__ */ v("cap-content", { "aria-hidden": "true", children: [
|
|
5869
5884
|
/* @__PURE__ */ h(
|
|
5870
5885
|
"cap-progress",
|
|
5871
5886
|
{
|
|
@@ -5881,7 +5896,7 @@ class je extends g {
|
|
|
5881
5896
|
] });
|
|
5882
5897
|
}
|
|
5883
5898
|
}
|
|
5884
|
-
a(je, "liveProps", []), a(je, "dependencies", [be]), a(je, "hostName", "progress-bar"), a(je, "css",
|
|
5899
|
+
a(je, "liveProps", []), a(je, "dependencies", [be]), a(je, "hostName", "progress-bar"), a(je, "css", x`
|
|
5885
5900
|
& {
|
|
5886
5901
|
display: block;
|
|
5887
5902
|
}
|
|
@@ -5994,10 +6009,10 @@ a(je, "liveProps", []), a(je, "dependencies", [be]), a(je, "hostName", "progress
|
|
|
5994
6009
|
}
|
|
5995
6010
|
}
|
|
5996
6011
|
`);
|
|
5997
|
-
function
|
|
6012
|
+
function ko(t) {
|
|
5998
6013
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
5999
6014
|
}
|
|
6000
|
-
const
|
|
6015
|
+
const kn = Object.freeze([
|
|
6001
6016
|
...ot("primary"),
|
|
6002
6017
|
...ot("secondary"),
|
|
6003
6018
|
...ot("neutral"),
|
|
@@ -6146,35 +6161,35 @@ const vn = Object.freeze([
|
|
|
6146
6161
|
d("--block-graph-block-border", "theme", "block graph", "border", "Block graph category border", "--ui-border"),
|
|
6147
6162
|
d("--block-graph-block-radius", "theme", "block graph", "radius", "Block graph category radius", "--radius-sm"),
|
|
6148
6163
|
d("--block-graph-block-shadow", "theme", "block graph", "shadow", "Block graph category depth")
|
|
6149
|
-
]), xo = Object.freeze([
|
|
6150
|
-
nt("shiny", "Shiny", P("themes/shiny/theme.css"), "light"),
|
|
6151
|
-
nt("java", "Java", P("themes/java/theme.css"), "light"),
|
|
6152
|
-
nt("minimal", "Minimal", P("themes/minimal/theme.css"), "adaptive")
|
|
6153
6164
|
]), Eo = Object.freeze([
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
K("
|
|
6159
|
-
K("
|
|
6160
|
-
K("
|
|
6161
|
-
K("
|
|
6165
|
+
nt("shiny", "Shiny", L("themes/shiny/theme.css"), "light"),
|
|
6166
|
+
nt("java", "Java", L("themes/java/theme.css"), "light"),
|
|
6167
|
+
nt("minimal", "Minimal", L("themes/minimal/theme.css"), "adaptive")
|
|
6168
|
+
]), So = Object.freeze([
|
|
6169
|
+
K("iceblue", "Ice blue", L("colors/iceblue/colors.css")),
|
|
6170
|
+
K("ocean", "Ocean", L("colors/ocean/colors.css")),
|
|
6171
|
+
K("green", "Green", L("colors/green/colors.css")),
|
|
6172
|
+
K("gray", "Gray", L("colors/gray/colors.css")),
|
|
6173
|
+
K("orange", "Orange", L("colors/orange/colors.css")),
|
|
6174
|
+
K("purple", "Purple", L("colors/purple/colors.css")),
|
|
6175
|
+
K("red", "Red", L("colors/red/colors.css")),
|
|
6176
|
+
K("yellow", "Yellow", L("colors/yellow/colors.css"))
|
|
6162
6177
|
]);
|
|
6163
|
-
function
|
|
6164
|
-
if (
|
|
6178
|
+
function Io(t, r, e = globalThis.document) {
|
|
6179
|
+
if (To(r), (e == null ? void 0 : e.head) == null || e.documentElement == null)
|
|
6165
6180
|
throw new TypeError("replaceCapillaryUiStylesheet requires a document with a head and root");
|
|
6166
6181
|
const i = `link[data-cap-stylesheet="${t}"]`;
|
|
6167
6182
|
let o = e.head.querySelector(i);
|
|
6168
6183
|
return o == null && (o = e.createElement("link"), o.rel = "stylesheet", o.dataset.capStylesheet = t, e.head.append(o)), o.dataset.capSelection = r.value, o.getAttribute("href") !== r.href && o.setAttribute("href", r.href), t === "theme" ? e.documentElement.dataset.theme = r.value : e.documentElement.dataset.color = r.value, o;
|
|
6169
6184
|
}
|
|
6170
|
-
function
|
|
6185
|
+
function En(t, r = globalThis.document) {
|
|
6171
6186
|
if ((r == null ? void 0 : r.documentElement) == null)
|
|
6172
6187
|
throw new TypeError("setCapillaryUiAppearance requires a document with a root");
|
|
6173
6188
|
if (t !== "light" && t !== "dark" && t !== "system")
|
|
6174
6189
|
throw new TypeError("Capillary UI appearance must be light, dark, or system");
|
|
6175
6190
|
t === "system" ? r.documentElement.removeAttribute("data-appearance") : r.documentElement.dataset.appearance = t;
|
|
6176
6191
|
}
|
|
6177
|
-
function
|
|
6192
|
+
function Sn(t = globalThis.document) {
|
|
6178
6193
|
if ((t == null ? void 0 : t.documentElement) == null)
|
|
6179
6194
|
throw new TypeError("getCapillaryUiAppearance requires a document with a root");
|
|
6180
6195
|
const r = t.documentElement.dataset.appearance;
|
|
@@ -6206,21 +6221,21 @@ function K(t, r, e) {
|
|
|
6206
6221
|
function nt(t, r, e, i) {
|
|
6207
6222
|
return Object.freeze({ value: t, label: r, href: e, appearance: i });
|
|
6208
6223
|
}
|
|
6209
|
-
function
|
|
6224
|
+
function L(t) {
|
|
6210
6225
|
const r = import.meta.url.includes("/src/styling/") ? `../../${t}` : `../${t}`;
|
|
6211
6226
|
return new URL(r, import.meta.url).href;
|
|
6212
6227
|
}
|
|
6213
|
-
function
|
|
6228
|
+
function To(t) {
|
|
6214
6229
|
if (t == null || typeof t != "object")
|
|
6215
6230
|
throw new TypeError("Capillary UI stylesheet selection must be an option");
|
|
6216
6231
|
for (const r of ["value", "label", "href"])
|
|
6217
6232
|
if (typeof Reflect.get(t, r) != "string" || String(Reflect.get(t, r)).length === 0)
|
|
6218
6233
|
throw new TypeError(`Capillary UI stylesheet option ${r} must be a non-empty string`);
|
|
6219
6234
|
}
|
|
6220
|
-
class
|
|
6235
|
+
class Dr extends de {
|
|
6221
6236
|
constructor(e, i, o) {
|
|
6222
6237
|
const n = e.options ?? o;
|
|
6223
|
-
|
|
6238
|
+
zo(n);
|
|
6224
6239
|
const { options: s, targetDocument: l, onChange: c, ...u } = e;
|
|
6225
6240
|
super({
|
|
6226
6241
|
...u,
|
|
@@ -6281,24 +6296,24 @@ class Lr extends de {
|
|
|
6281
6296
|
}
|
|
6282
6297
|
applySelection() {
|
|
6283
6298
|
const e = this.targetDocument ?? (typeof document > "u" ? null : document);
|
|
6284
|
-
e != null &&
|
|
6299
|
+
e != null && Io(
|
|
6285
6300
|
this.kind,
|
|
6286
6301
|
it(this.stylesheetOptions, this.valueEmitter.get()),
|
|
6287
6302
|
e
|
|
6288
6303
|
);
|
|
6289
6304
|
}
|
|
6290
6305
|
}
|
|
6291
|
-
class
|
|
6306
|
+
class In extends Dr {
|
|
6292
6307
|
constructor(r = {}) {
|
|
6293
|
-
super(r, "theme",
|
|
6308
|
+
super(r, "theme", Eo);
|
|
6294
6309
|
}
|
|
6295
6310
|
}
|
|
6296
|
-
class
|
|
6311
|
+
class Tn extends Dr {
|
|
6297
6312
|
constructor(r = {}) {
|
|
6298
|
-
super(r, "colors",
|
|
6313
|
+
super(r, "colors", So);
|
|
6299
6314
|
}
|
|
6300
6315
|
}
|
|
6301
|
-
function
|
|
6316
|
+
function zo(t) {
|
|
6302
6317
|
if (!Array.isArray(t) || t.length === 0)
|
|
6303
6318
|
throw new TypeError("Stylesheet picker options must be a non-empty array");
|
|
6304
6319
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -6313,24 +6328,24 @@ function Io(t) {
|
|
|
6313
6328
|
r.add(e.value);
|
|
6314
6329
|
}
|
|
6315
6330
|
}
|
|
6316
|
-
class
|
|
6331
|
+
class zn {
|
|
6317
6332
|
constructor(r = "/") {
|
|
6318
6333
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
6319
6334
|
a(this, "entries");
|
|
6320
6335
|
a(this, "index", 0);
|
|
6321
|
-
this.entries = [
|
|
6336
|
+
this.entries = [q(r)];
|
|
6322
6337
|
}
|
|
6323
6338
|
read() {
|
|
6324
6339
|
return this.entries[this.index] ?? "/";
|
|
6325
6340
|
}
|
|
6326
6341
|
href(r) {
|
|
6327
|
-
return
|
|
6342
|
+
return q(r);
|
|
6328
6343
|
}
|
|
6329
6344
|
push(r) {
|
|
6330
|
-
this.entries = this.entries.slice(0, this.index + 1), this.entries.push(
|
|
6345
|
+
this.entries = this.entries.slice(0, this.index + 1), this.entries.push(q(r)), this.index += 1;
|
|
6331
6346
|
}
|
|
6332
6347
|
replace(r) {
|
|
6333
|
-
this.entries[this.index] =
|
|
6348
|
+
this.entries[this.index] = q(r);
|
|
6334
6349
|
}
|
|
6335
6350
|
subscribe(r) {
|
|
6336
6351
|
if (typeof r != "function")
|
|
@@ -6354,16 +6369,16 @@ class In {
|
|
|
6354
6369
|
for (const r of [...this.listeners]) r();
|
|
6355
6370
|
}
|
|
6356
6371
|
}
|
|
6357
|
-
function
|
|
6358
|
-
|
|
6359
|
-
const e =
|
|
6372
|
+
function Cn(t = globalThis.window, r = {}) {
|
|
6373
|
+
Mr(t);
|
|
6374
|
+
const e = Co(r.basePath ?? "/");
|
|
6360
6375
|
return {
|
|
6361
6376
|
read() {
|
|
6362
6377
|
const i = t.location.pathname, o = i === e.slice(0, -1) ? "/" : i.startsWith(e) ? `/${i.slice(e.length)}` : i;
|
|
6363
|
-
return
|
|
6378
|
+
return q(`${o}${t.location.search}`);
|
|
6364
6379
|
},
|
|
6365
6380
|
href(i) {
|
|
6366
|
-
const o =
|
|
6381
|
+
const o = q(i);
|
|
6367
6382
|
return `${e}${o.slice(1)}`;
|
|
6368
6383
|
},
|
|
6369
6384
|
push(i) {
|
|
@@ -6377,13 +6392,13 @@ function Tn(t = globalThis.window, r = {}) {
|
|
|
6377
6392
|
}
|
|
6378
6393
|
};
|
|
6379
6394
|
}
|
|
6380
|
-
function
|
|
6381
|
-
return
|
|
6395
|
+
function Rn(t = globalThis.window) {
|
|
6396
|
+
return Mr(t), {
|
|
6382
6397
|
read() {
|
|
6383
|
-
return
|
|
6398
|
+
return q(t.location.hash.slice(1) || "/");
|
|
6384
6399
|
},
|
|
6385
6400
|
href(r) {
|
|
6386
|
-
return `#${
|
|
6401
|
+
return `#${q(r)}`;
|
|
6387
6402
|
},
|
|
6388
6403
|
push(r) {
|
|
6389
6404
|
t.history.pushState(null, "", this.href(r));
|
|
@@ -6403,21 +6418,21 @@ function zn(t = globalThis.window) {
|
|
|
6403
6418
|
}
|
|
6404
6419
|
};
|
|
6405
6420
|
}
|
|
6406
|
-
function
|
|
6421
|
+
function q(t) {
|
|
6407
6422
|
if (typeof t != "string") throw new TypeError("Route location must be a string");
|
|
6408
6423
|
const r = t.indexOf("#"), e = r < 0 ? t : t.slice(0, r), i = e.indexOf("?"), o = i < 0 ? e : e.slice(0, i), n = i < 0 ? "" : e.slice(i);
|
|
6409
6424
|
return `${(o.startsWith("/") ? o : `/${o}`).replace(/\/{2,}/g, "/").replace(/\/$/, "") || "/"}${n}`;
|
|
6410
6425
|
}
|
|
6411
|
-
function
|
|
6412
|
-
const r =
|
|
6426
|
+
function Co(t) {
|
|
6427
|
+
const r = q(t).split("?")[0] ?? "/";
|
|
6413
6428
|
return r === "/" ? "/" : `${r}/`;
|
|
6414
6429
|
}
|
|
6415
|
-
function
|
|
6430
|
+
function Mr(t) {
|
|
6416
6431
|
if (t == null || typeof t != "object" || !("location" in t) || !("history" in t) || !("addEventListener" in t))
|
|
6417
6432
|
throw new TypeError("Browser navigation requires a window-like target");
|
|
6418
6433
|
}
|
|
6419
|
-
const
|
|
6420
|
-
class
|
|
6434
|
+
const Ro = 16;
|
|
6435
|
+
class $o {
|
|
6421
6436
|
constructor(r) {
|
|
6422
6437
|
a(this, "root");
|
|
6423
6438
|
a(this, "transition");
|
|
@@ -6435,7 +6450,7 @@ class Co {
|
|
|
6435
6450
|
a(this, "applying", 0);
|
|
6436
6451
|
a(this, "syncQueued", !1);
|
|
6437
6452
|
a(this, "disposed", !1);
|
|
6438
|
-
this.adapter = r,
|
|
6453
|
+
this.adapter = r, jo(r), this.root = Object.freeze({
|
|
6439
6454
|
route: null,
|
|
6440
6455
|
parent: null,
|
|
6441
6456
|
segment: null,
|
|
@@ -6471,7 +6486,7 @@ class Co {
|
|
|
6471
6486
|
this.assertActive(), _(r, this);
|
|
6472
6487
|
const i = this.scope(r).owners.get(e);
|
|
6473
6488
|
if (i == null) throw new Error("Cannot complete an unopened route scope");
|
|
6474
|
-
|
|
6489
|
+
Oo(this.scope(r)), i.complete = !0, this.wakeRegistry();
|
|
6475
6490
|
}
|
|
6476
6491
|
registerSelectionRoutes(r, e, i, o) {
|
|
6477
6492
|
if (this.assertActive(), _(r, this), Ue(e), !Array.isArray(i)) throw new TypeError("Route bindings must be an array");
|
|
@@ -6490,13 +6505,13 @@ class Co {
|
|
|
6490
6505
|
parent: r,
|
|
6491
6506
|
match: (f) => st(f) === u.route.path ? { value: null } : null,
|
|
6492
6507
|
currentValue: () => u.active() ? null : void 0,
|
|
6493
|
-
activate: async (f, b,
|
|
6508
|
+
activate: async (f, b, g) => {
|
|
6494
6509
|
if (u.disabled)
|
|
6495
6510
|
throw new vt(
|
|
6496
6511
|
`Route "${u.route.id}" is currently disabled`
|
|
6497
6512
|
);
|
|
6498
|
-
if (
|
|
6499
|
-
return await u.activate(
|
|
6513
|
+
if (g.aborted) throw g.reason;
|
|
6514
|
+
return await u.activate(g), f;
|
|
6500
6515
|
},
|
|
6501
6516
|
context: () => p,
|
|
6502
6517
|
disposeSubscription: () => {
|
|
@@ -6518,7 +6533,7 @@ class Co {
|
|
|
6518
6533
|
registerValueRoute(r, e, i) {
|
|
6519
6534
|
if (this.assertActive(), _(r, this), Ue(e), X(i.route), i.route.kind !== "parameter")
|
|
6520
6535
|
throw new TypeError("Value routes require a parameter route descriptor");
|
|
6521
|
-
if (
|
|
6536
|
+
if (hr(i.valueEmitter, "Value route emitter"), i.resolve != null && typeof i.resolve != "function")
|
|
6522
6537
|
throw new TypeError("Value route resolver must be a function");
|
|
6523
6538
|
const o = this.scope(r);
|
|
6524
6539
|
if (o.entries.has(i.route))
|
|
@@ -6553,7 +6568,7 @@ class Co {
|
|
|
6553
6568
|
o.entries.set(i.route, l), this.wakeRegistry();
|
|
6554
6569
|
let c = !0;
|
|
6555
6570
|
return {
|
|
6556
|
-
context:
|
|
6571
|
+
context: qo(i.valueEmitter, n, r),
|
|
6557
6572
|
contextFor: n,
|
|
6558
6573
|
dispose: () => {
|
|
6559
6574
|
if (!c) return;
|
|
@@ -6563,8 +6578,8 @@ class Co {
|
|
|
6563
6578
|
}
|
|
6564
6579
|
registerQuery(r, e, i) {
|
|
6565
6580
|
this.assertActive(), _(r, this), Ue(e);
|
|
6566
|
-
const o =
|
|
6567
|
-
|
|
6581
|
+
const o = Ao(i.name);
|
|
6582
|
+
hr(i.valueEmitter, "Route query emitter"), Qr(i.codec);
|
|
6568
6583
|
const n = i.equals ?? Object.is;
|
|
6569
6584
|
if (typeof n != "function") throw new TypeError("Route query equals must be a function");
|
|
6570
6585
|
const s = this.scope(r);
|
|
@@ -6624,7 +6639,7 @@ class Co {
|
|
|
6624
6639
|
}
|
|
6625
6640
|
isActive(r, e = !1) {
|
|
6626
6641
|
const i = Ke(r) ? r : this.resolveTargetContext(ct(r));
|
|
6627
|
-
return e ? i === this.activeContext :
|
|
6642
|
+
return e ? i === this.activeContext : ur(i, this.activeContext);
|
|
6628
6643
|
}
|
|
6629
6644
|
dispose() {
|
|
6630
6645
|
var r;
|
|
@@ -6659,7 +6674,7 @@ class Co {
|
|
|
6659
6674
|
const u = await this.waitForCompleteScope(n, o);
|
|
6660
6675
|
let p;
|
|
6661
6676
|
try {
|
|
6662
|
-
p =
|
|
6677
|
+
p = No(u, c);
|
|
6663
6678
|
} catch (f) {
|
|
6664
6679
|
this.fallback(r, n, null, lt(f));
|
|
6665
6680
|
return;
|
|
@@ -6675,7 +6690,7 @@ class Co {
|
|
|
6675
6690
|
try {
|
|
6676
6691
|
const f = await p.entry.activate(p.match, m, o);
|
|
6677
6692
|
if (f instanceof dt) {
|
|
6678
|
-
if (i >=
|
|
6693
|
+
if (i >= Ro) {
|
|
6679
6694
|
this.fallback(r, n, p.entry.descriptor, "Too many route redirects");
|
|
6680
6695
|
return;
|
|
6681
6696
|
}
|
|
@@ -6709,7 +6724,7 @@ class Co {
|
|
|
6709
6724
|
for (; ; ) {
|
|
6710
6725
|
if (e.aborted) throw e.reason;
|
|
6711
6726
|
const i = this.scopes.get(r);
|
|
6712
|
-
if (i != null &&
|
|
6727
|
+
if (i != null && Lo(i)) return i;
|
|
6713
6728
|
await this.waitForRegistryChange(e);
|
|
6714
6729
|
}
|
|
6715
6730
|
}
|
|
@@ -6758,7 +6773,7 @@ class Co {
|
|
|
6758
6773
|
return this.cachedContext(r, e, o, i);
|
|
6759
6774
|
}
|
|
6760
6775
|
cachedContext(r, e, i, o) {
|
|
6761
|
-
const n =
|
|
6776
|
+
const n = Do(r.pathname, i), s = `${Mo(r)}\0${e.id}\0${i}`, l = this.contextCache.get(s);
|
|
6762
6777
|
if (l != null) return l;
|
|
6763
6778
|
const c = Object.freeze({ route: e, parent: r, segment: i, value: o, pathname: n });
|
|
6764
6779
|
return Qe.set(c, this), this.contextCache.set(s, c), c;
|
|
@@ -6808,7 +6823,7 @@ class Co {
|
|
|
6808
6823
|
formatContext(r) {
|
|
6809
6824
|
const e = new URLSearchParams(this.requested.search);
|
|
6810
6825
|
for (const o of this.knownQueryNames) e.delete(o);
|
|
6811
|
-
for (const o of
|
|
6826
|
+
for (const o of dr(r)) {
|
|
6812
6827
|
const n = this.scopes.get(o);
|
|
6813
6828
|
if (n != null)
|
|
6814
6829
|
for (const s of [...n.queries.values()].sort((l, c) => l.name.localeCompare(c.name))) {
|
|
@@ -6824,7 +6839,7 @@ class Co {
|
|
|
6824
6839
|
return `${r.pathname}${i === "" ? "" : `?${i}`}`;
|
|
6825
6840
|
}
|
|
6826
6841
|
applyQueriesInLineage(r, e) {
|
|
6827
|
-
for (const i of
|
|
6842
|
+
for (const i of dr(r)) {
|
|
6828
6843
|
const o = this.scopes.get(i);
|
|
6829
6844
|
if (o != null)
|
|
6830
6845
|
for (const n of o.queries.values()) this.applyQueryEntry(n, e);
|
|
@@ -6832,7 +6847,7 @@ class Co {
|
|
|
6832
6847
|
}
|
|
6833
6848
|
applyQueryEntry(r, e) {
|
|
6834
6849
|
var o;
|
|
6835
|
-
if (!
|
|
6850
|
+
if (!ur(r.context, this.activeContext) && !Po(r.context.pathname, e.pathname)) return;
|
|
6836
6851
|
const i = e.search.getAll(r.name);
|
|
6837
6852
|
try {
|
|
6838
6853
|
const n = i.length === 0 ? r.defaultValue : r.codec.parse(i);
|
|
@@ -6866,12 +6881,12 @@ class Co {
|
|
|
6866
6881
|
}
|
|
6867
6882
|
}
|
|
6868
6883
|
const Qe = /* @__PURE__ */ new WeakMap();
|
|
6869
|
-
function
|
|
6884
|
+
function $n(t) {
|
|
6870
6885
|
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
6871
6886
|
throw new TypeError("Browser router options must be an object");
|
|
6872
|
-
return new
|
|
6887
|
+
return new $o(t.adapter);
|
|
6873
6888
|
}
|
|
6874
|
-
function
|
|
6889
|
+
function On(t, r, e) {
|
|
6875
6890
|
if (t == null || typeof t.subscribe != "function")
|
|
6876
6891
|
throw new TypeError("waitForRouteValue requires a readable emitter");
|
|
6877
6892
|
if (typeof r != "function")
|
|
@@ -6898,7 +6913,7 @@ function Rn(t, r, e) {
|
|
|
6898
6913
|
});
|
|
6899
6914
|
}
|
|
6900
6915
|
function at(t) {
|
|
6901
|
-
const r =
|
|
6916
|
+
const r = q(t), e = r.indexOf("?"), i = e < 0 ? r : r.slice(0, e), o = e < 0 ? "" : r.slice(e + 1), n = i.split("/").filter(Boolean);
|
|
6902
6917
|
return Object.freeze({
|
|
6903
6918
|
location: r,
|
|
6904
6919
|
pathname: i,
|
|
@@ -6906,7 +6921,7 @@ function at(t) {
|
|
|
6906
6921
|
search: new URLSearchParams(o)
|
|
6907
6922
|
});
|
|
6908
6923
|
}
|
|
6909
|
-
function
|
|
6924
|
+
function Oo(t) {
|
|
6910
6925
|
const r = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set();
|
|
6911
6926
|
let i = null;
|
|
6912
6927
|
for (const o of t.entries.values()) {
|
|
@@ -6925,7 +6940,7 @@ function Ro(t) {
|
|
|
6925
6940
|
}
|
|
6926
6941
|
}
|
|
6927
6942
|
}
|
|
6928
|
-
function
|
|
6943
|
+
function No(t, r) {
|
|
6929
6944
|
const e = [...t.entries.values()].sort((i, o) => i.descriptor.kind === o.descriptor.kind ? 0 : i.descriptor.kind === "literal" ? -1 : 1);
|
|
6930
6945
|
for (const i of e) {
|
|
6931
6946
|
const o = i.match(r);
|
|
@@ -6933,17 +6948,17 @@ function $o(t, r) {
|
|
|
6933
6948
|
}
|
|
6934
6949
|
return null;
|
|
6935
6950
|
}
|
|
6936
|
-
function
|
|
6951
|
+
function Lo(t) {
|
|
6937
6952
|
return t.owners.size > 0 && [...t.owners.values()].every(({ complete: r }) => r);
|
|
6938
6953
|
}
|
|
6939
|
-
function
|
|
6954
|
+
function dr(t) {
|
|
6940
6955
|
const r = [];
|
|
6941
6956
|
let e = t;
|
|
6942
6957
|
for (; e != null; )
|
|
6943
6958
|
r.unshift(e), e = e.parent;
|
|
6944
6959
|
return r;
|
|
6945
6960
|
}
|
|
6946
|
-
function
|
|
6961
|
+
function ur(t, r) {
|
|
6947
6962
|
let e = r;
|
|
6948
6963
|
for (; e != null; ) {
|
|
6949
6964
|
if (e === t) return !0;
|
|
@@ -6951,13 +6966,13 @@ function cr(t, r) {
|
|
|
6951
6966
|
}
|
|
6952
6967
|
return !1;
|
|
6953
6968
|
}
|
|
6954
|
-
function
|
|
6969
|
+
function Po(t, r) {
|
|
6955
6970
|
return t === "/" || r === t || r.startsWith(`${t}/`);
|
|
6956
6971
|
}
|
|
6957
|
-
function
|
|
6972
|
+
function Do(t, r) {
|
|
6958
6973
|
return `${t === "/" ? "" : t}/${encodeURIComponent(r)}`;
|
|
6959
6974
|
}
|
|
6960
|
-
function
|
|
6975
|
+
function Mo(t) {
|
|
6961
6976
|
return t.pathname;
|
|
6962
6977
|
}
|
|
6963
6978
|
function st(t) {
|
|
@@ -6967,7 +6982,7 @@ function st(t) {
|
|
|
6967
6982
|
throw new vt("Route contains malformed percent encoding");
|
|
6968
6983
|
}
|
|
6969
6984
|
}
|
|
6970
|
-
function
|
|
6985
|
+
function Ao(t) {
|
|
6971
6986
|
if (typeof t != "string" || !/^[A-Za-z][A-Za-z0-9_.-]*$/.test(t))
|
|
6972
6987
|
throw new TypeError("Route query name must start with a letter and use URL-safe characters");
|
|
6973
6988
|
return t;
|
|
@@ -6975,7 +6990,7 @@ function Do(t) {
|
|
|
6975
6990
|
function lt(t) {
|
|
6976
6991
|
return t instanceof Error && t.message !== "" ? t.message : "The requested route could not be resolved";
|
|
6977
6992
|
}
|
|
6978
|
-
function
|
|
6993
|
+
function qo(t, r, e) {
|
|
6979
6994
|
const i = t.get();
|
|
6980
6995
|
return i == null ? e : r(i);
|
|
6981
6996
|
}
|
|
@@ -6989,7 +7004,7 @@ function _(t, r) {
|
|
|
6989
7004
|
if (t !== r.root && (!Ke(t) || Qe.get(t) !== r))
|
|
6990
7005
|
throw new TypeError("Resolved route does not belong to this router");
|
|
6991
7006
|
}
|
|
6992
|
-
function
|
|
7007
|
+
function jo(t) {
|
|
6993
7008
|
if (t == null || typeof t != "object" || typeof Reflect.get(t, "read") != "function" || typeof Reflect.get(t, "href") != "function" || typeof Reflect.get(t, "push") != "function" || typeof Reflect.get(t, "replace") != "function" || typeof Reflect.get(t, "subscribe") != "function")
|
|
6994
7009
|
throw new TypeError("BrowserRouter requires a navigation adapter");
|
|
6995
7010
|
}
|
|
@@ -6997,11 +7012,11 @@ function Ue(t) {
|
|
|
6997
7012
|
if (t == null || typeof t != "object" && typeof t != "function")
|
|
6998
7013
|
throw new TypeError("Route registration owner must be an object");
|
|
6999
7014
|
}
|
|
7000
|
-
function
|
|
7015
|
+
function hr(t, r) {
|
|
7001
7016
|
if (t == null || typeof t != "object" || typeof Reflect.get(t, "get") != "function" || typeof Reflect.get(t, "set") != "function" || typeof Reflect.get(t, "subscribe") != "function")
|
|
7002
7017
|
throw new TypeError(`${r} must be a writable emitter`);
|
|
7003
7018
|
}
|
|
7004
|
-
class Ve extends
|
|
7019
|
+
class Ve extends y {
|
|
7005
7020
|
constructor(e) {
|
|
7006
7021
|
var n;
|
|
7007
7022
|
super(e);
|
|
@@ -7010,12 +7025,12 @@ class Ve extends g {
|
|
|
7010
7025
|
a(this, "outletId");
|
|
7011
7026
|
a(this, "selection");
|
|
7012
7027
|
const i = He(e.views), o = { ...e };
|
|
7013
|
-
o.valueEmitter == null && e.activeViewEmitter != null && (o.valueEmitter = e.activeViewEmitter), o.defaultValue == null && e.initialActiveViewId != null && (o.defaultValue = e.initialActiveViewId), this.valueEmitter =
|
|
7028
|
+
o.valueEmitter == null && e.activeViewEmitter != null && (o.valueEmitter = e.activeViewEmitter), o.defaultValue == null && e.initialActiveViewId != null && (o.defaultValue = e.initialActiveViewId), this.valueEmitter = j(
|
|
7014
7029
|
this,
|
|
7015
7030
|
o,
|
|
7016
7031
|
((n = i.find((s) => !s.disabled)) == null ? void 0 : n.id) ?? null,
|
|
7017
7032
|
"active route view"
|
|
7018
|
-
), this.activeViewEmitter = this.valueEmitter, this.outletId =
|
|
7033
|
+
), this.activeViewEmitter = this.valueEmitter, this.outletId = R("route-outlet", e.id), this.selection = new gr(this, this.valueEmitter, {
|
|
7019
7034
|
subject: "outlet views",
|
|
7020
7035
|
restoredCause: "route view restored",
|
|
7021
7036
|
pendingCause: "pending route view selected",
|
|
@@ -7035,7 +7050,7 @@ class Ve extends g {
|
|
|
7035
7050
|
s,
|
|
7036
7051
|
{
|
|
7037
7052
|
id: this.outletId,
|
|
7038
|
-
className:
|
|
7053
|
+
className: T(this.props) || null,
|
|
7039
7054
|
children: e.map((l) => {
|
|
7040
7055
|
const c = o != null && Object.is(o.id, l.id);
|
|
7041
7056
|
return /* @__PURE__ */ h(
|
|
@@ -7054,7 +7069,7 @@ class Ve extends g {
|
|
|
7054
7069
|
this.selection.dispose();
|
|
7055
7070
|
}
|
|
7056
7071
|
}
|
|
7057
|
-
a(Ve, "liveProps", []), a(Ve, "dependencies", [
|
|
7072
|
+
a(Ve, "liveProps", []), a(Ve, "dependencies", [ke]), a(Ve, "hostName", "route-outlet"), a(Ve, "css", x`
|
|
7058
7073
|
& {
|
|
7059
7074
|
display: flex;
|
|
7060
7075
|
flex: 1 1 auto;
|
|
@@ -7094,7 +7109,7 @@ function He(t) {
|
|
|
7094
7109
|
};
|
|
7095
7110
|
});
|
|
7096
7111
|
}
|
|
7097
|
-
class
|
|
7112
|
+
class Uo extends y {
|
|
7098
7113
|
constructor() {
|
|
7099
7114
|
super(...arguments);
|
|
7100
7115
|
a(this, "unregister", null);
|
|
@@ -7119,8 +7134,8 @@ class qo extends g {
|
|
|
7119
7134
|
(e = this.unregister) == null || e.call(this), this.unregister = null;
|
|
7120
7135
|
}
|
|
7121
7136
|
}
|
|
7122
|
-
a(
|
|
7123
|
-
class
|
|
7137
|
+
a(Uo, "liveProps", []);
|
|
7138
|
+
class Vo extends y {
|
|
7124
7139
|
constructor() {
|
|
7125
7140
|
super(...arguments);
|
|
7126
7141
|
a(this, "registration", null);
|
|
@@ -7137,7 +7152,7 @@ class jo extends g {
|
|
|
7137
7152
|
}
|
|
7138
7153
|
render() {
|
|
7139
7154
|
const e = this.props.valueEmitter.get(), i = this.props.children ?? [];
|
|
7140
|
-
return !this.props.scopeChildren || e == null || this.registration == null ? F(we, null, i) : F(
|
|
7155
|
+
return !this.props.scopeChildren || e == null || this.registration == null ? F(we, null, i) : F(ke, {
|
|
7141
7156
|
key: this.registration.contextFor(e).pathname,
|
|
7142
7157
|
context: this.registration.contextFor(e),
|
|
7143
7158
|
children: i
|
|
@@ -7148,65 +7163,65 @@ class jo extends g {
|
|
|
7148
7163
|
(e = this.registration) == null || e.dispose(), this.registration = null;
|
|
7149
7164
|
}
|
|
7150
7165
|
}
|
|
7151
|
-
a(
|
|
7166
|
+
a(Vo, "liveProps", []);
|
|
7152
7167
|
export {
|
|
7153
|
-
|
|
7168
|
+
Tr as BaseSelectionHandler,
|
|
7154
7169
|
Ce as Breadcrumb,
|
|
7155
|
-
|
|
7170
|
+
$o as BrowserRouter,
|
|
7156
7171
|
Q as Button,
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7172
|
+
Bt as CapillaryUiApp,
|
|
7173
|
+
jr as CapillaryUiRuntime,
|
|
7174
|
+
P as Checkbox,
|
|
7175
|
+
Tn as ColorPicker,
|
|
7176
|
+
y as Component,
|
|
7162
7177
|
se as DataTable,
|
|
7163
|
-
|
|
7164
|
-
|
|
7178
|
+
mo as DatePicker,
|
|
7179
|
+
xo as DateTimePicker,
|
|
7165
7180
|
ie as DeclarativeRegion,
|
|
7166
|
-
|
|
7167
|
-
|
|
7181
|
+
Oi as DefaultTableFilterEncoding,
|
|
7182
|
+
Er as DescriptionItem,
|
|
7168
7183
|
Le as DescriptionList,
|
|
7169
7184
|
De as Dialog,
|
|
7170
|
-
|
|
7185
|
+
nr as DialogActions,
|
|
7171
7186
|
de as Dropdown,
|
|
7172
|
-
|
|
7187
|
+
k as FilterMode,
|
|
7173
7188
|
B as FilterPanel,
|
|
7174
7189
|
we as Fragment,
|
|
7175
7190
|
ce as GroupBox,
|
|
7176
|
-
|
|
7177
|
-
|
|
7191
|
+
D as Header,
|
|
7192
|
+
Sr as InfoField,
|
|
7178
7193
|
Pe as InfoPanel,
|
|
7179
|
-
|
|
7194
|
+
no as Label,
|
|
7180
7195
|
ge as Layout,
|
|
7181
7196
|
ae as ListView,
|
|
7182
|
-
|
|
7183
|
-
|
|
7197
|
+
zn as MemoryNavigationAdapter,
|
|
7198
|
+
hi as MultiSelectionHandler,
|
|
7184
7199
|
ze as NavigationBar,
|
|
7185
7200
|
Re as OptionGroup,
|
|
7186
|
-
|
|
7187
|
-
|
|
7201
|
+
Qt as OptionGroupHeaderEnd,
|
|
7202
|
+
Wt as OptionsBox,
|
|
7188
7203
|
$e as Panel,
|
|
7189
|
-
|
|
7190
|
-
|
|
7204
|
+
Gt as PanelToolbar,
|
|
7205
|
+
A as Placeholder,
|
|
7191
7206
|
je as ProgressBar,
|
|
7192
|
-
|
|
7207
|
+
ar as QuadCheckbox,
|
|
7193
7208
|
W as RadioButton,
|
|
7194
7209
|
Me as RadioGroup,
|
|
7195
7210
|
fe as RouteLink,
|
|
7196
7211
|
Ve as RouteOutlet,
|
|
7197
|
-
|
|
7212
|
+
Uo as RouteQuery,
|
|
7198
7213
|
dt as RouteRedirect,
|
|
7199
|
-
|
|
7214
|
+
ke as RouteScope,
|
|
7200
7215
|
vt as RouteUnavailableError,
|
|
7201
|
-
|
|
7202
|
-
|
|
7216
|
+
Vo as RouteValue,
|
|
7217
|
+
Pn as ServiceScope,
|
|
7203
7218
|
Oe as Sidebar,
|
|
7204
|
-
|
|
7219
|
+
Yt as SidebarToolbar,
|
|
7205
7220
|
Tt as SingleSelectionHandler,
|
|
7206
|
-
|
|
7221
|
+
Et as SplitPrimary,
|
|
7207
7222
|
St as SplitSecondary,
|
|
7208
7223
|
Ne as SplitView,
|
|
7209
|
-
|
|
7224
|
+
Dn as StyleRegistry,
|
|
7210
7225
|
bt as Tab,
|
|
7211
7226
|
ue as TabLine,
|
|
7212
7227
|
Te as TabPanel,
|
|
@@ -7214,105 +7229,105 @@ export {
|
|
|
7214
7229
|
pe as TableHeaderCell,
|
|
7215
7230
|
Z as TemporalInput,
|
|
7216
7231
|
Ae as Textbox,
|
|
7217
|
-
|
|
7218
|
-
|
|
7232
|
+
In as ThemePicker,
|
|
7233
|
+
go as TimePicker,
|
|
7219
7234
|
qe as Toggle,
|
|
7220
7235
|
rt as Toolbar,
|
|
7221
7236
|
Ot as TreeItem,
|
|
7222
7237
|
le as TreeView,
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7238
|
+
sr as TriCheckbox,
|
|
7239
|
+
dn as addCivilDays,
|
|
7240
|
+
fn as addMonths,
|
|
7241
|
+
Li as applyLocalTableState,
|
|
7242
|
+
Br as assertRouteCodec,
|
|
7228
7243
|
X as assertRouteDescriptor,
|
|
7229
|
-
|
|
7244
|
+
Qr as assertRouteQueryCodec,
|
|
7230
7245
|
Ye as assertRouteTarget,
|
|
7231
|
-
|
|
7246
|
+
zr as assertSort,
|
|
7232
7247
|
re as assertTreeNodes,
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7248
|
+
Qo as booleanRouteQueryCodec,
|
|
7249
|
+
So as capillaryUiColorOptions,
|
|
7250
|
+
Eo as capillaryUiThemeOptions,
|
|
7251
|
+
kn as capillaryUiThemeVariableCatalog,
|
|
7237
7252
|
ft as civilDateToDay,
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7253
|
+
wn as combineLocalDateTime,
|
|
7254
|
+
hn as compareCivilDates,
|
|
7255
|
+
gn as compareLocalDateTimes,
|
|
7256
|
+
$n as createBrowserRouter,
|
|
7257
|
+
Mn as createCapillaryUiRuntime,
|
|
7258
|
+
ji as createHandlerTableDataSource,
|
|
7259
|
+
Rn as createHashNavigation,
|
|
7260
|
+
Cn as createHistoryNavigation,
|
|
7261
|
+
qi as createLocalTableDataSource,
|
|
7262
|
+
an as createQueryTableDataSource,
|
|
7263
|
+
Ui as createRestTableDataSource,
|
|
7249
7264
|
Be as createSelectionHandler,
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7265
|
+
An as createServiceScope,
|
|
7266
|
+
qn as createStyleRegistry,
|
|
7267
|
+
x as css,
|
|
7268
|
+
vo as dateToLocalDateTime,
|
|
7269
|
+
po as dayToCivilDate,
|
|
7270
|
+
pn as daysInMonth,
|
|
7271
|
+
jn as defaultCapillaryUiRuntime,
|
|
7257
7272
|
zt as defaultItemKey,
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7273
|
+
Wo as defineRoute,
|
|
7274
|
+
Go as defineRouteParameter,
|
|
7275
|
+
Un as defineService,
|
|
7276
|
+
tn as deriveFilterPredicate,
|
|
7277
|
+
rn as deriveFilteredItems,
|
|
7278
|
+
ln as deriveTreeNode,
|
|
7279
|
+
di as filterByState,
|
|
7265
7280
|
it as findCapillaryUiStylesheetOption,
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7281
|
+
sn as findTreeNode,
|
|
7282
|
+
Nr as formatCivilDate,
|
|
7283
|
+
Pr as formatLocalDateTime,
|
|
7269
7284
|
Ze as formatRouteTarget,
|
|
7270
7285
|
Pt as formatTime,
|
|
7271
|
-
|
|
7286
|
+
Sn as getCapillaryUiAppearance,
|
|
7272
7287
|
F as h,
|
|
7273
|
-
|
|
7274
|
-
|
|
7288
|
+
ho as isCivilDate,
|
|
7289
|
+
wr as isExternalDestination,
|
|
7275
7290
|
Ge as isFilterMode,
|
|
7276
|
-
|
|
7291
|
+
wo as isLocalDateTime,
|
|
7277
7292
|
xt as isRouteDescriptor,
|
|
7278
|
-
|
|
7279
|
-
|
|
7293
|
+
_r as isRouteTarget,
|
|
7294
|
+
fo as isTimeString,
|
|
7280
7295
|
h as jsx,
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7296
|
+
Vn as jsxDEV,
|
|
7297
|
+
v as jsxs,
|
|
7298
|
+
Hn as live,
|
|
7299
|
+
vn as localDateTimeToDate,
|
|
7300
|
+
Ir as matchesFilterState,
|
|
7301
|
+
bo as minutesToTime,
|
|
7302
|
+
en as mountCapillaryUiApp,
|
|
7303
|
+
q as normalizeRouteLocation,
|
|
7304
|
+
xn as nowLocalDateTime,
|
|
7290
7305
|
Se as parseCivilDate,
|
|
7291
|
-
|
|
7306
|
+
nn as parseFilterState,
|
|
7292
7307
|
ye as parseLocalDateTime,
|
|
7293
7308
|
Xe as parseTime,
|
|
7294
|
-
|
|
7309
|
+
Kn as provideService,
|
|
7295
7310
|
Je as readDeclarativeRegions,
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7311
|
+
Zo as redirectTo,
|
|
7312
|
+
Io as replaceCapillaryUiStylesheet,
|
|
7313
|
+
Yo as routeParameter,
|
|
7314
|
+
Jo as routeTarget,
|
|
7315
|
+
on as serializeFilterState,
|
|
7316
|
+
Ni as serializeTableQuery,
|
|
7317
|
+
En as setCapillaryUiAppearance,
|
|
7318
|
+
yn as splitLocalDateTime,
|
|
7319
|
+
mn as startOfMonthDay,
|
|
7320
|
+
_o as stringRouteCodec,
|
|
7321
|
+
Bo as stringRouteQueryCodec,
|
|
7322
|
+
Fn as styleRegistry,
|
|
7323
|
+
mr as tabButtonId,
|
|
7324
|
+
fr as tabPanelId,
|
|
7325
|
+
bn as timeStepOptions,
|
|
7326
|
+
cr as timeToMinutes,
|
|
7327
|
+
un as todayCivilDate,
|
|
7328
|
+
Bi as updateTreeNode,
|
|
7329
|
+
cn as updateWritableTreeNode,
|
|
7330
|
+
On as waitForRouteValue,
|
|
7331
|
+
Xo as withRouteQuery
|
|
7317
7332
|
};
|
|
7318
7333
|
//# sourceMappingURL=index.js.map
|