@ynput/ayon-frontend-shared 0.5.0 → 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 +88 -86
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +77 -67
- package/dist/ProjectTreeTable.es.js +1164 -1150
- package/dist/Slicer.es.js +2 -2
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +23 -23
- package/dist/chunks/DeleteEntitiesContext.es.js +115 -115
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +20 -20
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +12 -12
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GlobalContext.es.js +14 -14
- package/dist/chunks/Menu.es.js +1 -1
- package/dist/chunks/MenuContext.es.js +51 -242
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3341 -3899
- package/dist/chunks/NewEntityContext.es.js +40 -40
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +13 -13
- package/dist/chunks/ProjectFoldersContext.es.js +5 -5
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +85 -76
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +1 -1
- package/dist/chunks/Slicer.es.js +173 -171
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +29 -29
- package/dist/chunks/ViewsContext.es.js +90 -90
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +31 -31
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +271 -269
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +177 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +11 -11
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +9 -9
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +19 -19
- package/dist/components.es.js +165 -160
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +104 -98
- package/dist/index.es.js +18 -13
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +16 -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 +20 -16
- package/dist/types/RepresentationsList.d.ts +16 -16
- package/dist/types/SimpleTable.d.ts +16 -16
- package/dist/types/Slicer.d.ts +16 -16
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +391 -95
- package/dist/types/components.d.ts +79 -20
- 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 +16 -4
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
|
@@ -1,62 +1,74 @@
|
|
|
1
|
-
import { jsx as N, jsxs as Oe, Fragment as
|
|
2
|
-
import Ke, { useState as Pe, useCallback as K, useRef as Ne, useMemo as
|
|
3
|
-
import { useVirtualizer as
|
|
4
|
-
import { functionalUpdate as ht, useReactTable as
|
|
1
|
+
import { jsx as N, jsxs as Oe, Fragment as pn } from "react/jsx-runtime";
|
|
2
|
+
import Ke, { useState as Pe, useCallback as K, useRef as Ne, useMemo as W, useEffect as Fe, useLayoutEffect as oo } from "react";
|
|
3
|
+
import { useVirtualizer as Pn } from "@tanstack/react-virtual";
|
|
4
|
+
import { functionalUpdate as ht, useReactTable as so, filterFns as ro, getSortedRowModel as io, getExpandedRowModel as ao, getFilteredRowModel as lo, getCoreRowModel as co, flexRender as en } from "@tanstack/react-table";
|
|
5
5
|
import Ue from "clsx";
|
|
6
|
-
import { a as Ve,
|
|
7
|
-
import {
|
|
8
|
-
import { C as
|
|
9
|
-
import { SEARCH_FILTER_ID as
|
|
10
|
-
import { u as
|
|
6
|
+
import { a as Ve, l as uo, m as Ye, p as re, e as fo, n as mo, o as po, q as Dn, r as ye, s as go, h as tn, t as ho, v as Ut, G as Jt, w as Nt, U as gn, x as Zt, y as yo, z as Io, u as it, A as pt, F as bo, H as Co, R as wo, I as So, J as To, K as Eo, N as xo, O as vo, Q as Ro, V as ko, W as An, X as nn, Y as Po, Z as Do, _ as Ao, $ as Mo, a0 as hn, a1 as Oo, k as yn, a2 as Fo, a3 as Lo, a4 as Mn, a5 as On, a6 as _o, a7 as No, a8 as zo } from "./chunks/MetaWidget.es.js";
|
|
7
|
+
import { B as zi, a9 as Bi, aa as Ui, ab as Gi, ac as $i, ad as Wi, ae as Hi, i as Vi, af as Ki, ag as qi, ah as ji, ai as Qi, aj as Xi, ak as Yi, al as Ji, am as Zi, an as ea, j as ta, ao as na, ap as oa, aq as sa, ar as ra, M as ia, as as aa, at as la, au as ca, av as da, aw as ua, ax as fa, ay as ma, az as pa, aA as ga, aB as ha, aC as ya, aD as Ia, aE as ba, aF as Ca, T as wa, aG as Sa, aH as Ta, aI as Ea, aJ as xa, aK as va, aL as Ra, aM as ka, aN as Pa, aO as Da, aP as Aa, aQ as Ma, aR as Oa, aS as Fa, aT as La, aU as _a, aV as Na, aW as za, aX as Ba, aY as Ua, aZ as Ga, a_ as $a, a$ as Wa, b0 as Ha, b1 as Va, b2 as Ka, b3 as qa, b4 as ja, b5 as Qa, b6 as Xa, b7 as Ya, b8 as Ja, b9 as Za, ba as el, bb as tl, bc as nl, bd as ol, be as sl, bf as rl, bg as il, bh as al, bi as ll, bj as cl, g as dl, bk as ul, f as fl, bl as ml } from "./chunks/MetaWidget.es.js";
|
|
8
|
+
import { C as Bo, T as Uo, g as Gt, b as $t, c as In, H as bn } from "./chunks/ColumnDropIndicator.es.js";
|
|
9
|
+
import { SEARCH_FILTER_ID as Go, Icon as on, Button as jt } from "@ynput/ayon-react-components";
|
|
10
|
+
import { u as Fn } from "./chunks/MenuContext.es.js";
|
|
11
11
|
import { toast as he } from "react-toastify";
|
|
12
|
-
import { isEqual as
|
|
12
|
+
import { isEqual as gt, debounce as $o, throttle as Wo } from "lodash";
|
|
13
13
|
import "primereact/confirmdialog";
|
|
14
14
|
import "uuid";
|
|
15
|
-
import { be as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import "
|
|
15
|
+
import { ay as Cn, be as Ln } from "./chunks/searchTerms.es.js";
|
|
16
|
+
import "./chunks/PlayableIcon.es.js";
|
|
17
|
+
import "lexical";
|
|
18
|
+
import "@lexical/markdown";
|
|
19
|
+
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
20
|
+
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
21
|
+
import "match-sorter";
|
|
19
22
|
import "date-fns";
|
|
23
|
+
import "@lexical/code";
|
|
24
|
+
import "@lexical/list";
|
|
25
|
+
import "@lexical/rich-text";
|
|
26
|
+
import "@lexical/selection";
|
|
27
|
+
import "@lexical/utils";
|
|
28
|
+
import { dq as Ho, dz as yt, bW as Vo, c8 as Ko, bw as wn, ck as qo, bL as jo, dA as Qo } from "./chunks/getUris.es.js";
|
|
29
|
+
import { dB as gl } from "./chunks/getUris.es.js";
|
|
30
|
+
import "react-router-dom";
|
|
20
31
|
import { a as It } from "./chunks/ProjectContext.es.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { a as Yo } from "./chunks/useCreateContextMenu.es.js";
|
|
24
|
-
import { g as Jo } from "./chunks/DeleteEntitiesContext.es.js";
|
|
32
|
+
import { a as Xo } from "./chunks/useCreateContextMenu.es.js";
|
|
33
|
+
import { g as Yo } from "./chunks/DeleteEntitiesContext.es.js";
|
|
25
34
|
import "./chunks/GlobalContext.es.js";
|
|
26
|
-
import {
|
|
35
|
+
import { a as Jo, u as Zo } from "./chunks/useLocalStorage.es.js";
|
|
27
36
|
import "@module-federation/enhanced/runtime";
|
|
28
37
|
import "semver";
|
|
29
38
|
import "./chunks/ProjectFoldersContextInstance.es.js";
|
|
30
|
-
import { i as
|
|
31
|
-
import { T as
|
|
32
|
-
import { useSensors as
|
|
33
|
-
import { arrayMove as
|
|
39
|
+
import { i as es, u as ts } from "./chunks/useColumnDragRestriction.es.js";
|
|
40
|
+
import { T as yl, a as Il, b as bl } from "./chunks/useColumnDragRestriction.es.js";
|
|
41
|
+
import { useSensors as ns, useSensor as Qt, MouseSensor as os, TouchSensor as ss, KeyboardSensor as rs, closestCenter as Sn, DndContext as is, useDndMonitor as as, DragOverlay as _n, useDndContext as ls } from "@dnd-kit/core";
|
|
42
|
+
import { arrayMove as Tn, SortableContext as Nn, verticalListSortingStrategy as cs, horizontalListSortingStrategy as ds, useSortable as zn } from "@dnd-kit/sortable";
|
|
34
43
|
import { D as Ae, R as ae } from "./chunks/realtimeUpdatesUtils.es.js";
|
|
35
|
-
import { C as
|
|
44
|
+
import { C as wl, W as Sl, h as Tl } from "./chunks/realtimeUpdatesUtils.es.js";
|
|
36
45
|
import { E as Xt } from "./chunks/EmptyPlaceholder.es.js";
|
|
37
46
|
import "./chunks/Menu.es.js";
|
|
38
|
-
import { I as
|
|
39
|
-
import { a as
|
|
47
|
+
import { I as us } from "./chunks/InfoMessage.es.js";
|
|
48
|
+
import { a as fs } from "./chunks/FilterErrorActions.es.js";
|
|
40
49
|
import { a as Ot, K as Ft } from "./chunks/platform.es.js";
|
|
41
|
-
import { b as
|
|
50
|
+
import { b as ms, n as rt } from "./chunks/entityDefinitions.es.js";
|
|
42
51
|
import { createPortal as zt } from "react-dom";
|
|
43
|
-
import { CSS as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
52
|
+
import { CSS as Bn } from "@dnd-kit/utilities";
|
|
53
|
+
import { s as ps } from "./chunks/DetailsPanelContext.es.js";
|
|
54
|
+
import { u as gs } from "./chunks/useAttributeEnums.es.js";
|
|
55
|
+
import { a as xl } from "./chunks/useAttributeEnums.es.js";
|
|
46
56
|
import { a as hs } from "./chunks/queryFilterToClientFilter.es.js";
|
|
47
|
-
import { c as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import { u as
|
|
52
|
-
|
|
57
|
+
import { c as Rl, q as kl, t as Pl, b as Dl } from "./chunks/queryFilterToClientFilter.es.js";
|
|
58
|
+
import { e as ys } from "./chunks/expandRelativeDates.es.js";
|
|
59
|
+
import { c as Ml, i as Ol, r as Fl } from "./chunks/expandRelativeDates.es.js";
|
|
60
|
+
import { r as Is, a as bs } from "./chunks/refreshActiveAndPurgeOthers.es.js";
|
|
61
|
+
import { u as Cs } from "./chunks/useGroupedPagination.es.js";
|
|
62
|
+
import { g as ws } from "./chunks/getGroupByDataType.es.js";
|
|
63
|
+
import { u as Ss } from "./chunks/ProjectFoldersContext.es.js";
|
|
64
|
+
const Ts = ({
|
|
53
65
|
users: e,
|
|
54
66
|
statuses: t,
|
|
55
67
|
folderTypes: n,
|
|
56
68
|
taskTypes: r,
|
|
57
69
|
productTypes: i,
|
|
58
70
|
tags: f,
|
|
59
|
-
scopes:
|
|
71
|
+
scopes: p
|
|
60
72
|
}) => {
|
|
61
73
|
const m = (s) => t.filter(
|
|
62
74
|
(a) => !a.scope || s.some((o) => a.scope?.includes(o))
|
|
@@ -73,7 +85,7 @@ const Ss = ({
|
|
|
73
85
|
label: a || s,
|
|
74
86
|
icon: `/api/users/${s}/avatar`
|
|
75
87
|
})),
|
|
76
|
-
status: m(
|
|
88
|
+
status: m(p),
|
|
77
89
|
folderStatus: m(["folder"]),
|
|
78
90
|
taskStatus: m(["task"]),
|
|
79
91
|
tag: f.map(({ name: s, color: a }) => ({ value: s, label: s, color: a })),
|
|
@@ -91,7 +103,7 @@ const Ss = ({
|
|
|
91
103
|
color: o
|
|
92
104
|
}))
|
|
93
105
|
};
|
|
94
|
-
},
|
|
106
|
+
}, Es = {
|
|
95
107
|
name: ["name"],
|
|
96
108
|
label: ["label"],
|
|
97
109
|
status: ["status"],
|
|
@@ -103,14 +115,14 @@ const Ss = ({
|
|
|
103
115
|
taskType: ["taskType", "task_type"],
|
|
104
116
|
productType: ["productType", "product_type"],
|
|
105
117
|
author: ["author"]
|
|
106
|
-
},
|
|
118
|
+
}, xs = (e, t, n = []) => {
|
|
107
119
|
let r = e.filter((a) => a.readOnly).map((a) => a.name), i;
|
|
108
120
|
const f = [];
|
|
109
|
-
let
|
|
121
|
+
let p = !1, m = !1;
|
|
110
122
|
if (t?.length) {
|
|
111
123
|
const a = new Set(t), o = (u) => u.some((c) => a.has(c));
|
|
112
|
-
Object.entries(
|
|
113
|
-
o(c) || (f.push(u), u === "folderType" && (
|
|
124
|
+
Object.entries(Es).forEach(([u, c]) => {
|
|
125
|
+
o(c) || (f.push(u), u === "folderType" && (p = !0), u === "taskType" && (m = !0));
|
|
114
126
|
});
|
|
115
127
|
}
|
|
116
128
|
if (n?.includes("attrib") ? (r = e.filter((a) => a.builtin).map((a) => a.name), i = /* @__PURE__ */ new Set([
|
|
@@ -132,37 +144,37 @@ const Ss = ({
|
|
|
132
144
|
const o = a.replace("attrib_", "");
|
|
133
145
|
e.find((u) => u.name === o) && !r.includes(o) && r.push(o);
|
|
134
146
|
}
|
|
135
|
-
})),
|
|
147
|
+
})), p && m && (i.add("subType"), r.includes("subType") || r.push("subType")), f.length)
|
|
136
148
|
for (const a of f)
|
|
137
149
|
r.includes(a) || r.push(a);
|
|
138
150
|
return { readOnlyColumns: Array.from(i), readOnlyAttribs: r };
|
|
139
151
|
}, vs = (e = 50) => {
|
|
140
152
|
const [t, n] = Pe([]), [r, i] = Pe([]), f = K(
|
|
141
153
|
(u, c) => {
|
|
142
|
-
u.length && (n((
|
|
143
|
-
const E = [...
|
|
154
|
+
u.length && (n((v) => {
|
|
155
|
+
const E = [...v, { undo: u, redo: c, timestamp: Date.now() }];
|
|
144
156
|
return E.length > e ? E.slice(E.length - e) : E;
|
|
145
157
|
}), i([]));
|
|
146
158
|
},
|
|
147
159
|
[e]
|
|
148
|
-
),
|
|
149
|
-
(c,
|
|
150
|
-
entityId:
|
|
151
|
-
entityType:
|
|
152
|
-
folderId:
|
|
153
|
-
attribs: [
|
|
154
|
-
ownAttrib:
|
|
155
|
-
rowId:
|
|
156
|
-
}) : c[0].push(
|
|
160
|
+
), p = (u) => u.reduce(
|
|
161
|
+
(c, v) => (typeof v == "function" ? c[2].push(v) : v.wasInherited ? c[1].push({
|
|
162
|
+
entityId: v.id,
|
|
163
|
+
entityType: v.type,
|
|
164
|
+
folderId: v.folderId,
|
|
165
|
+
attribs: [v.field],
|
|
166
|
+
ownAttrib: v.ownAttrib,
|
|
167
|
+
rowId: v.rowId
|
|
168
|
+
}) : c[0].push(v), c),
|
|
157
169
|
[[], [], []]
|
|
158
170
|
), m = K(() => {
|
|
159
171
|
if (t.length === 0) return null;
|
|
160
172
|
const u = [...t], c = u.pop();
|
|
161
|
-
return n(u), c.redo && i((
|
|
173
|
+
return n(u), c.redo && i((v) => [...v, c]), p(c.undo);
|
|
162
174
|
}, [t]), s = K(() => {
|
|
163
175
|
if (r.length === 0) return null;
|
|
164
176
|
const u = [...r], c = u.pop();
|
|
165
|
-
return i(u), n((
|
|
177
|
+
return i(u), n((v) => [...v, c]), c.redo ? p(c.redo) : null;
|
|
166
178
|
}, [r]), a = K((u) => {
|
|
167
179
|
n((c) => c.slice(0, Math.max(0, c.length - u))), i((c) => c.slice(0, Math.max(0, c.length - u)));
|
|
168
180
|
}, []), o = K(() => {
|
|
@@ -190,60 +202,60 @@ const Ss = ({
|
|
|
190
202
|
default:
|
|
191
203
|
return `Failed to update ${t}: ${n}`;
|
|
192
204
|
}
|
|
193
|
-
},
|
|
205
|
+
}, Rs = (e) => {
|
|
194
206
|
const { pushHistory: t, removeHistoryEntries: n } = e || {}, { projectName: r } = It(), {
|
|
195
207
|
getEntityById: i,
|
|
196
208
|
getInheritedDependents: f,
|
|
197
|
-
findInheritedValueFromAncestors:
|
|
209
|
+
findInheritedValueFromAncestors: p,
|
|
198
210
|
findNonInheritedValues: m
|
|
199
|
-
} = Ve(), { updateEntities: s } =
|
|
211
|
+
} = Ve(), { updateEntities: s } = uo(), a = K(
|
|
200
212
|
async (u = [], c = !0) => {
|
|
201
213
|
if (!u.length || !r)
|
|
202
214
|
return;
|
|
203
|
-
let
|
|
204
|
-
const E =
|
|
215
|
+
let v = u.filter((S) => !S.isLink);
|
|
216
|
+
const E = v.filter((S) => !(S.field === "folderType" && S.type === "folder" && (i(S.id) || S.entityData)?.hasVersions)), F = v.length - E.length;
|
|
205
217
|
if (F > 0 && he.error(
|
|
206
218
|
`Cannot change folder type for ${F} folder${F > 1 ? "s" : ""} with published versions`
|
|
207
|
-
),
|
|
219
|
+
), v = E, !v.length)
|
|
208
220
|
return;
|
|
209
221
|
if (t && c) {
|
|
210
|
-
const
|
|
211
|
-
({ rowId: z, id:
|
|
212
|
-
const l = i(
|
|
222
|
+
const S = v.map(
|
|
223
|
+
({ rowId: z, id: M, type: b, field: D, isAttrib: A, meta: T, entityData: y }) => {
|
|
224
|
+
const l = i(M) || y;
|
|
213
225
|
if (!l)
|
|
214
|
-
throw "Entity not found: " +
|
|
215
|
-
const
|
|
226
|
+
throw "Entity not found: " + M;
|
|
227
|
+
const I = l?.entityId || l.id, x = A ? l.attrib?.[D] ?? null : l[D] ?? null, C = l?.ownAttrib || [], R = A && !C.includes(D);
|
|
216
228
|
return {
|
|
217
229
|
rowId: z,
|
|
218
|
-
id:
|
|
230
|
+
id: I,
|
|
219
231
|
type: b,
|
|
220
232
|
field: D,
|
|
221
|
-
value:
|
|
233
|
+
value: x,
|
|
222
234
|
isAttrib: A,
|
|
223
235
|
wasInherited: R,
|
|
224
236
|
// Track inheritance status for undo
|
|
225
237
|
ownAttrib: C,
|
|
226
238
|
folderId: l?.folderId || l?.parentId,
|
|
227
|
-
meta:
|
|
239
|
+
meta: T
|
|
228
240
|
};
|
|
229
241
|
}
|
|
230
|
-
), $ =
|
|
231
|
-
({ rowId: z, id:
|
|
232
|
-
const
|
|
233
|
-
return
|
|
242
|
+
), $ = v.flatMap(
|
|
243
|
+
({ rowId: z, id: M, type: b, field: D, value: A, isAttrib: T, meta: y, entityData: l }) => {
|
|
244
|
+
const I = i(M) || l, x = I?.entityId || I?.id || M;
|
|
245
|
+
return I ? {
|
|
234
246
|
rowId: z,
|
|
235
|
-
id:
|
|
247
|
+
id: x,
|
|
236
248
|
type: b,
|
|
237
249
|
field: D,
|
|
238
250
|
value: A,
|
|
239
|
-
isAttrib:
|
|
240
|
-
ownAttrib:
|
|
241
|
-
folderId: "folderId" in
|
|
242
|
-
meta:
|
|
251
|
+
isAttrib: T,
|
|
252
|
+
ownAttrib: I?.ownAttrib || [],
|
|
253
|
+
folderId: "folderId" in I ? I.folderId : I?.parentId,
|
|
254
|
+
meta: y
|
|
243
255
|
} : [];
|
|
244
256
|
}
|
|
245
257
|
);
|
|
246
|
-
t(
|
|
258
|
+
t(S, $);
|
|
247
259
|
}
|
|
248
260
|
const w = [
|
|
249
261
|
"task",
|
|
@@ -252,46 +264,46 @@ const Ss = ({
|
|
|
252
264
|
"version"
|
|
253
265
|
];
|
|
254
266
|
let d = [];
|
|
255
|
-
for (const
|
|
256
|
-
let { id: $, type: z, field:
|
|
257
|
-
const
|
|
258
|
-
let
|
|
259
|
-
if (!w.includes(
|
|
267
|
+
for (const S of v) {
|
|
268
|
+
let { id: $, type: z, field: M, value: b, isAttrib: D, meta: A, entityData: T } = S;
|
|
269
|
+
const y = i($) || T, l = y?.entityId || y?.id || $;
|
|
270
|
+
let I = z;
|
|
271
|
+
if (!w.includes(I))
|
|
260
272
|
continue;
|
|
261
|
-
const
|
|
273
|
+
const x = D ? { attrib: { [M]: b } } : { [M]: b };
|
|
262
274
|
if (D) {
|
|
263
|
-
const R = [...
|
|
264
|
-
R.includes(
|
|
275
|
+
const R = [...y?.ownAttrib || []];
|
|
276
|
+
R.includes(M) || R.push(M), x.ownAttrib = R;
|
|
265
277
|
}
|
|
266
278
|
const C = d.findIndex(
|
|
267
|
-
(R) => R.entityId === l && R.entityType ===
|
|
279
|
+
(R) => R.entityId === l && R.entityType === I
|
|
268
280
|
);
|
|
269
281
|
if (C !== -1) {
|
|
270
282
|
const R = d[C];
|
|
271
|
-
let L = { ...R.data, ...
|
|
272
|
-
R.data?.attrib &&
|
|
283
|
+
let L = { ...R.data, ...x };
|
|
284
|
+
R.data?.attrib && x.attrib && (L = { ...L, attrib: { ...R.data.attrib, ...x.attrib } }), d[C] = {
|
|
273
285
|
...R,
|
|
274
286
|
data: L
|
|
275
287
|
};
|
|
276
288
|
} else
|
|
277
289
|
d.push({
|
|
278
|
-
entityType:
|
|
290
|
+
entityType: I,
|
|
279
291
|
entityId: l,
|
|
280
|
-
rowId:
|
|
292
|
+
rowId: S.rowId,
|
|
281
293
|
type: "update",
|
|
282
|
-
data:
|
|
294
|
+
data: x,
|
|
283
295
|
meta: A
|
|
284
296
|
});
|
|
285
297
|
}
|
|
286
|
-
const
|
|
287
|
-
entityId:
|
|
288
|
-
entityType:
|
|
289
|
-
attrib:
|
|
290
|
-
})), P = f(
|
|
291
|
-
entityId:
|
|
292
|
-
entityType:
|
|
298
|
+
const g = d.filter((S) => !!S.entityId && S.type === "update" && S.data && "attrib" in S.data).map((S) => ({
|
|
299
|
+
entityId: S.entityId,
|
|
300
|
+
entityType: S.entityType,
|
|
301
|
+
attrib: S.data && "attrib" in S.data ? S.data?.attrib : {}
|
|
302
|
+
})), P = f(g).map((S) => ({
|
|
303
|
+
entityId: S.entityId,
|
|
304
|
+
entityType: S.entityType,
|
|
293
305
|
data: {
|
|
294
|
-
attrib:
|
|
306
|
+
attrib: S.attrib
|
|
295
307
|
}
|
|
296
308
|
}));
|
|
297
309
|
try {
|
|
@@ -299,16 +311,16 @@ const Ss = ({
|
|
|
299
311
|
operations: d,
|
|
300
312
|
patchOperations: P
|
|
301
313
|
});
|
|
302
|
-
} catch (
|
|
303
|
-
console.error("Error updating entities:",
|
|
304
|
-
const $ =
|
|
314
|
+
} catch (S) {
|
|
315
|
+
console.error("Error updating entities:", S);
|
|
316
|
+
const $ = Cn(S);
|
|
305
317
|
if (d.length === 1 && $.length > 0)
|
|
306
318
|
$.forEach((z) => {
|
|
307
|
-
const
|
|
319
|
+
const M = d[0], b = i(M.entityId), D = b?.label || b?.name || M.entityId || "", A = Lt(z, M.entityType, D);
|
|
308
320
|
he.error(A);
|
|
309
321
|
});
|
|
310
322
|
else {
|
|
311
|
-
const z = d[0],
|
|
323
|
+
const z = d[0], M = z && i(z.entityId), b = M?.label || M?.name || z?.entityId || "";
|
|
312
324
|
he.error(
|
|
313
325
|
d.length === 1 ? Lt(void 0, z.entityType, b) : "Failed to update entities"
|
|
314
326
|
);
|
|
@@ -333,13 +345,13 @@ const Ss = ({
|
|
|
333
345
|
const d = [];
|
|
334
346
|
for (const h of u) {
|
|
335
347
|
const P = i(h.entityId);
|
|
336
|
-
for (const
|
|
337
|
-
P?.attrib &&
|
|
348
|
+
for (const S of h.attribs)
|
|
349
|
+
P?.attrib && S in P.attrib && d.push({
|
|
338
350
|
rowId: h.rowId,
|
|
339
351
|
id: P?.entityId || P?.id || h.entityId,
|
|
340
352
|
type: h.entityType,
|
|
341
|
-
field:
|
|
342
|
-
value: P.attrib[
|
|
353
|
+
field: S,
|
|
354
|
+
value: P.attrib[S],
|
|
343
355
|
isAttrib: !0,
|
|
344
356
|
wasInherited: !1,
|
|
345
357
|
// Mark as not inherited
|
|
@@ -348,7 +360,7 @@ const Ss = ({
|
|
|
348
360
|
meta: P.meta
|
|
349
361
|
});
|
|
350
362
|
}
|
|
351
|
-
const
|
|
363
|
+
const g = u.flatMap(
|
|
352
364
|
(h) => h.attribs.map((P) => ({
|
|
353
365
|
rowId: h.rowId,
|
|
354
366
|
id: h.entityId,
|
|
@@ -363,19 +375,19 @@ const Ss = ({
|
|
|
363
375
|
meta: h.meta
|
|
364
376
|
}))
|
|
365
377
|
);
|
|
366
|
-
d.length > 0 && t(d,
|
|
378
|
+
d.length > 0 && t(d, g);
|
|
367
379
|
}
|
|
368
|
-
const
|
|
380
|
+
const v = ["task", "folder"], E = [], F = [];
|
|
369
381
|
for (const d of u) {
|
|
370
|
-
let
|
|
371
|
-
if (!
|
|
382
|
+
let g = d.entityType;
|
|
383
|
+
if (!v.includes(g))
|
|
372
384
|
continue;
|
|
373
|
-
|
|
385
|
+
g = g;
|
|
374
386
|
const h = {};
|
|
375
387
|
d.attribs.forEach((b) => {
|
|
376
388
|
h[b] = null;
|
|
377
389
|
}), E.push({
|
|
378
|
-
entityType:
|
|
390
|
+
entityType: g,
|
|
379
391
|
entityId: d.entityId,
|
|
380
392
|
rowId: d.rowId,
|
|
381
393
|
type: "update",
|
|
@@ -384,51 +396,51 @@ const Ss = ({
|
|
|
384
396
|
},
|
|
385
397
|
meta: d.meta
|
|
386
398
|
});
|
|
387
|
-
const
|
|
399
|
+
const S = (() => {
|
|
388
400
|
const b = d.folderId, D = [];
|
|
389
|
-
let A = b,
|
|
390
|
-
for (;
|
|
391
|
-
D.push(
|
|
401
|
+
let A = b, T = u.find((l) => l.entityId === A);
|
|
402
|
+
for (; T; )
|
|
403
|
+
D.push(T), A = T.folderId, T = u.find((l) => l.entityId === A);
|
|
392
404
|
return D.length > 0 ? D[D.length - 1] : null;
|
|
393
|
-
})(), $ =
|
|
405
|
+
})(), $ = S?.attribs || [], z = d.attribs.filter(
|
|
394
406
|
(b) => $.includes(b)
|
|
395
|
-
),
|
|
407
|
+
), M = d.attribs.filter(
|
|
396
408
|
(b) => !$.includes(b)
|
|
397
409
|
);
|
|
398
|
-
|
|
410
|
+
M.length > 0 && F.push({
|
|
399
411
|
...d,
|
|
400
|
-
attribs:
|
|
401
|
-
}),
|
|
412
|
+
attribs: M
|
|
413
|
+
}), S && z.length > 0 && F.push({
|
|
402
414
|
...d,
|
|
403
415
|
attribs: z,
|
|
404
|
-
folderId:
|
|
416
|
+
folderId: S.folderId
|
|
405
417
|
});
|
|
406
418
|
}
|
|
407
419
|
const w = [];
|
|
408
420
|
for (const d of F) {
|
|
409
|
-
const
|
|
410
|
-
(
|
|
411
|
-
), P = m(d.folderId, d.attribs),
|
|
421
|
+
const g = d.entityType, h = [...d.ownAttrib || []].filter(
|
|
422
|
+
(M) => !d.attribs.includes(M)
|
|
423
|
+
), P = m(d.folderId, d.attribs), S = {
|
|
412
424
|
entityId: d.entityId,
|
|
413
|
-
entityType:
|
|
425
|
+
entityType: g,
|
|
414
426
|
data: {
|
|
415
427
|
attrib: P,
|
|
416
428
|
ownAttrib: h
|
|
417
429
|
}
|
|
418
430
|
};
|
|
419
|
-
w.push(
|
|
431
|
+
w.push(S);
|
|
420
432
|
const z = f([
|
|
421
|
-
{ entityId: d.entityId, entityType:
|
|
422
|
-
]).map((
|
|
423
|
-
entityId:
|
|
424
|
-
entityType:
|
|
433
|
+
{ entityId: d.entityId, entityType: g, attrib: P }
|
|
434
|
+
]).map((M) => ({
|
|
435
|
+
entityId: M.entityId,
|
|
436
|
+
entityType: M.entityType,
|
|
425
437
|
data: {
|
|
426
|
-
attrib:
|
|
438
|
+
attrib: M.attrib
|
|
427
439
|
}
|
|
428
440
|
}));
|
|
429
|
-
for (const
|
|
441
|
+
for (const M of z) {
|
|
430
442
|
const b = w.findIndex(
|
|
431
|
-
(D) => D.entityId ===
|
|
443
|
+
(D) => D.entityId === M.entityId
|
|
432
444
|
);
|
|
433
445
|
if (b !== -1) {
|
|
434
446
|
const D = w[b];
|
|
@@ -436,7 +448,7 @@ const Ss = ({
|
|
|
436
448
|
// @ts-ignore
|
|
437
449
|
...D.data?.attrib || {},
|
|
438
450
|
// @ts-ignore
|
|
439
|
-
...
|
|
451
|
+
...M.data?.attrib || {}
|
|
440
452
|
};
|
|
441
453
|
w[b] = {
|
|
442
454
|
...D,
|
|
@@ -444,9 +456,9 @@ const Ss = ({
|
|
|
444
456
|
};
|
|
445
457
|
} else
|
|
446
458
|
w.push({
|
|
447
|
-
entityId:
|
|
448
|
-
entityType:
|
|
449
|
-
data:
|
|
459
|
+
entityId: M.entityId,
|
|
460
|
+
entityType: M.entityType,
|
|
461
|
+
data: M.data
|
|
450
462
|
});
|
|
451
463
|
}
|
|
452
464
|
}
|
|
@@ -456,16 +468,16 @@ const Ss = ({
|
|
|
456
468
|
patchOperations: w
|
|
457
469
|
});
|
|
458
470
|
} catch (d) {
|
|
459
|
-
const
|
|
460
|
-
if (E.length === 1 &&
|
|
461
|
-
|
|
462
|
-
const P = E[0],
|
|
471
|
+
const g = Cn(d);
|
|
472
|
+
if (E.length === 1 && g.length > 0)
|
|
473
|
+
g.forEach((h) => {
|
|
474
|
+
const P = E[0], S = i(P.entityId), $ = S?.label || S?.name || P.entityId || "", z = Lt(h, P.entityType, $);
|
|
463
475
|
he.error(z);
|
|
464
476
|
});
|
|
465
477
|
else {
|
|
466
|
-
const h = E[0], P = h && i(h.entityId),
|
|
478
|
+
const h = E[0], P = h && i(h.entityId), S = P?.label || P?.name || h?.entityId || "";
|
|
467
479
|
he.error(
|
|
468
|
-
E.length === 1 ? Lt(void 0, h.entityType,
|
|
480
|
+
E.length === 1 ? Lt(void 0, h.entityType, S) : "Failed to update entities"
|
|
469
481
|
);
|
|
470
482
|
}
|
|
471
483
|
c && t && n && n(1);
|
|
@@ -475,24 +487,24 @@ const Ss = ({
|
|
|
475
487
|
r,
|
|
476
488
|
s,
|
|
477
489
|
f,
|
|
478
|
-
|
|
490
|
+
p,
|
|
479
491
|
t,
|
|
480
492
|
n
|
|
481
493
|
]
|
|
482
494
|
);
|
|
483
495
|
return { updateEntities: a, inheritFromParent: o };
|
|
484
|
-
},
|
|
496
|
+
}, ks = (e = [], t) => {
|
|
485
497
|
for (const { isAttrib: n, value: r, field: i } of e) {
|
|
486
498
|
if (!n) continue;
|
|
487
499
|
const f = t.find((h) => h.name === i);
|
|
488
500
|
if (!f) continue;
|
|
489
|
-
let
|
|
501
|
+
let p = r;
|
|
490
502
|
const { type: m } = f.data;
|
|
491
503
|
if (m === "integer" || m === "float") {
|
|
492
504
|
if (typeof r == "string") {
|
|
493
505
|
if (r.trim() === "" || isNaN(Number(r)))
|
|
494
506
|
throw new Error(`“${i}” must be a valid number`);
|
|
495
|
-
|
|
507
|
+
p = m === "integer" ? parseInt(r, 10) : parseFloat(r);
|
|
496
508
|
} else if (typeof r != "number")
|
|
497
509
|
throw new Error(`“${i}” must be a valid number`);
|
|
498
510
|
}
|
|
@@ -505,86 +517,86 @@ const Ss = ({
|
|
|
505
517
|
"maxLength",
|
|
506
518
|
"minItems",
|
|
507
519
|
"maxItems"
|
|
508
|
-
], a = Object.entries(f.data).reduce((h, [P,
|
|
509
|
-
if (typeof
|
|
510
|
-
if (o != null &&
|
|
511
|
-
if (u != null &&
|
|
512
|
-
if (c != null &&
|
|
513
|
-
if (
|
|
514
|
-
} else if (typeof
|
|
515
|
-
if (E != null &&
|
|
520
|
+
], a = Object.entries(f.data).reduce((h, [P, S]) => (s.includes(P) && (h[P] = S), h), {}), { ge: o, gt: u, le: c, lt: v, minLength: E, maxLength: F, minItems: w, maxItems: d } = a, g = f.data.regex;
|
|
521
|
+
if (typeof p == "number") {
|
|
522
|
+
if (o != null && p < o) throw new Error(`“${i}” must be ≥ ${o}`);
|
|
523
|
+
if (u != null && p <= u) throw new Error(`“${i}” must be > ${u}`);
|
|
524
|
+
if (c != null && p > c) throw new Error(`“${i}” must be ≤ ${c}`);
|
|
525
|
+
if (v != null && p >= v) throw new Error(`“${i}” must be < ${v}`);
|
|
526
|
+
} else if (typeof p == "string") {
|
|
527
|
+
if (E != null && p.length < E)
|
|
516
528
|
throw new Error(`“${i}” length must be ≥ ${E}`);
|
|
517
|
-
if (F != null &&
|
|
529
|
+
if (F != null && p.length > F)
|
|
518
530
|
throw new Error(`“${i}” length must be ≤ ${F}`);
|
|
519
|
-
if (
|
|
520
|
-
throw new Error(`“${i}” must match pattern ${
|
|
521
|
-
} else if (Array.isArray(
|
|
522
|
-
if (w != null &&
|
|
531
|
+
if (g && !new RegExp(g).test(p))
|
|
532
|
+
throw new Error(`“${i}” must match pattern ${g}`);
|
|
533
|
+
} else if (Array.isArray(p)) {
|
|
534
|
+
if (w != null && p.length < w)
|
|
523
535
|
throw new Error(`“${i}” items must be ≥ ${w}`);
|
|
524
|
-
if (d != null &&
|
|
536
|
+
if (d != null && p.length > d)
|
|
525
537
|
throw new Error(`“${i}” items must be ≤ ${d}`);
|
|
526
538
|
}
|
|
527
539
|
}
|
|
528
|
-
},
|
|
540
|
+
}, di = ({ children: e }) => {
|
|
529
541
|
const [t, n] = Pe(null), r = Ne(null), i = K(() => r.current, []), f = K((A) => {
|
|
530
542
|
r.current = A;
|
|
531
|
-
}, []),
|
|
543
|
+
}, []), p = K((A) => {
|
|
532
544
|
r.current = null, n(A);
|
|
533
545
|
}, []), m = K((A) => A === t, [t]), s = vs(), {
|
|
534
546
|
pushHistory: a,
|
|
535
547
|
undo: o,
|
|
536
548
|
redo: u,
|
|
537
549
|
canUndo: c,
|
|
538
|
-
canRedo:
|
|
550
|
+
canRedo: v,
|
|
539
551
|
removeHistoryEntries: E
|
|
540
|
-
} = s, { selectedCells: F } = Ye(), { updateEntities: w, inheritFromParent: d } =
|
|
552
|
+
} = s, { selectedCells: F } = Ye(), { updateEntities: w, inheritFromParent: d } = Rs({
|
|
541
553
|
pushHistory: a,
|
|
542
554
|
removeHistoryEntries: E
|
|
543
|
-
}), { attribFields:
|
|
544
|
-
async (A = [],
|
|
555
|
+
}), { attribFields: g, getEntityById: h } = Ve(), { projectName: P } = It(), [S] = Ho(), $ = K(
|
|
556
|
+
async (A = [], T = !0) => {
|
|
545
557
|
try {
|
|
546
|
-
return
|
|
547
|
-
} catch (
|
|
548
|
-
return he.error(
|
|
558
|
+
return ks(A, g), await w(A, T);
|
|
559
|
+
} catch (y) {
|
|
560
|
+
return he.error(y.message), Promise.reject(y);
|
|
549
561
|
}
|
|
550
562
|
},
|
|
551
|
-
[w,
|
|
563
|
+
[w, g]
|
|
552
564
|
), z = async () => {
|
|
553
|
-
const [A,
|
|
565
|
+
const [A, T, y] = o() || [];
|
|
554
566
|
if (A && A.length > 0)
|
|
555
567
|
try {
|
|
556
568
|
await $(A, !1);
|
|
557
569
|
} catch {
|
|
558
570
|
he.error("Failed to undo changes");
|
|
559
571
|
}
|
|
560
|
-
if (
|
|
572
|
+
if (T && T.length > 0)
|
|
561
573
|
try {
|
|
562
|
-
await d(
|
|
574
|
+
await d(T, !1);
|
|
563
575
|
} catch {
|
|
564
576
|
he.error("Failed to inherit changes");
|
|
565
577
|
}
|
|
566
|
-
|
|
578
|
+
y && y.length > 0 && y.forEach((l) => {
|
|
567
579
|
try {
|
|
568
580
|
l();
|
|
569
581
|
} catch {
|
|
570
582
|
he.error("Failed to execute custom undo action");
|
|
571
583
|
}
|
|
572
584
|
});
|
|
573
|
-
},
|
|
574
|
-
const [A,
|
|
585
|
+
}, M = async () => {
|
|
586
|
+
const [A, T, y] = u() || [];
|
|
575
587
|
if (A && A.length > 0)
|
|
576
588
|
try {
|
|
577
589
|
await $(A, !1);
|
|
578
590
|
} catch {
|
|
579
591
|
he.error("Failed to redo changes");
|
|
580
592
|
}
|
|
581
|
-
if (
|
|
593
|
+
if (T && T.length > 0)
|
|
582
594
|
try {
|
|
583
|
-
await d(
|
|
595
|
+
await d(T, !1);
|
|
584
596
|
} catch {
|
|
585
597
|
he.error("Failed to inherit changes");
|
|
586
598
|
}
|
|
587
|
-
|
|
599
|
+
y && y.length > 0 && y.forEach((l) => {
|
|
588
600
|
try {
|
|
589
601
|
l();
|
|
590
602
|
} catch {
|
|
@@ -593,21 +605,21 @@ const Ss = ({
|
|
|
593
605
|
});
|
|
594
606
|
}, b = K(
|
|
595
607
|
async (A) => {
|
|
596
|
-
const
|
|
597
|
-
for (const
|
|
598
|
-
const { colId:
|
|
599
|
-
if (!
|
|
600
|
-
console.warn(`Invalid cellId: ${
|
|
608
|
+
const T = [], y = [], l = [];
|
|
609
|
+
for (const I of A) {
|
|
610
|
+
const { colId: x, rowId: C } = re(I) || {};
|
|
611
|
+
if (!x || !C) {
|
|
612
|
+
console.warn(`Invalid cellId: ${I}`);
|
|
601
613
|
continue;
|
|
602
614
|
}
|
|
603
615
|
const R = h(C);
|
|
604
616
|
if (!R) return;
|
|
605
|
-
const L =
|
|
617
|
+
const L = x.replace("attrib_", ""), H = x.startsWith("attrib_");
|
|
606
618
|
if (!L) {
|
|
607
|
-
console.warn(`Invalid column ID: ${
|
|
619
|
+
console.warn(`Invalid column ID: ${x}`);
|
|
608
620
|
continue;
|
|
609
621
|
}
|
|
610
|
-
if (
|
|
622
|
+
if (x === "subtasks") {
|
|
611
623
|
if (R.entityType === "task") {
|
|
612
624
|
const de = "subtasks" in R && R.subtasks || [];
|
|
613
625
|
l.push({ taskId: C, previousSubtasks: de });
|
|
@@ -615,15 +627,15 @@ const Ss = ({
|
|
|
615
627
|
continue;
|
|
616
628
|
}
|
|
617
629
|
let Z = null;
|
|
618
|
-
if (
|
|
619
|
-
const de =
|
|
630
|
+
if (H) {
|
|
631
|
+
const de = g.find((Ie) => Ie.name === L);
|
|
620
632
|
if (!de) {
|
|
621
633
|
console.warn(`Attribute field not found: ${L}`);
|
|
622
634
|
continue;
|
|
623
635
|
}
|
|
624
636
|
if (de.data.inherit) {
|
|
625
|
-
const Ie =
|
|
626
|
-
Ie ? Ie.attribs.push(L) :
|
|
637
|
+
const Ie = y.find((Re) => Re.entityId === R.entityId);
|
|
638
|
+
Ie ? Ie.attribs.push(L) : y.push({
|
|
627
639
|
entityId: R.entityId,
|
|
628
640
|
attribs: [L],
|
|
629
641
|
entityType: R.entityType,
|
|
@@ -647,54 +659,54 @@ const Ss = ({
|
|
|
647
659
|
rowId: C,
|
|
648
660
|
field: L,
|
|
649
661
|
value: Z,
|
|
650
|
-
isAttrib:
|
|
662
|
+
isAttrib: H,
|
|
651
663
|
type: R.entityType
|
|
652
664
|
};
|
|
653
|
-
|
|
665
|
+
T.push(ee);
|
|
654
666
|
}
|
|
655
|
-
if (
|
|
667
|
+
if (T.length > 0)
|
|
656
668
|
try {
|
|
657
|
-
await $(
|
|
669
|
+
await $(T, !0);
|
|
658
670
|
} catch {
|
|
659
671
|
he.error("Failed to clear selected cells");
|
|
660
672
|
}
|
|
661
|
-
if (
|
|
673
|
+
if (y.length > 0)
|
|
662
674
|
try {
|
|
663
|
-
await d(
|
|
675
|
+
await d(y, !0);
|
|
664
676
|
} catch {
|
|
665
677
|
he.error("Failed to inherit parent values for cleared cells");
|
|
666
678
|
}
|
|
667
679
|
if (l.length > 0)
|
|
668
680
|
try {
|
|
669
|
-
a && l.forEach(({ taskId:
|
|
681
|
+
a && l.forEach(({ taskId: x, previousSubtasks: C }) => {
|
|
670
682
|
const R = C || [];
|
|
671
683
|
a([() => {
|
|
672
|
-
|
|
684
|
+
S({ projectName: P, taskId: x, subtasks: R }).unwrap().catch(() => {
|
|
673
685
|
});
|
|
674
686
|
}], [() => {
|
|
675
|
-
|
|
687
|
+
S({ projectName: P, taskId: x, subtasks: [] }).unwrap().catch(() => {
|
|
676
688
|
});
|
|
677
689
|
}]);
|
|
678
690
|
});
|
|
679
|
-
const
|
|
680
|
-
({ taskId:
|
|
691
|
+
const I = l.map(
|
|
692
|
+
({ taskId: x }) => S({ projectName: P, taskId: x, subtasks: [] }).unwrap()
|
|
681
693
|
);
|
|
682
|
-
await Promise.all(
|
|
694
|
+
await Promise.all(I);
|
|
683
695
|
} catch {
|
|
684
696
|
he.error("Failed to clear subtasks");
|
|
685
697
|
}
|
|
686
|
-
|
|
698
|
+
T.length === 0 && y.length === 0 && l.length === 0 && he.warn("No valid cells selected to clear");
|
|
687
699
|
},
|
|
688
|
-
[
|
|
689
|
-
), D =
|
|
700
|
+
[g, w, P, S, a, h]
|
|
701
|
+
), D = W(
|
|
690
702
|
() => ({
|
|
691
703
|
editingCellId: t,
|
|
692
|
-
setEditingCellId:
|
|
704
|
+
setEditingCellId: p,
|
|
693
705
|
isEditing: m,
|
|
694
706
|
updateEntities: $,
|
|
695
707
|
inheritFromParent: d,
|
|
696
708
|
undo: z,
|
|
697
|
-
redo:
|
|
709
|
+
redo: M,
|
|
698
710
|
history: s,
|
|
699
711
|
getEditingDraft: i,
|
|
700
712
|
setEditingDraft: f
|
|
@@ -705,72 +717,72 @@ const Ss = ({
|
|
|
705
717
|
$,
|
|
706
718
|
d,
|
|
707
719
|
z,
|
|
708
|
-
|
|
720
|
+
M,
|
|
709
721
|
s,
|
|
710
722
|
i,
|
|
711
723
|
f
|
|
712
724
|
]
|
|
713
725
|
);
|
|
714
726
|
return Fe(() => {
|
|
715
|
-
const A = (
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
727
|
+
const A = (T) => {
|
|
728
|
+
const y = T.target;
|
|
729
|
+
if (y.tagName === "INPUT" || y.tagName === "TEXTAREA" || y.isContentEditable || y.getAttribute("role") === "textbox" || y.tagName === "LI" || !(y?.closest("table") !== null || y === document.body)) return;
|
|
730
|
+
const x = typeof navigator < "u" && // @ts-expect-error
|
|
719
731
|
(navigator.userAgentData && // @ts-expect-error
|
|
720
|
-
navigator.userAgentData.platform.toUpperCase().includes("MAC") || navigator.userAgent.toUpperCase().includes("MAC")) ?
|
|
721
|
-
if (
|
|
732
|
+
navigator.userAgentData.platform.toUpperCase().includes("MAC") || navigator.userAgent.toUpperCase().includes("MAC")) ? T.metaKey : T.ctrlKey;
|
|
733
|
+
if (x && T.key === "z" && (T.preventDefault(), c && z()), (x && T.key === "y" || x && T.shiftKey && T.key === "z" || x && T.key === "Z") && (T.preventDefault(), v && M()), T.key === "Backspace" && !(T.ctrlKey || T.metaKey) || T.key === "Delete") {
|
|
722
734
|
if (!F.size) return;
|
|
723
|
-
|
|
735
|
+
T.preventDefault();
|
|
724
736
|
const C = Array.from(F).map(
|
|
725
|
-
(
|
|
726
|
-
), R = (
|
|
737
|
+
(H) => document.getElementById(H)
|
|
738
|
+
), R = (H) => H?.classList.contains("editable"), L = C.filter(R);
|
|
727
739
|
if (L.length === 0) {
|
|
728
740
|
he.warn("No editable cells selected to clear");
|
|
729
741
|
return;
|
|
730
742
|
}
|
|
731
|
-
b(L.map((
|
|
743
|
+
b(L.map((H) => H?.id).filter(Boolean));
|
|
732
744
|
}
|
|
733
745
|
};
|
|
734
746
|
return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
|
|
735
|
-
}, [c,
|
|
736
|
-
},
|
|
747
|
+
}, [c, v, z, M, F, b]), /* @__PURE__ */ N(fo.Provider, { value: D, children: e });
|
|
748
|
+
}, ui = ({
|
|
737
749
|
children: e,
|
|
738
750
|
config: t,
|
|
739
751
|
onChange: n,
|
|
740
752
|
defaultColumnVisibility: r,
|
|
741
753
|
columnIdAliases: i
|
|
742
754
|
}) => {
|
|
743
|
-
const f = Ke.useRef([]),
|
|
755
|
+
const f = Ke.useRef([]), p = Ke.useRef(null), m = Ke.useRef(null), s = Ke.useRef(null), a = Ke.useRef(void 0), o = Ke.useRef(null), [u, c] = Pe(null), [v, E] = Pe(null), [F, w] = Pe(null), d = (k) => {
|
|
744
756
|
f.current = Array.from(new Set(k));
|
|
745
|
-
},
|
|
757
|
+
}, g = () => f.current, h = (k) => {
|
|
746
758
|
const U = f.current, ce = /* @__PURE__ */ new Set([Ae, ae]);
|
|
747
759
|
if (U.length > 0) {
|
|
748
760
|
const ie = { ...k.columnVisibility };
|
|
749
|
-
U.forEach((
|
|
750
|
-
!ce.has(
|
|
751
|
-
}), ce.forEach((
|
|
752
|
-
const we = (k.columnOrder ?? []).filter((
|
|
761
|
+
U.forEach((ge) => {
|
|
762
|
+
!ce.has(ge) && ie[ge] === void 0 && (ie[ge] = yt({}, ge, r));
|
|
763
|
+
}), ce.forEach((ge) => delete ie[ge]);
|
|
764
|
+
const we = (k.columnOrder ?? []).filter((ge) => !ce.has(ge));
|
|
753
765
|
n(
|
|
754
766
|
{ ...k, columnVisibility: ie, columnOrder: we },
|
|
755
767
|
U
|
|
756
768
|
);
|
|
757
769
|
} else
|
|
758
770
|
n(k, U);
|
|
759
|
-
}, P =
|
|
760
|
-
columnOrder:
|
|
771
|
+
}, P = mo(t, i), {
|
|
772
|
+
columnOrder: S = [],
|
|
761
773
|
columnPinning: $ = {},
|
|
762
774
|
columnVisibility: z = {},
|
|
763
|
-
columnSizing:
|
|
775
|
+
columnSizing: M = {},
|
|
764
776
|
sorting: b = [],
|
|
765
777
|
groupBy: D,
|
|
766
778
|
groupByConfig: A = {},
|
|
767
|
-
rowHeight:
|
|
768
|
-
columnSummaries:
|
|
779
|
+
rowHeight: T = 34,
|
|
780
|
+
columnSummaries: y = {},
|
|
769
781
|
columnSummaryScopes: l = {},
|
|
770
|
-
columnSummaryFormats:
|
|
782
|
+
columnSummaryFormats: I = {}
|
|
771
783
|
} = P || {};
|
|
772
|
-
a.current !==
|
|
773
|
-
const
|
|
784
|
+
a.current !== T && a.current !== void 0 && (v !== null && E(null), m.current && (clearTimeout(m.current), m.current = null)), a.current = T;
|
|
785
|
+
const x = v ?? T, C = [...b], L = [...F ?? [...S]], H = { ...$ }, Z = ["thumbnail", "name", "subType", "status", "tags"];
|
|
774
786
|
if (Z.forEach((k, U) => {
|
|
775
787
|
if (!L.includes(k)) {
|
|
776
788
|
const ce = Z[U - 1], ie = Z[U + 1];
|
|
@@ -780,14 +792,14 @@ const Ss = ({
|
|
|
780
792
|
const we = L.indexOf(ce);
|
|
781
793
|
L.splice(we + 1, 0, k);
|
|
782
794
|
}
|
|
783
|
-
ie &&
|
|
795
|
+
ie && H?.left && H?.left.includes(ie) && (H.left = [k, ...H?.left || []]);
|
|
784
796
|
}
|
|
785
797
|
}), D && D.id !== "folder") {
|
|
786
|
-
if (!
|
|
787
|
-
|
|
798
|
+
if (!H.left?.includes("name"))
|
|
799
|
+
H.left = ["name", ...H?.left || []];
|
|
788
800
|
else {
|
|
789
|
-
const k =
|
|
790
|
-
|
|
801
|
+
const k = H.left.filter((U) => U !== "name");
|
|
802
|
+
H.left = ["name", ...k];
|
|
791
803
|
}
|
|
792
804
|
if (L.includes("name")) {
|
|
793
805
|
const k = L.indexOf("name");
|
|
@@ -813,15 +825,15 @@ const Ss = ({
|
|
|
813
825
|
...P,
|
|
814
826
|
columnPinning: k
|
|
815
827
|
});
|
|
816
|
-
}, Ce = u ||
|
|
817
|
-
c(k),
|
|
828
|
+
}, Ce = u || M, xe = (k) => {
|
|
829
|
+
c(k), p.current && clearTimeout(p.current), p.current = setTimeout(() => {
|
|
818
830
|
h({
|
|
819
831
|
...P,
|
|
820
832
|
columnSizing: k
|
|
821
833
|
}), c(null);
|
|
822
834
|
}, 500);
|
|
823
|
-
},
|
|
824
|
-
const U = { ...
|
|
835
|
+
}, ve = (k) => {
|
|
836
|
+
const U = { ...H }, ie = (U.left || []).filter(
|
|
825
837
|
(we) => yt(k, we, r)
|
|
826
838
|
);
|
|
827
839
|
return {
|
|
@@ -829,7 +841,7 @@ const Ss = ({
|
|
|
829
841
|
left: ie
|
|
830
842
|
};
|
|
831
843
|
}, ze = (k) => {
|
|
832
|
-
const U = { ...
|
|
844
|
+
const U = { ...H }, ce = U.left || [], ie = k.filter((we) => ce.includes(we));
|
|
833
845
|
return {
|
|
834
846
|
...U,
|
|
835
847
|
left: ie
|
|
@@ -837,8 +849,8 @@ const Ss = ({
|
|
|
837
849
|
}, J = (k) => [...L].sort((U, ce) => {
|
|
838
850
|
const ie = k.left?.includes(U) ? 1 : 0;
|
|
839
851
|
return (k.left?.includes(ce) ? 1 : 0) - ie;
|
|
840
|
-
}),
|
|
841
|
-
const U =
|
|
852
|
+
}), O = (k) => {
|
|
853
|
+
const U = ve(k);
|
|
842
854
|
h({
|
|
843
855
|
...P,
|
|
844
856
|
columnVisibility: k,
|
|
@@ -867,10 +879,10 @@ const Ss = ({
|
|
|
867
879
|
...P,
|
|
868
880
|
sorting: k
|
|
869
881
|
});
|
|
870
|
-
},
|
|
882
|
+
}, j = (k, U) => {
|
|
871
883
|
h({
|
|
872
884
|
...P,
|
|
873
|
-
columnSummaries: { ...
|
|
885
|
+
columnSummaries: { ...y, [k]: U }
|
|
874
886
|
});
|
|
875
887
|
}, Me = (k, U) => {
|
|
876
888
|
h({
|
|
@@ -880,7 +892,7 @@ const Ss = ({
|
|
|
880
892
|
}, be = (k, U) => {
|
|
881
893
|
h({
|
|
882
894
|
...P,
|
|
883
|
-
columnSummaryFormats: { ...
|
|
895
|
+
columnSummaryFormats: { ...I, [k]: U }
|
|
884
896
|
});
|
|
885
897
|
}, Te = (k) => {
|
|
886
898
|
h({
|
|
@@ -898,28 +910,28 @@ const Ss = ({
|
|
|
898
910
|
}, me = Ke.useCallback(
|
|
899
911
|
(k) => {
|
|
900
912
|
if (o.current === null) {
|
|
901
|
-
const ce =
|
|
913
|
+
const ce = M.thumbnail || 63, ie = T || 34;
|
|
902
914
|
o.current = ce / ie;
|
|
903
915
|
}
|
|
904
916
|
const U = o.current * k;
|
|
905
917
|
E(k), c({
|
|
906
|
-
...u ||
|
|
918
|
+
...u || M,
|
|
907
919
|
thumbnail: U
|
|
908
920
|
});
|
|
909
921
|
},
|
|
910
|
-
[
|
|
922
|
+
[M, T]
|
|
911
923
|
), Ee = Ke.useCallback(
|
|
912
924
|
(k) => {
|
|
913
|
-
const we = (
|
|
925
|
+
const we = (M.thumbnail || 63) / (T || 34) * k;
|
|
914
926
|
E(k), c({
|
|
915
|
-
...u ||
|
|
927
|
+
...u || M,
|
|
916
928
|
thumbnail: we
|
|
917
929
|
}), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
918
930
|
h({
|
|
919
931
|
...P,
|
|
920
932
|
rowHeight: k,
|
|
921
933
|
columnSizing: {
|
|
922
|
-
...
|
|
934
|
+
...M,
|
|
923
935
|
thumbnail: we
|
|
924
936
|
}
|
|
925
937
|
}), E(null), c(null), o.current = null;
|
|
@@ -928,8 +940,8 @@ const Ss = ({
|
|
|
928
940
|
[
|
|
929
941
|
P,
|
|
930
942
|
h,
|
|
931
|
-
|
|
932
|
-
|
|
943
|
+
M,
|
|
944
|
+
T,
|
|
933
945
|
u
|
|
934
946
|
]
|
|
935
947
|
), De = (k) => {
|
|
@@ -937,35 +949,35 @@ const Ss = ({
|
|
|
937
949
|
Object.keys(U).forEach((ie) => {
|
|
938
950
|
const we = yt({}, ie, r);
|
|
939
951
|
U[ie] !== we && (ce[ie] = U[ie]);
|
|
940
|
-
}), !
|
|
952
|
+
}), !gt(ce, ee) && de(ce);
|
|
941
953
|
}, ke = (k) => {
|
|
942
|
-
const U = ht(k,
|
|
943
|
-
|
|
954
|
+
const U = ht(k, H);
|
|
955
|
+
gt(U, H) || Re(U);
|
|
944
956
|
}, $e = (k) => {
|
|
945
957
|
const U = ht(k, L);
|
|
946
|
-
|
|
958
|
+
gt(U, L) || Ie(U);
|
|
947
959
|
}, Be = (k) => {
|
|
948
960
|
const U = ht(k, Ce);
|
|
949
|
-
|
|
961
|
+
gt(U, Ce) || xe(U);
|
|
950
962
|
}, oe = (k) => {
|
|
951
963
|
const U = ht(k, C);
|
|
952
|
-
|
|
964
|
+
gt(U, C) || te(U);
|
|
953
965
|
};
|
|
954
966
|
return /* @__PURE__ */ N(
|
|
955
|
-
|
|
967
|
+
po.Provider,
|
|
956
968
|
{
|
|
957
969
|
value: {
|
|
958
970
|
// all columns ref
|
|
959
971
|
setAllColumns: d,
|
|
960
|
-
getAllColumns:
|
|
972
|
+
getAllColumns: g,
|
|
961
973
|
// column visibility
|
|
962
974
|
columnVisibility: ee,
|
|
963
975
|
defaultColumnVisibility: r,
|
|
964
976
|
setColumnVisibility: de,
|
|
965
|
-
updateColumnVisibility:
|
|
977
|
+
updateColumnVisibility: O,
|
|
966
978
|
columnVisibilityOnChange: De,
|
|
967
979
|
// column pinning
|
|
968
|
-
columnPinning:
|
|
980
|
+
columnPinning: H,
|
|
969
981
|
setColumnPinning: Re,
|
|
970
982
|
updateColumnPinning: B,
|
|
971
983
|
columnPinningOnChange: ke,
|
|
@@ -976,16 +988,16 @@ const Ss = ({
|
|
|
976
988
|
columnOrderOnChange: $e,
|
|
977
989
|
// column sizing
|
|
978
990
|
columnSizing: Ce,
|
|
979
|
-
setColumnSizing:
|
|
991
|
+
setColumnSizing: xe,
|
|
980
992
|
columnSizingOnChange: Be,
|
|
981
993
|
// column summary calc
|
|
982
|
-
columnSummaries:
|
|
983
|
-
updateColumnSummary:
|
|
994
|
+
columnSummaries: y,
|
|
995
|
+
updateColumnSummary: j,
|
|
984
996
|
// column summary row scope
|
|
985
997
|
columnSummaryScopes: l,
|
|
986
998
|
updateColumnSummaryScope: Me,
|
|
987
999
|
// column summary display format
|
|
988
|
-
columnSummaryFormats:
|
|
1000
|
+
columnSummaryFormats: I,
|
|
989
1001
|
updateColumnSummaryFormat: be,
|
|
990
1002
|
// sorting
|
|
991
1003
|
sorting: C,
|
|
@@ -997,7 +1009,7 @@ const Ss = ({
|
|
|
997
1009
|
groupByConfig: A,
|
|
998
1010
|
updateGroupByConfig: Ge,
|
|
999
1011
|
// row height
|
|
1000
|
-
rowHeight:
|
|
1012
|
+
rowHeight: x,
|
|
1001
1013
|
updateRowHeight: me,
|
|
1002
1014
|
updateRowHeightWithPersistence: Ee,
|
|
1003
1015
|
// global change
|
|
@@ -1006,15 +1018,15 @@ const Ss = ({
|
|
|
1006
1018
|
children: e
|
|
1007
1019
|
}
|
|
1008
1020
|
);
|
|
1009
|
-
},
|
|
1021
|
+
}, fi = ({ children: e }) => {
|
|
1010
1022
|
const { selectedCells: t, gridMap: n, setSelectedCells: r, setFocusedCellId: i, setAnchorCell: f } = Ye();
|
|
1011
|
-
let
|
|
1023
|
+
let p;
|
|
1012
1024
|
try {
|
|
1013
|
-
|
|
1025
|
+
p = Dn().clearSelectedEntity;
|
|
1014
1026
|
} catch {
|
|
1015
|
-
|
|
1027
|
+
p = void 0;
|
|
1016
1028
|
}
|
|
1017
|
-
const m = Ne([]), s =
|
|
1029
|
+
const m = Ne([]), s = W(
|
|
1018
1030
|
() => Array.from(t).filter(
|
|
1019
1031
|
(w) => re(w)?.colId === ae && re(w)?.rowId
|
|
1020
1032
|
).map((w) => re(w)?.rowId).filter(
|
|
@@ -1022,58 +1034,58 @@ const Ss = ({
|
|
|
1022
1034
|
(n.rowIdToIndex.size === 0 || n.rowIdToIndex.has(w))
|
|
1023
1035
|
),
|
|
1024
1036
|
[t, n]
|
|
1025
|
-
), a =
|
|
1037
|
+
), a = W(() => {
|
|
1026
1038
|
const w = [...s].sort(), d = [...m.current].sort();
|
|
1027
1039
|
return w.length !== d.length || w.some((h, P) => h !== d[P]) ? (m.current = s, s) : m.current;
|
|
1028
1040
|
}, [s]);
|
|
1029
1041
|
Fe(() => {
|
|
1030
|
-
a.length > 0 &&
|
|
1031
|
-
}, [a.length,
|
|
1042
|
+
a.length > 0 && p && p();
|
|
1043
|
+
}, [a.length, p]);
|
|
1032
1044
|
const o = K(() => {
|
|
1033
1045
|
const w = Array.from(n.rowIdToIndex.keys()), d = /* @__PURE__ */ new Set();
|
|
1034
|
-
if (w.forEach((
|
|
1035
|
-
d.add(ye(
|
|
1046
|
+
if (w.forEach((g) => {
|
|
1047
|
+
d.add(ye(g, ae));
|
|
1036
1048
|
}), r(d), w.length > 0) {
|
|
1037
|
-
const
|
|
1038
|
-
i(
|
|
1049
|
+
const g = ye(w[0], ae);
|
|
1050
|
+
i(g), f(re(g));
|
|
1039
1051
|
}
|
|
1040
1052
|
}, [n]), u = K(() => {
|
|
1041
1053
|
r((w) => {
|
|
1042
1054
|
const d = new Set(w);
|
|
1043
|
-
return Array.from(d).forEach((
|
|
1044
|
-
re(
|
|
1055
|
+
return Array.from(d).forEach((g) => {
|
|
1056
|
+
re(g)?.colId === ae && d.delete(g);
|
|
1045
1057
|
}), d;
|
|
1046
1058
|
});
|
|
1047
1059
|
}, [r]), c = K(
|
|
1048
1060
|
(w) => a.includes(w),
|
|
1049
1061
|
[a]
|
|
1050
|
-
),
|
|
1062
|
+
), v = K(() => {
|
|
1051
1063
|
const w = n.rowIdToIndex.size;
|
|
1052
1064
|
return w > 0 && a.length === w;
|
|
1053
|
-
}, [n, a]), E = K(() => a.length > 0 && !
|
|
1065
|
+
}, [n, a]), E = K(() => a.length > 0 && !v(), [a, v]), F = W(() => ({
|
|
1054
1066
|
selectedRows: a,
|
|
1055
1067
|
selectAllRows: o,
|
|
1056
1068
|
clearRowsSelection: u,
|
|
1057
1069
|
isRowSelected: c,
|
|
1058
|
-
areAllRowsSelected:
|
|
1070
|
+
areAllRowsSelected: v,
|
|
1059
1071
|
areSomeRowsSelected: E
|
|
1060
|
-
}), [a, o,
|
|
1072
|
+
}), [a, o, v, E, u]);
|
|
1061
1073
|
return /* @__PURE__ */ N(go.Provider, { value: F, children: e });
|
|
1062
|
-
},
|
|
1063
|
-
const { projectName: t } = It(), { getEntityById: n } = Ve(), { deleteEntities: r } =
|
|
1074
|
+
}, Ps = ({ onSuccess: e }) => {
|
|
1075
|
+
const { projectName: t } = It(), { getEntityById: n } = Ve(), { deleteEntities: r } = Yo();
|
|
1064
1076
|
return K(
|
|
1065
1077
|
async (i) => {
|
|
1066
1078
|
if (!i || i.length === 0) {
|
|
1067
1079
|
he.error("No entities selected");
|
|
1068
1080
|
return;
|
|
1069
1081
|
}
|
|
1070
|
-
const f = /* @__PURE__ */ new Set(),
|
|
1082
|
+
const f = /* @__PURE__ */ new Set(), p = [];
|
|
1071
1083
|
for (const m of i) {
|
|
1072
1084
|
const s = n(m);
|
|
1073
1085
|
if (!s || f.has(s.id)) continue;
|
|
1074
1086
|
f.add(s.id);
|
|
1075
1087
|
const a = s.entityType || ("folderId" in s ? "task" : "folder");
|
|
1076
|
-
|
|
1088
|
+
p.push({
|
|
1077
1089
|
id: s.id,
|
|
1078
1090
|
entityType: a,
|
|
1079
1091
|
name: s.name,
|
|
@@ -1085,15 +1097,15 @@ const Ss = ({
|
|
|
1085
1097
|
taskNames: "taskNames" in s ? s.taskNames : void 0
|
|
1086
1098
|
});
|
|
1087
1099
|
}
|
|
1088
|
-
if (
|
|
1100
|
+
if (p.length === 0) {
|
|
1089
1101
|
he.error("No entities found");
|
|
1090
1102
|
return;
|
|
1091
1103
|
}
|
|
1092
|
-
await r(
|
|
1104
|
+
await r(p, { onSuccess: e });
|
|
1093
1105
|
},
|
|
1094
1106
|
[n, t, r, e]
|
|
1095
1107
|
);
|
|
1096
|
-
},
|
|
1108
|
+
}, Ds = ({
|
|
1097
1109
|
attribs: e,
|
|
1098
1110
|
headerLabels: t = [],
|
|
1099
1111
|
onOpenNew: n,
|
|
@@ -1101,49 +1113,49 @@ const Ss = ({
|
|
|
1101
1113
|
}) => {
|
|
1102
1114
|
const { projectName: i } = It(), {
|
|
1103
1115
|
showHierarchy: f,
|
|
1104
|
-
getEntityById:
|
|
1116
|
+
getEntityById: p,
|
|
1105
1117
|
toggleExpandAll: m,
|
|
1106
1118
|
toggleExpands: s,
|
|
1107
1119
|
expanded: a,
|
|
1108
1120
|
contextMenuItems: o = [],
|
|
1109
1121
|
powerpack: u,
|
|
1110
1122
|
onOpenPlayer: c
|
|
1111
|
-
} = Ve(),
|
|
1123
|
+
} = Ve(), v = W(
|
|
1112
1124
|
() => [...o, ...r || []],
|
|
1113
1125
|
[o, r]
|
|
1114
|
-
), E =
|
|
1126
|
+
), E = ms(), F = Object.values(E || {}).some(Boolean), { canWriteLabelPermission: w, canWriteNamePermission: d } = tn(), { copyToClipboard: g, exportCSV: h, pasteFromClipboard: P } = ho(), { selectedCells: S, clearSelection: $, selectCell: z, focusCell: M } = Ye(), { inheritFromParent: b, history: D, setEditingCellId: A } = Ut(), T = Ps({}), [y] = Xo([], u), l = (J) => J.reduce((O, le) => {
|
|
1115
1127
|
const { rowId: B, colId: te } = re(le) || {};
|
|
1116
|
-
if (!B || !te || !te.startsWith("attrib_")) return
|
|
1117
|
-
const
|
|
1118
|
-
if (!
|
|
1119
|
-
const Me =
|
|
1120
|
-
if (
|
|
1121
|
-
const me =
|
|
1122
|
-
me >= 0 ?
|
|
1128
|
+
if (!B || !te || !te.startsWith("attrib_")) return O;
|
|
1129
|
+
const j = p(B);
|
|
1130
|
+
if (!j) return O;
|
|
1131
|
+
const Me = j.entityId || j.id, be = te.replace("attrib_", ""), Ge = e.find((me) => me.name === be)?.data.inherit;
|
|
1132
|
+
if (j.ownAttrib?.includes(be) && Ge) {
|
|
1133
|
+
const me = O.findIndex((Ee) => Ee.entityId === Me);
|
|
1134
|
+
me >= 0 ? O[me].attribs.includes(be) || O[me].attribs.push(be) : O.push({
|
|
1123
1135
|
rowId: Me,
|
|
1124
1136
|
entityId: Me,
|
|
1125
|
-
entityType: "folderId" in
|
|
1137
|
+
entityType: "folderId" in j ? "task" : "folder",
|
|
1126
1138
|
attribs: [be],
|
|
1127
|
-
ownAttrib:
|
|
1139
|
+
ownAttrib: j.ownAttrib || [],
|
|
1128
1140
|
// @ts-ignore
|
|
1129
|
-
folderId:
|
|
1141
|
+
folderId: j.parentId ?? j.folderId
|
|
1130
1142
|
});
|
|
1131
1143
|
}
|
|
1132
|
-
return
|
|
1133
|
-
}, []),
|
|
1144
|
+
return O;
|
|
1145
|
+
}, []), I = (J, O, le, B) => [
|
|
1134
1146
|
{
|
|
1135
1147
|
label: "Copy",
|
|
1136
1148
|
icon: "content_copy",
|
|
1137
1149
|
shortcut: Ot("c", [Ft.Ctrl]),
|
|
1138
|
-
command: () =>
|
|
1139
|
-
hidden:
|
|
1150
|
+
command: () => g(B.selectedCells),
|
|
1151
|
+
hidden: O.isGroup || O.columnId === "thumbnail"
|
|
1140
1152
|
},
|
|
1141
1153
|
{
|
|
1142
1154
|
label: `Copy row${B.selectedFullRows.length > 1 ? "s" : ""}`,
|
|
1143
1155
|
icon: "content_copy",
|
|
1144
|
-
command: () =>
|
|
1145
|
-
hidden:
|
|
1146
|
-
(te) => re(te)?.rowId === re(
|
|
1156
|
+
command: () => g(B.selectedFullRows, !0),
|
|
1157
|
+
hidden: O.columnId !== "name" || !B.selectedFullRows.some(
|
|
1158
|
+
(te) => re(te)?.rowId === re(O.cellId)?.rowId
|
|
1147
1159
|
)
|
|
1148
1160
|
},
|
|
1149
1161
|
{
|
|
@@ -1151,60 +1163,60 @@ const Ss = ({
|
|
|
1151
1163
|
icon: "content_paste",
|
|
1152
1164
|
shortcut: Ot("v", [Ft.Ctrl]),
|
|
1153
1165
|
command: () => P(B.selectedCells),
|
|
1154
|
-
hidden:
|
|
1155
|
-
disabled:
|
|
1166
|
+
hidden: O.columnId === "name" || O.columnId === "thumbnail" || O.isGroup,
|
|
1167
|
+
disabled: O.attribField?.readOnly
|
|
1156
1168
|
}
|
|
1157
|
-
],
|
|
1169
|
+
], x = (J, O, le, B) => ({
|
|
1158
1170
|
label: "Show details",
|
|
1159
1171
|
icon: "dock_to_left",
|
|
1160
1172
|
shortcut: "Double click",
|
|
1161
1173
|
command: () => {
|
|
1162
|
-
const te = ye(
|
|
1174
|
+
const te = ye(O.entityId, ae);
|
|
1163
1175
|
z(te, !1, !1);
|
|
1164
1176
|
},
|
|
1165
|
-
hidden:
|
|
1166
|
-
}), C = (J,
|
|
1177
|
+
hidden: O.columnId !== "name" || B.selectedRows.length > 1 || O.isGroup || Nt(O.entityType)
|
|
1178
|
+
}), C = (J, O, le, B) => ({
|
|
1167
1179
|
label: "Open in viewer",
|
|
1168
1180
|
icon: "play_circle",
|
|
1169
1181
|
shortcut: "Spacebar",
|
|
1170
1182
|
command: () => {
|
|
1171
1183
|
if (c) {
|
|
1172
|
-
const te =
|
|
1184
|
+
const te = p(O.entityId);
|
|
1173
1185
|
if (te) {
|
|
1174
|
-
const
|
|
1175
|
-
c(
|
|
1186
|
+
const j = sn(te);
|
|
1187
|
+
c(j, { quickView: !0 });
|
|
1176
1188
|
}
|
|
1177
1189
|
}
|
|
1178
1190
|
},
|
|
1179
|
-
hidden:
|
|
1180
|
-
}), R = (J,
|
|
1191
|
+
hidden: O.columnId !== "thumbnail" && O.columnId !== "name" || O.isGroup || O.entityType === "unknown"
|
|
1192
|
+
}), R = (J, O, le, B) => [
|
|
1181
1193
|
{
|
|
1182
1194
|
label: "Expand children",
|
|
1183
1195
|
icon: "expand_all",
|
|
1184
1196
|
shortcut: Ot("click", [Ft.Alt]),
|
|
1185
1197
|
command: () => m(B.selectedRows, !0),
|
|
1186
|
-
hidden:
|
|
1198
|
+
hidden: O.columnId !== "name" || O.entityType !== "folder"
|
|
1187
1199
|
},
|
|
1188
1200
|
{
|
|
1189
1201
|
label: "Collapse children",
|
|
1190
1202
|
icon: "collapse_all",
|
|
1191
1203
|
shortcut: Ot("click", [Ft.Alt]),
|
|
1192
1204
|
command: () => m(B.selectedRows, !1),
|
|
1193
|
-
hidden:
|
|
1205
|
+
hidden: O.columnId !== "name" || O.entityType !== "folder"
|
|
1194
1206
|
},
|
|
1195
1207
|
{
|
|
1196
1208
|
label: "Expand",
|
|
1197
1209
|
icon: "expand_all",
|
|
1198
1210
|
command: () => s(B.selectedRows, !0),
|
|
1199
|
-
hidden:
|
|
1211
|
+
hidden: O.columnId !== "name" || !O.isGroup || a[O.entityId]
|
|
1200
1212
|
},
|
|
1201
1213
|
{
|
|
1202
1214
|
label: "Collapse",
|
|
1203
1215
|
icon: "collapse_all",
|
|
1204
1216
|
command: () => s(B.selectedRows, !1),
|
|
1205
|
-
hidden:
|
|
1217
|
+
hidden: O.columnId !== "name" || !O.isGroup || !a[O.entityId]
|
|
1206
1218
|
}
|
|
1207
|
-
], L = (J,
|
|
1219
|
+
], L = (J, O, le, B) => ({
|
|
1208
1220
|
label: "Delete",
|
|
1209
1221
|
icon: "delete",
|
|
1210
1222
|
danger: !0,
|
|
@@ -1214,60 +1226,60 @@ const Ss = ({
|
|
|
1214
1226
|
command: () => {
|
|
1215
1227
|
const te = [
|
|
1216
1228
|
...new Set(
|
|
1217
|
-
B.selectedCells.map((
|
|
1229
|
+
B.selectedCells.map((j) => re(j)?.rowId).filter((j) => !!j)
|
|
1218
1230
|
)
|
|
1219
1231
|
];
|
|
1220
|
-
|
|
1232
|
+
T(te.length ? te : B.selectedRows);
|
|
1221
1233
|
},
|
|
1222
|
-
hidden:
|
|
1223
|
-
}),
|
|
1224
|
-
const te = l(B.selectedCells),
|
|
1234
|
+
hidden: O.columnId !== "name" || O.isGroup
|
|
1235
|
+
}), H = (J, O, le, B) => {
|
|
1236
|
+
const te = l(B.selectedCells), j = te.length > 0 && f && !(B.selectedRows.length > 1 && B.selectedColumns.length > 1);
|
|
1225
1237
|
return {
|
|
1226
1238
|
label: "Inherit from parent",
|
|
1227
1239
|
icon: "disabled_by_default",
|
|
1228
1240
|
command: () => b(te),
|
|
1229
|
-
hidden: !
|
|
1241
|
+
hidden: !j
|
|
1230
1242
|
};
|
|
1231
|
-
}, Z = (J,
|
|
1243
|
+
}, Z = (J, O) => ({
|
|
1232
1244
|
label: "Export selection",
|
|
1233
1245
|
icon: "download",
|
|
1234
|
-
command: () => h(Array.from(
|
|
1235
|
-
hidden:
|
|
1236
|
-
}), ee = (J,
|
|
1237
|
-
const B = (
|
|
1238
|
-
const
|
|
1239
|
-
return
|
|
1246
|
+
command: () => h(Array.from(S), i),
|
|
1247
|
+
hidden: O.isGroup
|
|
1248
|
+
}), ee = (J, O) => {
|
|
1249
|
+
const B = (O.length ? O : [J.entityId]).flatMap((te) => {
|
|
1250
|
+
const j = p(te);
|
|
1251
|
+
return j ? j.entityType === "folder" || !("folderId" in j) ? [j.id] : j.folderId ? [j.folderId] : [] : [];
|
|
1240
1252
|
});
|
|
1241
1253
|
return B.length ? B : null;
|
|
1242
|
-
}, de = (J,
|
|
1243
|
-
const B = ee(
|
|
1254
|
+
}, de = (J, O, le) => {
|
|
1255
|
+
const B = ee(O, le);
|
|
1244
1256
|
n?.(J, B ? { parentFolderIds: B } : void 0);
|
|
1245
|
-
},
|
|
1246
|
-
"copy-paste":
|
|
1247
|
-
"show-details":
|
|
1248
|
-
rename: (J,
|
|
1257
|
+
}, xe = {
|
|
1258
|
+
"copy-paste": I,
|
|
1259
|
+
"show-details": x,
|
|
1260
|
+
rename: (J, O) => ({
|
|
1249
1261
|
label: "Rename",
|
|
1250
1262
|
icon: "titlecase",
|
|
1251
1263
|
shortcut: "R",
|
|
1252
1264
|
command: () => {
|
|
1253
|
-
const le = ye(
|
|
1265
|
+
const le = ye(O.entityId, "name");
|
|
1254
1266
|
A(le);
|
|
1255
1267
|
},
|
|
1256
|
-
hidden:
|
|
1268
|
+
hidden: O.columnId !== "name" || O.isGroup || O.entityType !== "folder" && O.entityType !== "task",
|
|
1257
1269
|
disabled: !(d || w)
|
|
1258
1270
|
}),
|
|
1259
1271
|
"expand-collapse": R,
|
|
1260
1272
|
delete: L,
|
|
1261
|
-
inherit:
|
|
1273
|
+
inherit: H,
|
|
1262
1274
|
export: Z,
|
|
1263
|
-
"create-folder": (J,
|
|
1275
|
+
"create-folder": (J, O, le, B) => [
|
|
1264
1276
|
{
|
|
1265
1277
|
label: rt.folder.createLabel,
|
|
1266
1278
|
icon: rt.folder.icon,
|
|
1267
1279
|
command: () => {
|
|
1268
|
-
f ? de("folder",
|
|
1280
|
+
f ? de("folder", O, B.selectedRows) : n?.("folder");
|
|
1269
1281
|
},
|
|
1270
|
-
hidden:
|
|
1282
|
+
hidden: O.columnId !== "name" || !n
|
|
1271
1283
|
},
|
|
1272
1284
|
{
|
|
1273
1285
|
label: `Create root ${rt.folder.label.toLowerCase()}`,
|
|
@@ -1275,35 +1287,35 @@ const Ss = ({
|
|
|
1275
1287
|
command: () => {
|
|
1276
1288
|
$(), n?.("folder", { parentFolderIds: [] });
|
|
1277
1289
|
},
|
|
1278
|
-
hidden:
|
|
1290
|
+
hidden: O.columnId !== "name" || !n
|
|
1279
1291
|
}
|
|
1280
1292
|
],
|
|
1281
|
-
"create-task": (J,
|
|
1282
|
-
const te = !!ee(
|
|
1293
|
+
"create-task": (J, O, le, B) => {
|
|
1294
|
+
const te = !!ee(O, B.selectedRows) || F;
|
|
1283
1295
|
return {
|
|
1284
1296
|
label: rt.task.createLabel,
|
|
1285
1297
|
icon: rt.task.icon,
|
|
1286
|
-
command: () => de("task",
|
|
1287
|
-
hidden:
|
|
1298
|
+
command: () => de("task", O, B.selectedRows),
|
|
1299
|
+
hidden: O.columnId !== "name" || !n,
|
|
1288
1300
|
disabled: !te
|
|
1289
1301
|
};
|
|
1290
1302
|
},
|
|
1291
1303
|
"open-viewer": C
|
|
1292
|
-
},
|
|
1293
|
-
const { rowId:
|
|
1294
|
-
if (!
|
|
1295
|
-
const B =
|
|
1304
|
+
}, ve = (J) => {
|
|
1305
|
+
const { rowId: O, colId: le } = re(J) || {};
|
|
1306
|
+
if (!O || !le) return;
|
|
1307
|
+
const B = p(O), te = e.find((be) => be.name === le?.replace("attrib_", "")), j = t.find((be) => be.id === le), Me = B ? "parentId" in B ? B.parentId : "folderId" in B ? B.folderId : void 0 : void 0;
|
|
1296
1308
|
return {
|
|
1297
1309
|
cellId: J,
|
|
1298
1310
|
columnId: le,
|
|
1299
|
-
entityId: B?.entityId || B?.id ||
|
|
1311
|
+
entityId: B?.entityId || B?.id || O,
|
|
1300
1312
|
entityType: B?.entityType,
|
|
1301
1313
|
parentId: Me,
|
|
1302
1314
|
attribField: te,
|
|
1303
|
-
isGroup:
|
|
1315
|
+
isGroup: O.startsWith(Jt),
|
|
1304
1316
|
column: {
|
|
1305
1317
|
id: le,
|
|
1306
|
-
label:
|
|
1318
|
+
label: j?.label || ""
|
|
1307
1319
|
},
|
|
1308
1320
|
data: B
|
|
1309
1321
|
};
|
|
@@ -1311,23 +1323,23 @@ const Ss = ({
|
|
|
1311
1323
|
return { handleTableBodyContextMenu: (J) => {
|
|
1312
1324
|
const B = J.target.closest("td")?.firstElementChild?.id;
|
|
1313
1325
|
if (!B) return;
|
|
1314
|
-
const te =
|
|
1326
|
+
const te = ve(B);
|
|
1315
1327
|
if (!te) return;
|
|
1316
|
-
let
|
|
1317
|
-
const be =
|
|
1328
|
+
let j = Array.from(S);
|
|
1329
|
+
const be = j.filter(
|
|
1318
1330
|
(oe) => re(oe)?.colId === ae
|
|
1319
1331
|
).some(
|
|
1320
1332
|
(oe) => re(oe)?.rowId === te.entityId
|
|
1321
1333
|
);
|
|
1322
|
-
(!
|
|
1323
|
-
const Te =
|
|
1334
|
+
(!j.includes(B) && !be || !j.length) && (j = [B], z(B, !1, !1), M(B));
|
|
1335
|
+
const Te = j.filter(
|
|
1324
1336
|
(oe) => re(oe)?.colId !== ae
|
|
1325
|
-
), Ge =
|
|
1337
|
+
), Ge = j.flatMap((oe) => ve(oe) || []), me = [
|
|
1326
1338
|
...new Map(Ge.map((oe) => [oe.entityId, oe])).values()
|
|
1327
1339
|
], Ee = [], De = [], ke = [], $e = [];
|
|
1328
1340
|
for (const { entityId: oe, columnId: k } of me)
|
|
1329
1341
|
oe && !Ee.includes(oe) && Ee.push(oe), k && !De.includes(k) && De.push(k), k === ae && !ke.includes(oe) && ke.push(oe), oe.startsWith(Jt) && $e.push(oe);
|
|
1330
|
-
const Be =
|
|
1342
|
+
const Be = v.flatMap(
|
|
1331
1343
|
(oe) => typeof oe == "function" ? oe(
|
|
1332
1344
|
J,
|
|
1333
1345
|
te,
|
|
@@ -1344,7 +1356,7 @@ const Ss = ({
|
|
|
1344
1356
|
{
|
|
1345
1357
|
history: D
|
|
1346
1358
|
}
|
|
1347
|
-
) :
|
|
1359
|
+
) : xe[oe]?.(
|
|
1348
1360
|
J,
|
|
1349
1361
|
te,
|
|
1350
1362
|
me,
|
|
@@ -1360,16 +1372,16 @@ const Ss = ({
|
|
|
1360
1372
|
{ history: D }
|
|
1361
1373
|
)
|
|
1362
1374
|
);
|
|
1363
|
-
|
|
1375
|
+
y(J, Be);
|
|
1364
1376
|
} };
|
|
1365
|
-
},
|
|
1377
|
+
}, As = (e) => {
|
|
1366
1378
|
const {
|
|
1367
1379
|
expanded: t,
|
|
1368
1380
|
expandedParentIds: n,
|
|
1369
1381
|
selectedFolders: r,
|
|
1370
1382
|
excludeSelectedFolders: i,
|
|
1371
1383
|
getFolderById: f,
|
|
1372
|
-
showHierarchy:
|
|
1384
|
+
showHierarchy: p
|
|
1373
1385
|
} = e, m = t, s = /* @__PURE__ */ new Map(), a = (o) => {
|
|
1374
1386
|
if (s.has(o)) return s.get(o);
|
|
1375
1387
|
const u = f(o);
|
|
@@ -1382,14 +1394,14 @@ const Ss = ({
|
|
|
1382
1394
|
const E = r.length === 0;
|
|
1383
1395
|
return s.set(o, E), E;
|
|
1384
1396
|
}
|
|
1385
|
-
if (
|
|
1397
|
+
if (p) {
|
|
1386
1398
|
const E = m[c] === !0 && a(c);
|
|
1387
1399
|
return s.set(o, E), E;
|
|
1388
1400
|
} else
|
|
1389
1401
|
return !0;
|
|
1390
1402
|
};
|
|
1391
1403
|
return n.filter((o) => a(o));
|
|
1392
|
-
},
|
|
1404
|
+
}, Ms = 1e3, Os = 400, Fs = 100, En = (e = 1) => Math.max(Fs, Math.min(Os, Math.round(Ms / e))), Ls = ({
|
|
1393
1405
|
groups: e = [],
|
|
1394
1406
|
filters: t = { conditions: [] },
|
|
1395
1407
|
groupBy: n,
|
|
@@ -1397,7 +1409,7 @@ const Ss = ({
|
|
|
1397
1409
|
dataType: i
|
|
1398
1410
|
}) => {
|
|
1399
1411
|
if (!e.length) return [];
|
|
1400
|
-
const f = !!i?.startsWith("list_of_"),
|
|
1412
|
+
const f = !!i?.startsWith("list_of_"), p = t.conditions || [], m = e.map((o) => {
|
|
1401
1413
|
const u = {
|
|
1402
1414
|
key: n.id,
|
|
1403
1415
|
value: [o.value],
|
|
@@ -1405,20 +1417,20 @@ const Ss = ({
|
|
|
1405
1417
|
}, c = r[o.value] || 1;
|
|
1406
1418
|
return {
|
|
1407
1419
|
value: o.value,
|
|
1408
|
-
count:
|
|
1409
|
-
filter: JSON.stringify({ ...t, conditions: [...
|
|
1420
|
+
count: En(e.length) * c,
|
|
1421
|
+
filter: JSON.stringify({ ...t, conditions: [...p, u] })
|
|
1410
1422
|
};
|
|
1411
1423
|
}), s = {
|
|
1412
1424
|
key: n.id,
|
|
1413
1425
|
value: e.map((o) => o.value),
|
|
1414
1426
|
operator: f ? "excludesany" : "notin"
|
|
1415
1427
|
}, a = {
|
|
1416
|
-
value:
|
|
1417
|
-
count:
|
|
1418
|
-
filter: JSON.stringify({ ...t, conditions: [...
|
|
1428
|
+
value: gn,
|
|
1429
|
+
count: En() * (r[gn] || 1),
|
|
1430
|
+
filter: JSON.stringify({ ...t, conditions: [...p, s] })
|
|
1419
1431
|
};
|
|
1420
1432
|
return [...m, a];
|
|
1421
|
-
},
|
|
1433
|
+
}, _s = 300, mi = ({
|
|
1422
1434
|
projectName: e,
|
|
1423
1435
|
selectedFolders: t,
|
|
1424
1436
|
// comes from the slicer
|
|
@@ -1427,62 +1439,62 @@ const Ss = ({
|
|
|
1427
1439
|
// specific task IDs from entity list slicer
|
|
1428
1440
|
taskFilters: i,
|
|
1429
1441
|
folderFilters: f,
|
|
1430
|
-
sorting:
|
|
1442
|
+
sorting: p,
|
|
1431
1443
|
groupBy: m,
|
|
1432
1444
|
taskGroups: s = [],
|
|
1433
1445
|
taskGroupsCount: a,
|
|
1434
1446
|
expanded: o,
|
|
1435
1447
|
showHierarchy: u,
|
|
1436
1448
|
isFlatFolderView: c = !1,
|
|
1437
|
-
attribFields:
|
|
1449
|
+
attribFields: v,
|
|
1438
1450
|
modules: E,
|
|
1439
1451
|
skipLinks: F,
|
|
1440
1452
|
showComments: w = !1,
|
|
1441
1453
|
isLoadingViews: d = !1,
|
|
1442
|
-
onCollapseAll:
|
|
1454
|
+
onCollapseAll: g,
|
|
1443
1455
|
visibleEntityIds: h = [],
|
|
1444
1456
|
folderStatsArgs: P,
|
|
1445
|
-
taskStatsArgs:
|
|
1457
|
+
taskStatsArgs: S,
|
|
1446
1458
|
folderStatsUninitialized: $,
|
|
1447
1459
|
taskStatsUninitialized: z,
|
|
1448
|
-
dispatch:
|
|
1460
|
+
dispatch: M
|
|
1449
1461
|
}) => {
|
|
1450
1462
|
const { isLoading: b } = E, {
|
|
1451
1463
|
folders: D,
|
|
1452
1464
|
isLoading: A,
|
|
1453
|
-
isUninitialized:
|
|
1454
|
-
getFolderById:
|
|
1465
|
+
isUninitialized: T,
|
|
1466
|
+
getFolderById: y,
|
|
1455
1467
|
getFolderIdsWithoutChildren: l
|
|
1456
|
-
} =
|
|
1457
|
-
() =>
|
|
1468
|
+
} = Ss(), I = Object.entries(o).filter(([, G]) => G).filter(([G]) => !Zt(G)).map(([G]) => G), x = W(
|
|
1469
|
+
() => As({
|
|
1458
1470
|
expanded: o,
|
|
1459
|
-
expandedParentIds:
|
|
1471
|
+
expandedParentIds: I,
|
|
1460
1472
|
selectedFolders: t,
|
|
1461
1473
|
excludeSelectedFolders: n,
|
|
1462
|
-
getFolderById:
|
|
1474
|
+
getFolderById: y,
|
|
1463
1475
|
showHierarchy: u
|
|
1464
1476
|
}),
|
|
1465
1477
|
[
|
|
1466
1478
|
o,
|
|
1467
|
-
|
|
1479
|
+
I,
|
|
1468
1480
|
t,
|
|
1469
1481
|
n,
|
|
1470
|
-
|
|
1482
|
+
y,
|
|
1471
1483
|
u
|
|
1472
1484
|
]
|
|
1473
|
-
), [C, R] = Pe(h), L =
|
|
1474
|
-
() => $o((G) => R(G),
|
|
1485
|
+
), [C, R] = Pe(h), L = W(
|
|
1486
|
+
() => $o((G) => R(G), _s),
|
|
1475
1487
|
[]
|
|
1476
1488
|
);
|
|
1477
1489
|
Fe(() => (L(h), () => L.cancel()), [h, L]);
|
|
1478
|
-
const
|
|
1490
|
+
const H = W(() => {
|
|
1479
1491
|
if (!u || c)
|
|
1480
|
-
return
|
|
1492
|
+
return x;
|
|
1481
1493
|
const G = new Set(C);
|
|
1482
|
-
return
|
|
1483
|
-
}, [
|
|
1494
|
+
return x.filter((ne) => G.has(ne));
|
|
1495
|
+
}, [x, u, c, C]), Z = {
|
|
1484
1496
|
projectName: e,
|
|
1485
|
-
parentIds:
|
|
1497
|
+
parentIds: H,
|
|
1486
1498
|
filter: i.filterString,
|
|
1487
1499
|
folderFilter: f.filterString,
|
|
1488
1500
|
search: i.search,
|
|
@@ -1492,9 +1504,9 @@ const Ss = ({
|
|
|
1492
1504
|
isFetching: de,
|
|
1493
1505
|
error: Ie,
|
|
1494
1506
|
isUninitialized: Re
|
|
1495
|
-
} =
|
|
1496
|
-
skip: d || !
|
|
1497
|
-
}), Ce = !i.filterString && !f.filterString && !i.search && !f.search || !D.length || !u && !c,
|
|
1507
|
+
} = Vo(Z, {
|
|
1508
|
+
skip: d || !H.length || !u && !c
|
|
1509
|
+
}), Ce = !i.filterString && !f.filterString && !i.search && !f.search || !D.length || !u && !c, xe = {
|
|
1498
1510
|
projectName: e,
|
|
1499
1511
|
folderSearchRequest: {
|
|
1500
1512
|
taskFilter: i.filter?.conditions?.length ? i.filter : void 0,
|
|
@@ -1502,14 +1514,14 @@ const Ss = ({
|
|
|
1502
1514
|
search: i.search
|
|
1503
1515
|
}
|
|
1504
1516
|
}, {
|
|
1505
|
-
data:
|
|
1517
|
+
data: ve,
|
|
1506
1518
|
isUninitialized: ze,
|
|
1507
1519
|
isLoading: J,
|
|
1508
|
-
isUninitialized:
|
|
1520
|
+
isUninitialized: O,
|
|
1509
1521
|
error: le
|
|
1510
|
-
} =
|
|
1522
|
+
} = Ko(xe, {
|
|
1511
1523
|
skip: d || Ce
|
|
1512
|
-
}), B =
|
|
1524
|
+
}), B = W(() => {
|
|
1513
1525
|
const G = /* @__PURE__ */ new Set(), ne = /* @__PURE__ */ new Set();
|
|
1514
1526
|
D.forEach((V) => {
|
|
1515
1527
|
if (ne.add(V.id), !V.parentId) {
|
|
@@ -1525,7 +1537,7 @@ const Ss = ({
|
|
|
1525
1537
|
}, [
|
|
1526
1538
|
C,
|
|
1527
1539
|
D,
|
|
1528
|
-
|
|
1540
|
+
ve,
|
|
1529
1541
|
Ce,
|
|
1530
1542
|
o,
|
|
1531
1543
|
t,
|
|
@@ -1535,19 +1547,19 @@ const Ss = ({
|
|
|
1535
1547
|
entityIds: Array.from(B),
|
|
1536
1548
|
entityType: "folder"
|
|
1537
1549
|
}, {
|
|
1538
|
-
data:
|
|
1550
|
+
data: j = [],
|
|
1539
1551
|
isUninitialized: Me,
|
|
1540
1552
|
isFetching: be
|
|
1541
|
-
} =
|
|
1553
|
+
} = wn(te, { skip: d || F }), Te = W(() => {
|
|
1542
1554
|
const G = /* @__PURE__ */ new Map(), ne = (V) => ({
|
|
1543
1555
|
...V,
|
|
1544
1556
|
entityId: V.id,
|
|
1545
1557
|
entityType: "folder",
|
|
1546
|
-
links:
|
|
1558
|
+
links: j?.find((Q) => Q.id === V.id)?.links || []
|
|
1547
1559
|
});
|
|
1548
|
-
if (!ze &&
|
|
1560
|
+
if (!ze && ve && D.length) {
|
|
1549
1561
|
const V = /* @__PURE__ */ new Set();
|
|
1550
|
-
for (const X of
|
|
1562
|
+
for (const X of ve)
|
|
1551
1563
|
V.add(X);
|
|
1552
1564
|
const Y = /* @__PURE__ */ new Map();
|
|
1553
1565
|
for (const X of D)
|
|
@@ -1571,30 +1583,30 @@ const Ss = ({
|
|
|
1571
1583
|
return G.forEach((Q, X) => {
|
|
1572
1584
|
const fe = Q.path, nt = V.includes(fe);
|
|
1573
1585
|
(V.some(
|
|
1574
|
-
(
|
|
1586
|
+
(Ht) => fe.startsWith(Ht + "/")
|
|
1575
1587
|
) || nt && (!n || c)) && Y.set(X, ne(Q));
|
|
1576
1588
|
}), Y;
|
|
1577
1589
|
}
|
|
1578
1590
|
return G;
|
|
1579
1591
|
}, [
|
|
1580
1592
|
D,
|
|
1581
|
-
|
|
1593
|
+
ve,
|
|
1582
1594
|
ze,
|
|
1583
1595
|
t,
|
|
1584
1596
|
n,
|
|
1585
|
-
|
|
1597
|
+
j,
|
|
1586
1598
|
c
|
|
1587
|
-
]), Ge =
|
|
1599
|
+
]), Ge = W(() => de ? yo({
|
|
1588
1600
|
expandedFoldersTasks: ee,
|
|
1589
|
-
expandedParentIds:
|
|
1601
|
+
expandedParentIds: I,
|
|
1590
1602
|
foldersMap: Te
|
|
1591
|
-
}) : {}, [de, ee,
|
|
1603
|
+
}) : {}, [de, ee, I, Te]), [me, Ee] = Pe("");
|
|
1592
1604
|
Fe(() => {
|
|
1593
1605
|
me && Ee("");
|
|
1594
|
-
}, [
|
|
1595
|
-
const De = { ...
|
|
1606
|
+
}, [p, me]);
|
|
1607
|
+
const De = { ...p[0] }, ke = Io(De?.id, u, "task"), $e = t.length ? Array.from(
|
|
1596
1608
|
/* @__PURE__ */ new Set([...Te.keys(), ...n ? t : []])
|
|
1597
|
-
) : void 0, Be =
|
|
1609
|
+
) : void 0, Be = W(
|
|
1598
1610
|
() => l(t),
|
|
1599
1611
|
[t, l]
|
|
1600
1612
|
), oe = u && n, k = () => {
|
|
@@ -1615,10 +1627,10 @@ const Ss = ({
|
|
|
1615
1627
|
data: ce,
|
|
1616
1628
|
isLoading: ie,
|
|
1617
1629
|
error: we,
|
|
1618
|
-
fetchNextPage:
|
|
1630
|
+
fetchNextPage: ge,
|
|
1619
1631
|
hasNextPage: Je,
|
|
1620
|
-
isFetchingNextPage:
|
|
1621
|
-
isUninitialized:
|
|
1632
|
+
isFetchingNextPage: Wt,
|
|
1633
|
+
isUninitialized: We
|
|
1622
1634
|
} = qo(U, {
|
|
1623
1635
|
// Skip flat task list for flat folder view (tasks loaded on folder expand).
|
|
1624
1636
|
// In hierarchy+slicer mode, run it to fetch tasks under selected-but-hidden folders.
|
|
@@ -1628,9 +1640,9 @@ const Ss = ({
|
|
|
1628
1640
|
cursor: "",
|
|
1629
1641
|
desc: !!De?.desc
|
|
1630
1642
|
}
|
|
1631
|
-
}),
|
|
1643
|
+
}), He = W(() => ce?.pages ? ce.pages.flatMap((G) => G.tasks || []) : [], [ce?.pages]), { pageCounts: bt, incrementPageCount: Ct } = Cs({
|
|
1632
1644
|
groups: s
|
|
1633
|
-
}), wt =
|
|
1645
|
+
}), wt = ws(m, v), St = W(() => Object.entries(o).filter(([, G]) => G).filter(([G]) => Zt(G)).map(([G]) => G.slice(Jt.length)), [o]), at = W(() => m ? Ls({
|
|
1634
1646
|
groups: s,
|
|
1635
1647
|
// @ts-expect-error: filter is the same
|
|
1636
1648
|
filters: i.filter,
|
|
@@ -1658,51 +1670,51 @@ const Ss = ({
|
|
|
1658
1670
|
data: { tasks: Et = [] } = {},
|
|
1659
1671
|
isUninitialized: lt,
|
|
1660
1672
|
error: Ze
|
|
1661
|
-
} =
|
|
1673
|
+
} = jo(Tt, {
|
|
1662
1674
|
skip: d || !m || !at.length || b
|
|
1663
|
-
}), et =
|
|
1675
|
+
}), et = W(() => r?.length ? He : c ? ee : u ? oe ? [...ee, ...He] : ee : m ? Et : He, [
|
|
1664
1676
|
r,
|
|
1665
1677
|
u,
|
|
1666
1678
|
oe,
|
|
1667
1679
|
c,
|
|
1668
1680
|
m,
|
|
1669
|
-
|
|
1681
|
+
He,
|
|
1670
1682
|
ee,
|
|
1671
1683
|
Et
|
|
1672
|
-
]),
|
|
1684
|
+
]), qe = W(() => new Set(et.map((G) => G.id)), [et]), xt = {
|
|
1673
1685
|
projectName: e,
|
|
1674
|
-
entityIds: Array.from(
|
|
1686
|
+
entityIds: Array.from(qe),
|
|
1675
1687
|
entityType: "task"
|
|
1676
1688
|
}, {
|
|
1677
1689
|
data: Le = [],
|
|
1678
|
-
isUninitialized:
|
|
1690
|
+
isUninitialized: je,
|
|
1679
1691
|
isFetching: ct
|
|
1680
|
-
} =
|
|
1681
|
-
skip: d ||
|
|
1682
|
-
}),
|
|
1692
|
+
} = wn(xt, {
|
|
1693
|
+
skip: d || qe.size === 0 || F
|
|
1694
|
+
}), vt = W(() => {
|
|
1683
1695
|
const G = /* @__PURE__ */ new Set();
|
|
1684
1696
|
if (be && !F) {
|
|
1685
|
-
const ne = new Set(
|
|
1697
|
+
const ne = new Set(j.map((V) => V.id));
|
|
1686
1698
|
for (const V of B)
|
|
1687
1699
|
ne.has(V) || G.add(V);
|
|
1688
1700
|
}
|
|
1689
1701
|
if (ct && !F) {
|
|
1690
1702
|
const ne = new Set(Le.map((V) => V.id));
|
|
1691
|
-
for (const V of
|
|
1703
|
+
for (const V of qe)
|
|
1692
1704
|
ne.has(V) || G.add(V);
|
|
1693
1705
|
}
|
|
1694
1706
|
return G;
|
|
1695
1707
|
}, [
|
|
1696
1708
|
be,
|
|
1697
1709
|
ct,
|
|
1698
|
-
|
|
1710
|
+
j,
|
|
1699
1711
|
Le,
|
|
1700
1712
|
B,
|
|
1701
|
-
|
|
1713
|
+
qe,
|
|
1702
1714
|
F
|
|
1703
1715
|
]), Rt = (G) => {
|
|
1704
|
-
m ? G && Ct(G) : Je &&
|
|
1705
|
-
}, { tasksMap: kt, tasksByFolderMap: Qe } =
|
|
1716
|
+
m ? G && Ct(G) : Je && ge();
|
|
1717
|
+
}, { tasksMap: kt, tasksByFolderMap: Qe } = W(() => {
|
|
1706
1718
|
const G = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Map(), V = (Y) => ({
|
|
1707
1719
|
...Y,
|
|
1708
1720
|
entityId: Y.id,
|
|
@@ -1727,7 +1739,7 @@ const Ss = ({
|
|
|
1727
1739
|
ne.set(X, [Q]);
|
|
1728
1740
|
}
|
|
1729
1741
|
return { tasksMap: G, tasksByFolderMap: ne };
|
|
1730
|
-
}, [et, Le]), Xe =
|
|
1742
|
+
}, [et, Le]), Xe = W(() => {
|
|
1731
1743
|
if (!r?.length || !Qe.size) return Te;
|
|
1732
1744
|
const G = /* @__PURE__ */ new Set();
|
|
1733
1745
|
for (const Y of Qe.keys())
|
|
@@ -1747,31 +1759,31 @@ const Ss = ({
|
|
|
1747
1759
|
return V;
|
|
1748
1760
|
}, [Te, Qe, r]), tt = async (G = []) => {
|
|
1749
1761
|
const ne = G.length === 0, V = G.some((X) => X.topic.startsWith("entity.folder.")), Y = G.some((X) => X.topic.startsWith("entity.task.")), Q = [];
|
|
1750
|
-
(ne || V) && !
|
|
1762
|
+
(ne || V) && !T && Q.push({
|
|
1751
1763
|
endpointName: "getFolderList",
|
|
1752
1764
|
args: { projectName: e, attrib: !0 }
|
|
1753
|
-
}), (ne || V || Y) && !
|
|
1765
|
+
}), (ne || V || Y) && !O && Q.push({ endpointName: "getSearchFolders", args: xe }), (ne || Y) && !Re && Q.push({
|
|
1754
1766
|
endpointName: "getOverviewTasksByFolders",
|
|
1755
1767
|
args: Z
|
|
1756
|
-
}), (ne || Y) && !
|
|
1768
|
+
}), (ne || Y) && !We && Q.push({ endpointName: "getTasksListInfinite", args: U }), (ne || Y) && !lt && Q.push({ endpointName: "getGroupedTasksList", args: Tt }), (ne || V) && !$ && P && Q.push({ endpointName: "GetFolderColumnStats", args: P }), (ne || Y) && !z && S && Q.push({ endpointName: "GetTaskColumnStats", args: S }), (ne || V) && !Me && Q.push({ endpointName: "getEntityLinks", args: te }), (ne || Y) && !je && Q.push({ endpointName: "getEntityLinks", args: xt }), await Promise.all(
|
|
1757
1769
|
Q.map(
|
|
1758
|
-
({ endpointName: X, args: fe }) =>
|
|
1759
|
-
|
|
1770
|
+
({ endpointName: X, args: fe }) => M(
|
|
1771
|
+
Is(X, fe, {
|
|
1760
1772
|
refreshOtherActiveQueries: !1
|
|
1761
1773
|
})
|
|
1762
1774
|
).unwrap()
|
|
1763
1775
|
)
|
|
1764
1776
|
), Q.map(
|
|
1765
|
-
({ endpointName: X, args: fe }) =>
|
|
1777
|
+
({ endpointName: X, args: fe }) => M(bs(X, fe))
|
|
1766
1778
|
);
|
|
1767
|
-
}, Pt = we || le || Ze, Dt =
|
|
1768
|
-
if (Ie &&
|
|
1779
|
+
}, Pt = we || le || Ze, Dt = W(() => {
|
|
1780
|
+
if (Ie && g)
|
|
1769
1781
|
return {
|
|
1770
1782
|
label: "Collapse all folders",
|
|
1771
1783
|
icon: "restart_alt",
|
|
1772
|
-
callback:
|
|
1784
|
+
callback: g
|
|
1773
1785
|
};
|
|
1774
|
-
}, [Ie,
|
|
1786
|
+
}, [Ie, g]);
|
|
1775
1787
|
return {
|
|
1776
1788
|
foldersMap: Xe,
|
|
1777
1789
|
tasksMap: kt,
|
|
@@ -1783,13 +1795,13 @@ const Ss = ({
|
|
|
1783
1795
|
softErrorAction: Dt,
|
|
1784
1796
|
isLoadingAll: d || A || ie || J || b,
|
|
1785
1797
|
// these all show a full loading state
|
|
1786
|
-
isLoadingMore:
|
|
1798
|
+
isLoadingMore: Wt,
|
|
1787
1799
|
loadingTasks: Ge,
|
|
1788
|
-
loadingLinksEntityIds:
|
|
1800
|
+
loadingLinksEntityIds: vt,
|
|
1789
1801
|
fetchNextPage: Rt,
|
|
1790
1802
|
onSyncData: tt
|
|
1791
1803
|
};
|
|
1792
|
-
},
|
|
1804
|
+
}, Ns = ({
|
|
1793
1805
|
queryFilters: e,
|
|
1794
1806
|
sliceFilter: t,
|
|
1795
1807
|
sliceFilters: n,
|
|
@@ -1805,16 +1817,16 @@ const Ss = ({
|
|
|
1805
1817
|
operator: "and"
|
|
1806
1818
|
});
|
|
1807
1819
|
}
|
|
1808
|
-
let
|
|
1820
|
+
let p = e, m = "";
|
|
1809
1821
|
if (i?.conditions?.length) {
|
|
1810
1822
|
const o = [], u = i.conditions.filter((c) => {
|
|
1811
|
-
const
|
|
1812
|
-
if (
|
|
1813
|
-
const E =
|
|
1823
|
+
const v = c;
|
|
1824
|
+
if (v.key === Go) {
|
|
1825
|
+
const E = v.value;
|
|
1814
1826
|
return E != null && String(E).trim() !== "" && o.push(String(E)), !1;
|
|
1815
1827
|
}
|
|
1816
|
-
if (r &&
|
|
1817
|
-
const E =
|
|
1828
|
+
if (r && v.key === r) {
|
|
1829
|
+
const E = v.value;
|
|
1818
1830
|
if (E != null)
|
|
1819
1831
|
if (Array.isArray(E))
|
|
1820
1832
|
E.forEach((F) => {
|
|
@@ -1831,32 +1843,32 @@ const Ss = ({
|
|
|
1831
1843
|
});
|
|
1832
1844
|
m = o.join(", "), i = u.length ? { ...i, conditions: u } : { ...i, conditions: [] };
|
|
1833
1845
|
}
|
|
1834
|
-
const s = i?.conditions?.length ?
|
|
1846
|
+
const s = i?.conditions?.length ? $n(ys(i)) : i;
|
|
1835
1847
|
return {
|
|
1836
1848
|
filterString: s?.conditions?.length ? JSON.stringify(s) : "",
|
|
1837
1849
|
filter: s,
|
|
1838
1850
|
search: m,
|
|
1839
1851
|
combinedFilters: s,
|
|
1840
|
-
displayFilters:
|
|
1852
|
+
displayFilters: p
|
|
1841
1853
|
};
|
|
1842
|
-
},
|
|
1854
|
+
}, pi = (e) => {
|
|
1843
1855
|
const { queryFilters: t, sliceFilter: n, sliceFilters: r } = e;
|
|
1844
|
-
return
|
|
1845
|
-
},
|
|
1856
|
+
return W(() => Ns(e), [t, n, r]);
|
|
1857
|
+
}, gi = ({ foldersMap: e, tasksMap: t }) => W(() => {
|
|
1846
1858
|
const n = /* @__PURE__ */ new Map();
|
|
1847
1859
|
return e.forEach((r) => {
|
|
1848
1860
|
n.set(r.id, r);
|
|
1849
1861
|
}), t.forEach((r) => {
|
|
1850
1862
|
n.set(r.id, r);
|
|
1851
1863
|
}), n;
|
|
1852
|
-
}, [e, t]),
|
|
1864
|
+
}, [e, t]), Un = "0".repeat(32), hi = (e, t, n) => {
|
|
1853
1865
|
if (!n || !e.length) return e;
|
|
1854
1866
|
const r = e.filter((i) => {
|
|
1855
1867
|
const f = t[i];
|
|
1856
1868
|
return !f || n.has(f);
|
|
1857
1869
|
});
|
|
1858
|
-
return r.length ? r : [
|
|
1859
|
-
},
|
|
1870
|
+
return r.length ? r : [Un];
|
|
1871
|
+
}, zs = (e, t, n) => {
|
|
1860
1872
|
const r = e.find((o) => o.sliceType === "hierarchy"), i = e.find((o) => o.sliceType === "entityList"), f = Object.entries(r?.rowSelection || {}).filter(([, o]) => o).map(([o]) => o);
|
|
1861
1873
|
if (!(!!i && Object.entries(i.rowSelection).some(([o, u]) => u && !o.startsWith("folder-"))))
|
|
1862
1874
|
return { selectedFolders: f, folderScope: null, listPanelSelected: !1 };
|
|
@@ -1872,26 +1884,26 @@ const Ss = ({
|
|
|
1872
1884
|
];
|
|
1873
1885
|
}
|
|
1874
1886
|
return {
|
|
1875
|
-
selectedFolders: s && !a.length ? [
|
|
1887
|
+
selectedFolders: s && !a.length ? [Un] : a,
|
|
1876
1888
|
folderScope: s,
|
|
1877
1889
|
listPanelSelected: !0
|
|
1878
1890
|
};
|
|
1879
|
-
},
|
|
1891
|
+
}, yi = ({
|
|
1880
1892
|
slices: e,
|
|
1881
1893
|
entityListFolderIds: t,
|
|
1882
1894
|
getChildFolderIds: n
|
|
1883
|
-
}) =>
|
|
1884
|
-
() =>
|
|
1895
|
+
}) => W(
|
|
1896
|
+
() => zs(e, t, n),
|
|
1885
1897
|
[e, t, n]
|
|
1886
|
-
),
|
|
1898
|
+
), Ii = ({
|
|
1887
1899
|
attribFields: e,
|
|
1888
1900
|
allowedScopes: t = ["task", "folder"]
|
|
1889
|
-
}) =>
|
|
1901
|
+
}) => W(
|
|
1890
1902
|
() => e.filter(
|
|
1891
1903
|
(n) => t.some((r) => n.scope?.includes(r))
|
|
1892
1904
|
),
|
|
1893
1905
|
[e, t]
|
|
1894
|
-
),
|
|
1906
|
+
), bi = ({ expanded: e, setExpanded: t }) => {
|
|
1895
1907
|
const n = K(
|
|
1896
1908
|
(f) => {
|
|
1897
1909
|
t(ht(f, e));
|
|
@@ -1911,20 +1923,20 @@ const Ss = ({
|
|
|
1911
1923
|
toggleExpanded: i,
|
|
1912
1924
|
expandedIds: r
|
|
1913
1925
|
};
|
|
1914
|
-
},
|
|
1926
|
+
}, Bs = ({
|
|
1915
1927
|
selectedCells: e,
|
|
1916
1928
|
setSelectedCells: t,
|
|
1917
1929
|
focusedCellId: n,
|
|
1918
1930
|
setFocusedCellId: r
|
|
1919
1931
|
}) => {
|
|
1920
|
-
const { getEntityById: i, isLoading: f } = Ve(),
|
|
1921
|
-
Fe(() => (
|
|
1922
|
-
|
|
1932
|
+
const { getEntityById: i, isLoading: f } = Ve(), p = Ne(!0);
|
|
1933
|
+
Fe(() => (p.current = !0, () => {
|
|
1934
|
+
p.current = !1;
|
|
1923
1935
|
}), []), Fe(() => {
|
|
1924
1936
|
if (f) return;
|
|
1925
|
-
if (
|
|
1937
|
+
if (p.current) {
|
|
1926
1938
|
const s = setTimeout(() => {
|
|
1927
|
-
|
|
1939
|
+
p.current = !1;
|
|
1928
1940
|
}, 2e3);
|
|
1929
1941
|
return () => clearTimeout(s);
|
|
1930
1942
|
}
|
|
@@ -1938,11 +1950,11 @@ const Ss = ({
|
|
|
1938
1950
|
t(s), m.has(n || "") && r(null);
|
|
1939
1951
|
}
|
|
1940
1952
|
}, [i, e, n, t, r, f]);
|
|
1941
|
-
},
|
|
1942
|
-
const { updateGroupBy: t } = it(), { attribFields: n, scopes: r } = Ve(), i = e.startsWith("attrib_"), f = i ? e.replace("attrib_", "") : void 0,
|
|
1953
|
+
}, Us = (e) => {
|
|
1954
|
+
const { updateGroupBy: t } = it(), { attribFields: n, scopes: r } = Ve(), i = e.startsWith("attrib_"), f = i ? e.replace("attrib_", "") : void 0, p = W(
|
|
1943
1955
|
() => i ? n.find((u) => u.name === f) : void 0,
|
|
1944
1956
|
[n, i, f]
|
|
1945
|
-
), m =
|
|
1957
|
+
), m = W(() => {
|
|
1946
1958
|
if (e.startsWith("attrib_")) return "attrib." + e.replace("attrib_", "");
|
|
1947
1959
|
if (e === "subType") {
|
|
1948
1960
|
if (r.includes("task"))
|
|
@@ -1951,7 +1963,7 @@ const Ss = ({
|
|
|
1951
1963
|
return "productType";
|
|
1952
1964
|
}
|
|
1953
1965
|
if (["status", "assignees", "tags", "taskType"].includes(e)) return e;
|
|
1954
|
-
}, [e]), s =
|
|
1966
|
+
}, [e]), s = W(() => m ? i ? !!p && es(p, "task") : !0 : !1, [p, i, m]), a = W(() => i ? p?.data.title || p?.name || f || "Attribute" : e === "status" ? "Status" : e === "subType" ? "Type" : e === "assignees" ? "Assignees" : e === "tags" ? "Tags" : "Column", [p, f, e, i]), o = K(() => {
|
|
1955
1967
|
m && t({ id: m, desc: !1 });
|
|
1956
1968
|
}, [m, t]);
|
|
1957
1969
|
return {
|
|
@@ -1960,13 +1972,13 @@ const Ss = ({
|
|
|
1960
1972
|
groupLabel: a,
|
|
1961
1973
|
groupBySelectedColumn: o
|
|
1962
1974
|
};
|
|
1963
|
-
},
|
|
1964
|
-
const [t, n] = Pe(/* @__PURE__ */ new Set()), [r, i] = Pe(null), [f,
|
|
1975
|
+
}, Ci = ({ children: e }) => {
|
|
1976
|
+
const [t, n] = Pe(/* @__PURE__ */ new Set()), [r, i] = Pe(null), [f, p] = Pe(!1), [m, s] = Pe(null), [a, o] = Pe({
|
|
1965
1977
|
rowIdToIndex: /* @__PURE__ */ new Map(),
|
|
1966
1978
|
colIdToIndex: /* @__PURE__ */ new Map(),
|
|
1967
1979
|
indexToRowId: /* @__PURE__ */ new Map(),
|
|
1968
1980
|
indexToColId: /* @__PURE__ */ new Map()
|
|
1969
|
-
}), u = (l) => JSON.stringify(Array.from(l.entries())), c =
|
|
1981
|
+
}), u = (l) => JSON.stringify(Array.from(l.entries())), c = W(
|
|
1970
1982
|
() => a,
|
|
1971
1983
|
[
|
|
1972
1984
|
u(a.rowIdToIndex),
|
|
@@ -1974,113 +1986,113 @@ const Ss = ({
|
|
|
1974
1986
|
u(a.indexToRowId),
|
|
1975
1987
|
u(a.indexToColId)
|
|
1976
1988
|
]
|
|
1977
|
-
),
|
|
1989
|
+
), v = Ne(!1), E = W(
|
|
1978
1990
|
() => Array.from(t).filter(
|
|
1979
1991
|
(l) => re(l)?.colId === ae && re(l)?.rowId
|
|
1980
1992
|
).map((l) => re(l)?.rowId),
|
|
1981
1993
|
[t]
|
|
1982
1994
|
);
|
|
1983
|
-
|
|
1995
|
+
Bs({
|
|
1984
1996
|
selectedCells: t,
|
|
1985
1997
|
setSelectedCells: n,
|
|
1986
1998
|
focusedCellId: r,
|
|
1987
1999
|
setFocusedCellId: i
|
|
1988
2000
|
});
|
|
1989
|
-
const F = Ne(!1), w = K((l,
|
|
1990
|
-
const
|
|
1991
|
-
l.forEach((
|
|
1992
|
-
|
|
1993
|
-
}),
|
|
1994
|
-
C.set(
|
|
1995
|
-
}), o({ rowIdToIndex:
|
|
1996
|
-
}, []), d = K((l,
|
|
1997
|
-
n((
|
|
2001
|
+
const F = Ne(!1), w = K((l, I) => {
|
|
2002
|
+
const x = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
|
|
2003
|
+
l.forEach((H, Z) => {
|
|
2004
|
+
x.set(H, Z), R.set(Z, H);
|
|
2005
|
+
}), I.forEach((H, Z) => {
|
|
2006
|
+
C.set(H, Z), L.set(Z, H);
|
|
2007
|
+
}), o({ rowIdToIndex: x, colIdToIndex: C, indexToRowId: R, indexToColId: L });
|
|
2008
|
+
}, []), d = K((l, I) => {
|
|
2009
|
+
n((x) => {
|
|
1998
2010
|
let C = new Set(l);
|
|
1999
|
-
if (
|
|
2000
|
-
const R = Array.from(
|
|
2011
|
+
if (I.colId !== ae && I.colId !== Ae) {
|
|
2012
|
+
const R = Array.from(x).filter(
|
|
2001
2013
|
(L) => re(L)?.colId === ae
|
|
2002
2014
|
);
|
|
2003
2015
|
R.length && (C = /* @__PURE__ */ new Set([...C, ...R]));
|
|
2004
2016
|
}
|
|
2005
2017
|
return C;
|
|
2006
2018
|
});
|
|
2007
|
-
}, []),
|
|
2008
|
-
(l,
|
|
2009
|
-
|
|
2010
|
-
const C = c.rowIdToIndex.get(l.rowId) ?? 0, R = c.colIdToIndex.get(l.colId) ?? 0, L = c.rowIdToIndex.get(
|
|
2019
|
+
}, []), g = K(
|
|
2020
|
+
(l, I, x) => {
|
|
2021
|
+
x || d(/* @__PURE__ */ new Set(), l);
|
|
2022
|
+
const C = c.rowIdToIndex.get(l.rowId) ?? 0, R = c.colIdToIndex.get(l.colId) ?? 0, L = c.rowIdToIndex.get(I.rowId) ?? 0, H = c.colIdToIndex.get(I.colId) ?? 0, Z = Math.min(C, L), ee = Math.max(C, L), de = Math.min(R, H), Ie = Math.max(R, H), Re = new Set(x ? t : []);
|
|
2011
2023
|
for (let Ce = Z; Ce <= ee; Ce++) {
|
|
2012
|
-
const
|
|
2013
|
-
if (
|
|
2014
|
-
for (let
|
|
2015
|
-
const ze = c.indexToColId.get(
|
|
2016
|
-
ze && Re.add(ye(
|
|
2024
|
+
const xe = c.indexToRowId.get(Ce);
|
|
2025
|
+
if (xe)
|
|
2026
|
+
for (let ve = de; ve <= Ie; ve++) {
|
|
2027
|
+
const ze = c.indexToColId.get(ve);
|
|
2028
|
+
ze && Re.add(ye(xe, ze));
|
|
2017
2029
|
}
|
|
2018
2030
|
}
|
|
2019
2031
|
return Re;
|
|
2020
2032
|
},
|
|
2021
2033
|
[c, t, d]
|
|
2022
2034
|
), h = K(
|
|
2023
|
-
(l,
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2035
|
+
(l, I) => {
|
|
2036
|
+
const x = re(l);
|
|
2037
|
+
x && (p(!0), F.current = I, v.current = t.has(l), I ? n((C) => {
|
|
2026
2038
|
const R = new Set(C);
|
|
2027
|
-
return R.has(l) ? (R.delete(l), r === l && (R.size > 0 ? i(Array.from(R)[Array.from(R).length - 1]) : i(null))) : (R.add(l), i(l), s(
|
|
2028
|
-
}) : t.size === 1 && t.has(l) && [ae, "name"].includes(
|
|
2039
|
+
return R.has(l) ? (R.delete(l), r === l && (R.size > 0 ? i(Array.from(R)[Array.from(R).length - 1]) : i(null))) : (R.add(l), i(l), s(x)), R;
|
|
2040
|
+
}) : t.size === 1 && t.has(l) && [ae, "name"].includes(x.colId) ? (n(/* @__PURE__ */ new Set()), s(null), i(null)) : (d(/* @__PURE__ */ new Set([l]), x), s(x), i(l)));
|
|
2029
2041
|
},
|
|
2030
2042
|
[t, r, d]
|
|
2031
2043
|
), P = K(
|
|
2032
|
-
(l,
|
|
2044
|
+
(l, I) => {
|
|
2033
2045
|
if (!f || !m) return;
|
|
2034
|
-
const
|
|
2035
|
-
if (
|
|
2036
|
-
if (
|
|
2046
|
+
const x = re(l);
|
|
2047
|
+
if (x)
|
|
2048
|
+
if (I)
|
|
2037
2049
|
n((C) => {
|
|
2038
2050
|
const R = new Set(C);
|
|
2039
|
-
return re(l) && (
|
|
2051
|
+
return re(l) && (v.current ? R.delete(l) : R.add(l)), R;
|
|
2040
2052
|
});
|
|
2041
2053
|
else {
|
|
2042
2054
|
if (F.current) return;
|
|
2043
|
-
const C =
|
|
2055
|
+
const C = g(
|
|
2044
2056
|
m,
|
|
2045
|
-
|
|
2057
|
+
x,
|
|
2046
2058
|
F.current
|
|
2047
2059
|
);
|
|
2048
|
-
d(C,
|
|
2060
|
+
d(C, x);
|
|
2049
2061
|
}
|
|
2050
2062
|
},
|
|
2051
|
-
[f, m,
|
|
2052
|
-
),
|
|
2053
|
-
|
|
2063
|
+
[f, m, g, d]
|
|
2064
|
+
), S = K(() => {
|
|
2065
|
+
p(!1);
|
|
2054
2066
|
}, []), $ = K(
|
|
2055
|
-
(l,
|
|
2067
|
+
(l, I, x) => {
|
|
2056
2068
|
const C = re(l);
|
|
2057
2069
|
if (C)
|
|
2058
|
-
if (
|
|
2059
|
-
const R =
|
|
2070
|
+
if (x && m) {
|
|
2071
|
+
const R = g(m, C, I);
|
|
2060
2072
|
d(R, C);
|
|
2061
|
-
} else
|
|
2073
|
+
} else I ? n((R) => {
|
|
2062
2074
|
const L = new Set(R);
|
|
2063
2075
|
return L.has(l) ? L.delete(l) : L.add(l), L;
|
|
2064
2076
|
}) : (d(/* @__PURE__ */ new Set([l]), C), s(C));
|
|
2065
2077
|
},
|
|
2066
|
-
[m,
|
|
2078
|
+
[m, g, d]
|
|
2067
2079
|
), z = K((l) => {
|
|
2068
2080
|
i(l);
|
|
2069
|
-
}, []),
|
|
2081
|
+
}, []), M = K(() => {
|
|
2070
2082
|
n(/* @__PURE__ */ new Set()), s(null), i(null);
|
|
2071
|
-
}, []), b = K((l) => t.has(l), [t]), D = K((l) => l === r, [r]), A = K((l) => re(l), []),
|
|
2083
|
+
}, []), b = K((l) => t.has(l), [t]), D = K((l) => l === r, [r]), A = K((l) => re(l), []), T = K(
|
|
2072
2084
|
(l) => {
|
|
2073
2085
|
if (!b(l)) return [];
|
|
2074
|
-
const
|
|
2075
|
-
if (!
|
|
2076
|
-
const
|
|
2077
|
-
if (
|
|
2078
|
-
const R = c.indexToRowId.get(
|
|
2079
|
-
let ee =
|
|
2080
|
-
return (!R || !t.has(ye(R,
|
|
2086
|
+
const I = re(l);
|
|
2087
|
+
if (!I) return [];
|
|
2088
|
+
const x = c.rowIdToIndex.get(I.rowId), C = c.colIdToIndex.get(I.colId);
|
|
2089
|
+
if (x === void 0 || C === void 0) return [];
|
|
2090
|
+
const R = c.indexToRowId.get(x - 1), L = c.indexToColId.get(C + 1), H = c.indexToRowId.get(x + 1), Z = c.indexToColId.get(C - 1);
|
|
2091
|
+
let ee = pt.None;
|
|
2092
|
+
return (!R || !t.has(ye(R, I.colId))) && (ee |= pt.Top), (!L || !t.has(ye(I.rowId, L))) && (ee |= pt.Right), (!H || !t.has(ye(H, I.colId))) && (ee |= pt.Bottom), (!Z || !t.has(ye(I.rowId, Z))) && (ee |= pt.Left), bo(ee);
|
|
2081
2093
|
},
|
|
2082
2094
|
[t, c, b]
|
|
2083
|
-
),
|
|
2095
|
+
), y = W(
|
|
2084
2096
|
() => ({
|
|
2085
2097
|
selectedCells: t,
|
|
2086
2098
|
selectedRows: E,
|
|
@@ -2095,13 +2107,13 @@ const Ss = ({
|
|
|
2095
2107
|
selectCell: $,
|
|
2096
2108
|
startSelection: h,
|
|
2097
2109
|
extendSelection: P,
|
|
2098
|
-
endSelection:
|
|
2110
|
+
endSelection: S,
|
|
2099
2111
|
focusCell: z,
|
|
2100
|
-
clearSelection:
|
|
2112
|
+
clearSelection: M,
|
|
2101
2113
|
isCellSelected: b,
|
|
2102
2114
|
isCellFocused: D,
|
|
2103
2115
|
getCellPositionFromId: A,
|
|
2104
|
-
getCellBorderClasses:
|
|
2116
|
+
getCellBorderClasses: T
|
|
2105
2117
|
}),
|
|
2106
2118
|
[
|
|
2107
2119
|
t,
|
|
@@ -2117,20 +2129,20 @@ const Ss = ({
|
|
|
2117
2129
|
$,
|
|
2118
2130
|
h,
|
|
2119
2131
|
P,
|
|
2120
|
-
|
|
2132
|
+
S,
|
|
2121
2133
|
z,
|
|
2122
|
-
|
|
2134
|
+
M,
|
|
2123
2135
|
b,
|
|
2124
2136
|
D,
|
|
2125
2137
|
A,
|
|
2126
|
-
|
|
2138
|
+
T
|
|
2127
2139
|
]
|
|
2128
2140
|
);
|
|
2129
|
-
return /* @__PURE__ */ N(
|
|
2130
|
-
},
|
|
2141
|
+
return /* @__PURE__ */ N(Co.Provider, { value: y, children: e });
|
|
2142
|
+
}, wi = "count", Si = (e) => e === "count" || e === "both", Ti = (e) => e === "percent" || e === "both", Ei = (e, t) => e && t ? "both" : e ? "count" : t ? "percent" : "none", xi = "all", vi = (e) => e === "all" || e === "primary", Ri = (e) => e === "all" || e === "secondary", ki = (e, t) => e && t ? "all" : e ? "primary" : t ? "secondary" : "none", Pi = {
|
|
2131
2143
|
primary: "folders",
|
|
2132
2144
|
secondary: "tasks"
|
|
2133
|
-
},
|
|
2145
|
+
}, Gs = [
|
|
2134
2146
|
"invalid path",
|
|
2135
2147
|
"invalid key",
|
|
2136
2148
|
"invalid value",
|
|
@@ -2141,11 +2153,11 @@ const Ss = ({
|
|
|
2141
2153
|
"value type in list",
|
|
2142
2154
|
"empty path",
|
|
2143
2155
|
"json filter error"
|
|
2144
|
-
],
|
|
2156
|
+
], $s = (e) => (e?.filter?.conditions ?? []).length > 0 || !!e?.search, Ws = (e, t) => {
|
|
2145
2157
|
if (!e) return !1;
|
|
2146
|
-
const n =
|
|
2147
|
-
return
|
|
2148
|
-
}, Hs = (e = "Items") => `${e} were unable to load due to a corrupt filter.`,
|
|
2158
|
+
const n = Ln(e).toLowerCase();
|
|
2159
|
+
return Gs.some((r) => n.includes(r)) ? !0 : $s(t);
|
|
2160
|
+
}, Hs = (e = "Items") => `${e} were unable to load due to a corrupt filter.`, Vs = (e = []) => e.includes("product") ? "Products" : e.includes("version") ? "Versions" : e.includes("task") ? "Tasks" : e.includes("folder") ? "Folders" : "Items", Di = (e, t, n) => `${e}-${t}-${n}`, Yt = (e) => {
|
|
2149
2161
|
switch (e) {
|
|
2150
2162
|
case "boolean":
|
|
2151
2163
|
return !1;
|
|
@@ -2171,16 +2183,16 @@ const Ss = ({
|
|
|
2171
2183
|
[e.entityType + "Id"]: e.entityId
|
|
2172
2184
|
};
|
|
2173
2185
|
return e.entityType === "version" && "product" in e && e.product?.id && (t.productId = e.product?.id, "folder" in e.product && e.product?.folder?.id && (t.folderId = e.product?.folder.id)), t;
|
|
2174
|
-
}, Bt = "__",
|
|
2186
|
+
}, Bt = "__", Ks = (e) => `${Bt}${e}`, Ai = (e, t) => `${e}${Ks(t)}`, Gn = (e) => {
|
|
2175
2187
|
const t = e.lastIndexOf(Bt);
|
|
2176
2188
|
if (t === -1)
|
|
2177
2189
|
return null;
|
|
2178
2190
|
const n = e.slice(0, t), r = e.slice(t + Bt.length);
|
|
2179
2191
|
return { entityId: n, type: r };
|
|
2180
|
-
},
|
|
2192
|
+
}, Mi = (e) => e.includes(Bt) && Gn(e) !== null, Oi = (e, t) => Gn(e)?.type === t, qs = (e) => "key" in e, $n = (e) => ({
|
|
2181
2193
|
...e,
|
|
2182
2194
|
conditions: e.conditions?.map((t) => {
|
|
2183
|
-
if (!
|
|
2195
|
+
if (!qs(t)) return $n(t);
|
|
2184
2196
|
if ((t.operator === "isnull" || t.operator === "notnull") && t.value == null) {
|
|
2185
2197
|
const { value: n, ...r } = t;
|
|
2186
2198
|
return r;
|
|
@@ -2212,25 +2224,25 @@ const Ss = ({
|
|
|
2212
2224
|
},
|
|
2213
2225
|
children: /* @__PURE__ */ N(on, { icon: "drag_handle" })
|
|
2214
2226
|
}
|
|
2215
|
-
),
|
|
2227
|
+
), Qs = ({
|
|
2216
2228
|
header: e,
|
|
2217
2229
|
canHide: t,
|
|
2218
2230
|
canPin: n,
|
|
2219
2231
|
canSort: r,
|
|
2220
2232
|
isResizing: i,
|
|
2221
2233
|
className: f,
|
|
2222
|
-
menuId:
|
|
2234
|
+
menuId: p,
|
|
2223
2235
|
isOpen: m
|
|
2224
2236
|
}) => {
|
|
2225
|
-
const { column: s } = e, a = String(s.id), { toggleMenuOpen: o } =
|
|
2237
|
+
const { column: s } = e, a = String(s.id), { toggleMenuOpen: o } = Fn(), { updateGroupBy: u, groupBy: c } = it(), { canGroupThisColumn: v, groupLabel: E, groupBySelectedColumn: F, targetGroupById: w } = Us(a);
|
|
2226
2238
|
if (i)
|
|
2227
2239
|
return null;
|
|
2228
2240
|
const d = ($ = !0) => {
|
|
2229
|
-
o($ &&
|
|
2230
|
-
},
|
|
2241
|
+
o($ && p || !1);
|
|
2242
|
+
}, g = s.getIsPinned(), h = s.getIsVisible(), P = s.getIsSorted(), S = [];
|
|
2231
2243
|
if (n) {
|
|
2232
|
-
const $ =
|
|
2233
|
-
|
|
2244
|
+
const $ = g === "left";
|
|
2245
|
+
S.push({
|
|
2234
2246
|
id: "pin",
|
|
2235
2247
|
label: $ ? "Unpin column" : "Pin column",
|
|
2236
2248
|
icon: "push_pin",
|
|
@@ -2240,10 +2252,10 @@ const Ss = ({
|
|
|
2240
2252
|
}
|
|
2241
2253
|
});
|
|
2242
2254
|
}
|
|
2243
|
-
if (n && r &&
|
|
2255
|
+
if (n && r && S.push({
|
|
2244
2256
|
id: "divider",
|
|
2245
2257
|
type: "divider"
|
|
2246
|
-
}), r && (
|
|
2258
|
+
}), r && (S.push({
|
|
2247
2259
|
id: "sort-asc",
|
|
2248
2260
|
label: "Sort ascending",
|
|
2249
2261
|
icon: "sort",
|
|
@@ -2252,7 +2264,7 @@ const Ss = ({
|
|
|
2252
2264
|
onClick: () => {
|
|
2253
2265
|
s.toggleSorting(!1), d(!1);
|
|
2254
2266
|
}
|
|
2255
|
-
}),
|
|
2267
|
+
}), S.push({
|
|
2256
2268
|
id: "sort-desc",
|
|
2257
2269
|
label: "Sort descending",
|
|
2258
2270
|
icon: "sort",
|
|
@@ -2261,12 +2273,12 @@ const Ss = ({
|
|
|
2261
2273
|
onClick: () => {
|
|
2262
2274
|
s.toggleSorting(!0), d(!1);
|
|
2263
2275
|
}
|
|
2264
|
-
})), r && t &&
|
|
2276
|
+
})), r && t && S.push({
|
|
2265
2277
|
id: "divider",
|
|
2266
2278
|
type: "divider"
|
|
2267
|
-
}),
|
|
2279
|
+
}), v && a !== "name" && a !== "thumbnail") {
|
|
2268
2280
|
const $ = c?.id === w;
|
|
2269
|
-
|
|
2281
|
+
S.push({
|
|
2270
2282
|
id: "group-by",
|
|
2271
2283
|
label: $ ? "Ungroup" : `Group by ${E}`,
|
|
2272
2284
|
icon: "splitscreen",
|
|
@@ -2275,29 +2287,29 @@ const Ss = ({
|
|
|
2275
2287
|
}
|
|
2276
2288
|
});
|
|
2277
2289
|
}
|
|
2278
|
-
return t &&
|
|
2290
|
+
return t && S.push({
|
|
2279
2291
|
id: "hide",
|
|
2280
2292
|
label: h ? "Hide column" : "Show column",
|
|
2281
2293
|
icon: h ? "visibility_off" : "visibility",
|
|
2282
2294
|
onClick: () => {
|
|
2283
2295
|
s.toggleVisibility(), d(!1);
|
|
2284
2296
|
}
|
|
2285
|
-
}),
|
|
2286
|
-
|
|
2297
|
+
}), S.length === 0 ? null : /* @__PURE__ */ N(
|
|
2298
|
+
Bo,
|
|
2287
2299
|
{
|
|
2288
2300
|
className: f,
|
|
2289
|
-
menuItems:
|
|
2290
|
-
menuId:
|
|
2301
|
+
menuItems: S,
|
|
2302
|
+
menuId: p || `column-menu-${e.id}`
|
|
2291
2303
|
}
|
|
2292
2304
|
);
|
|
2293
|
-
},
|
|
2305
|
+
}, xn = 60, _t = 150, vn = 50, Rn = [Ae, ae], Fi = ({ children: e }) => {
|
|
2294
2306
|
const { columnOrder: t, updateColumnOrder: n, columnPinning: r, columnSizing: i } = it(), {
|
|
2295
2307
|
restrictToSection: f,
|
|
2296
|
-
setDragPinnedState:
|
|
2308
|
+
setDragPinnedState: p,
|
|
2297
2309
|
clearDragPinnedState: m,
|
|
2298
2310
|
activePinnedState: s,
|
|
2299
2311
|
setCachedBoundary: a
|
|
2300
|
-
} =
|
|
2312
|
+
} = ts({ columnPinning: r, columnSizing: i }), o = Ne({
|
|
2301
2313
|
cursorX: 0,
|
|
2302
2314
|
container: null,
|
|
2303
2315
|
boundaryX: 0,
|
|
@@ -2306,36 +2318,36 @@ const Ss = ({
|
|
|
2306
2318
|
isScrolling: !1,
|
|
2307
2319
|
isColumnDrag: !1,
|
|
2308
2320
|
isPinnedDrag: null
|
|
2309
|
-
}), u =
|
|
2310
|
-
Qt(
|
|
2311
|
-
Qt(
|
|
2312
|
-
Qt(
|
|
2313
|
-
), c =
|
|
2321
|
+
}), u = ns(
|
|
2322
|
+
Qt(os, { activationConstraint: { distance: 5 } }),
|
|
2323
|
+
Qt(ss, { activationConstraint: { delay: 100, tolerance: 5 } }),
|
|
2324
|
+
Qt(rs, {})
|
|
2325
|
+
), c = W(() => [f], [f]), v = r.left || [], E = K(() => {
|
|
2314
2326
|
const b = o.current.container;
|
|
2315
2327
|
if (!b) return 0;
|
|
2316
2328
|
const D = b.querySelector("th.last-pinned-left");
|
|
2317
2329
|
if (D) return D.getBoundingClientRect().right;
|
|
2318
|
-
const A =
|
|
2330
|
+
const A = v.reduce((T, y) => T + (i[y] || 150), 24);
|
|
2319
2331
|
return b.getBoundingClientRect().left + A;
|
|
2320
|
-
}, [
|
|
2321
|
-
(b) => !
|
|
2322
|
-
), [t,
|
|
2332
|
+
}, [v, i]), F = K(() => t.findIndex(
|
|
2333
|
+
(b) => !v.includes(b) && !Rn.includes(b)
|
|
2334
|
+
), [t, v]), w = K(
|
|
2323
2335
|
(b) => {
|
|
2324
2336
|
const { active: D, droppableContainers: A } = b;
|
|
2325
2337
|
if (s.current === null || s.current)
|
|
2326
|
-
return
|
|
2338
|
+
return Sn(b);
|
|
2327
2339
|
if (o.current.cursorX <= o.current.boundaryX + vn) {
|
|
2328
|
-
const
|
|
2329
|
-
(
|
|
2340
|
+
const T = t.find(
|
|
2341
|
+
(y) => !v.includes(y) && !Rn.includes(y)
|
|
2330
2342
|
);
|
|
2331
|
-
if (
|
|
2332
|
-
const
|
|
2333
|
-
if (
|
|
2343
|
+
if (T && T !== D.id) {
|
|
2344
|
+
const y = A.find((l) => l.id === T);
|
|
2345
|
+
if (y) return [{ id: T, data: { droppableContainer: y } }];
|
|
2334
2346
|
}
|
|
2335
2347
|
}
|
|
2336
|
-
return
|
|
2348
|
+
return Sn(b);
|
|
2337
2349
|
},
|
|
2338
|
-
[t,
|
|
2350
|
+
[t, v]
|
|
2339
2351
|
), d = K(() => {
|
|
2340
2352
|
try {
|
|
2341
2353
|
const b = o.current;
|
|
@@ -2344,26 +2356,26 @@ const Ss = ({
|
|
|
2344
2356
|
const D = b.boundaryX + 20;
|
|
2345
2357
|
let A = 0;
|
|
2346
2358
|
if (b.isPinnedDrag === !1 && b.cursorX <= D) {
|
|
2347
|
-
const
|
|
2348
|
-
A = -
|
|
2359
|
+
const T = Math.min((D - b.cursorX) / _t, 1);
|
|
2360
|
+
A = -xn * (0.3 + T * 0.7);
|
|
2349
2361
|
} else if (b.cursorX >= b.containerRight - _t) {
|
|
2350
|
-
const
|
|
2362
|
+
const T = Math.min(
|
|
2351
2363
|
(b.cursorX - (b.containerRight - _t)) / _t,
|
|
2352
2364
|
1
|
|
2353
2365
|
);
|
|
2354
|
-
A =
|
|
2366
|
+
A = xn * (0.3 + T * 0.7);
|
|
2355
2367
|
}
|
|
2356
2368
|
A !== 0 && (b.container.scrollLeft += A), b.scrollRAF = requestAnimationFrame(d);
|
|
2357
2369
|
} catch (b) {
|
|
2358
2370
|
console.error("[DND] scrollLoop error:", b), h();
|
|
2359
2371
|
}
|
|
2360
|
-
}, []),
|
|
2372
|
+
}, []), g = K(() => {
|
|
2361
2373
|
o.current.isScrolling || (o.current.isScrolling = !0, o.current.scrollRAF = requestAnimationFrame(d));
|
|
2362
2374
|
}, [d]), h = () => {
|
|
2363
2375
|
o.current.isScrolling = !1, o.current.scrollRAF && (cancelAnimationFrame(o.current.scrollRAF), o.current.scrollRAF = null);
|
|
2364
2376
|
}, P = K((b) => {
|
|
2365
2377
|
o.current.cursorX = b.clientX;
|
|
2366
|
-
}, []),
|
|
2378
|
+
}, []), S = () => {
|
|
2367
2379
|
h(), window.removeEventListener("mousemove", P), o.current = {
|
|
2368
2380
|
cursorX: 0,
|
|
2369
2381
|
container: null,
|
|
@@ -2376,64 +2388,64 @@ const Ss = ({
|
|
|
2376
2388
|
};
|
|
2377
2389
|
};
|
|
2378
2390
|
return /* @__PURE__ */ N(
|
|
2379
|
-
|
|
2391
|
+
is,
|
|
2380
2392
|
{
|
|
2381
2393
|
sensors: u,
|
|
2382
2394
|
collisionDetection: w,
|
|
2383
2395
|
modifiers: c,
|
|
2384
2396
|
onDragStart: (b) => {
|
|
2385
2397
|
if (b.active.data.current?.type !== "column") return;
|
|
2386
|
-
const D = document.querySelector("[data-column-dnd-container]"), A = D?.getBoundingClientRect(),
|
|
2387
|
-
o.current.container = D, o.current.containerRight = A?.right ?? 0, o.current.boundaryX = E(), o.current.isColumnDrag = !0, o.current.isPinnedDrag =
|
|
2398
|
+
const D = document.querySelector("[data-column-dnd-container]"), A = D?.getBoundingClientRect(), T = v.includes(b.active.id);
|
|
2399
|
+
o.current.container = D, o.current.containerRight = A?.right ?? 0, o.current.boundaryX = E(), o.current.isColumnDrag = !0, o.current.isPinnedDrag = T, p(b.active.id), a(o.current.boundaryX), window.addEventListener("mousemove", P), g();
|
|
2388
2400
|
},
|
|
2389
2401
|
onDragEnd: (b) => {
|
|
2390
2402
|
m();
|
|
2391
2403
|
const { active: D, over: A } = b;
|
|
2392
2404
|
if (!D || !o.current.isColumnDrag) {
|
|
2393
|
-
|
|
2405
|
+
S();
|
|
2394
2406
|
return;
|
|
2395
2407
|
}
|
|
2396
|
-
const
|
|
2397
|
-
if ((!A || D.id === A.id) && !
|
|
2408
|
+
const T = D.id, y = v.includes(T);
|
|
2409
|
+
if ((!A || D.id === A.id) && !y && b.active.rect.current.translated) {
|
|
2398
2410
|
if (b.active.rect.current.translated.left <= o.current.boundaryX + vn) {
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2411
|
+
const x = F(), C = t.indexOf(T);
|
|
2412
|
+
x !== -1 && C !== -1 && C !== x && n(Tn(t, C, x));
|
|
2401
2413
|
}
|
|
2402
|
-
|
|
2414
|
+
S();
|
|
2403
2415
|
return;
|
|
2404
2416
|
}
|
|
2405
|
-
if (!A ||
|
|
2406
|
-
|
|
2417
|
+
if (!A || y !== v.includes(A.id)) {
|
|
2418
|
+
S();
|
|
2407
2419
|
return;
|
|
2408
2420
|
}
|
|
2409
|
-
const l = t.indexOf(
|
|
2410
|
-
l !== -1 &&
|
|
2421
|
+
const l = t.indexOf(T), I = t.indexOf(A.id);
|
|
2422
|
+
l !== -1 && I !== -1 && n(Tn(t, l, I)), S();
|
|
2411
2423
|
},
|
|
2412
2424
|
onDragCancel: () => {
|
|
2413
|
-
m(),
|
|
2425
|
+
m(), S();
|
|
2414
2426
|
},
|
|
2415
2427
|
children: e
|
|
2416
2428
|
}
|
|
2417
2429
|
);
|
|
2418
|
-
},
|
|
2430
|
+
}, Xs = (e, t) => {
|
|
2419
2431
|
const n = e.getFlatHeaders(), r = e.getState().columnSizingInfo;
|
|
2420
|
-
return
|
|
2432
|
+
return W(() => {
|
|
2421
2433
|
const f = {};
|
|
2422
|
-
for (let
|
|
2423
|
-
const m = n[
|
|
2434
|
+
for (let p = 0; p < n.length; p++) {
|
|
2435
|
+
const m = n[p];
|
|
2424
2436
|
f[`--header-${m.id}-size`] = m.getSize(), f[`--col-${m.column.id}-size`] = m.column.getSize();
|
|
2425
2437
|
}
|
|
2426
2438
|
return f;
|
|
2427
2439
|
}, [r, t, n]);
|
|
2428
|
-
},
|
|
2440
|
+
}, Ys = ({
|
|
2429
2441
|
visibleColumns: e,
|
|
2430
2442
|
tableContainerRef: t,
|
|
2431
2443
|
columnPinning: n,
|
|
2432
2444
|
columnSizing: r,
|
|
2433
2445
|
columnOrder: i
|
|
2434
2446
|
}) => {
|
|
2435
|
-
const f =
|
|
2436
|
-
|
|
2447
|
+
const f = W(() => e.filter((E) => E.getIsPinned() === "left").map((E) => E.getIndex()), [e, n]), [p, m] = Pe(null);
|
|
2448
|
+
as({
|
|
2437
2449
|
onDragStart(E) {
|
|
2438
2450
|
if (E.active.data?.current?.type === "column") {
|
|
2439
2451
|
const F = e.findIndex((w) => w.id === E.active.id);
|
|
@@ -2453,7 +2465,7 @@ const Ss = ({
|
|
|
2453
2465
|
for (let F = 0; F <= E; F++)
|
|
2454
2466
|
s.push(F);
|
|
2455
2467
|
}
|
|
2456
|
-
const a =
|
|
2468
|
+
const a = Pn({
|
|
2457
2469
|
count: e.length,
|
|
2458
2470
|
estimateSize: (E) => e[E].getSize(),
|
|
2459
2471
|
//estimate width of each column for accurate scrollbar dragging
|
|
@@ -2462,160 +2474,162 @@ const Ss = ({
|
|
|
2462
2474
|
overscan: 1,
|
|
2463
2475
|
//how many columns to render on each side off screen each way (adjust this for performance)
|
|
2464
2476
|
rangeExtractor: (E) => {
|
|
2465
|
-
const F = E.startIndex, w = E.endIndex, d = E.overscan,
|
|
2466
|
-
for (let
|
|
2467
|
-
|
|
2477
|
+
const F = E.startIndex, w = E.endIndex, d = E.overscan, g = p !== null ? e.length : d, h = [];
|
|
2478
|
+
for (let S = F - g; S <= w + g; S++)
|
|
2479
|
+
S >= 0 && S < e.length && h.push(S);
|
|
2468
2480
|
const P = /* @__PURE__ */ new Set([
|
|
2469
2481
|
...s,
|
|
2470
2482
|
// All columns up to the highest pinned column
|
|
2471
2483
|
...h,
|
|
2472
2484
|
// Visible columns in the current range
|
|
2473
|
-
...
|
|
2485
|
+
...p !== null && p !== -1 ? [p] : []
|
|
2474
2486
|
]);
|
|
2475
|
-
return Array.from(P).sort((
|
|
2487
|
+
return Array.from(P).sort((S, $) => S - $);
|
|
2476
2488
|
}
|
|
2477
|
-
}), o =
|
|
2478
|
-
() =>
|
|
2489
|
+
}), o = W(
|
|
2490
|
+
() => Wo(() => {
|
|
2479
2491
|
a.measure();
|
|
2480
2492
|
}, 1e3),
|
|
2481
2493
|
[a]
|
|
2482
2494
|
);
|
|
2483
|
-
|
|
2495
|
+
oo(() => {
|
|
2484
2496
|
o();
|
|
2485
2497
|
}, [o, r, i]);
|
|
2486
2498
|
const u = a.getVirtualItems();
|
|
2487
|
-
let c,
|
|
2499
|
+
let c, v;
|
|
2488
2500
|
if (a && u.length) {
|
|
2489
2501
|
const E = a.getTotalSize(), F = u.findIndex(
|
|
2490
2502
|
(d) => !s.includes(d.index)
|
|
2491
2503
|
);
|
|
2492
2504
|
if (F !== -1) {
|
|
2493
|
-
const d = u[F].start,
|
|
2494
|
-
const
|
|
2495
|
-
return h +
|
|
2505
|
+
const d = u[F].start, g = s.reduce((h, P) => {
|
|
2506
|
+
const S = e[P];
|
|
2507
|
+
return h + S.getSize();
|
|
2496
2508
|
}, 0);
|
|
2497
|
-
c = Math.max(0, d -
|
|
2509
|
+
c = Math.max(0, d - g);
|
|
2498
2510
|
} else
|
|
2499
2511
|
c = 0;
|
|
2500
2512
|
const w = u[u.length - 1]?.end ?? 0;
|
|
2501
|
-
|
|
2513
|
+
v = Math.max(0, E - w);
|
|
2502
2514
|
}
|
|
2503
2515
|
return {
|
|
2504
2516
|
columnVirtualizer: a,
|
|
2505
2517
|
virtualPaddingLeft: c,
|
|
2506
|
-
virtualPaddingRight:
|
|
2518
|
+
virtualPaddingRight: v
|
|
2507
2519
|
};
|
|
2508
2520
|
};
|
|
2509
|
-
function
|
|
2510
|
-
const { attribFields: e, getEntityById: t, onOpenPlayer: n, playerOpen: r } = Ve(), { canWriteLabelPermission: i, canWriteNamePermission: f } = tn(),
|
|
2511
|
-
(
|
|
2512
|
-
o(
|
|
2521
|
+
function Js() {
|
|
2522
|
+
const { attribFields: e, getEntityById: t, onOpenPlayer: n, playerOpen: r } = Ve(), { canWriteLabelPermission: i, canWriteNamePermission: f } = tn(), p = i || f, { focusedCellId: m, gridMap: s, selectCell: a, focusCell: o, clearSelection: u, setFocusedCellId: c } = Ye(), { setEditingCellId: v, editingCellId: E } = Ut(), { setSelectedEntity: F } = Dn(), w = K(
|
|
2523
|
+
(g) => {
|
|
2524
|
+
o(g), console.log(g), requestAnimationFrame(() => document.getElementById(g)?.closest("td")?.focus());
|
|
2513
2525
|
},
|
|
2514
2526
|
[o]
|
|
2515
2527
|
), d = K(
|
|
2516
|
-
(
|
|
2517
|
-
const h =
|
|
2518
|
-
if (!(r && P && !!h?.closest("#viewer-dialog")) && !h?.closest("tbody td") || h.tagName === "INPUT" || h.tagName === "TEXTAREA" || h.isContentEditable || h.getAttribute("role") === "textbox" || h.tagName === "LI" || r &&
|
|
2528
|
+
(g) => {
|
|
2529
|
+
const h = g.target, P = g.key === "ArrowUp" || g.key === "ArrowDown";
|
|
2530
|
+
if (!(r && P && !!h?.closest("#viewer-dialog")) && !h?.closest("tbody td") || h.tagName === "INPUT" || h.tagName === "TEXTAREA" || h.isContentEditable || h.getAttribute("role") === "textbox" || h.tagName === "LI" || r && g.key !== "ArrowDown" && g.key !== "ArrowUp" || E || !m) return;
|
|
2519
2531
|
const $ = re(m);
|
|
2520
2532
|
if (!$) return;
|
|
2521
|
-
const { rowId: z, colId:
|
|
2533
|
+
const { rowId: z, colId: M } = $, b = s.rowIdToIndex.get(z), D = s.colIdToIndex.get(M);
|
|
2522
2534
|
if (b === void 0 || D === void 0) return;
|
|
2523
|
-
const A =
|
|
2535
|
+
const A = M.startsWith("attrib_") && e.find((y) => y.name === M.replace("attrib_", ""))?.readOnly || h.closest("td")?.querySelector(`.${wo}`) !== null, T = (y) => {
|
|
2524
2536
|
if (n) {
|
|
2525
|
-
const l = t(
|
|
2537
|
+
const l = t(y);
|
|
2526
2538
|
if (l) {
|
|
2527
|
-
const
|
|
2528
|
-
n(
|
|
2539
|
+
const I = sn(l);
|
|
2540
|
+
n(I, { quickView: !0 });
|
|
2529
2541
|
}
|
|
2530
2542
|
}
|
|
2531
2543
|
};
|
|
2532
|
-
switch (
|
|
2544
|
+
switch (g.key) {
|
|
2533
2545
|
case "ArrowUp": {
|
|
2534
|
-
if (
|
|
2535
|
-
const
|
|
2536
|
-
if (
|
|
2537
|
-
const l = ye(
|
|
2538
|
-
a(l,
|
|
2546
|
+
if (g.preventDefault(), b > 0) {
|
|
2547
|
+
const y = s.indexToRowId.get(b - 1);
|
|
2548
|
+
if (y) {
|
|
2549
|
+
const l = ye(y, M);
|
|
2550
|
+
a(l, g.shiftKey, g.shiftKey), w(l), r && T(y);
|
|
2539
2551
|
}
|
|
2540
2552
|
}
|
|
2541
2553
|
break;
|
|
2542
2554
|
}
|
|
2543
2555
|
case "ArrowDown": {
|
|
2544
|
-
|
|
2545
|
-
const
|
|
2546
|
-
if (
|
|
2547
|
-
const l = ye(
|
|
2548
|
-
a(l,
|
|
2556
|
+
g.preventDefault();
|
|
2557
|
+
const y = s.indexToRowId.get(b + 1);
|
|
2558
|
+
if (y) {
|
|
2559
|
+
const l = ye(y, M);
|
|
2560
|
+
a(l, g.shiftKey, g.shiftKey), w(l), r && T(y);
|
|
2549
2561
|
}
|
|
2550
2562
|
break;
|
|
2551
2563
|
}
|
|
2552
2564
|
case "ArrowLeft": {
|
|
2553
|
-
if (
|
|
2554
|
-
const
|
|
2555
|
-
if (
|
|
2556
|
-
const l = ye(z,
|
|
2557
|
-
a(l,
|
|
2565
|
+
if (g.preventDefault(), D > 0) {
|
|
2566
|
+
const y = s.indexToColId.get(D - 1);
|
|
2567
|
+
if (y) {
|
|
2568
|
+
const l = ye(z, y);
|
|
2569
|
+
a(l, g.shiftKey, g.shiftKey), w(l);
|
|
2558
2570
|
}
|
|
2559
2571
|
}
|
|
2560
2572
|
break;
|
|
2561
2573
|
}
|
|
2562
2574
|
case "ArrowRight": {
|
|
2563
|
-
|
|
2564
|
-
const
|
|
2565
|
-
if (
|
|
2566
|
-
const l = ye(z,
|
|
2567
|
-
a(l,
|
|
2575
|
+
g.preventDefault();
|
|
2576
|
+
const y = s.indexToColId.get(D + 1);
|
|
2577
|
+
if (y) {
|
|
2578
|
+
const l = ye(z, y);
|
|
2579
|
+
a(l, g.shiftKey, g.shiftKey), w(l);
|
|
2568
2580
|
}
|
|
2569
2581
|
break;
|
|
2570
2582
|
}
|
|
2571
2583
|
case "Enter": {
|
|
2572
|
-
if (
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2584
|
+
if (g.preventDefault(), M === "name") {
|
|
2585
|
+
const y = t(z), l = y && Nt(y.entityType);
|
|
2586
|
+
y && (y.entityType === "folder" || y.entityType === "task") && !l && F({
|
|
2575
2587
|
entityId: z,
|
|
2576
|
-
entityType:
|
|
2588
|
+
entityType: y.entityType
|
|
2577
2589
|
});
|
|
2578
|
-
} else
|
|
2579
|
-
|
|
2590
|
+
} else if (!A) {
|
|
2591
|
+
const y = M.startsWith("attrib_") ? document.getElementById(m)?.querySelector('input[type="checkbox"]') : null;
|
|
2592
|
+
y && !y.disabled ? y.click() : v(m);
|
|
2593
|
+
}
|
|
2580
2594
|
break;
|
|
2581
2595
|
}
|
|
2582
2596
|
case "Escape": {
|
|
2583
|
-
|
|
2597
|
+
g.preventDefault(), u(), v(null), c(null);
|
|
2584
2598
|
break;
|
|
2585
2599
|
}
|
|
2586
2600
|
case "Tab": {
|
|
2587
|
-
|
|
2588
|
-
const
|
|
2601
|
+
g.preventDefault();
|
|
2602
|
+
const y = g.shiftKey ? D - 1 : D + 1, l = s.indexToColId.get(y);
|
|
2589
2603
|
if (l) {
|
|
2590
|
-
const
|
|
2591
|
-
a(
|
|
2592
|
-
} else if (!
|
|
2593
|
-
const
|
|
2594
|
-
if (
|
|
2595
|
-
const C = ye(
|
|
2604
|
+
const I = ye(z, l);
|
|
2605
|
+
a(I, !1, !1), w(I);
|
|
2606
|
+
} else if (!g.shiftKey && b < s.rowIdToIndex.size - 1) {
|
|
2607
|
+
const I = s.indexToRowId.get(b + 1), x = s.indexToColId.get(0);
|
|
2608
|
+
if (I && x) {
|
|
2609
|
+
const C = ye(I, x);
|
|
2596
2610
|
a(C, !1, !1), w(C);
|
|
2597
2611
|
}
|
|
2598
|
-
} else if (
|
|
2599
|
-
const
|
|
2600
|
-
if (
|
|
2601
|
-
const C = ye(
|
|
2612
|
+
} else if (g.shiftKey && b > 0) {
|
|
2613
|
+
const I = s.indexToRowId.get(b - 1), x = s.indexToColId.get(s.colIdToIndex.size - 1);
|
|
2614
|
+
if (I && x) {
|
|
2615
|
+
const C = ye(I, x);
|
|
2602
2616
|
a(C, !1, !1), w(C);
|
|
2603
2617
|
}
|
|
2604
2618
|
}
|
|
2605
2619
|
break;
|
|
2606
2620
|
}
|
|
2607
2621
|
case " ": {
|
|
2608
|
-
|
|
2622
|
+
g.preventDefault(), T(z);
|
|
2609
2623
|
break;
|
|
2610
2624
|
}
|
|
2611
2625
|
case "r": {
|
|
2612
|
-
if (
|
|
2626
|
+
if (g.ctrlKey || g.metaKey)
|
|
2613
2627
|
return;
|
|
2614
|
-
if (
|
|
2615
|
-
const
|
|
2616
|
-
if (
|
|
2628
|
+
if (g.preventDefault(), M === "name" && p) {
|
|
2629
|
+
const y = t(z);
|
|
2630
|
+
if (y && (y.entityType === "folder" || y.entityType === "task")) {
|
|
2617
2631
|
const l = ye(z, "name");
|
|
2618
|
-
|
|
2632
|
+
v(l);
|
|
2619
2633
|
}
|
|
2620
2634
|
}
|
|
2621
2635
|
break;
|
|
@@ -2628,12 +2642,12 @@ function Ys() {
|
|
|
2628
2642
|
a,
|
|
2629
2643
|
w,
|
|
2630
2644
|
u,
|
|
2631
|
-
|
|
2645
|
+
v,
|
|
2632
2646
|
E,
|
|
2633
2647
|
t,
|
|
2634
2648
|
r,
|
|
2635
2649
|
F,
|
|
2636
|
-
|
|
2650
|
+
p
|
|
2637
2651
|
]
|
|
2638
2652
|
);
|
|
2639
2653
|
return Fe(() => (document.addEventListener("keydown", d), () => {
|
|
@@ -2645,7 +2659,7 @@ function Ys() {
|
|
|
2645
2659
|
a,
|
|
2646
2660
|
w,
|
|
2647
2661
|
u,
|
|
2648
|
-
|
|
2662
|
+
v,
|
|
2649
2663
|
E,
|
|
2650
2664
|
r,
|
|
2651
2665
|
F
|
|
@@ -2656,20 +2670,20 @@ function Ys() {
|
|
|
2656
2670
|
selectCell: a,
|
|
2657
2671
|
focusCell: o,
|
|
2658
2672
|
clearSelection: u,
|
|
2659
|
-
setEditingCellId:
|
|
2673
|
+
setEditingCellId: v,
|
|
2660
2674
|
editingCellId: E
|
|
2661
2675
|
};
|
|
2662
2676
|
}
|
|
2663
|
-
const
|
|
2664
|
-
const { rowHeight: e =
|
|
2677
|
+
const Zs = 24, er = () => {
|
|
2678
|
+
const { rowHeight: e = Zs } = it();
|
|
2665
2679
|
return { getRowHeight: (n) => e, thumbnailRowHeight: e, defaultRowHeight: e };
|
|
2666
|
-
},
|
|
2680
|
+
}, tr = () => null, nr = (e, t) => t.some((n) => {
|
|
2667
2681
|
if (n.includes("*")) {
|
|
2668
2682
|
const i = "^" + n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\\\*/g, ".*") + "$";
|
|
2669
2683
|
return new RegExp(i).test(e);
|
|
2670
2684
|
}
|
|
2671
2685
|
return e === n;
|
|
2672
|
-
}),
|
|
2686
|
+
}), Li = ({
|
|
2673
2687
|
scope: e,
|
|
2674
2688
|
sliceId: t,
|
|
2675
2689
|
onScroll: n,
|
|
@@ -2677,57 +2691,57 @@ const Js = 24, Zs = () => {
|
|
|
2677
2691
|
// when the user scrolls to the bottom of the table, this callback is called
|
|
2678
2692
|
onOpenNew: i,
|
|
2679
2693
|
readOnly: f,
|
|
2680
|
-
excludedColumns:
|
|
2694
|
+
excludedColumns: p,
|
|
2681
2695
|
excludedSorting: m,
|
|
2682
2696
|
extraColumns: s,
|
|
2683
2697
|
includeLinks: a,
|
|
2684
2698
|
includeParents: o,
|
|
2685
2699
|
parentColumns: u,
|
|
2686
2700
|
isLoading: c,
|
|
2687
|
-
isExpandable:
|
|
2701
|
+
isExpandable: v,
|
|
2688
2702
|
enableSorting: E = !0,
|
|
2689
2703
|
clientSorting: F = !1,
|
|
2690
2704
|
sortableRows: w = !1,
|
|
2691
2705
|
onRowReorder: d,
|
|
2692
|
-
dndActiveId:
|
|
2706
|
+
dndActiveId: g,
|
|
2693
2707
|
// Destructure new prop
|
|
2694
2708
|
columnsConfig: h,
|
|
2695
2709
|
showColumnSummaries: P = !1,
|
|
2696
|
-
fieldStats:
|
|
2710
|
+
fieldStats: S,
|
|
2697
2711
|
groupFieldStats: $,
|
|
2698
2712
|
fieldStatsLoading: z,
|
|
2699
|
-
fieldStatsError:
|
|
2713
|
+
fieldStatsError: M,
|
|
2700
2714
|
mainCountLabels: b,
|
|
2701
2715
|
mainBreakdownFields: D,
|
|
2702
2716
|
onScrollBottomGroupBy: A,
|
|
2703
2717
|
// Destructure new prop for group-by load more
|
|
2704
|
-
contextMenuItems:
|
|
2718
|
+
contextMenuItems: T,
|
|
2705
2719
|
// Additional context menu items from props
|
|
2706
|
-
onColumnVisibleChange:
|
|
2720
|
+
onColumnVisibleChange: y,
|
|
2707
2721
|
onColumnVisibleChangeSubscribed: l,
|
|
2708
|
-
onVisibleRowsChange:
|
|
2709
|
-
pt:
|
|
2722
|
+
onVisibleRowsChange: I,
|
|
2723
|
+
pt: x,
|
|
2710
2724
|
...C
|
|
2711
2725
|
}) => {
|
|
2712
2726
|
const {
|
|
2713
2727
|
columnVisibility: R,
|
|
2714
2728
|
columnPinning: L,
|
|
2715
|
-
columnOrder:
|
|
2729
|
+
columnOrder: H,
|
|
2716
2730
|
columnSizing: Z,
|
|
2717
2731
|
setAllColumns: ee,
|
|
2718
2732
|
sorting: de,
|
|
2719
2733
|
sortingOnChange: Ie,
|
|
2720
2734
|
columnPinningOnChange: Re,
|
|
2721
2735
|
columnSizingOnChange: Ce,
|
|
2722
|
-
defaultColumnVisibility:
|
|
2723
|
-
columnVisibilityOnChange:
|
|
2736
|
+
defaultColumnVisibility: xe,
|
|
2737
|
+
columnVisibilityOnChange: ve,
|
|
2724
2738
|
columnOrderOnChange: ze,
|
|
2725
2739
|
groupBy: J,
|
|
2726
|
-
columnSummaries:
|
|
2740
|
+
columnSummaries: O,
|
|
2727
2741
|
updateColumnSummary: le,
|
|
2728
2742
|
columnSummaryScopes: B,
|
|
2729
2743
|
updateColumnSummaryScope: te,
|
|
2730
|
-
columnSummaryFormats:
|
|
2744
|
+
columnSummaryFormats: j,
|
|
2731
2745
|
updateColumnSummaryFormat: Me
|
|
2732
2746
|
} = it(), { productTypes: be, projectName: Te, ...Ge } = It(), {
|
|
2733
2747
|
tableData: me,
|
|
@@ -2742,71 +2756,71 @@ const Js = 24, Zs = () => {
|
|
|
2742
2756
|
expanded: ce,
|
|
2743
2757
|
updateExpanded: ie,
|
|
2744
2758
|
toggleExpandAll: we,
|
|
2745
|
-
showHierarchy:
|
|
2759
|
+
showHierarchy: ge,
|
|
2746
2760
|
isFlatFolderView: Je,
|
|
2747
|
-
fetchNextPage:
|
|
2748
|
-
scopes:
|
|
2761
|
+
fetchNextPage: Wt,
|
|
2762
|
+
scopes: We,
|
|
2749
2763
|
// or entityTypes
|
|
2750
|
-
getEntityById:
|
|
2764
|
+
getEntityById: He,
|
|
2751
2765
|
onResetView: bt,
|
|
2752
2766
|
overrideGroupBy: Ct,
|
|
2753
2767
|
loadingLinksEntityIds: wt,
|
|
2754
2768
|
queryFilters: St
|
|
2755
|
-
} = Ve(), at = !!J || !!Ct, Tt =
|
|
2769
|
+
} = Ve(), at = !!J || !!Ct, Tt = Ws(Be, St), Et = Hs(Vs(We)), lt = Ct?.id ?? J?.id, Ze = Array.isArray(lt) ? lt[0] : lt, et = ge || ["hierarchy", "folder", "product"].includes(Ze ?? "") || We.includes("product"), { writableFields: qe } = tn(), xt = W(() => {
|
|
2756
2770
|
const _ = Ze?.startsWith("attrib.") ? Ze.slice(7) : void 0;
|
|
2757
2771
|
return Ee.filter(
|
|
2758
|
-
(
|
|
2759
|
-
).map((
|
|
2760
|
-
}, [Ee, R,
|
|
2772
|
+
(q) => q.name === _ || yt(R, `attrib_${q.name}`, xe)
|
|
2773
|
+
).map((q) => q.name);
|
|
2774
|
+
}, [Ee, R, xe, Ze]), Le = gs(Ee, {
|
|
2761
2775
|
projectName: Te,
|
|
2762
|
-
request:
|
|
2763
|
-
}),
|
|
2776
|
+
request: xt
|
|
2777
|
+
}), je = c || $e, {
|
|
2764
2778
|
statuses: ct = [],
|
|
2765
|
-
folderTypes:
|
|
2779
|
+
folderTypes: vt = [],
|
|
2766
2780
|
taskTypes: Rt = [],
|
|
2767
2781
|
tags: kt = [],
|
|
2768
2782
|
linkTypes: Qe = []
|
|
2769
|
-
} = Ge || {}, Xe =
|
|
2770
|
-
() =>
|
|
2783
|
+
} = Ge || {}, Xe = W(
|
|
2784
|
+
() => Ts({
|
|
2771
2785
|
users: ke,
|
|
2772
2786
|
statuses: ct,
|
|
2773
|
-
folderTypes:
|
|
2787
|
+
folderTypes: vt,
|
|
2774
2788
|
taskTypes: Rt,
|
|
2775
2789
|
productTypes: be,
|
|
2776
2790
|
tags: kt,
|
|
2777
|
-
scopes:
|
|
2791
|
+
scopes: We
|
|
2778
2792
|
}),
|
|
2779
|
-
[ke, ct,
|
|
2780
|
-
), tt = Ne(null), Pt = Ne(0), { registerGrid: Dt } = Ye(), { loadingAttrib: G, loadingRows: ne } =
|
|
2781
|
-
const _ = tt.current?.querySelectorAll("tbody tr").length || 0,
|
|
2782
|
-
|
|
2793
|
+
[ke, ct, vt, Rt, We, kt]
|
|
2794
|
+
), tt = Ne(null), Pt = Ne(0), { registerGrid: Dt } = Ye(), { loadingAttrib: G, loadingRows: ne } = W(() => {
|
|
2795
|
+
const _ = tt.current?.querySelectorAll("tbody tr").length || 0, q = So(), pe = To(
|
|
2796
|
+
ge && me.length > 0 ? Math.min(_, 50) : J ? Math.max(Pt.current, 50) : 50
|
|
2783
2797
|
);
|
|
2784
|
-
return { loadingAttrib:
|
|
2785
|
-
}, []), V = !U ||
|
|
2786
|
-
() =>
|
|
2787
|
-
[Ee,
|
|
2798
|
+
return { loadingAttrib: q, loadingRows: pe };
|
|
2799
|
+
}, []), V = !U || je, { readOnlyColumns: Y, readOnlyAttribs: Q } = W(
|
|
2800
|
+
() => xs(Ee, qe, f),
|
|
2801
|
+
[Ee, qe, f]
|
|
2788
2802
|
), { selectedCells: X } = Ye(), { updateEntities: fe } = Ut(), nt = K(
|
|
2789
|
-
async (_,
|
|
2790
|
-
const { selection:
|
|
2791
|
-
if (!
|
|
2803
|
+
async (_, q) => {
|
|
2804
|
+
const { selection: pe = [] } = q || {}, se = [];
|
|
2805
|
+
if (!pe?.length)
|
|
2792
2806
|
se.push({ ..._, id: _.id || _.rowId });
|
|
2793
2807
|
else {
|
|
2794
2808
|
const { field: ue, value: _e, isAttrib: Vt } = _;
|
|
2795
|
-
for (const
|
|
2796
|
-
const { colId: Kt, rowId: Mt } = re(
|
|
2809
|
+
for (const no of X) {
|
|
2810
|
+
const { colId: Kt, rowId: Mt } = re(no) || {};
|
|
2797
2811
|
if (Kt === ae) continue;
|
|
2798
|
-
const
|
|
2799
|
-
if (!
|
|
2812
|
+
const qt = He(Mt || "");
|
|
2813
|
+
if (!qt) {
|
|
2800
2814
|
console.warn(`Entity with ID ${Mt} not found for cell update.`);
|
|
2801
2815
|
continue;
|
|
2802
2816
|
}
|
|
2803
2817
|
(!Kt?.includes("attrib_") || Kt?.replace("attrib_", "") === ue) && Mt && se.push({
|
|
2804
2818
|
field: ue,
|
|
2805
2819
|
rowId: Mt,
|
|
2806
|
-
id:
|
|
2820
|
+
id: qt.entityId,
|
|
2807
2821
|
value: _e,
|
|
2808
2822
|
isAttrib: Vt,
|
|
2809
|
-
type:
|
|
2823
|
+
type: qt.entityType
|
|
2810
2824
|
});
|
|
2811
2825
|
}
|
|
2812
2826
|
}
|
|
@@ -2816,25 +2830,25 @@ const Js = 24, Zs = () => {
|
|
|
2816
2830
|
}
|
|
2817
2831
|
await fe(se, !0);
|
|
2818
2832
|
},
|
|
2819
|
-
[fe,
|
|
2820
|
-
), dt =
|
|
2833
|
+
[fe, He, X]
|
|
2834
|
+
), dt = W(
|
|
2821
2835
|
() => U ? Le : G,
|
|
2822
2836
|
[Le, G, U]
|
|
2823
|
-
),
|
|
2824
|
-
const _ =
|
|
2825
|
-
scopes:
|
|
2837
|
+
), Ht = () => Po(We), ot = W(() => {
|
|
2838
|
+
const _ = Eo({
|
|
2839
|
+
scopes: We,
|
|
2826
2840
|
attribs: dt,
|
|
2827
2841
|
links: Qe,
|
|
2828
2842
|
includeLinks: a,
|
|
2829
2843
|
includeParents: o,
|
|
2830
|
-
showHierarchy:
|
|
2844
|
+
showHierarchy: ge,
|
|
2831
2845
|
isFlatFolderView: Je,
|
|
2832
2846
|
options: Xe,
|
|
2833
2847
|
extraColumns: s,
|
|
2834
|
-
excluded:
|
|
2848
|
+
excluded: p,
|
|
2835
2849
|
excludedSorting: m,
|
|
2836
2850
|
groupBy: J,
|
|
2837
|
-
nameLabel:
|
|
2851
|
+
nameLabel: Ht(),
|
|
2838
2852
|
parentColumns: u
|
|
2839
2853
|
});
|
|
2840
2854
|
return w && E ? [
|
|
@@ -2855,35 +2869,35 @@ const Js = 24, Zs = () => {
|
|
|
2855
2869
|
..._
|
|
2856
2870
|
] : _;
|
|
2857
2871
|
}, [
|
|
2858
|
-
|
|
2872
|
+
We,
|
|
2859
2873
|
JSON.stringify(dt),
|
|
2860
2874
|
// columnAttribs is unstable between renders
|
|
2861
|
-
|
|
2875
|
+
ge,
|
|
2862
2876
|
Je,
|
|
2863
|
-
|
|
2877
|
+
v,
|
|
2864
2878
|
Xe,
|
|
2865
2879
|
Qe,
|
|
2866
2880
|
a,
|
|
2867
2881
|
o,
|
|
2868
2882
|
u,
|
|
2869
2883
|
s,
|
|
2870
|
-
|
|
2884
|
+
p,
|
|
2871
2885
|
m,
|
|
2872
2886
|
w,
|
|
2873
2887
|
E,
|
|
2874
2888
|
J
|
|
2875
2889
|
]);
|
|
2876
2890
|
Fe(() => {
|
|
2877
|
-
const _ = ot.map((
|
|
2891
|
+
const _ = ot.map((q) => q.id).filter(Boolean);
|
|
2878
2892
|
ee(_);
|
|
2879
2893
|
}, [ot, ee]);
|
|
2880
|
-
const Hn =
|
|
2894
|
+
const Hn = W(() => {
|
|
2881
2895
|
const _ = { ...R };
|
|
2882
|
-
return ot.forEach((
|
|
2883
|
-
const
|
|
2884
|
-
|
|
2885
|
-
}),
|
|
2886
|
-
}, [R,
|
|
2896
|
+
return ot.forEach((q) => {
|
|
2897
|
+
const pe = q.visible;
|
|
2898
|
+
q.id && _[q.id] === void 0 && (pe !== void 0 ? _[q.id] = pe : _[q.id] = yt({}, q.id, xe));
|
|
2899
|
+
}), Qo(_, ot.map((q) => q.id).filter(Boolean));
|
|
2900
|
+
}, [R, xe, ot]), Se = so({
|
|
2887
2901
|
data: V ? ne : me,
|
|
2888
2902
|
columns: ot,
|
|
2889
2903
|
defaultColumn: {
|
|
@@ -2896,43 +2910,43 @@ const Js = 24, Zs = () => {
|
|
|
2896
2910
|
enableSubRowSelection: !1,
|
|
2897
2911
|
//disable sub row selection
|
|
2898
2912
|
getSubRows: (_) => _.subRows,
|
|
2899
|
-
getRowCanExpand: () => !!
|
|
2900
|
-
getCoreRowModel:
|
|
2901
|
-
getFilteredRowModel:
|
|
2902
|
-
getExpandedRowModel:
|
|
2913
|
+
getRowCanExpand: () => !!v || ge || Je || at,
|
|
2914
|
+
getCoreRowModel: co(),
|
|
2915
|
+
getFilteredRowModel: lo(),
|
|
2916
|
+
getExpandedRowModel: ao(),
|
|
2903
2917
|
filterFromLeafRows: !0,
|
|
2904
2918
|
// EXPANDABLE
|
|
2905
2919
|
onExpandedChange: ie,
|
|
2906
2920
|
// SORTING
|
|
2907
2921
|
enableSorting: E,
|
|
2908
|
-
getSortedRowModel:
|
|
2922
|
+
getSortedRowModel: io(),
|
|
2909
2923
|
sortDescFirst: !1,
|
|
2910
2924
|
manualSorting: !F,
|
|
2911
2925
|
onSortingChange: Ie,
|
|
2912
2926
|
columnResizeMode: "onChange",
|
|
2913
2927
|
onColumnPinningChange: Re,
|
|
2914
2928
|
onColumnSizingChange: Ce,
|
|
2915
|
-
onColumnVisibilityChange:
|
|
2929
|
+
onColumnVisibilityChange: ve,
|
|
2916
2930
|
onColumnOrderChange: ze,
|
|
2917
2931
|
// @ts-ignore
|
|
2918
|
-
filterFns:
|
|
2932
|
+
filterFns: ro,
|
|
2919
2933
|
state: {
|
|
2920
2934
|
expanded: ce,
|
|
2921
2935
|
sorting: de,
|
|
2922
2936
|
columnPinning: (() => {
|
|
2923
2937
|
const _ = [];
|
|
2924
2938
|
w && _.push(Ae), _.push(ae);
|
|
2925
|
-
const
|
|
2939
|
+
const q = (L.left || []).filter(
|
|
2926
2940
|
(se) => se !== Ae && se !== ae
|
|
2927
2941
|
);
|
|
2928
|
-
return _.push(...
|
|
2942
|
+
return _.push(...q), {
|
|
2929
2943
|
left: [...new Set(_)],
|
|
2930
2944
|
right: L.right
|
|
2931
2945
|
};
|
|
2932
2946
|
})(),
|
|
2933
2947
|
columnSizing: Z,
|
|
2934
2948
|
columnVisibility: Hn,
|
|
2935
|
-
columnOrder:
|
|
2949
|
+
columnOrder: H
|
|
2936
2950
|
},
|
|
2937
2951
|
meta: {
|
|
2938
2952
|
projectName: Te,
|
|
@@ -2940,7 +2954,7 @@ const Js = 24, Zs = () => {
|
|
|
2940
2954
|
readOnly: Y,
|
|
2941
2955
|
updateEntities: nt,
|
|
2942
2956
|
toggleExpandAll: we,
|
|
2943
|
-
loadMoreRows:
|
|
2957
|
+
loadMoreRows: Wt,
|
|
2944
2958
|
selection: Array.from(X),
|
|
2945
2959
|
columnsConfig: h,
|
|
2946
2960
|
loadingLinksEntityIds: wt
|
|
@@ -2950,53 +2964,53 @@ const Js = 24, Zs = () => {
|
|
|
2950
2964
|
Pt.current = st.length;
|
|
2951
2965
|
}, [st.length]), Fe(() => {
|
|
2952
2966
|
if (!st.length) return;
|
|
2953
|
-
const _ = st.map((se) => se.id),
|
|
2967
|
+
const _ = st.map((se) => se.id), pe = [...Se.getAllLeafColumns().map((se) => se.id)].sort((se, ue) => {
|
|
2954
2968
|
if (ae === ue) return 1;
|
|
2955
2969
|
const _e = L.left?.includes(se) ? 0 : 1, Vt = L.left?.includes(ue) ? 0 : 1;
|
|
2956
2970
|
return _e - Vt;
|
|
2957
2971
|
});
|
|
2958
|
-
Dt(_,
|
|
2972
|
+
Dt(_, pe);
|
|
2959
2973
|
}, [st, Se.getAllLeafColumns(), L, ae, Dt]);
|
|
2960
|
-
const At = Se.getVisibleLeafColumns(), { columnVirtualizer: ut, virtualPaddingLeft: ft, virtualPaddingRight: mt } =
|
|
2974
|
+
const At = Se.getVisibleLeafColumns(), { columnVirtualizer: ut, virtualPaddingLeft: ft, virtualPaddingRight: mt } = Ys({
|
|
2961
2975
|
visibleColumns: At,
|
|
2962
2976
|
tableContainerRef: tt,
|
|
2963
2977
|
columnPinning: L,
|
|
2964
2978
|
columnSizing: Z,
|
|
2965
|
-
columnOrder:
|
|
2979
|
+
columnOrder: H
|
|
2966
2980
|
}), rn = Ne({}), an = ut.getVirtualItems();
|
|
2967
2981
|
Fe(() => {
|
|
2968
|
-
if (!
|
|
2969
|
-
const _ = new Set(an.map((ue) => At[ue.index]?.id)),
|
|
2970
|
-
let
|
|
2971
|
-
Se.getAllLeafColumns().filter((ue) =>
|
|
2982
|
+
if (!y || !l?.length) return;
|
|
2983
|
+
const _ = new Set(an.map((ue) => At[ue.index]?.id)), q = {};
|
|
2984
|
+
let pe = !1;
|
|
2985
|
+
Se.getAllLeafColumns().filter((ue) => nr(ue.id, l)).forEach((ue) => {
|
|
2972
2986
|
const _e = _.has(ue.id);
|
|
2973
|
-
rn.current[ue.id] !== _e && (
|
|
2974
|
-
}),
|
|
2975
|
-
}, [an,
|
|
2976
|
-
const ln =
|
|
2987
|
+
rn.current[ue.id] !== _e && (q[ue.id] = _e, pe = !0, rn.current[ue.id] = _e);
|
|
2988
|
+
}), pe && y(q);
|
|
2989
|
+
}, [an, y, l, At, Se]);
|
|
2990
|
+
const ln = Xs(Se, Z), { powerLicense: cn } = Jo(), [Vn, { isLoaded: dn, isLoading: un }] = Zo({
|
|
2977
2991
|
addon: "powerpack",
|
|
2978
2992
|
remote: "views",
|
|
2979
2993
|
module: "SummaryCellContent",
|
|
2980
|
-
fallback:
|
|
2994
|
+
fallback: tr,
|
|
2981
2995
|
skip: !P || !cn
|
|
2982
|
-
}),
|
|
2983
|
-
const _ = /* @__PURE__ */ new Set(),
|
|
2984
|
-
for (const
|
|
2985
|
-
const { rowId: se, colId: ue } = re(
|
|
2996
|
+
}), Kn = P && cn && (dn || un) && !!st.length, qn = un || !dn, jn = W(() => {
|
|
2997
|
+
const _ = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
|
|
2998
|
+
for (const pe of X) {
|
|
2999
|
+
const { rowId: se, colId: ue } = re(pe) || {};
|
|
2986
3000
|
if (!se || Zt(se)) continue;
|
|
2987
|
-
const _e =
|
|
2988
|
-
_e && (ue === ae ?
|
|
3001
|
+
const _e = He(se)?.entityId;
|
|
3002
|
+
_e && (ue === ae ? q.add(_e) : _.add(_e));
|
|
2989
3003
|
}
|
|
2990
|
-
return _.size ||
|
|
2991
|
-
}, [X,
|
|
3004
|
+
return _.size || q.size;
|
|
3005
|
+
}, [X, He]), { getRowHeight: Qn, defaultRowHeight: fn } = er(), Xn = W(() => Le.reduce((_, q) => (q.data?.enum?.length && (_[q.name] = q.data?.enum), _), {}), [Le]), Yn = W(() => me.map((_) => _.id), [me]), Jn = W(() => H.filter(
|
|
2992
3006
|
(_) => _ !== Ae && _ !== ae
|
|
2993
|
-
), [
|
|
3007
|
+
), [H]), Zn = W(() => !g || !w ? null : me.find((_) => _.id === g), [g, me, w]), eo = K(
|
|
2994
3008
|
(_) => {
|
|
2995
3009
|
if (n?.(_), r) {
|
|
2996
|
-
const
|
|
2997
|
-
if (
|
|
2998
|
-
const { scrollHeight:
|
|
2999
|
-
|
|
3010
|
+
const q = _.currentTarget;
|
|
3011
|
+
if (q && !J && (!ge || !Je)) {
|
|
3012
|
+
const { scrollHeight: pe, scrollTop: se, clientHeight: ue } = q;
|
|
3013
|
+
pe - se - ue < 500 && !je && r(_);
|
|
3000
3014
|
}
|
|
3001
3015
|
}
|
|
3002
3016
|
if (A && J) {
|
|
@@ -3004,29 +3018,29 @@ const Js = 24, Zs = () => {
|
|
|
3004
3018
|
ue && A(ue);
|
|
3005
3019
|
}
|
|
3006
3020
|
},
|
|
3007
|
-
[n, r, A,
|
|
3021
|
+
[n, r, A, ge, J, je]
|
|
3008
3022
|
), mn = /* @__PURE__ */ N(
|
|
3009
|
-
|
|
3023
|
+
xo,
|
|
3010
3024
|
{
|
|
3011
3025
|
entitiesMap: De,
|
|
3012
|
-
columnEnums: { ...Xe, ...
|
|
3026
|
+
columnEnums: { ...Xe, ...Xn },
|
|
3013
3027
|
columnReadOnly: Q,
|
|
3014
3028
|
visibleColumns: At,
|
|
3015
3029
|
children: /* @__PURE__ */ Oe(vo, { ...C, children: [
|
|
3016
3030
|
/* @__PURE__ */ N(
|
|
3017
|
-
|
|
3031
|
+
Ro,
|
|
3018
3032
|
{
|
|
3019
3033
|
ref: tt,
|
|
3020
3034
|
style: { height: "100%", padding: 0 },
|
|
3021
|
-
onScroll:
|
|
3022
|
-
...
|
|
3035
|
+
onScroll: eo,
|
|
3036
|
+
...x?.container,
|
|
3023
3037
|
"data-column-dnd-container": !0,
|
|
3024
3038
|
className: Ue(
|
|
3025
3039
|
"table-container",
|
|
3026
3040
|
{
|
|
3027
3041
|
resizing: Se.getState().columnSizingInfo.isResizingColumn
|
|
3028
3042
|
},
|
|
3029
|
-
|
|
3043
|
+
x?.container?.className
|
|
3030
3044
|
),
|
|
3031
3045
|
children: /* @__PURE__ */ Oe(
|
|
3032
3046
|
"table",
|
|
@@ -3045,67 +3059,67 @@ const Js = 24, Zs = () => {
|
|
|
3045
3059
|
},
|
|
3046
3060
|
children: [
|
|
3047
3061
|
/* @__PURE__ */ N(
|
|
3048
|
-
|
|
3062
|
+
or,
|
|
3049
3063
|
{
|
|
3050
3064
|
columnVirtualizer: ut,
|
|
3051
3065
|
table: Se,
|
|
3052
3066
|
virtualPaddingLeft: ft,
|
|
3053
3067
|
virtualPaddingRight: mt,
|
|
3054
|
-
isLoading:
|
|
3068
|
+
isLoading: je,
|
|
3055
3069
|
readOnlyColumns: Y,
|
|
3056
3070
|
sortableRows: w,
|
|
3057
|
-
columnOrderIds:
|
|
3058
|
-
...
|
|
3071
|
+
columnOrderIds: Jn,
|
|
3072
|
+
...x?.head
|
|
3059
3073
|
}
|
|
3060
3074
|
),
|
|
3061
3075
|
/* @__PURE__ */ N(
|
|
3062
|
-
|
|
3076
|
+
ir,
|
|
3063
3077
|
{
|
|
3064
3078
|
columnVirtualizer: ut,
|
|
3065
3079
|
table: Se,
|
|
3066
3080
|
tableContainerRef: tt,
|
|
3067
3081
|
virtualPaddingLeft: ft,
|
|
3068
3082
|
virtualPaddingRight: mt,
|
|
3069
|
-
showHierarchy:
|
|
3083
|
+
showHierarchy: ge,
|
|
3070
3084
|
attribs: Le,
|
|
3071
3085
|
onOpenNew: i,
|
|
3072
|
-
rowOrderIds:
|
|
3086
|
+
rowOrderIds: Yn,
|
|
3073
3087
|
sortableRows: w,
|
|
3074
3088
|
error: Be,
|
|
3075
3089
|
isFilterError: Tt,
|
|
3076
3090
|
filterErrorMessage: Et,
|
|
3077
|
-
isLoading:
|
|
3091
|
+
isLoading: je,
|
|
3078
3092
|
isGrouping: at,
|
|
3079
|
-
getRowHeight:
|
|
3093
|
+
getRowHeight: Qn,
|
|
3080
3094
|
defaultRowHeight: fn,
|
|
3081
3095
|
onResetView: bt,
|
|
3082
|
-
contextMenuItems:
|
|
3083
|
-
onVisibleRowsChange:
|
|
3096
|
+
contextMenuItems: T,
|
|
3097
|
+
onVisibleRowsChange: I
|
|
3084
3098
|
}
|
|
3085
3099
|
),
|
|
3086
|
-
|
|
3087
|
-
|
|
3100
|
+
Kn && !Be && /* @__PURE__ */ N(
|
|
3101
|
+
Uo,
|
|
3088
3102
|
{
|
|
3089
3103
|
columnVirtualizer: ut,
|
|
3090
3104
|
table: Se,
|
|
3091
3105
|
virtualPaddingLeft: ft,
|
|
3092
3106
|
virtualPaddingRight: mt,
|
|
3093
|
-
isLoading:
|
|
3107
|
+
isLoading: qn,
|
|
3094
3108
|
statsLoading: !!z,
|
|
3095
|
-
error:
|
|
3109
|
+
error: M,
|
|
3096
3110
|
renderCellContent: (_) => /* @__PURE__ */ N(
|
|
3097
|
-
|
|
3111
|
+
Vn,
|
|
3098
3112
|
{
|
|
3099
3113
|
columnId: _,
|
|
3100
3114
|
attribs: Le,
|
|
3101
|
-
fieldStats:
|
|
3115
|
+
fieldStats: S,
|
|
3102
3116
|
groupFieldStats: $,
|
|
3103
|
-
calc:
|
|
3104
|
-
onCalcChange: (
|
|
3105
|
-
format:
|
|
3106
|
-
onFormatChange: (
|
|
3117
|
+
calc: O[_],
|
|
3118
|
+
onCalcChange: (q) => le(_, q),
|
|
3119
|
+
format: j[_],
|
|
3120
|
+
onFormatChange: (q) => Me(_, q),
|
|
3107
3121
|
scope: B[_],
|
|
3108
|
-
onScopeChange: (
|
|
3122
|
+
onScopeChange: (q) => te(_, q),
|
|
3109
3123
|
mainCountLabels: b,
|
|
3110
3124
|
fieldOptions: Xe,
|
|
3111
3125
|
parentScopeApplicable: et,
|
|
@@ -3120,28 +3134,28 @@ const Js = 24, Zs = () => {
|
|
|
3120
3134
|
)
|
|
3121
3135
|
}
|
|
3122
3136
|
),
|
|
3123
|
-
oe && /* @__PURE__ */ N(
|
|
3137
|
+
oe && /* @__PURE__ */ N(ko, { children: /* @__PURE__ */ N(us, { variant: "warning", message: oe, action: k }) })
|
|
3124
3138
|
] })
|
|
3125
3139
|
}
|
|
3126
|
-
),
|
|
3127
|
-
/* @__PURE__ */ N(
|
|
3128
|
-
const _ = Se.getRowModel().rows.find((
|
|
3140
|
+
), to = w && g && zt(
|
|
3141
|
+
/* @__PURE__ */ N(_n, { dropAnimation: null, children: Zn ? (() => {
|
|
3142
|
+
const _ = Se.getRowModel().rows.find((pe) => pe.id === g);
|
|
3129
3143
|
if (!_) return null;
|
|
3130
|
-
const
|
|
3144
|
+
const q = Se.getTotalSize();
|
|
3131
3145
|
return /* @__PURE__ */ N(
|
|
3132
3146
|
"table",
|
|
3133
3147
|
{
|
|
3134
3148
|
style: {
|
|
3135
|
-
width:
|
|
3149
|
+
width: q,
|
|
3136
3150
|
borderCollapse: "collapse",
|
|
3137
3151
|
backgroundColor: "var(--md-sys-color-surface-container-high)",
|
|
3138
3152
|
boxShadow: "0 0 10px rgba(0,0,0,0.2)",
|
|
3139
3153
|
...ln
|
|
3140
3154
|
},
|
|
3141
|
-
children: /* @__PURE__ */ N("tbody", { children: /* @__PURE__ */ Oe(
|
|
3155
|
+
children: /* @__PURE__ */ N("tbody", { children: /* @__PURE__ */ Oe(An, { style: { display: "flex", userSelect: "none" }, children: [
|
|
3142
3156
|
ft ? /* @__PURE__ */ N("td", { style: { display: "flex", width: ft } }) : null,
|
|
3143
|
-
ut.getVirtualItems().map((
|
|
3144
|
-
const se = _.getVisibleCells()[
|
|
3157
|
+
ut.getVirtualItems().map((pe) => {
|
|
3158
|
+
const se = _.getVisibleCells()[pe.index];
|
|
3145
3159
|
if (!se) return null;
|
|
3146
3160
|
const ue = {
|
|
3147
3161
|
...$t(se.column),
|
|
@@ -3162,12 +3176,12 @@ const Js = 24, Zs = () => {
|
|
|
3162
3176
|
},
|
|
3163
3177
|
`overlay-drag-${se.id}`
|
|
3164
3178
|
) : /* @__PURE__ */ N(
|
|
3165
|
-
|
|
3179
|
+
Wn,
|
|
3166
3180
|
{
|
|
3167
3181
|
cell: se,
|
|
3168
3182
|
cellId: `overlay-${ye(_.id, se.column.id)}`,
|
|
3169
3183
|
rowId: _.id,
|
|
3170
|
-
showHierarchy:
|
|
3184
|
+
showHierarchy: ge
|
|
3171
3185
|
},
|
|
3172
3186
|
`overlay-cell-${se.id}`
|
|
3173
3187
|
);
|
|
@@ -3179,21 +3193,21 @@ const Js = 24, Zs = () => {
|
|
|
3179
3193
|
})() : null }),
|
|
3180
3194
|
document.body
|
|
3181
3195
|
);
|
|
3182
|
-
return w ? /* @__PURE__ */ Oe(
|
|
3196
|
+
return w ? /* @__PURE__ */ Oe(pn, { children: [
|
|
3183
3197
|
mn,
|
|
3184
|
-
|
|
3185
|
-
/* @__PURE__ */ N(
|
|
3198
|
+
to,
|
|
3199
|
+
/* @__PURE__ */ N(kn, { table: Se }),
|
|
3186
3200
|
/* @__PURE__ */ N(In, {})
|
|
3187
|
-
] }) : /* @__PURE__ */ Oe(
|
|
3201
|
+
] }) : /* @__PURE__ */ Oe(pn, { children: [
|
|
3188
3202
|
mn,
|
|
3189
|
-
/* @__PURE__ */ N(
|
|
3203
|
+
/* @__PURE__ */ N(kn, { table: Se }),
|
|
3190
3204
|
/* @__PURE__ */ N(In, {})
|
|
3191
3205
|
] });
|
|
3192
|
-
},
|
|
3193
|
-
const { active: t } =
|
|
3206
|
+
}, kn = ({ table: e }) => {
|
|
3207
|
+
const { active: t } = ls(), r = t?.data?.current?.type === "column" ? t?.id : null, i = W(() => r && e.getHeaderGroups()[0]?.headers.find((f) => f.id === r) || null, [r, e]);
|
|
3194
3208
|
return !r || !i ? null : zt(
|
|
3195
|
-
/* @__PURE__ */ N(
|
|
3196
|
-
|
|
3209
|
+
/* @__PURE__ */ N(_n, { dropAnimation: null, children: /* @__PURE__ */ N(
|
|
3210
|
+
Mn,
|
|
3197
3211
|
{
|
|
3198
3212
|
style: {
|
|
3199
3213
|
width: i.column.getSize(),
|
|
@@ -3203,7 +3217,7 @@ const Js = 24, Zs = () => {
|
|
|
3203
3217
|
alignItems: "center",
|
|
3204
3218
|
minHeight: 34
|
|
3205
3219
|
},
|
|
3206
|
-
children: /* @__PURE__ */ N(
|
|
3220
|
+
children: /* @__PURE__ */ N(On, { className: "bold header", children: en(
|
|
3207
3221
|
i.column.columnDef.header,
|
|
3208
3222
|
i.getContext()
|
|
3209
3223
|
) })
|
|
@@ -3211,18 +3225,18 @@ const Js = 24, Zs = () => {
|
|
|
3211
3225
|
) }),
|
|
3212
3226
|
document.body
|
|
3213
3227
|
);
|
|
3214
|
-
},
|
|
3228
|
+
}, or = ({
|
|
3215
3229
|
columnVirtualizer: e,
|
|
3216
3230
|
table: t,
|
|
3217
3231
|
virtualPaddingLeft: n,
|
|
3218
3232
|
virtualPaddingRight: r,
|
|
3219
3233
|
isLoading: i,
|
|
3220
3234
|
readOnlyColumns: f,
|
|
3221
|
-
sortableRows:
|
|
3235
|
+
sortableRows: p,
|
|
3222
3236
|
columnOrderIds: m,
|
|
3223
3237
|
...s
|
|
3224
|
-
}) => /* @__PURE__ */ N(
|
|
3225
|
-
|
|
3238
|
+
}) => /* @__PURE__ */ N(Do, { ...s, children: t.getHeaderGroups().map((a) => /* @__PURE__ */ N(
|
|
3239
|
+
sr,
|
|
3226
3240
|
{
|
|
3227
3241
|
columnVirtualizer: e,
|
|
3228
3242
|
headerGroup: a,
|
|
@@ -3230,30 +3244,30 @@ const Js = 24, Zs = () => {
|
|
|
3230
3244
|
virtualPaddingRight: r,
|
|
3231
3245
|
isLoading: i,
|
|
3232
3246
|
readOnlyColumns: f,
|
|
3233
|
-
sortableRows:
|
|
3247
|
+
sortableRows: p,
|
|
3234
3248
|
columnOrderIds: m
|
|
3235
3249
|
},
|
|
3236
3250
|
a.id
|
|
3237
|
-
)) }),
|
|
3251
|
+
)) }), sr = ({
|
|
3238
3252
|
columnVirtualizer: e,
|
|
3239
3253
|
headerGroup: t,
|
|
3240
3254
|
virtualPaddingLeft: n,
|
|
3241
3255
|
virtualPaddingRight: r,
|
|
3242
3256
|
isLoading: i,
|
|
3243
3257
|
readOnlyColumns: f,
|
|
3244
|
-
sortableRows:
|
|
3258
|
+
sortableRows: p,
|
|
3245
3259
|
columnOrderIds: m
|
|
3246
3260
|
}) => {
|
|
3247
3261
|
const s = e.getVirtualItems();
|
|
3248
|
-
return /* @__PURE__ */ Oe(
|
|
3262
|
+
return /* @__PURE__ */ Oe(_o, { style: { display: "flex" }, children: [
|
|
3249
3263
|
n ? (
|
|
3250
3264
|
//fake empty column to the left for virtualization scroll padding
|
|
3251
3265
|
/* @__PURE__ */ N("th", { style: { display: "flex", width: n } })
|
|
3252
3266
|
) : null,
|
|
3253
|
-
/* @__PURE__ */ N(
|
|
3267
|
+
/* @__PURE__ */ N(Nn, { items: m, strategy: ds, children: s.map((a) => {
|
|
3254
3268
|
const o = t.headers[a.index], u = o.id !== Ae && o.id !== ae;
|
|
3255
3269
|
return /* @__PURE__ */ N(
|
|
3256
|
-
|
|
3270
|
+
rr,
|
|
3257
3271
|
{
|
|
3258
3272
|
header: o,
|
|
3259
3273
|
isLoading: i,
|
|
@@ -3263,7 +3277,7 @@ const Js = 24, Zs = () => {
|
|
|
3263
3277
|
canHide: o.column.getCanHide(),
|
|
3264
3278
|
canPin: o.column.getCanPin(),
|
|
3265
3279
|
canResize: o.column.getCanResize(),
|
|
3266
|
-
sortableRows:
|
|
3280
|
+
sortableRows: p,
|
|
3267
3281
|
isDraggable: u
|
|
3268
3282
|
},
|
|
3269
3283
|
o.id
|
|
@@ -3274,36 +3288,36 @@ const Js = 24, Zs = () => {
|
|
|
3274
3288
|
/* @__PURE__ */ N("th", { style: { display: "flex", width: r } })
|
|
3275
3289
|
) : null
|
|
3276
3290
|
] }, t.id);
|
|
3277
|
-
},
|
|
3291
|
+
}, rr = ({
|
|
3278
3292
|
header: e,
|
|
3279
3293
|
isLoading: t,
|
|
3280
3294
|
canFilter: n,
|
|
3281
3295
|
canHide: r,
|
|
3282
3296
|
canSort: i,
|
|
3283
3297
|
canPin: f,
|
|
3284
|
-
canResize:
|
|
3298
|
+
canResize: p,
|
|
3285
3299
|
isReadOnly: m,
|
|
3286
3300
|
sortableRows: s,
|
|
3287
3301
|
isDraggable: a = !0
|
|
3288
3302
|
}) => {
|
|
3289
|
-
const { column: o } = e, u = o.getIsSorted(), c = `column-header-menu-${o.id}`, { menuOpen:
|
|
3290
|
-
const
|
|
3291
|
-
d(
|
|
3292
|
-
}, h = F.left?.includes(o.id) || !1, { attributes: P, listeners:
|
|
3303
|
+
const { column: o } = e, u = o.getIsSorted(), c = `column-header-menu-${o.id}`, { menuOpen: v } = Fn(), E = v === c, { columnPinning: F, sorting: w, updateSorting: d } = it(), g = () => {
|
|
3304
|
+
const T = w?.find((l) => l.id === o.id), y = T ? T.desc ? [] : [{ id: o.id, desc: !0 }] : [{ id: o.id, desc: !1 }];
|
|
3305
|
+
d(y);
|
|
3306
|
+
}, h = F.left?.includes(o.id) || !1, { attributes: P, listeners: S, setNodeRef: $, transform: z, transition: M, isDragging: b } = zn({
|
|
3293
3307
|
id: o.id,
|
|
3294
3308
|
data: { type: "column", isPinned: h },
|
|
3295
3309
|
disabled: !a
|
|
3296
3310
|
}), D = () => b ? {
|
|
3297
|
-
transform:
|
|
3298
|
-
transition:
|
|
3311
|
+
transform: Bn.Translate.toString(z),
|
|
3312
|
+
transition: M,
|
|
3299
3313
|
visibility: "hidden",
|
|
3300
3314
|
zIndex: 200
|
|
3301
3315
|
} : {}, A = {
|
|
3302
|
-
onPointerDown: (
|
|
3303
|
-
onMouseDown: (
|
|
3316
|
+
onPointerDown: (T) => T.stopPropagation(),
|
|
3317
|
+
onMouseDown: (T) => T.stopPropagation()
|
|
3304
3318
|
};
|
|
3305
3319
|
return /* @__PURE__ */ N(
|
|
3306
|
-
|
|
3320
|
+
Mn,
|
|
3307
3321
|
{
|
|
3308
3322
|
ref: $,
|
|
3309
3323
|
"data-column-id": o.id,
|
|
@@ -3320,16 +3334,16 @@ const Js = 24, Zs = () => {
|
|
|
3320
3334
|
...D()
|
|
3321
3335
|
},
|
|
3322
3336
|
children: e.isPlaceholder ? null : /* @__PURE__ */ Oe(
|
|
3323
|
-
|
|
3337
|
+
On,
|
|
3324
3338
|
{
|
|
3325
3339
|
className: Ue("bold", "header"),
|
|
3326
|
-
...a ? { ...P, ...
|
|
3340
|
+
...a ? { ...P, ...S } : {},
|
|
3327
3341
|
children: [
|
|
3328
3342
|
en(o.columnDef.header, e.getContext()),
|
|
3329
3343
|
m && /* @__PURE__ */ N(on, { icon: "lock", "data-tooltip": "You only have permission to read this column." }),
|
|
3330
|
-
/* @__PURE__ */ Oe(
|
|
3344
|
+
/* @__PURE__ */ Oe(No, { className: "actions", $isOpen: E, ...A, children: [
|
|
3331
3345
|
(r || f || i) && /* @__PURE__ */ N(
|
|
3332
|
-
|
|
3346
|
+
Qs,
|
|
3333
3347
|
{
|
|
3334
3348
|
className: "header-menu",
|
|
3335
3349
|
header: e,
|
|
@@ -3349,7 +3363,7 @@ const Js = 24, Zs = () => {
|
|
|
3349
3363
|
style: {
|
|
3350
3364
|
transform: u === "desc" ? "rotate(180deg) scaleX(-1)" : "none"
|
|
3351
3365
|
},
|
|
3352
|
-
onClick:
|
|
3366
|
+
onClick: g,
|
|
3353
3367
|
selected: !!o.getIsSorted()
|
|
3354
3368
|
}
|
|
3355
3369
|
),
|
|
@@ -3363,15 +3377,15 @@ const Js = 24, Zs = () => {
|
|
|
3363
3377
|
}
|
|
3364
3378
|
)
|
|
3365
3379
|
] }),
|
|
3366
|
-
|
|
3367
|
-
|
|
3380
|
+
p && /* @__PURE__ */ N(
|
|
3381
|
+
zo,
|
|
3368
3382
|
{
|
|
3369
3383
|
onDoubleClick: () => o.resetSize(),
|
|
3370
|
-
onMouseDown: (
|
|
3371
|
-
|
|
3384
|
+
onMouseDown: (T) => {
|
|
3385
|
+
T.stopPropagation(), e.getResizeHandler()(T);
|
|
3372
3386
|
},
|
|
3373
3387
|
onTouchStart: e.getResizeHandler(),
|
|
3374
|
-
onPointerDown: (
|
|
3388
|
+
onPointerDown: (T) => T.stopPropagation(),
|
|
3375
3389
|
className: Ue("resize-handle", {
|
|
3376
3390
|
resizing: o.getIsResizing()
|
|
3377
3391
|
})
|
|
@@ -3383,97 +3397,97 @@ const Js = 24, Zs = () => {
|
|
|
3383
3397
|
},
|
|
3384
3398
|
e.id
|
|
3385
3399
|
);
|
|
3386
|
-
},
|
|
3400
|
+
}, ir = ({
|
|
3387
3401
|
columnVirtualizer: e,
|
|
3388
3402
|
table: t,
|
|
3389
3403
|
tableContainerRef: n,
|
|
3390
3404
|
showHierarchy: r,
|
|
3391
3405
|
virtualPaddingLeft: i,
|
|
3392
3406
|
virtualPaddingRight: f,
|
|
3393
|
-
attribs:
|
|
3407
|
+
attribs: p,
|
|
3394
3408
|
onOpenNew: m,
|
|
3395
3409
|
rowOrderIds: s,
|
|
3396
3410
|
sortableRows: a,
|
|
3397
3411
|
error: o,
|
|
3398
3412
|
isFilterError: u,
|
|
3399
3413
|
filterErrorMessage: c,
|
|
3400
|
-
isLoading:
|
|
3414
|
+
isLoading: v,
|
|
3401
3415
|
isGrouping: E,
|
|
3402
3416
|
getRowHeight: F,
|
|
3403
3417
|
defaultRowHeight: w,
|
|
3404
3418
|
onResetView: d,
|
|
3405
|
-
contextMenuItems:
|
|
3419
|
+
contextMenuItems: g,
|
|
3406
3420
|
onVisibleRowsChange: h
|
|
3407
3421
|
}) => {
|
|
3408
|
-
const P =
|
|
3422
|
+
const P = W(() => t.getAllColumns().map((C) => {
|
|
3409
3423
|
const R = C.id, L = C.columnDef.header;
|
|
3410
3424
|
return typeof L == "string" || typeof L == "number" ? { label: L, id: R } : null;
|
|
3411
|
-
}).filter(Boolean), [t.getAllColumns()]), $ =
|
|
3412
|
-
attribs:
|
|
3425
|
+
}).filter(Boolean), [t.getAllColumns()]), $ = Ds({
|
|
3426
|
+
attribs: p,
|
|
3413
3427
|
onOpenNew: m,
|
|
3414
3428
|
headerLabels: P,
|
|
3415
|
-
contextMenuItems:
|
|
3416
|
-
}).handleTableBodyContextMenu, { rows: z } = t.getRowModel(),
|
|
3429
|
+
contextMenuItems: g
|
|
3430
|
+
}).handleTableBodyContextMenu, { rows: z } = t.getRowModel(), M = Pn({
|
|
3417
3431
|
count: z.length,
|
|
3418
|
-
estimateSize: (
|
|
3419
|
-
const
|
|
3420
|
-
return
|
|
3432
|
+
estimateSize: (I) => {
|
|
3433
|
+
const x = z[I];
|
|
3434
|
+
return x ? F(x.original) : w;
|
|
3421
3435
|
},
|
|
3422
3436
|
getScrollElement: () => n.current,
|
|
3423
3437
|
//measure dynamic row height, except in firefox because it measures table border height incorrectly
|
|
3424
|
-
measureElement: typeof window < "u" && navigator.userAgent.indexOf("Firefox") === -1 ? (
|
|
3438
|
+
measureElement: typeof window < "u" && navigator.userAgent.indexOf("Firefox") === -1 ? (I) => I?.getBoundingClientRect().height : void 0,
|
|
3425
3439
|
overscan: 5
|
|
3426
|
-
}), b =
|
|
3440
|
+
}), b = M.getVirtualItems(), D = Ne("");
|
|
3427
3441
|
Fe(() => {
|
|
3428
3442
|
if (!h) return;
|
|
3429
|
-
const
|
|
3430
|
-
C !== D.current && (D.current = C, h(
|
|
3443
|
+
const I = b.map((R) => z[R.index] && Ao(z[R.index].id)).filter(Boolean), x = Array.from(new Set(I)), C = x.join(",");
|
|
3444
|
+
C !== D.current && (D.current = C, h(x));
|
|
3431
3445
|
}, [b, z, h]);
|
|
3432
3446
|
const A = K(
|
|
3433
|
-
(
|
|
3434
|
-
|
|
3447
|
+
(I) => {
|
|
3448
|
+
I && M.measureElement(I);
|
|
3435
3449
|
},
|
|
3436
|
-
[
|
|
3450
|
+
[M]
|
|
3437
3451
|
);
|
|
3438
|
-
|
|
3439
|
-
const
|
|
3440
|
-
const
|
|
3441
|
-
for (let C = 0; C <
|
|
3442
|
-
const R =
|
|
3443
|
-
|
|
3452
|
+
Js();
|
|
3453
|
+
const T = t.getVisibleLeafColumns(), y = W(() => {
|
|
3454
|
+
const I = [], x = [];
|
|
3455
|
+
for (let C = 0; C < T.length - 1; C++) {
|
|
3456
|
+
const R = T[C];
|
|
3457
|
+
x.push(R.id === ae ? "20" : `var(--col-${R.id}-size)`), I.push(`calc((${x.join(" + ")}) * 1px)`);
|
|
3444
3458
|
}
|
|
3445
|
-
return
|
|
3446
|
-
}, [
|
|
3459
|
+
return I;
|
|
3460
|
+
}, [T]), l = /* @__PURE__ */ Oe(
|
|
3447
3461
|
"tbody",
|
|
3448
3462
|
{
|
|
3449
3463
|
style: {
|
|
3450
|
-
minHeight: `${
|
|
3464
|
+
minHeight: `${M.getTotalSize()}px`,
|
|
3451
3465
|
position: "relative",
|
|
3452
3466
|
display: "grid"
|
|
3453
3467
|
},
|
|
3454
3468
|
onContextMenu: $,
|
|
3455
3469
|
children: [
|
|
3456
|
-
/* @__PURE__ */ N(
|
|
3457
|
-
b.map((
|
|
3458
|
-
const
|
|
3459
|
-
return
|
|
3460
|
-
|
|
3470
|
+
/* @__PURE__ */ N(Mo, { "aria-hidden": !0, children: y.map((I, x) => /* @__PURE__ */ N("div", { style: { left: I } }, x)) }),
|
|
3471
|
+
b.map((I) => {
|
|
3472
|
+
const x = z[I.index];
|
|
3473
|
+
return x ? /* @__PURE__ */ N(
|
|
3474
|
+
ar,
|
|
3461
3475
|
{
|
|
3462
|
-
row:
|
|
3476
|
+
row: x,
|
|
3463
3477
|
showHierarchy: r,
|
|
3464
|
-
visibleCells:
|
|
3478
|
+
visibleCells: x.getVisibleCells(),
|
|
3465
3479
|
virtualColumns: e.getVirtualItems(),
|
|
3466
3480
|
paddingLeft: i,
|
|
3467
3481
|
paddingRight: f,
|
|
3468
3482
|
rowRef: A,
|
|
3469
|
-
dataIndex:
|
|
3470
|
-
offsetTop:
|
|
3483
|
+
dataIndex: I.index,
|
|
3484
|
+
offsetTop: I.start,
|
|
3471
3485
|
sortableRows: a,
|
|
3472
3486
|
isGrouping: E,
|
|
3473
|
-
rowHeight: F(
|
|
3487
|
+
rowHeight: F(x.original)
|
|
3474
3488
|
},
|
|
3475
|
-
|
|
3476
|
-
) : (console.warn("Virtualized row data not found for index:",
|
|
3489
|
+
x.id
|
|
3490
|
+
) : (console.warn("Virtualized row data not found for index:", I.index), null);
|
|
3477
3491
|
})
|
|
3478
3492
|
]
|
|
3479
3493
|
}
|
|
@@ -3481,7 +3495,7 @@ const Js = 24, Zs = () => {
|
|
|
3481
3495
|
return o ? n.current && zt(
|
|
3482
3496
|
/* @__PURE__ */ N(hn, { children: u ? /* @__PURE__ */ Oe(Xt, { message: c, icon: "filter_alt_off", children: [
|
|
3483
3497
|
d && /* @__PURE__ */ N(
|
|
3484
|
-
|
|
3498
|
+
jt,
|
|
3485
3499
|
{
|
|
3486
3500
|
variant: "filled",
|
|
3487
3501
|
label: "Reset filters",
|
|
@@ -3489,9 +3503,9 @@ const Js = 24, Zs = () => {
|
|
|
3489
3503
|
onClick: d
|
|
3490
3504
|
}
|
|
3491
3505
|
),
|
|
3492
|
-
/* @__PURE__ */ N(
|
|
3506
|
+
/* @__PURE__ */ N(fs, { errorMessage: Ln(o) })
|
|
3493
3507
|
] }) : /* @__PURE__ */ N(Xt, { message: "No items found", error: o, children: d && /* @__PURE__ */ N(
|
|
3494
|
-
|
|
3508
|
+
jt,
|
|
3495
3509
|
{
|
|
3496
3510
|
variant: "filled",
|
|
3497
3511
|
label: "Reset filters",
|
|
@@ -3500,29 +3514,29 @@ const Js = 24, Zs = () => {
|
|
|
3500
3514
|
}
|
|
3501
3515
|
) }) }),
|
|
3502
3516
|
n.current
|
|
3503
|
-
) : !z.length && !
|
|
3504
|
-
/* @__PURE__ */ N(hn, { children: /* @__PURE__ */ N(Xt, { message: "No items found", children: d && /* @__PURE__ */ N(
|
|
3517
|
+
) : !z.length && !v ? n.current && zt(
|
|
3518
|
+
/* @__PURE__ */ N(hn, { children: /* @__PURE__ */ N(Xt, { message: "No items found", children: d && /* @__PURE__ */ N(jt, { variant: "filled", label: "Reset filters", icon: "replay", onClick: d }) }) }),
|
|
3505
3519
|
n.current
|
|
3506
|
-
) : a ? /* @__PURE__ */ N(
|
|
3507
|
-
},
|
|
3520
|
+
) : a ? /* @__PURE__ */ N(Nn, { items: s, strategy: cs, children: l }) : l;
|
|
3521
|
+
}, ar = ({
|
|
3508
3522
|
row: e,
|
|
3509
3523
|
showHierarchy: t,
|
|
3510
3524
|
visibleCells: n,
|
|
3511
3525
|
virtualColumns: r,
|
|
3512
3526
|
paddingLeft: i,
|
|
3513
3527
|
paddingRight: f,
|
|
3514
|
-
rowRef:
|
|
3528
|
+
rowRef: p,
|
|
3515
3529
|
dataIndex: m,
|
|
3516
3530
|
offsetTop: s,
|
|
3517
3531
|
sortableRows: a,
|
|
3518
3532
|
isGrouping: o = !1,
|
|
3519
3533
|
rowHeight: u
|
|
3520
3534
|
}) => {
|
|
3521
|
-
const c = a ?
|
|
3535
|
+
const c = a ? zn({ id: e.id }) : null, v = Ne(null), E = K(
|
|
3522
3536
|
(w) => {
|
|
3523
|
-
|
|
3537
|
+
v.current = w, c && c.setNodeRef(w), c && c.isDragging || p(w);
|
|
3524
3538
|
},
|
|
3525
|
-
[c,
|
|
3539
|
+
[c, p]
|
|
3526
3540
|
), F = {
|
|
3527
3541
|
position: "absolute",
|
|
3528
3542
|
// Use absolute positioning for virtualized items
|
|
@@ -3538,14 +3552,14 @@ const Js = 24, Zs = () => {
|
|
|
3538
3552
|
// Ensure dragged item is above others
|
|
3539
3553
|
display: "flex",
|
|
3540
3554
|
// Styled.TR is display:flex
|
|
3541
|
-
transform: c && c.transform ?
|
|
3555
|
+
transform: c && c.transform ? Bn.Transform.toString(c.transform) : void 0,
|
|
3542
3556
|
// Apply dnd-kit's transform for drag effect
|
|
3543
3557
|
transition: c && c.transition ? c.transition : void 0,
|
|
3544
3558
|
visibility: c && c.isDragging ? "hidden" : "visible"
|
|
3545
3559
|
// Hide the row being dragged
|
|
3546
3560
|
};
|
|
3547
3561
|
return /* @__PURE__ */ Oe(
|
|
3548
|
-
|
|
3562
|
+
An,
|
|
3549
3563
|
{
|
|
3550
3564
|
ref: E,
|
|
3551
3565
|
"data-index": m,
|
|
@@ -3559,7 +3573,7 @@ const Js = 24, Zs = () => {
|
|
|
3559
3573
|
r.map((w) => {
|
|
3560
3574
|
const d = n[w.index];
|
|
3561
3575
|
if (!d) return null;
|
|
3562
|
-
const
|
|
3576
|
+
const g = ye(e.id, d.column.id);
|
|
3563
3577
|
return d.column.id === Ae ? /* @__PURE__ */ N(
|
|
3564
3578
|
nn,
|
|
3565
3579
|
{
|
|
@@ -3592,10 +3606,10 @@ const Js = 24, Zs = () => {
|
|
|
3592
3606
|
},
|
|
3593
3607
|
d.id
|
|
3594
3608
|
) : /* @__PURE__ */ N(
|
|
3595
|
-
|
|
3609
|
+
Wn,
|
|
3596
3610
|
{
|
|
3597
3611
|
cell: d,
|
|
3598
|
-
cellId:
|
|
3612
|
+
cellId: g,
|
|
3599
3613
|
rowId: e.id,
|
|
3600
3614
|
showHierarchy: t,
|
|
3601
3615
|
sortableRows: a,
|
|
@@ -3611,47 +3625,47 @@ const Js = 24, Zs = () => {
|
|
|
3611
3625
|
]
|
|
3612
3626
|
}
|
|
3613
3627
|
);
|
|
3614
|
-
},
|
|
3628
|
+
}, Wn = ({
|
|
3615
3629
|
cell: e,
|
|
3616
3630
|
rowId: t,
|
|
3617
3631
|
cellId: n,
|
|
3618
3632
|
className: r,
|
|
3619
3633
|
showHierarchy: i,
|
|
3620
3634
|
sortableRows: f,
|
|
3621
|
-
rowHeight:
|
|
3635
|
+
rowHeight: p,
|
|
3622
3636
|
...m
|
|
3623
3637
|
}) => {
|
|
3624
3638
|
const { getEntityById: s, onOpenPlayer: a } = Ve(), {
|
|
3625
3639
|
isCellSelected: o,
|
|
3626
3640
|
isCellFocused: u,
|
|
3627
3641
|
startSelection: c,
|
|
3628
|
-
extendSelection:
|
|
3642
|
+
extendSelection: v,
|
|
3629
3643
|
endSelection: E,
|
|
3630
3644
|
selectCell: F,
|
|
3631
3645
|
focusCell: w,
|
|
3632
3646
|
getCellBorderClasses: d,
|
|
3633
|
-
clearSelection:
|
|
3647
|
+
clearSelection: g,
|
|
3634
3648
|
selectedCells: h,
|
|
3635
3649
|
setSelectedCells: P,
|
|
3636
|
-
setAnchorCell:
|
|
3650
|
+
setAnchorCell: S,
|
|
3637
3651
|
setFocusedCellId: $
|
|
3638
|
-
} = Ye(), { isRowSelected: z } =
|
|
3652
|
+
} = Ye(), { isRowSelected: z } = Oo(), { isEditing: M, setEditingCellId: b, editingCellId: D } = Ut(), A = d(n), y = e.column.getIsPinned() === "left" && e.column.getIsLastColumn("left"), l = e.column.id === ae, I = !!e.row.original.group, x = h.size > 1;
|
|
3639
3653
|
return /* @__PURE__ */ N(
|
|
3640
3654
|
nn,
|
|
3641
3655
|
{
|
|
3642
3656
|
...m,
|
|
3643
3657
|
tabIndex: 0,
|
|
3644
|
-
$isLastPinned:
|
|
3658
|
+
$isLastPinned: y,
|
|
3645
3659
|
className: Ue(
|
|
3646
3660
|
e.column.id,
|
|
3647
3661
|
{
|
|
3648
3662
|
selected: o(n),
|
|
3649
3663
|
focused: u(n),
|
|
3650
|
-
editing:
|
|
3651
|
-
"last-pinned-left":
|
|
3664
|
+
editing: M(n),
|
|
3665
|
+
"last-pinned-left": y,
|
|
3652
3666
|
"selected-row": z(t),
|
|
3653
|
-
expandable: !
|
|
3654
|
-
"multiple-selected":
|
|
3667
|
+
expandable: !I && !!e.row.originalSubRows && Lo(e.row.original.primary.entityType),
|
|
3668
|
+
"multiple-selected": x
|
|
3655
3669
|
},
|
|
3656
3670
|
r,
|
|
3657
3671
|
...A
|
|
@@ -3659,24 +3673,24 @@ const Js = 24, Zs = () => {
|
|
|
3659
3673
|
style: {
|
|
3660
3674
|
...$t(e.column),
|
|
3661
3675
|
width: Gt(e.column.id),
|
|
3662
|
-
height:
|
|
3676
|
+
height: p
|
|
3663
3677
|
},
|
|
3664
3678
|
onMouseDown: (C) => {
|
|
3665
3679
|
if (C.button !== 0) return;
|
|
3666
3680
|
const R = C.target;
|
|
3667
3681
|
if (R.closest(".expander") || R.closest(".options")) return;
|
|
3668
3682
|
if (C.currentTarget.focus(), C.detail === 2) {
|
|
3669
|
-
if (
|
|
3683
|
+
if (Fo(C) && e.column.id !== "comments" || Nt(e.row.original.primary.entityType) || I) {
|
|
3670
3684
|
C.preventDefault();
|
|
3671
3685
|
return;
|
|
3672
3686
|
}
|
|
3673
3687
|
if (["name", "comments"].includes(e.column.id) && !R.closest(".expander")) {
|
|
3674
|
-
e.column.id === "comments" &&
|
|
3688
|
+
e.column.id === "comments" && ps("overview", "feed");
|
|
3675
3689
|
const ee = ye(e.row.id, ae), de = C.metaKey || C.ctrlKey, Ie = re(ee);
|
|
3676
3690
|
P((Re) => {
|
|
3677
3691
|
const Ce = de ? new Set(Re) : /* @__PURE__ */ new Set();
|
|
3678
3692
|
return Ce.add(ee), Ce.add(n), Ce;
|
|
3679
|
-
}), Ie && (
|
|
3693
|
+
}), Ie && (S(Ie), $(ee));
|
|
3680
3694
|
} else if (e.column.id === "thumbnail") {
|
|
3681
3695
|
if (a) {
|
|
3682
3696
|
const ee = s(e.row.original.primary.id);
|
|
@@ -3690,8 +3704,8 @@ const Js = 24, Zs = () => {
|
|
|
3690
3704
|
C.preventDefault();
|
|
3691
3705
|
return;
|
|
3692
3706
|
}
|
|
3693
|
-
if (
|
|
3694
|
-
const L =
|
|
3707
|
+
if (I && e.column.id !== "name") return g();
|
|
3708
|
+
const L = I || Nt(e.row.original.primary.entityType);
|
|
3695
3709
|
if (R.closest("." + yn) && !L) {
|
|
3696
3710
|
o(n) || (F(n, !1, !1), w(n)), b(n);
|
|
3697
3711
|
return;
|
|
@@ -3702,14 +3716,14 @@ const Js = 24, Zs = () => {
|
|
|
3702
3716
|
);
|
|
3703
3717
|
if (Z) {
|
|
3704
3718
|
Z.blur(), setTimeout(() => {
|
|
3705
|
-
|
|
3719
|
+
H();
|
|
3706
3720
|
}, 0);
|
|
3707
3721
|
return;
|
|
3708
3722
|
}
|
|
3709
3723
|
b(null);
|
|
3710
3724
|
}
|
|
3711
|
-
|
|
3712
|
-
function
|
|
3725
|
+
H();
|
|
3726
|
+
function H() {
|
|
3713
3727
|
const Z = C.metaKey || C.ctrlKey || l;
|
|
3714
3728
|
C.shiftKey ? F(n, Z, !0) : c(n, Z), C.preventDefault();
|
|
3715
3729
|
}
|
|
@@ -3717,7 +3731,7 @@ const Js = 24, Zs = () => {
|
|
|
3717
3731
|
onMouseOver: (C) => {
|
|
3718
3732
|
if (C.buttons === 1) {
|
|
3719
3733
|
if (C.target.closest("." + yn)) return;
|
|
3720
|
-
|
|
3734
|
+
v(n, l);
|
|
3721
3735
|
}
|
|
3722
3736
|
},
|
|
3723
3737
|
onMouseUp: () => {
|
|
@@ -3736,190 +3750,190 @@ const Js = 24, Zs = () => {
|
|
|
3736
3750
|
);
|
|
3737
3751
|
};
|
|
3738
3752
|
export {
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3753
|
+
gl as ALWAYS_VISIBLE_COLUMNS,
|
|
3754
|
+
zi as BooleanWidget,
|
|
3755
|
+
pt as BorderPosition,
|
|
3756
|
+
wl as CELL_PADDING_Y,
|
|
3757
|
+
Bi as COLUMN_ICONS,
|
|
3758
|
+
Ui as COLUMN_LABELS,
|
|
3759
|
+
Gi as COLUMN_MIN_SIZE,
|
|
3760
|
+
$i as COLUMN_SORT_CONFIG,
|
|
3761
|
+
fo as CellEditingContext,
|
|
3762
|
+
di as CellEditingProvider,
|
|
3763
|
+
Wi as CellWidget,
|
|
3764
|
+
xo as ClipboardProvider,
|
|
3765
|
+
Hi as CollapsedWidget,
|
|
3766
|
+
Fi as ColumnDndProvider,
|
|
3767
|
+
Qs as ColumnHeaderMenu,
|
|
3768
|
+
po as ColumnSettingsContext,
|
|
3769
|
+
ui as ColumnSettingsProvider,
|
|
3770
|
+
Pi as DEFAULT_MAIN_COUNT_LABELS,
|
|
3771
|
+
xi as DEFAULT_ROW_SCOPE,
|
|
3772
|
+
wi as DEFAULT_SUMMARY_FORMAT,
|
|
3759
3773
|
Ae as DRAG_HANDLE_COLUMN_ID,
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3774
|
+
Vi as DateWidget,
|
|
3775
|
+
Ki as DetailsPanelEntityContext,
|
|
3776
|
+
qi as DetailsPanelEntityProvider,
|
|
3763
3777
|
yn as EDIT_TRIGGER_CLASS,
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3778
|
+
ji as ENTITY_COLUMN_IDS,
|
|
3779
|
+
Qi as ENTITY_FIELD_SUPPORT,
|
|
3780
|
+
Xi as ENTITY_WIDGET_CLASS,
|
|
3781
|
+
Yi as EmptyWidget,
|
|
3782
|
+
Ji as EntityNameWidget,
|
|
3783
|
+
Zi as EntityWidget,
|
|
3784
|
+
ea as EnumCellValue,
|
|
3785
|
+
ta as EnumWidget,
|
|
3786
|
+
na as ErrorWidget,
|
|
3773
3787
|
Jt as GROUP_BY_ID,
|
|
3774
|
-
|
|
3788
|
+
oa as GroupHeaderWidget,
|
|
3775
3789
|
bn as HeaderActionButton,
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3790
|
+
sa as LEGACY_COLUMN_ID_ALIASES,
|
|
3791
|
+
ra as LinksWidget,
|
|
3792
|
+
ia as MarkdownWidget,
|
|
3793
|
+
aa as MetaWidget,
|
|
3794
|
+
la as NEXT_PAGE_ID,
|
|
3795
|
+
Un as NO_MATCH_FOLDER_ID,
|
|
3796
|
+
ca as ProjectDataProvider,
|
|
3797
|
+
da as ProjectTableProvider,
|
|
3798
|
+
ua as ProjectTableQueriesProvider,
|
|
3799
|
+
Li as ProjectTreeTable,
|
|
3800
|
+
wo as READ_ONLY,
|
|
3801
|
+
fa as RESTRICTED_ENTITY_ICON,
|
|
3802
|
+
ma as RESTRICTED_ENTITY_LABEL,
|
|
3803
|
+
pa as RESTRICTED_ENTITY_NAME,
|
|
3804
|
+
ga as RESTRICTED_ENTITY_TYPE,
|
|
3805
|
+
ha as ROW_ID_SEPARATOR,
|
|
3792
3806
|
ae as ROW_SELECTION_COLUMN_ID,
|
|
3793
3807
|
js as RowDragHandleCellContent,
|
|
3794
|
-
|
|
3808
|
+
ya as RowSelectionHeader,
|
|
3795
3809
|
go as SelectedRowsContext,
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3810
|
+
fi as SelectedRowsProvider,
|
|
3811
|
+
Ia as SelectionCell,
|
|
3812
|
+
Co as SelectionCellsContext,
|
|
3813
|
+
Ci as SelectionCellsProvider,
|
|
3814
|
+
ba as StyledBaseTextWidget,
|
|
3815
|
+
Ca as SubtasksWidget,
|
|
3816
|
+
yl as TABLE_CONTAINER_ATTR,
|
|
3817
|
+
wa as TextWidget,
|
|
3818
|
+
Sa as ThumbnailWidget,
|
|
3819
|
+
gn as UNGROUPED_VALUE,
|
|
3820
|
+
Sl as WRAP_MIN_CELL_HEIGHT,
|
|
3821
|
+
Tl as WRAP_MIN_ROW_HEIGHT,
|
|
3822
|
+
Il as allowedGroupByFields,
|
|
3823
|
+
Ta as buildFolderTableRow,
|
|
3824
|
+
Ea as buildGroupId,
|
|
3825
|
+
xa as buildProductTableRow,
|
|
3826
|
+
Ns as buildQueryFilters,
|
|
3827
|
+
ki as buildRowScope,
|
|
3828
|
+
Ei as buildSummaryFormat,
|
|
3829
|
+
va as buildTaskTableRow,
|
|
3830
|
+
Ra as buildVersionTableRow,
|
|
3831
|
+
ka as builtInFieldMappings,
|
|
3818
3832
|
yt as checkColumnVisibility,
|
|
3819
3833
|
hs as clientFilterToQueryFilter,
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3834
|
+
Pa as clipboardError,
|
|
3835
|
+
Da as commentsToText,
|
|
3836
|
+
Rl as convertDateFilterToQueryFilter,
|
|
3837
|
+
Di as createLocalStorageKey,
|
|
3838
|
+
Ai as createMetaRowId,
|
|
3839
|
+
Ml as createRelativeValue,
|
|
3840
|
+
yo as determineLoadingTaskFolders,
|
|
3841
|
+
Qo as ensureAtLeastOneVisibleColumn,
|
|
3842
|
+
ys as expandRelativeDates,
|
|
3843
|
+
Si as formatHasCount,
|
|
3844
|
+
Ti as formatHasPercent,
|
|
3845
|
+
So as generateDummyAttributes,
|
|
3846
|
+
To as generateLoadingRows,
|
|
3847
|
+
bo as getBorderClasses,
|
|
3848
|
+
Aa as getCellBorders,
|
|
3835
3849
|
ye as getCellId,
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3850
|
+
Ma as getCellValue,
|
|
3851
|
+
Oa as getColumnIcon,
|
|
3852
|
+
Fa as getColumnLabel,
|
|
3853
|
+
Io as getColumnSortKey,
|
|
3840
3854
|
Gt as getColumnWidth,
|
|
3841
3855
|
$t as getCommonPinningStyles,
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3856
|
+
Vs as getEntitiesLabelFromScopes,
|
|
3857
|
+
La as getEntityDataById,
|
|
3858
|
+
_a as getEntityPath,
|
|
3845
3859
|
sn as getEntityViewierIds,
|
|
3846
3860
|
Hs as getFilterErrorMessage,
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3861
|
+
As as getFolderIdsToQueryFromExpanded,
|
|
3862
|
+
Na as getLinkColumnId,
|
|
3863
|
+
za as getLinkEntityIdsByColumnId,
|
|
3864
|
+
Ba as getLinkKey,
|
|
3865
|
+
Ua as getLinkLabel,
|
|
3866
|
+
Po as getNameColumnLabel,
|
|
3867
|
+
xs as getReadOnlyLists,
|
|
3868
|
+
Ga as getScopedColumnId,
|
|
3869
|
+
$a as getScopedEntity,
|
|
3870
|
+
Wa as getScopedValue,
|
|
3871
|
+
Ha as getSortableColumnOptions,
|
|
3872
|
+
Ts as getTableFieldOptions,
|
|
3859
3873
|
Yt as getTypeDefaultValue,
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3874
|
+
Va as getValueIdType,
|
|
3875
|
+
$s as hasActiveFilters,
|
|
3876
|
+
es as isAttribGroupable,
|
|
3877
|
+
Ka as isColumnSortable,
|
|
3878
|
+
Lo as isEntityExpandable,
|
|
3865
3879
|
Nt as isEntityRestricted,
|
|
3866
|
-
|
|
3867
|
-
|
|
3880
|
+
qa as isFieldSupported,
|
|
3881
|
+
Ws as isFilterError,
|
|
3868
3882
|
Zt as isGroupId,
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3883
|
+
ja as isLinkEditable,
|
|
3884
|
+
Mi as isMetaRowId,
|
|
3885
|
+
Oi as isMetaRowType,
|
|
3886
|
+
Qa as isMultiSelectAttribute,
|
|
3887
|
+
Ol as isRelativeDateValue,
|
|
3888
|
+
Xa as isSubtasksTSV,
|
|
3889
|
+
Fo as isTargetReadOnly,
|
|
3890
|
+
Ya as linksToTableData,
|
|
3891
|
+
Ja as normalizeColumnId,
|
|
3892
|
+
Za as normalizeColumnIdList,
|
|
3893
|
+
mo as normalizeColumnsConfig,
|
|
3880
3894
|
re as parseCellId,
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3895
|
+
el as parseClipboardText,
|
|
3896
|
+
tl as parseGroupId,
|
|
3897
|
+
Gn as parseMetaRowId,
|
|
3898
|
+
Ao as parseRowId,
|
|
3899
|
+
nl as parseScopedColumnId,
|
|
3900
|
+
ol as processFieldValue,
|
|
3901
|
+
kl as queryFilterToClientFilter,
|
|
3902
|
+
Fl as resolveRelativeValue,
|
|
3903
|
+
$n as sanitizeQueryFilter,
|
|
3904
|
+
sl as sanitizeSubtaskName,
|
|
3905
|
+
vi as scopeHasGroups,
|
|
3906
|
+
Ri as scopeHasRows,
|
|
3907
|
+
hi as scopeIdsToFolders,
|
|
3908
|
+
rl as sortEntityLinksByPath,
|
|
3909
|
+
il as subtaskToTSV,
|
|
3910
|
+
al as subtasksToTSV,
|
|
3911
|
+
Pl as tryMergeDatetimeRange,
|
|
3912
|
+
Dl as tryMergeTextNullness,
|
|
3913
|
+
ll as tsvToSubtasks,
|
|
3900
3914
|
Ut as useCellEditing,
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3915
|
+
Bs as useCheckSelectedCellsVisible,
|
|
3916
|
+
ho as useClipboard,
|
|
3917
|
+
ts as useColumnDragRestriction,
|
|
3918
|
+
Us as useColumnGroupBy,
|
|
3905
3919
|
it as useColumnSettingsContext,
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3920
|
+
Dn as useDetailsPanelEntityContext,
|
|
3921
|
+
gi as useEntitiesMap,
|
|
3922
|
+
bi as useExpandedState,
|
|
3923
|
+
mi as useFetchOverviewData,
|
|
3924
|
+
cl as useGetEntityTypeData,
|
|
3925
|
+
bl as useGetGroupedFields,
|
|
3926
|
+
xl as useGroupCounts,
|
|
3927
|
+
dl as useOptionalProjectTableContext,
|
|
3928
|
+
ul as useOptionalSelectedRowsContext,
|
|
3929
|
+
fl as useOptionalSelectionCellsContext,
|
|
3916
3930
|
tn as useProjectDataContext,
|
|
3917
3931
|
Ve as useProjectTableContext,
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3932
|
+
uo as useProjectTableQueriesContext,
|
|
3933
|
+
pi as useQueryFilters,
|
|
3934
|
+
Ii as useScopedAttributeFields,
|
|
3935
|
+
yi as useSelectedFolders,
|
|
3936
|
+
Oo as useSelectedRowsContext,
|
|
3923
3937
|
Ye as useSelectionCellsContext,
|
|
3924
|
-
|
|
3938
|
+
ml as validateClipboardData
|
|
3925
3939
|
};
|