@ynput/ayon-frontend-shared 0.9.0 → 0.10.1
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/DetailsPanel.es.js +39 -39
- package/dist/ListTable.es.js +738 -651
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +827 -827
- package/dist/Slicer.es.js +10 -10
- package/dist/Views.es.js +36 -34
- package/dist/chunks/ColumnDropIndicator.es.js +27 -21
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +582 -583
- package/dist/chunks/FilmstripEntityCard.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +444 -439
- package/dist/chunks/ReviewablesSelector.es.js +1 -1
- package/dist/chunks/Slicer.es.js +32 -32
- package/dist/chunks/TableExportContextInstance.es.js +408 -469
- package/dist/chunks/Watchers.es.js +1 -1
- package/dist/chunks/getUris.es.js +1625 -1602
- package/dist/chunks/searchTerms.es.js +1 -1
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +50 -50
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +17 -16
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +17 -16
- package/dist/types/ListTable.d.ts +27 -17
- package/dist/types/NewEntity.d.ts +17 -16
- package/dist/types/ProjectTreeTable.d.ts +18 -16
- package/dist/types/ProjectsTable.d.ts +17 -16
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +17 -16
- package/dist/types/Views.d.ts +18 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +18 -17
- package/dist/types/context.d.ts +26 -17
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +17 -16
- package/package.json +1 -1
package/dist/ListTable.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { flexRender as
|
|
5
|
-
import { Button as
|
|
1
|
+
import { jsx as d, Fragment as Ot, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import Fe, { useState as G, useEffect as ne, useRef as Be, useCallback as O, useMemo as ie, useId as Nt } from "react";
|
|
3
|
+
import $ from "clsx";
|
|
4
|
+
import { flexRender as ae, useReactTable as jt, getSortedRowModel as Kt, getExpandedRowModel as Wt, getCoreRowModel as Pt } from "@tanstack/react-table";
|
|
5
|
+
import { Button as Ft, Icon as Bt } from "@ynput/ayon-react-components";
|
|
6
6
|
import "./chunks/FilmstripEntityCard.es.js";
|
|
7
7
|
import "date-fns";
|
|
8
|
-
import { D as
|
|
8
|
+
import { D as Yt, B as Ut, T as Xt, E as Jt, j as qt } from "./chunks/MetaWidget.es.js";
|
|
9
9
|
import "react-toastify";
|
|
10
10
|
import "lodash";
|
|
11
11
|
import "primereact/confirmdialog";
|
|
12
12
|
import "uuid";
|
|
13
|
-
import { bD as
|
|
13
|
+
import { bD as Qt } from "./chunks/searchTerms.es.js";
|
|
14
14
|
import "axios";
|
|
15
15
|
import "lexical";
|
|
16
16
|
import "@lexical/markdown";
|
|
@@ -22,31 +22,31 @@ import "@lexical/selection";
|
|
|
22
22
|
import "@lexical/utils";
|
|
23
23
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
24
24
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
25
|
-
import { dK as
|
|
26
|
-
import { u as
|
|
25
|
+
import { dK as Ve, dL as Zt } from "./chunks/getUris.es.js";
|
|
26
|
+
import { u as eo } from "./chunks/TableExportContextInstance.es.js";
|
|
27
27
|
import "@ynput/ayon-addon";
|
|
28
28
|
import "@module-federation/enhanced/runtime";
|
|
29
29
|
import "@ynput/ayon-addon/host";
|
|
30
30
|
import "semver";
|
|
31
|
-
import { u as
|
|
31
|
+
import { u as to } from "./chunks/useCreateContextMenu.es.js";
|
|
32
32
|
import "react-dom";
|
|
33
33
|
import "react-router-dom";
|
|
34
34
|
import "react-redux";
|
|
35
|
-
import { useVirtualizer as
|
|
36
|
-
import { useSensors as
|
|
37
|
-
import { restrictToHorizontalAxis as
|
|
38
|
-
import { useSortable as
|
|
39
|
-
import { CSS as
|
|
35
|
+
import { useVirtualizer as oo } from "@tanstack/react-virtual";
|
|
36
|
+
import { useSensors as no, useSensor as _e, PointerSensor as io, KeyboardSensor as ro, DndContext as ke, closestCenter as Le, DragOverlay as Ge, defaultDropAnimationSideEffects as Ae } from "@dnd-kit/core";
|
|
37
|
+
import { restrictToHorizontalAxis as so, restrictToVerticalAxis as ao } from "@dnd-kit/modifiers";
|
|
38
|
+
import { useSortable as Ye, sortableKeyboardCoordinates as lo, arrayMove as co, SortableContext as He, horizontalListSortingStrategy as uo, verticalListSortingStrategy as go } from "@dnd-kit/sortable";
|
|
39
|
+
import { CSS as Ue } from "@dnd-kit/utilities";
|
|
40
40
|
import v from "styled-components";
|
|
41
|
-
import { H as
|
|
41
|
+
import { H as po } from "./chunks/addonColumnTags.es.js";
|
|
42
42
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
43
43
|
import "./chunks/Menu.es.js";
|
|
44
44
|
import "./chunks/EmptyPlaceholder.es.js";
|
|
45
45
|
import "./chunks/EmptyPlaceholderFlex.styled.es.js";
|
|
46
46
|
import "./chunks/InfoMessage.es.js";
|
|
47
|
-
import { C as
|
|
47
|
+
import { C as mo } from "./chunks/ColumnHeaderMenuUI.es.js";
|
|
48
48
|
import "primereact-context/contextmenu";
|
|
49
|
-
const
|
|
49
|
+
const Xe = 32, re = 32, Je = v.tr`
|
|
50
50
|
display: flex;
|
|
51
51
|
position: absolute;
|
|
52
52
|
top: 0;
|
|
@@ -137,7 +137,7 @@ const $t = v.tr`
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
`,
|
|
140
|
+
`, $e = v.td`
|
|
141
141
|
position: relative;
|
|
142
142
|
height: 100%;
|
|
143
143
|
|
|
@@ -157,7 +157,7 @@ const $t = v.tr`
|
|
|
157
157
|
&:focus-visible {
|
|
158
158
|
outline: none;
|
|
159
159
|
}
|
|
160
|
-
`,
|
|
160
|
+
`, Me = v.div`
|
|
161
161
|
position: absolute;
|
|
162
162
|
inset: 0;
|
|
163
163
|
|
|
@@ -168,7 +168,7 @@ const $t = v.tr`
|
|
|
168
168
|
cursor: pointer;
|
|
169
169
|
box-sizing: border-box;
|
|
170
170
|
min-width: 0;
|
|
171
|
-
`,
|
|
171
|
+
`, fo = v.div`
|
|
172
172
|
display: flex;
|
|
173
173
|
align-items: center;
|
|
174
174
|
width: 100%;
|
|
@@ -176,7 +176,7 @@ const $t = v.tr`
|
|
|
176
176
|
color: var(--md-sys-color-on-surface-variant);
|
|
177
177
|
font-style: italic;
|
|
178
178
|
pointer-events: none;
|
|
179
|
-
`,
|
|
179
|
+
`, ho = v.div`
|
|
180
180
|
position: relative;
|
|
181
181
|
display: flex;
|
|
182
182
|
align-items: center;
|
|
@@ -192,7 +192,7 @@ const $t = v.tr`
|
|
|
192
192
|
white-space: nowrap !important;
|
|
193
193
|
min-width: 0;
|
|
194
194
|
}
|
|
195
|
-
`,
|
|
195
|
+
`, bo = v.div`
|
|
196
196
|
position: relative;
|
|
197
197
|
display: flex;
|
|
198
198
|
align-items: center;
|
|
@@ -226,7 +226,7 @@ v.div`
|
|
|
226
226
|
border-radius: var(--border-radius-m);
|
|
227
227
|
background-color: var(--md-sys-color-surface-container-low);
|
|
228
228
|
`;
|
|
229
|
-
const
|
|
229
|
+
const yo = v.div`
|
|
230
230
|
position: relative;
|
|
231
231
|
display: flex;
|
|
232
232
|
height: 100%;
|
|
@@ -253,20 +253,71 @@ const Ze = v.div`
|
|
|
253
253
|
position: relative;
|
|
254
254
|
display: grid;
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
|
|
257
|
+
&.data {
|
|
258
|
+
padding: 0;
|
|
259
|
+
|
|
260
|
+
table {
|
|
261
|
+
min-width: max-content;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
thead {
|
|
265
|
+
min-height: ${re}px;
|
|
266
|
+
background-color: var(--md-sys-color-surface-container);
|
|
267
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
th,
|
|
271
|
+
td {
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
th {
|
|
276
|
+
height: ${re - 1}px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.resize-handle:not(.resizing) {
|
|
280
|
+
background-color: var(--md-sys-color-outline-variant);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.table-list-row {
|
|
284
|
+
height: ${Xe}px;
|
|
285
|
+
border-radius: 0;
|
|
286
|
+
|
|
287
|
+
td .inner-td {
|
|
288
|
+
left: 0 !important;
|
|
289
|
+
gap: var(--base-gap-small);
|
|
290
|
+
border: 0;
|
|
291
|
+
border-radius: 0;
|
|
292
|
+
background-color: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&:hover td .inner-td,
|
|
296
|
+
&[data-context-menu-target] td .inner-td {
|
|
297
|
+
background-color: var(--md-sys-color-surface-container-hover);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&.selected td .inner-td {
|
|
301
|
+
border: 0;
|
|
302
|
+
background-color: var(--md-sys-color-primary-container);
|
|
303
|
+
color: var(--md-sys-color-on-primary-container);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
`, vo = v.table`
|
|
257
308
|
width: 100%;
|
|
258
309
|
text-align: left;
|
|
259
310
|
font-size: var(--font-size-s);
|
|
260
311
|
color: var(--md-sys-color-on-surface);
|
|
261
312
|
display: grid;
|
|
262
|
-
`,
|
|
313
|
+
`, Co = v.thead`
|
|
263
314
|
display: grid !important;
|
|
264
315
|
position: sticky;
|
|
265
316
|
top: 0;
|
|
266
317
|
min-height: 34px;
|
|
267
318
|
z-index: 10;
|
|
268
319
|
background-color: var(--md-sys-color-surface-container-low);
|
|
269
|
-
`,
|
|
320
|
+
`, xo = v.tr`
|
|
270
321
|
display: flex;
|
|
271
322
|
width: 100%;
|
|
272
323
|
`;
|
|
@@ -283,11 +334,11 @@ v.th`
|
|
|
283
334
|
white-space: nowrap;
|
|
284
335
|
min-height: fit-content;
|
|
285
336
|
`;
|
|
286
|
-
const
|
|
337
|
+
const Oe = v.tbody`
|
|
287
338
|
display: grid;
|
|
288
339
|
width: 100%;
|
|
289
340
|
position: relative;
|
|
290
|
-
`,
|
|
341
|
+
`, Do = v.tr`
|
|
291
342
|
position: absolute;
|
|
292
343
|
top: 0;
|
|
293
344
|
left: 0;
|
|
@@ -296,7 +347,7 @@ const It = v.tbody`
|
|
|
296
347
|
justify-content: center;
|
|
297
348
|
padding: var(--padding-m);
|
|
298
349
|
color: var(--md-sys-color-outline);
|
|
299
|
-
`,
|
|
350
|
+
`, Ro = v.tr`
|
|
300
351
|
display: flex;
|
|
301
352
|
width: 100%;
|
|
302
353
|
background-color: var(--md-sys-color-surface-container-high);
|
|
@@ -308,7 +359,7 @@ const It = v.tbody`
|
|
|
308
359
|
&.inactive {
|
|
309
360
|
color: var(--md-sys-color-on-surface-variant);
|
|
310
361
|
}
|
|
311
|
-
`,
|
|
362
|
+
`, wo = v.th`
|
|
312
363
|
position: relative;
|
|
313
364
|
background-color: transparent;
|
|
314
365
|
display: flex;
|
|
@@ -362,7 +413,7 @@ const It = v.tbody`
|
|
|
362
413
|
&.resizing .resize-handle:not(.resizing) {
|
|
363
414
|
opacity: 0;
|
|
364
415
|
}
|
|
365
|
-
`,
|
|
416
|
+
`, Eo = v.div`
|
|
366
417
|
display: flex;
|
|
367
418
|
align-items: center;
|
|
368
419
|
gap: 6px;
|
|
@@ -374,7 +425,7 @@ const It = v.tbody`
|
|
|
374
425
|
color: var(--md-sys-color-on-surface-variant);
|
|
375
426
|
cursor: pointer;
|
|
376
427
|
user-select: none;
|
|
377
|
-
`,
|
|
428
|
+
`, Io = v(Ft)`
|
|
378
429
|
&.expander {
|
|
379
430
|
background-color: unset;
|
|
380
431
|
padding: 2px;
|
|
@@ -384,22 +435,22 @@ const It = v.tbody`
|
|
|
384
435
|
}
|
|
385
436
|
}
|
|
386
437
|
cursor: pointer;
|
|
387
|
-
`,
|
|
438
|
+
`, To = v.td`
|
|
388
439
|
position: relative;
|
|
389
440
|
display: flex;
|
|
390
441
|
width: 100%;
|
|
391
442
|
height: 100%;
|
|
392
443
|
padding: 0;
|
|
393
|
-
`,
|
|
444
|
+
`, zo = v.span`
|
|
394
445
|
font-weight: 400;
|
|
395
446
|
color: var(--md-sys-color-outline);
|
|
396
447
|
opacity: 0.7;
|
|
397
|
-
`,
|
|
448
|
+
`, So = v.span`
|
|
398
449
|
width: 10px;
|
|
399
450
|
height: 10px;
|
|
400
451
|
border-radius: 2px;
|
|
401
452
|
flex-shrink: 0;
|
|
402
|
-
`,
|
|
453
|
+
`, Vo = v.th`
|
|
403
454
|
position: relative;
|
|
404
455
|
cursor: grabbing;
|
|
405
456
|
background-color: var(--md-sys-color-surface-container-high);
|
|
@@ -412,7 +463,7 @@ const It = v.tbody`
|
|
|
412
463
|
white-space: nowrap;
|
|
413
464
|
z-index: 50;
|
|
414
465
|
height: 30px;
|
|
415
|
-
`,
|
|
466
|
+
`, _o = v.span`
|
|
416
467
|
display: flex;
|
|
417
468
|
align-items: center;
|
|
418
469
|
gap: 4px;
|
|
@@ -422,7 +473,7 @@ const It = v.tbody`
|
|
|
422
473
|
white-space: nowrap;
|
|
423
474
|
min-width: 0;
|
|
424
475
|
user-select: none;
|
|
425
|
-
`,
|
|
476
|
+
`, ko = v.div.attrs({ className: "th-actions" })`
|
|
426
477
|
position: absolute;
|
|
427
478
|
right: var(--padding-m);
|
|
428
479
|
top: 50%;
|
|
@@ -432,7 +483,7 @@ const It = v.tbody`
|
|
|
432
483
|
gap: 2px;
|
|
433
484
|
flex-shrink: 0;
|
|
434
485
|
z-index: 1;
|
|
435
|
-
`,
|
|
486
|
+
`, Lo = v.div`
|
|
436
487
|
position: absolute;
|
|
437
488
|
right: -3px;
|
|
438
489
|
top: 0;
|
|
@@ -447,251 +498,259 @@ const It = v.tbody`
|
|
|
447
498
|
background-color: var(--md-sys-color-primary);
|
|
448
499
|
opacity: 1;
|
|
449
500
|
}
|
|
450
|
-
`,
|
|
451
|
-
if (
|
|
452
|
-
if (typeof
|
|
453
|
-
if (typeof
|
|
454
|
-
if (Array.isArray(
|
|
501
|
+
`, qe = (e) => Qt(e), U = (e) => {
|
|
502
|
+
if (e == null) return "";
|
|
503
|
+
if (typeof e == "string") return e;
|
|
504
|
+
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
505
|
+
if (Array.isArray(e)) return e.join(", ");
|
|
455
506
|
try {
|
|
456
|
-
return JSON.stringify(
|
|
507
|
+
return JSON.stringify(e);
|
|
457
508
|
} catch {
|
|
458
|
-
return String(
|
|
509
|
+
return String(e);
|
|
459
510
|
}
|
|
460
|
-
},
|
|
461
|
-
value:
|
|
462
|
-
attributeData:
|
|
511
|
+
}, Qe = ({
|
|
512
|
+
value: e,
|
|
513
|
+
attributeData: t,
|
|
463
514
|
isEditing: n,
|
|
464
515
|
isReadOnly: r,
|
|
465
|
-
startEditing:
|
|
516
|
+
startEditing: o,
|
|
466
517
|
stopEditing: u,
|
|
467
|
-
updateValue:
|
|
518
|
+
updateValue: c
|
|
468
519
|
}) => {
|
|
469
|
-
const
|
|
470
|
-
return /* @__PURE__ */
|
|
471
|
-
|
|
520
|
+
const p = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
521
|
+
return /* @__PURE__ */ d(
|
|
522
|
+
Jt,
|
|
472
523
|
{
|
|
473
|
-
value:
|
|
474
|
-
options:
|
|
475
|
-
type:
|
|
524
|
+
value: p,
|
|
525
|
+
options: t.enum || [],
|
|
526
|
+
type: t.type,
|
|
476
527
|
isEditing: n,
|
|
477
528
|
isReadOnly: r,
|
|
478
|
-
onOpen:
|
|
529
|
+
onOpen: o,
|
|
479
530
|
onCancelEdit: u,
|
|
480
|
-
onChange: (
|
|
531
|
+
onChange: (s) => c(s)
|
|
481
532
|
}
|
|
482
533
|
);
|
|
483
|
-
},
|
|
484
|
-
|
|
534
|
+
}, te = (e) => qe(e.attributeData) ? Qe(e) : /* @__PURE__ */ d(
|
|
535
|
+
Xt,
|
|
485
536
|
{
|
|
486
|
-
value:
|
|
487
|
-
type:
|
|
488
|
-
columnId:
|
|
489
|
-
cellId:
|
|
490
|
-
isEditing:
|
|
491
|
-
isReadOnly:
|
|
492
|
-
onRequestEdit: () =>
|
|
493
|
-
onCancelEdit:
|
|
494
|
-
onChange: (
|
|
495
|
-
getDraftValue:
|
|
496
|
-
setDraftValue:
|
|
537
|
+
value: U(e.value),
|
|
538
|
+
type: e.attributeData.type,
|
|
539
|
+
columnId: e.columnId,
|
|
540
|
+
cellId: e.cellId,
|
|
541
|
+
isEditing: e.isEditing,
|
|
542
|
+
isReadOnly: e.isReadOnly,
|
|
543
|
+
onRequestEdit: () => e.startEditing(),
|
|
544
|
+
onCancelEdit: e.stopEditing,
|
|
545
|
+
onChange: (t) => e.updateValue(t),
|
|
546
|
+
getDraftValue: e.getDraftValue,
|
|
547
|
+
setDraftValue: e.setDraftValue
|
|
497
548
|
}
|
|
498
|
-
),
|
|
499
|
-
|
|
549
|
+
), Go = (e) => /* @__PURE__ */ d(
|
|
550
|
+
Ut,
|
|
500
551
|
{
|
|
501
|
-
value: !!
|
|
502
|
-
isEditing:
|
|
503
|
-
isReadOnly:
|
|
504
|
-
onCancelEdit:
|
|
505
|
-
onChange: (
|
|
552
|
+
value: !!e.value,
|
|
553
|
+
isEditing: e.isEditing,
|
|
554
|
+
isReadOnly: e.isReadOnly,
|
|
555
|
+
onCancelEdit: e.stopEditing,
|
|
556
|
+
onChange: (t) => e.updateValue(t)
|
|
506
557
|
}
|
|
507
|
-
),
|
|
508
|
-
const
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
558
|
+
), Ao = (e) => {
|
|
559
|
+
const t = e.row.original.midnightExclusiveFields;
|
|
560
|
+
return /* @__PURE__ */ d(
|
|
561
|
+
Yt,
|
|
511
562
|
{
|
|
512
|
-
value: typeof
|
|
513
|
-
isEditing:
|
|
514
|
-
isReadOnly:
|
|
515
|
-
onCancelEdit:
|
|
516
|
-
onChange: (n) =>
|
|
517
|
-
isMidnightExclusive:
|
|
563
|
+
value: typeof e.value == "string" ? e.value : void 0,
|
|
564
|
+
isEditing: e.isEditing,
|
|
565
|
+
isReadOnly: e.isReadOnly,
|
|
566
|
+
onCancelEdit: e.stopEditing,
|
|
567
|
+
onChange: (n) => e.updateValue(n),
|
|
568
|
+
isMidnightExclusive: t?.includes(e.columnId) ?? !1
|
|
518
569
|
}
|
|
519
570
|
);
|
|
520
|
-
},
|
|
521
|
-
string:
|
|
522
|
-
integer:
|
|
523
|
-
float:
|
|
524
|
-
boolean:
|
|
525
|
-
datetime:
|
|
526
|
-
list_of_strings:
|
|
527
|
-
list_of_integers:
|
|
528
|
-
list_of_any:
|
|
529
|
-
list_of_submodels:
|
|
530
|
-
dict:
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
|
|
571
|
+
}, oe = (e) => qe(e.attributeData) ? Qe(e) : U(e.value), Ne = (e) => U(e.value), Ho = {
|
|
572
|
+
string: te,
|
|
573
|
+
integer: te,
|
|
574
|
+
float: te,
|
|
575
|
+
boolean: Go,
|
|
576
|
+
datetime: Ao,
|
|
577
|
+
list_of_strings: oe,
|
|
578
|
+
list_of_integers: oe,
|
|
579
|
+
list_of_any: oe,
|
|
580
|
+
list_of_submodels: Ne,
|
|
581
|
+
dict: Ne
|
|
582
|
+
}, Jn = () => Ho, Ze = (e, t) => `list-table-cell-${e}-${t}`, et = (e, t) => `${e}-row-${t}`, tt = (e, t) => {
|
|
583
|
+
const n = e.getVisibleLeafColumns();
|
|
584
|
+
return (n.find((o) => o.columnDef.meta?.listTableGrow) ?? n[n.length - 1])?.id === t;
|
|
585
|
+
}, $o = (e) => U(e), je = "editable", Mo = (e) => !!e && typeof e == "object" && "__listTablePlaceholder" in e, Oo = ({
|
|
586
|
+
cell: e,
|
|
587
|
+
row: t,
|
|
534
588
|
rowIndex: n,
|
|
535
589
|
attributeData: r,
|
|
536
|
-
dataTypeWidgets:
|
|
590
|
+
dataTypeWidgets: o,
|
|
537
591
|
editingState: u,
|
|
538
|
-
callbacks:
|
|
539
|
-
isReadOnly:
|
|
592
|
+
callbacks: c,
|
|
593
|
+
isReadOnly: p
|
|
540
594
|
}) => {
|
|
541
|
-
const
|
|
542
|
-
if (!
|
|
595
|
+
const s = r?.type;
|
|
596
|
+
if (!s || !o?.[s])
|
|
543
597
|
return null;
|
|
544
|
-
const
|
|
545
|
-
if (!
|
|
598
|
+
const x = o[s];
|
|
599
|
+
if (!x)
|
|
546
600
|
return null;
|
|
547
|
-
const
|
|
548
|
-
row:
|
|
549
|
-
cell:
|
|
550
|
-
value:
|
|
601
|
+
const w = e.column.id, a = Ze(t.id, w), l = {
|
|
602
|
+
row: t,
|
|
603
|
+
cell: e,
|
|
604
|
+
value: e.getValue(),
|
|
551
605
|
rowIndex: n,
|
|
552
|
-
columnId:
|
|
553
|
-
cellId:
|
|
606
|
+
columnId: w,
|
|
607
|
+
cellId: a,
|
|
554
608
|
attributeData: r,
|
|
555
|
-
isEditing: u.editingCellId ===
|
|
556
|
-
isReadOnly:
|
|
557
|
-
startEditing: () => u.startEditingCell(
|
|
609
|
+
isEditing: u.editingCellId === a,
|
|
610
|
+
isReadOnly: p,
|
|
611
|
+
startEditing: () => u.startEditingCell(a),
|
|
558
612
|
stopEditing: u.stopEditingCell,
|
|
559
|
-
updateValue: (
|
|
560
|
-
|
|
613
|
+
updateValue: (h) => {
|
|
614
|
+
c.onUpdateRow(w, h, t.id), u.stopEditingCell();
|
|
561
615
|
},
|
|
562
|
-
openViewer: () =>
|
|
616
|
+
openViewer: () => c.onOpenViewer?.(t.original),
|
|
563
617
|
getDraftValue: u.getDraftValue,
|
|
564
618
|
setDraftValue: u.setDraftValue
|
|
565
619
|
};
|
|
566
|
-
return
|
|
567
|
-
},
|
|
568
|
-
row:
|
|
569
|
-
cellWrapper:
|
|
620
|
+
return x(l);
|
|
621
|
+
}, ot = ({
|
|
622
|
+
row: e,
|
|
623
|
+
cellWrapper: t,
|
|
570
624
|
columnAttributeData: n,
|
|
571
625
|
dataTypeWidgets: r,
|
|
572
|
-
editingState:
|
|
626
|
+
editingState: o,
|
|
573
627
|
callbacks: u,
|
|
574
|
-
editable:
|
|
628
|
+
editable: c = !0
|
|
575
629
|
}) => {
|
|
576
|
-
const
|
|
577
|
-
if (
|
|
578
|
-
const
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
-
|
|
630
|
+
const p = Mo(e.original);
|
|
631
|
+
if (p) {
|
|
632
|
+
const s = e.original && typeof e.original == "object" && "label" in e.original ? String(e.original.label ?? "") : "";
|
|
633
|
+
return /* @__PURE__ */ d($e, { role: "gridcell", style: { width: "100%" }, children: /* @__PURE__ */ d(
|
|
634
|
+
Me,
|
|
581
635
|
{
|
|
582
|
-
style: { left: 0, paddingLeft: `calc(var(--padding-m) + ${
|
|
583
|
-
children: /* @__PURE__ */
|
|
636
|
+
style: { left: 0, paddingLeft: `calc(var(--padding-m) + ${e.depth * 16}px)` },
|
|
637
|
+
children: /* @__PURE__ */ d(fo, { children: s })
|
|
584
638
|
}
|
|
585
|
-
) }, `${
|
|
639
|
+
) }, `${e.id}-placeholder`);
|
|
586
640
|
}
|
|
587
|
-
return /* @__PURE__ */
|
|
588
|
-
const
|
|
589
|
-
cell:
|
|
590
|
-
row:
|
|
591
|
-
rowIndex:
|
|
592
|
-
attributeData:
|
|
641
|
+
return /* @__PURE__ */ d(Ot, { children: e.getVisibleCells().map((s, x, w) => {
|
|
642
|
+
const a = Ze(e.id, s.column.id), l = n?.[s.column.id], h = !!s.column.columnDef.meta?.listTableCustomCell, y = l?.type, R = !!y && !h, g = !!(y && r?.[y]), m = o.editingCellId === a, b = c && s.column.columnDef.meta?.editable !== !1, T = !R || p ? null : Oo({
|
|
643
|
+
cell: s,
|
|
644
|
+
row: e,
|
|
645
|
+
rowIndex: e.index,
|
|
646
|
+
attributeData: l,
|
|
593
647
|
dataTypeWidgets: r,
|
|
594
|
-
editingState:
|
|
648
|
+
editingState: o,
|
|
595
649
|
callbacks: u,
|
|
596
|
-
isReadOnly: !
|
|
597
|
-
}),
|
|
598
|
-
let
|
|
599
|
-
|
|
600
|
-
const
|
|
601
|
-
return
|
|
602
|
-
|
|
650
|
+
isReadOnly: !b
|
|
651
|
+
}), E = !R || p ? ae(s.column.columnDef.cell, s.getContext()) : T ?? $o(s.getValue());
|
|
652
|
+
let C = E;
|
|
653
|
+
t !== null && (t ? C = t(e, E) || E : C = /* @__PURE__ */ d(ho, { children: E }));
|
|
654
|
+
const _ = b && R && g && !p;
|
|
655
|
+
return _ && (C = /* @__PURE__ */ d(
|
|
656
|
+
bo,
|
|
603
657
|
{
|
|
604
|
-
className:
|
|
605
|
-
children:
|
|
658
|
+
className: $(je, y, { editing: m }),
|
|
659
|
+
children: C
|
|
606
660
|
}
|
|
607
|
-
)), /* @__PURE__ */
|
|
608
|
-
|
|
661
|
+
)), /* @__PURE__ */ d(
|
|
662
|
+
$e,
|
|
609
663
|
{
|
|
610
|
-
id:
|
|
664
|
+
id: a,
|
|
665
|
+
role: "gridcell",
|
|
611
666
|
style: {
|
|
612
|
-
width: `calc(var(--col-${
|
|
613
|
-
paddingRight:
|
|
614
|
-
flexGrow:
|
|
667
|
+
width: `calc(var(--col-${s.column.id}-size) * 1px)`,
|
|
668
|
+
paddingRight: x === w.length - 1 ? "var(--padding-m)" : void 0,
|
|
669
|
+
flexGrow: tt(s.getContext().table, s.column.id) ? 1 : void 0
|
|
615
670
|
},
|
|
616
|
-
onDoubleClick:
|
|
617
|
-
|
|
671
|
+
onDoubleClick: _ ? (I) => {
|
|
672
|
+
I.stopPropagation(), o.startEditingCell(a);
|
|
618
673
|
} : void 0,
|
|
619
|
-
onClick: (
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
|
|
623
|
-
else if (
|
|
624
|
-
const
|
|
625
|
-
`.${
|
|
674
|
+
onClick: (I) => {
|
|
675
|
+
const z = I.target;
|
|
676
|
+
if (m && z.closest(".editing"))
|
|
677
|
+
I.stopPropagation();
|
|
678
|
+
else if (b) {
|
|
679
|
+
const A = z.closest(`.${je}`), k = z.closest(
|
|
680
|
+
`.${qt}, input, textarea, select, [contenteditable="true"]`
|
|
626
681
|
);
|
|
627
|
-
(
|
|
682
|
+
(A || k) && (o.startEditingCell(a), I.stopPropagation());
|
|
628
683
|
}
|
|
629
684
|
},
|
|
630
|
-
children: /* @__PURE__ */
|
|
631
|
-
|
|
685
|
+
children: /* @__PURE__ */ d(
|
|
686
|
+
Me,
|
|
632
687
|
{
|
|
633
688
|
className: "inner-td",
|
|
634
689
|
style: {
|
|
635
|
-
left:
|
|
690
|
+
left: x === 0 ? `calc(var(--padding-m) + ${e.depth * 16}px)` : void 0
|
|
636
691
|
},
|
|
637
|
-
children:
|
|
692
|
+
children: C
|
|
638
693
|
}
|
|
639
694
|
)
|
|
640
695
|
},
|
|
641
|
-
|
|
696
|
+
s.id
|
|
642
697
|
);
|
|
643
698
|
}) });
|
|
644
|
-
},
|
|
645
|
-
if (!
|
|
646
|
-
const
|
|
699
|
+
}, Ke = "__group_path__", No = (e) => {
|
|
700
|
+
if (!e.startsWith(Ke)) return null;
|
|
701
|
+
const t = e.slice(Ke.length), n = t.lastIndexOf("__");
|
|
647
702
|
if (n === -1) return null;
|
|
648
|
-
const r =
|
|
649
|
-
return Number.isNaN(
|
|
650
|
-
},
|
|
651
|
-
function
|
|
652
|
-
return
|
|
703
|
+
const r = t.slice(0, n), o = Number(t.slice(n + 2));
|
|
704
|
+
return Number.isNaN(o) ? null : { baseColumnId: r, level: o };
|
|
705
|
+
}, jo = (e) => !!e && typeof e == "object" && ("label" in e || "value" in e), Y = (e) => !!e && typeof e == "object" && "__listTableGroup" in e;
|
|
706
|
+
function Ko(e, t) {
|
|
707
|
+
return t == null ? "(None)" : typeof t == "boolean" ? e === "active" ? t ? "Active" : "Inactive" : e === "library" ? t ? "Library" : "Standard" : t ? "Yes" : "No" : String(t);
|
|
653
708
|
}
|
|
654
|
-
function
|
|
655
|
-
groupColumnId:
|
|
656
|
-
groupValue:
|
|
709
|
+
function Wo({
|
|
710
|
+
groupColumnId: e,
|
|
711
|
+
groupValue: t,
|
|
657
712
|
count: n,
|
|
658
713
|
countLabel: r,
|
|
659
|
-
depth:
|
|
714
|
+
depth: o,
|
|
660
715
|
isExpanded: u,
|
|
661
|
-
onToggle:
|
|
662
|
-
virtualStart:
|
|
663
|
-
|
|
716
|
+
onToggle: c,
|
|
717
|
+
virtualStart: p,
|
|
718
|
+
rowIndex: s,
|
|
719
|
+
onContextMenu: x
|
|
664
720
|
}) {
|
|
665
|
-
const
|
|
666
|
-
return /* @__PURE__ */
|
|
667
|
-
|
|
721
|
+
const a = No(e)?.baseColumnId ?? e, l = jo(t) ? t : void 0, h = l?.value ?? t, y = l?.label ?? Ko(a, h);
|
|
722
|
+
return /* @__PURE__ */ d(
|
|
723
|
+
Je,
|
|
668
724
|
{
|
|
725
|
+
role: "row",
|
|
726
|
+
"aria-rowindex": s + 2,
|
|
727
|
+
"aria-expanded": u,
|
|
669
728
|
style: {
|
|
670
|
-
transform: `translateY(${
|
|
671
|
-
paddingLeft:
|
|
729
|
+
transform: `translateY(${p}px)`,
|
|
730
|
+
paddingLeft: o * 16
|
|
672
731
|
},
|
|
673
|
-
onClick:
|
|
674
|
-
onContextMenu:
|
|
675
|
-
className:
|
|
676
|
-
children: /* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
|
|
732
|
+
onClick: c,
|
|
733
|
+
onContextMenu: x,
|
|
734
|
+
className: $("group-row", { expanded: u }),
|
|
735
|
+
children: /* @__PURE__ */ d(To, { role: "gridcell", children: /* @__PURE__ */ M(Eo, { children: [
|
|
736
|
+
/* @__PURE__ */ d(
|
|
737
|
+
Io,
|
|
679
738
|
{
|
|
680
739
|
className: "expander",
|
|
681
740
|
icon: u ? "expand_more" : "chevron_right",
|
|
682
741
|
variant: "text"
|
|
683
742
|
}
|
|
684
743
|
),
|
|
685
|
-
|
|
686
|
-
|
|
744
|
+
l?.icon ? /* @__PURE__ */ d(
|
|
745
|
+
Bt,
|
|
687
746
|
{
|
|
688
|
-
icon:
|
|
689
|
-
style: { color:
|
|
747
|
+
icon: l.icon,
|
|
748
|
+
style: { color: l.color },
|
|
690
749
|
filled: !0
|
|
691
750
|
}
|
|
692
|
-
) :
|
|
693
|
-
/* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */ M(
|
|
751
|
+
) : l?.color ? /* @__PURE__ */ d(So, { style: { backgroundColor: l.color } }) : null,
|
|
752
|
+
/* @__PURE__ */ d("span", { children: y }),
|
|
753
|
+
/* @__PURE__ */ M(zo, { children: [
|
|
695
754
|
n,
|
|
696
755
|
r ? ` ${r}` : ""
|
|
697
756
|
] })
|
|
@@ -699,522 +758,544 @@ function Sn({
|
|
|
699
758
|
}
|
|
700
759
|
);
|
|
701
760
|
}
|
|
702
|
-
const
|
|
703
|
-
function
|
|
761
|
+
const We = (e) => !!e && typeof e == "object" && "__listTablePlaceholder" in e;
|
|
762
|
+
function Po({
|
|
763
|
+
tableId: e,
|
|
704
764
|
row: t,
|
|
705
|
-
virtualRow:
|
|
706
|
-
isSelected:
|
|
707
|
-
rowIndex:
|
|
708
|
-
onRowClick:
|
|
709
|
-
onRowDoubleClick:
|
|
710
|
-
onRowContextMenu:
|
|
711
|
-
cellWrapper:
|
|
712
|
-
columnAttributeData:
|
|
713
|
-
dataTypeWidgets:
|
|
714
|
-
editingState:
|
|
715
|
-
callbacks:
|
|
716
|
-
editable:
|
|
717
|
-
isInactive:
|
|
765
|
+
virtualRow: n,
|
|
766
|
+
isSelected: r,
|
|
767
|
+
rowIndex: o,
|
|
768
|
+
onRowClick: u,
|
|
769
|
+
onRowDoubleClick: c,
|
|
770
|
+
onRowContextMenu: p,
|
|
771
|
+
cellWrapper: s,
|
|
772
|
+
columnAttributeData: x,
|
|
773
|
+
dataTypeWidgets: w,
|
|
774
|
+
editingState: a,
|
|
775
|
+
callbacks: l,
|
|
776
|
+
editable: h,
|
|
777
|
+
isInactive: y,
|
|
778
|
+
rowClassName: R
|
|
718
779
|
}) {
|
|
719
|
-
const g =
|
|
780
|
+
const g = Y(t.original), m = We(t.original), { transform: b, transition: T, setNodeRef: E, isDragging: C } = Ye({
|
|
720
781
|
id: t.id,
|
|
721
|
-
disabled: g ||
|
|
782
|
+
disabled: g || m
|
|
722
783
|
});
|
|
723
784
|
if (g) {
|
|
724
|
-
const
|
|
725
|
-
return /* @__PURE__ */
|
|
726
|
-
|
|
785
|
+
const z = t.original;
|
|
786
|
+
return /* @__PURE__ */ d(
|
|
787
|
+
Wo,
|
|
727
788
|
{
|
|
728
|
-
groupColumnId:
|
|
729
|
-
groupValue:
|
|
730
|
-
count: t.getLeafRows().filter((
|
|
731
|
-
const
|
|
732
|
-
return !
|
|
789
|
+
groupColumnId: z.__groupColumnId,
|
|
790
|
+
groupValue: z.__groupValue,
|
|
791
|
+
count: t.getLeafRows().filter((A) => {
|
|
792
|
+
const k = A.original;
|
|
793
|
+
return !We(k) && !Y(k) && k?.entityType !== "folder" && k?.type !== "folder";
|
|
733
794
|
}).length,
|
|
734
795
|
depth: t.depth,
|
|
735
796
|
isExpanded: t.getIsExpanded(),
|
|
736
797
|
onToggle: t.getToggleExpandedHandler(),
|
|
737
|
-
virtualStart:
|
|
738
|
-
|
|
798
|
+
virtualStart: n.start,
|
|
799
|
+
rowIndex: o,
|
|
800
|
+
onContextMenu: p ? (A) => p(t.id, o, A) : void 0
|
|
739
801
|
}
|
|
740
802
|
);
|
|
741
803
|
}
|
|
742
|
-
const
|
|
743
|
-
return /* @__PURE__ */
|
|
744
|
-
|
|
804
|
+
const _ = `translateY(${n.start}px)`, I = b ? Ue.Transform.toString(b) : "";
|
|
805
|
+
return /* @__PURE__ */ d(
|
|
806
|
+
Je,
|
|
745
807
|
{
|
|
746
|
-
ref:
|
|
808
|
+
ref: E,
|
|
809
|
+
id: et(e, o),
|
|
810
|
+
role: "row",
|
|
811
|
+
"aria-rowindex": o + 2,
|
|
812
|
+
"aria-selected": m ? void 0 : r,
|
|
747
813
|
style: {
|
|
748
|
-
transform: `${
|
|
749
|
-
transition:
|
|
814
|
+
transform: `${_} ${I}`,
|
|
815
|
+
transition: T
|
|
750
816
|
},
|
|
751
817
|
tabIndex: -1,
|
|
752
|
-
onClick: (
|
|
753
|
-
onDoubleClick:
|
|
754
|
-
onContextMenu:
|
|
755
|
-
className:
|
|
756
|
-
dragging:
|
|
757
|
-
selected:
|
|
758
|
-
inactive:
|
|
759
|
-
"placeholder-row":
|
|
818
|
+
onClick: (z) => u(t.id, o, z),
|
|
819
|
+
onDoubleClick: c ? (z) => c(t.id, o, z) : void 0,
|
|
820
|
+
onContextMenu: p ? (z) => p(t.id, o, z) : void 0,
|
|
821
|
+
className: $("table-list-row", R, {
|
|
822
|
+
dragging: C,
|
|
823
|
+
selected: r,
|
|
824
|
+
inactive: y,
|
|
825
|
+
"placeholder-row": m
|
|
760
826
|
}),
|
|
761
|
-
children: /* @__PURE__ */
|
|
762
|
-
|
|
827
|
+
children: /* @__PURE__ */ d(
|
|
828
|
+
ot,
|
|
763
829
|
{
|
|
764
830
|
row: t,
|
|
765
|
-
cellWrapper:
|
|
766
|
-
columnAttributeData:
|
|
767
|
-
dataTypeWidgets:
|
|
768
|
-
editingState:
|
|
769
|
-
callbacks:
|
|
770
|
-
editable:
|
|
831
|
+
cellWrapper: s,
|
|
832
|
+
columnAttributeData: x,
|
|
833
|
+
dataTypeWidgets: w,
|
|
834
|
+
editingState: a,
|
|
835
|
+
callbacks: l,
|
|
836
|
+
editable: h
|
|
771
837
|
}
|
|
772
838
|
)
|
|
773
839
|
}
|
|
774
840
|
);
|
|
775
841
|
}
|
|
776
|
-
const
|
|
777
|
-
function
|
|
778
|
-
header:
|
|
779
|
-
enabled:
|
|
842
|
+
const Fo = Fe.memo(Po);
|
|
843
|
+
function Bo({
|
|
844
|
+
header: e,
|
|
845
|
+
enabled: t,
|
|
780
846
|
enableSorting: n = !1,
|
|
781
847
|
enableColumnVisibility: r = !1,
|
|
782
|
-
enableColumnResizing:
|
|
783
|
-
isLast: u = !1
|
|
848
|
+
enableColumnResizing: o = !1
|
|
784
849
|
}) {
|
|
785
|
-
const { attributes:
|
|
786
|
-
id:
|
|
850
|
+
const { attributes: u, listeners: c, setNodeRef: p, isDragging: s, transform: x, transition: w } = Ye({
|
|
851
|
+
id: e.id,
|
|
787
852
|
data: { type: "column" },
|
|
788
|
-
disabled: !
|
|
789
|
-
}),
|
|
853
|
+
disabled: !t
|
|
854
|
+
}), a = e.column, l = n && a.getCanSort(), h = a.getIsSorted(), y = `list-table-menu-${e.id}`, { menuOpen: R } = eo(), g = R === y, m = l ? [
|
|
790
855
|
{
|
|
791
856
|
id: "sort-asc",
|
|
792
857
|
label: "Sort ascending",
|
|
793
858
|
icon: "sort",
|
|
794
|
-
selected:
|
|
795
|
-
onClick: () =>
|
|
859
|
+
selected: h === "asc",
|
|
860
|
+
onClick: () => a.toggleSorting(!1)
|
|
796
861
|
},
|
|
797
862
|
{
|
|
798
863
|
id: "sort-desc",
|
|
799
864
|
label: "Sort descending",
|
|
800
865
|
icon: "sort",
|
|
801
866
|
className: "sort-desc-icon",
|
|
802
|
-
selected:
|
|
803
|
-
onClick: () =>
|
|
867
|
+
selected: h === "desc",
|
|
868
|
+
onClick: () => a.toggleSorting(!0)
|
|
804
869
|
}
|
|
805
|
-
] : [],
|
|
806
|
-
...
|
|
870
|
+
] : [], T = r && a.getCanHide() ? [
|
|
871
|
+
...m.length > 0 ? [{ id: "divider-visibility", type: "divider" }] : [],
|
|
807
872
|
{
|
|
808
873
|
id: "hide",
|
|
809
874
|
label: "Hide column",
|
|
810
875
|
icon: "visibility_off",
|
|
811
|
-
onClick: () =>
|
|
876
|
+
onClick: () => a.toggleVisibility(!1)
|
|
812
877
|
}
|
|
813
|
-
] : [],
|
|
814
|
-
onPointerDown: (
|
|
815
|
-
onMouseDown: (
|
|
878
|
+
] : [], E = [...m, ...T], C = o && a.getCanResize(), _ = a.getIsResizing(), { columnSizingInfo: I } = e.getContext().table.getState(), z = I.isResizingColumn === a.id ? I.deltaOffset ?? 0 : 0, A = !!I.isResizingColumn, k = {
|
|
879
|
+
onPointerDown: (L) => L.stopPropagation(),
|
|
880
|
+
onMouseDown: (L) => L.stopPropagation()
|
|
816
881
|
};
|
|
817
882
|
return /* @__PURE__ */ M(
|
|
818
|
-
|
|
883
|
+
wo,
|
|
819
884
|
{
|
|
820
|
-
ref:
|
|
885
|
+
ref: p,
|
|
821
886
|
style: {
|
|
822
|
-
width: `calc(var(--header-${
|
|
823
|
-
transform:
|
|
824
|
-
transition:
|
|
825
|
-
flexGrow:
|
|
887
|
+
width: `calc(var(--header-${e.id}-size) * 1px)`,
|
|
888
|
+
transform: Ue.Transform.toString(x) ?? void 0,
|
|
889
|
+
transition: w,
|
|
890
|
+
flexGrow: tt(e.getContext().table, e.column.id) ? 1 : void 0
|
|
826
891
|
},
|
|
827
|
-
className:
|
|
828
|
-
grab:
|
|
829
|
-
dragging:
|
|
830
|
-
"menu-open":
|
|
831
|
-
resizing:
|
|
832
|
-
sorted: !!
|
|
892
|
+
className: $({
|
|
893
|
+
grab: t,
|
|
894
|
+
dragging: s,
|
|
895
|
+
"menu-open": g,
|
|
896
|
+
resizing: A,
|
|
897
|
+
sorted: !!h
|
|
833
898
|
}),
|
|
834
|
-
...
|
|
899
|
+
...t ? { ...u, ...c } : {},
|
|
900
|
+
role: "columnheader",
|
|
835
901
|
children: [
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
(
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
902
|
+
/* @__PURE__ */ d(_o, { children: e.isPlaceholder ? null : ae(e.column.columnDef.header, e.getContext()) }),
|
|
903
|
+
(E.length > 0 || l) && /* @__PURE__ */ M(ko, { ...k, children: [
|
|
904
|
+
E.length > 0 && /* @__PURE__ */ d(mo, { menuItems: E, menuId: y, className: "header-menu" }),
|
|
905
|
+
l && /* @__PURE__ */ d(
|
|
906
|
+
po,
|
|
841
907
|
{
|
|
842
908
|
icon: "sort",
|
|
843
|
-
className:
|
|
909
|
+
className: $("sort-button", { visible: !!h }),
|
|
844
910
|
style: {
|
|
845
|
-
transform:
|
|
911
|
+
transform: h === "desc" ? "rotate(180deg) scaleX(-1)" : "none"
|
|
846
912
|
},
|
|
847
|
-
onClick:
|
|
848
|
-
selected: !!
|
|
913
|
+
onClick: a.getToggleSortingHandler(),
|
|
914
|
+
selected: !!h
|
|
849
915
|
}
|
|
850
916
|
)
|
|
851
917
|
] }),
|
|
852
|
-
|
|
853
|
-
|
|
918
|
+
C && /* @__PURE__ */ d(
|
|
919
|
+
Lo,
|
|
854
920
|
{
|
|
855
|
-
className:
|
|
856
|
-
style: { transform:
|
|
857
|
-
onDoubleClick: () =>
|
|
858
|
-
onMouseDown: (
|
|
859
|
-
|
|
921
|
+
className: $("resize-handle", { resizing: _ }),
|
|
922
|
+
style: { transform: z ? `translateX(${z}px)` : void 0 },
|
|
923
|
+
onDoubleClick: () => a.resetSize(),
|
|
924
|
+
onMouseDown: (L) => {
|
|
925
|
+
L.stopPropagation(), e.getResizeHandler()(L);
|
|
860
926
|
},
|
|
861
|
-
onTouchStart:
|
|
862
|
-
onPointerDown: (
|
|
927
|
+
onTouchStart: e.getResizeHandler(),
|
|
928
|
+
onPointerDown: (L) => L.stopPropagation()
|
|
863
929
|
}
|
|
864
930
|
)
|
|
865
931
|
]
|
|
866
932
|
}
|
|
867
933
|
);
|
|
868
934
|
}
|
|
869
|
-
function
|
|
870
|
-
const [n, r] =
|
|
871
|
-
if (
|
|
872
|
-
const u =
|
|
873
|
-
return [...
|
|
935
|
+
function Yo(e, t) {
|
|
936
|
+
const [n, r] = G(() => {
|
|
937
|
+
if (t && t.length > 0) {
|
|
938
|
+
const u = e.map((c) => c.id).filter((c) => !t.includes(c));
|
|
939
|
+
return [...t, ...u];
|
|
874
940
|
}
|
|
875
|
-
return
|
|
941
|
+
return e.map((o) => o.id);
|
|
876
942
|
});
|
|
877
|
-
return
|
|
878
|
-
if (
|
|
879
|
-
const u =
|
|
880
|
-
r([...
|
|
943
|
+
return ne(() => {
|
|
944
|
+
if (t && t.length > 0) {
|
|
945
|
+
const u = e.map((c) => c.id).filter((c) => !t.includes(c));
|
|
946
|
+
r([...t, ...u]);
|
|
881
947
|
}
|
|
882
|
-
}, [
|
|
948
|
+
}, [t]), { columnOrder: n, setColumnOrder: r };
|
|
883
949
|
}
|
|
884
|
-
const
|
|
885
|
-
function
|
|
886
|
-
rows:
|
|
887
|
-
selectedRows:
|
|
950
|
+
const B = (e) => !!e.original && typeof e.original == "object" && "__listTableGroup" in e.original;
|
|
951
|
+
function Uo({
|
|
952
|
+
rows: e,
|
|
953
|
+
selectedRows: t,
|
|
888
954
|
onSelectedRowsChange: n,
|
|
889
955
|
multiSelection: r,
|
|
890
|
-
rowVirtualizer:
|
|
956
|
+
rowVirtualizer: o,
|
|
891
957
|
tableContainerRef: u
|
|
892
958
|
}) {
|
|
893
|
-
const [
|
|
894
|
-
(
|
|
895
|
-
const
|
|
896
|
-
if (!(
|
|
897
|
-
if (r &&
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
} else r && (
|
|
901
|
-
|
|
959
|
+
const [c, p] = G(-1), s = Be(-1), x = O(
|
|
960
|
+
(a, l, h) => {
|
|
961
|
+
const y = e[l];
|
|
962
|
+
if (!(y && B(y))) {
|
|
963
|
+
if (r && h.shiftKey && s.current >= 0) {
|
|
964
|
+
const R = Math.min(s.current, l), g = Math.max(s.current, l), m = e.slice(R, g + 1).filter((b) => !B(b)).map((b) => b.id);
|
|
965
|
+
h.metaKey || h.ctrlKey ? n?.(Array.from(/* @__PURE__ */ new Set([...t, ...m]))) : n?.(m);
|
|
966
|
+
} else r && (h.metaKey || h.ctrlKey) ? (t.includes(a) ? n?.(t.filter((R) => R !== a)) : n?.([...t, a]), s.current = l) : t.includes(a) ? n?.(t.filter((R) => R !== a)) : (n?.([a]), s.current = l);
|
|
967
|
+
p(l), u.current?.focus();
|
|
902
968
|
}
|
|
903
969
|
},
|
|
904
|
-
[
|
|
905
|
-
),
|
|
906
|
-
(
|
|
907
|
-
if (
|
|
908
|
-
|
|
909
|
-
const
|
|
910
|
-
let g =
|
|
970
|
+
[t, e, n, r, u]
|
|
971
|
+
), w = O(
|
|
972
|
+
(a) => {
|
|
973
|
+
if (a.key !== "ArrowDown" && a.key !== "ArrowUp") return;
|
|
974
|
+
a.preventDefault();
|
|
975
|
+
const l = a.key === "ArrowDown" ? 1 : -1, h = !r && t.length === 1 ? e.findIndex((b) => b.id === t[0]) : -1, y = h >= 0 ? h : c;
|
|
976
|
+
let g = y < 0 ? l > 0 ? -1 : e.length : y;
|
|
911
977
|
for (; ; ) {
|
|
912
|
-
if (g +=
|
|
913
|
-
g = Math.max(0, Math.min(
|
|
978
|
+
if (g += l, g < 0 || g >= e.length) {
|
|
979
|
+
g = Math.max(0, Math.min(e.length - 1, g));
|
|
914
980
|
break;
|
|
915
981
|
}
|
|
916
|
-
if (!
|
|
982
|
+
if (!B(e[g]))
|
|
917
983
|
break;
|
|
918
984
|
}
|
|
919
|
-
if (g ===
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
if (
|
|
923
|
-
if (
|
|
924
|
-
const
|
|
925
|
-
|
|
985
|
+
if (g === y || B(e[g])) return;
|
|
986
|
+
const m = e[g]?.id;
|
|
987
|
+
if (m) {
|
|
988
|
+
if (a.shiftKey && r)
|
|
989
|
+
if (t.includes(m)) {
|
|
990
|
+
const b = e[c]?.id;
|
|
991
|
+
b && n?.(t.filter((T) => T !== b));
|
|
926
992
|
} else
|
|
927
|
-
n?.([...
|
|
993
|
+
n?.([...t, m]);
|
|
928
994
|
else
|
|
929
|
-
n?.([
|
|
930
|
-
|
|
995
|
+
n?.([m]), s.current = g;
|
|
996
|
+
p(g), o.scrollToIndex(g, { behavior: "smooth" });
|
|
931
997
|
}
|
|
932
998
|
},
|
|
933
|
-
[
|
|
999
|
+
[c, e, t, n, r, o]
|
|
934
1000
|
);
|
|
935
|
-
return { activeRowIndex:
|
|
1001
|
+
return { activeRowIndex: c, handleRowClick: x, handleKeyDown: w };
|
|
936
1002
|
}
|
|
937
|
-
function
|
|
938
|
-
const [
|
|
939
|
-
|
|
1003
|
+
function Xo() {
|
|
1004
|
+
const [e, t] = G(null), [n, r] = G(null), o = O((p) => {
|
|
1005
|
+
t(p);
|
|
940
1006
|
}, []), u = O(() => {
|
|
941
|
-
|
|
1007
|
+
t(null), r(null);
|
|
942
1008
|
}, []);
|
|
943
|
-
return { editingState:
|
|
1009
|
+
return { editingState: Fe.useMemo(
|
|
944
1010
|
() => ({
|
|
945
|
-
editingCellId:
|
|
946
|
-
startEditingCell:
|
|
1011
|
+
editingCellId: e,
|
|
1012
|
+
startEditingCell: o,
|
|
947
1013
|
stopEditingCell: u,
|
|
948
1014
|
getDraftValue: () => n,
|
|
949
1015
|
setDraftValue: r
|
|
950
1016
|
}),
|
|
951
|
-
[
|
|
1017
|
+
[e, n, o, u]
|
|
952
1018
|
) };
|
|
953
1019
|
}
|
|
954
|
-
function
|
|
955
|
-
rows:
|
|
956
|
-
columnOrder:
|
|
1020
|
+
function Jo({
|
|
1021
|
+
rows: e,
|
|
1022
|
+
columnOrder: t,
|
|
957
1023
|
onReorderRows: n,
|
|
958
1024
|
setColumnOrder: r,
|
|
959
|
-
onColumnOrderChange:
|
|
1025
|
+
onColumnOrderChange: o
|
|
960
1026
|
}) {
|
|
961
|
-
const [u,
|
|
1027
|
+
const [u, c] = G(null), [p, s] = G(null);
|
|
962
1028
|
return {
|
|
963
|
-
sensors:
|
|
964
|
-
|
|
965
|
-
|
|
1029
|
+
sensors: no(
|
|
1030
|
+
_e(io),
|
|
1031
|
+
_e(ro, { coordinateGetter: lo })
|
|
966
1032
|
),
|
|
967
1033
|
activeRowId: u,
|
|
968
|
-
activeColumnId:
|
|
969
|
-
handleColumnDragStart: (
|
|
970
|
-
|
|
1034
|
+
activeColumnId: p,
|
|
1035
|
+
handleColumnDragStart: (g) => {
|
|
1036
|
+
s(g.active.id);
|
|
971
1037
|
},
|
|
972
|
-
handleColumnDragEnd: (
|
|
973
|
-
|
|
974
|
-
const { active:
|
|
975
|
-
if (
|
|
976
|
-
const T =
|
|
977
|
-
if (T !== -1 &&
|
|
978
|
-
const
|
|
979
|
-
r(() =>
|
|
1038
|
+
handleColumnDragEnd: (g) => {
|
|
1039
|
+
s(null);
|
|
1040
|
+
const { active: m, over: b } = g;
|
|
1041
|
+
if (b && m.id !== b.id) {
|
|
1042
|
+
const T = t.indexOf(m.id), E = t.indexOf(b.id);
|
|
1043
|
+
if (T !== -1 && E !== -1) {
|
|
1044
|
+
const C = co(t, T, E);
|
|
1045
|
+
r(() => C), o?.(C);
|
|
980
1046
|
}
|
|
981
1047
|
}
|
|
982
1048
|
},
|
|
983
|
-
handleColumnDragCancel: () =>
|
|
984
|
-
handleRowDragStart: (
|
|
985
|
-
|
|
1049
|
+
handleColumnDragCancel: () => s(null),
|
|
1050
|
+
handleRowDragStart: (g) => {
|
|
1051
|
+
c(g.active.id);
|
|
986
1052
|
},
|
|
987
|
-
handleRowDragEnd: (
|
|
988
|
-
|
|
989
|
-
const { active:
|
|
990
|
-
if (
|
|
991
|
-
const T =
|
|
992
|
-
n?.(T,
|
|
1053
|
+
handleRowDragEnd: (g) => {
|
|
1054
|
+
c(null);
|
|
1055
|
+
const { active: m, over: b } = g;
|
|
1056
|
+
if (b && m.id !== b.id) {
|
|
1057
|
+
const T = e.findIndex((C) => C.id === m.id), E = e.findIndex((C) => C.id === b.id);
|
|
1058
|
+
n?.(T, E);
|
|
993
1059
|
}
|
|
994
1060
|
},
|
|
995
|
-
handleRowDragCancel: () =>
|
|
1061
|
+
handleRowDragCancel: () => c(null)
|
|
996
1062
|
};
|
|
997
1063
|
}
|
|
998
|
-
function
|
|
999
|
-
const
|
|
1000
|
-
return
|
|
1064
|
+
function qo(e) {
|
|
1065
|
+
const t = e.getFlatHeaders(), n = e.getState().columnSizing;
|
|
1066
|
+
return ie(() => {
|
|
1001
1067
|
const r = {};
|
|
1002
|
-
for (const
|
|
1003
|
-
r[`--header-${
|
|
1068
|
+
for (const o of t)
|
|
1069
|
+
r[`--header-${o.id}-size`] = o.getSize(), r[`--col-${o.column.id}-size`] = o.column.getSize();
|
|
1004
1070
|
return r;
|
|
1005
|
-
}, [n,
|
|
1071
|
+
}, [n, t]);
|
|
1006
1072
|
}
|
|
1007
|
-
const
|
|
1008
|
-
function
|
|
1009
|
-
data:
|
|
1010
|
-
columns:
|
|
1073
|
+
const Qo = (e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : [];
|
|
1074
|
+
function qn({
|
|
1075
|
+
data: e,
|
|
1076
|
+
columns: t,
|
|
1011
1077
|
getRowId: n,
|
|
1012
1078
|
fetchNextPage: r,
|
|
1013
|
-
hasNextPage:
|
|
1079
|
+
hasNextPage: o,
|
|
1014
1080
|
isFetchingNextPage: u,
|
|
1015
|
-
onUpdateRow:
|
|
1016
|
-
onOpenViewer:
|
|
1017
|
-
editable:
|
|
1018
|
-
onReorderRows:
|
|
1019
|
-
rowContextMenuBuilders:
|
|
1020
|
-
onRowDoubleClick:
|
|
1021
|
-
selectedRows:
|
|
1022
|
-
onSelectedRowsChange:
|
|
1023
|
-
multiSelection:
|
|
1024
|
-
cellWrapper:
|
|
1025
|
-
columnAttributeData:
|
|
1026
|
-
dataTypeWidgets:
|
|
1027
|
-
enableColumnReordering:
|
|
1081
|
+
onUpdateRow: c,
|
|
1082
|
+
onOpenViewer: p,
|
|
1083
|
+
editable: s = !0,
|
|
1084
|
+
onReorderRows: x,
|
|
1085
|
+
rowContextMenuBuilders: w = [],
|
|
1086
|
+
onRowDoubleClick: a,
|
|
1087
|
+
selectedRows: l = [],
|
|
1088
|
+
onSelectedRowsChange: h,
|
|
1089
|
+
multiSelection: y = !1,
|
|
1090
|
+
cellWrapper: R,
|
|
1091
|
+
columnAttributeData: g,
|
|
1092
|
+
dataTypeWidgets: m,
|
|
1093
|
+
enableColumnReordering: b = !1,
|
|
1028
1094
|
columnOrder: T,
|
|
1029
|
-
onColumnOrderChange:
|
|
1030
|
-
enableColumnVisibility:
|
|
1031
|
-
columnVisibility:
|
|
1032
|
-
defaultColumnVisibility:
|
|
1033
|
-
onColumnVisibilityChange:
|
|
1034
|
-
enableColumnResizing:
|
|
1035
|
-
columnSizing:
|
|
1036
|
-
onColumnSizingChange:
|
|
1037
|
-
enableSorting:
|
|
1038
|
-
sorting:
|
|
1039
|
-
onSortingChange:
|
|
1040
|
-
enableExpanding:
|
|
1041
|
-
expanded:
|
|
1042
|
-
onExpandedChange:
|
|
1043
|
-
getIsRowInactive:
|
|
1095
|
+
onColumnOrderChange: E,
|
|
1096
|
+
enableColumnVisibility: C = !1,
|
|
1097
|
+
columnVisibility: _,
|
|
1098
|
+
defaultColumnVisibility: I,
|
|
1099
|
+
onColumnVisibilityChange: z,
|
|
1100
|
+
enableColumnResizing: A = !1,
|
|
1101
|
+
columnSizing: k,
|
|
1102
|
+
onColumnSizingChange: L,
|
|
1103
|
+
enableSorting: le = !1,
|
|
1104
|
+
sorting: rt,
|
|
1105
|
+
onSortingChange: st,
|
|
1106
|
+
enableExpanding: at = !0,
|
|
1107
|
+
expanded: lt,
|
|
1108
|
+
onExpandedChange: dt,
|
|
1109
|
+
getIsRowInactive: de,
|
|
1110
|
+
getRowClassName: ct,
|
|
1111
|
+
variant: ut = "default",
|
|
1112
|
+
scrollToSelection: ce = !1,
|
|
1113
|
+
ariaLabel: gt
|
|
1044
1114
|
}) {
|
|
1045
|
-
const [
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
},
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1052
|
-
const
|
|
1053
|
-
Object.keys(
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
}),
|
|
1057
|
-
},
|
|
1058
|
-
const
|
|
1059
|
-
return
|
|
1060
|
-
const D =
|
|
1115
|
+
const ue = Nt(), [pt, mt] = G([]), [ft, ht] = G({}), [bt, yt] = G({}), [vt, Ct] = G({}), X = Be(null), [ge] = to(), pe = rt ?? pt, xt = (i) => {
|
|
1116
|
+
const f = typeof i == "function" ? i(pe) : i;
|
|
1117
|
+
mt(f), st?.(f);
|
|
1118
|
+
}, me = lt ?? vt, Dt = (i) => {
|
|
1119
|
+
const f = typeof i == "function" ? i(me) : i;
|
|
1120
|
+
Ct(f), dt?.(f);
|
|
1121
|
+
}, J = _ ?? ft, Rt = (i) => {
|
|
1122
|
+
const f = typeof i == "function" ? i(fe) : i, D = {};
|
|
1123
|
+
Object.keys(f).forEach((V) => {
|
|
1124
|
+
const H = Ve({}, V, I);
|
|
1125
|
+
f[V] !== H && (D[V] = f[V]);
|
|
1126
|
+
}), ht(D), z?.(D);
|
|
1127
|
+
}, fe = ie(() => {
|
|
1128
|
+
const i = {};
|
|
1129
|
+
return t.forEach((f) => {
|
|
1130
|
+
const D = f.id || f.accessorKey;
|
|
1061
1131
|
if (D) {
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1132
|
+
const V = Ve(J, D, I), H = f.visible;
|
|
1133
|
+
H !== void 0 && J[D] === void 0 ? i[D] = H : i[D] = V;
|
|
1064
1134
|
}
|
|
1065
|
-
}),
|
|
1066
|
-
|
|
1067
|
-
|
|
1135
|
+
}), Zt(
|
|
1136
|
+
i,
|
|
1137
|
+
t.map((f) => f.id || f.accessorKey).filter(Boolean)
|
|
1068
1138
|
);
|
|
1069
|
-
}, [
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1072
|
-
}, { columnOrder:
|
|
1073
|
-
data:
|
|
1074
|
-
columns:
|
|
1139
|
+
}, [J, I, t]), he = k ?? bt, wt = (i) => {
|
|
1140
|
+
const f = typeof i == "function" ? i(he) : i;
|
|
1141
|
+
yt(f), L?.(f);
|
|
1142
|
+
}, { columnOrder: be, setColumnOrder: ye } = Yo(t, T), N = jt({
|
|
1143
|
+
data: e,
|
|
1144
|
+
columns: t,
|
|
1075
1145
|
getRowId: n,
|
|
1076
1146
|
state: {
|
|
1077
|
-
columnOrder:
|
|
1078
|
-
sorting:
|
|
1079
|
-
columnVisibility:
|
|
1080
|
-
columnSizing:
|
|
1081
|
-
expanded:
|
|
1147
|
+
columnOrder: be,
|
|
1148
|
+
sorting: pe,
|
|
1149
|
+
columnVisibility: fe,
|
|
1150
|
+
columnSizing: he,
|
|
1151
|
+
expanded: me
|
|
1082
1152
|
},
|
|
1083
1153
|
filterFns: { fuzzy: () => !0 },
|
|
1084
1154
|
// Placeholder for fuzzy filtering
|
|
1085
|
-
onColumnOrderChange:
|
|
1086
|
-
onSortingChange:
|
|
1087
|
-
onColumnVisibilityChange:
|
|
1088
|
-
onColumnSizingChange:
|
|
1089
|
-
onExpandedChange:
|
|
1090
|
-
enableSorting:
|
|
1091
|
-
enableExpanding:
|
|
1155
|
+
onColumnOrderChange: ye,
|
|
1156
|
+
onSortingChange: xt,
|
|
1157
|
+
onColumnVisibilityChange: Rt,
|
|
1158
|
+
onColumnSizingChange: wt,
|
|
1159
|
+
onExpandedChange: Dt,
|
|
1160
|
+
enableSorting: le,
|
|
1161
|
+
enableExpanding: at,
|
|
1092
1162
|
columnResizeMode: "onEnd",
|
|
1093
|
-
getCoreRowModel:
|
|
1094
|
-
getExpandedRowModel:
|
|
1095
|
-
getSortedRowModel:
|
|
1096
|
-
getSubRows: (
|
|
1097
|
-
getRowCanExpand: (
|
|
1163
|
+
getCoreRowModel: Pt(),
|
|
1164
|
+
getExpandedRowModel: Wt(),
|
|
1165
|
+
getSortedRowModel: Kt(),
|
|
1166
|
+
getSubRows: (i) => i.subRows,
|
|
1167
|
+
getRowCanExpand: (i) => i.subRows.length > 0,
|
|
1098
1168
|
meta: {
|
|
1099
|
-
updateData:
|
|
1100
|
-
openViewerDialog:
|
|
1169
|
+
updateData: c,
|
|
1170
|
+
openViewerDialog: p
|
|
1101
1171
|
}
|
|
1102
|
-
}), { rows:
|
|
1103
|
-
count:
|
|
1104
|
-
getScrollElement: () =>
|
|
1105
|
-
estimateSize: () => 44,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1172
|
+
}), { rows: S } = N.getRowModel(), K = ut === "data", W = oo({
|
|
1173
|
+
count: o ? S.length + 1 : S.length,
|
|
1174
|
+
getScrollElement: () => X.current,
|
|
1175
|
+
estimateSize: () => K ? Xe : 44,
|
|
1176
|
+
// the sticky header pushes rows down, so a row scrolled in from below needs that much extra
|
|
1177
|
+
scrollPaddingEnd: K ? re : 0,
|
|
1178
|
+
overscan: K ? 12 : 10
|
|
1179
|
+
}), P = W.getVirtualItems(), { activeRowIndex: ve, handleRowClick: Et, handleKeyDown: It } = Uo({
|
|
1180
|
+
rows: S,
|
|
1181
|
+
selectedRows: l,
|
|
1182
|
+
onSelectedRowsChange: h,
|
|
1183
|
+
multiSelection: y,
|
|
1184
|
+
rowVirtualizer: W,
|
|
1185
|
+
tableContainerRef: X
|
|
1186
|
+
}), q = l.length === 1 ? l[0] : void 0, Q = q ? S.findIndex((i) => i.id === q) : -1, Z = Q >= 0;
|
|
1187
|
+
ne(() => {
|
|
1188
|
+
ce && Z && W.scrollToIndex(Q, { align: "auto" });
|
|
1189
|
+
}, [ce, q, Z]);
|
|
1190
|
+
const Ce = S[ve], xe = Z ? Q : Ce && l.includes(Ce.id) ? ve : -1, Tt = P.some((i) => i.index === xe), zt = O(
|
|
1191
|
+
(i, f, D) => {
|
|
1192
|
+
if (!a) return;
|
|
1193
|
+
const V = S[f];
|
|
1194
|
+
!V || V.original === void 0 || Y(V.original) || a(D, {
|
|
1195
|
+
rowId: i,
|
|
1196
|
+
rowIndex: f,
|
|
1197
|
+
row: V,
|
|
1198
|
+
isSelected: l.includes(i)
|
|
1123
1199
|
});
|
|
1124
1200
|
},
|
|
1125
|
-
[
|
|
1126
|
-
),
|
|
1127
|
-
(
|
|
1128
|
-
const
|
|
1129
|
-
if (!
|
|
1130
|
-
const
|
|
1131
|
-
let
|
|
1132
|
-
if (
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
groupColumnId:
|
|
1136
|
-
groupValue:
|
|
1201
|
+
[a, S, l]
|
|
1202
|
+
), St = O(
|
|
1203
|
+
(i, f, D) => {
|
|
1204
|
+
const V = S[f];
|
|
1205
|
+
if (!V || V.original === void 0) return;
|
|
1206
|
+
const H = Y(V.original);
|
|
1207
|
+
let Te = {};
|
|
1208
|
+
if (H) {
|
|
1209
|
+
const F = V.original;
|
|
1210
|
+
Te = {
|
|
1211
|
+
groupColumnId: F.__groupColumnId,
|
|
1212
|
+
groupValue: F.__groupValue
|
|
1137
1213
|
};
|
|
1138
1214
|
}
|
|
1139
1215
|
D.preventDefault(), D.stopPropagation();
|
|
1140
|
-
const
|
|
1141
|
-
(
|
|
1142
|
-
|
|
1143
|
-
rowId:
|
|
1144
|
-
rowIndex:
|
|
1145
|
-
row:
|
|
1146
|
-
selectedRows:
|
|
1147
|
-
isSelected:
|
|
1148
|
-
isGroupRow:
|
|
1149
|
-
...
|
|
1216
|
+
const ze = l.includes(i), Mt = H || ze ? l : [i], Se = w.flatMap(
|
|
1217
|
+
(F) => Qo(
|
|
1218
|
+
F(D, {
|
|
1219
|
+
rowId: i,
|
|
1220
|
+
rowIndex: f,
|
|
1221
|
+
row: V,
|
|
1222
|
+
selectedRows: Mt,
|
|
1223
|
+
isSelected: ze,
|
|
1224
|
+
isGroupRow: H,
|
|
1225
|
+
...Te
|
|
1150
1226
|
})
|
|
1151
1227
|
)
|
|
1152
1228
|
);
|
|
1153
|
-
|
|
1229
|
+
Se.length > 0 && ge(D, Se);
|
|
1154
1230
|
},
|
|
1155
|
-
[
|
|
1156
|
-
), { editingState:
|
|
1157
|
-
sensors:
|
|
1158
|
-
activeRowId:
|
|
1159
|
-
activeColumnId:
|
|
1160
|
-
handleColumnDragStart:
|
|
1161
|
-
handleColumnDragEnd:
|
|
1162
|
-
handleColumnDragCancel:
|
|
1163
|
-
handleRowDragStart:
|
|
1164
|
-
handleRowDragEnd:
|
|
1165
|
-
handleRowDragCancel:
|
|
1166
|
-
} =
|
|
1167
|
-
|
|
1168
|
-
const [
|
|
1169
|
-
|
|
1170
|
-
}, [
|
|
1171
|
-
const
|
|
1172
|
-
return /* @__PURE__ */
|
|
1173
|
-
|
|
1231
|
+
[w, S, l, ge]
|
|
1232
|
+
), { editingState: De } = Xo(), {
|
|
1233
|
+
sensors: Re,
|
|
1234
|
+
activeRowId: we,
|
|
1235
|
+
activeColumnId: Ee,
|
|
1236
|
+
handleColumnDragStart: Vt,
|
|
1237
|
+
handleColumnDragEnd: _t,
|
|
1238
|
+
handleColumnDragCancel: kt,
|
|
1239
|
+
handleRowDragStart: Lt,
|
|
1240
|
+
handleRowDragEnd: Gt,
|
|
1241
|
+
handleRowDragCancel: At
|
|
1242
|
+
} = Jo({ rows: S, columnOrder: be, onReorderRows: x, setColumnOrder: ye, onColumnOrderChange: E }), Ie = ie(() => ({ onUpdateRow: c, onOpenViewer: p }), [c, p]), Ht = qo(N), $t = !!N.getState().columnSizingInfo.isResizingColumn;
|
|
1243
|
+
ne(() => {
|
|
1244
|
+
const [i] = P.slice(-1);
|
|
1245
|
+
i && i.index >= S.length - 1 && o && !u && r?.();
|
|
1246
|
+
}, [o, r, S.length, u, P]);
|
|
1247
|
+
const ee = we ? S.find((i) => i.id === we) : null, j = Ee ? N.getHeaderGroups()[0]?.headers.find((i) => i.id === Ee) : null;
|
|
1248
|
+
return /* @__PURE__ */ d(
|
|
1249
|
+
yo,
|
|
1174
1250
|
{
|
|
1175
|
-
ref:
|
|
1251
|
+
ref: X,
|
|
1252
|
+
className: $(K && "data"),
|
|
1253
|
+
role: "grid",
|
|
1254
|
+
"aria-label": gt,
|
|
1255
|
+
"aria-multiselectable": y || void 0,
|
|
1256
|
+
"aria-rowcount": o ? -1 : S.length + 1,
|
|
1257
|
+
"aria-activedescendant": Tt ? et(ue, xe) : void 0,
|
|
1176
1258
|
tabIndex: 0,
|
|
1177
|
-
onKeyDown:
|
|
1178
|
-
style:
|
|
1179
|
-
children: /* @__PURE__ */ M(
|
|
1259
|
+
onKeyDown: It,
|
|
1260
|
+
style: $t ? { cursor: "col-resize" } : void 0,
|
|
1261
|
+
children: /* @__PURE__ */ M(vo, { role: "presentation", style: Ht, children: [
|
|
1180
1262
|
/* @__PURE__ */ M(
|
|
1181
|
-
|
|
1263
|
+
ke,
|
|
1182
1264
|
{
|
|
1183
|
-
sensors:
|
|
1184
|
-
collisionDetection:
|
|
1185
|
-
onDragStart:
|
|
1186
|
-
onDragEnd:
|
|
1187
|
-
onDragCancel:
|
|
1188
|
-
modifiers: [
|
|
1265
|
+
sensors: Re,
|
|
1266
|
+
collisionDetection: Le,
|
|
1267
|
+
onDragStart: Vt,
|
|
1268
|
+
onDragEnd: _t,
|
|
1269
|
+
onDragCancel: kt,
|
|
1270
|
+
modifiers: [so],
|
|
1189
1271
|
children: [
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
|
|
1272
|
+
/* @__PURE__ */ d(Co, { role: "rowgroup", children: N.getHeaderGroups().map((i) => /* @__PURE__ */ d(xo, { role: "row", "aria-rowindex": 1, children: /* @__PURE__ */ d(
|
|
1273
|
+
He,
|
|
1192
1274
|
{
|
|
1193
|
-
items:
|
|
1194
|
-
strategy:
|
|
1195
|
-
children:
|
|
1196
|
-
|
|
1275
|
+
items: i.headers.map((f) => f.id),
|
|
1276
|
+
strategy: uo,
|
|
1277
|
+
children: i.headers.map((f) => /* @__PURE__ */ d(
|
|
1278
|
+
Bo,
|
|
1197
1279
|
{
|
|
1198
|
-
header:
|
|
1199
|
-
enabled:
|
|
1200
|
-
enableSorting:
|
|
1201
|
-
enableColumnVisibility:
|
|
1202
|
-
enableColumnResizing:
|
|
1203
|
-
isLast: D === o.headers.length - 1
|
|
1280
|
+
header: f,
|
|
1281
|
+
enabled: b,
|
|
1282
|
+
enableSorting: le,
|
|
1283
|
+
enableColumnVisibility: C,
|
|
1284
|
+
enableColumnResizing: A
|
|
1204
1285
|
},
|
|
1205
|
-
|
|
1286
|
+
f.id
|
|
1206
1287
|
))
|
|
1207
1288
|
}
|
|
1208
|
-
) },
|
|
1209
|
-
/* @__PURE__ */
|
|
1210
|
-
|
|
1289
|
+
) }, i.id)) }),
|
|
1290
|
+
/* @__PURE__ */ d(
|
|
1291
|
+
Ge,
|
|
1211
1292
|
{
|
|
1212
1293
|
dropAnimation: {
|
|
1213
|
-
sideEffects:
|
|
1294
|
+
sideEffects: Ae({
|
|
1214
1295
|
styles: { active: { opacity: "0.4" } }
|
|
1215
1296
|
})
|
|
1216
1297
|
},
|
|
1217
|
-
children: j ? /* @__PURE__ */
|
|
1298
|
+
children: j ? /* @__PURE__ */ d("table", { children: /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d(Vo, { style: { width: j.getSize() }, children: j.isPlaceholder ? null : ae(
|
|
1218
1299
|
j.column.columnDef.header,
|
|
1219
1300
|
j.getContext()
|
|
1220
1301
|
) }) }) }) }) : null
|
|
@@ -1224,76 +1305,80 @@ function Lo({
|
|
|
1224
1305
|
}
|
|
1225
1306
|
),
|
|
1226
1307
|
/* @__PURE__ */ M(
|
|
1227
|
-
|
|
1308
|
+
ke,
|
|
1228
1309
|
{
|
|
1229
|
-
sensors:
|
|
1230
|
-
collisionDetection:
|
|
1231
|
-
onDragStart:
|
|
1232
|
-
onDragEnd:
|
|
1233
|
-
onDragCancel:
|
|
1234
|
-
modifiers: [
|
|
1310
|
+
sensors: Re,
|
|
1311
|
+
collisionDetection: Le,
|
|
1312
|
+
onDragStart: Lt,
|
|
1313
|
+
onDragEnd: Gt,
|
|
1314
|
+
onDragCancel: At,
|
|
1315
|
+
modifiers: [ao],
|
|
1235
1316
|
children: [
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
|
|
1317
|
+
/* @__PURE__ */ d(Oe, { role: "rowgroup", style: { height: `${W.getTotalSize()}px` }, children: /* @__PURE__ */ d(
|
|
1318
|
+
He,
|
|
1238
1319
|
{
|
|
1239
|
-
items:
|
|
1240
|
-
strategy:
|
|
1241
|
-
children:
|
|
1242
|
-
if (
|
|
1243
|
-
return /* @__PURE__ */
|
|
1244
|
-
|
|
1320
|
+
items: S.map((i) => i.id),
|
|
1321
|
+
strategy: go,
|
|
1322
|
+
children: P.map((i) => {
|
|
1323
|
+
if (i.index > S.length - 1)
|
|
1324
|
+
return /* @__PURE__ */ d(
|
|
1325
|
+
Do,
|
|
1245
1326
|
{
|
|
1246
|
-
|
|
1247
|
-
|
|
1327
|
+
role: "row",
|
|
1328
|
+
"aria-rowindex": i.index + 2,
|
|
1329
|
+
style: { transform: `translateY(${i.start}px)` },
|
|
1330
|
+
children: /* @__PURE__ */ d("td", { role: "gridcell", children: "Loading more data..." })
|
|
1248
1331
|
},
|
|
1249
1332
|
"loader"
|
|
1250
1333
|
);
|
|
1251
|
-
const D =
|
|
1252
|
-
return /* @__PURE__ */
|
|
1253
|
-
|
|
1334
|
+
const D = S[i.index];
|
|
1335
|
+
return /* @__PURE__ */ d(
|
|
1336
|
+
Fo,
|
|
1254
1337
|
{
|
|
1338
|
+
tableId: ue,
|
|
1255
1339
|
row: D,
|
|
1256
|
-
virtualRow:
|
|
1257
|
-
isSelected:
|
|
1258
|
-
rowIndex:
|
|
1259
|
-
onRowClick:
|
|
1260
|
-
onRowDoubleClick:
|
|
1261
|
-
onRowContextMenu:
|
|
1262
|
-
cellWrapper:
|
|
1263
|
-
columnAttributeData:
|
|
1264
|
-
dataTypeWidgets:
|
|
1265
|
-
editingState:
|
|
1266
|
-
callbacks:
|
|
1267
|
-
editable:
|
|
1268
|
-
isInactive:
|
|
1340
|
+
virtualRow: i,
|
|
1341
|
+
isSelected: l.includes(D.id),
|
|
1342
|
+
rowIndex: i.index,
|
|
1343
|
+
onRowClick: Et,
|
|
1344
|
+
onRowDoubleClick: a ? zt : void 0,
|
|
1345
|
+
onRowContextMenu: w.length > 0 ? St : void 0,
|
|
1346
|
+
cellWrapper: R,
|
|
1347
|
+
columnAttributeData: g,
|
|
1348
|
+
dataTypeWidgets: m,
|
|
1349
|
+
editingState: De,
|
|
1350
|
+
callbacks: Ie,
|
|
1351
|
+
editable: s,
|
|
1352
|
+
isInactive: de?.(D.original),
|
|
1353
|
+
rowClassName: ct?.(D.original)
|
|
1269
1354
|
},
|
|
1270
1355
|
D.id
|
|
1271
1356
|
);
|
|
1272
1357
|
})
|
|
1273
1358
|
}
|
|
1274
1359
|
) }),
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
|
|
1360
|
+
/* @__PURE__ */ d(
|
|
1361
|
+
Ge,
|
|
1277
1362
|
{
|
|
1278
1363
|
dropAnimation: {
|
|
1279
|
-
sideEffects:
|
|
1364
|
+
sideEffects: Ae({
|
|
1280
1365
|
styles: { active: { opacity: "0.4" } }
|
|
1281
1366
|
})
|
|
1282
1367
|
},
|
|
1283
|
-
children:
|
|
1284
|
-
|
|
1368
|
+
children: ee ? /* @__PURE__ */ d("table", { style: { width: "100%" }, children: /* @__PURE__ */ d(Oe, { children: /* @__PURE__ */ d(
|
|
1369
|
+
Ro,
|
|
1285
1370
|
{
|
|
1286
|
-
className:
|
|
1287
|
-
children: /* @__PURE__ */
|
|
1288
|
-
|
|
1371
|
+
className: $({ inactive: de?.(ee.original) }),
|
|
1372
|
+
children: /* @__PURE__ */ d(
|
|
1373
|
+
ot,
|
|
1289
1374
|
{
|
|
1290
|
-
row:
|
|
1291
|
-
cellWrapper:
|
|
1292
|
-
columnAttributeData:
|
|
1293
|
-
dataTypeWidgets:
|
|
1294
|
-
editingState:
|
|
1295
|
-
callbacks:
|
|
1296
|
-
editable:
|
|
1375
|
+
row: ee,
|
|
1376
|
+
cellWrapper: R,
|
|
1377
|
+
columnAttributeData: g,
|
|
1378
|
+
dataTypeWidgets: m,
|
|
1379
|
+
editingState: De,
|
|
1380
|
+
callbacks: Ie,
|
|
1381
|
+
editable: s
|
|
1297
1382
|
}
|
|
1298
1383
|
)
|
|
1299
1384
|
}
|
|
@@ -1307,54 +1392,56 @@ function Lo({
|
|
|
1307
1392
|
}
|
|
1308
1393
|
);
|
|
1309
1394
|
}
|
|
1310
|
-
const
|
|
1311
|
-
const n =
|
|
1395
|
+
const nt = (e) => !!e && typeof e == "object" && ("label" in e || "value" in e), se = (e) => !!e && typeof e == "object" && "__listTableGroup" in e, Zo = (e) => nt(e) ? e.value : e, Pe = (e) => nt(e) ? typeof e.sortIndex == "number" ? e.sortIndex : e.sortValue !== void 0 ? e.sortValue : e.label !== void 0 ? e.label : e.value : e, en = (e, t) => {
|
|
1396
|
+
const n = Pe(e), r = Pe(t);
|
|
1312
1397
|
return typeof n == "number" && typeof r == "number" ? n - r : String(n ?? "").localeCompare(String(r ?? ""), void 0, {
|
|
1313
1398
|
sensitivity: "base"
|
|
1314
1399
|
});
|
|
1315
|
-
},
|
|
1316
|
-
const n =
|
|
1317
|
-
return n.sort((
|
|
1318
|
-
const
|
|
1319
|
-
return
|
|
1320
|
-
}), n.forEach((
|
|
1321
|
-
|
|
1400
|
+
}, it = (e, t) => {
|
|
1401
|
+
const n = e.filter(se), r = e.filter((o) => !se(o));
|
|
1402
|
+
return n.sort((o, u) => {
|
|
1403
|
+
const c = en(o.__groupValue, u.__groupValue);
|
|
1404
|
+
return t ? -c : c;
|
|
1405
|
+
}), n.forEach((o) => {
|
|
1406
|
+
o.subRows = it(o.subRows, t);
|
|
1322
1407
|
}), [...n, ...r];
|
|
1323
|
-
},
|
|
1324
|
-
const
|
|
1325
|
-
if (!
|
|
1326
|
-
|
|
1408
|
+
}, Qn = (e, t, n, r, o, u) => {
|
|
1409
|
+
const c = [], p = (s, x, w, a) => {
|
|
1410
|
+
if (!w.length) {
|
|
1411
|
+
s.push(x);
|
|
1327
1412
|
return;
|
|
1328
1413
|
}
|
|
1329
|
-
const [
|
|
1330
|
-
if (!
|
|
1331
|
-
|
|
1414
|
+
const [l, ...h] = w, y = r(l, x) ?? [u(x, l)];
|
|
1415
|
+
if (!y.length) {
|
|
1416
|
+
p(s, x, h, a);
|
|
1332
1417
|
return;
|
|
1333
1418
|
}
|
|
1334
|
-
const
|
|
1335
|
-
const T =
|
|
1336
|
-
let
|
|
1337
|
-
(
|
|
1419
|
+
const R = (g, m, b) => {
|
|
1420
|
+
const T = y[m], E = Zo(T), C = `${b}|${l}:${m}:${JSON.stringify(E)}`;
|
|
1421
|
+
let _ = g.find(
|
|
1422
|
+
(I) => se(I) && I.__groupKey === C
|
|
1338
1423
|
);
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1424
|
+
if (_ || (_ = o(l, C, T), g.push(_)), m < y.length - 1) {
|
|
1425
|
+
R(_.subRows, m + 1, C);
|
|
1341
1426
|
return;
|
|
1342
1427
|
}
|
|
1343
|
-
|
|
1428
|
+
p(_.subRows, x, h, C);
|
|
1344
1429
|
};
|
|
1345
|
-
|
|
1430
|
+
R(s, 0, a);
|
|
1346
1431
|
};
|
|
1347
|
-
return
|
|
1432
|
+
return e.forEach((s) => p(c, s, t, "root")), it(c, n);
|
|
1348
1433
|
};
|
|
1349
1434
|
export {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1435
|
+
qn as ListTable,
|
|
1436
|
+
Qn as buildGroupedData,
|
|
1437
|
+
en as compareGroupingPathItems,
|
|
1438
|
+
Ho as defaultListTableDataTypeWidgets,
|
|
1439
|
+
Jn as getDefaultListTableDataTypeWidgets,
|
|
1440
|
+
Zo as getGroupItemValue,
|
|
1441
|
+
Ze as getListTableCellId,
|
|
1442
|
+
et as getListTableRowId,
|
|
1443
|
+
nt as isListTableGroupDisplayObject,
|
|
1444
|
+
se as isListTableGroupRow,
|
|
1445
|
+
tt as isListTableGrowColumn,
|
|
1446
|
+
$o as renderListTableFallbackValue
|
|
1360
1447
|
};
|