@ynput/ayon-frontend-shared 0.7.5 → 0.8.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/DetailsPanel.es.js +471 -469
- package/dist/Feed.es.js +1 -1
- package/dist/ListTable.es.js +20 -20
- package/dist/NewEntity.es.js +7 -7
- package/dist/ProjectTreeTable.es.js +2523 -2502
- package/dist/ProjectsTable.es.js +5 -5
- package/dist/Slicer.es.js +28 -25
- package/dist/Views.es.js +150 -151
- package/dist/api.es.js +166 -165
- package/dist/chunks/Actions.es.js +9 -10
- package/dist/chunks/ColumnDropIndicator.es.js +4 -4
- package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +7 -7
- package/dist/chunks/EntityPath.es.js +38 -39
- package/dist/chunks/EntityPickerDialog.es.js +482 -462
- package/dist/chunks/EntityTooltip.es.js +18 -19
- package/dist/chunks/Feed.es.js +1382 -1355
- package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
- package/dist/chunks/FilterErrorActions.es.js +3 -4
- package/dist/chunks/GroupSettingsFallback.es.js +4 -4
- package/dist/chunks/Menu.es.js +242 -240
- package/dist/chunks/MetaWidget.es.js +1948 -1875
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
- package/dist/chunks/SimpleTable.es.js +303 -297
- package/dist/chunks/Slicer.es.js +420 -413
- package/dist/chunks/TableExportContextInstance.es.js +622 -378
- package/dist/chunks/TableSettingsFallback.es.js +3 -4
- package/dist/chunks/ThumbnailSimple.es.js +114 -99
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/VideoPlayer.es.js +8 -9
- package/dist/chunks/Watchers.es.js +929 -872
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/chunks/expandRelativeDates.es.js +1 -1
- package/dist/chunks/getThumbnailUrl.es.js +33 -21
- package/dist/chunks/getUris.es.js +1580 -1610
- package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
- package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
- package/dist/chunks/searchTerms.es.js +773 -696
- package/dist/chunks/useAttributeEnums.es.js +22 -22
- package/dist/chunks/useDateRangeFilter.es.js +1 -1
- package/dist/chunks/useHierarchySelection.es.js +3 -4
- package/dist/chunks/useLoadModule.es.js +3 -4
- package/dist/components.es.js +1391 -1253
- package/dist/context.es.js +645 -668
- package/dist/hooks.es.js +193 -171
- package/dist/index.es.js +4 -4
- package/dist/types/Actions.d.ts +10 -8
- package/dist/types/DetailsPanel.d.ts +54 -76
- package/dist/types/EntityPickerDialog.d.ts +51 -2
- package/dist/types/Feed.d.ts +24 -24
- package/dist/types/ListTable.d.ts +33 -27
- package/dist/types/NewEntity.d.ts +26 -39
- package/dist/types/ProjectTreeTable.d.ts +318 -212
- package/dist/types/ProjectsTable.d.ts +6 -6
- package/dist/types/RepresentationsList.d.ts +4 -0
- package/dist/types/Slicer.d.ts +63 -246
- package/dist/types/Views.d.ts +71 -298
- package/dist/types/api.d.ts +3164 -2363
- package/dist/types/components.d.ts +537 -497
- package/dist/types/context.d.ts +293 -572
- package/dist/types/hooks.d.ts +76 -47
- package/dist/types/index.d.ts +6 -0
- package/dist/types/util.d.ts +141 -120
- package/dist/util.es.js +71 -68
- package/package.json +6 -6
- package/dist/chunks/EntityUpdatesContext.es.js +0 -61
- package/dist/chunks/PlayableIcon.es.js +0 -5020
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
- package/dist/chunks/viewUpdateHelper.es.js +0 -153
|
@@ -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,54 @@ 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
|
+
// while searching, every folder is open so matches inside collapsed ones show
|
|
835
|
+
expanded: b ? !0 : te,
|
|
832
836
|
rowSelection: y,
|
|
833
837
|
globalFilter: b,
|
|
834
|
-
rowPinning:
|
|
838
|
+
rowPinning: G
|
|
835
839
|
},
|
|
836
|
-
onRowSelectionChange:
|
|
840
|
+
onRowSelectionChange: ze,
|
|
837
841
|
onRowPinningChange: Ie,
|
|
838
842
|
filterFns: {
|
|
839
843
|
fuzzy: Me
|
|
@@ -857,92 +861,92 @@ const Zt = ({
|
|
|
857
861
|
() => ({
|
|
858
862
|
isExpandable: !!d,
|
|
859
863
|
isLoading: o,
|
|
860
|
-
children:
|
|
861
|
-
...
|
|
864
|
+
children: W,
|
|
865
|
+
...S
|
|
862
866
|
}),
|
|
863
|
-
[d, o,
|
|
867
|
+
[d, o, W, S]
|
|
864
868
|
)
|
|
865
869
|
});
|
|
866
870
|
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(
|
|
871
|
+
k.current = V;
|
|
872
|
+
}, [V]);
|
|
873
|
+
const { rows: q } = V.getRowModel(), $e = w(
|
|
874
|
+
(e, i, s) => {
|
|
875
|
+
if (!k.current) return;
|
|
876
|
+
const p = q[i];
|
|
877
|
+
if (!p || p.original === void 0) return;
|
|
878
|
+
s.preventDefault(), s.stopPropagation();
|
|
879
|
+
const m = Object.keys(y), f = m.includes(e), r = f ? m : [e], R = ee.flatMap(
|
|
880
|
+
(h) => kt(
|
|
881
|
+
h(s, {
|
|
878
882
|
rowId: e,
|
|
879
|
-
rowIndex:
|
|
880
|
-
row:
|
|
883
|
+
rowIndex: i,
|
|
884
|
+
row: p,
|
|
881
885
|
selectedRows: r,
|
|
882
|
-
selectedTableRows: r.map((l) =>
|
|
886
|
+
selectedTableRows: r.map((l) => V.getRowModel().rowsById[l]).filter((l) => !!l),
|
|
883
887
|
isSelected: f
|
|
884
888
|
})
|
|
885
889
|
)
|
|
886
890
|
);
|
|
887
|
-
|
|
891
|
+
R.length > 0 && ge(s, R);
|
|
888
892
|
},
|
|
889
|
-
[ee,
|
|
890
|
-
), ae =
|
|
891
|
-
count:
|
|
892
|
-
estimateSize: () =>
|
|
893
|
+
[ee, q, y, ge]
|
|
894
|
+
), ae = C(null), H = nt({
|
|
895
|
+
count: q.length,
|
|
896
|
+
estimateSize: () => E || 34,
|
|
893
897
|
//estimate row height for accurate scrollbar dragging
|
|
894
898
|
getScrollElement: () => ae.current,
|
|
895
899
|
//measure dynamic row height, except in firefox because it measures table border height incorrectly
|
|
896
|
-
measureElement:
|
|
900
|
+
measureElement: E ? () => E : typeof window < "u" && navigator.userAgent.indexOf("Firefox") === -1 ? (e) => e?.getBoundingClientRect().height : void 0,
|
|
897
901
|
overscan: 5
|
|
898
|
-
}), be =
|
|
902
|
+
}), be = C(void 0);
|
|
899
903
|
ce(() => {
|
|
900
|
-
if (!
|
|
901
|
-
const e =
|
|
902
|
-
e < 0 || (be.current =
|
|
904
|
+
if (!K || be.current === K) return;
|
|
905
|
+
const e = q.findIndex((i) => i.id === K);
|
|
906
|
+
e < 0 || (be.current = K, F.current = K, H.scrollToIndex(e, { align: "center" }), requestAnimationFrame(
|
|
903
907
|
() => requestAnimationFrame(() => {
|
|
904
908
|
ae.current?.querySelector(
|
|
905
|
-
`#${CSS.escape(re(
|
|
909
|
+
`#${CSS.escape(re(K))}`
|
|
906
910
|
)?.querySelector('[tabindex="0"]')?.focus({ preventScroll: !0 });
|
|
907
911
|
})
|
|
908
912
|
));
|
|
909
|
-
}, [
|
|
913
|
+
}, [K, q, H]);
|
|
910
914
|
const Le = w(
|
|
911
915
|
(e) => {
|
|
912
|
-
e &&
|
|
916
|
+
e && H.measureElement(e);
|
|
913
917
|
},
|
|
914
|
-
[
|
|
918
|
+
[H]
|
|
915
919
|
), Pe = w(
|
|
916
920
|
(e) => {
|
|
917
|
-
if (!
|
|
918
|
-
const
|
|
919
|
-
|
|
921
|
+
if (!I) return;
|
|
922
|
+
const i = e.currentTarget, { scrollTop: s, scrollHeight: p, clientHeight: m } = i;
|
|
923
|
+
p - s - m < 100 && !o && I();
|
|
920
924
|
},
|
|
921
|
-
[
|
|
925
|
+
[I, o]
|
|
922
926
|
), {
|
|
923
|
-
hasShortcuts:
|
|
924
|
-
handleShortcut:
|
|
927
|
+
hasShortcuts: Be,
|
|
928
|
+
handleShortcut: Ve,
|
|
925
929
|
dialog: ie
|
|
926
|
-
} =
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
930
|
+
} = Et(U?.table);
|
|
931
|
+
return /* @__PURE__ */ O(Re, { children: [
|
|
932
|
+
/* @__PURE__ */ O(
|
|
929
933
|
mt,
|
|
930
934
|
{
|
|
931
935
|
ref: ae,
|
|
932
936
|
onScroll: Pe,
|
|
933
937
|
onClick: (e) => {
|
|
934
|
-
|
|
938
|
+
u && !e.target.closest("tr") && (V.setRowSelection({}), F.current = null);
|
|
935
939
|
},
|
|
936
|
-
...
|
|
940
|
+
...X,
|
|
937
941
|
onKeyDown: (e) => {
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
if (!
|
|
941
|
-
const
|
|
942
|
-
if (!
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
const { rowsById: m } =
|
|
942
|
+
X.onKeyDown?.(e);
|
|
943
|
+
const i = e.target;
|
|
944
|
+
if (!Be || ie || e.defaultPrevented || ["INPUT", "TEXTAREA"].includes(i.tagName) || i.isContentEditable) return;
|
|
945
|
+
const s = i.closest("tr")?.id;
|
|
946
|
+
if (!s) return;
|
|
947
|
+
const p = P ? s.slice(P.length + 1) : s;
|
|
948
|
+
Ve(e, () => {
|
|
949
|
+
const { rowsById: m } = V.getRowModel(), f = (h) => {
|
|
946
950
|
const l = m[h]?.original;
|
|
947
951
|
if (!l) return;
|
|
948
952
|
const { entityType: se } = l.data;
|
|
@@ -953,67 +957,69 @@ const Zt = ({
|
|
|
953
957
|
label: l.label,
|
|
954
958
|
data: l.data
|
|
955
959
|
};
|
|
956
|
-
}, r = Object.keys(y).filter((h) => y[h]),
|
|
960
|
+
}, r = Object.keys(y).filter((h) => y[h]), R = r.includes(p) ? r : [p];
|
|
957
961
|
return {
|
|
958
962
|
projectName: U?.projectName ?? null,
|
|
959
|
-
rows:
|
|
960
|
-
focused: { rowId:
|
|
963
|
+
rows: R.flatMap((h) => f(h) || []),
|
|
964
|
+
focused: { rowId: p },
|
|
961
965
|
cells: []
|
|
962
966
|
};
|
|
963
967
|
});
|
|
964
968
|
},
|
|
965
|
-
className:
|
|
969
|
+
className: z(X.className, { isLoading: o, fitContent: de }),
|
|
966
970
|
children: [
|
|
967
|
-
!
|
|
971
|
+
!a && /* @__PURE__ */ g("table", { children: /* @__PURE__ */ g(
|
|
968
972
|
"tbody",
|
|
969
973
|
{
|
|
970
974
|
style: {
|
|
971
|
-
height: `${
|
|
975
|
+
height: `${H?.getTotalSize()}px`
|
|
972
976
|
//tells scrollbar how big the table is
|
|
973
977
|
},
|
|
974
|
-
children:
|
|
975
|
-
const
|
|
976
|
-
return /* @__PURE__ */
|
|
978
|
+
children: H?.getVirtualItems().map((e) => {
|
|
979
|
+
const i = q[e.index];
|
|
980
|
+
return /* @__PURE__ */ g(
|
|
977
981
|
"tr",
|
|
978
982
|
{
|
|
979
983
|
"data-index": e.index,
|
|
980
984
|
ref: Le,
|
|
981
|
-
id: re(
|
|
982
|
-
onContextMenu: (
|
|
983
|
-
...
|
|
985
|
+
id: re(i.id),
|
|
986
|
+
onContextMenu: (s) => $e(i.id, e.index, s),
|
|
987
|
+
...L?.row,
|
|
984
988
|
style: {
|
|
985
989
|
transform: `translateY(${e.start}px)`,
|
|
986
990
|
//this should always be a `style` as it changes on scroll
|
|
987
|
-
...
|
|
991
|
+
...L?.row?.style
|
|
988
992
|
// custom styles to be passed
|
|
989
993
|
},
|
|
990
|
-
children:
|
|
994
|
+
children: i.getVisibleCells().map((s) => /* @__PURE__ */ g("td", { children: et(s.column.columnDef.cell, s.getContext()) }, s.id))
|
|
991
995
|
},
|
|
992
|
-
|
|
996
|
+
i.id
|
|
993
997
|
);
|
|
994
998
|
})
|
|
995
999
|
}
|
|
996
1000
|
) }),
|
|
997
|
-
!!
|
|
1001
|
+
!!a && /* @__PURE__ */ g(it, { error: a })
|
|
998
1002
|
]
|
|
999
1003
|
}
|
|
1000
1004
|
),
|
|
1001
|
-
ie && /* @__PURE__ */
|
|
1005
|
+
ie && /* @__PURE__ */ g(St, { contribution: ie.contribution, context: ie.context })
|
|
1002
1006
|
] });
|
|
1003
1007
|
};
|
|
1004
1008
|
export {
|
|
1005
1009
|
St as A,
|
|
1006
1010
|
ft as C,
|
|
1007
1011
|
ht as E,
|
|
1008
|
-
|
|
1012
|
+
Gt as H,
|
|
1009
1013
|
bt as R,
|
|
1010
|
-
|
|
1014
|
+
tn as S,
|
|
1011
1015
|
mt as T,
|
|
1012
|
-
|
|
1013
|
-
|
|
1016
|
+
Yt as a,
|
|
1017
|
+
Zt as b,
|
|
1014
1018
|
wt as c,
|
|
1015
1019
|
ke as d,
|
|
1016
|
-
|
|
1017
|
-
|
|
1020
|
+
en as e,
|
|
1021
|
+
vt as f,
|
|
1022
|
+
Et as g,
|
|
1023
|
+
Ct as s,
|
|
1018
1024
|
xt as u
|
|
1019
1025
|
};
|