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