@commercetools/nimbus 0.0.0-canary-20250827101922 → 0.0.0-canary-20250828113610
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{alert-BxQlH4k1.es.js → alert-BSP6Q3el.es.js} +2 -2
- package/dist/chunks/{alert-BxQlH4k1.es.js.map → alert-BSP6Q3el.es.js.map} +1 -1
- package/dist/chunks/{alert-BZUgI30X.cjs.js → alert-C88EdygK.cjs.js} +2 -2
- package/dist/chunks/{alert-BZUgI30X.cjs.js.map → alert-C88EdygK.cjs.js.map} +1 -1
- package/dist/chunks/button-B9biGn83.es.js +59 -0
- package/dist/chunks/{button-B4HX0fM_.es.js.map → button-B9biGn83.es.js.map} +1 -1
- package/dist/chunks/button-BCrCWnMd.cjs.js +2 -0
- package/dist/chunks/{button-qv44IWcR.cjs.js.map → button-BCrCWnMd.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-DABzfMco.es.js → calendar-B9IgFF4u.es.js} +2 -2
- package/dist/chunks/{calendar-DABzfMco.es.js.map → calendar-B9IgFF4u.es.js.map} +1 -1
- package/dist/chunks/{calendar-v3st4EyG.cjs.js → calendar-BU_04xoY.cjs.js} +2 -2
- package/dist/chunks/{calendar-v3st4EyG.cjs.js.map → calendar-BU_04xoY.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-Ah0GQqSW.cjs.js → combobox-BvfBQq9k.cjs.js} +2 -2
- package/dist/chunks/{combobox-Ah0GQqSW.cjs.js.map → combobox-BvfBQq9k.cjs.js.map} +1 -1
- package/dist/chunks/{combobox-D_IGHRck.es.js → combobox-ClhyR7hp.es.js} +3 -3
- package/dist/chunks/{combobox-D_IGHRck.es.js.map → combobox-ClhyR7hp.es.js.map} +1 -1
- package/dist/chunks/data-table-BZdQfaxu.cjs.js +2 -0
- package/dist/chunks/data-table-BZdQfaxu.cjs.js.map +1 -0
- package/dist/chunks/{data-table-DbhVtDHQ.es.js → data-table-WHEWdh5f.es.js} +1665 -1526
- package/dist/chunks/data-table-WHEWdh5f.es.js.map +1 -0
- package/dist/chunks/{date-picker-Bpi1PgR2.es.js → date-picker--1p1znhu.es.js} +3 -3
- package/dist/chunks/{date-picker-Bpi1PgR2.es.js.map → date-picker--1p1znhu.es.js.map} +1 -1
- package/dist/chunks/{date-picker-DNROhe7B.cjs.js → date-picker-BAf5yyGT.cjs.js} +2 -2
- package/dist/chunks/{date-picker-DNROhe7B.cjs.js.map → date-picker-BAf5yyGT.cjs.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CXKG84tw.es.js → date-range-picker-J-FqEMGo.es.js} +3 -3
- package/dist/chunks/{date-range-picker-CXKG84tw.es.js.map → date-range-picker-J-FqEMGo.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-tyjYdQx1.cjs.js → date-range-picker-zxwhdmlC.cjs.js} +2 -2
- package/dist/chunks/{date-range-picker-tyjYdQx1.cjs.js.map → date-range-picker-zxwhdmlC.cjs.js.map} +1 -1
- package/dist/chunks/{form-field-JpzG70WX.cjs.js → form-field-B9PncHWr.cjs.js} +2 -2
- package/dist/chunks/{form-field-JpzG70WX.cjs.js.map → form-field-B9PncHWr.cjs.js.map} +1 -1
- package/dist/chunks/{form-field-DePRnFqm.es.js → form-field-wK_anzOw.es.js} +2 -2
- package/dist/chunks/{form-field-DePRnFqm.es.js.map → form-field-wK_anzOw.es.js.map} +1 -1
- package/dist/chunks/{icon-button-CCrfnUUB.cjs.js → icon-button-BPQdpTPZ.cjs.js} +2 -2
- package/dist/chunks/{icon-button-CCrfnUUB.cjs.js.map → icon-button-BPQdpTPZ.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-O_dSWgZr.es.js → icon-button-a3WVC7IH.es.js} +2 -2
- package/dist/chunks/{icon-button-O_dSWgZr.es.js.map → icon-button-a3WVC7IH.es.js.map} +1 -1
- package/dist/chunks/{password-input-BtbZYHE8.es.js → password-input-BWFYKcBT.es.js} +2 -2
- package/dist/chunks/{password-input-BtbZYHE8.es.js.map → password-input-BWFYKcBT.es.js.map} +1 -1
- package/dist/chunks/{password-input-CGsQktks.cjs.js → password-input-D8R9Y9Ro.cjs.js} +2 -2
- package/dist/chunks/{password-input-CGsQktks.cjs.js.map → password-input-D8R9Y9Ro.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-BNAIdxfK.es.js → range-calendar-B7-Z0ksl.es.js} +2 -2
- package/dist/chunks/{range-calendar-BNAIdxfK.es.js.map → range-calendar-B7-Z0ksl.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-BW4gqU35.cjs.js → range-calendar-CswayeNh.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-BW4gqU35.cjs.js.map → range-calendar-CswayeNh.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-D3xrDvLR.es.js → rich-text-input-Bty0WhBM.es.js} +2 -2
- package/dist/chunks/{rich-text-input-D3xrDvLR.es.js.map → rich-text-input-Bty0WhBM.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-iDEygf74.cjs.js → rich-text-input-Cvcywluc.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-iDEygf74.cjs.js.map → rich-text-input-Cvcywluc.cjs.js.map} +1 -1
- package/dist/chunks/{select-wby2GRxc.es.js → select-BwGMCDw8.es.js} +2 -2
- package/dist/chunks/{select-wby2GRxc.es.js.map → select-BwGMCDw8.es.js.map} +1 -1
- package/dist/chunks/{select-DihySN1w.cjs.js → select-DnmavfXh.cjs.js} +2 -2
- package/dist/chunks/{select-DihySN1w.cjs.js.map → select-DnmavfXh.cjs.js.map} +1 -1
- package/dist/chunks/{split-button-RydlGh27.cjs.js → split-button-BMpznhkI.cjs.js} +2 -2
- package/dist/chunks/{split-button-RydlGh27.cjs.js.map → split-button-BMpznhkI.cjs.js.map} +1 -1
- package/dist/chunks/{split-button-CcVa5yVH.es.js → split-button-a7my5Dc8.es.js} +3 -3
- package/dist/chunks/{split-button-CcVa5yVH.es.js.map → split-button-a7my5Dc8.es.js.map} +1 -1
- package/dist/chunks/{tag-group-Cwcr_VDp.cjs.js → tag-group-3YoW3lJr.cjs.js} +2 -2
- package/dist/chunks/{tag-group-Cwcr_VDp.cjs.js.map → tag-group-3YoW3lJr.cjs.js.map} +1 -1
- package/dist/chunks/{tag-group-DQ0jVbpR.es.js → tag-group-BBldLRQt.es.js} +2 -2
- package/dist/chunks/{tag-group-DQ0jVbpR.es.js.map → tag-group-BBldLRQt.es.js.map} +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +15 -15
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components.d.ts +82 -37
- package/dist/data-table.d.ts +84 -37
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +85 -40
- package/dist/index.es.js +15 -15
- package/package.json +5 -5
- package/dist/chunks/button-B4HX0fM_.es.js +0 -57
- package/dist/chunks/button-qv44IWcR.cjs.js +0 -2
- package/dist/chunks/data-table-COrv-ddO.cjs.js +0 -2
- package/dist/chunks/data-table-COrv-ddO.cjs.js.map +0 -1
- package/dist/chunks/data-table-DbhVtDHQ.es.js.map +0 -1
|
@@ -1,154 +1,155 @@
|
|
|
1
|
-
import { jsx as D, jsxs as oe, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { $ as
|
|
4
|
-
import { $ as
|
|
5
|
-
import { m as
|
|
6
|
-
import { $ as Al, a as ie, d as
|
|
7
|
-
import { $ as me, a as
|
|
8
|
-
import { $ as
|
|
9
|
-
import { d as
|
|
10
|
-
import { $ as
|
|
1
|
+
import { jsx as D, jsxs as oe, Fragment as wl } from "react/jsx-runtime";
|
|
2
|
+
import S, { useRef as A, useMemo as K, useCallback as O, useEffect as ue, useState as q, forwardRef as re, createContext as se, useContext as B, Fragment as Dl } from "react";
|
|
3
|
+
import { $ as ht } from "./Button-C-yUWwZg.es.js";
|
|
4
|
+
import { $ as mt } from "./RSPContexts-B4yvXuBR.es.js";
|
|
5
|
+
import { m as H, w as ne, x as le, y as Re, z as Cl, l as Sl, $ as gt, a as bt, c as kl, b as El, e as He, d as vt, g as Ce, f as zl, A as Rl, h as Z, u as yt, B as Bl, C as nt, i as Pl } from "./Collection-DFZhstai.es.js";
|
|
6
|
+
import { $ as Al, a as ie, d as Pe, g as ot, f as Kl } from "./utils-BkdW_cdL.es.js";
|
|
7
|
+
import { $ as me, a as Ml, b as Tl, c as Nl, d as jo, e as Oo } from "./DragAndDrop-ChYb3tCX.es.js";
|
|
8
|
+
import { $ as Fl } from "./intlStrings-Cd44R5hT.es.js";
|
|
9
|
+
import { d as we, a as Ae, $ as V, e as Il, c as rt } from "./mergeProps-B_9syxhT.es.js";
|
|
10
|
+
import { $ as Q } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
11
11
|
import { $ as de } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
12
|
-
import { a as
|
|
13
|
-
import { c as ce, $ as fe, a as
|
|
14
|
-
import
|
|
15
|
-
import { $ as
|
|
12
|
+
import { a as Wl } from "./OverlayArrow-ERS8ZqL3.es.js";
|
|
13
|
+
import { c as ce, $ as fe, a as Ve, d as Hl } from "./scrollIntoView-BYF_8_6g.es.js";
|
|
14
|
+
import Vl from "react-dom";
|
|
15
|
+
import { $ as Se } from "./useHover-cJOf02TT.es.js";
|
|
16
16
|
import { d as it } from "./platform-Z5fvtFmM.es.js";
|
|
17
|
-
import { a as
|
|
18
|
-
import { $ as
|
|
19
|
-
import { $ as
|
|
20
|
-
import { $ as
|
|
21
|
-
import { b as
|
|
17
|
+
import { a as jl, b as Ol, $ as $t } from "./usePress-BquTSwUd.es.js";
|
|
18
|
+
import { $ as Ll, c as Ul } from "./useFocusable-BghVNiQU.es.js";
|
|
19
|
+
import { $ as Yl, f as Xl } from "./useFocusVisible-C5ivHvqm.es.js";
|
|
20
|
+
import { $ as G } from "./focusSafely-Di2ArC9L.es.js";
|
|
21
|
+
import { b as at, a as Gl } from "./FocusScope-C1Aw7j9H.es.js";
|
|
22
22
|
import { $ as ge } from "./context-Pt-0ojuK.es.js";
|
|
23
23
|
import { $ as be } from "./useLocalizedStringFormatter-CvzOUusg.es.js";
|
|
24
24
|
import { $ as he } from "./useFocusRing-D8cwV0EM.es.js";
|
|
25
|
-
import { $ as
|
|
26
|
-
import { a as
|
|
27
|
-
import { e as
|
|
28
|
-
import { m as
|
|
29
|
-
import { $ as
|
|
30
|
-
import { $ as
|
|
31
|
-
import { $ as
|
|
32
|
-
import { $ as
|
|
33
|
-
import { B as
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
import { $ as ql } from "./useGlobalListeners-BOOfV5Wh.es.js";
|
|
26
|
+
import { a as Ke, $ as ut } from "./VisuallyHidden-C38kRNm0.es.js";
|
|
27
|
+
import { e as Zl } from "./openLink-Ctl0AdAy.es.js";
|
|
28
|
+
import { m as Be } from "./utils-Gg3iiYhl.es.js";
|
|
29
|
+
import { $ as Ql, a as Jl, b as _l, c as en } from "./useHighlightSelectionDescription-DAR8wV79.es.js";
|
|
30
|
+
import { $ as tn } from "./LiveAnnouncer-CsPyaceH.es.js";
|
|
31
|
+
import { $ as xt } from "./useCollator-BvjDbml1.es.js";
|
|
32
|
+
import { $ as ln } from "./useUpdateEffect-CCDx8D4X.es.js";
|
|
33
|
+
import { B as De } from "./box-C8731OYq.es.js";
|
|
34
|
+
import { e as ve } from "./extractStyleProps-DX5GBd9K.es.js";
|
|
35
|
+
import { defineSlotRecipe as nn, createSlotRecipeContext as on, mergeRefs as rn } from "@chakra-ui/react";
|
|
36
|
+
import { I as an } from "./icon-button-a3WVC7IH.es.js";
|
|
37
|
+
import { b as st } from "./tooltip-BOK0Uejw.es.js";
|
|
38
|
+
import { C as wt } from "./checkbox-VN2y-Prn.es.js";
|
|
39
|
+
import { KeyboardArrowDown as un, KeyboardArrowRight as sn, PushPin as dn, ArrowDownward as cn } from "@commercetools/nimbus-icons";
|
|
40
|
+
import { c as fn } from "./create-recipe-context-i2odau3L.es.js";
|
|
41
|
+
import { D as pn } from "./divider-CpctZ_-U.es.js";
|
|
42
|
+
import { F as hn } from "./flex-B81RbgfK.es.js";
|
|
43
|
+
function mn(t) {
|
|
44
|
+
let { onMoveStart: e, onMove: l, onMoveEnd: n } = t, o = A({
|
|
44
45
|
didMove: !1,
|
|
45
46
|
lastPosition: null,
|
|
46
47
|
id: null
|
|
47
|
-
}), { addGlobalListener:
|
|
48
|
+
}), { addGlobalListener: r, removeGlobalListener: i } = ql(), a = we((u, s, p, f) => {
|
|
48
49
|
p === 0 && f === 0 || (o.current.didMove || (o.current.didMove = !0, e?.({
|
|
49
50
|
type: "movestart",
|
|
50
51
|
pointerType: s,
|
|
51
|
-
shiftKey:
|
|
52
|
-
metaKey:
|
|
53
|
-
ctrlKey:
|
|
54
|
-
altKey:
|
|
52
|
+
shiftKey: u.shiftKey,
|
|
53
|
+
metaKey: u.metaKey,
|
|
54
|
+
ctrlKey: u.ctrlKey,
|
|
55
|
+
altKey: u.altKey
|
|
55
56
|
})), l?.({
|
|
56
57
|
type: "move",
|
|
57
58
|
pointerType: s,
|
|
58
59
|
deltaX: p,
|
|
59
60
|
deltaY: f,
|
|
60
|
-
shiftKey:
|
|
61
|
-
metaKey:
|
|
62
|
-
ctrlKey:
|
|
63
|
-
altKey:
|
|
61
|
+
shiftKey: u.shiftKey,
|
|
62
|
+
metaKey: u.metaKey,
|
|
63
|
+
ctrlKey: u.ctrlKey,
|
|
64
|
+
altKey: u.altKey
|
|
64
65
|
}));
|
|
65
|
-
}), c =
|
|
66
|
-
|
|
66
|
+
}), c = we((u, s) => {
|
|
67
|
+
jl(), o.current.didMove && n?.({
|
|
67
68
|
type: "moveend",
|
|
68
69
|
pointerType: s,
|
|
69
|
-
shiftKey:
|
|
70
|
-
metaKey:
|
|
71
|
-
ctrlKey:
|
|
72
|
-
altKey:
|
|
70
|
+
shiftKey: u.shiftKey,
|
|
71
|
+
metaKey: u.metaKey,
|
|
72
|
+
ctrlKey: u.ctrlKey,
|
|
73
|
+
altKey: u.altKey
|
|
73
74
|
});
|
|
74
75
|
});
|
|
75
76
|
return {
|
|
76
|
-
moveProps:
|
|
77
|
-
let
|
|
78
|
-
|
|
77
|
+
moveProps: K(() => {
|
|
78
|
+
let u = {}, s = () => {
|
|
79
|
+
Ol(), o.current.didMove = !1;
|
|
79
80
|
};
|
|
80
81
|
if (typeof PointerEvent > "u" && process.env.NODE_ENV === "test") {
|
|
81
82
|
let f = (v) => {
|
|
82
83
|
if (v.button === 0) {
|
|
83
|
-
var
|
|
84
|
-
|
|
84
|
+
var w, g, $, b;
|
|
85
|
+
a(v, "mouse", v.pageX - (($ = (w = o.current.lastPosition) === null || w === void 0 ? void 0 : w.pageX) !== null && $ !== void 0 ? $ : 0), v.pageY - ((b = (g = o.current.lastPosition) === null || g === void 0 ? void 0 : g.pageY) !== null && b !== void 0 ? b : 0)), o.current.lastPosition = {
|
|
85
86
|
pageX: v.pageX,
|
|
86
87
|
pageY: v.pageY
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
}, h = (v) => {
|
|
90
|
-
v.button === 0 && (c(v, "mouse"),
|
|
91
|
+
v.button === 0 && (c(v, "mouse"), i(window, "mousemove", f, !1), i(window, "mouseup", h, !1));
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
u.onMouseDown = (v) => {
|
|
93
94
|
v.button === 0 && (s(), v.stopPropagation(), v.preventDefault(), o.current.lastPosition = {
|
|
94
95
|
pageX: v.pageX,
|
|
95
96
|
pageY: v.pageY
|
|
96
|
-
},
|
|
97
|
+
}, r(window, "mousemove", f, !1), r(window, "mouseup", h, !1));
|
|
97
98
|
};
|
|
98
|
-
let
|
|
99
|
-
let
|
|
99
|
+
let m = (v) => {
|
|
100
|
+
let w = [
|
|
100
101
|
...v.changedTouches
|
|
101
|
-
].findIndex(({ identifier:
|
|
102
|
-
if (
|
|
103
|
-
var
|
|
104
|
-
let { pageX:
|
|
105
|
-
var b,
|
|
106
|
-
|
|
107
|
-
pageX:
|
|
108
|
-
pageY:
|
|
102
|
+
].findIndex(({ identifier: k }) => k === o.current.id);
|
|
103
|
+
if (w >= 0) {
|
|
104
|
+
var g, $;
|
|
105
|
+
let { pageX: k, pageY: R } = v.changedTouches[w];
|
|
106
|
+
var b, C;
|
|
107
|
+
a(v, "touch", k - ((b = (g = o.current.lastPosition) === null || g === void 0 ? void 0 : g.pageX) !== null && b !== void 0 ? b : 0), R - ((C = ($ = o.current.lastPosition) === null || $ === void 0 ? void 0 : $.pageY) !== null && C !== void 0 ? C : 0)), o.current.lastPosition = {
|
|
108
|
+
pageX: k,
|
|
109
|
+
pageY: R
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
}, y = (v) => {
|
|
112
113
|
[
|
|
113
114
|
...v.changedTouches
|
|
114
|
-
].findIndex(({ identifier:
|
|
115
|
+
].findIndex(({ identifier: g }) => g === o.current.id) >= 0 && (c(v, "touch"), o.current.id = null, i(window, "touchmove", m), i(window, "touchend", y), i(window, "touchcancel", y));
|
|
115
116
|
};
|
|
116
|
-
|
|
117
|
+
u.onTouchStart = (v) => {
|
|
117
118
|
if (v.changedTouches.length === 0 || o.current.id != null) return;
|
|
118
|
-
let { pageX:
|
|
119
|
+
let { pageX: w, pageY: g, identifier: $ } = v.changedTouches[0];
|
|
119
120
|
s(), v.stopPropagation(), v.preventDefault(), o.current.lastPosition = {
|
|
120
|
-
pageX:
|
|
121
|
-
pageY:
|
|
122
|
-
}, o.current.id = $,
|
|
121
|
+
pageX: w,
|
|
122
|
+
pageY: g
|
|
123
|
+
}, o.current.id = $, r(window, "touchmove", m, !1), r(window, "touchend", y, !1), r(window, "touchcancel", y, !1);
|
|
123
124
|
};
|
|
124
125
|
} else {
|
|
125
|
-
let f = (
|
|
126
|
-
if (
|
|
126
|
+
let f = (m) => {
|
|
127
|
+
if (m.pointerId === o.current.id) {
|
|
127
128
|
var y, v;
|
|
128
|
-
let $ =
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
pageX:
|
|
132
|
-
pageY:
|
|
129
|
+
let $ = m.pointerType || "mouse";
|
|
130
|
+
var w, g;
|
|
131
|
+
a(m, $, m.pageX - ((w = (y = o.current.lastPosition) === null || y === void 0 ? void 0 : y.pageX) !== null && w !== void 0 ? w : 0), m.pageY - ((g = (v = o.current.lastPosition) === null || v === void 0 ? void 0 : v.pageY) !== null && g !== void 0 ? g : 0)), o.current.lastPosition = {
|
|
132
|
+
pageX: m.pageX,
|
|
133
|
+
pageY: m.pageY
|
|
133
134
|
};
|
|
134
135
|
}
|
|
135
|
-
}, h = (
|
|
136
|
-
if (
|
|
137
|
-
let y =
|
|
138
|
-
c(
|
|
136
|
+
}, h = (m) => {
|
|
137
|
+
if (m.pointerId === o.current.id) {
|
|
138
|
+
let y = m.pointerType || "mouse";
|
|
139
|
+
c(m, y), o.current.id = null, i(window, "pointermove", f, !1), i(window, "pointerup", h, !1), i(window, "pointercancel", h, !1);
|
|
139
140
|
}
|
|
140
141
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
pageX:
|
|
144
|
-
pageY:
|
|
145
|
-
}, o.current.id =
|
|
142
|
+
u.onPointerDown = (m) => {
|
|
143
|
+
m.button === 0 && o.current.id == null && (s(), m.stopPropagation(), m.preventDefault(), o.current.lastPosition = {
|
|
144
|
+
pageX: m.pageX,
|
|
145
|
+
pageY: m.pageY
|
|
146
|
+
}, o.current.id = m.pointerId, r(window, "pointermove", f, !1), r(window, "pointerup", h, !1), r(window, "pointercancel", h, !1));
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
|
-
let p = (f, h,
|
|
149
|
-
s(),
|
|
149
|
+
let p = (f, h, m) => {
|
|
150
|
+
s(), a(f, "keyboard", h, m), c(f, "keyboard");
|
|
150
151
|
};
|
|
151
|
-
return
|
|
152
|
+
return u.onKeyDown = (f) => {
|
|
152
153
|
switch (f.key) {
|
|
153
154
|
case "Left":
|
|
154
155
|
case "ArrowLeft":
|
|
@@ -167,17 +168,17 @@ function pn(t) {
|
|
|
167
168
|
f.preventDefault(), f.stopPropagation(), p(f, 0, 1);
|
|
168
169
|
break;
|
|
169
170
|
}
|
|
170
|
-
},
|
|
171
|
+
}, u;
|
|
171
172
|
}, [
|
|
172
173
|
o,
|
|
173
|
-
i,
|
|
174
174
|
r,
|
|
175
|
-
|
|
175
|
+
i,
|
|
176
|
+
a,
|
|
176
177
|
c
|
|
177
178
|
])
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
|
-
class
|
|
181
|
+
class Dt {
|
|
181
182
|
isCell(e) {
|
|
182
183
|
return e.type === "cell";
|
|
183
184
|
}
|
|
@@ -213,12 +214,12 @@ class xt {
|
|
|
213
214
|
let n = this.collection.getItem(e);
|
|
214
215
|
if (!n) return null;
|
|
215
216
|
let o = 0;
|
|
216
|
-
for (let
|
|
217
|
-
var i;
|
|
218
|
-
if (u.colSpan && u.colSpan + o > l) return (i = u.key) !== null && i !== void 0 ? i : null;
|
|
219
|
-
u.colSpan && (o = o + u.colSpan - 1);
|
|
217
|
+
for (let a of H(n, this.collection)) {
|
|
220
218
|
var r;
|
|
221
|
-
if (o
|
|
219
|
+
if (a.colSpan && a.colSpan + o > l) return (r = a.key) !== null && r !== void 0 ? r : null;
|
|
220
|
+
a.colSpan && (o = o + a.colSpan - 1);
|
|
221
|
+
var i;
|
|
222
|
+
if (o === l) return (i = a.key) !== null && i !== void 0 ? i : null;
|
|
222
223
|
o++;
|
|
223
224
|
}
|
|
224
225
|
return null;
|
|
@@ -228,10 +229,10 @@ class xt {
|
|
|
228
229
|
if (!n) return null;
|
|
229
230
|
var o;
|
|
230
231
|
if (this.isCell(n) && (l = (o = n.parentKey) !== null && o !== void 0 ? o : null), l == null) return null;
|
|
231
|
-
if (l = this.findNextKey(l, (
|
|
232
|
+
if (l = this.findNextKey(l, (r) => r.type === "item"), l != null) {
|
|
232
233
|
if (this.isCell(n)) {
|
|
233
|
-
let
|
|
234
|
-
return this.getKeyForItemInRowByIndex(l,
|
|
234
|
+
let r = n.colIndex ? n.colIndex : n.index;
|
|
235
|
+
return this.getKeyForItemInRowByIndex(l, r);
|
|
235
236
|
}
|
|
236
237
|
if (this.focusMode === "row") return l;
|
|
237
238
|
}
|
|
@@ -242,10 +243,10 @@ class xt {
|
|
|
242
243
|
if (!n) return null;
|
|
243
244
|
var o;
|
|
244
245
|
if (this.isCell(n) && (l = (o = n.parentKey) !== null && o !== void 0 ? o : null), l == null) return null;
|
|
245
|
-
if (l = this.findPreviousKey(l, (
|
|
246
|
+
if (l = this.findPreviousKey(l, (r) => r.type === "item"), l != null) {
|
|
246
247
|
if (this.isCell(n)) {
|
|
247
|
-
let
|
|
248
|
-
return this.getKeyForItemInRowByIndex(l,
|
|
248
|
+
let r = n.colIndex ? n.colIndex : n.index;
|
|
249
|
+
return this.getKeyForItemInRowByIndex(l, r);
|
|
249
250
|
}
|
|
250
251
|
if (this.focusMode === "row") return l;
|
|
251
252
|
}
|
|
@@ -256,22 +257,22 @@ class xt {
|
|
|
256
257
|
if (!l) return null;
|
|
257
258
|
if (this.isRow(l)) {
|
|
258
259
|
var n, o;
|
|
259
|
-
let
|
|
260
|
-
var
|
|
261
|
-
return (
|
|
260
|
+
let u = H(l, this.collection);
|
|
261
|
+
var r;
|
|
262
|
+
return (r = this.direction === "rtl" ? (n = ne(u)) === null || n === void 0 ? void 0 : n.key : (o = le(u)) === null || o === void 0 ? void 0 : o.key) !== null && r !== void 0 ? r : null;
|
|
262
263
|
}
|
|
263
264
|
if (this.isCell(l) && l.parentKey != null) {
|
|
264
|
-
let
|
|
265
|
-
if (!
|
|
266
|
-
let s =
|
|
267
|
-
var
|
|
268
|
-
let p = (
|
|
269
|
-
var
|
|
270
|
-
if (p) return (
|
|
265
|
+
let u = this.collection.getItem(l.parentKey);
|
|
266
|
+
if (!u) return null;
|
|
267
|
+
let s = H(u, this.collection);
|
|
268
|
+
var i;
|
|
269
|
+
let p = (i = this.direction === "rtl" ? Re(s, l.index - 1) : Re(s, l.index + 1)) !== null && i !== void 0 ? i : null;
|
|
270
|
+
var a;
|
|
271
|
+
if (p) return (a = p.key) !== null && a !== void 0 ? a : null;
|
|
271
272
|
var c;
|
|
272
273
|
if (this.focusMode === "row") return (c = l.parentKey) !== null && c !== void 0 ? c : null;
|
|
273
|
-
var
|
|
274
|
-
return (
|
|
274
|
+
var d;
|
|
275
|
+
return (d = this.direction === "rtl" ? this.getFirstKey(e) : this.getLastKey(e)) !== null && d !== void 0 ? d : null;
|
|
275
276
|
}
|
|
276
277
|
return null;
|
|
277
278
|
}
|
|
@@ -280,22 +281,22 @@ class xt {
|
|
|
280
281
|
if (!l) return null;
|
|
281
282
|
if (this.isRow(l)) {
|
|
282
283
|
var n, o;
|
|
283
|
-
let
|
|
284
|
-
var
|
|
285
|
-
return (
|
|
284
|
+
let u = H(l, this.collection);
|
|
285
|
+
var r;
|
|
286
|
+
return (r = this.direction === "rtl" ? (n = le(u)) === null || n === void 0 ? void 0 : n.key : (o = ne(u)) === null || o === void 0 ? void 0 : o.key) !== null && r !== void 0 ? r : null;
|
|
286
287
|
}
|
|
287
288
|
if (this.isCell(l) && l.parentKey != null) {
|
|
288
|
-
let
|
|
289
|
-
if (!
|
|
290
|
-
let s =
|
|
291
|
-
var
|
|
292
|
-
let p = (
|
|
293
|
-
var
|
|
294
|
-
if (p) return (
|
|
289
|
+
let u = this.collection.getItem(l.parentKey);
|
|
290
|
+
if (!u) return null;
|
|
291
|
+
let s = H(u, this.collection);
|
|
292
|
+
var i;
|
|
293
|
+
let p = (i = this.direction === "rtl" ? Re(s, l.index + 1) : Re(s, l.index - 1)) !== null && i !== void 0 ? i : null;
|
|
294
|
+
var a;
|
|
295
|
+
if (p) return (a = p.key) !== null && a !== void 0 ? a : null;
|
|
295
296
|
var c;
|
|
296
297
|
if (this.focusMode === "row") return (c = l.parentKey) !== null && c !== void 0 ? c : null;
|
|
297
|
-
var
|
|
298
|
-
return (
|
|
298
|
+
var d;
|
|
299
|
+
return (d = this.direction === "rtl" ? this.getLastKey(e) : this.getFirstKey(e)) !== null && d !== void 0 ? d : null;
|
|
299
300
|
}
|
|
300
301
|
return null;
|
|
301
302
|
}
|
|
@@ -304,19 +305,19 @@ class xt {
|
|
|
304
305
|
if (n != null) {
|
|
305
306
|
if (o = this.collection.getItem(n), !o) return null;
|
|
306
307
|
if (this.isCell(o) && !l && o.parentKey != null) {
|
|
307
|
-
var i;
|
|
308
|
-
let a = this.collection.getItem(o.parentKey);
|
|
309
|
-
if (!a) return null;
|
|
310
308
|
var r;
|
|
311
|
-
|
|
309
|
+
let d = this.collection.getItem(o.parentKey);
|
|
310
|
+
if (!d) return null;
|
|
311
|
+
var i;
|
|
312
|
+
return (i = (r = le(H(d, this.collection))) === null || r === void 0 ? void 0 : r.key) !== null && i !== void 0 ? i : null;
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
|
-
if (n = this.findNextKey(void 0, (
|
|
315
|
-
var
|
|
316
|
-
let
|
|
317
|
-
if (!
|
|
315
|
+
if (n = this.findNextKey(void 0, (d) => d.type === "item"), n != null && (o && this.isCell(o) && l || this.focusMode === "cell")) {
|
|
316
|
+
var a;
|
|
317
|
+
let d = this.collection.getItem(n);
|
|
318
|
+
if (!d) return null;
|
|
318
319
|
var c;
|
|
319
|
-
n = (c = (
|
|
320
|
+
n = (c = (a = le(H(d, this.collection))) === null || a === void 0 ? void 0 : a.key) !== null && c !== void 0 ? c : null;
|
|
320
321
|
}
|
|
321
322
|
return n;
|
|
322
323
|
}
|
|
@@ -325,21 +326,21 @@ class xt {
|
|
|
325
326
|
if (n != null) {
|
|
326
327
|
if (o = this.collection.getItem(n), !o) return null;
|
|
327
328
|
if (this.isCell(o) && !l && o.parentKey != null) {
|
|
328
|
-
var i;
|
|
329
|
-
let a = this.collection.getItem(o.parentKey);
|
|
330
|
-
if (!a) return null;
|
|
331
|
-
let d = W(a, this.collection);
|
|
332
329
|
var r;
|
|
333
|
-
|
|
330
|
+
let d = this.collection.getItem(o.parentKey);
|
|
331
|
+
if (!d) return null;
|
|
332
|
+
let u = H(d, this.collection);
|
|
333
|
+
var i;
|
|
334
|
+
return (i = (r = ne(u)) === null || r === void 0 ? void 0 : r.key) !== null && i !== void 0 ? i : null;
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
|
-
if (n = this.findPreviousKey(void 0, (
|
|
337
|
-
var
|
|
338
|
-
let
|
|
339
|
-
if (!
|
|
340
|
-
let
|
|
337
|
+
if (n = this.findPreviousKey(void 0, (d) => d.type === "item"), n != null && (o && this.isCell(o) && l || this.focusMode === "cell")) {
|
|
338
|
+
var a;
|
|
339
|
+
let d = this.collection.getItem(n);
|
|
340
|
+
if (!d) return null;
|
|
341
|
+
let u = H(d, this.collection);
|
|
341
342
|
var c;
|
|
342
|
-
n = (c = (
|
|
343
|
+
n = (c = (a = ne(u)) === null || a === void 0 ? void 0 : a.key) !== null && c !== void 0 ? c : null;
|
|
343
344
|
}
|
|
344
345
|
return n;
|
|
345
346
|
}
|
|
@@ -348,8 +349,8 @@ class xt {
|
|
|
348
349
|
if (!n) return null;
|
|
349
350
|
let o = Math.max(0, n.y + n.height - this.layoutDelegate.getVisibleRect().height);
|
|
350
351
|
for (; n && n.y > o && l != null; ) {
|
|
351
|
-
var
|
|
352
|
-
if (l = (
|
|
352
|
+
var r;
|
|
353
|
+
if (l = (r = this.getKeyAbove(l)) !== null && r !== void 0 ? r : null, l == null) break;
|
|
353
354
|
n = this.layoutDelegate.getItemRect(l);
|
|
354
355
|
}
|
|
355
356
|
return l;
|
|
@@ -357,11 +358,11 @@ class xt {
|
|
|
357
358
|
getKeyPageBelow(e) {
|
|
358
359
|
let l = e, n = this.layoutDelegate.getItemRect(l);
|
|
359
360
|
if (!n) return null;
|
|
360
|
-
let o = this.layoutDelegate.getVisibleRect().height,
|
|
361
|
-
for (; n && n.y + n.height <
|
|
362
|
-
let
|
|
363
|
-
if (
|
|
364
|
-
n = this.layoutDelegate.getItemRect(
|
|
361
|
+
let o = this.layoutDelegate.getVisibleRect().height, r = Math.min(this.layoutDelegate.getContentSize().height, n.y + o);
|
|
362
|
+
for (; n && n.y + n.height < r; ) {
|
|
363
|
+
let i = this.getKeyBelow(l);
|
|
364
|
+
if (i == null) break;
|
|
365
|
+
n = this.layoutDelegate.getItemRect(i), l = i;
|
|
365
366
|
}
|
|
366
367
|
return l;
|
|
367
368
|
}
|
|
@@ -370,33 +371,33 @@ class xt {
|
|
|
370
371
|
if (!this.collator) return null;
|
|
371
372
|
let o = this.collection;
|
|
372
373
|
if (n = l ?? this.getFirstKey(), n == null) return null;
|
|
373
|
-
let
|
|
374
|
-
if (!
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
let
|
|
374
|
+
let r = o.getItem(n);
|
|
375
|
+
if (!r) return null;
|
|
376
|
+
var i;
|
|
377
|
+
r.type === "cell" && (n = (i = r.parentKey) !== null && i !== void 0 ? i : null);
|
|
378
|
+
let a = !1;
|
|
378
379
|
for (; n != null; ) {
|
|
379
|
-
let
|
|
380
|
-
if (!
|
|
381
|
-
if (
|
|
382
|
-
let s =
|
|
380
|
+
let u = o.getItem(n);
|
|
381
|
+
if (!u) return null;
|
|
382
|
+
if (u.textValue) {
|
|
383
|
+
let s = u.textValue.slice(0, e.length);
|
|
383
384
|
if (this.collator.compare(s, e) === 0) {
|
|
384
|
-
var c,
|
|
385
|
-
return this.isRow(
|
|
385
|
+
var c, d;
|
|
386
|
+
return this.isRow(u) && this.focusMode === "cell" ? (d = (c = le(H(u, this.collection))) === null || c === void 0 ? void 0 : c.key) !== null && d !== void 0 ? d : null : u.key;
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
|
-
n = this.findNextKey(n, (s) => s.type === "item"), n == null && !
|
|
389
|
+
n = this.findNextKey(n, (s) => s.type === "item"), n == null && !a && (n = this.getFirstKey(), a = !0);
|
|
389
390
|
}
|
|
390
391
|
return null;
|
|
391
392
|
}
|
|
392
393
|
constructor(e) {
|
|
393
394
|
if (this.collection = e.collection, this.disabledKeys = e.disabledKeys, this.disabledBehavior = e.disabledBehavior || "all", this.direction = e.direction, this.collator = e.collator, !e.layout && !e.ref) throw new Error("Either a layout or a ref must be specified.");
|
|
394
|
-
this.layoutDelegate = e.layoutDelegate || (e.layout ? new
|
|
395
|
+
this.layoutDelegate = e.layoutDelegate || (e.layout ? new gn(e.layout) : new Cl(e.ref));
|
|
395
396
|
var l;
|
|
396
397
|
this.focusMode = (l = e.focusMode) !== null && l !== void 0 ? l : "row";
|
|
397
398
|
}
|
|
398
399
|
}
|
|
399
|
-
class
|
|
400
|
+
class gn {
|
|
400
401
|
getContentSize() {
|
|
401
402
|
return this.layout.getContentSize();
|
|
402
403
|
}
|
|
@@ -411,53 +412,53 @@ class hn {
|
|
|
411
412
|
this.layout = e;
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
const
|
|
415
|
-
function
|
|
416
|
-
let { isVirtualized: n, disallowTypeAhead: o, keyboardDelegate:
|
|
415
|
+
const je = /* @__PURE__ */ new WeakMap();
|
|
416
|
+
function bn(t, e, l) {
|
|
417
|
+
let { isVirtualized: n, disallowTypeAhead: o, keyboardDelegate: r, focusMode: i, scrollRef: a, getRowText: c, onRowAction: d, onCellAction: u, escapeKeyBehavior: s = "clearSelection", shouldSelectOnPressUp: p } = t, { selectionManager: f } = e;
|
|
417
418
|
!t["aria-label"] && !t["aria-labelledby"] && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
418
|
-
let h =
|
|
419
|
+
let h = xt({
|
|
419
420
|
usage: "search",
|
|
420
421
|
sensitivity: "base"
|
|
421
|
-
}), { direction:
|
|
422
|
+
}), { direction: m } = ge(), y = e.selectionManager.disabledBehavior, v = K(() => r || new Dt({
|
|
422
423
|
collection: e.collection,
|
|
423
424
|
disabledKeys: e.disabledKeys,
|
|
424
425
|
disabledBehavior: y,
|
|
425
426
|
ref: l,
|
|
426
|
-
direction:
|
|
427
|
+
direction: m,
|
|
427
428
|
collator: h,
|
|
428
|
-
focusMode:
|
|
429
|
+
focusMode: i
|
|
429
430
|
}), [
|
|
430
|
-
|
|
431
|
+
r,
|
|
431
432
|
e.collection,
|
|
432
433
|
e.disabledKeys,
|
|
433
434
|
y,
|
|
434
435
|
l,
|
|
435
|
-
|
|
436
|
+
m,
|
|
436
437
|
h,
|
|
437
|
-
|
|
438
|
-
]), { collectionProps:
|
|
438
|
+
i
|
|
439
|
+
]), { collectionProps: w } = Sl({
|
|
439
440
|
ref: l,
|
|
440
441
|
selectionManager: f,
|
|
441
442
|
keyboardDelegate: v,
|
|
442
443
|
isVirtualized: n,
|
|
443
|
-
scrollRef:
|
|
444
|
+
scrollRef: a,
|
|
444
445
|
disallowTypeAhead: o,
|
|
445
446
|
escapeKeyBehavior: s
|
|
446
|
-
}),
|
|
447
|
-
|
|
447
|
+
}), g = Ae(t.id);
|
|
448
|
+
je.set(e, {
|
|
448
449
|
keyboardDelegate: v,
|
|
449
450
|
actions: {
|
|
450
|
-
onRowAction:
|
|
451
|
-
onCellAction:
|
|
451
|
+
onRowAction: d,
|
|
452
|
+
onCellAction: u
|
|
452
453
|
},
|
|
453
454
|
shouldSelectOnPressUp: p
|
|
454
455
|
});
|
|
455
|
-
let $ =
|
|
456
|
+
let $ = Ql({
|
|
456
457
|
selectionManager: f,
|
|
457
|
-
hasItemActions: !!(
|
|
458
|
-
}), b =
|
|
458
|
+
hasItemActions: !!(d || u)
|
|
459
|
+
}), b = Q(t, {
|
|
459
460
|
labelable: !0
|
|
460
|
-
}),
|
|
461
|
+
}), C = O((E) => {
|
|
461
462
|
if (f.isFocused) {
|
|
462
463
|
E.currentTarget.contains(E.target) || f.setFocused(!1);
|
|
463
464
|
return;
|
|
@@ -465,108 +466,108 @@ function mn(t, e, l) {
|
|
|
465
466
|
E.currentTarget.contains(E.target) && f.setFocused(!0);
|
|
466
467
|
}, [
|
|
467
468
|
f
|
|
468
|
-
]),
|
|
469
|
-
onBlur:
|
|
470
|
-
onFocus:
|
|
469
|
+
]), k = K(() => ({
|
|
470
|
+
onBlur: w.onBlur,
|
|
471
|
+
onFocus: C
|
|
471
472
|
}), [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
]),
|
|
473
|
+
C,
|
|
474
|
+
w.onBlur
|
|
475
|
+
]), R = Jl(l, {
|
|
475
476
|
isDisabled: e.collection.size !== 0
|
|
476
|
-
}), P =
|
|
477
|
+
}), P = V(
|
|
477
478
|
b,
|
|
478
479
|
{
|
|
479
480
|
role: "grid",
|
|
480
|
-
id:
|
|
481
|
+
id: g,
|
|
481
482
|
"aria-multiselectable": f.selectionMode === "multiple" ? "true" : void 0
|
|
482
483
|
},
|
|
483
|
-
e.isKeyboardNavigationDisabled ?
|
|
484
|
+
e.isKeyboardNavigationDisabled ? k : w,
|
|
484
485
|
// If collection is empty, make sure the grid is tabbable unless there is a child tabbable element.
|
|
485
486
|
e.collection.size === 0 && {
|
|
486
|
-
tabIndex:
|
|
487
|
+
tabIndex: R ? -1 : 0
|
|
487
488
|
} || void 0,
|
|
488
489
|
$
|
|
489
490
|
);
|
|
490
|
-
return n && (P["aria-rowcount"] = e.collection.size, P["aria-colcount"] = e.collection.columnCount),
|
|
491
|
+
return n && (P["aria-rowcount"] = e.collection.size, P["aria-colcount"] = e.collection.columnCount), _l({
|
|
491
492
|
getRowText: c
|
|
492
493
|
}, e), {
|
|
493
494
|
gridProps: P
|
|
494
495
|
};
|
|
495
496
|
}
|
|
496
|
-
function
|
|
497
|
+
function vn() {
|
|
497
498
|
return {
|
|
498
499
|
rowGroupProps: {
|
|
499
500
|
role: "rowgroup"
|
|
500
501
|
}
|
|
501
502
|
};
|
|
502
503
|
}
|
|
503
|
-
function
|
|
504
|
+
function yn(t, e, l) {
|
|
504
505
|
var n, o;
|
|
505
|
-
let { node:
|
|
506
|
+
let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: c } = t, { actions: d, shouldSelectOnPressUp: u } = je.get(e), s = d.onRowAction ? () => {
|
|
506
507
|
var y;
|
|
507
|
-
return (y =
|
|
508
|
-
} : c, { itemProps: p, ...f } =
|
|
508
|
+
return (y = d.onRowAction) === null || y === void 0 ? void 0 : y.call(d, r.key);
|
|
509
|
+
} : c, { itemProps: p, ...f } = gt({
|
|
509
510
|
selectionManager: e.selectionManager,
|
|
510
|
-
key:
|
|
511
|
+
key: r.key,
|
|
511
512
|
ref: l,
|
|
512
|
-
isVirtualized:
|
|
513
|
-
shouldSelectOnPressUp:
|
|
514
|
-
onAction: s || !(
|
|
513
|
+
isVirtualized: i,
|
|
514
|
+
shouldSelectOnPressUp: u || a,
|
|
515
|
+
onAction: s || !(r == null || (n = r.props) === null || n === void 0) && n.onAction ? Il(r == null || (o = r.props) === null || o === void 0 ? void 0 : o.onAction, s) : void 0,
|
|
515
516
|
isDisabled: e.collection.size === 0
|
|
516
|
-
}), h = e.selectionManager.isSelected(
|
|
517
|
+
}), h = e.selectionManager.isSelected(r.key), m = {
|
|
517
518
|
role: "row",
|
|
518
519
|
"aria-selected": e.selectionManager.selectionMode !== "none" ? h : void 0,
|
|
519
520
|
"aria-disabled": f.isDisabled || void 0,
|
|
520
521
|
...p
|
|
521
522
|
};
|
|
522
|
-
return
|
|
523
|
-
rowProps:
|
|
523
|
+
return i && (m["aria-rowindex"] = r.index + 1), {
|
|
524
|
+
rowProps: m,
|
|
524
525
|
...f
|
|
525
526
|
};
|
|
526
527
|
}
|
|
527
|
-
function
|
|
528
|
-
let { node: n, isVirtualized: o, focusMode:
|
|
528
|
+
function Ct(t, e, l) {
|
|
529
|
+
let { node: n, isVirtualized: o, focusMode: r = "child", shouldSelectOnPressUp: i, onAction: a } = t, { direction: c } = ge(), { keyboardDelegate: d, actions: { onCellAction: u } } = je.get(e), s = A(null), p = () => {
|
|
529
530
|
if (l.current) {
|
|
530
|
-
let
|
|
531
|
-
if (
|
|
531
|
+
let g = at(l.current);
|
|
532
|
+
if (r === "child") {
|
|
532
533
|
if (l.current.contains(document.activeElement) && l.current !== document.activeElement) return;
|
|
533
|
-
let $ = e.selectionManager.childFocusStrategy === "last" ?
|
|
534
|
+
let $ = e.selectionManager.childFocusStrategy === "last" ? Te(g) : g.firstChild();
|
|
534
535
|
if ($) {
|
|
535
|
-
|
|
536
|
+
G($);
|
|
536
537
|
return;
|
|
537
538
|
}
|
|
538
539
|
}
|
|
539
|
-
(s.current != null && n.key !== s.current || !l.current.contains(document.activeElement)) &&
|
|
540
|
+
(s.current != null && n.key !== s.current || !l.current.contains(document.activeElement)) && G(l.current);
|
|
540
541
|
}
|
|
541
|
-
}, { itemProps: f, isPressed: h } =
|
|
542
|
+
}, { itemProps: f, isPressed: h } = gt({
|
|
542
543
|
selectionManager: e.selectionManager,
|
|
543
544
|
key: n.key,
|
|
544
545
|
ref: l,
|
|
545
546
|
isVirtualized: o,
|
|
546
547
|
focus: p,
|
|
547
|
-
shouldSelectOnPressUp:
|
|
548
|
-
onAction:
|
|
548
|
+
shouldSelectOnPressUp: i,
|
|
549
|
+
onAction: u ? () => u(n.key) : a,
|
|
549
550
|
isDisabled: e.collection.size === 0
|
|
550
|
-
}),
|
|
551
|
-
if (!
|
|
552
|
-
let $ =
|
|
553
|
-
switch ($.currentNode = document.activeElement,
|
|
551
|
+
}), m = (g) => {
|
|
552
|
+
if (!g.currentTarget.contains(g.target) || e.isKeyboardNavigationDisabled || !l.current || !document.activeElement) return;
|
|
553
|
+
let $ = at(l.current);
|
|
554
|
+
switch ($.currentNode = document.activeElement, g.key) {
|
|
554
555
|
case "ArrowLeft": {
|
|
555
556
|
let E = c === "rtl" ? $.nextNode() : $.previousNode();
|
|
556
|
-
if (
|
|
557
|
-
|
|
557
|
+
if (r === "child" && E === l.current && (E = null), g.preventDefault(), g.stopPropagation(), E)
|
|
558
|
+
G(E), ce(E, {
|
|
558
559
|
containingElement: fe(l.current)
|
|
559
560
|
});
|
|
560
561
|
else {
|
|
561
562
|
var b;
|
|
562
|
-
if (((b =
|
|
563
|
-
var
|
|
564
|
-
(
|
|
563
|
+
if (((b = d.getKeyLeftOf) === null || b === void 0 ? void 0 : b.call(d, n.key)) !== n.key) {
|
|
564
|
+
var C;
|
|
565
|
+
(C = l.current.parentElement) === null || C === void 0 || C.dispatchEvent(new KeyboardEvent(g.nativeEvent.type, g.nativeEvent));
|
|
565
566
|
break;
|
|
566
567
|
}
|
|
567
|
-
|
|
568
|
+
r === "cell" && c === "rtl" ? (G(l.current), ce(l.current, {
|
|
568
569
|
containingElement: fe(l.current)
|
|
569
|
-
})) : ($.currentNode = l.current, E = c === "rtl" ? $.firstChild() :
|
|
570
|
+
})) : ($.currentNode = l.current, E = c === "rtl" ? $.firstChild() : Te($), E && (G(E), ce(E, {
|
|
570
571
|
containingElement: fe(l.current)
|
|
571
572
|
})));
|
|
572
573
|
}
|
|
@@ -574,20 +575,20 @@ function wt(t, e, l) {
|
|
|
574
575
|
}
|
|
575
576
|
case "ArrowRight": {
|
|
576
577
|
let E = c === "rtl" ? $.previousNode() : $.nextNode();
|
|
577
|
-
if (
|
|
578
|
-
|
|
578
|
+
if (r === "child" && E === l.current && (E = null), g.preventDefault(), g.stopPropagation(), E)
|
|
579
|
+
G(E), ce(E, {
|
|
579
580
|
containingElement: fe(l.current)
|
|
580
581
|
});
|
|
581
582
|
else {
|
|
582
|
-
var
|
|
583
|
-
if (((
|
|
584
|
-
var
|
|
585
|
-
(
|
|
583
|
+
var k;
|
|
584
|
+
if (((k = d.getKeyRightOf) === null || k === void 0 ? void 0 : k.call(d, n.key)) !== n.key) {
|
|
585
|
+
var R;
|
|
586
|
+
(R = l.current.parentElement) === null || R === void 0 || R.dispatchEvent(new KeyboardEvent(g.nativeEvent.type, g.nativeEvent));
|
|
586
587
|
break;
|
|
587
588
|
}
|
|
588
|
-
|
|
589
|
+
r === "cell" && c === "ltr" ? (G(l.current), ce(l.current, {
|
|
589
590
|
containingElement: fe(l.current)
|
|
590
|
-
})) : ($.currentNode = l.current, E = c === "rtl" ?
|
|
591
|
+
})) : ($.currentNode = l.current, E = c === "rtl" ? Te($) : $.firstChild(), E && (G(E), ce(E, {
|
|
591
592
|
containingElement: fe(l.current)
|
|
592
593
|
})));
|
|
593
594
|
}
|
|
@@ -595,31 +596,31 @@ function wt(t, e, l) {
|
|
|
595
596
|
}
|
|
596
597
|
case "ArrowUp":
|
|
597
598
|
case "ArrowDown":
|
|
598
|
-
if (!
|
|
599
|
+
if (!g.altKey && l.current.contains(g.target)) {
|
|
599
600
|
var P;
|
|
600
|
-
|
|
601
|
+
g.stopPropagation(), g.preventDefault(), (P = l.current.parentElement) === null || P === void 0 || P.dispatchEvent(new KeyboardEvent(g.nativeEvent.type, g.nativeEvent));
|
|
601
602
|
}
|
|
602
603
|
break;
|
|
603
604
|
}
|
|
604
|
-
}, y = (
|
|
605
|
-
if (s.current = n.key,
|
|
606
|
-
|
|
605
|
+
}, y = (g) => {
|
|
606
|
+
if (s.current = n.key, g.target !== l.current) {
|
|
607
|
+
Yl() || e.selectionManager.setFocusedKey(n.key);
|
|
607
608
|
return;
|
|
608
609
|
}
|
|
609
610
|
requestAnimationFrame(() => {
|
|
610
|
-
|
|
611
|
+
r === "child" && document.activeElement === l.current && p();
|
|
611
612
|
});
|
|
612
|
-
}, v =
|
|
613
|
+
}, v = V(f, {
|
|
613
614
|
role: "gridcell",
|
|
614
|
-
onKeyDownCapture:
|
|
615
|
+
onKeyDownCapture: m,
|
|
615
616
|
"aria-colspan": n.colSpan,
|
|
616
617
|
"aria-colindex": n.colIndex != null ? n.colIndex + 1 : void 0,
|
|
617
618
|
colSpan: o ? void 0 : n.colSpan,
|
|
618
619
|
onFocus: y
|
|
619
620
|
});
|
|
620
|
-
var
|
|
621
|
-
return o && (v["aria-colindex"] = ((
|
|
622
|
-
let $ =
|
|
621
|
+
var w;
|
|
622
|
+
return o && (v["aria-colindex"] = ((w = n.colIndex) !== null && w !== void 0 ? w : n.index) + 1), i && v.tabIndex != null && v.onPointerDown == null && (v.onPointerDown = (g) => {
|
|
623
|
+
let $ = g.currentTarget, b = $.getAttribute("tabindex");
|
|
623
624
|
$.removeAttribute("tabindex"), requestAnimationFrame(() => {
|
|
624
625
|
b != null && $.setAttribute("tabindex", b);
|
|
625
626
|
});
|
|
@@ -628,50 +629,50 @@ function wt(t, e, l) {
|
|
|
628
629
|
isPressed: h
|
|
629
630
|
};
|
|
630
631
|
}
|
|
631
|
-
function
|
|
632
|
+
function Te(t) {
|
|
632
633
|
let e = null, l = null;
|
|
633
634
|
do
|
|
634
635
|
l = t.lastChild(), l && (e = l);
|
|
635
636
|
while (l);
|
|
636
637
|
return e;
|
|
637
638
|
}
|
|
638
|
-
function
|
|
639
|
+
function $n(t) {
|
|
639
640
|
return t && t.__esModule ? t.default : t;
|
|
640
641
|
}
|
|
641
|
-
function
|
|
642
|
-
let { key: l } = t, n = e.selectionManager, o =
|
|
643
|
-
const c = be(
|
|
642
|
+
function xn(t, e) {
|
|
643
|
+
let { key: l } = t, n = e.selectionManager, o = Ae(), r = !e.selectionManager.canSelectItem(l), i = e.selectionManager.isSelected(l), a = () => n.toggleSelection(l);
|
|
644
|
+
const c = be($n(en), "@react-aria/grid");
|
|
644
645
|
return {
|
|
645
646
|
checkboxProps: {
|
|
646
647
|
id: o,
|
|
647
648
|
"aria-label": c.format("select"),
|
|
648
|
-
isSelected:
|
|
649
|
-
isDisabled:
|
|
650
|
-
onChange:
|
|
649
|
+
isSelected: i,
|
|
650
|
+
isDisabled: r,
|
|
651
|
+
onChange: a
|
|
651
652
|
}
|
|
652
653
|
};
|
|
653
654
|
}
|
|
654
|
-
const
|
|
655
|
+
const Oe = /* @__PURE__ */ new WeakMap();
|
|
655
656
|
function Ne(t) {
|
|
656
657
|
return typeof t == "string" ? t.replace(/\s*/g, "") : "" + t;
|
|
657
658
|
}
|
|
658
|
-
function
|
|
659
|
-
let l =
|
|
659
|
+
function St(t, e) {
|
|
660
|
+
let l = Oe.get(t);
|
|
660
661
|
if (!l) throw new Error("Unknown grid");
|
|
661
662
|
return `${l}-${Ne(e)}`;
|
|
662
663
|
}
|
|
663
|
-
function
|
|
664
|
-
let n =
|
|
664
|
+
function kt(t, e, l) {
|
|
665
|
+
let n = Oe.get(t);
|
|
665
666
|
if (!n) throw new Error("Unknown grid");
|
|
666
667
|
return `${n}-${Ne(e)}-${Ne(l)}`;
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
+
function Et(t, e) {
|
|
669
670
|
return [
|
|
670
671
|
...t.collection.rowHeaderColumnKeys
|
|
671
|
-
].map((l) =>
|
|
672
|
+
].map((l) => kt(t, e, l)).join(" ");
|
|
672
673
|
}
|
|
673
|
-
var
|
|
674
|
-
|
|
674
|
+
var zt = {};
|
|
675
|
+
zt = {
|
|
675
676
|
ascending: "تصاعدي",
|
|
676
677
|
ascendingSort: (t) => `ترتيب حسب العمود ${t.columnName} بترتيب تصاعدي`,
|
|
677
678
|
columnSize: (t) => `${t.value} بالبكسل`,
|
|
@@ -682,8 +683,8 @@ kt = {
|
|
|
682
683
|
selectAll: "تحديد الكل",
|
|
683
684
|
sortable: "عمود قابل للترتيب"
|
|
684
685
|
};
|
|
685
|
-
var
|
|
686
|
-
|
|
686
|
+
var Rt = {};
|
|
687
|
+
Rt = {
|
|
687
688
|
ascending: "възходящ",
|
|
688
689
|
ascendingSort: (t) => `сортирано по колона ${t.columnName} във възходящ ред`,
|
|
689
690
|
columnSize: (t) => `${t.value} пиксела`,
|
|
@@ -694,8 +695,8 @@ Et = {
|
|
|
694
695
|
selectAll: "Изберете всичко",
|
|
695
696
|
sortable: "сортираща колона"
|
|
696
697
|
};
|
|
697
|
-
var
|
|
698
|
-
|
|
698
|
+
var Bt = {};
|
|
699
|
+
Bt = {
|
|
699
700
|
ascending: "vzestupně",
|
|
700
701
|
ascendingSort: (t) => `řazeno vzestupně podle sloupce ${t.columnName}`,
|
|
701
702
|
columnSize: (t) => `${t.value} pixelů`,
|
|
@@ -706,8 +707,8 @@ zt = {
|
|
|
706
707
|
selectAll: "Vybrat vše",
|
|
707
708
|
sortable: "sloupec s možností řazení"
|
|
708
709
|
};
|
|
709
|
-
var
|
|
710
|
-
|
|
710
|
+
var Pt = {};
|
|
711
|
+
Pt = {
|
|
711
712
|
ascending: "stigende",
|
|
712
713
|
ascendingSort: (t) => `sorteret efter kolonne ${t.columnName} i stigende rækkefølge`,
|
|
713
714
|
columnSize: (t) => `${t.value} pixels`,
|
|
@@ -730,8 +731,8 @@ At = {
|
|
|
730
731
|
selectAll: "Alles auswählen",
|
|
731
732
|
sortable: "sortierbare Spalte"
|
|
732
733
|
};
|
|
733
|
-
var
|
|
734
|
-
|
|
734
|
+
var Kt = {};
|
|
735
|
+
Kt = {
|
|
735
736
|
ascending: "αύξουσα",
|
|
736
737
|
ascendingSort: (t) => `διαλογή ανά στήλη ${t.columnName} σε αύξουσα σειρά`,
|
|
737
738
|
columnSize: (t) => `${t.value} pixel`,
|
|
@@ -742,8 +743,8 @@ Bt = {
|
|
|
742
743
|
selectAll: "Επιλογή όλων",
|
|
743
744
|
sortable: "Στήλη διαλογής"
|
|
744
745
|
};
|
|
745
|
-
var
|
|
746
|
-
|
|
746
|
+
var Mt = {};
|
|
747
|
+
Mt = {
|
|
747
748
|
select: "Select",
|
|
748
749
|
selectAll: "Select All",
|
|
749
750
|
sortable: "sortable column",
|
|
@@ -754,8 +755,8 @@ Pt = {
|
|
|
754
755
|
columnSize: (t) => `${t.value} pixels`,
|
|
755
756
|
resizerDescription: "Press Enter to start resizing"
|
|
756
757
|
};
|
|
757
|
-
var
|
|
758
|
-
|
|
758
|
+
var Tt = {};
|
|
759
|
+
Tt = {
|
|
759
760
|
ascending: "ascendente",
|
|
760
761
|
ascendingSort: (t) => `ordenado por columna ${t.columnName} en sentido ascendente`,
|
|
761
762
|
columnSize: (t) => `${t.value} píxeles`,
|
|
@@ -766,8 +767,8 @@ Kt = {
|
|
|
766
767
|
selectAll: "Seleccionar todos",
|
|
767
768
|
sortable: "columna ordenable"
|
|
768
769
|
};
|
|
769
|
-
var
|
|
770
|
-
|
|
770
|
+
var Nt = {};
|
|
771
|
+
Nt = {
|
|
771
772
|
ascending: "tõusev järjestus",
|
|
772
773
|
ascendingSort: (t) => `sorditud veeru järgi ${t.columnName} tõusvas järjestuses`,
|
|
773
774
|
columnSize: (t) => `${t.value} pikslit`,
|
|
@@ -778,8 +779,8 @@ Mt = {
|
|
|
778
779
|
selectAll: "Vali kõik",
|
|
779
780
|
sortable: "sorditav veerg"
|
|
780
781
|
};
|
|
781
|
-
var
|
|
782
|
-
|
|
782
|
+
var Ft = {};
|
|
783
|
+
Ft = {
|
|
783
784
|
ascending: "nouseva",
|
|
784
785
|
ascendingSort: (t) => `lajiteltu sarakkeen ${t.columnName} mukaan nousevassa järjestyksessä`,
|
|
785
786
|
columnSize: (t) => `${t.value} pikseliä`,
|
|
@@ -790,8 +791,8 @@ Nt = {
|
|
|
790
791
|
selectAll: "Valitse kaikki",
|
|
791
792
|
sortable: "lajiteltava sarake"
|
|
792
793
|
};
|
|
793
|
-
var
|
|
794
|
-
|
|
794
|
+
var It = {};
|
|
795
|
+
It = {
|
|
795
796
|
ascending: "croissant",
|
|
796
797
|
ascendingSort: (t) => `trié en fonction de la colonne ${t.columnName} par ordre croissant`,
|
|
797
798
|
columnSize: (t) => `${t.value} pixels`,
|
|
@@ -802,8 +803,8 @@ Tt = {
|
|
|
802
803
|
selectAll: "Sélectionner tout",
|
|
803
804
|
sortable: "colonne triable"
|
|
804
805
|
};
|
|
805
|
-
var
|
|
806
|
-
|
|
806
|
+
var Wt = {};
|
|
807
|
+
Wt = {
|
|
807
808
|
ascending: "עולה",
|
|
808
809
|
ascendingSort: (t) => `מוין לפי עמודה ${t.columnName} בסדר עולה`,
|
|
809
810
|
columnSize: (t) => `${t.value} פיקסלים`,
|
|
@@ -814,8 +815,8 @@ Ft = {
|
|
|
814
815
|
selectAll: "בחר הכול",
|
|
815
816
|
sortable: "עמודה שניתן למיין"
|
|
816
817
|
};
|
|
817
|
-
var
|
|
818
|
-
|
|
818
|
+
var Ht = {};
|
|
819
|
+
Ht = {
|
|
819
820
|
ascending: "rastući",
|
|
820
821
|
ascendingSort: (t) => `razvrstano po stupcima ${t.columnName} rastućem redoslijedom`,
|
|
821
822
|
columnSize: (t) => `${t.value} piksela`,
|
|
@@ -826,8 +827,8 @@ It = {
|
|
|
826
827
|
selectAll: "Odaberite sve",
|
|
827
828
|
sortable: "stupac koji se može razvrstati"
|
|
828
829
|
};
|
|
829
|
-
var
|
|
830
|
-
|
|
830
|
+
var Vt = {};
|
|
831
|
+
Vt = {
|
|
831
832
|
ascending: "növekvő",
|
|
832
833
|
ascendingSort: (t) => `rendezve a(z) ${t.columnName} oszlop szerint, növekvő sorrendben`,
|
|
833
834
|
columnSize: (t) => `${t.value} képpont`,
|
|
@@ -838,8 +839,8 @@ Wt = {
|
|
|
838
839
|
selectAll: "Összes kijelölése",
|
|
839
840
|
sortable: "rendezendő oszlop"
|
|
840
841
|
};
|
|
841
|
-
var
|
|
842
|
-
|
|
842
|
+
var jt = {};
|
|
843
|
+
jt = {
|
|
843
844
|
ascending: "crescente",
|
|
844
845
|
ascendingSort: (t) => `in ordine crescente in base alla colonna ${t.columnName}`,
|
|
845
846
|
columnSize: (t) => `${t.value} pixel`,
|
|
@@ -850,8 +851,8 @@ Ht = {
|
|
|
850
851
|
selectAll: "Seleziona tutto",
|
|
851
852
|
sortable: "colonna ordinabile"
|
|
852
853
|
};
|
|
853
|
-
var
|
|
854
|
-
|
|
854
|
+
var Ot = {};
|
|
855
|
+
Ot = {
|
|
855
856
|
ascending: "昇順",
|
|
856
857
|
ascendingSort: (t) => `列 ${t.columnName} を昇順で並べ替え`,
|
|
857
858
|
columnSize: (t) => `${t.value} ピクセル`,
|
|
@@ -862,8 +863,8 @@ Vt = {
|
|
|
862
863
|
selectAll: "すべて選択",
|
|
863
864
|
sortable: "並べ替え可能な列"
|
|
864
865
|
};
|
|
865
|
-
var
|
|
866
|
-
|
|
866
|
+
var Lt = {};
|
|
867
|
+
Lt = {
|
|
867
868
|
ascending: "오름차순",
|
|
868
869
|
ascendingSort: (t) => `${t.columnName} 열을 기준으로 오름차순으로 정렬됨`,
|
|
869
870
|
columnSize: (t) => `${t.value} 픽셀`,
|
|
@@ -874,8 +875,8 @@ jt = {
|
|
|
874
875
|
selectAll: "모두 선택",
|
|
875
876
|
sortable: "정렬 가능한 열"
|
|
876
877
|
};
|
|
877
|
-
var
|
|
878
|
-
|
|
878
|
+
var Ut = {};
|
|
879
|
+
Ut = {
|
|
879
880
|
ascending: "didėjančia tvarka",
|
|
880
881
|
ascendingSort: (t) => `surikiuota pagal stulpelį ${t.columnName} didėjančia tvarka`,
|
|
881
882
|
columnSize: (t) => `${t.value} piks.`,
|
|
@@ -886,8 +887,8 @@ Ot = {
|
|
|
886
887
|
selectAll: "Pasirinkti viską",
|
|
887
888
|
sortable: "rikiuojamas stulpelis"
|
|
888
889
|
};
|
|
889
|
-
var
|
|
890
|
-
|
|
890
|
+
var Yt = {};
|
|
891
|
+
Yt = {
|
|
891
892
|
ascending: "augošā secībā",
|
|
892
893
|
ascendingSort: (t) => `kārtots pēc kolonnas ${t.columnName} augošā secībā`,
|
|
893
894
|
columnSize: (t) => `${t.value} pikseļi`,
|
|
@@ -898,8 +899,8 @@ Lt = {
|
|
|
898
899
|
selectAll: "Atlasīt visu",
|
|
899
900
|
sortable: "kārtojamā kolonna"
|
|
900
901
|
};
|
|
901
|
-
var
|
|
902
|
-
|
|
902
|
+
var Xt = {};
|
|
903
|
+
Xt = {
|
|
903
904
|
ascending: "stigende",
|
|
904
905
|
ascendingSort: (t) => `sortert etter kolonne ${t.columnName} i stigende rekkefølge`,
|
|
905
906
|
columnSize: (t) => `${t.value} piksler`,
|
|
@@ -910,8 +911,8 @@ Ut = {
|
|
|
910
911
|
selectAll: "Velg alle",
|
|
911
912
|
sortable: "kolonne som kan sorteres"
|
|
912
913
|
};
|
|
913
|
-
var
|
|
914
|
-
|
|
914
|
+
var Gt = {};
|
|
915
|
+
Gt = {
|
|
915
916
|
ascending: "oplopend",
|
|
916
917
|
ascendingSort: (t) => `gesorteerd in oplopende volgorde in kolom ${t.columnName}`,
|
|
917
918
|
columnSize: (t) => `${t.value} pixels`,
|
|
@@ -922,8 +923,8 @@ Yt = {
|
|
|
922
923
|
selectAll: "Alles selecteren",
|
|
923
924
|
sortable: "sorteerbare kolom"
|
|
924
925
|
};
|
|
925
|
-
var
|
|
926
|
-
|
|
926
|
+
var qt = {};
|
|
927
|
+
qt = {
|
|
927
928
|
ascending: "rosnąco",
|
|
928
929
|
ascendingSort: (t) => `posortowano według kolumny ${t.columnName} w porządku rosnącym`,
|
|
929
930
|
columnSize: (t) => `Liczba pikseli: ${t.value}`,
|
|
@@ -934,8 +935,8 @@ Xt = {
|
|
|
934
935
|
selectAll: "Zaznacz wszystko",
|
|
935
936
|
sortable: "kolumna z możliwością sortowania"
|
|
936
937
|
};
|
|
937
|
-
var
|
|
938
|
-
|
|
938
|
+
var Zt = {};
|
|
939
|
+
Zt = {
|
|
939
940
|
ascending: "crescente",
|
|
940
941
|
ascendingSort: (t) => `classificado pela coluna ${t.columnName} em ordem crescente`,
|
|
941
942
|
columnSize: (t) => `${t.value} pixels`,
|
|
@@ -946,8 +947,8 @@ Gt = {
|
|
|
946
947
|
selectAll: "Selecionar tudo",
|
|
947
948
|
sortable: "coluna classificável"
|
|
948
949
|
};
|
|
949
|
-
var
|
|
950
|
-
|
|
950
|
+
var Qt = {};
|
|
951
|
+
Qt = {
|
|
951
952
|
ascending: "ascendente",
|
|
952
953
|
ascendingSort: (t) => `Ordenar por coluna ${t.columnName} em ordem ascendente`,
|
|
953
954
|
columnSize: (t) => `${t.value} pixels`,
|
|
@@ -958,8 +959,8 @@ qt = {
|
|
|
958
959
|
selectAll: "Selecionar tudo",
|
|
959
960
|
sortable: "Coluna ordenável"
|
|
960
961
|
};
|
|
961
|
-
var
|
|
962
|
-
|
|
962
|
+
var Jt = {};
|
|
963
|
+
Jt = {
|
|
963
964
|
ascending: "crescătoare",
|
|
964
965
|
ascendingSort: (t) => `sortate după coloana ${t.columnName} în ordine crescătoare`,
|
|
965
966
|
columnSize: (t) => `${t.value} pixeli`,
|
|
@@ -970,8 +971,8 @@ Zt = {
|
|
|
970
971
|
selectAll: "Selectare totală",
|
|
971
972
|
sortable: "coloană sortabilă"
|
|
972
973
|
};
|
|
973
|
-
var
|
|
974
|
-
|
|
974
|
+
var _t = {};
|
|
975
|
+
_t = {
|
|
975
976
|
ascending: "возрастание",
|
|
976
977
|
ascendingSort: (t) => `сортировать столбец ${t.columnName} в порядке возрастания`,
|
|
977
978
|
columnSize: (t) => `${t.value} пикс.`,
|
|
@@ -982,8 +983,8 @@ Qt = {
|
|
|
982
983
|
selectAll: "Выбрать все",
|
|
983
984
|
sortable: "сортируемый столбец"
|
|
984
985
|
};
|
|
985
|
-
var
|
|
986
|
-
|
|
986
|
+
var el = {};
|
|
987
|
+
el = {
|
|
987
988
|
ascending: "vzostupne",
|
|
988
989
|
ascendingSort: (t) => `zoradené zostupne podľa stĺpca ${t.columnName}`,
|
|
989
990
|
columnSize: (t) => `Počet pixelov: ${t.value}`,
|
|
@@ -994,8 +995,8 @@ Jt = {
|
|
|
994
995
|
selectAll: "Vybrať všetko",
|
|
995
996
|
sortable: "zoraditeľný stĺpec"
|
|
996
997
|
};
|
|
997
|
-
var
|
|
998
|
-
|
|
998
|
+
var tl = {};
|
|
999
|
+
tl = {
|
|
999
1000
|
ascending: "naraščajoče",
|
|
1000
1001
|
ascendingSort: (t) => `razvrščeno po stolpcu ${t.columnName} v naraščajočem vrstnem redu`,
|
|
1001
1002
|
columnSize: (t) => `${t.value} slikovnih pik`,
|
|
@@ -1006,8 +1007,8 @@ _t = {
|
|
|
1006
1007
|
selectAll: "Izberite vse",
|
|
1007
1008
|
sortable: "razvrstljivi stolpec"
|
|
1008
1009
|
};
|
|
1009
|
-
var
|
|
1010
|
-
|
|
1010
|
+
var ll = {};
|
|
1011
|
+
ll = {
|
|
1011
1012
|
ascending: "rastući",
|
|
1012
1013
|
ascendingSort: (t) => `sortirano po kolonama ${t.columnName} rastućim redosledom`,
|
|
1013
1014
|
columnSize: (t) => `${t.value} piksela`,
|
|
@@ -1018,8 +1019,8 @@ el = {
|
|
|
1018
1019
|
selectAll: "Izaberite sve",
|
|
1019
1020
|
sortable: "kolona koja se može sortirati"
|
|
1020
1021
|
};
|
|
1021
|
-
var
|
|
1022
|
-
|
|
1022
|
+
var nl = {};
|
|
1023
|
+
nl = {
|
|
1023
1024
|
ascending: "stigande",
|
|
1024
1025
|
ascendingSort: (t) => `sorterat på kolumn ${t.columnName} i stigande ordning`,
|
|
1025
1026
|
columnSize: (t) => `${t.value} pixlar`,
|
|
@@ -1030,8 +1031,8 @@ tl = {
|
|
|
1030
1031
|
selectAll: "Markera allt",
|
|
1031
1032
|
sortable: "sorterbar kolumn"
|
|
1032
1033
|
};
|
|
1033
|
-
var
|
|
1034
|
-
|
|
1034
|
+
var ol = {};
|
|
1035
|
+
ol = {
|
|
1035
1036
|
ascending: "artan sırada",
|
|
1036
1037
|
ascendingSort: (t) => `${t.columnName} sütuna göre artan düzende sırala`,
|
|
1037
1038
|
columnSize: (t) => `${t.value} piksel`,
|
|
@@ -1042,8 +1043,8 @@ ll = {
|
|
|
1042
1043
|
selectAll: "Tümünü Seç",
|
|
1043
1044
|
sortable: "Sıralanabilir sütun"
|
|
1044
1045
|
};
|
|
1045
|
-
var
|
|
1046
|
-
|
|
1046
|
+
var rl = {};
|
|
1047
|
+
rl = {
|
|
1047
1048
|
ascending: "висхідний",
|
|
1048
1049
|
ascendingSort: (t) => `відсортовано за стовпцем ${t.columnName} у висхідному порядку`,
|
|
1049
1050
|
columnSize: (t) => `${t.value} пікс.`,
|
|
@@ -1054,8 +1055,8 @@ nl = {
|
|
|
1054
1055
|
selectAll: "Вибрати все",
|
|
1055
1056
|
sortable: "сортувальний стовпець"
|
|
1056
1057
|
};
|
|
1057
|
-
var
|
|
1058
|
-
|
|
1058
|
+
var il = {};
|
|
1059
|
+
il = {
|
|
1059
1060
|
ascending: "升序",
|
|
1060
1061
|
ascendingSort: (t) => `按列 ${t.columnName} 升序排序`,
|
|
1061
1062
|
columnSize: (t) => `${t.value} 像素`,
|
|
@@ -1066,8 +1067,8 @@ ol = {
|
|
|
1066
1067
|
selectAll: "全选",
|
|
1067
1068
|
sortable: "可排序的列"
|
|
1068
1069
|
};
|
|
1069
|
-
var
|
|
1070
|
-
|
|
1070
|
+
var al = {};
|
|
1071
|
+
al = {
|
|
1071
1072
|
ascending: "遞增",
|
|
1072
1073
|
ascendingSort: (t) => `已依據「${t.columnName}」欄遞增排序`,
|
|
1073
1074
|
columnSize: (t) => `${t.value} 像素`,
|
|
@@ -1078,44 +1079,44 @@ il = {
|
|
|
1078
1079
|
selectAll: "全選",
|
|
1079
1080
|
sortable: "可排序的欄"
|
|
1080
1081
|
};
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1083
|
-
"ar-AE":
|
|
1084
|
-
"bg-BG":
|
|
1085
|
-
"cs-CZ":
|
|
1086
|
-
"da-DK":
|
|
1082
|
+
var ke = {};
|
|
1083
|
+
ke = {
|
|
1084
|
+
"ar-AE": zt,
|
|
1085
|
+
"bg-BG": Rt,
|
|
1086
|
+
"cs-CZ": Bt,
|
|
1087
|
+
"da-DK": Pt,
|
|
1087
1088
|
"de-DE": At,
|
|
1088
|
-
"el-GR":
|
|
1089
|
-
"en-US":
|
|
1090
|
-
"es-ES":
|
|
1091
|
-
"et-EE":
|
|
1092
|
-
"fi-FI":
|
|
1093
|
-
"fr-FR":
|
|
1094
|
-
"he-IL":
|
|
1095
|
-
"hr-HR":
|
|
1096
|
-
"hu-HU":
|
|
1097
|
-
"it-IT":
|
|
1098
|
-
"ja-JP":
|
|
1099
|
-
"ko-KR":
|
|
1100
|
-
"lt-LT":
|
|
1101
|
-
"lv-LV":
|
|
1102
|
-
"nb-NO":
|
|
1103
|
-
"nl-NL":
|
|
1104
|
-
"pl-PL":
|
|
1105
|
-
"pt-BR":
|
|
1106
|
-
"pt-PT":
|
|
1107
|
-
"ro-RO":
|
|
1108
|
-
"ru-RU":
|
|
1109
|
-
"sk-SK":
|
|
1110
|
-
"sl-SI":
|
|
1111
|
-
"sr-SP":
|
|
1112
|
-
"sv-SE":
|
|
1113
|
-
"tr-TR":
|
|
1114
|
-
"uk-UA":
|
|
1115
|
-
"zh-CN":
|
|
1116
|
-
"zh-TW":
|
|
1089
|
+
"el-GR": Kt,
|
|
1090
|
+
"en-US": Mt,
|
|
1091
|
+
"es-ES": Tt,
|
|
1092
|
+
"et-EE": Nt,
|
|
1093
|
+
"fi-FI": Ft,
|
|
1094
|
+
"fr-FR": It,
|
|
1095
|
+
"he-IL": Wt,
|
|
1096
|
+
"hr-HR": Ht,
|
|
1097
|
+
"hu-HU": Vt,
|
|
1098
|
+
"it-IT": jt,
|
|
1099
|
+
"ja-JP": Ot,
|
|
1100
|
+
"ko-KR": Lt,
|
|
1101
|
+
"lt-LT": Ut,
|
|
1102
|
+
"lv-LV": Yt,
|
|
1103
|
+
"nb-NO": Xt,
|
|
1104
|
+
"nl-NL": Gt,
|
|
1105
|
+
"pl-PL": qt,
|
|
1106
|
+
"pt-BR": Zt,
|
|
1107
|
+
"pt-PT": Qt,
|
|
1108
|
+
"ro-RO": Jt,
|
|
1109
|
+
"ru-RU": _t,
|
|
1110
|
+
"sk-SK": el,
|
|
1111
|
+
"sl-SI": tl,
|
|
1112
|
+
"sr-SP": ll,
|
|
1113
|
+
"sv-SE": nl,
|
|
1114
|
+
"tr-TR": ol,
|
|
1115
|
+
"uk-UA": rl,
|
|
1116
|
+
"zh-CN": il,
|
|
1117
|
+
"zh-TW": al
|
|
1117
1118
|
};
|
|
1118
|
-
class
|
|
1119
|
+
class wn extends Dt {
|
|
1119
1120
|
isCell(e) {
|
|
1120
1121
|
return e.type === "cell" || e.type === "rowheader" || e.type === "column";
|
|
1121
1122
|
}
|
|
@@ -1123,7 +1124,7 @@ class $n extends xt {
|
|
|
1123
1124
|
let l = this.collection.getItem(e);
|
|
1124
1125
|
if (!l) return null;
|
|
1125
1126
|
if (l.type === "column") {
|
|
1126
|
-
let n = le(
|
|
1127
|
+
let n = le(H(l, this.collection));
|
|
1127
1128
|
if (n) return n.key;
|
|
1128
1129
|
let o = this.getFirstKey();
|
|
1129
1130
|
return o == null || !this.collection.getItem(o) ? null : super.getKeyForItemInRowByIndex(o, l.index);
|
|
@@ -1134,8 +1135,8 @@ class $n extends xt {
|
|
|
1134
1135
|
let l = this.collection.getItem(e);
|
|
1135
1136
|
if (!l) return null;
|
|
1136
1137
|
if (l.type === "column") {
|
|
1137
|
-
let
|
|
1138
|
-
return
|
|
1138
|
+
let r = l.parentKey != null ? this.collection.getItem(l.parentKey) : null;
|
|
1139
|
+
return r && r.type === "column" ? r.key : null;
|
|
1139
1140
|
}
|
|
1140
1141
|
let n = super.getKeyAbove(e), o = n != null ? this.collection.getItem(n) : null;
|
|
1141
1142
|
return o && o.type !== "headerrow" ? n : this.isCell(l) ? this.collection.columns[l.index].key : this.collection.columns[0].key;
|
|
@@ -1144,19 +1145,19 @@ class $n extends xt {
|
|
|
1144
1145
|
let l = this.findNextKey(e.key, (o) => o.type === "column");
|
|
1145
1146
|
if (l != null) return l;
|
|
1146
1147
|
let n = this.collection.headerRows[e.level];
|
|
1147
|
-
for (let o of
|
|
1148
|
+
for (let o of H(n, this.collection))
|
|
1148
1149
|
if (o.type === "column") return o.key;
|
|
1149
1150
|
return null;
|
|
1150
1151
|
}
|
|
1151
1152
|
findPreviousColumnKey(e) {
|
|
1152
|
-
let l = this.findPreviousKey(e.key, (
|
|
1153
|
+
let l = this.findPreviousKey(e.key, (r) => r.type === "column");
|
|
1153
1154
|
if (l != null) return l;
|
|
1154
1155
|
let n = this.collection.headerRows[e.level], o = [
|
|
1155
|
-
...
|
|
1156
|
+
...H(n, this.collection)
|
|
1156
1157
|
];
|
|
1157
|
-
for (let
|
|
1158
|
-
let
|
|
1159
|
-
if (
|
|
1158
|
+
for (let r = o.length - 1; r >= 0; r--) {
|
|
1159
|
+
let i = o[r];
|
|
1160
|
+
if (i.type === "column") return i.key;
|
|
1160
1161
|
}
|
|
1161
1162
|
return null;
|
|
1162
1163
|
}
|
|
@@ -1172,83 +1173,83 @@ class $n extends xt {
|
|
|
1172
1173
|
if (!this.collator) return null;
|
|
1173
1174
|
let n = this.collection, o = l ?? this.getFirstKey();
|
|
1174
1175
|
if (o == null) return null;
|
|
1175
|
-
let
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1178
|
-
let
|
|
1176
|
+
let r = n.getItem(o);
|
|
1177
|
+
var i;
|
|
1178
|
+
r?.type === "cell" && (o = (i = r.parentKey) !== null && i !== void 0 ? i : null);
|
|
1179
|
+
let a = !1;
|
|
1179
1180
|
for (; o != null; ) {
|
|
1180
1181
|
let c = n.getItem(o);
|
|
1181
1182
|
if (!c) return null;
|
|
1182
1183
|
if (c.textValue) {
|
|
1183
|
-
let
|
|
1184
|
-
if (this.collator.compare(
|
|
1184
|
+
let d = c.textValue.slice(0, e.length);
|
|
1185
|
+
if (this.collator.compare(d, e) === 0) return c.key;
|
|
1185
1186
|
}
|
|
1186
|
-
for (let
|
|
1187
|
-
let
|
|
1188
|
-
if (n.rowHeaderColumnKeys.has(
|
|
1189
|
-
let s =
|
|
1187
|
+
for (let d of H(c, this.collection)) {
|
|
1188
|
+
let u = n.columns[d.index];
|
|
1189
|
+
if (n.rowHeaderColumnKeys.has(u.key) && d.textValue) {
|
|
1190
|
+
let s = d.textValue.slice(0, e.length);
|
|
1190
1191
|
if (this.collator.compare(s, e) === 0) {
|
|
1191
|
-
let p = l != null ? n.getItem(l) :
|
|
1192
|
-
return p?.type === "cell" ?
|
|
1192
|
+
let p = l != null ? n.getItem(l) : r;
|
|
1193
|
+
return p?.type === "cell" ? d.key : c.key;
|
|
1193
1194
|
}
|
|
1194
1195
|
}
|
|
1195
1196
|
}
|
|
1196
|
-
o = this.getKeyBelow(o), o == null && !
|
|
1197
|
+
o = this.getKeyBelow(o), o == null && !a && (o = this.getFirstKey(), a = !0);
|
|
1197
1198
|
}
|
|
1198
1199
|
return null;
|
|
1199
1200
|
}
|
|
1200
1201
|
}
|
|
1201
|
-
function
|
|
1202
|
+
function Dn(t) {
|
|
1202
1203
|
return t && t.__esModule ? t.default : t;
|
|
1203
1204
|
}
|
|
1204
|
-
function
|
|
1205
|
-
let { keyboardDelegate: n, isVirtualized: o, layoutDelegate:
|
|
1205
|
+
function Cn(t, e, l) {
|
|
1206
|
+
let { keyboardDelegate: n, isVirtualized: o, layoutDelegate: r, layout: i } = t, a = xt({
|
|
1206
1207
|
usage: "search",
|
|
1207
1208
|
sensitivity: "base"
|
|
1208
|
-
}), { direction: c } = ge(),
|
|
1209
|
+
}), { direction: c } = ge(), d = e.selectionManager.disabledBehavior, u = K(() => n || new wn({
|
|
1209
1210
|
collection: e.collection,
|
|
1210
1211
|
disabledKeys: e.disabledKeys,
|
|
1211
|
-
disabledBehavior:
|
|
1212
|
+
disabledBehavior: d,
|
|
1212
1213
|
ref: l,
|
|
1213
1214
|
direction: c,
|
|
1214
|
-
collator:
|
|
1215
|
-
layoutDelegate:
|
|
1216
|
-
layout:
|
|
1215
|
+
collator: a,
|
|
1216
|
+
layoutDelegate: r,
|
|
1217
|
+
layout: i
|
|
1217
1218
|
}), [
|
|
1218
1219
|
n,
|
|
1219
1220
|
e.collection,
|
|
1220
1221
|
e.disabledKeys,
|
|
1221
|
-
|
|
1222
|
+
d,
|
|
1222
1223
|
l,
|
|
1223
1224
|
c,
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
]), s =
|
|
1228
|
-
|
|
1229
|
-
let { gridProps: p } =
|
|
1225
|
+
a,
|
|
1226
|
+
r,
|
|
1227
|
+
i
|
|
1228
|
+
]), s = Ae(t.id);
|
|
1229
|
+
Oe.set(e, s);
|
|
1230
|
+
let { gridProps: p } = bn({
|
|
1230
1231
|
...t,
|
|
1231
1232
|
id: s,
|
|
1232
|
-
keyboardDelegate:
|
|
1233
|
+
keyboardDelegate: u
|
|
1233
1234
|
}, e, l);
|
|
1234
|
-
o && (p["aria-rowcount"] = e.collection.size + e.collection.headerRows.length),
|
|
1235
|
-
let { column: f, direction: h } = e.sortDescriptor || {},
|
|
1236
|
-
var
|
|
1237
|
-
let $ = (
|
|
1238
|
-
return h && f ?
|
|
1235
|
+
o && (p["aria-rowcount"] = e.collection.size + e.collection.headerRows.length), Be() && "expandedKeys" in e && (p.role = "treegrid");
|
|
1236
|
+
let { column: f, direction: h } = e.sortDescriptor || {}, m = be(Dn(ke), "@react-aria/table"), y = K(() => {
|
|
1237
|
+
var w, g;
|
|
1238
|
+
let $ = (g = (w = e.collection.columns.find((b) => b.key === f)) === null || w === void 0 ? void 0 : w.textValue) !== null && g !== void 0 ? g : "";
|
|
1239
|
+
return h && f ? m.format(`${h}Sort`, {
|
|
1239
1240
|
columnName: $
|
|
1240
1241
|
}) : void 0;
|
|
1241
1242
|
}, [
|
|
1242
1243
|
h,
|
|
1243
1244
|
f,
|
|
1244
1245
|
e.collection.columns
|
|
1245
|
-
]), v =
|
|
1246
|
-
return
|
|
1247
|
-
y &&
|
|
1246
|
+
]), v = Ve(y);
|
|
1247
|
+
return ln(() => {
|
|
1248
|
+
y && tn(y, "assertive", 500);
|
|
1248
1249
|
}, [
|
|
1249
1250
|
y
|
|
1250
1251
|
]), {
|
|
1251
|
-
gridProps:
|
|
1252
|
+
gridProps: V(p, v, {
|
|
1252
1253
|
// merge sort description with long press information
|
|
1253
1254
|
"aria-describedby": [
|
|
1254
1255
|
v["aria-describedby"],
|
|
@@ -1257,37 +1258,37 @@ function wn(t, e, l) {
|
|
|
1257
1258
|
})
|
|
1258
1259
|
};
|
|
1259
1260
|
}
|
|
1260
|
-
function
|
|
1261
|
+
function Sn(t) {
|
|
1261
1262
|
return t && t.__esModule ? t.default : t;
|
|
1262
1263
|
}
|
|
1263
|
-
function
|
|
1264
|
+
function kn(t, e, l) {
|
|
1264
1265
|
var n, o;
|
|
1265
|
-
let { node:
|
|
1266
|
+
let { node: r } = t, i = r.props.allowsSorting, { gridCellProps: a } = Ct({
|
|
1266
1267
|
...t,
|
|
1267
1268
|
focusMode: "child"
|
|
1268
|
-
}, e, l), c =
|
|
1269
|
-
isDisabled: !
|
|
1269
|
+
}, e, l), c = r.props.isSelectionCell && e.selectionManager.selectionMode === "single", { pressProps: d } = $t({
|
|
1270
|
+
isDisabled: !i || c,
|
|
1270
1271
|
onPress() {
|
|
1271
|
-
e.sort(
|
|
1272
|
+
e.sort(r.key);
|
|
1272
1273
|
},
|
|
1273
1274
|
ref: l
|
|
1274
|
-
}), { focusableProps:
|
|
1275
|
-
|
|
1276
|
-
let h = be(
|
|
1277
|
-
|
|
1278
|
-
let y =
|
|
1275
|
+
}), { focusableProps: u } = Ll({}, l), s, p = ((n = e.sortDescriptor) === null || n === void 0 ? void 0 : n.column) === r.key, f = (o = e.sortDescriptor) === null || o === void 0 ? void 0 : o.direction;
|
|
1276
|
+
r.props.allowsSorting && !it() && (s = p ? f : "none");
|
|
1277
|
+
let h = be(Sn(ke), "@react-aria/table"), m;
|
|
1278
|
+
i && (m = `${h.format("sortable")}`, p && f && it() && (m = `${m}, ${h.format(f)}`));
|
|
1279
|
+
let y = Ve(m), v = e.collection.size === 0;
|
|
1279
1280
|
return ue(() => {
|
|
1280
|
-
v && e.selectionManager.focusedKey ===
|
|
1281
|
+
v && e.selectionManager.focusedKey === r.key && e.selectionManager.setFocusedKey(null);
|
|
1281
1282
|
}, [
|
|
1282
1283
|
v,
|
|
1283
1284
|
e.selectionManager,
|
|
1284
|
-
|
|
1285
|
+
r.key
|
|
1285
1286
|
]), {
|
|
1286
1287
|
columnHeaderProps: {
|
|
1287
|
-
...
|
|
1288
|
-
d,
|
|
1288
|
+
...V(
|
|
1289
1289
|
u,
|
|
1290
1290
|
a,
|
|
1291
|
+
d,
|
|
1291
1292
|
y,
|
|
1292
1293
|
// If the table is empty, make all column headers untabbable
|
|
1293
1294
|
v ? {
|
|
@@ -1295,13 +1296,13 @@ function Cn(t, e, l) {
|
|
|
1295
1296
|
} : null
|
|
1296
1297
|
),
|
|
1297
1298
|
role: "columnheader",
|
|
1298
|
-
id:
|
|
1299
|
-
"aria-colspan":
|
|
1299
|
+
id: St(e, r.key),
|
|
1300
|
+
"aria-colspan": r.colSpan && r.colSpan > 1 ? r.colSpan : void 0,
|
|
1300
1301
|
"aria-sort": s
|
|
1301
1302
|
}
|
|
1302
1303
|
};
|
|
1303
1304
|
}
|
|
1304
|
-
const
|
|
1305
|
+
const dt = {
|
|
1305
1306
|
expand: {
|
|
1306
1307
|
ltr: "ArrowRight",
|
|
1307
1308
|
rtl: "ArrowLeft"
|
|
@@ -1311,62 +1312,62 @@ const st = {
|
|
|
1311
1312
|
rtl: "ArrowRight"
|
|
1312
1313
|
}
|
|
1313
1314
|
};
|
|
1314
|
-
function
|
|
1315
|
-
let { node: n, isVirtualized: o } = t, { rowProps:
|
|
1316
|
-
o && !(
|
|
1315
|
+
function En(t, e, l) {
|
|
1316
|
+
let { node: n, isVirtualized: o } = t, { rowProps: r, ...i } = yn(t, e, l), { direction: a } = ge();
|
|
1317
|
+
o && !(Be() && "expandedKeys" in e) ? r["aria-rowindex"] = n.index + 1 + e.collection.headerRows.length : delete r["aria-rowindex"];
|
|
1317
1318
|
let c = {};
|
|
1318
|
-
if (
|
|
1319
|
+
if (Be() && "expandedKeys" in e) {
|
|
1319
1320
|
let b = e.keyMap.get(n.key);
|
|
1320
1321
|
if (b != null) {
|
|
1321
|
-
var
|
|
1322
|
-
let
|
|
1323
|
-
var
|
|
1322
|
+
var d, u, s, p, f, h;
|
|
1323
|
+
let C = ((d = b.props) === null || d === void 0 ? void 0 : d.UNSTABLE_childItems) || ((s = b.props) === null || s === void 0 || (u = s.children) === null || u === void 0 ? void 0 : u.length) > e.userColumnCount;
|
|
1324
|
+
var m, y, v, w;
|
|
1324
1325
|
c = {
|
|
1325
|
-
onKeyDown: (
|
|
1326
|
-
(
|
|
1326
|
+
onKeyDown: (k) => {
|
|
1327
|
+
(k.key === dt.expand[a] && e.selectionManager.focusedKey === b.key && C && e.expandedKeys !== "all" && !e.expandedKeys.has(b.key) || k.key === dt.collapse[a] && e.selectionManager.focusedKey === b.key && C && (e.expandedKeys === "all" || e.expandedKeys.has(b.key))) && (e.toggleKey(b.key), k.stopPropagation());
|
|
1327
1328
|
},
|
|
1328
|
-
"aria-expanded":
|
|
1329
|
+
"aria-expanded": C ? e.expandedKeys === "all" || e.expandedKeys.has(n.key) : void 0,
|
|
1329
1330
|
"aria-level": b.level,
|
|
1330
|
-
"aria-posinset": ((
|
|
1331
|
-
"aria-setsize": b.level > 1 ? ((v = (p = ne((y = (f = e.keyMap.get(b.parentKey)) === null || f === void 0 ? void 0 : f.childNodes) !== null && y !== void 0 ? y : [])) === null || p === void 0 ? void 0 : p.indexOfType) !== null && v !== void 0 ? v : 0) + 1 : ((
|
|
1331
|
+
"aria-posinset": ((m = b.indexOfType) !== null && m !== void 0 ? m : 0) + 1,
|
|
1332
|
+
"aria-setsize": b.level > 1 ? ((v = (p = ne((y = (f = e.keyMap.get(b.parentKey)) === null || f === void 0 ? void 0 : f.childNodes) !== null && y !== void 0 ? y : [])) === null || p === void 0 ? void 0 : p.indexOfType) !== null && v !== void 0 ? v : 0) + 1 : ((w = (h = ne(e.collection.body.childNodes)) === null || h === void 0 ? void 0 : h.indexOfType) !== null && w !== void 0 ? w : 0) + 1
|
|
1332
1333
|
};
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
|
-
let
|
|
1336
|
+
let g = Zl(n.props), $ = i.hasAction ? g : {};
|
|
1336
1337
|
return {
|
|
1337
1338
|
rowProps: {
|
|
1338
|
-
...
|
|
1339
|
-
"aria-labelledby":
|
|
1339
|
+
...V(r, c, $),
|
|
1340
|
+
"aria-labelledby": Et(e, n.key)
|
|
1340
1341
|
},
|
|
1341
|
-
...
|
|
1342
|
+
...i
|
|
1342
1343
|
};
|
|
1343
1344
|
}
|
|
1344
|
-
function
|
|
1345
|
-
let { node: n, isVirtualized: o } = t,
|
|
1345
|
+
function zn(t, e, l) {
|
|
1346
|
+
let { node: n, isVirtualized: o } = t, r = {
|
|
1346
1347
|
role: "row"
|
|
1347
1348
|
};
|
|
1348
|
-
return o && !(
|
|
1349
|
-
rowProps:
|
|
1349
|
+
return o && !(Be() && "expandedKeys" in e) && (r["aria-rowindex"] = n.index + 1), {
|
|
1350
|
+
rowProps: r
|
|
1350
1351
|
};
|
|
1351
1352
|
}
|
|
1352
|
-
function
|
|
1353
|
+
function Rn(t, e, l) {
|
|
1353
1354
|
var n;
|
|
1354
|
-
let { gridCellProps: o, isPressed:
|
|
1355
|
-
return
|
|
1355
|
+
let { gridCellProps: o, isPressed: r } = Ct(t, e, l), i = (n = t.node.column) === null || n === void 0 ? void 0 : n.key;
|
|
1356
|
+
return i != null && e.collection.rowHeaderColumnKeys.has(i) && (o.role = "rowheader", o.id = kt(e, t.node.parentKey, i)), {
|
|
1356
1357
|
gridCellProps: o,
|
|
1357
|
-
isPressed:
|
|
1358
|
+
isPressed: r
|
|
1358
1359
|
};
|
|
1359
1360
|
}
|
|
1360
|
-
function
|
|
1361
|
+
function Bn(t) {
|
|
1361
1362
|
return t && t.__esModule ? t.default : t;
|
|
1362
1363
|
}
|
|
1363
|
-
function
|
|
1364
|
+
function Pn(t, e) {
|
|
1364
1365
|
let { key: l } = t;
|
|
1365
|
-
const { checkboxProps: n } =
|
|
1366
|
+
const { checkboxProps: n } = xn(t, e);
|
|
1366
1367
|
return {
|
|
1367
1368
|
checkboxProps: {
|
|
1368
1369
|
...n,
|
|
1369
|
-
"aria-labelledby": `${n.id} ${
|
|
1370
|
+
"aria-labelledby": `${n.id} ${Et(e, l)}`
|
|
1370
1371
|
}
|
|
1371
1372
|
};
|
|
1372
1373
|
}
|
|
@@ -1374,7 +1375,7 @@ function An(t) {
|
|
|
1374
1375
|
let { isEmpty: e, isSelectAll: l, selectionMode: n } = t.selectionManager;
|
|
1375
1376
|
return {
|
|
1376
1377
|
checkboxProps: {
|
|
1377
|
-
"aria-label": be(
|
|
1378
|
+
"aria-label": be(Bn(ke), "@react-aria/table").format(n === "single" ? "select" : "selectAll"),
|
|
1378
1379
|
isSelected: l,
|
|
1379
1380
|
isDisabled: n !== "multiple" || t.collection.size === 0 || t.collection.rows.length === 1 && t.collection.rows[0].type === "loader",
|
|
1380
1381
|
isIndeterminate: !e && !l,
|
|
@@ -1382,132 +1383,132 @@ function An(t) {
|
|
|
1382
1383
|
}
|
|
1383
1384
|
};
|
|
1384
1385
|
}
|
|
1385
|
-
function
|
|
1386
|
+
function Kn(t) {
|
|
1386
1387
|
return t && t.__esModule ? t.default : t;
|
|
1387
1388
|
}
|
|
1388
|
-
function
|
|
1389
|
-
let { column: n, triggerRef: o, isDisabled:
|
|
1390
|
-
const
|
|
1391
|
-
let s =
|
|
1392
|
-
onKeyDown: (
|
|
1393
|
-
y ? (
|
|
1394
|
-
}
|
|
1395
|
-
}),
|
|
1396
|
-
f.current || (h.current = e.updateResizedColumns(
|
|
1397
|
-
}), $ =
|
|
1398
|
-
let
|
|
1399
|
-
|
|
1400
|
-
}), b =
|
|
1401
|
-
f.current && (h.current == null && (h.current = e.updateResizedColumns(
|
|
1389
|
+
function Mn(t, e, l) {
|
|
1390
|
+
let { column: n, triggerRef: o, isDisabled: r, onResizeStart: i, onResize: a, onResizeEnd: c, "aria-label": d } = t;
|
|
1391
|
+
const u = be(Kn(ke), "@react-aria/table");
|
|
1392
|
+
let s = Ae(), p = e.resizingColumn === n.key, f = A(p), h = A(null), m = A(!1), y = e.tableState.isKeyboardNavigationDisabled, { direction: v } = ge(), { keyboardProps: w } = Ul({
|
|
1393
|
+
onKeyDown: (x) => {
|
|
1394
|
+
y ? (x.key === "Escape" || x.key === "Enter" || x.key === " " || x.key === "Tab") && (x.preventDefault(), b(n)) : (x.continuePropagation(), x.key === "Enter" && g(n));
|
|
1395
|
+
}
|
|
1396
|
+
}), g = we((x) => {
|
|
1397
|
+
f.current || (h.current = e.updateResizedColumns(x.key, e.getColumnWidth(x.key)), e.startResize(x.key), e.tableState.setKeyboardNavigationDisabled(!0), i?.(h.current)), f.current = !0;
|
|
1398
|
+
}), $ = we((x, z) => {
|
|
1399
|
+
let W = e.updateResizedColumns(x.key, z);
|
|
1400
|
+
a?.(W), h.current = W;
|
|
1401
|
+
}), b = we((x) => {
|
|
1402
|
+
f.current && (h.current == null && (h.current = e.updateResizedColumns(x.key, e.getColumnWidth(x.key))), e.endResize(), e.tableState.setKeyboardNavigationDisabled(!1), c?.(h.current), f.current = !1, o?.current && !m.current && G(o.current)), h.current = null;
|
|
1402
1403
|
});
|
|
1403
|
-
const
|
|
1404
|
+
const C = A(0), { moveProps: k } = mn({
|
|
1404
1405
|
onMoveStart() {
|
|
1405
|
-
|
|
1406
|
+
C.current = e.getColumnWidth(n.key), g(n);
|
|
1406
1407
|
},
|
|
1407
|
-
onMove(
|
|
1408
|
-
let { deltaX:
|
|
1409
|
-
v === "rtl" && (
|
|
1408
|
+
onMove(x) {
|
|
1409
|
+
let { deltaX: z, deltaY: W, pointerType: Ee } = x;
|
|
1410
|
+
v === "rtl" && (z *= -1), Ee === "keyboard" && (W !== 0 && z === 0 && (z = W * -1), z *= 10), z !== 0 && (C.current += z, $(n, C.current));
|
|
1410
1411
|
},
|
|
1411
|
-
onMoveEnd(
|
|
1412
|
-
let { pointerType:
|
|
1413
|
-
|
|
1412
|
+
onMoveEnd(x) {
|
|
1413
|
+
let { pointerType: z } = x;
|
|
1414
|
+
C.current = 0, (z === "mouse" || z === "touch" && m.current) && b(n);
|
|
1414
1415
|
}
|
|
1415
1416
|
});
|
|
1416
|
-
let
|
|
1417
|
-
var
|
|
1418
|
-
y && ((
|
|
1417
|
+
let R = O((x) => {
|
|
1418
|
+
var z;
|
|
1419
|
+
y && ((z = k.onKeyDown) === null || z === void 0 || z.call(k, x));
|
|
1419
1420
|
}, [
|
|
1420
1421
|
y,
|
|
1421
|
-
|
|
1422
|
+
k
|
|
1422
1423
|
]), P = Math.floor(e.getColumnMinWidth(n.key)), E = Math.floor(e.getColumnMaxWidth(n.key));
|
|
1423
1424
|
E === 1 / 0 && (E = Number.MAX_SAFE_INTEGER);
|
|
1424
|
-
let
|
|
1425
|
-
|
|
1426
|
-
let
|
|
1427
|
-
"aria-label":
|
|
1425
|
+
let M = Math.floor(e.getColumnWidth(n.key)), N = Xl();
|
|
1426
|
+
N === "virtual" && typeof window < "u" && "ontouchstart" in window && (N = "touch");
|
|
1427
|
+
let T = o?.current == null && (N === "keyboard" || N === "virtual") && !p ? u.format("resizerDescription") : void 0, F = Ve(T), I = {
|
|
1428
|
+
"aria-label": d,
|
|
1428
1429
|
"aria-orientation": "horizontal",
|
|
1429
|
-
"aria-labelledby": `${s} ${
|
|
1430
|
-
"aria-valuetext":
|
|
1431
|
-
value:
|
|
1430
|
+
"aria-labelledby": `${s} ${St(e.tableState, n.key)}`,
|
|
1431
|
+
"aria-valuetext": u.format("columnSize", {
|
|
1432
|
+
value: M
|
|
1432
1433
|
}),
|
|
1433
1434
|
type: "range",
|
|
1434
1435
|
min: P,
|
|
1435
1436
|
max: E,
|
|
1436
|
-
value:
|
|
1437
|
-
...
|
|
1437
|
+
value: M,
|
|
1438
|
+
...F
|
|
1438
1439
|
};
|
|
1439
|
-
const
|
|
1440
|
-
l.current &&
|
|
1440
|
+
const j = O(() => {
|
|
1441
|
+
l.current && G(l.current);
|
|
1441
1442
|
}, [
|
|
1442
1443
|
l
|
|
1443
1444
|
]);
|
|
1444
|
-
let
|
|
1445
|
+
let U = e.resizingColumn, ee = A(null);
|
|
1445
1446
|
ue(() => {
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1448
|
-
let
|
|
1447
|
+
if (ee.current !== U && U != null && U === n.key) {
|
|
1448
|
+
m.current = document.activeElement === l.current, g(n);
|
|
1449
|
+
let x = setTimeout(() => j(), 0), z = setTimeout(j, 400);
|
|
1449
1450
|
return () => {
|
|
1450
|
-
clearTimeout(
|
|
1451
|
+
clearTimeout(x), clearTimeout(z);
|
|
1451
1452
|
};
|
|
1452
1453
|
}
|
|
1453
|
-
|
|
1454
|
+
ee.current = U;
|
|
1454
1455
|
}, [
|
|
1455
|
-
Y,
|
|
1456
|
-
n,
|
|
1457
1456
|
U,
|
|
1457
|
+
n,
|
|
1458
|
+
j,
|
|
1458
1459
|
l,
|
|
1459
|
-
|
|
1460
|
+
g
|
|
1460
1461
|
]);
|
|
1461
|
-
let
|
|
1462
|
-
let
|
|
1463
|
-
|
|
1464
|
-
}, { pressProps:
|
|
1462
|
+
let $e = (x) => {
|
|
1463
|
+
let z = e.getColumnWidth(n.key), W = parseFloat(x.target.value);
|
|
1464
|
+
W > z ? W = z + 10 : W = z - 10, $(n, W);
|
|
1465
|
+
}, { pressProps: te } = $t({
|
|
1465
1466
|
preventFocusOnPress: !0,
|
|
1466
|
-
onPressStart: (
|
|
1467
|
-
if (!(
|
|
1468
|
-
if (
|
|
1467
|
+
onPressStart: (x) => {
|
|
1468
|
+
if (!(x.ctrlKey || x.altKey || x.metaKey || x.shiftKey || x.pointerType === "keyboard")) {
|
|
1469
|
+
if (x.pointerType === "virtual" && e.resizingColumn != null) {
|
|
1469
1470
|
b(n);
|
|
1470
1471
|
return;
|
|
1471
1472
|
}
|
|
1472
|
-
|
|
1473
|
+
j(), x.pointerType !== "virtual" && g(n);
|
|
1473
1474
|
}
|
|
1474
1475
|
},
|
|
1475
|
-
onPress: (
|
|
1476
|
-
(
|
|
1476
|
+
onPress: (x) => {
|
|
1477
|
+
(x.pointerType === "touch" && m.current || x.pointerType === "mouse") && e.resizingColumn != null && b(n);
|
|
1477
1478
|
}
|
|
1478
|
-
}), { visuallyHiddenProps:
|
|
1479
|
+
}), { visuallyHiddenProps: J } = Ke();
|
|
1479
1480
|
return {
|
|
1480
|
-
resizerProps:
|
|
1481
|
-
...
|
|
1482
|
-
onKeyDown:
|
|
1483
|
-
},
|
|
1481
|
+
resizerProps: V(w, {
|
|
1482
|
+
...k,
|
|
1483
|
+
onKeyDown: R
|
|
1484
|
+
}, te, {
|
|
1484
1485
|
style: {
|
|
1485
1486
|
touchAction: "none"
|
|
1486
1487
|
}
|
|
1487
1488
|
}),
|
|
1488
|
-
inputProps:
|
|
1489
|
+
inputProps: V(J, {
|
|
1489
1490
|
id: s,
|
|
1490
1491
|
onBlur: () => {
|
|
1491
1492
|
b(n);
|
|
1492
1493
|
},
|
|
1493
|
-
onChange:
|
|
1494
|
-
disabled:
|
|
1494
|
+
onChange: $e,
|
|
1495
|
+
disabled: r
|
|
1495
1496
|
}, I),
|
|
1496
1497
|
isResizing: p
|
|
1497
1498
|
};
|
|
1498
1499
|
}
|
|
1499
|
-
function
|
|
1500
|
-
return
|
|
1500
|
+
function ul() {
|
|
1501
|
+
return vn();
|
|
1501
1502
|
}
|
|
1502
|
-
function
|
|
1503
|
+
function Tn(t) {
|
|
1503
1504
|
return t != null && (!isNaN(t) || String(t).match(/^(\d+)(?=%$)/) !== null);
|
|
1504
1505
|
}
|
|
1505
|
-
function
|
|
1506
|
+
function Nn(t) {
|
|
1506
1507
|
if (!t || typeof t == "number") return 1;
|
|
1507
1508
|
let e = t.match(/^(.+)(?=fr$)/);
|
|
1508
1509
|
return e ? parseFloat(e[0]) : (process.env.NODE_ENV !== "production" && console.warn(`width: ${t} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`, "defaulting to '1fr'"), 1);
|
|
1509
1510
|
}
|
|
1510
|
-
function
|
|
1511
|
+
function Le(t, e) {
|
|
1511
1512
|
if (typeof t == "string") {
|
|
1512
1513
|
let l = t.match(/^(\d+)(?=%$)/);
|
|
1513
1514
|
if (!l) throw new Error("Only percentages or numbers are supported for static column widths");
|
|
@@ -1515,23 +1516,23 @@ function Oe(t, e) {
|
|
|
1515
1516
|
}
|
|
1516
1517
|
return t;
|
|
1517
1518
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return t != null ?
|
|
1519
|
+
function sl(t, e) {
|
|
1520
|
+
return t != null ? Le(t, e) : Number.MAX_SAFE_INTEGER;
|
|
1520
1521
|
}
|
|
1521
|
-
function
|
|
1522
|
-
return t != null ?
|
|
1522
|
+
function dl(t, e) {
|
|
1523
|
+
return t != null ? Le(t, e) : 0;
|
|
1523
1524
|
}
|
|
1524
|
-
function
|
|
1525
|
-
let
|
|
1526
|
-
var
|
|
1527
|
-
let f = l.get(
|
|
1528
|
-
|
|
1529
|
-
var
|
|
1530
|
-
let $ =
|
|
1531
|
-
return h ? v =
|
|
1525
|
+
function Fn(t, e, l, n, o) {
|
|
1526
|
+
let r = !1, i = e.map((a, c) => {
|
|
1527
|
+
var d, u, s, p;
|
|
1528
|
+
let f = l.get(a.key) != null ? (d = l.get(a.key)) !== null && d !== void 0 ? d : "1fr" : (p = (s = (u = a.width) !== null && u !== void 0 ? u : a.defaultWidth) !== null && s !== void 0 ? s : n?.(c)) !== null && p !== void 0 ? p : "1fr", h = !1, m = 0, y = 0, v = 0;
|
|
1529
|
+
Tn(f) ? (m = Le(f, t), h = !0) : (y = Nn(f), y <= 0 && (h = !0));
|
|
1530
|
+
var w, g;
|
|
1531
|
+
let $ = dl((g = (w = a.minWidth) !== null && w !== void 0 ? w : o?.(c)) !== null && g !== void 0 ? g : 0, t), b = sl(a.maxWidth, t), C = Math.max($, Math.min(m, b));
|
|
1532
|
+
return h ? v = C : m > C && (h = !0, v = C), h || (r = !0), {
|
|
1532
1533
|
frozen: h,
|
|
1533
|
-
baseSize:
|
|
1534
|
-
hypotheticalMainSize:
|
|
1534
|
+
baseSize: m,
|
|
1535
|
+
hypotheticalMainSize: C,
|
|
1535
1536
|
min: $,
|
|
1536
1537
|
max: b,
|
|
1537
1538
|
flex: y,
|
|
@@ -1539,38 +1540,38 @@ function Nn(t, e, l, n, o) {
|
|
|
1539
1540
|
violation: 0
|
|
1540
1541
|
};
|
|
1541
1542
|
});
|
|
1542
|
-
for (;
|
|
1543
|
-
let
|
|
1544
|
-
|
|
1545
|
-
s.frozen ?
|
|
1543
|
+
for (; r; ) {
|
|
1544
|
+
let a = 0, c = 0;
|
|
1545
|
+
i.forEach((s) => {
|
|
1546
|
+
s.frozen ? a += s.targetMainSize : (a += s.baseSize, c += s.flex);
|
|
1546
1547
|
});
|
|
1547
|
-
let
|
|
1548
|
-
|
|
1548
|
+
let d = t - a;
|
|
1549
|
+
d > 0 && i.forEach((s) => {
|
|
1549
1550
|
if (!s.frozen) {
|
|
1550
1551
|
let p = s.flex / c;
|
|
1551
|
-
s.targetMainSize = s.baseSize + p *
|
|
1552
|
+
s.targetMainSize = s.baseSize + p * d;
|
|
1552
1553
|
}
|
|
1553
1554
|
});
|
|
1554
|
-
let
|
|
1555
|
-
|
|
1555
|
+
let u = 0;
|
|
1556
|
+
i.forEach((s) => {
|
|
1556
1557
|
if (s.violation = 0, !s.frozen) {
|
|
1557
1558
|
let { min: p, max: f, targetMainSize: h } = s;
|
|
1558
|
-
s.targetMainSize = Math.max(p, Math.min(h, f)), s.violation = s.targetMainSize - h,
|
|
1559
|
+
s.targetMainSize = Math.max(p, Math.min(h, f)), s.violation = s.targetMainSize - h, u += s.violation;
|
|
1559
1560
|
}
|
|
1560
|
-
}),
|
|
1561
|
-
|
|
1561
|
+
}), r = !1, i.forEach((s) => {
|
|
1562
|
+
u === 0 || Math.sign(u) === Math.sign(s.violation) ? s.frozen = !0 : s.frozen || (r = !0);
|
|
1562
1563
|
});
|
|
1563
1564
|
}
|
|
1564
|
-
return
|
|
1565
|
+
return In(i);
|
|
1565
1566
|
}
|
|
1566
|
-
function
|
|
1567
|
+
function In(t) {
|
|
1567
1568
|
let e = 0, l = 0, n = [];
|
|
1568
1569
|
return t.forEach(function(o) {
|
|
1569
|
-
let
|
|
1570
|
-
e +=
|
|
1570
|
+
let r = o.targetMainSize, i = Math.round(r + e) - l;
|
|
1571
|
+
e += r, l += i, n.push(i);
|
|
1571
1572
|
}), n;
|
|
1572
1573
|
}
|
|
1573
|
-
class
|
|
1574
|
+
class Wn {
|
|
1574
1575
|
/** Takes an array of columns and splits it into 2 maps of columns with controlled and columns with uncontrolled widths. */
|
|
1575
1576
|
splitColumnsIntoControlledAndUncontrolled(e) {
|
|
1576
1577
|
return e.reduce((l, n) => (n.props.width != null ? l[0].set(n.key, n) : l[1].set(n.key, n), l), [
|
|
@@ -1580,21 +1581,21 @@ class Fn {
|
|
|
1580
1581
|
}
|
|
1581
1582
|
/** Takes uncontrolled and controlled widths and joins them into a single Map. */
|
|
1582
1583
|
recombineColumns(e, l, n, o) {
|
|
1583
|
-
return new Map(e.map((
|
|
1584
|
-
|
|
1585
|
-
l.get(
|
|
1584
|
+
return new Map(e.map((r) => n.has(r.key) ? [
|
|
1585
|
+
r.key,
|
|
1586
|
+
l.get(r.key)
|
|
1586
1587
|
] : [
|
|
1587
|
-
|
|
1588
|
-
o.get(
|
|
1588
|
+
r.key,
|
|
1589
|
+
o.get(r.key).props.width
|
|
1589
1590
|
]));
|
|
1590
1591
|
}
|
|
1591
1592
|
/** Used to make an initial Map of the uncontrolled widths based on default widths. */
|
|
1592
1593
|
getInitialUncontrolledWidths(e) {
|
|
1593
1594
|
return new Map(Array.from(e).map(([l, n]) => {
|
|
1594
|
-
var o,
|
|
1595
|
+
var o, r, i, a;
|
|
1595
1596
|
return [
|
|
1596
1597
|
l,
|
|
1597
|
-
(
|
|
1598
|
+
(a = (i = n.props.defaultWidth) !== null && i !== void 0 ? i : (o = (r = this).getDefaultWidth) === null || o === void 0 ? void 0 : o.call(r, n)) !== null && a !== void 0 ? a : "1fr"
|
|
1598
1599
|
];
|
|
1599
1600
|
}));
|
|
1600
1601
|
}
|
|
@@ -1611,21 +1612,21 @@ class Fn {
|
|
|
1611
1612
|
return (l = this.columnMaxWidths.get(e)) !== null && l !== void 0 ? l : 0;
|
|
1612
1613
|
}
|
|
1613
1614
|
resizeColumnWidth(e, l, n, o) {
|
|
1614
|
-
let
|
|
1615
|
+
let r = this.columnWidths, i = !0, a = /* @__PURE__ */ new Map();
|
|
1615
1616
|
return o = Math.max(this.getColumnMinWidth(n), Math.min(this.getColumnMaxWidth(n), Math.floor(o))), e.columns.forEach((c) => {
|
|
1616
|
-
var
|
|
1617
|
-
c.key === n ? (
|
|
1618
|
-
}),
|
|
1617
|
+
var d, u;
|
|
1618
|
+
c.key === n ? (a.set(c.key, o), i = !1) : i ? a.set(c.key, (d = r.get(c.key)) !== null && d !== void 0 ? d : 0) : a.set(c.key, (u = c.props.width) !== null && u !== void 0 ? u : l.get(c.key));
|
|
1619
|
+
}), a;
|
|
1619
1620
|
}
|
|
1620
1621
|
buildColumnWidths(e, l, n) {
|
|
1621
|
-
return this.columnWidths = /* @__PURE__ */ new Map(), this.columnMinWidths = /* @__PURE__ */ new Map(), this.columnMaxWidths = /* @__PURE__ */ new Map(),
|
|
1622
|
-
...
|
|
1623
|
-
key:
|
|
1624
|
-
})), n, (
|
|
1625
|
-
let
|
|
1626
|
-
this.columnWidths.set(
|
|
1627
|
-
var
|
|
1628
|
-
this.columnMinWidths.set(
|
|
1622
|
+
return this.columnWidths = /* @__PURE__ */ new Map(), this.columnMinWidths = /* @__PURE__ */ new Map(), this.columnMaxWidths = /* @__PURE__ */ new Map(), Fn(e, l.columns.map((r) => ({
|
|
1623
|
+
...r.props,
|
|
1624
|
+
key: r.key
|
|
1625
|
+
})), n, (r) => this.getDefaultWidth(l.columns[r]), (r) => this.getDefaultMinWidth(l.columns[r])).forEach((r, i) => {
|
|
1626
|
+
let a = l.columns[i].key, c = l.columns[i];
|
|
1627
|
+
this.columnWidths.set(a, r);
|
|
1628
|
+
var d;
|
|
1629
|
+
this.columnMinWidths.set(a, dl((d = c.props.minWidth) !== null && d !== void 0 ? d : this.getDefaultMinWidth(c), e)), this.columnMaxWidths.set(a, sl(c.props.maxWidth, e));
|
|
1629
1630
|
}), this.columnWidths;
|
|
1630
1631
|
}
|
|
1631
1632
|
constructor(e) {
|
|
@@ -1636,134 +1637,134 @@ class Fn {
|
|
|
1636
1637
|
this.getDefaultMinWidth = (n = e?.getDefaultMinWidth) !== null && n !== void 0 ? n : () => 75;
|
|
1637
1638
|
}
|
|
1638
1639
|
}
|
|
1639
|
-
function
|
|
1640
|
-
let { getDefaultWidth: l, getDefaultMinWidth: n, tableWidth: o = 0 } = t, [
|
|
1640
|
+
function Hn(t, e) {
|
|
1641
|
+
let { getDefaultWidth: l, getDefaultMinWidth: n, tableWidth: o = 0 } = t, [r, i] = q(null), a = K(() => new Wn({
|
|
1641
1642
|
getDefaultWidth: l,
|
|
1642
1643
|
getDefaultMinWidth: n
|
|
1643
1644
|
}), [
|
|
1644
1645
|
l,
|
|
1645
1646
|
n
|
|
1646
|
-
]), [c,
|
|
1647
|
+
]), [c, d] = K(() => a.splitColumnsIntoControlledAndUncontrolled(e.collection.columns), [
|
|
1647
1648
|
e.collection.columns,
|
|
1648
|
-
|
|
1649
|
-
]), [
|
|
1649
|
+
a
|
|
1650
|
+
]), [u, s] = q(() => a.getInitialUncontrolledWidths(d)), [p, f] = q(e.collection.columns);
|
|
1650
1651
|
if (e.collection.columns !== p) {
|
|
1651
|
-
if (e.collection.columns.length !== p.length || e.collection.columns.some((
|
|
1652
|
-
let
|
|
1653
|
-
s(
|
|
1652
|
+
if (e.collection.columns.length !== p.length || e.collection.columns.some((g, $) => g.key !== p[$].key)) {
|
|
1653
|
+
let g = a.getInitialUncontrolledWidths(d);
|
|
1654
|
+
s(g);
|
|
1654
1655
|
}
|
|
1655
1656
|
f(e.collection.columns);
|
|
1656
1657
|
}
|
|
1657
|
-
let h =
|
|
1658
|
+
let h = K(() => a.recombineColumns(e.collection.columns, u, d, c), [
|
|
1658
1659
|
e.collection.columns,
|
|
1660
|
+
u,
|
|
1659
1661
|
d,
|
|
1660
|
-
a,
|
|
1661
1662
|
c,
|
|
1662
|
-
|
|
1663
|
-
]),
|
|
1664
|
-
|
|
1663
|
+
a
|
|
1664
|
+
]), m = O((g) => {
|
|
1665
|
+
i(g);
|
|
1665
1666
|
}, [
|
|
1666
|
-
|
|
1667
|
-
]), y =
|
|
1668
|
-
let b =
|
|
1669
|
-
|
|
1670
|
-
b.get(
|
|
1667
|
+
i
|
|
1668
|
+
]), y = O((g, $) => {
|
|
1669
|
+
let b = a.resizeColumnWidth(e.collection, u, g, $), C = new Map(Array.from(d).map(([k]) => [
|
|
1670
|
+
k,
|
|
1671
|
+
b.get(k)
|
|
1671
1672
|
]));
|
|
1672
|
-
return
|
|
1673
|
+
return C.set(g, $), s(C), b;
|
|
1673
1674
|
}, [
|
|
1674
|
-
|
|
1675
|
+
d,
|
|
1675
1676
|
s,
|
|
1676
|
-
|
|
1677
|
+
a,
|
|
1677
1678
|
e.collection,
|
|
1678
|
-
|
|
1679
|
-
]), v =
|
|
1680
|
-
|
|
1679
|
+
u
|
|
1680
|
+
]), v = O(() => {
|
|
1681
|
+
i(null);
|
|
1681
1682
|
}, [
|
|
1682
|
-
|
|
1683
|
-
]),
|
|
1683
|
+
i
|
|
1684
|
+
]), w = K(() => a.buildColumnWidths(o, e.collection, h), [
|
|
1684
1685
|
o,
|
|
1685
1686
|
e.collection,
|
|
1686
1687
|
h,
|
|
1687
|
-
|
|
1688
|
+
a
|
|
1688
1689
|
]);
|
|
1689
|
-
return
|
|
1690
|
-
resizingColumn:
|
|
1690
|
+
return K(() => ({
|
|
1691
|
+
resizingColumn: r,
|
|
1691
1692
|
updateResizedColumns: y,
|
|
1692
|
-
startResize:
|
|
1693
|
+
startResize: m,
|
|
1693
1694
|
endResize: v,
|
|
1694
|
-
getColumnWidth: (
|
|
1695
|
-
getColumnMinWidth: (
|
|
1696
|
-
getColumnMaxWidth: (
|
|
1695
|
+
getColumnWidth: (g) => a.getColumnWidth(g),
|
|
1696
|
+
getColumnMinWidth: (g) => a.getColumnMinWidth(g),
|
|
1697
|
+
getColumnMaxWidth: (g) => a.getColumnMaxWidth(g),
|
|
1697
1698
|
tableState: e,
|
|
1698
|
-
columnWidths:
|
|
1699
|
+
columnWidths: w
|
|
1699
1700
|
}), [
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1701
|
+
a,
|
|
1702
|
+
w,
|
|
1703
|
+
r,
|
|
1703
1704
|
y,
|
|
1704
|
-
|
|
1705
|
+
m,
|
|
1705
1706
|
v,
|
|
1706
1707
|
e
|
|
1707
1708
|
]);
|
|
1708
1709
|
}
|
|
1709
|
-
function
|
|
1710
|
-
let { collection: e, focusMode: l } = t, n = t.UNSAFE_selectionState ||
|
|
1710
|
+
function Vn(t) {
|
|
1711
|
+
let { collection: e, focusMode: l } = t, n = t.UNSAFE_selectionState || bt(t), o = K(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
1711
1712
|
t.disabledKeys
|
|
1712
|
-
]),
|
|
1713
|
-
n.setFocusedKey = (c,
|
|
1713
|
+
]), r = n.setFocusedKey;
|
|
1714
|
+
n.setFocusedKey = (c, d) => {
|
|
1714
1715
|
if (l === "cell" && c != null) {
|
|
1715
1716
|
let h = e.getItem(c);
|
|
1716
1717
|
if (h?.type === "item") {
|
|
1717
|
-
var
|
|
1718
|
-
let
|
|
1718
|
+
var u, s;
|
|
1719
|
+
let m = H(h, e);
|
|
1719
1720
|
var p, f;
|
|
1720
|
-
|
|
1721
|
+
d === "last" ? c = (p = (u = ne(m)) === null || u === void 0 ? void 0 : u.key) !== null && p !== void 0 ? p : null : c = (f = (s = le(m)) === null || s === void 0 ? void 0 : s.key) !== null && f !== void 0 ? f : null;
|
|
1721
1722
|
}
|
|
1722
1723
|
}
|
|
1723
|
-
|
|
1724
|
+
r(c, d);
|
|
1724
1725
|
};
|
|
1725
|
-
let
|
|
1726
|
+
let i = K(() => new kl(e, n), [
|
|
1726
1727
|
e,
|
|
1727
1728
|
n
|
|
1728
1729
|
]);
|
|
1729
|
-
const
|
|
1730
|
+
const a = A(null);
|
|
1730
1731
|
return ue(() => {
|
|
1731
|
-
if (n.focusedKey != null &&
|
|
1732
|
-
const c =
|
|
1733
|
-
if (!
|
|
1732
|
+
if (n.focusedKey != null && a.current && !e.getItem(n.focusedKey)) {
|
|
1733
|
+
const c = a.current.getItem(n.focusedKey), d = c?.parentKey != null && (c.type === "cell" || c.type === "rowheader" || c.type === "column") ? a.current.getItem(c.parentKey) : c;
|
|
1734
|
+
if (!d) {
|
|
1734
1735
|
n.setFocusedKey(null);
|
|
1735
1736
|
return;
|
|
1736
1737
|
}
|
|
1737
|
-
const
|
|
1738
|
-
let f = Math.min(p > 1 ? Math.max(
|
|
1738
|
+
const u = a.current.rows, s = e.rows, p = u.length - s.length;
|
|
1739
|
+
let f = Math.min(p > 1 ? Math.max(d.index - p + 1, 0) : d.index, s.length - 1), h = null;
|
|
1739
1740
|
for (; f >= 0; ) {
|
|
1740
|
-
if (!
|
|
1741
|
+
if (!i.isDisabled(s[f].key) && s[f].type !== "headerrow") {
|
|
1741
1742
|
h = s[f];
|
|
1742
1743
|
break;
|
|
1743
1744
|
}
|
|
1744
|
-
f < s.length - 1 ? f++ : (f >
|
|
1745
|
+
f < s.length - 1 ? f++ : (f > d.index && (f = d.index), f--);
|
|
1745
1746
|
}
|
|
1746
1747
|
if (h) {
|
|
1747
|
-
const
|
|
1748
|
-
...
|
|
1749
|
-
] : [], y = h.hasChildNodes &&
|
|
1748
|
+
const m = h.hasChildNodes ? [
|
|
1749
|
+
...H(h, e)
|
|
1750
|
+
] : [], y = h.hasChildNodes && d !== c && c && c.index < m.length ? m[c.index].key : h.key;
|
|
1750
1751
|
n.setFocusedKey(y);
|
|
1751
1752
|
} else n.setFocusedKey(null);
|
|
1752
1753
|
}
|
|
1753
|
-
|
|
1754
|
+
a.current = e;
|
|
1754
1755
|
}, [
|
|
1755
1756
|
e,
|
|
1756
|
-
|
|
1757
|
+
i,
|
|
1757
1758
|
n,
|
|
1758
1759
|
n.focusedKey
|
|
1759
1760
|
]), {
|
|
1760
1761
|
collection: e,
|
|
1761
1762
|
disabledKeys: o,
|
|
1762
1763
|
isKeyboardNavigationDisabled: !1,
|
|
1763
|
-
selectionManager:
|
|
1764
|
+
selectionManager: i
|
|
1764
1765
|
};
|
|
1765
1766
|
}
|
|
1766
|
-
class
|
|
1767
|
+
class jn {
|
|
1767
1768
|
*[Symbol.iterator]() {
|
|
1768
1769
|
yield* [
|
|
1769
1770
|
...this.rows
|
|
@@ -1819,20 +1820,20 @@ class Hn {
|
|
|
1819
1820
|
let l = (s) => {
|
|
1820
1821
|
let p = this.keyMap.get(s.key);
|
|
1821
1822
|
e.visitNode && (s = e.visitNode(s)), this.keyMap.set(s.key, s);
|
|
1822
|
-
let f = /* @__PURE__ */ new Set(), h = null,
|
|
1823
|
+
let f = /* @__PURE__ */ new Set(), h = null, m = !1;
|
|
1823
1824
|
if (s.type === "item") {
|
|
1824
1825
|
var y;
|
|
1825
1826
|
for (let b of s.childNodes) if (((y = b.props) === null || y === void 0 ? void 0 : y.colSpan) !== void 0) {
|
|
1826
|
-
|
|
1827
|
+
m = !0;
|
|
1827
1828
|
break;
|
|
1828
1829
|
}
|
|
1829
1830
|
}
|
|
1830
1831
|
for (let b of s.childNodes) {
|
|
1831
|
-
if (b.type === "cell" &&
|
|
1832
|
-
var v,
|
|
1833
|
-
b.colspan = (v = b.props) === null || v === void 0 ? void 0 : v.colSpan, b.colSpan = (
|
|
1834
|
-
var
|
|
1835
|
-
b.colIndex = h ? ((
|
|
1832
|
+
if (b.type === "cell" && m) {
|
|
1833
|
+
var v, w;
|
|
1834
|
+
b.colspan = (v = b.props) === null || v === void 0 ? void 0 : v.colSpan, b.colSpan = (w = b.props) === null || w === void 0 ? void 0 : w.colSpan;
|
|
1835
|
+
var g, $;
|
|
1836
|
+
b.colIndex = h ? ((g = h.colIndex) !== null && g !== void 0 ? g : h.index) + (($ = h.colSpan) !== null && $ !== void 0 ? $ : 1) : b.index;
|
|
1836
1837
|
}
|
|
1837
1838
|
b.type === "cell" && b.parentKey == null && (b.parentKey = s.key), f.add(b.key), h ? (h.nextKey = b.key, b.prevKey = h.key) : b.prevKey = null, l(b), h = b;
|
|
1838
1839
|
}
|
|
@@ -1843,45 +1844,45 @@ class Hn {
|
|
|
1843
1844
|
for (let p of s.childNodes) this.keyMap.get(p.key) === p && n(p);
|
|
1844
1845
|
}, o = null;
|
|
1845
1846
|
for (let [s, p] of e.items.entries()) {
|
|
1846
|
-
var
|
|
1847
|
+
var r, i, a, c, d, u;
|
|
1847
1848
|
let f = {
|
|
1848
1849
|
...p,
|
|
1849
|
-
level: (
|
|
1850
|
-
key: (
|
|
1851
|
-
type: (
|
|
1850
|
+
level: (r = p.level) !== null && r !== void 0 ? r : 0,
|
|
1851
|
+
key: (i = p.key) !== null && i !== void 0 ? i : "row-" + s,
|
|
1852
|
+
type: (a = p.type) !== null && a !== void 0 ? a : "row",
|
|
1852
1853
|
value: (c = p.value) !== null && c !== void 0 ? c : null,
|
|
1853
1854
|
hasChildNodes: !0,
|
|
1854
1855
|
childNodes: [
|
|
1855
1856
|
...p.childNodes
|
|
1856
1857
|
],
|
|
1857
1858
|
rendered: p.rendered,
|
|
1858
|
-
textValue: (
|
|
1859
|
-
index: (
|
|
1859
|
+
textValue: (d = p.textValue) !== null && d !== void 0 ? d : "",
|
|
1860
|
+
index: (u = p.index) !== null && u !== void 0 ? u : s
|
|
1860
1861
|
};
|
|
1861
1862
|
o ? (o.nextKey = f.key, f.prevKey = o.key) : f.prevKey = null, this.rows.push(f), l(f), o = f;
|
|
1862
1863
|
}
|
|
1863
1864
|
o && (o.nextKey = null);
|
|
1864
1865
|
}
|
|
1865
1866
|
}
|
|
1866
|
-
const
|
|
1867
|
-
let
|
|
1868
|
-
for (;
|
|
1869
|
-
function
|
|
1867
|
+
const cl = "row-header-column-" + /* @__PURE__ */ Math.random().toString(36).slice(2);
|
|
1868
|
+
let Fe = "row-header-column-" + /* @__PURE__ */ Math.random().toString(36).slice(2);
|
|
1869
|
+
for (; cl === Fe; ) Fe = "row-header-column-" + Math.random().toString(36).slice(2);
|
|
1870
|
+
function fl(t, e) {
|
|
1870
1871
|
if (e.length === 0) return [];
|
|
1871
1872
|
let l = [], n = /* @__PURE__ */ new Map();
|
|
1872
|
-
for (let
|
|
1873
|
-
let s =
|
|
1874
|
-
|
|
1873
|
+
for (let u of e) {
|
|
1874
|
+
let s = u.parentKey, p = [
|
|
1875
|
+
u
|
|
1875
1876
|
];
|
|
1876
1877
|
for (; s; ) {
|
|
1877
1878
|
let f = t.get(s);
|
|
1878
1879
|
if (!f) break;
|
|
1879
1880
|
if (n.has(f)) {
|
|
1880
|
-
var o,
|
|
1881
|
-
(
|
|
1882
|
-
let { column: h, index:
|
|
1883
|
-
if (
|
|
1884
|
-
for (let y =
|
|
1881
|
+
var o, r;
|
|
1882
|
+
(r = (o = f).colSpan) !== null && r !== void 0 || (o.colSpan = 0), f.colSpan++, f.colspan = f.colSpan;
|
|
1883
|
+
let { column: h, index: m } = n.get(f);
|
|
1884
|
+
if (m > p.length) break;
|
|
1885
|
+
for (let y = m; y < p.length; y++) h.splice(y, 0, null);
|
|
1885
1886
|
for (let y = p.length; y < h.length; y++)
|
|
1886
1887
|
h[y] && n.has(h[y]) && (n.get(h[y]).index = y);
|
|
1887
1888
|
} else
|
|
@@ -1891,19 +1892,19 @@ function dl(t, e) {
|
|
|
1891
1892
|
});
|
|
1892
1893
|
s = f.parentKey;
|
|
1893
1894
|
}
|
|
1894
|
-
l.push(p),
|
|
1895
|
+
l.push(p), u.index = l.length - 1;
|
|
1895
1896
|
}
|
|
1896
|
-
let
|
|
1897
|
-
for (let
|
|
1898
|
-
let s =
|
|
1899
|
-
for (let p of
|
|
1897
|
+
let i = Math.max(...l.map((u) => u.length)), a = Array(i).fill(0).map(() => []), c = 0;
|
|
1898
|
+
for (let u of l) {
|
|
1899
|
+
let s = i - 1;
|
|
1900
|
+
for (let p of u) {
|
|
1900
1901
|
if (p) {
|
|
1901
|
-
let f =
|
|
1902
|
+
let f = a[s], h = f.reduce((m, y) => {
|
|
1902
1903
|
var v;
|
|
1903
|
-
return
|
|
1904
|
+
return m + ((v = y.colSpan) !== null && v !== void 0 ? v : 1);
|
|
1904
1905
|
}, 0);
|
|
1905
1906
|
if (h < c) {
|
|
1906
|
-
let
|
|
1907
|
+
let m = {
|
|
1907
1908
|
type: "placeholder",
|
|
1908
1909
|
key: "placeholder-" + p.key,
|
|
1909
1910
|
colspan: c - h,
|
|
@@ -1916,7 +1917,7 @@ function dl(t, e) {
|
|
|
1916
1917
|
childNodes: [],
|
|
1917
1918
|
textValue: ""
|
|
1918
1919
|
};
|
|
1919
|
-
f.length > 0 && (f[f.length - 1].nextKey =
|
|
1920
|
+
f.length > 0 && (f[f.length - 1].nextKey = m.key, m.prevKey = f[f.length - 1].key), f.push(m);
|
|
1920
1921
|
}
|
|
1921
1922
|
f.length > 0 && (f[f.length - 1].nextKey = p.key, p.prevKey = f[f.length - 1].key), p.level = s, p.colIndex = c, f.push(p);
|
|
1922
1923
|
}
|
|
@@ -1924,32 +1925,32 @@ function dl(t, e) {
|
|
|
1924
1925
|
}
|
|
1925
1926
|
c++;
|
|
1926
1927
|
}
|
|
1927
|
-
let
|
|
1928
|
-
for (let
|
|
1929
|
-
let s =
|
|
1928
|
+
let d = 0;
|
|
1929
|
+
for (let u of a) {
|
|
1930
|
+
let s = u.reduce((p, f) => {
|
|
1930
1931
|
var h;
|
|
1931
1932
|
return p + ((h = f.colSpan) !== null && h !== void 0 ? h : 1);
|
|
1932
1933
|
}, 0);
|
|
1933
1934
|
if (s < e.length) {
|
|
1934
1935
|
let p = {
|
|
1935
1936
|
type: "placeholder",
|
|
1936
|
-
key: "placeholder-" +
|
|
1937
|
+
key: "placeholder-" + u[u.length - 1].key,
|
|
1937
1938
|
colSpan: e.length - s,
|
|
1938
1939
|
colspan: e.length - s,
|
|
1939
1940
|
index: s,
|
|
1940
1941
|
value: null,
|
|
1941
1942
|
rendered: null,
|
|
1942
|
-
level:
|
|
1943
|
+
level: d,
|
|
1943
1944
|
hasChildNodes: !1,
|
|
1944
1945
|
childNodes: [],
|
|
1945
1946
|
textValue: "",
|
|
1946
|
-
prevKey:
|
|
1947
|
+
prevKey: u[u.length - 1].key
|
|
1947
1948
|
};
|
|
1948
|
-
|
|
1949
|
+
u.push(p);
|
|
1949
1950
|
}
|
|
1950
|
-
|
|
1951
|
+
d++;
|
|
1951
1952
|
}
|
|
1952
|
-
return
|
|
1953
|
+
return a.map((u, s) => ({
|
|
1953
1954
|
type: "headerrow",
|
|
1954
1955
|
key: "headerrow-" + s,
|
|
1955
1956
|
index: s,
|
|
@@ -1957,11 +1958,11 @@ function dl(t, e) {
|
|
|
1957
1958
|
rendered: null,
|
|
1958
1959
|
level: 0,
|
|
1959
1960
|
hasChildNodes: !0,
|
|
1960
|
-
childNodes:
|
|
1961
|
+
childNodes: u,
|
|
1961
1962
|
textValue: ""
|
|
1962
1963
|
}));
|
|
1963
1964
|
}
|
|
1964
|
-
class
|
|
1965
|
+
class On extends jn {
|
|
1965
1966
|
*[Symbol.iterator]() {
|
|
1966
1967
|
yield* this.body.childNodes;
|
|
1967
1968
|
}
|
|
@@ -2009,20 +2010,20 @@ class Vn extends Hn {
|
|
|
2009
2010
|
let n = this.rowHeaderColumnKeys;
|
|
2010
2011
|
if (n) {
|
|
2011
2012
|
let o = [];
|
|
2012
|
-
for (let
|
|
2013
|
-
let
|
|
2014
|
-
if (n.has(
|
|
2013
|
+
for (let r of l.childNodes) {
|
|
2014
|
+
let i = this.columns[r.index];
|
|
2015
|
+
if (n.has(i.key) && r.textValue && o.push(r.textValue), o.length === n.size) break;
|
|
2015
2016
|
}
|
|
2016
2017
|
return o.join(" ");
|
|
2017
2018
|
}
|
|
2018
2019
|
return "";
|
|
2019
2020
|
}
|
|
2020
2021
|
constructor(e, l, n) {
|
|
2021
|
-
let o = /* @__PURE__ */ new Set(),
|
|
2022
|
+
let o = /* @__PURE__ */ new Set(), r = null, i = [];
|
|
2022
2023
|
if (n?.showSelectionCheckboxes) {
|
|
2023
2024
|
let s = {
|
|
2024
2025
|
type: "column",
|
|
2025
|
-
key:
|
|
2026
|
+
key: cl,
|
|
2026
2027
|
value: null,
|
|
2027
2028
|
textValue: "",
|
|
2028
2029
|
level: 0,
|
|
@@ -2034,12 +2035,12 @@ class Vn extends Hn {
|
|
|
2034
2035
|
isSelectionCell: !0
|
|
2035
2036
|
}
|
|
2036
2037
|
};
|
|
2037
|
-
|
|
2038
|
+
i.unshift(s);
|
|
2038
2039
|
}
|
|
2039
2040
|
if (n?.showDragButtons) {
|
|
2040
2041
|
let s = {
|
|
2041
2042
|
type: "column",
|
|
2042
|
-
key:
|
|
2043
|
+
key: Fe,
|
|
2043
2044
|
value: null,
|
|
2044
2045
|
textValue: "",
|
|
2045
2046
|
level: 0,
|
|
@@ -2051,30 +2052,30 @@ class Vn extends Hn {
|
|
|
2051
2052
|
isDragButtonCell: !0
|
|
2052
2053
|
}
|
|
2053
2054
|
};
|
|
2054
|
-
|
|
2055
|
+
i.unshift(s);
|
|
2055
2056
|
}
|
|
2056
|
-
let
|
|
2057
|
+
let a = [], c = /* @__PURE__ */ new Map(), d = (s) => {
|
|
2057
2058
|
switch (s.type) {
|
|
2058
2059
|
case "body":
|
|
2059
|
-
|
|
2060
|
+
r = s;
|
|
2060
2061
|
break;
|
|
2061
2062
|
case "column":
|
|
2062
|
-
c.set(s.key, s), s.hasChildNodes || (
|
|
2063
|
+
c.set(s.key, s), s.hasChildNodes || (i.push(s), s.props.isRowHeader && o.add(s.key));
|
|
2063
2064
|
break;
|
|
2064
2065
|
case "item":
|
|
2065
|
-
|
|
2066
|
+
a.push(s);
|
|
2066
2067
|
return;
|
|
2067
2068
|
}
|
|
2068
|
-
for (let p of s.childNodes)
|
|
2069
|
+
for (let p of s.childNodes) d(p);
|
|
2069
2070
|
};
|
|
2070
|
-
for (let s of e)
|
|
2071
|
-
let
|
|
2072
|
-
if (
|
|
2073
|
-
columnCount:
|
|
2074
|
-
items:
|
|
2075
|
-
visitNode: (s) => (s.column =
|
|
2076
|
-
}), this._size = 0, this.columns =
|
|
2077
|
-
...
|
|
2071
|
+
for (let s of e) d(s);
|
|
2072
|
+
let u = fl(c, i);
|
|
2073
|
+
if (u.forEach((s, p) => a.splice(p, 0, s)), super({
|
|
2074
|
+
columnCount: i.length,
|
|
2075
|
+
items: a,
|
|
2076
|
+
visitNode: (s) => (s.column = i[s.index], s)
|
|
2077
|
+
}), this._size = 0, this.columns = i, this.rowHeaderColumnKeys = o, this.body = r, this.headerRows = u, this._size = [
|
|
2078
|
+
...r.childNodes
|
|
2078
2079
|
].length, this.rowHeaderColumnKeys.size === 0) {
|
|
2079
2080
|
let s = this.columns.find((p) => {
|
|
2080
2081
|
var f, h;
|
|
@@ -2084,64 +2085,64 @@ class Vn extends Hn {
|
|
|
2084
2085
|
}
|
|
2085
2086
|
}
|
|
2086
2087
|
}
|
|
2087
|
-
const
|
|
2088
|
+
const Ln = {
|
|
2088
2089
|
ascending: "descending",
|
|
2089
2090
|
descending: "ascending"
|
|
2090
2091
|
};
|
|
2091
|
-
function
|
|
2092
|
-
let [e, l] =
|
|
2092
|
+
function Un(t) {
|
|
2093
|
+
let [e, l] = q(!1), { selectionMode: n = "none", showSelectionCheckboxes: o, showDragButtons: r } = t, i = K(() => ({
|
|
2093
2094
|
showSelectionCheckboxes: o && n !== "none",
|
|
2094
|
-
showDragButtons:
|
|
2095
|
+
showDragButtons: r,
|
|
2095
2096
|
selectionMode: n,
|
|
2096
2097
|
columns: []
|
|
2097
2098
|
}), [
|
|
2098
2099
|
t.children,
|
|
2099
2100
|
o,
|
|
2100
2101
|
n,
|
|
2101
|
-
i
|
|
2102
|
-
]), u = Sl(t, j((s) => new Vn(s, null, r), [
|
|
2103
2102
|
r
|
|
2104
|
-
]),
|
|
2103
|
+
]), a = El(t, O((s) => new On(s, null, i), [
|
|
2104
|
+
i
|
|
2105
|
+
]), i), { disabledKeys: c, selectionManager: d } = Vn({
|
|
2105
2106
|
...t,
|
|
2106
|
-
collection:
|
|
2107
|
+
collection: a,
|
|
2107
2108
|
disabledBehavior: t.disabledBehavior || "selection"
|
|
2108
2109
|
});
|
|
2109
|
-
var
|
|
2110
|
+
var u;
|
|
2110
2111
|
return {
|
|
2111
|
-
collection:
|
|
2112
|
+
collection: a,
|
|
2112
2113
|
disabledKeys: c,
|
|
2113
|
-
selectionManager:
|
|
2114
|
+
selectionManager: d,
|
|
2114
2115
|
showSelectionCheckboxes: t.showSelectionCheckboxes || !1,
|
|
2115
|
-
sortDescriptor: (
|
|
2116
|
-
isKeyboardNavigationDisabled:
|
|
2116
|
+
sortDescriptor: (u = t.sortDescriptor) !== null && u !== void 0 ? u : null,
|
|
2117
|
+
isKeyboardNavigationDisabled: a.size === 0 || e,
|
|
2117
2118
|
setKeyboardNavigationDisabled: l,
|
|
2118
2119
|
sort(s, p) {
|
|
2119
2120
|
var f, h;
|
|
2120
2121
|
(h = t.onSortChange) === null || h === void 0 || h.call(t, {
|
|
2121
2122
|
column: s,
|
|
2122
|
-
direction: p ?? (((f = t.sortDescriptor) === null || f === void 0 ? void 0 : f.column) === s ?
|
|
2123
|
+
direction: p ?? (((f = t.sortDescriptor) === null || f === void 0 ? void 0 : f.column) === s ? Ln[t.sortDescriptor.direction] : "ascending")
|
|
2123
2124
|
});
|
|
2124
2125
|
}
|
|
2125
2126
|
};
|
|
2126
2127
|
}
|
|
2127
|
-
function
|
|
2128
|
+
function Yn(t) {
|
|
2128
2129
|
return t && t.__esModule ? t.default : t;
|
|
2129
2130
|
}
|
|
2130
|
-
class
|
|
2131
|
+
class Xn extends Bl {
|
|
2131
2132
|
addNode(e) {
|
|
2132
2133
|
super.addNode(e), this.columnsDirty || (this.columnsDirty = e.type === "column"), e.type === "tableheader" && (this.head = e), e.type === "tablebody" && (this.body = e);
|
|
2133
2134
|
}
|
|
2134
2135
|
commit(e, l, n = !1) {
|
|
2135
2136
|
this.updateColumns(n), this.rows = [];
|
|
2136
|
-
for (let
|
|
2137
|
-
let
|
|
2138
|
-
if (
|
|
2139
|
-
let c = this.getItem(
|
|
2140
|
-
var o,
|
|
2141
|
-
let
|
|
2142
|
-
if (
|
|
2137
|
+
for (let i of this.getChildren(this.body.key)) {
|
|
2138
|
+
let a = i.lastChildKey;
|
|
2139
|
+
if (a != null) {
|
|
2140
|
+
let c = this.getItem(a);
|
|
2141
|
+
var o, r;
|
|
2142
|
+
let d = ((o = c.colIndex) !== null && o !== void 0 ? o : c.index) + ((r = c.colSpan) !== null && r !== void 0 ? r : 1);
|
|
2143
|
+
if (d !== this.columns.length && !n) throw new Error(`Cell count must match column count. Found ${d} cells and ${this.columns.length} columns.`);
|
|
2143
2144
|
}
|
|
2144
|
-
this.rows.push(
|
|
2145
|
+
this.rows.push(i);
|
|
2145
2146
|
}
|
|
2146
2147
|
super.commit(e, l, n);
|
|
2147
2148
|
}
|
|
@@ -2154,10 +2155,10 @@ class Un extends zl {
|
|
|
2154
2155
|
l.set(o.key, o), o.hasChildNodes || (o.index = this.columns.length, this.columns.push(o), o.props.isRowHeader && this.rowHeaderColumnKeys.add(o.key));
|
|
2155
2156
|
break;
|
|
2156
2157
|
}
|
|
2157
|
-
for (let
|
|
2158
|
+
for (let r of this.getChildren(o.key)) n(r);
|
|
2158
2159
|
};
|
|
2159
2160
|
for (let o of this.getChildren(this.head.key)) n(o);
|
|
2160
|
-
if (this.headerRows =
|
|
2161
|
+
if (this.headerRows = fl(l, this.columns), this.columnsDirty = !1, this.rowHeaderColumnKeys.size === 0 && this.columns.length > 0 && !e) throw new Error("A table must have at least one Column with the isRowHeader prop set to true");
|
|
2161
2162
|
}
|
|
2162
2163
|
get columnCount() {
|
|
2163
2164
|
return this.columns.length;
|
|
@@ -2181,8 +2182,8 @@ class Un extends zl {
|
|
|
2181
2182
|
let n = this.getItem(e);
|
|
2182
2183
|
var o;
|
|
2183
2184
|
if (n?.type === "column") return (o = n.prevKey) !== null && o !== void 0 ? o : null;
|
|
2184
|
-
let
|
|
2185
|
-
return
|
|
2185
|
+
let r = super.getKeyBefore(e);
|
|
2186
|
+
return r != null && ((l = this.getItem(r)) === null || l === void 0 ? void 0 : l.type) === "tablebody" ? null : r;
|
|
2186
2187
|
}
|
|
2187
2188
|
getChildren(e) {
|
|
2188
2189
|
if (!this.getItem(e)) {
|
|
@@ -2200,225 +2201,225 @@ class Un extends zl {
|
|
|
2200
2201
|
if (!l) return "";
|
|
2201
2202
|
if (l.textValue) return l.textValue;
|
|
2202
2203
|
let n = this.rowHeaderColumnKeys, o = [];
|
|
2203
|
-
for (let
|
|
2204
|
-
let
|
|
2205
|
-
if (n.has(
|
|
2204
|
+
for (let r of this.getChildren(e)) {
|
|
2205
|
+
let i = this.columns[r.index];
|
|
2206
|
+
if (n.has(i.key) && r.textValue && o.push(r.textValue), o.length === n.size) break;
|
|
2206
2207
|
}
|
|
2207
2208
|
return o.join(" ");
|
|
2208
2209
|
}
|
|
2209
2210
|
constructor(...e) {
|
|
2210
|
-
super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new
|
|
2211
|
+
super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new nt("tableheader", -1), this.body = new nt("tablebody", -2), this.columnsDirty = !0;
|
|
2211
2212
|
}
|
|
2212
2213
|
}
|
|
2213
|
-
const
|
|
2214
|
-
let n = de(l), o =
|
|
2215
|
-
|
|
2216
|
-
let
|
|
2217
|
-
for (;
|
|
2218
|
-
|
|
2214
|
+
const Ue = /* @__PURE__ */ se(null), Gn = /* @__PURE__ */ re(function(e, l) {
|
|
2215
|
+
let n = de(l), o = A(null), r = A(null), [i, a] = q(0);
|
|
2216
|
+
rt(() => {
|
|
2217
|
+
let d = o.current;
|
|
2218
|
+
for (; d && d !== n.current && !Hl(d); ) d = d.parentElement;
|
|
2219
|
+
r.current = d;
|
|
2219
2220
|
}, [
|
|
2220
2221
|
n
|
|
2221
|
-
]),
|
|
2222
|
-
ref:
|
|
2222
|
+
]), Wl({
|
|
2223
|
+
ref: r,
|
|
2223
2224
|
box: "border-box",
|
|
2224
2225
|
onResize() {
|
|
2225
|
-
var
|
|
2226
|
-
|
|
2226
|
+
var d, u;
|
|
2227
|
+
a((u = (d = r.current) === null || d === void 0 ? void 0 : d.clientWidth) !== null && u !== void 0 ? u : 0);
|
|
2227
2228
|
}
|
|
2228
|
-
}),
|
|
2229
|
-
var
|
|
2230
|
-
|
|
2229
|
+
}), rt(() => {
|
|
2230
|
+
var d, u;
|
|
2231
|
+
a((u = (d = r.current) === null || d === void 0 ? void 0 : d.clientWidth) !== null && u !== void 0 ? u : 0);
|
|
2231
2232
|
}, []);
|
|
2232
|
-
let c =
|
|
2233
|
+
let c = K(() => ({
|
|
2233
2234
|
tableRef: o,
|
|
2234
|
-
scrollRef:
|
|
2235
|
-
tableWidth:
|
|
2236
|
-
useTableColumnResizeState:
|
|
2235
|
+
scrollRef: r,
|
|
2236
|
+
tableWidth: i,
|
|
2237
|
+
useTableColumnResizeState: Hn,
|
|
2237
2238
|
onResizeStart: e.onResizeStart,
|
|
2238
2239
|
onResize: e.onResize,
|
|
2239
2240
|
onResizeEnd: e.onResizeEnd
|
|
2240
2241
|
}), [
|
|
2241
2242
|
o,
|
|
2242
|
-
|
|
2243
|
+
i,
|
|
2243
2244
|
e.onResizeStart,
|
|
2244
2245
|
e.onResize,
|
|
2245
2246
|
e.onResizeEnd
|
|
2246
2247
|
]);
|
|
2247
|
-
return /* @__PURE__ */
|
|
2248
|
-
...
|
|
2248
|
+
return /* @__PURE__ */ S.createElement("div", {
|
|
2249
|
+
...Q(e, {
|
|
2249
2250
|
global: !0
|
|
2250
2251
|
}),
|
|
2251
2252
|
ref: n,
|
|
2252
2253
|
className: e.className || "react-aria-ResizableTableContainer",
|
|
2253
2254
|
style: e.style,
|
|
2254
2255
|
onScroll: e.onScroll
|
|
2255
|
-
}, /* @__PURE__ */
|
|
2256
|
+
}, /* @__PURE__ */ S.createElement(Ue.Provider, {
|
|
2256
2257
|
value: c
|
|
2257
2258
|
}, e.children));
|
|
2258
|
-
}),
|
|
2259
|
+
}), qn = /* @__PURE__ */ se(null), _ = /* @__PURE__ */ se(null), Ye = /* @__PURE__ */ se(null), Zn = /* @__PURE__ */ re(function(e, l) {
|
|
2259
2260
|
var n;
|
|
2260
|
-
[e, l] = Al(e, l,
|
|
2261
|
-
let o =
|
|
2262
|
-
selectionBehavior:
|
|
2263
|
-
selectionMode:
|
|
2264
|
-
disallowEmptySelection:
|
|
2261
|
+
[e, l] = Al(e, l, qn);
|
|
2262
|
+
let o = bt(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = o, c = !!(!((n = e.dragAndDropHooks) === null || n === void 0) && n.useDraggableCollectionState), d = K(() => ({
|
|
2263
|
+
selectionBehavior: i === "none" ? null : r,
|
|
2264
|
+
selectionMode: i,
|
|
2265
|
+
disallowEmptySelection: a,
|
|
2265
2266
|
allowsDragging: c
|
|
2266
2267
|
}), [
|
|
2267
|
-
i,
|
|
2268
2268
|
r,
|
|
2269
|
-
|
|
2269
|
+
i,
|
|
2270
|
+
a,
|
|
2270
2271
|
c
|
|
2271
|
-
]),
|
|
2272
|
-
value:
|
|
2273
|
-
}, /* @__PURE__ */
|
|
2274
|
-
return /* @__PURE__ */
|
|
2275
|
-
content:
|
|
2276
|
-
createCollection: () => new
|
|
2277
|
-
}, (s) => /* @__PURE__ */
|
|
2272
|
+
]), u = /* @__PURE__ */ S.createElement(pl.Provider, {
|
|
2273
|
+
value: d
|
|
2274
|
+
}, /* @__PURE__ */ S.createElement(Ce, e));
|
|
2275
|
+
return /* @__PURE__ */ S.createElement(zl, {
|
|
2276
|
+
content: u,
|
|
2277
|
+
createCollection: () => new Xn()
|
|
2278
|
+
}, (s) => /* @__PURE__ */ S.createElement(Qn, {
|
|
2278
2279
|
props: e,
|
|
2279
2280
|
forwardedRef: l,
|
|
2280
2281
|
selectionState: o,
|
|
2281
2282
|
collection: s
|
|
2282
2283
|
}));
|
|
2283
2284
|
});
|
|
2284
|
-
function
|
|
2285
|
-
let o =
|
|
2286
|
-
e = de(
|
|
2285
|
+
function Qn({ props: t, forwardedRef: e, selectionState: l, collection: n }) {
|
|
2286
|
+
let o = B(Ue);
|
|
2287
|
+
e = de(K(() => Kl(e, o?.tableRef), [
|
|
2287
2288
|
e,
|
|
2288
2289
|
o?.tableRef
|
|
2289
2290
|
]));
|
|
2290
|
-
let
|
|
2291
|
+
let r = Un({
|
|
2291
2292
|
...t,
|
|
2292
2293
|
collection: n,
|
|
2293
2294
|
children: void 0,
|
|
2294
2295
|
UNSAFE_selectionState: l
|
|
2295
|
-
}), { isVirtualized:
|
|
2296
|
+
}), { isVirtualized: i, layoutDelegate: a, dropTargetDelegate: c, CollectionRoot: d } = B(Z), { dragAndDropHooks: u } = t, { gridProps: s } = Cn({
|
|
2296
2297
|
...t,
|
|
2297
|
-
layoutDelegate:
|
|
2298
|
-
isVirtualized:
|
|
2299
|
-
},
|
|
2298
|
+
layoutDelegate: a,
|
|
2299
|
+
isVirtualized: i
|
|
2300
|
+
}, r, e), p = r.selectionManager, f = !!u?.useDraggableCollectionState, h = !!u?.useDroppableCollectionState, m = A(f), y = A(h);
|
|
2300
2301
|
ue(() => {
|
|
2301
|
-
process.env.NODE_ENV !== "production" && (
|
|
2302
|
+
process.env.NODE_ENV !== "production" && (m.current !== f && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), y.current !== h && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));
|
|
2302
2303
|
}, [
|
|
2303
2304
|
f,
|
|
2304
2305
|
h
|
|
2305
2306
|
]);
|
|
2306
|
-
let v,
|
|
2307
|
-
if (f &&
|
|
2308
|
-
v =
|
|
2307
|
+
let v, w, g, $ = !1, b = null, C = A(null);
|
|
2308
|
+
if (f && u) {
|
|
2309
|
+
v = u.useDraggableCollectionState({
|
|
2309
2310
|
collection: n,
|
|
2310
2311
|
selectionManager: p,
|
|
2311
|
-
preview:
|
|
2312
|
-
}),
|
|
2313
|
-
let
|
|
2314
|
-
b =
|
|
2315
|
-
ref:
|
|
2316
|
-
},
|
|
2317
|
-
}
|
|
2318
|
-
if (h &&
|
|
2319
|
-
|
|
2312
|
+
preview: u.renderDragPreview ? C : void 0
|
|
2313
|
+
}), u.useDraggableCollection({}, v, e);
|
|
2314
|
+
let U = u.DragPreview;
|
|
2315
|
+
b = u.renderDragPreview ? /* @__PURE__ */ S.createElement(U, {
|
|
2316
|
+
ref: C
|
|
2317
|
+
}, u.renderDragPreview) : null;
|
|
2318
|
+
}
|
|
2319
|
+
if (h && u) {
|
|
2320
|
+
w = u.useDroppableCollectionState({
|
|
2320
2321
|
collection: n,
|
|
2321
2322
|
selectionManager: p
|
|
2322
2323
|
});
|
|
2323
|
-
let
|
|
2324
|
+
let U = new Pl({
|
|
2324
2325
|
collection: n,
|
|
2325
2326
|
disabledKeys: p.disabledKeys,
|
|
2326
2327
|
disabledBehavior: p.disabledBehavior,
|
|
2327
2328
|
ref: e,
|
|
2328
|
-
layoutDelegate:
|
|
2329
|
-
}),
|
|
2330
|
-
|
|
2331
|
-
keyboardDelegate:
|
|
2332
|
-
dropTargetDelegate:
|
|
2333
|
-
},
|
|
2329
|
+
layoutDelegate: a
|
|
2330
|
+
}), ee = u.dropTargetDelegate || c || new u.ListDropTargetDelegate(n.rows, e);
|
|
2331
|
+
g = u.useDroppableCollection({
|
|
2332
|
+
keyboardDelegate: U,
|
|
2333
|
+
dropTargetDelegate: ee
|
|
2334
|
+
}, w, e), $ = w.isDropTarget({
|
|
2334
2335
|
type: "root"
|
|
2335
2336
|
});
|
|
2336
2337
|
}
|
|
2337
|
-
let { focusProps:
|
|
2338
|
+
let { focusProps: k, isFocused: R, isFocusVisible: P } = he(), E = ie({
|
|
2338
2339
|
className: t.className,
|
|
2339
2340
|
style: t.style,
|
|
2340
2341
|
defaultClassName: "react-aria-Table",
|
|
2341
2342
|
values: {
|
|
2342
2343
|
isDropTarget: $,
|
|
2343
|
-
isFocused:
|
|
2344
|
+
isFocused: R,
|
|
2344
2345
|
isFocusVisible: P,
|
|
2345
|
-
state:
|
|
2346
|
+
state: r
|
|
2346
2347
|
}
|
|
2347
|
-
}),
|
|
2348
|
-
o && (
|
|
2348
|
+
}), M = !!(f && !v?.isDisabled), N = E.style, T = null;
|
|
2349
|
+
o && (T = o.useTableColumnResizeState({
|
|
2349
2350
|
tableWidth: o.tableWidth
|
|
2350
|
-
},
|
|
2351
|
-
...
|
|
2351
|
+
}, r), i || (N = {
|
|
2352
|
+
...N,
|
|
2352
2353
|
tableLayout: "fixed",
|
|
2353
2354
|
width: "fit-content"
|
|
2354
2355
|
}));
|
|
2355
|
-
let
|
|
2356
|
+
let F = L("table"), I = Q(t, {
|
|
2356
2357
|
global: !0
|
|
2357
2358
|
});
|
|
2358
|
-
var
|
|
2359
|
-
return /* @__PURE__ */
|
|
2359
|
+
var j;
|
|
2360
|
+
return /* @__PURE__ */ S.createElement(Pe, {
|
|
2360
2361
|
values: [
|
|
2361
2362
|
[
|
|
2362
|
-
|
|
2363
|
-
|
|
2363
|
+
_,
|
|
2364
|
+
r
|
|
2364
2365
|
],
|
|
2365
2366
|
[
|
|
2366
|
-
|
|
2367
|
-
|
|
2367
|
+
Ye,
|
|
2368
|
+
T
|
|
2368
2369
|
],
|
|
2369
2370
|
[
|
|
2370
2371
|
me,
|
|
2371
2372
|
{
|
|
2372
|
-
dragAndDropHooks:
|
|
2373
|
+
dragAndDropHooks: u,
|
|
2373
2374
|
dragState: v,
|
|
2374
|
-
dropState:
|
|
2375
|
+
dropState: w
|
|
2375
2376
|
}
|
|
2376
2377
|
],
|
|
2377
2378
|
[
|
|
2378
|
-
|
|
2379
|
+
Tl,
|
|
2379
2380
|
{
|
|
2380
|
-
render:
|
|
2381
|
+
render: oo
|
|
2381
2382
|
}
|
|
2382
2383
|
]
|
|
2383
2384
|
]
|
|
2384
|
-
}, /* @__PURE__ */
|
|
2385
|
-
...
|
|
2386
|
-
style:
|
|
2385
|
+
}, /* @__PURE__ */ S.createElement(Gl, null, /* @__PURE__ */ S.createElement(F, {
|
|
2386
|
+
...V(I, E, s, k, g?.collectionProps),
|
|
2387
|
+
style: N,
|
|
2387
2388
|
ref: e,
|
|
2388
2389
|
slot: t.slot || void 0,
|
|
2389
2390
|
onScroll: t.onScroll,
|
|
2390
|
-
"data-allows-dragging":
|
|
2391
|
+
"data-allows-dragging": M || void 0,
|
|
2391
2392
|
"data-drop-target": $ || void 0,
|
|
2392
|
-
"data-focused":
|
|
2393
|
+
"data-focused": R || void 0,
|
|
2393
2394
|
"data-focus-visible": P || void 0
|
|
2394
|
-
}, /* @__PURE__ */
|
|
2395
|
+
}, /* @__PURE__ */ S.createElement(d, {
|
|
2395
2396
|
collection: n,
|
|
2396
|
-
scrollRef: (
|
|
2397
|
-
persistedKeys:
|
|
2397
|
+
scrollRef: (j = o?.scrollRef) !== null && j !== void 0 ? j : e,
|
|
2398
|
+
persistedKeys: Nl(p, u, w)
|
|
2398
2399
|
}))), b);
|
|
2399
2400
|
}
|
|
2400
|
-
function
|
|
2401
|
-
let { isVirtualized: e } =
|
|
2401
|
+
function L(t) {
|
|
2402
|
+
let { isVirtualized: e } = B(Z);
|
|
2402
2403
|
return e ? "div" : t;
|
|
2403
2404
|
}
|
|
2404
|
-
const
|
|
2405
|
-
function
|
|
2406
|
-
return
|
|
2405
|
+
const pl = /* @__PURE__ */ se(null);
|
|
2406
|
+
function hl() {
|
|
2407
|
+
return B(pl);
|
|
2407
2408
|
}
|
|
2408
|
-
const
|
|
2409
|
-
let l =
|
|
2409
|
+
const Jn = /* @__PURE__ */ He("tableheader", (t, e) => {
|
|
2410
|
+
let l = B(_).collection, n = Rl({
|
|
2410
2411
|
items: l.headerRows,
|
|
2411
|
-
children:
|
|
2412
|
-
switch (
|
|
2412
|
+
children: O((d) => {
|
|
2413
|
+
switch (d.type) {
|
|
2413
2414
|
case "headerrow":
|
|
2414
|
-
return /* @__PURE__ */
|
|
2415
|
-
item:
|
|
2415
|
+
return /* @__PURE__ */ S.createElement(_n, {
|
|
2416
|
+
item: d
|
|
2416
2417
|
});
|
|
2417
2418
|
default:
|
|
2418
|
-
throw new Error("Unsupported node type in TableHeader: " +
|
|
2419
|
+
throw new Error("Unsupported node type in TableHeader: " + d.type);
|
|
2419
2420
|
}
|
|
2420
2421
|
}, [])
|
|
2421
|
-
}), o =
|
|
2422
|
+
}), o = L("thead"), { rowGroupProps: r } = ul(), { hoverProps: i, isHovered: a } = Se({
|
|
2422
2423
|
onHoverStart: t.onHoverStart,
|
|
2423
2424
|
onHoverChange: t.onHoverChange,
|
|
2424
2425
|
onHoverEnd: t.onHoverEnd
|
|
@@ -2427,51 +2428,51 @@ const Zn = /* @__PURE__ */ We("tableheader", (t, e) => {
|
|
|
2427
2428
|
style: t.style,
|
|
2428
2429
|
defaultClassName: "react-aria-TableHeader",
|
|
2429
2430
|
values: {
|
|
2430
|
-
isHovered:
|
|
2431
|
+
isHovered: a
|
|
2431
2432
|
}
|
|
2432
2433
|
});
|
|
2433
|
-
return /* @__PURE__ */
|
|
2434
|
-
...
|
|
2434
|
+
return /* @__PURE__ */ S.createElement(o, {
|
|
2435
|
+
...V(Q(t, {
|
|
2435
2436
|
global: !0
|
|
2436
|
-
}),
|
|
2437
|
+
}), r, i),
|
|
2437
2438
|
...c,
|
|
2438
2439
|
ref: e,
|
|
2439
|
-
"data-hovered":
|
|
2440
|
+
"data-hovered": a || void 0
|
|
2440
2441
|
}, n);
|
|
2441
|
-
}, (t) => /* @__PURE__ */
|
|
2442
|
+
}, (t) => /* @__PURE__ */ S.createElement(Ce, {
|
|
2442
2443
|
dependencies: t.dependencies,
|
|
2443
2444
|
items: t.columns
|
|
2444
2445
|
}, t.children));
|
|
2445
|
-
function
|
|
2446
|
-
let e =
|
|
2446
|
+
function _n({ item: t }) {
|
|
2447
|
+
let e = A(null), l = B(_), { isVirtualized: n, CollectionBranch: o } = B(Z), { rowProps: r } = zn({
|
|
2447
2448
|
node: t,
|
|
2448
2449
|
isVirtualized: n
|
|
2449
|
-
}, l, e), { checkboxProps:
|
|
2450
|
-
return /* @__PURE__ */
|
|
2451
|
-
...
|
|
2450
|
+
}, l, e), { checkboxProps: i } = An(l), a = L("tr");
|
|
2451
|
+
return /* @__PURE__ */ S.createElement(a, {
|
|
2452
|
+
...r,
|
|
2452
2453
|
ref: e
|
|
2453
|
-
}, /* @__PURE__ */
|
|
2454
|
+
}, /* @__PURE__ */ S.createElement(Pe, {
|
|
2454
2455
|
values: [
|
|
2455
2456
|
[
|
|
2456
|
-
|
|
2457
|
+
mt,
|
|
2457
2458
|
{
|
|
2458
2459
|
slots: {
|
|
2459
|
-
selection:
|
|
2460
|
+
selection: i
|
|
2460
2461
|
}
|
|
2461
2462
|
}
|
|
2462
2463
|
]
|
|
2463
2464
|
]
|
|
2464
|
-
}, /* @__PURE__ */
|
|
2465
|
+
}, /* @__PURE__ */ S.createElement(o, {
|
|
2465
2466
|
collection: l.collection,
|
|
2466
2467
|
parent: t
|
|
2467
2468
|
})));
|
|
2468
2469
|
}
|
|
2469
|
-
const
|
|
2470
|
+
const eo = /* @__PURE__ */ vt("column", (t, e, l) => {
|
|
2470
2471
|
var n, o;
|
|
2471
|
-
let
|
|
2472
|
+
let r = de(e), i = B(_), { isVirtualized: a } = B(Z), { columnHeaderProps: c } = kn({
|
|
2472
2473
|
node: l,
|
|
2473
|
-
isVirtualized:
|
|
2474
|
-
},
|
|
2474
|
+
isVirtualized: a
|
|
2475
|
+
}, i, r), { isFocused: d, isFocusVisible: u, focusProps: s } = he(), p = B(Ye), f = !1;
|
|
2475
2476
|
if (p) f = p.resizingColumn === l.key;
|
|
2476
2477
|
else if (process.env.NODE_ENV !== "production")
|
|
2477
2478
|
for (let $ in [
|
|
@@ -2480,7 +2481,7 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2480
2481
|
"minWidth",
|
|
2481
2482
|
"maxWidth"
|
|
2482
2483
|
]) $ in l.props && console.warn(`The ${$} prop on a <Column> only applies when a <Table> is wrapped in a <ResizableTableContainer>. If you aren't using column resizing, you can set the width of a column with CSS.`);
|
|
2483
|
-
let { hoverProps: h, isHovered:
|
|
2484
|
+
let { hoverProps: h, isHovered: m } = Se({
|
|
2484
2485
|
isDisabled: !t.allowsSorting
|
|
2485
2486
|
}), y = ie({
|
|
2486
2487
|
...t,
|
|
@@ -2488,19 +2489,19 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2488
2489
|
children: l.rendered,
|
|
2489
2490
|
defaultClassName: "react-aria-Column",
|
|
2490
2491
|
values: {
|
|
2491
|
-
isHovered:
|
|
2492
|
-
isFocused:
|
|
2493
|
-
isFocusVisible:
|
|
2492
|
+
isHovered: m,
|
|
2493
|
+
isFocused: d,
|
|
2494
|
+
isFocusVisible: u,
|
|
2494
2495
|
allowsSorting: l.props.allowsSorting,
|
|
2495
|
-
sortDirection: ((n =
|
|
2496
|
+
sortDirection: ((n = i.sortDescriptor) === null || n === void 0 ? void 0 : n.column) === l.key ? i.sortDescriptor.direction : void 0,
|
|
2496
2497
|
isResizing: f,
|
|
2497
2498
|
startResize: () => {
|
|
2498
2499
|
if (p)
|
|
2499
|
-
p.startResize(l.key),
|
|
2500
|
+
p.startResize(l.key), i.setKeyboardNavigationDisabled(!0);
|
|
2500
2501
|
else throw new Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");
|
|
2501
2502
|
},
|
|
2502
2503
|
sort: ($) => {
|
|
2503
|
-
|
|
2504
|
+
i.sort(l.key, $);
|
|
2504
2505
|
}
|
|
2505
2506
|
}
|
|
2506
2507
|
}), v = y.style;
|
|
@@ -2508,104 +2509,104 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2508
2509
|
...v,
|
|
2509
2510
|
width: p.getColumnWidth(l.key)
|
|
2510
2511
|
});
|
|
2511
|
-
let
|
|
2512
|
+
let w = L("th"), g = Q(t, {
|
|
2512
2513
|
global: !0
|
|
2513
2514
|
});
|
|
2514
|
-
return delete
|
|
2515
|
-
...
|
|
2515
|
+
return delete g.id, /* @__PURE__ */ S.createElement(w, {
|
|
2516
|
+
...V(g, c, s, h),
|
|
2516
2517
|
...y,
|
|
2517
2518
|
style: v,
|
|
2518
|
-
ref:
|
|
2519
|
-
"data-hovered":
|
|
2520
|
-
"data-focused":
|
|
2521
|
-
"data-focus-visible":
|
|
2519
|
+
ref: r,
|
|
2520
|
+
"data-hovered": m || void 0,
|
|
2521
|
+
"data-focused": d || void 0,
|
|
2522
|
+
"data-focus-visible": u || void 0,
|
|
2522
2523
|
"data-resizing": f || void 0,
|
|
2523
2524
|
"data-allows-sorting": l.props.allowsSorting || void 0,
|
|
2524
|
-
"data-sort-direction": ((o =
|
|
2525
|
-
}, /* @__PURE__ */
|
|
2525
|
+
"data-sort-direction": ((o = i.sortDescriptor) === null || o === void 0 ? void 0 : o.column) === l.key ? i.sortDescriptor.direction : void 0
|
|
2526
|
+
}, /* @__PURE__ */ S.createElement(Pe, {
|
|
2526
2527
|
values: [
|
|
2527
2528
|
[
|
|
2528
|
-
|
|
2529
|
+
ml,
|
|
2529
2530
|
{
|
|
2530
2531
|
column: l,
|
|
2531
|
-
triggerRef:
|
|
2532
|
+
triggerRef: r
|
|
2532
2533
|
}
|
|
2533
2534
|
],
|
|
2534
2535
|
[
|
|
2535
|
-
|
|
2536
|
-
|
|
2536
|
+
Z,
|
|
2537
|
+
yt
|
|
2537
2538
|
]
|
|
2538
2539
|
]
|
|
2539
2540
|
}, y.children));
|
|
2540
|
-
}),
|
|
2541
|
-
let n =
|
|
2541
|
+
}), ml = /* @__PURE__ */ se(null), to = /* @__PURE__ */ re(function(e, l) {
|
|
2542
|
+
let n = B(Ye);
|
|
2542
2543
|
if (!n) throw new Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");
|
|
2543
|
-
let o = be(
|
|
2544
|
+
let o = be(Yn(Fl), "react-aria-components"), { onResizeStart: r, onResize: i, onResizeEnd: a } = B(Ue), { column: c, triggerRef: d } = B(ml), u = A(null), { resizerProps: s, inputProps: p, isResizing: f } = Mn({
|
|
2544
2545
|
column: c,
|
|
2545
2546
|
"aria-label": e["aria-label"] || o.format("tableResizer"),
|
|
2546
|
-
onResizeStart:
|
|
2547
|
-
onResize:
|
|
2548
|
-
onResizeEnd:
|
|
2549
|
-
triggerRef:
|
|
2550
|
-
}, n,
|
|
2551
|
-
|
|
2552
|
-
let
|
|
2547
|
+
onResizeStart: r,
|
|
2548
|
+
onResize: i,
|
|
2549
|
+
onResizeEnd: a,
|
|
2550
|
+
triggerRef: d
|
|
2551
|
+
}, n, u), { focusProps: h, isFocused: m, isFocusVisible: y } = he(), { hoverProps: v, isHovered: w } = Se(e), g = n.getColumnMinWidth(c.key) >= n.getColumnWidth(c.key), $ = n.getColumnMaxWidth(c.key) <= n.getColumnWidth(c.key), { direction: b } = ge(), C = "both";
|
|
2552
|
+
g ? C = b === "rtl" ? "right" : "left" : $ ? C = b === "rtl" ? "left" : "right" : C = "both";
|
|
2553
|
+
let k = de(l), [R, P] = q("");
|
|
2553
2554
|
ue(() => {
|
|
2554
|
-
if (!
|
|
2555
|
-
let I = window.getComputedStyle(
|
|
2555
|
+
if (!k.current) return;
|
|
2556
|
+
let I = window.getComputedStyle(k.current);
|
|
2556
2557
|
P(I.cursor);
|
|
2557
2558
|
}, [
|
|
2558
|
-
|
|
2559
|
-
|
|
2559
|
+
k,
|
|
2560
|
+
C
|
|
2560
2561
|
]);
|
|
2561
2562
|
let E = ie({
|
|
2562
2563
|
...e,
|
|
2563
2564
|
defaultClassName: "react-aria-ColumnResizer",
|
|
2564
2565
|
values: {
|
|
2565
|
-
isFocused:
|
|
2566
|
+
isFocused: m,
|
|
2566
2567
|
isFocusVisible: y,
|
|
2567
2568
|
isResizing: f,
|
|
2568
|
-
isHovered:
|
|
2569
|
-
resizableDirection:
|
|
2569
|
+
isHovered: w,
|
|
2570
|
+
resizableDirection: C
|
|
2570
2571
|
}
|
|
2571
|
-
}), [
|
|
2572
|
-
I.pointerType === "mouse" &&
|
|
2572
|
+
}), [M, N] = q(!1), T = (I) => {
|
|
2573
|
+
I.pointerType === "mouse" && N(!0);
|
|
2573
2574
|
};
|
|
2574
|
-
!f &&
|
|
2575
|
-
let
|
|
2575
|
+
!f && M && N(!1);
|
|
2576
|
+
let F = Q(e, {
|
|
2576
2577
|
global: !0
|
|
2577
2578
|
});
|
|
2578
|
-
return /* @__PURE__ */
|
|
2579
|
-
ref:
|
|
2579
|
+
return /* @__PURE__ */ S.createElement("div", {
|
|
2580
|
+
ref: k,
|
|
2580
2581
|
role: "presentation",
|
|
2581
|
-
...
|
|
2582
|
-
onPointerDown:
|
|
2582
|
+
...V(F, E, s, {
|
|
2583
|
+
onPointerDown: T
|
|
2583
2584
|
}, v),
|
|
2584
|
-
"data-hovered":
|
|
2585
|
-
"data-focused":
|
|
2585
|
+
"data-hovered": w || void 0,
|
|
2586
|
+
"data-focused": m || void 0,
|
|
2586
2587
|
"data-focus-visible": y || void 0,
|
|
2587
2588
|
"data-resizing": f || void 0,
|
|
2588
|
-
"data-resizable-direction":
|
|
2589
|
-
}, E.children, /* @__PURE__ */
|
|
2590
|
-
ref:
|
|
2591
|
-
...
|
|
2592
|
-
}), f &&
|
|
2589
|
+
"data-resizable-direction": C
|
|
2590
|
+
}, E.children, /* @__PURE__ */ S.createElement("input", {
|
|
2591
|
+
ref: u,
|
|
2592
|
+
...V(p, h)
|
|
2593
|
+
}), f && M && /* @__PURE__ */ Vl.createPortal(/* @__PURE__ */ S.createElement("div", {
|
|
2593
2594
|
style: {
|
|
2594
2595
|
position: "fixed",
|
|
2595
2596
|
top: 0,
|
|
2596
2597
|
left: 0,
|
|
2597
2598
|
bottom: 0,
|
|
2598
2599
|
right: 0,
|
|
2599
|
-
cursor:
|
|
2600
|
+
cursor: R
|
|
2600
2601
|
}
|
|
2601
2602
|
}), document.body));
|
|
2602
|
-
}),
|
|
2603
|
-
let l =
|
|
2604
|
-
var
|
|
2605
|
-
let
|
|
2603
|
+
}), lo = /* @__PURE__ */ He("tablebody", (t, e) => {
|
|
2604
|
+
let l = B(_), { isVirtualized: n } = B(Z), o = l.collection, { CollectionBranch: r } = B(Z), { dragAndDropHooks: i, dropState: a } = B(me), c = !!i?.useDroppableCollectionState && !a?.isDisabled;
|
|
2605
|
+
var d;
|
|
2606
|
+
let u = c && !!a && ((d = a.isDropTarget({
|
|
2606
2607
|
type: "root"
|
|
2607
|
-
})) !== null &&
|
|
2608
|
-
isDropTarget:
|
|
2608
|
+
})) !== null && d !== void 0 ? d : !1), s = o.size === 0, p = {
|
|
2609
|
+
isDropTarget: u,
|
|
2609
2610
|
isEmpty: s
|
|
2610
2611
|
}, f = ie({
|
|
2611
2612
|
...t,
|
|
@@ -2613,131 +2614,131 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2613
2614
|
children: void 0,
|
|
2614
2615
|
defaultClassName: "react-aria-TableBody",
|
|
2615
2616
|
values: p
|
|
2616
|
-
}), h,
|
|
2617
|
+
}), h, m = L("tr"), y = L("td"), v = o.columnCount;
|
|
2617
2618
|
if (s && t.renderEmptyState && l) {
|
|
2618
|
-
let b = {},
|
|
2619
|
-
n ? (
|
|
2619
|
+
let b = {}, C = {}, k = {};
|
|
2620
|
+
n ? (C["aria-colspan"] = v, k = {
|
|
2620
2621
|
display: "contents"
|
|
2621
|
-
}) :
|
|
2622
|
+
}) : C.colSpan = v, h = /* @__PURE__ */ S.createElement(m, {
|
|
2622
2623
|
role: "row",
|
|
2623
2624
|
...b,
|
|
2624
|
-
style:
|
|
2625
|
-
}, /* @__PURE__ */
|
|
2625
|
+
style: k
|
|
2626
|
+
}, /* @__PURE__ */ S.createElement(y, {
|
|
2626
2627
|
role: "rowheader",
|
|
2627
|
-
...
|
|
2628
|
-
style:
|
|
2628
|
+
...C,
|
|
2629
|
+
style: k
|
|
2629
2630
|
}, t.renderEmptyState(p)));
|
|
2630
2631
|
}
|
|
2631
|
-
let { rowGroupProps:
|
|
2632
|
+
let { rowGroupProps: w } = ul(), g = L("tbody"), $ = Q(t, {
|
|
2632
2633
|
global: !0
|
|
2633
2634
|
});
|
|
2634
|
-
return /* @__PURE__ */
|
|
2635
|
-
...
|
|
2635
|
+
return /* @__PURE__ */ S.createElement(g, {
|
|
2636
|
+
...V($, f, w),
|
|
2636
2637
|
ref: e,
|
|
2637
2638
|
"data-empty": s || void 0
|
|
2638
|
-
}, c && /* @__PURE__ */
|
|
2639
|
+
}, c && /* @__PURE__ */ S.createElement(ao, null), /* @__PURE__ */ S.createElement(r, {
|
|
2639
2640
|
collection: o,
|
|
2640
2641
|
parent: o.body,
|
|
2641
|
-
renderDropIndicator:
|
|
2642
|
+
renderDropIndicator: Ml(i, a)
|
|
2642
2643
|
}), h);
|
|
2643
|
-
}),
|
|
2644
|
-
let n = de(e), o =
|
|
2644
|
+
}), ct = /* @__PURE__ */ He("item", (t, e, l) => {
|
|
2645
|
+
let n = de(e), o = B(_), { dragAndDropHooks: r, dragState: i, dropState: a } = B(me), { isVirtualized: c, CollectionBranch: d } = B(Z), { rowProps: u, ...s } = En({
|
|
2645
2646
|
node: l,
|
|
2646
|
-
shouldSelectOnPressUp: !!
|
|
2647
|
+
shouldSelectOnPressUp: !!i,
|
|
2647
2648
|
isVirtualized: c
|
|
2648
|
-
}, o, n), { isFocused: p, isFocusVisible: f, focusProps: h } = he(), { isFocusVisible:
|
|
2649
|
+
}, o, n), { isFocused: p, isFocusVisible: f, focusProps: h } = he(), { isFocusVisible: m, focusProps: y } = he({
|
|
2649
2650
|
within: !0
|
|
2650
|
-
}), { hoverProps: v, isHovered:
|
|
2651
|
+
}), { hoverProps: v, isHovered: w } = Se({
|
|
2651
2652
|
isDisabled: !s.allowsSelection && !s.hasAction,
|
|
2652
2653
|
onHoverStart: t.onHoverStart,
|
|
2653
2654
|
onHoverChange: t.onHoverChange,
|
|
2654
2655
|
onHoverEnd: t.onHoverEnd
|
|
2655
|
-
}), { checkboxProps:
|
|
2656
|
+
}), { checkboxProps: g } = Pn({
|
|
2656
2657
|
key: l.key
|
|
2657
2658
|
}, o), $;
|
|
2658
|
-
|
|
2659
|
+
i && r && ($ = r.useDraggableItem({
|
|
2659
2660
|
key: l.key,
|
|
2660
2661
|
hasDragButton: !0
|
|
2661
|
-
},
|
|
2662
|
-
let b,
|
|
2663
|
-
|
|
2662
|
+
}, i));
|
|
2663
|
+
let b, C = A(null), { visuallyHiddenProps: k } = Ke();
|
|
2664
|
+
a && r && (b = r.useDropIndicator({
|
|
2664
2665
|
target: {
|
|
2665
2666
|
type: "item",
|
|
2666
2667
|
key: l.key,
|
|
2667
2668
|
dropPosition: "on"
|
|
2668
2669
|
}
|
|
2669
|
-
},
|
|
2670
|
-
let
|
|
2670
|
+
}, a, C));
|
|
2671
|
+
let R = A(null);
|
|
2671
2672
|
ue(() => {
|
|
2672
|
-
|
|
2673
|
+
i && !R.current && process.env.NODE_ENV !== "production" && console.warn('Draggable items in a Table must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
|
|
2673
2674
|
}, []);
|
|
2674
|
-
let P =
|
|
2675
|
-
...
|
|
2675
|
+
let P = i && i.isDragging(l.key), { children: E, ...M } = t, N = ie({
|
|
2676
|
+
...M,
|
|
2676
2677
|
id: void 0,
|
|
2677
2678
|
defaultClassName: "react-aria-Row",
|
|
2678
2679
|
values: {
|
|
2679
2680
|
...s,
|
|
2680
|
-
isHovered:
|
|
2681
|
+
isHovered: w,
|
|
2681
2682
|
isFocused: p,
|
|
2682
2683
|
isFocusVisible: f,
|
|
2683
2684
|
selectionMode: o.selectionManager.selectionMode,
|
|
2684
2685
|
selectionBehavior: o.selectionManager.selectionBehavior,
|
|
2685
2686
|
isDragging: P,
|
|
2686
2687
|
isDropTarget: b?.isDropTarget,
|
|
2687
|
-
isFocusVisibleWithin:
|
|
2688
|
+
isFocusVisibleWithin: m,
|
|
2688
2689
|
id: l.key
|
|
2689
2690
|
}
|
|
2690
|
-
}),
|
|
2691
|
+
}), T = L("tr"), F = L("td"), I = Q(t, {
|
|
2691
2692
|
global: !0
|
|
2692
2693
|
});
|
|
2693
|
-
return delete I.id, delete I.onClick, /* @__PURE__ */
|
|
2694
|
+
return delete I.id, delete I.onClick, /* @__PURE__ */ S.createElement(S.Fragment, null, b && !b.isHidden && /* @__PURE__ */ S.createElement(T, {
|
|
2694
2695
|
role: "row",
|
|
2695
2696
|
style: {
|
|
2696
2697
|
height: 0
|
|
2697
2698
|
}
|
|
2698
|
-
}, /* @__PURE__ */
|
|
2699
|
+
}, /* @__PURE__ */ S.createElement(F, {
|
|
2699
2700
|
role: "gridcell",
|
|
2700
2701
|
colSpan: o.collection.columnCount,
|
|
2701
2702
|
style: {
|
|
2702
2703
|
padding: 0
|
|
2703
2704
|
}
|
|
2704
|
-
}, /* @__PURE__ */
|
|
2705
|
+
}, /* @__PURE__ */ S.createElement("div", {
|
|
2705
2706
|
role: "button",
|
|
2706
|
-
...
|
|
2707
|
+
...k,
|
|
2707
2708
|
...b.dropIndicatorProps,
|
|
2708
|
-
ref:
|
|
2709
|
-
}))), /* @__PURE__ */
|
|
2710
|
-
...
|
|
2709
|
+
ref: C
|
|
2710
|
+
}))), /* @__PURE__ */ S.createElement(T, {
|
|
2711
|
+
...V(I, N, u, h, v, $?.dragProps, y),
|
|
2711
2712
|
ref: n,
|
|
2712
2713
|
"data-disabled": s.isDisabled || void 0,
|
|
2713
2714
|
"data-selected": s.isSelected || void 0,
|
|
2714
|
-
"data-hovered":
|
|
2715
|
+
"data-hovered": w || void 0,
|
|
2715
2716
|
"data-focused": s.isFocused || void 0,
|
|
2716
2717
|
"data-focus-visible": f || void 0,
|
|
2717
2718
|
"data-pressed": s.isPressed || void 0,
|
|
2718
2719
|
"data-dragging": P || void 0,
|
|
2719
2720
|
"data-drop-target": b?.isDropTarget || void 0,
|
|
2720
2721
|
"data-selection-mode": o.selectionManager.selectionMode === "none" ? void 0 : o.selectionManager.selectionMode,
|
|
2721
|
-
"data-focus-visible-within":
|
|
2722
|
-
}, /* @__PURE__ */
|
|
2722
|
+
"data-focus-visible-within": m || void 0
|
|
2723
|
+
}, /* @__PURE__ */ S.createElement(Pe, {
|
|
2723
2724
|
values: [
|
|
2724
2725
|
[
|
|
2725
|
-
|
|
2726
|
+
mt,
|
|
2726
2727
|
{
|
|
2727
2728
|
slots: {
|
|
2728
|
-
[
|
|
2729
|
-
selection:
|
|
2729
|
+
[ot]: {},
|
|
2730
|
+
selection: g
|
|
2730
2731
|
}
|
|
2731
2732
|
}
|
|
2732
2733
|
],
|
|
2733
2734
|
[
|
|
2734
|
-
|
|
2735
|
+
ht,
|
|
2735
2736
|
{
|
|
2736
2737
|
slots: {
|
|
2737
|
-
[
|
|
2738
|
+
[ot]: {},
|
|
2738
2739
|
drag: {
|
|
2739
2740
|
...$?.dragButtonProps,
|
|
2740
|
-
ref:
|
|
2741
|
+
ref: R,
|
|
2741
2742
|
style: {
|
|
2742
2743
|
pointerEvents: "none"
|
|
2743
2744
|
}
|
|
@@ -2746,7 +2747,7 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2746
2747
|
}
|
|
2747
2748
|
]
|
|
2748
2749
|
]
|
|
2749
|
-
}, /* @__PURE__ */
|
|
2750
|
+
}, /* @__PURE__ */ S.createElement(d, {
|
|
2750
2751
|
collection: o.collection,
|
|
2751
2752
|
parent: l
|
|
2752
2753
|
}))));
|
|
@@ -2755,204 +2756,120 @@ const Jn = /* @__PURE__ */ gt("column", (t, e, l) => {
|
|
|
2755
2756
|
let e = [
|
|
2756
2757
|
t.value
|
|
2757
2758
|
].concat(t.dependencies);
|
|
2758
|
-
return /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ S.createElement(Ce, {
|
|
2759
2760
|
dependencies: e,
|
|
2760
2761
|
items: t.columns,
|
|
2761
2762
|
idScope: t.id
|
|
2762
2763
|
}, t.children);
|
|
2763
|
-
}),
|
|
2764
|
-
let n = de(e), o =
|
|
2764
|
+
}), no = /* @__PURE__ */ vt("cell", (t, e, l) => {
|
|
2765
|
+
let n = de(e), o = B(_), { dragState: r } = B(me), { isVirtualized: i } = B(Z);
|
|
2765
2766
|
l.column = o.collection.columns[l.index];
|
|
2766
|
-
let { gridCellProps:
|
|
2767
|
+
let { gridCellProps: a, isPressed: c } = Rn({
|
|
2767
2768
|
node: l,
|
|
2768
|
-
shouldSelectOnPressUp: !!
|
|
2769
|
-
isVirtualized:
|
|
2770
|
-
}, o, n), { isFocused:
|
|
2769
|
+
shouldSelectOnPressUp: !!r,
|
|
2770
|
+
isVirtualized: i
|
|
2771
|
+
}, o, n), { isFocused: d, isFocusVisible: u, focusProps: s } = he(), { hoverProps: p, isHovered: f } = Se({}), h = ie({
|
|
2771
2772
|
...t,
|
|
2772
2773
|
id: void 0,
|
|
2773
2774
|
defaultClassName: "react-aria-Cell",
|
|
2774
2775
|
values: {
|
|
2775
|
-
isFocused:
|
|
2776
|
-
isFocusVisible:
|
|
2776
|
+
isFocused: d,
|
|
2777
|
+
isFocusVisible: u,
|
|
2777
2778
|
isPressed: c,
|
|
2778
2779
|
isHovered: f,
|
|
2779
2780
|
id: l.key
|
|
2780
2781
|
}
|
|
2781
|
-
}),
|
|
2782
|
+
}), m = L("td"), y = Q(t, {
|
|
2782
2783
|
global: !0
|
|
2783
2784
|
});
|
|
2784
|
-
return delete y.id, /* @__PURE__ */
|
|
2785
|
-
...
|
|
2785
|
+
return delete y.id, /* @__PURE__ */ S.createElement(m, {
|
|
2786
|
+
...V(y, h, a, s, p),
|
|
2786
2787
|
ref: n,
|
|
2787
|
-
"data-focused":
|
|
2788
|
-
"data-focus-visible":
|
|
2788
|
+
"data-focused": d || void 0,
|
|
2789
|
+
"data-focus-visible": u || void 0,
|
|
2789
2790
|
"data-pressed": c || void 0
|
|
2790
|
-
}, /* @__PURE__ */
|
|
2791
|
-
value:
|
|
2791
|
+
}, /* @__PURE__ */ S.createElement(Z.Provider, {
|
|
2792
|
+
value: yt
|
|
2792
2793
|
}, h.children));
|
|
2793
2794
|
});
|
|
2794
|
-
function
|
|
2795
|
+
function oo(t, e) {
|
|
2795
2796
|
e = de(e);
|
|
2796
|
-
let { dragAndDropHooks: l, dropState: n } =
|
|
2797
|
-
return
|
|
2797
|
+
let { dragAndDropHooks: l, dropState: n } = B(me), o = A(null), { dropIndicatorProps: r, isHidden: i, isDropTarget: a } = l.useDropIndicator(t, n, o);
|
|
2798
|
+
return i ? null : /* @__PURE__ */ S.createElement(io, {
|
|
2798
2799
|
...t,
|
|
2799
|
-
dropIndicatorProps:
|
|
2800
|
-
isDropTarget:
|
|
2800
|
+
dropIndicatorProps: r,
|
|
2801
|
+
isDropTarget: a,
|
|
2801
2802
|
buttonRef: o,
|
|
2802
2803
|
ref: e
|
|
2803
2804
|
});
|
|
2804
2805
|
}
|
|
2805
|
-
function
|
|
2806
|
-
let { dropIndicatorProps: l, isDropTarget: n, buttonRef: o, ...
|
|
2807
|
-
...
|
|
2806
|
+
function ro(t, e) {
|
|
2807
|
+
let { dropIndicatorProps: l, isDropTarget: n, buttonRef: o, ...r } = t, i = B(_), { visuallyHiddenProps: a } = Ke(), c = ie({
|
|
2808
|
+
...r,
|
|
2808
2809
|
defaultClassName: "react-aria-DropIndicator",
|
|
2809
2810
|
values: {
|
|
2810
2811
|
isDropTarget: n
|
|
2811
2812
|
}
|
|
2812
|
-
}),
|
|
2813
|
-
return /* @__PURE__ */
|
|
2814
|
-
...
|
|
2813
|
+
}), d = L("tr"), u = L("td");
|
|
2814
|
+
return /* @__PURE__ */ S.createElement(d, {
|
|
2815
|
+
...Q(t, {
|
|
2815
2816
|
global: !0
|
|
2816
2817
|
}),
|
|
2817
2818
|
...c,
|
|
2818
2819
|
role: "row",
|
|
2819
2820
|
ref: e,
|
|
2820
2821
|
"data-drop-target": n || void 0
|
|
2821
|
-
}, /* @__PURE__ */
|
|
2822
|
+
}, /* @__PURE__ */ S.createElement(u, {
|
|
2822
2823
|
role: "gridcell",
|
|
2823
|
-
colSpan:
|
|
2824
|
+
colSpan: i.collection.columnCount,
|
|
2824
2825
|
style: {
|
|
2825
2826
|
padding: 0
|
|
2826
2827
|
}
|
|
2827
|
-
}, /* @__PURE__ */
|
|
2828
|
-
...
|
|
2828
|
+
}, /* @__PURE__ */ S.createElement("div", {
|
|
2829
|
+
...a,
|
|
2829
2830
|
role: "button",
|
|
2830
2831
|
...l,
|
|
2831
2832
|
ref: o
|
|
2832
2833
|
}), c.children));
|
|
2833
2834
|
}
|
|
2834
|
-
const
|
|
2835
|
-
function
|
|
2836
|
-
let t =
|
|
2835
|
+
const io = /* @__PURE__ */ re(ro);
|
|
2836
|
+
function ao() {
|
|
2837
|
+
let t = B(_), { dragAndDropHooks: e, dropState: l } = B(me), n = A(null), { dropIndicatorProps: o } = e.useDropIndicator({
|
|
2837
2838
|
target: {
|
|
2838
2839
|
type: "root"
|
|
2839
2840
|
}
|
|
2840
|
-
}, l, n),
|
|
2841
|
+
}, l, n), r = l.isDropTarget({
|
|
2841
2842
|
type: "root"
|
|
2842
|
-
}), { visuallyHiddenProps:
|
|
2843
|
-
return !
|
|
2843
|
+
}), { visuallyHiddenProps: i } = Ke(), a = L("tr"), c = L("td");
|
|
2844
|
+
return !r && o["aria-hidden"] ? null : /* @__PURE__ */ S.createElement(a, {
|
|
2844
2845
|
role: "row",
|
|
2845
2846
|
"aria-hidden": o["aria-hidden"],
|
|
2846
2847
|
style: {
|
|
2847
2848
|
height: 0
|
|
2848
2849
|
}
|
|
2849
|
-
}, /* @__PURE__ */
|
|
2850
|
+
}, /* @__PURE__ */ S.createElement(c, {
|
|
2850
2851
|
role: "gridcell",
|
|
2851
2852
|
colSpan: t.collection.columnCount,
|
|
2852
2853
|
style: {
|
|
2853
2854
|
padding: 0
|
|
2854
2855
|
}
|
|
2855
|
-
}, /* @__PURE__ */
|
|
2856
|
+
}, /* @__PURE__ */ S.createElement("div", {
|
|
2856
2857
|
role: "button",
|
|
2857
|
-
...
|
|
2858
|
+
...i,
|
|
2858
2859
|
...o,
|
|
2859
2860
|
ref: n
|
|
2860
2861
|
})));
|
|
2861
2862
|
}
|
|
2862
|
-
const
|
|
2863
|
-
Ke.displayName = "DataTableContext";
|
|
2864
|
-
const ve = () => {
|
|
2865
|
-
const t = A(
|
|
2866
|
-
Ke
|
|
2867
|
-
);
|
|
2868
|
-
if (!t)
|
|
2869
|
-
throw new Error("DataTable components must be used within DataTable.Root");
|
|
2870
|
-
return t;
|
|
2871
|
-
};
|
|
2872
|
-
var Fe = (t, e) => {
|
|
2873
|
-
const l = [], n = (o, i, r) => {
|
|
2874
|
-
i - o > 0 && l.push({ start: o, end: i, match: r });
|
|
2875
|
-
};
|
|
2876
|
-
if (t.length === 0)
|
|
2877
|
-
n(0, e, !1);
|
|
2878
|
-
else {
|
|
2879
|
-
let o = 0;
|
|
2880
|
-
for (const i of t)
|
|
2881
|
-
n(o, i.start, !1), n(i.start, i.end, !0), o = i.end;
|
|
2882
|
-
n(o, e, !1);
|
|
2883
|
-
}
|
|
2884
|
-
return l;
|
|
2885
|
-
}, hl = (t) => t.replace(/[|\\{}()[\]^$+*?.-]/g, (e) => `\\${e}`);
|
|
2886
|
-
function ro(t) {
|
|
2887
|
-
const { text: e, query: l, ignoreCase: n, exactMatch: o } = t;
|
|
2888
|
-
if (o) {
|
|
2889
|
-
const d = hl(l), s = new RegExp(`\\b(${d})\\b`, n ? "i" : ""), p = e.match(s);
|
|
2890
|
-
if (!p || p.index === void 0)
|
|
2891
|
-
return [{ text: e, match: !1 }];
|
|
2892
|
-
const f = p.index, h = f + p[0].length;
|
|
2893
|
-
return Fe([{ start: f, end: h }], e.length).map((y) => ({
|
|
2894
|
-
text: e.slice(y.start, y.end),
|
|
2895
|
-
match: !!y.match
|
|
2896
|
-
}));
|
|
2897
|
-
}
|
|
2898
|
-
const i = n ? e.toLowerCase() : e, r = n && typeof l == "string" ? l.toLowerCase() : l, u = typeof i == "string" ? i.indexOf(r) : -1;
|
|
2899
|
-
if (u === -1)
|
|
2900
|
-
return [{ text: e, match: !1 }];
|
|
2901
|
-
const c = u + r.length;
|
|
2902
|
-
return Fe([{ start: u, end: c }], e.length).map((d) => ({
|
|
2903
|
-
text: e.slice(d.start, d.end),
|
|
2904
|
-
match: !!d.match
|
|
2905
|
-
}));
|
|
2906
|
-
}
|
|
2907
|
-
var ao = (t, e, l) => {
|
|
2908
|
-
const n = t.filter(Boolean).map((i) => hl(i)), o = l ? `\\b(${n.join("|")})\\b` : `(${n.join("|")})`;
|
|
2909
|
-
return new RegExp(o, e);
|
|
2910
|
-
}, uo = (t, e = !0) => `${t ? "i" : ""}${e ? "g" : ""}`;
|
|
2911
|
-
function so(t) {
|
|
2912
|
-
const { text: e, query: l, ignoreCase: n, matchAll: o, exactMatch: i } = t;
|
|
2913
|
-
if (l.length === 0)
|
|
2914
|
-
return [{ text: e, match: !1 }];
|
|
2915
|
-
const r = uo(n, o), u = ao(Array.isArray(l) ? l : [l], r, i), c = [...e.matchAll(u)].map((a) => ({
|
|
2916
|
-
start: a.index || 0,
|
|
2917
|
-
end: (a.index || 0) + a[0].length
|
|
2918
|
-
}));
|
|
2919
|
-
return Fe(c, t.text.length).map((a) => ({
|
|
2920
|
-
text: t.text.slice(a.start, a.end),
|
|
2921
|
-
match: !!a.match
|
|
2922
|
-
}));
|
|
2923
|
-
}
|
|
2924
|
-
var co = (t) => {
|
|
2925
|
-
if (t.matchAll == null && (t.matchAll = Array.isArray(t.query)), !t.matchAll && Array.isArray(t.query))
|
|
2926
|
-
throw new Error("matchAll must be true when using multiple queries");
|
|
2927
|
-
return t.matchAll ? so(t) : ro(t);
|
|
2928
|
-
};
|
|
2929
|
-
const fo = (t) => N(() => co(t), [t]), { withContext: po } = /* @__PURE__ */ dn({
|
|
2930
|
-
key: "mark"
|
|
2931
|
-
}), ho = /* @__PURE__ */ po("mark");
|
|
2932
|
-
function mo(t) {
|
|
2933
|
-
const { each: e, fallback: l, children: n } = t;
|
|
2934
|
-
return e?.length === 0 ? l || null : e?.map(n);
|
|
2935
|
-
}
|
|
2936
|
-
function go(t) {
|
|
2937
|
-
const { children: e, query: l, ignoreCase: n, matchAll: o, styles: i } = t;
|
|
2938
|
-
if (typeof e != "string")
|
|
2939
|
-
throw new Error("The children prop of Highlight must be a string");
|
|
2940
|
-
const r = fo({
|
|
2941
|
-
query: l,
|
|
2942
|
-
text: e,
|
|
2943
|
-
matchAll: o,
|
|
2944
|
-
ignoreCase: n
|
|
2945
|
-
});
|
|
2946
|
-
return /* @__PURE__ */ D(mo, { each: r, children: (u, c) => u.match ? /* @__PURE__ */ D(ho, { css: i, children: u.text }, c) : /* @__PURE__ */ D(xl, { children: u.text }, c) });
|
|
2947
|
-
}
|
|
2948
|
-
const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
2949
|
-
return /* @__PURE__ */ D(to, { ref: o, ...n, children: (i) => /* @__PURE__ */ D(ft.Provider, { value: { isDisabled: l }, children: typeof e == "function" ? e(i) : e }) });
|
|
2950
|
-
}), bo = /* @__PURE__ */ tn({
|
|
2863
|
+
const uo = /* @__PURE__ */ nn({
|
|
2951
2864
|
// Available slots for the DataTable component
|
|
2952
2865
|
slots: [
|
|
2953
2866
|
"root",
|
|
2954
2867
|
"table",
|
|
2868
|
+
"header",
|
|
2955
2869
|
"column",
|
|
2870
|
+
"body",
|
|
2871
|
+
"row",
|
|
2872
|
+
"cell",
|
|
2956
2873
|
"footer",
|
|
2957
2874
|
"selectionCell",
|
|
2958
2875
|
"detailsButton",
|
|
@@ -3086,40 +3003,77 @@ const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
|
3086
3003
|
width: "fit-content",
|
|
3087
3004
|
tableLayout: "fixed"
|
|
3088
3005
|
},
|
|
3006
|
+
header: {
|
|
3007
|
+
background: "colorPalette.2",
|
|
3008
|
+
color: "colorPalette.11",
|
|
3009
|
+
borderBottom: "1px solid {colors.neutral.3}",
|
|
3010
|
+
lineHeight: "400",
|
|
3011
|
+
fontWeight: "500",
|
|
3012
|
+
textStyle: "sm",
|
|
3013
|
+
fontSize: "300",
|
|
3014
|
+
height: "1000",
|
|
3015
|
+
"&[data-sticky]": {
|
|
3016
|
+
position: "sticky",
|
|
3017
|
+
top: 0,
|
|
3018
|
+
zIndex: 10
|
|
3019
|
+
},
|
|
3020
|
+
"& span[data-multiline-header]": {
|
|
3021
|
+
overflow: "hidden",
|
|
3022
|
+
lineHeight: "450",
|
|
3023
|
+
wordBreak: "break-word",
|
|
3024
|
+
whiteSpace: "normal",
|
|
3025
|
+
textOverflow: "ellipsis",
|
|
3026
|
+
textAlign: "left",
|
|
3027
|
+
display: "-webkit-box",
|
|
3028
|
+
WebkitLineClamp: 2,
|
|
3029
|
+
WebkitBoxOrient: "vertical"
|
|
3030
|
+
},
|
|
3031
|
+
"& .data-table-column-divider": {
|
|
3032
|
+
display: "none",
|
|
3033
|
+
position: "absolute",
|
|
3034
|
+
right: 0,
|
|
3035
|
+
top: "10%",
|
|
3036
|
+
bottom: "10%",
|
|
3037
|
+
height: "80%",
|
|
3038
|
+
width: "1px",
|
|
3039
|
+
pointerEvents: "none"
|
|
3040
|
+
},
|
|
3041
|
+
_hover: {
|
|
3042
|
+
"& .data-table-column-divider": {
|
|
3043
|
+
display: "inherit"
|
|
3044
|
+
},
|
|
3045
|
+
"& tr th:last-of-type .data-table-column-divider": {
|
|
3046
|
+
display: "none"
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3089
3050
|
column: {
|
|
3090
3051
|
textAlign: "right",
|
|
3091
3052
|
position: "relative",
|
|
3092
|
-
paddingTop: "100",
|
|
3093
|
-
paddingBottom: "100",
|
|
3094
|
-
paddingLeft: "600",
|
|
3095
|
-
paddingRight: "600",
|
|
3096
3053
|
lineHeight: "450",
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3054
|
+
h: "100%",
|
|
3055
|
+
"&:focus": {
|
|
3056
|
+
outlineWidth: "var(--focus-ring-width)",
|
|
3057
|
+
outlineColor: "var(--focus-ring-color)",
|
|
3058
|
+
outlineStyle: "var(--focus-ring-style)",
|
|
3059
|
+
outlineOffset: "-2px",
|
|
3060
|
+
borderRadius: "2px"
|
|
3104
3061
|
},
|
|
3105
|
-
"& >
|
|
3062
|
+
"& > .nimbus-data-table__column-container": {
|
|
3063
|
+
paddingTop: "100",
|
|
3064
|
+
paddingBottom: "100",
|
|
3065
|
+
paddingLeft: "600",
|
|
3066
|
+
paddingRight: "600",
|
|
3106
3067
|
display: "flex",
|
|
3107
3068
|
alignItems: "center",
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
wordBreak: "break-word",
|
|
3117
|
-
whiteSpace: "normal",
|
|
3118
|
-
textOverflow: "ellipsis",
|
|
3119
|
-
textAlign: "left",
|
|
3120
|
-
display: "-webkit-box",
|
|
3121
|
-
WebkitLineClamp: 2,
|
|
3122
|
-
WebkitBoxOrient: "vertical"
|
|
3069
|
+
h: "100%",
|
|
3070
|
+
// https://react-spectrum.adobe.com/react-aria/Table.html#width-values
|
|
3071
|
+
"&:focus": {
|
|
3072
|
+
outlineWidth: "var(--focus-ring-width)",
|
|
3073
|
+
outlineColor: "var(--focus-ring-color)",
|
|
3074
|
+
outlineStyle: "var(--focus-ring-style)",
|
|
3075
|
+
outlineOffset: "-2px",
|
|
3076
|
+
borderRadius: "2px"
|
|
3123
3077
|
},
|
|
3124
3078
|
"& > span:not(:first-of-type)": {
|
|
3125
3079
|
flexShrink: 0
|
|
@@ -3127,6 +3081,10 @@ const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
|
3127
3081
|
},
|
|
3128
3082
|
"&.selection-column-header, &.expand-column-header": {
|
|
3129
3083
|
cursor: "default",
|
|
3084
|
+
paddingTop: "100",
|
|
3085
|
+
paddingBottom: "100",
|
|
3086
|
+
paddingLeft: "600",
|
|
3087
|
+
paddingRight: "600",
|
|
3130
3088
|
"&:hover": {
|
|
3131
3089
|
backgroundColor: "transparent"
|
|
3132
3090
|
}
|
|
@@ -3138,41 +3096,110 @@ const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
|
3138
3096
|
fontWeight: 600,
|
|
3139
3097
|
cursor: "pointer",
|
|
3140
3098
|
"&[aria-sort='none']:hover": {
|
|
3141
|
-
"& .nimbus-data-table__headerSortIcon": {
|
|
3142
|
-
display: "inherit"
|
|
3143
|
-
}
|
|
3144
|
-
},
|
|
3145
|
-
"&[aria-sort='ascending'], &[aria-sort='descending']": {
|
|
3146
|
-
"& .nimbus-data-table__headerSortIcon": {
|
|
3099
|
+
"& .nimbus-data-table__headerSortIcon > svg": {
|
|
3147
3100
|
display: "inherit"
|
|
3148
3101
|
}
|
|
3149
|
-
},
|
|
3150
|
-
"&[aria-sort='ascending']": {
|
|
3151
|
-
"& .nimbus-data-table__headerSortIcon": {
|
|
3152
|
-
transform: "rotate(180deg)"
|
|
3153
|
-
}
|
|
3154
3102
|
}
|
|
3155
3103
|
}
|
|
3156
3104
|
},
|
|
3105
|
+
body: {},
|
|
3106
|
+
row: {
|
|
3107
|
+
position: "relative",
|
|
3108
|
+
borderBottom: "1px solid {colors.neutral.3}",
|
|
3109
|
+
focusRing: "outside",
|
|
3110
|
+
"&:hover:not([data-nested-row-expanded])": {
|
|
3111
|
+
backgroundColor: "{colors.primary.3}",
|
|
3112
|
+
transition: "background-color 200ms ease",
|
|
3113
|
+
transform: "translate3d(0, 0, 0)",
|
|
3114
|
+
"& .nimbus-data-table__detailsButton": {
|
|
3115
|
+
opacity: 1
|
|
3116
|
+
}
|
|
3117
|
+
},
|
|
3118
|
+
"& td, div": {
|
|
3119
|
+
userSelect: "none"
|
|
3120
|
+
},
|
|
3121
|
+
"&:last-child": {
|
|
3122
|
+
borderBottom: "none"
|
|
3123
|
+
},
|
|
3124
|
+
"&[data-clickable='true']": {
|
|
3125
|
+
cursor: "pointer"
|
|
3126
|
+
},
|
|
3127
|
+
"&[data-selected='true']": {
|
|
3128
|
+
background: "{colors.primary.4}"
|
|
3129
|
+
},
|
|
3130
|
+
"&[data-disabled='true']": {
|
|
3131
|
+
// layerStyle: "disabled",
|
|
3132
|
+
opacity: 0.8,
|
|
3133
|
+
cursor: "not-allowed"
|
|
3134
|
+
},
|
|
3135
|
+
"&[data-nested-row-expanded='false']": {
|
|
3136
|
+
display: "none"
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
cell: {
|
|
3140
|
+
paddingTop: "400",
|
|
3141
|
+
paddingBottom: "400",
|
|
3142
|
+
paddingLeft: "600",
|
|
3143
|
+
paddingRight: "600",
|
|
3144
|
+
color: "neutral.11",
|
|
3145
|
+
focusRing: "outside",
|
|
3146
|
+
hyphens: "auto",
|
|
3147
|
+
height: "100%",
|
|
3148
|
+
_hover: {
|
|
3149
|
+
"& .nimbus-table-cell-copy-button:not([data-disabled='true'])": {
|
|
3150
|
+
display: "inherit"
|
|
3151
|
+
}
|
|
3152
|
+
},
|
|
3153
|
+
"&[data-slot='expand']": {
|
|
3154
|
+
padding: 0
|
|
3155
|
+
},
|
|
3156
|
+
"& .nimbus-table-cell-copy-button": {
|
|
3157
|
+
display: "none",
|
|
3158
|
+
ml: "100"
|
|
3159
|
+
},
|
|
3160
|
+
"&[data-nested-cell]": {
|
|
3161
|
+
boxShadow: "inset 2px 0 0 {colors.primary.10}"
|
|
3162
|
+
}
|
|
3163
|
+
},
|
|
3157
3164
|
footer: {
|
|
3158
3165
|
width: "100%"
|
|
3159
3166
|
},
|
|
3160
3167
|
selectionCell: {},
|
|
3161
|
-
detailsButton: {
|
|
3162
|
-
|
|
3168
|
+
detailsButton: {
|
|
3169
|
+
margin: "auto",
|
|
3170
|
+
colorPalette: "primary",
|
|
3171
|
+
opacity: 0,
|
|
3172
|
+
focusRing: "outside",
|
|
3173
|
+
_focus: {
|
|
3174
|
+
opacity: 1
|
|
3175
|
+
},
|
|
3176
|
+
"&[data-disabled='true']": {
|
|
3177
|
+
opacity: 0
|
|
3178
|
+
}
|
|
3179
|
+
},
|
|
3163
3180
|
nestedIcon: {},
|
|
3164
3181
|
headerSortIcon: {
|
|
3165
|
-
transition: "transform
|
|
3166
|
-
display: "
|
|
3182
|
+
transition: "transform 300ms cubic-bezier(0.4, 0.0, 0.2, 1)",
|
|
3183
|
+
display: "flex",
|
|
3167
3184
|
alignItems: "center",
|
|
3168
3185
|
justifyContent: "center",
|
|
3169
3186
|
marginLeft: "6px",
|
|
3170
3187
|
width: "16px",
|
|
3171
3188
|
height: "16px",
|
|
3172
|
-
willChange: "opacity, color, transform"
|
|
3189
|
+
willChange: "opacity, color, transform",
|
|
3190
|
+
color: "neutral.10",
|
|
3191
|
+
// Only hide the svg so that the sort icon appearing does not cause layout shift
|
|
3192
|
+
"& > svg": { display: "none" },
|
|
3193
|
+
"&[data-sort-active='true']": {
|
|
3194
|
+
color: "neutral.11",
|
|
3195
|
+
"& > svg": { display: "inherit" }
|
|
3196
|
+
},
|
|
3197
|
+
"&[data-sort-direction='ascending']": {
|
|
3198
|
+
transform: "rotate(180deg)"
|
|
3199
|
+
}
|
|
3173
3200
|
},
|
|
3174
3201
|
columnResizer: {
|
|
3175
|
-
width: "
|
|
3202
|
+
width: "150",
|
|
3176
3203
|
height: "100%",
|
|
3177
3204
|
position: "absolute",
|
|
3178
3205
|
right: 0,
|
|
@@ -3182,11 +3209,16 @@ const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
|
3182
3209
|
background: "transparent",
|
|
3183
3210
|
outline: "none",
|
|
3184
3211
|
zIndex: 2,
|
|
3212
|
+
"&:hover": {
|
|
3213
|
+
background: "var(--focus-ring-color)"
|
|
3214
|
+
},
|
|
3185
3215
|
"&[data-resizing='true']": {
|
|
3186
3216
|
background: "{colors.primary}"
|
|
3187
3217
|
},
|
|
3188
3218
|
"&[data-focused='true']": {
|
|
3189
|
-
|
|
3219
|
+
outlineWidth: "var(--focus-ring-width)",
|
|
3220
|
+
outlineColor: "var(--focus-ring-color)",
|
|
3221
|
+
outlineStyle: "var(--focus-ring-style)"
|
|
3190
3222
|
}
|
|
3191
3223
|
}
|
|
3192
3224
|
},
|
|
@@ -3206,120 +3238,207 @@ const pe = /* @__PURE__ */ X(function({ children: e, isDisabled: l, ...n }, o) {
|
|
|
3206
3238
|
},
|
|
3207
3239
|
density: {
|
|
3208
3240
|
default: {
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
paddingBottom: "400"
|
|
3213
|
-
}
|
|
3241
|
+
cell: {
|
|
3242
|
+
paddingTop: "400",
|
|
3243
|
+
paddingBottom: "400"
|
|
3214
3244
|
}
|
|
3215
3245
|
},
|
|
3216
3246
|
condensed: {
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
paddingBottom: "300"
|
|
3221
|
-
}
|
|
3247
|
+
cell: {
|
|
3248
|
+
paddingTop: "300",
|
|
3249
|
+
paddingBottom: "300"
|
|
3222
3250
|
}
|
|
3223
3251
|
}
|
|
3224
3252
|
}
|
|
3225
3253
|
}
|
|
3226
|
-
}), { withProvider:
|
|
3254
|
+
}), { withProvider: so, withContext: Y } = /* @__PURE__ */ on({
|
|
3227
3255
|
key: "data-table",
|
|
3228
|
-
recipe:
|
|
3229
|
-
}),
|
|
3256
|
+
recipe: uo
|
|
3257
|
+
}), co = /* @__PURE__ */ so(
|
|
3230
3258
|
"div",
|
|
3231
3259
|
"root"
|
|
3232
|
-
),
|
|
3233
|
-
|
|
3260
|
+
), fo = /* @__PURE__ */ Y("table", "table"), po = /* @__PURE__ */ Y("tr", "header"), ho = /* @__PURE__ */ Y("th", "column"), mo = /* @__PURE__ */ Y("tbody", "body"), ft = /* @__PURE__ */ Y("tr", "row"), go = /* @__PURE__ */ Y("td", "cell"), bo = /* @__PURE__ */ Y("footer", "footer"), vo = /* @__PURE__ */ Y("td", "selectionCell"), gl = /* @__PURE__ */ Y("button", "expandButton"), yo = /* @__PURE__ */ Y("span", "nestedIcon"), $o = /* @__PURE__ */ Y("span", "headerSortIcon"), xo = /* @__PURE__ */ Y("div", "columnResizer"), Me = /* @__PURE__ */ se(null);
|
|
3261
|
+
Me.displayName = "DataTableContext";
|
|
3262
|
+
const ye = () => {
|
|
3263
|
+
const t = B(
|
|
3264
|
+
Me
|
|
3265
|
+
);
|
|
3266
|
+
if (!t)
|
|
3267
|
+
throw new Error("DataTable components must be used within DataTable.Root");
|
|
3268
|
+
return t;
|
|
3269
|
+
};
|
|
3270
|
+
var Ie = (t, e) => {
|
|
3271
|
+
const l = [], n = (o, r, i) => {
|
|
3272
|
+
r - o > 0 && l.push({ start: o, end: r, match: i });
|
|
3273
|
+
};
|
|
3274
|
+
if (t.length === 0)
|
|
3275
|
+
n(0, e, !1);
|
|
3276
|
+
else {
|
|
3277
|
+
let o = 0;
|
|
3278
|
+
for (const r of t)
|
|
3279
|
+
n(o, r.start, !1), n(r.start, r.end, !0), o = r.end;
|
|
3280
|
+
n(o, e, !1);
|
|
3281
|
+
}
|
|
3282
|
+
return l;
|
|
3283
|
+
}, bl = (t) => t.replace(/[|\\{}()[\]^$+*?.-]/g, (e) => `\\${e}`);
|
|
3284
|
+
function wo(t) {
|
|
3285
|
+
const { text: e, query: l, ignoreCase: n, exactMatch: o } = t;
|
|
3286
|
+
if (o) {
|
|
3287
|
+
const u = bl(l), s = new RegExp(`\\b(${u})\\b`, n ? "i" : ""), p = e.match(s);
|
|
3288
|
+
if (!p || p.index === void 0)
|
|
3289
|
+
return [{ text: e, match: !1 }];
|
|
3290
|
+
const f = p.index, h = f + p[0].length;
|
|
3291
|
+
return Ie([{ start: f, end: h }], e.length).map((y) => ({
|
|
3292
|
+
text: e.slice(y.start, y.end),
|
|
3293
|
+
match: !!y.match
|
|
3294
|
+
}));
|
|
3295
|
+
}
|
|
3296
|
+
const r = n ? e.toLowerCase() : e, i = n && typeof l == "string" ? l.toLowerCase() : l, a = typeof r == "string" ? r.indexOf(i) : -1;
|
|
3297
|
+
if (a === -1)
|
|
3298
|
+
return [{ text: e, match: !1 }];
|
|
3299
|
+
const c = a + i.length;
|
|
3300
|
+
return Ie([{ start: a, end: c }], e.length).map((u) => ({
|
|
3301
|
+
text: e.slice(u.start, u.end),
|
|
3302
|
+
match: !!u.match
|
|
3303
|
+
}));
|
|
3304
|
+
}
|
|
3305
|
+
var Do = (t, e, l) => {
|
|
3306
|
+
const n = t.filter(Boolean).map((r) => bl(r)), o = l ? `\\b(${n.join("|")})\\b` : `(${n.join("|")})`;
|
|
3307
|
+
return new RegExp(o, e);
|
|
3308
|
+
}, Co = (t, e = !0) => `${t ? "i" : ""}${e ? "g" : ""}`;
|
|
3309
|
+
function So(t) {
|
|
3310
|
+
const { text: e, query: l, ignoreCase: n, matchAll: o, exactMatch: r } = t;
|
|
3311
|
+
if (l.length === 0)
|
|
3312
|
+
return [{ text: e, match: !1 }];
|
|
3313
|
+
const i = Co(n, o), a = Do(Array.isArray(l) ? l : [l], i, r), c = [...e.matchAll(a)].map((d) => ({
|
|
3314
|
+
start: d.index || 0,
|
|
3315
|
+
end: (d.index || 0) + d[0].length
|
|
3316
|
+
}));
|
|
3317
|
+
return Ie(c, t.text.length).map((d) => ({
|
|
3318
|
+
text: t.text.slice(d.start, d.end),
|
|
3319
|
+
match: !!d.match
|
|
3320
|
+
}));
|
|
3321
|
+
}
|
|
3322
|
+
var ko = (t) => {
|
|
3323
|
+
if (t.matchAll == null && (t.matchAll = Array.isArray(t.query)), !t.matchAll && Array.isArray(t.query))
|
|
3324
|
+
throw new Error("matchAll must be true when using multiple queries");
|
|
3325
|
+
return t.matchAll ? So(t) : wo(t);
|
|
3326
|
+
};
|
|
3327
|
+
const Eo = (t) => K(() => ko(t), [t]), { withContext: zo } = /* @__PURE__ */ fn({
|
|
3328
|
+
key: "mark"
|
|
3329
|
+
}), Ro = /* @__PURE__ */ zo("mark");
|
|
3330
|
+
function Bo(t) {
|
|
3331
|
+
const { each: e, fallback: l, children: n } = t;
|
|
3332
|
+
return e?.length === 0 ? l || null : e?.map(n);
|
|
3333
|
+
}
|
|
3334
|
+
function Po(t) {
|
|
3335
|
+
const { children: e, query: l, ignoreCase: n, matchAll: o, styles: r } = t;
|
|
3336
|
+
if (typeof e != "string")
|
|
3337
|
+
throw new Error("The children prop of Highlight must be a string");
|
|
3338
|
+
const i = Eo({
|
|
3339
|
+
query: l,
|
|
3340
|
+
text: e,
|
|
3341
|
+
matchAll: o,
|
|
3342
|
+
ignoreCase: n
|
|
3343
|
+
});
|
|
3344
|
+
return /* @__PURE__ */ D(Bo, { each: i, children: (a, c) => a.match ? /* @__PURE__ */ D(Ro, { css: r, children: a.text }, c) : /* @__PURE__ */ D(Dl, { children: a.text }, c) });
|
|
3345
|
+
}
|
|
3346
|
+
const pe = ({
|
|
3347
|
+
ref: t,
|
|
3348
|
+
children: e,
|
|
3349
|
+
isDisabled: l,
|
|
3350
|
+
...n
|
|
3351
|
+
}) => {
|
|
3352
|
+
const [o, r] = ve(n);
|
|
3353
|
+
return /* @__PURE__ */ D(go, { asChild: !0, ...o, children: /* @__PURE__ */ D(no, { ref: t, ...r, children: (i) => /* @__PURE__ */ D(ht.Provider, { value: { isDisabled: l }, children: typeof e == "function" ? e(i) : e }) }) });
|
|
3354
|
+
};
|
|
3355
|
+
function We(t) {
|
|
3234
3356
|
return t.target?.closest(
|
|
3235
3357
|
'button, input, [role="button"], [role="checkbox"], [slot="selection"], [data-slot="selection"]'
|
|
3236
3358
|
);
|
|
3237
3359
|
}
|
|
3238
|
-
function
|
|
3360
|
+
function Ao(t) {
|
|
3239
3361
|
return t.target?.closest(
|
|
3240
3362
|
'[slot="selection"], [data-slot="selection"], [role="checkbox"]'
|
|
3241
3363
|
);
|
|
3242
3364
|
}
|
|
3243
|
-
function
|
|
3244
|
-
const e =
|
|
3365
|
+
function pt(t) {
|
|
3366
|
+
const e = We(t), l = Ao(t);
|
|
3245
3367
|
(!e || e && !l) && t.stopPropagation();
|
|
3246
3368
|
}
|
|
3247
|
-
const
|
|
3369
|
+
const Xe = ({
|
|
3370
|
+
row: t,
|
|
3371
|
+
ref: e,
|
|
3372
|
+
...l
|
|
3373
|
+
}) => {
|
|
3248
3374
|
const {
|
|
3249
|
-
activeColumns:
|
|
3250
|
-
search:
|
|
3375
|
+
activeColumns: n,
|
|
3376
|
+
search: o,
|
|
3251
3377
|
expanded: r,
|
|
3252
|
-
toggleExpand:
|
|
3253
|
-
nestedKey:
|
|
3254
|
-
disabledKeys:
|
|
3378
|
+
toggleExpand: i,
|
|
3379
|
+
nestedKey: a,
|
|
3380
|
+
disabledKeys: c,
|
|
3255
3381
|
showExpandColumn: d,
|
|
3256
|
-
showSelectionColumn:
|
|
3257
|
-
isTruncated:
|
|
3258
|
-
onRowClick:
|
|
3259
|
-
onRowAction:
|
|
3260
|
-
pinnedRows:
|
|
3261
|
-
togglePin:
|
|
3262
|
-
sortedRows:
|
|
3263
|
-
} = ve(),
|
|
3264
|
-
(
|
|
3265
|
-
if (!
|
|
3266
|
-
const
|
|
3267
|
-
!
|
|
3268
|
-
|
|
3382
|
+
showSelectionColumn: u,
|
|
3383
|
+
isTruncated: s,
|
|
3384
|
+
onRowClick: p,
|
|
3385
|
+
onRowAction: f,
|
|
3386
|
+
pinnedRows: h,
|
|
3387
|
+
togglePin: m,
|
|
3388
|
+
sortedRows: y
|
|
3389
|
+
} = ye(), [v, w] = ve(l), $ = ((x) => c ? c === "all" || t.isDisabled ? !0 : c.has(x) : !1)(t.id), b = A(null), C = O(
|
|
3390
|
+
(x) => {
|
|
3391
|
+
if (!p) return;
|
|
3392
|
+
const z = We(x), W = window.getSelection()?.toString() !== void 0 && window.getSelection().toString().length > 0;
|
|
3393
|
+
!z && !W && (b.current && window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
3394
|
+
$ ? f && f(t, "click") : p(t), b.current = null;
|
|
3269
3395
|
}, 300));
|
|
3270
3396
|
},
|
|
3271
|
-
[
|
|
3272
|
-
),
|
|
3273
|
-
|
|
3274
|
-
}, []),
|
|
3397
|
+
[p, f, t, $]
|
|
3398
|
+
), k = O((x) => {
|
|
3399
|
+
We(x) || b.current && (window.clearTimeout(b.current), b.current = null);
|
|
3400
|
+
}, []), R = A({
|
|
3275
3401
|
count: 0,
|
|
3276
3402
|
node: void 0
|
|
3277
|
-
}),
|
|
3278
|
-
(
|
|
3279
|
-
|
|
3403
|
+
}), P = O(
|
|
3404
|
+
(x) => {
|
|
3405
|
+
R.current.count += 1, R.current.count === 1 && x && (R.current.node = x, x.addEventListener(
|
|
3280
3406
|
// Use pointerdown event in order to capture event before it bubbles to react-aria's onPress handler
|
|
3281
3407
|
"pointerdown",
|
|
3282
|
-
|
|
3408
|
+
pt,
|
|
3283
3409
|
{
|
|
3284
3410
|
capture: !0
|
|
3285
3411
|
}
|
|
3286
|
-
),
|
|
3412
|
+
), x.addEventListener("mouseup", C, { capture: !0 }), x.addEventListener("dblclick", k, {
|
|
3287
3413
|
capture: !0
|
|
3288
3414
|
}));
|
|
3289
3415
|
},
|
|
3290
|
-
[
|
|
3416
|
+
[C, k]
|
|
3291
3417
|
);
|
|
3292
3418
|
ue(() => () => {
|
|
3293
|
-
|
|
3419
|
+
b.current && (window.clearTimeout(b.current), b.current = null), R.current.count >= 1 && R.current.node && (R.current.node.removeEventListener(
|
|
3294
3420
|
"pointerdown",
|
|
3295
|
-
|
|
3296
|
-
),
|
|
3421
|
+
pt
|
|
3422
|
+
), R.current.node.removeEventListener("mouseup", C), R.current.node.removeEventListener(
|
|
3297
3423
|
"dblclick",
|
|
3298
|
-
|
|
3424
|
+
k
|
|
3299
3425
|
));
|
|
3300
|
-
}, [
|
|
3301
|
-
const
|
|
3302
|
-
return /* @__PURE__ */ oe(
|
|
3303
|
-
/* @__PURE__ */ oe(
|
|
3304
|
-
|
|
3426
|
+
}, [C, k]);
|
|
3427
|
+
const E = rn(e, P), { selectionBehavior: M } = hl(), N = a && t[a] && (Array.isArray(t[a]) ? t[a].length > 0 : !0), T = r[t.id], F = h.has(t.id), I = y.filter((x) => h.has(x.id)).map((x) => x.id), j = F ? I.indexOf(t.id) : -1, U = j === 0, ee = j === I.length - 1, $e = I.length === 1 && F, te = () => F ? $e ? "data-table-row-pinned-single" : U ? "data-table-row-pinned-first" : ee ? "data-table-row-pinned-last" : "" : "", J = (x) => o && typeof x == "string" ? /* @__PURE__ */ D(Po, { query: o, ignoreCase: !0, matchAll: !0, children: x }) : x;
|
|
3428
|
+
return /* @__PURE__ */ oe(wl, { children: [
|
|
3429
|
+
/* @__PURE__ */ D(ft, { asChild: !0, ...v, children: /* @__PURE__ */ oe(
|
|
3430
|
+
ct,
|
|
3305
3431
|
{
|
|
3306
|
-
isDisabled:
|
|
3307
|
-
columns:
|
|
3308
|
-
ref:
|
|
3309
|
-
id:
|
|
3310
|
-
className: `data-table-row ${
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
position: "relative",
|
|
3314
|
-
...l > 0 && {
|
|
3315
|
-
borderLeft: "2px solid var(--colors-primary-6)",
|
|
3316
|
-
backgroundColor: "var(--colors-slate-2)"
|
|
3317
|
-
}
|
|
3318
|
-
},
|
|
3319
|
-
dependencies: [K, i, p],
|
|
3432
|
+
isDisabled: $,
|
|
3433
|
+
columns: n,
|
|
3434
|
+
ref: E,
|
|
3435
|
+
id: t.id,
|
|
3436
|
+
className: `data-table-row ${$ ? "data-table-row-disabled" : ""} ${F ? `data-table-row-pinned ${te()}` : ""}`,
|
|
3437
|
+
...w,
|
|
3438
|
+
dependencies: [T, o, s],
|
|
3320
3439
|
children: [
|
|
3321
|
-
|
|
3322
|
-
|
|
3440
|
+
M === "toggle" && /* @__PURE__ */ D(pe, { "data-slot": "selection", isDisabled: $, children: /* @__PURE__ */ D(
|
|
3441
|
+
De,
|
|
3323
3442
|
{
|
|
3324
3443
|
display: "flex",
|
|
3325
3444
|
alignItems: "center",
|
|
@@ -3327,7 +3446,7 @@ const Ye = /* @__PURE__ */ X(function({ row: e, depth: l = 0 }, n) {
|
|
|
3327
3446
|
w: "100%",
|
|
3328
3447
|
h: "100%",
|
|
3329
3448
|
children: /* @__PURE__ */ D(
|
|
3330
|
-
|
|
3449
|
+
wt,
|
|
3331
3450
|
{
|
|
3332
3451
|
name: "select-row",
|
|
3333
3452
|
slot: "selection",
|
|
@@ -3336,163 +3455,188 @@ const Ye = /* @__PURE__ */ X(function({ row: e, depth: l = 0 }, n) {
|
|
|
3336
3455
|
)
|
|
3337
3456
|
}
|
|
3338
3457
|
) }),
|
|
3339
|
-
d && /* @__PURE__ */ D(pe, { "data-slot": "expand", isDisabled:
|
|
3340
|
-
|
|
3458
|
+
d && /* @__PURE__ */ D(pe, { "data-slot": "expand", isDisabled: $, children: N ? /* @__PURE__ */ D(
|
|
3459
|
+
gl,
|
|
3341
3460
|
{
|
|
3342
3461
|
w: "100%",
|
|
3343
3462
|
h: "100%",
|
|
3344
3463
|
cursor: "pointer",
|
|
3345
|
-
"aria-label":
|
|
3346
|
-
onClick: (
|
|
3347
|
-
|
|
3464
|
+
"aria-label": T ? "Collapse" : "Expand",
|
|
3465
|
+
onClick: (x) => {
|
|
3466
|
+
x.stopPropagation(), i(t.id);
|
|
3348
3467
|
},
|
|
3349
|
-
children:
|
|
3468
|
+
children: T ? /* @__PURE__ */ D(un, {}) : /* @__PURE__ */ D(sn, {})
|
|
3350
3469
|
}
|
|
3351
3470
|
) : null }),
|
|
3352
|
-
/* @__PURE__ */ D(
|
|
3353
|
-
const
|
|
3354
|
-
return /* @__PURE__ */ D(pe, { isDisabled:
|
|
3355
|
-
|
|
3471
|
+
/* @__PURE__ */ D(Ce, { items: n, children: (x) => {
|
|
3472
|
+
const z = x.accessor(t);
|
|
3473
|
+
return /* @__PURE__ */ D(pe, { isDisabled: $, children: /* @__PURE__ */ D(
|
|
3474
|
+
De,
|
|
3356
3475
|
{
|
|
3357
|
-
className:
|
|
3476
|
+
className: s ? "truncated-cell" : "",
|
|
3358
3477
|
display: "inline-block",
|
|
3359
3478
|
h: "100%",
|
|
3360
3479
|
minW: "0",
|
|
3361
3480
|
maxW: "100%",
|
|
3362
3481
|
position: "relative",
|
|
3363
3482
|
overflow: "hidden",
|
|
3364
|
-
cursor:
|
|
3365
|
-
children:
|
|
3366
|
-
value:
|
|
3367
|
-
row:
|
|
3368
|
-
column:
|
|
3369
|
-
}) :
|
|
3483
|
+
cursor: $ ? "not-allowed" : "text",
|
|
3484
|
+
children: x.render ? x.render({
|
|
3485
|
+
value: J(z),
|
|
3486
|
+
row: t,
|
|
3487
|
+
column: x
|
|
3488
|
+
}) : J(z)
|
|
3370
3489
|
}
|
|
3371
|
-
) },
|
|
3490
|
+
) }, x.id);
|
|
3372
3491
|
} }),
|
|
3373
|
-
/* @__PURE__ */ D(pe, { "data-slot": "pin-row-cell", isDisabled:
|
|
3374
|
-
|
|
3492
|
+
/* @__PURE__ */ D(pe, { "data-slot": "pin-row-cell", isDisabled: $, children: /* @__PURE__ */ D(
|
|
3493
|
+
De,
|
|
3375
3494
|
{
|
|
3376
3495
|
display: "flex",
|
|
3377
3496
|
alignItems: "center",
|
|
3378
3497
|
justifyContent: "center",
|
|
3379
3498
|
w: "100%",
|
|
3380
3499
|
h: "100%",
|
|
3381
|
-
children: /* @__PURE__ */ oe(
|
|
3500
|
+
children: /* @__PURE__ */ oe(st.Root, { children: [
|
|
3382
3501
|
/* @__PURE__ */ D(
|
|
3383
|
-
|
|
3502
|
+
an,
|
|
3384
3503
|
{
|
|
3385
3504
|
size: "2xs",
|
|
3386
3505
|
variant: "ghost",
|
|
3387
3506
|
"aria-label": F ? "Unpin row" : "Pin row",
|
|
3388
3507
|
colorPalette: "primary",
|
|
3389
3508
|
className: `nimbus-table-cell-pin-button ${F ? "nimbus-table-cell-pin-button-pinned" : ""}`,
|
|
3390
|
-
onClick: (
|
|
3391
|
-
|
|
3509
|
+
onClick: (x) => {
|
|
3510
|
+
x.stopPropagation(), m(t.id);
|
|
3392
3511
|
},
|
|
3393
|
-
children: /* @__PURE__ */ D(
|
|
3512
|
+
children: /* @__PURE__ */ D(dn, {})
|
|
3394
3513
|
},
|
|
3395
3514
|
"pin-btn"
|
|
3396
3515
|
),
|
|
3397
|
-
/* @__PURE__ */ D(
|
|
3516
|
+
/* @__PURE__ */ D(st.Content, { placement: "top", children: F ? "Unpin row" : "Pin row" })
|
|
3398
3517
|
] })
|
|
3399
3518
|
}
|
|
3400
3519
|
) })
|
|
3401
3520
|
]
|
|
3402
3521
|
}
|
|
3403
|
-
),
|
|
3404
|
-
d && /* @__PURE__ */ D(
|
|
3405
|
-
|
|
3522
|
+
) }),
|
|
3523
|
+
d && /* @__PURE__ */ D(ft, { ...v, asChild: !0, children: /* @__PURE__ */ D(
|
|
3524
|
+
ct,
|
|
3406
3525
|
{
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3526
|
+
"data-nested-row-expanded": T ? "true" : "false",
|
|
3527
|
+
dependencies: [T],
|
|
3528
|
+
children: /* @__PURE__ */ D(
|
|
3529
|
+
pe,
|
|
3530
|
+
{
|
|
3531
|
+
isDisabled: $,
|
|
3532
|
+
colSpan: n.length + (d ? 1 : 0) + (u ? 1 : 0) + 1,
|
|
3533
|
+
"data-nested-cell": !0,
|
|
3534
|
+
children: T ? a && Array.isArray(t[a]) ? `${t[a].length} nested items` : a && t[a] : null
|
|
3535
|
+
}
|
|
3536
|
+
)
|
|
3413
3537
|
}
|
|
3414
3538
|
) })
|
|
3415
3539
|
] });
|
|
3416
|
-
}
|
|
3417
|
-
|
|
3418
|
-
const
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3540
|
+
};
|
|
3541
|
+
Xe.displayName = "DataTable.Row";
|
|
3542
|
+
const Ko = () => /* @__PURE__ */ D(De, { w: "100%", p: "200", children: "No Data" }), Ge = ({
|
|
3543
|
+
ref: t,
|
|
3544
|
+
...e
|
|
3545
|
+
}) => {
|
|
3546
|
+
const { sortedRows: l, activeColumns: n, renderEmptyState: o } = ye(), [r, i] = ve(e);
|
|
3547
|
+
return /* @__PURE__ */ D(mo, { asChild: !0, ...r, children: /* @__PURE__ */ D(
|
|
3548
|
+
lo,
|
|
3422
3549
|
{
|
|
3423
|
-
ref:
|
|
3424
|
-
items:
|
|
3425
|
-
dependencies: [
|
|
3426
|
-
renderEmptyState:
|
|
3427
|
-
...
|
|
3428
|
-
children: (
|
|
3550
|
+
ref: t,
|
|
3551
|
+
items: l,
|
|
3552
|
+
dependencies: [n],
|
|
3553
|
+
renderEmptyState: o ?? Ko,
|
|
3554
|
+
...i,
|
|
3555
|
+
children: (a) => /* @__PURE__ */ D(Xe, { row: a }, a.id)
|
|
3429
3556
|
}
|
|
3430
|
-
);
|
|
3431
|
-
}
|
|
3432
|
-
|
|
3433
|
-
const
|
|
3557
|
+
) });
|
|
3558
|
+
};
|
|
3559
|
+
Ge.displayName = "DataTable.Body";
|
|
3560
|
+
const xe = ({
|
|
3434
3561
|
children: t,
|
|
3435
3562
|
ref: e,
|
|
3436
3563
|
column: l,
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3564
|
+
isInternalColumn: n,
|
|
3565
|
+
width: o,
|
|
3566
|
+
minWidth: r,
|
|
3567
|
+
maxWidth: i,
|
|
3568
|
+
...a
|
|
3441
3569
|
}) => {
|
|
3442
|
-
const { sortDescriptor:
|
|
3443
|
-
return /* @__PURE__ */ D(
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3570
|
+
const { sortDescriptor: c, isResizable: d } = ye(), u = c?.column === l?.id, s = l?.isResizable !== void 0 ? l?.isResizable : d, [p, f] = ve(a);
|
|
3571
|
+
return /* @__PURE__ */ D(ho, { ...p, asChild: !0, children: /* @__PURE__ */ D(
|
|
3572
|
+
eo,
|
|
3573
|
+
{
|
|
3574
|
+
width: o,
|
|
3575
|
+
minWidth: r,
|
|
3576
|
+
maxWidth: i,
|
|
3577
|
+
ref: e,
|
|
3578
|
+
...f,
|
|
3579
|
+
children: (h) => {
|
|
3580
|
+
const { allowsSorting: m } = h;
|
|
3581
|
+
return n ? typeof t == "function" ? t(h) : t : /* @__PURE__ */ oe(
|
|
3582
|
+
hn,
|
|
3583
|
+
{
|
|
3584
|
+
tabIndex: s || m ? -1 : 0,
|
|
3585
|
+
className: "nimbus-data-table__column-container",
|
|
3586
|
+
children: [
|
|
3587
|
+
/* @__PURE__ */ D(
|
|
3588
|
+
pn,
|
|
3589
|
+
{
|
|
3590
|
+
orientation: "vertical",
|
|
3591
|
+
className: "data-table-column-divider"
|
|
3592
|
+
}
|
|
3593
|
+
),
|
|
3594
|
+
typeof t == "function" ? t(h) : t,
|
|
3595
|
+
m && /* @__PURE__ */ D(
|
|
3596
|
+
$o,
|
|
3597
|
+
{
|
|
3598
|
+
"aria-hidden": "true",
|
|
3599
|
+
"data-sort-active": u,
|
|
3600
|
+
"data-sort-direction": u ? c?.direction : "none",
|
|
3601
|
+
children: /* @__PURE__ */ D(cn, {})
|
|
3602
|
+
}
|
|
3603
|
+
),
|
|
3604
|
+
s && /* @__PURE__ */ D(to, { "aria-label": "Resize column", children: ({ isResizing: y, isFocused: v, isHovered: w }) => /* @__PURE__ */ D(
|
|
3605
|
+
xo,
|
|
3606
|
+
{
|
|
3607
|
+
"data-resizing": y,
|
|
3608
|
+
"data-focused": v,
|
|
3609
|
+
"data-hovered": w
|
|
3610
|
+
}
|
|
3611
|
+
) })
|
|
3612
|
+
]
|
|
3613
|
+
}
|
|
3614
|
+
);
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
) });
|
|
3618
|
+
}, qe = /* @__PURE__ */ re(
|
|
3472
3619
|
function({ children: e, ...l }, n) {
|
|
3473
|
-
return /* @__PURE__ */ D(
|
|
3620
|
+
return /* @__PURE__ */ D(bo, { ref: n, ...l, children: e });
|
|
3474
3621
|
}
|
|
3475
3622
|
);
|
|
3476
|
-
|
|
3477
|
-
const
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3623
|
+
qe.displayName = "DataTable.Footer";
|
|
3624
|
+
const Ze = ({
|
|
3625
|
+
ref: t,
|
|
3626
|
+
...e
|
|
3627
|
+
}) => {
|
|
3628
|
+
const { activeColumns: l, allowsSorting: n, maxHeight: o, showExpandColumn: r } = ye(), { selectionBehavior: i, selectionMode: a } = hl(), [c, d] = ve(e);
|
|
3629
|
+
return /* @__PURE__ */ D(po, { ...c, asChild: !0, children: /* @__PURE__ */ oe(
|
|
3630
|
+
Jn,
|
|
3481
3631
|
{
|
|
3482
|
-
ref:
|
|
3632
|
+
ref: t,
|
|
3483
3633
|
className: "data-table-header",
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
top: 0,
|
|
3488
|
-
zIndex: 10
|
|
3489
|
-
}
|
|
3490
|
-
},
|
|
3491
|
-
columns: n,
|
|
3492
|
-
...e,
|
|
3634
|
+
...o && { "data-sticky": !0 },
|
|
3635
|
+
columns: l,
|
|
3636
|
+
...d,
|
|
3493
3637
|
children: [
|
|
3494
|
-
|
|
3495
|
-
|
|
3638
|
+
i === "toggle" && /* @__PURE__ */ D(
|
|
3639
|
+
xe,
|
|
3496
3640
|
{
|
|
3497
3641
|
id: "selection",
|
|
3498
3642
|
className: "selection-column-header",
|
|
@@ -3500,42 +3644,42 @@ const qe = /* @__PURE__ */ X(function(e, l) {
|
|
|
3500
3644
|
minWidth: 72,
|
|
3501
3645
|
allowsSorting: !1,
|
|
3502
3646
|
isInternalColumn: !0,
|
|
3503
|
-
children:
|
|
3647
|
+
children: a === "multiple" && /* @__PURE__ */ D(wt, { slot: "selection" })
|
|
3504
3648
|
}
|
|
3505
3649
|
),
|
|
3506
3650
|
r && /* @__PURE__ */ D(
|
|
3507
|
-
|
|
3651
|
+
xe,
|
|
3508
3652
|
{
|
|
3509
3653
|
className: "expand-column-header",
|
|
3510
|
-
maxWidth: 24,
|
|
3511
|
-
minWidth: 24,
|
|
3654
|
+
maxWidth: i === "toggle" ? 24 : 72,
|
|
3655
|
+
minWidth: i === "toggle" ? 24 : 72,
|
|
3512
3656
|
allowsSorting: !1,
|
|
3513
3657
|
"aria-label": "Expand rows",
|
|
3514
3658
|
isInternalColumn: !0,
|
|
3515
|
-
children: /* @__PURE__ */ D(
|
|
3659
|
+
children: /* @__PURE__ */ D(ut, { children: "Expand rows" })
|
|
3516
3660
|
}
|
|
3517
3661
|
),
|
|
3518
|
-
/* @__PURE__ */ D(
|
|
3519
|
-
|
|
3662
|
+
/* @__PURE__ */ D(Ce, { items: l, children: (u) => /* @__PURE__ */ oe(
|
|
3663
|
+
xe,
|
|
3520
3664
|
{
|
|
3521
3665
|
allowsSorting: (
|
|
3522
3666
|
// use column.isSortable if defined, and fallback to allowsSorting if not
|
|
3523
|
-
|
|
3667
|
+
u.isSortable !== void 0 ? u.isSortable : n
|
|
3524
3668
|
),
|
|
3525
3669
|
isRowHeader: !0,
|
|
3526
|
-
width:
|
|
3527
|
-
defaultWidth:
|
|
3528
|
-
minWidth:
|
|
3529
|
-
maxWidth:
|
|
3530
|
-
column:
|
|
3670
|
+
width: u.width,
|
|
3671
|
+
defaultWidth: u.defaultWidth,
|
|
3672
|
+
minWidth: u.minWidth ?? 150,
|
|
3673
|
+
maxWidth: u.maxWidth,
|
|
3674
|
+
column: u,
|
|
3531
3675
|
children: [
|
|
3532
|
-
/* @__PURE__ */ D("span", { "data-multiline-header": !0, children:
|
|
3533
|
-
|
|
3676
|
+
/* @__PURE__ */ D("span", { "data-multiline-header": !0, children: u.header }),
|
|
3677
|
+
u.headerIcon && /* @__PURE__ */ D(De, { as: "span", ml: "200", children: u.headerIcon })
|
|
3534
3678
|
]
|
|
3535
3679
|
}
|
|
3536
3680
|
) }),
|
|
3537
3681
|
/* @__PURE__ */ D(
|
|
3538
|
-
|
|
3682
|
+
xe,
|
|
3539
3683
|
{
|
|
3540
3684
|
className: "pin-rows-column-header",
|
|
3541
3685
|
id: "pin-rows",
|
|
@@ -3544,301 +3688,296 @@ const qe = /* @__PURE__ */ X(function(e, l) {
|
|
|
3544
3688
|
allowsSorting: !1,
|
|
3545
3689
|
isInternalColumn: !0,
|
|
3546
3690
|
"aria-label": "Pin rows",
|
|
3547
|
-
children: /* @__PURE__ */ D(
|
|
3691
|
+
children: /* @__PURE__ */ D(ut, { children: "Pin rows" })
|
|
3548
3692
|
}
|
|
3549
3693
|
)
|
|
3550
3694
|
]
|
|
3551
3695
|
}
|
|
3552
|
-
);
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
|
-
function
|
|
3696
|
+
) });
|
|
3697
|
+
};
|
|
3698
|
+
Ze.displayName = "DataTable.Header";
|
|
3699
|
+
function vl(t, e, l, n) {
|
|
3556
3700
|
if (!e) return t;
|
|
3557
3701
|
const o = e.toLowerCase();
|
|
3558
|
-
return t.map((
|
|
3559
|
-
const
|
|
3560
|
-
const c =
|
|
3702
|
+
return t.map((r) => {
|
|
3703
|
+
const i = l.some((a) => {
|
|
3704
|
+
const c = a.accessor(r);
|
|
3561
3705
|
return typeof c == "string" && c.toLowerCase().includes(o);
|
|
3562
3706
|
});
|
|
3563
|
-
if (n &&
|
|
3564
|
-
let
|
|
3565
|
-
if (Array.isArray(
|
|
3566
|
-
if (
|
|
3567
|
-
|
|
3707
|
+
if (n && r[n]) {
|
|
3708
|
+
let a = r[n];
|
|
3709
|
+
if (Array.isArray(r[n])) {
|
|
3710
|
+
if (a = vl(
|
|
3711
|
+
r[n],
|
|
3568
3712
|
e,
|
|
3569
3713
|
l,
|
|
3570
3714
|
n
|
|
3571
|
-
),
|
|
3572
|
-
return { ...
|
|
3573
|
-
} else if (
|
|
3574
|
-
return { ...
|
|
3715
|
+
), i || a && Array.isArray(a) && a.length > 0)
|
|
3716
|
+
return { ...r, [n]: a };
|
|
3717
|
+
} else if (i)
|
|
3718
|
+
return { ...r, [n]: a };
|
|
3575
3719
|
return null;
|
|
3576
3720
|
} else
|
|
3577
|
-
return
|
|
3721
|
+
return i ? r : null;
|
|
3578
3722
|
}).filter(Boolean);
|
|
3579
3723
|
}
|
|
3580
|
-
function
|
|
3581
|
-
const
|
|
3582
|
-
t.forEach((
|
|
3583
|
-
o?.has(
|
|
3724
|
+
function yl(t, e, l, n, o) {
|
|
3725
|
+
const r = [], i = [];
|
|
3726
|
+
t.forEach((d) => {
|
|
3727
|
+
o?.has(d.id) ? r.push(d) : i.push(d);
|
|
3584
3728
|
});
|
|
3585
|
-
let
|
|
3729
|
+
let a = i;
|
|
3586
3730
|
if (e) {
|
|
3587
|
-
const
|
|
3588
|
-
|
|
3589
|
-
const p =
|
|
3731
|
+
const d = l.find((u) => u.id === e.column);
|
|
3732
|
+
d && (a = [...i].sort((u, s) => {
|
|
3733
|
+
const p = d.accessor(u), f = d.accessor(s);
|
|
3590
3734
|
if (p == null && f == null) return 0;
|
|
3591
3735
|
if (p == null) return 1;
|
|
3592
3736
|
if (f == null) return -1;
|
|
3593
|
-
let h = p,
|
|
3594
|
-
return typeof p == "number" && typeof f == "number" ? (h = p,
|
|
3737
|
+
let h = p, m = f;
|
|
3738
|
+
return typeof p == "number" && typeof f == "number" ? (h = p, m = f) : (h = String(p).toLowerCase(), m = String(f).toLowerCase()), h < m ? e.direction === "ascending" ? -1 : 1 : h > m ? e.direction === "ascending" ? 1 : -1 : 0;
|
|
3595
3739
|
}));
|
|
3596
3740
|
}
|
|
3597
|
-
return [...
|
|
3598
|
-
...
|
|
3599
|
-
[n]: Array.isArray(
|
|
3600
|
-
|
|
3741
|
+
return [...r, ...a].map((d) => !n || !d[n] ? d : {
|
|
3742
|
+
...d,
|
|
3743
|
+
[n]: Array.isArray(d[n]) ? yl(
|
|
3744
|
+
d[n],
|
|
3601
3745
|
e,
|
|
3602
3746
|
l,
|
|
3603
3747
|
n,
|
|
3604
3748
|
o
|
|
3605
|
-
) :
|
|
3749
|
+
) : d[n]
|
|
3606
3750
|
});
|
|
3607
3751
|
}
|
|
3608
|
-
function
|
|
3752
|
+
function $l(t, e) {
|
|
3609
3753
|
return e ? t.some(
|
|
3610
|
-
(l) => l[e] && (Array.isArray(l[e]) ? l[e].length > 0 : !0) || Array.isArray(l[e]) &&
|
|
3754
|
+
(l) => l[e] && (Array.isArray(l[e]) ? l[e].length > 0 : !0) || Array.isArray(l[e]) && $l(l[e], e)
|
|
3611
3755
|
) : !1;
|
|
3612
3756
|
}
|
|
3613
|
-
const
|
|
3757
|
+
const Qe = /* @__PURE__ */ re(
|
|
3614
3758
|
function(e, l) {
|
|
3615
3759
|
const {
|
|
3616
3760
|
columns: n = [],
|
|
3617
3761
|
data: o = [],
|
|
3618
|
-
visibleColumns:
|
|
3619
|
-
search:
|
|
3620
|
-
sortDescriptor:
|
|
3762
|
+
visibleColumns: r,
|
|
3763
|
+
search: i,
|
|
3764
|
+
sortDescriptor: a,
|
|
3621
3765
|
defaultSortDescriptor: c,
|
|
3622
|
-
onSortChange:
|
|
3623
|
-
selectedKeys:
|
|
3766
|
+
onSortChange: d,
|
|
3767
|
+
selectedKeys: u,
|
|
3624
3768
|
defaultSelectedKeys: s,
|
|
3625
3769
|
onSelectionChange: p,
|
|
3626
3770
|
selectionMode: f = "none",
|
|
3627
3771
|
disallowEmptySelection: h = !1,
|
|
3628
|
-
allowsSorting:
|
|
3772
|
+
allowsSorting: m = !1,
|
|
3629
3773
|
maxHeight: y,
|
|
3630
3774
|
isTruncated: v = !1,
|
|
3631
|
-
density:
|
|
3632
|
-
nestedKey:
|
|
3775
|
+
density: w = "default",
|
|
3776
|
+
nestedKey: g,
|
|
3633
3777
|
onRowClick: $,
|
|
3634
3778
|
onDetailsClick: b,
|
|
3635
|
-
disabledKeys:
|
|
3636
|
-
onRowAction:
|
|
3637
|
-
isResizable:
|
|
3779
|
+
disabledKeys: C,
|
|
3780
|
+
onRowAction: k,
|
|
3781
|
+
isResizable: R,
|
|
3638
3782
|
pinnedRows: P,
|
|
3639
3783
|
defaultPinnedRows: E,
|
|
3640
|
-
onPinToggle:
|
|
3641
|
-
children:
|
|
3642
|
-
...
|
|
3643
|
-
} = e, [
|
|
3784
|
+
onPinToggle: M,
|
|
3785
|
+
children: N,
|
|
3786
|
+
...T
|
|
3787
|
+
} = e, [F, I] = q(c), [j, U] = q({}), [ee, $e] = q(
|
|
3644
3788
|
() => E || /* @__PURE__ */ new Set()
|
|
3645
|
-
),
|
|
3646
|
-
(ae) => (
|
|
3647
|
-
), [n,
|
|
3648
|
-
() =>
|
|
3649
|
-
[o,
|
|
3650
|
-
),
|
|
3651
|
-
() =>
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3789
|
+
), te = a ?? F, J = P ?? ee, x = K(() => n.filter(
|
|
3790
|
+
(ae) => (r ? r.includes(ae.id) : !0) && ae.isVisible !== !1
|
|
3791
|
+
), [n, r]), z = K(
|
|
3792
|
+
() => i ? vl(o, i, x, g) : o,
|
|
3793
|
+
[o, i, x, g]
|
|
3794
|
+
), W = K(
|
|
3795
|
+
() => yl(
|
|
3796
|
+
z,
|
|
3797
|
+
te,
|
|
3798
|
+
x,
|
|
3799
|
+
g,
|
|
3800
|
+
J
|
|
3657
3801
|
),
|
|
3658
|
-
[
|
|
3659
|
-
),
|
|
3660
|
-
(
|
|
3802
|
+
[z, te, x, g, J]
|
|
3803
|
+
), Ee = $l(W, g), _e = f !== "none", et = O(
|
|
3804
|
+
(X) => U((ae) => ({ ...ae, [X]: !ae[X] })),
|
|
3661
3805
|
[]
|
|
3662
|
-
),
|
|
3663
|
-
(
|
|
3664
|
-
|
|
3665
|
-
const
|
|
3666
|
-
return
|
|
3806
|
+
), tt = O(
|
|
3807
|
+
(X) => {
|
|
3808
|
+
M ? M(X) : $e((ae) => {
|
|
3809
|
+
const ze = new Set(ae);
|
|
3810
|
+
return ze.has(X) ? ze.delete(X) : ze.add(X), ze;
|
|
3667
3811
|
});
|
|
3668
3812
|
},
|
|
3669
|
-
[
|
|
3670
|
-
),
|
|
3671
|
-
(
|
|
3672
|
-
|
|
3813
|
+
[M]
|
|
3814
|
+
), lt = O(
|
|
3815
|
+
(X) => {
|
|
3816
|
+
d ? d(X) : I(X);
|
|
3673
3817
|
},
|
|
3674
|
-
[
|
|
3675
|
-
),
|
|
3818
|
+
[d]
|
|
3819
|
+
), xl = K(
|
|
3676
3820
|
() => ({
|
|
3677
3821
|
columns: n,
|
|
3678
3822
|
data: o,
|
|
3679
|
-
visibleColumns:
|
|
3680
|
-
search:
|
|
3681
|
-
sortDescriptor:
|
|
3682
|
-
selectedKeys:
|
|
3823
|
+
visibleColumns: r,
|
|
3824
|
+
search: i,
|
|
3825
|
+
sortDescriptor: te,
|
|
3826
|
+
selectedKeys: u,
|
|
3683
3827
|
defaultSelectedKeys: s,
|
|
3684
|
-
expanded:
|
|
3685
|
-
allowsSorting:
|
|
3828
|
+
expanded: j,
|
|
3829
|
+
allowsSorting: m,
|
|
3686
3830
|
selectionMode: f,
|
|
3687
3831
|
disallowEmptySelection: h,
|
|
3688
3832
|
maxHeight: y,
|
|
3689
3833
|
isTruncated: v,
|
|
3690
|
-
density:
|
|
3691
|
-
nestedKey:
|
|
3692
|
-
onSortChange:
|
|
3834
|
+
density: w,
|
|
3835
|
+
nestedKey: g,
|
|
3836
|
+
onSortChange: lt,
|
|
3693
3837
|
onSelectionChange: p,
|
|
3694
3838
|
onRowClick: $,
|
|
3695
3839
|
onDetailsClick: b,
|
|
3696
|
-
toggleExpand:
|
|
3697
|
-
activeColumns:
|
|
3698
|
-
filteredRows:
|
|
3699
|
-
sortedRows:
|
|
3700
|
-
showExpandColumn:
|
|
3701
|
-
showSelectionColumn:
|
|
3702
|
-
isResizable:
|
|
3703
|
-
disabledKeys:
|
|
3704
|
-
onRowAction:
|
|
3705
|
-
pinnedRows:
|
|
3706
|
-
onPinToggle:
|
|
3707
|
-
togglePin:
|
|
3840
|
+
toggleExpand: et,
|
|
3841
|
+
activeColumns: x,
|
|
3842
|
+
filteredRows: z,
|
|
3843
|
+
sortedRows: W,
|
|
3844
|
+
showExpandColumn: Ee,
|
|
3845
|
+
showSelectionColumn: _e,
|
|
3846
|
+
isResizable: R,
|
|
3847
|
+
disabledKeys: C,
|
|
3848
|
+
onRowAction: k,
|
|
3849
|
+
pinnedRows: J,
|
|
3850
|
+
onPinToggle: M,
|
|
3851
|
+
togglePin: tt
|
|
3708
3852
|
}),
|
|
3709
3853
|
[
|
|
3710
3854
|
n,
|
|
3711
3855
|
o,
|
|
3712
|
-
i,
|
|
3713
3856
|
r,
|
|
3714
|
-
|
|
3715
|
-
|
|
3857
|
+
i,
|
|
3858
|
+
te,
|
|
3859
|
+
u,
|
|
3716
3860
|
s,
|
|
3717
|
-
|
|
3718
|
-
|
|
3861
|
+
j,
|
|
3862
|
+
m,
|
|
3719
3863
|
f,
|
|
3720
3864
|
h,
|
|
3721
3865
|
y,
|
|
3722
3866
|
v,
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3867
|
+
w,
|
|
3868
|
+
g,
|
|
3869
|
+
lt,
|
|
3726
3870
|
p,
|
|
3727
3871
|
$,
|
|
3728
3872
|
b,
|
|
3873
|
+
et,
|
|
3874
|
+
x,
|
|
3875
|
+
z,
|
|
3876
|
+
W,
|
|
3877
|
+
Ee,
|
|
3729
3878
|
_e,
|
|
3730
|
-
C,
|
|
3731
3879
|
R,
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
S,
|
|
3738
|
-
z,
|
|
3739
|
-
T,
|
|
3740
|
-
et
|
|
3880
|
+
C,
|
|
3881
|
+
k,
|
|
3882
|
+
J,
|
|
3883
|
+
M,
|
|
3884
|
+
tt
|
|
3741
3885
|
]
|
|
3742
3886
|
);
|
|
3743
3887
|
return /* @__PURE__ */ D(
|
|
3744
|
-
|
|
3888
|
+
co,
|
|
3745
3889
|
{
|
|
3746
3890
|
ref: l,
|
|
3747
3891
|
truncated: v,
|
|
3748
|
-
density:
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
maxHeight: y,
|
|
3752
|
-
overflowY: "auto"
|
|
3753
|
-
}
|
|
3754
|
-
},
|
|
3755
|
-
...F,
|
|
3892
|
+
density: w,
|
|
3893
|
+
maxH: y,
|
|
3894
|
+
...T,
|
|
3756
3895
|
asChild: !0,
|
|
3757
|
-
children: /* @__PURE__ */ D(
|
|
3758
|
-
|
|
3896
|
+
children: /* @__PURE__ */ D(Gn, { children: /* @__PURE__ */ D(
|
|
3897
|
+
Me.Provider,
|
|
3759
3898
|
{
|
|
3760
|
-
value:
|
|
3761
|
-
children:
|
|
3899
|
+
value: xl,
|
|
3900
|
+
children: N
|
|
3762
3901
|
}
|
|
3763
3902
|
) })
|
|
3764
3903
|
}
|
|
3765
3904
|
);
|
|
3766
3905
|
}
|
|
3767
3906
|
);
|
|
3768
|
-
|
|
3769
|
-
const
|
|
3907
|
+
Qe.displayName = "DataTableRoot";
|
|
3908
|
+
const Je = /* @__PURE__ */ re(function({ children: e, ...l }, n) {
|
|
3770
3909
|
const {
|
|
3771
3910
|
sortDescriptor: o,
|
|
3772
|
-
onSortChange:
|
|
3773
|
-
selectionMode:
|
|
3774
|
-
onSelectionChange:
|
|
3911
|
+
onSortChange: r,
|
|
3912
|
+
selectionMode: i,
|
|
3913
|
+
onSelectionChange: a,
|
|
3775
3914
|
selectedKeys: c,
|
|
3776
|
-
defaultSelectedKeys:
|
|
3777
|
-
disallowEmptySelection:
|
|
3915
|
+
defaultSelectedKeys: d,
|
|
3916
|
+
disallowEmptySelection: u,
|
|
3778
3917
|
disabledKeys: s
|
|
3779
|
-
} =
|
|
3918
|
+
} = ye(), [p, f] = ve(l), h = o ? {
|
|
3780
3919
|
column: o.column,
|
|
3781
3920
|
direction: o.direction
|
|
3782
3921
|
} : void 0;
|
|
3783
|
-
return /* @__PURE__ */ D(
|
|
3784
|
-
|
|
3922
|
+
return /* @__PURE__ */ D(fo, { ...p, asChild: !0, children: /* @__PURE__ */ D(
|
|
3923
|
+
Zn,
|
|
3785
3924
|
{
|
|
3786
3925
|
ref: n,
|
|
3787
|
-
sortDescriptor:
|
|
3788
|
-
onSortChange: (
|
|
3789
|
-
|
|
3790
|
-
column: String(
|
|
3791
|
-
direction:
|
|
3926
|
+
sortDescriptor: h,
|
|
3927
|
+
onSortChange: (y) => {
|
|
3928
|
+
y && r && r({
|
|
3929
|
+
column: String(y.column),
|
|
3930
|
+
direction: y.direction
|
|
3792
3931
|
});
|
|
3793
3932
|
},
|
|
3794
3933
|
selectedKeys: c,
|
|
3795
|
-
defaultSelectedKeys:
|
|
3796
|
-
onSelectionChange:
|
|
3797
|
-
selectionMode:
|
|
3798
|
-
disallowEmptySelection:
|
|
3934
|
+
defaultSelectedKeys: d,
|
|
3935
|
+
onSelectionChange: a,
|
|
3936
|
+
selectionMode: i,
|
|
3937
|
+
disallowEmptySelection: u,
|
|
3799
3938
|
disabledKeys: s,
|
|
3800
3939
|
disabledBehavior: "all",
|
|
3801
|
-
...
|
|
3940
|
+
...f,
|
|
3802
3941
|
children: e
|
|
3803
3942
|
}
|
|
3804
3943
|
) });
|
|
3805
3944
|
});
|
|
3806
|
-
|
|
3807
|
-
const
|
|
3808
|
-
return /* @__PURE__ */ oe(
|
|
3809
|
-
/* @__PURE__ */ oe(
|
|
3810
|
-
/* @__PURE__ */ D(
|
|
3811
|
-
/* @__PURE__ */ D(
|
|
3945
|
+
Je.displayName = "DataTable.Table";
|
|
3946
|
+
const Mo = /* @__PURE__ */ re(function({ footer: e, ...l }, n) {
|
|
3947
|
+
return /* @__PURE__ */ oe(Qe, { ref: n, ...l, children: [
|
|
3948
|
+
/* @__PURE__ */ oe(Je, { "aria-label": "Data Table", children: [
|
|
3949
|
+
/* @__PURE__ */ D(Ze, { "aria-label": "Data Table Header" }),
|
|
3950
|
+
/* @__PURE__ */ D(Ge, { "aria-label": "Data Table Body" })
|
|
3812
3951
|
] }),
|
|
3813
|
-
e && /* @__PURE__ */ D(
|
|
3952
|
+
e && /* @__PURE__ */ D(qe, { children: e })
|
|
3814
3953
|
] });
|
|
3815
|
-
}),
|
|
3816
|
-
Root:
|
|
3817
|
-
Table:
|
|
3818
|
-
Header:
|
|
3819
|
-
Column:
|
|
3820
|
-
Body:
|
|
3821
|
-
Row:
|
|
3954
|
+
}), Sr = /* @__PURE__ */ Object.assign(Mo, {
|
|
3955
|
+
Root: Qe,
|
|
3956
|
+
Table: Je,
|
|
3957
|
+
Header: Ze,
|
|
3958
|
+
Column: xe,
|
|
3959
|
+
Body: Ge,
|
|
3960
|
+
Row: Xe,
|
|
3822
3961
|
Cell: pe,
|
|
3823
|
-
Footer:
|
|
3824
|
-
ExpandButton:
|
|
3825
|
-
NestedIcon:
|
|
3826
|
-
SelectionCell:
|
|
3827
|
-
Context:
|
|
3828
|
-
useDataTableContext:
|
|
3962
|
+
Footer: qe,
|
|
3963
|
+
ExpandButton: gl,
|
|
3964
|
+
NestedIcon: yo,
|
|
3965
|
+
SelectionCell: vo,
|
|
3966
|
+
Context: Me,
|
|
3967
|
+
useDataTableContext: ye
|
|
3829
3968
|
});
|
|
3830
3969
|
export {
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3970
|
+
Sr as D,
|
|
3971
|
+
Qe as a,
|
|
3972
|
+
Je as b,
|
|
3973
|
+
Ze as c,
|
|
3974
|
+
xe as d,
|
|
3975
|
+
Ge as e,
|
|
3976
|
+
Xe as f,
|
|
3838
3977
|
pe as g,
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3978
|
+
qe as h,
|
|
3979
|
+
gl as i,
|
|
3980
|
+
yo as j,
|
|
3981
|
+
vo as k
|
|
3843
3982
|
};
|
|
3844
|
-
//# sourceMappingURL=data-table-
|
|
3983
|
+
//# sourceMappingURL=data-table-WHEWdh5f.es.js.map
|