@ynput/ayon-frontend-shared 0.4.7 → 0.6.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 +684 -649
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +78 -67
- package/dist/ProjectTreeTable.es.js +2185 -2132
- package/dist/Slicer.es.js +152 -120
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +332 -329
- package/dist/chunks/Actions.es.js +7 -7
- package/dist/chunks/ColumnDropIndicator.es.js +127 -241
- package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +40 -40
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +3 -3
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +5 -5
- package/dist/chunks/GlobalContext.es.js +21 -21
- package/dist/chunks/InfoMessage.es.js +146 -0
- package/dist/chunks/Menu.es.js +6 -6
- package/dist/chunks/MenuContext.es.js +51 -240
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3211 -3761
- package/dist/chunks/NewEntityContext.es.js +539 -544
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +2 -2
- package/dist/chunks/ProjectFoldersContext.es.js +84 -76
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +396 -384
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +286 -283
- package/dist/chunks/Slicer.es.js +1129 -689
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +30 -30
- package/dist/chunks/ViewsContext.es.js +97 -97
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +276 -134
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +329 -322
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +186 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +69 -61
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +8 -8
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +199 -194
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +108 -101
- package/dist/index.es.js +20 -14
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +22 -16
- package/dist/types/EntityPickerDialog.d.ts +16 -16
- package/dist/types/Feed.d.ts +16 -16
- package/dist/types/ListTable.d.ts +16 -16
- package/dist/types/NewEntity.d.ts +16 -16
- package/dist/types/ProjectTreeTable.d.ts +48 -22
- package/dist/types/RepresentationsList.d.ts +19 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +119 -34
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +404 -95
- package/dist/types/components.d.ts +86 -25
- package/dist/types/context.d.ts +60 -17
- package/dist/types/hooks.d.ts +16 -16
- package/dist/types/index.d.ts +16 -16
- package/dist/types/util.d.ts +16 -16
- package/dist/util.es.js +108 -97
- package/package.json +26 -13
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useSlicerSplitter.es.js +0 -18
package/dist/Feed.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as D,
|
|
2
|
-
import { F as S,
|
|
3
|
-
import { useMemo as x, useCallback as
|
|
1
|
+
import { A as D, F as I, a as M, u as P } from "./chunks/ThumbnailSimple.es.js";
|
|
2
|
+
import { A as L, C as N, a as k, F as j, b as O, c as R, e as S, i as U, d as W } from "./chunks/Feed.es.js";
|
|
3
|
+
import { useMemo as x, useCallback as A } from "react";
|
|
4
4
|
const y = (t) => {
|
|
5
5
|
const e = Array.from(t).find((s) => s.startsWith("id-"));
|
|
6
6
|
return e ? e.split("-")[1] : null;
|
|
7
|
-
},
|
|
7
|
+
}, E = (t, e, s, c, u) => {
|
|
8
8
|
const i = Object.keys(t);
|
|
9
9
|
return e = [.../* @__PURE__ */ new Set([...e, ...i])], e = s.filter((r) => e.includes(r)), i.includes(c) && (u === 1 ? e.shift() : e.pop()), e;
|
|
10
|
-
},
|
|
10
|
+
}, w = ({
|
|
11
11
|
tableRef: t,
|
|
12
12
|
treeData: e,
|
|
13
13
|
selection: s,
|
|
@@ -21,7 +21,7 @@ const y = (t) => {
|
|
|
21
21
|
o && r.push(o);
|
|
22
22
|
}), r;
|
|
23
23
|
}, [t.current, e]);
|
|
24
|
-
return
|
|
24
|
+
return A(
|
|
25
25
|
(r) => {
|
|
26
26
|
const { key: a, target: o, shiftKey: m } = r;
|
|
27
27
|
if (o.tagName === "TR" && (a === "ArrowDown" || a === "ArrowUp")) {
|
|
@@ -30,7 +30,7 @@ const y = (t) => {
|
|
|
30
30
|
const n = y(f.classList);
|
|
31
31
|
if (!n && n !== "undefined") return;
|
|
32
32
|
let l = [n];
|
|
33
|
-
m && u && (l =
|
|
33
|
+
m && u && (l = E(s, l, i, n, d));
|
|
34
34
|
const g = l, v = l.reduce((p, C) => (p[C] = !0, p), {});
|
|
35
35
|
c({ array: g, object: v });
|
|
36
36
|
}
|
|
@@ -39,20 +39,20 @@ const y = (t) => {
|
|
|
39
39
|
);
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
L as ActivityCategorySelect,
|
|
43
|
+
D as ActivityReferenceTooltip,
|
|
44
|
+
N as CategoryDropdownItem,
|
|
45
|
+
k as CategoryTag,
|
|
46
|
+
I as FEED_NEW_COMMENT,
|
|
47
|
+
j as Feed,
|
|
48
|
+
M as FeedProvider,
|
|
49
|
+
O as FileUploadPreview,
|
|
50
|
+
R as activitiesLast,
|
|
51
|
+
S as expandableMimeTypes,
|
|
52
52
|
y as extractIdFromClassList,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
E as getMultiSelection,
|
|
54
|
+
U as isCategoryHidden,
|
|
55
|
+
W as isFilePreviewable,
|
|
56
|
+
P as useFeedContext,
|
|
57
|
+
w as useTableKeyboardNavigation
|
|
58
58
|
};
|
package/dist/ListTable.es.js
CHANGED
|
@@ -6,14 +6,24 @@ import { Button as ze, Icon as Ie } from "@ynput/ayon-react-components";
|
|
|
6
6
|
import "./chunks/PlayableIcon.es.js";
|
|
7
7
|
import "date-fns";
|
|
8
8
|
import "uuid";
|
|
9
|
-
import {
|
|
9
|
+
import { i as Te, B as we, T as Ve, j as _e, k as ke } from "./chunks/MetaWidget.es.js";
|
|
10
10
|
import "react-toastify";
|
|
11
11
|
import "lodash";
|
|
12
12
|
import "primereact/confirmdialog";
|
|
13
|
-
import {
|
|
13
|
+
import { bg as Le } from "./chunks/searchTerms.es.js";
|
|
14
|
+
import "lexical";
|
|
15
|
+
import "@lexical/markdown";
|
|
16
|
+
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
17
|
+
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
18
|
+
import "match-sorter";
|
|
19
|
+
import "@lexical/code";
|
|
20
|
+
import "@lexical/list";
|
|
21
|
+
import "@lexical/rich-text";
|
|
22
|
+
import "@lexical/selection";
|
|
23
|
+
import "@lexical/utils";
|
|
24
|
+
import { dz as vt, dA as Ge } from "./chunks/getUris.es.js";
|
|
14
25
|
import "react-router-dom";
|
|
15
26
|
import "./chunks/ProjectContext.es.js";
|
|
16
|
-
import { dx as vt, dy as Ge } from "./chunks/getUris.es.js";
|
|
17
27
|
import { a as Me } from "./chunks/useCreateContextMenu.es.js";
|
|
18
28
|
import "./chunks/DeleteEntitiesContext.es.js";
|
|
19
29
|
import "./chunks/GlobalContext.es.js";
|
|
@@ -31,6 +41,7 @@ import { C as Be, H as Ye } from "./chunks/ColumnDropIndicator.es.js";
|
|
|
31
41
|
import { u as Ue } from "./chunks/MenuContext.es.js";
|
|
32
42
|
import "./chunks/EmptyPlaceholder.es.js";
|
|
33
43
|
import "./chunks/Menu.es.js";
|
|
44
|
+
import "./chunks/InfoMessage.es.js";
|
|
34
45
|
import "react-dom";
|
|
35
46
|
import "react-redux";
|
|
36
47
|
import "./chunks/ViewsContext.es.js";
|
|
@@ -420,7 +431,7 @@ const Tt = C.tbody`
|
|
|
420
431
|
gap: 2px;
|
|
421
432
|
flex-shrink: 0;
|
|
422
433
|
z-index: 1;
|
|
423
|
-
`,
|
|
434
|
+
`, mn = C.div`
|
|
424
435
|
position: absolute;
|
|
425
436
|
right: -3px;
|
|
426
437
|
top: 0;
|
|
@@ -454,11 +465,11 @@ const Tt = C.tbody`
|
|
|
454
465
|
stopEditing: u,
|
|
455
466
|
updateValue: a
|
|
456
467
|
}) => {
|
|
457
|
-
const
|
|
468
|
+
const m = Array.isArray(t) ? t : t == null ? [] : [t];
|
|
458
469
|
return /* @__PURE__ */ l(
|
|
459
470
|
_e,
|
|
460
471
|
{
|
|
461
|
-
value:
|
|
472
|
+
value: m,
|
|
462
473
|
options: e.enum || [],
|
|
463
474
|
type: e.type,
|
|
464
475
|
isEditing: o,
|
|
@@ -483,7 +494,7 @@ const Tt = C.tbody`
|
|
|
483
494
|
getDraftValue: t.getDraftValue,
|
|
484
495
|
setDraftValue: t.setDraftValue
|
|
485
496
|
}
|
|
486
|
-
),
|
|
497
|
+
), fn = (t) => /* @__PURE__ */ l(
|
|
487
498
|
we,
|
|
488
499
|
{
|
|
489
500
|
value: !!t.value,
|
|
@@ -509,14 +520,14 @@ const Tt = C.tbody`
|
|
|
509
520
|
string: Z,
|
|
510
521
|
integer: Z,
|
|
511
522
|
float: Z,
|
|
512
|
-
boolean:
|
|
523
|
+
boolean: fn,
|
|
513
524
|
datetime: hn,
|
|
514
525
|
list_of_strings: tt,
|
|
515
526
|
list_of_integers: tt,
|
|
516
527
|
list_of_any: tt,
|
|
517
528
|
list_of_submodels: wt,
|
|
518
529
|
dict: wt
|
|
519
|
-
},
|
|
530
|
+
}, _o = () => bn, Kt = (t, e) => `list-table-cell-${t}-${e}`, yn = (t) => F(t), Vt = "editable", vn = (t) => !!t && typeof t == "object" && "__listTablePlaceholder" in t, Cn = ({
|
|
520
531
|
cell: t,
|
|
521
532
|
row: e,
|
|
522
533
|
rowIndex: o,
|
|
@@ -524,7 +535,7 @@ const Tt = C.tbody`
|
|
|
524
535
|
dataTypeWidgets: i,
|
|
525
536
|
editingState: u,
|
|
526
537
|
callbacks: a,
|
|
527
|
-
isReadOnly:
|
|
538
|
+
isReadOnly: m
|
|
528
539
|
}) => {
|
|
529
540
|
const d = r?.type;
|
|
530
541
|
if (!d || !i?.[d])
|
|
@@ -541,7 +552,7 @@ const Tt = C.tbody`
|
|
|
541
552
|
cellId: c,
|
|
542
553
|
attributeData: r,
|
|
543
554
|
isEditing: u.editingCellId === c,
|
|
544
|
-
isReadOnly:
|
|
555
|
+
isReadOnly: m,
|
|
545
556
|
startEditing: () => u.startEditingCell(c),
|
|
546
557
|
stopEditing: u.stopEditingCell,
|
|
547
558
|
updateValue: (h) => {
|
|
@@ -561,8 +572,8 @@ const Tt = C.tbody`
|
|
|
561
572
|
callbacks: u,
|
|
562
573
|
editable: a = !0
|
|
563
574
|
}) => {
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
575
|
+
const m = vn(t.original);
|
|
576
|
+
if (m) {
|
|
566
577
|
const d = t.original && typeof t.original == "object" && "label" in t.original ? String(t.original.label ?? "") : "";
|
|
567
578
|
return /* @__PURE__ */ l(zt, { style: { width: "100%" }, children: /* @__PURE__ */ l(
|
|
568
579
|
It,
|
|
@@ -573,7 +584,7 @@ const Tt = C.tbody`
|
|
|
573
584
|
) }, `${t.id}-placeholder`);
|
|
574
585
|
}
|
|
575
586
|
return /* @__PURE__ */ l(xe, { children: t.getVisibleCells().map((d, E, R) => {
|
|
576
|
-
const c = Kt(t.id, d.column.id), s = o?.[d.column.id], h = !!d.column.columnDef.meta?.listTableCustomCell, g = s?.type,
|
|
587
|
+
const c = Kt(t.id, d.column.id), s = o?.[d.column.id], h = !!d.column.columnDef.meta?.listTableCustomCell, g = s?.type, f = !!g && !h, b = !!(g && r?.[g]), y = i.editingCellId === c, x = a && d.column.columnDef.meta?.editable !== !1, w = !f || m ? null : Cn({
|
|
577
588
|
cell: d,
|
|
578
589
|
row: t,
|
|
579
590
|
rowIndex: t.index,
|
|
@@ -582,10 +593,10 @@ const Tt = C.tbody`
|
|
|
582
593
|
editingState: i,
|
|
583
594
|
callbacks: u,
|
|
584
595
|
isReadOnly: !x
|
|
585
|
-
}), I = !
|
|
596
|
+
}), I = !f || m ? ot(d.column.columnDef.cell, d.getContext()) : w ?? yn(d.getValue());
|
|
586
597
|
let v = I;
|
|
587
598
|
e !== null && (e ? v = e(t, I) || I : v = /* @__PURE__ */ l(Je, { children: I }));
|
|
588
|
-
const S = x &&
|
|
599
|
+
const S = x && f && b && !m;
|
|
589
600
|
return S && (v = /* @__PURE__ */ l(
|
|
590
601
|
qe,
|
|
591
602
|
{
|
|
@@ -647,7 +658,7 @@ function Rn({
|
|
|
647
658
|
depth: i,
|
|
648
659
|
isExpanded: u,
|
|
649
660
|
onToggle: a,
|
|
650
|
-
virtualStart:
|
|
661
|
+
virtualStart: m,
|
|
651
662
|
onContextMenu: d
|
|
652
663
|
}) {
|
|
653
664
|
const R = xn(t)?.baseColumnId ?? t, c = Dn(e) ? e : void 0, s = c?.value ?? e, h = c?.label ?? En(R, s);
|
|
@@ -655,7 +666,7 @@ function Rn({
|
|
|
655
666
|
$t,
|
|
656
667
|
{
|
|
657
668
|
style: {
|
|
658
|
-
transform: `translateY(${
|
|
669
|
+
transform: `translateY(${m}px)`,
|
|
659
670
|
paddingLeft: i * 16
|
|
660
671
|
},
|
|
661
672
|
onClick: a,
|
|
@@ -696,7 +707,7 @@ function Sn({
|
|
|
696
707
|
onRowClick: i,
|
|
697
708
|
onRowDoubleClick: u,
|
|
698
709
|
onRowContextMenu: a,
|
|
699
|
-
cellWrapper:
|
|
710
|
+
cellWrapper: m,
|
|
700
711
|
columnAttributeData: d,
|
|
701
712
|
dataTypeWidgets: E,
|
|
702
713
|
editingState: R,
|
|
@@ -704,9 +715,9 @@ function Sn({
|
|
|
704
715
|
editable: s,
|
|
705
716
|
isInactive: h
|
|
706
717
|
}) {
|
|
707
|
-
const g = P(t.original),
|
|
718
|
+
const g = P(t.original), f = kt(t.original), { transform: b, transition: y, setNodeRef: x, isDragging: w } = Ht({
|
|
708
719
|
id: t.id,
|
|
709
|
-
disabled: g ||
|
|
720
|
+
disabled: g || f
|
|
710
721
|
});
|
|
711
722
|
if (g) {
|
|
712
723
|
const S = t.original;
|
|
@@ -744,13 +755,13 @@ function Sn({
|
|
|
744
755
|
dragging: w,
|
|
745
756
|
selected: o,
|
|
746
757
|
inactive: h,
|
|
747
|
-
"placeholder-row":
|
|
758
|
+
"placeholder-row": f
|
|
748
759
|
}),
|
|
749
760
|
children: /* @__PURE__ */ l(
|
|
750
761
|
Wt,
|
|
751
762
|
{
|
|
752
763
|
row: t,
|
|
753
|
-
cellWrapper:
|
|
764
|
+
cellWrapper: m,
|
|
754
765
|
columnAttributeData: d,
|
|
755
766
|
dataTypeWidgets: E,
|
|
756
767
|
editingState: R,
|
|
@@ -770,11 +781,11 @@ function In({
|
|
|
770
781
|
enableColumnResizing: i = !1,
|
|
771
782
|
isLast: u = !1
|
|
772
783
|
}) {
|
|
773
|
-
const { attributes: a, listeners:
|
|
784
|
+
const { attributes: a, listeners: m, setNodeRef: d, isDragging: E, transform: R, transition: c } = Ht({
|
|
774
785
|
id: t.id,
|
|
775
786
|
data: { type: "column" },
|
|
776
787
|
disabled: !e
|
|
777
|
-
}), s = t.column, h = o && s.getCanSort(), g = s.getIsSorted(),
|
|
788
|
+
}), s = t.column, h = o && s.getCanSort(), g = s.getIsSorted(), f = `list-table-menu-${t.id}`, { menuOpen: b } = Ue(), y = b === f, x = h ? [
|
|
778
789
|
{
|
|
779
790
|
id: "sort-asc",
|
|
780
791
|
label: "Sort ascending",
|
|
@@ -819,11 +830,11 @@ function In({
|
|
|
819
830
|
resizing: $,
|
|
820
831
|
sorted: !!g
|
|
821
832
|
}),
|
|
822
|
-
...e ? { ...a, ...
|
|
833
|
+
...e ? { ...a, ...m } : {},
|
|
823
834
|
children: [
|
|
824
835
|
/* @__PURE__ */ l(gn, { children: t.isPlaceholder ? null : ot(t.column.columnDef.header, t.getContext()) }),
|
|
825
836
|
(v.length > 0 || h) && /* @__PURE__ */ M(pn, { ...B, children: [
|
|
826
|
-
v.length > 0 && /* @__PURE__ */ l(Be, { menuItems: v, menuId:
|
|
837
|
+
v.length > 0 && /* @__PURE__ */ l(Be, { menuItems: v, menuId: f, className: "header-menu" }),
|
|
827
838
|
h && /* @__PURE__ */ l(
|
|
828
839
|
Ye,
|
|
829
840
|
{
|
|
@@ -838,7 +849,7 @@ function In({
|
|
|
838
849
|
)
|
|
839
850
|
] }),
|
|
840
851
|
S && /* @__PURE__ */ l(
|
|
841
|
-
|
|
852
|
+
mn,
|
|
842
853
|
{
|
|
843
854
|
className: A("resize-handle", { resizing: z }),
|
|
844
855
|
style: { transform: H ? `translateX(${H}px)` : void 0 },
|
|
@@ -878,15 +889,15 @@ function wn({
|
|
|
878
889
|
rowVirtualizer: i,
|
|
879
890
|
tableContainerRef: u
|
|
880
891
|
}) {
|
|
881
|
-
const [a,
|
|
892
|
+
const [a, m] = L(-1), d = At(-1), E = O(
|
|
882
893
|
(c, s, h) => {
|
|
883
894
|
const g = t[s];
|
|
884
895
|
if (!(g && W(g))) {
|
|
885
896
|
if (r && h.shiftKey && d.current >= 0) {
|
|
886
|
-
const
|
|
897
|
+
const f = Math.min(d.current, s), b = Math.max(d.current, s), y = t.slice(f, b + 1).filter((x) => !W(x)).map((x) => x.id);
|
|
887
898
|
h.metaKey || h.ctrlKey ? o?.(Array.from(/* @__PURE__ */ new Set([...e, ...y]))) : o?.(y);
|
|
888
|
-
} else r && (h.metaKey || h.ctrlKey) ? (e.includes(c) ? o?.(e.filter((
|
|
889
|
-
|
|
899
|
+
} else r && (h.metaKey || h.ctrlKey) ? (e.includes(c) ? o?.(e.filter((f) => f !== c)) : o?.([...e, c]), d.current = s) : e.includes(c) ? o?.(e.filter((f) => f !== c)) : (o?.([c]), d.current = s);
|
|
900
|
+
m(s), u.current?.focus();
|
|
890
901
|
}
|
|
891
902
|
},
|
|
892
903
|
[e, t, o, r, u]
|
|
@@ -905,17 +916,17 @@ function wn({
|
|
|
905
916
|
break;
|
|
906
917
|
}
|
|
907
918
|
if (g === a || W(t[g])) return;
|
|
908
|
-
const
|
|
909
|
-
if (
|
|
919
|
+
const f = t[g]?.id;
|
|
920
|
+
if (f) {
|
|
910
921
|
if (c.shiftKey && r)
|
|
911
|
-
if (e.includes(
|
|
922
|
+
if (e.includes(f)) {
|
|
912
923
|
const b = t[a]?.id;
|
|
913
924
|
b && o?.(e.filter((y) => y !== b));
|
|
914
925
|
} else
|
|
915
|
-
o?.([...e,
|
|
926
|
+
o?.([...e, f]);
|
|
916
927
|
else
|
|
917
|
-
o?.([
|
|
918
|
-
|
|
928
|
+
o?.([f]), d.current = g;
|
|
929
|
+
m(g), i.scrollToIndex(g, { behavior: "smooth" });
|
|
919
930
|
}
|
|
920
931
|
},
|
|
921
932
|
[a, t, e, o, i]
|
|
@@ -923,8 +934,8 @@ function wn({
|
|
|
923
934
|
return { activeRowIndex: a, handleRowClick: E, handleKeyDown: R };
|
|
924
935
|
}
|
|
925
936
|
function Vn() {
|
|
926
|
-
const [t, e] = L(null), [o, r] = L(null), i = O((
|
|
927
|
-
e(
|
|
937
|
+
const [t, e] = L(null), [o, r] = L(null), i = O((m) => {
|
|
938
|
+
e(m);
|
|
928
939
|
}, []), u = O(() => {
|
|
929
940
|
e(null), r(null);
|
|
930
941
|
}, []);
|
|
@@ -946,14 +957,14 @@ function _n({
|
|
|
946
957
|
setColumnOrder: r,
|
|
947
958
|
onColumnOrderChange: i
|
|
948
959
|
}) {
|
|
949
|
-
const [u, a] = L(null), [
|
|
960
|
+
const [u, a] = L(null), [m, d] = L(null);
|
|
950
961
|
return {
|
|
951
962
|
sensors: He(
|
|
952
963
|
Ct(Oe),
|
|
953
964
|
Ct($e, { coordinateGetter: Ke })
|
|
954
965
|
),
|
|
955
966
|
activeRowId: u,
|
|
956
|
-
activeColumnId:
|
|
967
|
+
activeColumnId: m,
|
|
957
968
|
handleColumnDragStart: (b) => {
|
|
958
969
|
d(b.active.id);
|
|
959
970
|
},
|
|
@@ -993,7 +1004,7 @@ function kn(t) {
|
|
|
993
1004
|
}, [o, e]);
|
|
994
1005
|
}
|
|
995
1006
|
const Ln = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [];
|
|
996
|
-
function
|
|
1007
|
+
function ko({
|
|
997
1008
|
data: t,
|
|
998
1009
|
columns: e,
|
|
999
1010
|
getRowId: o,
|
|
@@ -1001,7 +1012,7 @@ function xo({
|
|
|
1001
1012
|
hasNextPage: i,
|
|
1002
1013
|
isFetchingNextPage: u,
|
|
1003
1014
|
onUpdateRow: a,
|
|
1004
|
-
onOpenViewer:
|
|
1015
|
+
onOpenViewer: m,
|
|
1005
1016
|
editable: d = !0,
|
|
1006
1017
|
onReorderRows: E,
|
|
1007
1018
|
rowContextMenuBuilders: R = [],
|
|
@@ -1009,7 +1020,7 @@ function xo({
|
|
|
1009
1020
|
selectedRows: s = [],
|
|
1010
1021
|
onSelectedRowsChange: h,
|
|
1011
1022
|
multiSelection: g = !1,
|
|
1012
|
-
cellWrapper:
|
|
1023
|
+
cellWrapper: f,
|
|
1013
1024
|
columnAttributeData: b,
|
|
1014
1025
|
dataTypeWidgets: y,
|
|
1015
1026
|
enableColumnReordering: x = !1,
|
|
@@ -1085,7 +1096,7 @@ function xo({
|
|
|
1085
1096
|
getRowCanExpand: (n) => n.subRows.length > 0,
|
|
1086
1097
|
meta: {
|
|
1087
1098
|
updateData: a,
|
|
1088
|
-
openViewerDialog:
|
|
1099
|
+
openViewerDialog: m
|
|
1089
1100
|
}
|
|
1090
1101
|
}), { rows: _ } = N.getRowModel(), X = Ae({
|
|
1091
1102
|
count: i ? _.length + 1 : _.length,
|
|
@@ -1145,20 +1156,20 @@ function xo({
|
|
|
1145
1156
|
[R, _, s, h, rt]
|
|
1146
1157
|
), { editingState: gt } = Vn(), {
|
|
1147
1158
|
sensors: pt,
|
|
1148
|
-
activeRowId:
|
|
1149
|
-
activeColumnId:
|
|
1159
|
+
activeRowId: mt,
|
|
1160
|
+
activeColumnId: ft,
|
|
1150
1161
|
handleColumnDragStart: pe,
|
|
1151
|
-
handleColumnDragEnd:
|
|
1152
|
-
handleColumnDragCancel:
|
|
1162
|
+
handleColumnDragEnd: me,
|
|
1163
|
+
handleColumnDragCancel: fe,
|
|
1153
1164
|
handleRowDragStart: he,
|
|
1154
1165
|
handleRowDragEnd: be,
|
|
1155
1166
|
handleRowDragCancel: ye
|
|
1156
|
-
} = _n({ rows: _, columnOrder: ct, onReorderRows: E, setColumnOrder: ut, onColumnOrderChange: I }), ht = et(() => ({ onUpdateRow: a, onOpenViewer:
|
|
1167
|
+
} = _n({ rows: _, columnOrder: ct, onReorderRows: E, setColumnOrder: ut, onColumnOrderChange: I }), ht = et(() => ({ onUpdateRow: a, onOpenViewer: m }), [a, m]), ve = kn(N), Ce = !!N.getState().columnSizingInfo.isResizingColumn;
|
|
1157
1168
|
Mt(() => {
|
|
1158
1169
|
const [n] = J.slice(-1);
|
|
1159
1170
|
n && n.index >= _.length - 1 && i && !u && r?.();
|
|
1160
1171
|
}, [i, r, _.length, u, J]);
|
|
1161
|
-
const q =
|
|
1172
|
+
const q = mt ? _.find((n) => n.id === mt) : null, j = ft ? N.getHeaderGroups()[0]?.headers.find((n) => n.id === ft) : null;
|
|
1162
1173
|
return /* @__PURE__ */ l(
|
|
1163
1174
|
Qe,
|
|
1164
1175
|
{
|
|
@@ -1173,8 +1184,8 @@ function xo({
|
|
|
1173
1184
|
sensors: pt,
|
|
1174
1185
|
collisionDetection: Dt,
|
|
1175
1186
|
onDragStart: pe,
|
|
1176
|
-
onDragEnd:
|
|
1177
|
-
onDragCancel:
|
|
1187
|
+
onDragEnd: me,
|
|
1188
|
+
onDragCancel: fe,
|
|
1178
1189
|
modifiers: [Ne],
|
|
1179
1190
|
children: [
|
|
1180
1191
|
/* @__PURE__ */ l(tn, { children: N.getHeaderGroups().map((n) => /* @__PURE__ */ l(en, { children: /* @__PURE__ */ l(
|
|
@@ -1249,7 +1260,7 @@ function xo({
|
|
|
1249
1260
|
onRowClick: de,
|
|
1250
1261
|
onRowDoubleClick: c ? ue : void 0,
|
|
1251
1262
|
onRowContextMenu: R.length > 0 ? ge : void 0,
|
|
1252
|
-
cellWrapper:
|
|
1263
|
+
cellWrapper: f,
|
|
1253
1264
|
columnAttributeData: b,
|
|
1254
1265
|
dataTypeWidgets: y,
|
|
1255
1266
|
editingState: gt,
|
|
@@ -1278,7 +1289,7 @@ function xo({
|
|
|
1278
1289
|
Wt,
|
|
1279
1290
|
{
|
|
1280
1291
|
row: q,
|
|
1281
|
-
cellWrapper:
|
|
1292
|
+
cellWrapper: f,
|
|
1282
1293
|
columnAttributeData: b,
|
|
1283
1294
|
dataTypeWidgets: y,
|
|
1284
1295
|
editingState: gt,
|
|
@@ -1310,38 +1321,38 @@ const Pt = (t) => !!t && typeof t == "object" && ("label" in t || "value" in t),
|
|
|
1310
1321
|
}), o.forEach((i) => {
|
|
1311
1322
|
i.subRows = Ft(i.subRows, e);
|
|
1312
1323
|
}), [...o, ...r];
|
|
1313
|
-
},
|
|
1314
|
-
const a = [],
|
|
1324
|
+
}, Lo = (t, e, o, r, i, u) => {
|
|
1325
|
+
const a = [], m = (d, E, R, c) => {
|
|
1315
1326
|
if (!R.length) {
|
|
1316
1327
|
d.push(E);
|
|
1317
1328
|
return;
|
|
1318
1329
|
}
|
|
1319
1330
|
const [s, ...h] = R, g = r(s, E) ?? [u(E, s)];
|
|
1320
1331
|
if (!g.length) {
|
|
1321
|
-
|
|
1332
|
+
m(d, E, h, c);
|
|
1322
1333
|
return;
|
|
1323
1334
|
}
|
|
1324
|
-
const
|
|
1335
|
+
const f = (b, y, x) => {
|
|
1325
1336
|
const w = g[y], I = Gn(w), v = `${x}|${s}:${y}:${JSON.stringify(I)}`;
|
|
1326
1337
|
let S = b.find(
|
|
1327
1338
|
(z) => nt(z) && z.__groupKey === v
|
|
1328
1339
|
);
|
|
1329
1340
|
if (S || (S = i(s, v, w), b.push(S)), y < g.length - 1) {
|
|
1330
|
-
|
|
1341
|
+
f(S.subRows, y + 1, v);
|
|
1331
1342
|
return;
|
|
1332
1343
|
}
|
|
1333
|
-
|
|
1344
|
+
m(S.subRows, E, h, v);
|
|
1334
1345
|
};
|
|
1335
|
-
|
|
1346
|
+
f(d, 0, c);
|
|
1336
1347
|
};
|
|
1337
|
-
return t.forEach((d) =>
|
|
1348
|
+
return t.forEach((d) => m(a, d, e, "root")), Ft(a, o);
|
|
1338
1349
|
};
|
|
1339
1350
|
export {
|
|
1340
|
-
|
|
1341
|
-
|
|
1351
|
+
ko as ListTable,
|
|
1352
|
+
Lo as buildGroupedData,
|
|
1342
1353
|
Mn as compareGroupingPathItems,
|
|
1343
1354
|
bn as defaultListTableDataTypeWidgets,
|
|
1344
|
-
|
|
1355
|
+
_o as getDefaultListTableDataTypeWidgets,
|
|
1345
1356
|
Gn as getGroupItemValue,
|
|
1346
1357
|
Kt as getListTableCellId,
|
|
1347
1358
|
Pt as isListTableGroupDisplayObject,
|