@ynput/ayon-frontend-shared 0.6.6 → 0.6.7
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 +3 -3
- package/dist/NewEntity.es.js +15 -15
- package/dist/ProjectTreeTable.es.js +500 -495
- package/dist/Slicer.es.js +11 -11
- package/dist/Views.es.js +213 -206
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
- package/dist/chunks/EntityPath.es.js +2 -2
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +1875 -1857
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +1 -1
- package/dist/chunks/MenuItem.es.js +25 -25
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +127 -127
- package/dist/chunks/ReviewablesSelector.es.js +199 -196
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +22 -22
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +2 -2
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +19 -19
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getUris.es.js +790 -827
- package/dist/chunks/searchTerms.es.js +1 -3
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/components.es.js +202 -200
- package/dist/context.es.js +521 -492
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/ProjectTreeTable.d.ts +1 -0
- package/dist/types/Views.d.ts +11 -0
- package/dist/types/api.d.ts +198 -1174
- package/dist/types/components.d.ts +5 -1
- package/dist/types/context.d.ts +1 -0
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +10 -0
- package/dist/util.es.js +44 -41
- package/package.json +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import { useCallback as
|
|
1
|
+
import { jsx as d, jsxs as _, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as v, createContext as Ie, useContext as Le, forwardRef as je, useState as Pe, useEffect as ye, useRef as R, useMemo as se } from "react";
|
|
3
3
|
import { theme as He, Button as xe, Icon as fe, InputText as Ve, Spacer as Be } from "@ynput/ayon-react-components";
|
|
4
4
|
import L from "styled-components";
|
|
5
|
-
import { functionalUpdate as he, useReactTable as qe, getExpandedRowModel as Oe, getFilteredRowModel as
|
|
6
|
-
import { useVirtualizer as
|
|
5
|
+
import { functionalUpdate as he, useReactTable as qe, getExpandedRowModel as Oe, getFilteredRowModel as _e, getCoreRowModel as Qe, flexRender as Je, sortingFns as Ue } from "@tanstack/react-table";
|
|
6
|
+
import { useVirtualizer as We } from "@tanstack/react-virtual";
|
|
7
7
|
import K from "clsx";
|
|
8
|
-
import { compareItems as
|
|
8
|
+
import { compareItems as Ye } from "@tanstack/match-sorter-utils";
|
|
9
9
|
import "lodash";
|
|
10
10
|
import "primereact/confirmdialog";
|
|
11
11
|
import "react-toastify";
|
|
12
12
|
import "uuid";
|
|
13
|
-
import { bs as
|
|
13
|
+
import { bs as Ge, bt as Xe } from "./searchTerms.es.js";
|
|
14
14
|
import { E as Ze } from "./EmptyPlaceholder.es.js";
|
|
15
15
|
import "./ContextMenuContextInstance.es.js";
|
|
16
16
|
import "primereact-context/contextmenu";
|
|
@@ -139,7 +139,7 @@ const tt = L.div`
|
|
|
139
139
|
}
|
|
140
140
|
.pin.active {
|
|
141
141
|
opacity: 0.7;
|
|
142
|
-
font-variation-settings: 'FILL' 1
|
|
142
|
+
font-variation-settings: 'FILL' 1;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -178,7 +178,7 @@ const tt = L.div`
|
|
|
178
178
|
&.active {
|
|
179
179
|
display: flex;
|
|
180
180
|
opacity: 0.7;
|
|
181
|
-
font-variation-settings: 'FILL' 1
|
|
181
|
+
font-variation-settings: 'FILL' 1;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -235,7 +235,7 @@ const tt = L.div`
|
|
|
235
235
|
|
|
236
236
|
/* filled icon */
|
|
237
237
|
.icon.filled {
|
|
238
|
-
font-variation-settings: 'FILL' 1
|
|
238
|
+
font-variation-settings: 'FILL' 1;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.image {
|
|
@@ -292,7 +292,7 @@ const tt = L.div`
|
|
|
292
292
|
gap: var(--base-gap-small);
|
|
293
293
|
|
|
294
294
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
295
|
-
`,
|
|
295
|
+
`, Tt = L(xe)`
|
|
296
296
|
background-color: unset !important;
|
|
297
297
|
z-index: 110;
|
|
298
298
|
position: relative;
|
|
@@ -318,7 +318,7 @@ function rt({
|
|
|
318
318
|
handleArrowNavigation: a,
|
|
319
319
|
handleRename: l
|
|
320
320
|
}) {
|
|
321
|
-
return { handleRowKeyDown:
|
|
321
|
+
return { handleRowKeyDown: v(
|
|
322
322
|
(n, p) => {
|
|
323
323
|
if (["Enter", " "].includes(n.key))
|
|
324
324
|
n.preventDefault(), n.stopPropagation(), t(n, p);
|
|
@@ -336,7 +336,7 @@ const be = Ie(void 0), at = () => {
|
|
|
336
336
|
if (t === void 0)
|
|
337
337
|
throw new Error("useSimpleTableContext must be used within a SimpleTableProvider");
|
|
338
338
|
return t;
|
|
339
|
-
},
|
|
339
|
+
}, Dt = ({ children: t, ...a }) => /* @__PURE__ */ d(be.Provider, { value: { ...a }, children: t }), it = ({
|
|
340
340
|
isRowExpandable: t,
|
|
341
341
|
isRowExpanded: a,
|
|
342
342
|
enableNonFolderIndent: l = !0,
|
|
@@ -363,32 +363,32 @@ const be = Ie(void 0), at = () => {
|
|
|
363
363
|
imgShape: b = "square",
|
|
364
364
|
imgRatio: x,
|
|
365
365
|
imgPosition: M = "start",
|
|
366
|
-
isRowExpandable:
|
|
366
|
+
isRowExpandable: Q,
|
|
367
367
|
isRowExpanded: j,
|
|
368
|
-
isTableExpandable:
|
|
369
|
-
enableNonFolderIndent:
|
|
368
|
+
isTableExpandable: J,
|
|
369
|
+
enableNonFolderIndent: U = !0,
|
|
370
370
|
onExpandClick: P,
|
|
371
|
-
startContent:
|
|
371
|
+
startContent: W,
|
|
372
372
|
endContent: H,
|
|
373
373
|
badge: C,
|
|
374
374
|
actions: F,
|
|
375
375
|
isRenaming: E,
|
|
376
376
|
renameInitialValue: N,
|
|
377
|
-
onSubmitRename:
|
|
377
|
+
onSubmitRename: Y,
|
|
378
378
|
onCancelRename: V,
|
|
379
|
-
renamePlaceholder:
|
|
379
|
+
renamePlaceholder: G,
|
|
380
380
|
depth: k = 0,
|
|
381
381
|
isDisabled: X,
|
|
382
382
|
disabledMessage: Z,
|
|
383
383
|
active: ee,
|
|
384
|
-
inactive:
|
|
384
|
+
inactive: T,
|
|
385
385
|
style: re,
|
|
386
386
|
pt: y,
|
|
387
387
|
...te
|
|
388
|
-
},
|
|
389
|
-
const [B,
|
|
388
|
+
}, D) => {
|
|
389
|
+
const [B, z] = Pe(N ?? t);
|
|
390
390
|
ye(() => {
|
|
391
|
-
E &&
|
|
391
|
+
E && z(N ?? t);
|
|
392
392
|
}, [t, E, N]);
|
|
393
393
|
const S = p ? /* @__PURE__ */ d(
|
|
394
394
|
"img",
|
|
@@ -415,14 +415,14 @@ const be = Ie(void 0), at = () => {
|
|
|
415
415
|
}
|
|
416
416
|
)
|
|
417
417
|
);
|
|
418
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ _(
|
|
419
419
|
nt,
|
|
420
420
|
{
|
|
421
421
|
...te,
|
|
422
|
-
ref:
|
|
422
|
+
ref: D,
|
|
423
423
|
className: K(te.className, {
|
|
424
424
|
disabled: X,
|
|
425
|
-
inactive:
|
|
425
|
+
inactive: T || ee === !1,
|
|
426
426
|
"has-actions": !!F?.length
|
|
427
427
|
}),
|
|
428
428
|
style: {
|
|
@@ -434,16 +434,16 @@ const be = Ie(void 0), at = () => {
|
|
|
434
434
|
/* @__PURE__ */ d(
|
|
435
435
|
it,
|
|
436
436
|
{
|
|
437
|
-
isRowExpandable:
|
|
437
|
+
isRowExpandable: Q,
|
|
438
438
|
isRowExpanded: j,
|
|
439
|
-
isTableExpandable:
|
|
439
|
+
isTableExpandable: J,
|
|
440
440
|
onExpandClick: P,
|
|
441
|
-
enableNonFolderIndent:
|
|
441
|
+
enableNonFolderIndent: U,
|
|
442
442
|
...y?.expander
|
|
443
443
|
}
|
|
444
444
|
),
|
|
445
445
|
M === "start" && S,
|
|
446
|
-
|
|
446
|
+
W,
|
|
447
447
|
a && /* @__PURE__ */ d(
|
|
448
448
|
fe,
|
|
449
449
|
{
|
|
@@ -461,11 +461,11 @@ const be = Ie(void 0), at = () => {
|
|
|
461
461
|
{
|
|
462
462
|
autoFocus: !0,
|
|
463
463
|
style: { flex: 1 },
|
|
464
|
-
onChange: (f) =>
|
|
464
|
+
onChange: (f) => z(f.target.value),
|
|
465
465
|
value: B,
|
|
466
|
-
placeholder:
|
|
466
|
+
placeholder: G,
|
|
467
467
|
onKeyDown: (f) => {
|
|
468
|
-
f.key === "Enter" &&
|
|
468
|
+
f.key === "Enter" && Y?.(B), f.key === "Escape" && V?.();
|
|
469
469
|
},
|
|
470
470
|
onBlur: () => {
|
|
471
471
|
V?.();
|
|
@@ -475,25 +475,25 @@ const be = Ie(void 0), at = () => {
|
|
|
475
475
|
},
|
|
476
476
|
...y?.input
|
|
477
477
|
}
|
|
478
|
-
) : /* @__PURE__ */
|
|
479
|
-
l && k === 0 && /* @__PURE__ */
|
|
478
|
+
) : /* @__PURE__ */ _("div", { className: "text", ...y?.text, children: [
|
|
479
|
+
l && k === 0 && /* @__PURE__ */ _("span", { className: "path", children: [
|
|
480
480
|
l.join(" / "),
|
|
481
481
|
" / "
|
|
482
482
|
] }),
|
|
483
483
|
/* @__PURE__ */ d("span", { className: "value", children: t })
|
|
484
484
|
] }),
|
|
485
|
-
!E && /* @__PURE__ */
|
|
485
|
+
!E && /* @__PURE__ */ _(Ae, { children: [
|
|
486
486
|
/* @__PURE__ */ d(Be, { className: "spacer" }),
|
|
487
487
|
C?.toString() && /* @__PURE__ */ d("div", { className: "badges", children: typeof C == "string" ? /* @__PURE__ */ d("span", { children: C }) : C }),
|
|
488
488
|
F && /* @__PURE__ */ d("div", { className: "actions", children: F.map((f, q) => {
|
|
489
|
-
const { show:
|
|
490
|
-
return
|
|
489
|
+
const { show: $ = "hover", ...A } = f;
|
|
490
|
+
return $ === "hidden" ? null : /* @__PURE__ */ d(
|
|
491
491
|
fe,
|
|
492
492
|
{
|
|
493
|
-
|
|
494
|
-
className: K(
|
|
493
|
+
...A,
|
|
494
|
+
className: K(A.className, { "show-always": $ === "always" })
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
A.icon + q.toString()
|
|
497
497
|
);
|
|
498
498
|
}) })
|
|
499
499
|
] }),
|
|
@@ -503,24 +503,24 @@ const be = Ie(void 0), at = () => {
|
|
|
503
503
|
}
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
|
-
), st = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [],
|
|
507
|
-
t.toggleExpanded(a), t.subRows.forEach((l) =>
|
|
508
|
-
},
|
|
506
|
+
), st = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [], ve = (t, a) => {
|
|
507
|
+
t.toggleExpanded(a), t.subRows.forEach((l) => ve(l, a));
|
|
508
|
+
}, we = (t, a, l, u) => {
|
|
509
509
|
const n = t.getValue(a);
|
|
510
510
|
let p = typeof n == "string" ? n : Array.isArray(n) ? n.join(" ") : JSON.stringify(n);
|
|
511
511
|
a === "label" && (p = [t.original.label, t.original.name, ...t.original.parents || []].join(
|
|
512
512
|
" "
|
|
513
513
|
));
|
|
514
|
-
const b =
|
|
514
|
+
const b = Ge(p, l);
|
|
515
515
|
return u({ itemRank: b }), b.passed;
|
|
516
516
|
};
|
|
517
|
-
|
|
517
|
+
we.resolveFilterValue = Xe;
|
|
518
518
|
const ct = (t, a, l) => {
|
|
519
519
|
let u = 0;
|
|
520
|
-
return t.columnFiltersMeta[l] && (u =
|
|
520
|
+
return t.columnFiltersMeta[l] && (u = Ye(
|
|
521
521
|
t.columnFiltersMeta[l]?.itemRank,
|
|
522
522
|
a.columnFiltersMeta[l]?.itemRank
|
|
523
|
-
)), u === 0 ?
|
|
523
|
+
)), u === 0 ? Ue.alphanumeric(t, a, l) : u;
|
|
524
524
|
};
|
|
525
525
|
function dt(t, a, l) {
|
|
526
526
|
let u = -1, n = -1;
|
|
@@ -530,7 +530,7 @@ function dt(t, a, l) {
|
|
|
530
530
|
const p = Math.min(u, n), b = Math.max(u, n);
|
|
531
531
|
return t.slice(p, b + 1);
|
|
532
532
|
}
|
|
533
|
-
const
|
|
533
|
+
const zt = ({
|
|
534
534
|
data: t = [],
|
|
535
535
|
isLoading: a,
|
|
536
536
|
error: l,
|
|
@@ -540,36 +540,36 @@ const Tt = ({
|
|
|
540
540
|
enableNonFolderIndent: b = !0,
|
|
541
541
|
forceUpdateTable: x,
|
|
542
542
|
globalFilter: M,
|
|
543
|
-
meta:
|
|
543
|
+
meta: Q,
|
|
544
544
|
rowHeight: j,
|
|
545
|
-
imgRatio:
|
|
546
|
-
imgPosition:
|
|
545
|
+
imgRatio: J,
|
|
546
|
+
imgPosition: U,
|
|
547
547
|
onScrollBottom: P,
|
|
548
|
-
onRename:
|
|
548
|
+
onRename: W,
|
|
549
549
|
renamingId: H,
|
|
550
550
|
renameInitialValue: C,
|
|
551
551
|
onSubmitRename: F,
|
|
552
552
|
onCancelRename: E,
|
|
553
553
|
onRowDoubleClick: N,
|
|
554
|
-
onRowOptionClick:
|
|
554
|
+
onRowOptionClick: Y,
|
|
555
555
|
rowContextMenuBuilders: V = [],
|
|
556
|
-
children:
|
|
556
|
+
children: G,
|
|
557
557
|
pt: k,
|
|
558
558
|
fitContent: X,
|
|
559
559
|
rowIdPrefix: Z,
|
|
560
560
|
...ee
|
|
561
561
|
}) => {
|
|
562
562
|
const {
|
|
563
|
-
rowSelection:
|
|
563
|
+
rowSelection: T,
|
|
564
564
|
expanded: re,
|
|
565
565
|
setExpanded: y,
|
|
566
566
|
onExpandedChange: te,
|
|
567
|
-
onRowSelectionChange:
|
|
567
|
+
onRowSelectionChange: D,
|
|
568
568
|
rowPinning: B,
|
|
569
|
-
onRowPinningChange:
|
|
569
|
+
onRowPinningChange: z
|
|
570
570
|
} = at(), S = R(null), f = R(null), q = R(Z);
|
|
571
571
|
q.current = Z;
|
|
572
|
-
const
|
|
572
|
+
const $ = (e) => q.current ? `${q.current}-${e}` : e, [A] = et(), ce = R(N);
|
|
573
573
|
ce.current = N;
|
|
574
574
|
const ae = R(H);
|
|
575
575
|
ae.current = H;
|
|
@@ -579,8 +579,8 @@ const Tt = ({
|
|
|
579
579
|
ie.current = F;
|
|
580
580
|
const ue = R(E);
|
|
581
581
|
ue.current = E;
|
|
582
|
-
const pe = R(
|
|
583
|
-
pe.current =
|
|
582
|
+
const pe = R(W);
|
|
583
|
+
pe.current = W;
|
|
584
584
|
const Re = se(() => a ? Array.from({ length: 10 }, (e, i) => ({
|
|
585
585
|
id: `placeholder-${i}`,
|
|
586
586
|
name: `placeholder-${i}`,
|
|
@@ -591,23 +591,23 @@ const Tt = ({
|
|
|
591
591
|
data: {
|
|
592
592
|
id: `placeholder-${i}`
|
|
593
593
|
}
|
|
594
|
-
})) : t, [a, t, x]), I =
|
|
594
|
+
})) : t, [a, t, x]), I = v(
|
|
595
595
|
(e, i, r, c) => {
|
|
596
|
-
const s = i, g = e.getRowModel(), o = g.rows,
|
|
597
|
-
if (!
|
|
598
|
-
if (
|
|
596
|
+
const s = i, g = e.getRowModel(), o = g.rows, w = g.rowsById[s], h = e.getState().rowSelection || {};
|
|
597
|
+
if (!w) return { ...h };
|
|
598
|
+
if (w.original.isDisabled)
|
|
599
599
|
return { ...h };
|
|
600
600
|
if (p && !r && !c && Object.keys(h).length === 1 && h[s])
|
|
601
601
|
return e.setRowSelection({}), S.current = null, {};
|
|
602
602
|
let m;
|
|
603
603
|
if (n && r && S.current) {
|
|
604
|
-
const
|
|
605
|
-
me.length === 0 ? m = { ...h, [s]: !0 } : (m = { ...h }, me.forEach((
|
|
604
|
+
const ze = S.current, me = dt(o, s, ze);
|
|
605
|
+
me.length === 0 ? m = { ...h, [s]: !0 } : (m = { ...h }, me.forEach(($e) => m[$e.id] = !0));
|
|
606
606
|
} else n && c ? (m = { ...h }, m[s] ? delete m[s] : m[s] = !0) : (m = { ...h }, Object.keys(m).length === 1 && m[s] || (m = { [s]: !0 }));
|
|
607
607
|
return e.setRowSelection(m), S.current = s, m;
|
|
608
608
|
},
|
|
609
609
|
[n, p]
|
|
610
|
-
), Se =
|
|
610
|
+
), Se = v(
|
|
611
611
|
(e, i) => {
|
|
612
612
|
if (!f.current) {
|
|
613
613
|
console.warn("tableRef not yet available in handleRowSelectForKeydown");
|
|
@@ -624,7 +624,7 @@ const Tt = ({
|
|
|
624
624
|
},
|
|
625
625
|
[I]
|
|
626
626
|
// Depends only on handleSelectionLogic
|
|
627
|
-
), Ce =
|
|
627
|
+
), Ce = v(
|
|
628
628
|
(e, i, r) => {
|
|
629
629
|
if (!f.current) return;
|
|
630
630
|
const c = f.current.getRowModel().rows, s = c.findIndex((o) => o.id === i.id);
|
|
@@ -640,7 +640,7 @@ const Tt = ({
|
|
|
640
640
|
r.shiftKey,
|
|
641
641
|
r.ctrlKey || r.metaKey
|
|
642
642
|
), requestAnimationFrame(() => {
|
|
643
|
-
const
|
|
643
|
+
const w = le.current, m = (w ? w.querySelector(`#${CSS.escape($(o.id))}`) : document.getElementById($(o.id)))?.querySelector('[tabindex="0"]');
|
|
644
644
|
m && (m.focus(), m.scrollIntoView({ block: "nearest", behavior: "smooth" }));
|
|
645
645
|
});
|
|
646
646
|
return;
|
|
@@ -649,7 +649,7 @@ const Tt = ({
|
|
|
649
649
|
}
|
|
650
650
|
},
|
|
651
651
|
[I]
|
|
652
|
-
), Ee =
|
|
652
|
+
), Ee = v(
|
|
653
653
|
(e, i) => {
|
|
654
654
|
i.original.isDisabled || pe.current?.(i.id, i);
|
|
655
655
|
},
|
|
@@ -678,7 +678,7 @@ const Tt = ({
|
|
|
678
678
|
o.shiftKey,
|
|
679
679
|
o.ctrlKey || o.metaKey
|
|
680
680
|
);
|
|
681
|
-
o.altKey &&
|
|
681
|
+
o.altKey && Y?.(e.original, Object.keys(h));
|
|
682
682
|
}, g = {
|
|
683
683
|
className: K({
|
|
684
684
|
selected: e.getIsSelected(),
|
|
@@ -700,14 +700,14 @@ const Tt = ({
|
|
|
700
700
|
iconFilled: e.original.iconFilled,
|
|
701
701
|
img: e.original.img,
|
|
702
702
|
imgShape: e.original.imgShape,
|
|
703
|
-
imgRatio:
|
|
704
|
-
imgPosition:
|
|
703
|
+
imgRatio: J,
|
|
704
|
+
imgPosition: U,
|
|
705
705
|
isRowExpandable: e.getCanExpand(),
|
|
706
706
|
enableNonFolderIndent: b,
|
|
707
707
|
isRowExpanded: e.getIsExpanded(),
|
|
708
708
|
isTableExpandable: c?.isExpandable,
|
|
709
709
|
onExpandClick: (o) => {
|
|
710
|
-
o?.altKey ?
|
|
710
|
+
o?.altKey ? ve(e, !e.getIsExpanded()) : e.toggleExpanded();
|
|
711
711
|
},
|
|
712
712
|
startContent: e.original.startContent,
|
|
713
713
|
endContent: e.original.endContent,
|
|
@@ -733,21 +733,21 @@ const Tt = ({
|
|
|
733
733
|
ge,
|
|
734
734
|
p,
|
|
735
735
|
b,
|
|
736
|
-
Q,
|
|
737
736
|
J,
|
|
738
|
-
|
|
737
|
+
U,
|
|
738
|
+
Y
|
|
739
739
|
]
|
|
740
|
-
), Ke =
|
|
740
|
+
), Ke = v(
|
|
741
741
|
(e) => {
|
|
742
|
-
|
|
742
|
+
D(he(e, T));
|
|
743
743
|
},
|
|
744
|
-
[
|
|
745
|
-
), Me =
|
|
744
|
+
[D]
|
|
745
|
+
), Me = v(
|
|
746
746
|
(e) => {
|
|
747
|
-
|
|
747
|
+
z?.(he(e, B || {}));
|
|
748
748
|
},
|
|
749
|
-
[
|
|
750
|
-
), Fe =
|
|
749
|
+
[z]
|
|
750
|
+
), Fe = v(
|
|
751
751
|
(e) => {
|
|
752
752
|
y?.((i) => {
|
|
753
753
|
const r = e instanceof Function ? e(i) : e;
|
|
@@ -760,26 +760,26 @@ const Tt = ({
|
|
|
760
760
|
columns: ke,
|
|
761
761
|
state: {
|
|
762
762
|
expanded: re,
|
|
763
|
-
rowSelection:
|
|
763
|
+
rowSelection: T,
|
|
764
764
|
globalFilter: M,
|
|
765
765
|
rowPinning: B
|
|
766
766
|
},
|
|
767
767
|
onRowSelectionChange: Ke,
|
|
768
768
|
onRowPinningChange: Me,
|
|
769
769
|
filterFns: {
|
|
770
|
-
fuzzy:
|
|
770
|
+
fuzzy: we
|
|
771
771
|
},
|
|
772
772
|
globalFilterFn: "fuzzy",
|
|
773
773
|
enableRowSelection: !0,
|
|
774
774
|
//enable row selection for all rows
|
|
775
|
-
enableRowPinning: !!
|
|
775
|
+
enableRowPinning: !!z,
|
|
776
776
|
getRowId: (e) => e.id,
|
|
777
777
|
enableSubRowSelection: !1,
|
|
778
778
|
//disable sub row selection
|
|
779
779
|
onExpandedChange: Fe,
|
|
780
780
|
getSubRows: (e) => e.subRows,
|
|
781
|
-
getCoreRowModel:
|
|
782
|
-
getFilteredRowModel:
|
|
781
|
+
getCoreRowModel: Qe(),
|
|
782
|
+
getFilteredRowModel: _e(),
|
|
783
783
|
getExpandedRowModel: Oe(),
|
|
784
784
|
filterFromLeafRows: !0,
|
|
785
785
|
// debugTable: true,
|
|
@@ -788,29 +788,29 @@ const Tt = ({
|
|
|
788
788
|
() => ({
|
|
789
789
|
isExpandable: !!u,
|
|
790
790
|
isLoading: a,
|
|
791
|
-
children:
|
|
792
|
-
...
|
|
791
|
+
children: G,
|
|
792
|
+
...Q
|
|
793
793
|
}),
|
|
794
|
-
[u, a,
|
|
794
|
+
[u, a, G, Q]
|
|
795
795
|
)
|
|
796
796
|
});
|
|
797
797
|
ye(() => {
|
|
798
798
|
f.current = O;
|
|
799
799
|
}, [O]);
|
|
800
|
-
const { rows: ne } = O.getRowModel(), Ne =
|
|
800
|
+
const { rows: ne } = O.getRowModel(), Ne = v(
|
|
801
801
|
(e, i, r) => {
|
|
802
802
|
if (!f.current) return;
|
|
803
803
|
const c = ne[i];
|
|
804
804
|
if (!c || c.original === void 0) return;
|
|
805
805
|
r.preventDefault(), r.stopPropagation();
|
|
806
|
-
const s = Object.keys(
|
|
806
|
+
const s = Object.keys(T), g = s.includes(e) ? s : [e];
|
|
807
807
|
if (!s.includes(e)) {
|
|
808
|
-
const
|
|
809
|
-
|
|
808
|
+
const w = { [e]: !0 };
|
|
809
|
+
D?.(w);
|
|
810
810
|
}
|
|
811
811
|
const o = V.flatMap(
|
|
812
|
-
(
|
|
813
|
-
|
|
812
|
+
(w) => st(
|
|
813
|
+
w(r, {
|
|
814
814
|
rowId: e,
|
|
815
815
|
rowIndex: i,
|
|
816
816
|
row: c,
|
|
@@ -820,10 +820,10 @@ const Tt = ({
|
|
|
820
820
|
})
|
|
821
821
|
)
|
|
822
822
|
);
|
|
823
|
-
o.length > 0 &&
|
|
823
|
+
o.length > 0 && A(r, o);
|
|
824
824
|
},
|
|
825
|
-
[V, ne,
|
|
826
|
-
), le = R(null), oe =
|
|
825
|
+
[V, ne, T, D, A]
|
|
826
|
+
), le = R(null), oe = We({
|
|
827
827
|
count: ne.length,
|
|
828
828
|
estimateSize: () => j || 34,
|
|
829
829
|
//estimate row height for accurate scrollbar dragging
|
|
@@ -831,12 +831,12 @@ const Tt = ({
|
|
|
831
831
|
//measure dynamic row height, except in firefox because it measures table border height incorrectly
|
|
832
832
|
measureElement: j ? () => j : typeof window < "u" && navigator.userAgent.indexOf("Firefox") === -1 ? (e) => e?.getBoundingClientRect().height : void 0,
|
|
833
833
|
overscan: 5
|
|
834
|
-
}),
|
|
834
|
+
}), Te = v(
|
|
835
835
|
(e) => {
|
|
836
836
|
e && oe.measureElement(e);
|
|
837
837
|
},
|
|
838
838
|
[oe]
|
|
839
|
-
),
|
|
839
|
+
), De = v(
|
|
840
840
|
(e) => {
|
|
841
841
|
if (!P) return;
|
|
842
842
|
const i = e.currentTarget, { scrollTop: r, scrollHeight: c, clientHeight: s } = i;
|
|
@@ -844,11 +844,11 @@ const Tt = ({
|
|
|
844
844
|
},
|
|
845
845
|
[P, a]
|
|
846
846
|
);
|
|
847
|
-
return /* @__PURE__ */
|
|
847
|
+
return /* @__PURE__ */ _(
|
|
848
848
|
tt,
|
|
849
849
|
{
|
|
850
850
|
ref: le,
|
|
851
|
-
onScroll:
|
|
851
|
+
onScroll: De,
|
|
852
852
|
onClick: (e) => {
|
|
853
853
|
p && !e.target.closest("tr") && (O.setRowSelection({}), S.current = null);
|
|
854
854
|
},
|
|
@@ -868,8 +868,8 @@ const Tt = ({
|
|
|
868
868
|
"tr",
|
|
869
869
|
{
|
|
870
870
|
"data-index": e.index,
|
|
871
|
-
ref:
|
|
872
|
-
id:
|
|
871
|
+
ref: Te,
|
|
872
|
+
id: $(i.id),
|
|
873
873
|
onContextMenu: (r) => Ne(i.id, e.index, r),
|
|
874
874
|
...k?.row,
|
|
875
875
|
style: {
|
|
@@ -878,7 +878,7 @@ const Tt = ({
|
|
|
878
878
|
...k?.row?.style
|
|
879
879
|
// custom styles to be passed
|
|
880
880
|
},
|
|
881
|
-
children: i.getVisibleCells().map((r) => /* @__PURE__ */ d("td", { children:
|
|
881
|
+
children: i.getVisibleCells().map((r) => /* @__PURE__ */ d("td", { children: Je(r.column.columnDef.cell, r.getContext()) }, r.id))
|
|
882
882
|
},
|
|
883
883
|
i.id
|
|
884
884
|
);
|
|
@@ -895,12 +895,12 @@ export {
|
|
|
895
895
|
ot as E,
|
|
896
896
|
Nt as H,
|
|
897
897
|
it as R,
|
|
898
|
-
|
|
898
|
+
zt as S,
|
|
899
899
|
tt as T,
|
|
900
900
|
Ft as a,
|
|
901
|
-
|
|
901
|
+
Tt as b,
|
|
902
902
|
lt as c,
|
|
903
903
|
be as d,
|
|
904
|
-
|
|
904
|
+
Dt as e,
|
|
905
905
|
at as u
|
|
906
906
|
};
|