@ynput/ayon-frontend-shared 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +471 -469
- package/dist/Feed.es.js +1 -1
- package/dist/ListTable.es.js +20 -20
- package/dist/NewEntity.es.js +7 -7
- package/dist/ProjectTreeTable.es.js +2523 -2502
- package/dist/ProjectsTable.es.js +5 -5
- package/dist/Slicer.es.js +28 -25
- package/dist/Views.es.js +150 -151
- package/dist/api.es.js +166 -165
- package/dist/chunks/Actions.es.js +9 -10
- package/dist/chunks/ColumnDropIndicator.es.js +4 -4
- package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +7 -7
- package/dist/chunks/EntityPath.es.js +38 -39
- package/dist/chunks/EntityPickerDialog.es.js +482 -462
- package/dist/chunks/EntityTooltip.es.js +18 -19
- package/dist/chunks/Feed.es.js +1382 -1355
- package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
- package/dist/chunks/FilterErrorActions.es.js +3 -4
- package/dist/chunks/GroupSettingsFallback.es.js +4 -4
- package/dist/chunks/Menu.es.js +242 -240
- package/dist/chunks/MetaWidget.es.js +1948 -1875
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
- package/dist/chunks/SimpleTable.es.js +303 -297
- package/dist/chunks/Slicer.es.js +420 -413
- package/dist/chunks/TableExportContextInstance.es.js +622 -378
- package/dist/chunks/TableSettingsFallback.es.js +3 -4
- package/dist/chunks/ThumbnailSimple.es.js +114 -99
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/VideoPlayer.es.js +8 -9
- package/dist/chunks/Watchers.es.js +929 -872
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/chunks/expandRelativeDates.es.js +1 -1
- package/dist/chunks/getThumbnailUrl.es.js +33 -21
- package/dist/chunks/getUris.es.js +1580 -1610
- package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
- package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
- package/dist/chunks/searchTerms.es.js +773 -696
- package/dist/chunks/useAttributeEnums.es.js +22 -22
- package/dist/chunks/useDateRangeFilter.es.js +1 -1
- package/dist/chunks/useHierarchySelection.es.js +3 -4
- package/dist/chunks/useLoadModule.es.js +3 -4
- package/dist/components.es.js +1391 -1253
- package/dist/context.es.js +645 -668
- package/dist/hooks.es.js +193 -171
- package/dist/index.es.js +4 -4
- package/dist/types/Actions.d.ts +10 -8
- package/dist/types/DetailsPanel.d.ts +54 -76
- package/dist/types/EntityPickerDialog.d.ts +51 -2
- package/dist/types/Feed.d.ts +24 -24
- package/dist/types/ListTable.d.ts +33 -27
- package/dist/types/NewEntity.d.ts +26 -39
- package/dist/types/ProjectTreeTable.d.ts +318 -212
- package/dist/types/ProjectsTable.d.ts +6 -6
- package/dist/types/RepresentationsList.d.ts +4 -0
- package/dist/types/Slicer.d.ts +63 -246
- package/dist/types/Views.d.ts +71 -298
- package/dist/types/api.d.ts +3164 -2363
- package/dist/types/components.d.ts +537 -497
- package/dist/types/context.d.ts +293 -572
- package/dist/types/hooks.d.ts +76 -47
- package/dist/types/index.d.ts +6 -0
- package/dist/types/util.d.ts +141 -120
- package/dist/util.es.js +71 -68
- package/package.json +6 -6
- package/dist/chunks/EntityUpdatesContext.es.js +0 -61
- package/dist/chunks/PlayableIcon.es.js +0 -5020
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
- package/dist/chunks/viewUpdateHelper.es.js +0 -153
package/dist/DetailsPanel.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as x, jsx as i, Fragment as
|
|
2
|
-
import { Toolbar as nt, Panel as At, Button as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as x, jsx as i, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
+
import { Toolbar as nt, Panel as At, Button as ne, Spacer as st, Icon as Ie, getMixedCounts as Qe, getTextColor as Re, applyMixedChange as Ft, Dialog as jt, SEARCH_FILTER_ID as at, buildFilterId as Ae, getFilterFromId as Ot, SearchFilter as Rt, AssigneeField as Lt } from "@ynput/ayon-react-components";
|
|
3
|
+
import { useEffect as Q, useMemo as w, useRef as le, useState as ie, useContext as Vt, useId as Ut, useCallback as $t } from "react";
|
|
4
|
+
import E, { keyframes as Mt } from "styled-components";
|
|
5
5
|
import { bz as _t, bH as Ht } from "./chunks/searchTerms.es.js";
|
|
6
|
-
import {
|
|
6
|
+
import { br as Bt, bP as Wt, c4 as zt, cA as ot, bz as it, v as Gt, bT as Qt, cf as qt } from "./chunks/getUris.es.js";
|
|
7
7
|
import "primereact/confirmdialog";
|
|
8
|
-
import {
|
|
9
|
-
import { O as
|
|
8
|
+
import { o as Kt, y as Jt, H as Xt, G as Yt, z as Zt, w as rt, A as en, B as tn, E as nn, I as sn, J as an, K as on, N as rn, W as ln, s as cn } from "./chunks/Watchers.es.js";
|
|
9
|
+
import { O as Ga, Q as Qa, V as qa, X as Ka, T as Ja } from "./chunks/Watchers.es.js";
|
|
10
10
|
import { E as dn, R as un, a as pn } from "./chunks/EntityPath.es.js";
|
|
11
11
|
import { union as ke, upperFirst as lt } from "lodash";
|
|
12
12
|
import "react-toastify";
|
|
@@ -15,45 +15,45 @@ import { a as mn, b as hn, A as qe, e as gn } from "./chunks/activeEntities.es.j
|
|
|
15
15
|
import "axios";
|
|
16
16
|
import "@module-federation/enhanced/runtime";
|
|
17
17
|
import { menuItemsAt as Ne } from "@ynput/ayon-addon/host";
|
|
18
|
-
import {
|
|
18
|
+
import { m as se, u as fn, T as bn, af as vn, a6 as yn, ah as kn, a5 as Ke, G as wn, ag as xn, $ as Sn } from "./chunks/TableExportContextInstance.es.js";
|
|
19
19
|
import "semver";
|
|
20
|
-
import { T as Cn
|
|
20
|
+
import { T as Cn } from "./chunks/ThumbnailUploaderContext.es.js";
|
|
21
21
|
import "react-dom";
|
|
22
|
-
import "
|
|
22
|
+
import { u as Tn, P as ct } from "./chunks/ProjectFoldersContext.es.js";
|
|
23
23
|
import "react-router-dom";
|
|
24
|
-
import
|
|
25
|
-
import { A as
|
|
26
|
-
import {
|
|
24
|
+
import be from "clsx";
|
|
25
|
+
import { A as Nn } from "./chunks/Actions.es.js";
|
|
26
|
+
import { f as In, n as En, E as Pn, q as Dn } from "./chunks/MetaWidget.es.js";
|
|
27
27
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
28
|
-
import { useContributions as dt, prefetchPiece as Le, runContribution as Je, ContributionView as
|
|
28
|
+
import { useContributions as dt, prefetchPiece as Le, entityUrl as An, runContribution as Je, ContributionView as Fn } from "@ynput/ayon-addon";
|
|
29
29
|
import { g as Fe } from "./chunks/getEntityTypeIcon.es.js";
|
|
30
|
-
import {
|
|
31
|
-
import { R as
|
|
32
|
-
import { I as
|
|
33
|
-
import { M as
|
|
34
|
-
import { D as
|
|
35
|
-
import { u as
|
|
36
|
-
import { p as
|
|
37
|
-
import { c as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { e as Qn } from "./chunks/expandRelativeDates.es.js";
|
|
30
|
+
import { a8 as jn, T as On } from "./chunks/FilmstripEntityCard.es.js";
|
|
31
|
+
import { R as Rn } from "./chunks/RepresentationsList.es.js";
|
|
32
|
+
import { I as Ln } from "./chunks/InfoMessage.es.js";
|
|
33
|
+
import { M as Vn, a as Un } from "./chunks/Menu.es.js";
|
|
34
|
+
import { D as $n } from "./chunks/DetailsDialog.es.js";
|
|
35
|
+
import { u as Mn } from "./chunks/VersionUploadContextInstance.es.js";
|
|
36
|
+
import { p as _n } from "./chunks/pluralize.es.js";
|
|
37
|
+
import { c as Hn } from "./chunks/copyToClipboard.es.js";
|
|
38
|
+
import { d as ut, c as Bn } from "./chunks/Feed.es.js";
|
|
39
|
+
import { A as Wn, C as zn } from "./chunks/ThumbnailSimple.es.js";
|
|
40
|
+
import { t as Gn, c as Qn } from "./chunks/queryFilterToClientFilter.es.js";
|
|
41
|
+
import { u as qn } from "./chunks/useDateRangeFilter.es.js";
|
|
42
|
+
import { e as Kn } from "./chunks/expandRelativeDates.es.js";
|
|
44
43
|
import "@dnd-kit/core";
|
|
45
44
|
import "@dnd-kit/sortable";
|
|
46
45
|
import "@dnd-kit/utilities";
|
|
46
|
+
import "react-redux";
|
|
47
47
|
import "custom-protocol-check";
|
|
48
48
|
import "./chunks/SimpleForm.es.js";
|
|
49
|
-
import { Dialog as
|
|
50
|
-
function
|
|
49
|
+
import { Dialog as Jn } from "primereact/dialog";
|
|
50
|
+
function Xn({
|
|
51
51
|
entityData: e,
|
|
52
52
|
project: n,
|
|
53
53
|
activeEntityType: t,
|
|
54
54
|
entitiesToQuery: o = []
|
|
55
55
|
}) {
|
|
56
|
-
|
|
56
|
+
Q(() => {
|
|
57
57
|
if (!e?.parents || !n) return;
|
|
58
58
|
const s = new URL(window.location.href), a = s.searchParams;
|
|
59
59
|
a.set("project", n), t && a.set("type", t);
|
|
@@ -63,7 +63,7 @@ function Kn({
|
|
|
63
63
|
l !== u && window.history.replaceState(window.history.state, "", l);
|
|
64
64
|
}, [e, n, t, o]);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Yn = E(nt)`
|
|
67
67
|
display: flex;
|
|
68
68
|
justify-content: space-between;
|
|
69
69
|
align-items: flex-start;
|
|
@@ -75,7 +75,7 @@ const Jn = I(nt)`
|
|
|
75
75
|
& > * {
|
|
76
76
|
min-width: max-content;
|
|
77
77
|
}
|
|
78
|
-
`,
|
|
78
|
+
`, Zn = E.div`
|
|
79
79
|
display: flex;
|
|
80
80
|
align-items: flex-start;
|
|
81
81
|
gap: 4px;
|
|
@@ -84,13 +84,13 @@ const Jn = I(nt)`
|
|
|
84
84
|
right: 0;
|
|
85
85
|
padding: var(--padding-m);
|
|
86
86
|
background-color: var(--md-sys-color-surface-container-low);
|
|
87
|
-
`,
|
|
87
|
+
`, es = E.div`
|
|
88
88
|
flex: 1;
|
|
89
89
|
min-height: 0;
|
|
90
90
|
overflow: auto;
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
|
-
`,
|
|
93
|
+
`, ts = E(At)`
|
|
94
94
|
gap: 0px;
|
|
95
95
|
height: 100%;
|
|
96
96
|
padding: 0px;
|
|
@@ -104,22 +104,22 @@ const Jn = I(nt)`
|
|
|
104
104
|
),
|
|
105
105
|
[n, e]
|
|
106
106
|
), isLoading: t };
|
|
107
|
-
},
|
|
107
|
+
}, ns = E(nt)`
|
|
108
108
|
border-radius: 8px 8px 0 0;
|
|
109
109
|
gap: var(--base-gap-small) !important;
|
|
110
110
|
position: relative;
|
|
111
111
|
z-index: 100;
|
|
112
112
|
grid-column: span 2;
|
|
113
|
-
`,
|
|
113
|
+
`, ss = ["product", "representation"], as = ["task"], os = ({
|
|
114
114
|
entityType: e,
|
|
115
115
|
currentTab: n,
|
|
116
116
|
onTabChange: t,
|
|
117
117
|
isLoading: o
|
|
118
118
|
}) => {
|
|
119
|
-
const s = !
|
|
120
|
-
return /* @__PURE__ */ x(
|
|
119
|
+
const s = !ss.includes(e), a = as.includes(e), r = e === "version", { tabs: l } = pt(e);
|
|
120
|
+
return /* @__PURE__ */ x(ns, { className: o ? "loading" : "", children: [
|
|
121
121
|
s && /* @__PURE__ */ i(
|
|
122
|
-
|
|
122
|
+
ne,
|
|
123
123
|
{
|
|
124
124
|
icon: "forum",
|
|
125
125
|
selected: n === "feed",
|
|
@@ -130,7 +130,7 @@ const Jn = I(nt)`
|
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
132
|
a && /* @__PURE__ */ i(
|
|
133
|
-
|
|
133
|
+
ne,
|
|
134
134
|
{
|
|
135
135
|
icon: "checklist",
|
|
136
136
|
selected: n === "subtasks",
|
|
@@ -141,7 +141,7 @@ const Jn = I(nt)`
|
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
143
|
l.map((u) => /* @__PURE__ */ i(
|
|
144
|
-
|
|
144
|
+
ne,
|
|
145
145
|
{
|
|
146
146
|
icon: u.icon,
|
|
147
147
|
selected: n === u.key,
|
|
@@ -156,7 +156,7 @@ const Jn = I(nt)`
|
|
|
156
156
|
)),
|
|
157
157
|
/* @__PURE__ */ i(st, {}),
|
|
158
158
|
r && /* @__PURE__ */ i(
|
|
159
|
-
|
|
159
|
+
ne,
|
|
160
160
|
{
|
|
161
161
|
icon: "order_play",
|
|
162
162
|
onClick: () => t("files"),
|
|
@@ -167,7 +167,7 @@ const Jn = I(nt)`
|
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
169
|
/* @__PURE__ */ i(
|
|
170
|
-
|
|
170
|
+
ne,
|
|
171
171
|
{
|
|
172
172
|
onClick: () => t("details"),
|
|
173
173
|
selected: n === "details",
|
|
@@ -177,12 +177,12 @@ const Jn = I(nt)`
|
|
|
177
177
|
}
|
|
178
178
|
)
|
|
179
179
|
] });
|
|
180
|
-
},
|
|
180
|
+
}, is = E.div`
|
|
181
181
|
display: flex;
|
|
182
182
|
align-items: center;
|
|
183
183
|
gap: var(--base-gap-small);
|
|
184
184
|
overflow: hidden;
|
|
185
|
-
`,
|
|
185
|
+
`, rs = E.button`
|
|
186
186
|
display: inline-flex;
|
|
187
187
|
align-items: center;
|
|
188
188
|
gap: var(--base-gap-small);
|
|
@@ -204,18 +204,18 @@ const Jn = I(nt)`
|
|
|
204
204
|
text-overflow: ellipsis;
|
|
205
205
|
white-space: nowrap;
|
|
206
206
|
}
|
|
207
|
-
`,
|
|
208
|
-
const { openSlideOut: t } =
|
|
207
|
+
`, ls = ({ entity: e, taskTypes: n }) => {
|
|
208
|
+
const { openSlideOut: t } = se(), { projectName: o } = e, s = e.task?.name ? e.task : void 0;
|
|
209
209
|
if (!s?.id) return null;
|
|
210
210
|
const a = n.find((r) => r.name === s.taskType);
|
|
211
|
-
return /* @__PURE__ */ x(
|
|
211
|
+
return /* @__PURE__ */ x(is, { className: "linked-task", children: [
|
|
212
212
|
/* @__PURE__ */ i("span", { children: "Task" }),
|
|
213
213
|
/* @__PURE__ */ x(
|
|
214
|
-
|
|
214
|
+
rs,
|
|
215
215
|
{
|
|
216
216
|
onClick: () => t({ entityId: s.id, entityType: "task", projectName: o }),
|
|
217
217
|
children: [
|
|
218
|
-
/* @__PURE__ */ i(
|
|
218
|
+
/* @__PURE__ */ i(Ie, { icon: a?.icon || "task_alt", style: { color: a?.color || void 0 } }),
|
|
219
219
|
/* @__PURE__ */ i("span", { className: "label", children: s.label || s.name })
|
|
220
220
|
]
|
|
221
221
|
}
|
|
@@ -280,7 +280,7 @@ const Jn = I(nt)`
|
|
|
280
280
|
subTitle: o.entityType || "Unknown Type"
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, cs = ({
|
|
284
284
|
entityType: e,
|
|
285
285
|
entitySubTypes: n,
|
|
286
286
|
entities: t = [],
|
|
@@ -298,7 +298,7 @@ const Jn = I(nt)`
|
|
|
298
298
|
thumbnailInputRef: V,
|
|
299
299
|
versionsInputRef: U
|
|
300
300
|
}) => {
|
|
301
|
-
const { useSearchParams: O, useNavigate: c, bundleMode: g } =
|
|
301
|
+
const { useSearchParams: O, useNavigate: c, bundleMode: g } = se(), C = c(), [I, T] = O(), D = le(null), v = w(() => ht(h), [h]), y = Kt(
|
|
302
302
|
t.map((d) => d.projectName),
|
|
303
303
|
[e]
|
|
304
304
|
), A = w(() => e === "task" ? ke(...t.map((d) => d.task?.assignees || [])) : e === "version" ? ke(
|
|
@@ -308,7 +308,7 @@ const Jn = I(nt)`
|
|
|
308
308
|
})
|
|
309
309
|
) : [], [t, e]);
|
|
310
310
|
let R = t[0];
|
|
311
|
-
const
|
|
311
|
+
const $ = t.length === 0 || !R || l;
|
|
312
312
|
R || (R = {
|
|
313
313
|
parents: [],
|
|
314
314
|
id: "placeholder",
|
|
@@ -324,102 +324,108 @@ const Jn = I(nt)`
|
|
|
324
324
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
325
325
|
path: ""
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const ae = t.length > 1 ? void 0 : R?.projectName;
|
|
328
328
|
t.filter((d) => d.projectName === R?.projectName && d.id).map((d) => d.id);
|
|
329
329
|
const { data: ce } = Bt({ attributeName: "priority" }), de = mn(ce, e), ue = w(
|
|
330
|
-
() => mt(t, e,
|
|
331
|
-
[t, e,
|
|
332
|
-
), F = w(() => t.map((d) => d.status), [t]), pe = w(() => t.map((d) => d.attrib?.priority), [t]),
|
|
330
|
+
() => mt(t, e, v),
|
|
331
|
+
[t, e, v]
|
|
332
|
+
), F = w(() => t.map((d) => d.status), [t]), pe = w(() => t.map((d) => d.attrib?.priority), [t]), K = w(() => t.map((d) => d.tags), [t]), me = w(
|
|
333
333
|
() => r.reduce((d, P) => (d[P.name] = P, d), {}),
|
|
334
334
|
[r]
|
|
335
|
-
),
|
|
335
|
+
), X = w(() => ke(...K), [K]), he = t.every((d) => d.projectName === R?.projectName), j = In(
|
|
336
336
|
he ? R?.projectName : void 0,
|
|
337
337
|
r
|
|
338
|
-
),
|
|
338
|
+
), z = t.length > 1, Y = w(() => Qe(K), [K]), xe = w(
|
|
339
339
|
() => Qe(t.map((d) => d.task?.assignees || [])),
|
|
340
340
|
[t]
|
|
341
|
-
),
|
|
341
|
+
), ge = !z && !!R?.hasReviewables, ve = ue.length === 1, { attribAccess: S, updateEntity: fe } = Jt({
|
|
342
342
|
entities: t,
|
|
343
343
|
entityType: e
|
|
344
|
-
}), { writableFields:
|
|
345
|
-
if (!(d !== "attrib" &&
|
|
346
|
-
return P == null ? console.error("value is null or undefined") :
|
|
347
|
-
},
|
|
348
|
-
const
|
|
349
|
-
t.map((
|
|
344
|
+
}), { writableFields: k } = S, B = !k || k.includes("status"), _ = !k || k.includes("tags"), re = e === "task" && (!k || k.includes("assignees")), oe = (d, P) => {
|
|
345
|
+
if (!(d !== "attrib" && k && !k.includes(d)) && !(d === "assignees" && !re))
|
|
346
|
+
return P == null ? console.error("value is null or undefined") : fe(d, P);
|
|
347
|
+
}, Z = (d, P) => {
|
|
348
|
+
const W = new Map(
|
|
349
|
+
t.map((J) => [J.id, (d === "tags" ? J.tags : J.task?.assignees) || []])
|
|
350
350
|
);
|
|
351
|
-
d === "tags" && j?.addTags(P.add),
|
|
352
|
-
}, Se = () => {
|
|
353
|
-
let
|
|
354
|
-
e === "version" && R.product?.id && (
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
351
|
+
d === "tags" && j?.addTags(P.add), oe(d, (J) => Ft(W.get(J) || [], P));
|
|
352
|
+
}, Se = (d) => {
|
|
353
|
+
let P, W = R.id, J = e + "Id";
|
|
354
|
+
if (e === "version" && R.product?.id && (P = [R.id], W = R.product?.id, J = "productId"), W) {
|
|
355
|
+
const H = On(d);
|
|
356
|
+
b({
|
|
357
|
+
[J]: W,
|
|
358
|
+
projectName: ae,
|
|
359
|
+
versionIds: P,
|
|
360
|
+
reviewableIds: H && [H.fileId],
|
|
361
|
+
goToPosition: H?.position
|
|
362
|
+
});
|
|
363
|
+
}
|
|
359
364
|
}, ye = (e === "task" || e === "version") && (A.length > 0 || e === "task"), Ce = [..._t(s, A)];
|
|
360
365
|
if (ye) {
|
|
361
|
-
const d = s.map((
|
|
362
|
-
P.length && Ce.push(...P.map((
|
|
366
|
+
const d = s.map((W) => W.name), P = A.filter((W) => !d.includes(W));
|
|
367
|
+
P.length && Ce.push(...P.map((W) => ({ name: W, fullName: W })));
|
|
363
368
|
}
|
|
364
|
-
const { title:
|
|
369
|
+
const { title: ee, subTitle: M } = gt(t, e), te = y?.length !== 0 && y?.find((d) => d.name === F[0]);
|
|
365
370
|
return /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ i(
|
|
366
371
|
dn,
|
|
367
372
|
{
|
|
368
373
|
entities: t,
|
|
369
374
|
entityType: e,
|
|
370
|
-
projectName:
|
|
375
|
+
projectName: ae,
|
|
371
376
|
thumbnailInputRef: V,
|
|
372
377
|
versionsInputRef: U,
|
|
373
378
|
onVersionCreated: (d) => N?.(d, "version"),
|
|
374
|
-
children: /* @__PURE__ */ x(Yt, { className:
|
|
379
|
+
children: /* @__PURE__ */ x(Yt, { className: be("details-panel-header", { isCompact: u }), children: [
|
|
375
380
|
/* @__PURE__ */ x(
|
|
376
381
|
Zt,
|
|
377
382
|
{
|
|
378
|
-
className:
|
|
383
|
+
className: be("titles", { isCompact: u, loading: $ }, "no-shimmer"),
|
|
379
384
|
children: [
|
|
380
385
|
/* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
|
|
381
386
|
/* @__PURE__ */ i(
|
|
382
387
|
rt,
|
|
383
388
|
{
|
|
384
|
-
isLoading:
|
|
385
|
-
shimmer:
|
|
389
|
+
isLoading: $,
|
|
390
|
+
shimmer: $,
|
|
386
391
|
thumbnails: ue,
|
|
387
392
|
onClick: ve ? Se : void 0,
|
|
388
|
-
hoverIcon:
|
|
393
|
+
hoverIcon: ge ? "play_circle" : void 0,
|
|
394
|
+
filmstrip: ge
|
|
389
395
|
}
|
|
390
396
|
),
|
|
391
|
-
|
|
397
|
+
ge && /* @__PURE__ */ i(jn, {})
|
|
392
398
|
] }),
|
|
393
|
-
/* @__PURE__ */ x(en, { className:
|
|
399
|
+
/* @__PURE__ */ x(en, { className: be({ loading: $ }), children: [
|
|
394
400
|
/* @__PURE__ */ x(tn, { children: [
|
|
395
|
-
/* @__PURE__ */ i("h2", { children:
|
|
396
|
-
|
|
401
|
+
/* @__PURE__ */ i("h2", { children: ee }),
|
|
402
|
+
_ ? /* @__PURE__ */ x(Ee, { children: [
|
|
397
403
|
/* @__PURE__ */ i(
|
|
398
404
|
nn,
|
|
399
405
|
{
|
|
400
406
|
ref: D,
|
|
401
|
-
value: ke(...
|
|
407
|
+
value: ke(...K),
|
|
402
408
|
tags: me,
|
|
403
409
|
options: [],
|
|
404
410
|
editable: !0,
|
|
405
411
|
editor: !0,
|
|
406
412
|
onChange: (d) => {
|
|
407
|
-
j?.addTags(d.filter((P) => !
|
|
413
|
+
j?.addTags(d.filter((P) => !X.includes(P))), oe("tags", d);
|
|
408
414
|
},
|
|
409
|
-
mixedCounts:
|
|
415
|
+
mixedCounts: z ? Y : void 0,
|
|
410
416
|
mixedTotal: t.length,
|
|
411
417
|
mixedLabel: `${e}s`,
|
|
412
|
-
onMixedChange: (d) =>
|
|
418
|
+
onMixedChange: (d) => Z("tags", d),
|
|
413
419
|
onEditOption: j?.onEditOption,
|
|
414
420
|
editOptionTooltip: "Change the colour in the project tags",
|
|
415
421
|
align: "right",
|
|
416
|
-
styleDropdown: { display:
|
|
422
|
+
styleDropdown: { display: $ ? "none" : "unset" },
|
|
417
423
|
className: "tags-select",
|
|
418
424
|
itemClassName: "details-tag"
|
|
419
425
|
}
|
|
420
426
|
),
|
|
421
427
|
j && /* @__PURE__ */ i(En, { ...j.dialog })
|
|
422
|
-
] }) : /* @__PURE__ */ i(sn, { className: "tags-select", children: ke(...
|
|
428
|
+
] }) : /* @__PURE__ */ i(sn, { className: "tags-select", children: ke(...K).length ? ke(...K).map((d) => {
|
|
423
429
|
const P = me[d]?.color;
|
|
424
430
|
return /* @__PURE__ */ i(
|
|
425
431
|
"span",
|
|
@@ -439,10 +445,10 @@ const Jn = I(nt)`
|
|
|
439
445
|
lt(e),
|
|
440
446
|
" - "
|
|
441
447
|
] }),
|
|
442
|
-
/* @__PURE__ */ i("h3", { children:
|
|
448
|
+
/* @__PURE__ */ i("h3", { children: M })
|
|
443
449
|
] }),
|
|
444
|
-
e === "version" && !
|
|
445
|
-
|
|
450
|
+
e === "version" && !z && !$ && R && /* @__PURE__ */ i(
|
|
451
|
+
ls,
|
|
446
452
|
{
|
|
447
453
|
entity: R,
|
|
448
454
|
taskTypes: h.taskTypes
|
|
@@ -457,44 +463,44 @@ const Jn = I(nt)`
|
|
|
457
463
|
an,
|
|
458
464
|
{
|
|
459
465
|
value: F,
|
|
460
|
-
options:
|
|
466
|
+
options: y || [],
|
|
461
467
|
disabledValues: a,
|
|
462
|
-
disableOpen:
|
|
468
|
+
disableOpen: !B,
|
|
463
469
|
invert: !0,
|
|
464
470
|
style: { maxWidth: "unset" },
|
|
465
|
-
onChange: (d) =>
|
|
466
|
-
className:
|
|
471
|
+
onChange: (d) => oe("status", d),
|
|
472
|
+
className: be("status-select", { loading: $ }),
|
|
467
473
|
align: u ? "right" : "left",
|
|
468
|
-
$textColor: Re(
|
|
474
|
+
$textColor: Re(te !== void 0 ? te.color : "#OOO")
|
|
469
475
|
}
|
|
470
476
|
),
|
|
471
|
-
!u && (!ye ||
|
|
477
|
+
!u && (!ye || $ ? /* @__PURE__ */ i("div", {}) : /* @__PURE__ */ i(
|
|
472
478
|
on,
|
|
473
479
|
{
|
|
474
480
|
value: A,
|
|
475
481
|
options: Ce,
|
|
476
482
|
disabledValues: o.map((d) => d.name),
|
|
477
|
-
isMultiple:
|
|
478
|
-
readOnly: !
|
|
479
|
-
emptyMessage:
|
|
483
|
+
isMultiple: z && A.length > 1 && e === "task",
|
|
484
|
+
readOnly: !re,
|
|
485
|
+
emptyMessage: re ? "Assign user" : "-",
|
|
480
486
|
align: "right",
|
|
481
|
-
onChange: (d) =>
|
|
482
|
-
mixedCounts:
|
|
487
|
+
onChange: (d) => oe("assignees", d),
|
|
488
|
+
mixedCounts: z && e === "task" ? xe : void 0,
|
|
483
489
|
mixedTotal: t.length,
|
|
484
490
|
mixedLabel: `${e}s`,
|
|
485
|
-
onMixedChange: (d) =>
|
|
491
|
+
onMixedChange: (d) => Z("assignees", d),
|
|
486
492
|
className: "assignee-select",
|
|
487
493
|
"data-tooltip": A.length ? e === "task" ? "Assigned users" : "Author" : ""
|
|
488
494
|
}
|
|
489
495
|
)),
|
|
490
496
|
/* @__PURE__ */ i(
|
|
491
|
-
|
|
497
|
+
Nn,
|
|
492
498
|
{
|
|
493
499
|
entities: t,
|
|
494
500
|
entityType: e,
|
|
495
501
|
entitySubTypes: n,
|
|
496
|
-
isLoadingEntity: !!l ||
|
|
497
|
-
searchParams:
|
|
502
|
+
isLoadingEntity: !!l || !!$,
|
|
503
|
+
searchParams: I,
|
|
498
504
|
bundleMode: g,
|
|
499
505
|
onSetSearchParams: T,
|
|
500
506
|
onNavigate: C
|
|
@@ -506,29 +512,29 @@ const Jn = I(nt)`
|
|
|
506
512
|
options: de,
|
|
507
513
|
placeholder: "No priority",
|
|
508
514
|
value: pe,
|
|
509
|
-
onChange: (d) =>
|
|
515
|
+
onChange: (d) => oe("attrib", { priority: d[0] }),
|
|
510
516
|
align: "right"
|
|
511
517
|
}
|
|
512
518
|
) : /* @__PURE__ */ i("div", { style: { height: 32 } }),
|
|
513
519
|
/* @__PURE__ */ i(
|
|
514
|
-
|
|
520
|
+
os,
|
|
515
521
|
{
|
|
516
522
|
entityType: e,
|
|
517
523
|
currentTab: f,
|
|
518
524
|
onTabChange: m,
|
|
519
|
-
isLoading:
|
|
525
|
+
isLoading: $
|
|
520
526
|
}
|
|
521
527
|
)
|
|
522
528
|
] })
|
|
523
529
|
}
|
|
524
530
|
) });
|
|
525
|
-
},
|
|
531
|
+
}, ds = E.div`
|
|
526
532
|
display: flex;
|
|
527
533
|
flex-direction: column;
|
|
528
534
|
|
|
529
535
|
height: 100%;
|
|
530
536
|
overflow: hidden;
|
|
531
|
-
`, Xe =
|
|
537
|
+
`, Xe = E.div`
|
|
532
538
|
position: relative;
|
|
533
539
|
flex: 1;
|
|
534
540
|
display: flex;
|
|
@@ -542,7 +548,7 @@ const Jn = I(nt)`
|
|
|
542
548
|
&:first-child {
|
|
543
549
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
544
550
|
}
|
|
545
|
-
`,
|
|
551
|
+
`, us = ({
|
|
546
552
|
entities: e = [],
|
|
547
553
|
scope: n,
|
|
548
554
|
isLoadingVersion: t
|
|
@@ -550,7 +556,7 @@ const Jn = I(nt)`
|
|
|
550
556
|
const o = e[0];
|
|
551
557
|
if (!o) return null;
|
|
552
558
|
let s = "Reviewables";
|
|
553
|
-
return e.length > 1 && (s += ` (${o.name})`), e.some((a) => a.entityType !== "version") ? null : /* @__PURE__ */ x(
|
|
559
|
+
return e.length > 1 && (s += ` (${o.name})`), e.some((a) => a.entityType !== "version") ? null : /* @__PURE__ */ x(ds, { children: [
|
|
554
560
|
/* @__PURE__ */ x(Xe, { children: [
|
|
555
561
|
/* @__PURE__ */ i("h4", { children: s }),
|
|
556
562
|
/* @__PURE__ */ i(
|
|
@@ -566,16 +572,16 @@ const Jn = I(nt)`
|
|
|
566
572
|
] }),
|
|
567
573
|
/* @__PURE__ */ x(Xe, { children: [
|
|
568
574
|
/* @__PURE__ */ i("h4", { children: "Representations" }),
|
|
569
|
-
/* @__PURE__ */ i(
|
|
575
|
+
/* @__PURE__ */ i(Rn, { entities: e })
|
|
570
576
|
] })
|
|
571
577
|
] });
|
|
572
|
-
},
|
|
578
|
+
}, ps = ({
|
|
573
579
|
latestVersion: e,
|
|
574
580
|
resolveVersionJump: n
|
|
575
581
|
}) => {
|
|
576
582
|
const t = n?.(e.id);
|
|
577
583
|
return /* @__PURE__ */ i(
|
|
578
|
-
|
|
584
|
+
Ln,
|
|
579
585
|
{
|
|
580
586
|
variant: "info",
|
|
581
587
|
compact: !0,
|
|
@@ -589,16 +595,16 @@ const Jn = I(nt)`
|
|
|
589
595
|
} : void 0
|
|
590
596
|
}
|
|
591
597
|
);
|
|
592
|
-
},
|
|
598
|
+
}, ms = (e) => {
|
|
593
599
|
const n = e?.version?.version, t = e?.product?.latestVersion;
|
|
594
600
|
if (!(e?.entityType !== "version" || !n || n <= 0 || !t?.active))
|
|
595
601
|
return t.version > n ? t : void 0;
|
|
596
|
-
},
|
|
597
|
-
onOpenVersionUpload:
|
|
598
|
-
}),
|
|
599
|
-
const o =
|
|
600
|
-
return o ? `${typeof window < "u" ? window.location.origin : ""}
|
|
601
|
-
},
|
|
602
|
+
}, hs = () => ({
|
|
603
|
+
onOpenVersionUpload: Mn()?.onOpenVersionUpload ?? null
|
|
604
|
+
}), gs = (e, n, t) => {
|
|
605
|
+
const o = An({ entityType: e, id: n, projectName: t });
|
|
606
|
+
return o ? `${typeof window < "u" ? window.location.origin : ""}${o}` : null;
|
|
607
|
+
}, fs = ({
|
|
602
608
|
entityType: e,
|
|
603
609
|
entityId: n,
|
|
604
610
|
projectName: t,
|
|
@@ -620,7 +626,7 @@ const Jn = I(nt)`
|
|
|
620
626
|
onViewData: g,
|
|
621
627
|
onDelete: C
|
|
622
628
|
}) => {
|
|
623
|
-
const
|
|
629
|
+
const I = w(() => o.length ? o.filter((T) => !!T?.entityId).map((T) => ({
|
|
624
630
|
entityId: T.entityId,
|
|
625
631
|
entityType: T.entityType || e,
|
|
626
632
|
hasReviewables: T.hasReviewables
|
|
@@ -647,42 +653,42 @@ const Jn = I(nt)`
|
|
|
647
653
|
label: "Upload version",
|
|
648
654
|
icon: "upload",
|
|
649
655
|
onClick: O
|
|
650
|
-
}), m?.openAddToListDialog && t &&
|
|
651
|
-
const
|
|
656
|
+
}), m?.openAddToListDialog && t && I.length) {
|
|
657
|
+
const y = I[0]?.entityType || e, A = m.openAddToListDialog;
|
|
652
658
|
if (T.push({
|
|
653
659
|
id: "add-to-list",
|
|
654
660
|
label: "Add to list",
|
|
655
661
|
icon: "list_alt_add",
|
|
656
|
-
onClick: () => A(
|
|
657
|
-
}), (
|
|
658
|
-
const
|
|
662
|
+
onClick: () => A(y, I)
|
|
663
|
+
}), (y === "version" || y === "representation") && m.hasReviewAddon) {
|
|
664
|
+
const $ = I.some((ae) => ae.hasReviewables === !0);
|
|
659
665
|
T.push({
|
|
660
666
|
id: "add-to-review-list",
|
|
661
667
|
label: "Add to session",
|
|
662
668
|
icon: "list_alt_add",
|
|
663
|
-
disabled:
|
|
664
|
-
|
|
665
|
-
onClick: () => A(
|
|
669
|
+
disabled: !$,
|
|
670
|
+
...$ ? {} : { "data-tooltip": "No reviewables on selected version" },
|
|
671
|
+
onClick: () => A(y, I, { isReview: !0 })
|
|
666
672
|
});
|
|
667
673
|
}
|
|
668
674
|
}
|
|
669
|
-
const D =
|
|
675
|
+
const D = I[0], v = D?.entityId && t ? gs(
|
|
670
676
|
D.entityType || e,
|
|
671
677
|
D.entityId,
|
|
672
678
|
t
|
|
673
679
|
) : null;
|
|
674
|
-
if (
|
|
680
|
+
if (v && T.push({
|
|
675
681
|
id: "share",
|
|
676
682
|
label: "Share",
|
|
677
683
|
icon: "share",
|
|
678
|
-
onClick: () => c(
|
|
684
|
+
onClick: () => c(v)
|
|
679
685
|
}), T.push(...b), T.push({
|
|
680
686
|
id: "view-data",
|
|
681
687
|
label: "View data",
|
|
682
688
|
icon: "database",
|
|
683
689
|
onClick: g
|
|
684
690
|
}), f && s.length > 0) {
|
|
685
|
-
const
|
|
691
|
+
const y = new Set(s.map(($) => $.entityType)), A = y.size === 1 ? [...y][0] : "item", R = s.length === 1 ? `Delete ${A}` : `Delete ${_n(s.length, A)}`;
|
|
686
692
|
T.push({
|
|
687
693
|
id: "delete",
|
|
688
694
|
label: R,
|
|
@@ -691,7 +697,7 @@ const Jn = I(nt)`
|
|
|
691
697
|
onClick: C
|
|
692
698
|
});
|
|
693
699
|
}
|
|
694
|
-
return { items: T, shareLink:
|
|
700
|
+
return { items: T, shareLink: v };
|
|
695
701
|
}, [
|
|
696
702
|
l,
|
|
697
703
|
u,
|
|
@@ -703,7 +709,7 @@ const Jn = I(nt)`
|
|
|
703
709
|
h,
|
|
704
710
|
b,
|
|
705
711
|
t,
|
|
706
|
-
|
|
712
|
+
I,
|
|
707
713
|
e,
|
|
708
714
|
N,
|
|
709
715
|
V,
|
|
@@ -713,18 +719,18 @@ const Jn = I(nt)`
|
|
|
713
719
|
g,
|
|
714
720
|
C
|
|
715
721
|
]);
|
|
716
|
-
},
|
|
722
|
+
}, bs = E.div`
|
|
717
723
|
display: flex;
|
|
718
724
|
flex-direction: column;
|
|
719
725
|
gap: 16px;
|
|
720
|
-
`, Ye =
|
|
726
|
+
`, Ye = E.div`
|
|
721
727
|
display: flex;
|
|
722
728
|
flex-direction: column;
|
|
723
729
|
gap: 6px;
|
|
724
|
-
`, Ze =
|
|
730
|
+
`, Ze = E.span`
|
|
725
731
|
font-size: 13px;
|
|
726
732
|
color: var(--md-sys-color-on-surface);
|
|
727
|
-
`, et =
|
|
733
|
+
`, et = E.button`
|
|
728
734
|
display: flex;
|
|
729
735
|
align-items: center;
|
|
730
736
|
gap: 12px;
|
|
@@ -753,28 +759,28 @@ const Jn = I(nt)`
|
|
|
753
759
|
text-overflow: ellipsis;
|
|
754
760
|
white-space: nowrap;
|
|
755
761
|
}
|
|
756
|
-
`,
|
|
762
|
+
`, vs = ({ link: e, entityLabel: n, visible: t, onHide: o }) => {
|
|
757
763
|
if (!t) return null;
|
|
758
764
|
const s = `[${n}](${e})`, a = (r) => {
|
|
759
|
-
|
|
765
|
+
Hn(r, !0), o();
|
|
760
766
|
};
|
|
761
|
-
return /* @__PURE__ */ i(jt, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ x(
|
|
767
|
+
return /* @__PURE__ */ i(jt, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ x(bs, { children: [
|
|
762
768
|
/* @__PURE__ */ x(Ye, { children: [
|
|
763
769
|
/* @__PURE__ */ i(Ze, { children: "Link" }),
|
|
764
770
|
/* @__PURE__ */ x(et, { type: "button", onClick: () => a(e), "aria-label": "Copy link", children: [
|
|
765
771
|
/* @__PURE__ */ i("span", { className: "value", children: e }),
|
|
766
|
-
/* @__PURE__ */ i(
|
|
772
|
+
/* @__PURE__ */ i(Ie, { icon: "content_copy" })
|
|
767
773
|
] })
|
|
768
774
|
] }),
|
|
769
775
|
/* @__PURE__ */ x(Ye, { children: [
|
|
770
776
|
/* @__PURE__ */ i(Ze, { children: "Markdown Link" }),
|
|
771
777
|
/* @__PURE__ */ x(et, { type: "button", onClick: () => a(s), "aria-label": "Copy markdown link", children: [
|
|
772
778
|
/* @__PURE__ */ i("span", { className: "value", children: s }),
|
|
773
|
-
/* @__PURE__ */ i(
|
|
779
|
+
/* @__PURE__ */ i(Ie, { icon: "content_copy" })
|
|
774
780
|
] })
|
|
775
781
|
] })
|
|
776
782
|
] }) });
|
|
777
|
-
},
|
|
783
|
+
}, ys = (e, n, t, o) => {
|
|
778
784
|
const s = { projectName: t, quickView: !0 };
|
|
779
785
|
switch (e) {
|
|
780
786
|
case "folder":
|
|
@@ -788,7 +794,7 @@ const Jn = I(nt)`
|
|
|
788
794
|
default:
|
|
789
795
|
return null;
|
|
790
796
|
}
|
|
791
|
-
},
|
|
797
|
+
}, ks = ({
|
|
792
798
|
entityType: e,
|
|
793
799
|
entityId: n,
|
|
794
800
|
entityIds: t,
|
|
@@ -802,121 +808,117 @@ const Jn = I(nt)`
|
|
|
802
808
|
taskId: m,
|
|
803
809
|
folderId: h
|
|
804
810
|
}) => {
|
|
805
|
-
const b = le(null), [N, V] =
|
|
806
|
-
const
|
|
807
|
-
return `details-more-menu-${
|
|
808
|
-
}, [
|
|
811
|
+
const b = le(null), [N, V] = ie(!1), [U, O] = ie(null), { menuOpen: c, toggleMenuOpen: g, setMenuOpen: C } = fn(), { triggerThumbnailUpload: I, canUploadVersion: T } = Vt(bn), { onOpenVersionUpload: D } = hs(), v = Ut(), y = w(() => {
|
|
812
|
+
const k = n || t?.[0] || "noentity";
|
|
813
|
+
return `details-more-menu-${v}-${k}-${s || "noproject"}`;
|
|
814
|
+
}, [v, n, t, s]), A = c === y, R = !!n && !!s && !!I, $ = !!T && !!D, ae = () => {
|
|
809
815
|
D?.({ productId: f, taskId: m, folderId: h });
|
|
810
|
-
}, ce = n && s ?
|
|
811
|
-
const
|
|
812
|
-
return !yn(
|
|
813
|
-
id:
|
|
814
|
-
entityType:
|
|
815
|
-
name:
|
|
816
|
-
label:
|
|
817
|
-
projectName:
|
|
818
|
-
folderId:
|
|
819
|
-
parentId:
|
|
816
|
+
}, ce = n && s ? ys(e, n, s, f) : null, de = !!u && !!ce, ue = vn(), F = w(() => (a.length ? a : n ? [{ entityId: n, entityType: e, projectName: s }] : []).map((B) => {
|
|
817
|
+
const _ = B.entityType || e, re = B.projectName || s;
|
|
818
|
+
return !yn(_) || !B.entityId || !re ? null : {
|
|
819
|
+
id: B.entityId,
|
|
820
|
+
entityType: _,
|
|
821
|
+
name: B.name,
|
|
822
|
+
label: B.label,
|
|
823
|
+
projectName: re,
|
|
824
|
+
folderId: B.folderId,
|
|
825
|
+
parentId: B.parentId
|
|
820
826
|
};
|
|
821
|
-
}).filter((
|
|
827
|
+
}).filter((B) => B !== null), [a, n, e, s]), pe = !!ue && F.length > 0, K = () => {
|
|
822
828
|
C(!1), ue?.deleteEntities(F);
|
|
823
|
-
}, { contributions: me } = dt("detailsPanel.menuItem"),
|
|
829
|
+
}, { contributions: me } = dt("detailsPanel.menuItem"), X = w(
|
|
824
830
|
() => me.filter(
|
|
825
|
-
(
|
|
831
|
+
(k) => !k.entityTypes?.length || k.entityTypes.includes(e)
|
|
826
832
|
),
|
|
827
833
|
[me, e]
|
|
828
834
|
), he = w(() => {
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
label: v.label,
|
|
845
|
-
icon: v.icon,
|
|
846
|
-
"data-addon-item": v.key,
|
|
847
|
-
onClick: () => Je(v, he)
|
|
835
|
+
const B = (a.length ? a : n ? [{ entityId: n, entityType: e, projectName: s }] : []).map((_) => ({
|
|
836
|
+
id: _.entityId,
|
|
837
|
+
entityType: _.entityType || e,
|
|
838
|
+
projectName: _.projectName || s || "",
|
|
839
|
+
name: _.name,
|
|
840
|
+
label: _.label || void 0
|
|
841
|
+
}));
|
|
842
|
+
return { projectName: s || "", entityType: e, entities: B };
|
|
843
|
+
}, [a, n, e, s]), j = $t(
|
|
844
|
+
(k) => ({
|
|
845
|
+
id: k.key,
|
|
846
|
+
label: k.label,
|
|
847
|
+
icon: k.icon,
|
|
848
|
+
"data-addon-item": k.key,
|
|
849
|
+
onClick: () => Je(k, he)
|
|
848
850
|
}),
|
|
849
851
|
[he]
|
|
850
|
-
),
|
|
852
|
+
), z = w(
|
|
851
853
|
() => [
|
|
852
|
-
...Ne(
|
|
853
|
-
...Ne(
|
|
854
|
-
].filter((
|
|
855
|
-
[
|
|
856
|
-
),
|
|
857
|
-
() =>
|
|
858
|
-
[
|
|
854
|
+
...Ne(X, "top"),
|
|
855
|
+
...Ne(X, "bottom")
|
|
856
|
+
].filter((k) => k.pinned),
|
|
857
|
+
[X]
|
|
858
|
+
), Y = w(
|
|
859
|
+
() => X.filter((k) => !k.pinned),
|
|
860
|
+
[X]
|
|
859
861
|
), xe = w(
|
|
860
|
-
() => Ne(
|
|
861
|
-
[
|
|
862
|
-
),
|
|
863
|
-
() => Ne(
|
|
864
|
-
[
|
|
862
|
+
() => Ne(Y, "top").map(j),
|
|
863
|
+
[Y, j]
|
|
864
|
+
), ge = w(
|
|
865
|
+
() => Ne(Y, "bottom").map(j),
|
|
866
|
+
[Y, j]
|
|
865
867
|
);
|
|
866
|
-
|
|
867
|
-
A &&
|
|
868
|
-
}, [A,
|
|
869
|
-
const { items: ve } =
|
|
868
|
+
Q(() => {
|
|
869
|
+
A && Y.forEach((k) => Le(k.run));
|
|
870
|
+
}, [A, Y]);
|
|
871
|
+
const { items: ve } = fs({
|
|
870
872
|
entityType: e,
|
|
871
873
|
entityId: n,
|
|
872
874
|
projectName: s,
|
|
873
875
|
selectedEntities: a,
|
|
874
876
|
deleteEntities: F,
|
|
875
877
|
canUploadThumbnail: R,
|
|
876
|
-
canUploadVersion:
|
|
878
|
+
canUploadVersion: $,
|
|
877
879
|
canOpenPip: !!l,
|
|
878
880
|
canOpenViewer: de,
|
|
879
881
|
canDelete: pe,
|
|
880
882
|
entityListsContext: r,
|
|
881
883
|
extraTopItems: xe,
|
|
882
|
-
extraItems:
|
|
884
|
+
extraItems: ge,
|
|
883
885
|
onPip: () => l?.(),
|
|
884
886
|
onOpenViewer: () => ce && u?.(ce),
|
|
885
|
-
onUploadThumbnail: () =>
|
|
886
|
-
onUploadVersion:
|
|
887
|
-
onShare: (
|
|
887
|
+
onUploadThumbnail: () => I?.(),
|
|
888
|
+
onUploadVersion: ae,
|
|
889
|
+
onShare: (k) => O(k),
|
|
888
890
|
onViewData: () => V(!0),
|
|
889
|
-
onDelete:
|
|
890
|
-
}), S = t?.length ? t : n ? [n] : [],
|
|
891
|
-
return /* @__PURE__ */ x(
|
|
892
|
-
|
|
893
|
-
|
|
891
|
+
onDelete: K
|
|
892
|
+
}), S = t?.length ? t : n ? [n] : [], fe = o || n || "";
|
|
893
|
+
return /* @__PURE__ */ x(Ee, { children: [
|
|
894
|
+
z.map((k) => /* @__PURE__ */ i(
|
|
895
|
+
ne,
|
|
894
896
|
{
|
|
895
|
-
icon:
|
|
897
|
+
icon: k.icon,
|
|
896
898
|
variant: "text",
|
|
897
|
-
"data-tooltip":
|
|
898
|
-
"aria-label":
|
|
899
|
-
"data-addon-item":
|
|
900
|
-
onMouseEnter: () => Le(
|
|
901
|
-
onClick: () => Je(
|
|
899
|
+
"data-tooltip": k.label,
|
|
900
|
+
"aria-label": k.label,
|
|
901
|
+
"data-addon-item": k.key,
|
|
902
|
+
onMouseEnter: () => Le(k.run),
|
|
903
|
+
onClick: () => Je(k, he)
|
|
902
904
|
},
|
|
903
|
-
|
|
905
|
+
k.key
|
|
904
906
|
)),
|
|
905
907
|
/* @__PURE__ */ i(
|
|
906
|
-
|
|
908
|
+
ne,
|
|
907
909
|
{
|
|
908
910
|
ref: b,
|
|
909
911
|
icon: "more_horiz",
|
|
910
912
|
variant: "text",
|
|
911
913
|
"data-tooltip": "More actions",
|
|
912
914
|
"aria-label": "More actions",
|
|
913
|
-
className:
|
|
914
|
-
onClick: () => g(
|
|
915
|
+
className: be({ active: A }),
|
|
916
|
+
onClick: () => g(y)
|
|
915
917
|
}
|
|
916
918
|
),
|
|
917
|
-
/* @__PURE__ */ i(
|
|
919
|
+
/* @__PURE__ */ i(Vn, { id: y, target: b.current, align: "right", children: /* @__PURE__ */ i(Un, { menu: ve, onClose: () => C(!1) }) }),
|
|
918
920
|
N && s && S.length > 0 && /* @__PURE__ */ i(
|
|
919
|
-
|
|
921
|
+
$n,
|
|
920
922
|
{
|
|
921
923
|
projectName: s,
|
|
922
924
|
entityType: e,
|
|
@@ -926,16 +928,16 @@ const Jn = I(nt)`
|
|
|
926
928
|
}
|
|
927
929
|
),
|
|
928
930
|
U && /* @__PURE__ */ i(
|
|
929
|
-
|
|
931
|
+
vs,
|
|
930
932
|
{
|
|
931
933
|
link: U,
|
|
932
|
-
entityLabel:
|
|
934
|
+
entityLabel: fe,
|
|
933
935
|
visible: !0,
|
|
934
936
|
onHide: () => O(null)
|
|
935
937
|
}
|
|
936
938
|
)
|
|
937
939
|
] });
|
|
938
|
-
},
|
|
940
|
+
}, ws = (e, n) => {
|
|
939
941
|
const t = [e];
|
|
940
942
|
let o = e;
|
|
941
943
|
for (; o.parentId && o.parentId !== "root"; ) {
|
|
@@ -945,17 +947,17 @@ const Jn = I(nt)`
|
|
|
945
947
|
t.unshift(s), o = s;
|
|
946
948
|
}
|
|
947
949
|
return t;
|
|
948
|
-
},
|
|
950
|
+
}, xs = (e, n) => {
|
|
949
951
|
const t = [];
|
|
950
952
|
let o = n.get(e.folder?.id || "");
|
|
951
|
-
if ((o ?
|
|
953
|
+
if ((o ? ws(o, n) : []).forEach((a) => {
|
|
952
954
|
t.push({ type: "folder", label: a.label || a.name, id: a.id });
|
|
953
955
|
}), e.entityType === "version") {
|
|
954
956
|
const a = `${e.product?.name} - ${e.name}`;
|
|
955
957
|
t.push({ type: "version", label: a, id: e.id });
|
|
956
958
|
}
|
|
957
959
|
return e.entityType === "task" && t.push({ type: "task", label: e.label || e.name, id: e.id }), t;
|
|
958
|
-
},
|
|
960
|
+
}, Ss = ({
|
|
959
961
|
entity: e,
|
|
960
962
|
entityType: n,
|
|
961
963
|
projectName: t,
|
|
@@ -967,7 +969,7 @@ const Jn = I(nt)`
|
|
|
967
969
|
// @ts-expect-error - patch is not part of the query args
|
|
968
970
|
{ projectName: t, patch: ["id", "name", "label"] },
|
|
969
971
|
{ skip: !t || o }
|
|
970
|
-
), r =
|
|
972
|
+
), r = Tn(
|
|
971
973
|
{ projectName: t || "", isLoading: o },
|
|
972
974
|
a
|
|
973
975
|
), { data: l } = zt(
|
|
@@ -985,7 +987,7 @@ const Jn = I(nt)`
|
|
|
985
987
|
[s]
|
|
986
988
|
);
|
|
987
989
|
return [w(
|
|
988
|
-
() => r ? [] :
|
|
990
|
+
() => r ? [] : xs(e, f),
|
|
989
991
|
[r, s, e]
|
|
990
992
|
), u];
|
|
991
993
|
}, ft = (e, n) => {
|
|
@@ -1004,7 +1006,7 @@ const Jn = I(nt)`
|
|
|
1004
1006
|
exportAnnotationComposite: u,
|
|
1005
1007
|
...f
|
|
1006
1008
|
}) => {
|
|
1007
|
-
const m = { annotations: r, removeAnnotation: l, exportAnnotationComposite: u }, { user: h } =
|
|
1009
|
+
const m = { annotations: r, removeAnnotation: l, exportAnnotationComposite: u }, { user: h } = se(), b = h.name || "", N = h.attrib?.fullName || "";
|
|
1008
1010
|
return /* @__PURE__ */ x(
|
|
1009
1011
|
ut,
|
|
1010
1012
|
{
|
|
@@ -1018,12 +1020,12 @@ const Jn = I(nt)`
|
|
|
1018
1020
|
...m,
|
|
1019
1021
|
...f,
|
|
1020
1022
|
children: [
|
|
1021
|
-
/* @__PURE__ */ i(
|
|
1022
|
-
/* @__PURE__ */ i(
|
|
1023
|
+
/* @__PURE__ */ i(Bn, { ...f, statuses: f.statuses }),
|
|
1024
|
+
/* @__PURE__ */ i(Wn, {})
|
|
1023
1025
|
]
|
|
1024
1026
|
}
|
|
1025
1027
|
);
|
|
1026
|
-
},
|
|
1028
|
+
}, Cs = ({
|
|
1027
1029
|
children: e,
|
|
1028
1030
|
scope: n = "dashboard",
|
|
1029
1031
|
entities: t,
|
|
@@ -1035,7 +1037,7 @@ const Jn = I(nt)`
|
|
|
1035
1037
|
exportAnnotationComposite: u,
|
|
1036
1038
|
...f
|
|
1037
1039
|
}) => {
|
|
1038
|
-
const m = { annotations: r, removeAnnotation: l, exportAnnotationComposite: u }, { user: h } =
|
|
1040
|
+
const m = { annotations: r, removeAnnotation: l, exportAnnotationComposite: u }, { user: h } = se(), b = h?.name ?? "", N = h?.attrib?.fullName ?? "", [V, U] = ie(null);
|
|
1039
1041
|
return /* @__PURE__ */ i(
|
|
1040
1042
|
ut,
|
|
1041
1043
|
{
|
|
@@ -1097,23 +1099,23 @@ const Jn = I(nt)`
|
|
|
1097
1099
|
}), Object.keys(s).forEach((a) => {
|
|
1098
1100
|
(a === "productTypes" || s[a].length > 0) && (t[a] = o(s[a]));
|
|
1099
1101
|
}), t;
|
|
1100
|
-
},
|
|
1102
|
+
}, Ts = E.div`
|
|
1101
1103
|
display: flex;
|
|
1102
1104
|
align-items: center;
|
|
1103
1105
|
padding: 4px 8px;
|
|
1104
1106
|
gap: var(--base-gap-small);
|
|
1105
|
-
`,
|
|
1107
|
+
`, Ns = E.span`
|
|
1106
1108
|
font-weight: 600;
|
|
1107
1109
|
user-select: none;
|
|
1108
|
-
`,
|
|
1110
|
+
`, Is = E.div`
|
|
1109
1111
|
display: flex;
|
|
1110
1112
|
gap: var(--base-gap-small);
|
|
1111
|
-
`, Oe =
|
|
1113
|
+
`, Oe = E(ne)`
|
|
1112
1114
|
background-color: unset;
|
|
1113
1115
|
&.hasIcon {
|
|
1114
1116
|
padding: 4px;
|
|
1115
1117
|
}
|
|
1116
|
-
`,
|
|
1118
|
+
`, Es = E.div`
|
|
1117
1119
|
display: flex;
|
|
1118
1120
|
align-items: center;
|
|
1119
1121
|
gap: var(--base-gap-small);
|
|
@@ -1130,10 +1132,10 @@ const Jn = I(nt)`
|
|
|
1130
1132
|
box-shadow: 0 0 0 1px var(--md-sys-color-primary-container);
|
|
1131
1133
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
1132
1134
|
}
|
|
1133
|
-
`,
|
|
1135
|
+
`, Ps = E(Pn)`
|
|
1134
1136
|
width: 28px;
|
|
1135
1137
|
height: 28px;
|
|
1136
|
-
`,
|
|
1138
|
+
`, Ds = E.input`
|
|
1137
1139
|
flex: 1;
|
|
1138
1140
|
min-width: 0;
|
|
1139
1141
|
border: none;
|
|
@@ -1146,14 +1148,14 @@ const Jn = I(nt)`
|
|
|
1146
1148
|
&::placeholder {
|
|
1147
1149
|
color: var(--md-sys-color-outline);
|
|
1148
1150
|
}
|
|
1149
|
-
`,
|
|
1151
|
+
`, As = E(ne)`
|
|
1150
1152
|
background-color: unset;
|
|
1151
1153
|
min-width: unset;
|
|
1152
1154
|
&.hasIcon {
|
|
1153
1155
|
padding: 2px;
|
|
1154
1156
|
}
|
|
1155
|
-
`,
|
|
1156
|
-
if (
|
|
1157
|
+
`, Ue = (e) => !!e && "key" in e, we = (e, n) => Ue(e) ? e.key === n : !!e.conditions?.some((t) => we(t, n)), Ve = (e) => {
|
|
1158
|
+
if (Ue(e)) return String(e.value || "");
|
|
1157
1159
|
const n = e.operator === "or" ? ", " : ".";
|
|
1158
1160
|
return e.conditions?.map((t) => Ve(t)).join(n) || "";
|
|
1159
1161
|
}, yt = (e, n, t) => {
|
|
@@ -1183,17 +1185,17 @@ const Jn = I(nt)`
|
|
|
1183
1185
|
operator: t,
|
|
1184
1186
|
value: a[0] || ""
|
|
1185
1187
|
};
|
|
1186
|
-
},
|
|
1188
|
+
}, Fs = ({
|
|
1187
1189
|
label: e,
|
|
1188
1190
|
filters: n,
|
|
1189
1191
|
currentFilter: t,
|
|
1190
1192
|
onFilterChange: o,
|
|
1191
1193
|
isLoading: s
|
|
1192
1194
|
}) => {
|
|
1193
|
-
const [a, r] =
|
|
1194
|
-
|
|
1195
|
+
const [a, r] = ie(null), [l, u] = ie(""), f = le(null), m = (c) => typeof c == "object" && c !== null && !Array.isArray(c);
|
|
1196
|
+
Q(() => {
|
|
1195
1197
|
a && f.current && f.current.focus();
|
|
1196
|
-
}, [a]),
|
|
1198
|
+
}, [a]), Q(() => {
|
|
1197
1199
|
if (a && m(t)) {
|
|
1198
1200
|
if (document.activeElement === f.current) return;
|
|
1199
1201
|
const c = t.conditions?.find((g) => we(g, a));
|
|
@@ -1205,39 +1207,39 @@ const Jn = I(nt)`
|
|
|
1205
1207
|
o(c.id);
|
|
1206
1208
|
return;
|
|
1207
1209
|
}
|
|
1208
|
-
const C = t.conditions ? [...t.conditions] : [],
|
|
1210
|
+
const C = t.conditions ? [...t.conditions] : [], I = {
|
|
1209
1211
|
...t,
|
|
1210
1212
|
conditions: C,
|
|
1211
1213
|
operator: t.operator || "and"
|
|
1212
|
-
}, T = String(c.id), D = C.findIndex((
|
|
1213
|
-
if (
|
|
1214
|
+
}, T = String(c.id), D = C.findIndex((y) => we(y, T)), v = c.type || "boolean";
|
|
1215
|
+
if (v === "boolean")
|
|
1214
1216
|
D > -1 ? C.splice(D, 1) : C.push({ key: T, operator: c.operator || "eq", value: !0 });
|
|
1215
|
-
else if (
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1217
|
+
else if (v === "enum") {
|
|
1218
|
+
const y = Array.isArray(g) ? g : [g];
|
|
1219
|
+
if (y.length === 0 || y.length === 1 && y[0] === void 0)
|
|
1218
1220
|
D > -1 && C.splice(D, 1);
|
|
1219
1221
|
else {
|
|
1220
1222
|
const A = {
|
|
1221
1223
|
key: T,
|
|
1222
1224
|
operator: c.operator || "in",
|
|
1223
|
-
value:
|
|
1225
|
+
value: y
|
|
1224
1226
|
};
|
|
1225
1227
|
D > -1 ? C[D] = A : C.push(A);
|
|
1226
1228
|
}
|
|
1227
|
-
} else if (
|
|
1228
|
-
const
|
|
1229
|
-
if (!
|
|
1229
|
+
} else if (v === "search") {
|
|
1230
|
+
const y = typeof g == "string" ? g : "";
|
|
1231
|
+
if (!y)
|
|
1230
1232
|
D > -1 && C.splice(D, 1);
|
|
1231
1233
|
else {
|
|
1232
|
-
const A = yt(
|
|
1234
|
+
const A = yt(y, T, c.operator || "like");
|
|
1233
1235
|
D > -1 ? C[D] = A : C.push(A);
|
|
1234
1236
|
}
|
|
1235
1237
|
}
|
|
1236
|
-
o(
|
|
1238
|
+
o(I);
|
|
1237
1239
|
}, b = (c) => {
|
|
1238
1240
|
const g = String(c.id);
|
|
1239
1241
|
if (a !== g && (r(g), m(t))) {
|
|
1240
|
-
const C = t.conditions?.find((
|
|
1242
|
+
const C = t.conditions?.find((I) => we(I, g));
|
|
1241
1243
|
u(C ? Ve(C) : "");
|
|
1242
1244
|
}
|
|
1243
1245
|
}, N = (c, g) => {
|
|
@@ -1245,20 +1247,20 @@ const Jn = I(nt)`
|
|
|
1245
1247
|
}, V = (c) => {
|
|
1246
1248
|
u(""), r(null), h(c, "");
|
|
1247
1249
|
}, U = (c) => m(t) ? t.conditions?.some((g) => we(g, String(c.id))) : c.id === t, O = (c) => m(t) ? t.conditions?.find(
|
|
1248
|
-
(C) =>
|
|
1250
|
+
(C) => Ue(C) && C.key === String(c.id)
|
|
1249
1251
|
)?.value || [] : [];
|
|
1250
|
-
return /* @__PURE__ */ x(
|
|
1251
|
-
/* @__PURE__ */ i(
|
|
1252
|
+
return /* @__PURE__ */ x(Ts, { className: be("panel-tabs", { loading: s }), children: [
|
|
1253
|
+
/* @__PURE__ */ i(Ns, { className: "panel-header-label", children: e }),
|
|
1252
1254
|
/* @__PURE__ */ i(st, {}),
|
|
1253
|
-
/* @__PURE__ */ i(
|
|
1255
|
+
/* @__PURE__ */ i(Is, { className: "panel-header-filters", children: n.map((c) => {
|
|
1254
1256
|
const g = U(c), C = c.type || "boolean";
|
|
1255
1257
|
if (C === "enum")
|
|
1256
1258
|
return /* @__PURE__ */ i(
|
|
1257
|
-
|
|
1259
|
+
Ps,
|
|
1258
1260
|
{
|
|
1259
1261
|
options: c.options || [],
|
|
1260
1262
|
value: O(c),
|
|
1261
|
-
onChange: (
|
|
1263
|
+
onChange: (I) => h(c, I),
|
|
1262
1264
|
isEditing: !0,
|
|
1263
1265
|
autoOpen: !1,
|
|
1264
1266
|
align: "right",
|
|
@@ -1278,25 +1280,25 @@ const Jn = I(nt)`
|
|
|
1278
1280
|
String(c.id)
|
|
1279
1281
|
);
|
|
1280
1282
|
if (C === "search") {
|
|
1281
|
-
const
|
|
1283
|
+
const I = a === String(c.id);
|
|
1282
1284
|
return /* @__PURE__ */ x(
|
|
1283
|
-
|
|
1285
|
+
Es,
|
|
1284
1286
|
{
|
|
1285
|
-
className:
|
|
1287
|
+
className: be("panel-filter", "panel-filter-search", { expanded: I }),
|
|
1286
1288
|
children: [
|
|
1287
1289
|
/* @__PURE__ */ i(
|
|
1288
1290
|
Oe,
|
|
1289
1291
|
{
|
|
1290
|
-
selected: g ||
|
|
1292
|
+
selected: g || I,
|
|
1291
1293
|
onClick: () => b(c),
|
|
1292
1294
|
icon: c.icon,
|
|
1293
|
-
"data-tooltip":
|
|
1295
|
+
"data-tooltip": I ? void 0 : c.tooltip,
|
|
1294
1296
|
"data-tooltip-delay": 0
|
|
1295
1297
|
}
|
|
1296
1298
|
),
|
|
1297
|
-
|
|
1299
|
+
I && /* @__PURE__ */ x(Ee, { children: [
|
|
1298
1300
|
/* @__PURE__ */ i(
|
|
1299
|
-
|
|
1301
|
+
Ds,
|
|
1300
1302
|
{
|
|
1301
1303
|
ref: f,
|
|
1302
1304
|
value: l,
|
|
@@ -1308,7 +1310,7 @@ const Jn = I(nt)`
|
|
|
1308
1310
|
}
|
|
1309
1311
|
),
|
|
1310
1312
|
/* @__PURE__ */ i(
|
|
1311
|
-
|
|
1313
|
+
As,
|
|
1312
1314
|
{
|
|
1313
1315
|
icon: "close",
|
|
1314
1316
|
onClick: () => V(c),
|
|
@@ -1336,7 +1338,7 @@ const Jn = I(nt)`
|
|
|
1336
1338
|
);
|
|
1337
1339
|
}) })
|
|
1338
1340
|
] });
|
|
1339
|
-
}, kt = ["done", "isDone"], wt = (e) => !!e && "key" in e,
|
|
1341
|
+
}, kt = ["done", "isDone"], wt = (e) => !!e && "key" in e, js = (e, n) => {
|
|
1340
1342
|
const t = [], o = [], s = (a) => {
|
|
1341
1343
|
if (!a) return;
|
|
1342
1344
|
if (wt(a)) {
|
|
@@ -1391,7 +1393,7 @@ const Jn = I(nt)`
|
|
|
1391
1393
|
});
|
|
1392
1394
|
return;
|
|
1393
1395
|
}
|
|
1394
|
-
const r =
|
|
1396
|
+
const r = Gn(a, n);
|
|
1395
1397
|
if (r) {
|
|
1396
1398
|
t.push(r);
|
|
1397
1399
|
return;
|
|
@@ -1399,7 +1401,7 @@ const Jn = I(nt)`
|
|
|
1399
1401
|
a.conditions?.forEach(s);
|
|
1400
1402
|
};
|
|
1401
1403
|
return e?.conditions?.forEach(s), o.length && t.push({ id: at, label: "", values: o }), t;
|
|
1402
|
-
},
|
|
1404
|
+
}, Os = (e) => {
|
|
1403
1405
|
const n = [], t = [];
|
|
1404
1406
|
return e.forEach((o) => {
|
|
1405
1407
|
const s = Ot(o.id), a = (o.values || []).map((r) => r.id);
|
|
@@ -1412,12 +1414,12 @@ const Jn = I(nt)`
|
|
|
1412
1414
|
const r = a[0] === "true";
|
|
1413
1415
|
n.push({ key: s, operator: "eq", value: r });
|
|
1414
1416
|
} else if (o.type === "datetime") {
|
|
1415
|
-
const r =
|
|
1417
|
+
const r = Qn(s, o);
|
|
1416
1418
|
r && n.push(r);
|
|
1417
1419
|
} else
|
|
1418
1420
|
n.push({ key: s, operator: "in", value: a.map(String) });
|
|
1419
1421
|
}), t.length === 1 ? n.push(t[0]) : t.length > 1 && n.push({ operator: "or", conditions: t }), { operator: "and", conditions: n };
|
|
1420
|
-
}, xt = (e) => wt(e) ? e.key !== "search" || typeof e.value != "string" ? e : Ht(e.value, (n) => ({ ...e, value: n })) ?? e : { ...e, conditions: e.conditions?.map(xt) },
|
|
1422
|
+
}, xt = (e) => wt(e) ? e.key !== "search" || typeof e.value != "string" ? e : Ht(e.value, (n) => ({ ...e, value: n })) ?? e : { ...e, conditions: e.conditions?.map(xt) }, Rs = E.div`
|
|
1421
1423
|
padding: 4px 8px;
|
|
1422
1424
|
padding-bottom: 0;
|
|
1423
1425
|
|
|
@@ -1425,7 +1427,7 @@ const Jn = I(nt)`
|
|
|
1425
1427
|
opacity: 0.5;
|
|
1426
1428
|
pointer-events: none;
|
|
1427
1429
|
}
|
|
1428
|
-
`,
|
|
1430
|
+
`, Ls = ({
|
|
1429
1431
|
subtasksFilter: e,
|
|
1430
1432
|
setSubtasksFilter: n,
|
|
1431
1433
|
users: t,
|
|
@@ -1478,12 +1480,12 @@ const Jn = I(nt)`
|
|
|
1478
1480
|
// },
|
|
1479
1481
|
],
|
|
1480
1482
|
[t]
|
|
1481
|
-
), u = w(() =>
|
|
1482
|
-
|
|
1483
|
+
), u = w(() => js(e, l), [e, l]), [f, m] = ie(u), h = le(null), b = qn();
|
|
1484
|
+
Q(() => {
|
|
1483
1485
|
m(u);
|
|
1484
1486
|
}, [JSON.stringify(u)]);
|
|
1485
1487
|
const N = (g) => {
|
|
1486
|
-
const C =
|
|
1488
|
+
const C = Os(g);
|
|
1487
1489
|
n(C), r?.("");
|
|
1488
1490
|
}, V = (g) => {
|
|
1489
1491
|
b.wrapFilterChange(g, f, m);
|
|
@@ -1496,7 +1498,7 @@ const Jn = I(nt)`
|
|
|
1496
1498
|
() => [{ id: "isDone", label: O, tooltip: "Status" }],
|
|
1497
1499
|
[O]
|
|
1498
1500
|
);
|
|
1499
|
-
return /* @__PURE__ */ x(
|
|
1501
|
+
return /* @__PURE__ */ x(Rs, { className: o ? "loading" : void 0, children: [
|
|
1500
1502
|
/* @__PURE__ */ i(
|
|
1501
1503
|
Rt,
|
|
1502
1504
|
{
|
|
@@ -1527,7 +1529,7 @@ const Jn = I(nt)`
|
|
|
1527
1529
|
}
|
|
1528
1530
|
),
|
|
1529
1531
|
/* @__PURE__ */ i(
|
|
1530
|
-
|
|
1532
|
+
zn,
|
|
1531
1533
|
{
|
|
1532
1534
|
isOpen: !!b.customRangeFilterId,
|
|
1533
1535
|
header: l.find((g) => g.id === b.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
|
|
@@ -1540,8 +1542,8 @@ const Jn = I(nt)`
|
|
|
1540
1542
|
}
|
|
1541
1543
|
)
|
|
1542
1544
|
] });
|
|
1543
|
-
},
|
|
1544
|
-
const [n, t] =
|
|
1545
|
+
}, Vs = ({ ...e }) => {
|
|
1546
|
+
const [n, t] = ie({}), [o, s] = ie(""), [a, r] = ie([]), { dispatch: l } = se(), { data: u = [] } = ot({ projectName: e.projectName }), f = e.subtasks?.length || 0, m = e.subtasks?.filter((b) => b.isDone).length || 0, h = w(() => {
|
|
1545
1547
|
let b = n;
|
|
1546
1548
|
if (o) {
|
|
1547
1549
|
const N = { key: "search", operator: "like", value: o };
|
|
@@ -1551,11 +1553,11 @@ const Jn = I(nt)`
|
|
|
1551
1553
|
operator: "and"
|
|
1552
1554
|
};
|
|
1553
1555
|
}
|
|
1554
|
-
return
|
|
1556
|
+
return Kn(xt(b));
|
|
1555
1557
|
}, [n, o]);
|
|
1556
|
-
return /* @__PURE__ */ x(
|
|
1558
|
+
return /* @__PURE__ */ x(Ee, { children: [
|
|
1557
1559
|
/* @__PURE__ */ i(
|
|
1558
|
-
|
|
1560
|
+
Fs,
|
|
1559
1561
|
{
|
|
1560
1562
|
label: `Subtasks (${f})`,
|
|
1561
1563
|
filters: [],
|
|
@@ -1564,7 +1566,7 @@ const Jn = I(nt)`
|
|
|
1564
1566
|
}
|
|
1565
1567
|
),
|
|
1566
1568
|
/* @__PURE__ */ i(
|
|
1567
|
-
|
|
1569
|
+
Ls,
|
|
1568
1570
|
{
|
|
1569
1571
|
subtasksFilter: n,
|
|
1570
1572
|
setSubtasksFilter: t,
|
|
@@ -1575,7 +1577,7 @@ const Jn = I(nt)`
|
|
|
1575
1577
|
}
|
|
1576
1578
|
),
|
|
1577
1579
|
/* @__PURE__ */ i(
|
|
1578
|
-
|
|
1580
|
+
Dn,
|
|
1579
1581
|
{
|
|
1580
1582
|
...e,
|
|
1581
1583
|
style: { padding: 8, height: "unset" },
|
|
@@ -1588,7 +1590,7 @@ const Jn = I(nt)`
|
|
|
1588
1590
|
}
|
|
1589
1591
|
)
|
|
1590
1592
|
] });
|
|
1591
|
-
}, tt = ["product", "representation"],
|
|
1593
|
+
}, tt = ["product", "representation"], Us = ({
|
|
1592
1594
|
entityType: e,
|
|
1593
1595
|
entitySubTypes: n = [],
|
|
1594
1596
|
// entities is data we already have from kanban
|
|
@@ -1611,88 +1613,88 @@ const Jn = I(nt)`
|
|
|
1611
1613
|
onOpenViewer: c,
|
|
1612
1614
|
onEntityFocus: g,
|
|
1613
1615
|
onOpen: C,
|
|
1614
|
-
onUriOpen:
|
|
1616
|
+
onUriOpen: I,
|
|
1615
1617
|
// when the details panel is opened from uri
|
|
1616
1618
|
// annotations
|
|
1617
1619
|
annotations: T,
|
|
1618
1620
|
removeAnnotation: D,
|
|
1619
|
-
exportAnnotationComposite:
|
|
1620
|
-
entityListId:
|
|
1621
|
+
exportAnnotationComposite: v,
|
|
1622
|
+
entityListId: y,
|
|
1621
1623
|
guestCategories: A = {},
|
|
1622
1624
|
entityListsContext: R,
|
|
1623
|
-
resolveVersionJump:
|
|
1625
|
+
resolveVersionJump: $
|
|
1624
1626
|
}) => {
|
|
1625
1627
|
const {
|
|
1626
|
-
closeSlideOut:
|
|
1628
|
+
closeSlideOut: ae,
|
|
1627
1629
|
openPip: ce,
|
|
1628
1630
|
user: de,
|
|
1629
1631
|
isGuest: ue,
|
|
1630
1632
|
entities: F,
|
|
1631
1633
|
setEntities: pe,
|
|
1632
|
-
slideOut:
|
|
1634
|
+
slideOut: K,
|
|
1633
1635
|
useSearchParams: me,
|
|
1634
|
-
SubtasksManager:
|
|
1636
|
+
SubtasksManager: X,
|
|
1635
1637
|
useNavigate: he
|
|
1636
|
-
} =
|
|
1638
|
+
} = se(), { currentTab: j, setTab: z, isFeed: Y } = kn(N), [xe, ge] = me(), ve = le(!1), S = F?.entityType ?? e, fe = F?.entities ?? o, k = F?.entitySubTypes ?? n, B = F?.entities ? [] : t, _ = F?.entities ? F.entities.map((p) => p.projectName) : m;
|
|
1637
1639
|
hn(
|
|
1638
|
-
S ?
|
|
1640
|
+
S ? fe.map((p) => ({ ...p, entityType: S })) : [],
|
|
1639
1641
|
h ? qe.slideOut : qe.detailsPanel
|
|
1640
|
-
),
|
|
1642
|
+
), Q(() => {
|
|
1641
1643
|
C && !ve.current && (ve.current = !0, C());
|
|
1642
1644
|
}, []);
|
|
1643
|
-
const { tabs:
|
|
1644
|
-
|
|
1645
|
-
tt.includes(S) && j !== "details" && !
|
|
1646
|
-
}, [S, j,
|
|
1645
|
+
const { tabs: re, isLoading: oe } = pt(S), Z = re.find((p) => p.key === j), Se = Ke(j) && oe;
|
|
1646
|
+
Q(() => {
|
|
1647
|
+
tt.includes(S) && j !== "details" && !Z && !Se && z("details");
|
|
1648
|
+
}, [S, j, z, Z, Se]), Q(() => {
|
|
1647
1649
|
o.length && F && pe(null);
|
|
1648
1650
|
}, [o, F, pe]);
|
|
1649
1651
|
const ye = w(
|
|
1650
|
-
() => vt(f,
|
|
1651
|
-
[f,
|
|
1652
|
+
() => vt(f, _),
|
|
1653
|
+
[f, _]
|
|
1652
1654
|
), Ce = w(() => ht(ye), [ye]);
|
|
1653
|
-
|
|
1654
|
-
j === "files" && S !== "version" &&
|
|
1655
|
-
}, [S, j, N,
|
|
1656
|
-
let
|
|
1655
|
+
Q(() => {
|
|
1656
|
+
j === "files" && S !== "version" && z("feed"), j === "subtasks" && S !== "task" && z("feed"), Ke(j) && !oe && !Z && z(tt.includes(S) ? "details" : "feed");
|
|
1657
|
+
}, [S, j, N, oe, Z]);
|
|
1658
|
+
let ee = fe.length ? fe.map((p) => ({ id: p.id, projectName: p.projectName })) : (
|
|
1657
1659
|
// @ts-expect-error = not sure what's going on with activeEntitiesData, we should try and remove it
|
|
1658
|
-
|
|
1660
|
+
B.map((p) => ({ id: p.id, projectName: p.projectName }))
|
|
1659
1661
|
);
|
|
1660
|
-
|
|
1662
|
+
ee = ee.filter((p) => p.id);
|
|
1661
1663
|
const {
|
|
1662
|
-
data:
|
|
1663
|
-
isFetching:
|
|
1664
|
+
data: M = [],
|
|
1665
|
+
isFetching: te,
|
|
1664
1666
|
isError: d,
|
|
1665
1667
|
originalArgs: P
|
|
1666
1668
|
} = it(
|
|
1667
|
-
{ entityType: S, entities:
|
|
1669
|
+
{ entityType: S, entities: ee },
|
|
1668
1670
|
{
|
|
1669
|
-
skip: !
|
|
1671
|
+
skip: !ee.length || !Gt.includes(S)
|
|
1670
1672
|
}
|
|
1671
1673
|
);
|
|
1672
|
-
|
|
1673
|
-
h ||
|
|
1674
|
+
Q(() => {
|
|
1675
|
+
h || ae();
|
|
1674
1676
|
}, [P, h]);
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1677
|
-
F || (
|
|
1678
|
-
}, [F]),
|
|
1679
|
-
if (!
|
|
1677
|
+
const W = le(null);
|
|
1678
|
+
Q(() => {
|
|
1679
|
+
F || (W.current = null);
|
|
1680
|
+
}, [F]), Q(() => {
|
|
1681
|
+
if (!te && (F?.source === "uri" || F?.source === "url") && F?.entities?.length && I) {
|
|
1680
1682
|
const p = F.entities[0].id;
|
|
1681
|
-
if (
|
|
1682
|
-
const L =
|
|
1683
|
+
if (W.current === p) return;
|
|
1684
|
+
const L = M.find((q) => q.id === p);
|
|
1683
1685
|
if (!L) return;
|
|
1684
|
-
|
|
1686
|
+
W.current = p, I(L, F.source);
|
|
1685
1687
|
}
|
|
1686
|
-
}, [
|
|
1687
|
-
const
|
|
1688
|
-
entity:
|
|
1688
|
+
}, [M, te, F, I]);
|
|
1689
|
+
const J = ft(f), H = _[0], $e = f[H] || {}, G = M[0] || {}, Te = M[M.length - 1], Pe = _[_.length - 1], Me = N === "inbox" && S === "version" && M.length === 1 ? ms(M[0]) : void 0, [_e, St] = Ss({
|
|
1690
|
+
entity: G,
|
|
1689
1691
|
entityType: S,
|
|
1690
|
-
projectName:
|
|
1691
|
-
isLoading:
|
|
1692
|
+
projectName: H,
|
|
1693
|
+
isLoading: te
|
|
1692
1694
|
}), { setEntityUri: Ct, setUri: He } = wn();
|
|
1693
|
-
|
|
1695
|
+
Q(() => {
|
|
1694
1696
|
if (!Te?.parents || !Pe) return;
|
|
1695
|
-
const { folderPath: p, taskName: L, versionName:
|
|
1697
|
+
const { folderPath: p, taskName: L, versionName: q, productName: Ge } = gn(
|
|
1696
1698
|
Te.parents,
|
|
1697
1699
|
S,
|
|
1698
1700
|
Te.name
|
|
@@ -1702,18 +1704,18 @@ const Jn = I(nt)`
|
|
|
1702
1704
|
folderPath: p,
|
|
1703
1705
|
taskName: L,
|
|
1704
1706
|
productName: Ge,
|
|
1705
|
-
versionName:
|
|
1707
|
+
versionName: q
|
|
1706
1708
|
}), () => {
|
|
1707
1709
|
He("");
|
|
1708
1710
|
};
|
|
1709
|
-
}, [
|
|
1711
|
+
}, [M, _, S]), Xn({
|
|
1710
1712
|
entityData: Te,
|
|
1711
1713
|
project: Pe,
|
|
1712
1714
|
activeEntityType: S,
|
|
1713
|
-
entitiesToQuery:
|
|
1715
|
+
entitiesToQuery: ee
|
|
1714
1716
|
});
|
|
1715
1717
|
const Tt = () => {
|
|
1716
|
-
|
|
1718
|
+
ge(
|
|
1717
1719
|
(p) => {
|
|
1718
1720
|
const L = new URLSearchParams(p);
|
|
1719
1721
|
return L.delete("project"), L.delete("type"), L.delete("id"), L;
|
|
@@ -1721,57 +1723,57 @@ const Jn = I(nt)`
|
|
|
1721
1723
|
{ replace: !0 }
|
|
1722
1724
|
);
|
|
1723
1725
|
}, De = () => {
|
|
1724
|
-
U?.(), pe(null), He(""), Tt(),
|
|
1726
|
+
U?.(), pe(null), He(""), Tt(), ae();
|
|
1725
1727
|
};
|
|
1726
|
-
|
|
1728
|
+
Q(() => {
|
|
1727
1729
|
const p = (L) => {
|
|
1728
1730
|
if (L.key === "Escape" && U) {
|
|
1729
|
-
const
|
|
1730
|
-
if (["INPUT", "TEXTAREA", "SELECT"].includes(
|
|
1731
|
+
const q = L.target;
|
|
1732
|
+
if (["INPUT", "TEXTAREA", "SELECT"].includes(q.tagName) || q.isContentEditable || h === !1 && (q.closest("#viewer-dialog") || K)) return;
|
|
1731
1733
|
De();
|
|
1732
1734
|
}
|
|
1733
1735
|
};
|
|
1734
1736
|
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
1735
|
-
}, [De, h,
|
|
1736
|
-
const { requestPipWindow: Nt } = xn(), Be = le(null), We = le(null),
|
|
1737
|
-
const p =
|
|
1737
|
+
}, [De, h, K]);
|
|
1738
|
+
const { requestPipWindow: Nt } = xn(), Be = le(null), We = le(null), It = M.length === 1 && S !== "representation", Et = w(() => {
|
|
1739
|
+
const p = G?.label || G?.name || "", L = G?.parents || [], q = [H];
|
|
1738
1740
|
switch (S) {
|
|
1739
1741
|
case "folder":
|
|
1740
1742
|
case "task":
|
|
1741
1743
|
case "product":
|
|
1742
|
-
|
|
1744
|
+
q.push(L.at(-1), p);
|
|
1743
1745
|
break;
|
|
1744
1746
|
case "version":
|
|
1745
|
-
|
|
1747
|
+
q.push(L.at(-2), L.at(-1), p);
|
|
1746
1748
|
break;
|
|
1747
1749
|
case "representation":
|
|
1748
|
-
|
|
1750
|
+
q.push(L.at(-3), L.at(-2), L.at(-1), p);
|
|
1749
1751
|
break;
|
|
1750
1752
|
default:
|
|
1751
|
-
|
|
1753
|
+
q.push(p);
|
|
1752
1754
|
}
|
|
1753
|
-
return
|
|
1754
|
-
}, [
|
|
1755
|
+
return q.filter(Boolean).join(" - ");
|
|
1756
|
+
}, [G, S, H]), Pt = () => {
|
|
1755
1757
|
ce({
|
|
1756
1758
|
entityType: S,
|
|
1757
|
-
entities:
|
|
1759
|
+
entities: ee,
|
|
1758
1760
|
scope: N
|
|
1759
1761
|
}), Nt(500, 500);
|
|
1760
1762
|
}, Dt = w(
|
|
1761
1763
|
() => ({
|
|
1762
|
-
projectName:
|
|
1764
|
+
projectName: H,
|
|
1763
1765
|
entityType: S,
|
|
1764
|
-
entities:
|
|
1766
|
+
entities: M.filter((p) => !!p?.id).map((p) => ({
|
|
1765
1767
|
id: p.id,
|
|
1766
1768
|
entityType: p.entityType || S,
|
|
1767
|
-
projectName: p.projectName ||
|
|
1769
|
+
projectName: p.projectName || H,
|
|
1768
1770
|
name: p.name,
|
|
1769
1771
|
label: p.label || void 0
|
|
1770
1772
|
})),
|
|
1771
1773
|
scope: N
|
|
1772
1774
|
}),
|
|
1773
|
-
[
|
|
1774
|
-
), ze = () => !(
|
|
1775
|
+
[H, S, M, N]
|
|
1776
|
+
), ze = () => !(_.length > 1 || ue && (!y || !Object.prototype.hasOwnProperty.call(
|
|
1775
1777
|
A,
|
|
1776
1778
|
de.attrib?.email || ""
|
|
1777
1779
|
)));
|
|
@@ -1780,32 +1782,32 @@ const Jn = I(nt)`
|
|
|
1780
1782
|
{
|
|
1781
1783
|
thumbnailInputRef: Be,
|
|
1782
1784
|
versionsInputRef: We,
|
|
1783
|
-
canUploadVersion:
|
|
1784
|
-
children: /* @__PURE__ */ x(
|
|
1785
|
-
/* @__PURE__ */ x(
|
|
1785
|
+
canUploadVersion: It,
|
|
1786
|
+
children: /* @__PURE__ */ x(ts, { className: "details-panel", children: [
|
|
1787
|
+
/* @__PURE__ */ x(Yn, { children: [
|
|
1786
1788
|
/* @__PURE__ */ i(
|
|
1787
1789
|
pn,
|
|
1788
1790
|
{
|
|
1789
1791
|
segments: _e,
|
|
1790
1792
|
versions: St,
|
|
1791
|
-
projectName:
|
|
1793
|
+
projectName: H,
|
|
1792
1794
|
hideProjectName: h,
|
|
1793
|
-
isLoading:
|
|
1795
|
+
isLoading: te || !_e.length,
|
|
1794
1796
|
entityType: S,
|
|
1795
1797
|
scope: N,
|
|
1796
1798
|
entityTypeIcons: Ce
|
|
1797
1799
|
}
|
|
1798
1800
|
),
|
|
1799
|
-
/* @__PURE__ */ x(
|
|
1801
|
+
/* @__PURE__ */ x(Zn, { className: "right-tools", children: [
|
|
1800
1802
|
/* @__PURE__ */ i(
|
|
1801
|
-
|
|
1803
|
+
ks,
|
|
1802
1804
|
{
|
|
1803
1805
|
entityType: S,
|
|
1804
|
-
entityId:
|
|
1805
|
-
entityIds:
|
|
1806
|
-
entityLabel:
|
|
1807
|
-
projectName:
|
|
1808
|
-
selectedEntities:
|
|
1806
|
+
entityId: G?.id,
|
|
1807
|
+
entityIds: ee.map((p) => p.id).filter(Boolean),
|
|
1808
|
+
entityLabel: Et,
|
|
1809
|
+
projectName: H,
|
|
1810
|
+
selectedEntities: M.filter((p) => !!p?.id).map((p) => {
|
|
1809
1811
|
const L = p.entityType || S;
|
|
1810
1812
|
return {
|
|
1811
1813
|
entityId: p.id,
|
|
@@ -1813,22 +1815,22 @@ const Jn = I(nt)`
|
|
|
1813
1815
|
hasReviewables: !!p.hasReviewables,
|
|
1814
1816
|
name: p.name,
|
|
1815
1817
|
label: p.label,
|
|
1816
|
-
projectName: p.projectName ||
|
|
1818
|
+
projectName: p.projectName || H,
|
|
1817
1819
|
folderId: L === "task" ? p.folder?.id : void 0
|
|
1818
1820
|
};
|
|
1819
1821
|
}),
|
|
1820
1822
|
entityListsContext: R,
|
|
1821
1823
|
onOpenPip: Pt,
|
|
1822
1824
|
onOpenViewer: c,
|
|
1823
|
-
productId:
|
|
1824
|
-
taskId:
|
|
1825
|
-
folderId:
|
|
1825
|
+
productId: G?.product?.id,
|
|
1826
|
+
taskId: G?.task?.id,
|
|
1827
|
+
folderId: G?.folder?.id
|
|
1826
1828
|
}
|
|
1827
1829
|
),
|
|
1828
1830
|
/* @__PURE__ */ i(
|
|
1829
1831
|
ln,
|
|
1830
1832
|
{
|
|
1831
|
-
entities:
|
|
1833
|
+
entities: ee,
|
|
1832
1834
|
entityType: S,
|
|
1833
1835
|
options: r || [],
|
|
1834
1836
|
onWatchersUpdate: O && O,
|
|
@@ -1836,7 +1838,7 @@ const Jn = I(nt)`
|
|
|
1836
1838
|
}
|
|
1837
1839
|
),
|
|
1838
1840
|
U && /* @__PURE__ */ i(
|
|
1839
|
-
|
|
1841
|
+
ne,
|
|
1840
1842
|
{
|
|
1841
1843
|
icon: "close",
|
|
1842
1844
|
variant: "text",
|
|
@@ -1847,26 +1849,26 @@ const Jn = I(nt)`
|
|
|
1847
1849
|
] })
|
|
1848
1850
|
] }),
|
|
1849
1851
|
Me && /* @__PURE__ */ i(
|
|
1850
|
-
|
|
1852
|
+
ps,
|
|
1851
1853
|
{
|
|
1852
1854
|
latestVersion: Me,
|
|
1853
|
-
resolveVersionJump:
|
|
1855
|
+
resolveVersionJump: $
|
|
1854
1856
|
}
|
|
1855
1857
|
),
|
|
1856
1858
|
/* @__PURE__ */ i(
|
|
1857
|
-
|
|
1859
|
+
cs,
|
|
1858
1860
|
{
|
|
1859
1861
|
entityType: S,
|
|
1860
|
-
entitySubTypes:
|
|
1861
|
-
entities:
|
|
1862
|
+
entitySubTypes: k,
|
|
1863
|
+
entities: M,
|
|
1862
1864
|
users: r,
|
|
1863
1865
|
disabledAssignees: l,
|
|
1864
1866
|
disabledStatuses: a,
|
|
1865
1867
|
tagsOptions: s,
|
|
1866
|
-
isFetching:
|
|
1868
|
+
isFetching: te,
|
|
1867
1869
|
isCompact: V,
|
|
1868
1870
|
currentTab: j,
|
|
1869
|
-
onTabChange:
|
|
1871
|
+
onTabChange: z,
|
|
1870
1872
|
projectInfo: ye,
|
|
1871
1873
|
onOpenViewer: (p) => c?.(p),
|
|
1872
1874
|
onEntityFocus: g,
|
|
@@ -1874,75 +1876,75 @@ const Jn = I(nt)`
|
|
|
1874
1876
|
versionsInputRef: We
|
|
1875
1877
|
}
|
|
1876
1878
|
),
|
|
1877
|
-
/* @__PURE__ */ x(ct, { projectName:
|
|
1878
|
-
|
|
1879
|
+
/* @__PURE__ */ x(ct, { projectName: H, children: [
|
|
1880
|
+
Y && !d && /* @__PURE__ */ i(
|
|
1879
1881
|
bt,
|
|
1880
1882
|
{
|
|
1881
1883
|
entityType: S,
|
|
1882
|
-
entities:
|
|
1884
|
+
entities: M,
|
|
1883
1885
|
activeUsers: u || [],
|
|
1884
|
-
projectInfo:
|
|
1885
|
-
projectName:
|
|
1886
|
+
projectInfo: $e,
|
|
1887
|
+
projectName: H,
|
|
1886
1888
|
disabled: !ze(),
|
|
1887
1889
|
scope: N,
|
|
1888
|
-
statuses:
|
|
1890
|
+
statuses: J,
|
|
1889
1891
|
readOnly: !1,
|
|
1890
|
-
entityListId:
|
|
1892
|
+
entityListId: y,
|
|
1891
1893
|
annotations: T,
|
|
1892
1894
|
removeAnnotation: D,
|
|
1893
|
-
exportAnnotationComposite:
|
|
1895
|
+
exportAnnotationComposite: v,
|
|
1894
1896
|
isSlideOut: h
|
|
1895
1897
|
}
|
|
1896
1898
|
),
|
|
1897
|
-
j === "subtasks" && S === "task" &&
|
|
1898
|
-
|
|
1899
|
+
j === "subtasks" && S === "task" && G?.id && X && /* @__PURE__ */ i(
|
|
1900
|
+
Vs,
|
|
1899
1901
|
{
|
|
1900
|
-
projectName:
|
|
1901
|
-
taskId:
|
|
1902
|
-
taskName:
|
|
1903
|
-
folderId:
|
|
1904
|
-
subtasks:
|
|
1905
|
-
SubtasksManager:
|
|
1902
|
+
projectName: H,
|
|
1903
|
+
taskId: G.id,
|
|
1904
|
+
taskName: G.name,
|
|
1905
|
+
folderId: G.folder?.id,
|
|
1906
|
+
subtasks: G.task?.subtasks || [],
|
|
1907
|
+
SubtasksManager: X,
|
|
1906
1908
|
useNavigate: he,
|
|
1907
|
-
onNotFound: () =>
|
|
1909
|
+
onNotFound: () => z("feed")
|
|
1908
1910
|
}
|
|
1909
1911
|
),
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
+
Z && /* @__PURE__ */ i(es, { children: /* @__PURE__ */ i(
|
|
1913
|
+
Fn,
|
|
1912
1914
|
{
|
|
1913
|
-
contribution:
|
|
1915
|
+
contribution: Z,
|
|
1914
1916
|
context: Dt
|
|
1915
1917
|
},
|
|
1916
|
-
|
|
1918
|
+
Z.key
|
|
1917
1919
|
) }),
|
|
1918
1920
|
j === "files" && /* @__PURE__ */ i(
|
|
1919
|
-
|
|
1921
|
+
us,
|
|
1920
1922
|
{
|
|
1921
|
-
entities:
|
|
1923
|
+
entities: M,
|
|
1922
1924
|
scope: N,
|
|
1923
|
-
isLoadingVersion:
|
|
1925
|
+
isLoadingVersion: te
|
|
1924
1926
|
}
|
|
1925
1927
|
),
|
|
1926
1928
|
j === "details" && /* @__PURE__ */ i(
|
|
1927
|
-
|
|
1929
|
+
Cs,
|
|
1928
1930
|
{
|
|
1929
1931
|
entityType: S,
|
|
1930
|
-
entities:
|
|
1932
|
+
entities: M,
|
|
1931
1933
|
activeUsers: u || [],
|
|
1932
|
-
projectInfo:
|
|
1933
|
-
projectName:
|
|
1934
|
+
projectInfo: $e,
|
|
1935
|
+
projectName: H,
|
|
1934
1936
|
disabled: !ze(),
|
|
1935
1937
|
scope: N,
|
|
1936
|
-
statuses:
|
|
1938
|
+
statuses: J,
|
|
1937
1939
|
readOnly: !1,
|
|
1938
1940
|
annotations: T,
|
|
1939
1941
|
removeAnnotation: D,
|
|
1940
|
-
exportAnnotationComposite:
|
|
1942
|
+
exportAnnotationComposite: v,
|
|
1941
1943
|
children: /* @__PURE__ */ i(
|
|
1942
1944
|
cn,
|
|
1943
1945
|
{
|
|
1944
|
-
entities:
|
|
1945
|
-
isLoading:
|
|
1946
|
+
entities: M,
|
|
1947
|
+
isLoading: te
|
|
1946
1948
|
}
|
|
1947
1949
|
)
|
|
1948
1950
|
}
|
|
@@ -1951,14 +1953,14 @@ const Jn = I(nt)`
|
|
|
1951
1953
|
] })
|
|
1952
1954
|
}
|
|
1953
1955
|
);
|
|
1954
|
-
},
|
|
1956
|
+
}, $s = ({
|
|
1955
1957
|
isOpen: e,
|
|
1956
1958
|
entityType: n,
|
|
1957
1959
|
...t
|
|
1958
1960
|
}) => {
|
|
1959
|
-
const { entities: o } =
|
|
1960
|
-
return !e && !o || !n && !o ? null : /* @__PURE__ */ i(
|
|
1961
|
-
},
|
|
1961
|
+
const { entities: o } = se();
|
|
1962
|
+
return !e && !o || !n && !o ? null : /* @__PURE__ */ i(Us, { ...t, entityType: n || o?.entityType });
|
|
1963
|
+
}, Ms = Mt`
|
|
1962
1964
|
from {
|
|
1963
1965
|
translate: 0 0;
|
|
1964
1966
|
}
|
|
@@ -1966,7 +1968,7 @@ to {
|
|
|
1966
1968
|
translate: calc(-100% - 8px) 0;
|
|
1967
1969
|
|
|
1968
1970
|
}
|
|
1969
|
-
`,
|
|
1971
|
+
`, _s = E.div`
|
|
1970
1972
|
position: absolute;
|
|
1971
1973
|
left: 0;
|
|
1972
1974
|
top: 0;
|
|
@@ -1975,11 +1977,11 @@ to {
|
|
|
1975
1977
|
width: 100%;
|
|
1976
1978
|
max-width: 533px;
|
|
1977
1979
|
|
|
1978
|
-
animation: ${
|
|
1979
|
-
`,
|
|
1980
|
-
const { slideOut: t, onOpenViewer: o } =
|
|
1981
|
-
return l ? /* @__PURE__ */ i(
|
|
1982
|
-
|
|
1980
|
+
animation: ${Ms} 0.2s ease forwards;
|
|
1981
|
+
`, Ha = ({ projectsInfo: e, scope: n }) => {
|
|
1982
|
+
const { slideOut: t, onOpenViewer: o } = se(), { entityType: s, entityId: a, projectName: r } = t || {}, l = !!s && !!a && !!r, { data: u } = ot({ projectName: r }, { skip: !r }), f = e[r || ""] || {}, { tags: m = [] } = f, { closeSlideOut: h } = se(), b = () => h(), N = (V) => o?.(V);
|
|
1983
|
+
return l ? /* @__PURE__ */ i(_s, { children: /* @__PURE__ */ i(
|
|
1984
|
+
$s,
|
|
1983
1985
|
{
|
|
1984
1986
|
isOpen: !0,
|
|
1985
1987
|
entityType: s,
|
|
@@ -1997,20 +1999,20 @@ to {
|
|
|
1997
1999
|
}
|
|
1998
2000
|
) }) : null;
|
|
1999
2001
|
};
|
|
2000
|
-
|
|
2002
|
+
E(Jn)`
|
|
2001
2003
|
.p-dialog-header-icons {
|
|
2002
2004
|
display: none;
|
|
2003
2005
|
}
|
|
2004
2006
|
.p-dialog-content {
|
|
2005
2007
|
}
|
|
2006
2008
|
`;
|
|
2007
|
-
const
|
|
2009
|
+
const Hs = E.div`
|
|
2008
2010
|
display: flex;
|
|
2009
2011
|
flex-direction: column;
|
|
2010
2012
|
margin: -8px;
|
|
2011
2013
|
width: calc(100% + 16px);
|
|
2012
2014
|
height: calc(100% + 16px);
|
|
2013
|
-
`,
|
|
2015
|
+
`, Bs = E.header`
|
|
2014
2016
|
display: flex;
|
|
2015
2017
|
align-items: flex-start;
|
|
2016
2018
|
gap: var(--base-gap-large);
|
|
@@ -2022,7 +2024,7 @@ const Ms = I.div`
|
|
|
2022
2024
|
display: none;
|
|
2023
2025
|
}
|
|
2024
2026
|
}
|
|
2025
|
-
`,
|
|
2027
|
+
`, Ws = E.div`
|
|
2026
2028
|
display: flex;
|
|
2027
2029
|
flex-direction: column;
|
|
2028
2030
|
height: 100%;
|
|
@@ -2059,12 +2061,12 @@ const Ms = I.div`
|
|
|
2059
2061
|
align-items: center;
|
|
2060
2062
|
gap: var(--base-gap-medium);
|
|
2061
2063
|
}
|
|
2062
|
-
`,
|
|
2064
|
+
`, zs = E.div`
|
|
2063
2065
|
display: flex;
|
|
2064
2066
|
justify-content: space-between;
|
|
2065
2067
|
padding: 8px;
|
|
2066
2068
|
padding-top: 0;
|
|
2067
|
-
`,
|
|
2069
|
+
`, Gs = E.div`
|
|
2068
2070
|
border-top: solid 1px var(--md-sys-color-outline-variant);
|
|
2069
2071
|
height: 100%;
|
|
2070
2072
|
overflow: hidden;
|
|
@@ -2083,7 +2085,7 @@ const Ms = I.div`
|
|
|
2083
2085
|
display: none;
|
|
2084
2086
|
}
|
|
2085
2087
|
}
|
|
2086
|
-
`,
|
|
2088
|
+
`, Qs = E.div`
|
|
2087
2089
|
display: flex;
|
|
2088
2090
|
align-items: center;
|
|
2089
2091
|
gap: var(--base-gap-small);
|
|
@@ -2094,8 +2096,8 @@ const Ms = I.div`
|
|
|
2094
2096
|
.icon {
|
|
2095
2097
|
font-variation-settings: 'FILL' 1;
|
|
2096
2098
|
}
|
|
2097
|
-
`,
|
|
2098
|
-
const { pip: e } =
|
|
2099
|
+
`, Ba = () => {
|
|
2100
|
+
const { pip: e } = se(), n = e?.entityType, t = e?.entities || [], o = e?.scope || "", s = t.length > 0 && !!n, a = t.map((v) => v.projectName), { data: r = [] } = Qt({ projects: a }, { skip: !s }), { data: l = {}, isFetching: u } = qt(
|
|
2099
2101
|
{
|
|
2100
2102
|
projects: a
|
|
2101
2103
|
},
|
|
@@ -2114,32 +2116,32 @@ const Ms = I.div`
|
|
|
2114
2116
|
[l, a]
|
|
2115
2117
|
), N = w(
|
|
2116
2118
|
() => ({
|
|
2117
|
-
task: b.taskTypes.filter((
|
|
2118
|
-
folder: b.folderTypes.filter((
|
|
2119
|
-
product: b.productTypes.filter((
|
|
2119
|
+
task: b.taskTypes.filter((v) => !!v.icon).reduce((v, y) => ({ ...v, [y.name]: y.icon }), {}),
|
|
2120
|
+
folder: b.folderTypes.filter((v) => !!v.icon).reduce((v, y) => ({ ...v, [y.name]: y.icon }), {}),
|
|
2121
|
+
product: b.productTypes.filter((v) => !!v.icon).reduce((v, y) => ({ ...v, [y.name]: y.icon }), {})
|
|
2120
2122
|
}),
|
|
2121
2123
|
[b]
|
|
2122
2124
|
), V = w(
|
|
2123
2125
|
() => n ? mt(m, n, N) : [],
|
|
2124
2126
|
[m, n]
|
|
2125
|
-
), U = w(() => r.filter((
|
|
2127
|
+
), U = w(() => r.filter((v) => m.some((y) => y?.task?.assignees?.includes(v.name))).map((v) => ({ ...v, avatarUrl: `/api/users/${v.name}/avatar` })), [r, t]), O = m[0];
|
|
2126
2128
|
if (!m.length || !O) return null;
|
|
2127
2129
|
if (h) return /* @__PURE__ */ i("div", { children: "Loading..." });
|
|
2128
|
-
const c = O?.projectName,
|
|
2130
|
+
const c = O?.projectName, I = m.some((v) => v?.status !== O?.status) ? {
|
|
2129
2131
|
icon: "question_mark",
|
|
2130
2132
|
color: "var(--md-sys-color-surface-container-highest)",
|
|
2131
2133
|
name: "Mixed statuses"
|
|
2132
|
-
} : f.find((
|
|
2134
|
+
} : f.find((v) => v.name === O?.status) || {
|
|
2133
2135
|
icon: "",
|
|
2134
2136
|
color: "",
|
|
2135
2137
|
name: "None"
|
|
2136
2138
|
};
|
|
2137
2139
|
if (!n) return null;
|
|
2138
2140
|
const { title: T, subTitle: D } = gt(m, n);
|
|
2139
|
-
return /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(ct, { projectName: c, children: /* @__PURE__ */ x(
|
|
2140
|
-
/* @__PURE__ */ x(
|
|
2141
|
+
return /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(ct, { projectName: c, children: /* @__PURE__ */ x(Hs, { children: [
|
|
2142
|
+
/* @__PURE__ */ x(Bs, { children: [
|
|
2141
2143
|
/* @__PURE__ */ i(rt, { thumbnails: V }),
|
|
2142
|
-
/* @__PURE__ */ x(
|
|
2144
|
+
/* @__PURE__ */ x(Ws, { children: [
|
|
2143
2145
|
/* @__PURE__ */ i("h2", { children: T }),
|
|
2144
2146
|
/* @__PURE__ */ x("div", { className: "sub-title", children: [
|
|
2145
2147
|
/* @__PURE__ */ x("span", { children: [
|
|
@@ -2150,23 +2152,23 @@ const Ms = I.div`
|
|
|
2150
2152
|
] })
|
|
2151
2153
|
] })
|
|
2152
2154
|
] }),
|
|
2153
|
-
/* @__PURE__ */ x(
|
|
2155
|
+
/* @__PURE__ */ x(zs, { children: [
|
|
2154
2156
|
/* @__PURE__ */ x(
|
|
2155
|
-
|
|
2157
|
+
Qs,
|
|
2156
2158
|
{
|
|
2157
2159
|
style: {
|
|
2158
|
-
backgroundColor:
|
|
2159
|
-
color: Re(
|
|
2160
|
+
backgroundColor: I?.color,
|
|
2161
|
+
color: Re(I?.color)
|
|
2160
2162
|
},
|
|
2161
2163
|
children: [
|
|
2162
|
-
/* @__PURE__ */ i(
|
|
2163
|
-
/* @__PURE__ */ i("span", { className: "label", children:
|
|
2164
|
+
/* @__PURE__ */ i(Ie, { icon: I.icon || "question_mark", style: { color: "inherit" } }),
|
|
2165
|
+
/* @__PURE__ */ i("span", { className: "label", children: I?.name })
|
|
2164
2166
|
]
|
|
2165
2167
|
}
|
|
2166
2168
|
),
|
|
2167
2169
|
/* @__PURE__ */ i(Lt, { users: U, style: { pointerEvents: "none" } })
|
|
2168
2170
|
] }),
|
|
2169
|
-
/* @__PURE__ */ i(
|
|
2171
|
+
/* @__PURE__ */ i(Gs, { children: /* @__PURE__ */ i(
|
|
2170
2172
|
bt,
|
|
2171
2173
|
{
|
|
2172
2174
|
entityType: n,
|
|
@@ -2185,22 +2187,22 @@ const Ms = I.div`
|
|
|
2185
2187
|
};
|
|
2186
2188
|
export {
|
|
2187
2189
|
on as AssigneeSelect,
|
|
2188
|
-
|
|
2190
|
+
Ga as CloseButton,
|
|
2189
2191
|
en as Content,
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2192
|
+
Qa as ContentRow,
|
|
2193
|
+
$s as DetailsPanel,
|
|
2194
|
+
Ba as DetailsPanelFloating,
|
|
2195
|
+
Ha as DetailsPanelSlideOut,
|
|
2196
|
+
qa as Footer,
|
|
2195
2197
|
Yt as Grid,
|
|
2196
2198
|
Zt as Header,
|
|
2197
2199
|
Xt as HeaderContainer,
|
|
2198
|
-
|
|
2200
|
+
Ka as LabelWrapper,
|
|
2199
2201
|
rn as PriorityEnumDropdown,
|
|
2200
2202
|
sn as ReadOnlyTags,
|
|
2201
2203
|
an as StatusSelect,
|
|
2202
2204
|
nn as TagsSelect,
|
|
2203
|
-
|
|
2205
|
+
Ja as ThumbnailWrapper,
|
|
2204
2206
|
tn as Title,
|
|
2205
2207
|
tt as entitiesWithoutFeed
|
|
2206
2208
|
};
|