@ynput/ayon-frontend-shared 0.7.0 → 0.7.2
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 +765 -739
- package/dist/ListTable.es.js +80 -80
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +1424 -1409
- package/dist/Views.es.js +572 -570
- package/dist/api.es.js +300 -298
- package/dist/chunks/Actions.es.js +5 -5
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EntityPath.es.js +14 -14
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +18 -18
- package/dist/chunks/Feed.es.js +2 -2
- package/dist/chunks/MetaWidget.es.js +2422 -2149
- package/dist/chunks/PlayableIcon.es.js +20 -20
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +2 -2
- package/dist/chunks/Slicer.es.js +2 -2
- package/dist/chunks/TableExportContextInstance.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +12 -12
- package/dist/chunks/Watchers.es.js +907 -855
- package/dist/chunks/getUris.es.js +1272 -1209
- package/dist/chunks/searchTerms.es.js +30 -66
- package/dist/chunks/useAttributeEnums.es.js +37 -37
- package/dist/chunks/viewUpdateHelper.es.js +10 -10
- package/dist/components.es.js +132 -131
- package/dist/context.es.js +76 -76
- package/dist/hooks.es.js +51 -50
- package/dist/types/ProjectTreeTable.d.ts +21 -1
- package/dist/types/Slicer.d.ts +6 -4
- package/dist/types/Views.d.ts +4 -0
- package/dist/types/api.d.ts +411 -438
- package/dist/types/components.d.ts +22 -0
- package/dist/types/context.d.ts +2 -0
- package/dist/types/hooks.d.ts +36 -1
- package/package.json +4 -4
package/dist/DetailsPanel.es.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { jsxs as k, jsx as i, Fragment as
|
|
2
|
-
import { Toolbar as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import T, { keyframes as
|
|
5
|
-
import { bz as
|
|
6
|
-
import {
|
|
1
|
+
import { jsxs as k, jsx as i, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
+
import { Toolbar as Qe, Panel as yt, Button as Y, Spacer as qe, Icon as we, getMixedCounts as Me, getTextColor as Fe, applyMixedChange as kt, Dialog as wt, SEARCH_FILTER_ID as Ke, buildFilterId as Ee, getFilterFromId as xt, SearchFilter as St, AssigneeField as Ct } from "@ynput/ayon-react-components";
|
|
3
|
+
import { useEffect as B, useRef as Z, useMemo as C, useState as X, useContext as Tt, useId as Nt } from "react";
|
|
4
|
+
import T, { keyframes as Et } from "styled-components";
|
|
5
|
+
import { bz as Dt, bH as It } from "./chunks/searchTerms.es.js";
|
|
6
|
+
import { bq as Pt, bO as Ft, c3 as At, cz as Je, by as Xe, v as Ot, bS as jt, ce as Rt } from "./chunks/getUris.es.js";
|
|
7
7
|
import "primereact/confirmdialog";
|
|
8
|
-
import { o as
|
|
9
|
-
import { O as
|
|
10
|
-
import { E as
|
|
11
|
-
import { union as ue, upperFirst as
|
|
8
|
+
import { o as Vt, y as $t, H as Lt, G as Ut, z as _t, w as Ye, A as Mt, B as Ht, E as Bt, I as Wt, J as zt, K as Gt, N as Qt, W as qt, s as Kt } from "./chunks/Watchers.es.js";
|
|
9
|
+
import { O as Da, Q as Ia, V as Pa, X as Fa, T as Aa } from "./chunks/Watchers.es.js";
|
|
10
|
+
import { E as Jt, R as Xt, a as Yt } from "./chunks/EntityPath.es.js";
|
|
11
|
+
import { union as ue, upperFirst as Ze } from "lodash";
|
|
12
12
|
import "react-toastify";
|
|
13
13
|
import "uuid";
|
|
14
|
-
import { a as
|
|
14
|
+
import { a as Zt, b as es, A as He, e as ts } from "./chunks/activeEntities.es.js";
|
|
15
15
|
import "@module-federation/enhanced/runtime";
|
|
16
|
-
import { o as
|
|
16
|
+
import { o as K, u as ss, T as ns, a8 as as, a2 as os, aa as is, G as rs, a9 as ls, Z as cs } from "./chunks/TableExportContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
18
|
-
import { T as
|
|
18
|
+
import { T as ds, P as et } from "./chunks/ProjectContext.es.js";
|
|
19
19
|
import "react-dom";
|
|
20
20
|
import "react-redux";
|
|
21
21
|
import "react-router-dom";
|
|
22
|
-
import
|
|
23
|
-
import { A as
|
|
22
|
+
import le from "clsx";
|
|
23
|
+
import { A as us } from "./chunks/Actions.es.js";
|
|
24
|
+
import { f as ps, k as hs, r as ms, m as gs } from "./chunks/MetaWidget.es.js";
|
|
24
25
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
25
|
-
import { g as
|
|
26
|
-
import { _ as
|
|
27
|
-
import { R as
|
|
28
|
-
import { I as
|
|
29
|
-
import { M as
|
|
30
|
-
import { D as
|
|
31
|
-
import { u as
|
|
32
|
-
import { p as
|
|
33
|
-
import { c as
|
|
34
|
-
import { u as
|
|
35
|
-
import { d as
|
|
36
|
-
import { A as
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { e as In } from "./chunks/expandRelativeDates.es.js";
|
|
26
|
+
import { g as De } from "./chunks/getEntityTypeIcon.es.js";
|
|
27
|
+
import { _ as fs } from "./chunks/PlayableIcon.es.js";
|
|
28
|
+
import { R as bs } from "./chunks/RepresentationsList.es.js";
|
|
29
|
+
import { I as vs } from "./chunks/InfoMessage.es.js";
|
|
30
|
+
import { M as ys, a as ks } from "./chunks/Menu.es.js";
|
|
31
|
+
import { D as ws } from "./chunks/DetailsDialog.es.js";
|
|
32
|
+
import { u as xs } from "./chunks/VersionUploadContextInstance.es.js";
|
|
33
|
+
import { p as Ss } from "./chunks/pluralize.es.js";
|
|
34
|
+
import { c as Cs } from "./chunks/copyToClipboard.es.js";
|
|
35
|
+
import { u as Ts } from "./chunks/useQueryArgumentChangeLoading.es.js";
|
|
36
|
+
import { d as tt, c as Ns } from "./chunks/Feed.es.js";
|
|
37
|
+
import { A as Es, C as Ds } from "./chunks/ThumbnailSimple.es.js";
|
|
38
|
+
import { t as Is, c as Ps } from "./chunks/queryFilterToClientFilter.es.js";
|
|
39
|
+
import { u as Fs } from "./chunks/useDateRangeFilter.es.js";
|
|
40
|
+
import { e as As } from "./chunks/expandRelativeDates.es.js";
|
|
41
41
|
import "axios";
|
|
42
42
|
import "@dnd-kit/core";
|
|
43
43
|
import "@dnd-kit/sortable";
|
|
44
44
|
import "@dnd-kit/utilities";
|
|
45
45
|
import "custom-protocol-check";
|
|
46
46
|
import "./chunks/SimpleForm.es.js";
|
|
47
|
-
import { Dialog as
|
|
48
|
-
function
|
|
47
|
+
import { Dialog as Os } from "primereact/dialog";
|
|
48
|
+
function js({
|
|
49
49
|
entityData: e,
|
|
50
|
-
project:
|
|
50
|
+
project: s,
|
|
51
51
|
activeEntityType: t,
|
|
52
52
|
entitiesToQuery: o = []
|
|
53
53
|
}) {
|
|
54
|
-
|
|
55
|
-
if (!e?.parents || !
|
|
56
|
-
const
|
|
57
|
-
a.set("project",
|
|
58
|
-
const r = (o || []).filter((f) => f.projectName ===
|
|
54
|
+
B(() => {
|
|
55
|
+
if (!e?.parents || !s) return;
|
|
56
|
+
const n = new URL(window.location.href), a = n.searchParams;
|
|
57
|
+
a.set("project", s), t && a.set("type", t);
|
|
58
|
+
const r = (o || []).filter((f) => f.projectName === s).map((f) => f.id).filter(Boolean)[0];
|
|
59
59
|
r && a.set("id", r);
|
|
60
|
-
const c = `${
|
|
60
|
+
const c = `${n.pathname}?${a.toString()}${n.hash}`, m = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
61
61
|
c !== m && window.history.replaceState(window.history.state, "", c);
|
|
62
|
-
}, [e,
|
|
62
|
+
}, [e, s, t, o]);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const Rs = T(Qe)`
|
|
65
65
|
display: flex;
|
|
66
66
|
justify-content: space-between;
|
|
67
67
|
align-items: flex-start;
|
|
@@ -73,7 +73,7 @@ const An = T(ze)`
|
|
|
73
73
|
& > * {
|
|
74
74
|
min-width: max-content;
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`, Vs = T.div`
|
|
77
77
|
display: flex;
|
|
78
78
|
align-items: flex-start;
|
|
79
79
|
gap: 4px;
|
|
@@ -82,31 +82,31 @@ const An = T(ze)`
|
|
|
82
82
|
right: 0;
|
|
83
83
|
padding: var(--padding-m);
|
|
84
84
|
background-color: var(--md-sys-color-surface-container-low);
|
|
85
|
-
`,
|
|
85
|
+
`, $s = T(yt)`
|
|
86
86
|
gap: 0px;
|
|
87
87
|
height: 100%;
|
|
88
88
|
padding: 0px;
|
|
89
89
|
box-shadow: -2px 0 6px #00000047;
|
|
90
90
|
z-index: 300;
|
|
91
|
-
`,
|
|
91
|
+
`, Ls = T(Qe)`
|
|
92
92
|
border-radius: 8px 8px 0 0;
|
|
93
93
|
gap: var(--base-gap-small) !important;
|
|
94
94
|
position: relative;
|
|
95
95
|
z-index: 100;
|
|
96
96
|
grid-column: span 2;
|
|
97
|
-
`,
|
|
97
|
+
`, Us = ["product", "representation"], _s = ["task"], Ms = ({
|
|
98
98
|
entityType: e,
|
|
99
|
-
currentTab:
|
|
99
|
+
currentTab: s,
|
|
100
100
|
onTabChange: t,
|
|
101
101
|
isLoading: o
|
|
102
102
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
return /* @__PURE__ */ k(
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
const n = !Us.includes(e), a = _s.includes(e);
|
|
104
|
+
return /* @__PURE__ */ k(Ls, { className: o ? "loading" : "", children: [
|
|
105
|
+
n && /* @__PURE__ */ i(
|
|
106
|
+
Y,
|
|
107
107
|
{
|
|
108
108
|
icon: "forum",
|
|
109
|
-
selected:
|
|
109
|
+
selected: s === "feed",
|
|
110
110
|
onClick: () => t("feed"),
|
|
111
111
|
"data-tooltip": "Activity Feed",
|
|
112
112
|
"data-tooltip-delay": 0,
|
|
@@ -114,45 +114,45 @@ const An = T(ze)`
|
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
116
|
a && /* @__PURE__ */ i(
|
|
117
|
-
|
|
117
|
+
Y,
|
|
118
118
|
{
|
|
119
119
|
icon: "checklist",
|
|
120
|
-
selected:
|
|
120
|
+
selected: s === "subtasks",
|
|
121
121
|
onClick: () => t("subtasks"),
|
|
122
122
|
"data-tooltip": "Subtasks",
|
|
123
123
|
"data-tooltip-delay": 0,
|
|
124
124
|
variant: "text"
|
|
125
125
|
}
|
|
126
126
|
),
|
|
127
|
-
/* @__PURE__ */ i(
|
|
127
|
+
/* @__PURE__ */ i(qe, {}),
|
|
128
128
|
e === "version" && /* @__PURE__ */ i(
|
|
129
|
-
|
|
129
|
+
Y,
|
|
130
130
|
{
|
|
131
131
|
icon: "order_play",
|
|
132
132
|
onClick: () => t("files"),
|
|
133
|
-
selected:
|
|
133
|
+
selected: s === "files",
|
|
134
134
|
"data-tooltip": "Version files",
|
|
135
135
|
"data-tooltip-delay": 0,
|
|
136
136
|
variant: "text"
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ i(
|
|
140
|
-
|
|
140
|
+
Y,
|
|
141
141
|
{
|
|
142
142
|
onClick: () => t("details"),
|
|
143
|
-
selected:
|
|
143
|
+
selected: s === "details",
|
|
144
144
|
style: { padding: "6px 8px" },
|
|
145
145
|
variant: "text",
|
|
146
146
|
children: "Details"
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
] });
|
|
150
|
-
},
|
|
150
|
+
}, Hs = T.div`
|
|
151
151
|
display: flex;
|
|
152
152
|
align-items: center;
|
|
153
153
|
gap: var(--base-gap-small);
|
|
154
154
|
overflow: hidden;
|
|
155
|
-
`,
|
|
155
|
+
`, Bs = T.button`
|
|
156
156
|
display: inline-flex;
|
|
157
157
|
align-items: center;
|
|
158
158
|
gap: var(--base-gap-small);
|
|
@@ -174,56 +174,56 @@ const An = T(ze)`
|
|
|
174
174
|
text-overflow: ellipsis;
|
|
175
175
|
white-space: nowrap;
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
178
|
-
const { openSlideOut: t } =
|
|
179
|
-
if (!
|
|
180
|
-
const a =
|
|
181
|
-
return /* @__PURE__ */ k(
|
|
177
|
+
`, Ws = ({ entity: e, taskTypes: s }) => {
|
|
178
|
+
const { openSlideOut: t } = K(), { projectName: o } = e, n = e.task?.name ? e.task : void 0;
|
|
179
|
+
if (!n?.id) return null;
|
|
180
|
+
const a = s.find((r) => r.name === n.taskType);
|
|
181
|
+
return /* @__PURE__ */ k(Hs, { className: "linked-task", children: [
|
|
182
182
|
/* @__PURE__ */ i("span", { children: "Task" }),
|
|
183
183
|
/* @__PURE__ */ k(
|
|
184
|
-
|
|
184
|
+
Bs,
|
|
185
185
|
{
|
|
186
|
-
onClick: () => t({ entityId:
|
|
186
|
+
onClick: () => t({ entityId: n.id, entityType: "task", projectName: o }),
|
|
187
187
|
children: [
|
|
188
|
-
/* @__PURE__ */ i(
|
|
189
|
-
/* @__PURE__ */ i("span", { className: "label", children:
|
|
188
|
+
/* @__PURE__ */ i(we, { icon: a?.icon || "task_alt", style: { color: a?.color || void 0 } }),
|
|
189
|
+
/* @__PURE__ */ i("span", { className: "label", children: n.label || n.name })
|
|
190
190
|
]
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
] });
|
|
194
|
-
},
|
|
194
|
+
}, st = (e, s, t) => {
|
|
195
195
|
if (!e[0]) return [];
|
|
196
|
-
if (
|
|
197
|
-
const o = (
|
|
198
|
-
switch (
|
|
196
|
+
if (s === "representation") return [{ icon: "view_in_ar" }];
|
|
197
|
+
const o = (n) => {
|
|
198
|
+
switch (s) {
|
|
199
199
|
case "folder":
|
|
200
|
-
return
|
|
200
|
+
return n.folder?.folderType ? t.folder[n.folder.folderType] : De("folder");
|
|
201
201
|
case "task":
|
|
202
|
-
return
|
|
202
|
+
return n.task?.taskType ? t.task[n.task.taskType] : De("task");
|
|
203
203
|
case "version":
|
|
204
|
-
return
|
|
204
|
+
return n.product?.productType ? t.product[n.product.productType] : De("version");
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
return e.slice(0, 6).map((
|
|
208
|
-
icon: o(
|
|
209
|
-
id:
|
|
210
|
-
type:
|
|
211
|
-
thumbnailHash:
|
|
212
|
-
projectName:
|
|
207
|
+
return e.slice(0, 6).map((n) => ({
|
|
208
|
+
icon: o(n),
|
|
209
|
+
id: n.id,
|
|
210
|
+
type: s,
|
|
211
|
+
thumbnailHash: n.thumbnailHash,
|
|
212
|
+
projectName: n.projectName
|
|
213
213
|
}));
|
|
214
|
-
},
|
|
215
|
-
task:
|
|
216
|
-
folder:
|
|
217
|
-
product:
|
|
218
|
-
}),
|
|
214
|
+
}, Ie = (e) => e.filter((s) => !!s.icon).reduce((s, t) => ({ ...s, [t.name]: t.icon }), {}), nt = (e) => ({
|
|
215
|
+
task: Ie(e.taskTypes),
|
|
216
|
+
folder: Ie(e.folderTypes),
|
|
217
|
+
product: Ie(e.productTypes)
|
|
218
|
+
}), at = (e, s) => {
|
|
219
219
|
const t = e.length > 1, o = e[0];
|
|
220
220
|
if (t)
|
|
221
221
|
return {
|
|
222
|
-
title: `${e.length} ${
|
|
223
|
-
subTitle: e.map((
|
|
222
|
+
title: `${e.length} ${s}s`,
|
|
223
|
+
subTitle: e.map((n) => n.name).join(", ")
|
|
224
224
|
};
|
|
225
225
|
if (!o) return { title: "loading...", subTitle: "loading..." };
|
|
226
|
-
switch (
|
|
226
|
+
switch (s) {
|
|
227
227
|
case "folder":
|
|
228
228
|
return {
|
|
229
229
|
title: o.label || o.name || "Unknown Folder",
|
|
@@ -250,12 +250,12 @@ const An = T(ze)`
|
|
|
250
250
|
subTitle: o.entityType || "Unknown Type"
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
-
},
|
|
253
|
+
}, zs = ({
|
|
254
254
|
entityType: e,
|
|
255
|
-
entitySubTypes:
|
|
255
|
+
entitySubTypes: s,
|
|
256
256
|
entities: t = [],
|
|
257
257
|
disabledAssignees: o = [],
|
|
258
|
-
users:
|
|
258
|
+
users: n = [],
|
|
259
259
|
disabledStatuses: a,
|
|
260
260
|
tagsOptions: r = [],
|
|
261
261
|
isFetching: c,
|
|
@@ -265,20 +265,20 @@ const An = T(ze)`
|
|
|
265
265
|
projectInfo: g,
|
|
266
266
|
onOpenViewer: b,
|
|
267
267
|
onEntityFocus: x,
|
|
268
|
-
thumbnailInputRef:
|
|
269
|
-
versionsInputRef:
|
|
268
|
+
thumbnailInputRef: $,
|
|
269
|
+
versionsInputRef: U
|
|
270
270
|
}) => {
|
|
271
|
-
const { useSearchParams:
|
|
271
|
+
const { useSearchParams: A, useNavigate: d, bundleMode: u } = K(), h = d(), [N, j] = A(), E = Z(null), y = C(() => nt(g), [g]), w = Vt(
|
|
272
272
|
t.map((l) => l.projectName),
|
|
273
273
|
[e]
|
|
274
|
-
),
|
|
274
|
+
), R = C(() => e === "task" ? ue(...t.map((l) => l.task?.assignees || [])) : e === "version" ? ue(
|
|
275
275
|
...t.map((l) => {
|
|
276
|
-
const
|
|
277
|
-
return Array.isArray(
|
|
276
|
+
const S = l.version?.author;
|
|
277
|
+
return Array.isArray(S) ? S : S ? [S] : [];
|
|
278
278
|
})
|
|
279
279
|
) : [], [t, e]);
|
|
280
280
|
let V = t[0];
|
|
281
|
-
const
|
|
281
|
+
const M = t.length === 0 || !V || c;
|
|
282
282
|
V || (V = {
|
|
283
283
|
parents: [],
|
|
284
284
|
id: "placeholder",
|
|
@@ -294,87 +294,109 @@ const An = T(ze)`
|
|
|
294
294
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
295
295
|
path: ""
|
|
296
296
|
});
|
|
297
|
-
const
|
|
297
|
+
const ee = t.length > 1 ? void 0 : V?.projectName;
|
|
298
298
|
t.filter((l) => l.projectName === V?.projectName && l.id).map((l) => l.id);
|
|
299
|
-
const { data:
|
|
300
|
-
() =>
|
|
299
|
+
const { data: te } = Pt({ attributeName: "priority" }), se = Zt(te, e), ne = C(
|
|
300
|
+
() => st(t, e, y),
|
|
301
301
|
[t, e, y]
|
|
302
|
-
),
|
|
303
|
-
() => r.reduce((l,
|
|
302
|
+
), P = C(() => t.map((l) => l.status), [t]), ae = C(() => t.map((l) => l.attrib?.priority), [t]), W = C(() => t.map((l) => l.tags), [t]), ce = C(
|
|
303
|
+
() => r.reduce((l, S) => (l[S.name] = S, l), {}),
|
|
304
304
|
[r]
|
|
305
|
-
),
|
|
305
|
+
), oe = C(() => ue(...W), [W]), pe = t.every((l) => l.projectName === V?.projectName), L = ps(
|
|
306
|
+
pe ? V?.projectName : void 0,
|
|
307
|
+
r
|
|
308
|
+
), F = t.length > 1, de = C(() => Me(W), [W]), he = C(
|
|
309
|
+
() => Me(t.map((l) => l.task?.assignees || [])),
|
|
310
|
+
[t]
|
|
311
|
+
), ve = !F && !!V?.hasReviewables, ye = ne.length === 1, { attribAccess: D, updateEntity: me } = $t({
|
|
306
312
|
entities: t,
|
|
307
313
|
entityType: e
|
|
308
|
-
}), { writableFields:
|
|
309
|
-
if (!(l !== "attrib" &&
|
|
310
|
-
return
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
}), { writableFields: G } = D, Se = !G || G.includes("status"), J = !G || G.includes("tags"), ie = e === "task" && (!G || G.includes("assignees")), re = (l, S) => {
|
|
315
|
+
if (!(l !== "attrib" && G && !G.includes(l)) && !(l === "assignees" && !ie))
|
|
316
|
+
return S == null ? console.error("value is null or undefined") : me(l, S);
|
|
317
|
+
}, z = (l, S) => {
|
|
318
|
+
const I = new Map(
|
|
319
|
+
t.map((q) => [q.id, (l === "tags" ? q.tags : q.task?.assignees) || []])
|
|
320
|
+
);
|
|
321
|
+
l === "tags" && L?.addTags(S.add), re(l, (q) => kt(I.get(q) || [], S));
|
|
322
|
+
}, _ = () => {
|
|
323
|
+
let l, S = V.id, I = e + "Id";
|
|
324
|
+
e === "version" && V.product?.id && (l = [V.id], S = V.product?.id, I = "productId"), S && b({
|
|
325
|
+
[I]: S,
|
|
326
|
+
projectName: ee,
|
|
316
327
|
versionIds: l
|
|
317
328
|
});
|
|
318
|
-
},
|
|
319
|
-
if (
|
|
320
|
-
const l =
|
|
321
|
-
|
|
329
|
+
}, Q = (e === "task" || e === "version") && (R.length > 0 || e === "task"), ke = [...Dt(n, R)];
|
|
330
|
+
if (Q) {
|
|
331
|
+
const l = n.map((I) => I.name), S = R.filter((I) => !l.includes(I));
|
|
332
|
+
S.length && ke.push(...S.map((I) => ({ name: I, fullName: I })));
|
|
322
333
|
}
|
|
323
|
-
const { title:
|
|
324
|
-
return /* @__PURE__ */ i(
|
|
325
|
-
|
|
334
|
+
const { title: Ce, subTitle: ge } = at(t, e), fe = w?.length !== 0 && w?.find((l) => l.name === P[0]);
|
|
335
|
+
return /* @__PURE__ */ i(Lt, { children: /* @__PURE__ */ i(
|
|
336
|
+
Jt,
|
|
326
337
|
{
|
|
327
338
|
entities: t,
|
|
328
339
|
entityType: e,
|
|
329
|
-
projectName:
|
|
330
|
-
thumbnailInputRef:
|
|
331
|
-
versionsInputRef:
|
|
340
|
+
projectName: ee,
|
|
341
|
+
thumbnailInputRef: $,
|
|
342
|
+
versionsInputRef: U,
|
|
332
343
|
onVersionCreated: (l) => x?.(l, "version"),
|
|
333
|
-
children: /* @__PURE__ */ k(Ut, { className:
|
|
344
|
+
children: /* @__PURE__ */ k(Ut, { className: le("details-panel-header", { isCompact: m }), children: [
|
|
334
345
|
/* @__PURE__ */ k(
|
|
335
|
-
|
|
346
|
+
_t,
|
|
336
347
|
{
|
|
337
|
-
className:
|
|
348
|
+
className: le("titles", { isCompact: m, loading: M }, "no-shimmer"),
|
|
338
349
|
children: [
|
|
339
350
|
/* @__PURE__ */ k("div", { style: { position: "relative" }, children: [
|
|
340
351
|
/* @__PURE__ */ i(
|
|
341
|
-
|
|
352
|
+
Ye,
|
|
342
353
|
{
|
|
343
|
-
isLoading:
|
|
344
|
-
shimmer:
|
|
345
|
-
thumbnails:
|
|
346
|
-
onClick:
|
|
347
|
-
hoverIcon:
|
|
354
|
+
isLoading: M,
|
|
355
|
+
shimmer: M,
|
|
356
|
+
thumbnails: ne,
|
|
357
|
+
onClick: ye ? _ : void 0,
|
|
358
|
+
hoverIcon: ve ? "play_circle" : void 0
|
|
348
359
|
}
|
|
349
360
|
),
|
|
350
|
-
|
|
361
|
+
ve && /* @__PURE__ */ i(fs, {})
|
|
351
362
|
] }),
|
|
352
|
-
/* @__PURE__ */ k(
|
|
353
|
-
/* @__PURE__ */ k(
|
|
354
|
-
/* @__PURE__ */ i("h2", { children:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
363
|
+
/* @__PURE__ */ k(Mt, { className: le({ loading: M }), children: [
|
|
364
|
+
/* @__PURE__ */ k(Ht, { children: [
|
|
365
|
+
/* @__PURE__ */ i("h2", { children: Ce }),
|
|
366
|
+
J ? /* @__PURE__ */ k(xe, { children: [
|
|
367
|
+
/* @__PURE__ */ i(
|
|
368
|
+
Bt,
|
|
369
|
+
{
|
|
370
|
+
ref: E,
|
|
371
|
+
value: ue(...W),
|
|
372
|
+
tags: ce,
|
|
373
|
+
options: [],
|
|
374
|
+
editable: !0,
|
|
375
|
+
editor: !0,
|
|
376
|
+
onChange: (l) => {
|
|
377
|
+
L?.addTags(l.filter((S) => !oe.includes(S))), re("tags", l);
|
|
378
|
+
},
|
|
379
|
+
mixedCounts: F ? de : void 0,
|
|
380
|
+
mixedTotal: t.length,
|
|
381
|
+
mixedLabel: `${e}s`,
|
|
382
|
+
onMixedChange: (l) => z("tags", l),
|
|
383
|
+
onEditOption: L?.onEditOption,
|
|
384
|
+
editOptionTooltip: "Change the colour in the project tags",
|
|
385
|
+
align: "right",
|
|
386
|
+
styleDropdown: { display: M ? "none" : "unset" },
|
|
387
|
+
className: "tags-select",
|
|
388
|
+
itemClassName: "details-tag"
|
|
389
|
+
}
|
|
390
|
+
),
|
|
391
|
+
L && /* @__PURE__ */ i(hs, { ...L.dialog })
|
|
392
|
+
] }) : /* @__PURE__ */ i(Wt, { className: "tags-select", children: ue(...W).length ? ue(...W).map((l) => {
|
|
393
|
+
const S = ce[l]?.color;
|
|
372
394
|
return /* @__PURE__ */ i(
|
|
373
395
|
"span",
|
|
374
396
|
{
|
|
375
397
|
style: {
|
|
376
|
-
backgroundColor:
|
|
377
|
-
color:
|
|
398
|
+
backgroundColor: S || void 0,
|
|
399
|
+
color: S ? Fe(S) : void 0
|
|
378
400
|
},
|
|
379
401
|
children: l
|
|
380
402
|
},
|
|
@@ -384,13 +406,13 @@ const An = T(ze)`
|
|
|
384
406
|
] }),
|
|
385
407
|
/* @__PURE__ */ k("div", { className: "sub-title", children: [
|
|
386
408
|
/* @__PURE__ */ k("span", { className: "entity-type", children: [
|
|
387
|
-
|
|
409
|
+
Ze(e),
|
|
388
410
|
" - "
|
|
389
411
|
] }),
|
|
390
|
-
/* @__PURE__ */ i("h3", { children:
|
|
412
|
+
/* @__PURE__ */ i("h3", { children: ge })
|
|
391
413
|
] }),
|
|
392
|
-
e === "version" && !
|
|
393
|
-
|
|
414
|
+
e === "version" && !F && !M && V && /* @__PURE__ */ i(
|
|
415
|
+
Ws,
|
|
394
416
|
{
|
|
395
417
|
entity: V,
|
|
396
418
|
taskTypes: g.taskTypes
|
|
@@ -402,77 +424,81 @@ const An = T(ze)`
|
|
|
402
424
|
}
|
|
403
425
|
),
|
|
404
426
|
/* @__PURE__ */ i(
|
|
405
|
-
|
|
427
|
+
zt,
|
|
406
428
|
{
|
|
407
|
-
value:
|
|
429
|
+
value: P,
|
|
408
430
|
options: w || [],
|
|
409
431
|
disabledValues: a,
|
|
410
|
-
disableOpen: !
|
|
432
|
+
disableOpen: !Se,
|
|
411
433
|
invert: !0,
|
|
412
434
|
style: { maxWidth: "unset" },
|
|
413
|
-
onChange: (l) =>
|
|
414
|
-
className:
|
|
435
|
+
onChange: (l) => re("status", l),
|
|
436
|
+
className: le("status-select", { loading: M }),
|
|
415
437
|
align: m ? "right" : "left",
|
|
416
|
-
$textColor:
|
|
438
|
+
$textColor: Fe(fe !== void 0 ? fe.color : "#OOO")
|
|
417
439
|
}
|
|
418
440
|
),
|
|
419
|
-
!m && (!
|
|
420
|
-
|
|
441
|
+
!m && (!Q || M ? /* @__PURE__ */ i("div", {}) : /* @__PURE__ */ i(
|
|
442
|
+
Gt,
|
|
421
443
|
{
|
|
422
|
-
value:
|
|
423
|
-
options:
|
|
444
|
+
value: R,
|
|
445
|
+
options: ke,
|
|
424
446
|
disabledValues: o.map((l) => l.name),
|
|
425
|
-
isMultiple:
|
|
426
|
-
readOnly: !
|
|
427
|
-
emptyMessage:
|
|
447
|
+
isMultiple: F && R.length > 1 && e === "task",
|
|
448
|
+
readOnly: !ie,
|
|
449
|
+
emptyMessage: ie ? "Assign user" : "-",
|
|
428
450
|
align: "right",
|
|
429
|
-
onChange: (l) =>
|
|
451
|
+
onChange: (l) => re("assignees", l),
|
|
452
|
+
mixedCounts: F && e === "task" ? he : void 0,
|
|
453
|
+
mixedTotal: t.length,
|
|
454
|
+
mixedLabel: `${e}s`,
|
|
455
|
+
onMixedChange: (l) => z("assignees", l),
|
|
430
456
|
className: "assignee-select",
|
|
431
|
-
"data-tooltip":
|
|
457
|
+
"data-tooltip": R.length ? e === "task" ? "Assigned users" : "Author" : ""
|
|
432
458
|
}
|
|
433
459
|
)),
|
|
434
460
|
/* @__PURE__ */ i(
|
|
435
|
-
|
|
461
|
+
us,
|
|
436
462
|
{
|
|
437
463
|
entities: t,
|
|
438
464
|
entityType: e,
|
|
439
|
-
entitySubTypes:
|
|
440
|
-
isLoadingEntity: !!c || !!
|
|
465
|
+
entitySubTypes: s,
|
|
466
|
+
isLoadingEntity: !!c || !!M,
|
|
441
467
|
searchParams: N,
|
|
442
468
|
bundleMode: u,
|
|
443
|
-
onSetSearchParams:
|
|
469
|
+
onSetSearchParams: j,
|
|
444
470
|
onNavigate: h
|
|
445
471
|
}
|
|
446
472
|
),
|
|
447
473
|
se ? /* @__PURE__ */ i(
|
|
448
|
-
|
|
474
|
+
Qt,
|
|
449
475
|
{
|
|
450
476
|
options: se,
|
|
451
477
|
placeholder: "No priority",
|
|
452
|
-
value:
|
|
453
|
-
onChange: (l) =>
|
|
478
|
+
value: ae,
|
|
479
|
+
onChange: (l) => re("attrib", { priority: l[0] }),
|
|
454
480
|
align: "right"
|
|
455
481
|
}
|
|
456
482
|
) : /* @__PURE__ */ i("div", { style: { height: 32 } }),
|
|
457
483
|
/* @__PURE__ */ i(
|
|
458
|
-
|
|
484
|
+
Ms,
|
|
459
485
|
{
|
|
460
486
|
entityType: e,
|
|
461
487
|
currentTab: f,
|
|
462
488
|
onTabChange: p,
|
|
463
|
-
isLoading:
|
|
489
|
+
isLoading: M
|
|
464
490
|
}
|
|
465
491
|
)
|
|
466
492
|
] })
|
|
467
493
|
}
|
|
468
494
|
) });
|
|
469
|
-
},
|
|
495
|
+
}, Gs = T.div`
|
|
470
496
|
display: flex;
|
|
471
497
|
flex-direction: column;
|
|
472
498
|
|
|
473
499
|
height: 100%;
|
|
474
500
|
overflow: hidden;
|
|
475
|
-
`,
|
|
501
|
+
`, Be = T.div`
|
|
476
502
|
position: relative;
|
|
477
503
|
flex: 1;
|
|
478
504
|
display: flex;
|
|
@@ -486,40 +512,40 @@ const An = T(ze)`
|
|
|
486
512
|
&:first-child {
|
|
487
513
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
488
514
|
}
|
|
489
|
-
`,
|
|
515
|
+
`, Qs = ({
|
|
490
516
|
entities: e = [],
|
|
491
|
-
scope:
|
|
517
|
+
scope: s,
|
|
492
518
|
isLoadingVersion: t
|
|
493
519
|
}) => {
|
|
494
520
|
const o = e[0];
|
|
495
521
|
if (!o) return null;
|
|
496
|
-
let
|
|
497
|
-
return e.length > 1 && (
|
|
498
|
-
/* @__PURE__ */ k(
|
|
499
|
-
/* @__PURE__ */ i("h4", { children:
|
|
522
|
+
let n = "Reviewables";
|
|
523
|
+
return e.length > 1 && (n += ` (${o.name})`), e.some((a) => a.entityType !== "version") ? null : /* @__PURE__ */ k(Gs, { children: [
|
|
524
|
+
/* @__PURE__ */ k(Be, { children: [
|
|
525
|
+
/* @__PURE__ */ i("h4", { children: n }),
|
|
500
526
|
/* @__PURE__ */ i(
|
|
501
|
-
|
|
527
|
+
Xt,
|
|
502
528
|
{
|
|
503
529
|
projectName: o.projectName,
|
|
504
530
|
productId: o.product?.id,
|
|
505
531
|
versionId: o.id,
|
|
506
532
|
isLoadingVersion: t,
|
|
507
|
-
scope:
|
|
533
|
+
scope: s
|
|
508
534
|
}
|
|
509
535
|
)
|
|
510
536
|
] }),
|
|
511
|
-
/* @__PURE__ */ k(
|
|
537
|
+
/* @__PURE__ */ k(Be, { children: [
|
|
512
538
|
/* @__PURE__ */ i("h4", { children: "Representations" }),
|
|
513
|
-
/* @__PURE__ */ i(
|
|
539
|
+
/* @__PURE__ */ i(bs, { entities: e })
|
|
514
540
|
] })
|
|
515
541
|
] });
|
|
516
|
-
},
|
|
542
|
+
}, qs = ({
|
|
517
543
|
latestVersion: e,
|
|
518
|
-
resolveVersionJump:
|
|
544
|
+
resolveVersionJump: s
|
|
519
545
|
}) => {
|
|
520
|
-
const t =
|
|
546
|
+
const t = s?.(e.id);
|
|
521
547
|
return /* @__PURE__ */ i(
|
|
522
|
-
|
|
548
|
+
vs,
|
|
523
549
|
{
|
|
524
550
|
variant: "info",
|
|
525
551
|
compact: !0,
|
|
@@ -533,21 +559,21 @@ const An = T(ze)`
|
|
|
533
559
|
} : void 0
|
|
534
560
|
}
|
|
535
561
|
);
|
|
536
|
-
},
|
|
537
|
-
const
|
|
538
|
-
if (!(e?.entityType !== "version" || !
|
|
539
|
-
return t.version >
|
|
540
|
-
},
|
|
541
|
-
onOpenVersionUpload:
|
|
542
|
-
}),
|
|
562
|
+
}, Ks = (e) => {
|
|
563
|
+
const s = e?.version?.version, t = e?.product?.latestVersion;
|
|
564
|
+
if (!(e?.entityType !== "version" || !s || s <= 0 || !t?.active))
|
|
565
|
+
return t.version > s ? t : void 0;
|
|
566
|
+
}, Js = () => ({
|
|
567
|
+
onOpenVersionUpload: xs()?.onOpenVersionUpload ?? null
|
|
568
|
+
}), Xs = (e, s, t) => {
|
|
543
569
|
const o = e === "folder" || e === "task" ? "overview" : e === "product" || e === "version" || e === "representation" ? "products" : null;
|
|
544
|
-
return o ? `${typeof window < "u" ? window.location.origin : ""}/projects/${t}/${o}?project=${t}&type=${e}&id=${
|
|
545
|
-
},
|
|
570
|
+
return o ? `${typeof window < "u" ? window.location.origin : ""}/projects/${t}/${o}?project=${t}&type=${e}&id=${s}` : null;
|
|
571
|
+
}, Ys = ({
|
|
546
572
|
entityType: e,
|
|
547
|
-
entityId:
|
|
573
|
+
entityId: s,
|
|
548
574
|
projectName: t,
|
|
549
575
|
selectedEntities: o,
|
|
550
|
-
deleteEntities:
|
|
576
|
+
deleteEntities: n,
|
|
551
577
|
canUploadThumbnail: a,
|
|
552
578
|
canUploadVersion: r,
|
|
553
579
|
canOpenPip: c,
|
|
@@ -557,17 +583,17 @@ const An = T(ze)`
|
|
|
557
583
|
onPip: g,
|
|
558
584
|
onOpenViewer: b,
|
|
559
585
|
onUploadThumbnail: x,
|
|
560
|
-
onUploadVersion:
|
|
561
|
-
onShare:
|
|
562
|
-
onViewData:
|
|
586
|
+
onUploadVersion: $,
|
|
587
|
+
onShare: U,
|
|
588
|
+
onViewData: A,
|
|
563
589
|
onDelete: d
|
|
564
590
|
}) => {
|
|
565
|
-
const u =
|
|
591
|
+
const u = C(() => o.length ? o.filter((h) => !!h?.entityId).map((h) => ({
|
|
566
592
|
entityId: h.entityId,
|
|
567
593
|
entityType: h.entityType || e,
|
|
568
594
|
hasReviewables: h.hasReviewables
|
|
569
|
-
})) :
|
|
570
|
-
return
|
|
595
|
+
})) : s ? [{ entityId: s, entityType: e }] : [], [o, s, e]);
|
|
596
|
+
return C(() => {
|
|
571
597
|
const h = [];
|
|
572
598
|
if (m && h.push({
|
|
573
599
|
id: "open-in-viewer",
|
|
@@ -588,7 +614,7 @@ const An = T(ze)`
|
|
|
588
614
|
id: "upload-version",
|
|
589
615
|
label: "Upload version",
|
|
590
616
|
icon: "upload",
|
|
591
|
-
onClick:
|
|
617
|
+
onClick: $
|
|
592
618
|
}), p?.openAddToListDialog && t && u.length) {
|
|
593
619
|
const E = u[0]?.entityType || e, y = p.openAddToListDialog;
|
|
594
620
|
if (h.push({
|
|
@@ -597,34 +623,34 @@ const An = T(ze)`
|
|
|
597
623
|
icon: "list_alt_add",
|
|
598
624
|
onClick: () => y(E, u)
|
|
599
625
|
}), (E === "version" || E === "representation") && p.hasReviewAddon) {
|
|
600
|
-
const
|
|
626
|
+
const R = u.some((V) => V.hasReviewables === !0);
|
|
601
627
|
h.push({
|
|
602
628
|
id: "add-to-review-list",
|
|
603
629
|
label: "Add to session",
|
|
604
630
|
icon: "list_alt_add",
|
|
605
|
-
disabled: !
|
|
606
|
-
...
|
|
631
|
+
disabled: !R,
|
|
632
|
+
...R ? {} : { "data-tooltip": "No reviewables on selected version" },
|
|
607
633
|
onClick: () => y(E, u, { isReview: !0 })
|
|
608
634
|
});
|
|
609
635
|
}
|
|
610
636
|
}
|
|
611
|
-
const N = u[0],
|
|
637
|
+
const N = u[0], j = N?.entityId && t ? Xs(
|
|
612
638
|
N.entityType || e,
|
|
613
639
|
N.entityId,
|
|
614
640
|
t
|
|
615
641
|
) : null;
|
|
616
|
-
if (
|
|
642
|
+
if (j && h.push({
|
|
617
643
|
id: "share",
|
|
618
644
|
label: "Share",
|
|
619
645
|
icon: "share",
|
|
620
|
-
onClick: () => j
|
|
646
|
+
onClick: () => U(j)
|
|
621
647
|
}), h.push({
|
|
622
648
|
id: "view-data",
|
|
623
649
|
label: "View data",
|
|
624
650
|
icon: "database",
|
|
625
|
-
onClick:
|
|
626
|
-
}), f &&
|
|
627
|
-
const E = new Set(
|
|
651
|
+
onClick: A
|
|
652
|
+
}), f && n.length > 0) {
|
|
653
|
+
const E = new Set(n.map((R) => R.entityType)), y = E.size === 1 ? [...E][0] : "item", w = n.length === 1 ? `Delete ${y}` : `Delete ${Ss(n.length, y)}`;
|
|
628
654
|
h.push({
|
|
629
655
|
id: "delete",
|
|
630
656
|
label: w,
|
|
@@ -633,14 +659,14 @@ const An = T(ze)`
|
|
|
633
659
|
onClick: d
|
|
634
660
|
});
|
|
635
661
|
}
|
|
636
|
-
return { items: h, shareLink:
|
|
662
|
+
return { items: h, shareLink: j };
|
|
637
663
|
}, [
|
|
638
664
|
c,
|
|
639
665
|
m,
|
|
640
666
|
a,
|
|
641
667
|
r,
|
|
642
668
|
f,
|
|
643
|
-
|
|
669
|
+
n,
|
|
644
670
|
p,
|
|
645
671
|
t,
|
|
646
672
|
u,
|
|
@@ -648,23 +674,23 @@ const An = T(ze)`
|
|
|
648
674
|
g,
|
|
649
675
|
b,
|
|
650
676
|
x,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
677
|
+
$,
|
|
678
|
+
U,
|
|
679
|
+
A,
|
|
654
680
|
d
|
|
655
681
|
]);
|
|
656
|
-
},
|
|
682
|
+
}, Zs = T.div`
|
|
657
683
|
display: flex;
|
|
658
684
|
flex-direction: column;
|
|
659
685
|
gap: 16px;
|
|
660
|
-
`,
|
|
686
|
+
`, We = T.div`
|
|
661
687
|
display: flex;
|
|
662
688
|
flex-direction: column;
|
|
663
689
|
gap: 6px;
|
|
664
|
-
`,
|
|
690
|
+
`, ze = T.span`
|
|
665
691
|
font-size: 13px;
|
|
666
692
|
color: var(--md-sys-color-on-surface);
|
|
667
|
-
`,
|
|
693
|
+
`, Ge = T.button`
|
|
668
694
|
display: flex;
|
|
669
695
|
align-items: center;
|
|
670
696
|
gap: 12px;
|
|
@@ -693,47 +719,47 @@ const An = T(ze)`
|
|
|
693
719
|
text-overflow: ellipsis;
|
|
694
720
|
white-space: nowrap;
|
|
695
721
|
}
|
|
696
|
-
`,
|
|
722
|
+
`, en = ({ link: e, entityLabel: s, visible: t, onHide: o }) => {
|
|
697
723
|
if (!t) return null;
|
|
698
|
-
const
|
|
699
|
-
|
|
724
|
+
const n = `[${s}](${e})`, a = (r) => {
|
|
725
|
+
Cs(r, !0), o();
|
|
700
726
|
};
|
|
701
|
-
return /* @__PURE__ */ i(
|
|
702
|
-
/* @__PURE__ */ k(
|
|
703
|
-
/* @__PURE__ */ i(
|
|
704
|
-
/* @__PURE__ */ k(
|
|
727
|
+
return /* @__PURE__ */ i(wt, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ k(Zs, { children: [
|
|
728
|
+
/* @__PURE__ */ k(We, { children: [
|
|
729
|
+
/* @__PURE__ */ i(ze, { children: "Link" }),
|
|
730
|
+
/* @__PURE__ */ k(Ge, { type: "button", onClick: () => a(e), "aria-label": "Copy link", children: [
|
|
705
731
|
/* @__PURE__ */ i("span", { className: "value", children: e }),
|
|
706
|
-
/* @__PURE__ */ i(
|
|
732
|
+
/* @__PURE__ */ i(we, { icon: "content_copy" })
|
|
707
733
|
] })
|
|
708
734
|
] }),
|
|
709
|
-
/* @__PURE__ */ k(
|
|
710
|
-
/* @__PURE__ */ i(
|
|
711
|
-
/* @__PURE__ */ k(
|
|
712
|
-
/* @__PURE__ */ i("span", { className: "value", children:
|
|
713
|
-
/* @__PURE__ */ i(
|
|
735
|
+
/* @__PURE__ */ k(We, { children: [
|
|
736
|
+
/* @__PURE__ */ i(ze, { children: "Markdown Link" }),
|
|
737
|
+
/* @__PURE__ */ k(Ge, { type: "button", onClick: () => a(n), "aria-label": "Copy markdown link", children: [
|
|
738
|
+
/* @__PURE__ */ i("span", { className: "value", children: n }),
|
|
739
|
+
/* @__PURE__ */ i(we, { icon: "content_copy" })
|
|
714
740
|
] })
|
|
715
741
|
] })
|
|
716
742
|
] }) });
|
|
717
|
-
},
|
|
718
|
-
const
|
|
743
|
+
}, tn = (e, s, t, o) => {
|
|
744
|
+
const n = { projectName: t, quickView: !0 };
|
|
719
745
|
switch (e) {
|
|
720
746
|
case "folder":
|
|
721
|
-
return { ...
|
|
747
|
+
return { ...n, folderId: s };
|
|
722
748
|
case "task":
|
|
723
|
-
return { ...
|
|
749
|
+
return { ...n, taskId: s };
|
|
724
750
|
case "product":
|
|
725
|
-
return { ...
|
|
751
|
+
return { ...n, productId: s };
|
|
726
752
|
case "version":
|
|
727
|
-
return o ? { ...
|
|
753
|
+
return o ? { ...n, productId: o, versionIds: [s] } : null;
|
|
728
754
|
default:
|
|
729
755
|
return null;
|
|
730
756
|
}
|
|
731
|
-
},
|
|
757
|
+
}, sn = ({
|
|
732
758
|
entityType: e,
|
|
733
|
-
entityId:
|
|
759
|
+
entityId: s,
|
|
734
760
|
entityIds: t,
|
|
735
761
|
entityLabel: o,
|
|
736
|
-
projectName:
|
|
762
|
+
projectName: n,
|
|
737
763
|
selectedEntities: a = [],
|
|
738
764
|
entityListsContext: r,
|
|
739
765
|
onOpenPip: c,
|
|
@@ -742,154 +768,154 @@ const An = T(ze)`
|
|
|
742
768
|
taskId: p,
|
|
743
769
|
folderId: g
|
|
744
770
|
}) => {
|
|
745
|
-
const b =
|
|
746
|
-
const
|
|
747
|
-
return `details-more-menu-${y}-${
|
|
748
|
-
}, [y,
|
|
771
|
+
const b = Z(null), [x, $] = X(!1), [U, A] = X(null), { menuOpen: d, toggleMenuOpen: u, setMenuOpen: h } = ss(), { triggerThumbnailUpload: N, canUploadVersion: j } = Tt(ns), { onOpenVersionUpload: E } = Js(), y = Nt(), w = C(() => {
|
|
772
|
+
const L = s || t?.[0] || "noentity";
|
|
773
|
+
return `details-more-menu-${y}-${L}-${n || "noproject"}`;
|
|
774
|
+
}, [y, s, t, n]), R = d === w, V = !!s && !!n && !!N, M = !!j && !!E, ee = () => {
|
|
749
775
|
E?.({ productId: f, taskId: p, folderId: g });
|
|
750
|
-
},
|
|
751
|
-
const
|
|
752
|
-
return !
|
|
753
|
-
id:
|
|
754
|
-
entityType:
|
|
755
|
-
name:
|
|
756
|
-
label:
|
|
757
|
-
projectName:
|
|
758
|
-
folderId:
|
|
759
|
-
parentId:
|
|
776
|
+
}, te = s && n ? tn(e, s, n, f) : null, se = !!m && !!te, ne = as(), P = C(() => (a.length ? a : s ? [{ entityId: s, entityType: e, projectName: n }] : []).map((F) => {
|
|
777
|
+
const de = F.entityType || e, he = F.projectName || n;
|
|
778
|
+
return !os(de) || !F.entityId || !he ? null : {
|
|
779
|
+
id: F.entityId,
|
|
780
|
+
entityType: de,
|
|
781
|
+
name: F.name,
|
|
782
|
+
label: F.label,
|
|
783
|
+
projectName: he,
|
|
784
|
+
folderId: F.folderId,
|
|
785
|
+
parentId: F.parentId
|
|
760
786
|
};
|
|
761
|
-
}).filter((
|
|
762
|
-
h(!1),
|
|
763
|
-
}, { items:
|
|
787
|
+
}).filter((F) => F !== null), [a, s, e, n]), ae = !!ne && P.length > 0, W = () => {
|
|
788
|
+
h(!1), ne?.deleteEntities(P);
|
|
789
|
+
}, { items: ce } = Ys({
|
|
764
790
|
entityType: e,
|
|
765
|
-
entityId:
|
|
766
|
-
projectName:
|
|
791
|
+
entityId: s,
|
|
792
|
+
projectName: n,
|
|
767
793
|
selectedEntities: a,
|
|
768
|
-
deleteEntities:
|
|
794
|
+
deleteEntities: P,
|
|
769
795
|
canUploadThumbnail: V,
|
|
770
|
-
canUploadVersion:
|
|
796
|
+
canUploadVersion: M,
|
|
771
797
|
canOpenPip: !!c,
|
|
772
798
|
canOpenViewer: se,
|
|
773
|
-
canDelete:
|
|
799
|
+
canDelete: ae,
|
|
774
800
|
entityListsContext: r,
|
|
775
801
|
onPip: () => c?.(),
|
|
776
|
-
onOpenViewer: () =>
|
|
802
|
+
onOpenViewer: () => te && m?.(te),
|
|
777
803
|
onUploadThumbnail: () => N?.(),
|
|
778
|
-
onUploadVersion:
|
|
779
|
-
onShare: (
|
|
780
|
-
onViewData: () =>
|
|
781
|
-
onDelete:
|
|
782
|
-
}),
|
|
783
|
-
return /* @__PURE__ */ k(
|
|
804
|
+
onUploadVersion: ee,
|
|
805
|
+
onShare: (L) => A(L),
|
|
806
|
+
onViewData: () => $(!0),
|
|
807
|
+
onDelete: W
|
|
808
|
+
}), oe = t?.length ? t : s ? [s] : [], pe = o || s || "";
|
|
809
|
+
return /* @__PURE__ */ k(xe, { children: [
|
|
784
810
|
/* @__PURE__ */ i(
|
|
785
|
-
|
|
811
|
+
Y,
|
|
786
812
|
{
|
|
787
813
|
ref: b,
|
|
788
814
|
icon: "more_horiz",
|
|
789
815
|
variant: "text",
|
|
790
816
|
"data-tooltip": "More actions",
|
|
791
817
|
"aria-label": "More actions",
|
|
792
|
-
className:
|
|
818
|
+
className: le({ active: R }),
|
|
793
819
|
onClick: () => u(w)
|
|
794
820
|
}
|
|
795
821
|
),
|
|
796
|
-
/* @__PURE__ */ i(
|
|
797
|
-
x &&
|
|
798
|
-
|
|
822
|
+
/* @__PURE__ */ i(ys, { id: w, target: b.current, align: "right", children: /* @__PURE__ */ i(ks, { menu: ce, onClose: () => h(!1) }) }),
|
|
823
|
+
x && n && oe.length > 0 && /* @__PURE__ */ i(
|
|
824
|
+
ws,
|
|
799
825
|
{
|
|
800
|
-
projectName:
|
|
826
|
+
projectName: n,
|
|
801
827
|
entityType: e,
|
|
802
|
-
entityIds:
|
|
828
|
+
entityIds: oe,
|
|
803
829
|
visible: x,
|
|
804
|
-
onHide: () =>
|
|
830
|
+
onHide: () => $(!1)
|
|
805
831
|
}
|
|
806
832
|
),
|
|
807
|
-
|
|
808
|
-
|
|
833
|
+
U && /* @__PURE__ */ i(
|
|
834
|
+
en,
|
|
809
835
|
{
|
|
810
|
-
link:
|
|
811
|
-
entityLabel:
|
|
836
|
+
link: U,
|
|
837
|
+
entityLabel: pe,
|
|
812
838
|
visible: !0,
|
|
813
|
-
onHide: () =>
|
|
839
|
+
onHide: () => A(null)
|
|
814
840
|
}
|
|
815
841
|
)
|
|
816
842
|
] });
|
|
817
|
-
},
|
|
843
|
+
}, nn = (e, s) => {
|
|
818
844
|
const t = [e];
|
|
819
845
|
let o = e;
|
|
820
846
|
for (; o.parentId && o.parentId !== "root"; ) {
|
|
821
|
-
const
|
|
822
|
-
if (!
|
|
847
|
+
const n = s.get(o.parentId);
|
|
848
|
+
if (!n)
|
|
823
849
|
break;
|
|
824
|
-
t.unshift(
|
|
850
|
+
t.unshift(n), o = n;
|
|
825
851
|
}
|
|
826
852
|
return t;
|
|
827
|
-
},
|
|
853
|
+
}, an = (e, s) => {
|
|
828
854
|
const t = [];
|
|
829
|
-
let o =
|
|
830
|
-
if ((o ?
|
|
855
|
+
let o = s.get(e.folder?.id || "");
|
|
856
|
+
if ((o ? nn(o, s) : []).forEach((a) => {
|
|
831
857
|
t.push({ type: "folder", label: a.label || a.name, id: a.id });
|
|
832
858
|
}), e.entityType === "version") {
|
|
833
859
|
const a = `${e.product?.name} - ${e.name}`;
|
|
834
860
|
t.push({ type: "version", label: a, id: e.id });
|
|
835
861
|
}
|
|
836
862
|
return e.entityType === "task" && t.push({ type: "task", label: e.label || e.name, id: e.id }), t;
|
|
837
|
-
},
|
|
863
|
+
}, on = ({
|
|
838
864
|
entity: e,
|
|
839
|
-
entityType:
|
|
865
|
+
entityType: s,
|
|
840
866
|
projectName: t,
|
|
841
867
|
isLoading: o
|
|
842
868
|
}) => {
|
|
843
|
-
const { data: { folders:
|
|
869
|
+
const { data: { folders: n = [] } = {}, isFetching: a } = Ft(
|
|
844
870
|
// TODO: this is major overkill, we are only using label, name and id
|
|
845
871
|
// We add a patch field that allows us to specify what ws message changes should cause an update to this query
|
|
846
872
|
// @ts-expect-error - patch is not part of the query args
|
|
847
873
|
{ projectName: t, patch: ["id", "name", "label"] },
|
|
848
874
|
{ skip: !t || o }
|
|
849
|
-
), r =
|
|
875
|
+
), r = Ts(
|
|
850
876
|
{ projectName: t || "", isLoading: o },
|
|
851
877
|
a
|
|
852
|
-
), { data: c } =
|
|
878
|
+
), { data: c } = At(
|
|
853
879
|
{ productId: e.product?.id || "", projectName: t },
|
|
854
|
-
{ skip:
|
|
855
|
-
), m =
|
|
880
|
+
{ skip: s !== "version" || !e.product?.id }
|
|
881
|
+
), m = C(
|
|
856
882
|
() => c?.project.product?.versionList ? [...c.project.product?.versionList || []].sort((g, b) => g.name === "HERO" ? -1 : b.name === "HERO" ? 1 : b.name.localeCompare(g.name)).map((g) => ({
|
|
857
883
|
type: "version",
|
|
858
884
|
label: g.name,
|
|
859
885
|
id: g.id
|
|
860
886
|
})) : [],
|
|
861
887
|
[c]
|
|
862
|
-
), f =
|
|
863
|
-
() => new Map(
|
|
864
|
-
[
|
|
888
|
+
), f = C(
|
|
889
|
+
() => new Map(n.map((g) => [g.id, g])),
|
|
890
|
+
[n]
|
|
865
891
|
);
|
|
866
|
-
return [
|
|
867
|
-
() => r ? [] :
|
|
868
|
-
[r,
|
|
892
|
+
return [C(
|
|
893
|
+
() => r ? [] : an(e, f),
|
|
894
|
+
[r, n, e]
|
|
869
895
|
), m];
|
|
870
|
-
},
|
|
871
|
-
let t = Object.entries(e).filter(([
|
|
872
|
-
const o = new Map(t.map((
|
|
896
|
+
}, ot = (e, s) => {
|
|
897
|
+
let t = Object.entries(e).filter(([n]) => s ? s.includes(n) : !0).map(([, n]) => n?.statuses || []).flat();
|
|
898
|
+
const o = new Map(t.map((n) => [n.name, n]));
|
|
873
899
|
return Array.from(o.values());
|
|
874
|
-
},
|
|
900
|
+
}, it = ({
|
|
875
901
|
scope: e = "dashboard",
|
|
876
|
-
entities:
|
|
902
|
+
entities: s,
|
|
877
903
|
entityType: t,
|
|
878
904
|
thumbnailHash: o,
|
|
879
|
-
projectName:
|
|
905
|
+
projectName: n,
|
|
880
906
|
projectInfo: a,
|
|
881
907
|
annotations: r,
|
|
882
908
|
removeAnnotation: c,
|
|
883
909
|
exportAnnotationComposite: m,
|
|
884
910
|
...f
|
|
885
911
|
}) => {
|
|
886
|
-
const p = { annotations: r, removeAnnotation: c, exportAnnotationComposite: m }, { user: g } =
|
|
912
|
+
const p = { annotations: r, removeAnnotation: c, exportAnnotationComposite: m }, { user: g } = K(), b = g.name || "", x = g.attrib?.fullName || "";
|
|
887
913
|
return /* @__PURE__ */ k(
|
|
888
|
-
|
|
914
|
+
tt,
|
|
889
915
|
{
|
|
890
916
|
scope: e,
|
|
891
|
-
entities:
|
|
892
|
-
projectName:
|
|
917
|
+
entities: s,
|
|
918
|
+
projectName: n,
|
|
893
919
|
entityType: t,
|
|
894
920
|
projectInfo: a,
|
|
895
921
|
userName: b,
|
|
@@ -897,43 +923,43 @@ const An = T(ze)`
|
|
|
897
923
|
...p,
|
|
898
924
|
...f,
|
|
899
925
|
children: [
|
|
900
|
-
/* @__PURE__ */ i(
|
|
901
|
-
/* @__PURE__ */ i(
|
|
926
|
+
/* @__PURE__ */ i(Ns, { ...f, statuses: f.statuses }),
|
|
927
|
+
/* @__PURE__ */ i(Es, {})
|
|
902
928
|
]
|
|
903
929
|
}
|
|
904
930
|
);
|
|
905
|
-
},
|
|
931
|
+
}, rn = ({
|
|
906
932
|
children: e,
|
|
907
|
-
scope:
|
|
933
|
+
scope: s = "dashboard",
|
|
908
934
|
entities: t,
|
|
909
935
|
entityType: o,
|
|
910
|
-
projectName:
|
|
936
|
+
projectName: n,
|
|
911
937
|
projectInfo: a,
|
|
912
938
|
annotations: r,
|
|
913
939
|
removeAnnotation: c,
|
|
914
940
|
exportAnnotationComposite: m,
|
|
915
941
|
...f
|
|
916
942
|
}) => {
|
|
917
|
-
const p = { annotations: r, removeAnnotation: c, exportAnnotationComposite: m }, { user: g } =
|
|
943
|
+
const p = { annotations: r, removeAnnotation: c, exportAnnotationComposite: m }, { user: g } = K(), b = g?.name ?? "", x = g?.attrib?.fullName ?? "", [$, U] = X(null);
|
|
918
944
|
return /* @__PURE__ */ i(
|
|
919
|
-
|
|
945
|
+
tt,
|
|
920
946
|
{
|
|
921
|
-
scope:
|
|
947
|
+
scope: s,
|
|
922
948
|
entities: t,
|
|
923
|
-
projectName:
|
|
949
|
+
projectName: n,
|
|
924
950
|
entityType: o,
|
|
925
951
|
projectInfo: a,
|
|
926
952
|
userName: b,
|
|
927
953
|
userFullName: x,
|
|
928
954
|
...p,
|
|
929
|
-
editingId:
|
|
930
|
-
setEditingId:
|
|
955
|
+
editingId: $,
|
|
956
|
+
setEditingId: U,
|
|
931
957
|
...f,
|
|
932
958
|
children: e
|
|
933
959
|
}
|
|
934
960
|
);
|
|
935
|
-
},
|
|
936
|
-
if (!e || Object.keys(e).length === 0 || !
|
|
961
|
+
}, rt = (e, s) => {
|
|
962
|
+
if (!e || Object.keys(e).length === 0 || !s?.length)
|
|
937
963
|
return {
|
|
938
964
|
folderTypes: [],
|
|
939
965
|
taskTypes: [],
|
|
@@ -942,8 +968,8 @@ const An = T(ze)`
|
|
|
942
968
|
linkTypes: [],
|
|
943
969
|
productTypes: []
|
|
944
970
|
};
|
|
945
|
-
if (
|
|
946
|
-
const a = e[
|
|
971
|
+
if (s.length === 1) {
|
|
972
|
+
const a = e[s[0]];
|
|
947
973
|
return {
|
|
948
974
|
folderTypes: a?.folderTypes || [],
|
|
949
975
|
taskTypes: a?.taskTypes || [],
|
|
@@ -958,7 +984,7 @@ const An = T(ze)`
|
|
|
958
984
|
return a.flat().forEach((c) => {
|
|
959
985
|
c && c.name && (r[c.name] = c);
|
|
960
986
|
}), Object.values(r);
|
|
961
|
-
},
|
|
987
|
+
}, n = {
|
|
962
988
|
statuses: [],
|
|
963
989
|
folderTypes: [],
|
|
964
990
|
taskTypes: [],
|
|
@@ -966,33 +992,33 @@ const An = T(ze)`
|
|
|
966
992
|
linkTypes: [],
|
|
967
993
|
productTypes: []
|
|
968
994
|
};
|
|
969
|
-
return
|
|
995
|
+
return s.forEach((a) => {
|
|
970
996
|
const r = e[a];
|
|
971
|
-
r && (Object.keys(
|
|
972
|
-
c === "productTypes" ? r.productTypes &&
|
|
997
|
+
r && (Object.keys(n).forEach((c) => {
|
|
998
|
+
c === "productTypes" ? r.productTypes && n[c].push(r) : Array.isArray(r[c]) && n[c].push(r[c]);
|
|
973
999
|
}), Object.keys(r).forEach((c) => {
|
|
974
|
-
c in
|
|
1000
|
+
c in n || (t[c] = r[c]);
|
|
975
1001
|
}));
|
|
976
|
-
}), Object.keys(
|
|
977
|
-
(a === "productTypes" ||
|
|
1002
|
+
}), Object.keys(n).forEach((a) => {
|
|
1003
|
+
(a === "productTypes" || n[a].length > 0) && (t[a] = o(n[a]));
|
|
978
1004
|
}), t;
|
|
979
|
-
},
|
|
1005
|
+
}, ln = T.div`
|
|
980
1006
|
display: flex;
|
|
981
1007
|
align-items: center;
|
|
982
1008
|
padding: 4px 8px;
|
|
983
1009
|
gap: var(--base-gap-small);
|
|
984
|
-
`,
|
|
1010
|
+
`, cn = T.span`
|
|
985
1011
|
font-weight: 600;
|
|
986
1012
|
user-select: none;
|
|
987
|
-
`,
|
|
1013
|
+
`, dn = T.div`
|
|
988
1014
|
display: flex;
|
|
989
1015
|
gap: var(--base-gap-small);
|
|
990
|
-
`,
|
|
1016
|
+
`, Pe = T(Y)`
|
|
991
1017
|
background-color: unset;
|
|
992
1018
|
&.hasIcon {
|
|
993
1019
|
padding: 4px;
|
|
994
1020
|
}
|
|
995
|
-
`,
|
|
1021
|
+
`, un = T.div`
|
|
996
1022
|
display: flex;
|
|
997
1023
|
align-items: center;
|
|
998
1024
|
gap: var(--base-gap-small);
|
|
@@ -1009,10 +1035,10 @@ const An = T(ze)`
|
|
|
1009
1035
|
box-shadow: 0 0 0 1px var(--md-sys-color-primary-container);
|
|
1010
1036
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
1011
1037
|
}
|
|
1012
|
-
`,
|
|
1038
|
+
`, pn = T(ms)`
|
|
1013
1039
|
width: 28px;
|
|
1014
1040
|
height: 28px;
|
|
1015
|
-
`,
|
|
1041
|
+
`, hn = T.input`
|
|
1016
1042
|
flex: 1;
|
|
1017
1043
|
min-width: 0;
|
|
1018
1044
|
border: none;
|
|
@@ -1025,58 +1051,58 @@ const An = T(ze)`
|
|
|
1025
1051
|
&::placeholder {
|
|
1026
1052
|
color: var(--md-sys-color-outline);
|
|
1027
1053
|
}
|
|
1028
|
-
`,
|
|
1054
|
+
`, mn = T(Y)`
|
|
1029
1055
|
background-color: unset;
|
|
1030
1056
|
min-width: unset;
|
|
1031
1057
|
&.hasIcon {
|
|
1032
1058
|
padding: 2px;
|
|
1033
1059
|
}
|
|
1034
|
-
`,
|
|
1035
|
-
if (
|
|
1036
|
-
const
|
|
1037
|
-
return e.conditions?.map((t) =>
|
|
1038
|
-
},
|
|
1060
|
+
`, Oe = (e) => !!e && "key" in e, be = (e, s) => Oe(e) ? e.key === s : !!e.conditions?.some((t) => be(t, s)), Ae = (e) => {
|
|
1061
|
+
if (Oe(e)) return String(e.value || "");
|
|
1062
|
+
const s = e.operator === "or" ? ", " : ".";
|
|
1063
|
+
return e.conditions?.map((t) => Ae(t)).join(s) || "";
|
|
1064
|
+
}, lt = (e, s, t) => {
|
|
1039
1065
|
const o = e.split(",").map((r) => r.trim()).filter(Boolean);
|
|
1040
1066
|
if (o.length > 1)
|
|
1041
1067
|
return {
|
|
1042
1068
|
operator: "or",
|
|
1043
|
-
conditions: o.map((r) =>
|
|
1069
|
+
conditions: o.map((r) => lt(r, s, t))
|
|
1044
1070
|
};
|
|
1045
|
-
const
|
|
1046
|
-
if (!
|
|
1071
|
+
const n = o[0] || e.trim();
|
|
1072
|
+
if (!n || n === "," || n === ".")
|
|
1047
1073
|
return {
|
|
1048
|
-
key:
|
|
1074
|
+
key: s,
|
|
1049
1075
|
operator: t,
|
|
1050
1076
|
value: ""
|
|
1051
1077
|
};
|
|
1052
|
-
const a =
|
|
1078
|
+
const a = n.split(".").map((r) => r.trim()).filter(Boolean);
|
|
1053
1079
|
return a.length > 1 ? {
|
|
1054
1080
|
operator: "and",
|
|
1055
1081
|
conditions: a.map((r) => ({
|
|
1056
|
-
key:
|
|
1082
|
+
key: s,
|
|
1057
1083
|
operator: t,
|
|
1058
1084
|
value: r
|
|
1059
1085
|
}))
|
|
1060
1086
|
} : {
|
|
1061
|
-
key:
|
|
1087
|
+
key: s,
|
|
1062
1088
|
operator: t,
|
|
1063
1089
|
value: a[0] || ""
|
|
1064
1090
|
};
|
|
1065
|
-
},
|
|
1091
|
+
}, gn = ({
|
|
1066
1092
|
label: e,
|
|
1067
|
-
filters:
|
|
1093
|
+
filters: s,
|
|
1068
1094
|
currentFilter: t,
|
|
1069
1095
|
onFilterChange: o,
|
|
1070
|
-
isLoading:
|
|
1096
|
+
isLoading: n
|
|
1071
1097
|
}) => {
|
|
1072
|
-
const [a, r] =
|
|
1073
|
-
|
|
1098
|
+
const [a, r] = X(null), [c, m] = X(""), f = Z(null), p = (d) => typeof d == "object" && d !== null && !Array.isArray(d);
|
|
1099
|
+
B(() => {
|
|
1074
1100
|
a && f.current && f.current.focus();
|
|
1075
|
-
}, [a]),
|
|
1101
|
+
}, [a]), B(() => {
|
|
1076
1102
|
if (a && p(t)) {
|
|
1077
1103
|
if (document.activeElement === f.current) return;
|
|
1078
|
-
const d = t.conditions?.find((u) =>
|
|
1079
|
-
m(d ?
|
|
1104
|
+
const d = t.conditions?.find((u) => be(u, a));
|
|
1105
|
+
m(d ? Ae(d) : "");
|
|
1080
1106
|
}
|
|
1081
1107
|
}, [a, t]);
|
|
1082
1108
|
const g = (d, u) => {
|
|
@@ -1088,62 +1114,62 @@ const An = T(ze)`
|
|
|
1088
1114
|
...t,
|
|
1089
1115
|
conditions: h,
|
|
1090
1116
|
operator: t.operator || "and"
|
|
1091
|
-
},
|
|
1117
|
+
}, j = String(d.id), E = h.findIndex((w) => be(w, j)), y = d.type || "boolean";
|
|
1092
1118
|
if (y === "boolean")
|
|
1093
|
-
E > -1 ? h.splice(E, 1) : h.push({ key:
|
|
1119
|
+
E > -1 ? h.splice(E, 1) : h.push({ key: j, operator: d.operator || "eq", value: !0 });
|
|
1094
1120
|
else if (y === "enum") {
|
|
1095
1121
|
const w = Array.isArray(u) ? u : [u];
|
|
1096
1122
|
if (w.length === 0 || w.length === 1 && w[0] === void 0)
|
|
1097
1123
|
E > -1 && h.splice(E, 1);
|
|
1098
1124
|
else {
|
|
1099
|
-
const
|
|
1100
|
-
key:
|
|
1125
|
+
const R = {
|
|
1126
|
+
key: j,
|
|
1101
1127
|
operator: d.operator || "in",
|
|
1102
1128
|
value: w
|
|
1103
1129
|
};
|
|
1104
|
-
E > -1 ? h[E] =
|
|
1130
|
+
E > -1 ? h[E] = R : h.push(R);
|
|
1105
1131
|
}
|
|
1106
1132
|
} else if (y === "search") {
|
|
1107
1133
|
const w = typeof u == "string" ? u : "";
|
|
1108
1134
|
if (!w)
|
|
1109
1135
|
E > -1 && h.splice(E, 1);
|
|
1110
1136
|
else {
|
|
1111
|
-
const
|
|
1112
|
-
E > -1 ? h[E] =
|
|
1137
|
+
const R = lt(w, j, d.operator || "like");
|
|
1138
|
+
E > -1 ? h[E] = R : h.push(R);
|
|
1113
1139
|
}
|
|
1114
1140
|
}
|
|
1115
1141
|
o(N);
|
|
1116
1142
|
}, b = (d) => {
|
|
1117
1143
|
const u = String(d.id);
|
|
1118
1144
|
if (a !== u && (r(u), p(t))) {
|
|
1119
|
-
const h = t.conditions?.find((N) =>
|
|
1120
|
-
m(h ?
|
|
1145
|
+
const h = t.conditions?.find((N) => be(N, u));
|
|
1146
|
+
m(h ? Ae(h) : "");
|
|
1121
1147
|
}
|
|
1122
1148
|
}, x = (d, u) => {
|
|
1123
1149
|
m(u), g(d, u);
|
|
1124
|
-
},
|
|
1150
|
+
}, $ = (d) => {
|
|
1125
1151
|
m(""), r(null), g(d, "");
|
|
1126
|
-
},
|
|
1127
|
-
(h) =>
|
|
1152
|
+
}, U = (d) => p(t) ? t.conditions?.some((u) => be(u, String(d.id))) : d.id === t, A = (d) => p(t) ? t.conditions?.find(
|
|
1153
|
+
(h) => Oe(h) && h.key === String(d.id)
|
|
1128
1154
|
)?.value || [] : [];
|
|
1129
|
-
return /* @__PURE__ */ k(
|
|
1130
|
-
/* @__PURE__ */ i(
|
|
1131
|
-
/* @__PURE__ */ i(
|
|
1132
|
-
/* @__PURE__ */ i(
|
|
1133
|
-
const u =
|
|
1155
|
+
return /* @__PURE__ */ k(ln, { className: le("panel-tabs", { loading: n }), children: [
|
|
1156
|
+
/* @__PURE__ */ i(cn, { className: "panel-header-label", children: e }),
|
|
1157
|
+
/* @__PURE__ */ i(qe, {}),
|
|
1158
|
+
/* @__PURE__ */ i(dn, { className: "panel-header-filters", children: s.map((d) => {
|
|
1159
|
+
const u = U(d), h = d.type || "boolean";
|
|
1134
1160
|
if (h === "enum")
|
|
1135
1161
|
return /* @__PURE__ */ i(
|
|
1136
|
-
|
|
1162
|
+
pn,
|
|
1137
1163
|
{
|
|
1138
1164
|
options: d.options || [],
|
|
1139
|
-
value:
|
|
1165
|
+
value: A(d),
|
|
1140
1166
|
onChange: (N) => g(d, N),
|
|
1141
1167
|
isEditing: !0,
|
|
1142
1168
|
autoOpen: !1,
|
|
1143
1169
|
align: "right",
|
|
1144
1170
|
type: "list_of_strings",
|
|
1145
1171
|
valueTemplate: () => /* @__PURE__ */ i(
|
|
1146
|
-
|
|
1172
|
+
Pe,
|
|
1147
1173
|
{
|
|
1148
1174
|
selected: u,
|
|
1149
1175
|
icon: d.icon,
|
|
@@ -1159,12 +1185,12 @@ const An = T(ze)`
|
|
|
1159
1185
|
if (h === "search") {
|
|
1160
1186
|
const N = a === String(d.id);
|
|
1161
1187
|
return /* @__PURE__ */ k(
|
|
1162
|
-
|
|
1188
|
+
un,
|
|
1163
1189
|
{
|
|
1164
|
-
className:
|
|
1190
|
+
className: le("panel-filter", "panel-filter-search", { expanded: N }),
|
|
1165
1191
|
children: [
|
|
1166
1192
|
/* @__PURE__ */ i(
|
|
1167
|
-
|
|
1193
|
+
Pe,
|
|
1168
1194
|
{
|
|
1169
1195
|
selected: u || N,
|
|
1170
1196
|
onClick: () => b(d),
|
|
@@ -1173,24 +1199,24 @@ const An = T(ze)`
|
|
|
1173
1199
|
"data-tooltip-delay": 0
|
|
1174
1200
|
}
|
|
1175
1201
|
),
|
|
1176
|
-
N && /* @__PURE__ */ k(
|
|
1202
|
+
N && /* @__PURE__ */ k(xe, { children: [
|
|
1177
1203
|
/* @__PURE__ */ i(
|
|
1178
|
-
|
|
1204
|
+
hn,
|
|
1179
1205
|
{
|
|
1180
1206
|
ref: f,
|
|
1181
1207
|
value: c,
|
|
1182
|
-
onChange: (
|
|
1183
|
-
onKeyDown: (
|
|
1184
|
-
|
|
1208
|
+
onChange: (j) => x(d, j.target.value),
|
|
1209
|
+
onKeyDown: (j) => {
|
|
1210
|
+
j.key === "Escape" && $(d);
|
|
1185
1211
|
},
|
|
1186
1212
|
placeholder: d.placeholder || "Search..."
|
|
1187
1213
|
}
|
|
1188
1214
|
),
|
|
1189
1215
|
/* @__PURE__ */ i(
|
|
1190
|
-
|
|
1216
|
+
mn,
|
|
1191
1217
|
{
|
|
1192
1218
|
icon: "close",
|
|
1193
|
-
onClick: () =>
|
|
1219
|
+
onClick: () => $(d),
|
|
1194
1220
|
"data-tooltip": "Clear",
|
|
1195
1221
|
"data-tooltip-delay": 0
|
|
1196
1222
|
}
|
|
@@ -1202,7 +1228,7 @@ const An = T(ze)`
|
|
|
1202
1228
|
);
|
|
1203
1229
|
}
|
|
1204
1230
|
return /* @__PURE__ */ i(
|
|
1205
|
-
|
|
1231
|
+
Pe,
|
|
1206
1232
|
{
|
|
1207
1233
|
selected: u,
|
|
1208
1234
|
onClick: () => g(d),
|
|
@@ -1215,21 +1241,21 @@ const An = T(ze)`
|
|
|
1215
1241
|
);
|
|
1216
1242
|
}) })
|
|
1217
1243
|
] });
|
|
1218
|
-
},
|
|
1219
|
-
const t = [], o = [],
|
|
1244
|
+
}, ct = ["done", "isDone"], dt = (e) => !!e && "key" in e, fn = (e, s) => {
|
|
1245
|
+
const t = [], o = [], n = (a) => {
|
|
1220
1246
|
if (!a) return;
|
|
1221
|
-
if (
|
|
1247
|
+
if (dt(a)) {
|
|
1222
1248
|
const c = a.key;
|
|
1223
1249
|
if (c === "search") {
|
|
1224
1250
|
const p = String(a.value ?? "");
|
|
1225
1251
|
p && o.push({ id: p, label: p });
|
|
1226
1252
|
return;
|
|
1227
1253
|
}
|
|
1228
|
-
const m =
|
|
1254
|
+
const m = s.find((p) => p.id === c);
|
|
1229
1255
|
if (!m) return;
|
|
1230
|
-
if (
|
|
1256
|
+
if (ct.includes(c)) {
|
|
1231
1257
|
a.value !== void 0 && t.push({
|
|
1232
|
-
id:
|
|
1258
|
+
id: Ee(c),
|
|
1233
1259
|
label: m.label,
|
|
1234
1260
|
icon: m.icon,
|
|
1235
1261
|
type: "boolean",
|
|
@@ -1241,7 +1267,7 @@ const An = T(ze)`
|
|
|
1241
1267
|
if (m.type === "datetime") {
|
|
1242
1268
|
const p = Array.isArray(a.value) ? a.value[0] : a.value;
|
|
1243
1269
|
t.push({
|
|
1244
|
-
id:
|
|
1270
|
+
id: Ee(c),
|
|
1245
1271
|
label: m.label,
|
|
1246
1272
|
type: "datetime",
|
|
1247
1273
|
icon: m.icon,
|
|
@@ -1258,7 +1284,7 @@ const An = T(ze)`
|
|
|
1258
1284
|
}
|
|
1259
1285
|
const f = Array.isArray(a.value) ? a.value : [a.value];
|
|
1260
1286
|
t.push({
|
|
1261
|
-
id:
|
|
1287
|
+
id: Ee(c),
|
|
1262
1288
|
label: m.label,
|
|
1263
1289
|
type: m.type,
|
|
1264
1290
|
icon: m.icon,
|
|
@@ -1270,33 +1296,33 @@ const An = T(ze)`
|
|
|
1270
1296
|
});
|
|
1271
1297
|
return;
|
|
1272
1298
|
}
|
|
1273
|
-
const r =
|
|
1299
|
+
const r = Is(a, s);
|
|
1274
1300
|
if (r) {
|
|
1275
1301
|
t.push(r);
|
|
1276
1302
|
return;
|
|
1277
1303
|
}
|
|
1278
|
-
a.conditions?.forEach(
|
|
1304
|
+
a.conditions?.forEach(n);
|
|
1279
1305
|
};
|
|
1280
|
-
return e?.conditions?.forEach(
|
|
1281
|
-
},
|
|
1282
|
-
const
|
|
1306
|
+
return e?.conditions?.forEach(n), o.length && t.push({ id: Ke, label: "", values: o }), t;
|
|
1307
|
+
}, bn = (e) => {
|
|
1308
|
+
const s = [], t = [];
|
|
1283
1309
|
return e.forEach((o) => {
|
|
1284
|
-
const
|
|
1310
|
+
const n = xt(o.id), a = (o.values || []).map((r) => r.id);
|
|
1285
1311
|
if (a.length)
|
|
1286
|
-
if (
|
|
1312
|
+
if (n === Ke)
|
|
1287
1313
|
a.forEach(
|
|
1288
1314
|
(r) => t.push({ key: "search", operator: "like", value: String(r) })
|
|
1289
1315
|
);
|
|
1290
|
-
else if (
|
|
1316
|
+
else if (ct.includes(n)) {
|
|
1291
1317
|
const r = a[0] === "true";
|
|
1292
|
-
|
|
1318
|
+
s.push({ key: n, operator: "eq", value: r });
|
|
1293
1319
|
} else if (o.type === "datetime") {
|
|
1294
|
-
const r =
|
|
1295
|
-
r &&
|
|
1320
|
+
const r = Ps(n, o);
|
|
1321
|
+
r && s.push(r);
|
|
1296
1322
|
} else
|
|
1297
|
-
|
|
1298
|
-
}), t.length === 1 ?
|
|
1299
|
-
},
|
|
1323
|
+
s.push({ key: n, operator: "in", value: a.map(String) });
|
|
1324
|
+
}), t.length === 1 ? s.push(t[0]) : t.length > 1 && s.push({ operator: "or", conditions: t }), { operator: "and", conditions: s };
|
|
1325
|
+
}, ut = (e) => dt(e) ? e.key !== "search" || typeof e.value != "string" ? e : It(e.value, (s) => ({ ...e, value: s })) ?? e : { ...e, conditions: e.conditions?.map(ut) }, vn = T.div`
|
|
1300
1326
|
padding: 4px 8px;
|
|
1301
1327
|
padding-bottom: 0;
|
|
1302
1328
|
|
|
@@ -1304,16 +1330,16 @@ const An = T(ze)`
|
|
|
1304
1330
|
opacity: 0.5;
|
|
1305
1331
|
pointer-events: none;
|
|
1306
1332
|
}
|
|
1307
|
-
`,
|
|
1333
|
+
`, yn = ({
|
|
1308
1334
|
subtasksFilter: e,
|
|
1309
|
-
setSubtasksFilter:
|
|
1335
|
+
setSubtasksFilter: s,
|
|
1310
1336
|
users: t,
|
|
1311
1337
|
isLoading: o,
|
|
1312
|
-
totalCount:
|
|
1338
|
+
totalCount: n = 0,
|
|
1313
1339
|
doneCount: a = 0,
|
|
1314
1340
|
onSearchTextChange: r
|
|
1315
1341
|
}) => {
|
|
1316
|
-
const c =
|
|
1342
|
+
const c = C(
|
|
1317
1343
|
() => [
|
|
1318
1344
|
{
|
|
1319
1345
|
id: "isDone",
|
|
@@ -1357,38 +1383,38 @@ const An = T(ze)`
|
|
|
1357
1383
|
// },
|
|
1358
1384
|
],
|
|
1359
1385
|
[t]
|
|
1360
|
-
), m =
|
|
1361
|
-
|
|
1386
|
+
), m = C(() => fn(e, c), [e, c]), [f, p] = X(m), g = Z(null), b = Fs();
|
|
1387
|
+
B(() => {
|
|
1362
1388
|
p(m);
|
|
1363
1389
|
}, [JSON.stringify(m)]);
|
|
1364
1390
|
const x = (u) => {
|
|
1365
|
-
const h =
|
|
1366
|
-
|
|
1367
|
-
},
|
|
1391
|
+
const h = bn(u);
|
|
1392
|
+
s(h), r?.("");
|
|
1393
|
+
}, $ = (u) => {
|
|
1368
1394
|
b.wrapFilterChange(u, f, p);
|
|
1369
|
-
},
|
|
1395
|
+
}, U = (u, h) => {
|
|
1370
1396
|
h || r?.(u);
|
|
1371
1397
|
};
|
|
1372
|
-
let
|
|
1373
|
-
|
|
1374
|
-
const d =
|
|
1375
|
-
() => [{ id: "isDone", label:
|
|
1376
|
-
[
|
|
1398
|
+
let A = "";
|
|
1399
|
+
n > 0 && (A = `${a}/${n}`);
|
|
1400
|
+
const d = C(
|
|
1401
|
+
() => [{ id: "isDone", label: A, tooltip: "Status" }],
|
|
1402
|
+
[A]
|
|
1377
1403
|
);
|
|
1378
|
-
return /* @__PURE__ */ k(
|
|
1404
|
+
return /* @__PURE__ */ k(vn, { className: o ? "loading" : void 0, children: [
|
|
1379
1405
|
/* @__PURE__ */ i(
|
|
1380
|
-
|
|
1406
|
+
St,
|
|
1381
1407
|
{
|
|
1382
1408
|
ref: g,
|
|
1383
1409
|
compact: !0,
|
|
1384
1410
|
options: c,
|
|
1385
1411
|
filters: f,
|
|
1386
|
-
onChange:
|
|
1412
|
+
onChange: $,
|
|
1387
1413
|
onFinish: x,
|
|
1388
1414
|
enableGlobalSearch: !0,
|
|
1389
1415
|
enableMultipleSameFilters: !1,
|
|
1390
1416
|
enableAutosuggestion: !1,
|
|
1391
|
-
onSearchChange:
|
|
1417
|
+
onSearchChange: U,
|
|
1392
1418
|
quickActions: d,
|
|
1393
1419
|
placeholder: "Search and filter subtasks...",
|
|
1394
1420
|
pt: {
|
|
@@ -1406,7 +1432,7 @@ const An = T(ze)`
|
|
|
1406
1432
|
}
|
|
1407
1433
|
),
|
|
1408
1434
|
/* @__PURE__ */ i(
|
|
1409
|
-
|
|
1435
|
+
Ds,
|
|
1410
1436
|
{
|
|
1411
1437
|
isOpen: !!b.customRangeFilterId,
|
|
1412
1438
|
header: c.find((u) => u.id === b.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
|
|
@@ -1419,42 +1445,42 @@ const An = T(ze)`
|
|
|
1419
1445
|
}
|
|
1420
1446
|
)
|
|
1421
1447
|
] });
|
|
1422
|
-
},
|
|
1423
|
-
const [
|
|
1424
|
-
let b =
|
|
1448
|
+
}, kn = ({ ...e }) => {
|
|
1449
|
+
const [s, t] = X({}), [o, n] = X(""), [a, r] = X([]), { dispatch: c } = K(), { data: m = [] } = Je({ projectName: e.projectName }), f = e.subtasks?.length || 0, p = e.subtasks?.filter((b) => b.isDone).length || 0, g = C(() => {
|
|
1450
|
+
let b = s;
|
|
1425
1451
|
if (o) {
|
|
1426
1452
|
const x = { key: "search", operator: "like", value: o };
|
|
1427
1453
|
b = {
|
|
1428
|
-
...
|
|
1429
|
-
conditions: [...
|
|
1454
|
+
...s,
|
|
1455
|
+
conditions: [...s.conditions || [], x],
|
|
1430
1456
|
operator: "and"
|
|
1431
1457
|
};
|
|
1432
1458
|
}
|
|
1433
|
-
return
|
|
1434
|
-
}, [
|
|
1435
|
-
return /* @__PURE__ */ k(
|
|
1459
|
+
return As(ut(b));
|
|
1460
|
+
}, [s, o]);
|
|
1461
|
+
return /* @__PURE__ */ k(xe, { children: [
|
|
1436
1462
|
/* @__PURE__ */ i(
|
|
1437
|
-
|
|
1463
|
+
gn,
|
|
1438
1464
|
{
|
|
1439
1465
|
label: `Subtasks (${f})`,
|
|
1440
1466
|
filters: [],
|
|
1441
|
-
currentFilter:
|
|
1467
|
+
currentFilter: s,
|
|
1442
1468
|
onFilterChange: t
|
|
1443
1469
|
}
|
|
1444
1470
|
),
|
|
1445
1471
|
/* @__PURE__ */ i(
|
|
1446
|
-
|
|
1472
|
+
yn,
|
|
1447
1473
|
{
|
|
1448
|
-
subtasksFilter:
|
|
1474
|
+
subtasksFilter: s,
|
|
1449
1475
|
setSubtasksFilter: t,
|
|
1450
1476
|
users: m,
|
|
1451
1477
|
totalCount: f,
|
|
1452
1478
|
doneCount: p,
|
|
1453
|
-
onSearchTextChange:
|
|
1479
|
+
onSearchTextChange: n
|
|
1454
1480
|
}
|
|
1455
1481
|
),
|
|
1456
1482
|
/* @__PURE__ */ i(
|
|
1457
|
-
|
|
1483
|
+
gs,
|
|
1458
1484
|
{
|
|
1459
1485
|
...e,
|
|
1460
1486
|
style: { padding: 8, height: "unset" },
|
|
@@ -1467,14 +1493,14 @@ const An = T(ze)`
|
|
|
1467
1493
|
}
|
|
1468
1494
|
)
|
|
1469
1495
|
] });
|
|
1470
|
-
},
|
|
1496
|
+
}, wn = ["product", "representation"], xn = ({
|
|
1471
1497
|
entityType: e,
|
|
1472
|
-
entitySubTypes:
|
|
1498
|
+
entitySubTypes: s = [],
|
|
1473
1499
|
// entities is data we already have from kanban
|
|
1474
1500
|
entitiesData: t = [],
|
|
1475
1501
|
// entityIds are used to get the full details data for the entities
|
|
1476
1502
|
entities: o = [],
|
|
1477
|
-
tagsOptions:
|
|
1503
|
+
tagsOptions: n = [],
|
|
1478
1504
|
disabledStatuses: a,
|
|
1479
1505
|
projectUsers: r,
|
|
1480
1506
|
disabledProjectUsers: c,
|
|
@@ -1484,320 +1510,320 @@ const An = T(ze)`
|
|
|
1484
1510
|
isSlideOut: g = !1,
|
|
1485
1511
|
style: b = {},
|
|
1486
1512
|
scope: x,
|
|
1487
|
-
isCompact:
|
|
1488
|
-
onClose:
|
|
1489
|
-
onWatchersUpdate:
|
|
1513
|
+
isCompact: $ = !1,
|
|
1514
|
+
onClose: U,
|
|
1515
|
+
onWatchersUpdate: A,
|
|
1490
1516
|
onOpenViewer: d,
|
|
1491
1517
|
onEntityFocus: u,
|
|
1492
1518
|
onOpen: h,
|
|
1493
1519
|
onUriOpen: N,
|
|
1494
1520
|
// when the details panel is opened from uri
|
|
1495
1521
|
// annotations
|
|
1496
|
-
annotations:
|
|
1522
|
+
annotations: j,
|
|
1497
1523
|
removeAnnotation: E,
|
|
1498
1524
|
exportAnnotationComposite: y,
|
|
1499
1525
|
entityListId: w,
|
|
1500
|
-
guestCategories:
|
|
1526
|
+
guestCategories: R = {},
|
|
1501
1527
|
entityListsContext: V,
|
|
1502
|
-
resolveVersionJump:
|
|
1528
|
+
resolveVersionJump: M
|
|
1503
1529
|
}) => {
|
|
1504
1530
|
const {
|
|
1505
|
-
closeSlideOut:
|
|
1506
|
-
openPip:
|
|
1531
|
+
closeSlideOut: ee,
|
|
1532
|
+
openPip: te,
|
|
1507
1533
|
user: se,
|
|
1508
|
-
isGuest:
|
|
1509
|
-
entities:
|
|
1510
|
-
setEntities:
|
|
1511
|
-
slideOut:
|
|
1512
|
-
useSearchParams:
|
|
1513
|
-
SubtasksManager:
|
|
1514
|
-
useNavigate:
|
|
1515
|
-
} =
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
g ?
|
|
1519
|
-
),
|
|
1520
|
-
h && !
|
|
1521
|
-
}, []),
|
|
1522
|
-
|
|
1523
|
-
}, [
|
|
1524
|
-
o.length &&
|
|
1525
|
-
}, [o,
|
|
1526
|
-
const
|
|
1527
|
-
() =>
|
|
1528
|
-
[f,
|
|
1529
|
-
),
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
}, [
|
|
1533
|
-
let
|
|
1534
|
+
isGuest: ne,
|
|
1535
|
+
entities: P,
|
|
1536
|
+
setEntities: ae,
|
|
1537
|
+
slideOut: W,
|
|
1538
|
+
useSearchParams: ce,
|
|
1539
|
+
SubtasksManager: oe,
|
|
1540
|
+
useNavigate: pe
|
|
1541
|
+
} = K(), { currentTab: L, setTab: F, isFeed: de } = is(x), [he, ve] = ce(), ye = Z(!1), D = P?.entityType ?? e, me = P?.entities ?? o, G = P?.entitySubTypes ?? s, Se = P?.entities ? [] : t, J = P?.entities ? P.entities.map((v) => v.projectName) : p;
|
|
1542
|
+
es(
|
|
1543
|
+
D ? me.map((v) => ({ ...v, entityType: D })) : [],
|
|
1544
|
+
g ? He.slideOut : He.detailsPanel
|
|
1545
|
+
), B(() => {
|
|
1546
|
+
h && !ye.current && (ye.current = !0, h());
|
|
1547
|
+
}, []), B(() => {
|
|
1548
|
+
wn.includes(D) && L !== "details" && F("details");
|
|
1549
|
+
}, [D, L, F]), B(() => {
|
|
1550
|
+
o.length && P && ae(null);
|
|
1551
|
+
}, [o, P, ae]);
|
|
1552
|
+
const ie = C(
|
|
1553
|
+
() => rt(f, J),
|
|
1554
|
+
[f, J]
|
|
1555
|
+
), re = C(() => nt(ie), [ie]);
|
|
1556
|
+
B(() => {
|
|
1557
|
+
L === "files" && D !== "version" && F("feed"), L === "subtasks" && D !== "task" && F("feed");
|
|
1558
|
+
}, [D, L, x]);
|
|
1559
|
+
let z = me.length ? me.map((v) => ({ id: v.id, projectName: v.projectName })) : (
|
|
1534
1560
|
// @ts-expect-error = not sure what's going on with activeEntitiesData, we should try and remove it
|
|
1535
|
-
|
|
1561
|
+
Se.map((v) => ({ id: v.id, projectName: v.projectName }))
|
|
1536
1562
|
);
|
|
1537
|
-
|
|
1563
|
+
z = z.filter((v) => v.id);
|
|
1538
1564
|
const {
|
|
1539
|
-
data:
|
|
1540
|
-
isFetching:
|
|
1541
|
-
isError:
|
|
1542
|
-
originalArgs:
|
|
1543
|
-
} =
|
|
1544
|
-
{ entityType:
|
|
1565
|
+
data: _ = [],
|
|
1566
|
+
isFetching: Q,
|
|
1567
|
+
isError: ke,
|
|
1568
|
+
originalArgs: Ce
|
|
1569
|
+
} = Xe(
|
|
1570
|
+
{ entityType: D, entities: z },
|
|
1545
1571
|
{
|
|
1546
|
-
skip: !
|
|
1572
|
+
skip: !z.length || !Ot.includes(D)
|
|
1547
1573
|
}
|
|
1548
1574
|
);
|
|
1549
|
-
|
|
1550
|
-
g ||
|
|
1551
|
-
}, [
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
}, [
|
|
1556
|
-
if (!
|
|
1557
|
-
const v =
|
|
1558
|
-
if (
|
|
1559
|
-
const
|
|
1560
|
-
if (!
|
|
1561
|
-
|
|
1575
|
+
B(() => {
|
|
1576
|
+
g || ee();
|
|
1577
|
+
}, [Ce, g]);
|
|
1578
|
+
const ge = Z(null);
|
|
1579
|
+
B(() => {
|
|
1580
|
+
P || (ge.current = null);
|
|
1581
|
+
}, [P]), B(() => {
|
|
1582
|
+
if (!Q && (P?.source === "uri" || P?.source === "url") && P?.entities?.length && N) {
|
|
1583
|
+
const v = P.entities[0].id;
|
|
1584
|
+
if (ge.current === v) return;
|
|
1585
|
+
const O = _.find((H) => H.id === v);
|
|
1586
|
+
if (!O) return;
|
|
1587
|
+
ge.current = v, N(O, P.source);
|
|
1562
1588
|
}
|
|
1563
|
-
}, [
|
|
1564
|
-
const
|
|
1565
|
-
entity:
|
|
1566
|
-
entityType:
|
|
1567
|
-
projectName:
|
|
1568
|
-
isLoading:
|
|
1569
|
-
}), { setEntityUri:
|
|
1570
|
-
|
|
1571
|
-
if (!
|
|
1572
|
-
const { folderPath: v, taskName:
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1589
|
+
}, [_, Q, P, N]);
|
|
1590
|
+
const fe = ot(f), l = J[0], S = f[l] || {}, I = _[0] || {}, q = _[_.length - 1], Te = J[J.length - 1], je = x === "inbox" && D === "version" && _.length === 1 ? Ks(_[0]) : void 0, [Re, pt] = on({
|
|
1591
|
+
entity: I,
|
|
1592
|
+
entityType: D,
|
|
1593
|
+
projectName: l,
|
|
1594
|
+
isLoading: Q
|
|
1595
|
+
}), { setEntityUri: ht, setUri: Ve } = rs();
|
|
1596
|
+
B(() => {
|
|
1597
|
+
if (!q?.parents || !Te) return;
|
|
1598
|
+
const { folderPath: v, taskName: O, versionName: H, productName: _e } = ts(
|
|
1599
|
+
q.parents,
|
|
1600
|
+
D,
|
|
1601
|
+
q.name
|
|
1576
1602
|
);
|
|
1577
|
-
return
|
|
1578
|
-
projectName:
|
|
1603
|
+
return ht({
|
|
1604
|
+
projectName: Te,
|
|
1579
1605
|
folderPath: v,
|
|
1580
|
-
taskName:
|
|
1581
|
-
productName:
|
|
1582
|
-
versionName:
|
|
1606
|
+
taskName: O,
|
|
1607
|
+
productName: _e,
|
|
1608
|
+
versionName: H
|
|
1583
1609
|
}), () => {
|
|
1584
|
-
|
|
1610
|
+
Ve("");
|
|
1585
1611
|
};
|
|
1586
|
-
}, [
|
|
1587
|
-
entityData:
|
|
1588
|
-
project:
|
|
1589
|
-
activeEntityType:
|
|
1590
|
-
entitiesToQuery:
|
|
1612
|
+
}, [_, J, D]), js({
|
|
1613
|
+
entityData: q,
|
|
1614
|
+
project: Te,
|
|
1615
|
+
activeEntityType: D,
|
|
1616
|
+
entitiesToQuery: z
|
|
1591
1617
|
});
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1618
|
+
const mt = () => {
|
|
1619
|
+
ve(
|
|
1594
1620
|
(v) => {
|
|
1595
|
-
const
|
|
1596
|
-
return
|
|
1621
|
+
const O = new URLSearchParams(v);
|
|
1622
|
+
return O.delete("project"), O.delete("type"), O.delete("id"), O;
|
|
1597
1623
|
},
|
|
1598
1624
|
{ replace: !0 }
|
|
1599
1625
|
);
|
|
1600
|
-
},
|
|
1601
|
-
|
|
1626
|
+
}, Ne = () => {
|
|
1627
|
+
U?.(), ae(null), Ve(""), mt(), ee();
|
|
1602
1628
|
};
|
|
1603
|
-
|
|
1604
|
-
const v = (
|
|
1605
|
-
if (
|
|
1606
|
-
const
|
|
1607
|
-
if (["INPUT", "TEXTAREA", "SELECT"].includes(
|
|
1608
|
-
|
|
1629
|
+
B(() => {
|
|
1630
|
+
const v = (O) => {
|
|
1631
|
+
if (O.key === "Escape" && U) {
|
|
1632
|
+
const H = O.target;
|
|
1633
|
+
if (["INPUT", "TEXTAREA", "SELECT"].includes(H.tagName) || H.isContentEditable || g === !1 && (H.closest("#viewer-dialog") || W)) return;
|
|
1634
|
+
Ne();
|
|
1609
1635
|
}
|
|
1610
1636
|
};
|
|
1611
1637
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
1612
|
-
}, [
|
|
1613
|
-
const { requestPipWindow:
|
|
1614
|
-
const v =
|
|
1615
|
-
switch (
|
|
1638
|
+
}, [Ne, g, W]);
|
|
1639
|
+
const { requestPipWindow: gt } = ls(), $e = Z(null), Le = Z(null), ft = _.length === 1 && D !== "representation", bt = C(() => {
|
|
1640
|
+
const v = I?.label || I?.name || "", O = I?.parents || [], H = [l];
|
|
1641
|
+
switch (D) {
|
|
1616
1642
|
case "folder":
|
|
1617
1643
|
case "task":
|
|
1618
1644
|
case "product":
|
|
1619
|
-
|
|
1645
|
+
H.push(O.at(-1), v);
|
|
1620
1646
|
break;
|
|
1621
1647
|
case "version":
|
|
1622
|
-
|
|
1648
|
+
H.push(O.at(-2), O.at(-1), v);
|
|
1623
1649
|
break;
|
|
1624
1650
|
case "representation":
|
|
1625
|
-
|
|
1651
|
+
H.push(O.at(-3), O.at(-2), O.at(-1), v);
|
|
1626
1652
|
break;
|
|
1627
1653
|
default:
|
|
1628
|
-
|
|
1654
|
+
H.push(v);
|
|
1629
1655
|
}
|
|
1630
|
-
return
|
|
1631
|
-
}, [
|
|
1632
|
-
|
|
1633
|
-
entityType:
|
|
1634
|
-
entities:
|
|
1656
|
+
return H.filter(Boolean).join(" - ");
|
|
1657
|
+
}, [I, D, l]), vt = () => {
|
|
1658
|
+
te({
|
|
1659
|
+
entityType: D,
|
|
1660
|
+
entities: z,
|
|
1635
1661
|
scope: x
|
|
1636
|
-
}),
|
|
1637
|
-
},
|
|
1638
|
-
|
|
1662
|
+
}), gt(500, 500);
|
|
1663
|
+
}, Ue = () => !(J.length > 1 || ne && (!w || !Object.prototype.hasOwnProperty.call(
|
|
1664
|
+
R,
|
|
1639
1665
|
se.attrib?.email || ""
|
|
1640
1666
|
)));
|
|
1641
1667
|
return /* @__PURE__ */ i(
|
|
1642
|
-
|
|
1668
|
+
ds,
|
|
1643
1669
|
{
|
|
1644
|
-
thumbnailInputRef:
|
|
1645
|
-
versionsInputRef:
|
|
1646
|
-
canUploadVersion:
|
|
1647
|
-
children: /* @__PURE__ */ k(
|
|
1648
|
-
/* @__PURE__ */ k(
|
|
1670
|
+
thumbnailInputRef: $e,
|
|
1671
|
+
versionsInputRef: Le,
|
|
1672
|
+
canUploadVersion: ft,
|
|
1673
|
+
children: /* @__PURE__ */ k($s, { className: "details-panel", children: [
|
|
1674
|
+
/* @__PURE__ */ k(Rs, { children: [
|
|
1649
1675
|
/* @__PURE__ */ i(
|
|
1650
|
-
|
|
1676
|
+
Yt,
|
|
1651
1677
|
{
|
|
1652
1678
|
segments: Re,
|
|
1653
|
-
versions:
|
|
1654
|
-
projectName:
|
|
1679
|
+
versions: pt,
|
|
1680
|
+
projectName: l,
|
|
1655
1681
|
hideProjectName: g,
|
|
1656
|
-
isLoading:
|
|
1657
|
-
entityType:
|
|
1682
|
+
isLoading: Q || !Re.length,
|
|
1683
|
+
entityType: D,
|
|
1658
1684
|
scope: x,
|
|
1659
|
-
entityTypeIcons:
|
|
1685
|
+
entityTypeIcons: re
|
|
1660
1686
|
}
|
|
1661
1687
|
),
|
|
1662
|
-
/* @__PURE__ */ k(
|
|
1688
|
+
/* @__PURE__ */ k(Vs, { className: "right-tools", children: [
|
|
1663
1689
|
/* @__PURE__ */ i(
|
|
1664
|
-
|
|
1690
|
+
sn,
|
|
1665
1691
|
{
|
|
1666
|
-
entityType:
|
|
1667
|
-
entityId:
|
|
1668
|
-
entityIds:
|
|
1669
|
-
entityLabel:
|
|
1670
|
-
projectName:
|
|
1671
|
-
selectedEntities:
|
|
1672
|
-
const
|
|
1692
|
+
entityType: D,
|
|
1693
|
+
entityId: I?.id,
|
|
1694
|
+
entityIds: z.map((v) => v.id).filter(Boolean),
|
|
1695
|
+
entityLabel: bt,
|
|
1696
|
+
projectName: l,
|
|
1697
|
+
selectedEntities: _.filter((v) => !!v?.id).map((v) => {
|
|
1698
|
+
const O = v.entityType || D;
|
|
1673
1699
|
return {
|
|
1674
1700
|
entityId: v.id,
|
|
1675
|
-
entityType:
|
|
1701
|
+
entityType: O,
|
|
1676
1702
|
hasReviewables: !!v.hasReviewables,
|
|
1677
1703
|
name: v.name,
|
|
1678
1704
|
label: v.label,
|
|
1679
|
-
projectName: v.projectName ||
|
|
1680
|
-
folderId:
|
|
1705
|
+
projectName: v.projectName || l,
|
|
1706
|
+
folderId: O === "task" ? v.folder?.id : void 0
|
|
1681
1707
|
};
|
|
1682
1708
|
}),
|
|
1683
1709
|
entityListsContext: V,
|
|
1684
|
-
onOpenPip:
|
|
1710
|
+
onOpenPip: vt,
|
|
1685
1711
|
onOpenViewer: d,
|
|
1686
|
-
productId:
|
|
1687
|
-
taskId:
|
|
1688
|
-
folderId:
|
|
1712
|
+
productId: I?.product?.id,
|
|
1713
|
+
taskId: I?.task?.id,
|
|
1714
|
+
folderId: I?.folder?.id
|
|
1689
1715
|
}
|
|
1690
1716
|
),
|
|
1691
1717
|
/* @__PURE__ */ i(
|
|
1692
|
-
|
|
1718
|
+
qt,
|
|
1693
1719
|
{
|
|
1694
|
-
entities:
|
|
1695
|
-
entityType:
|
|
1720
|
+
entities: z,
|
|
1721
|
+
entityType: D,
|
|
1696
1722
|
options: r || [],
|
|
1697
|
-
onWatchersUpdate:
|
|
1723
|
+
onWatchersUpdate: A && A,
|
|
1698
1724
|
userName: se.name
|
|
1699
1725
|
}
|
|
1700
1726
|
),
|
|
1701
|
-
|
|
1702
|
-
|
|
1727
|
+
U && /* @__PURE__ */ i(
|
|
1728
|
+
Y,
|
|
1703
1729
|
{
|
|
1704
1730
|
icon: "close",
|
|
1705
1731
|
variant: "text",
|
|
1706
|
-
onClick:
|
|
1732
|
+
onClick: Ne,
|
|
1707
1733
|
"data-shortcut": "Escape"
|
|
1708
1734
|
}
|
|
1709
1735
|
)
|
|
1710
1736
|
] })
|
|
1711
1737
|
] }),
|
|
1712
|
-
|
|
1713
|
-
|
|
1738
|
+
je && /* @__PURE__ */ i(
|
|
1739
|
+
qs,
|
|
1714
1740
|
{
|
|
1715
|
-
latestVersion:
|
|
1716
|
-
resolveVersionJump:
|
|
1741
|
+
latestVersion: je,
|
|
1742
|
+
resolveVersionJump: M
|
|
1717
1743
|
}
|
|
1718
1744
|
),
|
|
1719
1745
|
/* @__PURE__ */ i(
|
|
1720
|
-
|
|
1746
|
+
zs,
|
|
1721
1747
|
{
|
|
1722
|
-
entityType:
|
|
1723
|
-
entitySubTypes:
|
|
1724
|
-
entities:
|
|
1748
|
+
entityType: D,
|
|
1749
|
+
entitySubTypes: G,
|
|
1750
|
+
entities: _,
|
|
1725
1751
|
users: r,
|
|
1726
1752
|
disabledAssignees: c,
|
|
1727
1753
|
disabledStatuses: a,
|
|
1728
|
-
tagsOptions:
|
|
1729
|
-
isFetching:
|
|
1730
|
-
isCompact:
|
|
1731
|
-
currentTab:
|
|
1732
|
-
onTabChange:
|
|
1733
|
-
projectInfo:
|
|
1754
|
+
tagsOptions: n,
|
|
1755
|
+
isFetching: Q,
|
|
1756
|
+
isCompact: $,
|
|
1757
|
+
currentTab: L,
|
|
1758
|
+
onTabChange: F,
|
|
1759
|
+
projectInfo: ie,
|
|
1734
1760
|
onOpenViewer: (v) => d?.(v),
|
|
1735
1761
|
onEntityFocus: u,
|
|
1736
|
-
thumbnailInputRef:
|
|
1737
|
-
versionsInputRef:
|
|
1762
|
+
thumbnailInputRef: $e,
|
|
1763
|
+
versionsInputRef: Le
|
|
1738
1764
|
}
|
|
1739
1765
|
),
|
|
1740
|
-
/* @__PURE__ */ k(
|
|
1741
|
-
|
|
1742
|
-
|
|
1766
|
+
/* @__PURE__ */ k(et, { projectName: l, children: [
|
|
1767
|
+
de && !ke && /* @__PURE__ */ i(
|
|
1768
|
+
it,
|
|
1743
1769
|
{
|
|
1744
|
-
entityType:
|
|
1745
|
-
entities:
|
|
1770
|
+
entityType: D,
|
|
1771
|
+
entities: _,
|
|
1746
1772
|
activeUsers: m || [],
|
|
1747
|
-
projectInfo:
|
|
1748
|
-
projectName:
|
|
1749
|
-
disabled:
|
|
1773
|
+
projectInfo: S,
|
|
1774
|
+
projectName: l,
|
|
1775
|
+
disabled: !Ue(),
|
|
1750
1776
|
scope: x,
|
|
1751
|
-
statuses:
|
|
1777
|
+
statuses: fe,
|
|
1752
1778
|
readOnly: !1,
|
|
1753
1779
|
entityListId: w,
|
|
1754
|
-
annotations:
|
|
1780
|
+
annotations: j,
|
|
1755
1781
|
removeAnnotation: E,
|
|
1756
1782
|
exportAnnotationComposite: y,
|
|
1757
1783
|
isSlideOut: g
|
|
1758
1784
|
}
|
|
1759
1785
|
),
|
|
1760
|
-
|
|
1761
|
-
|
|
1786
|
+
L === "subtasks" && D === "task" && I?.id && oe && /* @__PURE__ */ i(
|
|
1787
|
+
kn,
|
|
1762
1788
|
{
|
|
1763
|
-
projectName:
|
|
1764
|
-
taskId:
|
|
1765
|
-
taskName:
|
|
1766
|
-
folderId:
|
|
1767
|
-
subtasks:
|
|
1768
|
-
SubtasksManager:
|
|
1769
|
-
useNavigate:
|
|
1770
|
-
onNotFound: () =>
|
|
1789
|
+
projectName: l,
|
|
1790
|
+
taskId: I.id,
|
|
1791
|
+
taskName: I.name,
|
|
1792
|
+
folderId: I.folder?.id,
|
|
1793
|
+
subtasks: I.task?.subtasks || [],
|
|
1794
|
+
SubtasksManager: oe,
|
|
1795
|
+
useNavigate: pe,
|
|
1796
|
+
onNotFound: () => F("feed")
|
|
1771
1797
|
}
|
|
1772
1798
|
),
|
|
1773
|
-
|
|
1774
|
-
|
|
1799
|
+
L === "files" && /* @__PURE__ */ i(
|
|
1800
|
+
Qs,
|
|
1775
1801
|
{
|
|
1776
|
-
entities:
|
|
1802
|
+
entities: _,
|
|
1777
1803
|
scope: x,
|
|
1778
|
-
isLoadingVersion:
|
|
1804
|
+
isLoadingVersion: Q
|
|
1779
1805
|
}
|
|
1780
1806
|
),
|
|
1781
|
-
|
|
1782
|
-
|
|
1807
|
+
L === "details" && /* @__PURE__ */ i(
|
|
1808
|
+
rn,
|
|
1783
1809
|
{
|
|
1784
|
-
entityType:
|
|
1785
|
-
entities:
|
|
1810
|
+
entityType: D,
|
|
1811
|
+
entities: _,
|
|
1786
1812
|
activeUsers: m || [],
|
|
1787
|
-
projectInfo:
|
|
1788
|
-
projectName:
|
|
1789
|
-
disabled:
|
|
1813
|
+
projectInfo: S,
|
|
1814
|
+
projectName: l,
|
|
1815
|
+
disabled: !Ue(),
|
|
1790
1816
|
scope: x,
|
|
1791
|
-
statuses:
|
|
1817
|
+
statuses: fe,
|
|
1792
1818
|
readOnly: !1,
|
|
1793
|
-
annotations:
|
|
1819
|
+
annotations: j,
|
|
1794
1820
|
removeAnnotation: E,
|
|
1795
1821
|
exportAnnotationComposite: y,
|
|
1796
1822
|
children: /* @__PURE__ */ i(
|
|
1797
|
-
|
|
1823
|
+
Kt,
|
|
1798
1824
|
{
|
|
1799
|
-
entities:
|
|
1800
|
-
isLoading:
|
|
1825
|
+
entities: _,
|
|
1826
|
+
isLoading: Q
|
|
1801
1827
|
}
|
|
1802
1828
|
)
|
|
1803
1829
|
}
|
|
@@ -1806,14 +1832,14 @@ const An = T(ze)`
|
|
|
1806
1832
|
] })
|
|
1807
1833
|
}
|
|
1808
1834
|
);
|
|
1809
|
-
},
|
|
1835
|
+
}, Sn = ({
|
|
1810
1836
|
isOpen: e,
|
|
1811
|
-
entityType:
|
|
1837
|
+
entityType: s,
|
|
1812
1838
|
...t
|
|
1813
1839
|
}) => {
|
|
1814
|
-
const { entities: o } =
|
|
1815
|
-
return !e && !o || !
|
|
1816
|
-
},
|
|
1840
|
+
const { entities: o } = K();
|
|
1841
|
+
return !e && !o || !s && !o ? null : /* @__PURE__ */ i(xn, { ...t, entityType: s || o?.entityType });
|
|
1842
|
+
}, Cn = Et`
|
|
1817
1843
|
from {
|
|
1818
1844
|
translate: 0 0;
|
|
1819
1845
|
}
|
|
@@ -1821,7 +1847,7 @@ to {
|
|
|
1821
1847
|
translate: calc(-100% - 8px) 0;
|
|
1822
1848
|
|
|
1823
1849
|
}
|
|
1824
|
-
`,
|
|
1850
|
+
`, Tn = T.div`
|
|
1825
1851
|
position: absolute;
|
|
1826
1852
|
left: 0;
|
|
1827
1853
|
top: 0;
|
|
@@ -1830,14 +1856,14 @@ to {
|
|
|
1830
1856
|
width: 100%;
|
|
1831
1857
|
max-width: 533px;
|
|
1832
1858
|
|
|
1833
|
-
animation: ${
|
|
1834
|
-
`,
|
|
1835
|
-
const { slideOut: t, onOpenViewer: o } =
|
|
1836
|
-
return c ? /* @__PURE__ */ i(
|
|
1837
|
-
|
|
1859
|
+
animation: ${Cn} 0.2s ease forwards;
|
|
1860
|
+
`, Ca = ({ projectsInfo: e, scope: s }) => {
|
|
1861
|
+
const { slideOut: t, onOpenViewer: o } = K(), { entityType: n, entityId: a, projectName: r } = t || {}, c = !!n && !!a && !!r, { data: m } = Je({ projectName: r }, { skip: !r }), f = e[r || ""] || {}, { tags: p = [] } = f, { closeSlideOut: g } = K(), b = () => g(), x = ($) => o?.($);
|
|
1862
|
+
return c ? /* @__PURE__ */ i(Tn, { children: /* @__PURE__ */ i(
|
|
1863
|
+
Sn,
|
|
1838
1864
|
{
|
|
1839
1865
|
isOpen: !0,
|
|
1840
|
-
entityType:
|
|
1866
|
+
entityType: n,
|
|
1841
1867
|
entitySubTypes: [],
|
|
1842
1868
|
entities: [{ id: a, projectName: r }],
|
|
1843
1869
|
projectsInfo: { [r]: f },
|
|
@@ -1846,26 +1872,26 @@ to {
|
|
|
1846
1872
|
projectUsers: m,
|
|
1847
1873
|
activeProjectUsers: m,
|
|
1848
1874
|
isSlideOut: !0,
|
|
1849
|
-
scope:
|
|
1875
|
+
scope: s,
|
|
1850
1876
|
onClose: b,
|
|
1851
1877
|
onOpenViewer: x
|
|
1852
1878
|
}
|
|
1853
1879
|
) }) : null;
|
|
1854
1880
|
};
|
|
1855
|
-
T(
|
|
1881
|
+
T(Os)`
|
|
1856
1882
|
.p-dialog-header-icons {
|
|
1857
1883
|
display: none;
|
|
1858
1884
|
}
|
|
1859
1885
|
.p-dialog-content {
|
|
1860
1886
|
}
|
|
1861
1887
|
`;
|
|
1862
|
-
const
|
|
1888
|
+
const Nn = T.div`
|
|
1863
1889
|
display: flex;
|
|
1864
1890
|
flex-direction: column;
|
|
1865
1891
|
margin: -8px;
|
|
1866
1892
|
width: calc(100% + 16px);
|
|
1867
1893
|
height: calc(100% + 16px);
|
|
1868
|
-
`,
|
|
1894
|
+
`, En = T.header`
|
|
1869
1895
|
display: flex;
|
|
1870
1896
|
align-items: flex-start;
|
|
1871
1897
|
gap: var(--base-gap-large);
|
|
@@ -1877,7 +1903,7 @@ const xs = T.div`
|
|
|
1877
1903
|
display: none;
|
|
1878
1904
|
}
|
|
1879
1905
|
}
|
|
1880
|
-
`,
|
|
1906
|
+
`, Dn = T.div`
|
|
1881
1907
|
display: flex;
|
|
1882
1908
|
flex-direction: column;
|
|
1883
1909
|
height: 100%;
|
|
@@ -1914,12 +1940,12 @@ const xs = T.div`
|
|
|
1914
1940
|
align-items: center;
|
|
1915
1941
|
gap: var(--base-gap-medium);
|
|
1916
1942
|
}
|
|
1917
|
-
`,
|
|
1943
|
+
`, In = T.div`
|
|
1918
1944
|
display: flex;
|
|
1919
1945
|
justify-content: space-between;
|
|
1920
1946
|
padding: 8px;
|
|
1921
1947
|
padding-top: 0;
|
|
1922
|
-
`,
|
|
1948
|
+
`, Pn = T.div`
|
|
1923
1949
|
border-top: solid 1px var(--md-sys-color-outline-variant);
|
|
1924
1950
|
height: 100%;
|
|
1925
1951
|
overflow: hidden;
|
|
@@ -1938,7 +1964,7 @@ const xs = T.div`
|
|
|
1938
1964
|
display: none;
|
|
1939
1965
|
}
|
|
1940
1966
|
}
|
|
1941
|
-
`,
|
|
1967
|
+
`, Fn = T.div`
|
|
1942
1968
|
display: flex;
|
|
1943
1969
|
align-items: center;
|
|
1944
1970
|
gap: var(--base-gap-small);
|
|
@@ -1949,84 +1975,84 @@ const xs = T.div`
|
|
|
1949
1975
|
.icon {
|
|
1950
1976
|
font-variation-settings: 'FILL' 1;
|
|
1951
1977
|
}
|
|
1952
|
-
`,
|
|
1953
|
-
const { pip: e } =
|
|
1978
|
+
`, Ta = () => {
|
|
1979
|
+
const { pip: e } = K(), s = e?.entityType, t = e?.entities || [], o = e?.scope || "", n = t.length > 0 && !!s, a = t.map((y) => y.projectName), { data: r = [] } = jt({ projects: a }, { skip: !n }), { data: c = {}, isFetching: m } = Rt(
|
|
1954
1980
|
{
|
|
1955
1981
|
projects: a
|
|
1956
1982
|
},
|
|
1957
|
-
{ skip: !
|
|
1958
|
-
), f =
|
|
1959
|
-
() =>
|
|
1983
|
+
{ skip: !n }
|
|
1984
|
+
), f = C(
|
|
1985
|
+
() => ot(c, a),
|
|
1960
1986
|
[c, a]
|
|
1961
|
-
), { data: p = [], isFetching: g } =
|
|
1987
|
+
), { data: p = [], isFetching: g } = Xe(
|
|
1962
1988
|
// @ts-expect-error
|
|
1963
|
-
{ entityType:
|
|
1989
|
+
{ entityType: s, entities: t },
|
|
1964
1990
|
{
|
|
1965
|
-
skip: !
|
|
1991
|
+
skip: !n || m
|
|
1966
1992
|
}
|
|
1967
|
-
), b =
|
|
1968
|
-
() =>
|
|
1993
|
+
), b = C(
|
|
1994
|
+
() => rt(c, a),
|
|
1969
1995
|
[c, a]
|
|
1970
|
-
), x =
|
|
1996
|
+
), x = C(
|
|
1971
1997
|
() => ({
|
|
1972
1998
|
task: b.taskTypes.filter((y) => !!y.icon).reduce((y, w) => ({ ...y, [w.name]: w.icon }), {}),
|
|
1973
1999
|
folder: b.folderTypes.filter((y) => !!y.icon).reduce((y, w) => ({ ...y, [w.name]: w.icon }), {}),
|
|
1974
2000
|
product: b.productTypes.filter((y) => !!y.icon).reduce((y, w) => ({ ...y, [w.name]: w.icon }), {})
|
|
1975
2001
|
}),
|
|
1976
2002
|
[b]
|
|
1977
|
-
),
|
|
1978
|
-
() =>
|
|
1979
|
-
[p,
|
|
1980
|
-
),
|
|
1981
|
-
if (!p.length || !
|
|
2003
|
+
), $ = C(
|
|
2004
|
+
() => s ? st(p, s, x) : [],
|
|
2005
|
+
[p, s]
|
|
2006
|
+
), U = C(() => r.filter((y) => p.some((w) => w?.task?.assignees?.includes(y.name))).map((y) => ({ ...y, avatarUrl: `/api/users/${y.name}/avatar` })), [r, t]), A = p[0];
|
|
2007
|
+
if (!p.length || !A) return null;
|
|
1982
2008
|
if (g) return /* @__PURE__ */ i("div", { children: "Loading..." });
|
|
1983
|
-
const d =
|
|
2009
|
+
const d = A?.projectName, N = p.some((y) => y?.status !== A?.status) ? {
|
|
1984
2010
|
icon: "question_mark",
|
|
1985
2011
|
color: "var(--md-sys-color-surface-container-highest)",
|
|
1986
2012
|
name: "Mixed statuses"
|
|
1987
|
-
} : f.find((y) => y.name ===
|
|
2013
|
+
} : f.find((y) => y.name === A?.status) || {
|
|
1988
2014
|
icon: "",
|
|
1989
2015
|
color: "",
|
|
1990
2016
|
name: "None"
|
|
1991
2017
|
};
|
|
1992
|
-
if (!
|
|
1993
|
-
const { title:
|
|
1994
|
-
return /* @__PURE__ */ i(
|
|
1995
|
-
/* @__PURE__ */ k(
|
|
1996
|
-
/* @__PURE__ */ i(
|
|
1997
|
-
/* @__PURE__ */ k(
|
|
1998
|
-
/* @__PURE__ */ i("h2", { children:
|
|
2018
|
+
if (!s) return null;
|
|
2019
|
+
const { title: j, subTitle: E } = at(p, s);
|
|
2020
|
+
return /* @__PURE__ */ i(cs, { children: /* @__PURE__ */ i(et, { projectName: d, children: /* @__PURE__ */ k(Nn, { children: [
|
|
2021
|
+
/* @__PURE__ */ k(En, { children: [
|
|
2022
|
+
/* @__PURE__ */ i(Ye, { thumbnails: $ }),
|
|
2023
|
+
/* @__PURE__ */ k(Dn, { children: [
|
|
2024
|
+
/* @__PURE__ */ i("h2", { children: j }),
|
|
1999
2025
|
/* @__PURE__ */ k("div", { className: "sub-title", children: [
|
|
2000
2026
|
/* @__PURE__ */ k("span", { children: [
|
|
2001
|
-
|
|
2027
|
+
Ze(s),
|
|
2002
2028
|
" - "
|
|
2003
2029
|
] }),
|
|
2004
2030
|
/* @__PURE__ */ i("h3", { children: E })
|
|
2005
2031
|
] })
|
|
2006
2032
|
] })
|
|
2007
2033
|
] }),
|
|
2008
|
-
/* @__PURE__ */ k(
|
|
2034
|
+
/* @__PURE__ */ k(In, { children: [
|
|
2009
2035
|
/* @__PURE__ */ k(
|
|
2010
|
-
|
|
2036
|
+
Fn,
|
|
2011
2037
|
{
|
|
2012
2038
|
style: {
|
|
2013
2039
|
backgroundColor: N?.color,
|
|
2014
|
-
color:
|
|
2040
|
+
color: Fe(N?.color)
|
|
2015
2041
|
},
|
|
2016
2042
|
children: [
|
|
2017
|
-
/* @__PURE__ */ i(
|
|
2043
|
+
/* @__PURE__ */ i(we, { icon: N.icon || "question_mark", style: { color: "inherit" } }),
|
|
2018
2044
|
/* @__PURE__ */ i("span", { className: "label", children: N?.name })
|
|
2019
2045
|
]
|
|
2020
2046
|
}
|
|
2021
2047
|
),
|
|
2022
|
-
/* @__PURE__ */ i(
|
|
2048
|
+
/* @__PURE__ */ i(Ct, { users: U, style: { pointerEvents: "none" } })
|
|
2023
2049
|
] }),
|
|
2024
|
-
/* @__PURE__ */ i(
|
|
2025
|
-
|
|
2050
|
+
/* @__PURE__ */ i(Pn, { children: /* @__PURE__ */ i(
|
|
2051
|
+
it,
|
|
2026
2052
|
{
|
|
2027
|
-
entityType:
|
|
2053
|
+
entityType: s,
|
|
2028
2054
|
entities: p,
|
|
2029
|
-
thumbnailHash:
|
|
2055
|
+
thumbnailHash: A?.thumbnailHash,
|
|
2030
2056
|
activeUsers: [],
|
|
2031
2057
|
projectInfo: c[d],
|
|
2032
2058
|
projectName: d,
|
|
@@ -2039,23 +2065,23 @@ const xs = T.div`
|
|
|
2039
2065
|
] }) }) });
|
|
2040
2066
|
};
|
|
2041
2067
|
export {
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2068
|
+
Gt as AssigneeSelect,
|
|
2069
|
+
Da as CloseButton,
|
|
2070
|
+
Mt as Content,
|
|
2071
|
+
Ia as ContentRow,
|
|
2072
|
+
Sn as DetailsPanel,
|
|
2073
|
+
Ta as DetailsPanelFloating,
|
|
2074
|
+
Ca as DetailsPanelSlideOut,
|
|
2075
|
+
Pa as Footer,
|
|
2050
2076
|
Ut as Grid,
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2077
|
+
_t as Header,
|
|
2078
|
+
Lt as HeaderContainer,
|
|
2079
|
+
Fa as LabelWrapper,
|
|
2080
|
+
Qt as PriorityEnumDropdown,
|
|
2081
|
+
Wt as ReadOnlyTags,
|
|
2082
|
+
zt as StatusSelect,
|
|
2083
|
+
Bt as TagsSelect,
|
|
2084
|
+
Aa as ThumbnailWrapper,
|
|
2085
|
+
Ht as Title,
|
|
2086
|
+
wn as entitiesWithoutFeed
|
|
2061
2087
|
};
|