@ynput/ayon-frontend-shared 0.7.5 → 0.7.6
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 +376 -380
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +26 -26
- package/dist/ProjectTreeTable.es.js +2521 -2510
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +32 -32
- package/dist/Views.es.js +1 -1
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityPickerDialog.es.js +481 -460
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +11 -10
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +250 -247
- package/dist/chunks/MetaWidget.es.js +2 -2
- package/dist/chunks/PlayableIcon.es.js +368 -368
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
- package/dist/chunks/SimpleTable.es.js +301 -296
- package/dist/chunks/Slicer.es.js +418 -410
- package/dist/chunks/TableExportContextInstance.es.js +428 -382
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/components.es.js +1404 -1274
- package/dist/context.es.js +559 -657
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/EntityPickerDialog.d.ts +45 -2
- package/dist/types/ProjectTreeTable.d.ts +119 -17
- package/dist/types/components.d.ts +210 -23
- package/dist/types/context.d.ts +8 -0
- package/package.json +3 -3
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { upperFirst as
|
|
1
|
+
import { jsxs as B, jsx as w, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L, useRef as Y, useCallback as M, useEffect as N, useMemo as E } from "react";
|
|
3
|
+
import { upperFirst as Z } from "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import "react-toastify";
|
|
6
6
|
import "uuid";
|
|
7
|
-
import { bw as
|
|
7
|
+
import { bw as pe } from "./searchTerms.es.js";
|
|
8
8
|
import "axios";
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import { b as
|
|
11
|
-
import { InputText as
|
|
12
|
-
import
|
|
13
|
-
import { E as
|
|
14
|
-
import { a as
|
|
15
|
-
import { ci as
|
|
9
|
+
import { createPortal as fe } from "react-dom";
|
|
10
|
+
import { b as y, H as ee, a as me, S as he, e as ge } from "./SimpleTable.es.js";
|
|
11
|
+
import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as U } from "@ynput/ayon-react-components";
|
|
12
|
+
import S from "styled-components";
|
|
13
|
+
import { E as xe } from "./EmptyPlaceholder.es.js";
|
|
14
|
+
import { a as X, E as Pe } from "./EntityTooltip.es.js";
|
|
15
|
+
import { ci as Te } from "./getUris.es.js";
|
|
16
16
|
import "@module-federation/enhanced/runtime";
|
|
17
17
|
import "@ynput/ayon-addon/host";
|
|
18
|
-
import { y as
|
|
18
|
+
import { z as Ie, y as Ce, o as Fe, ae as Re } from "./TableExportContextInstance.es.js";
|
|
19
19
|
import "semver";
|
|
20
20
|
import "./ContextMenuContextInstance.es.js";
|
|
21
21
|
import "clsx";
|
|
22
22
|
import "react-redux";
|
|
23
23
|
import "react-router-dom";
|
|
24
|
-
import { g as
|
|
25
|
-
import { g as
|
|
24
|
+
import { g as A } from "./getThumbnailUrl.es.js";
|
|
25
|
+
import { g as te } from "./getEntityTypeIcon.es.js";
|
|
26
|
+
import { P as De, a as q } from "./ProjectFoldersContext.es.js";
|
|
26
27
|
const I = {
|
|
27
28
|
folder: ["folder"],
|
|
28
29
|
product: ["folder", "product"],
|
|
@@ -30,68 +31,68 @@ const I = {
|
|
|
30
31
|
representation: ["folder", "product", "version", "representation"],
|
|
31
32
|
task: ["folder", "task"],
|
|
32
33
|
workfile: ["folder", "task", "workfile"]
|
|
33
|
-
},
|
|
34
|
-
const
|
|
34
|
+
}, Oe = (e, s, n) => e.map((t) => {
|
|
35
|
+
const c = n?.find((a) => a.name === t.subType);
|
|
35
36
|
return {
|
|
36
|
-
id:
|
|
37
|
-
name:
|
|
38
|
-
label:
|
|
39
|
-
parents:
|
|
40
|
-
icon:
|
|
41
|
-
iconColor:
|
|
42
|
-
img:
|
|
43
|
-
badge:
|
|
37
|
+
id: t.id,
|
|
38
|
+
name: t.name,
|
|
39
|
+
label: t.label || t.name,
|
|
40
|
+
parents: t.parents,
|
|
41
|
+
icon: c?.icon || te(t.entityType),
|
|
42
|
+
iconColor: c?.color,
|
|
43
|
+
img: t.thumbnail ? A({ projectName: s, ...t.thumbnail }) : null,
|
|
44
|
+
badge: t.taskName,
|
|
44
45
|
subRows: [],
|
|
45
46
|
data: {
|
|
46
|
-
id:
|
|
47
|
-
name:
|
|
48
|
-
label:
|
|
49
|
-
entityType:
|
|
47
|
+
id: t.id,
|
|
48
|
+
name: t.name,
|
|
49
|
+
label: t.label || t.name,
|
|
50
|
+
entityType: t.entityType,
|
|
50
51
|
// a product has no tooltip data of its own, so point at its featured version
|
|
51
|
-
tooltip:
|
|
52
|
+
tooltip: t.entityType === "product" ? t.thumbnail : void 0
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
}),
|
|
55
|
-
const
|
|
55
|
+
}), je = (e, s, n) => e.map((t) => {
|
|
56
|
+
const c = n.find((a) => a.name === t.folderType);
|
|
56
57
|
return {
|
|
57
|
-
id:
|
|
58
|
-
name:
|
|
59
|
-
label:
|
|
60
|
-
path: "/" +
|
|
61
|
-
icon:
|
|
62
|
-
iconColor:
|
|
63
|
-
img:
|
|
64
|
-
projectName:
|
|
58
|
+
id: t.id,
|
|
59
|
+
name: t.name,
|
|
60
|
+
label: t.label || t.name,
|
|
61
|
+
path: "/" + t.path,
|
|
62
|
+
icon: c?.icon || te("folder"),
|
|
63
|
+
iconColor: c?.color,
|
|
64
|
+
img: A({
|
|
65
|
+
projectName: s,
|
|
65
66
|
entityType: "folder",
|
|
66
|
-
entityId:
|
|
67
|
-
thumbnailHash:
|
|
67
|
+
entityId: t.id,
|
|
68
|
+
thumbnailHash: t.thumbnailHash
|
|
68
69
|
}),
|
|
69
70
|
subRows: [],
|
|
70
71
|
data: {
|
|
71
|
-
id:
|
|
72
|
-
name:
|
|
73
|
-
label:
|
|
74
|
-
folderType:
|
|
72
|
+
id: t.id,
|
|
73
|
+
name: t.name,
|
|
74
|
+
label: t.label || t.name,
|
|
75
|
+
folderType: t.folderType,
|
|
75
76
|
entityType: "folder"
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
|
-
}),
|
|
79
|
-
if (!
|
|
79
|
+
}), Ne = (e, s) => {
|
|
80
|
+
if (!e.length || !s.length)
|
|
80
81
|
return {};
|
|
81
|
-
const
|
|
82
|
-
for (const
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
for (const
|
|
86
|
-
let
|
|
87
|
-
for (;
|
|
88
|
-
|
|
82
|
+
const n = /* @__PURE__ */ new Map();
|
|
83
|
+
for (const a of s)
|
|
84
|
+
n.set(a.id, a);
|
|
85
|
+
const t = /* @__PURE__ */ new Set();
|
|
86
|
+
for (const a of e) {
|
|
87
|
+
let i = n.get(a);
|
|
88
|
+
for (; i?.parentId; )
|
|
89
|
+
t.add(i.parentId), i = n.get(i.parentId);
|
|
89
90
|
}
|
|
90
|
-
const
|
|
91
|
-
for (const
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
},
|
|
91
|
+
const c = {};
|
|
92
|
+
for (const a of t)
|
|
93
|
+
c[a] = !0;
|
|
94
|
+
return c;
|
|
95
|
+
}, Ee = S.div`
|
|
95
96
|
position: relative;
|
|
96
97
|
width: 100%;
|
|
97
98
|
padding: 4px;
|
|
@@ -100,441 +101,450 @@ const I = {
|
|
|
100
101
|
width: 100%;
|
|
101
102
|
min-width: 0;
|
|
102
103
|
}
|
|
103
|
-
`,
|
|
104
|
+
`, Se = S(y)`
|
|
104
105
|
position: absolute;
|
|
105
106
|
top: 50%;
|
|
106
107
|
right: 6px;
|
|
107
108
|
transform: translateY(-50%);
|
|
108
|
-
`,
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
109
|
+
`, Me = ({ value: e, onChange: s, onClose: n, className: t }) => /* @__PURE__ */ B(Ee, { className: t, children: [
|
|
110
|
+
/* @__PURE__ */ w(
|
|
111
|
+
be,
|
|
111
112
|
{
|
|
112
|
-
value:
|
|
113
|
-
onChange: (
|
|
113
|
+
value: e,
|
|
114
|
+
onChange: (c) => s(c.target.value),
|
|
114
115
|
placeholder: "Search",
|
|
115
116
|
autoFocus: !0,
|
|
116
|
-
onKeyDown: (
|
|
117
|
-
|
|
117
|
+
onKeyDown: (c) => {
|
|
118
|
+
c.key === "Escape" && n();
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
] }),
|
|
122
|
+
/* @__PURE__ */ w(Se, { icon: "close", variant: "text", onClick: n })
|
|
123
|
+
] }), Le = S(ee)`
|
|
123
124
|
flex-direction: column;
|
|
124
|
-
`,
|
|
125
|
+
`, Be = S(ee)`
|
|
125
126
|
padding: 0;
|
|
126
127
|
border: none;
|
|
127
|
-
`,
|
|
128
|
+
`, Ke = S.span`
|
|
128
129
|
display: flex;
|
|
129
130
|
align-items: center;
|
|
130
|
-
${
|
|
131
|
+
${ve.labelLarge}
|
|
131
132
|
height: 32px;
|
|
132
133
|
padding-left: 4px;
|
|
133
134
|
white-space: nowrap;
|
|
134
135
|
overflow: hidden;
|
|
135
136
|
width: 100%;
|
|
136
|
-
`,
|
|
137
|
+
`, $e = S.div`
|
|
137
138
|
display: flex;
|
|
138
139
|
gap: var(--base-gap-small);
|
|
139
|
-
`,
|
|
140
|
-
title:
|
|
141
|
-
search:
|
|
142
|
-
onSearch:
|
|
143
|
-
buttonLabels:
|
|
140
|
+
`, _e = ({
|
|
141
|
+
title: e,
|
|
142
|
+
search: s,
|
|
143
|
+
onSearch: n,
|
|
144
|
+
buttonLabels: t = {}
|
|
144
145
|
}) => {
|
|
145
|
-
const
|
|
146
|
+
const c = {
|
|
146
147
|
icon: "search",
|
|
147
148
|
tooltip: "Search projects",
|
|
148
|
-
...
|
|
149
|
+
...t.search
|
|
149
150
|
};
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
151
|
+
return /* @__PURE__ */ B(Le, { className: "projects-list-header", children: [
|
|
152
|
+
/* @__PURE__ */ B(Be, { className: "projects-list-header-top", children: [
|
|
153
|
+
/* @__PURE__ */ w(Ke, { children: e }),
|
|
154
|
+
/* @__PURE__ */ w($e, { className: "projects-list-header-buttons", children: /* @__PURE__ */ w(
|
|
155
|
+
y,
|
|
155
156
|
{
|
|
156
|
-
icon:
|
|
157
|
-
"data-tooltip":
|
|
158
|
-
"data-shortcut":
|
|
159
|
-
onClick: () => typeof
|
|
157
|
+
icon: c.icon,
|
|
158
|
+
"data-tooltip": c.tooltip,
|
|
159
|
+
"data-shortcut": c.shortcut,
|
|
160
|
+
onClick: () => typeof s != "string" && n(""),
|
|
160
161
|
className: "search-projects"
|
|
161
162
|
}
|
|
162
163
|
) })
|
|
163
164
|
] }),
|
|
164
|
-
typeof
|
|
165
|
+
typeof s == "string" && /* @__PURE__ */ w(Me, { value: s, onChange: n, onClose: () => n(void 0) })
|
|
165
166
|
] });
|
|
166
|
-
},
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
|
|
171
|
-
}, [
|
|
172
|
-
|
|
173
|
-
if (
|
|
174
|
-
return window.addEventListener("scroll",
|
|
175
|
-
}, [
|
|
176
|
-
const
|
|
177
|
-
(
|
|
178
|
-
const
|
|
179
|
-
return
|
|
167
|
+
}, ze = 150, Ge = (e, s) => {
|
|
168
|
+
const n = X.includes(e) || e === "product", [t, c] = L(null), a = Y(), i = M(() => clearTimeout(a.current), []), o = M(() => {
|
|
169
|
+
i(), c(null);
|
|
170
|
+
}, [i]), p = M(() => {
|
|
171
|
+
i(), a.current = setTimeout(() => c(null), ze);
|
|
172
|
+
}, [i]);
|
|
173
|
+
N(() => o, [o, e]), N(() => {
|
|
174
|
+
if (t)
|
|
175
|
+
return window.addEventListener("scroll", o, !0), () => window.removeEventListener("scroll", o, !0);
|
|
176
|
+
}, [t, o]);
|
|
177
|
+
const m = M(
|
|
178
|
+
(d) => {
|
|
179
|
+
const r = s?.find((u) => u.id === d)?.data?.tooltip || { entityType: e, entityId: d };
|
|
180
|
+
return X.includes(r.entityType) && r.entityId ? r : null;
|
|
180
181
|
},
|
|
181
|
-
[
|
|
182
|
-
), h =
|
|
183
|
-
(
|
|
184
|
-
if (!
|
|
185
|
-
const g =
|
|
186
|
-
if (!g || !
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
if (!
|
|
190
|
-
const { left: k, top:
|
|
191
|
-
|
|
182
|
+
[s, e]
|
|
183
|
+
), h = M(
|
|
184
|
+
(d) => {
|
|
185
|
+
if (!n) return;
|
|
186
|
+
const g = d.currentTarget.id, r = d.target.closest(".image");
|
|
187
|
+
if (!g || !r) return o();
|
|
188
|
+
if (t?.rowId === g) return i();
|
|
189
|
+
const u = m(g);
|
|
190
|
+
if (!u) return o();
|
|
191
|
+
const { left: k, top: f, width: T } = r.getBoundingClientRect();
|
|
192
|
+
i(), c({ ...u, rowId: g, pos: { left: k + T / 2, top: f } });
|
|
192
193
|
},
|
|
193
|
-
[
|
|
194
|
+
[n, t, o, i, m]
|
|
194
195
|
);
|
|
195
196
|
return {
|
|
196
|
-
hovered:
|
|
197
|
+
hovered: n ? t : null,
|
|
197
198
|
onMouseOver: h,
|
|
198
|
-
onMouseLeave:
|
|
199
|
-
tooltipProps: { onMouseEnter:
|
|
199
|
+
onMouseLeave: p,
|
|
200
|
+
tooltipProps: { onMouseEnter: i, onMouseLeave: o }
|
|
200
201
|
};
|
|
201
|
-
},
|
|
202
|
-
entityType:
|
|
203
|
-
projectName:
|
|
204
|
-
tableData:
|
|
205
|
-
isLoading:
|
|
206
|
-
error:
|
|
207
|
-
search:
|
|
208
|
-
onSearch:
|
|
209
|
-
isFolderHierarchy:
|
|
210
|
-
isMultiSelect:
|
|
211
|
-
onRowSubmit:
|
|
202
|
+
}, We = ({
|
|
203
|
+
entityType: e,
|
|
204
|
+
projectName: s,
|
|
205
|
+
tableData: n,
|
|
206
|
+
isLoading: t = !1,
|
|
207
|
+
error: c,
|
|
208
|
+
search: a,
|
|
209
|
+
onSearch: i,
|
|
210
|
+
isFolderHierarchy: o,
|
|
211
|
+
isMultiSelect: p,
|
|
212
|
+
onRowSubmit: m,
|
|
212
213
|
onScrollBottom: h
|
|
213
214
|
}) => {
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
|
|
215
|
+
const d = Ge(e, n), g = (r) => {
|
|
216
|
+
r.preventDefault();
|
|
217
|
+
const u = r.currentTarget.id, k = n.find((f) => f.id === u);
|
|
218
|
+
u && !k?.isDisabled && m?.(u);
|
|
218
219
|
};
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
|
|
220
|
+
return /* @__PURE__ */ B(me, { children: [
|
|
221
|
+
/* @__PURE__ */ w(
|
|
222
|
+
_e,
|
|
222
223
|
{
|
|
223
|
-
search:
|
|
224
|
-
onSearch:
|
|
225
|
-
title:
|
|
224
|
+
search: a,
|
|
225
|
+
onSearch: i,
|
|
226
|
+
title: Z(e) + "s"
|
|
226
227
|
}
|
|
227
228
|
),
|
|
228
|
-
!
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
|
|
229
|
+
!t && !n?.length && /* @__PURE__ */ w(xe, { message: `No ${e}s found.`, error: c }),
|
|
230
|
+
/* @__PURE__ */ w(
|
|
231
|
+
he,
|
|
231
232
|
{
|
|
232
|
-
data:
|
|
233
|
-
isLoading:
|
|
234
|
-
isExpandable:
|
|
233
|
+
data: n,
|
|
234
|
+
isLoading: t,
|
|
235
|
+
isExpandable: o,
|
|
235
236
|
rowHeight: 34,
|
|
236
237
|
imgRatio: 16 / 9,
|
|
237
238
|
imgPosition: "end",
|
|
238
|
-
isMultiSelect:
|
|
239
|
+
isMultiSelect: p,
|
|
239
240
|
onScrollBottom: h,
|
|
240
241
|
pt: {
|
|
241
242
|
row: {
|
|
242
243
|
onDoubleClick: g,
|
|
243
|
-
onMouseOver:
|
|
244
|
-
onMouseLeave:
|
|
244
|
+
onMouseOver: d.onMouseOver,
|
|
245
|
+
onMouseLeave: d.onMouseLeave
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
),
|
|
249
|
-
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
|
|
250
|
+
d.hovered && fe(
|
|
251
|
+
/* @__PURE__ */ w(
|
|
252
|
+
Pe,
|
|
252
253
|
{
|
|
253
|
-
entityType:
|
|
254
|
-
entityId:
|
|
255
|
-
projectName:
|
|
256
|
-
pos:
|
|
257
|
-
...
|
|
254
|
+
entityType: d.hovered.entityType,
|
|
255
|
+
entityId: d.hovered.entityId,
|
|
256
|
+
projectName: s,
|
|
257
|
+
pos: d.hovered.pos,
|
|
258
|
+
...d.tooltipProps
|
|
258
259
|
}
|
|
259
260
|
),
|
|
260
261
|
document.body
|
|
261
262
|
)
|
|
262
263
|
] });
|
|
263
|
-
},
|
|
264
|
-
projectName:
|
|
265
|
-
folderTypes:
|
|
266
|
-
includeColors:
|
|
267
|
-
includeThumbnails:
|
|
264
|
+
}, Ye = ({
|
|
265
|
+
projectName: e,
|
|
266
|
+
folderTypes: s,
|
|
267
|
+
includeColors: n = !1,
|
|
268
|
+
includeThumbnails: t = !1
|
|
268
269
|
}) => {
|
|
269
|
-
const { folders:
|
|
270
|
-
projectName:
|
|
270
|
+
const { folders: c, isLoading: a } = Ie(), i = (r) => s.find((k) => k.name === r)?.icon || "folder", o = (r) => n ? s.find((k) => k.name === r)?.color : void 0, p = (r) => !t || !e ? null : A({
|
|
271
|
+
projectName: e,
|
|
271
272
|
entityType: "folder",
|
|
272
|
-
entityId:
|
|
273
|
-
thumbnailHash:
|
|
274
|
-
}),
|
|
275
|
-
id:
|
|
276
|
-
parentId:
|
|
277
|
-
name:
|
|
278
|
-
label:
|
|
279
|
-
icon:
|
|
280
|
-
iconColor:
|
|
281
|
-
img:
|
|
273
|
+
entityId: r.id,
|
|
274
|
+
thumbnailHash: r.thumbnailHash
|
|
275
|
+
}), m = (r) => ({
|
|
276
|
+
id: r.id,
|
|
277
|
+
parentId: r.parentId,
|
|
278
|
+
name: r.name,
|
|
279
|
+
label: r.label || r.name,
|
|
280
|
+
icon: i(r.folderType),
|
|
281
|
+
iconColor: o(r.folderType),
|
|
282
|
+
img: p(r),
|
|
282
283
|
data: {
|
|
283
|
-
id:
|
|
284
|
-
name:
|
|
285
|
-
label:
|
|
286
|
-
subType:
|
|
287
|
-
path:
|
|
288
|
-
parents:
|
|
284
|
+
id: r.id,
|
|
285
|
+
name: r.name,
|
|
286
|
+
label: r.label || r.name,
|
|
287
|
+
subType: r.folderType,
|
|
288
|
+
path: r.path,
|
|
289
|
+
parents: r.parents
|
|
289
290
|
}
|
|
290
|
-
}), h = (
|
|
291
|
-
const
|
|
292
|
-
(
|
|
291
|
+
}), h = (r, u = "id", k = "parentId") => {
|
|
292
|
+
const f = /* @__PURE__ */ new Map(), T = [], D = [...r].sort(
|
|
293
|
+
(b, x) => (b.label || b.name).localeCompare(x.label || x.name)
|
|
293
294
|
);
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
...
|
|
295
|
+
for (let b = 0; b < D.length; b++) {
|
|
296
|
+
const x = D[b], C = x[u], P = {
|
|
297
|
+
...m(x),
|
|
297
298
|
subRows: []
|
|
298
299
|
};
|
|
299
|
-
|
|
300
|
+
f.set(C, P);
|
|
300
301
|
}
|
|
301
|
-
for (let
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
|
|
302
|
+
for (let b = 0; b < D.length; b++) {
|
|
303
|
+
const x = D[b], C = x[u], P = x[k], R = f.get(C);
|
|
304
|
+
if (P) {
|
|
305
|
+
const K = f.get(P);
|
|
306
|
+
K && K.subRows.push(R);
|
|
306
307
|
} else
|
|
307
|
-
|
|
308
|
+
T.push(R);
|
|
308
309
|
}
|
|
309
|
-
const
|
|
310
|
-
for (const
|
|
311
|
-
(!
|
|
312
|
-
for (;
|
|
313
|
-
const
|
|
314
|
-
for (const C of
|
|
315
|
-
C.parents =
|
|
310
|
+
const F = [];
|
|
311
|
+
for (const b of f.values())
|
|
312
|
+
(!b.parentId || !f.has(b.parentId)) && F.push(b);
|
|
313
|
+
for (; F.length; ) {
|
|
314
|
+
const b = F.pop(), x = [...b.parents ?? [], b.label || ""];
|
|
315
|
+
for (const C of b.subRows)
|
|
316
|
+
C.parents = x, F.push(C);
|
|
316
317
|
}
|
|
317
|
-
return
|
|
318
|
-
},
|
|
318
|
+
return T;
|
|
319
|
+
}, d = E(() => !c.length || a ? [] : h(c), [c, s, a, t, e]), g = M(async () => d, [d]);
|
|
319
320
|
return {
|
|
320
|
-
data:
|
|
321
|
-
folders:
|
|
321
|
+
data: d,
|
|
322
|
+
folders: c,
|
|
322
323
|
getData: g,
|
|
323
|
-
isFetching:
|
|
324
|
+
isFetching: a
|
|
324
325
|
};
|
|
325
|
-
},
|
|
326
|
-
projectName:
|
|
327
|
-
entityType:
|
|
328
|
-
search:
|
|
329
|
-
selection:
|
|
330
|
-
reviewablesOnly:
|
|
331
|
-
includeTask:
|
|
326
|
+
}, Ae = ({
|
|
327
|
+
projectName: e,
|
|
328
|
+
entityType: s,
|
|
329
|
+
search: n,
|
|
330
|
+
selection: t,
|
|
331
|
+
reviewablesOnly: c,
|
|
332
|
+
includeTask: a
|
|
332
333
|
}) => {
|
|
333
|
-
const
|
|
334
|
-
data:
|
|
335
|
-
folders:
|
|
334
|
+
const i = I[s] || [], o = Ce(), {
|
|
335
|
+
data: p,
|
|
336
|
+
folders: m,
|
|
336
337
|
isFetching: h
|
|
337
|
-
} =
|
|
338
|
-
projectName:
|
|
339
|
-
folderTypes:
|
|
338
|
+
} = Ye({
|
|
339
|
+
projectName: e,
|
|
340
|
+
folderTypes: o?.folderTypes || [],
|
|
340
341
|
includeColors: !0,
|
|
341
342
|
includeThumbnails: !0
|
|
342
|
-
}),
|
|
343
|
-
() =>
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
(
|
|
343
|
+
}), d = E(
|
|
344
|
+
() => pe(
|
|
345
|
+
m,
|
|
346
|
+
n.folder ?? "",
|
|
347
|
+
(x) => [x.name, x.label, x.path].join(" ")
|
|
347
348
|
),
|
|
348
|
-
[
|
|
349
|
+
[m, n.folder]
|
|
349
350
|
), g = E(
|
|
350
|
-
() =>
|
|
351
|
-
[
|
|
352
|
-
),
|
|
353
|
-
data:
|
|
351
|
+
() => n.folder ? je(d, e, o?.folderTypes || []) : p,
|
|
352
|
+
[d, p, n.folder, o, e]
|
|
353
|
+
), r = {
|
|
354
|
+
data: d,
|
|
354
355
|
table: g,
|
|
355
356
|
isLoading: h
|
|
356
|
-
},
|
|
357
|
-
const
|
|
358
|
-
return
|
|
359
|
-
}, k = { includeTask:
|
|
360
|
-
|
|
357
|
+
}, u = (x, C = []) => {
|
|
358
|
+
const P = t[x];
|
|
359
|
+
return P?.length > 0 ? P : C ? C.map((R) => R.id) : void 0;
|
|
360
|
+
}, k = { includeTask: a, hasReviewables: c || void 0 }, f = _(
|
|
361
|
+
e,
|
|
361
362
|
"task",
|
|
362
|
-
|
|
363
|
-
!
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
),
|
|
367
|
-
|
|
363
|
+
n.task,
|
|
364
|
+
!i.includes("task"),
|
|
365
|
+
u(I.task[I.task.length - 2], d),
|
|
366
|
+
o?.taskTypes
|
|
367
|
+
), T = _(
|
|
368
|
+
e,
|
|
368
369
|
"product",
|
|
369
|
-
|
|
370
|
-
!
|
|
371
|
-
|
|
370
|
+
n.product,
|
|
371
|
+
!i.includes("product"),
|
|
372
|
+
u(
|
|
372
373
|
I.product[I.product.length - 2],
|
|
373
|
-
|
|
374
|
+
r.data
|
|
374
375
|
),
|
|
375
|
-
|
|
376
|
+
o?.productTypes,
|
|
376
377
|
k
|
|
377
|
-
),
|
|
378
|
-
|
|
378
|
+
), D = _(
|
|
379
|
+
e,
|
|
379
380
|
"version",
|
|
380
|
-
|
|
381
|
-
!
|
|
382
|
-
|
|
381
|
+
n.version,
|
|
382
|
+
!i.includes("version"),
|
|
383
|
+
u(
|
|
383
384
|
I.version[I.version.length - 2],
|
|
384
|
-
|
|
385
|
+
T.data
|
|
385
386
|
),
|
|
386
387
|
void 0,
|
|
387
388
|
k
|
|
388
|
-
),
|
|
389
|
-
|
|
389
|
+
), F = _(
|
|
390
|
+
e,
|
|
390
391
|
"representation",
|
|
391
|
-
|
|
392
|
-
!
|
|
393
|
-
|
|
392
|
+
n.representation,
|
|
393
|
+
!i.includes("representation"),
|
|
394
|
+
u(
|
|
394
395
|
I.representation[I.representation.length - 2],
|
|
395
|
-
|
|
396
|
+
D.data
|
|
396
397
|
)
|
|
397
|
-
),
|
|
398
|
-
|
|
398
|
+
), b = _(
|
|
399
|
+
e,
|
|
399
400
|
"workfile",
|
|
400
|
-
|
|
401
|
-
!
|
|
402
|
-
|
|
401
|
+
n.workfile,
|
|
402
|
+
!i.includes("workfile"),
|
|
403
|
+
u(
|
|
403
404
|
I.workfile[I.workfile.length - 2],
|
|
404
|
-
|
|
405
|
+
f.data
|
|
405
406
|
)
|
|
406
407
|
);
|
|
407
408
|
return {
|
|
408
|
-
folder:
|
|
409
|
-
task:
|
|
410
|
-
product:
|
|
411
|
-
version:
|
|
412
|
-
representation:
|
|
413
|
-
workfile:
|
|
409
|
+
folder: r,
|
|
410
|
+
task: f,
|
|
411
|
+
product: T,
|
|
412
|
+
version: D,
|
|
413
|
+
representation: F,
|
|
414
|
+
workfile: b
|
|
414
415
|
};
|
|
415
|
-
},
|
|
416
|
-
const { data:
|
|
416
|
+
}, _ = (e, s, n, t, c, a, { includeTask: i, hasReviewables: o } = {}) => {
|
|
417
|
+
const { data: p, isFetching: m, hasNextPage: h, fetchNextPage: d, isFetchingNextPage: g, error: r } = Te(
|
|
417
418
|
{
|
|
418
|
-
projectName:
|
|
419
|
-
entityType:
|
|
420
|
-
search:
|
|
421
|
-
parentIds:
|
|
422
|
-
hasReviewables:
|
|
423
|
-
includeTask:
|
|
419
|
+
projectName: e,
|
|
420
|
+
entityType: s,
|
|
421
|
+
search: n,
|
|
422
|
+
parentIds: c,
|
|
423
|
+
hasReviewables: o,
|
|
424
|
+
includeTask: i
|
|
424
425
|
},
|
|
425
426
|
// skip if this is folder hierarchy (we already have the folders) or if we're waiting for parent selection
|
|
426
427
|
{
|
|
427
|
-
skip:
|
|
428
|
+
skip: t
|
|
428
429
|
}
|
|
429
|
-
),
|
|
430
|
-
() =>
|
|
431
|
-
[
|
|
430
|
+
), u = E(() => p?.pages.flatMap((f) => f.entities) || [], [p]), k = E(
|
|
431
|
+
() => Oe(u, e, a),
|
|
432
|
+
[u, e, a]
|
|
432
433
|
);
|
|
433
434
|
return {
|
|
434
|
-
data:
|
|
435
|
+
data: u,
|
|
435
436
|
table: k,
|
|
436
|
-
isLoading:
|
|
437
|
+
isLoading: m,
|
|
437
438
|
isFetchingNextPage: g,
|
|
438
439
|
hasNextPage: h,
|
|
439
|
-
fetchNextPage:
|
|
440
|
-
error:
|
|
440
|
+
fetchNextPage: d,
|
|
441
|
+
error: r
|
|
441
442
|
};
|
|
442
|
-
},
|
|
443
|
-
foldersSelection:
|
|
444
|
-
foldersData:
|
|
443
|
+
}, Ve = ({
|
|
444
|
+
foldersSelection: e,
|
|
445
|
+
foldersData: s
|
|
445
446
|
}) => {
|
|
446
|
-
const [
|
|
447
|
-
return
|
|
448
|
-
if (
|
|
447
|
+
const [n, t] = L({}), c = E(() => e ? Object.keys(e).filter((p) => e[p] === !0) : [], [e]), a = E(() => s?.data, [s?.data]), [i, o] = L(!1);
|
|
448
|
+
return N(() => {
|
|
449
|
+
if (c.length === 0 || !a?.length || i)
|
|
449
450
|
return;
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
}, [
|
|
453
|
-
},
|
|
454
|
-
entityHierarchy:
|
|
455
|
-
entityData:
|
|
456
|
-
rowSelection:
|
|
457
|
-
setEntityRowSelection:
|
|
451
|
+
const p = Ne(c, a);
|
|
452
|
+
t(p), o(!0);
|
|
453
|
+
}, [c, a, o, i]), [n, t];
|
|
454
|
+
}, Qe = ({
|
|
455
|
+
entityHierarchy: e,
|
|
456
|
+
entityData: s,
|
|
457
|
+
rowSelection: n,
|
|
458
|
+
setEntityRowSelection: t
|
|
458
459
|
}) => {
|
|
459
|
-
const
|
|
460
|
+
const c = Y({
|
|
460
461
|
selectedNames: {},
|
|
461
462
|
pendingNameMatches: {},
|
|
462
463
|
skipDetection: !1,
|
|
463
464
|
prevParentKeys: {}
|
|
464
465
|
});
|
|
465
|
-
|
|
466
|
-
const
|
|
467
|
-
for (let
|
|
468
|
-
const
|
|
469
|
-
|
|
466
|
+
N(() => {
|
|
467
|
+
const a = c.current, i = {};
|
|
468
|
+
for (let o = 0; o < e.length - 1; o++) {
|
|
469
|
+
const p = e[o], m = n[p] || {};
|
|
470
|
+
i[p] = Object.keys(m).filter((h) => m[h]).sort().join(",");
|
|
470
471
|
}
|
|
471
|
-
if (
|
|
472
|
-
|
|
472
|
+
if (a.skipDetection) {
|
|
473
|
+
a.prevParentKeys = i, a.skipDetection = !1;
|
|
473
474
|
return;
|
|
474
475
|
}
|
|
475
|
-
for (let
|
|
476
|
-
const
|
|
477
|
-
if (
|
|
478
|
-
if (
|
|
479
|
-
for (let
|
|
480
|
-
|
|
476
|
+
for (let o = 0; o < e.length - 1; o++) {
|
|
477
|
+
const p = e[o], m = a.prevParentKeys[p];
|
|
478
|
+
if (m !== void 0 && m !== i[p]) {
|
|
479
|
+
if (i[p] === "")
|
|
480
|
+
for (let d = o + 1; d < e.length; d++)
|
|
481
|
+
a.skipDetection = !0, t({}, e[d]);
|
|
481
482
|
else
|
|
482
|
-
for (let
|
|
483
|
-
const g =
|
|
484
|
-
|
|
483
|
+
for (let d = o + 1; d < e.length; d++) {
|
|
484
|
+
const g = e[d], r = a.selectedNames[g];
|
|
485
|
+
r?.length && (a.pendingNameMatches[g] = new Set(r));
|
|
485
486
|
}
|
|
486
487
|
break;
|
|
487
488
|
}
|
|
488
489
|
}
|
|
489
|
-
|
|
490
|
-
}, [
|
|
491
|
-
const
|
|
492
|
-
for (const
|
|
493
|
-
const
|
|
494
|
-
|
|
490
|
+
a.prevParentKeys = i;
|
|
491
|
+
}, [e, n]), N(() => {
|
|
492
|
+
const a = c.current;
|
|
493
|
+
for (const i of e) {
|
|
494
|
+
const o = n[i] || {}, p = new Set(Object.keys(o).filter((h) => o[h])), m = s[i]?.data || [];
|
|
495
|
+
a.selectedNames[i] = m.filter((h) => p.has(h.id)).map((h) => h.name);
|
|
495
496
|
}
|
|
496
|
-
}, [
|
|
497
|
-
const
|
|
498
|
-
for (const
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
(
|
|
497
|
+
}, [e, n, s]), N(() => {
|
|
498
|
+
const a = c.current, i = /* @__PURE__ */ new Set();
|
|
499
|
+
for (const o of e) {
|
|
500
|
+
const p = a.pendingNameMatches[o];
|
|
501
|
+
if (!p?.size) continue;
|
|
502
|
+
const m = e.indexOf(o);
|
|
503
|
+
if (e.slice(0, m).some(
|
|
504
|
+
(u) => a.pendingNameMatches[u]?.size || i.has(u)
|
|
504
505
|
)) continue;
|
|
505
|
-
const { isLoading:
|
|
506
|
-
if (
|
|
507
|
-
if (delete
|
|
508
|
-
|
|
506
|
+
const { isLoading: d, data: g } = s[o];
|
|
507
|
+
if (d) continue;
|
|
508
|
+
if (delete a.pendingNameMatches[o], i.add(o), !g?.length) {
|
|
509
|
+
a.skipDetection = !0, t({}, o);
|
|
509
510
|
continue;
|
|
510
511
|
}
|
|
511
|
-
const
|
|
512
|
-
for (const
|
|
513
|
-
|
|
514
|
-
|
|
512
|
+
const r = {};
|
|
513
|
+
for (const u of g)
|
|
514
|
+
p.has(u.name) && (r[u.id] = !0);
|
|
515
|
+
a.skipDetection = !0, t(r, o);
|
|
515
516
|
}
|
|
516
|
-
}, [
|
|
517
|
-
},
|
|
518
|
-
entityHierarchy:
|
|
519
|
-
entityData:
|
|
520
|
-
rowSelection:
|
|
521
|
-
setEntityRowSelection:
|
|
517
|
+
}, [e, s, t]);
|
|
518
|
+
}, J = (e = {}) => Object.keys(e).filter((s) => e[s]), He = ({
|
|
519
|
+
entityHierarchy: e,
|
|
520
|
+
entityData: s,
|
|
521
|
+
rowSelection: n,
|
|
522
|
+
setEntityRowSelection: t,
|
|
523
|
+
initialSelection: c
|
|
522
524
|
}) => {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
525
|
+
const a = Y(null);
|
|
526
|
+
N(() => {
|
|
527
|
+
const i = a.current ??= Object.fromEntries(
|
|
528
|
+
e.map((o) => [o, new Set(J(c?.[o]))])
|
|
529
|
+
);
|
|
530
|
+
for (const o of e) {
|
|
531
|
+
if (o === "folder") continue;
|
|
532
|
+
const { data: p, isLoading: m } = s[o];
|
|
533
|
+
if (m) continue;
|
|
534
|
+
const h = n[o] || {}, d = J(h), g = new Set(p.map((f) => f.id)), r = i[o] ?? /* @__PURE__ */ new Set();
|
|
535
|
+
for (const f of r)
|
|
536
|
+
(g.has(f) || !h[f]) && r.delete(f);
|
|
537
|
+
if (!d.length) continue;
|
|
538
|
+
const u = e.slice(0, e.indexOf(o) + 1).some((f) => s[f].hasNextPage || s[f].isFetchingNextPage), k = d.filter(
|
|
539
|
+
(f) => g.has(f) || r.has(f) && u
|
|
540
|
+
);
|
|
541
|
+
k.length !== d.length && t(
|
|
542
|
+
Object.fromEntries(k.map((f) => [f, !0])),
|
|
543
|
+
o
|
|
534
544
|
);
|
|
535
545
|
}
|
|
536
|
-
}, [
|
|
537
|
-
},
|
|
546
|
+
}, [e, s, n, t, c]);
|
|
547
|
+
}, Ue = 600, Xe = S.div`
|
|
538
548
|
display: grid;
|
|
539
549
|
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
|
540
550
|
gap: var(--base-gap-large);
|
|
@@ -551,122 +561,132 @@ const I = {
|
|
|
551
561
|
}
|
|
552
562
|
}
|
|
553
563
|
}
|
|
554
|
-
`,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
`, It = (e) => {
|
|
565
|
+
const s = Fe(), n = Re(), t = /* @__PURE__ */ w(qe, { ...e });
|
|
566
|
+
return s?.projectName !== e.projectName ? /* @__PURE__ */ w(De, { projectName: e.projectName, children: /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(q, { projectName: e.projectName, children: t }) : t;
|
|
567
|
+
}, qe = ({
|
|
568
|
+
projectName: e,
|
|
569
|
+
entityType: s,
|
|
570
|
+
initialSelection: n,
|
|
571
|
+
isMultiSelect: t,
|
|
572
|
+
onSubmit: c,
|
|
573
|
+
showMoveToRoot: a,
|
|
574
|
+
onMoveToRoot: i,
|
|
575
|
+
disabledIds: o = [],
|
|
576
|
+
disabledMessage: p = "Cannot select this item",
|
|
577
|
+
getDisabledMessage: m,
|
|
565
578
|
reviewableRequired: h,
|
|
566
|
-
showReviewablesSwitch:
|
|
579
|
+
showReviewablesSwitch: d,
|
|
567
580
|
defaultReviewablesOnly: g = !1,
|
|
568
|
-
showTaskNames:
|
|
569
|
-
isLoading:
|
|
581
|
+
showTaskNames: r,
|
|
582
|
+
isLoading: u,
|
|
570
583
|
...k
|
|
571
584
|
}) => {
|
|
572
|
-
const
|
|
573
|
-
folder:
|
|
574
|
-
task:
|
|
575
|
-
product:
|
|
576
|
-
version:
|
|
577
|
-
representation:
|
|
578
|
-
workfile:
|
|
579
|
-
}, [
|
|
580
|
-
|
|
585
|
+
const f = {
|
|
586
|
+
folder: n?.folder || {},
|
|
587
|
+
task: n?.task || {},
|
|
588
|
+
product: n?.product || {},
|
|
589
|
+
version: n?.version || {},
|
|
590
|
+
representation: n?.representation || {},
|
|
591
|
+
workfile: n?.workfile || {}
|
|
592
|
+
}, [T, D] = L(f), F = (l, v) => {
|
|
593
|
+
D((O) => ({
|
|
581
594
|
...O,
|
|
582
|
-
[
|
|
595
|
+
[v]: l
|
|
583
596
|
}));
|
|
584
|
-
}, [
|
|
597
|
+
}, [b, x] = L({
|
|
585
598
|
folder: void 0,
|
|
586
599
|
task: void 0,
|
|
587
600
|
product: void 0,
|
|
588
601
|
version: void 0,
|
|
589
602
|
representation: void 0,
|
|
590
603
|
workfile: void 0
|
|
591
|
-
}), C = (
|
|
592
|
-
|
|
604
|
+
}), C = (l, v) => {
|
|
605
|
+
x((O) => ({
|
|
593
606
|
...O,
|
|
594
|
-
[
|
|
607
|
+
[v]: l
|
|
595
608
|
}));
|
|
596
|
-
},
|
|
597
|
-
Object.entries(
|
|
598
|
-
|
|
599
|
-
Object.keys(
|
|
609
|
+
}, P = Object.fromEntries(
|
|
610
|
+
Object.entries(T).map(([l, v]) => [
|
|
611
|
+
l,
|
|
612
|
+
Object.keys(v).filter((O) => v[O])
|
|
600
613
|
])
|
|
601
|
-
), R = I[
|
|
602
|
-
entityType:
|
|
603
|
-
projectName:
|
|
604
|
-
search:
|
|
605
|
-
selection:
|
|
606
|
-
reviewablesOnly:
|
|
607
|
-
includeTask:
|
|
608
|
-
}),
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
}, [
|
|
612
|
-
foldersSelection:
|
|
613
|
-
foldersData:
|
|
614
|
+
), R = I[s], K = !!d && R.includes("product"), [z, oe] = L(g), j = Ae({
|
|
615
|
+
entityType: s,
|
|
616
|
+
projectName: e,
|
|
617
|
+
search: b,
|
|
618
|
+
selection: P,
|
|
619
|
+
reviewablesOnly: K && z,
|
|
620
|
+
includeTask: r
|
|
621
|
+
}), G = h && s === "version" ? j.version.data.filter((l) => "hasReviewables" in l && l.hasReviewables === !1).map((l) => l.id) : [], W = G.length > 0 ? Array.from(/* @__PURE__ */ new Set([...o, ...G])) : o, ne = (l) => G.includes(l) ? "Version has no reviewables" : m?.(l), se = (l) => {
|
|
622
|
+
const v = j[l];
|
|
623
|
+
v?.hasNextPage && !v.isFetchingNextPage && v.fetchNextPage?.();
|
|
624
|
+
}, [re, ae] = Ve({
|
|
625
|
+
foldersSelection: f.folder,
|
|
626
|
+
foldersData: j.folder
|
|
614
627
|
});
|
|
615
|
-
|
|
628
|
+
Qe({
|
|
616
629
|
entityHierarchy: R,
|
|
617
|
-
entityData:
|
|
618
|
-
rowSelection:
|
|
619
|
-
setEntityRowSelection:
|
|
620
|
-
}),
|
|
630
|
+
entityData: j,
|
|
631
|
+
rowSelection: T,
|
|
632
|
+
setEntityRowSelection: F
|
|
633
|
+
}), He({
|
|
621
634
|
entityHierarchy: R,
|
|
622
|
-
entityData:
|
|
623
|
-
rowSelection:
|
|
624
|
-
setEntityRowSelection:
|
|
635
|
+
entityData: j,
|
|
636
|
+
rowSelection: T,
|
|
637
|
+
setEntityRowSelection: F,
|
|
638
|
+
initialSelection: n
|
|
625
639
|
});
|
|
626
|
-
const
|
|
627
|
-
const
|
|
628
|
-
...
|
|
629
|
-
isDisabled:
|
|
630
|
-
disabledMessage:
|
|
640
|
+
const V = (l, v, O) => {
|
|
641
|
+
const $ = O || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, H = {
|
|
642
|
+
...l,
|
|
643
|
+
isDisabled: $,
|
|
644
|
+
disabledMessage: ce
|
|
631
645
|
};
|
|
632
|
-
return
|
|
633
|
-
(
|
|
634
|
-
)),
|
|
635
|
-
},
|
|
636
|
-
|
|
646
|
+
return l.subRows && l.subRows.length > 0 && (H.subRows = l.subRows.map(
|
|
647
|
+
(de) => V(de, v, $)
|
|
648
|
+
)), H;
|
|
649
|
+
}, ie = (l) => !W || W.length === 0 ? l : l.map((v) => V(v, W, !1)), Q = (l) => {
|
|
650
|
+
const v = j[s].data;
|
|
651
|
+
c(
|
|
652
|
+
l,
|
|
653
|
+
l.map((O) => v.find(($) => $.id === O))
|
|
654
|
+
);
|
|
655
|
+
}, le = () => {
|
|
656
|
+
if (!P[s]?.length)
|
|
637
657
|
return;
|
|
638
|
-
const
|
|
639
|
-
|
|
658
|
+
const l = t ? P[s] : P[s].slice(0, 1);
|
|
659
|
+
Q(l);
|
|
640
660
|
};
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
|
|
661
|
+
return /* @__PURE__ */ B(
|
|
662
|
+
we,
|
|
643
663
|
{
|
|
644
664
|
...k,
|
|
645
665
|
className: "entity-picker-dialog block-shortcuts",
|
|
646
|
-
header: `Select ${
|
|
666
|
+
header: `Select ${Z(s)}`,
|
|
647
667
|
isOpen: !0,
|
|
648
668
|
size: "full",
|
|
649
|
-
style: { height: "80vh", maxWidth: R.length *
|
|
650
|
-
footer: /* @__PURE__ */
|
|
651
|
-
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
|
|
669
|
+
style: { height: "80vh", maxWidth: R.length * Ue },
|
|
670
|
+
footer: /* @__PURE__ */ B(ue, { children: [
|
|
671
|
+
a && i && /* @__PURE__ */ w(U, { label: "Move to root", variant: "text", onClick: i }),
|
|
672
|
+
/* @__PURE__ */ w(
|
|
673
|
+
U,
|
|
654
674
|
{
|
|
655
|
-
label: `Select ${
|
|
675
|
+
label: `Select ${s}${t ? "s" : ""}`,
|
|
656
676
|
variant: "filled",
|
|
657
|
-
disabled: !
|
|
658
|
-
loading:
|
|
659
|
-
onClick:
|
|
677
|
+
disabled: !P[s]?.length || u,
|
|
678
|
+
loading: u,
|
|
679
|
+
onClick: le
|
|
660
680
|
}
|
|
661
681
|
)
|
|
662
682
|
] }),
|
|
663
683
|
children: [
|
|
664
|
-
|
|
665
|
-
|
|
684
|
+
K && /* @__PURE__ */ w(
|
|
685
|
+
ke,
|
|
666
686
|
{
|
|
667
687
|
label: "Show reviewables only",
|
|
668
|
-
value:
|
|
669
|
-
onClick: () =>
|
|
688
|
+
value: z,
|
|
689
|
+
onClick: () => oe(!z),
|
|
670
690
|
style: {
|
|
671
691
|
width: "fit-content",
|
|
672
692
|
marginLeft: "auto",
|
|
@@ -674,37 +694,38 @@ const I = {
|
|
|
674
694
|
}
|
|
675
695
|
}
|
|
676
696
|
),
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
|
|
697
|
+
/* @__PURE__ */ w(Xe, { children: R.map((l) => /* @__PURE__ */ w(
|
|
698
|
+
ge,
|
|
679
699
|
{
|
|
680
|
-
rowSelection:
|
|
681
|
-
onRowSelectionChange: (
|
|
682
|
-
expanded:
|
|
683
|
-
setExpanded:
|
|
684
|
-
children: /* @__PURE__ */
|
|
685
|
-
|
|
700
|
+
rowSelection: T[l] || {},
|
|
701
|
+
onRowSelectionChange: (v) => F(v, l),
|
|
702
|
+
expanded: l === "folder" ? re : void 0,
|
|
703
|
+
setExpanded: l === "folder" ? ae : void 0,
|
|
704
|
+
children: /* @__PURE__ */ w(
|
|
705
|
+
We,
|
|
686
706
|
{
|
|
687
|
-
entityType:
|
|
688
|
-
projectName:
|
|
689
|
-
search:
|
|
690
|
-
tableData:
|
|
691
|
-
isFolderHierarchy:
|
|
692
|
-
onSearch: (
|
|
693
|
-
isMultiSelect:
|
|
694
|
-
onRowSubmit: (
|
|
695
|
-
onScrollBottom: () =>
|
|
707
|
+
entityType: l,
|
|
708
|
+
projectName: e,
|
|
709
|
+
search: b[l],
|
|
710
|
+
tableData: ie(j[l]?.table || []),
|
|
711
|
+
isFolderHierarchy: l === "folder" && !b.folder,
|
|
712
|
+
onSearch: (v) => C(v, l),
|
|
713
|
+
isMultiSelect: l === s ? !!t : !0,
|
|
714
|
+
onRowSubmit: (v) => l === s ? Q([v]) : void 0,
|
|
715
|
+
onScrollBottom: () => se(l)
|
|
696
716
|
},
|
|
697
|
-
|
|
717
|
+
l
|
|
698
718
|
)
|
|
699
719
|
},
|
|
700
|
-
|
|
720
|
+
l
|
|
701
721
|
)) })
|
|
702
722
|
]
|
|
703
723
|
}
|
|
704
724
|
);
|
|
705
725
|
};
|
|
706
726
|
export {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
727
|
+
It as E,
|
|
728
|
+
Me as T,
|
|
729
|
+
I as e,
|
|
730
|
+
Ye as u
|
|
710
731
|
};
|