@ynput/ayon-frontend-shared 0.6.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContextMenu.es.js +44 -27
- package/dist/DetailsPanel.es.js +225 -224
- package/dist/ListTable.es.js +420 -420
- package/dist/NewEntity.es.js +42 -41
- package/dist/ProjectTreeTable.es.js +3517 -3378
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +366 -352
- package/dist/api.es.js +428 -413
- package/dist/chunks/Actions.es.js +18 -17
- package/dist/chunks/ColumnDropIndicator.es.js +19 -18
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +60 -59
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +15 -14
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +864 -859
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2457 -2196
- package/dist/chunks/PlayableIcon.es.js +77 -76
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +625 -609
- package/dist/chunks/SimpleForm.es.js +1 -1
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +954 -821
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +100 -99
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +222 -221
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3873 -3736
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +621 -499
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +43 -43
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +16 -15
- package/dist/components.es.js +565 -531
- package/dist/context.es.js +529 -503
- package/dist/hooks.es.js +13 -13
- package/dist/index.es.js +4 -4
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +123 -13
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +26 -1
- package/dist/types/Views.d.ts +2 -0
- package/dist/types/api.d.ts +2359 -590
- package/dist/types/components.d.ts +30 -4
- package/dist/types/context.d.ts +94 -2
- package/dist/types/util.d.ts +54 -0
- package/dist/util.es.js +129 -119
- package/package.json +2 -2
- package/dist/chunks/MenuItem.es.js +0 -420
package/dist/ListTable.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import Gt, { useState as L, useEffect as Mt, useRef as At, useCallback as O, useMemo as
|
|
1
|
+
import { jsx as a, Fragment as De, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import Gt, { useState as L, useEffect as Mt, useRef as At, useCallback as O, useMemo as tt } from "react";
|
|
3
3
|
import A from "clsx";
|
|
4
|
-
import { flexRender as
|
|
5
|
-
import { Button as
|
|
4
|
+
import { flexRender as nt, useReactTable as Re, getSortedRowModel as Ee, getExpandedRowModel as Se, getCoreRowModel as we } from "@tanstack/react-table";
|
|
5
|
+
import { Button as Ie, Icon as ze } from "@ynput/ayon-react-components";
|
|
6
6
|
import "./chunks/PlayableIcon.es.js";
|
|
7
7
|
import "date-fns";
|
|
8
|
-
import { n as Te, B as
|
|
8
|
+
import { n as Te, B as Ve, T as _e, o as ke, q as Le } 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 {
|
|
13
|
+
import { bB as Ge } from "./chunks/searchTerms.es.js";
|
|
14
14
|
import "lexical";
|
|
15
15
|
import "@lexical/markdown";
|
|
16
16
|
import "match-sorter";
|
|
@@ -21,28 +21,29 @@ import "@lexical/selection";
|
|
|
21
21
|
import "@lexical/utils";
|
|
22
22
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
23
23
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
24
|
-
import {
|
|
25
|
-
import { u as
|
|
24
|
+
import { dH as vt, dI as Me } from "./chunks/getUris.es.js";
|
|
25
|
+
import { u as Ae } from "./chunks/TableExportContextInstance.es.js";
|
|
26
26
|
import "@module-federation/enhanced/runtime";
|
|
27
27
|
import "semver";
|
|
28
|
-
import { u as
|
|
28
|
+
import { u as He } from "./chunks/useCreateContextMenu.es.js";
|
|
29
29
|
import "react-dom";
|
|
30
30
|
import "react-redux";
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
31
|
+
import "react-router-dom";
|
|
32
|
+
import { useVirtualizer as Oe } from "@tanstack/react-virtual";
|
|
33
|
+
import { useSensors as $e, useSensor as Ct, PointerSensor as Ne, KeyboardSensor as je, DndContext as xt, closestCenter as Dt, DragOverlay as Rt, defaultDropAnimationSideEffects as Et } from "@dnd-kit/core";
|
|
34
|
+
import { restrictToHorizontalAxis as Ke, restrictToVerticalAxis as We } from "@dnd-kit/modifiers";
|
|
35
|
+
import { useSortable as Ht, sortableKeyboardCoordinates as Pe, arrayMove as Fe, SortableContext as St, horizontalListSortingStrategy as Be, verticalListSortingStrategy as Ye } from "@dnd-kit/sortable";
|
|
35
36
|
import { CSS as Ot } from "@dnd-kit/utilities";
|
|
36
|
-
import
|
|
37
|
-
import { H as
|
|
37
|
+
import v from "styled-components";
|
|
38
|
+
import { H as Ue } from "./chunks/ColumnDropIndicator.styled.es.js";
|
|
38
39
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
39
|
-
import "./chunks/MenuItem.es.js";
|
|
40
|
-
import "./chunks/EmptyPlaceholder.es.js";
|
|
41
40
|
import "./chunks/Menu.es.js";
|
|
41
|
+
import "./chunks/EmptyPlaceholder.es.js";
|
|
42
|
+
import "./chunks/EmptyPlaceholderFlex.styled.es.js";
|
|
42
43
|
import "./chunks/InfoMessage.es.js";
|
|
43
|
-
import { C as
|
|
44
|
+
import { C as Xe } from "./chunks/ColumnHeaderMenuUI.es.js";
|
|
44
45
|
import "primereact-context/contextmenu";
|
|
45
|
-
const $t =
|
|
46
|
+
const $t = v.tr`
|
|
46
47
|
display: flex;
|
|
47
48
|
position: absolute;
|
|
48
49
|
top: 0;
|
|
@@ -68,7 +69,8 @@ const $t = C.tr`
|
|
|
68
69
|
border-right: 2px solid var(--md-sys-color-surface-container);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
&:hover
|
|
72
|
+
&:hover,
|
|
73
|
+
&[data-context-menu-target] {
|
|
72
74
|
.inner-td {
|
|
73
75
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
74
76
|
border-top-color: var(--md-sys-color-surface-container-hover);
|
|
@@ -132,7 +134,7 @@ const $t = C.tr`
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
|
-
`,
|
|
137
|
+
`, wt = v.td`
|
|
136
138
|
position: relative;
|
|
137
139
|
height: 100%;
|
|
138
140
|
|
|
@@ -152,7 +154,7 @@ const $t = C.tr`
|
|
|
152
154
|
&:focus-visible {
|
|
153
155
|
outline: none;
|
|
154
156
|
}
|
|
155
|
-
`, It =
|
|
157
|
+
`, It = v.div`
|
|
156
158
|
position: absolute;
|
|
157
159
|
inset: 0;
|
|
158
160
|
|
|
@@ -163,7 +165,7 @@ const $t = C.tr`
|
|
|
163
165
|
cursor: pointer;
|
|
164
166
|
box-sizing: border-box;
|
|
165
167
|
min-width: 0;
|
|
166
|
-
`,
|
|
168
|
+
`, qe = v.div`
|
|
167
169
|
display: flex;
|
|
168
170
|
align-items: center;
|
|
169
171
|
width: 100%;
|
|
@@ -171,7 +173,7 @@ const $t = C.tr`
|
|
|
171
173
|
color: var(--md-sys-color-on-surface-variant);
|
|
172
174
|
font-style: italic;
|
|
173
175
|
pointer-events: none;
|
|
174
|
-
`,
|
|
176
|
+
`, Je = v.div`
|
|
175
177
|
position: relative;
|
|
176
178
|
display: flex;
|
|
177
179
|
align-items: center;
|
|
@@ -187,7 +189,7 @@ const $t = C.tr`
|
|
|
187
189
|
white-space: nowrap !important;
|
|
188
190
|
min-width: 0;
|
|
189
191
|
}
|
|
190
|
-
`,
|
|
192
|
+
`, Qe = v.div`
|
|
191
193
|
position: relative;
|
|
192
194
|
display: flex;
|
|
193
195
|
align-items: center;
|
|
@@ -214,14 +216,14 @@ const $t = C.tr`
|
|
|
214
216
|
background-color: var(--md-sys-color-surface-container);
|
|
215
217
|
}
|
|
216
218
|
`;
|
|
217
|
-
|
|
219
|
+
v.div`
|
|
218
220
|
overflow: hidden;
|
|
219
221
|
position: absolute;
|
|
220
222
|
inset: 0;
|
|
221
223
|
border-radius: var(--border-radius-m);
|
|
222
224
|
background-color: var(--md-sys-color-surface-container-low);
|
|
223
225
|
`;
|
|
224
|
-
const
|
|
226
|
+
const Ze = v.div`
|
|
225
227
|
position: relative;
|
|
226
228
|
display: flex;
|
|
227
229
|
height: 100%;
|
|
@@ -248,24 +250,24 @@ const Qe = C.div`
|
|
|
248
250
|
position: relative;
|
|
249
251
|
display: grid;
|
|
250
252
|
}
|
|
251
|
-
`,
|
|
253
|
+
`, tn = v.table`
|
|
252
254
|
width: 100%;
|
|
253
255
|
text-align: left;
|
|
254
256
|
font-size: var(--font-size-s);
|
|
255
257
|
color: var(--md-sys-color-on-surface);
|
|
256
258
|
display: grid;
|
|
257
|
-
`,
|
|
259
|
+
`, en = v.thead`
|
|
258
260
|
display: grid !important;
|
|
259
261
|
position: sticky;
|
|
260
262
|
top: 0;
|
|
261
263
|
min-height: 34px;
|
|
262
264
|
z-index: 10;
|
|
263
265
|
background-color: var(--md-sys-color-surface-container-low);
|
|
264
|
-
`,
|
|
266
|
+
`, nn = v.tr`
|
|
265
267
|
display: flex;
|
|
266
268
|
width: 100%;
|
|
267
269
|
`;
|
|
268
|
-
|
|
270
|
+
v.th`
|
|
269
271
|
position: relative;
|
|
270
272
|
background-color: transparent;
|
|
271
273
|
display: flex;
|
|
@@ -278,11 +280,11 @@ C.th`
|
|
|
278
280
|
white-space: nowrap;
|
|
279
281
|
min-height: fit-content;
|
|
280
282
|
`;
|
|
281
|
-
const
|
|
283
|
+
const zt = v.tbody`
|
|
282
284
|
display: grid;
|
|
283
285
|
width: 100%;
|
|
284
286
|
position: relative;
|
|
285
|
-
`,
|
|
287
|
+
`, on = v.tr`
|
|
286
288
|
position: absolute;
|
|
287
289
|
top: 0;
|
|
288
290
|
left: 0;
|
|
@@ -291,7 +293,7 @@ const Tt = C.tbody`
|
|
|
291
293
|
justify-content: center;
|
|
292
294
|
padding: var(--padding-m);
|
|
293
295
|
color: var(--md-sys-color-outline);
|
|
294
|
-
`,
|
|
296
|
+
`, rn = v.tr`
|
|
295
297
|
display: flex;
|
|
296
298
|
width: 100%;
|
|
297
299
|
background-color: var(--md-sys-color-surface-container-high);
|
|
@@ -303,7 +305,7 @@ const Tt = C.tbody`
|
|
|
303
305
|
&.inactive {
|
|
304
306
|
color: var(--md-sys-color-on-surface-variant);
|
|
305
307
|
}
|
|
306
|
-
`,
|
|
308
|
+
`, sn = v.th`
|
|
307
309
|
position: relative;
|
|
308
310
|
background-color: transparent;
|
|
309
311
|
display: flex;
|
|
@@ -357,7 +359,7 @@ const Tt = C.tbody`
|
|
|
357
359
|
&.resizing .resize-handle:not(.resizing) {
|
|
358
360
|
opacity: 0;
|
|
359
361
|
}
|
|
360
|
-
`,
|
|
362
|
+
`, an = v.div`
|
|
361
363
|
display: flex;
|
|
362
364
|
align-items: center;
|
|
363
365
|
gap: 6px;
|
|
@@ -369,7 +371,7 @@ const Tt = C.tbody`
|
|
|
369
371
|
color: var(--md-sys-color-on-surface-variant);
|
|
370
372
|
cursor: pointer;
|
|
371
373
|
user-select: none;
|
|
372
|
-
`,
|
|
374
|
+
`, ln = v(Ie)`
|
|
373
375
|
&.expander {
|
|
374
376
|
background-color: unset;
|
|
375
377
|
padding: 2px;
|
|
@@ -379,22 +381,22 @@ const Tt = C.tbody`
|
|
|
379
381
|
}
|
|
380
382
|
}
|
|
381
383
|
cursor: pointer;
|
|
382
|
-
`,
|
|
384
|
+
`, dn = v.td`
|
|
383
385
|
position: relative;
|
|
384
386
|
display: flex;
|
|
385
387
|
width: 100%;
|
|
386
388
|
height: 100%;
|
|
387
389
|
padding: 0;
|
|
388
|
-
`,
|
|
390
|
+
`, cn = v.span`
|
|
389
391
|
font-weight: 400;
|
|
390
392
|
color: var(--md-sys-color-outline);
|
|
391
393
|
opacity: 0.7;
|
|
392
|
-
`,
|
|
394
|
+
`, un = v.span`
|
|
393
395
|
width: 10px;
|
|
394
396
|
height: 10px;
|
|
395
397
|
border-radius: 2px;
|
|
396
398
|
flex-shrink: 0;
|
|
397
|
-
`,
|
|
399
|
+
`, gn = v.th`
|
|
398
400
|
position: relative;
|
|
399
401
|
cursor: grabbing;
|
|
400
402
|
background-color: var(--md-sys-color-surface-container-high);
|
|
@@ -407,7 +409,7 @@ const Tt = C.tbody`
|
|
|
407
409
|
white-space: nowrap;
|
|
408
410
|
z-index: 50;
|
|
409
411
|
height: 30px;
|
|
410
|
-
`,
|
|
412
|
+
`, pn = v.span`
|
|
411
413
|
display: flex;
|
|
412
414
|
align-items: center;
|
|
413
415
|
gap: 4px;
|
|
@@ -417,7 +419,7 @@ const Tt = C.tbody`
|
|
|
417
419
|
white-space: nowrap;
|
|
418
420
|
min-width: 0;
|
|
419
421
|
user-select: none;
|
|
420
|
-
`,
|
|
422
|
+
`, mn = v.div.attrs({ className: "th-actions" })`
|
|
421
423
|
position: absolute;
|
|
422
424
|
right: var(--padding-m);
|
|
423
425
|
top: 50%;
|
|
@@ -427,7 +429,7 @@ const Tt = C.tbody`
|
|
|
427
429
|
gap: 2px;
|
|
428
430
|
flex-shrink: 0;
|
|
429
431
|
z-index: 1;
|
|
430
|
-
`,
|
|
432
|
+
`, fn = v.div`
|
|
431
433
|
position: absolute;
|
|
432
434
|
right: -3px;
|
|
433
435
|
top: 0;
|
|
@@ -442,7 +444,7 @@ const Tt = C.tbody`
|
|
|
442
444
|
background-color: var(--md-sys-color-primary);
|
|
443
445
|
opacity: 1;
|
|
444
446
|
}
|
|
445
|
-
`, Nt = (t) =>
|
|
447
|
+
`, Nt = (t) => Ge(t), F = (t) => {
|
|
446
448
|
if (t == null) return "";
|
|
447
449
|
if (typeof t == "string") return t;
|
|
448
450
|
if (typeof t == "number" || typeof t == "boolean") return String(t);
|
|
@@ -455,28 +457,28 @@ const Tt = C.tbody`
|
|
|
455
457
|
}, jt = ({
|
|
456
458
|
value: t,
|
|
457
459
|
attributeData: e,
|
|
458
|
-
isEditing:
|
|
460
|
+
isEditing: n,
|
|
459
461
|
isReadOnly: r,
|
|
460
462
|
startEditing: i,
|
|
461
463
|
stopEditing: u,
|
|
462
|
-
updateValue:
|
|
464
|
+
updateValue: s
|
|
463
465
|
}) => {
|
|
464
466
|
const m = Array.isArray(t) ? t : t == null ? [] : [t];
|
|
465
|
-
return /* @__PURE__ */
|
|
466
|
-
|
|
467
|
+
return /* @__PURE__ */ a(
|
|
468
|
+
ke,
|
|
467
469
|
{
|
|
468
470
|
value: m,
|
|
469
471
|
options: e.enum || [],
|
|
470
472
|
type: e.type,
|
|
471
|
-
isEditing:
|
|
473
|
+
isEditing: n,
|
|
472
474
|
isReadOnly: r,
|
|
473
475
|
onOpen: i,
|
|
474
476
|
onCancelEdit: u,
|
|
475
|
-
onChange: (
|
|
477
|
+
onChange: (l) => s(l)
|
|
476
478
|
}
|
|
477
479
|
);
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
+
}, Q = (t) => Nt(t.attributeData) ? jt(t) : /* @__PURE__ */ a(
|
|
481
|
+
_e,
|
|
480
482
|
{
|
|
481
483
|
value: F(t.value),
|
|
482
484
|
type: t.attributeData.type,
|
|
@@ -490,8 +492,8 @@ const Tt = C.tbody`
|
|
|
490
492
|
getDraftValue: t.getDraftValue,
|
|
491
493
|
setDraftValue: t.setDraftValue
|
|
492
494
|
}
|
|
493
|
-
),
|
|
494
|
-
|
|
495
|
+
), hn = (t) => /* @__PURE__ */ a(
|
|
496
|
+
Ve,
|
|
495
497
|
{
|
|
496
498
|
value: !!t.value,
|
|
497
499
|
isEditing: t.isEditing,
|
|
@@ -499,195 +501,195 @@ const Tt = C.tbody`
|
|
|
499
501
|
onCancelEdit: t.stopEditing,
|
|
500
502
|
onChange: (e) => t.updateValue(e)
|
|
501
503
|
}
|
|
502
|
-
),
|
|
504
|
+
), bn = (t) => {
|
|
503
505
|
const e = t.row.original.midnightExclusiveFields;
|
|
504
|
-
return /* @__PURE__ */
|
|
506
|
+
return /* @__PURE__ */ a(
|
|
505
507
|
Te,
|
|
506
508
|
{
|
|
507
509
|
value: typeof t.value == "string" ? t.value : void 0,
|
|
508
510
|
isEditing: t.isEditing,
|
|
509
511
|
isReadOnly: t.isReadOnly,
|
|
510
512
|
onCancelEdit: t.stopEditing,
|
|
511
|
-
onChange: (
|
|
513
|
+
onChange: (n) => t.updateValue(n),
|
|
512
514
|
isMidnightExclusive: e?.includes(t.columnId) ?? !1
|
|
513
515
|
}
|
|
514
516
|
);
|
|
515
|
-
},
|
|
516
|
-
string:
|
|
517
|
-
integer:
|
|
518
|
-
float:
|
|
519
|
-
boolean:
|
|
520
|
-
datetime:
|
|
521
|
-
list_of_strings:
|
|
522
|
-
list_of_integers:
|
|
523
|
-
list_of_any:
|
|
524
|
-
list_of_submodels:
|
|
525
|
-
dict:
|
|
526
|
-
},
|
|
517
|
+
}, Z = (t) => Nt(t.attributeData) ? jt(t) : F(t.value), Tt = (t) => F(t.value), yn = {
|
|
518
|
+
string: Q,
|
|
519
|
+
integer: Q,
|
|
520
|
+
float: Q,
|
|
521
|
+
boolean: hn,
|
|
522
|
+
datetime: bn,
|
|
523
|
+
list_of_strings: Z,
|
|
524
|
+
list_of_integers: Z,
|
|
525
|
+
list_of_any: Z,
|
|
526
|
+
list_of_submodels: Tt,
|
|
527
|
+
dict: Tt
|
|
528
|
+
}, To = () => yn, Kt = (t, e) => `list-table-cell-${t}-${e}`, vn = (t) => F(t), Vt = "editable", Cn = (t) => !!t && typeof t == "object" && "__listTablePlaceholder" in t, xn = ({
|
|
527
529
|
cell: t,
|
|
528
530
|
row: e,
|
|
529
|
-
rowIndex:
|
|
531
|
+
rowIndex: n,
|
|
530
532
|
attributeData: r,
|
|
531
533
|
dataTypeWidgets: i,
|
|
532
534
|
editingState: u,
|
|
533
|
-
callbacks:
|
|
535
|
+
callbacks: s,
|
|
534
536
|
isReadOnly: m
|
|
535
537
|
}) => {
|
|
536
|
-
const
|
|
537
|
-
if (!
|
|
538
|
+
const l = r?.type;
|
|
539
|
+
if (!l || !i?.[l])
|
|
538
540
|
return null;
|
|
539
|
-
const
|
|
540
|
-
if (!
|
|
541
|
+
const R = i[l];
|
|
542
|
+
if (!R)
|
|
541
543
|
return null;
|
|
542
|
-
const
|
|
544
|
+
const E = t.column.id, c = Kt(e.id, E), d = {
|
|
543
545
|
row: e,
|
|
544
546
|
cell: t,
|
|
545
547
|
value: t.getValue(),
|
|
546
|
-
rowIndex:
|
|
547
|
-
columnId:
|
|
548
|
+
rowIndex: n,
|
|
549
|
+
columnId: E,
|
|
548
550
|
cellId: c,
|
|
549
551
|
attributeData: r,
|
|
550
552
|
isEditing: u.editingCellId === c,
|
|
551
553
|
isReadOnly: m,
|
|
552
554
|
startEditing: () => u.startEditingCell(c),
|
|
553
555
|
stopEditing: u.stopEditingCell,
|
|
554
|
-
updateValue: (
|
|
555
|
-
|
|
556
|
+
updateValue: (C) => {
|
|
557
|
+
s.onUpdateRow(E, C, e.id), u.stopEditingCell();
|
|
556
558
|
},
|
|
557
|
-
openViewer: () =>
|
|
559
|
+
openViewer: () => s.onOpenViewer?.(e.original),
|
|
558
560
|
getDraftValue: u.getDraftValue,
|
|
559
561
|
setDraftValue: u.setDraftValue
|
|
560
562
|
};
|
|
561
|
-
return
|
|
563
|
+
return R(d);
|
|
562
564
|
}, Wt = ({
|
|
563
565
|
row: t,
|
|
564
566
|
cellWrapper: e,
|
|
565
|
-
columnAttributeData:
|
|
567
|
+
columnAttributeData: n,
|
|
566
568
|
dataTypeWidgets: r,
|
|
567
569
|
editingState: i,
|
|
568
570
|
callbacks: u,
|
|
569
|
-
editable:
|
|
571
|
+
editable: s = !0
|
|
570
572
|
}) => {
|
|
571
|
-
const m =
|
|
573
|
+
const m = Cn(t.original);
|
|
572
574
|
if (m) {
|
|
573
|
-
const
|
|
574
|
-
return /* @__PURE__ */
|
|
575
|
+
const l = t.original && typeof t.original == "object" && "label" in t.original ? String(t.original.label ?? "") : "";
|
|
576
|
+
return /* @__PURE__ */ a(wt, { style: { width: "100%" }, children: /* @__PURE__ */ a(
|
|
575
577
|
It,
|
|
576
578
|
{
|
|
577
579
|
style: { left: 0, paddingLeft: `calc(var(--padding-m) + ${t.depth * 16}px)` },
|
|
578
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ a(qe, { children: l })
|
|
579
581
|
}
|
|
580
582
|
) }, `${t.id}-placeholder`);
|
|
581
583
|
}
|
|
582
|
-
return /* @__PURE__ */
|
|
583
|
-
const c = Kt(t.id,
|
|
584
|
-
cell:
|
|
584
|
+
return /* @__PURE__ */ a(De, { children: t.getVisibleCells().map((l, R, E) => {
|
|
585
|
+
const c = Kt(t.id, l.column.id), d = n?.[l.column.id], C = !!l.column.columnDef.meta?.listTableCustomCell, g = d?.type, f = !!g && !C, h = !!(g && r?.[g]), b = i.editingCellId === c, x = s && l.column.columnDef.meta?.editable !== !1, T = !f || m ? null : xn({
|
|
586
|
+
cell: l,
|
|
585
587
|
row: t,
|
|
586
588
|
rowIndex: t.index,
|
|
587
|
-
attributeData:
|
|
589
|
+
attributeData: d,
|
|
588
590
|
dataTypeWidgets: r,
|
|
589
591
|
editingState: i,
|
|
590
592
|
callbacks: u,
|
|
591
593
|
isReadOnly: !x
|
|
592
|
-
}), I = !f || m ?
|
|
593
|
-
let
|
|
594
|
-
e !== null && (e ?
|
|
595
|
-
const S = x && f &&
|
|
596
|
-
return S && (
|
|
597
|
-
|
|
594
|
+
}), I = !f || m ? nt(l.column.columnDef.cell, l.getContext()) : T ?? vn(l.getValue());
|
|
595
|
+
let y = I;
|
|
596
|
+
e !== null && (e ? y = e(t, I) || I : y = /* @__PURE__ */ a(Je, { children: I }));
|
|
597
|
+
const S = x && f && h && !m;
|
|
598
|
+
return S && (y = /* @__PURE__ */ a(
|
|
599
|
+
Qe,
|
|
598
600
|
{
|
|
599
|
-
className: A(Vt, g, { editing:
|
|
600
|
-
children:
|
|
601
|
+
className: A(Vt, g, { editing: b }),
|
|
602
|
+
children: y
|
|
601
603
|
}
|
|
602
|
-
)), /* @__PURE__ */
|
|
603
|
-
|
|
604
|
+
)), /* @__PURE__ */ a(
|
|
605
|
+
wt,
|
|
604
606
|
{
|
|
605
607
|
id: c,
|
|
606
608
|
style: {
|
|
607
|
-
width: `calc(var(--col-${
|
|
608
|
-
paddingRight:
|
|
609
|
-
flexGrow:
|
|
609
|
+
width: `calc(var(--col-${l.column.id}-size) * 1px)`,
|
|
610
|
+
paddingRight: R === E.length - 1 ? "var(--padding-m)" : void 0,
|
|
611
|
+
flexGrow: R === E.length - 1 ? 1 : void 0
|
|
610
612
|
},
|
|
611
|
-
onDoubleClick: S ? (
|
|
612
|
-
|
|
613
|
+
onDoubleClick: S ? (w) => {
|
|
614
|
+
w.stopPropagation(), i.startEditingCell(c);
|
|
613
615
|
} : void 0,
|
|
614
|
-
onClick: (
|
|
615
|
-
const V =
|
|
616
|
-
if (
|
|
617
|
-
|
|
616
|
+
onClick: (w) => {
|
|
617
|
+
const V = w.target;
|
|
618
|
+
if (b && V.closest(".editing"))
|
|
619
|
+
w.stopPropagation();
|
|
618
620
|
else if (x) {
|
|
619
621
|
const H = V.closest(`.${Vt}`), $ = V.closest(
|
|
620
|
-
`.${
|
|
622
|
+
`.${Le}, input, textarea, select, [contenteditable="true"]`
|
|
621
623
|
);
|
|
622
|
-
(H || $) && (i.startEditingCell(c),
|
|
624
|
+
(H || $) && (i.startEditingCell(c), w.stopPropagation());
|
|
623
625
|
}
|
|
624
626
|
},
|
|
625
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ a(
|
|
626
628
|
It,
|
|
627
629
|
{
|
|
628
630
|
className: "inner-td",
|
|
629
631
|
style: {
|
|
630
|
-
left:
|
|
632
|
+
left: R === 0 ? `calc(var(--padding-m) + ${t.depth * 16}px)` : void 0
|
|
631
633
|
},
|
|
632
|
-
children:
|
|
634
|
+
children: y
|
|
633
635
|
}
|
|
634
636
|
)
|
|
635
637
|
},
|
|
636
|
-
|
|
638
|
+
l.id
|
|
637
639
|
);
|
|
638
640
|
}) });
|
|
639
|
-
}, _t = "__group_path__",
|
|
641
|
+
}, _t = "__group_path__", Dn = (t) => {
|
|
640
642
|
if (!t.startsWith(_t)) return null;
|
|
641
|
-
const e = t.slice(_t.length),
|
|
642
|
-
if (
|
|
643
|
-
const r = e.slice(0,
|
|
643
|
+
const e = t.slice(_t.length), n = e.lastIndexOf("__");
|
|
644
|
+
if (n === -1) return null;
|
|
645
|
+
const r = e.slice(0, n), i = Number(e.slice(n + 2));
|
|
644
646
|
return Number.isNaN(i) ? null : { baseColumnId: r, level: i };
|
|
645
|
-
},
|
|
647
|
+
}, Rn = (t) => !!t && typeof t == "object" && ("label" in t || "value" in t), P = (t) => !!t && typeof t == "object" && "__listTableGroup" in t;
|
|
646
648
|
function En(t, e) {
|
|
647
649
|
return e == null ? "(None)" : typeof e == "boolean" ? t === "active" ? e ? "Active" : "Inactive" : t === "library" ? e ? "Library" : "Standard" : e ? "Yes" : "No" : String(e);
|
|
648
650
|
}
|
|
649
|
-
function
|
|
651
|
+
function Sn({
|
|
650
652
|
groupColumnId: t,
|
|
651
653
|
groupValue: e,
|
|
652
|
-
count:
|
|
654
|
+
count: n,
|
|
653
655
|
countLabel: r,
|
|
654
656
|
depth: i,
|
|
655
657
|
isExpanded: u,
|
|
656
|
-
onToggle:
|
|
658
|
+
onToggle: s,
|
|
657
659
|
virtualStart: m,
|
|
658
|
-
onContextMenu:
|
|
660
|
+
onContextMenu: l
|
|
659
661
|
}) {
|
|
660
|
-
const
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
+
const E = Dn(t)?.baseColumnId ?? t, c = Rn(e) ? e : void 0, d = c?.value ?? e, C = c?.label ?? En(E, d);
|
|
663
|
+
return /* @__PURE__ */ a(
|
|
662
664
|
$t,
|
|
663
665
|
{
|
|
664
666
|
style: {
|
|
665
667
|
transform: `translateY(${m}px)`,
|
|
666
668
|
paddingLeft: i * 16
|
|
667
669
|
},
|
|
668
|
-
onClick:
|
|
669
|
-
onContextMenu:
|
|
670
|
+
onClick: s,
|
|
671
|
+
onContextMenu: l,
|
|
670
672
|
className: A("group-row", { expanded: u }),
|
|
671
|
-
children: /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
|
|
673
|
+
children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ M(an, { children: [
|
|
674
|
+
/* @__PURE__ */ a(
|
|
675
|
+
ln,
|
|
674
676
|
{
|
|
675
677
|
className: "expander",
|
|
676
678
|
icon: u ? "expand_more" : "chevron_right",
|
|
677
679
|
variant: "text"
|
|
678
680
|
}
|
|
679
681
|
),
|
|
680
|
-
c?.icon ? /* @__PURE__ */
|
|
681
|
-
|
|
682
|
+
c?.icon ? /* @__PURE__ */ a(
|
|
683
|
+
ze,
|
|
682
684
|
{
|
|
683
685
|
icon: c.icon,
|
|
684
686
|
style: { color: c.color },
|
|
685
687
|
filled: !0
|
|
686
688
|
}
|
|
687
|
-
) : c?.color ? /* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */ M(
|
|
690
|
-
|
|
689
|
+
) : c?.color ? /* @__PURE__ */ a(un, { style: { backgroundColor: c.color } }) : null,
|
|
690
|
+
/* @__PURE__ */ a("span", { children: C }),
|
|
691
|
+
/* @__PURE__ */ M(cn, { children: [
|
|
692
|
+
n,
|
|
691
693
|
r ? ` ${r}` : ""
|
|
692
694
|
] })
|
|
693
695
|
] }) })
|
|
@@ -695,99 +697,99 @@ function Rn({
|
|
|
695
697
|
);
|
|
696
698
|
}
|
|
697
699
|
const kt = (t) => !!t && typeof t == "object" && "__listTablePlaceholder" in t;
|
|
698
|
-
function
|
|
700
|
+
function wn({
|
|
699
701
|
row: t,
|
|
700
702
|
virtualRow: e,
|
|
701
|
-
isSelected:
|
|
703
|
+
isSelected: n,
|
|
702
704
|
rowIndex: r,
|
|
703
705
|
onRowClick: i,
|
|
704
706
|
onRowDoubleClick: u,
|
|
705
|
-
onRowContextMenu:
|
|
707
|
+
onRowContextMenu: s,
|
|
706
708
|
cellWrapper: m,
|
|
707
|
-
columnAttributeData:
|
|
708
|
-
dataTypeWidgets:
|
|
709
|
-
editingState:
|
|
709
|
+
columnAttributeData: l,
|
|
710
|
+
dataTypeWidgets: R,
|
|
711
|
+
editingState: E,
|
|
710
712
|
callbacks: c,
|
|
711
|
-
editable:
|
|
712
|
-
isInactive:
|
|
713
|
+
editable: d,
|
|
714
|
+
isInactive: C
|
|
713
715
|
}) {
|
|
714
|
-
const g = P(t.original), f = kt(t.original), { transform:
|
|
716
|
+
const g = P(t.original), f = kt(t.original), { transform: h, transition: b, setNodeRef: x, isDragging: T } = Ht({
|
|
715
717
|
id: t.id,
|
|
716
718
|
disabled: g || f
|
|
717
719
|
});
|
|
718
720
|
if (g) {
|
|
719
721
|
const S = t.original;
|
|
720
|
-
return /* @__PURE__ */
|
|
721
|
-
|
|
722
|
+
return /* @__PURE__ */ a(
|
|
723
|
+
Sn,
|
|
722
724
|
{
|
|
723
725
|
groupColumnId: S.__groupColumnId,
|
|
724
726
|
groupValue: S.__groupValue,
|
|
725
|
-
count: t.getLeafRows().filter((
|
|
726
|
-
const V =
|
|
727
|
+
count: t.getLeafRows().filter((w) => {
|
|
728
|
+
const V = w.original;
|
|
727
729
|
return !kt(V) && !P(V) && V?.entityType !== "folder" && V?.type !== "folder";
|
|
728
730
|
}).length,
|
|
729
731
|
depth: t.depth,
|
|
730
732
|
isExpanded: t.getIsExpanded(),
|
|
731
733
|
onToggle: t.getToggleExpandedHandler(),
|
|
732
734
|
virtualStart: e.start,
|
|
733
|
-
onContextMenu:
|
|
735
|
+
onContextMenu: s ? (w) => s(t.id, r, w) : void 0
|
|
734
736
|
}
|
|
735
737
|
);
|
|
736
738
|
}
|
|
737
|
-
const I = `translateY(${e.start}px)`,
|
|
738
|
-
return /* @__PURE__ */
|
|
739
|
+
const I = `translateY(${e.start}px)`, y = h ? Ot.Transform.toString(h) : "";
|
|
740
|
+
return /* @__PURE__ */ a(
|
|
739
741
|
$t,
|
|
740
742
|
{
|
|
741
743
|
ref: x,
|
|
742
744
|
style: {
|
|
743
|
-
transform: `${I} ${
|
|
744
|
-
transition:
|
|
745
|
+
transform: `${I} ${y}`,
|
|
746
|
+
transition: b
|
|
745
747
|
},
|
|
746
748
|
tabIndex: -1,
|
|
747
749
|
onClick: (S) => i(t.id, r, S),
|
|
748
750
|
onDoubleClick: u ? (S) => u(t.id, r, S) : void 0,
|
|
749
|
-
onContextMenu:
|
|
751
|
+
onContextMenu: s ? (S) => s(t.id, r, S) : void 0,
|
|
750
752
|
className: A("table-list-row", {
|
|
751
|
-
dragging:
|
|
752
|
-
selected:
|
|
753
|
-
inactive:
|
|
753
|
+
dragging: T,
|
|
754
|
+
selected: n,
|
|
755
|
+
inactive: C,
|
|
754
756
|
"placeholder-row": f
|
|
755
757
|
}),
|
|
756
|
-
children: /* @__PURE__ */
|
|
758
|
+
children: /* @__PURE__ */ a(
|
|
757
759
|
Wt,
|
|
758
760
|
{
|
|
759
761
|
row: t,
|
|
760
762
|
cellWrapper: m,
|
|
761
|
-
columnAttributeData:
|
|
762
|
-
dataTypeWidgets:
|
|
763
|
-
editingState:
|
|
763
|
+
columnAttributeData: l,
|
|
764
|
+
dataTypeWidgets: R,
|
|
765
|
+
editingState: E,
|
|
764
766
|
callbacks: c,
|
|
765
|
-
editable:
|
|
767
|
+
editable: d
|
|
766
768
|
}
|
|
767
769
|
)
|
|
768
770
|
}
|
|
769
771
|
);
|
|
770
772
|
}
|
|
771
|
-
const
|
|
772
|
-
function
|
|
773
|
+
const In = Gt.memo(wn);
|
|
774
|
+
function zn({
|
|
773
775
|
header: t,
|
|
774
776
|
enabled: e,
|
|
775
|
-
enableSorting:
|
|
777
|
+
enableSorting: n = !1,
|
|
776
778
|
enableColumnVisibility: r = !1,
|
|
777
779
|
enableColumnResizing: i = !1,
|
|
778
780
|
isLast: u = !1
|
|
779
781
|
}) {
|
|
780
|
-
const { attributes:
|
|
782
|
+
const { attributes: s, listeners: m, setNodeRef: l, isDragging: R, transform: E, transition: c } = Ht({
|
|
781
783
|
id: t.id,
|
|
782
784
|
data: { type: "column" },
|
|
783
785
|
disabled: !e
|
|
784
|
-
}),
|
|
786
|
+
}), d = t.column, C = n && d.getCanSort(), g = d.getIsSorted(), f = `list-table-menu-${t.id}`, { menuOpen: h } = Ae(), b = h === f, x = C ? [
|
|
785
787
|
{
|
|
786
788
|
id: "sort-asc",
|
|
787
789
|
label: "Sort ascending",
|
|
788
790
|
icon: "sort",
|
|
789
791
|
selected: g === "asc",
|
|
790
|
-
onClick: () =>
|
|
792
|
+
onClick: () => d.toggleSorting(!1)
|
|
791
793
|
},
|
|
792
794
|
{
|
|
793
795
|
id: "sort-desc",
|
|
@@ -795,61 +797,61 @@ function In({
|
|
|
795
797
|
icon: "sort",
|
|
796
798
|
className: "sort-desc-icon",
|
|
797
799
|
selected: g === "desc",
|
|
798
|
-
onClick: () =>
|
|
800
|
+
onClick: () => d.toggleSorting(!0)
|
|
799
801
|
}
|
|
800
|
-
] : [], I = r &&
|
|
802
|
+
] : [], I = r && d.getCanHide() ? [
|
|
801
803
|
...x.length > 0 ? [{ id: "divider-visibility", type: "divider" }] : [],
|
|
802
804
|
{
|
|
803
805
|
id: "hide",
|
|
804
806
|
label: "Hide column",
|
|
805
807
|
icon: "visibility_off",
|
|
806
|
-
onClick: () =>
|
|
808
|
+
onClick: () => d.toggleVisibility(!1)
|
|
807
809
|
}
|
|
808
|
-
] : [],
|
|
810
|
+
] : [], y = [...x, ...I], S = i && d.getCanResize(), w = d.getIsResizing(), { columnSizingInfo: V } = t.getContext().table.getState(), H = V.isResizingColumn === d.id ? V.deltaOffset ?? 0 : 0, $ = !!V.isResizingColumn, B = {
|
|
809
811
|
onPointerDown: (k) => k.stopPropagation(),
|
|
810
812
|
onMouseDown: (k) => k.stopPropagation()
|
|
811
813
|
};
|
|
812
814
|
return /* @__PURE__ */ M(
|
|
813
|
-
|
|
815
|
+
sn,
|
|
814
816
|
{
|
|
815
|
-
ref:
|
|
817
|
+
ref: l,
|
|
816
818
|
style: {
|
|
817
819
|
width: `calc(var(--header-${t.id}-size) * 1px)`,
|
|
818
|
-
transform: Ot.Transform.toString(
|
|
820
|
+
transform: Ot.Transform.toString(E) ?? void 0,
|
|
819
821
|
transition: c,
|
|
820
822
|
flexGrow: u ? 1 : void 0
|
|
821
823
|
},
|
|
822
824
|
className: A({
|
|
823
825
|
grab: e,
|
|
824
|
-
dragging:
|
|
825
|
-
"menu-open":
|
|
826
|
+
dragging: R,
|
|
827
|
+
"menu-open": b,
|
|
826
828
|
resizing: $,
|
|
827
829
|
sorted: !!g
|
|
828
830
|
}),
|
|
829
|
-
...e ? { ...
|
|
831
|
+
...e ? { ...s, ...m } : {},
|
|
830
832
|
children: [
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
(
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
833
|
+
/* @__PURE__ */ a(pn, { children: t.isPlaceholder ? null : nt(t.column.columnDef.header, t.getContext()) }),
|
|
834
|
+
(y.length > 0 || C) && /* @__PURE__ */ M(mn, { ...B, children: [
|
|
835
|
+
y.length > 0 && /* @__PURE__ */ a(Xe, { menuItems: y, menuId: f, className: "header-menu" }),
|
|
836
|
+
C && /* @__PURE__ */ a(
|
|
837
|
+
Ue,
|
|
836
838
|
{
|
|
837
839
|
icon: "sort",
|
|
838
840
|
className: A("sort-button", { visible: !!g }),
|
|
839
841
|
style: {
|
|
840
842
|
transform: g === "desc" ? "rotate(180deg) scaleX(-1)" : "none"
|
|
841
843
|
},
|
|
842
|
-
onClick:
|
|
844
|
+
onClick: d.getToggleSortingHandler(),
|
|
843
845
|
selected: !!g
|
|
844
846
|
}
|
|
845
847
|
)
|
|
846
848
|
] }),
|
|
847
|
-
S && /* @__PURE__ */
|
|
848
|
-
|
|
849
|
+
S && /* @__PURE__ */ a(
|
|
850
|
+
fn,
|
|
849
851
|
{
|
|
850
|
-
className: A("resize-handle", { resizing:
|
|
852
|
+
className: A("resize-handle", { resizing: w }),
|
|
851
853
|
style: { transform: H ? `translateX(${H}px)` : void 0 },
|
|
852
|
-
onDoubleClick: () =>
|
|
854
|
+
onDoubleClick: () => d.resetSize(),
|
|
853
855
|
onMouseDown: (k) => {
|
|
854
856
|
k.stopPropagation(), t.getResizeHandler()(k);
|
|
855
857
|
},
|
|
@@ -862,75 +864,75 @@ function In({
|
|
|
862
864
|
);
|
|
863
865
|
}
|
|
864
866
|
function Tn(t, e) {
|
|
865
|
-
const [
|
|
867
|
+
const [n, r] = L(() => {
|
|
866
868
|
if (e && e.length > 0) {
|
|
867
|
-
const u = t.map((
|
|
869
|
+
const u = t.map((s) => s.id).filter((s) => !e.includes(s));
|
|
868
870
|
return [...e, ...u];
|
|
869
871
|
}
|
|
870
872
|
return t.map((i) => i.id);
|
|
871
873
|
});
|
|
872
874
|
return Mt(() => {
|
|
873
875
|
if (e && e.length > 0) {
|
|
874
|
-
const u = t.map((
|
|
876
|
+
const u = t.map((s) => s.id).filter((s) => !e.includes(s));
|
|
875
877
|
r([...e, ...u]);
|
|
876
878
|
}
|
|
877
|
-
}, [e]), { columnOrder:
|
|
879
|
+
}, [e]), { columnOrder: n, setColumnOrder: r };
|
|
878
880
|
}
|
|
879
881
|
const W = (t) => !!t.original && typeof t.original == "object" && "__listTableGroup" in t.original;
|
|
880
|
-
function
|
|
882
|
+
function Vn({
|
|
881
883
|
rows: t,
|
|
882
884
|
selectedRows: e,
|
|
883
|
-
onSelectedRowsChange:
|
|
885
|
+
onSelectedRowsChange: n,
|
|
884
886
|
multiSelection: r,
|
|
885
887
|
rowVirtualizer: i,
|
|
886
888
|
tableContainerRef: u
|
|
887
889
|
}) {
|
|
888
|
-
const [
|
|
889
|
-
(c,
|
|
890
|
-
const g = t[
|
|
890
|
+
const [s, m] = L(-1), l = At(-1), R = O(
|
|
891
|
+
(c, d, C) => {
|
|
892
|
+
const g = t[d];
|
|
891
893
|
if (!(g && W(g))) {
|
|
892
|
-
if (r &&
|
|
893
|
-
const f = Math.min(
|
|
894
|
-
|
|
895
|
-
} else r && (
|
|
896
|
-
m(
|
|
894
|
+
if (r && C.shiftKey && l.current >= 0) {
|
|
895
|
+
const f = Math.min(l.current, d), h = Math.max(l.current, d), b = t.slice(f, h + 1).filter((x) => !W(x)).map((x) => x.id);
|
|
896
|
+
C.metaKey || C.ctrlKey ? n?.(Array.from(/* @__PURE__ */ new Set([...e, ...b]))) : n?.(b);
|
|
897
|
+
} else r && (C.metaKey || C.ctrlKey) ? (e.includes(c) ? n?.(e.filter((f) => f !== c)) : n?.([...e, c]), l.current = d) : e.includes(c) ? n?.(e.filter((f) => f !== c)) : (n?.([c]), l.current = d);
|
|
898
|
+
m(d), u.current?.focus();
|
|
897
899
|
}
|
|
898
900
|
},
|
|
899
|
-
[e, t,
|
|
900
|
-
),
|
|
901
|
+
[e, t, n, r, u]
|
|
902
|
+
), E = O(
|
|
901
903
|
(c) => {
|
|
902
904
|
if (c.key !== "ArrowDown" && c.key !== "ArrowUp") return;
|
|
903
905
|
c.preventDefault();
|
|
904
|
-
const
|
|
905
|
-
let g =
|
|
906
|
+
const d = c.key === "ArrowDown" ? 1 : -1;
|
|
907
|
+
let g = s < 0 ? d > 0 ? -1 : t.length : s;
|
|
906
908
|
for (; ; ) {
|
|
907
|
-
if (g +=
|
|
909
|
+
if (g += d, g < 0 || g >= t.length) {
|
|
908
910
|
g = Math.max(0, Math.min(t.length - 1, g));
|
|
909
911
|
break;
|
|
910
912
|
}
|
|
911
913
|
if (!W(t[g]))
|
|
912
914
|
break;
|
|
913
915
|
}
|
|
914
|
-
if (g ===
|
|
916
|
+
if (g === s || W(t[g])) return;
|
|
915
917
|
const f = t[g]?.id;
|
|
916
918
|
if (f) {
|
|
917
919
|
if (c.shiftKey && r)
|
|
918
920
|
if (e.includes(f)) {
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
+
const h = t[s]?.id;
|
|
922
|
+
h && n?.(e.filter((b) => b !== h));
|
|
921
923
|
} else
|
|
922
|
-
|
|
924
|
+
n?.([...e, f]);
|
|
923
925
|
else
|
|
924
|
-
|
|
926
|
+
n?.([f]), l.current = g;
|
|
925
927
|
m(g), i.scrollToIndex(g, { behavior: "smooth" });
|
|
926
928
|
}
|
|
927
929
|
},
|
|
928
|
-
[
|
|
930
|
+
[s, t, e, n, i]
|
|
929
931
|
);
|
|
930
|
-
return { activeRowIndex:
|
|
932
|
+
return { activeRowIndex: s, handleRowClick: R, handleKeyDown: E };
|
|
931
933
|
}
|
|
932
|
-
function
|
|
933
|
-
const [t, e] = L(null), [
|
|
934
|
+
function _n() {
|
|
935
|
+
const [t, e] = L(null), [n, r] = L(null), i = O((m) => {
|
|
934
936
|
e(m);
|
|
935
937
|
}, []), u = O(() => {
|
|
936
938
|
e(null), r(null);
|
|
@@ -940,91 +942,91 @@ function Vn() {
|
|
|
940
942
|
editingCellId: t,
|
|
941
943
|
startEditingCell: i,
|
|
942
944
|
stopEditingCell: u,
|
|
943
|
-
getDraftValue: () =>
|
|
945
|
+
getDraftValue: () => n,
|
|
944
946
|
setDraftValue: r
|
|
945
947
|
}),
|
|
946
|
-
[t,
|
|
948
|
+
[t, n, i, u]
|
|
947
949
|
) };
|
|
948
950
|
}
|
|
949
|
-
function
|
|
951
|
+
function kn({
|
|
950
952
|
rows: t,
|
|
951
953
|
columnOrder: e,
|
|
952
|
-
onReorderRows:
|
|
954
|
+
onReorderRows: n,
|
|
953
955
|
setColumnOrder: r,
|
|
954
956
|
onColumnOrderChange: i
|
|
955
957
|
}) {
|
|
956
|
-
const [u,
|
|
958
|
+
const [u, s] = L(null), [m, l] = L(null);
|
|
957
959
|
return {
|
|
958
|
-
sensors:
|
|
959
|
-
Ct(
|
|
960
|
-
Ct(
|
|
960
|
+
sensors: $e(
|
|
961
|
+
Ct(Ne),
|
|
962
|
+
Ct(je, { coordinateGetter: Pe })
|
|
961
963
|
),
|
|
962
964
|
activeRowId: u,
|
|
963
965
|
activeColumnId: m,
|
|
964
|
-
handleColumnDragStart: (
|
|
965
|
-
|
|
966
|
+
handleColumnDragStart: (h) => {
|
|
967
|
+
l(h.active.id);
|
|
966
968
|
},
|
|
967
|
-
handleColumnDragEnd: (
|
|
968
|
-
|
|
969
|
-
const { active:
|
|
970
|
-
if (x &&
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
r(() =>
|
|
969
|
+
handleColumnDragEnd: (h) => {
|
|
970
|
+
l(null);
|
|
971
|
+
const { active: b, over: x } = h;
|
|
972
|
+
if (x && b.id !== x.id) {
|
|
973
|
+
const T = e.indexOf(b.id), I = e.indexOf(x.id);
|
|
974
|
+
if (T !== -1 && I !== -1) {
|
|
975
|
+
const y = Fe(e, T, I);
|
|
976
|
+
r(() => y), i?.(y);
|
|
975
977
|
}
|
|
976
978
|
}
|
|
977
979
|
},
|
|
978
|
-
handleColumnDragCancel: () =>
|
|
979
|
-
handleRowDragStart: (
|
|
980
|
-
|
|
980
|
+
handleColumnDragCancel: () => l(null),
|
|
981
|
+
handleRowDragStart: (h) => {
|
|
982
|
+
s(h.active.id);
|
|
981
983
|
},
|
|
982
|
-
handleRowDragEnd: (
|
|
983
|
-
|
|
984
|
-
const { active:
|
|
985
|
-
if (x &&
|
|
986
|
-
const
|
|
987
|
-
|
|
984
|
+
handleRowDragEnd: (h) => {
|
|
985
|
+
s(null);
|
|
986
|
+
const { active: b, over: x } = h;
|
|
987
|
+
if (x && b.id !== x.id) {
|
|
988
|
+
const T = t.findIndex((y) => y.id === b.id), I = t.findIndex((y) => y.id === x.id);
|
|
989
|
+
n?.(T, I);
|
|
988
990
|
}
|
|
989
991
|
},
|
|
990
|
-
handleRowDragCancel: () =>
|
|
992
|
+
handleRowDragCancel: () => s(null)
|
|
991
993
|
};
|
|
992
994
|
}
|
|
993
|
-
function
|
|
994
|
-
const e = t.getFlatHeaders(),
|
|
995
|
-
return
|
|
995
|
+
function Ln(t) {
|
|
996
|
+
const e = t.getFlatHeaders(), n = t.getState().columnSizing;
|
|
997
|
+
return tt(() => {
|
|
996
998
|
const r = {};
|
|
997
999
|
for (const i of e)
|
|
998
1000
|
r[`--header-${i.id}-size`] = i.getSize(), r[`--col-${i.column.id}-size`] = i.column.getSize();
|
|
999
1001
|
return r;
|
|
1000
|
-
}, [
|
|
1002
|
+
}, [n, e]);
|
|
1001
1003
|
}
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1004
|
+
const Gn = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [];
|
|
1005
|
+
function Vo({
|
|
1004
1006
|
data: t,
|
|
1005
1007
|
columns: e,
|
|
1006
|
-
getRowId:
|
|
1008
|
+
getRowId: n,
|
|
1007
1009
|
fetchNextPage: r,
|
|
1008
1010
|
hasNextPage: i,
|
|
1009
1011
|
isFetchingNextPage: u,
|
|
1010
|
-
onUpdateRow:
|
|
1012
|
+
onUpdateRow: s,
|
|
1011
1013
|
onOpenViewer: m,
|
|
1012
|
-
editable:
|
|
1013
|
-
onReorderRows:
|
|
1014
|
-
rowContextMenuBuilders:
|
|
1014
|
+
editable: l = !0,
|
|
1015
|
+
onReorderRows: R,
|
|
1016
|
+
rowContextMenuBuilders: E = [],
|
|
1015
1017
|
onRowDoubleClick: c,
|
|
1016
|
-
selectedRows:
|
|
1017
|
-
onSelectedRowsChange:
|
|
1018
|
+
selectedRows: d = [],
|
|
1019
|
+
onSelectedRowsChange: C,
|
|
1018
1020
|
multiSelection: g = !1,
|
|
1019
1021
|
cellWrapper: f,
|
|
1020
|
-
columnAttributeData:
|
|
1021
|
-
dataTypeWidgets:
|
|
1022
|
+
columnAttributeData: h,
|
|
1023
|
+
dataTypeWidgets: b,
|
|
1022
1024
|
enableColumnReordering: x = !1,
|
|
1023
|
-
columnOrder:
|
|
1025
|
+
columnOrder: T,
|
|
1024
1026
|
onColumnOrderChange: I,
|
|
1025
|
-
enableColumnVisibility:
|
|
1027
|
+
enableColumnVisibility: y = !1,
|
|
1026
1028
|
columnVisibility: S,
|
|
1027
|
-
defaultColumnVisibility:
|
|
1029
|
+
defaultColumnVisibility: w,
|
|
1028
1030
|
onColumnVisibilityChange: V,
|
|
1029
1031
|
enableColumnResizing: H = !1,
|
|
1030
1032
|
columnSizing: $,
|
|
@@ -1035,49 +1037,49 @@ function To({
|
|
|
1035
1037
|
enableExpanding: Ut = !0,
|
|
1036
1038
|
expanded: Xt,
|
|
1037
1039
|
onExpandedChange: qt,
|
|
1038
|
-
getIsRowInactive:
|
|
1040
|
+
getIsRowInactive: ot
|
|
1039
1041
|
}) {
|
|
1040
|
-
const [Jt, Qt] = L([]), [Zt, te] = L({}), [ee, ne] = L({}), [oe, ie] = L({}), Y = At(null), [
|
|
1041
|
-
const p = typeof
|
|
1042
|
+
const [Jt, Qt] = L([]), [Zt, te] = L({}), [ee, ne] = L({}), [oe, ie] = L({}), Y = At(null), [it] = He(), rt = Bt ?? Jt, re = (o) => {
|
|
1043
|
+
const p = typeof o == "function" ? o(rt) : o;
|
|
1042
1044
|
Qt(p), Yt?.(p);
|
|
1043
|
-
},
|
|
1044
|
-
const p = typeof
|
|
1045
|
+
}, st = Xt ?? oe, se = (o) => {
|
|
1046
|
+
const p = typeof o == "function" ? o(st) : o;
|
|
1045
1047
|
ie(p), qt?.(p);
|
|
1046
|
-
}, U = S ?? Zt, ae = (
|
|
1047
|
-
const p = typeof
|
|
1048
|
-
Object.keys(p).forEach((
|
|
1049
|
-
const G = vt({},
|
|
1050
|
-
p[
|
|
1048
|
+
}, U = S ?? Zt, ae = (o) => {
|
|
1049
|
+
const p = typeof o == "function" ? o(at) : o, D = {};
|
|
1050
|
+
Object.keys(p).forEach((z) => {
|
|
1051
|
+
const G = vt({}, z, w);
|
|
1052
|
+
p[z] !== G && (D[z] = p[z]);
|
|
1051
1053
|
}), te(D), V?.(D);
|
|
1052
|
-
},
|
|
1053
|
-
const
|
|
1054
|
+
}, at = tt(() => {
|
|
1055
|
+
const o = {};
|
|
1054
1056
|
return e.forEach((p) => {
|
|
1055
1057
|
const D = p.id || p.accessorKey;
|
|
1056
1058
|
if (D) {
|
|
1057
|
-
const
|
|
1058
|
-
G !== void 0 && U[D] === void 0 ?
|
|
1059
|
+
const z = vt(U, D, w), G = p.visible;
|
|
1060
|
+
G !== void 0 && U[D] === void 0 ? o[D] = G : o[D] = z;
|
|
1059
1061
|
}
|
|
1060
|
-
}),
|
|
1061
|
-
|
|
1062
|
+
}), Me(
|
|
1063
|
+
o,
|
|
1062
1064
|
e.map((p) => p.id || p.accessorKey).filter(Boolean)
|
|
1063
1065
|
);
|
|
1064
|
-
}, [U,
|
|
1065
|
-
const p = typeof
|
|
1066
|
+
}, [U, w, e]), lt = $ ?? ee, le = (o) => {
|
|
1067
|
+
const p = typeof o == "function" ? o(lt) : o;
|
|
1066
1068
|
ne(p), B?.(p);
|
|
1067
|
-
}, { columnOrder:
|
|
1069
|
+
}, { columnOrder: dt, setColumnOrder: ct } = Tn(e, T), N = Re({
|
|
1068
1070
|
data: t,
|
|
1069
1071
|
columns: e,
|
|
1070
|
-
getRowId:
|
|
1072
|
+
getRowId: n,
|
|
1071
1073
|
state: {
|
|
1072
|
-
columnOrder:
|
|
1073
|
-
sorting:
|
|
1074
|
-
columnVisibility:
|
|
1075
|
-
columnSizing:
|
|
1076
|
-
expanded:
|
|
1074
|
+
columnOrder: dt,
|
|
1075
|
+
sorting: rt,
|
|
1076
|
+
columnVisibility: at,
|
|
1077
|
+
columnSizing: lt,
|
|
1078
|
+
expanded: st
|
|
1077
1079
|
},
|
|
1078
1080
|
filterFns: { fuzzy: () => !0 },
|
|
1079
1081
|
// Placeholder for fuzzy filtering
|
|
1080
|
-
onColumnOrderChange:
|
|
1082
|
+
onColumnOrderChange: ct,
|
|
1081
1083
|
onSortingChange: re,
|
|
1082
1084
|
onColumnVisibilityChange: ae,
|
|
1083
1085
|
onColumnSizingChange: le,
|
|
@@ -1085,133 +1087,131 @@ function To({
|
|
|
1085
1087
|
enableSorting: k,
|
|
1086
1088
|
enableExpanding: Ut,
|
|
1087
1089
|
columnResizeMode: "onEnd",
|
|
1088
|
-
getCoreRowModel:
|
|
1089
|
-
getExpandedRowModel:
|
|
1090
|
+
getCoreRowModel: we(),
|
|
1091
|
+
getExpandedRowModel: Se(),
|
|
1090
1092
|
getSortedRowModel: Ee(),
|
|
1091
|
-
getSubRows: (
|
|
1092
|
-
getRowCanExpand: (
|
|
1093
|
+
getSubRows: (o) => o.subRows,
|
|
1094
|
+
getRowCanExpand: (o) => o.subRows.length > 0,
|
|
1093
1095
|
meta: {
|
|
1094
|
-
updateData:
|
|
1096
|
+
updateData: s,
|
|
1095
1097
|
openViewerDialog: m
|
|
1096
1098
|
}
|
|
1097
|
-
}), { rows: _ } = N.getRowModel(), X =
|
|
1099
|
+
}), { rows: _ } = N.getRowModel(), X = Oe({
|
|
1098
1100
|
count: i ? _.length + 1 : _.length,
|
|
1099
1101
|
getScrollElement: () => Y.current,
|
|
1100
1102
|
estimateSize: () => 44,
|
|
1101
1103
|
overscan: 10
|
|
1102
|
-
}), q = X.getVirtualItems(), { handleRowClick: de, handleKeyDown: ce } =
|
|
1104
|
+
}), q = X.getVirtualItems(), { handleRowClick: de, handleKeyDown: ce } = Vn({
|
|
1103
1105
|
rows: _,
|
|
1104
|
-
selectedRows:
|
|
1105
|
-
onSelectedRowsChange:
|
|
1106
|
+
selectedRows: d,
|
|
1107
|
+
onSelectedRowsChange: C,
|
|
1106
1108
|
multiSelection: g,
|
|
1107
1109
|
rowVirtualizer: X,
|
|
1108
1110
|
tableContainerRef: Y
|
|
1109
1111
|
}), ue = O(
|
|
1110
|
-
(
|
|
1112
|
+
(o, p, D) => {
|
|
1111
1113
|
if (!c) return;
|
|
1112
|
-
const
|
|
1113
|
-
!
|
|
1114
|
-
rowId:
|
|
1114
|
+
const z = _[p];
|
|
1115
|
+
!z || z.original === void 0 || P(z.original) || c(D, {
|
|
1116
|
+
rowId: o,
|
|
1115
1117
|
rowIndex: p,
|
|
1116
|
-
row:
|
|
1117
|
-
isSelected:
|
|
1118
|
+
row: z,
|
|
1119
|
+
isSelected: d.includes(o)
|
|
1118
1120
|
});
|
|
1119
1121
|
},
|
|
1120
|
-
[c, _,
|
|
1122
|
+
[c, _, d]
|
|
1121
1123
|
), ge = O(
|
|
1122
|
-
(
|
|
1123
|
-
const
|
|
1124
|
-
if (!
|
|
1125
|
-
const G = P(
|
|
1126
|
-
let
|
|
1124
|
+
(o, p, D) => {
|
|
1125
|
+
const z = _[p];
|
|
1126
|
+
if (!z || z.original === void 0) return;
|
|
1127
|
+
const G = P(z.original);
|
|
1128
|
+
let ht = {};
|
|
1127
1129
|
if (G) {
|
|
1128
|
-
const K =
|
|
1129
|
-
|
|
1130
|
+
const K = z.original;
|
|
1131
|
+
ht = {
|
|
1130
1132
|
groupColumnId: K.__groupColumnId,
|
|
1131
1133
|
groupValue: K.__groupValue
|
|
1132
1134
|
};
|
|
1133
1135
|
}
|
|
1134
1136
|
D.preventDefault(), D.stopPropagation();
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
const yt = R.flatMap(
|
|
1138
|
-
(K) => Ln(
|
|
1137
|
+
const bt = d.includes(o), xe = G || bt ? d : [o], yt = E.flatMap(
|
|
1138
|
+
(K) => Gn(
|
|
1139
1139
|
K(D, {
|
|
1140
|
-
rowId:
|
|
1140
|
+
rowId: o,
|
|
1141
1141
|
rowIndex: p,
|
|
1142
|
-
row:
|
|
1143
|
-
selectedRows:
|
|
1144
|
-
isSelected:
|
|
1142
|
+
row: z,
|
|
1143
|
+
selectedRows: xe,
|
|
1144
|
+
isSelected: bt,
|
|
1145
1145
|
isGroupRow: G,
|
|
1146
|
-
...
|
|
1146
|
+
...ht
|
|
1147
1147
|
})
|
|
1148
1148
|
)
|
|
1149
1149
|
);
|
|
1150
|
-
yt.length > 0 &&
|
|
1150
|
+
yt.length > 0 && it(D, yt);
|
|
1151
1151
|
},
|
|
1152
|
-
[
|
|
1153
|
-
), { editingState:
|
|
1154
|
-
sensors:
|
|
1155
|
-
activeRowId:
|
|
1156
|
-
activeColumnId:
|
|
1152
|
+
[E, _, d, it]
|
|
1153
|
+
), { editingState: ut } = _n(), {
|
|
1154
|
+
sensors: gt,
|
|
1155
|
+
activeRowId: pt,
|
|
1156
|
+
activeColumnId: mt,
|
|
1157
1157
|
handleColumnDragStart: pe,
|
|
1158
1158
|
handleColumnDragEnd: me,
|
|
1159
1159
|
handleColumnDragCancel: fe,
|
|
1160
1160
|
handleRowDragStart: he,
|
|
1161
1161
|
handleRowDragEnd: be,
|
|
1162
1162
|
handleRowDragCancel: ye
|
|
1163
|
-
} =
|
|
1163
|
+
} = kn({ rows: _, columnOrder: dt, onReorderRows: R, setColumnOrder: ct, onColumnOrderChange: I }), ft = tt(() => ({ onUpdateRow: s, onOpenViewer: m }), [s, m]), ve = Ln(N), Ce = !!N.getState().columnSizingInfo.isResizingColumn;
|
|
1164
1164
|
Mt(() => {
|
|
1165
|
-
const [
|
|
1166
|
-
|
|
1165
|
+
const [o] = q.slice(-1);
|
|
1166
|
+
o && o.index >= _.length - 1 && i && !u && r?.();
|
|
1167
1167
|
}, [i, r, _.length, u, q]);
|
|
1168
|
-
const J =
|
|
1169
|
-
return /* @__PURE__ */
|
|
1170
|
-
|
|
1168
|
+
const J = pt ? _.find((o) => o.id === pt) : null, j = mt ? N.getHeaderGroups()[0]?.headers.find((o) => o.id === mt) : null;
|
|
1169
|
+
return /* @__PURE__ */ a(
|
|
1170
|
+
Ze,
|
|
1171
1171
|
{
|
|
1172
1172
|
ref: Y,
|
|
1173
1173
|
tabIndex: 0,
|
|
1174
1174
|
onKeyDown: ce,
|
|
1175
1175
|
style: Ce ? { cursor: "col-resize" } : void 0,
|
|
1176
|
-
children: /* @__PURE__ */ M(
|
|
1176
|
+
children: /* @__PURE__ */ M(tn, { style: ve, children: [
|
|
1177
1177
|
/* @__PURE__ */ M(
|
|
1178
1178
|
xt,
|
|
1179
1179
|
{
|
|
1180
|
-
sensors:
|
|
1180
|
+
sensors: gt,
|
|
1181
1181
|
collisionDetection: Dt,
|
|
1182
1182
|
onDragStart: pe,
|
|
1183
1183
|
onDragEnd: me,
|
|
1184
1184
|
onDragCancel: fe,
|
|
1185
|
-
modifiers: [
|
|
1185
|
+
modifiers: [Ke],
|
|
1186
1186
|
children: [
|
|
1187
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ a(en, { children: N.getHeaderGroups().map((o) => /* @__PURE__ */ a(nn, { children: /* @__PURE__ */ a(
|
|
1188
1188
|
St,
|
|
1189
1189
|
{
|
|
1190
|
-
items:
|
|
1191
|
-
strategy:
|
|
1192
|
-
children:
|
|
1193
|
-
|
|
1190
|
+
items: o.headers.map((p) => p.id),
|
|
1191
|
+
strategy: Be,
|
|
1192
|
+
children: o.headers.map((p, D) => /* @__PURE__ */ a(
|
|
1193
|
+
zn,
|
|
1194
1194
|
{
|
|
1195
1195
|
header: p,
|
|
1196
1196
|
enabled: x,
|
|
1197
1197
|
enableSorting: k,
|
|
1198
|
-
enableColumnVisibility:
|
|
1198
|
+
enableColumnVisibility: y,
|
|
1199
1199
|
enableColumnResizing: H,
|
|
1200
|
-
isLast: D ===
|
|
1200
|
+
isLast: D === o.headers.length - 1
|
|
1201
1201
|
},
|
|
1202
1202
|
p.id
|
|
1203
1203
|
))
|
|
1204
1204
|
}
|
|
1205
|
-
) },
|
|
1206
|
-
/* @__PURE__ */
|
|
1207
|
-
|
|
1205
|
+
) }, o.id)) }),
|
|
1206
|
+
/* @__PURE__ */ a(
|
|
1207
|
+
Rt,
|
|
1208
1208
|
{
|
|
1209
1209
|
dropAnimation: {
|
|
1210
|
-
sideEffects:
|
|
1210
|
+
sideEffects: Et({
|
|
1211
1211
|
styles: { active: { opacity: "0.4" } }
|
|
1212
1212
|
})
|
|
1213
1213
|
},
|
|
1214
|
-
children: j ? /* @__PURE__ */
|
|
1214
|
+
children: j ? /* @__PURE__ */ a("table", { children: /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a(gn, { style: { width: j.getSize() }, children: j.isPlaceholder ? null : nt(
|
|
1215
1215
|
j.column.columnDef.header,
|
|
1216
1216
|
j.getContext()
|
|
1217
1217
|
) }) }) }) }) : null
|
|
@@ -1223,74 +1223,74 @@ function To({
|
|
|
1223
1223
|
/* @__PURE__ */ M(
|
|
1224
1224
|
xt,
|
|
1225
1225
|
{
|
|
1226
|
-
sensors:
|
|
1226
|
+
sensors: gt,
|
|
1227
1227
|
collisionDetection: Dt,
|
|
1228
1228
|
onDragStart: he,
|
|
1229
1229
|
onDragEnd: be,
|
|
1230
1230
|
onDragCancel: ye,
|
|
1231
|
-
modifiers: [
|
|
1231
|
+
modifiers: [We],
|
|
1232
1232
|
children: [
|
|
1233
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ a(zt, { style: { height: `${X.getTotalSize()}px` }, children: /* @__PURE__ */ a(
|
|
1234
1234
|
St,
|
|
1235
1235
|
{
|
|
1236
|
-
items: _.map((
|
|
1237
|
-
strategy:
|
|
1238
|
-
children: q.map((
|
|
1239
|
-
if (
|
|
1240
|
-
return /* @__PURE__ */
|
|
1241
|
-
|
|
1236
|
+
items: _.map((o) => o.id),
|
|
1237
|
+
strategy: Ye,
|
|
1238
|
+
children: q.map((o) => {
|
|
1239
|
+
if (o.index > _.length - 1)
|
|
1240
|
+
return /* @__PURE__ */ a(
|
|
1241
|
+
on,
|
|
1242
1242
|
{
|
|
1243
|
-
style: { transform: `translateY(${
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1243
|
+
style: { transform: `translateY(${o.start}px)` },
|
|
1244
|
+
children: /* @__PURE__ */ a("td", { children: "Loading more data..." })
|
|
1245
1245
|
},
|
|
1246
1246
|
"loader"
|
|
1247
1247
|
);
|
|
1248
|
-
const D = _[
|
|
1249
|
-
return /* @__PURE__ */
|
|
1250
|
-
|
|
1248
|
+
const D = _[o.index];
|
|
1249
|
+
return /* @__PURE__ */ a(
|
|
1250
|
+
In,
|
|
1251
1251
|
{
|
|
1252
1252
|
row: D,
|
|
1253
|
-
virtualRow:
|
|
1254
|
-
isSelected:
|
|
1255
|
-
rowIndex:
|
|
1253
|
+
virtualRow: o,
|
|
1254
|
+
isSelected: d.includes(D.id),
|
|
1255
|
+
rowIndex: o.index,
|
|
1256
1256
|
onRowClick: de,
|
|
1257
1257
|
onRowDoubleClick: c ? ue : void 0,
|
|
1258
|
-
onRowContextMenu:
|
|
1258
|
+
onRowContextMenu: E.length > 0 ? ge : void 0,
|
|
1259
1259
|
cellWrapper: f,
|
|
1260
|
-
columnAttributeData:
|
|
1261
|
-
dataTypeWidgets:
|
|
1262
|
-
editingState:
|
|
1263
|
-
callbacks:
|
|
1264
|
-
editable:
|
|
1265
|
-
isInactive:
|
|
1260
|
+
columnAttributeData: h,
|
|
1261
|
+
dataTypeWidgets: b,
|
|
1262
|
+
editingState: ut,
|
|
1263
|
+
callbacks: ft,
|
|
1264
|
+
editable: l,
|
|
1265
|
+
isInactive: ot?.(D.original)
|
|
1266
1266
|
},
|
|
1267
1267
|
D.id
|
|
1268
1268
|
);
|
|
1269
1269
|
})
|
|
1270
1270
|
}
|
|
1271
1271
|
) }),
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
|
|
1272
|
+
/* @__PURE__ */ a(
|
|
1273
|
+
Rt,
|
|
1274
1274
|
{
|
|
1275
1275
|
dropAnimation: {
|
|
1276
|
-
sideEffects:
|
|
1276
|
+
sideEffects: Et({
|
|
1277
1277
|
styles: { active: { opacity: "0.4" } }
|
|
1278
1278
|
})
|
|
1279
1279
|
},
|
|
1280
|
-
children: J ? /* @__PURE__ */
|
|
1281
|
-
|
|
1280
|
+
children: J ? /* @__PURE__ */ a("table", { style: { width: "100%" }, children: /* @__PURE__ */ a(zt, { children: /* @__PURE__ */ a(
|
|
1281
|
+
rn,
|
|
1282
1282
|
{
|
|
1283
|
-
className: A({ inactive:
|
|
1284
|
-
children: /* @__PURE__ */
|
|
1283
|
+
className: A({ inactive: ot?.(J.original) }),
|
|
1284
|
+
children: /* @__PURE__ */ a(
|
|
1285
1285
|
Wt,
|
|
1286
1286
|
{
|
|
1287
1287
|
row: J,
|
|
1288
1288
|
cellWrapper: f,
|
|
1289
|
-
columnAttributeData:
|
|
1290
|
-
dataTypeWidgets:
|
|
1291
|
-
editingState:
|
|
1292
|
-
callbacks:
|
|
1293
|
-
editable:
|
|
1289
|
+
columnAttributeData: h,
|
|
1290
|
+
dataTypeWidgets: b,
|
|
1291
|
+
editingState: ut,
|
|
1292
|
+
callbacks: ft,
|
|
1293
|
+
editable: l
|
|
1294
1294
|
}
|
|
1295
1295
|
)
|
|
1296
1296
|
}
|
|
@@ -1304,54 +1304,54 @@ function To({
|
|
|
1304
1304
|
}
|
|
1305
1305
|
);
|
|
1306
1306
|
}
|
|
1307
|
-
const Pt = (t) => !!t && typeof t == "object" && ("label" in t || "value" in t),
|
|
1308
|
-
const
|
|
1309
|
-
return typeof
|
|
1307
|
+
const Pt = (t) => !!t && typeof t == "object" && ("label" in t || "value" in t), et = (t) => !!t && typeof t == "object" && "__listTableGroup" in t, Mn = (t) => Pt(t) ? t.value : t, Lt = (t) => Pt(t) ? typeof t.sortIndex == "number" ? t.sortIndex : t.sortValue !== void 0 ? t.sortValue : t.label !== void 0 ? t.label : t.value : t, An = (t, e) => {
|
|
1308
|
+
const n = Lt(t), r = Lt(e);
|
|
1309
|
+
return typeof n == "number" && typeof r == "number" ? n - r : String(n ?? "").localeCompare(String(r ?? ""), void 0, {
|
|
1310
1310
|
sensitivity: "base"
|
|
1311
1311
|
});
|
|
1312
1312
|
}, Ft = (t, e) => {
|
|
1313
|
-
const
|
|
1314
|
-
return
|
|
1315
|
-
const
|
|
1316
|
-
return e ? -
|
|
1317
|
-
}),
|
|
1313
|
+
const n = t.filter(et), r = t.filter((i) => !et(i));
|
|
1314
|
+
return n.sort((i, u) => {
|
|
1315
|
+
const s = An(i.__groupValue, u.__groupValue);
|
|
1316
|
+
return e ? -s : s;
|
|
1317
|
+
}), n.forEach((i) => {
|
|
1318
1318
|
i.subRows = Ft(i.subRows, e);
|
|
1319
|
-
}), [...
|
|
1320
|
-
},
|
|
1321
|
-
const
|
|
1322
|
-
if (!
|
|
1323
|
-
|
|
1319
|
+
}), [...n, ...r];
|
|
1320
|
+
}, _o = (t, e, n, r, i, u) => {
|
|
1321
|
+
const s = [], m = (l, R, E, c) => {
|
|
1322
|
+
if (!E.length) {
|
|
1323
|
+
l.push(R);
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
const [
|
|
1326
|
+
const [d, ...C] = E, g = r(d, R) ?? [u(R, d)];
|
|
1327
1327
|
if (!g.length) {
|
|
1328
|
-
m(
|
|
1328
|
+
m(l, R, C, c);
|
|
1329
1329
|
return;
|
|
1330
1330
|
}
|
|
1331
|
-
const f = (
|
|
1332
|
-
const
|
|
1333
|
-
let S =
|
|
1334
|
-
(
|
|
1331
|
+
const f = (h, b, x) => {
|
|
1332
|
+
const T = g[b], I = Mn(T), y = `${x}|${d}:${b}:${JSON.stringify(I)}`;
|
|
1333
|
+
let S = h.find(
|
|
1334
|
+
(w) => et(w) && w.__groupKey === y
|
|
1335
1335
|
);
|
|
1336
|
-
if (S || (S = i(
|
|
1337
|
-
f(S.subRows,
|
|
1336
|
+
if (S || (S = i(d, y, T), h.push(S)), b < g.length - 1) {
|
|
1337
|
+
f(S.subRows, b + 1, y);
|
|
1338
1338
|
return;
|
|
1339
1339
|
}
|
|
1340
|
-
m(S.subRows,
|
|
1340
|
+
m(S.subRows, R, C, y);
|
|
1341
1341
|
};
|
|
1342
|
-
f(
|
|
1342
|
+
f(l, 0, c);
|
|
1343
1343
|
};
|
|
1344
|
-
return t.forEach((
|
|
1344
|
+
return t.forEach((l) => m(s, l, e, "root")), Ft(s, n);
|
|
1345
1345
|
};
|
|
1346
1346
|
export {
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1347
|
+
Vo as ListTable,
|
|
1348
|
+
_o as buildGroupedData,
|
|
1349
|
+
An as compareGroupingPathItems,
|
|
1350
|
+
yn as defaultListTableDataTypeWidgets,
|
|
1351
|
+
To as getDefaultListTableDataTypeWidgets,
|
|
1352
|
+
Mn as getGroupItemValue,
|
|
1353
1353
|
Kt as getListTableCellId,
|
|
1354
1354
|
Pt as isListTableGroupDisplayObject,
|
|
1355
|
-
|
|
1356
|
-
|
|
1355
|
+
et as isListTableGroupRow,
|
|
1356
|
+
vn as renderListTableFallbackValue
|
|
1357
1357
|
};
|