@ynput/ayon-frontend-shared 0.7.5 → 0.7.6
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 +376 -380
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +26 -26
- package/dist/ProjectTreeTable.es.js +2521 -2510
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +32 -32
- package/dist/Views.es.js +1 -1
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityPickerDialog.es.js +481 -460
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +11 -10
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +250 -247
- package/dist/chunks/MetaWidget.es.js +2 -2
- package/dist/chunks/PlayableIcon.es.js +368 -368
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
- package/dist/chunks/SimpleTable.es.js +301 -296
- package/dist/chunks/Slicer.es.js +418 -410
- package/dist/chunks/TableExportContextInstance.es.js +428 -382
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/components.es.js +1404 -1274
- package/dist/context.es.js +559 -657
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/EntityPickerDialog.d.ts +45 -2
- package/dist/types/ProjectTreeTable.d.ts +119 -17
- package/dist/types/components.d.ts +210 -23
- package/dist/types/context.d.ts +8 -0
- package/package.json +3 -3
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useCallback as w, createContext as He, useContext as Oe, forwardRef as _e, useState as Ce, useEffect as ce, useMemo as le, useRef as
|
|
3
|
-
import { theme as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as g, jsxs as O, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as w, createContext as He, useContext as Oe, forwardRef as _e, useState as Ce, useEffect as ce, useMemo as le, useRef as C } from "react";
|
|
3
|
+
import { theme as Je, Button as Ee, Icon as ve, InputText as Qe, Spacer as Ue, Dialog as We } from "@ynput/ayon-react-components";
|
|
4
|
+
import _ from "styled-components";
|
|
5
5
|
import { functionalUpdate as Se, useReactTable as Xe, getExpandedRowModel as Ye, getFilteredRowModel as Ge, getCoreRowModel as Ze, flexRender as et, sortingFns as tt } from "@tanstack/react-table";
|
|
6
6
|
import { useVirtualizer as nt } from "@tanstack/react-virtual";
|
|
7
|
-
import
|
|
7
|
+
import z from "clsx";
|
|
8
8
|
import { compareItems as ot } from "@tanstack/match-sorter-utils";
|
|
9
9
|
import "lodash";
|
|
10
10
|
import "primereact/confirmdialog";
|
|
@@ -18,7 +18,7 @@ import "primereact-context/contextmenu";
|
|
|
18
18
|
import { u as st } from "./useCreateContextMenu.es.js";
|
|
19
19
|
import { ContributionView as lt, useContributions as ct, runContribution as dt } from "@ynput/ayon-addon";
|
|
20
20
|
import { reportContributionError as ut, parseShortcut as pt, matchesShortcut as gt } from "@ynput/ayon-addon/host";
|
|
21
|
-
const mt =
|
|
21
|
+
const mt = _.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
|
|
24
24
|
height: 100%;
|
|
@@ -44,7 +44,7 @@ const mt = H.div`
|
|
|
44
44
|
font-size: 32px;
|
|
45
45
|
}
|
|
46
46
|
h3 {
|
|
47
|
-
${
|
|
47
|
+
${Je.titleMedium}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -74,7 +74,7 @@ const mt = H.div`
|
|
|
74
74
|
padding: 1px 0px;
|
|
75
75
|
width: 100%;
|
|
76
76
|
}
|
|
77
|
-
`, ft =
|
|
77
|
+
`, ft = _.div`
|
|
78
78
|
width: 100%;
|
|
79
79
|
min-height: 32px;
|
|
80
80
|
user-select: none;
|
|
@@ -280,7 +280,7 @@ const mt = H.div`
|
|
|
280
280
|
border-radius: 2px;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
`, ht =
|
|
283
|
+
`, ht = _(Ee)`
|
|
284
284
|
&.expander {
|
|
285
285
|
background-color: unset;
|
|
286
286
|
padding: 2px;
|
|
@@ -289,7 +289,7 @@ const mt = H.div`
|
|
|
289
289
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
`,
|
|
292
|
+
`, Yt = _.div`
|
|
293
293
|
border-radius: var(--border-radius-m);
|
|
294
294
|
overflow: hidden;
|
|
295
295
|
background-color: var(--md-sys-color-surface-container-low);
|
|
@@ -299,7 +299,7 @@ const mt = H.div`
|
|
|
299
299
|
display: flex;
|
|
300
300
|
flex-direction: column;
|
|
301
301
|
position: relative;
|
|
302
|
-
`,
|
|
302
|
+
`, Gt = _.div`
|
|
303
303
|
padding: 2px;
|
|
304
304
|
width: 100%;
|
|
305
305
|
justify-content: space-between;
|
|
@@ -310,7 +310,7 @@ const mt = H.div`
|
|
|
310
310
|
gap: var(--base-gap-small);
|
|
311
311
|
|
|
312
312
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
313
|
-
`,
|
|
313
|
+
`, Zt = _(Ee)`
|
|
314
314
|
background-color: unset !important;
|
|
315
315
|
z-index: 110;
|
|
316
316
|
position: relative;
|
|
@@ -334,19 +334,19 @@ const mt = H.div`
|
|
|
334
334
|
function yt({
|
|
335
335
|
handleRowSelect: t,
|
|
336
336
|
handleArrowNavigation: o,
|
|
337
|
-
handleRename:
|
|
337
|
+
handleRename: a
|
|
338
338
|
}) {
|
|
339
339
|
return { handleRowKeyDown: w(
|
|
340
|
-
(n,
|
|
340
|
+
(n, u) => {
|
|
341
341
|
if (["Enter", " "].includes(n.key))
|
|
342
|
-
n.preventDefault(), n.stopPropagation(), t(n,
|
|
342
|
+
n.preventDefault(), n.stopPropagation(), t(n, u);
|
|
343
343
|
else if (n.key === "ArrowDown" || n.key === "ArrowUp") {
|
|
344
344
|
n.preventDefault(), n.stopPropagation();
|
|
345
345
|
const x = n.key === "ArrowDown" ? "down" : "up";
|
|
346
|
-
o?.(x,
|
|
347
|
-
} else n.key.toLowerCase() === "r" && !n.ctrlKey && !n.metaKey && (n.preventDefault(), n.stopPropagation(),
|
|
346
|
+
o?.(x, u, n);
|
|
347
|
+
} else n.key.toLowerCase() === "r" && !n.ctrlKey && !n.metaKey && (n.preventDefault(), n.stopPropagation(), a?.(n, u));
|
|
348
348
|
},
|
|
349
|
-
[t, o,
|
|
349
|
+
[t, o, a]
|
|
350
350
|
) };
|
|
351
351
|
}
|
|
352
352
|
const ke = He(void 0), xt = () => {
|
|
@@ -354,67 +354,67 @@ const ke = He(void 0), xt = () => {
|
|
|
354
354
|
if (t === void 0)
|
|
355
355
|
throw new Error("useSimpleTableContext must be used within a SimpleTableProvider");
|
|
356
356
|
return t;
|
|
357
|
-
},
|
|
357
|
+
}, en = ({ children: t, ...o }) => /* @__PURE__ */ g(ke.Provider, { value: { ...o }, children: t }), bt = ({
|
|
358
358
|
isRowExpandable: t,
|
|
359
359
|
isRowExpanded: o,
|
|
360
|
-
enableNonFolderIndent:
|
|
360
|
+
enableNonFolderIndent: a = !0,
|
|
361
361
|
isTableExpandable: d,
|
|
362
362
|
onExpandClick: n
|
|
363
|
-
}) => t ? /* @__PURE__ */
|
|
363
|
+
}) => t ? /* @__PURE__ */ g(
|
|
364
364
|
ht,
|
|
365
365
|
{
|
|
366
|
-
onClick: (
|
|
367
|
-
|
|
366
|
+
onClick: (u) => {
|
|
367
|
+
u.stopPropagation(), n?.(u);
|
|
368
368
|
},
|
|
369
369
|
icon: o ? "expand_more" : "chevron_right",
|
|
370
370
|
className: "expander",
|
|
371
371
|
style: { cursor: "pointer" }
|
|
372
372
|
}
|
|
373
|
-
) : d &&
|
|
373
|
+
) : d && a && /* @__PURE__ */ g("div", { style: { display: "inline-block", minWidth: 24 } }), wt = _e(
|
|
374
374
|
({
|
|
375
375
|
value: t,
|
|
376
376
|
icon: o,
|
|
377
|
-
parents:
|
|
377
|
+
parents: a,
|
|
378
378
|
iconColor: d,
|
|
379
379
|
iconFilled: n,
|
|
380
|
-
img:
|
|
380
|
+
img: u,
|
|
381
381
|
imgShape: x = "square",
|
|
382
382
|
imgRatio: c,
|
|
383
383
|
imgPosition: b = "start",
|
|
384
|
-
isRowExpandable:
|
|
385
|
-
isRowExpanded:
|
|
386
|
-
isTableExpandable:
|
|
387
|
-
enableNonFolderIndent:
|
|
388
|
-
onExpandClick:
|
|
389
|
-
startContent:
|
|
390
|
-
endContent:
|
|
391
|
-
badge:
|
|
392
|
-
actions:
|
|
393
|
-
isRenaming:
|
|
394
|
-
renameInitialValue:
|
|
384
|
+
isRowExpandable: S,
|
|
385
|
+
isRowExpanded: E,
|
|
386
|
+
isTableExpandable: M,
|
|
387
|
+
enableNonFolderIndent: D = !0,
|
|
388
|
+
onExpandClick: I,
|
|
389
|
+
startContent: K,
|
|
390
|
+
endContent: J,
|
|
391
|
+
badge: N,
|
|
392
|
+
actions: j,
|
|
393
|
+
isRenaming: T,
|
|
394
|
+
renameInitialValue: $,
|
|
395
395
|
onSubmitRename: Z,
|
|
396
396
|
onCancelRename: Q,
|
|
397
397
|
renamePlaceholder: ee,
|
|
398
398
|
depth: U = 0,
|
|
399
|
-
isDisabled:
|
|
400
|
-
disabledMessage:
|
|
399
|
+
isDisabled: W,
|
|
400
|
+
disabledMessage: L,
|
|
401
401
|
active: de,
|
|
402
|
-
inactive:
|
|
403
|
-
style:
|
|
402
|
+
inactive: P,
|
|
403
|
+
style: X,
|
|
404
404
|
pt: y,
|
|
405
405
|
...te
|
|
406
406
|
}, ne) => {
|
|
407
|
-
const [oe,
|
|
407
|
+
const [oe, Y] = Ce($ ?? t);
|
|
408
408
|
ce(() => {
|
|
409
|
-
|
|
410
|
-
}, [t,
|
|
411
|
-
const
|
|
409
|
+
T && Y($ ?? t);
|
|
410
|
+
}, [t, T, $]);
|
|
411
|
+
const G = u ? /* @__PURE__ */ g(
|
|
412
412
|
"img",
|
|
413
413
|
{
|
|
414
|
-
src:
|
|
414
|
+
src: u,
|
|
415
415
|
...y?.img,
|
|
416
416
|
alt: "",
|
|
417
|
-
className:
|
|
417
|
+
className: z("image", x, `img-${b}`, y?.img?.className),
|
|
418
418
|
style: {
|
|
419
419
|
aspectRatio: (c ?? 1).toString(),
|
|
420
420
|
...y?.img?.style
|
|
@@ -422,10 +422,10 @@ const ke = He(void 0), xt = () => {
|
|
|
422
422
|
}
|
|
423
423
|
) : (
|
|
424
424
|
// keep the slot so rows don't shift when a thumbnail is missing
|
|
425
|
-
c !== void 0 && /* @__PURE__ */
|
|
425
|
+
c !== void 0 && /* @__PURE__ */ g(
|
|
426
426
|
"div",
|
|
427
427
|
{
|
|
428
|
-
className:
|
|
428
|
+
className: z("image", x, `img-${b}`, y?.img?.className),
|
|
429
429
|
style: {
|
|
430
430
|
aspectRatio: c.toString(),
|
|
431
431
|
...y?.img?.style
|
|
@@ -433,40 +433,40 @@ const ke = He(void 0), xt = () => {
|
|
|
433
433
|
}
|
|
434
434
|
)
|
|
435
435
|
);
|
|
436
|
-
return /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ O(
|
|
437
437
|
ft,
|
|
438
438
|
{
|
|
439
439
|
...te,
|
|
440
440
|
ref: ne,
|
|
441
|
-
className:
|
|
442
|
-
disabled:
|
|
443
|
-
inactive:
|
|
444
|
-
"has-actions": !!
|
|
441
|
+
className: z(te.className, {
|
|
442
|
+
disabled: W,
|
|
443
|
+
inactive: P || de === !1,
|
|
444
|
+
"has-actions": !!j?.length
|
|
445
445
|
}),
|
|
446
446
|
style: {
|
|
447
|
-
...
|
|
447
|
+
...X,
|
|
448
448
|
paddingLeft: `calc(${U * 1.5}rem + 4px)`
|
|
449
449
|
},
|
|
450
|
-
title:
|
|
450
|
+
title: W ? L : void 0,
|
|
451
451
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ g(
|
|
453
453
|
bt,
|
|
454
454
|
{
|
|
455
|
-
isRowExpandable:
|
|
456
|
-
isRowExpanded:
|
|
457
|
-
isTableExpandable:
|
|
458
|
-
onExpandClick:
|
|
459
|
-
enableNonFolderIndent:
|
|
455
|
+
isRowExpandable: S,
|
|
456
|
+
isRowExpanded: E,
|
|
457
|
+
isTableExpandable: M,
|
|
458
|
+
onExpandClick: I,
|
|
459
|
+
enableNonFolderIndent: D,
|
|
460
460
|
...y?.expander
|
|
461
461
|
}
|
|
462
462
|
),
|
|
463
|
-
b === "start" &&
|
|
464
|
-
|
|
465
|
-
o && /* @__PURE__ */
|
|
463
|
+
b === "start" && G,
|
|
464
|
+
K,
|
|
465
|
+
o && /* @__PURE__ */ g(
|
|
466
466
|
ve,
|
|
467
467
|
{
|
|
468
468
|
icon: o,
|
|
469
|
-
className:
|
|
469
|
+
className: z({ filled: n }, y?.icon?.className),
|
|
470
470
|
style: {
|
|
471
471
|
color: d,
|
|
472
472
|
...y?.icon?.style
|
|
@@ -474,12 +474,12 @@ const ke = He(void 0), xt = () => {
|
|
|
474
474
|
...y?.icon
|
|
475
475
|
}
|
|
476
476
|
),
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
T ? /* @__PURE__ */ g(
|
|
478
|
+
Qe,
|
|
479
479
|
{
|
|
480
480
|
autoFocus: !0,
|
|
481
481
|
style: { flex: 1 },
|
|
482
|
-
onChange: (v) =>
|
|
482
|
+
onChange: (v) => Y(v.target.value),
|
|
483
483
|
value: oe,
|
|
484
484
|
placeholder: ee,
|
|
485
485
|
onKeyDown: (v) => {
|
|
@@ -493,30 +493,30 @@ const ke = He(void 0), xt = () => {
|
|
|
493
493
|
},
|
|
494
494
|
...y?.input
|
|
495
495
|
}
|
|
496
|
-
) : /* @__PURE__ */
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
) : /* @__PURE__ */ O("div", { className: "text", ...y?.text, children: [
|
|
497
|
+
a && U === 0 && /* @__PURE__ */ O("span", { className: "path", children: [
|
|
498
|
+
a.join(" / "),
|
|
499
499
|
" / "
|
|
500
500
|
] }),
|
|
501
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ g("span", { className: "value", children: t })
|
|
502
502
|
] }),
|
|
503
|
-
!
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const { show:
|
|
508
|
-
return
|
|
503
|
+
!T && /* @__PURE__ */ O(Re, { children: [
|
|
504
|
+
/* @__PURE__ */ g(Ue, { className: "spacer" }),
|
|
505
|
+
N?.toString() && /* @__PURE__ */ g("div", { className: "badges", children: typeof N == "string" ? /* @__PURE__ */ g("span", { children: N }) : N }),
|
|
506
|
+
j && /* @__PURE__ */ g("div", { className: "actions", children: j.map((v, F) => {
|
|
507
|
+
const { show: k = "hover", ...A } = v;
|
|
508
|
+
return k === "hidden" ? null : /* @__PURE__ */ g(
|
|
509
509
|
ve,
|
|
510
510
|
{
|
|
511
|
-
...
|
|
512
|
-
className:
|
|
511
|
+
...A,
|
|
512
|
+
className: z(A.className, { "show-always": k === "always" })
|
|
513
513
|
},
|
|
514
|
-
|
|
514
|
+
A.icon + F.toString()
|
|
515
515
|
);
|
|
516
516
|
}) })
|
|
517
517
|
] }),
|
|
518
|
-
b === "end" &&
|
|
519
|
-
|
|
518
|
+
b === "end" && G,
|
|
519
|
+
J && J
|
|
520
520
|
]
|
|
521
521
|
}
|
|
522
522
|
);
|
|
@@ -524,192 +524,195 @@ const ke = He(void 0), xt = () => {
|
|
|
524
524
|
), vt = ({
|
|
525
525
|
contribution: t,
|
|
526
526
|
error: o,
|
|
527
|
-
onReported:
|
|
527
|
+
onReported: a
|
|
528
528
|
}) => (ce(() => {
|
|
529
|
-
ut(t, o),
|
|
530
|
-
}, [t, o,
|
|
531
|
-
const
|
|
532
|
-
return /* @__PURE__ */
|
|
529
|
+
ut(t, o), a();
|
|
530
|
+
}, [t, o, a]), null), St = ({ contribution: t, context: o }) => {
|
|
531
|
+
const a = t;
|
|
532
|
+
return /* @__PURE__ */ g(
|
|
533
533
|
We,
|
|
534
534
|
{
|
|
535
535
|
isOpen: !0,
|
|
536
|
-
header: String(
|
|
537
|
-
size:
|
|
536
|
+
header: String(a.dialogTitle || a.label || a.id),
|
|
537
|
+
size: a.dialogSize || "md",
|
|
538
538
|
onClose: o.close,
|
|
539
|
-
children: /* @__PURE__ */
|
|
539
|
+
children: /* @__PURE__ */ g(
|
|
540
540
|
lt,
|
|
541
541
|
{
|
|
542
542
|
contribution: t,
|
|
543
543
|
piece: "dialog",
|
|
544
544
|
context: o,
|
|
545
|
-
error: (d) => /* @__PURE__ */
|
|
545
|
+
error: (d) => /* @__PURE__ */ g(vt, { contribution: a, error: d, onReported: o.close })
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
}
|
|
549
549
|
);
|
|
550
|
-
}, Rt = (t) =>
|
|
551
|
-
|
|
550
|
+
}, Rt = ["overview", "products", "lists"], Ct = (t, o, a) => Rt.includes(t) && o ? a.flatMap(
|
|
551
|
+
({ id: d, entityType: n, name: u, label: x }) => n ? [{ id: d, entityType: n, projectName: o, name: u, label: x }] : []
|
|
552
|
+
) : [], Et = (t) => {
|
|
553
|
+
const { contributions: o } = ct("table.shortcut"), [a, d] = Ce(null), n = le(
|
|
552
554
|
() => t ? o.flatMap((c) => {
|
|
553
|
-
const b = pt(c.keys),
|
|
554
|
-
return b &&
|
|
555
|
+
const b = pt(c.keys), S = !c.tables?.length || c.tables.includes(t);
|
|
556
|
+
return b && S ? [{ contribution: c, shortcut: b }] : [];
|
|
555
557
|
}) : [],
|
|
556
558
|
[o, t]
|
|
557
|
-
),
|
|
559
|
+
), u = w(
|
|
558
560
|
(c, b) => {
|
|
559
|
-
|
|
561
|
+
const { table: S, projectName: E, rows: M } = b, D = { ...b, entities: Ct(S, E, M) };
|
|
562
|
+
c.dialog ? d({ contribution: c, context: { ...D, close: () => d(null) } }) : dt(c, D);
|
|
560
563
|
},
|
|
561
564
|
[]
|
|
562
565
|
), x = w(
|
|
563
566
|
(c, b) => {
|
|
564
567
|
if (!t || c.repeat) return !1;
|
|
565
|
-
const
|
|
566
|
-
if (!
|
|
567
|
-
const
|
|
568
|
-
return
|
|
568
|
+
const S = n.find(({ shortcut: M }) => gt(c, M));
|
|
569
|
+
if (!S) return !1;
|
|
570
|
+
const E = b();
|
|
571
|
+
return E?.rows.length ? (c.preventDefault(), c.stopPropagation(), u(S.contribution, { ...E, table: t }), !0) : !1;
|
|
569
572
|
},
|
|
570
|
-
[n, t,
|
|
573
|
+
[n, t, u]
|
|
571
574
|
);
|
|
572
|
-
return { hasShortcuts: n.length > 0, handleShortcut: x, runShortcut:
|
|
573
|
-
},
|
|
574
|
-
t.toggleExpanded(o), t.subRows.forEach((
|
|
575
|
-
}, Me = (t, o,
|
|
575
|
+
return { hasShortcuts: n.length > 0, handleShortcut: x, runShortcut: u, dialog: a };
|
|
576
|
+
}, kt = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [], Ke = (t, o) => {
|
|
577
|
+
t.toggleExpanded(o), t.subRows.forEach((a) => Ke(a, o));
|
|
578
|
+
}, Me = (t, o, a, d) => {
|
|
576
579
|
const n = t.getValue(o);
|
|
577
|
-
let
|
|
578
|
-
o === "label" && (
|
|
580
|
+
let u = typeof n == "string" ? n : Array.isArray(n) ? n.join(" ") : JSON.stringify(n);
|
|
581
|
+
o === "label" && (u = [t.original.label, t.original.name, ...t.original.parents || []].join(
|
|
579
582
|
" "
|
|
580
583
|
));
|
|
581
|
-
const x = rt(
|
|
584
|
+
const x = rt(u, a);
|
|
582
585
|
return d({ itemRank: x }), x.passed;
|
|
583
586
|
};
|
|
584
587
|
Me.resolveFilterValue = at;
|
|
585
|
-
const
|
|
588
|
+
const Kt = (t, o, a) => {
|
|
586
589
|
let d = 0;
|
|
587
|
-
return t.columnFiltersMeta[
|
|
588
|
-
t.columnFiltersMeta[
|
|
589
|
-
o.columnFiltersMeta[
|
|
590
|
-
)), d === 0 ? tt.alphanumeric(t, o,
|
|
590
|
+
return t.columnFiltersMeta[a] && (d = ot(
|
|
591
|
+
t.columnFiltersMeta[a]?.itemRank,
|
|
592
|
+
o.columnFiltersMeta[a]?.itemRank
|
|
593
|
+
)), d === 0 ? tt.alphanumeric(t, o, a) : d;
|
|
591
594
|
};
|
|
592
|
-
function
|
|
595
|
+
function Mt(t, o, a) {
|
|
593
596
|
let d = -1, n = -1;
|
|
594
|
-
for (let c = 0; c < t.length && (t[c].id === o && (d = c), t[c].id ===
|
|
597
|
+
for (let c = 0; c < t.length && (t[c].id === o && (d = c), t[c].id === a && (n = c), !(d !== -1 && n !== -1)); c++)
|
|
595
598
|
;
|
|
596
599
|
if (d === -1 || n === -1) return [];
|
|
597
|
-
const
|
|
598
|
-
return t.slice(
|
|
600
|
+
const u = Math.min(d, n), x = Math.max(d, n);
|
|
601
|
+
return t.slice(u, x + 1);
|
|
599
602
|
}
|
|
600
|
-
const
|
|
603
|
+
const tn = ({
|
|
601
604
|
data: t = [],
|
|
602
605
|
isLoading: o,
|
|
603
|
-
error:
|
|
606
|
+
error: a,
|
|
604
607
|
isExpandable: d,
|
|
605
608
|
isMultiSelect: n = !0,
|
|
606
|
-
enableClickToDeselect:
|
|
609
|
+
enableClickToDeselect: u = !0,
|
|
607
610
|
enableNonFolderIndent: x = !0,
|
|
608
611
|
forceUpdateTable: c,
|
|
609
612
|
globalFilter: b,
|
|
610
|
-
meta:
|
|
611
|
-
rowHeight:
|
|
612
|
-
imgRatio:
|
|
613
|
-
imgPosition:
|
|
614
|
-
onScrollBottom:
|
|
615
|
-
scrollToRowId:
|
|
616
|
-
onRename:
|
|
617
|
-
renamingId:
|
|
618
|
-
renameInitialValue:
|
|
619
|
-
onSubmitRename:
|
|
620
|
-
onCancelRename:
|
|
613
|
+
meta: S,
|
|
614
|
+
rowHeight: E,
|
|
615
|
+
imgRatio: M,
|
|
616
|
+
imgPosition: D,
|
|
617
|
+
onScrollBottom: I,
|
|
618
|
+
scrollToRowId: K,
|
|
619
|
+
onRename: J,
|
|
620
|
+
renamingId: N,
|
|
621
|
+
renameInitialValue: j,
|
|
622
|
+
onSubmitRename: T,
|
|
623
|
+
onCancelRename: $,
|
|
621
624
|
onRowDoubleClick: Z,
|
|
622
625
|
onRowOptionClick: Q,
|
|
623
626
|
rowContextMenuBuilders: ee = [],
|
|
624
627
|
addonShortcuts: U,
|
|
625
|
-
children:
|
|
626
|
-
pt:
|
|
628
|
+
children: W,
|
|
629
|
+
pt: L,
|
|
627
630
|
fitContent: de,
|
|
628
|
-
rowIdPrefix:
|
|
629
|
-
...
|
|
631
|
+
rowIdPrefix: P,
|
|
632
|
+
...X
|
|
630
633
|
}) => {
|
|
631
634
|
const {
|
|
632
635
|
rowSelection: y,
|
|
633
636
|
expanded: te,
|
|
634
637
|
setExpanded: ne,
|
|
635
638
|
onExpandedChange: oe,
|
|
636
|
-
onRowSelectionChange:
|
|
637
|
-
rowPinning:
|
|
639
|
+
onRowSelectionChange: Y,
|
|
640
|
+
rowPinning: G,
|
|
638
641
|
onRowPinningChange: v
|
|
639
|
-
} = xt(),
|
|
640
|
-
|
|
641
|
-
const re = (e) =>
|
|
642
|
+
} = xt(), F = C(null), k = C(null), A = C(P);
|
|
643
|
+
A.current = P;
|
|
644
|
+
const re = (e) => A.current ? `${A.current}-${e}` : e, [ge] = st(), me = C(Z);
|
|
642
645
|
me.current = Z;
|
|
643
|
-
const ue =
|
|
644
|
-
ue.current =
|
|
645
|
-
const fe =
|
|
646
|
-
fe.current =
|
|
647
|
-
const pe =
|
|
648
|
-
pe.current =
|
|
649
|
-
const he =
|
|
650
|
-
he.current =
|
|
651
|
-
const ye =
|
|
652
|
-
ye.current =
|
|
653
|
-
const Fe = le(() => o ? Array.from({ length: 10 }, (e,
|
|
654
|
-
id: `placeholder-${
|
|
655
|
-
name: `placeholder-${
|
|
656
|
-
label: `placeholder-${
|
|
646
|
+
const ue = C(N);
|
|
647
|
+
ue.current = N;
|
|
648
|
+
const fe = C(j);
|
|
649
|
+
fe.current = j;
|
|
650
|
+
const pe = C(T);
|
|
651
|
+
pe.current = T;
|
|
652
|
+
const he = C($);
|
|
653
|
+
he.current = $;
|
|
654
|
+
const ye = C(J);
|
|
655
|
+
ye.current = J;
|
|
656
|
+
const Fe = le(() => o ? Array.from({ length: 10 }, (e, i) => ({
|
|
657
|
+
id: `placeholder-${i}`,
|
|
658
|
+
name: `placeholder-${i}`,
|
|
659
|
+
label: `placeholder-${i}`,
|
|
657
660
|
icon: null,
|
|
658
661
|
img: null,
|
|
659
662
|
subRows: [],
|
|
660
663
|
data: {
|
|
661
|
-
id: `placeholder-${
|
|
664
|
+
id: `placeholder-${i}`
|
|
662
665
|
}
|
|
663
|
-
})) : t, [o, t, c]),
|
|
664
|
-
(e,
|
|
665
|
-
const m =
|
|
666
|
-
if (!
|
|
667
|
-
if (
|
|
666
|
+
})) : t, [o, t, c]), B = w(
|
|
667
|
+
(e, i, s, p) => {
|
|
668
|
+
const m = i, f = e.getRowModel(), r = f.rows, R = f.rowsById[m], h = e.getState().rowSelection || {};
|
|
669
|
+
if (!R) return { ...h };
|
|
670
|
+
if (R.original.isDisabled)
|
|
668
671
|
return { ...h };
|
|
669
|
-
if (
|
|
670
|
-
return e.setRowSelection({}),
|
|
672
|
+
if (u && !s && !p && Object.keys(h).length === 1 && h[m])
|
|
673
|
+
return e.setRowSelection({}), F.current = null, {};
|
|
671
674
|
let l;
|
|
672
|
-
if (n &&
|
|
673
|
-
const se =
|
|
674
|
-
we.length === 0 ? l = { ...h, [m]: !0 } : (l = { ...h }, we.forEach((
|
|
675
|
-
} else n &&
|
|
676
|
-
return e.setRowSelection(l),
|
|
675
|
+
if (n && s && F.current) {
|
|
676
|
+
const se = F.current, we = Mt(r, m, se);
|
|
677
|
+
we.length === 0 ? l = { ...h, [m]: !0 } : (l = { ...h }, we.forEach((qe) => l[qe.id] = !0));
|
|
678
|
+
} else n && p ? (l = { ...h }, l[m] ? delete l[m] : l[m] = !0) : (l = { ...h }, Object.keys(l).length === 1 && l[m] || (l = { [m]: !0 }));
|
|
679
|
+
return e.setRowSelection(l), F.current = m, l;
|
|
677
680
|
},
|
|
678
|
-
[n,
|
|
681
|
+
[n, u]
|
|
679
682
|
), De = w(
|
|
680
|
-
(e,
|
|
681
|
-
if (!
|
|
683
|
+
(e, i) => {
|
|
684
|
+
if (!k.current) {
|
|
682
685
|
console.warn("tableRef not yet available in handleRowSelectForKeydown");
|
|
683
686
|
return;
|
|
684
687
|
}
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
+
const s = e.shiftKey, p = e.ctrlKey || e.metaKey;
|
|
689
|
+
B(
|
|
690
|
+
k.current,
|
|
688
691
|
// Pass the main table instance
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
+
i.id,
|
|
693
|
+
s,
|
|
694
|
+
p
|
|
692
695
|
);
|
|
693
696
|
},
|
|
694
|
-
[
|
|
697
|
+
[B]
|
|
695
698
|
// Depends only on handleSelectionLogic
|
|
696
699
|
), Ne = w(
|
|
697
|
-
(e,
|
|
698
|
-
if (!
|
|
699
|
-
const
|
|
700
|
+
(e, i, s) => {
|
|
701
|
+
if (!k.current) return;
|
|
702
|
+
const p = k.current.getRowModel().rows, m = p.findIndex((r) => r.id === i.id);
|
|
700
703
|
if (m === -1) return;
|
|
701
704
|
let f = e === "down" ? m + 1 : m - 1;
|
|
702
|
-
if (!(f < 0 || f >=
|
|
703
|
-
for (; f >= 0 && f <
|
|
704
|
-
const r =
|
|
705
|
+
if (!(f < 0 || f >= p.length))
|
|
706
|
+
for (; f >= 0 && f < p.length; ) {
|
|
707
|
+
const r = p[f];
|
|
705
708
|
if (!r.original.isDisabled) {
|
|
706
|
-
|
|
707
|
-
|
|
709
|
+
B(
|
|
710
|
+
k.current,
|
|
708
711
|
r.id,
|
|
709
|
-
|
|
710
|
-
|
|
712
|
+
s.shiftKey,
|
|
713
|
+
s.ctrlKey || s.metaKey
|
|
711
714
|
), requestAnimationFrame(() => {
|
|
712
|
-
const
|
|
715
|
+
const R = ae.current, l = (R ? R.querySelector(`#${CSS.escape(re(r.id))}`) : document.getElementById(re(r.id)))?.querySelector('[tabindex="0"]');
|
|
713
716
|
l && (l.focus(), l.scrollIntoView({ block: "nearest", behavior: "smooth" }));
|
|
714
717
|
});
|
|
715
718
|
return;
|
|
@@ -717,10 +720,10 @@ const Zt = ({
|
|
|
717
720
|
f = e === "down" ? f + 1 : f - 1;
|
|
718
721
|
}
|
|
719
722
|
},
|
|
720
|
-
[
|
|
723
|
+
[B]
|
|
721
724
|
), Te = w(
|
|
722
|
-
(e,
|
|
723
|
-
|
|
725
|
+
(e, i) => {
|
|
726
|
+
i.original.isDisabled || ye.current?.(i.id, i);
|
|
724
727
|
},
|
|
725
728
|
[]
|
|
726
729
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -728,20 +731,20 @@ const Zt = ({
|
|
|
728
731
|
handleRowSelect: De,
|
|
729
732
|
handleArrowNavigation: Ne,
|
|
730
733
|
handleRename: Te
|
|
731
|
-
}),
|
|
734
|
+
}), Ae = le(
|
|
732
735
|
() => [
|
|
733
736
|
{
|
|
734
737
|
accessorKey: "label",
|
|
735
738
|
header: void 0,
|
|
736
739
|
filterFn: "fuzzy",
|
|
737
|
-
sortingFn:
|
|
740
|
+
sortingFn: Kt,
|
|
738
741
|
//sort by fuzzy rank (falls back to alphanumeric)
|
|
739
|
-
cell: ({ row: e, getValue:
|
|
740
|
-
const
|
|
742
|
+
cell: ({ row: e, getValue: i, table: s }) => {
|
|
743
|
+
const p = s.options.meta, m = (r) => {
|
|
741
744
|
if (r.target instanceof HTMLInputElement || r.target instanceof HTMLButtonElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement || r.target instanceof HTMLAnchorElement || r.target.closest("button, a, input, textarea, select"))
|
|
742
745
|
return;
|
|
743
|
-
const h = r.altKey && e.getIsSelected() && !r.shiftKey && !r.ctrlKey && !r.metaKey ?
|
|
744
|
-
|
|
746
|
+
const h = r.altKey && e.getIsSelected() && !r.shiftKey && !r.ctrlKey && !r.metaKey ? s.getState().rowSelection || {} : B(
|
|
747
|
+
s,
|
|
745
748
|
// Pass the cell's table instance
|
|
746
749
|
e.id,
|
|
747
750
|
r.shiftKey,
|
|
@@ -749,9 +752,9 @@ const Zt = ({
|
|
|
749
752
|
);
|
|
750
753
|
r.altKey && Q?.(e.original, Object.keys(h));
|
|
751
754
|
}, f = {
|
|
752
|
-
className:
|
|
755
|
+
className: z({
|
|
753
756
|
selected: e.getIsSelected(),
|
|
754
|
-
loading:
|
|
757
|
+
loading: p?.isLoading,
|
|
755
758
|
disabled: e.original.isDisabled,
|
|
756
759
|
// you can't select disabled rows
|
|
757
760
|
inactive: e.original.inactive
|
|
@@ -762,19 +765,19 @@ const Zt = ({
|
|
|
762
765
|
},
|
|
763
766
|
depth: e.depth,
|
|
764
767
|
tabIndex: 0,
|
|
765
|
-
value:
|
|
768
|
+
value: i(),
|
|
766
769
|
parents: e.original.parents,
|
|
767
770
|
icon: e.original.icon || void 0,
|
|
768
771
|
iconColor: e.original.iconColor,
|
|
769
772
|
iconFilled: e.original.iconFilled,
|
|
770
773
|
img: e.original.img,
|
|
771
774
|
imgShape: e.original.imgShape,
|
|
772
|
-
imgRatio:
|
|
773
|
-
imgPosition:
|
|
775
|
+
imgRatio: M,
|
|
776
|
+
imgPosition: D,
|
|
774
777
|
isRowExpandable: e.getCanExpand(),
|
|
775
778
|
enableNonFolderIndent: x,
|
|
776
779
|
isRowExpanded: e.getIsExpanded(),
|
|
777
|
-
isTableExpandable:
|
|
780
|
+
isTableExpandable: p?.isExpandable,
|
|
778
781
|
onExpandClick: (r) => {
|
|
779
782
|
r?.altKey ? Ke(e, !e.getIsExpanded()) : e.toggleExpanded();
|
|
780
783
|
},
|
|
@@ -787,53 +790,53 @@ const Zt = ({
|
|
|
787
790
|
renameInitialValue: e.id === ue.current ? fe.current : void 0,
|
|
788
791
|
onSubmitRename: pe.current ? (r) => pe.current(e.id, r) : void 0,
|
|
789
792
|
onCancelRename: he.current,
|
|
790
|
-
...
|
|
793
|
+
...L?.cell,
|
|
791
794
|
onClick: m,
|
|
792
795
|
// Added onClick handler
|
|
793
796
|
onDoubleClick: (r) => me.current?.(e.id, e)
|
|
794
797
|
};
|
|
795
|
-
return
|
|
798
|
+
return p?.children ? p.children(f, e, s) : /* @__PURE__ */ g(wt, { ...f, ...L?.cell });
|
|
796
799
|
}
|
|
797
800
|
}
|
|
798
801
|
],
|
|
799
802
|
[
|
|
800
803
|
c,
|
|
801
|
-
|
|
804
|
+
B,
|
|
802
805
|
xe,
|
|
803
|
-
|
|
806
|
+
u,
|
|
804
807
|
x,
|
|
805
|
-
|
|
806
|
-
|
|
808
|
+
M,
|
|
809
|
+
D,
|
|
807
810
|
Q
|
|
808
811
|
]
|
|
809
|
-
),
|
|
812
|
+
), ze = w(
|
|
810
813
|
(e) => {
|
|
811
|
-
|
|
814
|
+
Y(Se(e, y));
|
|
812
815
|
},
|
|
813
|
-
[
|
|
816
|
+
[Y]
|
|
814
817
|
), Ie = w(
|
|
815
818
|
(e) => {
|
|
816
|
-
v?.(Se(e,
|
|
819
|
+
v?.(Se(e, G || {}));
|
|
817
820
|
},
|
|
818
821
|
[v]
|
|
819
822
|
), je = w(
|
|
820
823
|
(e) => {
|
|
821
|
-
ne?.((
|
|
822
|
-
const
|
|
823
|
-
return oe?.(
|
|
824
|
+
ne?.((i) => {
|
|
825
|
+
const s = e instanceof Function ? e(i) : e;
|
|
826
|
+
return oe?.(s), s;
|
|
824
827
|
});
|
|
825
828
|
},
|
|
826
829
|
[ne]
|
|
827
|
-
),
|
|
830
|
+
), V = Xe({
|
|
828
831
|
data: Fe,
|
|
829
|
-
columns:
|
|
832
|
+
columns: Ae,
|
|
830
833
|
state: {
|
|
831
834
|
expanded: te,
|
|
832
835
|
rowSelection: y,
|
|
833
836
|
globalFilter: b,
|
|
834
|
-
rowPinning:
|
|
837
|
+
rowPinning: G
|
|
835
838
|
},
|
|
836
|
-
onRowSelectionChange:
|
|
839
|
+
onRowSelectionChange: ze,
|
|
837
840
|
onRowPinningChange: Ie,
|
|
838
841
|
filterFns: {
|
|
839
842
|
fuzzy: Me
|
|
@@ -857,92 +860,92 @@ const Zt = ({
|
|
|
857
860
|
() => ({
|
|
858
861
|
isExpandable: !!d,
|
|
859
862
|
isLoading: o,
|
|
860
|
-
children:
|
|
861
|
-
...
|
|
863
|
+
children: W,
|
|
864
|
+
...S
|
|
862
865
|
}),
|
|
863
|
-
[d, o,
|
|
866
|
+
[d, o, W, S]
|
|
864
867
|
)
|
|
865
868
|
});
|
|
866
869
|
ce(() => {
|
|
867
|
-
|
|
868
|
-
}, [
|
|
869
|
-
const { rows:
|
|
870
|
-
(e,
|
|
871
|
-
if (!
|
|
872
|
-
const
|
|
873
|
-
if (!
|
|
874
|
-
|
|
875
|
-
const m = Object.keys(y), f = m.includes(e), r = f ? m : [e],
|
|
876
|
-
(h) =>
|
|
877
|
-
h(
|
|
870
|
+
k.current = V;
|
|
871
|
+
}, [V]);
|
|
872
|
+
const { rows: q } = V.getRowModel(), $e = w(
|
|
873
|
+
(e, i, s) => {
|
|
874
|
+
if (!k.current) return;
|
|
875
|
+
const p = q[i];
|
|
876
|
+
if (!p || p.original === void 0) return;
|
|
877
|
+
s.preventDefault(), s.stopPropagation();
|
|
878
|
+
const m = Object.keys(y), f = m.includes(e), r = f ? m : [e], R = ee.flatMap(
|
|
879
|
+
(h) => kt(
|
|
880
|
+
h(s, {
|
|
878
881
|
rowId: e,
|
|
879
|
-
rowIndex:
|
|
880
|
-
row:
|
|
882
|
+
rowIndex: i,
|
|
883
|
+
row: p,
|
|
881
884
|
selectedRows: r,
|
|
882
|
-
selectedTableRows: r.map((l) =>
|
|
885
|
+
selectedTableRows: r.map((l) => V.getRowModel().rowsById[l]).filter((l) => !!l),
|
|
883
886
|
isSelected: f
|
|
884
887
|
})
|
|
885
888
|
)
|
|
886
889
|
);
|
|
887
|
-
|
|
890
|
+
R.length > 0 && ge(s, R);
|
|
888
891
|
},
|
|
889
|
-
[ee,
|
|
890
|
-
), ae =
|
|
891
|
-
count:
|
|
892
|
-
estimateSize: () =>
|
|
892
|
+
[ee, q, y, ge]
|
|
893
|
+
), ae = C(null), H = nt({
|
|
894
|
+
count: q.length,
|
|
895
|
+
estimateSize: () => E || 34,
|
|
893
896
|
//estimate row height for accurate scrollbar dragging
|
|
894
897
|
getScrollElement: () => ae.current,
|
|
895
898
|
//measure dynamic row height, except in firefox because it measures table border height incorrectly
|
|
896
|
-
measureElement:
|
|
899
|
+
measureElement: E ? () => E : typeof window < "u" && navigator.userAgent.indexOf("Firefox") === -1 ? (e) => e?.getBoundingClientRect().height : void 0,
|
|
897
900
|
overscan: 5
|
|
898
|
-
}), be =
|
|
901
|
+
}), be = C(void 0);
|
|
899
902
|
ce(() => {
|
|
900
|
-
if (!
|
|
901
|
-
const e =
|
|
902
|
-
e < 0 || (be.current =
|
|
903
|
+
if (!K || be.current === K) return;
|
|
904
|
+
const e = q.findIndex((i) => i.id === K);
|
|
905
|
+
e < 0 || (be.current = K, F.current = K, H.scrollToIndex(e, { align: "center" }), requestAnimationFrame(
|
|
903
906
|
() => requestAnimationFrame(() => {
|
|
904
907
|
ae.current?.querySelector(
|
|
905
|
-
`#${CSS.escape(re(
|
|
908
|
+
`#${CSS.escape(re(K))}`
|
|
906
909
|
)?.querySelector('[tabindex="0"]')?.focus({ preventScroll: !0 });
|
|
907
910
|
})
|
|
908
911
|
));
|
|
909
|
-
}, [
|
|
912
|
+
}, [K, q, H]);
|
|
910
913
|
const Le = w(
|
|
911
914
|
(e) => {
|
|
912
|
-
e &&
|
|
915
|
+
e && H.measureElement(e);
|
|
913
916
|
},
|
|
914
|
-
[
|
|
917
|
+
[H]
|
|
915
918
|
), Pe = w(
|
|
916
919
|
(e) => {
|
|
917
|
-
if (!
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
+
if (!I) return;
|
|
921
|
+
const i = e.currentTarget, { scrollTop: s, scrollHeight: p, clientHeight: m } = i;
|
|
922
|
+
p - s - m < 100 && !o && I();
|
|
920
923
|
},
|
|
921
|
-
[
|
|
924
|
+
[I, o]
|
|
922
925
|
), {
|
|
923
|
-
hasShortcuts:
|
|
924
|
-
handleShortcut:
|
|
926
|
+
hasShortcuts: Be,
|
|
927
|
+
handleShortcut: Ve,
|
|
925
928
|
dialog: ie
|
|
926
|
-
} =
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
+
} = Et(U?.table);
|
|
930
|
+
return /* @__PURE__ */ O(Re, { children: [
|
|
931
|
+
/* @__PURE__ */ O(
|
|
929
932
|
mt,
|
|
930
933
|
{
|
|
931
934
|
ref: ae,
|
|
932
935
|
onScroll: Pe,
|
|
933
936
|
onClick: (e) => {
|
|
934
|
-
|
|
937
|
+
u && !e.target.closest("tr") && (V.setRowSelection({}), F.current = null);
|
|
935
938
|
},
|
|
936
|
-
...
|
|
939
|
+
...X,
|
|
937
940
|
onKeyDown: (e) => {
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
if (!
|
|
941
|
-
const
|
|
942
|
-
if (!
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
const { rowsById: m } =
|
|
941
|
+
X.onKeyDown?.(e);
|
|
942
|
+
const i = e.target;
|
|
943
|
+
if (!Be || ie || e.defaultPrevented || ["INPUT", "TEXTAREA"].includes(i.tagName) || i.isContentEditable) return;
|
|
944
|
+
const s = i.closest("tr")?.id;
|
|
945
|
+
if (!s) return;
|
|
946
|
+
const p = P ? s.slice(P.length + 1) : s;
|
|
947
|
+
Ve(e, () => {
|
|
948
|
+
const { rowsById: m } = V.getRowModel(), f = (h) => {
|
|
946
949
|
const l = m[h]?.original;
|
|
947
950
|
if (!l) return;
|
|
948
951
|
const { entityType: se } = l.data;
|
|
@@ -953,67 +956,69 @@ const Zt = ({
|
|
|
953
956
|
label: l.label,
|
|
954
957
|
data: l.data
|
|
955
958
|
};
|
|
956
|
-
}, r = Object.keys(y).filter((h) => y[h]),
|
|
959
|
+
}, r = Object.keys(y).filter((h) => y[h]), R = r.includes(p) ? r : [p];
|
|
957
960
|
return {
|
|
958
961
|
projectName: U?.projectName ?? null,
|
|
959
|
-
rows:
|
|
960
|
-
focused: { rowId:
|
|
962
|
+
rows: R.flatMap((h) => f(h) || []),
|
|
963
|
+
focused: { rowId: p },
|
|
961
964
|
cells: []
|
|
962
965
|
};
|
|
963
966
|
});
|
|
964
967
|
},
|
|
965
|
-
className:
|
|
968
|
+
className: z(X.className, { isLoading: o, fitContent: de }),
|
|
966
969
|
children: [
|
|
967
|
-
!
|
|
970
|
+
!a && /* @__PURE__ */ g("table", { children: /* @__PURE__ */ g(
|
|
968
971
|
"tbody",
|
|
969
972
|
{
|
|
970
973
|
style: {
|
|
971
|
-
height: `${
|
|
974
|
+
height: `${H?.getTotalSize()}px`
|
|
972
975
|
//tells scrollbar how big the table is
|
|
973
976
|
},
|
|
974
|
-
children:
|
|
975
|
-
const
|
|
976
|
-
return /* @__PURE__ */
|
|
977
|
+
children: H?.getVirtualItems().map((e) => {
|
|
978
|
+
const i = q[e.index];
|
|
979
|
+
return /* @__PURE__ */ g(
|
|
977
980
|
"tr",
|
|
978
981
|
{
|
|
979
982
|
"data-index": e.index,
|
|
980
983
|
ref: Le,
|
|
981
|
-
id: re(
|
|
982
|
-
onContextMenu: (
|
|
983
|
-
...
|
|
984
|
+
id: re(i.id),
|
|
985
|
+
onContextMenu: (s) => $e(i.id, e.index, s),
|
|
986
|
+
...L?.row,
|
|
984
987
|
style: {
|
|
985
988
|
transform: `translateY(${e.start}px)`,
|
|
986
989
|
//this should always be a `style` as it changes on scroll
|
|
987
|
-
...
|
|
990
|
+
...L?.row?.style
|
|
988
991
|
// custom styles to be passed
|
|
989
992
|
},
|
|
990
|
-
children:
|
|
993
|
+
children: i.getVisibleCells().map((s) => /* @__PURE__ */ g("td", { children: et(s.column.columnDef.cell, s.getContext()) }, s.id))
|
|
991
994
|
},
|
|
992
|
-
|
|
995
|
+
i.id
|
|
993
996
|
);
|
|
994
997
|
})
|
|
995
998
|
}
|
|
996
999
|
) }),
|
|
997
|
-
!!
|
|
1000
|
+
!!a && /* @__PURE__ */ g(it, { error: a })
|
|
998
1001
|
]
|
|
999
1002
|
}
|
|
1000
1003
|
),
|
|
1001
|
-
ie && /* @__PURE__ */
|
|
1004
|
+
ie && /* @__PURE__ */ g(St, { contribution: ie.contribution, context: ie.context })
|
|
1002
1005
|
] });
|
|
1003
1006
|
};
|
|
1004
1007
|
export {
|
|
1005
1008
|
St as A,
|
|
1006
1009
|
ft as C,
|
|
1007
1010
|
ht as E,
|
|
1008
|
-
|
|
1011
|
+
Gt as H,
|
|
1009
1012
|
bt as R,
|
|
1010
|
-
|
|
1013
|
+
tn as S,
|
|
1011
1014
|
mt as T,
|
|
1012
|
-
|
|
1013
|
-
|
|
1015
|
+
Yt as a,
|
|
1016
|
+
Zt as b,
|
|
1014
1017
|
wt as c,
|
|
1015
1018
|
ke as d,
|
|
1016
|
-
|
|
1017
|
-
|
|
1019
|
+
en as e,
|
|
1020
|
+
vt as f,
|
|
1021
|
+
Et as g,
|
|
1022
|
+
Ct as s,
|
|
1018
1023
|
xt as u
|
|
1019
1024
|
};
|