@sylwellsoftware/fray 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/README.md +20 -5
- package/colors/README.md +3 -2
- package/dist/Components/component.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeview.d.ts +3 -0
- package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
- package/dist/Components/layout/groupPanel.d.ts +21 -0
- package/dist/Components/layout/groupPanel.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +745 -657
- package/dist/index.js.map +1 -1
- package/dist/{jsx-dev-runtime-CRDpvXOH.js → jsx-dev-runtime-8s_xIag_.js} +42 -34
- package/dist/jsx-dev-runtime-8s_xIag_.js.map +1 -0
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/styling/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/styles/structural.css +74 -20
- package/themes/base.css +4 -2
- package/themes/shiny/theme.css +3 -9
- package/dist/jsx-dev-runtime-CRDpvXOH.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (t, r, e) =>
|
|
4
|
-
import { C as g, j as p, c as E, h as w, F as
|
|
5
|
-
import { b as
|
|
6
|
-
import { Emitter as I, DerivedEmitter as
|
|
7
|
-
class
|
|
1
|
+
var Mt = Object.defineProperty;
|
|
2
|
+
var Ht = (t, r, e) => r in t ? Mt(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
+
var a = (t, r, e) => Ht(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { C as g, j as p, c as E, h as w, F as Ie, a as v, i as we } from "./jsx-dev-runtime-8s_xIag_.js";
|
|
5
|
+
import { b as to, S as ro, d as io, e as oo, f as so, g as no, k as ao, l as lo, m as co, n as uo, p as ho, s as po } from "./jsx-dev-runtime-8s_xIag_.js";
|
|
6
|
+
import { Emitter as I, DerivedEmitter as Te, FetchState as S, QueryArg as bt, LiveQuery as Vt, RestQueryHandler as Ut } from "@sylwellsoftware/glue";
|
|
7
|
+
class Ye extends g {
|
|
8
8
|
render() {
|
|
9
9
|
return this.props.children ?? [];
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
a(
|
|
12
|
+
a(Ye, "liveProps", []);
|
|
13
13
|
const y = {
|
|
14
14
|
/** Deny mode: Excludes items that match the filter. */
|
|
15
15
|
Deny: "deny",
|
|
@@ -20,24 +20,24 @@ const y = {
|
|
|
20
20
|
/** Neutral mode: Does not affect the inclusion or exclusion of items. */
|
|
21
21
|
Neutral: "neutral"
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function Re(t) {
|
|
24
24
|
return Object.values(y).some((r) => r === t);
|
|
25
25
|
}
|
|
26
|
-
let
|
|
27
|
-
function
|
|
28
|
-
return r != null && String(r).length > 0 ? String(r) : `fray-${t}-${
|
|
26
|
+
let _t = 1;
|
|
27
|
+
function R(t, r) {
|
|
28
|
+
return r != null && String(r).length > 0 ? String(r) : `fray-${t}-${_t++}`;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function F(t, r, e, i) {
|
|
31
31
|
if (r.valueEmitter != null)
|
|
32
|
-
return
|
|
32
|
+
return Qt(r.valueEmitter, "valueEmitter"), r.valueEmitter;
|
|
33
33
|
const o = r.defaultValue ?? r.value ?? r.initialValue ?? e, s = { owner: t, purpose: i };
|
|
34
34
|
return new I(o, s);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Qt(t, r = "emitter") {
|
|
37
37
|
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")
|
|
38
38
|
throw new TypeError(`${r} must be an emitter`);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Bt(...t) {
|
|
41
41
|
return t.flatMap((r) => typeof r == "string" ? r.split(/\s+/) : []).filter(Boolean).join(" ");
|
|
42
42
|
}
|
|
43
43
|
function x(t) {
|
|
@@ -49,22 +49,22 @@ function $(t, ...r) {
|
|
|
49
49
|
t(...r);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function ve(t, r = "options") {
|
|
53
53
|
if (!Array.isArray(t)) throw new TypeError(`${r} must be an array`);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function Wt(t) {
|
|
56
|
+
return Re(t) ? t : String(t);
|
|
57
57
|
}
|
|
58
|
-
class
|
|
58
|
+
class X extends g {
|
|
59
59
|
constructor(e = {}) {
|
|
60
60
|
var s;
|
|
61
61
|
super(e);
|
|
62
62
|
a(this, "valueEmitter");
|
|
63
63
|
a(this, "activeTabEmitter");
|
|
64
64
|
const i = e.tabs ?? [];
|
|
65
|
-
|
|
65
|
+
gt(i);
|
|
66
66
|
const o = { ...e };
|
|
67
|
-
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter =
|
|
67
|
+
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter = F(
|
|
68
68
|
this,
|
|
69
69
|
o,
|
|
70
70
|
((s = i.find((n) => !n.disabled)) == null ? void 0 : s.id) ?? null,
|
|
@@ -79,7 +79,7 @@ class Z extends g {
|
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
81
|
const { tabs: e = [], label: i = "Sections", baseId: o = "fray-tabs" } = this.props;
|
|
82
|
-
|
|
82
|
+
gt(e);
|
|
83
83
|
const s = this.valueEmitter.get(), n = this.Host;
|
|
84
84
|
return /* @__PURE__ */ p(
|
|
85
85
|
n,
|
|
@@ -90,12 +90,12 @@ class Z extends g {
|
|
|
90
90
|
children: e.map((l, c) => /* @__PURE__ */ p(
|
|
91
91
|
"button",
|
|
92
92
|
{
|
|
93
|
-
id:
|
|
93
|
+
id: Ot(o, l.id),
|
|
94
94
|
type: "button",
|
|
95
95
|
role: "tab",
|
|
96
96
|
disabled: !!l.disabled,
|
|
97
97
|
"aria-selected": Object.is(s, l.id) ? "true" : "false",
|
|
98
|
-
"aria-controls":
|
|
98
|
+
"aria-controls": At(o, l.id),
|
|
99
99
|
tabIndex: Object.is(s, l.id) ? 0 : -1,
|
|
100
100
|
onClick: (u) => this.selectTab(l, u),
|
|
101
101
|
onKeyDown: (u) => this.handleKeyDown(u, c, e),
|
|
@@ -127,7 +127,7 @@ class Z extends g {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
a(
|
|
130
|
+
a(X, "liveProps", []), a(X, "hostName", "tab-line"), a(X, "css", E`
|
|
131
131
|
& {
|
|
132
132
|
display: flex;
|
|
133
133
|
background: var(--tabline-background);
|
|
@@ -191,16 +191,16 @@ a(Z, "liveProps", []), a(Z, "hostName", "tab-line"), a(Z, "css", E`
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
`);
|
|
194
|
-
function
|
|
195
|
-
return `${t}-tab-${
|
|
194
|
+
function Ot(t, r) {
|
|
195
|
+
return `${t}-tab-${jt(r)}`;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return `${t}-panel-${
|
|
197
|
+
function At(t, r) {
|
|
198
|
+
return `${t}-panel-${jt(r)}`;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function jt(t) {
|
|
201
201
|
return encodeURIComponent(String(t)).replaceAll("%", "-");
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function gt(t) {
|
|
204
204
|
if (!Array.isArray(t)) throw new TypeError("TabLine tabs must be an array");
|
|
205
205
|
const r = /* @__PURE__ */ new Set();
|
|
206
206
|
for (const e of t) {
|
|
@@ -209,7 +209,7 @@ function ut(t) {
|
|
|
209
209
|
r.add(e.id);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class Ee extends g {
|
|
213
213
|
constructor() {
|
|
214
214
|
super(...arguments);
|
|
215
215
|
a(this, "closeScope", null);
|
|
@@ -220,7 +220,7 @@ class ye extends g {
|
|
|
220
220
|
this.closeScope = e.openScope(this.props.context, this);
|
|
221
221
|
}
|
|
222
222
|
render() {
|
|
223
|
-
return w(
|
|
223
|
+
return w(Ie, null, this.props.children ?? []);
|
|
224
224
|
}
|
|
225
225
|
afterMount() {
|
|
226
226
|
var e;
|
|
@@ -234,8 +234,8 @@ class ye extends g {
|
|
|
234
234
|
(e = this.closeScope) == null || e.call(this), this.closeScope = null;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
a(
|
|
238
|
-
class
|
|
237
|
+
a(Ee, "liveProps", []);
|
|
238
|
+
class ne extends g {
|
|
239
239
|
constructor(e = {}) {
|
|
240
240
|
var s;
|
|
241
241
|
super(e);
|
|
@@ -243,28 +243,28 @@ class oe extends g {
|
|
|
243
243
|
a(this, "activeTabEmitter");
|
|
244
244
|
a(this, "baseId");
|
|
245
245
|
a(this, "routeContexts", /* @__PURE__ */ new Map());
|
|
246
|
-
const i =
|
|
247
|
-
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter =
|
|
246
|
+
const i = Z(e), o = { ...e };
|
|
247
|
+
o.valueEmitter == null && e.activeTabEmitter != null && (o.valueEmitter = e.activeTabEmitter), o.defaultValue == null && e.initialActiveTabId != null && (o.defaultValue = e.initialActiveTabId), this.valueEmitter = F(
|
|
248
248
|
this,
|
|
249
249
|
o,
|
|
250
250
|
((s = i.find((n) => !n.disabled)) == null ? void 0 : s.id) ?? null,
|
|
251
251
|
"active tab"
|
|
252
|
-
), this.activeTabEmitter = this.valueEmitter, this.baseId =
|
|
252
|
+
), this.activeTabEmitter = this.valueEmitter, this.baseId = R("tabs", e.id);
|
|
253
253
|
}
|
|
254
254
|
initialize() {
|
|
255
255
|
var i;
|
|
256
|
-
const e =
|
|
256
|
+
const e = Z(this.props);
|
|
257
257
|
e.some(({ id: o }) => Object.is(o, this.valueEmitter.get())) || this.valueEmitter.set(((i = e.find((o) => !o.disabled)) == null ? void 0 : i.id) ?? null), this.registerRoutes(e), this.watch(this.valueEmitter);
|
|
258
258
|
}
|
|
259
259
|
setProps(e) {
|
|
260
260
|
var o;
|
|
261
261
|
super.setProps(e);
|
|
262
|
-
const i =
|
|
262
|
+
const i = Z(e);
|
|
263
263
|
return i.some(({ id: s }) => Object.is(s, this.valueEmitter.get())) || this.valueEmitter.set(((o = i.find((s) => !s.disabled)) == null ? void 0 : o.id) ?? null), this.registerRoutes(i), this;
|
|
264
264
|
}
|
|
265
265
|
render() {
|
|
266
266
|
var s;
|
|
267
|
-
const e =
|
|
267
|
+
const e = Z(this.props), i = (s = e.find(({ id: n }) => Object.is(n, this.valueEmitter.get())) ?? e.find((n) => !n.disabled) ?? null) == null ? void 0 : s.id, o = this.Host;
|
|
268
268
|
return /* @__PURE__ */ v(
|
|
269
269
|
o,
|
|
270
270
|
{
|
|
@@ -272,7 +272,7 @@ class oe extends g {
|
|
|
272
272
|
className: x(this.props) || null,
|
|
273
273
|
children: [
|
|
274
274
|
/* @__PURE__ */ p(
|
|
275
|
-
|
|
275
|
+
X,
|
|
276
276
|
{
|
|
277
277
|
tabs: e.map(({ id: n, label: l, disabled: c }) => ({ id: n, label: l, disabled: c })),
|
|
278
278
|
valueEmitter: this.valueEmitter,
|
|
@@ -288,9 +288,9 @@ class oe extends g {
|
|
|
288
288
|
return /* @__PURE__ */ p(
|
|
289
289
|
"section",
|
|
290
290
|
{
|
|
291
|
-
id:
|
|
291
|
+
id: At(this.baseId, n.id),
|
|
292
292
|
role: "tabpanel",
|
|
293
|
-
"aria-labelledby":
|
|
293
|
+
"aria-labelledby": Ot(this.baseId, n.id),
|
|
294
294
|
tabIndex: l ? 0 : -1,
|
|
295
295
|
hidden: !l,
|
|
296
296
|
children: this.routedContent(n)
|
|
@@ -328,15 +328,15 @@ class oe extends g {
|
|
|
328
328
|
}
|
|
329
329
|
selectTab(e, i) {
|
|
330
330
|
var n;
|
|
331
|
-
const o =
|
|
331
|
+
const o = Z(this.props).find(({ id: l }) => Object.is(l, e.id)), s = (o == null ? void 0 : o.route) == null ? null : this.routeContexts.get(o.route);
|
|
332
332
|
s == null ? this.valueEmitter.set(e.id, "tab selected") : (n = this._runtime.router) == null || n.navigate(s);
|
|
333
333
|
}
|
|
334
334
|
routedContent(e) {
|
|
335
335
|
const i = e.route == null ? null : this.routeContexts.get(e.route);
|
|
336
|
-
return i == null ? e.content : /* @__PURE__ */ p(
|
|
336
|
+
return i == null ? e.content : /* @__PURE__ */ p(Ee, { context: i, children: e.content }, i.pathname);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
a(
|
|
339
|
+
a(ne, "liveProps", []), a(ne, "dependencies", [Ee, X, Ye]), a(ne, "hostName", "tab-panel"), a(ne, "css", E`
|
|
340
340
|
& {
|
|
341
341
|
background: var(--panel-background);
|
|
342
342
|
border-radius: var(--panel-radius);
|
|
@@ -367,11 +367,11 @@ a(oe, "liveProps", []), a(oe, "dependencies", [ye, Z, Be]), a(oe, "hostName", "t
|
|
|
367
367
|
margin-inline-start: -3px;
|
|
368
368
|
}
|
|
369
369
|
`);
|
|
370
|
-
function
|
|
370
|
+
function Z(t) {
|
|
371
371
|
const r = t.tabs ?? [];
|
|
372
372
|
if (!Array.isArray(r)) throw new TypeError("TabPanel tabs must be an array");
|
|
373
|
-
const i = (Array.isArray(t.children) ? t.children : t.children == null ? [] : [t.children]).filter((n) =>
|
|
374
|
-
if (!
|
|
373
|
+
const i = (Array.isArray(t.children) ? t.children : t.children == null ? [] : [t.children]).filter((n) => we(n) && n.type === Ye).map((n, l) => {
|
|
374
|
+
if (!we(n)) throw new TypeError("TabPanel children must be Tab nodes");
|
|
375
375
|
const c = n.props;
|
|
376
376
|
return {
|
|
377
377
|
id: c.id ?? `tab-${l + 1}`,
|
|
@@ -394,12 +394,12 @@ function J(t) {
|
|
|
394
394
|
}
|
|
395
395
|
return o;
|
|
396
396
|
}
|
|
397
|
-
class
|
|
397
|
+
class L extends g {
|
|
398
398
|
constructor(e = {}) {
|
|
399
399
|
super(e);
|
|
400
400
|
a(this, "headerId");
|
|
401
401
|
a(this, "headingId");
|
|
402
|
-
this.headerId =
|
|
402
|
+
this.headerId = R("header", e.id), this.headingId = R("header-title", e.headingId ?? `${this.headerId}-title`);
|
|
403
403
|
}
|
|
404
404
|
render() {
|
|
405
405
|
const { level: e = 2, children: i = [] } = this.props;
|
|
@@ -416,7 +416,7 @@ class H extends g {
|
|
|
416
416
|
);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
a(
|
|
419
|
+
a(L, "liveProps", []), a(L, "hostName", "header"), a(L, "css", E`
|
|
420
420
|
& {
|
|
421
421
|
display: block;
|
|
422
422
|
color: var(--section-header-color);
|
|
@@ -437,13 +437,93 @@ a(H, "liveProps", []), a(H, "hostName", "header"), a(H, "css", E`
|
|
|
437
437
|
font: inherit;
|
|
438
438
|
}
|
|
439
439
|
`);
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
class ae extends g {
|
|
441
|
+
constructor(e) {
|
|
442
|
+
super(e);
|
|
443
|
+
a(this, "panelId");
|
|
444
|
+
a(this, "headerId");
|
|
445
|
+
this.panelId = R("group-panel", e.id), this.headerId = `${this.panelId}-title`;
|
|
446
|
+
}
|
|
447
|
+
render() {
|
|
448
|
+
const { header: e, children: i = [] } = this.props;
|
|
449
|
+
return this.renderGroupPanel(e, i);
|
|
450
|
+
}
|
|
451
|
+
renderGroupPanel(e, i) {
|
|
452
|
+
const o = this.Host;
|
|
453
|
+
return /* @__PURE__ */ v(
|
|
454
|
+
o,
|
|
455
|
+
{
|
|
456
|
+
id: this.panelId,
|
|
457
|
+
role: "group",
|
|
458
|
+
className: x(this.props) || null,
|
|
459
|
+
"aria-labelledby": this.headerId,
|
|
460
|
+
children: [
|
|
461
|
+
/* @__PURE__ */ p(
|
|
462
|
+
L,
|
|
463
|
+
{
|
|
464
|
+
id: `${this.panelId}-header`,
|
|
465
|
+
headingId: this.headerId,
|
|
466
|
+
children: e
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
w("fray-content", null, i)
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
a(ae, "liveProps", []), a(ae, "hostName", "group-panel"), a(ae, "dependencies", [L]), a(ae, "css", E`
|
|
476
|
+
& {
|
|
477
|
+
display: grid;
|
|
478
|
+
grid-template-columns: 1.5rem minmax(0, 1fr);
|
|
479
|
+
align-items: stretch;
|
|
480
|
+
box-sizing: border-box;
|
|
481
|
+
min-width: 0;
|
|
482
|
+
min-height: 0;
|
|
483
|
+
column-gap: 0.35rem;
|
|
484
|
+
row-gap: 0;
|
|
485
|
+
padding-block: 0.125rem;
|
|
486
|
+
padding-inline: 0.125rem 0.35rem;
|
|
487
|
+
border: 1px solid var(--ui-border-color);
|
|
488
|
+
border-radius: var(--ui-border-radius);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
& > fray-header {
|
|
492
|
+
display: grid;
|
|
493
|
+
place-items: center;
|
|
494
|
+
box-sizing: border-box;
|
|
495
|
+
width: 100%;
|
|
496
|
+
min-width: 0;
|
|
497
|
+
min-height: 0;
|
|
498
|
+
padding: 0.125em;
|
|
499
|
+
border-radius: var(--ui-border-radius);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
& > fray-header > h1,
|
|
503
|
+
& > fray-header > h2,
|
|
504
|
+
& > fray-header > h3,
|
|
505
|
+
& > fray-header > h4,
|
|
506
|
+
& > fray-header > h5,
|
|
507
|
+
& > fray-header > h6 {
|
|
508
|
+
font-weight: 650;
|
|
509
|
+
white-space: nowrap;
|
|
510
|
+
writing-mode: vertical-rl;
|
|
511
|
+
transform: rotate(180deg);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
& > fray-content {
|
|
515
|
+
display: block;
|
|
516
|
+
min-width: 0;
|
|
517
|
+
min-height: 0;
|
|
518
|
+
}
|
|
519
|
+
`);
|
|
520
|
+
const Gt = ["disabled"];
|
|
521
|
+
class le extends g {
|
|
442
522
|
constructor(e = {}) {
|
|
443
523
|
super(e);
|
|
444
524
|
a(this, "panelId");
|
|
445
525
|
a(this, "headerId");
|
|
446
|
-
this.panelId =
|
|
526
|
+
this.panelId = R("panel", e.id), this.headerId = `${this.panelId}-title`;
|
|
447
527
|
}
|
|
448
528
|
render() {
|
|
449
529
|
const {
|
|
@@ -456,7 +536,7 @@ class se extends g {
|
|
|
456
536
|
if (!["horizontal", "vertical"].includes(s))
|
|
457
537
|
throw new TypeError("Panel orientation must be horizontal or vertical");
|
|
458
538
|
const l = this.Host, c = e == null ? null : /* @__PURE__ */ p(
|
|
459
|
-
|
|
539
|
+
L,
|
|
460
540
|
{
|
|
461
541
|
id: `${this.panelId}-header`,
|
|
462
542
|
headingId: this.headerId,
|
|
@@ -480,7 +560,7 @@ class se extends g {
|
|
|
480
560
|
);
|
|
481
561
|
}
|
|
482
562
|
}
|
|
483
|
-
a(
|
|
563
|
+
a(le, "liveProps", Gt), a(le, "hostName", "panel"), a(le, "dependencies", [L]), a(le, "css", E`
|
|
484
564
|
& {
|
|
485
565
|
background: var(--panel-background);
|
|
486
566
|
border: var(--panel-border);
|
|
@@ -513,12 +593,12 @@ a(se, "liveProps", Vt), a(se, "hostName", "panel"), a(se, "dependencies", [H]),
|
|
|
513
593
|
opacity: .65;
|
|
514
594
|
}
|
|
515
595
|
`);
|
|
516
|
-
class
|
|
596
|
+
class ce extends g {
|
|
517
597
|
constructor(e = {}) {
|
|
518
598
|
super(e);
|
|
519
599
|
a(this, "sidebarId");
|
|
520
600
|
a(this, "headerId");
|
|
521
|
-
this.sidebarId =
|
|
601
|
+
this.sidebarId = R("sidebar", e.id), this.headerId = `${this.sidebarId}-title`;
|
|
522
602
|
}
|
|
523
603
|
render() {
|
|
524
604
|
const {
|
|
@@ -527,7 +607,7 @@ class ne extends g {
|
|
|
527
607
|
ariaLabel: o,
|
|
528
608
|
children: s = []
|
|
529
609
|
} = this.props, n = this.Host, l = e == null ? null : /* @__PURE__ */ p(
|
|
530
|
-
|
|
610
|
+
L,
|
|
531
611
|
{
|
|
532
612
|
id: `${this.sidebarId}-header`,
|
|
533
613
|
headingId: this.headerId,
|
|
@@ -549,7 +629,7 @@ class ne extends g {
|
|
|
549
629
|
) });
|
|
550
630
|
}
|
|
551
631
|
}
|
|
552
|
-
a(
|
|
632
|
+
a(ce, "liveProps", []), a(ce, "hostName", "sidebar"), a(ce, "dependencies", [L]), a(ce, "css", E`
|
|
553
633
|
& {
|
|
554
634
|
display: flex;
|
|
555
635
|
min-width: 0;
|
|
@@ -576,7 +656,7 @@ a(ne, "liveProps", []), a(ne, "hostName", "sidebar"), a(ne, "dependencies", [H])
|
|
|
576
656
|
overflow: auto;
|
|
577
657
|
}
|
|
578
658
|
`);
|
|
579
|
-
class
|
|
659
|
+
class ze extends g {
|
|
580
660
|
render() {
|
|
581
661
|
const {
|
|
582
662
|
primary: r = null,
|
|
@@ -594,7 +674,7 @@ class Te extends g {
|
|
|
594
674
|
return /* @__PURE__ */ v(
|
|
595
675
|
l,
|
|
596
676
|
{
|
|
597
|
-
className:
|
|
677
|
+
className: Bt(x(this.props), i),
|
|
598
678
|
style: o == null ? void 0 : { "--split-primary-size": o },
|
|
599
679
|
children: [
|
|
600
680
|
w("fray-primary", {
|
|
@@ -612,7 +692,7 @@ class Te extends g {
|
|
|
612
692
|
);
|
|
613
693
|
}
|
|
614
694
|
}
|
|
615
|
-
a(
|
|
695
|
+
a(ze, "liveProps", []), a(ze, "hostName", "split-view"), a(ze, "css", E`
|
|
616
696
|
& {
|
|
617
697
|
display: flex;
|
|
618
698
|
flex: 1 1 auto;
|
|
@@ -652,7 +732,7 @@ a(Te, "liveProps", []), a(Te, "hostName", "split-view"), a(Te, "css", E`
|
|
|
652
732
|
border-block-end: 1px solid var(--ui-border-color);
|
|
653
733
|
}
|
|
654
734
|
`);
|
|
655
|
-
class
|
|
735
|
+
class qt extends g {
|
|
656
736
|
render() {
|
|
657
737
|
const { term: r, value: e, children: i = [] } = this.props;
|
|
658
738
|
return [
|
|
@@ -661,14 +741,14 @@ class Ct extends g {
|
|
|
661
741
|
];
|
|
662
742
|
}
|
|
663
743
|
}
|
|
664
|
-
a(
|
|
665
|
-
class
|
|
744
|
+
a(qt, "liveProps", []);
|
|
745
|
+
class de extends g {
|
|
666
746
|
render() {
|
|
667
747
|
const r = this.Host;
|
|
668
748
|
return /* @__PURE__ */ p(r, { className: x(this.props) || null, children: /* @__PURE__ */ p("dl", { "aria-label": this.props.label, children: this.props.children ?? [] }) });
|
|
669
749
|
}
|
|
670
750
|
}
|
|
671
|
-
a(
|
|
751
|
+
a(de, "liveProps", []), a(de, "hostName", "descriptionlist"), a(de, "dependencies", [qt]), a(de, "css", E`
|
|
672
752
|
& {
|
|
673
753
|
display: block;
|
|
674
754
|
}
|
|
@@ -678,13 +758,13 @@ a(ae, "liveProps", []), a(ae, "hostName", "descriptionlist"), a(ae, "dependencie
|
|
|
678
758
|
margin: 0;
|
|
679
759
|
}
|
|
680
760
|
`);
|
|
681
|
-
class
|
|
761
|
+
class H extends g {
|
|
682
762
|
render() {
|
|
683
|
-
const r =
|
|
763
|
+
const r = Yt(this.props.width ?? 65), e = this.Host;
|
|
684
764
|
return /* @__PURE__ */ p(e, { style: { width: `${r}%` }, "aria-hidden": "true" });
|
|
685
765
|
}
|
|
686
766
|
}
|
|
687
|
-
a(
|
|
767
|
+
a(H, "liveProps", []), a(H, "hostName", "placeholder"), a(H, "css", E`
|
|
688
768
|
& {
|
|
689
769
|
display: block;
|
|
690
770
|
width: 5em;
|
|
@@ -722,13 +802,13 @@ a(V, "liveProps", []), a(V, "hostName", "placeholder"), a(V, "css", E`
|
|
|
722
802
|
}
|
|
723
803
|
}
|
|
724
804
|
`);
|
|
725
|
-
function
|
|
805
|
+
function Yt(t) {
|
|
726
806
|
const r = Number(t);
|
|
727
807
|
if (!Number.isFinite(r)) throw new TypeError("Placeholder width must be numeric");
|
|
728
808
|
return Math.min(100, Math.max(10, r));
|
|
729
809
|
}
|
|
730
|
-
function
|
|
731
|
-
|
|
810
|
+
function Nt(t, r, e) {
|
|
811
|
+
Je(e);
|
|
732
812
|
for (const i of e) {
|
|
733
813
|
const o = r[i.key];
|
|
734
814
|
if (o == null) continue;
|
|
@@ -744,26 +824,26 @@ function zt(t, r, e) {
|
|
|
744
824
|
}
|
|
745
825
|
return !0;
|
|
746
826
|
}
|
|
747
|
-
function
|
|
827
|
+
function Jt(t, r, e) {
|
|
748
828
|
if (!Array.isArray(t)) throw new TypeError("Filtered items must be an array");
|
|
749
|
-
return t.filter((i) =>
|
|
829
|
+
return t.filter((i) => Nt(i, r, e));
|
|
750
830
|
}
|
|
751
|
-
function
|
|
752
|
-
return
|
|
831
|
+
function Ci(t, r, e = null) {
|
|
832
|
+
return Je(r), new Te(
|
|
753
833
|
[t],
|
|
754
|
-
([i]) => (o) =>
|
|
834
|
+
([i]) => (o) => Nt(o, i, r),
|
|
755
835
|
{ owner: e, purpose: "filter predicate" }
|
|
756
836
|
);
|
|
757
837
|
}
|
|
758
|
-
function
|
|
759
|
-
return
|
|
838
|
+
function zi(t, r, e, i = null) {
|
|
839
|
+
return Je(e), new Te(
|
|
760
840
|
[t, r],
|
|
761
|
-
([o, s]) =>
|
|
841
|
+
([o, s]) => Jt(o, s, e),
|
|
762
842
|
{ owner: i, purpose: "filtered items" }
|
|
763
843
|
);
|
|
764
844
|
}
|
|
765
|
-
function
|
|
766
|
-
|
|
845
|
+
function $i(t) {
|
|
846
|
+
Zt(t);
|
|
767
847
|
const r = {};
|
|
768
848
|
for (const e of Object.keys(t).sort()) {
|
|
769
849
|
const i = {}, o = t[e];
|
|
@@ -773,16 +853,16 @@ function Si(t) {
|
|
|
773
853
|
}
|
|
774
854
|
return { version: 1, dimensions: r };
|
|
775
855
|
}
|
|
776
|
-
function
|
|
777
|
-
if (!
|
|
856
|
+
function Oi(t) {
|
|
857
|
+
if (!ee(t) || t.version !== 1 || !ee(t.dimensions))
|
|
778
858
|
throw new TypeError("Filter state must use version 1 with a dimensions object");
|
|
779
859
|
const r = {};
|
|
780
860
|
for (const [e, i] of Object.entries(t.dimensions)) {
|
|
781
|
-
if (
|
|
861
|
+
if (W(e, "Filter dimension"), !ee(i))
|
|
782
862
|
throw new TypeError(`Filter dimension ${e} must be an object`);
|
|
783
863
|
const o = {};
|
|
784
864
|
for (const [s, n] of Object.entries(i)) {
|
|
785
|
-
if (
|
|
865
|
+
if (W(s, `Filter option in ${e}`), !Re(n))
|
|
786
866
|
throw new TypeError(
|
|
787
867
|
`Unknown filter mode for ${e}.${s}: ${String(n)}`
|
|
788
868
|
);
|
|
@@ -792,46 +872,46 @@ function Ii(t) {
|
|
|
792
872
|
}
|
|
793
873
|
return r;
|
|
794
874
|
}
|
|
795
|
-
function
|
|
796
|
-
if (!
|
|
875
|
+
function Zt(t) {
|
|
876
|
+
if (!ee(t)) throw new TypeError("Filter state must be an object");
|
|
797
877
|
for (const [r, e] of Object.entries(t)) {
|
|
798
|
-
if (
|
|
878
|
+
if (W(r, "Filter dimension"), !ee(e))
|
|
799
879
|
throw new TypeError(`Filter dimension ${r} must be an object`);
|
|
800
880
|
for (const [i, o] of Object.entries(e))
|
|
801
|
-
if (
|
|
881
|
+
if (W(i, `Filter option in ${r}`), !Re(o))
|
|
802
882
|
throw new TypeError(
|
|
803
883
|
`Unknown filter mode for ${r}.${i}: ${String(o)}`
|
|
804
884
|
);
|
|
805
885
|
}
|
|
806
886
|
}
|
|
807
|
-
function
|
|
887
|
+
function Je(t) {
|
|
808
888
|
if (!Array.isArray(t)) throw new TypeError("Filter dimensions must be an array");
|
|
809
889
|
const r = /* @__PURE__ */ new Set();
|
|
810
890
|
for (const e of t) {
|
|
811
|
-
if (
|
|
891
|
+
if (W(e.key, "Filter dimension"), r.has(e.key))
|
|
812
892
|
throw new Error(`Duplicate filter dimension: ${e.key}`);
|
|
813
893
|
if (r.add(e.key), !Array.isArray(e.options))
|
|
814
894
|
throw new TypeError(`Filter dimension ${e.key} options must be an array`);
|
|
815
895
|
const i = /* @__PURE__ */ new Set();
|
|
816
896
|
for (const o of e.options) {
|
|
817
|
-
if (
|
|
897
|
+
if (W(o.key, `Filter option in ${e.key}`), i.has(o.key))
|
|
818
898
|
throw new Error(`Duplicate filter option: ${e.key}.${o.key}`);
|
|
819
899
|
if (i.add(o.key), typeof o.matches != "function")
|
|
820
900
|
throw new TypeError(`Filter matcher ${e.key}.${o.key} must be a function`);
|
|
821
901
|
}
|
|
822
902
|
}
|
|
823
903
|
}
|
|
824
|
-
function
|
|
904
|
+
function W(t, r) {
|
|
825
905
|
if (t.length === 0 || t === "__proto__" || t === "prototype" || t === "constructor")
|
|
826
906
|
throw new TypeError(`${r} key is not safe for persisted state`);
|
|
827
907
|
}
|
|
828
|
-
function
|
|
908
|
+
function ee(t) {
|
|
829
909
|
return t != null && typeof t == "object" && !Array.isArray(t);
|
|
830
910
|
}
|
|
831
|
-
class
|
|
911
|
+
class Lt {
|
|
832
912
|
constructor({
|
|
833
913
|
getItems: r,
|
|
834
|
-
getKey: e =
|
|
914
|
+
getKey: e = Xe,
|
|
835
915
|
selectedItemsEmitter: i,
|
|
836
916
|
owner: o = null
|
|
837
917
|
}) {
|
|
@@ -859,7 +939,7 @@ class $t {
|
|
|
859
939
|
this.getItems = r, this.getKey = e, this.ownedSelectedItemsEmitter = i == null ? new I([], { owner: o, purpose: "selected items" }) : null, this.selectedItemsEmitter = i ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.ownsSelectedItemsEmitter = this.ownedSelectedItemsEmitter != null;
|
|
860
940
|
}
|
|
861
941
|
rowsUpdated(r) {
|
|
862
|
-
this.destroyed || (this.releaseRows(), this.rows = Array.from(r ?? []), this.rows.forEach((e, i) => this.wireRow(e, i)), this.activeIndex =
|
|
942
|
+
this.destroyed || (this.releaseRows(), this.rows = Array.from(r ?? []), this.rows.forEach((e, i) => this.wireRow(e, i)), this.activeIndex = tr(this.activeIndex, this.rows.length), this.reconcileSelectedItems(), this.syncRows());
|
|
863
943
|
}
|
|
864
944
|
wireRow(r, e) {
|
|
865
945
|
const i = (l) => this.handleClick(e, l), o = (l) => this.handleKeyDown(e, l), s = (l) => this.handleMouseDown(e, l, r), n = (l) => this.handleMouseEnter(e, l);
|
|
@@ -947,7 +1027,7 @@ class $t {
|
|
|
947
1027
|
this.destroyed || (this.destroyed = !0, this.finishDrag(!1), this.clearClickSuppression(), this.releaseRows(), (r = this.ownedSelectedItemsEmitter) == null || r.dispose());
|
|
948
1028
|
}
|
|
949
1029
|
}
|
|
950
|
-
class
|
|
1030
|
+
class Ze extends Lt {
|
|
951
1031
|
constructor(e) {
|
|
952
1032
|
const i = e.selectedItemEmitter == null ? new I(null, {
|
|
953
1033
|
owner: e.owner,
|
|
@@ -957,7 +1037,7 @@ class Ge extends $t {
|
|
|
957
1037
|
getItems: e.getItems,
|
|
958
1038
|
...e.getKey == null ? {} : { getKey: e.getKey },
|
|
959
1039
|
...e.owner === void 0 ? {} : { owner: e.owner },
|
|
960
|
-
selectedItemsEmitter: new
|
|
1040
|
+
selectedItemsEmitter: new er(o)
|
|
961
1041
|
});
|
|
962
1042
|
a(this, "selectedItemEmitter");
|
|
963
1043
|
a(this, "selectedItem$");
|
|
@@ -976,16 +1056,16 @@ class Ge extends $t {
|
|
|
976
1056
|
super.destroy(), (e = this.ownedSelectedItemEmitter) == null || e.dispose();
|
|
977
1057
|
}
|
|
978
1058
|
}
|
|
979
|
-
class
|
|
1059
|
+
class Xt extends Lt {
|
|
980
1060
|
selectIndex(r, e) {
|
|
981
1061
|
const i = this.getItems(), o = i[r];
|
|
982
1062
|
if (o !== void 0) {
|
|
983
1063
|
if (e.shiftKey && this.anchorIndex != null) {
|
|
984
|
-
const s = Math.min(this.anchorIndex, r), n = Math.max(this.anchorIndex, r), l = i.slice(s, n + 1), c =
|
|
1064
|
+
const s = Math.min(this.anchorIndex, r), n = Math.max(this.anchorIndex, r), l = i.slice(s, n + 1), c = $e(e) ? yt(this.getSelectedItems(), l, this.getKey) : [...l];
|
|
985
1065
|
this.setSelectedItems(c, "range selection changed");
|
|
986
1066
|
return;
|
|
987
1067
|
}
|
|
988
|
-
if (
|
|
1068
|
+
if ($e(e) || "key" in e && e.key === " ") {
|
|
989
1069
|
const s = this.getSelectedItems(), n = this.getKey(o, r), c = s.some((u, h) => Object.is(this.getKey(u, h), n)) ? s.filter((u, h) => !Object.is(this.getKey(u, h), n)) : [...s, o];
|
|
990
1070
|
this.anchorIndex = r, this.setSelectedItems(c, "multi selection toggled");
|
|
991
1071
|
return;
|
|
@@ -1000,14 +1080,14 @@ class Bt extends $t {
|
|
|
1000
1080
|
return !0;
|
|
1001
1081
|
}
|
|
1002
1082
|
selectDragRange(r, e, i) {
|
|
1003
|
-
const o = this.getItems(), s = Math.min(r, e), n = Math.max(r, e), l = o.slice(s, n + 1), c =
|
|
1083
|
+
const o = this.getItems(), s = Math.min(r, e), n = Math.max(r, e), l = o.slice(s, n + 1), c = $e(i) ? yt(this.getSelectedItems(), l, this.getKey) : [...l];
|
|
1004
1084
|
this.anchorIndex = r, this.setSelectedItems(c, "drag selection changed");
|
|
1005
1085
|
}
|
|
1006
1086
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return t.multiSelect ? new
|
|
1087
|
+
function xe(t) {
|
|
1088
|
+
return t.multiSelect ? new Xt(t) : new Ze(t);
|
|
1009
1089
|
}
|
|
1010
|
-
class
|
|
1090
|
+
class er {
|
|
1011
1091
|
constructor(r) {
|
|
1012
1092
|
this.source = r;
|
|
1013
1093
|
}
|
|
@@ -1031,7 +1111,7 @@ class Wt {
|
|
|
1031
1111
|
}), e);
|
|
1032
1112
|
}
|
|
1033
1113
|
}
|
|
1034
|
-
function
|
|
1114
|
+
function Xe(t, r) {
|
|
1035
1115
|
if (t != null && typeof t == "object") {
|
|
1036
1116
|
const e = Reflect.get(t, "id");
|
|
1037
1117
|
if (e != null) return e;
|
|
@@ -1041,13 +1121,13 @@ function Ye(t, r) {
|
|
|
1041
1121
|
`Selection item at index ${r} needs an id or an explicit itemKey/rowKey`
|
|
1042
1122
|
);
|
|
1043
1123
|
}
|
|
1044
|
-
function
|
|
1124
|
+
function $e(t) {
|
|
1045
1125
|
return !!(t.ctrlKey || t.metaKey);
|
|
1046
1126
|
}
|
|
1047
|
-
function
|
|
1127
|
+
function tr(t, r) {
|
|
1048
1128
|
return r <= 0 ? 0 : Math.min(Math.max(t, 0), r - 1);
|
|
1049
1129
|
}
|
|
1050
|
-
function
|
|
1130
|
+
function yt(t, r, e) {
|
|
1051
1131
|
const i = [...t], o = new Set(t.map((s, n) => e(s, n)));
|
|
1052
1132
|
for (const s of r) {
|
|
1053
1133
|
const n = e(s, i.length);
|
|
@@ -1055,7 +1135,7 @@ function ht(t, r, e) {
|
|
|
1055
1135
|
}
|
|
1056
1136
|
return i;
|
|
1057
1137
|
}
|
|
1058
|
-
class
|
|
1138
|
+
class ue extends g {
|
|
1059
1139
|
constructor(e = {}) {
|
|
1060
1140
|
super(e);
|
|
1061
1141
|
a(this, "itemsEmitter");
|
|
@@ -1067,21 +1147,21 @@ class le extends g {
|
|
|
1067
1147
|
a(this, "getItemKey");
|
|
1068
1148
|
a(this, "selectionHandler");
|
|
1069
1149
|
a(this, "ownedItemsEmitter");
|
|
1070
|
-
|
|
1150
|
+
ir(e.items) ? (this.itemsEmitter = e.items, this.ownedItemsEmitter = null) : (this.ownedItemsEmitter = new I(e.items ?? [], {
|
|
1071
1151
|
owner: this,
|
|
1072
1152
|
purpose: "list items"
|
|
1073
|
-
}), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.getItemKey =
|
|
1153
|
+
}), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.getItemKey = rr(e.itemKey), this.selectionHandler = e.multiSelect === !0 ? xe({
|
|
1074
1154
|
owner: this,
|
|
1075
1155
|
multiSelect: !0,
|
|
1076
1156
|
...e.selectedItemsEmitter == null ? {} : { selectedItemsEmitter: e.selectedItemsEmitter },
|
|
1077
1157
|
getItems: () => this.itemsEmitter.get(),
|
|
1078
1158
|
getKey: this.getItemKey
|
|
1079
|
-
}) :
|
|
1159
|
+
}) : xe({
|
|
1080
1160
|
owner: this,
|
|
1081
1161
|
...e.selectedItemEmitter == null ? {} : { selectedItemEmitter: e.selectedItemEmitter },
|
|
1082
1162
|
getItems: () => this.itemsEmitter.get(),
|
|
1083
1163
|
getKey: this.getItemKey
|
|
1084
|
-
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof
|
|
1164
|
+
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof Ze ? this.selectionHandler.selectedItemEmitter : null, this.selectedItem$ = this.selectedItemEmitter;
|
|
1085
1165
|
}
|
|
1086
1166
|
initialize() {
|
|
1087
1167
|
this.watch(this.itemsEmitter, this.selectedItemsEmitter);
|
|
@@ -1095,10 +1175,10 @@ class le extends g {
|
|
|
1095
1175
|
{
|
|
1096
1176
|
className: x(this.props) || null,
|
|
1097
1177
|
children: [
|
|
1098
|
-
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children:
|
|
1099
|
-
s && e.length === 0 ? /* @__PURE__ */ v(
|
|
1178
|
+
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children: nr(o, "Unable to load items") }) : null,
|
|
1179
|
+
s && e.length === 0 ? /* @__PURE__ */ v(Ie, { children: [
|
|
1100
1180
|
/* @__PURE__ */ p("p", { role: "status", children: "Loading items…" }),
|
|
1101
|
-
/* @__PURE__ */ p("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (c, u) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(
|
|
1181
|
+
/* @__PURE__ */ p("ul", { "aria-hidden": "true", children: Array.from({ length: this.props.placeholderCount ?? 5 }, (c, u) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(H, { width: 45 + u * 7 }) }, `placeholder-${u}`)) })
|
|
1102
1182
|
] }) : null,
|
|
1103
1183
|
i === S.Ready && e.length === 0 ? /* @__PURE__ */ p("p", { role: "status", children: "No items" }) : null,
|
|
1104
1184
|
e.length > 0 ? /* @__PURE__ */ p(
|
|
@@ -1109,7 +1189,7 @@ class le extends g {
|
|
|
1109
1189
|
"aria-busy": s ? "true" : null,
|
|
1110
1190
|
"aria-multiselectable": this.props.multiSelect ? "true" : null,
|
|
1111
1191
|
children: e.map((c, u) => {
|
|
1112
|
-
const h = this.getItemKey(c, u), b = n.has(h), f = this.props.renderItem ? this.props.renderItem(c, u) :
|
|
1192
|
+
const h = this.getItemKey(c, u), b = n.has(h), f = this.props.renderItem ? this.props.renderItem(c, u) : or(c);
|
|
1113
1193
|
return /* @__PURE__ */ p(
|
|
1114
1194
|
"li",
|
|
1115
1195
|
{
|
|
@@ -1150,7 +1230,7 @@ class le extends g {
|
|
|
1150
1230
|
this.selectionHandler.destroy(), (e = this.ownedItemsEmitter) == null || e.dispose();
|
|
1151
1231
|
}
|
|
1152
1232
|
}
|
|
1153
|
-
a(
|
|
1233
|
+
a(ue, "liveProps", []), a(ue, "dependencies", [H]), a(ue, "hostName", "listview"), a(ue, "css", E`
|
|
1154
1234
|
& {
|
|
1155
1235
|
display: flex;
|
|
1156
1236
|
flex-direction: column;
|
|
@@ -1204,8 +1284,8 @@ a(le, "liveProps", []), a(le, "dependencies", [V]), a(le, "hostName", "listview"
|
|
|
1204
1284
|
padding: var(--ui-padding);
|
|
1205
1285
|
}
|
|
1206
1286
|
`);
|
|
1207
|
-
function
|
|
1208
|
-
if (t == null) return
|
|
1287
|
+
function rr(t) {
|
|
1288
|
+
if (t == null) return Xe;
|
|
1209
1289
|
if (typeof t == "function") return t;
|
|
1210
1290
|
if (typeof t == "string" && t.length > 0)
|
|
1211
1291
|
return (r, e) => {
|
|
@@ -1218,25 +1298,25 @@ function Yt(t) {
|
|
|
1218
1298
|
};
|
|
1219
1299
|
throw new TypeError("ListView itemKey must be a function or property name");
|
|
1220
1300
|
}
|
|
1221
|
-
function
|
|
1301
|
+
function ir(t) {
|
|
1222
1302
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
1223
1303
|
}
|
|
1224
|
-
function
|
|
1304
|
+
function or(t) {
|
|
1225
1305
|
if (t != null && (typeof t == "object" || typeof t == "function")) {
|
|
1226
1306
|
const r = Reflect.get(t, "label");
|
|
1227
|
-
if (
|
|
1307
|
+
if (sr(r)) return r;
|
|
1228
1308
|
}
|
|
1229
1309
|
return String(t);
|
|
1230
1310
|
}
|
|
1231
|
-
function
|
|
1311
|
+
function sr(t) {
|
|
1232
1312
|
return t == null || typeof t == "string" || typeof t == "number";
|
|
1233
1313
|
}
|
|
1234
|
-
function
|
|
1314
|
+
function nr(t, r) {
|
|
1235
1315
|
return t instanceof Error ? t.message : t == null ? r : String(t);
|
|
1236
1316
|
}
|
|
1237
|
-
class
|
|
1317
|
+
class et extends g {
|
|
1238
1318
|
}
|
|
1239
|
-
a(
|
|
1319
|
+
a(et, "css", E`
|
|
1240
1320
|
& {
|
|
1241
1321
|
display: inline-flex;
|
|
1242
1322
|
line-height: 1;
|
|
@@ -1317,8 +1397,8 @@ a(Je, "css", E`
|
|
|
1317
1397
|
filter: saturate(0.6);
|
|
1318
1398
|
}
|
|
1319
1399
|
`);
|
|
1320
|
-
const
|
|
1321
|
-
class j extends
|
|
1400
|
+
const ar = ["disabled", "required", "error"];
|
|
1401
|
+
class j extends et {
|
|
1322
1402
|
constructor(e = {}) {
|
|
1323
1403
|
super(e);
|
|
1324
1404
|
a(this, "symbols");
|
|
@@ -1326,11 +1406,11 @@ class j extends Je {
|
|
|
1326
1406
|
a(this, "semanticStateEmitter");
|
|
1327
1407
|
a(this, "inputId");
|
|
1328
1408
|
a(this, "errorId");
|
|
1329
|
-
this.inputId =
|
|
1409
|
+
this.inputId = R("checkbox", e.id), this.errorId = `${this.inputId}-error`;
|
|
1330
1410
|
const i = this.constructor;
|
|
1331
|
-
this.symbols = e.symbols ?? i.symbols,
|
|
1411
|
+
this.symbols = e.symbols ?? i.symbols, lr(this.symbols);
|
|
1332
1412
|
const o = e.initialSemanticState ?? i.defaultSemanticState ?? this.symbols[0][1], s = { ...e };
|
|
1333
|
-
s.defaultValue == null && e.initialSemanticState != null && (s.defaultValue = e.initialSemanticState), this.valueEmitter =
|
|
1413
|
+
s.defaultValue == null && e.initialSemanticState != null && (s.defaultValue = e.initialSemanticState), this.valueEmitter = F(
|
|
1334
1414
|
this,
|
|
1335
1415
|
s,
|
|
1336
1416
|
o,
|
|
@@ -1351,7 +1431,7 @@ class j extends Je {
|
|
|
1351
1431
|
disabled: i = !1,
|
|
1352
1432
|
required: o = !1,
|
|
1353
1433
|
error: s = null
|
|
1354
|
-
} = this.props, n = this.valueEmitter.get(), l = this.symbols.findIndex(([, m]) => Object.is(m, n)), [c] = this.symbols[l] ?? ["?", n], u = c === "☐" ? null : c, h =
|
|
1434
|
+
} = this.props, n = this.valueEmitter.get(), l = this.symbols.findIndex(([, m]) => Object.is(m, n)), [c] = this.symbols[l] ?? ["?", n], u = c === "☐" ? null : c, h = Wt(n), b = wt(this.symbols, n), f = this.Host;
|
|
1355
1435
|
return /* @__PURE__ */ v(
|
|
1356
1436
|
f,
|
|
1357
1437
|
{
|
|
@@ -1373,7 +1453,7 @@ class j extends Je {
|
|
|
1373
1453
|
"aria-invalid": s == null ? null : "true",
|
|
1374
1454
|
"aria-describedby": s == null ? null : this.errorId,
|
|
1375
1455
|
onChange: (m) => {
|
|
1376
|
-
this.cycleState(1, m), m.currentTarget.checked =
|
|
1456
|
+
this.cycleState(1, m), m.currentTarget.checked = wt(
|
|
1377
1457
|
this.symbols,
|
|
1378
1458
|
this.valueEmitter.get()
|
|
1379
1459
|
);
|
|
@@ -1392,7 +1472,7 @@ class j extends Je {
|
|
|
1392
1472
|
);
|
|
1393
1473
|
}
|
|
1394
1474
|
}
|
|
1395
|
-
a(j, "liveProps",
|
|
1475
|
+
a(j, "liveProps", ar), a(j, "symbols", [
|
|
1396
1476
|
["☐", y.Neutral],
|
|
1397
1477
|
["✓", y.Prefer]
|
|
1398
1478
|
]), a(j, "defaultSemanticState", y.Neutral), a(j, "hostName", "check-box"), a(j, "css", E`
|
|
@@ -1408,39 +1488,39 @@ a(j, "liveProps", tr), a(j, "symbols", [
|
|
|
1408
1488
|
box-shadow: var(--checkbox-box-shadow-checked);
|
|
1409
1489
|
}
|
|
1410
1490
|
`);
|
|
1411
|
-
function
|
|
1491
|
+
function lr(t) {
|
|
1412
1492
|
if (!Array.isArray(t) || t.length === 0)
|
|
1413
1493
|
throw new TypeError("Checkbox symbols must be a non-empty tuple array");
|
|
1414
1494
|
for (const r of t)
|
|
1415
1495
|
if (!Array.isArray(r) || r.length < 2)
|
|
1416
1496
|
throw new TypeError("Checkbox symbols must be [symbol, state] tuples");
|
|
1417
1497
|
}
|
|
1418
|
-
function
|
|
1498
|
+
function wt(t, r) {
|
|
1419
1499
|
const e = t.findIndex(([, i]) => Object.is(i, r));
|
|
1420
1500
|
return r === y.Prefer || r === y.Require || t.length === 2 && e === 1;
|
|
1421
1501
|
}
|
|
1422
|
-
class
|
|
1502
|
+
class U extends g {
|
|
1423
1503
|
constructor(e = {}) {
|
|
1424
1504
|
super(e);
|
|
1425
1505
|
a(this, "optionsEmitter");
|
|
1426
1506
|
a(this, "optionStateEmitters", /* @__PURE__ */ new Map());
|
|
1427
1507
|
a(this, "staleOptionValues", /* @__PURE__ */ new Set());
|
|
1428
|
-
this.optionsEmitter =
|
|
1508
|
+
this.optionsEmitter = pr(e.options) ? e.options : null;
|
|
1429
1509
|
}
|
|
1430
1510
|
initialize() {
|
|
1431
1511
|
this.optionsEmitter && this.watch(this.optionsEmitter);
|
|
1432
1512
|
}
|
|
1433
1513
|
render() {
|
|
1434
|
-
var f, m,
|
|
1514
|
+
var f, m, C;
|
|
1435
1515
|
const e = ((f = this.optionsEmitter) == null ? void 0 : f.get()) ?? (Array.isArray(this.props.options) ? this.props.options : []);
|
|
1436
1516
|
if (!Array.isArray(e))
|
|
1437
1517
|
throw new TypeError("FilterPanel options must be an array or emitter of arrays");
|
|
1438
|
-
const i = ((m = this.optionsEmitter) == null ? void 0 : m.getFetchState()) ?? S.Ready, o = (
|
|
1518
|
+
const i = ((m = this.optionsEmitter) == null ? void 0 : m.getFetchState()) ?? S.Ready, o = (C = this.optionsEmitter) == null ? void 0 : C.getError(), s = vt(this.props.filters), n = this.props.filterModes ?? j.symbols, l = this.props.defaultSemanticState ?? y.Neutral, c = new Set(e.map(_e));
|
|
1439
1519
|
this.staleOptionValues = new Set(
|
|
1440
1520
|
[...this.optionStateEmitters.keys()].filter((T) => !c.has(T))
|
|
1441
1521
|
);
|
|
1442
1522
|
const u = this.Host, h = i === S.Initial || i === S.Loading, b = x(this.props) || null;
|
|
1443
|
-
return i === S.Error && e.length === 0 ? /* @__PURE__ */ p(u, { className: b, children: /* @__PURE__ */ p("p", { role: "alert", children:
|
|
1523
|
+
return i === S.Error && e.length === 0 ? /* @__PURE__ */ p(u, { className: b, children: /* @__PURE__ */ p("p", { role: "alert", children: Et(o, "Unable to load filter options") }) }) : h && e.length === 0 ? /* @__PURE__ */ p(u, { className: b, children: /* @__PURE__ */ p("p", { role: "status", children: "Loading filter options…" }) }) : /* @__PURE__ */ v(
|
|
1444
1524
|
u,
|
|
1445
1525
|
{
|
|
1446
1526
|
className: b,
|
|
@@ -1448,24 +1528,24 @@ class _ extends g {
|
|
|
1448
1528
|
"aria-label": this.props.label ?? "Filter options",
|
|
1449
1529
|
"aria-busy": h ? "true" : null,
|
|
1450
1530
|
children: [
|
|
1451
|
-
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children:
|
|
1531
|
+
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children: Et(o, "Unable to load filter options") }) : null,
|
|
1452
1532
|
h ? /* @__PURE__ */ p("p", { role: "status", children: "Loading filter options…" }) : null,
|
|
1453
1533
|
e.length === 0 ? /* @__PURE__ */ p("p", { children: "No filter options" }) : e.map((T) => {
|
|
1454
|
-
const k =
|
|
1534
|
+
const k = _e(T), O = dr(T), P = s.get(k) ?? l, K = this.optionEmitter(k, P);
|
|
1455
1535
|
return /* @__PURE__ */ p(
|
|
1456
|
-
|
|
1536
|
+
cr,
|
|
1457
1537
|
{
|
|
1458
1538
|
label: O,
|
|
1459
|
-
valueEmitter:
|
|
1539
|
+
valueEmitter: K,
|
|
1460
1540
|
symbols: n,
|
|
1461
|
-
onChange: (
|
|
1462
|
-
var
|
|
1541
|
+
onChange: (M, z) => {
|
|
1542
|
+
var Y, J;
|
|
1463
1543
|
z == null || z.stopPropagation();
|
|
1464
|
-
const N =
|
|
1465
|
-
|
|
1544
|
+
const N = vt(this.props.filters);
|
|
1545
|
+
M === y.Neutral ? N.delete(k) : N.set(k, M), (J = (Y = this.props).onChange) == null || J.call(Y, N, z);
|
|
1466
1546
|
}
|
|
1467
1547
|
},
|
|
1468
|
-
|
|
1548
|
+
ur(k)
|
|
1469
1549
|
);
|
|
1470
1550
|
})
|
|
1471
1551
|
]
|
|
@@ -1490,7 +1570,7 @@ class _ extends g {
|
|
|
1490
1570
|
return this.optionStateEmitters.set(e, s), s;
|
|
1491
1571
|
}
|
|
1492
1572
|
}
|
|
1493
|
-
a(
|
|
1573
|
+
a(U, "liveProps", []), a(U, "dependencies", [j]), a(U, "hostName", "filter-panel"), a(U, "css", E`
|
|
1494
1574
|
& {
|
|
1495
1575
|
position: absolute;
|
|
1496
1576
|
background: white;
|
|
@@ -1510,14 +1590,14 @@ a(_, "liveProps", []), a(_, "dependencies", [j]), a(_, "hostName", "filter-panel
|
|
|
1510
1590
|
margin: 0;
|
|
1511
1591
|
}
|
|
1512
1592
|
`);
|
|
1513
|
-
const
|
|
1514
|
-
function
|
|
1593
|
+
const cr = j;
|
|
1594
|
+
function vt(t) {
|
|
1515
1595
|
if (t == null) return /* @__PURE__ */ new Map();
|
|
1516
1596
|
if (t instanceof Map) return new Map(t);
|
|
1517
1597
|
if (Array.isArray(t)) return new Map(t);
|
|
1518
1598
|
throw new TypeError("FilterPanel filters must be a Map or tuple array");
|
|
1519
1599
|
}
|
|
1520
|
-
function
|
|
1600
|
+
function _e(t) {
|
|
1521
1601
|
if (typeof t == "string" || typeof t == "number") return t;
|
|
1522
1602
|
if (t != null && typeof t == "object") {
|
|
1523
1603
|
const r = Reflect.get(t, "value");
|
|
@@ -1525,26 +1605,26 @@ function He(t) {
|
|
|
1525
1605
|
}
|
|
1526
1606
|
throw new TypeError("Filter options must be strings, numbers, or value/label objects");
|
|
1527
1607
|
}
|
|
1528
|
-
function
|
|
1608
|
+
function dr(t) {
|
|
1529
1609
|
if (t != null && typeof t == "object") {
|
|
1530
1610
|
const r = Reflect.get(t, "label");
|
|
1531
|
-
if (r != null) return
|
|
1611
|
+
if (r != null) return hr(r) ? r : String(r);
|
|
1532
1612
|
}
|
|
1533
|
-
return String(
|
|
1613
|
+
return String(_e(t));
|
|
1534
1614
|
}
|
|
1535
|
-
function
|
|
1615
|
+
function ur(t) {
|
|
1536
1616
|
return `${typeof t}:${String(t)}`;
|
|
1537
1617
|
}
|
|
1538
|
-
function
|
|
1618
|
+
function hr(t) {
|
|
1539
1619
|
return typeof t == "string" || typeof t == "number";
|
|
1540
1620
|
}
|
|
1541
|
-
function
|
|
1621
|
+
function pr(t) {
|
|
1542
1622
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
1543
1623
|
}
|
|
1544
|
-
function
|
|
1624
|
+
function Et(t, r) {
|
|
1545
1625
|
return t instanceof Error ? t.message : t == null ? r : String(t);
|
|
1546
1626
|
}
|
|
1547
|
-
class
|
|
1627
|
+
class te extends g {
|
|
1548
1628
|
constructor() {
|
|
1549
1629
|
super(...arguments);
|
|
1550
1630
|
a(this, "filterVisible", !1);
|
|
@@ -1571,11 +1651,11 @@ class ee extends g {
|
|
|
1571
1651
|
}
|
|
1572
1652
|
render() {
|
|
1573
1653
|
const e = this.props.sortEmitter.get(), i = (e == null ? void 0 : e.field) === this.props.field ? e.direction : null, o = new Map(
|
|
1574
|
-
(this.props.filtersEmitter.get()[this.props.field] ?? []).filter(
|
|
1654
|
+
(this.props.filtersEmitter.get()[this.props.field] ?? []).filter(fr)
|
|
1575
1655
|
), s = this.props.label ?? String(this.props.field), n = `Filter ${String(s)}`;
|
|
1576
1656
|
let l = null;
|
|
1577
1657
|
return this.filterVisible && this.props.filterOptions != null && (l = /* @__PURE__ */ p(
|
|
1578
|
-
|
|
1658
|
+
U,
|
|
1579
1659
|
{
|
|
1580
1660
|
label: n,
|
|
1581
1661
|
options: this.props.filterOptions,
|
|
@@ -1622,7 +1702,7 @@ class ee extends g {
|
|
|
1622
1702
|
);
|
|
1623
1703
|
}
|
|
1624
1704
|
}
|
|
1625
|
-
a(
|
|
1705
|
+
a(te, "liveProps", []), a(te, "dependencies", [U]), a(te, "css", E`
|
|
1626
1706
|
fray-datatable > table > thead > tr > th[aria-sort] {
|
|
1627
1707
|
position: relative;
|
|
1628
1708
|
padding-right: 24px;
|
|
@@ -1678,13 +1758,13 @@ a(ee, "liveProps", []), a(ee, "dependencies", [_]), a(ee, "css", E`
|
|
|
1678
1758
|
opacity: 1;
|
|
1679
1759
|
}
|
|
1680
1760
|
`);
|
|
1681
|
-
function
|
|
1761
|
+
function fr(t) {
|
|
1682
1762
|
return typeof t[0] == "string" || typeof t[0] == "number";
|
|
1683
1763
|
}
|
|
1684
|
-
class
|
|
1764
|
+
class re extends g {
|
|
1685
1765
|
render() {
|
|
1686
1766
|
return /* @__PURE__ */ p("thead", { children: /* @__PURE__ */ p("tr", { children: this.props.columns.map((r) => /* @__PURE__ */ p(
|
|
1687
|
-
|
|
1767
|
+
te,
|
|
1688
1768
|
{
|
|
1689
1769
|
field: r.field,
|
|
1690
1770
|
sortEmitter: this.props.sortEmitter,
|
|
@@ -1700,7 +1780,7 @@ class te extends g {
|
|
|
1700
1780
|
)) }) });
|
|
1701
1781
|
}
|
|
1702
1782
|
}
|
|
1703
|
-
a(
|
|
1783
|
+
a(re, "liveProps", []), a(re, "dependencies", [te]), a(re, "css", E`
|
|
1704
1784
|
fray-datatable > table > thead {
|
|
1705
1785
|
color: var(--table-header-color);
|
|
1706
1786
|
background: var(--ui-gradient);
|
|
@@ -1715,36 +1795,36 @@ a(te, "liveProps", []), a(te, "dependencies", [ee]), a(te, "css", E`
|
|
|
1715
1795
|
border-right: none;
|
|
1716
1796
|
}
|
|
1717
1797
|
`);
|
|
1718
|
-
const
|
|
1798
|
+
const mr = {
|
|
1719
1799
|
[y.Neutral]: "☐",
|
|
1720
1800
|
[y.Prefer]: "",
|
|
1721
1801
|
[y.Require]: "_",
|
|
1722
1802
|
[y.Deny]: "!"
|
|
1723
1803
|
};
|
|
1724
|
-
function
|
|
1725
|
-
|
|
1804
|
+
function br(t, { sort: r = null, filters: e = {} } = {}) {
|
|
1805
|
+
Er(t), r != null && (Ft(r), t.searchParams.set("sort", `${r.field}:${r.direction}`));
|
|
1726
1806
|
for (const [i, o] of Object.entries(e))
|
|
1727
1807
|
for (const [s, n] of o) {
|
|
1728
|
-
if (!
|
|
1808
|
+
if (!Re(n))
|
|
1729
1809
|
throw new TypeError(`Unknown filter mode for ${i}: ${String(n)}`);
|
|
1730
1810
|
t.searchParams.append(
|
|
1731
1811
|
"filter",
|
|
1732
|
-
`${i}:${
|
|
1812
|
+
`${i}:${mr[n]}:${JSON.stringify(s)}`
|
|
1733
1813
|
);
|
|
1734
1814
|
}
|
|
1735
1815
|
return t;
|
|
1736
1816
|
}
|
|
1737
|
-
function
|
|
1817
|
+
function gr(t, r, e) {
|
|
1738
1818
|
if (!Array.isArray(t)) throw new TypeError("Local table data must be an array");
|
|
1739
|
-
const i = t.filter((s) =>
|
|
1819
|
+
const i = t.filter((s) => yr(s, e));
|
|
1740
1820
|
if (r == null) return i;
|
|
1741
|
-
|
|
1821
|
+
Ft(r);
|
|
1742
1822
|
const o = r.direction === "asc" ? 1 : -1;
|
|
1743
|
-
return [...i].sort((s, n) =>
|
|
1823
|
+
return [...i].sort((s, n) => vr(Qe(s, r.field), Qe(n, r.field)) * o);
|
|
1744
1824
|
}
|
|
1745
|
-
function
|
|
1825
|
+
function yr(t, r) {
|
|
1746
1826
|
for (const [e, i] of Object.entries(r)) {
|
|
1747
|
-
const o =
|
|
1827
|
+
const o = Qe(t, e);
|
|
1748
1828
|
if (i.filter(([, c]) => c === y.Deny).some(([c]) => Object.is(c, o))) return !1;
|
|
1749
1829
|
const n = i.filter(([, c]) => c === y.Require);
|
|
1750
1830
|
if (n.length > 0 && !n.some(([c]) => Object.is(c, o))) return !1;
|
|
@@ -1753,80 +1833,80 @@ function hr(t, r) {
|
|
|
1753
1833
|
}
|
|
1754
1834
|
return !0;
|
|
1755
1835
|
}
|
|
1756
|
-
function
|
|
1757
|
-
if (t == null || typeof t != "object" || typeof Reflect.get(t, "field") != "string" || !
|
|
1836
|
+
function Ft(t) {
|
|
1837
|
+
if (t == null || typeof t != "object" || typeof Reflect.get(t, "field") != "string" || !wr(Reflect.get(t, "direction")))
|
|
1758
1838
|
throw new TypeError("Table sort must contain a field and asc/desc direction");
|
|
1759
1839
|
}
|
|
1760
|
-
function
|
|
1840
|
+
function wr(t) {
|
|
1761
1841
|
return t === "asc" || t === "desc";
|
|
1762
1842
|
}
|
|
1763
|
-
function
|
|
1843
|
+
function vr(t, r) {
|
|
1764
1844
|
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));
|
|
1765
1845
|
}
|
|
1766
|
-
function
|
|
1846
|
+
function Qe(t, r) {
|
|
1767
1847
|
if (!(t == null || typeof t != "object" && typeof t != "function"))
|
|
1768
1848
|
return Reflect.get(t, r);
|
|
1769
1849
|
}
|
|
1770
|
-
function
|
|
1850
|
+
function Er(t) {
|
|
1771
1851
|
if (t == null || typeof t != "object" && typeof t != "function" || typeof Reflect.get(t, "toString") != "function")
|
|
1772
1852
|
throw new TypeError("Table serializer requires a URL");
|
|
1773
1853
|
const r = Reflect.get(t, "searchParams");
|
|
1774
1854
|
if (r == null || typeof Reflect.get(r, "set") != "function" || typeof Reflect.get(r, "append") != "function")
|
|
1775
1855
|
throw new TypeError("Table serializer requires URL search parameters");
|
|
1776
1856
|
}
|
|
1777
|
-
function
|
|
1778
|
-
const r =
|
|
1857
|
+
function xr(t) {
|
|
1858
|
+
const r = rt(t), e = Dt(t.data) ? null : new I(t.data, {
|
|
1779
1859
|
owner: t.owner,
|
|
1780
1860
|
purpose: "local table data"
|
|
1781
|
-
}), i = e ?? t.data, o = new
|
|
1861
|
+
}), i = e ?? t.data, o = new Te(
|
|
1782
1862
|
[i, r.sortEmitter, r.filtersEmitter],
|
|
1783
|
-
([s, n, l]) =>
|
|
1863
|
+
([s, n, l]) => gr(s, n, l),
|
|
1784
1864
|
{ owner: t.owner, purpose: "local table view" }
|
|
1785
1865
|
);
|
|
1786
|
-
return new
|
|
1866
|
+
return new tt(o, r, () => {
|
|
1787
1867
|
o.dispose(), e == null || e.dispose();
|
|
1788
1868
|
});
|
|
1789
1869
|
}
|
|
1790
|
-
function
|
|
1791
|
-
|
|
1792
|
-
const r =
|
|
1793
|
-
return new
|
|
1870
|
+
function Ai(t) {
|
|
1871
|
+
Ir(t.query);
|
|
1872
|
+
const r = rt(t);
|
|
1873
|
+
return new tt(t.query, r);
|
|
1794
1874
|
}
|
|
1795
|
-
function
|
|
1875
|
+
function kr(t) {
|
|
1796
1876
|
if (t.handler == null || typeof t.handler.fetch != "function")
|
|
1797
1877
|
throw new TypeError("Table data-source handler must implement fetch");
|
|
1798
|
-
const r =
|
|
1878
|
+
const r = rt(t), e = new bt("sort", r.sortEmitter, {
|
|
1799
1879
|
owner: t.owner,
|
|
1800
1880
|
purpose: "table sort argument"
|
|
1801
|
-
}), i = new
|
|
1881
|
+
}), i = new bt("filters", r.filtersEmitter, {
|
|
1802
1882
|
owner: t.owner,
|
|
1803
1883
|
purpose: "table filters argument"
|
|
1804
|
-
}), o = new
|
|
1884
|
+
}), o = new Vt({
|
|
1805
1885
|
handler: t.handler,
|
|
1806
1886
|
args: { sort: e, filters: i },
|
|
1807
1887
|
owner: t.owner,
|
|
1808
1888
|
purpose: "table query",
|
|
1809
1889
|
keepPreviousValue: !0
|
|
1810
1890
|
});
|
|
1811
|
-
return new
|
|
1891
|
+
return new tt(o, r, () => {
|
|
1812
1892
|
o.dispose(), e.dispose(), i.dispose();
|
|
1813
1893
|
});
|
|
1814
1894
|
}
|
|
1815
|
-
function
|
|
1895
|
+
function Sr(t) {
|
|
1816
1896
|
if (typeof t.url != "string" || t.url.length === 0)
|
|
1817
1897
|
throw new TypeError("REST table data source requires a URL");
|
|
1818
1898
|
const r = {
|
|
1819
1899
|
url: t.url,
|
|
1820
|
-
serialize: t.serializeQuery ??
|
|
1900
|
+
serialize: t.serializeQuery ?? br
|
|
1821
1901
|
};
|
|
1822
|
-
return t.baseUrl != null && (r.baseUrl = t.baseUrl), t.fetch != null && (r.fetch = t.fetch),
|
|
1823
|
-
handler: new
|
|
1902
|
+
return t.baseUrl != null && (r.baseUrl = t.baseUrl), t.fetch != null && (r.fetch = t.fetch), kr({
|
|
1903
|
+
handler: new Ut(r),
|
|
1824
1904
|
...t.sortEmitter == null ? {} : { sortEmitter: t.sortEmitter },
|
|
1825
1905
|
...t.filtersEmitter == null ? {} : { filtersEmitter: t.filtersEmitter },
|
|
1826
1906
|
...t.owner === void 0 ? {} : { owner: t.owner }
|
|
1827
1907
|
});
|
|
1828
1908
|
}
|
|
1829
|
-
class
|
|
1909
|
+
class tt {
|
|
1830
1910
|
constructor(r, e, i = null) {
|
|
1831
1911
|
a(this, "sortEmitter");
|
|
1832
1912
|
a(this, "filtersEmitter");
|
|
@@ -1842,7 +1922,7 @@ class Ze {
|
|
|
1842
1922
|
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());
|
|
1843
1923
|
}
|
|
1844
1924
|
}
|
|
1845
|
-
function
|
|
1925
|
+
function rt(t) {
|
|
1846
1926
|
const r = t.sortEmitter == null ? new I(null, {
|
|
1847
1927
|
owner: t.owner,
|
|
1848
1928
|
purpose: "table sort"
|
|
@@ -1857,14 +1937,14 @@ function Xe(t) {
|
|
|
1857
1937
|
ownedFiltersEmitter: e
|
|
1858
1938
|
};
|
|
1859
1939
|
}
|
|
1860
|
-
function
|
|
1940
|
+
function Dt(t) {
|
|
1861
1941
|
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";
|
|
1862
1942
|
}
|
|
1863
|
-
function
|
|
1864
|
-
if (!
|
|
1943
|
+
function Ir(t) {
|
|
1944
|
+
if (!Dt(t))
|
|
1865
1945
|
throw new TypeError("Table query must be an emitter");
|
|
1866
1946
|
}
|
|
1867
|
-
class
|
|
1947
|
+
class he extends g {
|
|
1868
1948
|
constructor(e) {
|
|
1869
1949
|
var i, o;
|
|
1870
1950
|
super(e);
|
|
@@ -1881,7 +1961,7 @@ class ce extends g {
|
|
|
1881
1961
|
a(this, "ownedSortEmitter");
|
|
1882
1962
|
a(this, "ownedFiltersEmitter");
|
|
1883
1963
|
a(this, "ownedDataSource", null);
|
|
1884
|
-
|
|
1964
|
+
Rr(e), this.columns = Tr(e.columns), this.rowKey = Cr(e.rowKey), this.suppliedDataSource = e.dataSource ?? null, this.ownedSortEmitter = this.suppliedDataSource == null ? new I(null, { owner: this, purpose: "table sort" }) : null, this.ownedFiltersEmitter = this.suppliedDataSource == null ? new I({}, { 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 ? xe({
|
|
1885
1965
|
owner: this,
|
|
1886
1966
|
multiSelect: !0,
|
|
1887
1967
|
...e.selectedItemsEmitter == null ? {} : { selectedItemsEmitter: e.selectedItemsEmitter },
|
|
@@ -1890,7 +1970,7 @@ class ce extends g {
|
|
|
1890
1970
|
return ((s = this.query) == null ? void 0 : s.get()) ?? [];
|
|
1891
1971
|
},
|
|
1892
1972
|
getKey: this.rowKey
|
|
1893
|
-
}) :
|
|
1973
|
+
}) : xe({
|
|
1894
1974
|
owner: this,
|
|
1895
1975
|
...e.selectedItemEmitter == null ? {} : { selectedItemEmitter: e.selectedItemEmitter },
|
|
1896
1976
|
getItems: () => {
|
|
@@ -1898,15 +1978,15 @@ class ce extends g {
|
|
|
1898
1978
|
return ((s = this.query) == null ? void 0 : s.get()) ?? [];
|
|
1899
1979
|
},
|
|
1900
1980
|
getKey: this.rowKey
|
|
1901
|
-
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof
|
|
1981
|
+
}), this.selectedItemsEmitter = this.selectionHandler.selectedItemsEmitter, this.selectedItemEmitter = this.selectionHandler instanceof Ze ? this.selectionHandler.selectedItemEmitter : null;
|
|
1902
1982
|
}
|
|
1903
1983
|
initialize() {
|
|
1904
|
-
this.suppliedDataSource != null ? this.dataSource = this.suppliedDataSource : this.props.rest != null ? (this.ownedDataSource =
|
|
1984
|
+
this.suppliedDataSource != null ? this.dataSource = this.suppliedDataSource : this.props.rest != null ? (this.ownedDataSource = Sr({
|
|
1905
1985
|
...this.props.rest,
|
|
1906
1986
|
sortEmitter: this.sortEmitter,
|
|
1907
1987
|
filtersEmitter: this.filtersEmitter,
|
|
1908
1988
|
owner: this
|
|
1909
|
-
}), this.dataSource = this.ownedDataSource) : (this.ownedDataSource =
|
|
1989
|
+
}), this.dataSource = this.ownedDataSource) : (this.ownedDataSource = xr({
|
|
1910
1990
|
data: this.props.data ?? [],
|
|
1911
1991
|
sortEmitter: this.sortEmitter,
|
|
1912
1992
|
filtersEmitter: this.filtersEmitter,
|
|
@@ -1926,7 +2006,7 @@ class ce extends g {
|
|
|
1926
2006
|
className: x(this.props) || null,
|
|
1927
2007
|
children: [
|
|
1928
2008
|
s ? /* @__PURE__ */ p("p", { role: "status", children: "Loading rows…" }) : null,
|
|
1929
|
-
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children:
|
|
2009
|
+
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children: $r(o, "Unable to load rows") }) : null,
|
|
1930
2010
|
i === S.Error && typeof ((b = this.dataSource) == null ? void 0 : b.retry) == "function" ? /* @__PURE__ */ p(
|
|
1931
2011
|
"button",
|
|
1932
2012
|
{
|
|
@@ -1941,7 +2021,7 @@ class ce extends g {
|
|
|
1941
2021
|
/* @__PURE__ */ v("table", { "aria-busy": s ? "true" : null, children: [
|
|
1942
2022
|
this.props.caption == null ? null : /* @__PURE__ */ p("caption", { children: this.props.caption }),
|
|
1943
2023
|
/* @__PURE__ */ p(
|
|
1944
|
-
|
|
2024
|
+
re,
|
|
1945
2025
|
{
|
|
1946
2026
|
columns: this.columns,
|
|
1947
2027
|
sortEmitter: this.sortEmitter,
|
|
@@ -1966,7 +2046,7 @@ class ce extends g {
|
|
|
1966
2046
|
"data-fray-selectable-row": "",
|
|
1967
2047
|
"aria-selected": String(n),
|
|
1968
2048
|
tabIndex: i === 0 ? 0 : -1,
|
|
1969
|
-
children: this.columns.map((l) => /* @__PURE__ */ p("td", { children: l.render ? l.render(e, i) :
|
|
2049
|
+
children: this.columns.map((l) => /* @__PURE__ */ p("td", { children: l.render ? l.render(e, i) : zr(e[l.field]) }, String(l.field)))
|
|
1970
2050
|
},
|
|
1971
2051
|
String(s)
|
|
1972
2052
|
);
|
|
@@ -1974,7 +2054,7 @@ class ce extends g {
|
|
|
1974
2054
|
renderPlaceholders() {
|
|
1975
2055
|
const e = this.props.placeholderCount ?? 5;
|
|
1976
2056
|
return Array.from({ length: e }, (i, o) => /* @__PURE__ */ p("tr", { children: this.columns.map((s, n) => /* @__PURE__ */ p("td", { children: /* @__PURE__ */ p(
|
|
1977
|
-
|
|
2057
|
+
H,
|
|
1978
2058
|
{
|
|
1979
2059
|
width: 45 + (o + n) % 6 * 8
|
|
1980
2060
|
}
|
|
@@ -2002,7 +2082,7 @@ class ce extends g {
|
|
|
2002
2082
|
this.selectionHandler.destroy(), (e = this.ownedDataSource) == null || e.dispose(), (i = this.ownedSortEmitter) == null || i.dispose(), (o = this.ownedFiltersEmitter) == null || o.dispose();
|
|
2003
2083
|
}
|
|
2004
2084
|
}
|
|
2005
|
-
a(
|
|
2085
|
+
a(he, "liveProps", []), a(he, "dependencies", [H, re]), a(he, "hostName", "data-table"), a(he, "css", E`
|
|
2006
2086
|
& {
|
|
2007
2087
|
display: block;
|
|
2008
2088
|
overflow: auto;
|
|
@@ -2063,7 +2143,7 @@ a(ce, "liveProps", []), a(ce, "dependencies", [V, te]), a(ce, "hostName", "data-
|
|
|
2063
2143
|
}
|
|
2064
2144
|
|
|
2065
2145
|
`);
|
|
2066
|
-
function
|
|
2146
|
+
function Tr(t) {
|
|
2067
2147
|
if (!Array.isArray(t) || t.length === 0)
|
|
2068
2148
|
throw new TypeError("DataTable columns must be a non-empty array");
|
|
2069
2149
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -2081,7 +2161,7 @@ function vr(t) {
|
|
|
2081
2161
|
return e;
|
|
2082
2162
|
});
|
|
2083
2163
|
}
|
|
2084
|
-
function
|
|
2164
|
+
function Rr(t) {
|
|
2085
2165
|
var n, l;
|
|
2086
2166
|
const e = [
|
|
2087
2167
|
"mode",
|
|
@@ -2105,8 +2185,8 @@ function Er(t) {
|
|
|
2105
2185
|
throw new TypeError("DataTable dataSource must implement the table data-source contract");
|
|
2106
2186
|
}
|
|
2107
2187
|
}
|
|
2108
|
-
function
|
|
2109
|
-
if (t == null) return
|
|
2188
|
+
function Cr(t) {
|
|
2189
|
+
if (t == null) return Xe;
|
|
2110
2190
|
if (typeof t == "function") return t;
|
|
2111
2191
|
if (typeof t == "string" && t.length > 0)
|
|
2112
2192
|
return (r, e) => {
|
|
@@ -2117,19 +2197,19 @@ function xr(t) {
|
|
|
2117
2197
|
};
|
|
2118
2198
|
throw new TypeError("DataTable rowKey must be a function or property name");
|
|
2119
2199
|
}
|
|
2120
|
-
function
|
|
2200
|
+
function zr(t) {
|
|
2121
2201
|
return t == null || typeof t == "string" || typeof t == "number" ? t : String(t);
|
|
2122
2202
|
}
|
|
2123
|
-
function
|
|
2203
|
+
function $r(t, r) {
|
|
2124
2204
|
return t instanceof Error ? t.message : t == null ? r : String(t);
|
|
2125
2205
|
}
|
|
2126
|
-
class
|
|
2206
|
+
class it extends g {
|
|
2127
2207
|
render() {
|
|
2128
2208
|
return this.props.children ?? [];
|
|
2129
2209
|
}
|
|
2130
2210
|
}
|
|
2131
|
-
a(
|
|
2132
|
-
function
|
|
2211
|
+
a(it, "liveProps", []);
|
|
2212
|
+
function G(t) {
|
|
2133
2213
|
if (!Array.isArray(t)) throw new TypeError("Tree nodes must be an array");
|
|
2134
2214
|
const r = /* @__PURE__ */ new Set(), e = (i) => {
|
|
2135
2215
|
for (const o of i) {
|
|
@@ -2143,18 +2223,18 @@ function Y(t) {
|
|
|
2143
2223
|
};
|
|
2144
2224
|
e(t);
|
|
2145
2225
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2226
|
+
function ji(t, r) {
|
|
2227
|
+
return G(t), ot(t, r);
|
|
2148
2228
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return new
|
|
2229
|
+
function qi(t, r, e = null) {
|
|
2230
|
+
return new Te(
|
|
2151
2231
|
[t, r],
|
|
2152
|
-
([i, o]) => (
|
|
2232
|
+
([i, o]) => (G(i), o == null ? null : ot(i, o)),
|
|
2153
2233
|
{ owner: e, purpose: "tree node projection" }
|
|
2154
2234
|
);
|
|
2155
2235
|
}
|
|
2156
|
-
function
|
|
2157
|
-
if (
|
|
2236
|
+
function Or(t, r, e) {
|
|
2237
|
+
if (G(t), typeof e != "function") throw new TypeError("Tree node update must be a function");
|
|
2158
2238
|
const i = (s) => {
|
|
2159
2239
|
for (let n = 0; n < s.length; n += 1) {
|
|
2160
2240
|
const l = s[n];
|
|
@@ -2176,21 +2256,21 @@ function Ir(t, r, e) {
|
|
|
2176
2256
|
}
|
|
2177
2257
|
return s;
|
|
2178
2258
|
}, o = i(t);
|
|
2179
|
-
return Object.is(o, t) ||
|
|
2259
|
+
return Object.is(o, t) || G(o), o;
|
|
2180
2260
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const o = t.get(), s =
|
|
2261
|
+
function Ni(t, r, e, i = "tree node updated") {
|
|
2262
|
+
const o = t.get(), s = Or(o, r, e);
|
|
2183
2263
|
return Object.is(s, o) ? !1 : t.set(s, i);
|
|
2184
2264
|
}
|
|
2185
|
-
function
|
|
2265
|
+
function ot(t, r) {
|
|
2186
2266
|
for (const e of t) {
|
|
2187
2267
|
if (Object.is(e.id, r)) return e;
|
|
2188
|
-
const i =
|
|
2268
|
+
const i = ot(e.children ?? [], r);
|
|
2189
2269
|
if (i != null) return i;
|
|
2190
2270
|
}
|
|
2191
2271
|
return null;
|
|
2192
2272
|
}
|
|
2193
|
-
class
|
|
2273
|
+
class pe extends g {
|
|
2194
2274
|
constructor(e) {
|
|
2195
2275
|
super(e);
|
|
2196
2276
|
a(this, "nodesEmitter");
|
|
@@ -2202,10 +2282,10 @@ class de extends g {
|
|
|
2202
2282
|
a(this, "focusedKey", null);
|
|
2203
2283
|
a(this, "typeahead", "");
|
|
2204
2284
|
a(this, "typeaheadTimer", null);
|
|
2205
|
-
if (
|
|
2285
|
+
if (kt(e.nodes))
|
|
2206
2286
|
this.nodesEmitter = e.nodes, this.ownedNodesEmitter = null;
|
|
2207
2287
|
else {
|
|
2208
|
-
const i = e.nodes ??
|
|
2288
|
+
const i = e.nodes ?? Be(e.children);
|
|
2209
2289
|
this.ownedNodesEmitter = new I(i, {
|
|
2210
2290
|
owner: this,
|
|
2211
2291
|
purpose: "tree nodes"
|
|
@@ -2220,12 +2300,12 @@ class de extends g {
|
|
|
2220
2300
|
}
|
|
2221
2301
|
setProps(e) {
|
|
2222
2302
|
if (this.ownedNodesEmitter != null) {
|
|
2223
|
-
if (
|
|
2303
|
+
if (kt(e.nodes))
|
|
2224
2304
|
throw new TypeError(
|
|
2225
2305
|
"TreeView cannot replace static or declarative nodes with an emitter"
|
|
2226
2306
|
);
|
|
2227
2307
|
this.ownedNodesEmitter.set(
|
|
2228
|
-
e.nodes ??
|
|
2308
|
+
e.nodes ?? Be(e.children),
|
|
2229
2309
|
"tree structure changed"
|
|
2230
2310
|
);
|
|
2231
2311
|
}
|
|
@@ -2233,43 +2313,46 @@ class de extends g {
|
|
|
2233
2313
|
}
|
|
2234
2314
|
render() {
|
|
2235
2315
|
const e = this.nodesEmitter.get();
|
|
2236
|
-
|
|
2237
|
-
const i = this.nodesEmitter.getFetchState(), o = this.nodesEmitter.getError(), s = new Set(this.expandedKeysEmitter.get()), n =
|
|
2316
|
+
G(e);
|
|
2317
|
+
const i = this.nodesEmitter.getFetchState(), o = this.nodesEmitter.getError(), s = new Set(this.expandedKeysEmitter.get()), n = xt(e, s), l = this.selectedKeyEmitter.get(), c = n.find(({ node: h }) => Object.is(h.id, this.focusedKey)) ?? n.find(({ node: h }) => Object.is(h.id, l)) ?? n[0] ?? null;
|
|
2238
2318
|
this.focusedKey = (c == null ? void 0 : c.node.id) ?? null;
|
|
2239
2319
|
const u = this.Host;
|
|
2240
2320
|
return /* @__PURE__ */ v(u, { className: x(this.props) || null, children: [
|
|
2241
|
-
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children:
|
|
2321
|
+
i === S.Error ? /* @__PURE__ */ p("p", { role: "alert", children: Ar(o, "Unable to load tree items") }) : null,
|
|
2242
2322
|
i !== S.Error && n.length === 0 ? /* @__PURE__ */ p("p", { role: "status", children: "No tree items" }) : /* @__PURE__ */ p("ul", { role: "tree", "aria-label": this.props.label, children: n.map((h, b) => {
|
|
2243
|
-
var
|
|
2244
|
-
const { node: f, depth: m, position:
|
|
2323
|
+
var N, Y, J, ht, pt, ft, mt;
|
|
2324
|
+
const { node: f, depth: m, position: C, setSize: T } = h, k = (((N = f.children) == null ? void 0 : N.length) ?? 0) > 0, O = k && s.has(f.id), P = Object.is(f.id, l), K = ((J = (Y = this.props).renderItem) == null ? void 0 : J.call(Y, f, m)) ?? f.label, M = (pt = (ht = this.props).itemLabelClassName) == null ? void 0 : pt.call(ht, f, m), z = (mt = (ft = this.props).itemLabelStyle) == null ? void 0 : mt.call(ft, f, m);
|
|
2245
2325
|
return /* @__PURE__ */ v(
|
|
2246
2326
|
"li",
|
|
2247
2327
|
{
|
|
2248
2328
|
role: "treeitem",
|
|
2249
2329
|
"data-index": b,
|
|
2250
2330
|
"aria-level": m + 1,
|
|
2251
|
-
"aria-posinset":
|
|
2331
|
+
"aria-posinset": C,
|
|
2252
2332
|
"aria-setsize": T,
|
|
2253
2333
|
"aria-expanded": k ? String(O) : null,
|
|
2254
|
-
"aria-selected": String(
|
|
2334
|
+
"aria-selected": String(P),
|
|
2255
2335
|
tabIndex: Object.is(f.id, c == null ? void 0 : c.node.id) ? 0 : -1,
|
|
2256
2336
|
style: { "--tree-depth": m },
|
|
2257
|
-
onClick: (
|
|
2258
|
-
if (this.focusedKey = f.id,
|
|
2337
|
+
onClick: (se) => {
|
|
2338
|
+
if (this.focusedKey = f.id, Lr(se.target) && k) {
|
|
2259
2339
|
this.toggleExpanded(f.id), this.focusRow(f.id);
|
|
2260
2340
|
return;
|
|
2261
2341
|
}
|
|
2262
|
-
this.selectNode(f,
|
|
2342
|
+
this.selectNode(f, se);
|
|
2263
2343
|
},
|
|
2264
2344
|
onFocus: () => this.focusedKey = f.id,
|
|
2265
|
-
onKeyDown: (
|
|
2345
|
+
onKeyDown: (se) => this.handleKeyDown(se, b, n),
|
|
2266
2346
|
children: [
|
|
2267
2347
|
w(
|
|
2268
2348
|
"fray-expander",
|
|
2269
2349
|
{ "aria-hidden": "true" },
|
|
2270
2350
|
k ? O ? "▾" : "▸" : "•"
|
|
2271
2351
|
),
|
|
2272
|
-
w("fray-label",
|
|
2352
|
+
w("fray-label", {
|
|
2353
|
+
...M == null ? {} : { className: M },
|
|
2354
|
+
...z == null ? {} : { style: z }
|
|
2355
|
+
}, K)
|
|
2273
2356
|
]
|
|
2274
2357
|
},
|
|
2275
2358
|
f.id
|
|
@@ -2282,11 +2365,11 @@ class de extends g {
|
|
|
2282
2365
|
this.typeaheadTimer != null && clearTimeout(this.typeaheadTimer), (e = this.ownedNodesEmitter) == null || e.dispose(), (i = this.ownedSelectedEmitter) == null || i.dispose(), (o = this.ownedExpandedEmitter) == null || o.dispose();
|
|
2283
2366
|
}
|
|
2284
2367
|
reconcile(e) {
|
|
2285
|
-
|
|
2286
|
-
const i = new Set(
|
|
2368
|
+
G(e);
|
|
2369
|
+
const i = new Set(jr(e).map(({ node: l }) => l.id)), o = this.selectedKeyEmitter.get();
|
|
2287
2370
|
this.ownedSelectedEmitter != null && o != null && !i.has(o) && this.selectedKeyEmitter.set(null, "selected tree item removed");
|
|
2288
2371
|
const s = this.expandedKeysEmitter.get(), n = s.filter((l) => i.has(l));
|
|
2289
|
-
this.ownedExpandedEmitter != null && !
|
|
2372
|
+
this.ownedExpandedEmitter != null && !Nr(s, n) && this.expandedKeysEmitter.set(n, "removed tree expansions reconciled"), this.focusedKey != null && !i.has(this.focusedKey) && (this.focusedKey = null);
|
|
2290
2373
|
}
|
|
2291
2374
|
selectNode(e, i) {
|
|
2292
2375
|
this.selectedKeyEmitter.set(e.id, "tree item selected"), $(this.props.onSelect, e, i), this.focusRow(e.id);
|
|
@@ -2332,7 +2415,7 @@ class de extends g {
|
|
|
2332
2415
|
this.focusedKey = e;
|
|
2333
2416
|
const i = this.dom instanceof Element ? [...this.dom.querySelectorAll('[role="treeitem"]')] : [];
|
|
2334
2417
|
for (const s of i) {
|
|
2335
|
-
const n = Number(s.dataset.index), l =
|
|
2418
|
+
const n = Number(s.dataset.index), l = xt(
|
|
2336
2419
|
this.nodesEmitter.get(),
|
|
2337
2420
|
new Set(this.expandedKeysEmitter.get())
|
|
2338
2421
|
), c = Object.is((o = l[n]) == null ? void 0 : o.node.id, e);
|
|
@@ -2343,11 +2426,11 @@ class de extends g {
|
|
|
2343
2426
|
e.preventDefault(), this.typeaheadTimer != null && clearTimeout(this.typeaheadTimer), this.typeahead += e.key.toLocaleLowerCase(), this.typeaheadTimer = setTimeout(() => {
|
|
2344
2427
|
this.typeahead = "", this.typeaheadTimer = null;
|
|
2345
2428
|
}, 650);
|
|
2346
|
-
const n = [...i.slice(o + 1), ...i.slice(0, o + 1)].find(({ node: l }) =>
|
|
2429
|
+
const n = [...i.slice(o + 1), ...i.slice(0, o + 1)].find(({ node: l }) => qr(l).toLocaleLowerCase().startsWith(this.typeahead));
|
|
2347
2430
|
n != null && this.focusRow(n.node.id);
|
|
2348
2431
|
}
|
|
2349
2432
|
}
|
|
2350
|
-
a(
|
|
2433
|
+
a(pe, "liveProps", []), a(pe, "dependencies", [it]), a(pe, "hostName", "tree-view"), a(pe, "css", E`
|
|
2351
2434
|
& {
|
|
2352
2435
|
display: flex;
|
|
2353
2436
|
flex-direction: column;
|
|
@@ -2400,6 +2483,8 @@ a(de, "liveProps", []), a(de, "dependencies", [et]), a(de, "hostName", "tree-vie
|
|
|
2400
2483
|
}
|
|
2401
2484
|
|
|
2402
2485
|
& fray-label {
|
|
2486
|
+
display: block;
|
|
2487
|
+
flex: 1 1 auto;
|
|
2403
2488
|
min-width: 0;
|
|
2404
2489
|
overflow-wrap: anywhere;
|
|
2405
2490
|
}
|
|
@@ -2417,23 +2502,23 @@ a(de, "liveProps", []), a(de, "dependencies", [et]), a(de, "hostName", "tree-vie
|
|
|
2417
2502
|
}
|
|
2418
2503
|
}
|
|
2419
2504
|
`);
|
|
2420
|
-
function
|
|
2505
|
+
function Ar(t, r) {
|
|
2421
2506
|
return t instanceof Error ? t.message : t == null ? r : String(t);
|
|
2422
2507
|
}
|
|
2423
|
-
function
|
|
2424
|
-
return (Array.isArray(t) ? t : t == null ? [] : [t]).filter((e) =>
|
|
2425
|
-
if (!
|
|
2508
|
+
function Be(t) {
|
|
2509
|
+
return (Array.isArray(t) ? t : t == null ? [] : [t]).filter((e) => we(e) && e.type === it).map((e) => {
|
|
2510
|
+
if (!we(e)) throw new TypeError("TreeView children must be TreeItem nodes");
|
|
2426
2511
|
const i = e.props;
|
|
2427
2512
|
return {
|
|
2428
2513
|
id: i.id,
|
|
2429
2514
|
label: i.label,
|
|
2430
2515
|
...i.textValue == null ? {} : { textValue: i.textValue },
|
|
2431
2516
|
...i.value === void 0 ? {} : { value: i.value },
|
|
2432
|
-
children:
|
|
2517
|
+
children: Be(i.children)
|
|
2433
2518
|
};
|
|
2434
2519
|
});
|
|
2435
2520
|
}
|
|
2436
|
-
function
|
|
2521
|
+
function xt(t, r) {
|
|
2437
2522
|
const e = [], i = (o, s, n) => {
|
|
2438
2523
|
o.forEach((l, c) => {
|
|
2439
2524
|
var u;
|
|
@@ -2442,7 +2527,7 @@ function bt(t, r) {
|
|
|
2442
2527
|
};
|
|
2443
2528
|
return i(t, 0, null), e;
|
|
2444
2529
|
}
|
|
2445
|
-
function
|
|
2530
|
+
function jr(t) {
|
|
2446
2531
|
const r = /* @__PURE__ */ new Set(), e = [], i = (o, s, n) => {
|
|
2447
2532
|
o.forEach((l, c) => {
|
|
2448
2533
|
if (r.has(l.id)) throw new Error(`Duplicate tree item id: ${String(l.id)}`);
|
|
@@ -2451,20 +2536,20 @@ function Rr(t) {
|
|
|
2451
2536
|
};
|
|
2452
2537
|
return i(t, 0, null), e;
|
|
2453
2538
|
}
|
|
2454
|
-
function
|
|
2539
|
+
function qr(t) {
|
|
2455
2540
|
return t.textValue != null ? t.textValue : typeof t.label == "string" || typeof t.label == "number" ? String(t.label) : String(t.id);
|
|
2456
2541
|
}
|
|
2457
|
-
function
|
|
2542
|
+
function Nr(t, r) {
|
|
2458
2543
|
return t.length === r.length && t.every((e, i) => Object.is(e, r[i]));
|
|
2459
2544
|
}
|
|
2460
|
-
function
|
|
2545
|
+
function kt(t) {
|
|
2461
2546
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
2462
2547
|
}
|
|
2463
|
-
function
|
|
2548
|
+
function Lr(t) {
|
|
2464
2549
|
return t instanceof Element && t.closest("fray-expander") != null;
|
|
2465
2550
|
}
|
|
2466
|
-
const
|
|
2467
|
-
class
|
|
2551
|
+
const Fr = ["disabled", "pressed", "busy"];
|
|
2552
|
+
class ie extends g {
|
|
2468
2553
|
constructor(r = {}) {
|
|
2469
2554
|
if (super(r), r.onClick != null && typeof r.onClick != "function")
|
|
2470
2555
|
throw new TypeError("Button onClick must be a function");
|
|
@@ -2484,8 +2569,8 @@ class re extends g {
|
|
|
2484
2569
|
title: b,
|
|
2485
2570
|
ariaLabel: f,
|
|
2486
2571
|
onClick: m
|
|
2487
|
-
} = this.props, T = (Array.isArray(r) ? r.length > 0 : r != null && typeof r != "boolean") ? r : e ?? "", k = n ? l ?? T : T, O = o || n,
|
|
2488
|
-
return /* @__PURE__ */ p(
|
|
2572
|
+
} = this.props, T = (Array.isArray(r) ? r.length > 0 : r != null && typeof r != "boolean") ? r : e ?? "", k = n ? l ?? T : T, O = o || n, P = this.Host;
|
|
2573
|
+
return /* @__PURE__ */ p(P, { className: x(this.props) || null, children: /* @__PURE__ */ p(
|
|
2489
2574
|
"button",
|
|
2490
2575
|
{
|
|
2491
2576
|
id: c,
|
|
@@ -2497,15 +2582,15 @@ class re extends g {
|
|
|
2497
2582
|
"aria-label": f,
|
|
2498
2583
|
"aria-pressed": s == null ? null : String(!!s),
|
|
2499
2584
|
"aria-busy": n ? "true" : null,
|
|
2500
|
-
onClick: (
|
|
2501
|
-
O || $(m,
|
|
2585
|
+
onClick: (K) => {
|
|
2586
|
+
O || $(m, K);
|
|
2502
2587
|
},
|
|
2503
2588
|
children: k
|
|
2504
2589
|
}
|
|
2505
2590
|
) });
|
|
2506
2591
|
}
|
|
2507
2592
|
}
|
|
2508
|
-
a(
|
|
2593
|
+
a(ie, "liveProps", Fr), a(ie, "hostName", "button"), a(ie, "css", E`
|
|
2509
2594
|
& > button {
|
|
2510
2595
|
min-height: var(--control-min-height, 2rem);
|
|
2511
2596
|
padding: var(--space-xs) var(--space-sm);
|
|
@@ -2548,8 +2633,8 @@ a(re, "liveProps", Or), a(re, "hostName", "button"), a(re, "css", E`
|
|
|
2548
2633
|
pointer-events: none;
|
|
2549
2634
|
}
|
|
2550
2635
|
`);
|
|
2551
|
-
const
|
|
2552
|
-
class
|
|
2636
|
+
const Dr = ["showCloseButton"];
|
|
2637
|
+
class fe extends g {
|
|
2553
2638
|
constructor(e) {
|
|
2554
2639
|
super(e);
|
|
2555
2640
|
a(this, "openEmitter");
|
|
@@ -2559,7 +2644,7 @@ class ue extends g {
|
|
|
2559
2644
|
a(this, "dialogElement", null);
|
|
2560
2645
|
a(this, "restoreFocusTo", null);
|
|
2561
2646
|
a(this, "synchronizedOpen", !1);
|
|
2562
|
-
this.openEmitter =
|
|
2647
|
+
this.openEmitter = F(this, e, !1, "dialog open state"), this.dialogId = R("dialog", e.id), this.titleId = `${this.dialogId}-title`, this.descriptionId = `${this.dialogId}-description`;
|
|
2563
2648
|
}
|
|
2564
2649
|
initialize() {
|
|
2565
2650
|
this.watch(this.openEmitter);
|
|
@@ -2588,7 +2673,7 @@ class ue extends g {
|
|
|
2588
2673
|
o == null && !n ? null : /* @__PURE__ */ v("footer", { children: [
|
|
2589
2674
|
o,
|
|
2590
2675
|
n ? /* @__PURE__ */ p(
|
|
2591
|
-
|
|
2676
|
+
ie,
|
|
2592
2677
|
{
|
|
2593
2678
|
label: s,
|
|
2594
2679
|
onClick: () => this.requestClose()
|
|
@@ -2626,7 +2711,7 @@ class ue extends g {
|
|
|
2626
2711
|
const i = this.openEmitter.get();
|
|
2627
2712
|
if (i && !e.open) {
|
|
2628
2713
|
const o = document.activeElement;
|
|
2629
|
-
this.restoreFocusTo = o instanceof HTMLElement ? o : null,
|
|
2714
|
+
this.restoreFocusTo = o instanceof HTMLElement ? o : null, Pr(e), this.synchronizedOpen = !0, Kr(e, this.props.initialFocusRef);
|
|
2630
2715
|
return;
|
|
2631
2716
|
}
|
|
2632
2717
|
if (!i && e.open) {
|
|
@@ -2642,7 +2727,7 @@ class ue extends g {
|
|
|
2642
2727
|
this.restoreFocusTo = null, (e == null ? void 0 : e.isConnected) === !0 && e.focus(), $(this.props.onClose);
|
|
2643
2728
|
}
|
|
2644
2729
|
}
|
|
2645
|
-
a(
|
|
2730
|
+
a(fe, "liveProps", Dr), a(fe, "hostName", "dialog"), a(fe, "dependencies", [ie]), a(fe, "css", E`
|
|
2646
2731
|
& > dialog {
|
|
2647
2732
|
z-index: 2;
|
|
2648
2733
|
width: min(38rem, calc(100vw - 2rem));
|
|
@@ -2716,7 +2801,7 @@ a(ue, "liveProps", Ar), a(ue, "hostName", "dialog"), a(ue, "dependencies", [re])
|
|
|
2716
2801
|
}
|
|
2717
2802
|
}
|
|
2718
2803
|
`);
|
|
2719
|
-
function
|
|
2804
|
+
function Pr(t) {
|
|
2720
2805
|
if (!t.open) {
|
|
2721
2806
|
if (typeof t.showModal == "function") {
|
|
2722
2807
|
t.showModal();
|
|
@@ -2725,38 +2810,38 @@ function jr(t) {
|
|
|
2725
2810
|
t.setAttribute("open", "");
|
|
2726
2811
|
}
|
|
2727
2812
|
}
|
|
2728
|
-
function
|
|
2813
|
+
function Kr(t, r) {
|
|
2729
2814
|
const i = (r == null || typeof r == "function" ? null : r.current) ?? t.querySelector(
|
|
2730
2815
|
'[autofocus], button, input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2731
2816
|
);
|
|
2732
2817
|
i == null || i.focus();
|
|
2733
2818
|
}
|
|
2734
|
-
const
|
|
2819
|
+
const _ = class _ extends j {
|
|
2735
2820
|
constructor(r = {}) {
|
|
2736
|
-
super({ ...r, symbols:
|
|
2821
|
+
super({ ...r, symbols: _.symbols });
|
|
2737
2822
|
}
|
|
2738
2823
|
};
|
|
2739
|
-
a(
|
|
2824
|
+
a(_, "hostName", "quadcheckbox"), a(_, "symbols", [
|
|
2740
2825
|
["×", y.Deny],
|
|
2741
2826
|
["☐", y.Neutral],
|
|
2742
2827
|
["✓", y.Prefer],
|
|
2743
2828
|
["+", y.Require]
|
|
2744
|
-
]), a(
|
|
2745
|
-
let
|
|
2746
|
-
const
|
|
2829
|
+
]), a(_, "defaultSemanticState", y.Neutral);
|
|
2830
|
+
let St = _;
|
|
2831
|
+
const Q = class Q extends j {
|
|
2747
2832
|
constructor(r = {}) {
|
|
2748
|
-
super({ ...r, symbols:
|
|
2833
|
+
super({ ...r, symbols: Q.symbols });
|
|
2749
2834
|
}
|
|
2750
2835
|
};
|
|
2751
|
-
a(
|
|
2836
|
+
a(Q, "hostName", "tricheckbox"), a(Q, "symbols", [
|
|
2752
2837
|
["×", y.Deny],
|
|
2753
2838
|
["☐", y.Neutral],
|
|
2754
2839
|
["✓", y.Prefer]
|
|
2755
|
-
]), a(
|
|
2756
|
-
let
|
|
2757
|
-
class
|
|
2840
|
+
]), a(Q, "defaultSemanticState", y.Neutral);
|
|
2841
|
+
let It = Q;
|
|
2842
|
+
class st extends g {
|
|
2758
2843
|
}
|
|
2759
|
-
a(
|
|
2844
|
+
a(st, "css", E`
|
|
2760
2845
|
& {
|
|
2761
2846
|
display: flex;
|
|
2762
2847
|
flex-flow: row nowrap;
|
|
@@ -2777,9 +2862,9 @@ a(rt, "css", E`
|
|
|
2777
2862
|
}
|
|
2778
2863
|
|
|
2779
2864
|
`);
|
|
2780
|
-
class
|
|
2865
|
+
class nt extends st {
|
|
2781
2866
|
}
|
|
2782
|
-
a(
|
|
2867
|
+
a(nt, "css", E`
|
|
2783
2868
|
& > fray-selectshell {
|
|
2784
2869
|
display: flex;
|
|
2785
2870
|
flex-flow: row nowrap;
|
|
@@ -2877,8 +2962,8 @@ a(it, "css", E`
|
|
|
2877
2962
|
}
|
|
2878
2963
|
}
|
|
2879
2964
|
`);
|
|
2880
|
-
const
|
|
2881
|
-
class
|
|
2965
|
+
const Mr = ["disabled", "required", "error"];
|
|
2966
|
+
class Oe extends nt {
|
|
2882
2967
|
constructor(e = {}) {
|
|
2883
2968
|
var s;
|
|
2884
2969
|
super(e);
|
|
@@ -2887,14 +2972,14 @@ class Ce extends it {
|
|
|
2887
2972
|
a(this, "optionsEmitter");
|
|
2888
2973
|
a(this, "valueEmitter");
|
|
2889
2974
|
a(this, "ownsOptionsEmitter");
|
|
2890
|
-
this.inputId =
|
|
2975
|
+
this.inputId = R("dropdown", e.id), this.errorId = `${this.inputId}-error`;
|
|
2891
2976
|
const i = e.options ?? [];
|
|
2892
|
-
|
|
2977
|
+
Hr(i) ? (this.optionsEmitter = i, this.ownsOptionsEmitter = !1) : (ve(i), this.optionsEmitter = new I(i, {
|
|
2893
2978
|
owner: this,
|
|
2894
2979
|
purpose: "dropdown options"
|
|
2895
2980
|
}), this.ownsOptionsEmitter = !0);
|
|
2896
2981
|
const o = ((s = this.optionsEmitter.get()[0]) == null ? void 0 : s.value) ?? "";
|
|
2897
|
-
this.valueEmitter =
|
|
2982
|
+
this.valueEmitter = F(this, e, o, "dropdown value");
|
|
2898
2983
|
}
|
|
2899
2984
|
initialize() {
|
|
2900
2985
|
this.watch(this.valueEmitter, this.optionsEmitter);
|
|
@@ -2910,7 +2995,7 @@ class Ce extends it {
|
|
|
2910
2995
|
ariaLabel: c,
|
|
2911
2996
|
onChange: u
|
|
2912
2997
|
} = this.props, h = this.optionsEmitter.get() ?? [];
|
|
2913
|
-
|
|
2998
|
+
ve(h);
|
|
2914
2999
|
const b = this.valueEmitter.get(), f = this.Host;
|
|
2915
3000
|
return /* @__PURE__ */ v(
|
|
2916
3001
|
f,
|
|
@@ -2933,7 +3018,7 @@ class Ce extends it {
|
|
|
2933
3018
|
"aria-invalid": n == null ? null : "true",
|
|
2934
3019
|
"aria-describedby": n == null ? null : this.errorId,
|
|
2935
3020
|
onChange: (m) => {
|
|
2936
|
-
const
|
|
3021
|
+
const C = Vr(m, "dropdown change"), T = h.find(({ value: O }) => String(O) === C), k = (T == null ? void 0 : T.value) ?? C;
|
|
2937
3022
|
this.valueEmitter.set(k, "dropdown selection"), $(u, k, m);
|
|
2938
3023
|
},
|
|
2939
3024
|
children: [
|
|
@@ -2969,18 +3054,18 @@ class Ce extends it {
|
|
|
2969
3054
|
);
|
|
2970
3055
|
}
|
|
2971
3056
|
}
|
|
2972
|
-
a(
|
|
2973
|
-
function
|
|
3057
|
+
a(Oe, "liveProps", Mr), a(Oe, "hostName", "dropdown"), a(Oe, "css", "");
|
|
3058
|
+
function Hr(t) {
|
|
2974
3059
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
2975
3060
|
}
|
|
2976
|
-
function
|
|
3061
|
+
function Vr(t, r) {
|
|
2977
3062
|
const e = t.currentTarget;
|
|
2978
3063
|
if (e == null || typeof Reflect.get(e, "value") != "string")
|
|
2979
3064
|
throw new TypeError(`${r} requires a value-bearing event target`);
|
|
2980
3065
|
return Reflect.get(e, "value");
|
|
2981
3066
|
}
|
|
2982
|
-
const
|
|
2983
|
-
class
|
|
3067
|
+
const Ur = ["text"];
|
|
3068
|
+
class _r extends g {
|
|
2984
3069
|
render() {
|
|
2985
3070
|
const { text: r, htmlFor: e, children: i } = this.props;
|
|
2986
3071
|
return /* @__PURE__ */ p(
|
|
@@ -2994,14 +3079,14 @@ class Pr extends g {
|
|
|
2994
3079
|
);
|
|
2995
3080
|
}
|
|
2996
3081
|
}
|
|
2997
|
-
a(
|
|
2998
|
-
const
|
|
2999
|
-
class
|
|
3082
|
+
a(_r, "liveProps", Ur);
|
|
3083
|
+
const Qr = ["checked", "disabled", "required", "error"], Br = ["disabled", "required", "error"];
|
|
3084
|
+
class oe extends et {
|
|
3000
3085
|
constructor(e = {}) {
|
|
3001
3086
|
super(e);
|
|
3002
3087
|
a(this, "inputId");
|
|
3003
3088
|
a(this, "errorId");
|
|
3004
|
-
this.inputId =
|
|
3089
|
+
this.inputId = R("radio", e.id), this.errorId = `${this.inputId}-error`;
|
|
3005
3090
|
}
|
|
3006
3091
|
render() {
|
|
3007
3092
|
const {
|
|
@@ -3039,7 +3124,7 @@ class ie extends Je {
|
|
|
3039
3124
|
] });
|
|
3040
3125
|
}
|
|
3041
3126
|
}
|
|
3042
|
-
a(
|
|
3127
|
+
a(oe, "liveProps", Qr), a(oe, "hostName", "radio-button"), a(oe, "css", E`
|
|
3043
3128
|
& > label > input[type="radio"] + fray-checkshell {
|
|
3044
3129
|
border-radius: 50%;
|
|
3045
3130
|
}
|
|
@@ -3052,7 +3137,7 @@ a(ie, "liveProps", Kr), a(ie, "hostName", "radio-button"), a(ie, "css", E`
|
|
|
3052
3137
|
background: var(--checkbox-symbol-color);
|
|
3053
3138
|
}
|
|
3054
3139
|
`);
|
|
3055
|
-
class
|
|
3140
|
+
class me extends g {
|
|
3056
3141
|
constructor(e = {}) {
|
|
3057
3142
|
var s;
|
|
3058
3143
|
super(e);
|
|
@@ -3060,23 +3145,23 @@ class he extends g {
|
|
|
3060
3145
|
a(this, "groupId");
|
|
3061
3146
|
a(this, "errorId");
|
|
3062
3147
|
const i = e.options ?? [];
|
|
3063
|
-
|
|
3148
|
+
Ae(i);
|
|
3064
3149
|
const o = ((s = i[0]) == null ? void 0 : s[0]) ?? null;
|
|
3065
|
-
this.valueEmitter =
|
|
3150
|
+
this.valueEmitter = F(this, e, o, "radio group value"), this.groupId = R("radio-group", e.id), this.errorId = `${this.groupId}-error`;
|
|
3066
3151
|
}
|
|
3067
3152
|
initialize() {
|
|
3068
3153
|
this.watch(this.valueEmitter);
|
|
3069
3154
|
}
|
|
3070
3155
|
setProps(e) {
|
|
3071
3156
|
const i = e.options ?? [];
|
|
3072
|
-
return
|
|
3157
|
+
return Ae(i), super.setProps(e), this.selectFirstAvailableOption(i), this;
|
|
3073
3158
|
}
|
|
3074
3159
|
selectOption(e, i = null) {
|
|
3075
3160
|
this.props.disabled || (this.valueEmitter.set(e, "radio option selected"), $(this.props.onChange, e, i));
|
|
3076
3161
|
}
|
|
3077
3162
|
render() {
|
|
3078
3163
|
const { options: e = [], label: i, disabled: o = !1, required: s = !1, error: n = null } = this.props;
|
|
3079
|
-
|
|
3164
|
+
Ae(e);
|
|
3080
3165
|
const l = this.valueEmitter.get(), c = this.Host;
|
|
3081
3166
|
return /* @__PURE__ */ v(
|
|
3082
3167
|
c,
|
|
@@ -3095,7 +3180,7 @@ class he extends g {
|
|
|
3095
3180
|
children: [
|
|
3096
3181
|
i == null ? null : /* @__PURE__ */ p("legend", { children: i }),
|
|
3097
3182
|
e.map(([u, h], b) => /* @__PURE__ */ p(
|
|
3098
|
-
|
|
3183
|
+
oe,
|
|
3099
3184
|
{
|
|
3100
3185
|
id: `${this.groupId}-${b}`,
|
|
3101
3186
|
name: this.props.name ?? this.groupId,
|
|
@@ -3126,7 +3211,7 @@ class he extends g {
|
|
|
3126
3211
|
);
|
|
3127
3212
|
}
|
|
3128
3213
|
}
|
|
3129
|
-
a(
|
|
3214
|
+
a(me, "dependencies", [oe]), a(me, "liveProps", Br), a(me, "hostName", "radio-group"), a(me, "css", E`
|
|
3130
3215
|
& > fieldset {
|
|
3131
3216
|
display: flex;
|
|
3132
3217
|
flex-flow: row wrap;
|
|
@@ -3143,20 +3228,20 @@ a(he, "dependencies", [ie]), a(he, "liveProps", Mr), a(he, "hostName", "radio-gr
|
|
|
3143
3228
|
padding: 0;
|
|
3144
3229
|
}
|
|
3145
3230
|
`);
|
|
3146
|
-
function
|
|
3147
|
-
|
|
3231
|
+
function Ae(t) {
|
|
3232
|
+
ve(t, "Radio group options");
|
|
3148
3233
|
for (const r of t)
|
|
3149
3234
|
if (!Array.isArray(r) || r.length < 2)
|
|
3150
3235
|
throw new TypeError("Radio group options must be [value, label] tuples");
|
|
3151
3236
|
}
|
|
3152
|
-
const
|
|
3153
|
-
class
|
|
3237
|
+
const Wr = ["disabled", "required", "readOnly", "error"];
|
|
3238
|
+
class je extends st {
|
|
3154
3239
|
constructor(e = {}) {
|
|
3155
3240
|
super(e);
|
|
3156
3241
|
a(this, "inputId");
|
|
3157
3242
|
a(this, "errorId");
|
|
3158
3243
|
a(this, "valueEmitter");
|
|
3159
|
-
this.inputId =
|
|
3244
|
+
this.inputId = R("textbox", e.id), this.errorId = `${this.inputId}-error`, this.valueEmitter = F(this, e, "", "textbox value");
|
|
3160
3245
|
}
|
|
3161
3246
|
initialize() {
|
|
3162
3247
|
this.watch(this.valueEmitter);
|
|
@@ -3175,13 +3260,13 @@ class $e extends rt {
|
|
|
3175
3260
|
inputMode: b,
|
|
3176
3261
|
minLength: f,
|
|
3177
3262
|
maxLength: m,
|
|
3178
|
-
pattern:
|
|
3263
|
+
pattern: C,
|
|
3179
3264
|
ariaLabel: T,
|
|
3180
3265
|
inputRef: k,
|
|
3181
3266
|
onInput: O,
|
|
3182
|
-
onChange:
|
|
3183
|
-
} = this.props,
|
|
3184
|
-
return /* @__PURE__ */ v(
|
|
3267
|
+
onChange: P
|
|
3268
|
+
} = this.props, K = this.valueEmitter.get() ?? "", M = this.Host;
|
|
3269
|
+
return /* @__PURE__ */ v(M, { className: x(this.props) || null, children: [
|
|
3185
3270
|
e == null ? null : /* @__PURE__ */ p("label", { htmlFor: this.inputId, children: e }),
|
|
3186
3271
|
/* @__PURE__ */ p(
|
|
3187
3272
|
"input",
|
|
@@ -3189,7 +3274,7 @@ class $e extends rt {
|
|
|
3189
3274
|
id: this.inputId,
|
|
3190
3275
|
name: s,
|
|
3191
3276
|
type: o,
|
|
3192
|
-
value:
|
|
3277
|
+
value: K,
|
|
3193
3278
|
placeholder: i,
|
|
3194
3279
|
disabled: n,
|
|
3195
3280
|
required: l,
|
|
@@ -3198,18 +3283,18 @@ class $e extends rt {
|
|
|
3198
3283
|
inputMode: b,
|
|
3199
3284
|
minLength: f,
|
|
3200
3285
|
maxLength: m,
|
|
3201
|
-
pattern:
|
|
3286
|
+
pattern: C,
|
|
3202
3287
|
ref: k,
|
|
3203
3288
|
"aria-label": e == null ? T : null,
|
|
3204
3289
|
"aria-invalid": u == null ? null : "true",
|
|
3205
3290
|
"aria-describedby": u == null ? null : this.errorId,
|
|
3206
3291
|
onInput: (z) => {
|
|
3207
|
-
const N =
|
|
3292
|
+
const N = Tt(z, "textbox input");
|
|
3208
3293
|
this.valueEmitter.set(N, "textbox input"), $(O, N, z);
|
|
3209
3294
|
},
|
|
3210
3295
|
onChange: (z) => $(
|
|
3211
|
-
|
|
3212
|
-
|
|
3296
|
+
P,
|
|
3297
|
+
Tt(z, "textbox change"),
|
|
3213
3298
|
z
|
|
3214
3299
|
)
|
|
3215
3300
|
}
|
|
@@ -3225,7 +3310,7 @@ class $e extends rt {
|
|
|
3225
3310
|
] });
|
|
3226
3311
|
}
|
|
3227
3312
|
}
|
|
3228
|
-
a(
|
|
3313
|
+
a(je, "liveProps", Wr), a(je, "hostName", "textbox"), a(je, "css", E`
|
|
3229
3314
|
& > input {
|
|
3230
3315
|
min-height: var(--control-min-height, 2rem);
|
|
3231
3316
|
width: var(--input-width, 15rem);
|
|
@@ -3260,14 +3345,14 @@ a($e, "liveProps", Hr), a($e, "hostName", "textbox"), a($e, "css", E`
|
|
|
3260
3345
|
margin: 0;
|
|
3261
3346
|
}
|
|
3262
3347
|
`);
|
|
3263
|
-
function
|
|
3348
|
+
function Tt(t, r) {
|
|
3264
3349
|
const e = t.currentTarget;
|
|
3265
3350
|
if (e == null || typeof Reflect.get(e, "value") != "string")
|
|
3266
3351
|
throw new TypeError(`${r} requires a value-bearing event target`);
|
|
3267
3352
|
return Reflect.get(e, "value");
|
|
3268
3353
|
}
|
|
3269
|
-
const
|
|
3270
|
-
class
|
|
3354
|
+
const Gr = ["disabled", "required", "error"];
|
|
3355
|
+
class qe extends g {
|
|
3271
3356
|
constructor(e = {}) {
|
|
3272
3357
|
var s;
|
|
3273
3358
|
super(e);
|
|
@@ -3276,21 +3361,21 @@ class Oe extends g {
|
|
|
3276
3361
|
a(this, "legendId");
|
|
3277
3362
|
a(this, "errorId");
|
|
3278
3363
|
const i = e.options ?? [];
|
|
3279
|
-
|
|
3364
|
+
Ne(i);
|
|
3280
3365
|
const o = ((s = i[0]) == null ? void 0 : s[0]) ?? null;
|
|
3281
|
-
this.valueEmitter =
|
|
3366
|
+
this.valueEmitter = F(
|
|
3282
3367
|
this,
|
|
3283
3368
|
e,
|
|
3284
3369
|
o ?? null,
|
|
3285
3370
|
"toggle value"
|
|
3286
|
-
), this.groupId =
|
|
3371
|
+
), this.groupId = R("toggle", e.id), this.legendId = `${this.groupId}-label`, this.errorId = `${this.groupId}-error`;
|
|
3287
3372
|
}
|
|
3288
3373
|
initialize() {
|
|
3289
3374
|
this.selectFirstAvailableOption(this.props.options ?? []), this.watch(this.valueEmitter);
|
|
3290
3375
|
}
|
|
3291
3376
|
setProps(e) {
|
|
3292
3377
|
const i = e.options ?? [];
|
|
3293
|
-
return
|
|
3378
|
+
return Ne(i), super.setProps(e), this.selectFirstAvailableOption(i), this;
|
|
3294
3379
|
}
|
|
3295
3380
|
selectOption(e, i = null) {
|
|
3296
3381
|
this.props.disabled || (this.valueEmitter.set(e, "toggle option selected"), $(this.props.onChange, e, i));
|
|
@@ -3303,7 +3388,7 @@ class Oe extends g {
|
|
|
3303
3388
|
required: s = !1,
|
|
3304
3389
|
error: n = null
|
|
3305
3390
|
} = this.props;
|
|
3306
|
-
|
|
3391
|
+
Ne(e);
|
|
3307
3392
|
const l = this.valueEmitter.get(), c = Math.max(
|
|
3308
3393
|
0,
|
|
3309
3394
|
e.findIndex(([h]) => Object.is(h, l))
|
|
@@ -3361,7 +3446,7 @@ class Oe extends g {
|
|
|
3361
3446
|
);
|
|
3362
3447
|
}
|
|
3363
3448
|
}
|
|
3364
|
-
a(
|
|
3449
|
+
a(qe, "liveProps", Gr), a(qe, "hostName", "toggle"), a(qe, "css", E`
|
|
3365
3450
|
& {
|
|
3366
3451
|
display: inline-block;
|
|
3367
3452
|
inline-size: fit-content;
|
|
@@ -3455,13 +3540,13 @@ a(Oe, "liveProps", Vr), a(Oe, "hostName", "toggle"), a(Oe, "css", E`
|
|
|
3455
3540
|
background: var(--toggle-inactive-separator-background);
|
|
3456
3541
|
}
|
|
3457
3542
|
`);
|
|
3458
|
-
function
|
|
3459
|
-
|
|
3543
|
+
function Ne(t) {
|
|
3544
|
+
ve(t);
|
|
3460
3545
|
for (const r of t)
|
|
3461
3546
|
if (!Array.isArray(r) || r.length < 2)
|
|
3462
3547
|
throw new TypeError("Toggle options must be [value, label] tuples");
|
|
3463
3548
|
}
|
|
3464
|
-
class
|
|
3549
|
+
class Le extends g {
|
|
3465
3550
|
render() {
|
|
3466
3551
|
const {
|
|
3467
3552
|
children: r = [],
|
|
@@ -3485,7 +3570,7 @@ class je extends g {
|
|
|
3485
3570
|
);
|
|
3486
3571
|
}
|
|
3487
3572
|
}
|
|
3488
|
-
a(
|
|
3573
|
+
a(Le, "liveProps", []), a(Le, "hostName", "toolbar"), a(Le, "css", E`
|
|
3489
3574
|
& {
|
|
3490
3575
|
display: flex;
|
|
3491
3576
|
flex-wrap: wrap;
|
|
@@ -3507,11 +3592,11 @@ a(je, "liveProps", []), a(je, "hostName", "toolbar"), a(je, "css", E`
|
|
|
3507
3592
|
align-items: stretch;
|
|
3508
3593
|
}
|
|
3509
3594
|
`);
|
|
3510
|
-
class
|
|
3595
|
+
class Fe extends g {
|
|
3511
3596
|
constructor(e) {
|
|
3512
3597
|
super(e);
|
|
3513
3598
|
a(this, "progressId");
|
|
3514
|
-
if (this.progressId =
|
|
3599
|
+
if (this.progressId = R("progress", e.id), e.valueEmitter != null && !Yr(e.valueEmitter))
|
|
3515
3600
|
throw new TypeError("ProgressBar valueEmitter must be a readable emitter");
|
|
3516
3601
|
}
|
|
3517
3602
|
render() {
|
|
@@ -3548,7 +3633,7 @@ class qe extends g {
|
|
|
3548
3633
|
] });
|
|
3549
3634
|
}
|
|
3550
3635
|
}
|
|
3551
|
-
a(
|
|
3636
|
+
a(Fe, "liveProps", []), a(Fe, "hostName", "progress-bar"), a(Fe, "css", E`
|
|
3552
3637
|
& {
|
|
3553
3638
|
display: block;
|
|
3554
3639
|
}
|
|
@@ -3659,13 +3744,13 @@ a(qe, "liveProps", []), a(qe, "hostName", "progress-bar"), a(qe, "css", E`
|
|
|
3659
3744
|
}
|
|
3660
3745
|
}
|
|
3661
3746
|
`);
|
|
3662
|
-
function
|
|
3747
|
+
function Yr(t) {
|
|
3663
3748
|
return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
|
|
3664
3749
|
}
|
|
3665
|
-
const
|
|
3666
|
-
...
|
|
3667
|
-
...
|
|
3668
|
-
...
|
|
3750
|
+
const Li = Object.freeze([
|
|
3751
|
+
...De("primary"),
|
|
3752
|
+
...De("secondary"),
|
|
3753
|
+
...De("neutral"),
|
|
3669
3754
|
d("--palette-primary", "palette", "primary", "color", "Primary anchor color", "--palette-primary-500"),
|
|
3670
3755
|
d("--palette-primary-light", "palette", "primary", "color", "Light primary color", "--palette-primary-200"),
|
|
3671
3756
|
d("--palette-primary-dark", "palette", "primary", "color", "Dark primary color", "--palette-primary-800"),
|
|
@@ -3677,6 +3762,8 @@ const $i = Object.freeze([
|
|
|
3677
3762
|
d("--palette-neutral-dark", "palette", "neutral", "color", "Dark neutral color", "--palette-neutral-800"),
|
|
3678
3763
|
d("--palette-light", "palette", "contrast", "color", "Light endpoint"),
|
|
3679
3764
|
d("--palette-dark", "palette", "contrast", "color", "Dark endpoint"),
|
|
3765
|
+
d("--palette-light-clear", "palette", "contrast", "color", "Transparent light endpoint"),
|
|
3766
|
+
d("--palette-light-faint", "palette", "contrast", "color", "Faint translucent light endpoint"),
|
|
3680
3767
|
d("--palette-primary-light-mix", "palette", "primary", "color", "Light-side primary ramp mix endpoint", "--palette-light"),
|
|
3681
3768
|
d("--palette-primary-dark-mix", "palette", "primary", "color", "Dark-side primary ramp mix endpoint", "--palette-dark"),
|
|
3682
3769
|
d("--palette-secondary-light-mix", "palette", "secondary", "color", "Light-side secondary ramp mix endpoint", "--palette-light"),
|
|
@@ -3782,45 +3869,45 @@ const $i = Object.freeze([
|
|
|
3782
3869
|
d("--colored-light", "theme", "colored", "color", "Colored-trait light color", "--palette-primary-light"),
|
|
3783
3870
|
d("--colored-dark", "theme", "colored", "color", "Colored-trait dark color", "--palette-primary-dark"),
|
|
3784
3871
|
d("--colored-contrast", "theme", "colored", "color", "Colored-trait foreground", "--palette-contrast-light"),
|
|
3872
|
+
d("--colored-shadow", "theme", "colored", "shadow", "Colored-trait depth"),
|
|
3785
3873
|
d("--block-graph-block-border", "theme", "block graph", "border", "Block graph category border", "--ui-border"),
|
|
3786
3874
|
d("--block-graph-block-radius", "theme", "block graph", "radius", "Block graph category radius", "--radius-sm"),
|
|
3787
|
-
d("--block-graph-block-shadow", "theme", "block graph", "shadow", "Block graph category depth")
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
F("yellow", "Yellow", A("colors/yellow/colors.css"))
|
|
3875
|
+
d("--block-graph-block-shadow", "theme", "block graph", "shadow", "Block graph category depth")
|
|
3876
|
+
]), Jr = Object.freeze([
|
|
3877
|
+
Pe("shiny", "Shiny", A("themes/shiny/theme.css"), "light"),
|
|
3878
|
+
Pe("java", "Java", A("themes/java/theme.css"), "light"),
|
|
3879
|
+
Pe("minimal", "Minimal", A("themes/minimal/theme.css"), "adaptive")
|
|
3880
|
+
]), Zr = Object.freeze([
|
|
3881
|
+
D("iceblue", "Ice blue", A("colors/iceblue/colors.css")),
|
|
3882
|
+
D("ocean", "Ocean", A("colors/ocean/colors.css")),
|
|
3883
|
+
D("green", "Green", A("colors/green/colors.css")),
|
|
3884
|
+
D("gray", "Gray", A("colors/gray/colors.css")),
|
|
3885
|
+
D("orange", "Orange", A("colors/orange/colors.css")),
|
|
3886
|
+
D("purple", "Purple", A("colors/purple/colors.css")),
|
|
3887
|
+
D("red", "Red", A("colors/red/colors.css")),
|
|
3888
|
+
D("yellow", "Yellow", A("colors/yellow/colors.css"))
|
|
3802
3889
|
]);
|
|
3803
|
-
function
|
|
3804
|
-
if (
|
|
3890
|
+
function Xr(t, r, e = globalThis.document) {
|
|
3891
|
+
if (ei(r), (e == null ? void 0 : e.head) == null || e.documentElement == null)
|
|
3805
3892
|
throw new TypeError("replaceFrayStylesheet requires a document with a head and root");
|
|
3806
3893
|
const i = `link[data-fray-stylesheet="${t}"]`;
|
|
3807
3894
|
let o = e.head.querySelector(i);
|
|
3808
3895
|
return o == null && (o = e.createElement("link"), o.rel = "stylesheet", o.dataset.frayStylesheet = t, e.head.append(o)), o.dataset.fraySelection = 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;
|
|
3809
3896
|
}
|
|
3810
|
-
function
|
|
3897
|
+
function Fi(t, r = globalThis.document) {
|
|
3811
3898
|
if ((r == null ? void 0 : r.documentElement) == null)
|
|
3812
3899
|
throw new TypeError("setFrayAppearance requires a document with a root");
|
|
3813
3900
|
if (t !== "light" && t !== "dark" && t !== "system")
|
|
3814
3901
|
throw new TypeError("Fray appearance must be light, dark, or system");
|
|
3815
3902
|
t === "system" ? r.documentElement.removeAttribute("data-appearance") : r.documentElement.dataset.appearance = t;
|
|
3816
3903
|
}
|
|
3817
|
-
function
|
|
3904
|
+
function Di(t = globalThis.document) {
|
|
3818
3905
|
if ((t == null ? void 0 : t.documentElement) == null)
|
|
3819
3906
|
throw new TypeError("getFrayAppearance requires a document with a root");
|
|
3820
3907
|
const r = t.documentElement.dataset.appearance;
|
|
3821
3908
|
return r === "light" || r === "dark" ? r : "system";
|
|
3822
3909
|
}
|
|
3823
|
-
function
|
|
3910
|
+
function be(t, r) {
|
|
3824
3911
|
const e = t.find((i) => i.value === r);
|
|
3825
3912
|
if (e == null) throw new RangeError(`Unknown Fray stylesheet selection: ${r}`);
|
|
3826
3913
|
return e;
|
|
@@ -3828,7 +3915,7 @@ function pe(t, r) {
|
|
|
3828
3915
|
function d(t, r, e, i, o, s) {
|
|
3829
3916
|
return s == null ? Object.freeze({ name: t, layer: r, family: e, value: i, description: o }) : Object.freeze({ name: t, layer: r, family: e, value: i, description: o, fallback: s });
|
|
3830
3917
|
}
|
|
3831
|
-
function
|
|
3918
|
+
function De(t) {
|
|
3832
3919
|
return [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((r) => {
|
|
3833
3920
|
var e;
|
|
3834
3921
|
return d(
|
|
@@ -3840,25 +3927,25 @@ function Ne(t) {
|
|
|
3840
3927
|
);
|
|
3841
3928
|
});
|
|
3842
3929
|
}
|
|
3843
|
-
function
|
|
3930
|
+
function D(t, r, e) {
|
|
3844
3931
|
return Object.freeze({ value: t, label: r, href: e });
|
|
3845
3932
|
}
|
|
3846
|
-
function
|
|
3933
|
+
function Pe(t, r, e, i) {
|
|
3847
3934
|
return Object.freeze({ value: t, label: r, href: e, appearance: i });
|
|
3848
3935
|
}
|
|
3849
3936
|
function A(t) {
|
|
3850
3937
|
const r = import.meta.url.includes("/src/styling/") ? `../../${t}` : `../${t}`;
|
|
3851
3938
|
return new URL(r, import.meta.url).href;
|
|
3852
3939
|
}
|
|
3853
|
-
function
|
|
3940
|
+
function ei(t) {
|
|
3854
3941
|
if (t == null || typeof t != "object")
|
|
3855
3942
|
throw new TypeError("Fray stylesheet selection must be an option");
|
|
3856
3943
|
for (const r of ["value", "label", "href"])
|
|
3857
3944
|
if (typeof Reflect.get(t, r) != "string" || String(Reflect.get(t, r)).length === 0)
|
|
3858
3945
|
throw new TypeError(`Fray stylesheet option ${r} must be a non-empty string`);
|
|
3859
3946
|
}
|
|
3860
|
-
const
|
|
3861
|
-
class
|
|
3947
|
+
const ti = ["disabled"];
|
|
3948
|
+
class ke extends nt {
|
|
3862
3949
|
constructor(e, i, o) {
|
|
3863
3950
|
var l;
|
|
3864
3951
|
super(e);
|
|
@@ -3867,16 +3954,16 @@ class ve extends it {
|
|
|
3867
3954
|
a(this, "kind");
|
|
3868
3955
|
a(this, "defaults");
|
|
3869
3956
|
const s = e.options ?? o;
|
|
3870
|
-
|
|
3957
|
+
Rt(s);
|
|
3871
3958
|
const n = (l = s[0]) == null ? void 0 : l.value;
|
|
3872
3959
|
if (n == null) throw new TypeError(`${i} picker requires at least one option`);
|
|
3873
|
-
this.kind = i, this.defaults = o, this.inputId =
|
|
3960
|
+
this.kind = i, this.defaults = o, this.inputId = R(`${i}-picker`, e.id), this.valueEmitter = F(this, e, n, `${i} selection`), be(s, this.valueEmitter.get());
|
|
3874
3961
|
}
|
|
3875
3962
|
initialize() {
|
|
3876
3963
|
this.watch(this.valueEmitter);
|
|
3877
3964
|
}
|
|
3878
3965
|
render() {
|
|
3879
|
-
const e = this.options, i =
|
|
3966
|
+
const e = this.options, i = be(e, this.valueEmitter.get()), { label: o, ariaLabel: s, disabled: n = !1, onChange: l } = this.props, c = this.Host;
|
|
3880
3967
|
return /* @__PURE__ */ v(
|
|
3881
3968
|
c,
|
|
3882
3969
|
{
|
|
@@ -3894,7 +3981,7 @@ class ve extends it {
|
|
|
3894
3981
|
disabled: n,
|
|
3895
3982
|
"aria-label": o == null ? s : null,
|
|
3896
3983
|
onChange: (u) => {
|
|
3897
|
-
const h =
|
|
3984
|
+
const h = oi(u), b = be(e, h);
|
|
3898
3985
|
this.valueEmitter.set(h, `${this.kind} selected`), $(l, h, b, u);
|
|
3899
3986
|
},
|
|
3900
3987
|
children: e.map((u) => /* @__PURE__ */ p(
|
|
@@ -3921,35 +4008,35 @@ class ve extends it {
|
|
|
3921
4008
|
}
|
|
3922
4009
|
get options() {
|
|
3923
4010
|
const e = this.props.options ?? this.defaults;
|
|
3924
|
-
return
|
|
4011
|
+
return Rt(e), e;
|
|
3925
4012
|
}
|
|
3926
4013
|
applySelection() {
|
|
3927
4014
|
const e = this.props.targetDocument ?? (typeof document > "u" ? null : document);
|
|
3928
|
-
e != null &&
|
|
4015
|
+
e != null && Xr(
|
|
3929
4016
|
this.kind,
|
|
3930
|
-
|
|
4017
|
+
be(this.options, this.valueEmitter.get()),
|
|
3931
4018
|
e
|
|
3932
4019
|
);
|
|
3933
4020
|
}
|
|
3934
4021
|
}
|
|
3935
|
-
a(
|
|
4022
|
+
a(ke, "liveProps", ti), a(ke, "css", E`
|
|
3936
4023
|
& > fray-selectshell > select {
|
|
3937
4024
|
min-width: 8rem;
|
|
3938
4025
|
}
|
|
3939
4026
|
`);
|
|
3940
|
-
class
|
|
4027
|
+
class ri extends ke {
|
|
3941
4028
|
constructor(r = {}) {
|
|
3942
|
-
super(r, "theme",
|
|
4029
|
+
super(r, "theme", Jr);
|
|
3943
4030
|
}
|
|
3944
4031
|
}
|
|
3945
|
-
a(
|
|
3946
|
-
class
|
|
4032
|
+
a(ri, "hostName", "theme-picker");
|
|
4033
|
+
class ii extends ke {
|
|
3947
4034
|
constructor(r = {}) {
|
|
3948
|
-
super(r, "colors",
|
|
4035
|
+
super(r, "colors", Zr);
|
|
3949
4036
|
}
|
|
3950
4037
|
}
|
|
3951
|
-
a(
|
|
3952
|
-
function
|
|
4038
|
+
a(ii, "hostName", "color-picker");
|
|
4039
|
+
function Rt(t) {
|
|
3953
4040
|
if (!Array.isArray(t) || t.length === 0)
|
|
3954
4041
|
throw new TypeError("Stylesheet picker options must be a non-empty array");
|
|
3955
4042
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -3964,13 +4051,13 @@ function Et(t) {
|
|
|
3964
4051
|
r.add(e.value);
|
|
3965
4052
|
}
|
|
3966
4053
|
}
|
|
3967
|
-
function
|
|
4054
|
+
function oi(t) {
|
|
3968
4055
|
const r = t.currentTarget == null ? null : Reflect.get(t.currentTarget, "value");
|
|
3969
4056
|
if (typeof r != "string")
|
|
3970
4057
|
throw new TypeError("Stylesheet picker change requires a select element");
|
|
3971
4058
|
return r;
|
|
3972
4059
|
}
|
|
3973
|
-
class
|
|
4060
|
+
class Pi {
|
|
3974
4061
|
constructor(r = "/") {
|
|
3975
4062
|
a(this, "listeners", /* @__PURE__ */ new Set());
|
|
3976
4063
|
a(this, "entries");
|
|
@@ -4011,9 +4098,9 @@ class ji {
|
|
|
4011
4098
|
for (const r of [...this.listeners]) r();
|
|
4012
4099
|
}
|
|
4013
4100
|
}
|
|
4014
|
-
function
|
|
4015
|
-
|
|
4016
|
-
const e =
|
|
4101
|
+
function Ki(t = globalThis.window, r = {}) {
|
|
4102
|
+
Pt(t);
|
|
4103
|
+
const e = si(r.basePath ?? "/");
|
|
4017
4104
|
return {
|
|
4018
4105
|
read() {
|
|
4019
4106
|
const i = t.location.pathname, o = i === e.slice(0, -1) ? "/" : i.startsWith(e) ? `/${i.slice(e.length)}` : i;
|
|
@@ -4034,8 +4121,8 @@ function qi(t = globalThis.window, r = {}) {
|
|
|
4034
4121
|
}
|
|
4035
4122
|
};
|
|
4036
4123
|
}
|
|
4037
|
-
function
|
|
4038
|
-
return
|
|
4124
|
+
function Mi(t = globalThis.window) {
|
|
4125
|
+
return Pt(t), {
|
|
4039
4126
|
read() {
|
|
4040
4127
|
return q(t.location.hash.slice(1) || "/");
|
|
4041
4128
|
},
|
|
@@ -4065,36 +4152,36 @@ function q(t) {
|
|
|
4065
4152
|
const r = t.indexOf("#"), e = r < 0 ? t : t.slice(0, r), i = e.indexOf("?"), o = i < 0 ? e : e.slice(0, i), s = i < 0 ? "" : e.slice(i);
|
|
4066
4153
|
return `${(o.startsWith("/") ? o : `/${o}`).replace(/\/{2,}/g, "/").replace(/\/$/, "") || "/"}${s}`;
|
|
4067
4154
|
}
|
|
4068
|
-
function
|
|
4155
|
+
function si(t) {
|
|
4069
4156
|
const r = q(t).split("?")[0] ?? "/";
|
|
4070
4157
|
return r === "/" ? "/" : `${r}/`;
|
|
4071
4158
|
}
|
|
4072
|
-
function
|
|
4159
|
+
function Pt(t) {
|
|
4073
4160
|
if (t == null || typeof t != "object" || !("location" in t) || !("history" in t) || !("addEventListener" in t))
|
|
4074
4161
|
throw new TypeError("Browser navigation requires a window-like target");
|
|
4075
4162
|
}
|
|
4076
|
-
const
|
|
4077
|
-
class
|
|
4163
|
+
const at = /* @__PURE__ */ new WeakSet(), lt = /* @__PURE__ */ new WeakSet();
|
|
4164
|
+
class We {
|
|
4078
4165
|
constructor(r) {
|
|
4079
|
-
this.target = r,
|
|
4166
|
+
this.target = r, Ce(r), Object.freeze(this);
|
|
4080
4167
|
}
|
|
4081
4168
|
}
|
|
4082
|
-
class
|
|
4169
|
+
class ct extends Error {
|
|
4083
4170
|
constructor(e = "The requested route is unavailable") {
|
|
4084
4171
|
super(e);
|
|
4085
4172
|
a(this, "name", "RouteUnavailableError");
|
|
4086
4173
|
}
|
|
4087
4174
|
}
|
|
4088
|
-
const
|
|
4175
|
+
const Hi = Object.freeze({
|
|
4089
4176
|
parse: (t) => t,
|
|
4090
4177
|
format: (t) => t
|
|
4091
|
-
}),
|
|
4178
|
+
}), Vi = Object.freeze({
|
|
4092
4179
|
parse(t) {
|
|
4093
4180
|
if (t.length !== 1) throw new TypeError("Expected one query value");
|
|
4094
4181
|
return t[0] ?? "";
|
|
4095
4182
|
},
|
|
4096
4183
|
format: (t) => [t]
|
|
4097
|
-
}),
|
|
4184
|
+
}), Ui = Object.freeze({
|
|
4098
4185
|
parse(t) {
|
|
4099
4186
|
if (t.length !== 1 || t[0] !== "true" && t[0] !== "false")
|
|
4100
4187
|
throw new TypeError("Expected one boolean query value");
|
|
@@ -4102,77 +4189,77 @@ const Li = Object.freeze({
|
|
|
4102
4189
|
},
|
|
4103
4190
|
format: (t) => [String(t)]
|
|
4104
4191
|
});
|
|
4105
|
-
function
|
|
4106
|
-
const e =
|
|
4192
|
+
function _i(t, r = t) {
|
|
4193
|
+
const e = Ge(t, "Route id"), i = ci(r, "Route path"), o = Object.freeze({
|
|
4107
4194
|
id: e,
|
|
4108
4195
|
kind: "literal",
|
|
4109
4196
|
path: i
|
|
4110
4197
|
});
|
|
4111
|
-
return
|
|
4198
|
+
return at.add(o), o;
|
|
4112
4199
|
}
|
|
4113
|
-
function
|
|
4114
|
-
const i =
|
|
4115
|
-
|
|
4200
|
+
function Qi(t, r, e = t) {
|
|
4201
|
+
const i = Ge(t, "Route id"), o = Ge(e, "Route parameter name");
|
|
4202
|
+
ai(r);
|
|
4116
4203
|
const s = Object.freeze({
|
|
4117
4204
|
id: i,
|
|
4118
4205
|
kind: "parameter",
|
|
4119
4206
|
name: o,
|
|
4120
4207
|
codec: r
|
|
4121
4208
|
});
|
|
4122
|
-
return
|
|
4209
|
+
return at.add(s), s;
|
|
4123
4210
|
}
|
|
4124
|
-
function
|
|
4125
|
-
if (
|
|
4211
|
+
function Bi(t, r) {
|
|
4212
|
+
if (B(t), t.kind !== "parameter")
|
|
4126
4213
|
throw new TypeError("routeParameter requires a parameter route");
|
|
4127
4214
|
const e = t.codec.format(r);
|
|
4128
|
-
return
|
|
4215
|
+
return ut(e, t.name), Object.freeze({ route: t, value: r });
|
|
4129
4216
|
}
|
|
4130
|
-
function
|
|
4217
|
+
function Wi(...t) {
|
|
4131
4218
|
if (t.length === 0) throw new TypeError("routeTarget requires at least one route");
|
|
4132
4219
|
for (const e of t)
|
|
4133
|
-
if (
|
|
4134
|
-
|
|
4135
|
-
else if (
|
|
4220
|
+
if (Kt(e))
|
|
4221
|
+
B(e.route);
|
|
4222
|
+
else if (B(e), e.kind !== "literal")
|
|
4136
4223
|
throw new TypeError("Parameter routes require routeParameter(route, value)");
|
|
4137
4224
|
const r = Object.freeze({ routes: Object.freeze([...t]) });
|
|
4138
|
-
return
|
|
4225
|
+
return lt.add(r), r;
|
|
4139
4226
|
}
|
|
4140
|
-
function
|
|
4141
|
-
if (
|
|
4227
|
+
function Gi(t, r) {
|
|
4228
|
+
if (Ce(t), r == null || typeof r != "object" || Array.isArray(r))
|
|
4142
4229
|
throw new TypeError("Route target query must be an object");
|
|
4143
4230
|
const e = Object.freeze({ routes: t.routes, query: Object.freeze({ ...r }) });
|
|
4144
|
-
return
|
|
4231
|
+
return lt.add(e), e;
|
|
4145
4232
|
}
|
|
4146
|
-
function
|
|
4147
|
-
return new
|
|
4233
|
+
function Yi(t) {
|
|
4234
|
+
return new We(t);
|
|
4148
4235
|
}
|
|
4149
|
-
function
|
|
4150
|
-
return t != null && typeof t == "object" &&
|
|
4236
|
+
function dt(t) {
|
|
4237
|
+
return t != null && typeof t == "object" && at.has(t);
|
|
4151
4238
|
}
|
|
4152
|
-
function
|
|
4153
|
-
if (!
|
|
4239
|
+
function B(t) {
|
|
4240
|
+
if (!dt(t))
|
|
4154
4241
|
throw new TypeError("Expected a route created by defineRoute() or defineRouteParameter()");
|
|
4155
4242
|
}
|
|
4156
|
-
function
|
|
4157
|
-
return t != null && typeof t == "object" &&
|
|
4243
|
+
function ni(t) {
|
|
4244
|
+
return t != null && typeof t == "object" && lt.has(t);
|
|
4158
4245
|
}
|
|
4159
|
-
function
|
|
4160
|
-
if (!
|
|
4246
|
+
function Ce(t) {
|
|
4247
|
+
if (!ni(t)) throw new TypeError("Expected a target created by routeTarget()");
|
|
4161
4248
|
}
|
|
4162
|
-
function
|
|
4249
|
+
function ai(t) {
|
|
4163
4250
|
if (t == null || typeof t != "object" || typeof t.parse != "function" || typeof t.format != "function")
|
|
4164
4251
|
throw new TypeError("Route codec requires parse and format functions");
|
|
4165
4252
|
}
|
|
4166
|
-
function
|
|
4253
|
+
function li(t) {
|
|
4167
4254
|
if (t == null || typeof t != "object" || typeof t.parse != "function" || typeof t.format != "function")
|
|
4168
4255
|
throw new TypeError("Route query codec requires parse and format functions");
|
|
4169
4256
|
}
|
|
4170
|
-
function
|
|
4171
|
-
|
|
4257
|
+
function Ke(t) {
|
|
4258
|
+
Ce(t);
|
|
4172
4259
|
const r = t.routes.map((o) => {
|
|
4173
|
-
if (
|
|
4260
|
+
if (Kt(o)) {
|
|
4174
4261
|
const s = o.route.codec.format(o.value);
|
|
4175
|
-
return
|
|
4262
|
+
return ut(s, o.route.name), encodeURIComponent(s);
|
|
4176
4263
|
}
|
|
4177
4264
|
return encodeURIComponent(o.path);
|
|
4178
4265
|
}), e = new URLSearchParams();
|
|
@@ -4184,30 +4271,30 @@ function Fe(t) {
|
|
|
4184
4271
|
const i = e.toString();
|
|
4185
4272
|
return `/${r.join("/")}${i === "" ? "" : `?${i}`}`;
|
|
4186
4273
|
}
|
|
4187
|
-
function
|
|
4188
|
-
return t != null && typeof t == "object" && "route" in t && "value" in t &&
|
|
4274
|
+
function Kt(t) {
|
|
4275
|
+
return t != null && typeof t == "object" && "route" in t && "value" in t && dt(t.route) && t.route.kind === "parameter";
|
|
4189
4276
|
}
|
|
4190
|
-
function
|
|
4277
|
+
function Ge(t, r) {
|
|
4191
4278
|
if (typeof t != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(t))
|
|
4192
4279
|
throw new TypeError(`${r} must be a lowercase kebab-case name`);
|
|
4193
4280
|
return t;
|
|
4194
4281
|
}
|
|
4195
|
-
function
|
|
4282
|
+
function ci(t, r) {
|
|
4196
4283
|
if (typeof t != "string" || t === "" || t === "." || t === ".." || t.includes("/") || t.includes("?") || t.includes("#"))
|
|
4197
4284
|
throw new TypeError(`${r} must be one non-empty path segment`);
|
|
4198
4285
|
try {
|
|
4199
|
-
|
|
4286
|
+
ut(decodeURIComponent(t), r);
|
|
4200
4287
|
} catch {
|
|
4201
4288
|
throw new TypeError(`${r} must use valid percent encoding`);
|
|
4202
4289
|
}
|
|
4203
4290
|
return t;
|
|
4204
4291
|
}
|
|
4205
|
-
function
|
|
4292
|
+
function ut(t, r) {
|
|
4206
4293
|
if (typeof t != "string" || t === "" || t.includes("/"))
|
|
4207
4294
|
throw new TypeError(`${r} codec must format one non-empty path segment`);
|
|
4208
4295
|
}
|
|
4209
|
-
const
|
|
4210
|
-
class
|
|
4296
|
+
const di = 16;
|
|
4297
|
+
class ui {
|
|
4211
4298
|
constructor(r) {
|
|
4212
4299
|
a(this, "root");
|
|
4213
4300
|
a(this, "transition");
|
|
@@ -4225,13 +4312,13 @@ class si {
|
|
|
4225
4312
|
a(this, "applying", 0);
|
|
4226
4313
|
a(this, "syncQueued", !1);
|
|
4227
4314
|
a(this, "disposed", !1);
|
|
4228
|
-
this.adapter = r,
|
|
4315
|
+
this.adapter = r, vi(r), this.root = Object.freeze({
|
|
4229
4316
|
route: null,
|
|
4230
4317
|
parent: null,
|
|
4231
4318
|
segment: null,
|
|
4232
4319
|
value: null,
|
|
4233
4320
|
pathname: "/"
|
|
4234
|
-
}),
|
|
4321
|
+
}), Se.set(this.root, this), this.activeContext = this.root, this.requested = Me(r.read());
|
|
4235
4322
|
const e = Object.freeze({
|
|
4236
4323
|
state: "pending",
|
|
4237
4324
|
requestedLocation: this.requested.location,
|
|
@@ -4248,7 +4335,7 @@ class si {
|
|
|
4248
4335
|
}), this.startTransition(this.requested.location, 0, !1);
|
|
4249
4336
|
}
|
|
4250
4337
|
openScope(r, e) {
|
|
4251
|
-
this.assertActive(),
|
|
4338
|
+
this.assertActive(), V(r, this), ge(e);
|
|
4252
4339
|
const i = this.scope(r);
|
|
4253
4340
|
if (i.owners.has(e)) throw new Error("Route scope owner is already registered");
|
|
4254
4341
|
i.owners.set(e, { complete: !1 }), this.wakeRegistry();
|
|
@@ -4258,18 +4345,18 @@ class si {
|
|
|
4258
4345
|
};
|
|
4259
4346
|
}
|
|
4260
4347
|
completeScope(r, e) {
|
|
4261
|
-
this.assertActive(),
|
|
4348
|
+
this.assertActive(), V(r, this);
|
|
4262
4349
|
const i = this.scope(r).owners.get(e);
|
|
4263
4350
|
if (i == null) throw new Error("Cannot complete an unopened route scope");
|
|
4264
|
-
|
|
4351
|
+
hi(this.scope(r)), i.complete = !0, this.wakeRegistry();
|
|
4265
4352
|
}
|
|
4266
4353
|
registerSelectionRoutes(r, e, i, o) {
|
|
4267
|
-
if (this.assertActive(),
|
|
4354
|
+
if (this.assertActive(), V(r, this), ge(e), !Array.isArray(i)) throw new TypeError("Route bindings must be an array");
|
|
4268
4355
|
if (typeof o != "function")
|
|
4269
4356
|
throw new TypeError("Selection route registration requires a subscriber");
|
|
4270
4357
|
const s = this.scope(r), n = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
4271
4358
|
for (const u of i) {
|
|
4272
|
-
if (
|
|
4359
|
+
if (B(u.route), u.route.kind !== "literal")
|
|
4273
4360
|
throw new TypeError("Tab routes must use literal route descriptors");
|
|
4274
4361
|
if (l.has(u.route) || s.entries.has(u.route))
|
|
4275
4362
|
throw new Error(`Duplicate route in one scope: ${u.route.id}`);
|
|
@@ -4278,15 +4365,15 @@ class si {
|
|
|
4278
4365
|
owner: e,
|
|
4279
4366
|
descriptor: u.route,
|
|
4280
4367
|
parent: r,
|
|
4281
|
-
match: (f) =>
|
|
4368
|
+
match: (f) => He(f) === u.route.path ? { value: null } : null,
|
|
4282
4369
|
currentValue: () => u.active() ? null : void 0,
|
|
4283
|
-
activate: async (f, m,
|
|
4370
|
+
activate: async (f, m, C) => {
|
|
4284
4371
|
if (u.disabled)
|
|
4285
|
-
throw new
|
|
4372
|
+
throw new ct(
|
|
4286
4373
|
`Route "${u.route.id}" is currently disabled`
|
|
4287
4374
|
);
|
|
4288
|
-
if (
|
|
4289
|
-
return await u.activate(
|
|
4375
|
+
if (C.aborted) throw C.reason;
|
|
4376
|
+
return await u.activate(C), f;
|
|
4290
4377
|
},
|
|
4291
4378
|
context: () => h,
|
|
4292
4379
|
disposeSubscription: () => {
|
|
@@ -4306,9 +4393,9 @@ class si {
|
|
|
4306
4393
|
i != null && (this.removeOwnerEntries(i, e), this.wakeRegistry());
|
|
4307
4394
|
}
|
|
4308
4395
|
registerValueRoute(r, e, i) {
|
|
4309
|
-
if (this.assertActive(),
|
|
4396
|
+
if (this.assertActive(), V(r, this), ge(e), B(i.route), i.route.kind !== "parameter")
|
|
4310
4397
|
throw new TypeError("Value routes require a parameter route descriptor");
|
|
4311
|
-
if (
|
|
4398
|
+
if ($t(i.valueEmitter, "Value route emitter"), i.resolve != null && typeof i.resolve != "function")
|
|
4312
4399
|
throw new TypeError("Value route resolver must be a function");
|
|
4313
4400
|
const o = this.scope(r);
|
|
4314
4401
|
if (o.entries.has(i.route))
|
|
@@ -4320,7 +4407,7 @@ class si {
|
|
|
4320
4407
|
descriptor: i.route,
|
|
4321
4408
|
parent: r,
|
|
4322
4409
|
match: (u) => {
|
|
4323
|
-
const h =
|
|
4410
|
+
const h = He(u), b = i.route.codec.parse(h);
|
|
4324
4411
|
if (i.route.codec.format(b) !== h)
|
|
4325
4412
|
throw new TypeError(
|
|
4326
4413
|
`Route parameter "${i.route.name}" does not round-trip`
|
|
@@ -4330,7 +4417,7 @@ class si {
|
|
|
4330
4417
|
currentValue: () => i.valueEmitter.get(),
|
|
4331
4418
|
activate: async (u, h, b) => {
|
|
4332
4419
|
const f = u.value, m = i.resolve == null ? f : await i.resolve(f, h, b);
|
|
4333
|
-
if (m instanceof
|
|
4420
|
+
if (m instanceof We) return m;
|
|
4334
4421
|
if (b.aborted) throw b.reason;
|
|
4335
4422
|
return this.withApplication(() => i.valueEmitter.set(
|
|
4336
4423
|
m,
|
|
@@ -4343,7 +4430,7 @@ class si {
|
|
|
4343
4430
|
o.entries.set(i.route, l), this.wakeRegistry();
|
|
4344
4431
|
let c = !0;
|
|
4345
4432
|
return {
|
|
4346
|
-
context:
|
|
4433
|
+
context: wi(i.valueEmitter, s, r),
|
|
4347
4434
|
contextFor: s,
|
|
4348
4435
|
dispose: () => {
|
|
4349
4436
|
if (!c) return;
|
|
@@ -4352,9 +4439,9 @@ class si {
|
|
|
4352
4439
|
};
|
|
4353
4440
|
}
|
|
4354
4441
|
registerQuery(r, e, i) {
|
|
4355
|
-
this.assertActive(),
|
|
4356
|
-
const o =
|
|
4357
|
-
|
|
4442
|
+
this.assertActive(), V(r, this), ge(e);
|
|
4443
|
+
const o = yi(i.name);
|
|
4444
|
+
$t(i.valueEmitter, "Route query emitter"), li(i.codec);
|
|
4358
4445
|
const s = i.equals ?? Object.is;
|
|
4359
4446
|
if (typeof s != "function") throw new TypeError("Route query equals must be a function");
|
|
4360
4447
|
const n = this.scope(r);
|
|
@@ -4380,7 +4467,7 @@ class si {
|
|
|
4380
4467
|
}
|
|
4381
4468
|
navigate(r, e = {}) {
|
|
4382
4469
|
this.assertActive();
|
|
4383
|
-
const i =
|
|
4470
|
+
const i = ye(r) ? this.formatContext(r) : Ke(Ue(r));
|
|
4384
4471
|
return this.issueEmitter.set(null, "explicit route navigation"), (e.history ?? "push") === "replace" ? this.adapter.replace(i) : this.adapter.push(i), this.startTransition(i, 0, !0);
|
|
4385
4472
|
}
|
|
4386
4473
|
redirect(r) {
|
|
@@ -4388,12 +4475,12 @@ class si {
|
|
|
4388
4475
|
}
|
|
4389
4476
|
href(r) {
|
|
4390
4477
|
this.assertActive();
|
|
4391
|
-
const e =
|
|
4478
|
+
const e = ye(r) ? this.formatContext(r) : Ke(Ue(r));
|
|
4392
4479
|
return this.adapter.href(e);
|
|
4393
4480
|
}
|
|
4394
4481
|
resolve(r, e) {
|
|
4395
4482
|
var o;
|
|
4396
|
-
|
|
4483
|
+
B(r), V(e, this);
|
|
4397
4484
|
let i = e;
|
|
4398
4485
|
for (; i != null; ) {
|
|
4399
4486
|
const s = (o = this.scopes.get(i)) == null ? void 0 : o.entries.get(r);
|
|
@@ -4413,8 +4500,8 @@ class si {
|
|
|
4413
4500
|
return this.formatStateLocation();
|
|
4414
4501
|
}
|
|
4415
4502
|
isActive(r, e = !1) {
|
|
4416
|
-
const i =
|
|
4417
|
-
return e ? i === this.activeContext :
|
|
4503
|
+
const i = ye(r) ? r : this.resolveTargetContext(Ue(r));
|
|
4504
|
+
return e ? i === this.activeContext : zt(i, this.activeContext);
|
|
4418
4505
|
}
|
|
4419
4506
|
dispose() {
|
|
4420
4507
|
var r;
|
|
@@ -4433,7 +4520,7 @@ class si {
|
|
|
4433
4520
|
var s;
|
|
4434
4521
|
this.assertActive(), (s = this.controller) == null || s.abort(new DOMException("Navigation superseded", "AbortError"));
|
|
4435
4522
|
const o = new AbortController();
|
|
4436
|
-
return this.controller = o, this.requested =
|
|
4523
|
+
return this.controller = o, this.requested = Me(r), i && this.issueEmitter.set(null, "route transition started"), this.transitionEmitter.set(Object.freeze({
|
|
4437
4524
|
state: "pending",
|
|
4438
4525
|
requestedLocation: this.requested.location,
|
|
4439
4526
|
settledLocation: this.formatContext(this.activeContext)
|
|
@@ -4449,13 +4536,13 @@ class si {
|
|
|
4449
4536
|
const u = await this.waitForCompleteScope(s, o);
|
|
4450
4537
|
let h;
|
|
4451
4538
|
try {
|
|
4452
|
-
h =
|
|
4539
|
+
h = pi(u, c);
|
|
4453
4540
|
} catch (f) {
|
|
4454
|
-
this.fallback(r, s, null,
|
|
4541
|
+
this.fallback(r, s, null, Ve(f));
|
|
4455
4542
|
return;
|
|
4456
4543
|
}
|
|
4457
4544
|
if (h == null) {
|
|
4458
|
-
this.fallback(r, s, null, `Unknown route segment "${
|
|
4545
|
+
this.fallback(r, s, null, `Unknown route segment "${He(c)}"`);
|
|
4459
4546
|
return;
|
|
4460
4547
|
}
|
|
4461
4548
|
const b = Object.freeze({
|
|
@@ -4464,12 +4551,12 @@ class si {
|
|
|
4464
4551
|
});
|
|
4465
4552
|
try {
|
|
4466
4553
|
const f = await h.entry.activate(h.match, b, o);
|
|
4467
|
-
if (f instanceof
|
|
4468
|
-
if (i >=
|
|
4554
|
+
if (f instanceof We) {
|
|
4555
|
+
if (i >= di) {
|
|
4469
4556
|
this.fallback(r, s, h.entry.descriptor, "Too many route redirects");
|
|
4470
4557
|
return;
|
|
4471
4558
|
}
|
|
4472
|
-
const m =
|
|
4559
|
+
const m = Ke(f.target);
|
|
4473
4560
|
this.adapter.replace(m), await this.startTransition(m, i + 1, !1);
|
|
4474
4561
|
return;
|
|
4475
4562
|
}
|
|
@@ -4480,7 +4567,7 @@ class si {
|
|
|
4480
4567
|
r,
|
|
4481
4568
|
s,
|
|
4482
4569
|
h.entry.descriptor,
|
|
4483
|
-
|
|
4570
|
+
Ve(f)
|
|
4484
4571
|
);
|
|
4485
4572
|
return;
|
|
4486
4573
|
}
|
|
@@ -4499,7 +4586,7 @@ class si {
|
|
|
4499
4586
|
for (; ; ) {
|
|
4500
4587
|
if (e.aborted) throw e.reason;
|
|
4501
4588
|
const i = this.scopes.get(r);
|
|
4502
|
-
if (i != null &&
|
|
4589
|
+
if (i != null && fi(i)) return i;
|
|
4503
4590
|
await this.waitForRegistryChange(e);
|
|
4504
4591
|
}
|
|
4505
4592
|
}
|
|
@@ -4548,10 +4635,10 @@ class si {
|
|
|
4548
4635
|
return this.cachedContext(r, e, o, i);
|
|
4549
4636
|
}
|
|
4550
4637
|
cachedContext(r, e, i, o) {
|
|
4551
|
-
const s =
|
|
4638
|
+
const s = bi(r.pathname, i), n = `${gi(r)}\0${e.id}\0${i}`, l = this.contextCache.get(n);
|
|
4552
4639
|
if (l != null) return l;
|
|
4553
4640
|
const c = Object.freeze({ route: e, parent: r, segment: i, value: o, pathname: s });
|
|
4554
|
-
return
|
|
4641
|
+
return Se.set(c, this), this.contextCache.set(n, c), c;
|
|
4555
4642
|
}
|
|
4556
4643
|
scope(r) {
|
|
4557
4644
|
let e = this.scopes.get(r);
|
|
@@ -4571,7 +4658,7 @@ class si {
|
|
|
4571
4658
|
this.applying > 0 || this.disposed || this.syncQueued || (this.syncQueued = !0, queueMicrotask(() => {
|
|
4572
4659
|
if (this.syncQueued = !1, this.applying > 0 || this.disposed || this.transitionEmitter.get().state === "pending") return;
|
|
4573
4660
|
const r = this.formatStateLocation();
|
|
4574
|
-
r !== this.adapter.read() && this.adapter.replace(r), this.requested =
|
|
4661
|
+
r !== this.adapter.read() && this.adapter.replace(r), this.requested = Me(r), this.activeContext = this.findActiveContext(), this.transitionEmitter.set(Object.freeze({
|
|
4575
4662
|
...this.transitionEmitter.get(),
|
|
4576
4663
|
state: "idle",
|
|
4577
4664
|
settledLocation: r
|
|
@@ -4598,7 +4685,7 @@ class si {
|
|
|
4598
4685
|
formatContext(r) {
|
|
4599
4686
|
const e = new URLSearchParams(this.requested.search);
|
|
4600
4687
|
for (const o of this.knownQueryNames) e.delete(o);
|
|
4601
|
-
for (const o of
|
|
4688
|
+
for (const o of Ct(r)) {
|
|
4602
4689
|
const s = this.scopes.get(o);
|
|
4603
4690
|
if (s != null)
|
|
4604
4691
|
for (const n of [...s.queries.values()].sort((l, c) => l.name.localeCompare(c.name))) {
|
|
@@ -4614,7 +4701,7 @@ class si {
|
|
|
4614
4701
|
return `${r.pathname}${i === "" ? "" : `?${i}`}`;
|
|
4615
4702
|
}
|
|
4616
4703
|
applyQueriesInLineage(r, e) {
|
|
4617
|
-
for (const i of
|
|
4704
|
+
for (const i of Ct(r)) {
|
|
4618
4705
|
const o = this.scopes.get(i);
|
|
4619
4706
|
if (o != null)
|
|
4620
4707
|
for (const s of o.queries.values()) this.applyQueryEntry(s, e);
|
|
@@ -4622,7 +4709,7 @@ class si {
|
|
|
4622
4709
|
}
|
|
4623
4710
|
applyQueryEntry(r, e) {
|
|
4624
4711
|
var o;
|
|
4625
|
-
if (!
|
|
4712
|
+
if (!zt(r.context, this.activeContext) && !mi(r.context.pathname, e.pathname)) return;
|
|
4626
4713
|
const i = e.search.getAll(r.name);
|
|
4627
4714
|
try {
|
|
4628
4715
|
const s = i.length === 0 ? r.defaultValue : r.codec.parse(i);
|
|
@@ -4638,7 +4725,7 @@ class si {
|
|
|
4638
4725
|
this.adapter.replace(l), this.issueEmitter.set(Object.freeze({
|
|
4639
4726
|
requestedLocation: e.location,
|
|
4640
4727
|
failedRouteId: ((o = r.context.route) == null ? void 0 : o.id) ?? null,
|
|
4641
|
-
reason:
|
|
4728
|
+
reason: Ve(s),
|
|
4642
4729
|
fallbackLocation: l
|
|
4643
4730
|
}), "invalid route query");
|
|
4644
4731
|
}
|
|
@@ -4655,13 +4742,13 @@ class si {
|
|
|
4655
4742
|
if (this.disposed) throw new Error("BrowserRouter has been disposed");
|
|
4656
4743
|
}
|
|
4657
4744
|
}
|
|
4658
|
-
const
|
|
4659
|
-
function
|
|
4745
|
+
const Se = /* @__PURE__ */ new WeakMap();
|
|
4746
|
+
function Ji(t) {
|
|
4660
4747
|
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
4661
4748
|
throw new TypeError("Browser router options must be an object");
|
|
4662
|
-
return new
|
|
4749
|
+
return new ui(t.adapter);
|
|
4663
4750
|
}
|
|
4664
|
-
function
|
|
4751
|
+
function Zi(t, r, e) {
|
|
4665
4752
|
if (t == null || typeof t.subscribe != "function")
|
|
4666
4753
|
throw new TypeError("waitForRouteValue requires a readable emitter");
|
|
4667
4754
|
if (typeof r != "function")
|
|
@@ -4675,7 +4762,7 @@ function Qi(t, r, e) {
|
|
|
4675
4762
|
l(() => o(e.reason));
|
|
4676
4763
|
}, u = (h, b, f) => {
|
|
4677
4764
|
b === "error" ? l(() => o(
|
|
4678
|
-
f ?? new
|
|
4765
|
+
f ?? new ct("Route prerequisite failed")
|
|
4679
4766
|
)) : r(h) && l(() => i(h));
|
|
4680
4767
|
};
|
|
4681
4768
|
if (e.aborted) {
|
|
@@ -4687,7 +4774,7 @@ function Qi(t, r, e) {
|
|
|
4687
4774
|
}, { emitCurrent: !1 }), s ? n() : e.addEventListener("abort", c, { once: !0 }));
|
|
4688
4775
|
});
|
|
4689
4776
|
}
|
|
4690
|
-
function
|
|
4777
|
+
function Me(t) {
|
|
4691
4778
|
const r = q(t), e = r.indexOf("?"), i = e < 0 ? r : r.slice(0, e), o = e < 0 ? "" : r.slice(e + 1), s = i.split("/").filter(Boolean);
|
|
4692
4779
|
return Object.freeze({
|
|
4693
4780
|
location: r,
|
|
@@ -4696,7 +4783,7 @@ function De(t) {
|
|
|
4696
4783
|
search: new URLSearchParams(o)
|
|
4697
4784
|
});
|
|
4698
4785
|
}
|
|
4699
|
-
function
|
|
4786
|
+
function hi(t) {
|
|
4700
4787
|
const r = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set();
|
|
4701
4788
|
let i = null;
|
|
4702
4789
|
for (const o of t.entries.values()) {
|
|
@@ -4715,7 +4802,7 @@ function ni(t) {
|
|
|
4715
4802
|
}
|
|
4716
4803
|
}
|
|
4717
4804
|
}
|
|
4718
|
-
function
|
|
4805
|
+
function pi(t, r) {
|
|
4719
4806
|
const e = [...t.entries.values()].sort((i, o) => i.descriptor.kind === o.descriptor.kind ? 0 : i.descriptor.kind === "literal" ? -1 : 1);
|
|
4720
4807
|
for (const i of e) {
|
|
4721
4808
|
const o = i.match(r);
|
|
@@ -4723,17 +4810,17 @@ function ai(t, r) {
|
|
|
4723
4810
|
}
|
|
4724
4811
|
return null;
|
|
4725
4812
|
}
|
|
4726
|
-
function
|
|
4813
|
+
function fi(t) {
|
|
4727
4814
|
return t.owners.size > 0 && [...t.owners.values()].every(({ complete: r }) => r);
|
|
4728
4815
|
}
|
|
4729
|
-
function
|
|
4816
|
+
function Ct(t) {
|
|
4730
4817
|
const r = [];
|
|
4731
4818
|
let e = t;
|
|
4732
4819
|
for (; e != null; )
|
|
4733
4820
|
r.unshift(e), e = e.parent;
|
|
4734
4821
|
return r;
|
|
4735
4822
|
}
|
|
4736
|
-
function
|
|
4823
|
+
function zt(t, r) {
|
|
4737
4824
|
let e = r;
|
|
4738
4825
|
for (; e != null; ) {
|
|
4739
4826
|
if (e === t) return !0;
|
|
@@ -4741,57 +4828,57 @@ function kt(t, r) {
|
|
|
4741
4828
|
}
|
|
4742
4829
|
return !1;
|
|
4743
4830
|
}
|
|
4744
|
-
function
|
|
4831
|
+
function mi(t, r) {
|
|
4745
4832
|
return t === "/" || r === t || r.startsWith(`${t}/`);
|
|
4746
4833
|
}
|
|
4747
|
-
function
|
|
4834
|
+
function bi(t, r) {
|
|
4748
4835
|
return `${t === "/" ? "" : t}/${encodeURIComponent(r)}`;
|
|
4749
4836
|
}
|
|
4750
|
-
function
|
|
4837
|
+
function gi(t) {
|
|
4751
4838
|
return t.pathname;
|
|
4752
4839
|
}
|
|
4753
|
-
function
|
|
4840
|
+
function He(t) {
|
|
4754
4841
|
try {
|
|
4755
4842
|
return decodeURIComponent(t);
|
|
4756
4843
|
} catch {
|
|
4757
|
-
throw new
|
|
4844
|
+
throw new ct("Route contains malformed percent encoding");
|
|
4758
4845
|
}
|
|
4759
4846
|
}
|
|
4760
|
-
function
|
|
4847
|
+
function yi(t) {
|
|
4761
4848
|
if (typeof t != "string" || !/^[A-Za-z][A-Za-z0-9_.-]*$/.test(t))
|
|
4762
4849
|
throw new TypeError("Route query name must start with a letter and use URL-safe characters");
|
|
4763
4850
|
return t;
|
|
4764
4851
|
}
|
|
4765
|
-
function
|
|
4852
|
+
function Ve(t) {
|
|
4766
4853
|
return t instanceof Error && t.message !== "" ? t.message : "The requested route could not be resolved";
|
|
4767
4854
|
}
|
|
4768
|
-
function
|
|
4855
|
+
function wi(t, r, e) {
|
|
4769
4856
|
const i = t.get();
|
|
4770
4857
|
return i == null ? e : r(i);
|
|
4771
4858
|
}
|
|
4772
|
-
function
|
|
4773
|
-
return
|
|
4859
|
+
function Ue(t) {
|
|
4860
|
+
return Ce(t), t;
|
|
4774
4861
|
}
|
|
4775
|
-
function
|
|
4776
|
-
return t != null && typeof t == "object" &&
|
|
4862
|
+
function ye(t) {
|
|
4863
|
+
return t != null && typeof t == "object" && Se.has(t);
|
|
4777
4864
|
}
|
|
4778
|
-
function
|
|
4779
|
-
if (t !== r.root && (!
|
|
4865
|
+
function V(t, r) {
|
|
4866
|
+
if (t !== r.root && (!ye(t) || Se.get(t) !== r))
|
|
4780
4867
|
throw new TypeError("Resolved route does not belong to this router");
|
|
4781
4868
|
}
|
|
4782
|
-
function
|
|
4869
|
+
function vi(t) {
|
|
4783
4870
|
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")
|
|
4784
4871
|
throw new TypeError("BrowserRouter requires a navigation adapter");
|
|
4785
4872
|
}
|
|
4786
|
-
function
|
|
4873
|
+
function ge(t) {
|
|
4787
4874
|
if (t == null || typeof t != "object" && typeof t != "function")
|
|
4788
4875
|
throw new TypeError("Route registration owner must be an object");
|
|
4789
4876
|
}
|
|
4790
|
-
function
|
|
4877
|
+
function $t(t, r) {
|
|
4791
4878
|
if (t == null || typeof t != "object" || typeof Reflect.get(t, "get") != "function" || typeof Reflect.get(t, "set") != "function" || typeof Reflect.get(t, "subscribe") != "function")
|
|
4792
4879
|
throw new TypeError(`${r} must be a writable emitter`);
|
|
4793
4880
|
}
|
|
4794
|
-
class
|
|
4881
|
+
class Ei extends g {
|
|
4795
4882
|
initialize() {
|
|
4796
4883
|
const r = this._runtime.router;
|
|
4797
4884
|
if (r == null) throw new Error("RouteLink requires a router in FrayRuntime");
|
|
@@ -4800,7 +4887,7 @@ class mi extends g {
|
|
|
4800
4887
|
render() {
|
|
4801
4888
|
const r = this._runtime.router;
|
|
4802
4889
|
if (r == null) throw new Error("RouteLink requires a router in FrayRuntime");
|
|
4803
|
-
const e =
|
|
4890
|
+
const e = dt(this.props.to) ? r.resolve(this.props.to, this._routeContext ?? r.root) : this.props.to, {
|
|
4804
4891
|
to: i,
|
|
4805
4892
|
exact: o = !1,
|
|
4806
4893
|
children: s = [],
|
|
@@ -4812,16 +4899,16 @@ class mi extends g {
|
|
|
4812
4899
|
href: r.href(e),
|
|
4813
4900
|
"aria-current": r.isActive(e, o) ? "page" : null,
|
|
4814
4901
|
onClick: (c) => {
|
|
4815
|
-
n == null || n(c),
|
|
4902
|
+
n == null || n(c), xi(c, l.target, l.download) && (c.preventDefault(), r.navigate(e));
|
|
4816
4903
|
}
|
|
4817
4904
|
}, s);
|
|
4818
4905
|
}
|
|
4819
4906
|
}
|
|
4820
|
-
a(
|
|
4821
|
-
function
|
|
4907
|
+
a(Ei, "liveProps", []);
|
|
4908
|
+
function xi(t, r, e) {
|
|
4822
4909
|
return !(t.defaultPrevented || t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || e != null && e !== !1 || r != null && r !== "" && r !== "_self");
|
|
4823
4910
|
}
|
|
4824
|
-
class
|
|
4911
|
+
class ki extends g {
|
|
4825
4912
|
constructor() {
|
|
4826
4913
|
super(...arguments);
|
|
4827
4914
|
a(this, "unregister", null);
|
|
@@ -4839,15 +4926,15 @@ class gi extends g {
|
|
|
4839
4926
|
});
|
|
4840
4927
|
}
|
|
4841
4928
|
render() {
|
|
4842
|
-
return w(
|
|
4929
|
+
return w(Ie, null, this.props.children ?? []);
|
|
4843
4930
|
}
|
|
4844
4931
|
onDestroy() {
|
|
4845
4932
|
var e;
|
|
4846
4933
|
(e = this.unregister) == null || e.call(this), this.unregister = null;
|
|
4847
4934
|
}
|
|
4848
4935
|
}
|
|
4849
|
-
a(
|
|
4850
|
-
class
|
|
4936
|
+
a(ki, "liveProps", []);
|
|
4937
|
+
class Si extends g {
|
|
4851
4938
|
constructor() {
|
|
4852
4939
|
super(...arguments);
|
|
4853
4940
|
a(this, "registration", null);
|
|
@@ -4864,7 +4951,7 @@ class yi extends g {
|
|
|
4864
4951
|
}
|
|
4865
4952
|
render() {
|
|
4866
4953
|
const e = this.props.valueEmitter.get(), i = this.props.children ?? [];
|
|
4867
|
-
return !this.props.scopeChildren || e == null || this.registration == null ? w(
|
|
4954
|
+
return !this.props.scopeChildren || e == null || this.registration == null ? w(Ie, null, i) : w(Ee, {
|
|
4868
4955
|
key: this.registration.contextFor(e).pathname,
|
|
4869
4956
|
context: this.registration.contextFor(e),
|
|
4870
4957
|
children: i
|
|
@@ -4875,121 +4962,122 @@ class yi extends g {
|
|
|
4875
4962
|
(e = this.registration) == null || e.dispose(), this.registration = null;
|
|
4876
4963
|
}
|
|
4877
4964
|
}
|
|
4878
|
-
a(
|
|
4965
|
+
a(Si, "liveProps", []);
|
|
4879
4966
|
export {
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4967
|
+
Lt as BaseSelectionHandler,
|
|
4968
|
+
ui as BrowserRouter,
|
|
4969
|
+
ie as Button,
|
|
4883
4970
|
j as Checkbox,
|
|
4884
|
-
|
|
4971
|
+
ii as ColorPicker,
|
|
4885
4972
|
g as Component,
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4973
|
+
he as DataTable,
|
|
4974
|
+
mr as DefaultTableFilterEncoding,
|
|
4975
|
+
qt as DescriptionItem,
|
|
4976
|
+
de as DescriptionList,
|
|
4977
|
+
fe as Dialog,
|
|
4978
|
+
Oe as Dropdown,
|
|
4892
4979
|
y as FilterMode,
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4980
|
+
U as FilterPanel,
|
|
4981
|
+
Ie as Fragment,
|
|
4982
|
+
to as FrayRuntime,
|
|
4983
|
+
ae as GroupPanel,
|
|
4984
|
+
L as Header,
|
|
4985
|
+
_r as Label,
|
|
4986
|
+
ue as ListView,
|
|
4987
|
+
Pi as MemoryNavigationAdapter,
|
|
4988
|
+
Xt as MultiSelectionHandler,
|
|
4989
|
+
le as Panel,
|
|
4990
|
+
H as Placeholder,
|
|
4991
|
+
Fe as ProgressBar,
|
|
4992
|
+
St as QuadCheckbox,
|
|
4993
|
+
oe as RadioButton,
|
|
4994
|
+
me as RadioGroup,
|
|
4995
|
+
Ei as RouteLink,
|
|
4996
|
+
ki as RouteQuery,
|
|
4997
|
+
We as RouteRedirect,
|
|
4998
|
+
Ee as RouteScope,
|
|
4999
|
+
ct as RouteUnavailableError,
|
|
5000
|
+
Si as RouteValue,
|
|
5001
|
+
ro as ServiceScope,
|
|
5002
|
+
ce as Sidebar,
|
|
5003
|
+
Ze as SingleSelectionHandler,
|
|
5004
|
+
ze as SplitView,
|
|
5005
|
+
io as StyleRegistry,
|
|
5006
|
+
Ye as Tab,
|
|
5007
|
+
X as TabLine,
|
|
5008
|
+
ne as TabPanel,
|
|
5009
|
+
re as TableHeader,
|
|
5010
|
+
te as TableHeaderCell,
|
|
5011
|
+
je as Textbox,
|
|
5012
|
+
ri as ThemePicker,
|
|
5013
|
+
qe as Toggle,
|
|
5014
|
+
Le as Toolbar,
|
|
5015
|
+
it as TreeItem,
|
|
5016
|
+
pe as TreeView,
|
|
5017
|
+
It as TriCheckbox,
|
|
5018
|
+
gr as applyLocalTableState,
|
|
5019
|
+
ai as assertRouteCodec,
|
|
5020
|
+
B as assertRouteDescriptor,
|
|
5021
|
+
li as assertRouteQueryCodec,
|
|
5022
|
+
Ce as assertRouteTarget,
|
|
5023
|
+
Ft as assertSort,
|
|
5024
|
+
G as assertTreeNodes,
|
|
5025
|
+
Ui as booleanRouteQueryCodec,
|
|
5026
|
+
Ji as createBrowserRouter,
|
|
5027
|
+
oo as createFrayRuntime,
|
|
5028
|
+
kr as createHandlerTableDataSource,
|
|
5029
|
+
Mi as createHashNavigation,
|
|
5030
|
+
Ki as createHistoryNavigation,
|
|
5031
|
+
xr as createLocalTableDataSource,
|
|
5032
|
+
Ai as createQueryTableDataSource,
|
|
5033
|
+
Sr as createRestTableDataSource,
|
|
5034
|
+
xe as createSelectionHandler,
|
|
5035
|
+
so as createServiceScope,
|
|
5036
|
+
no as createStyleRegistry,
|
|
4949
5037
|
E as css,
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
5038
|
+
ao as defaultFrayRuntime,
|
|
5039
|
+
Xe as defaultItemKey,
|
|
5040
|
+
_i as defineRoute,
|
|
5041
|
+
Qi as defineRouteParameter,
|
|
5042
|
+
lo as defineService,
|
|
5043
|
+
Ci as deriveFilterPredicate,
|
|
5044
|
+
zi as deriveFilteredItems,
|
|
5045
|
+
qi as deriveTreeNode,
|
|
5046
|
+
Jt as filterByState,
|
|
5047
|
+
be as findFrayStylesheetOption,
|
|
5048
|
+
ji as findTreeNode,
|
|
5049
|
+
Ke as formatRouteTarget,
|
|
5050
|
+
Zr as frayColorOptions,
|
|
5051
|
+
Jr as frayThemeOptions,
|
|
5052
|
+
Li as frayThemeVariableCatalog,
|
|
5053
|
+
Di as getFrayAppearance,
|
|
4966
5054
|
w as h,
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
5055
|
+
Re as isFilterMode,
|
|
5056
|
+
dt as isRouteDescriptor,
|
|
5057
|
+
ni as isRouteTarget,
|
|
4970
5058
|
p as jsx,
|
|
4971
|
-
|
|
5059
|
+
co as jsxDEV,
|
|
4972
5060
|
v as jsxs,
|
|
4973
|
-
|
|
4974
|
-
|
|
5061
|
+
uo as live,
|
|
5062
|
+
Nt as matchesFilterState,
|
|
4975
5063
|
q as normalizeRouteLocation,
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
5064
|
+
Oi as parseFilterState,
|
|
5065
|
+
ho as provideService,
|
|
5066
|
+
Yi as redirectTo,
|
|
5067
|
+
Xr as replaceFrayStylesheet,
|
|
5068
|
+
Bi as routeParameter,
|
|
5069
|
+
Wi as routeTarget,
|
|
5070
|
+
$i as serializeFilterState,
|
|
5071
|
+
br as serializeTableQuery,
|
|
5072
|
+
Fi as setFrayAppearance,
|
|
5073
|
+
Hi as stringRouteCodec,
|
|
5074
|
+
Vi as stringRouteQueryCodec,
|
|
5075
|
+
po as styleRegistry,
|
|
5076
|
+
Ot as tabButtonId,
|
|
5077
|
+
At as tabPanelId,
|
|
5078
|
+
Or as updateTreeNode,
|
|
5079
|
+
Ni as updateWritableTreeNode,
|
|
5080
|
+
Zi as waitForRouteValue,
|
|
5081
|
+
Gi as withRouteQuery
|
|
4994
5082
|
};
|
|
4995
5083
|
//# sourceMappingURL=index.js.map
|