@ynput/ayon-frontend-shared 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContextMenu.es.js +34 -16
- package/dist/DetailsPanel.es.js +307 -311
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +99 -92
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4459 -2959
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +32 -27
- package/dist/chunks/ColumnDropIndicator.es.js +174 -328
- package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
- package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
- package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +74 -69
- package/dist/chunks/EntityPickerDialog.es.js +25 -21
- package/dist/chunks/EntityTooltip.es.js +29 -22
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +2321 -2668
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -256
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2895 -4919
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +4215 -1179
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +4 -4
- package/dist/chunks/ReviewablesSelector.es.js +468 -460
- package/dist/chunks/SimpleForm.es.js +18 -18
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +109 -98
- package/dist/chunks/TableSettingsFallback.es.js +22 -10
- package/dist/chunks/ThumbnailSimple.es.js +290 -52
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +669 -644
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +737 -710
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +179 -174
- package/dist/chunks/useAttributeEnums.es.js +9 -9
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useHierarchySelection.es.js +24 -0
- package/dist/chunks/useLoadModule.es.js +74 -0
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
- package/dist/chunks/versionUploadHelpers.es.js +16 -42
- package/dist/chunks/viewUpdateHelper.es.js +74 -57
- package/dist/components.es.js +1432 -1001
- package/dist/context.es.js +791 -78
- package/dist/hooks.es.js +95 -94
- package/dist/index.es.js +27 -26
- package/dist/types/Actions.d.ts +15 -15
- package/dist/types/ContextMenu.d.ts +19 -16
- package/dist/types/DetailsPanel.d.ts +110 -17
- package/dist/types/EntityPickerDialog.d.ts +15 -15
- package/dist/types/Feed.d.ts +19 -16
- package/dist/types/ListTable.d.ts +15 -15
- package/dist/types/NewEntity.d.ts +24 -18
- package/dist/types/ProjectTreeTable.d.ts +34 -123
- package/dist/types/RepresentationsList.d.ts +15 -15
- package/dist/types/SimpleTable.d.ts +19 -16
- package/dist/types/Slicer.d.ts +18 -15
- package/dist/types/Views.d.ts +19 -16
- package/dist/types/api.d.ts +515 -207
- package/dist/types/components.d.ts +84 -20
- package/dist/types/context.d.ts +108 -25
- package/dist/types/hooks.d.ts +15 -15
- package/dist/types/index.d.ts +15 -15
- package/dist/types/util.d.ts +20 -15
- package/dist/util.es.js +117 -105
- package/package.json +16 -4
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/GlobalContext.es.js +0 -52
- package/dist/chunks/NewEntityContext.es.js +0 -1242
- package/dist/chunks/ProjectFoldersContext.es.js +0 -134
- package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
- package/dist/chunks/VersionUploadContext.es.js +0 -232
- package/dist/chunks/ViewsContext.es.js +0 -878
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useColumnDragRestriction.es.js +0 -148
- package/dist/chunks/useLocalStorage.es.js +0 -355
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
package/dist/ListTable.es.js
CHANGED
|
@@ -6,35 +6,42 @@ 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 { l as Te, B as we, T as Ve, m as _e, n 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 { bj 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
|
-
import "./chunks/ProjectContext.es.js";
|
|
16
|
-
import { dy as vt, dz as Ge } from "./chunks/getUris.es.js";
|
|
17
|
-
import { a as Me } from "./chunks/useCreateContextMenu.es.js";
|
|
18
|
-
import "./chunks/DeleteEntitiesContext.es.js";
|
|
19
|
-
import "./chunks/GlobalContext.es.js";
|
|
20
|
-
import "./chunks/useLocalStorage.es.js";
|
|
21
26
|
import "@module-federation/enhanced/runtime";
|
|
27
|
+
import { u as Me } from "./chunks/DeleteEntitiesContextInstance.es.js";
|
|
22
28
|
import "semver";
|
|
23
|
-
import "./chunks/
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
29
|
+
import { u as Ae } from "./chunks/useCreateContextMenu.es.js";
|
|
30
|
+
import "react-dom";
|
|
31
|
+
import "react-redux";
|
|
32
|
+
import { useVirtualizer as He } from "@tanstack/react-virtual";
|
|
33
|
+
import { useSensors as Oe, useSensor as Ct, PointerSensor as $e, KeyboardSensor as Ne, DndContext as xt, closestCenter as Dt, DragOverlay as Et, defaultDropAnimationSideEffects as Rt } from "@dnd-kit/core";
|
|
34
|
+
import { restrictToHorizontalAxis as je, restrictToVerticalAxis as Ke } from "@dnd-kit/modifiers";
|
|
35
|
+
import { useSortable as Ht, sortableKeyboardCoordinates as We, arrayMove as Pe, SortableContext as St, horizontalListSortingStrategy as Fe, verticalListSortingStrategy as Be } from "@dnd-kit/sortable";
|
|
28
36
|
import { CSS as Ot } from "@dnd-kit/utilities";
|
|
29
37
|
import C from "styled-components";
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
38
|
+
import { H as Ye } from "./chunks/ColumnDropIndicator.styled.es.js";
|
|
39
|
+
import "./chunks/ContextMenuContextInstance.es.js";
|
|
40
|
+
import "./chunks/MenuItem.es.js";
|
|
32
41
|
import "./chunks/EmptyPlaceholder.es.js";
|
|
33
42
|
import "./chunks/Menu.es.js";
|
|
34
43
|
import "./chunks/InfoMessage.es.js";
|
|
35
|
-
import "
|
|
36
|
-
import "react-redux";
|
|
37
|
-
import "./chunks/ViewsContext.es.js";
|
|
44
|
+
import { C as Ue } from "./chunks/ColumnHeaderMenuUI.es.js";
|
|
38
45
|
import "primereact-context/contextmenu";
|
|
39
46
|
const $t = C.tr`
|
|
40
47
|
display: flex;
|
|
@@ -421,7 +428,7 @@ const Tt = C.tbody`
|
|
|
421
428
|
gap: 2px;
|
|
422
429
|
flex-shrink: 0;
|
|
423
430
|
z-index: 1;
|
|
424
|
-
`,
|
|
431
|
+
`, mn = C.div`
|
|
425
432
|
position: absolute;
|
|
426
433
|
right: -3px;
|
|
427
434
|
top: 0;
|
|
@@ -455,11 +462,11 @@ const Tt = C.tbody`
|
|
|
455
462
|
stopEditing: u,
|
|
456
463
|
updateValue: a
|
|
457
464
|
}) => {
|
|
458
|
-
const
|
|
465
|
+
const m = Array.isArray(t) ? t : t == null ? [] : [t];
|
|
459
466
|
return /* @__PURE__ */ l(
|
|
460
467
|
_e,
|
|
461
468
|
{
|
|
462
|
-
value:
|
|
469
|
+
value: m,
|
|
463
470
|
options: e.enum || [],
|
|
464
471
|
type: e.type,
|
|
465
472
|
isEditing: o,
|
|
@@ -484,7 +491,7 @@ const Tt = C.tbody`
|
|
|
484
491
|
getDraftValue: t.getDraftValue,
|
|
485
492
|
setDraftValue: t.setDraftValue
|
|
486
493
|
}
|
|
487
|
-
),
|
|
494
|
+
), fn = (t) => /* @__PURE__ */ l(
|
|
488
495
|
we,
|
|
489
496
|
{
|
|
490
497
|
value: !!t.value,
|
|
@@ -510,14 +517,14 @@ const Tt = C.tbody`
|
|
|
510
517
|
string: Z,
|
|
511
518
|
integer: Z,
|
|
512
519
|
float: Z,
|
|
513
|
-
boolean:
|
|
520
|
+
boolean: fn,
|
|
514
521
|
datetime: hn,
|
|
515
522
|
list_of_strings: tt,
|
|
516
523
|
list_of_integers: tt,
|
|
517
524
|
list_of_any: tt,
|
|
518
525
|
list_of_submodels: wt,
|
|
519
526
|
dict: wt
|
|
520
|
-
},
|
|
527
|
+
}, To = () => 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 = ({
|
|
521
528
|
cell: t,
|
|
522
529
|
row: e,
|
|
523
530
|
rowIndex: o,
|
|
@@ -525,7 +532,7 @@ const Tt = C.tbody`
|
|
|
525
532
|
dataTypeWidgets: i,
|
|
526
533
|
editingState: u,
|
|
527
534
|
callbacks: a,
|
|
528
|
-
isReadOnly:
|
|
535
|
+
isReadOnly: m
|
|
529
536
|
}) => {
|
|
530
537
|
const d = r?.type;
|
|
531
538
|
if (!d || !i?.[d])
|
|
@@ -542,7 +549,7 @@ const Tt = C.tbody`
|
|
|
542
549
|
cellId: c,
|
|
543
550
|
attributeData: r,
|
|
544
551
|
isEditing: u.editingCellId === c,
|
|
545
|
-
isReadOnly:
|
|
552
|
+
isReadOnly: m,
|
|
546
553
|
startEditing: () => u.startEditingCell(c),
|
|
547
554
|
stopEditing: u.stopEditingCell,
|
|
548
555
|
updateValue: (h) => {
|
|
@@ -562,8 +569,8 @@ const Tt = C.tbody`
|
|
|
562
569
|
callbacks: u,
|
|
563
570
|
editable: a = !0
|
|
564
571
|
}) => {
|
|
565
|
-
const
|
|
566
|
-
if (
|
|
572
|
+
const m = vn(t.original);
|
|
573
|
+
if (m) {
|
|
567
574
|
const d = t.original && typeof t.original == "object" && "label" in t.original ? String(t.original.label ?? "") : "";
|
|
568
575
|
return /* @__PURE__ */ l(zt, { style: { width: "100%" }, children: /* @__PURE__ */ l(
|
|
569
576
|
It,
|
|
@@ -574,7 +581,7 @@ const Tt = C.tbody`
|
|
|
574
581
|
) }, `${t.id}-placeholder`);
|
|
575
582
|
}
|
|
576
583
|
return /* @__PURE__ */ l(xe, { children: t.getVisibleCells().map((d, E, R) => {
|
|
577
|
-
const c = Kt(t.id, d.column.id), s = o?.[d.column.id], h = !!d.column.columnDef.meta?.listTableCustomCell, g = s?.type,
|
|
584
|
+
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({
|
|
578
585
|
cell: d,
|
|
579
586
|
row: t,
|
|
580
587
|
rowIndex: t.index,
|
|
@@ -583,10 +590,10 @@ const Tt = C.tbody`
|
|
|
583
590
|
editingState: i,
|
|
584
591
|
callbacks: u,
|
|
585
592
|
isReadOnly: !x
|
|
586
|
-
}), I = !
|
|
593
|
+
}), I = !f || m ? ot(d.column.columnDef.cell, d.getContext()) : w ?? yn(d.getValue());
|
|
587
594
|
let v = I;
|
|
588
595
|
e !== null && (e ? v = e(t, I) || I : v = /* @__PURE__ */ l(Je, { children: I }));
|
|
589
|
-
const S = x &&
|
|
596
|
+
const S = x && f && b && !m;
|
|
590
597
|
return S && (v = /* @__PURE__ */ l(
|
|
591
598
|
qe,
|
|
592
599
|
{
|
|
@@ -648,7 +655,7 @@ function Rn({
|
|
|
648
655
|
depth: i,
|
|
649
656
|
isExpanded: u,
|
|
650
657
|
onToggle: a,
|
|
651
|
-
virtualStart:
|
|
658
|
+
virtualStart: m,
|
|
652
659
|
onContextMenu: d
|
|
653
660
|
}) {
|
|
654
661
|
const R = xn(t)?.baseColumnId ?? t, c = Dn(e) ? e : void 0, s = c?.value ?? e, h = c?.label ?? En(R, s);
|
|
@@ -656,7 +663,7 @@ function Rn({
|
|
|
656
663
|
$t,
|
|
657
664
|
{
|
|
658
665
|
style: {
|
|
659
|
-
transform: `translateY(${
|
|
666
|
+
transform: `translateY(${m}px)`,
|
|
660
667
|
paddingLeft: i * 16
|
|
661
668
|
},
|
|
662
669
|
onClick: a,
|
|
@@ -697,7 +704,7 @@ function Sn({
|
|
|
697
704
|
onRowClick: i,
|
|
698
705
|
onRowDoubleClick: u,
|
|
699
706
|
onRowContextMenu: a,
|
|
700
|
-
cellWrapper:
|
|
707
|
+
cellWrapper: m,
|
|
701
708
|
columnAttributeData: d,
|
|
702
709
|
dataTypeWidgets: E,
|
|
703
710
|
editingState: R,
|
|
@@ -705,9 +712,9 @@ function Sn({
|
|
|
705
712
|
editable: s,
|
|
706
713
|
isInactive: h
|
|
707
714
|
}) {
|
|
708
|
-
const g = P(t.original),
|
|
715
|
+
const g = P(t.original), f = kt(t.original), { transform: b, transition: y, setNodeRef: x, isDragging: w } = Ht({
|
|
709
716
|
id: t.id,
|
|
710
|
-
disabled: g ||
|
|
717
|
+
disabled: g || f
|
|
711
718
|
});
|
|
712
719
|
if (g) {
|
|
713
720
|
const S = t.original;
|
|
@@ -745,13 +752,13 @@ function Sn({
|
|
|
745
752
|
dragging: w,
|
|
746
753
|
selected: o,
|
|
747
754
|
inactive: h,
|
|
748
|
-
"placeholder-row":
|
|
755
|
+
"placeholder-row": f
|
|
749
756
|
}),
|
|
750
757
|
children: /* @__PURE__ */ l(
|
|
751
758
|
Wt,
|
|
752
759
|
{
|
|
753
760
|
row: t,
|
|
754
|
-
cellWrapper:
|
|
761
|
+
cellWrapper: m,
|
|
755
762
|
columnAttributeData: d,
|
|
756
763
|
dataTypeWidgets: E,
|
|
757
764
|
editingState: R,
|
|
@@ -771,11 +778,11 @@ function In({
|
|
|
771
778
|
enableColumnResizing: i = !1,
|
|
772
779
|
isLast: u = !1
|
|
773
780
|
}) {
|
|
774
|
-
const { attributes: a, listeners:
|
|
781
|
+
const { attributes: a, listeners: m, setNodeRef: d, isDragging: E, transform: R, transition: c } = Ht({
|
|
775
782
|
id: t.id,
|
|
776
783
|
data: { type: "column" },
|
|
777
784
|
disabled: !e
|
|
778
|
-
}), s = t.column, h = o && s.getCanSort(), g = s.getIsSorted(),
|
|
785
|
+
}), s = t.column, h = o && s.getCanSort(), g = s.getIsSorted(), f = `list-table-menu-${t.id}`, { menuOpen: b } = Me(), y = b === f, x = h ? [
|
|
779
786
|
{
|
|
780
787
|
id: "sort-asc",
|
|
781
788
|
label: "Sort ascending",
|
|
@@ -820,11 +827,11 @@ function In({
|
|
|
820
827
|
resizing: $,
|
|
821
828
|
sorted: !!g
|
|
822
829
|
}),
|
|
823
|
-
...e ? { ...a, ...
|
|
830
|
+
...e ? { ...a, ...m } : {},
|
|
824
831
|
children: [
|
|
825
832
|
/* @__PURE__ */ l(gn, { children: t.isPlaceholder ? null : ot(t.column.columnDef.header, t.getContext()) }),
|
|
826
833
|
(v.length > 0 || h) && /* @__PURE__ */ M(pn, { ...B, children: [
|
|
827
|
-
v.length > 0 && /* @__PURE__ */ l(
|
|
834
|
+
v.length > 0 && /* @__PURE__ */ l(Ue, { menuItems: v, menuId: f, className: "header-menu" }),
|
|
828
835
|
h && /* @__PURE__ */ l(
|
|
829
836
|
Ye,
|
|
830
837
|
{
|
|
@@ -839,7 +846,7 @@ function In({
|
|
|
839
846
|
)
|
|
840
847
|
] }),
|
|
841
848
|
S && /* @__PURE__ */ l(
|
|
842
|
-
|
|
849
|
+
mn,
|
|
843
850
|
{
|
|
844
851
|
className: A("resize-handle", { resizing: z }),
|
|
845
852
|
style: { transform: H ? `translateX(${H}px)` : void 0 },
|
|
@@ -879,15 +886,15 @@ function wn({
|
|
|
879
886
|
rowVirtualizer: i,
|
|
880
887
|
tableContainerRef: u
|
|
881
888
|
}) {
|
|
882
|
-
const [a,
|
|
889
|
+
const [a, m] = L(-1), d = At(-1), E = O(
|
|
883
890
|
(c, s, h) => {
|
|
884
891
|
const g = t[s];
|
|
885
892
|
if (!(g && W(g))) {
|
|
886
893
|
if (r && h.shiftKey && d.current >= 0) {
|
|
887
|
-
const
|
|
894
|
+
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);
|
|
888
895
|
h.metaKey || h.ctrlKey ? o?.(Array.from(/* @__PURE__ */ new Set([...e, ...y]))) : o?.(y);
|
|
889
|
-
} else r && (h.metaKey || h.ctrlKey) ? (e.includes(c) ? o?.(e.filter((
|
|
890
|
-
|
|
896
|
+
} 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);
|
|
897
|
+
m(s), u.current?.focus();
|
|
891
898
|
}
|
|
892
899
|
},
|
|
893
900
|
[e, t, o, r, u]
|
|
@@ -906,17 +913,17 @@ function wn({
|
|
|
906
913
|
break;
|
|
907
914
|
}
|
|
908
915
|
if (g === a || W(t[g])) return;
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
916
|
+
const f = t[g]?.id;
|
|
917
|
+
if (f) {
|
|
911
918
|
if (c.shiftKey && r)
|
|
912
|
-
if (e.includes(
|
|
919
|
+
if (e.includes(f)) {
|
|
913
920
|
const b = t[a]?.id;
|
|
914
921
|
b && o?.(e.filter((y) => y !== b));
|
|
915
922
|
} else
|
|
916
|
-
o?.([...e,
|
|
923
|
+
o?.([...e, f]);
|
|
917
924
|
else
|
|
918
|
-
o?.([
|
|
919
|
-
|
|
925
|
+
o?.([f]), d.current = g;
|
|
926
|
+
m(g), i.scrollToIndex(g, { behavior: "smooth" });
|
|
920
927
|
}
|
|
921
928
|
},
|
|
922
929
|
[a, t, e, o, i]
|
|
@@ -924,8 +931,8 @@ function wn({
|
|
|
924
931
|
return { activeRowIndex: a, handleRowClick: E, handleKeyDown: R };
|
|
925
932
|
}
|
|
926
933
|
function Vn() {
|
|
927
|
-
const [t, e] = L(null), [o, r] = L(null), i = O((
|
|
928
|
-
e(
|
|
934
|
+
const [t, e] = L(null), [o, r] = L(null), i = O((m) => {
|
|
935
|
+
e(m);
|
|
929
936
|
}, []), u = O(() => {
|
|
930
937
|
e(null), r(null);
|
|
931
938
|
}, []);
|
|
@@ -947,14 +954,14 @@ function _n({
|
|
|
947
954
|
setColumnOrder: r,
|
|
948
955
|
onColumnOrderChange: i
|
|
949
956
|
}) {
|
|
950
|
-
const [u, a] = L(null), [
|
|
957
|
+
const [u, a] = L(null), [m, d] = L(null);
|
|
951
958
|
return {
|
|
952
|
-
sensors:
|
|
953
|
-
Ct(
|
|
954
|
-
Ct(
|
|
959
|
+
sensors: Oe(
|
|
960
|
+
Ct($e),
|
|
961
|
+
Ct(Ne, { coordinateGetter: We })
|
|
955
962
|
),
|
|
956
963
|
activeRowId: u,
|
|
957
|
-
activeColumnId:
|
|
964
|
+
activeColumnId: m,
|
|
958
965
|
handleColumnDragStart: (b) => {
|
|
959
966
|
d(b.active.id);
|
|
960
967
|
},
|
|
@@ -964,7 +971,7 @@ function _n({
|
|
|
964
971
|
if (x && y.id !== x.id) {
|
|
965
972
|
const w = e.indexOf(y.id), I = e.indexOf(x.id);
|
|
966
973
|
if (w !== -1 && I !== -1) {
|
|
967
|
-
const v =
|
|
974
|
+
const v = Pe(e, w, I);
|
|
968
975
|
r(() => v), i?.(v);
|
|
969
976
|
}
|
|
970
977
|
}
|
|
@@ -994,7 +1001,7 @@ function kn(t) {
|
|
|
994
1001
|
}, [o, e]);
|
|
995
1002
|
}
|
|
996
1003
|
const Ln = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [];
|
|
997
|
-
function
|
|
1004
|
+
function wo({
|
|
998
1005
|
data: t,
|
|
999
1006
|
columns: e,
|
|
1000
1007
|
getRowId: o,
|
|
@@ -1002,7 +1009,7 @@ function Do({
|
|
|
1002
1009
|
hasNextPage: i,
|
|
1003
1010
|
isFetchingNextPage: u,
|
|
1004
1011
|
onUpdateRow: a,
|
|
1005
|
-
onOpenViewer:
|
|
1012
|
+
onOpenViewer: m,
|
|
1006
1013
|
editable: d = !0,
|
|
1007
1014
|
onReorderRows: E,
|
|
1008
1015
|
rowContextMenuBuilders: R = [],
|
|
@@ -1010,7 +1017,7 @@ function Do({
|
|
|
1010
1017
|
selectedRows: s = [],
|
|
1011
1018
|
onSelectedRowsChange: h,
|
|
1012
1019
|
multiSelection: g = !1,
|
|
1013
|
-
cellWrapper:
|
|
1020
|
+
cellWrapper: f,
|
|
1014
1021
|
columnAttributeData: b,
|
|
1015
1022
|
dataTypeWidgets: y,
|
|
1016
1023
|
enableColumnReordering: x = !1,
|
|
@@ -1031,7 +1038,7 @@ function Do({
|
|
|
1031
1038
|
onExpandedChange: Jt,
|
|
1032
1039
|
getIsRowInactive: it
|
|
1033
1040
|
}) {
|
|
1034
|
-
const [qt, Qt] = L([]), [Zt, te] = L({}), [ee, ne] = L({}), [oe, ie] = L({}), Y = At(null), [rt] =
|
|
1041
|
+
const [qt, Qt] = L([]), [Zt, te] = L({}), [ee, ne] = L({}), [oe, ie] = L({}), Y = At(null), [rt] = Ae(), st = Bt ?? qt, re = (n) => {
|
|
1035
1042
|
const p = typeof n == "function" ? n(st) : n;
|
|
1036
1043
|
Qt(p), Yt?.(p);
|
|
1037
1044
|
}, at = Xt ?? oe, se = (n) => {
|
|
@@ -1086,9 +1093,9 @@ function Do({
|
|
|
1086
1093
|
getRowCanExpand: (n) => n.subRows.length > 0,
|
|
1087
1094
|
meta: {
|
|
1088
1095
|
updateData: a,
|
|
1089
|
-
openViewerDialog:
|
|
1096
|
+
openViewerDialog: m
|
|
1090
1097
|
}
|
|
1091
|
-
}), { rows: _ } = N.getRowModel(), X =
|
|
1098
|
+
}), { rows: _ } = N.getRowModel(), X = He({
|
|
1092
1099
|
count: i ? _.length + 1 : _.length,
|
|
1093
1100
|
getScrollElement: () => Y.current,
|
|
1094
1101
|
estimateSize: () => 44,
|
|
@@ -1146,20 +1153,20 @@ function Do({
|
|
|
1146
1153
|
[R, _, s, h, rt]
|
|
1147
1154
|
), { editingState: gt } = Vn(), {
|
|
1148
1155
|
sensors: pt,
|
|
1149
|
-
activeRowId:
|
|
1150
|
-
activeColumnId:
|
|
1156
|
+
activeRowId: mt,
|
|
1157
|
+
activeColumnId: ft,
|
|
1151
1158
|
handleColumnDragStart: pe,
|
|
1152
|
-
handleColumnDragEnd:
|
|
1153
|
-
handleColumnDragCancel:
|
|
1159
|
+
handleColumnDragEnd: me,
|
|
1160
|
+
handleColumnDragCancel: fe,
|
|
1154
1161
|
handleRowDragStart: he,
|
|
1155
1162
|
handleRowDragEnd: be,
|
|
1156
1163
|
handleRowDragCancel: ye
|
|
1157
|
-
} = _n({ rows: _, columnOrder: ct, onReorderRows: E, setColumnOrder: ut, onColumnOrderChange: I }), ht = et(() => ({ onUpdateRow: a, onOpenViewer:
|
|
1164
|
+
} = _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;
|
|
1158
1165
|
Mt(() => {
|
|
1159
1166
|
const [n] = J.slice(-1);
|
|
1160
1167
|
n && n.index >= _.length - 1 && i && !u && r?.();
|
|
1161
1168
|
}, [i, r, _.length, u, J]);
|
|
1162
|
-
const q =
|
|
1169
|
+
const q = mt ? _.find((n) => n.id === mt) : null, j = ft ? N.getHeaderGroups()[0]?.headers.find((n) => n.id === ft) : null;
|
|
1163
1170
|
return /* @__PURE__ */ l(
|
|
1164
1171
|
Qe,
|
|
1165
1172
|
{
|
|
@@ -1174,15 +1181,15 @@ function Do({
|
|
|
1174
1181
|
sensors: pt,
|
|
1175
1182
|
collisionDetection: Dt,
|
|
1176
1183
|
onDragStart: pe,
|
|
1177
|
-
onDragEnd:
|
|
1178
|
-
onDragCancel:
|
|
1179
|
-
modifiers: [
|
|
1184
|
+
onDragEnd: me,
|
|
1185
|
+
onDragCancel: fe,
|
|
1186
|
+
modifiers: [je],
|
|
1180
1187
|
children: [
|
|
1181
1188
|
/* @__PURE__ */ l(tn, { children: N.getHeaderGroups().map((n) => /* @__PURE__ */ l(en, { children: /* @__PURE__ */ l(
|
|
1182
1189
|
St,
|
|
1183
1190
|
{
|
|
1184
1191
|
items: n.headers.map((p) => p.id),
|
|
1185
|
-
strategy:
|
|
1192
|
+
strategy: Fe,
|
|
1186
1193
|
children: n.headers.map((p, D) => /* @__PURE__ */ l(
|
|
1187
1194
|
In,
|
|
1188
1195
|
{
|
|
@@ -1222,13 +1229,13 @@ function Do({
|
|
|
1222
1229
|
onDragStart: he,
|
|
1223
1230
|
onDragEnd: be,
|
|
1224
1231
|
onDragCancel: ye,
|
|
1225
|
-
modifiers: [
|
|
1232
|
+
modifiers: [Ke],
|
|
1226
1233
|
children: [
|
|
1227
1234
|
/* @__PURE__ */ l(Tt, { style: { height: `${X.getTotalSize()}px` }, children: /* @__PURE__ */ l(
|
|
1228
1235
|
St,
|
|
1229
1236
|
{
|
|
1230
1237
|
items: _.map((n) => n.id),
|
|
1231
|
-
strategy:
|
|
1238
|
+
strategy: Be,
|
|
1232
1239
|
children: J.map((n) => {
|
|
1233
1240
|
if (n.index > _.length - 1)
|
|
1234
1241
|
return /* @__PURE__ */ l(
|
|
@@ -1250,7 +1257,7 @@ function Do({
|
|
|
1250
1257
|
onRowClick: de,
|
|
1251
1258
|
onRowDoubleClick: c ? ue : void 0,
|
|
1252
1259
|
onRowContextMenu: R.length > 0 ? ge : void 0,
|
|
1253
|
-
cellWrapper:
|
|
1260
|
+
cellWrapper: f,
|
|
1254
1261
|
columnAttributeData: b,
|
|
1255
1262
|
dataTypeWidgets: y,
|
|
1256
1263
|
editingState: gt,
|
|
@@ -1279,7 +1286,7 @@ function Do({
|
|
|
1279
1286
|
Wt,
|
|
1280
1287
|
{
|
|
1281
1288
|
row: q,
|
|
1282
|
-
cellWrapper:
|
|
1289
|
+
cellWrapper: f,
|
|
1283
1290
|
columnAttributeData: b,
|
|
1284
1291
|
dataTypeWidgets: y,
|
|
1285
1292
|
editingState: gt,
|
|
@@ -1311,38 +1318,38 @@ const Pt = (t) => !!t && typeof t == "object" && ("label" in t || "value" in t),
|
|
|
1311
1318
|
}), o.forEach((i) => {
|
|
1312
1319
|
i.subRows = Ft(i.subRows, e);
|
|
1313
1320
|
}), [...o, ...r];
|
|
1314
|
-
},
|
|
1315
|
-
const a = [],
|
|
1321
|
+
}, Vo = (t, e, o, r, i, u) => {
|
|
1322
|
+
const a = [], m = (d, E, R, c) => {
|
|
1316
1323
|
if (!R.length) {
|
|
1317
1324
|
d.push(E);
|
|
1318
1325
|
return;
|
|
1319
1326
|
}
|
|
1320
1327
|
const [s, ...h] = R, g = r(s, E) ?? [u(E, s)];
|
|
1321
1328
|
if (!g.length) {
|
|
1322
|
-
|
|
1329
|
+
m(d, E, h, c);
|
|
1323
1330
|
return;
|
|
1324
1331
|
}
|
|
1325
|
-
const
|
|
1332
|
+
const f = (b, y, x) => {
|
|
1326
1333
|
const w = g[y], I = Gn(w), v = `${x}|${s}:${y}:${JSON.stringify(I)}`;
|
|
1327
1334
|
let S = b.find(
|
|
1328
1335
|
(z) => nt(z) && z.__groupKey === v
|
|
1329
1336
|
);
|
|
1330
1337
|
if (S || (S = i(s, v, w), b.push(S)), y < g.length - 1) {
|
|
1331
|
-
|
|
1338
|
+
f(S.subRows, y + 1, v);
|
|
1332
1339
|
return;
|
|
1333
1340
|
}
|
|
1334
|
-
|
|
1341
|
+
m(S.subRows, E, h, v);
|
|
1335
1342
|
};
|
|
1336
|
-
|
|
1343
|
+
f(d, 0, c);
|
|
1337
1344
|
};
|
|
1338
|
-
return t.forEach((d) =>
|
|
1345
|
+
return t.forEach((d) => m(a, d, e, "root")), Ft(a, o);
|
|
1339
1346
|
};
|
|
1340
1347
|
export {
|
|
1341
|
-
|
|
1342
|
-
|
|
1348
|
+
wo as ListTable,
|
|
1349
|
+
Vo as buildGroupedData,
|
|
1343
1350
|
Mn as compareGroupingPathItems,
|
|
1344
1351
|
bn as defaultListTableDataTypeWidgets,
|
|
1345
|
-
|
|
1352
|
+
To as getDefaultListTableDataTypeWidgets,
|
|
1346
1353
|
Gn as getGroupItemValue,
|
|
1347
1354
|
Kt as getListTableCellId,
|
|
1348
1355
|
Pt as isListTableGroupDisplayObject,
|