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