@mechane-ai/elements 0.65.0 → 0.67.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 +21 -10
- package/dist/ai.js +285 -203
- package/dist/{article-BrUa4Wz1.js → article-anMy8fA5.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +81 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-Bh7ZkEQn.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +3 -3
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
- package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DmmknG7A.js} +6 -6
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-DlyNTDzh.js} +22 -21
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Dpyqxgwy.js → image-grid-CxEAQvTf.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +13 -13
- package/dist/kits/interpretability.js +47 -43
- package/dist/kits/operations.js +80 -79
- package/dist/kits/research.js +364 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown--nfaDoR1.js → markdown-Diffqqm7.js} +2 -2
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/ai/src/index.d.ts +2 -0
- package/dist/packages/ai/src/message-reactions.d.ts +51 -0
- package/dist/packages/ai/src/message.d.ts +3 -1
- package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
- package/dist/packages/collections/src/card-columns.d.ts +30 -0
- package/dist/packages/collections/src/collection-page.d.ts +43 -0
- package/dist/packages/collections/src/column-card.d.ts +15 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
- package/dist/packages/collections/src/data-table.d.ts +2 -2
- package/dist/packages/collections/src/index.d.ts +5 -0
- package/dist/packages/collections/src/table-query.d.ts +9 -1
- package/dist/packages/feedback/src/feedback.d.ts +0 -4
- package/dist/packages/feedback/src/index.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +0 -2
- package/dist/{param-CwT1RvUS.js → param-CKr8EYxF.js} +1 -1
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-CVzSbcU7.js} +24 -23
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-CBhI1alw.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C970JwWZ.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-C3dCxckI.js} +6 -6
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-DekEJxsy.js} +4 -4
- package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
- package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
- package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
- package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
- package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
- package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
- package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
- package/dist/styles2.css +21 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-BSNnijxf.js} +8 -8
- package/dist/{timeline-DrsDtEIW.js → timeline-CnxfYSIg.js} +4 -4
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-CJaXo56P.js} +3 -3
- package/dist/{token-predictions-CBykmPID.js → token-predictions-Bi7aKPnh.js} +3 -3
- package/dist/{transport-r1QgELf8.js → transport-CXj0DV6o.js} +4 -4
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-BxOZsjr1.js} +4 -4
- package/dist/{treemap-DgmEw_mr.js → treemap-B2yOAetT.js} +4 -4
- package/dist/{use-tween-BWf44Jy4.js → use-tween-C1TWJwce.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-W2L_2JRo.js} +3 -3
- package/dist/{waterfall-BNseqMas.js → waterfall-Bt73N2Ng.js} +4 -4
- package/package.json +1 -1
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +11 -7
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +8 -6
- package/skills/use-elements/references/collections.md +59 -12
- package/skills/use-elements/references/conversations.md +32 -0
- package/skills/use-elements/references/editorial-restraint.md +17 -29
- package/skills/use-elements/references/figures.md +6 -2
- package/skills/use-elements/references/workspace.md +5 -5
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { E as e, O as t, c as n, i as r,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { E as e, O as t, c as n, i as r, j as i, l as a, m as o, u as s, v as c } from "./src-Bkov5TTa.js";
|
|
2
|
+
import { d as l, t as u } from "./src-CIyuaSCi.js";
|
|
3
|
+
import { _ as d, n as f } from "./src-BCAelv4f.js";
|
|
4
|
+
import { i as p, r as m, t as h } from "./src-na2DdkKI.js";
|
|
5
|
+
import { c as g } from "./src-DceyVyL0.js";
|
|
6
|
+
import { t as _ } from "./accessibility-P89UG9-r.js";
|
|
7
|
+
import { l as v, t as y } from "./constants.stylex-CqhVl0uU.js";
|
|
8
|
+
import { t as b } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
9
|
+
import { n as x } from "./forms-iAOjGRTO.js";
|
|
10
|
+
import * as S from "@stylexjs/stylex";
|
|
11
|
+
import { Button as C } from "@ui-sdk/react/button";
|
|
12
|
+
import { createParts as w, mergeProps as T, usePart as E, usePrimitive as D } from "@ui-sdk/react/primitive";
|
|
13
|
+
import { Children as O, Fragment as ee, createContext as k, useContext as A, useEffect as j, useId as M, useLayoutEffect as N, useMemo as P, useRef as F, useState as I, useSyncExternalStore as te } from "react";
|
|
14
|
+
import { byCell as ne, createChange as re, createGridFocus as ie, createSelection as ae, createVirtualizer as oe, definePrimitive as L, dispatch as R, selects as se } from "@ui-sdk/core";
|
|
15
|
+
import { Fragment as ce, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
16
|
+
import { ArrowDown as le, ArrowRightLeft as ue, ArrowUp as V, ArrowUpDown as de, ChevronLeft as fe, ChevronRight as H, CircleAlert as pe, CircleDashed as me, ListFilter as U, Search as he, Settings2 as W, X as ge } from "lucide-react";
|
|
17
|
+
import { useShortcut as _e } from "@ui-sdk/react/shortcuts";
|
|
18
|
+
import { Toolbar as ve, ToolbarButton as G, ToolbarGroup as ye, ToolbarInput as K } from "@ui-sdk/react/toolbar";
|
|
19
|
+
import { createColumnHelper as be, tableFeatures as xe, useTable as Se } from "@tanstack/react-table";
|
|
20
|
+
import { Timeline as Ce, TimelineDescription as we, TimelineItem as Te, TimelineMarker as Ee, TimelineTime as De, TimelineTitle as Oe } from "@ui-sdk/react/timeline";
|
|
20
21
|
// packages/collections/src/control-toolbar.tsx
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
var ke = k(!1);
|
|
23
|
+
function Ae(e) {
|
|
24
|
+
return A(ke) ? /* @__PURE__ */ z(ye, { ...e }) : /* @__PURE__ */ z(ke, {
|
|
24
25
|
value: !0,
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ z(ve, { ...e })
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
29
|
+
function je(e) {
|
|
30
|
+
return A(ke) ? /* @__PURE__ */ z(G, { render: e }) : e;
|
|
30
31
|
}
|
|
31
32
|
// packages/collections/src/collection-controls.tsx
|
|
32
|
-
var
|
|
33
|
+
var Me = {
|
|
33
34
|
toolbar: {
|
|
34
35
|
kOIVth: "x1hnptsi",
|
|
35
36
|
kMwMTN: "xbixft",
|
|
@@ -44,40 +45,40 @@ var Te = {
|
|
|
44
45
|
$$css: !0
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
|
-
function
|
|
48
|
-
let r =
|
|
49
|
-
return !r && !i ? null : /* @__PURE__ */
|
|
48
|
+
function q({ label: e, children: t, actions: n }) {
|
|
49
|
+
let r = O.toArray(t).length > 0, i = O.toArray(n).length > 0;
|
|
50
|
+
return !r && !i ? null : /* @__PURE__ */ B(Ae, {
|
|
50
51
|
"aria-label": e,
|
|
51
|
-
...
|
|
52
|
-
children: [t, i && /* @__PURE__ */
|
|
52
|
+
...S.props(s.row, s.blockEnd, Me.toolbar),
|
|
53
|
+
children: [t, i && /* @__PURE__ */ z("div", {
|
|
53
54
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
54
55
|
children: n
|
|
55
56
|
})]
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
59
|
+
function Ne({ filters: e, onRemove: n, label: r = "Applied filters" }) {
|
|
60
|
+
return e.length === 0 ? null : /* @__PURE__ */ z(Ae, {
|
|
60
61
|
"aria-label": r,
|
|
61
62
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
62
|
-
children: e.map((e) => /* @__PURE__ */
|
|
63
|
+
children: e.map((e) => /* @__PURE__ */ B("span", {
|
|
63
64
|
className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 xunmzkg x1f9pz31 x992rv9 xyibt8p x1ok0vyi xeuugli x193iq5w xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt x1s928wv x1j6awrg xarstr8 x5hscyn x86avzo x10z0kkz x1k48kgn x2q1x1w",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ z("span", {
|
|
65
66
|
title: e.label,
|
|
66
67
|
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
67
68
|
children: e.label
|
|
68
|
-
}), /* @__PURE__ */
|
|
69
|
-
render: /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ z(G, {
|
|
70
|
+
render: /* @__PURE__ */ z(t, {
|
|
70
71
|
"aria-label": `Remove ${e.label}`,
|
|
71
72
|
variant: "ghost",
|
|
72
|
-
xstyle:
|
|
73
|
+
xstyle: Me.remove
|
|
73
74
|
}),
|
|
74
75
|
onClick: (t) => {
|
|
75
|
-
|
|
76
|
+
R({ options: () => ({ onRemove: n }) }, "onRemove", e.id, {
|
|
76
77
|
reason: "remove-press",
|
|
77
78
|
event: t.nativeEvent
|
|
78
79
|
});
|
|
79
80
|
},
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ z(ge, {
|
|
81
82
|
size: 14,
|
|
82
83
|
"aria-hidden": "true"
|
|
83
84
|
})
|
|
@@ -85,30 +86,30 @@ function q({ filters: e, onRemove: n, label: r = "Applied filters" }) {
|
|
|
85
86
|
}, e.id))
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
let o =
|
|
89
|
+
function Pe({ options: n, onChange: r, onReset: i, label: a = "Display options" }) {
|
|
90
|
+
let o = je(/* @__PURE__ */ z(t, {
|
|
90
91
|
"aria-label": a,
|
|
91
92
|
title: a
|
|
92
93
|
}));
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ B(m.Root, { children: [/* @__PURE__ */ z(m.Trigger, {
|
|
94
95
|
render: o,
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ z(W, {
|
|
96
97
|
size: 14,
|
|
97
98
|
"aria-hidden": "true"
|
|
98
99
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
+
}), /* @__PURE__ */ B(m.Popup, {
|
|
100
101
|
align: "end",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ z(m.Title, { children: "Display" }), /* @__PURE__ */ B("div", {
|
|
102
103
|
className: "xrvj5dj x1n8ia3y xfb3i0g",
|
|
103
|
-
children: [n.map((e) => /* @__PURE__ */
|
|
104
|
+
children: [n.map((e) => /* @__PURE__ */ B("label", {
|
|
104
105
|
className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ z(g.Root, {
|
|
106
107
|
checked: e.isChecked,
|
|
107
108
|
onCheckedChange: (t) => r(e.id, t),
|
|
108
109
|
disabled: e.isRequired === !0,
|
|
109
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ z(g.Indicator, {})
|
|
110
111
|
}), e.label]
|
|
111
|
-
}, e.id)), i !== void 0 && /* @__PURE__ */
|
|
112
|
+
}, e.id)), i !== void 0 && /* @__PURE__ */ z(e, {
|
|
112
113
|
type: "button",
|
|
113
114
|
variant: "ghost",
|
|
114
115
|
onClick: i,
|
|
@@ -117,27 +118,27 @@ function De({ options: n, onChange: r, onReset: i, label: a = "Display options"
|
|
|
117
118
|
})]
|
|
118
119
|
})] });
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
function Fe({ label: t, description: r, previous: i, next: a }) {
|
|
122
|
+
return /* @__PURE__ */ B("nav", {
|
|
122
123
|
"aria-label": t === void 0 ? "Pagination" : `${t} pagination`,
|
|
123
124
|
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ z(n, { children: r }), /* @__PURE__ */ B("div", {
|
|
125
126
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ B(e, {
|
|
127
128
|
variant: "outline",
|
|
128
129
|
"aria-label": t === void 0 ? void 0 : `Previous page of ${t}`,
|
|
129
130
|
disabled: i.disabled,
|
|
130
131
|
onClick: i.onClick,
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ z(fe, {
|
|
132
133
|
size: 16,
|
|
133
134
|
"aria-hidden": "true"
|
|
134
135
|
}), "Previous"]
|
|
135
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ B(e, {
|
|
136
137
|
variant: "outline",
|
|
137
138
|
"aria-label": t === void 0 ? void 0 : `Next page of ${t}`,
|
|
138
139
|
disabled: a.disabled,
|
|
139
140
|
onClick: a.onClick,
|
|
140
|
-
children: ["Next", /* @__PURE__ */
|
|
141
|
+
children: ["Next", /* @__PURE__ */ z(H, {
|
|
141
142
|
size: 16,
|
|
142
143
|
"aria-hidden": "true"
|
|
143
144
|
})]
|
|
@@ -146,11 +147,11 @@ function Oe({ label: t, description: r, previous: i, next: a }) {
|
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
149
|
// packages/collections/src/data-table-styles.ts
|
|
149
|
-
var
|
|
150
|
+
var Ie = {
|
|
150
151
|
kmVPX3: "x1717udv",
|
|
151
152
|
kMzoRj: "xc342km",
|
|
152
153
|
$$css: !0
|
|
153
|
-
},
|
|
154
|
+
}, Le = {
|
|
154
155
|
kVAEAm: "x10l6tqk",
|
|
155
156
|
k87sOh: "x13vifvy",
|
|
156
157
|
kLqNvP: "x1o0tod",
|
|
@@ -469,7 +470,7 @@ var ke = {
|
|
|
469
470
|
$$css: !0
|
|
470
471
|
},
|
|
471
472
|
spacer: (e) => [
|
|
472
|
-
|
|
473
|
+
Ie,
|
|
473
474
|
{
|
|
474
475
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
475
476
|
$$css: !0
|
|
@@ -477,7 +478,7 @@ var ke = {
|
|
|
477
478
|
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
478
479
|
],
|
|
479
480
|
sizer: (e) => [
|
|
480
|
-
|
|
481
|
+
Le,
|
|
481
482
|
{
|
|
482
483
|
kZKoxP: e == null ? e : "x16ye13r",
|
|
483
484
|
$$css: !0
|
|
@@ -518,61 +519,7 @@ var ke = {
|
|
|
518
519
|
kyjxKa: "x1az1eml",
|
|
519
520
|
$$css: !0
|
|
520
521
|
}
|
|
521
|
-
}
|
|
522
|
-
// packages/collections/src/data-table-text.tsx
|
|
523
|
-
function je({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
524
|
-
let r = b.toArray(t).length > 0;
|
|
525
|
-
return /* @__PURE__ */ R("span", {
|
|
526
|
-
"aria-hidden": n || void 0,
|
|
527
|
-
inert: n || void 0,
|
|
528
|
-
...g.props(J.textRow),
|
|
529
|
-
children: [r && /* @__PURE__ */ L("span", {
|
|
530
|
-
"aria-hidden": !0,
|
|
531
|
-
...g.props(J.adornment),
|
|
532
|
-
children: t
|
|
533
|
-
}), /* @__PURE__ */ L("span", {
|
|
534
|
-
...g.props(J.textColumn),
|
|
535
|
-
children: e
|
|
536
|
-
})]
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
function Me({ children: e, secondary: t, leading: n, trailing: r, isMono: i = !1 }) {
|
|
540
|
-
let a = b.toArray(r).length > 0;
|
|
541
|
-
return /* @__PURE__ */ R(je, {
|
|
542
|
-
leading: n,
|
|
543
|
-
children: [/* @__PURE__ */ R("span", {
|
|
544
|
-
...g.props(J.primaryRow),
|
|
545
|
-
children: [/* @__PURE__ */ L("span", {
|
|
546
|
-
"data-record-text": !0,
|
|
547
|
-
title: typeof e == "string" ? e : void 0,
|
|
548
|
-
...g.props(J.text, J.primaryText, J.truncated, i && J.mono),
|
|
549
|
-
children: e
|
|
550
|
-
}), a && /* @__PURE__ */ L("span", {
|
|
551
|
-
...g.props(J.adornment),
|
|
552
|
-
children: r
|
|
553
|
-
})]
|
|
554
|
-
}), t !== void 0 && /* @__PURE__ */ L("span", {
|
|
555
|
-
title: t,
|
|
556
|
-
...g.props(J.text, J.truncated, J.secondaryText),
|
|
557
|
-
children: t
|
|
558
|
-
})]
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
function Ne({ leading: e, isSecondary: t = !1 }) {
|
|
562
|
-
return /* @__PURE__ */ R(je, {
|
|
563
|
-
leading: e,
|
|
564
|
-
isDecorative: !0,
|
|
565
|
-
children: [/* @__PURE__ */ L("span", {
|
|
566
|
-
...g.props(J.text),
|
|
567
|
-
children: /* @__PURE__ */ L(d, { width: "70%" })
|
|
568
|
-
}), t && /* @__PURE__ */ L("span", {
|
|
569
|
-
...g.props(J.text, J.secondaryText),
|
|
570
|
-
children: /* @__PURE__ */ L(d, { width: "45%" })
|
|
571
|
-
})]
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
// packages/collections/src/data-table-layout.tsx
|
|
575
|
-
var Pe = p.compactTable.slice(7), Fe = /* @__PURE__ */ new Set(["string", "number"]), Y = {
|
|
522
|
+
}, Re = y.compactTable.slice(7), ze = /* @__PURE__ */ new Set(["string", "number"]), Y = {
|
|
576
523
|
primary: {
|
|
577
524
|
minimumWidth: 240,
|
|
578
525
|
isFlexible: !0,
|
|
@@ -603,24 +550,24 @@ var Pe = p.compactTable.slice(7), Fe = /* @__PURE__ */ new Set(["string", "numbe
|
|
|
603
550
|
isFlexible: !1,
|
|
604
551
|
shouldTruncate: !1
|
|
605
552
|
}
|
|
606
|
-
},
|
|
553
|
+
}, Be = {
|
|
607
554
|
fixed: J.content,
|
|
608
555
|
content: J.contentCell
|
|
609
|
-
},
|
|
556
|
+
}, Ve = {
|
|
610
557
|
primary: J.start,
|
|
611
558
|
text: J.start,
|
|
612
559
|
status: J.start,
|
|
613
560
|
number: J.end,
|
|
614
561
|
timestamp: J.end,
|
|
615
562
|
actions: J.end
|
|
616
|
-
},
|
|
563
|
+
}, He = {
|
|
617
564
|
content: J.content,
|
|
618
565
|
fill: J.fillFrame
|
|
619
|
-
},
|
|
566
|
+
}, Ue = {
|
|
620
567
|
content: J.content,
|
|
621
568
|
fill: J.fillViewport
|
|
622
569
|
};
|
|
623
|
-
function
|
|
570
|
+
function We(e) {
|
|
624
571
|
return e.map((e) => {
|
|
625
572
|
let t = Y[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
|
|
626
573
|
return {
|
|
@@ -629,36 +576,36 @@ function Be(e) {
|
|
|
629
576
|
};
|
|
630
577
|
});
|
|
631
578
|
}
|
|
632
|
-
function
|
|
579
|
+
function Ge(e, t = 0) {
|
|
633
580
|
return {
|
|
634
581
|
minimumWidth: e.reduce((e, t) => e + (t.width ?? Y[t.role].minimumWidth), t),
|
|
635
582
|
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? Y[t.role].minimumWidth), t)
|
|
636
583
|
};
|
|
637
584
|
}
|
|
638
|
-
function
|
|
639
|
-
let t = globalThis.matchMedia(
|
|
585
|
+
function Ke(e) {
|
|
586
|
+
let t = globalThis.matchMedia(Re);
|
|
640
587
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
641
588
|
}
|
|
642
|
-
function
|
|
643
|
-
return globalThis.matchMedia(
|
|
589
|
+
function qe() {
|
|
590
|
+
return globalThis.matchMedia(Re).matches;
|
|
644
591
|
}
|
|
645
|
-
function
|
|
646
|
-
return /* @__PURE__ */
|
|
592
|
+
function Je({ columns: e, canSelect: t = !1 }) {
|
|
593
|
+
return /* @__PURE__ */ B("colgroup", { children: [t && /* @__PURE__ */ z("col", { ...S.props(J.selection) }), e.map((e) => /* @__PURE__ */ z("col", { ...S.props(e.width !== void 0 && J.width(e.width), e.isSecondary === !0 && J.secondary) }, e.id))] });
|
|
647
594
|
}
|
|
648
|
-
function
|
|
595
|
+
function Ye({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
649
596
|
let i = Y[e], a = t && i.shouldTruncate, o = n === !0 || typeof r == "string" && (n ?? a);
|
|
650
|
-
return /* @__PURE__ */
|
|
651
|
-
...
|
|
652
|
-
children: /* @__PURE__ */
|
|
653
|
-
"data-record-text":
|
|
597
|
+
return /* @__PURE__ */ z("span", {
|
|
598
|
+
...S.props(J.cellViewport, !t && J.contentViewport),
|
|
599
|
+
children: /* @__PURE__ */ z("span", {
|
|
600
|
+
"data-record-text": ze.has(typeof r) || void 0,
|
|
654
601
|
title: typeof r == "string" ? r : void 0,
|
|
655
|
-
...
|
|
602
|
+
...S.props(J.cellContent, t && J.fixedContent, t && !i.shouldTruncate && J.readable, o && J.truncated),
|
|
656
603
|
children: r
|
|
657
604
|
})
|
|
658
605
|
});
|
|
659
606
|
}
|
|
660
607
|
// packages/collections/src/table-results.tsx
|
|
661
|
-
function
|
|
608
|
+
function Xe({ status: e, sort: t, selected: n, pagination: r, isPlaceholder: i }) {
|
|
662
609
|
return {
|
|
663
610
|
status: e,
|
|
664
611
|
pending: e === "pending",
|
|
@@ -670,24 +617,24 @@ function Ke({ status: e, sort: t, selected: n, pagination: r, isPlaceholder: i }
|
|
|
670
617
|
isPlaceholder: i
|
|
671
618
|
};
|
|
672
619
|
}
|
|
673
|
-
var
|
|
674
|
-
function
|
|
620
|
+
var Ze = "[hidden], [inert], [aria-hidden=\"true\"], [data-agent-hidden], [data-agent-secret]";
|
|
621
|
+
function Qe(e) {
|
|
675
622
|
let t = e instanceof HTMLTableElement ? e.tBodies[0] : void 0;
|
|
676
|
-
if (t !== void 0 && t.closest(
|
|
623
|
+
if (t !== void 0 && t.closest(Ze) === null) return new Map(Array.from(t.rows).flatMap((e) => {
|
|
677
624
|
let t = e.dataset.rowId, n = Array.from(e.cells).find((e) => e.dataset.recordLabel !== void 0);
|
|
678
625
|
if (t === void 0 || n === void 0) return [];
|
|
679
|
-
if (n.closest(
|
|
626
|
+
if (n.closest(Ze) !== null || n.querySelector("[data-agent-secret], [data-agent-hidden]") !== null || !n.checkVisibility({ visibilityProperty: !0 })) return [[t, null]];
|
|
680
627
|
let r = n.querySelector("[data-row-action][aria-label]") ?? n.querySelector("[data-record-text]");
|
|
681
|
-
if (r !== null && r.closest(
|
|
628
|
+
if (r !== null && r.closest(Ze) !== null || r?.checkVisibility({ visibilityProperty: !0 }) === !1) return [[t, null]];
|
|
682
629
|
let i = r?.getAttribute("aria-label") ?? r?.textContent.trim();
|
|
683
630
|
return [[t, i === void 0 || i.length === 0 ? t : i]];
|
|
684
631
|
}));
|
|
685
632
|
}
|
|
686
|
-
var
|
|
633
|
+
var $e = {
|
|
687
634
|
none: "ascending",
|
|
688
635
|
ascending: "descending",
|
|
689
636
|
descending: "none"
|
|
690
|
-
},
|
|
637
|
+
}, et = /* @__PURE__ */ new Set(["ascending", "descending"]), tt = /* @__PURE__ */ new Set(["Home", "End"]), nt = L({
|
|
691
638
|
name: "collection-results",
|
|
692
639
|
options: {
|
|
693
640
|
status: "string",
|
|
@@ -705,10 +652,10 @@ var Je = {
|
|
|
705
652
|
isPlaceholder: "boolean"
|
|
706
653
|
},
|
|
707
654
|
state: (e) => ({
|
|
708
|
-
...
|
|
655
|
+
...Xe(e),
|
|
709
656
|
active: null
|
|
710
657
|
}),
|
|
711
|
-
sync:
|
|
658
|
+
sync: Xe,
|
|
712
659
|
controlled: [
|
|
713
660
|
"status",
|
|
714
661
|
"sort",
|
|
@@ -718,7 +665,7 @@ var Je = {
|
|
|
718
665
|
"hasNextPage"
|
|
719
666
|
],
|
|
720
667
|
api: (e) => {
|
|
721
|
-
let t =
|
|
668
|
+
let t = re(e), n = ie(e, {
|
|
722
669
|
key: "active",
|
|
723
670
|
rows: () => e.options().rowIds.length,
|
|
724
671
|
cols: () => 1,
|
|
@@ -734,7 +681,7 @@ var Je = {
|
|
|
734
681
|
col: 0
|
|
735
682
|
} });
|
|
736
683
|
});
|
|
737
|
-
let i =
|
|
684
|
+
let i = ae(e, {
|
|
738
685
|
key: "selected",
|
|
739
686
|
set: (e, n) => t("selected", e, n),
|
|
740
687
|
order: () => e.options().rowIds,
|
|
@@ -759,7 +706,7 @@ var Je = {
|
|
|
759
706
|
return {
|
|
760
707
|
grid: n,
|
|
761
708
|
rowKeydown(t) {
|
|
762
|
-
t.shiftKey || (t.metaKey || t.ctrlKey || !
|
|
709
|
+
t.shiftKey || (t.metaKey || t.ctrlKey || !tt.has(t.key) ? n.keydown(t) : (t.preventDefault(), n.focus({
|
|
763
710
|
row: t.key === "Home" ? 0 : e.options().rowIds.length - 1,
|
|
764
711
|
col: 0
|
|
765
712
|
}, {
|
|
@@ -772,7 +719,7 @@ var Je = {
|
|
|
772
719
|
col: 0
|
|
773
720
|
}),
|
|
774
721
|
toggleSort(n, r) {
|
|
775
|
-
let { sort: i } = e.options(), a =
|
|
722
|
+
let { sort: i } = e.options(), a = $e[i?.columnId === n ? i.direction : "none"];
|
|
776
723
|
return t("sort", a === "none" ? null : {
|
|
777
724
|
columnId: n,
|
|
778
725
|
direction: a
|
|
@@ -796,7 +743,7 @@ var Je = {
|
|
|
796
743
|
},
|
|
797
744
|
sort(e, n = "ascending") {
|
|
798
745
|
if (n === "none") return t("sort", null, { reason: "imperative" });
|
|
799
|
-
if (!
|
|
746
|
+
if (!et.has(n)) throw Error("The direction is ascending, descending or none.");
|
|
800
747
|
return t("sort", {
|
|
801
748
|
columnId: o(e),
|
|
802
749
|
direction: n === "descending" ? "descending" : "ascending"
|
|
@@ -816,7 +763,7 @@ var Je = {
|
|
|
816
763
|
previousPage: () => s("previous"),
|
|
817
764
|
nextPage: () => s("next"),
|
|
818
765
|
records() {
|
|
819
|
-
let t =
|
|
766
|
+
let t = Qe(e.element("root")), { rowIds: n, rowLabel: r } = e.options();
|
|
820
767
|
if (t === void 0) return [];
|
|
821
768
|
let i = Array.from(t.values()).includes(null);
|
|
822
769
|
return n.flatMap((e, n) => {
|
|
@@ -837,7 +784,7 @@ var Je = {
|
|
|
837
784
|
row: "number",
|
|
838
785
|
col: "number"
|
|
839
786
|
},
|
|
840
|
-
selects:
|
|
787
|
+
selects: se({ active: ne }),
|
|
841
788
|
attrs: (e, { props: t, api: n }) => ({ tabindex: n.grid.tabIndex(e, t) }),
|
|
842
789
|
on: {
|
|
843
790
|
keydown: (e, { api: t }) => t.rowKeydown(e),
|
|
@@ -863,28 +810,28 @@ var Je = {
|
|
|
863
810
|
shown: (e) => !e.isPlaceholder
|
|
864
811
|
}
|
|
865
812
|
});
|
|
866
|
-
function
|
|
867
|
-
let n =
|
|
813
|
+
function rt(e, t) {
|
|
814
|
+
let n = D(nt, e), r = E(n, "root", {}, t(n.api), "table");
|
|
868
815
|
return {
|
|
869
816
|
api: n.api,
|
|
870
817
|
element: r
|
|
871
818
|
};
|
|
872
819
|
}
|
|
873
|
-
var
|
|
820
|
+
var it = w(nt, {
|
|
874
821
|
root: "table",
|
|
875
822
|
trigger: "a"
|
|
876
|
-
}).Trigger,
|
|
823
|
+
}).Trigger, at = w(nt, {
|
|
877
824
|
root: "table",
|
|
878
825
|
trigger: "button"
|
|
879
826
|
}).Trigger;
|
|
880
827
|
// packages/collections/src/data-table-trigger.tsx
|
|
881
|
-
function
|
|
828
|
+
function ot(e) {
|
|
882
829
|
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
883
830
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
884
831
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
885
832
|
}
|
|
886
|
-
function
|
|
887
|
-
let o = r.label?.(n), s = r.href === void 0 ? /* @__PURE__ */
|
|
833
|
+
function st({ index: e, recordId: t, row: n, action: r, isActive: i, children: a }) {
|
|
834
|
+
let o = r.label?.(n), s = r.href === void 0 ? /* @__PURE__ */ z(at, {
|
|
888
835
|
value: t,
|
|
889
836
|
row: e,
|
|
890
837
|
col: 0,
|
|
@@ -894,11 +841,11 @@ function nt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
|
|
|
894
841
|
"aria-pressed": i,
|
|
895
842
|
"data-row-action": !0,
|
|
896
843
|
onClick: (e) => {
|
|
897
|
-
|
|
844
|
+
ot(e) && r.onActivate(n);
|
|
898
845
|
},
|
|
899
|
-
...
|
|
846
|
+
...S.props(J.trigger),
|
|
900
847
|
children: a
|
|
901
|
-
}) : /* @__PURE__ */
|
|
848
|
+
}) : /* @__PURE__ */ z(it, {
|
|
902
849
|
value: t,
|
|
903
850
|
row: e,
|
|
904
851
|
col: 0,
|
|
@@ -906,20 +853,20 @@ function nt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
|
|
|
906
853
|
href: r.href(n),
|
|
907
854
|
"data-row-action": !0,
|
|
908
855
|
onClick: (e) => {
|
|
909
|
-
r.onActivate !== void 0 &&
|
|
856
|
+
r.onActivate !== void 0 && ot(e) && (e.preventDefault(), r.onActivate(n));
|
|
910
857
|
},
|
|
911
|
-
...
|
|
858
|
+
...S.props(J.trigger),
|
|
912
859
|
children: a
|
|
913
860
|
});
|
|
914
|
-
return o === void 0 || r.showTooltip !== !0 ? s : /* @__PURE__ */
|
|
861
|
+
return o === void 0 || r.showTooltip !== !0 ? s : /* @__PURE__ */ B(h.Root, { children: [/* @__PURE__ */ z(h.Trigger, { render: s }), /* @__PURE__ */ z(h.Popup, {
|
|
915
862
|
side: "top",
|
|
916
863
|
align: "start",
|
|
917
864
|
children: o
|
|
918
865
|
})] });
|
|
919
866
|
}
|
|
920
867
|
// packages/collections/src/use-end-reached.ts
|
|
921
|
-
function
|
|
922
|
-
|
|
868
|
+
function ct({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
869
|
+
j(() => {
|
|
923
870
|
if (n === void 0 || e.current === null) return;
|
|
924
871
|
let r = new IntersectionObserver((e) => {
|
|
925
872
|
e.some((e) => e.isIntersecting) && n();
|
|
@@ -933,10 +880,10 @@ function rt({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
933
880
|
]);
|
|
934
881
|
}
|
|
935
882
|
// packages/collections/src/use-table-window.ts
|
|
936
|
-
var
|
|
937
|
-
function
|
|
938
|
-
let t =
|
|
939
|
-
let e =
|
|
883
|
+
var lt = [];
|
|
884
|
+
function ut(e) {
|
|
885
|
+
let t = F(e), [{ rows: n, subscribe: r, readItems: i, scrollToIndex: a }] = I(() => {
|
|
886
|
+
let e = oe({
|
|
940
887
|
count: () => t.current.count,
|
|
941
888
|
estimate: () => t.current.estimate,
|
|
942
889
|
key: (e) => t.current.keyOf(e),
|
|
@@ -954,10 +901,10 @@ function at(e) {
|
|
|
954
901
|
readItems: () => e.items(),
|
|
955
902
|
scrollToIndex: (t) => e.scrollToIndex(t)
|
|
956
903
|
};
|
|
957
|
-
}), [o] =
|
|
958
|
-
return
|
|
904
|
+
}), [o] = I(() => /* @__PURE__ */ new Map()), { isEnabled: s, viewport: c } = e;
|
|
905
|
+
return N(() => {
|
|
959
906
|
t.current = e, n.refresh();
|
|
960
|
-
}),
|
|
907
|
+
}), N(() => {
|
|
961
908
|
let e = c.current;
|
|
962
909
|
if (s && e !== null) return n.connect(e);
|
|
963
910
|
}, [
|
|
@@ -965,7 +912,7 @@ function at(e) {
|
|
|
965
912
|
n,
|
|
966
913
|
c
|
|
967
914
|
]), {
|
|
968
|
-
items:
|
|
915
|
+
items: te(r, i, () => lt),
|
|
969
916
|
size: n.size(),
|
|
970
917
|
scrollToIndex: a,
|
|
971
918
|
measure(e) {
|
|
@@ -977,14 +924,14 @@ function at(e) {
|
|
|
977
924
|
};
|
|
978
925
|
}
|
|
979
926
|
// packages/collections/src/data-table-rows.tsx
|
|
980
|
-
var
|
|
981
|
-
ascending:
|
|
982
|
-
descending:
|
|
983
|
-
none:
|
|
927
|
+
var dt = xe({}), ft = {
|
|
928
|
+
ascending: V,
|
|
929
|
+
descending: le,
|
|
930
|
+
none: de
|
|
984
931
|
};
|
|
985
|
-
function
|
|
986
|
-
let n =
|
|
987
|
-
|
|
932
|
+
function pt(e, t) {
|
|
933
|
+
let n = F(void 0);
|
|
934
|
+
j(() => {
|
|
988
935
|
if (t === void 0) {
|
|
989
936
|
n.current = void 0;
|
|
990
937
|
return;
|
|
@@ -998,94 +945,94 @@ function ct(e, t) {
|
|
|
998
945
|
};
|
|
999
946
|
}, [e, t]);
|
|
1000
947
|
}
|
|
1001
|
-
function
|
|
1002
|
-
let
|
|
1003
|
-
let e =
|
|
1004
|
-
return e.columns(
|
|
948
|
+
function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: o, selectedIds: s, onSelectionChange: c, selectionLabel: l, rowAction: u, activeRowId: d, focusRowId: f, onRowHighlightChange: p, hideCaption: m = !1, hideHeaders: h = !1, rowSizing: y = "fixed", window: x, endContent: w, onEndReached: T, footer: E, pagination: D, resultStatus: O = "ready", isPlaceholder: k = !1, hasSelectionColumn: A = s !== void 0 }) {
|
|
949
|
+
let M = P(() => We(t), [t]), ne = te(Ke, qe, () => !1), re = P(() => {
|
|
950
|
+
let e = be();
|
|
951
|
+
return e.columns(M.map((t) => e.display({
|
|
1005
952
|
id: t.id,
|
|
1006
953
|
header: t.label
|
|
1007
954
|
})));
|
|
1008
|
-
}, [
|
|
1009
|
-
features:
|
|
1010
|
-
columns:
|
|
955
|
+
}, [M]), ie = Se({
|
|
956
|
+
features: dt,
|
|
957
|
+
columns: re,
|
|
1011
958
|
data: e,
|
|
1012
959
|
getRowId: n
|
|
1013
|
-
}),
|
|
1014
|
-
|
|
1015
|
-
end:
|
|
1016
|
-
onEndReached:
|
|
960
|
+
}), ae = b(), oe = ae.viewport, L = F(null), R = F(null), se = F(null), [le, ue] = I(0), [V, de] = I(), [fe, H] = I(), pe = F(void 0), me = F(void 0), U = P(() => e.map(n), [e, n]), he = V === void 0 ? -1 : U.indexOf(V.id), W = V?.isWithin === !0 ? he : -1, ge = W === -1 ? void 0 : V?.id, _e = M.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), ve = _e === -1 ? M.findIndex((e) => e.isSecondary !== !0) : _e, G = typeof x?.height == "string" ? x.height : "content", ye = u !== void 0 && u.disabled !== !0;
|
|
961
|
+
ct({
|
|
962
|
+
end: L,
|
|
963
|
+
onEndReached: x === void 0 ? T : void 0,
|
|
1017
964
|
content: e.length
|
|
1018
|
-
}),
|
|
1019
|
-
let e =
|
|
1020
|
-
if (
|
|
1021
|
-
let n = new ResizeObserver(() =>
|
|
965
|
+
}), j(() => {
|
|
966
|
+
let e = R.current, t = se.current;
|
|
967
|
+
if (x === void 0 || e === null || t === null) return;
|
|
968
|
+
let n = new ResizeObserver(() => ue(e.offsetHeight + t.offsetHeight));
|
|
1022
969
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
1023
970
|
}, [
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
971
|
+
x,
|
|
972
|
+
m,
|
|
973
|
+
h
|
|
1027
974
|
]);
|
|
1028
|
-
let K =
|
|
1029
|
-
isEnabled:
|
|
975
|
+
let K = ut({
|
|
976
|
+
isEnabled: x !== void 0,
|
|
1030
977
|
viewport: oe,
|
|
1031
978
|
count: e.length,
|
|
1032
979
|
keyOf: (e) => U[e] ?? String(e),
|
|
1033
|
-
estimate: y === "fixed" ?
|
|
1034
|
-
margin:
|
|
980
|
+
estimate: y === "fixed" ? v.rowHeight : x?.estimatedRowHeight ?? v.rowHeight,
|
|
981
|
+
margin: le,
|
|
1035
982
|
keep: () => [
|
|
1036
|
-
Math.max(0,
|
|
983
|
+
Math.max(0, he),
|
|
1037
984
|
W - 1,
|
|
1038
985
|
W,
|
|
1039
986
|
W + 1
|
|
1040
987
|
],
|
|
1041
|
-
onEnd:
|
|
988
|
+
onEnd: T
|
|
1042
989
|
});
|
|
1043
|
-
|
|
1044
|
-
|
|
990
|
+
j(() => {
|
|
991
|
+
x !== void 0 && e.length === 0 && T?.();
|
|
1045
992
|
}, [
|
|
1046
|
-
|
|
993
|
+
x,
|
|
1047
994
|
e.length,
|
|
1048
|
-
|
|
995
|
+
T
|
|
1049
996
|
]);
|
|
1050
997
|
function xe(e) {
|
|
1051
998
|
return oe.current?.querySelector(`[data-row-id="${CSS.escape(e)}"] [data-row-action]`) ?? null;
|
|
1052
999
|
}
|
|
1053
|
-
let
|
|
1000
|
+
let Ce = P(() => o === void 0 ? [] : M.filter((e) => e.canSort === !0).map(({ id: e, label: t }) => ({
|
|
1054
1001
|
id: e,
|
|
1055
1002
|
label: t
|
|
1056
|
-
})), [
|
|
1057
|
-
status:
|
|
1003
|
+
})), [M, o]), we = P(() => s === void 0 ? null : Array.from(s), [s]), Te = {
|
|
1004
|
+
status: O,
|
|
1058
1005
|
sort: a ?? null,
|
|
1059
1006
|
onSortChange: o === void 0 ? void 0 : (e, t) => o(e ?? void 0, t),
|
|
1060
|
-
sortable:
|
|
1061
|
-
selected:
|
|
1062
|
-
onSelectedChange:
|
|
1063
|
-
pagination:
|
|
1007
|
+
sortable: Ce,
|
|
1008
|
+
selected: we,
|
|
1009
|
+
onSelectedChange: c === void 0 ? void 0 : (e, t) => c(new Set(e), t),
|
|
1010
|
+
pagination: D,
|
|
1064
1011
|
rowIds: U,
|
|
1065
1012
|
rowLabel: (t) => {
|
|
1066
1013
|
let n = e[t];
|
|
1067
|
-
return n === void 0 ? void 0 :
|
|
1014
|
+
return n === void 0 ? void 0 : u?.label?.(n) ?? l?.(n);
|
|
1068
1015
|
},
|
|
1069
|
-
isActionable:
|
|
1016
|
+
isActionable: ye,
|
|
1070
1017
|
reveal: (e) => {
|
|
1071
|
-
|
|
1018
|
+
x !== void 0 && K.scrollToIndex(e);
|
|
1072
1019
|
},
|
|
1073
1020
|
onOpen: (e) => {
|
|
1074
1021
|
let t = U[e], n = t === void 0 ? null : xe(t);
|
|
1075
|
-
n === null ? (
|
|
1022
|
+
n === null ? (me.current = t, K.scrollToIndex(e)) : n.click();
|
|
1076
1023
|
},
|
|
1077
|
-
isPlaceholder:
|
|
1024
|
+
isPlaceholder: k
|
|
1078
1025
|
};
|
|
1079
|
-
|
|
1080
|
-
let e =
|
|
1081
|
-
e !== void 0 && (
|
|
1026
|
+
N(() => {
|
|
1027
|
+
let e = me.current;
|
|
1028
|
+
e !== void 0 && (me.current = void 0, xe(e)?.click());
|
|
1082
1029
|
});
|
|
1083
|
-
let
|
|
1030
|
+
let Ee = x === void 0 ? ie.getRowModel().rows.map((e, t) => ({
|
|
1084
1031
|
row: e,
|
|
1085
1032
|
index: t,
|
|
1086
1033
|
spacerHeight: 0
|
|
1087
1034
|
})) : K.items.flatMap((e, t, n) => {
|
|
1088
|
-
let r =
|
|
1035
|
+
let r = ie.getRowModel().rows[e.index], i = n[t - 1];
|
|
1089
1036
|
if (r === void 0) return [];
|
|
1090
1037
|
let a = i === void 0 ? 0 : i.start + i.size;
|
|
1091
1038
|
return [{
|
|
@@ -1093,144 +1040,144 @@ function lt({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, o
|
|
|
1093
1040
|
index: e.index,
|
|
1094
1041
|
spacerHeight: e.start - a
|
|
1095
1042
|
}];
|
|
1096
|
-
}),
|
|
1097
|
-
|
|
1098
|
-
let
|
|
1099
|
-
function
|
|
1100
|
-
return /* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
ref:
|
|
1043
|
+
}), De = Ee.some(({ row: e }) => e.id === fe) ? fe : void 0;
|
|
1044
|
+
fe !== void 0 && De === void 0 && H(void 0), pt(De ?? ge, p);
|
|
1045
|
+
let Oe = M.filter((e) => !ne || e.isSecondary !== !0).length + +!!A, ke = A ? 76 : 0, Ae = E != null && typeof E != "boolean" || D !== void 0, { minimumWidth: je, compactWidth: Me } = Ge(M, ke), q = K.items.at(-1), Ne = K.size - (q === void 0 ? 0 : q.start + q.size), Pe = s === void 0 ? 0 : U.filter((e) => s.has(e)).length, Ie = U.length > 0 && Pe === U.length, Le = Pe > 0 && !Ie;
|
|
1046
|
+
function Re(t) {
|
|
1047
|
+
return /* @__PURE__ */ B(ce, { children: [
|
|
1048
|
+
/* @__PURE__ */ z("caption", {
|
|
1049
|
+
ref: R,
|
|
1103
1050
|
"aria-label": r,
|
|
1104
|
-
...
|
|
1051
|
+
...S.props(J.caption, m && _.hidden),
|
|
1105
1052
|
children: r
|
|
1106
1053
|
}),
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
columns:
|
|
1109
|
-
canSelect:
|
|
1054
|
+
/* @__PURE__ */ z(Je, {
|
|
1055
|
+
columns: M,
|
|
1056
|
+
canSelect: A
|
|
1110
1057
|
}),
|
|
1111
|
-
/* @__PURE__ */
|
|
1112
|
-
ref:
|
|
1113
|
-
...
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ z("thead", {
|
|
1059
|
+
ref: se,
|
|
1060
|
+
...S.props(h && _.hidden),
|
|
1061
|
+
children: /* @__PURE__ */ B("tr", { children: [A && /* @__PURE__ */ z("th", {
|
|
1115
1062
|
scope: "col",
|
|
1116
1063
|
"aria-label": "Select",
|
|
1117
|
-
...
|
|
1118
|
-
children: /* @__PURE__ */
|
|
1064
|
+
...S.props(J.header, J.selection, J.rowControl),
|
|
1065
|
+
children: !k && /* @__PURE__ */ z(g.Root, {
|
|
1119
1066
|
"aria-label": `Select every row of ${r}`,
|
|
1120
|
-
checked:
|
|
1121
|
-
indeterminate:
|
|
1067
|
+
checked: Ie,
|
|
1068
|
+
indeterminate: Le,
|
|
1122
1069
|
disabled: U.length === 0,
|
|
1123
1070
|
onCheckedChange: (e, n) => t.toggleAll(n.event),
|
|
1124
|
-
children: /* @__PURE__ */
|
|
1071
|
+
children: /* @__PURE__ */ z(g.Indicator, {})
|
|
1125
1072
|
})
|
|
1126
|
-
}),
|
|
1127
|
-
let n = a?.columnId === e.id ? a.direction : void 0, i =
|
|
1128
|
-
return /* @__PURE__ */
|
|
1073
|
+
}), M.map((e) => {
|
|
1074
|
+
let n = a?.columnId === e.id ? a.direction : void 0, i = ft[n ?? "none"];
|
|
1075
|
+
return /* @__PURE__ */ z("th", {
|
|
1129
1076
|
scope: "col",
|
|
1130
1077
|
title: e.label,
|
|
1131
1078
|
"aria-sort": n,
|
|
1132
|
-
...
|
|
1133
|
-
children: e.canSort === !0 && o !== void 0 ? /* @__PURE__ */
|
|
1079
|
+
...S.props(J.header, Ve[e.role], e.width !== void 0 && J.width(e.width), e.isSecondary === !0 && J.secondary),
|
|
1080
|
+
children: e.canSort === !0 && o !== void 0 ? /* @__PURE__ */ B(C, {
|
|
1134
1081
|
type: "button",
|
|
1135
1082
|
"aria-label": `Sort ${r} by ${e.label}`,
|
|
1136
|
-
...
|
|
1083
|
+
...S.props(J.sort),
|
|
1137
1084
|
onClick: (n) => t.toggleSort(e.id, n.nativeEvent),
|
|
1138
|
-
children: [/* @__PURE__ */
|
|
1139
|
-
...
|
|
1085
|
+
children: [/* @__PURE__ */ z("span", {
|
|
1086
|
+
...S.props(J.headerLabel),
|
|
1140
1087
|
children: e.label
|
|
1141
|
-
}), /* @__PURE__ */
|
|
1088
|
+
}), /* @__PURE__ */ z(i, {
|
|
1142
1089
|
size: 14,
|
|
1143
1090
|
"aria-hidden": "true",
|
|
1144
|
-
...
|
|
1091
|
+
...S.props(J.sortIcon)
|
|
1145
1092
|
})]
|
|
1146
|
-
}) : /* @__PURE__ */
|
|
1147
|
-
...
|
|
1093
|
+
}) : /* @__PURE__ */ z("span", {
|
|
1094
|
+
...S.props(J.headerLabel),
|
|
1148
1095
|
children: e.label
|
|
1149
1096
|
})
|
|
1150
1097
|
}, e.id);
|
|
1151
1098
|
})] })
|
|
1152
1099
|
}),
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
onPointerLeave: () =>
|
|
1155
|
-
onKeyDownCapture: () =>
|
|
1100
|
+
/* @__PURE__ */ B("tbody", {
|
|
1101
|
+
onPointerLeave: () => H(void 0),
|
|
1102
|
+
onKeyDownCapture: () => H(void 0),
|
|
1156
1103
|
onBlur: (e) => {
|
|
1157
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
1104
|
+
e.currentTarget.contains(e.relatedTarget) || de((e) => e === void 0 ? void 0 : {
|
|
1158
1105
|
id: e.id,
|
|
1159
1106
|
isWithin: !1
|
|
1160
1107
|
});
|
|
1161
1108
|
},
|
|
1162
1109
|
children: [
|
|
1163
|
-
|
|
1110
|
+
Ee.map(({ row: e, index: n, spacerHeight: r }) => /* @__PURE__ */ B(ee, { children: [r > 0 && /* @__PURE__ */ z("tr", {
|
|
1164
1111
|
"aria-hidden": "true",
|
|
1165
|
-
children: /* @__PURE__ */
|
|
1166
|
-
colSpan:
|
|
1167
|
-
...
|
|
1112
|
+
children: /* @__PURE__ */ z("td", {
|
|
1113
|
+
colSpan: Oe,
|
|
1114
|
+
...S.props(J.spacer(r))
|
|
1168
1115
|
})
|
|
1169
|
-
}), /* @__PURE__ */
|
|
1116
|
+
}), /* @__PURE__ */ B("tr", {
|
|
1170
1117
|
"data-index": n,
|
|
1171
1118
|
"data-row-id": e.id,
|
|
1172
|
-
"aria-rowindex":
|
|
1173
|
-
ref:
|
|
1119
|
+
"aria-rowindex": x === void 0 ? void 0 : n + 2,
|
|
1120
|
+
ref: x === void 0 || y === "fixed" ? void 0 : K.measure(n),
|
|
1174
1121
|
onPointerMove: (t) => {
|
|
1175
|
-
t.pointerType === "mouse" &&
|
|
1122
|
+
t.pointerType === "mouse" && H(e.id);
|
|
1176
1123
|
},
|
|
1177
1124
|
onPointerEnter: (t) => {
|
|
1178
|
-
t.pointerType === "mouse" &&
|
|
1125
|
+
t.pointerType === "mouse" && H(e.id);
|
|
1179
1126
|
},
|
|
1180
1127
|
onPointerLeave: () => {
|
|
1181
|
-
|
|
1128
|
+
H((t) => t === e.id ? void 0 : t);
|
|
1182
1129
|
},
|
|
1183
1130
|
onPointerDown: (e) => {
|
|
1184
|
-
e.pointerType !== "mouse" &&
|
|
1131
|
+
e.pointerType !== "mouse" && H(void 0);
|
|
1185
1132
|
},
|
|
1186
1133
|
onFocus: () => {
|
|
1187
|
-
|
|
1134
|
+
H(void 0), de({
|
|
1188
1135
|
id: e.id,
|
|
1189
1136
|
isWithin: !0
|
|
1190
1137
|
});
|
|
1191
1138
|
},
|
|
1192
|
-
...
|
|
1193
|
-
children: [
|
|
1194
|
-
...
|
|
1195
|
-
children: /* @__PURE__ */
|
|
1196
|
-
"aria-label":
|
|
1197
|
-
checked:
|
|
1139
|
+
...S.props(J.row, ye && J.actionable, (s?.has(e.id) === !0 || d === e.id) && J.selected),
|
|
1140
|
+
children: [A && /* @__PURE__ */ z("td", {
|
|
1141
|
+
...S.props(J.cell, J.selection, J.rowControl),
|
|
1142
|
+
children: s !== void 0 && /* @__PURE__ */ z(g.Root, {
|
|
1143
|
+
"aria-label": l(e.original),
|
|
1144
|
+
checked: s.has(e.id),
|
|
1198
1145
|
onCheckedChange: (n, r) => t.toggleRow(e.id, r.event),
|
|
1199
|
-
children: /* @__PURE__ */
|
|
1146
|
+
children: /* @__PURE__ */ z(g.Indicator, {})
|
|
1200
1147
|
})
|
|
1201
|
-
}),
|
|
1202
|
-
let i = /* @__PURE__ */
|
|
1148
|
+
}), M.map((t, r) => {
|
|
1149
|
+
let i = /* @__PURE__ */ z(Ye, {
|
|
1203
1150
|
role: t.role,
|
|
1204
1151
|
isFixed: y === "fixed",
|
|
1205
1152
|
shouldTruncate: t.shouldTruncate,
|
|
1206
1153
|
children: t.cell(e.original)
|
|
1207
1154
|
});
|
|
1208
|
-
return /* @__PURE__ */
|
|
1209
|
-
"data-record-label": r ===
|
|
1210
|
-
...
|
|
1211
|
-
children:
|
|
1155
|
+
return /* @__PURE__ */ z("td", {
|
|
1156
|
+
"data-record-label": r === ve || void 0,
|
|
1157
|
+
...S.props(J.cell, Be[y], Ve[t.role], t.width !== void 0 && J.width(t.width), t.isSecondary === !0 && J.secondary),
|
|
1158
|
+
children: u !== void 0 && r === ve ? /* @__PURE__ */ z(st, {
|
|
1212
1159
|
index: n,
|
|
1213
1160
|
recordId: e.id,
|
|
1214
1161
|
row: e.original,
|
|
1215
|
-
action:
|
|
1216
|
-
isActive:
|
|
1162
|
+
action: u,
|
|
1163
|
+
isActive: d === e.id,
|
|
1217
1164
|
children: i
|
|
1218
1165
|
}) : i
|
|
1219
1166
|
}, t.id);
|
|
1220
1167
|
})]
|
|
1221
1168
|
})] }, e.id)),
|
|
1222
|
-
|
|
1169
|
+
x !== void 0 && Ne > 0 && /* @__PURE__ */ z("tr", {
|
|
1223
1170
|
"aria-hidden": "true",
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1225
|
-
colSpan:
|
|
1226
|
-
...
|
|
1171
|
+
children: /* @__PURE__ */ z("td", {
|
|
1172
|
+
colSpan: Oe,
|
|
1173
|
+
...S.props(J.spacer(Ne))
|
|
1227
1174
|
})
|
|
1228
1175
|
}),
|
|
1229
|
-
e.length === 0 && /* @__PURE__ */
|
|
1230
|
-
colSpan:
|
|
1231
|
-
...
|
|
1232
|
-
children: /* @__PURE__ */
|
|
1233
|
-
...
|
|
1176
|
+
e.length === 0 && /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", {
|
|
1177
|
+
colSpan: Oe,
|
|
1178
|
+
...S.props(J.emptyCell),
|
|
1179
|
+
children: /* @__PURE__ */ z("div", {
|
|
1180
|
+
...S.props(J.empty),
|
|
1234
1181
|
children: i
|
|
1235
1182
|
})
|
|
1236
1183
|
}) })
|
|
@@ -1238,88 +1185,88 @@ function lt({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, o
|
|
|
1238
1185
|
})
|
|
1239
1186
|
] });
|
|
1240
1187
|
}
|
|
1241
|
-
let { api:
|
|
1188
|
+
let { api: ze, element: Y } = rt(Te, (t) => ({
|
|
1242
1189
|
"aria-label": r,
|
|
1243
|
-
"aria-busy":
|
|
1244
|
-
"aria-rowcount":
|
|
1245
|
-
...
|
|
1246
|
-
children:
|
|
1190
|
+
"aria-busy": O === "pending" || void 0,
|
|
1191
|
+
"aria-rowcount": x === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
1192
|
+
...S.props(J.table, J.fixed, J.minimumWidth(je, Me)),
|
|
1193
|
+
children: Re(t)
|
|
1247
1194
|
}));
|
|
1248
|
-
return
|
|
1249
|
-
if (
|
|
1250
|
-
|
|
1195
|
+
return N(() => {
|
|
1196
|
+
if (f === void 0) {
|
|
1197
|
+
pe.current = void 0;
|
|
1251
1198
|
return;
|
|
1252
1199
|
}
|
|
1253
|
-
let e = U.indexOf(
|
|
1254
|
-
if (
|
|
1200
|
+
let e = U.indexOf(f);
|
|
1201
|
+
if (pe.current === f || e === -1) return;
|
|
1255
1202
|
let t = requestAnimationFrame(() => {
|
|
1256
|
-
|
|
1203
|
+
ze.focusRow(e) && (pe.current = f);
|
|
1257
1204
|
});
|
|
1258
1205
|
return () => cancelAnimationFrame(t);
|
|
1259
1206
|
}, [
|
|
1260
1207
|
U,
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
]), /* @__PURE__ */
|
|
1265
|
-
...
|
|
1266
|
-
children: [/* @__PURE__ */
|
|
1267
|
-
ref:
|
|
1208
|
+
f,
|
|
1209
|
+
ye,
|
|
1210
|
+
ze
|
|
1211
|
+
]), /* @__PURE__ */ B("div", {
|
|
1212
|
+
...S.props(J.frame, He[G]),
|
|
1213
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1214
|
+
ref: ae.ref,
|
|
1268
1215
|
"data-table-viewport": !0,
|
|
1269
1216
|
role: "region",
|
|
1270
1217
|
"aria-label": r,
|
|
1271
|
-
tabIndex:
|
|
1272
|
-
...
|
|
1218
|
+
tabIndex: ae.tabIndex,
|
|
1219
|
+
...S.props(J.viewport, Ue[G], typeof x?.height == "number" && J.virtual(x.height)),
|
|
1273
1220
|
children: [
|
|
1274
|
-
|
|
1275
|
-
|
|
1221
|
+
Y,
|
|
1222
|
+
x !== void 0 && /* @__PURE__ */ z("div", {
|
|
1276
1223
|
"aria-hidden": !0,
|
|
1277
|
-
...
|
|
1224
|
+
...S.props(J.sizer(le + K.size))
|
|
1278
1225
|
}),
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
ref:
|
|
1281
|
-
...
|
|
1282
|
-
children:
|
|
1226
|
+
/* @__PURE__ */ z("div", {
|
|
1227
|
+
ref: L,
|
|
1228
|
+
...S.props(w !== void 0 && J.endContent),
|
|
1229
|
+
children: w
|
|
1283
1230
|
})
|
|
1284
1231
|
]
|
|
1285
|
-
}),
|
|
1286
|
-
...
|
|
1287
|
-
children: [
|
|
1288
|
-
...
|
|
1232
|
+
}), Ae && /* @__PURE__ */ B("div", {
|
|
1233
|
+
...S.props(J.footer),
|
|
1234
|
+
children: [E, D !== void 0 && /* @__PURE__ */ z(Fe, {
|
|
1235
|
+
...D,
|
|
1289
1236
|
label: r
|
|
1290
1237
|
})]
|
|
1291
1238
|
})]
|
|
1292
1239
|
});
|
|
1293
1240
|
}
|
|
1294
1241
|
// packages/collections/src/table-query.tsx
|
|
1295
|
-
var
|
|
1242
|
+
var mt = k(void 0);
|
|
1296
1243
|
function Z(e) {
|
|
1297
1244
|
if (e.reason.trim().length === 0) throw Error("A table query exception requires a reason.");
|
|
1298
1245
|
}
|
|
1299
|
-
function
|
|
1300
|
-
return e === void 0 ? /* @__PURE__ */
|
|
1246
|
+
function ht({ search: e, filters: t, children: n, isFiltered: r = !1 }) {
|
|
1247
|
+
return e === void 0 ? /* @__PURE__ */ z(mt, {
|
|
1301
1248
|
value: void 0,
|
|
1302
1249
|
children: n
|
|
1303
|
-
}) : (e !== !0 && Z(e), t !== !0 && Z(t), /* @__PURE__ */
|
|
1250
|
+
}) : (e !== !0 && Z(e), t !== !0 && Z(t), /* @__PURE__ */ z(mt, {
|
|
1304
1251
|
value: r,
|
|
1305
1252
|
children: n
|
|
1306
1253
|
}));
|
|
1307
1254
|
}
|
|
1308
|
-
function
|
|
1255
|
+
function gt(e) {
|
|
1309
1256
|
if ("reason" in e) Z(e);
|
|
1310
1257
|
else {
|
|
1311
1258
|
if (e.length === 0) throw Error("Supply filter dimensions or explain why the table has none.");
|
|
1312
1259
|
if (new Set(e.map((e) => e.id)).size !== e.length) throw Error("Each table filter must have a unique ID.");
|
|
1313
1260
|
}
|
|
1314
1261
|
}
|
|
1315
|
-
var
|
|
1316
|
-
function
|
|
1317
|
-
let [n, r] =
|
|
1318
|
-
typeof t.search != "function" && Z(t.search),
|
|
1319
|
-
let s = "reason" in t.filters ?
|
|
1262
|
+
var _t = [];
|
|
1263
|
+
function vt(e, t) {
|
|
1264
|
+
let [n, r] = I(""), [i, a] = I(/* @__PURE__ */ new Map()), o = typeof t.search == "function" ? t.search : void 0;
|
|
1265
|
+
typeof t.search != "function" && Z(t.search), gt(t.filters);
|
|
1266
|
+
let s = "reason" in t.filters ? _t : t.filters, c = o === void 0 ? void 0 : {
|
|
1320
1267
|
value: n,
|
|
1321
1268
|
onChange: r
|
|
1322
|
-
}, l = n.trim().toLowerCase(), u =
|
|
1269
|
+
}, l = n.trim().toLowerCase(), u = P(() => s.map((t) => {
|
|
1323
1270
|
let n = new Set(e.map(t.value)), r = i.get(t.id);
|
|
1324
1271
|
r !== void 0 && n.add(r);
|
|
1325
1272
|
let o = Array.from(n, (e) => ({
|
|
@@ -1354,22 +1301,23 @@ function mt(e, t) {
|
|
|
1354
1301
|
isFiltered: d || f
|
|
1355
1302
|
};
|
|
1356
1303
|
}
|
|
1357
|
-
function
|
|
1358
|
-
let e =
|
|
1304
|
+
function yt() {
|
|
1305
|
+
let e = A(mt);
|
|
1359
1306
|
if (e === void 0) throw Error("A frame-owned table requires its enclosing collection to supply TableQueryFrame.");
|
|
1360
1307
|
return e;
|
|
1361
1308
|
}
|
|
1362
|
-
function
|
|
1363
|
-
"reason" in e.search && Z(e.search),
|
|
1364
|
-
let t = "reason" in e.search ? void 0 : e.search, n = "reason" in e.filters ? [] : e.filters;
|
|
1309
|
+
function bt(e) {
|
|
1310
|
+
"reason" in e.search && Z(e.search), gt(e.filters);
|
|
1311
|
+
let t = "reason" in e.search ? void 0 : e.search, n = "reason" in e.filters ? [] : e.filters, r = (e.chips?.length ?? 0) > 0;
|
|
1365
1312
|
return {
|
|
1366
1313
|
search: t,
|
|
1367
1314
|
filters: n,
|
|
1368
|
-
|
|
1315
|
+
...e.chips !== void 0 && { chips: e.chips },
|
|
1316
|
+
isFiltered: !!t?.value.trim() || n.some((e) => e.value !== e.defaultValue) || r
|
|
1369
1317
|
};
|
|
1370
1318
|
}
|
|
1371
1319
|
// packages/collections/src/collection-filters.tsx
|
|
1372
|
-
var
|
|
1320
|
+
var xt = {
|
|
1373
1321
|
search: {
|
|
1374
1322
|
kzqmXN: "xh8yej3",
|
|
1375
1323
|
k1K539: "x1kk91vl",
|
|
@@ -1392,12 +1340,12 @@ var Q = {
|
|
|
1392
1340
|
kMwMTN: "xr5kp14",
|
|
1393
1341
|
$$css: !0
|
|
1394
1342
|
}
|
|
1395
|
-
},
|
|
1396
|
-
positive:
|
|
1397
|
-
negative:
|
|
1398
|
-
warning:
|
|
1343
|
+
}, St = {
|
|
1344
|
+
positive: xt.positive,
|
|
1345
|
+
negative: xt.negative,
|
|
1346
|
+
warning: xt.warning,
|
|
1399
1347
|
neutral: void 0
|
|
1400
|
-
},
|
|
1348
|
+
}, Ct = /* @__PURE__ */ new Set([
|
|
1401
1349
|
"Home",
|
|
1402
1350
|
"End",
|
|
1403
1351
|
"ArrowLeft",
|
|
@@ -1405,49 +1353,49 @@ var Q = {
|
|
|
1405
1353
|
"Backspace",
|
|
1406
1354
|
"Delete"
|
|
1407
1355
|
]);
|
|
1408
|
-
function
|
|
1409
|
-
return /* @__PURE__ */
|
|
1410
|
-
...
|
|
1411
|
-
children: e.icon ?? /* @__PURE__ */
|
|
1356
|
+
function wt({ option: e }) {
|
|
1357
|
+
return /* @__PURE__ */ z("span", {
|
|
1358
|
+
...S.props(xt.icon, St[e.tone ?? "neutral"]),
|
|
1359
|
+
children: e.icon ?? /* @__PURE__ */ z(me, {
|
|
1412
1360
|
size: 14,
|
|
1413
1361
|
"aria-hidden": !0
|
|
1414
1362
|
})
|
|
1415
1363
|
});
|
|
1416
1364
|
}
|
|
1417
|
-
function
|
|
1418
|
-
let [n, i] =
|
|
1365
|
+
function Tt({ groups: e }) {
|
|
1366
|
+
let [n, i] = I(""), a = e.filter((e) => e.label.toLowerCase().includes(n.toLowerCase())), o = e.length === 1 && e[0] !== void 0 ? `Filter by ${e[0].label.toLowerCase()}` : "Filters", s = je(/* @__PURE__ */ z(t, {
|
|
1419
1367
|
"aria-label": o,
|
|
1420
1368
|
title: "Filters"
|
|
1421
1369
|
}));
|
|
1422
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ B(p.Root, {
|
|
1423
1371
|
onOpenChange: (e) => {
|
|
1424
1372
|
e || i("");
|
|
1425
1373
|
},
|
|
1426
|
-
children: [/* @__PURE__ */
|
|
1374
|
+
children: [/* @__PURE__ */ z(p.Trigger, {
|
|
1427
1375
|
render: s,
|
|
1428
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ z(U, {
|
|
1429
1377
|
size: 14,
|
|
1430
1378
|
"aria-hidden": !0
|
|
1431
1379
|
})
|
|
1432
|
-
}), /* @__PURE__ */
|
|
1380
|
+
}), /* @__PURE__ */ B(p.Popup, {
|
|
1433
1381
|
align: "end",
|
|
1434
1382
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ z(Et, {
|
|
1436
1384
|
label: "Find a filter",
|
|
1437
1385
|
value: n,
|
|
1438
1386
|
onChange: i
|
|
1439
1387
|
}),
|
|
1440
|
-
a.map((e) => /* @__PURE__ */
|
|
1441
|
-
a.length === 0 && /* @__PURE__ */
|
|
1388
|
+
a.map((e) => /* @__PURE__ */ z(Dt, { group: e }, e.id)),
|
|
1389
|
+
a.length === 0 && /* @__PURE__ */ z("div", {
|
|
1442
1390
|
className: "x1hmw7ec x5g2kb4",
|
|
1443
|
-
children: /* @__PURE__ */
|
|
1391
|
+
children: /* @__PURE__ */ z(r, { children: "No filters found" })
|
|
1444
1392
|
})
|
|
1445
1393
|
]
|
|
1446
1394
|
})]
|
|
1447
1395
|
});
|
|
1448
1396
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return /* @__PURE__ */
|
|
1397
|
+
function Et({ label: e, value: t, onChange: n }) {
|
|
1398
|
+
return /* @__PURE__ */ z(x, {
|
|
1451
1399
|
type: "search",
|
|
1452
1400
|
"aria-label": e,
|
|
1453
1401
|
placeholder: "Filter…",
|
|
@@ -1455,65 +1403,65 @@ function xt({ label: e, value: t, onChange: n }) {
|
|
|
1455
1403
|
value: t,
|
|
1456
1404
|
onValueChange: n,
|
|
1457
1405
|
onKeyDown: (e) => {
|
|
1458
|
-
(e.key.length === 1 ||
|
|
1406
|
+
(e.key.length === 1 || Ct.has(e.key)) && e.stopPropagation();
|
|
1459
1407
|
},
|
|
1460
|
-
xstyle:
|
|
1408
|
+
xstyle: xt.search
|
|
1461
1409
|
});
|
|
1462
1410
|
}
|
|
1463
|
-
function
|
|
1464
|
-
let [t, n] =
|
|
1465
|
-
return /* @__PURE__ */
|
|
1411
|
+
function Dt({ group: e }) {
|
|
1412
|
+
let [t, n] = I(""), i = e.options.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()));
|
|
1413
|
+
return /* @__PURE__ */ B(p.SubmenuRoot, {
|
|
1466
1414
|
onOpenChange: (e) => {
|
|
1467
1415
|
e || n("");
|
|
1468
1416
|
},
|
|
1469
|
-
children: [/* @__PURE__ */
|
|
1470
|
-
e.icon ?? /* @__PURE__ */
|
|
1417
|
+
children: [/* @__PURE__ */ B(p.SubmenuTrigger, { children: [
|
|
1418
|
+
e.icon ?? /* @__PURE__ */ z(U, {
|
|
1471
1419
|
size: 14,
|
|
1472
1420
|
"aria-hidden": !0
|
|
1473
1421
|
}),
|
|
1474
|
-
/* @__PURE__ */
|
|
1422
|
+
/* @__PURE__ */ z("span", {
|
|
1475
1423
|
className: "x98rzlu xeuugli xj0a0fe",
|
|
1476
1424
|
children: e.label
|
|
1477
1425
|
}),
|
|
1478
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ z("span", {
|
|
1479
1427
|
className: "xazcve0 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
|
|
1480
1428
|
children: e.options.find((t) => t.value === e.value)?.label
|
|
1481
1429
|
}),
|
|
1482
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ z(H, {
|
|
1483
1431
|
size: 14,
|
|
1484
1432
|
"aria-hidden": !0
|
|
1485
1433
|
})
|
|
1486
|
-
] }), /* @__PURE__ */
|
|
1434
|
+
] }), /* @__PURE__ */ B(p.Popup, {
|
|
1487
1435
|
align: "start",
|
|
1488
1436
|
"aria-label": e.label,
|
|
1489
1437
|
children: [
|
|
1490
|
-
/* @__PURE__ */
|
|
1438
|
+
/* @__PURE__ */ z(Et, {
|
|
1491
1439
|
label: `Find ${e.label.toLowerCase()}`,
|
|
1492
1440
|
value: t,
|
|
1493
1441
|
onChange: n
|
|
1494
1442
|
}),
|
|
1495
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ z(p.RadioGroup, {
|
|
1496
1444
|
value: e.value,
|
|
1497
1445
|
onValueChange: e.onChange,
|
|
1498
|
-
children: i.map((e) => /* @__PURE__ */
|
|
1446
|
+
children: i.map((e) => /* @__PURE__ */ B(p.RadioItem, {
|
|
1499
1447
|
value: e.value,
|
|
1500
1448
|
closeOnSelect: !0,
|
|
1501
|
-
children: [/* @__PURE__ */
|
|
1449
|
+
children: [/* @__PURE__ */ z(wt, { option: e }), /* @__PURE__ */ z("span", {
|
|
1502
1450
|
className: "x98rzlu xeuugli xj0a0fe",
|
|
1503
1451
|
children: e.label
|
|
1504
1452
|
})]
|
|
1505
1453
|
}, e.value))
|
|
1506
1454
|
}),
|
|
1507
|
-
i.length === 0 && /* @__PURE__ */
|
|
1455
|
+
i.length === 0 && /* @__PURE__ */ z("div", {
|
|
1508
1456
|
className: "x1hmw7ec x5g2kb4",
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1457
|
+
children: /* @__PURE__ */ z(r, { children: "No options found" })
|
|
1510
1458
|
})
|
|
1511
1459
|
]
|
|
1512
1460
|
})]
|
|
1513
1461
|
});
|
|
1514
1462
|
}
|
|
1515
1463
|
// packages/collections/src/query-controls.tsx
|
|
1516
|
-
function
|
|
1464
|
+
function Ot(e) {
|
|
1517
1465
|
return {
|
|
1518
1466
|
value: e.search?.value ?? "",
|
|
1519
1467
|
filters: e.selections,
|
|
@@ -1521,7 +1469,7 @@ function Ct(e) {
|
|
|
1521
1469
|
available: e.search !== void 0 || e.groups.length > 0
|
|
1522
1470
|
};
|
|
1523
1471
|
}
|
|
1524
|
-
function
|
|
1472
|
+
function kt(e) {
|
|
1525
1473
|
let t = JSON.parse(e);
|
|
1526
1474
|
if (Array.isArray(t) && t.length === 2) {
|
|
1527
1475
|
let e = t[0], n = t[1];
|
|
@@ -1529,7 +1477,7 @@ function wt(e) {
|
|
|
1529
1477
|
}
|
|
1530
1478
|
throw Error("Select a listed filter option, or provide a filter ID and value.");
|
|
1531
1479
|
}
|
|
1532
|
-
var
|
|
1480
|
+
var At = L({
|
|
1533
1481
|
name: "collection-query",
|
|
1534
1482
|
options: {
|
|
1535
1483
|
search: "value",
|
|
@@ -1537,29 +1485,29 @@ var Tt = P({
|
|
|
1537
1485
|
selections: "value",
|
|
1538
1486
|
isDisabled: "boolean"
|
|
1539
1487
|
},
|
|
1540
|
-
state:
|
|
1541
|
-
sync:
|
|
1488
|
+
state: Ot,
|
|
1489
|
+
sync: Ot,
|
|
1542
1490
|
controlled: ["value", "filters"],
|
|
1543
1491
|
api: ({ options: e }) => ({
|
|
1544
1492
|
get setQuery() {
|
|
1545
1493
|
let { search: t, isDisabled: n } = e();
|
|
1546
1494
|
return n || t === void 0 ? null : (e) => {
|
|
1547
1495
|
if (typeof e != "string") throw TypeError("The search term must be a string.");
|
|
1548
|
-
|
|
1496
|
+
R({ options: () => t }, "onChange", e, { reason: "imperative" });
|
|
1549
1497
|
};
|
|
1550
1498
|
},
|
|
1551
1499
|
get submitSearch() {
|
|
1552
1500
|
let { search: t, isDisabled: n } = e();
|
|
1553
1501
|
return n || t?.onSubmit === void 0 ? null : () => {
|
|
1554
|
-
|
|
1502
|
+
R({ options: () => t }, "onSubmit", t.value, { reason: "imperative" });
|
|
1555
1503
|
};
|
|
1556
1504
|
},
|
|
1557
1505
|
get setFilter() {
|
|
1558
1506
|
let { groups: t, isDisabled: n } = e();
|
|
1559
1507
|
return n || t.length === 0 ? null : (e, n) => {
|
|
1560
|
-
let [r, i] = n === void 0 ?
|
|
1508
|
+
let [r, i] = n === void 0 ? kt(e) : [e, n], a = t.find((e) => e.id === r);
|
|
1561
1509
|
if (a === void 0 || !a.options.some((e) => e.value === i)) throw Error("Unknown filter or option. Choose one of the listed filter options.");
|
|
1562
|
-
|
|
1510
|
+
R({ options: () => a }, "onChange", i, { reason: "imperative" });
|
|
1563
1511
|
};
|
|
1564
1512
|
},
|
|
1565
1513
|
items() {
|
|
@@ -1579,134 +1527,134 @@ var Tt = P({
|
|
|
1579
1527
|
shown: (e) => e.available && !e.disabled
|
|
1580
1528
|
},
|
|
1581
1529
|
slots: (e) => ({ root: e({}) })
|
|
1582
|
-
}),
|
|
1530
|
+
}), jt = w(At, { root: "div" }).Root, Mt = { input: {
|
|
1583
1531
|
k7Eaqz: "xeuugli",
|
|
1584
1532
|
kUk6DE: "x98rzlu",
|
|
1585
1533
|
$$css: !0
|
|
1586
1534
|
} };
|
|
1587
|
-
function
|
|
1588
|
-
let [
|
|
1589
|
-
|
|
1590
|
-
|
|
1535
|
+
function Nt({ label: e = "Collection controls", search: n, filters: r = [], filterContent: i, chips: a = [], viewActions: o, display: s, isPlaceholder: c = !1, isReady: l }) {
|
|
1536
|
+
let [u, d] = I(null), [f, p] = I(!1), [h, g] = I(!1), _ = F(null), v = F(null), y = F(null), b = P(() => Object.fromEntries(r.map((e) => [e.id, e.value])), [r]), S = c || !l, C = n !== void 0 && (f || n.value.length > 0);
|
|
1537
|
+
N(() => {
|
|
1538
|
+
f && !c && l && (y.current?.focus(), y.current?.select());
|
|
1591
1539
|
}, [
|
|
1592
|
-
|
|
1540
|
+
f,
|
|
1593
1541
|
c,
|
|
1594
|
-
|
|
1542
|
+
l
|
|
1595
1543
|
]);
|
|
1596
|
-
function
|
|
1597
|
-
(
|
|
1544
|
+
function w() {
|
|
1545
|
+
(_.current ?? v.current?.querySelector("button"))?.focus();
|
|
1598
1546
|
}
|
|
1599
|
-
function
|
|
1600
|
-
n !== void 0 && !c &&
|
|
1547
|
+
function T() {
|
|
1548
|
+
n !== void 0 && !c && l && (y.current?.focus(), y.current?.select(), p(!0));
|
|
1601
1549
|
}
|
|
1602
|
-
function
|
|
1603
|
-
n !== void 0 &&
|
|
1550
|
+
function E(e, t) {
|
|
1551
|
+
n !== void 0 && R({ options: () => n }, "onChange", "", {
|
|
1604
1552
|
reason: e,
|
|
1605
1553
|
event: t
|
|
1606
|
-
}),
|
|
1554
|
+
}), p(!1), w();
|
|
1607
1555
|
}
|
|
1608
|
-
function
|
|
1609
|
-
|
|
1556
|
+
function D(e) {
|
|
1557
|
+
C && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), E("escape-key", e.nativeEvent));
|
|
1610
1558
|
}
|
|
1611
|
-
let
|
|
1559
|
+
let ee = {
|
|
1612
1560
|
description: `Find in ${e}`,
|
|
1613
|
-
...
|
|
1561
|
+
...u !== null && { layer: u },
|
|
1614
1562
|
when: () => {
|
|
1615
|
-
if (
|
|
1616
|
-
let e =
|
|
1617
|
-
return e === null || e.closest("[data-native-find], textarea, select, input:not([data-view-find]), [contenteditable=\"true\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]") !== null ? !1 : e.closest("[data-table-query]") ===
|
|
1563
|
+
if (u === null) return !1;
|
|
1564
|
+
let e = u.ownerDocument.activeElement, t = u.ownerDocument.getSelection();
|
|
1565
|
+
return e === null || t?.isCollapsed === !1 || e.closest("[data-native-find], article, pre, code, textarea, select, input:not([data-view-find]), [contenteditable=\"true\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]") !== null ? !1 : e.closest("[data-table-query]") === u || e === u.ownerDocument.body && u.ownerDocument.querySelectorAll("[data-view-find-trigger]").length === 1;
|
|
1618
1566
|
}
|
|
1619
|
-
},
|
|
1620
|
-
|
|
1621
|
-
let
|
|
1567
|
+
}, k = u !== null && n !== void 0 && !S;
|
|
1568
|
+
_e(k ? "/" : null, T, ee), _e(k ? "mod+f" : null, T, ee);
|
|
1569
|
+
let A = r.filter((e) => e.value !== e.defaultValue).map((e) => ({
|
|
1622
1570
|
id: `filter:${e.id}`,
|
|
1623
1571
|
label: e.options.find((t) => t.value === e.value)?.label ?? e.value,
|
|
1624
1572
|
onRemove: (t) => e.onChange(e.defaultValue, t)
|
|
1625
1573
|
}));
|
|
1626
|
-
for (let e of a)
|
|
1574
|
+
for (let e of a) A.push({
|
|
1627
1575
|
...e,
|
|
1628
1576
|
id: `chip:${e.id}`
|
|
1629
1577
|
});
|
|
1630
|
-
let
|
|
1578
|
+
let j = i !== void 0 || r.length > 0, M = O.toArray([o, s]).length > 0, te = n !== void 0 || j || M, ne = n?.label ?? "Search this view", re = n?.placeholder ?? "Find in view…", ie = te ? /* @__PURE__ */ B(Ae, {
|
|
1631
1579
|
"aria-label": e,
|
|
1632
|
-
render: /* @__PURE__ */
|
|
1580
|
+
render: /* @__PURE__ */ z(jt, {
|
|
1633
1581
|
search: n,
|
|
1634
1582
|
groups: r,
|
|
1635
|
-
selections:
|
|
1636
|
-
isDisabled:
|
|
1637
|
-
ref:
|
|
1638
|
-
"aria-hidden":
|
|
1639
|
-
inert:
|
|
1583
|
+
selections: b,
|
|
1584
|
+
isDisabled: S,
|
|
1585
|
+
ref: v,
|
|
1586
|
+
"aria-hidden": S,
|
|
1587
|
+
inert: S,
|
|
1640
1588
|
className: "x78zum5 x6s0dn4 x1a02dak x13a6bvl x1hnptsi xeuugli x193iq5w"
|
|
1641
1589
|
}),
|
|
1642
1590
|
children: [
|
|
1643
|
-
n !== void 0 && /* @__PURE__ */
|
|
1591
|
+
n !== void 0 && /* @__PURE__ */ z(G, {
|
|
1644
1592
|
disabled: c,
|
|
1645
|
-
render: /* @__PURE__ */
|
|
1646
|
-
ref:
|
|
1593
|
+
render: /* @__PURE__ */ z(t, {
|
|
1594
|
+
ref: _,
|
|
1647
1595
|
type: "button",
|
|
1648
1596
|
"aria-label": "Find in view",
|
|
1649
1597
|
title: "Find in view",
|
|
1650
1598
|
"data-view-find-trigger": !0,
|
|
1651
|
-
"aria-expanded":
|
|
1652
|
-
onClick:
|
|
1599
|
+
"aria-expanded": C,
|
|
1600
|
+
onClick: T
|
|
1653
1601
|
}),
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1602
|
+
children: /* @__PURE__ */ z(he, {
|
|
1655
1603
|
size: 14,
|
|
1656
1604
|
"aria-hidden": !0
|
|
1657
1605
|
})
|
|
1658
1606
|
}),
|
|
1659
|
-
|
|
1607
|
+
C && /* @__PURE__ */ B("div", {
|
|
1660
1608
|
className: "x78zum5 x6s0dn4 xunmzkg xdl07me x193iq5w",
|
|
1661
|
-
children: [/* @__PURE__ */
|
|
1609
|
+
children: [/* @__PURE__ */ z(K, {
|
|
1662
1610
|
disabled: c,
|
|
1663
|
-
render: /* @__PURE__ */
|
|
1664
|
-
ref:
|
|
1611
|
+
render: /* @__PURE__ */ z(x, {
|
|
1612
|
+
ref: y,
|
|
1665
1613
|
type: "search",
|
|
1666
1614
|
"data-view-find": !0,
|
|
1667
|
-
"aria-label":
|
|
1668
|
-
placeholder:
|
|
1615
|
+
"aria-label": ne,
|
|
1616
|
+
placeholder: re,
|
|
1669
1617
|
value: n.value,
|
|
1670
1618
|
onValueChange: n.onChange,
|
|
1671
1619
|
onKeyDown: (e) => {
|
|
1672
|
-
e.key === "Enter" && n.onSubmit !== void 0 && (e.preventDefault(),
|
|
1620
|
+
e.key === "Enter" && n.onSubmit !== void 0 && (e.preventDefault(), R({ options: () => n }, "onSubmit", n.value, {
|
|
1673
1621
|
reason: "enter-key",
|
|
1674
1622
|
event: e.nativeEvent
|
|
1675
|
-
})), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(),
|
|
1623
|
+
})), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), E("escape-key", e.nativeEvent));
|
|
1676
1624
|
},
|
|
1677
|
-
xstyle:
|
|
1625
|
+
xstyle: Mt.input
|
|
1678
1626
|
})
|
|
1679
|
-
}), /* @__PURE__ */
|
|
1680
|
-
render: /* @__PURE__ */
|
|
1627
|
+
}), /* @__PURE__ */ z(G, {
|
|
1628
|
+
render: /* @__PURE__ */ z(t, {
|
|
1681
1629
|
type: "button",
|
|
1682
1630
|
variant: "ghost",
|
|
1683
1631
|
"data-view-find-close": !0,
|
|
1684
1632
|
"aria-label": "Close search",
|
|
1685
1633
|
title: "Close search (Esc)",
|
|
1686
|
-
onClick: (e) =>
|
|
1634
|
+
onClick: (e) => E("clear-press", e.nativeEvent)
|
|
1687
1635
|
}),
|
|
1688
|
-
children: /* @__PURE__ */
|
|
1636
|
+
children: /* @__PURE__ */ z(ge, {
|
|
1689
1637
|
size: 14,
|
|
1690
1638
|
"aria-hidden": !0
|
|
1691
1639
|
})
|
|
1692
1640
|
})]
|
|
1693
1641
|
}),
|
|
1694
|
-
i === void 0 ? r.length > 0 ? /* @__PURE__ */
|
|
1695
|
-
open:
|
|
1642
|
+
i === void 0 ? r.length > 0 ? /* @__PURE__ */ z(Tt, { groups: r }) : null : /* @__PURE__ */ B(m.Root, {
|
|
1643
|
+
open: h,
|
|
1696
1644
|
onOpenChange: g,
|
|
1697
|
-
children: [/* @__PURE__ */
|
|
1698
|
-
render: /* @__PURE__ */
|
|
1645
|
+
children: [/* @__PURE__ */ z(m.Trigger, {
|
|
1646
|
+
render: /* @__PURE__ */ z(G, { render: /* @__PURE__ */ z(t, {
|
|
1699
1647
|
"aria-label": "Filters",
|
|
1700
1648
|
title: "Filters"
|
|
1701
1649
|
}) }),
|
|
1702
|
-
children: /* @__PURE__ */
|
|
1650
|
+
children: /* @__PURE__ */ z(U, {
|
|
1703
1651
|
size: 14,
|
|
1704
1652
|
"aria-hidden": !0
|
|
1705
1653
|
})
|
|
1706
|
-
}), /* @__PURE__ */
|
|
1654
|
+
}), /* @__PURE__ */ B(m.Popup, {
|
|
1707
1655
|
align: "end",
|
|
1708
1656
|
className: "x1m258z3 xw7nakj",
|
|
1709
|
-
children: [/* @__PURE__ */
|
|
1657
|
+
children: [/* @__PURE__ */ z(m.Title, { children: "Filters" }), i(() => g(!1))]
|
|
1710
1658
|
})]
|
|
1711
1659
|
}),
|
|
1712
1660
|
o,
|
|
@@ -1715,37 +1663,37 @@ function Ot({ label: e = "Collection controls", search: n, filters: r = [], filt
|
|
|
1715
1663
|
}) : void 0;
|
|
1716
1664
|
return {
|
|
1717
1665
|
findRegion: {
|
|
1718
|
-
ref:
|
|
1666
|
+
ref: d,
|
|
1719
1667
|
"data-table-query": "",
|
|
1720
|
-
onKeyDown:
|
|
1668
|
+
onKeyDown: D
|
|
1721
1669
|
},
|
|
1722
|
-
openSearch:
|
|
1723
|
-
onKeyDown:
|
|
1724
|
-
actions:
|
|
1725
|
-
chips:
|
|
1726
|
-
"aria-hidden":
|
|
1727
|
-
inert:
|
|
1670
|
+
openSearch: T,
|
|
1671
|
+
onKeyDown: D,
|
|
1672
|
+
actions: ie,
|
|
1673
|
+
chips: A.length > 0 && /* @__PURE__ */ z("div", {
|
|
1674
|
+
"aria-hidden": S,
|
|
1675
|
+
inert: S,
|
|
1728
1676
|
className: "xjp7ctv",
|
|
1729
|
-
children: /* @__PURE__ */
|
|
1730
|
-
filters:
|
|
1677
|
+
children: /* @__PURE__ */ z(Ne, {
|
|
1678
|
+
filters: A,
|
|
1731
1679
|
onRemove: (e, t) => {
|
|
1732
|
-
|
|
1680
|
+
w(), A.find((t) => t.id === e)?.onRemove(t);
|
|
1733
1681
|
}
|
|
1734
1682
|
})
|
|
1735
1683
|
})
|
|
1736
1684
|
};
|
|
1737
1685
|
}
|
|
1738
1686
|
// packages/collections/src/data-table.tsx
|
|
1739
|
-
function
|
|
1687
|
+
function Pt({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
|
|
1740
1688
|
let i = typeof r.window?.height == "string" ? r.window.height : "content", a = Array.from({ length: t }, (e, t) => ({ id: String(t) })), o = e.map(({ placeholder: e, ...t }) => ({
|
|
1741
1689
|
...t,
|
|
1742
|
-
cell: () => e ?? /* @__PURE__ */
|
|
1690
|
+
cell: () => e ?? /* @__PURE__ */ z(l, { width: "60%" })
|
|
1743
1691
|
}));
|
|
1744
|
-
return /* @__PURE__ */
|
|
1692
|
+
return /* @__PURE__ */ z("div", {
|
|
1745
1693
|
"aria-hidden": !0,
|
|
1746
1694
|
inert: !0,
|
|
1747
|
-
...
|
|
1748
|
-
children: /* @__PURE__ */
|
|
1695
|
+
...S.props(He[i], J.placeholder),
|
|
1696
|
+
children: /* @__PURE__ */ z(X, {
|
|
1749
1697
|
...r,
|
|
1750
1698
|
hideCaption: n,
|
|
1751
1699
|
isPlaceholder: !0,
|
|
@@ -1756,35 +1704,35 @@ function kt({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
|
|
|
1756
1704
|
})
|
|
1757
1705
|
});
|
|
1758
1706
|
}
|
|
1759
|
-
function
|
|
1707
|
+
function Ft({ query: e, ...t }) {
|
|
1760
1708
|
switch (e.mode) {
|
|
1761
1709
|
case "local":
|
|
1762
1710
|
if (t.onEndReached !== void 0 || t.pagination !== void 0) throw Error("Local table queries require all rows. Use a controlled or frame query for a paged source.");
|
|
1763
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ z(Lt, {
|
|
1764
1712
|
query: e,
|
|
1765
1713
|
table: t
|
|
1766
1714
|
});
|
|
1767
|
-
case "controlled": return /* @__PURE__ */
|
|
1715
|
+
case "controlled": return /* @__PURE__ */ z(Rt, {
|
|
1768
1716
|
table: {
|
|
1769
1717
|
...t,
|
|
1770
1718
|
filteredEmpty: t.filteredEmpty ?? t.empty
|
|
1771
1719
|
},
|
|
1772
|
-
...
|
|
1720
|
+
...bt(e)
|
|
1773
1721
|
});
|
|
1774
|
-
case "frame": return /* @__PURE__ */
|
|
1775
|
-
case "static": return Z(e), /* @__PURE__ */
|
|
1722
|
+
case "frame": return /* @__PURE__ */ z(It, { table: t });
|
|
1723
|
+
case "static": return Z(e), /* @__PURE__ */ z(ht, { children: /* @__PURE__ */ z(X, { ...t }) });
|
|
1776
1724
|
}
|
|
1777
1725
|
}
|
|
1778
|
-
function
|
|
1779
|
-
let t =
|
|
1780
|
-
return /* @__PURE__ */
|
|
1726
|
+
function It({ table: e }) {
|
|
1727
|
+
let t = yt();
|
|
1728
|
+
return /* @__PURE__ */ z(ht, { children: /* @__PURE__ */ z(X, {
|
|
1781
1729
|
...e,
|
|
1782
1730
|
empty: t ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1783
1731
|
}) });
|
|
1784
1732
|
}
|
|
1785
|
-
function
|
|
1786
|
-
let { rows: n, search: r, filters: i, isFiltered: a } =
|
|
1787
|
-
return /* @__PURE__ */
|
|
1733
|
+
function Lt({ query: e, table: t }) {
|
|
1734
|
+
let { rows: n, search: r, filters: i, isFiltered: a } = vt(t.rows, e);
|
|
1735
|
+
return /* @__PURE__ */ z(Rt, {
|
|
1788
1736
|
table: {
|
|
1789
1737
|
...t,
|
|
1790
1738
|
rows: n
|
|
@@ -1794,66 +1742,491 @@ function Mt({ query: e, table: t }) {
|
|
|
1794
1742
|
isFiltered: a
|
|
1795
1743
|
});
|
|
1796
1744
|
}
|
|
1797
|
-
function
|
|
1798
|
-
let
|
|
1745
|
+
function Rt({ table: e, search: t, filters: n, chips: r, isFiltered: i }) {
|
|
1746
|
+
let a = Nt({
|
|
1799
1747
|
...t !== void 0 && { search: t },
|
|
1800
1748
|
filters: n,
|
|
1749
|
+
...r !== void 0 && { chips: r },
|
|
1801
1750
|
isReady: !0,
|
|
1802
1751
|
label: e.caption
|
|
1803
|
-
});
|
|
1804
|
-
return /* @__PURE__ */
|
|
1805
|
-
...
|
|
1806
|
-
...
|
|
1807
|
-
children: [
|
|
1752
|
+
}), o = t !== void 0 || n.length > 0 || a.chips !== !1;
|
|
1753
|
+
return /* @__PURE__ */ z(ht, { children: /* @__PURE__ */ B("div", {
|
|
1754
|
+
...a.findRegion,
|
|
1755
|
+
...S.props(He[typeof e.window?.height == "string" ? e.window.height : "content"]),
|
|
1756
|
+
children: [o && /* @__PURE__ */ z(q, {
|
|
1808
1757
|
label: `${e.caption} controls`,
|
|
1809
|
-
actions:
|
|
1810
|
-
children:
|
|
1811
|
-
}), /* @__PURE__ */
|
|
1758
|
+
actions: a.actions,
|
|
1759
|
+
children: a.chips
|
|
1760
|
+
}), /* @__PURE__ */ z(X, {
|
|
1812
1761
|
...e,
|
|
1813
|
-
empty:
|
|
1762
|
+
empty: i ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1814
1763
|
})]
|
|
1815
1764
|
}) });
|
|
1816
1765
|
}
|
|
1766
|
+
// packages/collections/src/collection-page.tsx
|
|
1767
|
+
var zt = [];
|
|
1768
|
+
function Bt({ navigation: e, ...t }) {
|
|
1769
|
+
return /* @__PURE__ */ z(Ht, {
|
|
1770
|
+
...t,
|
|
1771
|
+
surface: {
|
|
1772
|
+
kind: "page",
|
|
1773
|
+
navigation: e
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
function Vt({ id: e, meta: t, ...n }) {
|
|
1778
|
+
return /* @__PURE__ */ z(Ht, {
|
|
1779
|
+
...n,
|
|
1780
|
+
surface: {
|
|
1781
|
+
kind: "section",
|
|
1782
|
+
id: e,
|
|
1783
|
+
meta: t
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1787
|
+
function Ht(e) {
|
|
1788
|
+
let t = e.read.rows ?? zt;
|
|
1789
|
+
if (e.query.mode === "local") return /* @__PURE__ */ z(Ut, {
|
|
1790
|
+
collection: e,
|
|
1791
|
+
rows: t,
|
|
1792
|
+
query: e.query,
|
|
1793
|
+
surface: e.surface
|
|
1794
|
+
});
|
|
1795
|
+
let n = {
|
|
1796
|
+
...bt(e.query),
|
|
1797
|
+
rows: t
|
|
1798
|
+
};
|
|
1799
|
+
return /* @__PURE__ */ z(Wt, {
|
|
1800
|
+
collection: e,
|
|
1801
|
+
result: n,
|
|
1802
|
+
surface: e.surface
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
function Ut({ collection: e, rows: t, query: n, surface: r }) {
|
|
1806
|
+
let i = vt(t, n);
|
|
1807
|
+
return /* @__PURE__ */ z(Wt, {
|
|
1808
|
+
collection: e,
|
|
1809
|
+
result: i,
|
|
1810
|
+
surface: r
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
function Wt({ collection: e, result: n, surface: r }) {
|
|
1814
|
+
let { title: i, caption: o = i, read: s, actions: c, placeholderRows: l, empty: p, filteredEmpty: h, query: g, window: _, ...v } = e, y = _ ?? (r.kind === "page" ? { height: "fill" } : void 0), b = y === void 0 ? {} : { window: y }, x = s.rows !== void 0, S = x || g.mode === "controlled", C = Nt({
|
|
1815
|
+
label: `${i} controls`,
|
|
1816
|
+
...n.search !== void 0 && { search: n.search },
|
|
1817
|
+
filters: n.filters,
|
|
1818
|
+
...n.chips !== void 0 && { chips: n.chips },
|
|
1819
|
+
isReady: S,
|
|
1820
|
+
isPlaceholder: !S && s.state === "pending"
|
|
1821
|
+
}), w = /* @__PURE__ */ B(ce, { children: [
|
|
1822
|
+
C.actions,
|
|
1823
|
+
c,
|
|
1824
|
+
x && s.state === "failed" && /* @__PURE__ */ B(m.Root, { children: [/* @__PURE__ */ z(m.Trigger, {
|
|
1825
|
+
render: /* @__PURE__ */ z(t, { "aria-label": `Could not refresh ${i}` }),
|
|
1826
|
+
children: /* @__PURE__ */ z(pe, {
|
|
1827
|
+
size: 16,
|
|
1828
|
+
"aria-hidden": !0
|
|
1829
|
+
})
|
|
1830
|
+
}), /* @__PURE__ */ B(m.Popup, {
|
|
1831
|
+
align: "end",
|
|
1832
|
+
children: [/* @__PURE__ */ z(m.Title, { children: "Refresh failed" }), s.failure]
|
|
1833
|
+
})] })
|
|
1834
|
+
] }), T = /* @__PURE__ */ z(Pt, {
|
|
1835
|
+
caption: o,
|
|
1836
|
+
columns: v.columns,
|
|
1837
|
+
hasSelectionColumn: v.selectedIds !== void 0,
|
|
1838
|
+
footer: v.footer,
|
|
1839
|
+
...v.pagination !== void 0 && { pagination: v.pagination },
|
|
1840
|
+
...v.hideHeaders !== void 0 && { hideHeaders: v.hideHeaders },
|
|
1841
|
+
...l !== void 0 && { rows: l },
|
|
1842
|
+
...v.rowSizing !== void 0 && { rowSizing: v.rowSizing },
|
|
1843
|
+
...b
|
|
1844
|
+
}), E = !x && s.state === "pending" ? { state: "pending" } : !x && s.state === "failed" ? {
|
|
1845
|
+
state: "failed",
|
|
1846
|
+
children: s.failure
|
|
1847
|
+
} : {
|
|
1848
|
+
state: "ready",
|
|
1849
|
+
children: /* @__PURE__ */ z(X, {
|
|
1850
|
+
...v,
|
|
1851
|
+
...b,
|
|
1852
|
+
caption: o,
|
|
1853
|
+
hideCaption: !0,
|
|
1854
|
+
rows: n.rows,
|
|
1855
|
+
resultStatus: s.state,
|
|
1856
|
+
empty: n.isFiltered ? h ?? "No matching records." : p
|
|
1857
|
+
})
|
|
1858
|
+
}, D = C.chips !== !1 && /* @__PURE__ */ z(q, {
|
|
1859
|
+
label: "Applied filters",
|
|
1860
|
+
children: C.chips
|
|
1861
|
+
}), O = /* @__PURE__ */ z(u, {
|
|
1862
|
+
label: `Loading ${i}`,
|
|
1863
|
+
placeholder: T,
|
|
1864
|
+
...E
|
|
1865
|
+
});
|
|
1866
|
+
return r.kind === "page" ? /* @__PURE__ */ z("div", {
|
|
1867
|
+
...C.findRegion,
|
|
1868
|
+
className: "x78zum5 xdt5ytf x12lumcd xeuugli x2lwn1j",
|
|
1869
|
+
children: /* @__PURE__ */ z(d, {
|
|
1870
|
+
title: i,
|
|
1871
|
+
actions: w,
|
|
1872
|
+
navigation: r.navigation,
|
|
1873
|
+
children: /* @__PURE__ */ z(f, {
|
|
1874
|
+
header: D,
|
|
1875
|
+
children: O
|
|
1876
|
+
})
|
|
1877
|
+
})
|
|
1878
|
+
}) : /* @__PURE__ */ B("div", {
|
|
1879
|
+
...C.findRegion,
|
|
1880
|
+
className: "xeuugli",
|
|
1881
|
+
children: [
|
|
1882
|
+
/* @__PURE__ */ z(a, {
|
|
1883
|
+
id: r.id,
|
|
1884
|
+
title: i,
|
|
1885
|
+
meta: r.meta,
|
|
1886
|
+
actions: w
|
|
1887
|
+
}),
|
|
1888
|
+
D,
|
|
1889
|
+
O
|
|
1890
|
+
]
|
|
1891
|
+
});
|
|
1892
|
+
}
|
|
1893
|
+
// packages/collections/src/data-table-text.tsx
|
|
1894
|
+
function Gt({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
1895
|
+
let r = O.toArray(t).length > 0;
|
|
1896
|
+
return /* @__PURE__ */ B("span", {
|
|
1897
|
+
"aria-hidden": n || void 0,
|
|
1898
|
+
inert: n || void 0,
|
|
1899
|
+
...S.props(J.textRow),
|
|
1900
|
+
children: [r && /* @__PURE__ */ z("span", {
|
|
1901
|
+
"aria-hidden": !0,
|
|
1902
|
+
...S.props(J.adornment),
|
|
1903
|
+
children: t
|
|
1904
|
+
}), /* @__PURE__ */ z("span", {
|
|
1905
|
+
...S.props(J.textColumn),
|
|
1906
|
+
children: e
|
|
1907
|
+
})]
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
function Kt({ children: e, secondary: t, leading: n, trailing: r, isMono: i = !1 }) {
|
|
1911
|
+
let a = O.toArray(r).length > 0;
|
|
1912
|
+
return /* @__PURE__ */ B(Gt, {
|
|
1913
|
+
leading: n,
|
|
1914
|
+
children: [/* @__PURE__ */ B("span", {
|
|
1915
|
+
...S.props(J.primaryRow),
|
|
1916
|
+
children: [/* @__PURE__ */ z("span", {
|
|
1917
|
+
"data-record-text": !0,
|
|
1918
|
+
title: typeof e == "string" ? e : void 0,
|
|
1919
|
+
...S.props(J.text, J.primaryText, J.truncated, i && J.mono),
|
|
1920
|
+
children: e
|
|
1921
|
+
}), a && /* @__PURE__ */ z("span", {
|
|
1922
|
+
...S.props(J.adornment),
|
|
1923
|
+
children: r
|
|
1924
|
+
})]
|
|
1925
|
+
}), t !== void 0 && /* @__PURE__ */ z("span", {
|
|
1926
|
+
title: t,
|
|
1927
|
+
...S.props(J.text, J.truncated, J.secondaryText),
|
|
1928
|
+
children: t
|
|
1929
|
+
})]
|
|
1930
|
+
});
|
|
1931
|
+
}
|
|
1932
|
+
function qt({ leading: e, isSecondary: t = !1 }) {
|
|
1933
|
+
return /* @__PURE__ */ B(Gt, {
|
|
1934
|
+
leading: e,
|
|
1935
|
+
isDecorative: !0,
|
|
1936
|
+
children: [/* @__PURE__ */ z("span", {
|
|
1937
|
+
...S.props(J.text),
|
|
1938
|
+
children: /* @__PURE__ */ z(l, { width: "70%" })
|
|
1939
|
+
}), t && /* @__PURE__ */ z("span", {
|
|
1940
|
+
...S.props(J.text, J.secondaryText),
|
|
1941
|
+
children: /* @__PURE__ */ z(l, { width: "45%" })
|
|
1942
|
+
})]
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
// packages/collections/src/card-columns-model.ts
|
|
1946
|
+
var Jt = {
|
|
1947
|
+
moveCard: "Move",
|
|
1948
|
+
moveTo: "Move to",
|
|
1949
|
+
empty: "No cards",
|
|
1950
|
+
loading: "Loading",
|
|
1951
|
+
failed: "Could not load"
|
|
1952
|
+
};
|
|
1953
|
+
// packages/collections/src/column-card.tsx
|
|
1954
|
+
function Yt({ title: e, destinations: n, labels: r, onMove: i }) {
|
|
1955
|
+
return /* @__PURE__ */ B(p.Root, { children: [/* @__PURE__ */ z(p.Trigger, { render: /* @__PURE__ */ z(t, {
|
|
1956
|
+
variant: "ghost",
|
|
1957
|
+
density: "compact",
|
|
1958
|
+
"aria-label": `${r.moveCard} ${e}`,
|
|
1959
|
+
children: /* @__PURE__ */ z(ue, { size: 14 })
|
|
1960
|
+
}) }), /* @__PURE__ */ z(p.Popup, {
|
|
1961
|
+
align: "end",
|
|
1962
|
+
children: /* @__PURE__ */ B(p.Group, { children: [/* @__PURE__ */ z(p.GroupLabel, { children: r.moveTo }), n.map((e) => /* @__PURE__ */ z(p.Item, {
|
|
1963
|
+
onSelect: () => i(e.id),
|
|
1964
|
+
children: e.title
|
|
1965
|
+
}, e.id))] })
|
|
1966
|
+
})] });
|
|
1967
|
+
}
|
|
1968
|
+
function Xt({ title: e, href: t }) {
|
|
1969
|
+
return t === void 0 ? e : /* @__PURE__ */ z(i, {
|
|
1970
|
+
href: t,
|
|
1971
|
+
children: e
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
function Zt({ summary: e, destinations: t, labels: n, onMove: r }) {
|
|
1975
|
+
let i = t.length > 0, a = e.status !== void 0 && e.status !== null, o = e.meta !== void 0 && e.meta !== null, s = e.actions !== void 0 && e.actions !== null;
|
|
1976
|
+
return /* @__PURE__ */ B("li", {
|
|
1977
|
+
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x9f619 x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xvmahel xtqrqnz x1778rvt xj57cvi",
|
|
1978
|
+
children: [
|
|
1979
|
+
/* @__PURE__ */ B("div", {
|
|
1980
|
+
className: "x78zum5 x1cy8zhl x1hnptsi xeuugli",
|
|
1981
|
+
children: [
|
|
1982
|
+
e.leading !== void 0 && /* @__PURE__ */ z("span", {
|
|
1983
|
+
className: "x3nfvp2 x2lah0s",
|
|
1984
|
+
children: e.leading
|
|
1985
|
+
}),
|
|
1986
|
+
/* @__PURE__ */ z("span", {
|
|
1987
|
+
className: "x1cqoux5 xeuugli xk4h15q xj0a0fe",
|
|
1988
|
+
children: /* @__PURE__ */ z(Xt, {
|
|
1989
|
+
title: e.title,
|
|
1990
|
+
href: e.href
|
|
1991
|
+
})
|
|
1992
|
+
}),
|
|
1993
|
+
i && /* @__PURE__ */ z("span", {
|
|
1994
|
+
className: "x2lah0s",
|
|
1995
|
+
children: /* @__PURE__ */ z(Yt, {
|
|
1996
|
+
title: e.title,
|
|
1997
|
+
destinations: t,
|
|
1998
|
+
labels: n,
|
|
1999
|
+
onMove: r
|
|
2000
|
+
})
|
|
2001
|
+
})
|
|
2002
|
+
]
|
|
2003
|
+
}),
|
|
2004
|
+
a && /* @__PURE__ */ z("div", {
|
|
2005
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
|
|
2006
|
+
children: e.status
|
|
2007
|
+
}),
|
|
2008
|
+
o && /* @__PURE__ */ z("div", {
|
|
2009
|
+
className: "x78zum5 x1a02dak x6s0dn4 x8zbtdt x1hm1d26 xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
2010
|
+
children: e.meta
|
|
2011
|
+
}),
|
|
2012
|
+
s && /* @__PURE__ */ z("div", {
|
|
2013
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli",
|
|
2014
|
+
children: e.actions
|
|
2015
|
+
})
|
|
2016
|
+
]
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
// packages/collections/src/card-columns.tsx
|
|
2020
|
+
var Qt = 3, $t = "—", Q = {
|
|
2021
|
+
board: {
|
|
2022
|
+
k1xSpc: "x78zum5",
|
|
2023
|
+
kGNEyG: "x1qjc9v5",
|
|
2024
|
+
kOIVth: "x1n8ia3y",
|
|
2025
|
+
k7Eaqz: "xeuugli",
|
|
2026
|
+
ks0D6T: "x193iq5w",
|
|
2027
|
+
kXHlph: "xw2csxc",
|
|
2028
|
+
kvh3hx: "x7p5m3t",
|
|
2029
|
+
k3XXqK: "x1t137rt",
|
|
2030
|
+
kPJHz1: "x13qnu6",
|
|
2031
|
+
k7shQP: "x9v5kkp",
|
|
2032
|
+
kZs9gx: "x19rmrnh",
|
|
2033
|
+
kiEn40: "x1bqaal",
|
|
2034
|
+
$$css: !0
|
|
2035
|
+
},
|
|
2036
|
+
natural: { $$css: !0 },
|
|
2037
|
+
fill: {
|
|
2038
|
+
kZKoxP: "x5yr21d",
|
|
2039
|
+
$$css: !0
|
|
2040
|
+
},
|
|
2041
|
+
column: {
|
|
2042
|
+
k1xSpc: "x78zum5",
|
|
2043
|
+
kXwgrk: "xdt5ytf",
|
|
2044
|
+
kUk6DE: "xwgdodg",
|
|
2045
|
+
kOIVth: "x1hnptsi",
|
|
2046
|
+
k7Eaqz: "xeuugli",
|
|
2047
|
+
kB7OPa: "x9f619",
|
|
2048
|
+
kmVPX3: "x69ldcm",
|
|
2049
|
+
kaIpWk: "xy32g2j",
|
|
2050
|
+
kWkggS: "x1r7kqkb",
|
|
2051
|
+
$$css: !0
|
|
2052
|
+
},
|
|
2053
|
+
columnNatural: { $$css: !0 },
|
|
2054
|
+
columnFill: {
|
|
2055
|
+
kAzted: "x2lwn1j",
|
|
2056
|
+
$$css: !0
|
|
2057
|
+
},
|
|
2058
|
+
scroll: {
|
|
2059
|
+
k1xSpc: "x78zum5",
|
|
2060
|
+
kXwgrk: "xdt5ytf",
|
|
2061
|
+
k7Eaqz: "xeuugli",
|
|
2062
|
+
kORKVm: "x1odjw0f",
|
|
2063
|
+
kacamN: "x1e4zzel",
|
|
2064
|
+
k3XXqK: "x1t137rt",
|
|
2065
|
+
kPJHz1: "x13qnu6",
|
|
2066
|
+
k7shQP: "x9v5kkp",
|
|
2067
|
+
kZs9gx: "x19rmrnh",
|
|
2068
|
+
kiEn40: "x1bqaal",
|
|
2069
|
+
$$css: !0
|
|
2070
|
+
},
|
|
2071
|
+
bounded: {
|
|
2072
|
+
kskxy: "x1mpjnf3",
|
|
2073
|
+
$$css: !0
|
|
2074
|
+
},
|
|
2075
|
+
scrollFill: {
|
|
2076
|
+
kUk6DE: "x1cqoux5",
|
|
2077
|
+
kAzted: "x2lwn1j",
|
|
2078
|
+
$$css: !0
|
|
2079
|
+
}
|
|
2080
|
+
}, en = {
|
|
2081
|
+
bounded: Q.bounded,
|
|
2082
|
+
fill: Q.scrollFill
|
|
2083
|
+
}, tn = {
|
|
2084
|
+
bounded: Q.columnNatural,
|
|
2085
|
+
fill: Q.columnFill
|
|
2086
|
+
}, nn = {
|
|
2087
|
+
bounded: Q.natural,
|
|
2088
|
+
fill: Q.fill
|
|
2089
|
+
};
|
|
2090
|
+
function rn({ column: e, status: t, words: n, children: r }) {
|
|
2091
|
+
return e.items.length > 0 ? /* @__PURE__ */ z("ul", {
|
|
2092
|
+
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1ghz6dp x1717udv xe8uvvx",
|
|
2093
|
+
children: r
|
|
2094
|
+
}) : t === "pending" ? /* @__PURE__ */ B("div", {
|
|
2095
|
+
role: "status",
|
|
2096
|
+
className: "x1ghz6dp x1qokhjc x14w6jbu x153jb6y x1hz01jw xy8obcc xas2l8k xj0a0fe",
|
|
2097
|
+
children: [/* @__PURE__ */ z("span", {
|
|
2098
|
+
...S.props(_.hidden),
|
|
2099
|
+
children: n.loading
|
|
2100
|
+
}), /* @__PURE__ */ z(l, { lines: Qt })]
|
|
2101
|
+
}) : t === "failed" ? /* @__PURE__ */ z("p", {
|
|
2102
|
+
role: "alert",
|
|
2103
|
+
className: "x1ghz6dp x1qokhjc x14w6jbu x1hz01jw xy8obcc xas2l8k xj0a0fe xr5kp14",
|
|
2104
|
+
children: n.failed
|
|
2105
|
+
}) : /* @__PURE__ */ z("p", {
|
|
2106
|
+
className: "x1ghz6dp x1qokhjc x14w6jbu x153jb6y x1hz01jw xy8obcc xas2l8k xj0a0fe",
|
|
2107
|
+
children: e.empty ?? n.empty
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
function an({ count: e, isAvailable: t, locale: n }) {
|
|
2111
|
+
return t ? new Intl.NumberFormat(n).format(e) : $t;
|
|
2112
|
+
}
|
|
2113
|
+
function on({ columns: e, fromColumnId: t, summary: n, isMovable: r }) {
|
|
2114
|
+
if (!r) return [];
|
|
2115
|
+
let { moveTargets: i } = n;
|
|
2116
|
+
return e.filter((e) => e.id === t ? !1 : i === void 0 || i.includes(e.id));
|
|
2117
|
+
}
|
|
2118
|
+
function sn({ column: e, columns: t, status: n, words: r, columnHeight: i, locale: a, getCardId: o, getCard: s, onMoveCard: c }) {
|
|
2119
|
+
let l = M(), u = b(), d = e.items.length > 0 || n === "ready", f = an({
|
|
2120
|
+
count: e.items.length,
|
|
2121
|
+
isAvailable: d,
|
|
2122
|
+
locale: a
|
|
2123
|
+
});
|
|
2124
|
+
return /* @__PURE__ */ B("div", {
|
|
2125
|
+
...S.props(Q.column, tn[i]),
|
|
2126
|
+
children: [/* @__PURE__ */ B("div", {
|
|
2127
|
+
className: "x78zum5 x1pha0wt x1qughib x1hnptsi xeuugli x14w6jbu",
|
|
2128
|
+
children: [/* @__PURE__ */ z("h3", {
|
|
2129
|
+
id: l,
|
|
2130
|
+
className: "xeuugli x1ghz6dp x1hz01jw xtqrqnz x1778rvt xk4h15q xbixft xj0a0fe",
|
|
2131
|
+
children: e.title
|
|
2132
|
+
}), /* @__PURE__ */ z("span", {
|
|
2133
|
+
className: "x2lah0s x153jb6y x1hz01jw xy8obcc xas2l8k xss6m8b",
|
|
2134
|
+
children: f
|
|
2135
|
+
})]
|
|
2136
|
+
}), /* @__PURE__ */ z("div", {
|
|
2137
|
+
ref: u.ref,
|
|
2138
|
+
role: "region",
|
|
2139
|
+
"aria-labelledby": l,
|
|
2140
|
+
tabIndex: u.tabIndex,
|
|
2141
|
+
...S.props(Q.scroll, en[i]),
|
|
2142
|
+
children: /* @__PURE__ */ z(rn, {
|
|
2143
|
+
column: e,
|
|
2144
|
+
status: n,
|
|
2145
|
+
words: r,
|
|
2146
|
+
children: e.items.map((n) => {
|
|
2147
|
+
let i = s(n), a = on({
|
|
2148
|
+
columns: t,
|
|
2149
|
+
fromColumnId: e.id,
|
|
2150
|
+
summary: i,
|
|
2151
|
+
isMovable: c !== void 0
|
|
2152
|
+
});
|
|
2153
|
+
return /* @__PURE__ */ z(Zt, {
|
|
2154
|
+
summary: i,
|
|
2155
|
+
destinations: a,
|
|
2156
|
+
labels: r,
|
|
2157
|
+
onMove: (t) => c?.({
|
|
2158
|
+
item: n,
|
|
2159
|
+
fromColumnId: e.id,
|
|
2160
|
+
toColumnId: t
|
|
2161
|
+
})
|
|
2162
|
+
}, o(n));
|
|
2163
|
+
})
|
|
2164
|
+
})
|
|
2165
|
+
})]
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
function cn({ label: e, columns: t, status: n = "ready", columnHeight: r = "bounded", labels: i, ...a }) {
|
|
2169
|
+
let o = b(), s = {
|
|
2170
|
+
...Jt,
|
|
2171
|
+
...i
|
|
2172
|
+
};
|
|
2173
|
+
return /* @__PURE__ */ z("div", {
|
|
2174
|
+
ref: o.ref,
|
|
2175
|
+
role: "region",
|
|
2176
|
+
"aria-label": e,
|
|
2177
|
+
"aria-busy": n === "pending",
|
|
2178
|
+
tabIndex: o.tabIndex,
|
|
2179
|
+
...S.props(Q.board, nn[r]),
|
|
2180
|
+
children: t.map((e) => /* @__PURE__ */ z(sn, {
|
|
2181
|
+
...a,
|
|
2182
|
+
column: e,
|
|
2183
|
+
columns: t,
|
|
2184
|
+
status: n,
|
|
2185
|
+
words: s,
|
|
2186
|
+
columnHeight: r
|
|
2187
|
+
}, e.id))
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
1817
2190
|
// packages/collections/src/collection-scroll.tsx
|
|
1818
|
-
function
|
|
2191
|
+
function ln(t) {
|
|
1819
2192
|
switch (t.status) {
|
|
1820
|
-
case "loading": return /* @__PURE__ */
|
|
2193
|
+
case "loading": return /* @__PURE__ */ z(n, {
|
|
1821
2194
|
role: "status",
|
|
1822
2195
|
variant: "caption",
|
|
1823
2196
|
tone: "muted",
|
|
1824
2197
|
children: t.message ?? "Loading…"
|
|
1825
2198
|
});
|
|
1826
|
-
case "complete": return t.message === void 0 ? null : /* @__PURE__ */
|
|
2199
|
+
case "complete": return t.message === void 0 ? null : /* @__PURE__ */ z(n, {
|
|
1827
2200
|
variant: "caption",
|
|
1828
2201
|
tone: "muted",
|
|
1829
2202
|
children: t.message
|
|
1830
2203
|
});
|
|
1831
|
-
case "ready": return /* @__PURE__ */
|
|
2204
|
+
case "ready": return /* @__PURE__ */ z(e, {
|
|
1832
2205
|
onClick: t.onLoadMore,
|
|
1833
2206
|
children: t.message ?? "Load more"
|
|
1834
2207
|
});
|
|
1835
|
-
case "error": return /* @__PURE__ */
|
|
2208
|
+
case "error": return /* @__PURE__ */ B(o, {
|
|
1836
2209
|
role: "status",
|
|
1837
|
-
children: [/* @__PURE__ */
|
|
2210
|
+
children: [/* @__PURE__ */ z(n, {
|
|
1838
2211
|
variant: "caption",
|
|
1839
2212
|
tone: "muted",
|
|
1840
2213
|
children: t.message ?? "More records could not be loaded."
|
|
1841
|
-
}), /* @__PURE__ */
|
|
2214
|
+
}), /* @__PURE__ */ z(e, {
|
|
1842
2215
|
onClick: t.onLoadMore,
|
|
1843
2216
|
children: "Retry"
|
|
1844
2217
|
})]
|
|
1845
2218
|
});
|
|
1846
2219
|
}
|
|
1847
2220
|
}
|
|
1848
|
-
function
|
|
1849
|
-
let o =
|
|
1850
|
-
|
|
2221
|
+
function un({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
2222
|
+
let o = b(), s = o.viewport, c = F(null);
|
|
2223
|
+
ct({
|
|
1851
2224
|
end: c,
|
|
1852
2225
|
viewport: r ? s : void 0,
|
|
1853
2226
|
onEndReached: n,
|
|
1854
2227
|
content: e
|
|
1855
2228
|
});
|
|
1856
|
-
let l = /* @__PURE__ */
|
|
2229
|
+
let l = /* @__PURE__ */ z("div", {
|
|
1857
2230
|
ref: c,
|
|
1858
2231
|
...{
|
|
1859
2232
|
0: {},
|
|
@@ -1861,7 +2234,7 @@ function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, e
|
|
|
1861
2234
|
}[t !== void 0 | 0],
|
|
1862
2235
|
children: t
|
|
1863
2236
|
});
|
|
1864
|
-
return /* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ B("div", {
|
|
1865
2238
|
ref: o.ref,
|
|
1866
2239
|
role: r ? "region" : void 0,
|
|
1867
2240
|
"aria-label": r ? a : void 0,
|
|
@@ -1878,23 +2251,23 @@ function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, e
|
|
|
1878
2251
|
});
|
|
1879
2252
|
}
|
|
1880
2253
|
// packages/collections/src/inspector.tsx
|
|
1881
|
-
var
|
|
1882
|
-
function
|
|
2254
|
+
var dn = 860, fn = k(void 0);
|
|
2255
|
+
function pn({ reading: e }) {
|
|
1883
2256
|
return { value: e };
|
|
1884
2257
|
}
|
|
1885
|
-
var
|
|
2258
|
+
var mn = L({
|
|
1886
2259
|
name: "detail-field",
|
|
1887
2260
|
options: { reading: "string" },
|
|
1888
|
-
state:
|
|
1889
|
-
sync:
|
|
2261
|
+
state: pn,
|
|
2262
|
+
sync: pn,
|
|
1890
2263
|
api: () => ({}),
|
|
1891
2264
|
agent: { actions: [] },
|
|
1892
2265
|
slots: (e) => ({ root: e({}) })
|
|
1893
|
-
}),
|
|
1894
|
-
function
|
|
1895
|
-
let c =
|
|
1896
|
-
|
|
1897
|
-
a !== void 0 && l.current !== null && d.current !== null && l.current.clientWidth <=
|
|
2266
|
+
}), hn = w(mn, { root: "dd" }).Root;
|
|
2267
|
+
function gn({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
2268
|
+
let c = M(), l = F(null), u = F(null), d = F(null);
|
|
2269
|
+
N(() => {
|
|
2270
|
+
a !== void 0 && l.current !== null && d.current !== null && l.current.clientWidth <= dn && (d.current.focus({ preventScroll: !0 }), d.current.scrollIntoView({
|
|
1898
2271
|
block: "start",
|
|
1899
2272
|
behavior: "instant"
|
|
1900
2273
|
}));
|
|
@@ -1906,12 +2279,12 @@ function Vt({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1906
2279
|
behavior: "instant"
|
|
1907
2280
|
});
|
|
1908
2281
|
}
|
|
1909
|
-
return /* @__PURE__ */
|
|
1910
|
-
...
|
|
1911
|
-
children: /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ z("div", {
|
|
2283
|
+
...T({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
|
|
2284
|
+
children: /* @__PURE__ */ B("div", {
|
|
1912
2285
|
ref: l,
|
|
1913
2286
|
className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
|
|
1914
|
-
children: [/* @__PURE__ */
|
|
2287
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1915
2288
|
ref: u,
|
|
1916
2289
|
role: "group",
|
|
1917
2290
|
"aria-label": i,
|
|
@@ -1919,20 +2292,20 @@ function Vt({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1919
2292
|
tabIndex: -1,
|
|
1920
2293
|
className: "xeuugli",
|
|
1921
2294
|
children: t
|
|
1922
|
-
}), /* @__PURE__ */
|
|
2295
|
+
}), /* @__PURE__ */ B("aside", {
|
|
1923
2296
|
ref: d,
|
|
1924
2297
|
id: c,
|
|
1925
2298
|
"aria-label": r,
|
|
1926
2299
|
tabIndex: -1,
|
|
1927
2300
|
className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
|
|
1928
|
-
children: [/* @__PURE__ */
|
|
2301
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1929
2302
|
className: "x1s85apg x1yamub6 x1xxlxpq",
|
|
1930
|
-
children: /* @__PURE__ */
|
|
2303
|
+
children: /* @__PURE__ */ B(e, {
|
|
1931
2304
|
variant: "ghost",
|
|
1932
2305
|
onClick: f,
|
|
1933
2306
|
children: ["Back to ", i.toLowerCase()]
|
|
1934
2307
|
})
|
|
1935
|
-
}), /* @__PURE__ */
|
|
2308
|
+
}), /* @__PURE__ */ z(fn.Provider, {
|
|
1936
2309
|
value: r,
|
|
1937
2310
|
children: n
|
|
1938
2311
|
})]
|
|
@@ -1940,28 +2313,28 @@ function Vt({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, retu
|
|
|
1940
2313
|
})
|
|
1941
2314
|
});
|
|
1942
2315
|
}
|
|
1943
|
-
function
|
|
2316
|
+
function _n({ value: e, label: t }) {
|
|
1944
2317
|
let n = typeof e == "number" ? String(e) : e;
|
|
1945
|
-
return typeof n == "string" ? /* @__PURE__ */
|
|
2318
|
+
return typeof n == "string" ? /* @__PURE__ */ z(hn, {
|
|
1946
2319
|
"aria-label": t,
|
|
1947
2320
|
reading: n,
|
|
1948
2321
|
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1949
2322
|
children: n
|
|
1950
|
-
}) : /* @__PURE__ */
|
|
2323
|
+
}) : /* @__PURE__ */ z("dd", {
|
|
1951
2324
|
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1952
2325
|
children: e
|
|
1953
2326
|
});
|
|
1954
2327
|
}
|
|
1955
|
-
function
|
|
1956
|
-
let n =
|
|
1957
|
-
return /* @__PURE__ */
|
|
1958
|
-
...
|
|
1959
|
-
children: e.map(({ label: e, value: t }) => /* @__PURE__ */
|
|
2328
|
+
function vn({ items: e, ...t }) {
|
|
2329
|
+
let n = A(fn), r = t["aria-label"] ?? n;
|
|
2330
|
+
return /* @__PURE__ */ z("dl", {
|
|
2331
|
+
...T({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
2332
|
+
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ B("div", {
|
|
1960
2333
|
className: "xjp7ctv",
|
|
1961
|
-
children: [/* @__PURE__ */
|
|
2334
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
1962
2335
|
className: "xeuugli x153jb6y xj0a0fe",
|
|
1963
2336
|
children: e
|
|
1964
|
-
}), /* @__PURE__ */
|
|
2337
|
+
}), /* @__PURE__ */ z(_n, {
|
|
1965
2338
|
value: t,
|
|
1966
2339
|
label: r === void 0 ? e : `${r} · ${e}`
|
|
1967
2340
|
})]
|
|
@@ -1969,13 +2342,13 @@ function Ut({ items: e, ...t }) {
|
|
|
1969
2342
|
});
|
|
1970
2343
|
}
|
|
1971
2344
|
// packages/collections/src/list-footer.tsx
|
|
1972
|
-
function
|
|
1973
|
-
return /* @__PURE__ */
|
|
1974
|
-
...
|
|
1975
|
-
children: [/* @__PURE__ */
|
|
2345
|
+
function yn({ children: e, actions: t, ...n }) {
|
|
2346
|
+
return /* @__PURE__ */ B("div", {
|
|
2347
|
+
...T({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
2348
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1976
2349
|
className: "xeuugli xj0a0fe",
|
|
1977
2350
|
children: e
|
|
1978
|
-
}), t != null && /* @__PURE__ */
|
|
2351
|
+
}), t != null && /* @__PURE__ */ z("div", {
|
|
1979
2352
|
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
1980
2353
|
children: t
|
|
1981
2354
|
})]
|
|
@@ -2100,7 +2473,7 @@ var $ = {
|
|
|
2100
2473
|
kMwMTN: "xr5kp14",
|
|
2101
2474
|
$$css: !0
|
|
2102
2475
|
}
|
|
2103
|
-
},
|
|
2476
|
+
}, bn = {
|
|
2104
2477
|
inline: {
|
|
2105
2478
|
metric: void 0,
|
|
2106
2479
|
label: void 0,
|
|
@@ -2122,41 +2495,41 @@ var $ = {
|
|
|
2122
2495
|
detail: void 0,
|
|
2123
2496
|
valueWidth: "9ch"
|
|
2124
2497
|
}
|
|
2125
|
-
},
|
|
2498
|
+
}, xn = {
|
|
2126
2499
|
inline: $.grid,
|
|
2127
2500
|
columns: $.columns
|
|
2128
2501
|
};
|
|
2129
|
-
function
|
|
2130
|
-
return /* @__PURE__ */
|
|
2502
|
+
function Sn({ layout: e = "inline", ...t }) {
|
|
2503
|
+
return /* @__PURE__ */ z("dl", { ...T(S.props(xn[e]), t) });
|
|
2131
2504
|
}
|
|
2132
|
-
function
|
|
2133
|
-
let
|
|
2134
|
-
return /* @__PURE__ */
|
|
2135
|
-
...
|
|
2505
|
+
function Cn({ label: e, value: t, detail: n, change: r, target: i, isLoading: a = !1, hasDetail: o = !1, variant: s = "inline", trend: c, ...u }) {
|
|
2506
|
+
let d = bn[s], f = a && o || n !== void 0, p = r?.tone === "positive" ? $.changePositive : r?.tone === "negative" ? $.changeNegative : void 0;
|
|
2507
|
+
return /* @__PURE__ */ B("div", {
|
|
2508
|
+
...T(S.props($.metric, d.metric), u),
|
|
2136
2509
|
children: [
|
|
2137
|
-
/* @__PURE__ */
|
|
2138
|
-
...
|
|
2510
|
+
/* @__PURE__ */ z("dt", {
|
|
2511
|
+
...S.props($.label, d.label),
|
|
2139
2512
|
children: e
|
|
2140
2513
|
}),
|
|
2141
|
-
/* @__PURE__ */
|
|
2142
|
-
...
|
|
2143
|
-
children: /* @__PURE__ */
|
|
2514
|
+
/* @__PURE__ */ z("dd", {
|
|
2515
|
+
...S.props($.value, d.value),
|
|
2516
|
+
children: /* @__PURE__ */ B("span", {
|
|
2144
2517
|
className: "x78zum5 x1pha0wt x1a02dak x1hnptsi xeuugli",
|
|
2145
|
-
children: [/* @__PURE__ */
|
|
2146
|
-
...
|
|
2518
|
+
children: [/* @__PURE__ */ z("span", { children: a ? /* @__PURE__ */ z(l, { width: d.valueWidth }) : t ?? "—" }), !a && r !== void 0 && /* @__PURE__ */ z("span", {
|
|
2519
|
+
...S.props($.change, p),
|
|
2147
2520
|
children: r.value
|
|
2148
2521
|
})]
|
|
2149
2522
|
})
|
|
2150
2523
|
}),
|
|
2151
|
-
f && /* @__PURE__ */
|
|
2152
|
-
...
|
|
2153
|
-
children: a ? /* @__PURE__ */
|
|
2524
|
+
f && /* @__PURE__ */ z("dd", {
|
|
2525
|
+
...S.props($.detail, d.detail),
|
|
2526
|
+
children: a ? /* @__PURE__ */ z(l, { width: "24ch" }) : n
|
|
2154
2527
|
}),
|
|
2155
|
-
!a && i !== void 0 && /* @__PURE__ */
|
|
2528
|
+
!a && i !== void 0 && /* @__PURE__ */ z("dd", {
|
|
2156
2529
|
className: "x1ghz6dp xeuugli xy8obcc xas2l8k x153jb6y xss6m8b",
|
|
2157
2530
|
children: i
|
|
2158
2531
|
}),
|
|
2159
|
-
c !== void 0 && /* @__PURE__ */
|
|
2532
|
+
c !== void 0 && /* @__PURE__ */ z("dd", {
|
|
2160
2533
|
className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
|
|
2161
2534
|
children: c
|
|
2162
2535
|
})
|
|
@@ -2164,76 +2537,76 @@ function Jt({ label: e, value: t, detail: n, change: r, target: i, isLoading: a
|
|
|
2164
2537
|
});
|
|
2165
2538
|
}
|
|
2166
2539
|
// packages/collections/src/timestamp.tsx
|
|
2167
|
-
function
|
|
2168
|
-
return n === void 0 ? /* @__PURE__ */
|
|
2540
|
+
function wn({ dateTime: e, label: t, title: n }) {
|
|
2541
|
+
return n === void 0 ? /* @__PURE__ */ z("time", {
|
|
2169
2542
|
dateTime: e,
|
|
2170
2543
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2171
2544
|
children: t
|
|
2172
|
-
}) : /* @__PURE__ */
|
|
2173
|
-
render: /* @__PURE__ */
|
|
2545
|
+
}) : /* @__PURE__ */ B(h.Root, { children: [/* @__PURE__ */ z(h.Trigger, {
|
|
2546
|
+
render: /* @__PURE__ */ z("time", {
|
|
2174
2547
|
dateTime: e,
|
|
2175
2548
|
tabIndex: 0,
|
|
2176
2549
|
"aria-label": n,
|
|
2177
2550
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
2178
2551
|
}),
|
|
2179
2552
|
children: t
|
|
2180
|
-
}), /* @__PURE__ */
|
|
2553
|
+
}), /* @__PURE__ */ z(h.Popup, { children: n })] });
|
|
2181
2554
|
}
|
|
2182
2555
|
// packages/collections/src/timeline.tsx
|
|
2183
|
-
function
|
|
2184
|
-
return /* @__PURE__ */
|
|
2556
|
+
function Tn({ label: e, children: t }) {
|
|
2557
|
+
return /* @__PURE__ */ z(Ce, {
|
|
2185
2558
|
"aria-label": e,
|
|
2186
|
-
render: /* @__PURE__ */
|
|
2559
|
+
render: /* @__PURE__ */ z("ol", {}),
|
|
2187
2560
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
2188
2561
|
children: t
|
|
2189
2562
|
});
|
|
2190
2563
|
}
|
|
2191
|
-
function
|
|
2192
|
-
let [
|
|
2564
|
+
function En({ icon: e, title: t, time: n, metadata: r, children: i, details: a, defaultOpen: o = !1 }) {
|
|
2565
|
+
let [s, l] = I(o), u = /* @__PURE__ */ B("div", {
|
|
2193
2566
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
2194
|
-
children: [/* @__PURE__ */
|
|
2567
|
+
children: [/* @__PURE__ */ z(Oe, {
|
|
2195
2568
|
className: "xeuugli xk4h15q xj0a0fe",
|
|
2196
|
-
children: a === void 0 ? t : /* @__PURE__ */
|
|
2569
|
+
children: a === void 0 ? t : /* @__PURE__ */ z(c.Trigger, {
|
|
2197
2570
|
className: "x14atkfc x16exltd x17oiadl xt970qd xlqzeqv",
|
|
2198
2571
|
children: t
|
|
2199
2572
|
})
|
|
2200
|
-
}), n != null && /* @__PURE__ */
|
|
2201
|
-
render: /* @__PURE__ */
|
|
2573
|
+
}), n != null && /* @__PURE__ */ z(De, {
|
|
2574
|
+
render: /* @__PURE__ */ z("div", {}),
|
|
2202
2575
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
2203
2576
|
children: n
|
|
2204
2577
|
})]
|
|
2205
|
-
}), d = /* @__PURE__ */
|
|
2578
|
+
}), d = /* @__PURE__ */ B(ce, { children: [
|
|
2206
2579
|
u,
|
|
2207
|
-
i != null && (!
|
|
2580
|
+
i != null && (!s || a === void 0) && /* @__PURE__ */ z(we, {
|
|
2208
2581
|
className: "xeuugli x1ewvobj xj0a0fe",
|
|
2209
2582
|
children: i
|
|
2210
2583
|
}),
|
|
2211
|
-
r != null && /* @__PURE__ */
|
|
2584
|
+
r != null && /* @__PURE__ */ z("div", {
|
|
2212
2585
|
className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
2213
2586
|
children: r
|
|
2214
2587
|
}),
|
|
2215
|
-
a !== void 0 && /* @__PURE__ */
|
|
2588
|
+
a !== void 0 && /* @__PURE__ */ z(c.Panel, { children: a })
|
|
2216
2589
|
] });
|
|
2217
|
-
return /* @__PURE__ */
|
|
2218
|
-
render: /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ B(Te, {
|
|
2591
|
+
render: /* @__PURE__ */ z("li", {}),
|
|
2219
2592
|
className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7 x1t137rt x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2220
|
-
children: [/* @__PURE__ */
|
|
2221
|
-
render: /* @__PURE__ */
|
|
2593
|
+
children: [/* @__PURE__ */ z(Ee, {
|
|
2594
|
+
render: /* @__PURE__ */ z("span", {}),
|
|
2222
2595
|
className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
|
|
2223
2596
|
children: e
|
|
2224
|
-
}), a === void 0 ? /* @__PURE__ */
|
|
2597
|
+
}), a === void 0 ? /* @__PURE__ */ z("div", {
|
|
2225
2598
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
2226
2599
|
children: d
|
|
2227
|
-
}) : /* @__PURE__ */
|
|
2228
|
-
open:
|
|
2600
|
+
}) : /* @__PURE__ */ z(c.Root, {
|
|
2601
|
+
open: s,
|
|
2229
2602
|
onOpenChange: l,
|
|
2230
2603
|
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
2231
2604
|
children: d
|
|
2232
2605
|
})]
|
|
2233
2606
|
});
|
|
2234
2607
|
}
|
|
2235
|
-
var
|
|
2236
|
-
Root:
|
|
2237
|
-
Item:
|
|
2608
|
+
var Dn = {
|
|
2609
|
+
Root: Tn,
|
|
2610
|
+
Item: En
|
|
2238
2611
|
};
|
|
2239
|
-
export {
|
|
2612
|
+
export { Pe as C, q as S, Nt as _, yn as a, vt as b, ln as c, Kt as d, qt as f, Pt as g, Ft as h, Sn as i, un as l, Vt as m, wn as n, vn as o, Bt as p, Cn as r, gn as s, Dn as t, cn as u, Tt as v, Ne as w, Fe as x, ht as y };
|