@ynput/ayon-frontend-shared 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +308 -308
- package/dist/chunks/MetaWidget.es.js +1 -1
- package/dist/chunks/Slicer.es.js +441 -434
- package/dist/chunks/Watchers.es.js +1 -1
- package/dist/chunks/searchTerms.es.js +5 -4
- package/dist/context.es.js +255 -255
- package/dist/types/Actions.d.ts +14 -14
- package/dist/types/ContextMenu.d.ts +14 -14
- package/dist/types/DetailsPanel.d.ts +14 -14
- package/dist/types/EntityPickerDialog.d.ts +14 -14
- package/dist/types/Feed.d.ts +14 -14
- package/dist/types/ListTable.d.ts +14 -14
- package/dist/types/NewEntity.d.ts +14 -14
- package/dist/types/ProjectTreeTable.d.ts +14 -14
- package/dist/types/RepresentationsList.d.ts +14 -14
- package/dist/types/SimpleTable.d.ts +14 -14
- package/dist/types/Slicer.d.ts +14 -14
- package/dist/types/Views.d.ts +14 -14
- package/dist/types/api.d.ts +14 -14
- package/dist/types/components.d.ts +14 -14
- package/dist/types/context.d.ts +14 -14
- package/dist/types/hooks.d.ts +14 -14
- package/dist/types/index.d.ts +14 -14
- package/dist/types/util.d.ts +16 -14
- package/dist/util.es.js +61 -60
- package/package.json +1 -1
package/dist/DetailsPanel.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import S, { keyframes as xt } from "styled-components";
|
|
|
5
5
|
import { bo as St } from "./chunks/searchTerms.es.js";
|
|
6
6
|
import { bl as Ct, bJ as Tt, bX as Nt, cr as ze, bt as Ge, s as Dt, bN as Pt, c6 as It } from "./chunks/getUris.es.js";
|
|
7
7
|
import "primereact/confirmdialog";
|
|
8
|
-
import { c as Et, a as Ft, H as At, G as Ot, y as jt, w as Qe, z as Rt, A as Ut, B as Vt, E as
|
|
8
|
+
import { c as Et, a as Ft, H as At, G as Ot, y as jt, w as Qe, z as Rt, A as Ut, B as Vt, E as $t, I as Lt, J as _t, W as Mt, s as Ht } from "./chunks/Watchers.es.js";
|
|
9
9
|
import { K as va, N as ya, O as ka, Q as wa, T as xa } from "./chunks/Watchers.es.js";
|
|
10
10
|
import { E as Bt, R as Wt, a as zt } from "./chunks/EntityPath.es.js";
|
|
11
11
|
import { union as we, upperFirst as qe } from "lodash";
|
|
@@ -29,8 +29,8 @@ import { M as ln, a as cn } from "./chunks/Menu.es.js";
|
|
|
29
29
|
import { D as dn } from "./chunks/DetailsDialog.es.js";
|
|
30
30
|
import { u as un } from "./chunks/VersionUploadContextInstance.es.js";
|
|
31
31
|
import { p as pn } from "./chunks/pluralize.es.js";
|
|
32
|
-
import { c as
|
|
33
|
-
import { u as
|
|
32
|
+
import { c as hn } from "./chunks/copyToClipboard.es.js";
|
|
33
|
+
import { u as mn } from "./chunks/useQueryArgumentChangeLoading.es.js";
|
|
34
34
|
import { c as Je, b as gn } from "./chunks/Feed.es.js";
|
|
35
35
|
import { A as fn, C as bn } from "./chunks/ThumbnailSimple.es.js";
|
|
36
36
|
import { m as vn, k as yn } from "./chunks/MetaWidget.es.js";
|
|
@@ -54,10 +54,10 @@ function Tn({
|
|
|
54
54
|
if (!e?.parents || !n) return;
|
|
55
55
|
const s = new URL(window.location.href), a = s.searchParams;
|
|
56
56
|
a.set("project", n), t && a.set("type", t);
|
|
57
|
-
const r = (o || []).filter((
|
|
57
|
+
const r = (o || []).filter((f) => f.projectName === n).map((f) => f.id).filter(Boolean)[0];
|
|
58
58
|
r && a.set("id", r);
|
|
59
|
-
const
|
|
60
|
-
window.history.replaceState(
|
|
59
|
+
const l = `${s.pathname}?${a.toString()}${s.hash}`, h = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
60
|
+
l !== h && window.history.replaceState(window.history.state, "", l);
|
|
61
61
|
}, [e, n, t, o]);
|
|
62
62
|
}
|
|
63
63
|
const Nn = S(Me)`
|
|
@@ -257,27 +257,27 @@ const Nn = S(Me)`
|
|
|
257
257
|
users: s = [],
|
|
258
258
|
disabledStatuses: a,
|
|
259
259
|
tagsOptions: r = [],
|
|
260
|
-
isFetching:
|
|
261
|
-
isCompact:
|
|
262
|
-
currentTab:
|
|
260
|
+
isFetching: l,
|
|
261
|
+
isCompact: h = !1,
|
|
262
|
+
currentTab: f,
|
|
263
263
|
onTabChange: u,
|
|
264
264
|
projectInfo: g,
|
|
265
|
-
onOpenViewer:
|
|
265
|
+
onOpenViewer: b,
|
|
266
266
|
onEntityFocus: x,
|
|
267
267
|
thumbnailInputRef: j,
|
|
268
268
|
versionsInputRef: R
|
|
269
269
|
}) => {
|
|
270
|
-
const { useSearchParams: E, useNavigate:
|
|
271
|
-
t.map((
|
|
270
|
+
const { useSearchParams: E, useNavigate: c, bundleMode: d } = G(), p = c(), [C, A] = E(), T = Y(null), v = P(() => Ye(g), [g]), w = Et(
|
|
271
|
+
t.map((m) => m.projectName),
|
|
272
272
|
[e]
|
|
273
|
-
), O = P(() => e === "task" ? we(...t.map((
|
|
274
|
-
...t.map((
|
|
275
|
-
const D =
|
|
273
|
+
), O = P(() => e === "task" ? we(...t.map((m) => m.task?.assignees || [])) : e === "version" ? we(
|
|
274
|
+
...t.map((m) => {
|
|
275
|
+
const D = m.version?.author;
|
|
276
276
|
return Array.isArray(D) ? D : D ? [D] : [];
|
|
277
277
|
})
|
|
278
278
|
) : [], [t, e]);
|
|
279
279
|
let U = t[0];
|
|
280
|
-
const _ = t.length === 0 || !U ||
|
|
280
|
+
const _ = t.length === 0 || !U || l;
|
|
281
281
|
U || (U = {
|
|
282
282
|
parents: [],
|
|
283
283
|
id: "placeholder",
|
|
@@ -294,35 +294,35 @@ const Nn = S(Me)`
|
|
|
294
294
|
path: ""
|
|
295
295
|
});
|
|
296
296
|
const Z = t.length > 1 ? void 0 : U?.projectName;
|
|
297
|
-
t.filter((
|
|
297
|
+
t.filter((m) => m.projectName === U?.projectName && m.id).map((m) => m.id);
|
|
298
298
|
const { data: ee } = Ct({ attributeName: "priority" }), te = Gt(ee, e), ne = P(
|
|
299
299
|
() => Xe(t, e, v),
|
|
300
300
|
[t, e, v]
|
|
301
|
-
), I = P(() => t.map((
|
|
302
|
-
() => r.reduce((
|
|
301
|
+
), I = P(() => t.map((m) => m.status), [t]), se = P(() => t.map((m) => m.attrib?.priority), [t]), ie = P(() => t.map((m) => m.tags), [t]), le = P(
|
|
302
|
+
() => r.reduce((m, D) => (m[D.name] = D, m), {}),
|
|
303
303
|
[r]
|
|
304
|
-
), Q = t.length > 1, re = !Q && !!U?.hasReviewables,
|
|
305
|
-
entities: t.map((
|
|
306
|
-
id:
|
|
307
|
-
projectName:
|
|
308
|
-
users:
|
|
309
|
-
folderId:
|
|
310
|
-
productId:
|
|
304
|
+
), Q = t.length > 1, re = !Q && !!U?.hasReviewables, $ = ne.length === 1, { updateEntity: V } = Ft({
|
|
305
|
+
entities: t.map((m) => ({
|
|
306
|
+
id: m.id,
|
|
307
|
+
projectName: m.projectName,
|
|
308
|
+
users: m.task?.assignees || [],
|
|
309
|
+
folderId: m.folder?.id,
|
|
310
|
+
productId: m.product?.id
|
|
311
311
|
})),
|
|
312
312
|
entityType: e
|
|
313
|
-
}), q = (
|
|
314
|
-
let
|
|
315
|
-
e === "version" && U.product?.id && (
|
|
313
|
+
}), q = (m, D) => D == null ? console.error("value is null or undefined") : V(m, D), ce = () => {
|
|
314
|
+
let m, D = U.id, H = e + "Id";
|
|
315
|
+
e === "version" && U.product?.id && (m = [U.id], D = U.product?.id, H = "productId"), D && b({
|
|
316
316
|
[H]: D,
|
|
317
317
|
projectName: Z,
|
|
318
|
-
versionIds:
|
|
318
|
+
versionIds: m
|
|
319
319
|
});
|
|
320
320
|
}, pe = (e === "task" || e === "version") && (O.length > 0 || e === "task"), de = [...St(s, O)];
|
|
321
321
|
if (pe) {
|
|
322
|
-
const
|
|
322
|
+
const m = s.map((H) => H.name), D = O.filter((H) => !m.includes(H));
|
|
323
323
|
D.length && de.push(...D.map((H) => ({ name: H, fullName: H })));
|
|
324
324
|
}
|
|
325
|
-
const { title: N, subTitle:
|
|
325
|
+
const { title: N, subTitle: he } = Ze(t, e), me = w?.length !== 0 && w?.find((m) => m.name === I[0]);
|
|
326
326
|
return /* @__PURE__ */ i(At, { children: /* @__PURE__ */ i(
|
|
327
327
|
Bt,
|
|
328
328
|
{
|
|
@@ -331,12 +331,12 @@ const Nn = S(Me)`
|
|
|
331
331
|
projectName: Z,
|
|
332
332
|
thumbnailInputRef: j,
|
|
333
333
|
versionsInputRef: R,
|
|
334
|
-
onVersionCreated: (
|
|
335
|
-
children: /* @__PURE__ */ k(Ot, { className: oe("details-panel-header", { isCompact:
|
|
334
|
+
onVersionCreated: (m) => x?.(m, "version"),
|
|
335
|
+
children: /* @__PURE__ */ k(Ot, { className: oe("details-panel-header", { isCompact: h }), children: [
|
|
336
336
|
/* @__PURE__ */ k(
|
|
337
337
|
jt,
|
|
338
338
|
{
|
|
339
|
-
className: oe("titles", { isCompact:
|
|
339
|
+
className: oe("titles", { isCompact: h, loading: _ }, "no-shimmer"),
|
|
340
340
|
children: [
|
|
341
341
|
/* @__PURE__ */ k("div", { style: { position: "relative" }, children: [
|
|
342
342
|
/* @__PURE__ */ i(
|
|
@@ -345,7 +345,7 @@ const Nn = S(Me)`
|
|
|
345
345
|
isLoading: _,
|
|
346
346
|
shimmer: _,
|
|
347
347
|
thumbnails: ne,
|
|
348
|
-
onClick:
|
|
348
|
+
onClick: $ ? ce : void 0,
|
|
349
349
|
hoverIcon: re ? "play_circle" : void 0
|
|
350
350
|
}
|
|
351
351
|
),
|
|
@@ -363,7 +363,7 @@ const Nn = S(Me)`
|
|
|
363
363
|
options: [],
|
|
364
364
|
editable: !0,
|
|
365
365
|
editor: !0,
|
|
366
|
-
onChange: (
|
|
366
|
+
onChange: (m) => q("tags", m),
|
|
367
367
|
align: "right",
|
|
368
368
|
styleDropdown: { display: _ ? "none" : "unset" },
|
|
369
369
|
className: "tags-select",
|
|
@@ -376,7 +376,7 @@ const Nn = S(Me)`
|
|
|
376
376
|
qe(e),
|
|
377
377
|
" - "
|
|
378
378
|
] }),
|
|
379
|
-
/* @__PURE__ */ i("h3", { children:
|
|
379
|
+
/* @__PURE__ */ i("h3", { children: he })
|
|
380
380
|
] }),
|
|
381
381
|
e === "version" && !Q && !_ && U && /* @__PURE__ */ i(
|
|
382
382
|
Rn,
|
|
@@ -391,30 +391,30 @@ const Nn = S(Me)`
|
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
393
|
/* @__PURE__ */ i(
|
|
394
|
-
|
|
394
|
+
$t,
|
|
395
395
|
{
|
|
396
396
|
value: I,
|
|
397
397
|
options: w || [],
|
|
398
398
|
disabledValues: a,
|
|
399
399
|
invert: !0,
|
|
400
400
|
style: { maxWidth: "unset" },
|
|
401
|
-
onChange: (
|
|
401
|
+
onChange: (m) => q("status", m),
|
|
402
402
|
className: oe("status-select", { loading: _ }),
|
|
403
|
-
align:
|
|
404
|
-
$textColor: Be(
|
|
403
|
+
align: h ? "right" : "left",
|
|
404
|
+
$textColor: Be(me !== void 0 ? me.color : "#OOO")
|
|
405
405
|
}
|
|
406
406
|
),
|
|
407
|
-
!
|
|
408
|
-
|
|
407
|
+
!h && (!pe || _ ? /* @__PURE__ */ i("div", {}) : /* @__PURE__ */ i(
|
|
408
|
+
Lt,
|
|
409
409
|
{
|
|
410
410
|
value: O,
|
|
411
411
|
options: de,
|
|
412
|
-
disabledValues: o.map((
|
|
412
|
+
disabledValues: o.map((m) => m.name),
|
|
413
413
|
isMultiple: Q && O.length > 1 && e === "task",
|
|
414
414
|
readOnly: e !== "task",
|
|
415
415
|
emptyMessage: e === "task" ? "Assign user" : "",
|
|
416
416
|
align: "right",
|
|
417
|
-
onChange: (
|
|
417
|
+
onChange: (m) => q("assignees", m),
|
|
418
418
|
className: "assignee-select",
|
|
419
419
|
"data-tooltip": O.length ? e === "task" ? "Assigned users" : "Author" : ""
|
|
420
420
|
}
|
|
@@ -425,11 +425,11 @@ const Nn = S(Me)`
|
|
|
425
425
|
entities: t,
|
|
426
426
|
entityType: e,
|
|
427
427
|
entitySubTypes: n,
|
|
428
|
-
isLoadingEntity: !!
|
|
428
|
+
isLoadingEntity: !!l || !!_,
|
|
429
429
|
searchParams: C,
|
|
430
430
|
bundleMode: d,
|
|
431
431
|
onSetSearchParams: A,
|
|
432
|
-
onNavigate:
|
|
432
|
+
onNavigate: p
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
435
|
te ? /* @__PURE__ */ i(
|
|
@@ -438,7 +438,7 @@ const Nn = S(Me)`
|
|
|
438
438
|
options: te,
|
|
439
439
|
placeholder: "No priority",
|
|
440
440
|
value: se,
|
|
441
|
-
onChange: (
|
|
441
|
+
onChange: (m) => q("attrib", { priority: m[0] }),
|
|
442
442
|
align: "right"
|
|
443
443
|
}
|
|
444
444
|
) : /* @__PURE__ */ i("div", { style: { height: 32 } }),
|
|
@@ -446,7 +446,7 @@ const Nn = S(Me)`
|
|
|
446
446
|
An,
|
|
447
447
|
{
|
|
448
448
|
entityType: e,
|
|
449
|
-
currentTab:
|
|
449
|
+
currentTab: f,
|
|
450
450
|
onTabChange: u,
|
|
451
451
|
isLoading: _
|
|
452
452
|
}
|
|
@@ -474,7 +474,7 @@ const Nn = S(Me)`
|
|
|
474
474
|
&:first-child {
|
|
475
475
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
476
476
|
}
|
|
477
|
-
`,
|
|
477
|
+
`, $n = ({
|
|
478
478
|
entities: e = [],
|
|
479
479
|
scope: n,
|
|
480
480
|
isLoadingVersion: t
|
|
@@ -501,7 +501,7 @@ const Nn = S(Me)`
|
|
|
501
501
|
/* @__PURE__ */ i(on, { entities: e })
|
|
502
502
|
] })
|
|
503
503
|
] });
|
|
504
|
-
},
|
|
504
|
+
}, Ln = ({
|
|
505
505
|
latestVersion: e,
|
|
506
506
|
resolveVersionJump: n
|
|
507
507
|
}) => {
|
|
@@ -538,55 +538,55 @@ const Nn = S(Me)`
|
|
|
538
538
|
deleteEntities: s,
|
|
539
539
|
canUploadThumbnail: a,
|
|
540
540
|
canUploadVersion: r,
|
|
541
|
-
canOpenPip:
|
|
542
|
-
canOpenViewer:
|
|
543
|
-
canDelete:
|
|
541
|
+
canOpenPip: l,
|
|
542
|
+
canOpenViewer: h,
|
|
543
|
+
canDelete: f,
|
|
544
544
|
entityListsContext: u,
|
|
545
545
|
onPip: g,
|
|
546
|
-
onOpenViewer:
|
|
546
|
+
onOpenViewer: b,
|
|
547
547
|
onUploadThumbnail: x,
|
|
548
548
|
onUploadVersion: j,
|
|
549
549
|
onShare: R,
|
|
550
550
|
onViewData: E,
|
|
551
|
-
onDelete:
|
|
551
|
+
onDelete: c
|
|
552
552
|
}) => {
|
|
553
|
-
const d = P(() => o.length ? o.filter((
|
|
554
|
-
entityId:
|
|
555
|
-
entityType:
|
|
556
|
-
hasReviewables:
|
|
553
|
+
const d = P(() => o.length ? o.filter((p) => !!p?.entityId).map((p) => ({
|
|
554
|
+
entityId: p.entityId,
|
|
555
|
+
entityType: p.entityType || e,
|
|
556
|
+
hasReviewables: p.hasReviewables
|
|
557
557
|
})) : n ? [{ entityId: n, entityType: e }] : [], [o, n, e]);
|
|
558
558
|
return P(() => {
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
559
|
+
const p = [];
|
|
560
|
+
if (h && p.push({
|
|
561
561
|
id: "open-in-viewer",
|
|
562
562
|
label: "Open in viewer",
|
|
563
563
|
icon: "play_circle",
|
|
564
|
-
onClick:
|
|
565
|
-
}),
|
|
564
|
+
onClick: b
|
|
565
|
+
}), l && p.push({
|
|
566
566
|
id: "picture-in-picture",
|
|
567
567
|
label: "Picture in picture",
|
|
568
568
|
icon: "picture_in_picture",
|
|
569
569
|
onClick: g
|
|
570
|
-
}), a &&
|
|
570
|
+
}), a && p.push({
|
|
571
571
|
id: "upload-thumbnail",
|
|
572
572
|
label: "Upload thumbnail",
|
|
573
573
|
icon: "add_photo_alternate",
|
|
574
574
|
onClick: x
|
|
575
|
-
}), r &&
|
|
575
|
+
}), r && p.push({
|
|
576
576
|
id: "upload-version",
|
|
577
577
|
label: "Upload version",
|
|
578
578
|
icon: "upload",
|
|
579
579
|
onClick: j
|
|
580
580
|
}), u?.openAddToListDialog && t && d.length) {
|
|
581
581
|
const T = d[0]?.entityType || e, v = u.openAddToListDialog;
|
|
582
|
-
if (
|
|
582
|
+
if (p.push({
|
|
583
583
|
id: "add-to-list",
|
|
584
584
|
label: "Add to list",
|
|
585
585
|
icon: "list_alt_add",
|
|
586
586
|
onClick: () => v(T, d)
|
|
587
587
|
}), (T === "version" || T === "representation") && u.hasReviewAddon) {
|
|
588
588
|
const O = d.some((U) => U.hasReviewables === !0);
|
|
589
|
-
|
|
589
|
+
p.push({
|
|
590
590
|
id: "add-to-review-list",
|
|
591
591
|
label: "Add to session",
|
|
592
592
|
icon: "list_alt_add",
|
|
@@ -601,55 +601,55 @@ const Nn = S(Me)`
|
|
|
601
601
|
C.entityId,
|
|
602
602
|
t
|
|
603
603
|
) : null;
|
|
604
|
-
if (A &&
|
|
604
|
+
if (A && p.push({
|
|
605
605
|
id: "share",
|
|
606
606
|
label: "Share",
|
|
607
607
|
icon: "share",
|
|
608
608
|
onClick: () => R(A)
|
|
609
|
-
}),
|
|
609
|
+
}), p.push({
|
|
610
610
|
id: "view-data",
|
|
611
611
|
label: "View data",
|
|
612
612
|
icon: "database",
|
|
613
613
|
onClick: E
|
|
614
|
-
}),
|
|
614
|
+
}), f && s.length > 0) {
|
|
615
615
|
const T = new Set(s.map((O) => O.entityType)), v = T.size === 1 ? [...T][0] : "item", w = s.length === 1 ? `Delete ${v}` : `Delete ${pn(s.length, v)}`;
|
|
616
|
-
|
|
616
|
+
p.push({
|
|
617
617
|
id: "delete",
|
|
618
618
|
label: w,
|
|
619
619
|
icon: "delete",
|
|
620
620
|
danger: !0,
|
|
621
|
-
onClick:
|
|
621
|
+
onClick: c
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
|
-
return { items:
|
|
624
|
+
return { items: p, shareLink: A };
|
|
625
625
|
}, [
|
|
626
|
-
|
|
627
|
-
|
|
626
|
+
l,
|
|
627
|
+
h,
|
|
628
628
|
a,
|
|
629
629
|
r,
|
|
630
|
-
|
|
630
|
+
f,
|
|
631
631
|
s,
|
|
632
632
|
u,
|
|
633
633
|
t,
|
|
634
634
|
d,
|
|
635
635
|
e,
|
|
636
636
|
g,
|
|
637
|
-
|
|
637
|
+
b,
|
|
638
638
|
x,
|
|
639
639
|
j,
|
|
640
640
|
R,
|
|
641
641
|
E,
|
|
642
|
-
|
|
642
|
+
c
|
|
643
643
|
]);
|
|
644
644
|
}, Wn = S.div`
|
|
645
645
|
display: flex;
|
|
646
646
|
flex-direction: column;
|
|
647
647
|
gap: 16px;
|
|
648
|
-
`,
|
|
648
|
+
`, $e = S.div`
|
|
649
649
|
display: flex;
|
|
650
650
|
flex-direction: column;
|
|
651
651
|
gap: 6px;
|
|
652
|
-
`,
|
|
652
|
+
`, Le = S.span`
|
|
653
653
|
font-size: 13px;
|
|
654
654
|
color: var(--md-sys-color-on-surface);
|
|
655
655
|
`, _e = S.button`
|
|
@@ -684,18 +684,18 @@ const Nn = S(Me)`
|
|
|
684
684
|
`, zn = ({ link: e, entityLabel: n, visible: t, onHide: o }) => {
|
|
685
685
|
if (!t) return null;
|
|
686
686
|
const s = `[${n}](${e})`, a = (r) => {
|
|
687
|
-
|
|
687
|
+
hn(r, !0), o();
|
|
688
688
|
};
|
|
689
689
|
return /* @__PURE__ */ i(ft, { isOpen: !0, onClose: o, size: "sm", header: "Share", children: /* @__PURE__ */ k(Wn, { children: [
|
|
690
|
-
/* @__PURE__ */ k(
|
|
691
|
-
/* @__PURE__ */ i(
|
|
690
|
+
/* @__PURE__ */ k($e, { children: [
|
|
691
|
+
/* @__PURE__ */ i(Le, { children: "Link" }),
|
|
692
692
|
/* @__PURE__ */ k(_e, { type: "button", onClick: () => a(e), "aria-label": "Copy link", children: [
|
|
693
693
|
/* @__PURE__ */ i("span", { className: "value", children: e }),
|
|
694
694
|
/* @__PURE__ */ i(fe, { icon: "content_copy" })
|
|
695
695
|
] })
|
|
696
696
|
] }),
|
|
697
|
-
/* @__PURE__ */ k(
|
|
698
|
-
/* @__PURE__ */ i(
|
|
697
|
+
/* @__PURE__ */ k($e, { children: [
|
|
698
|
+
/* @__PURE__ */ i(Le, { children: "Markdown Link" }),
|
|
699
699
|
/* @__PURE__ */ k(_e, { type: "button", onClick: () => a(s), "aria-label": "Copy markdown link", children: [
|
|
700
700
|
/* @__PURE__ */ i("span", { className: "value", children: s }),
|
|
701
701
|
/* @__PURE__ */ i(fe, { icon: "content_copy" })
|
|
@@ -724,18 +724,18 @@ const Nn = S(Me)`
|
|
|
724
724
|
projectName: s,
|
|
725
725
|
selectedEntities: a = [],
|
|
726
726
|
entityListsContext: r,
|
|
727
|
-
onOpenPip:
|
|
728
|
-
onOpenViewer:
|
|
729
|
-
productId:
|
|
727
|
+
onOpenPip: l,
|
|
728
|
+
onOpenViewer: h,
|
|
729
|
+
productId: f,
|
|
730
730
|
taskId: u,
|
|
731
731
|
folderId: g
|
|
732
732
|
}) => {
|
|
733
|
-
const
|
|
734
|
-
const
|
|
735
|
-
return `details-more-menu-${v}-${
|
|
736
|
-
}, [v, n, t, s]), O =
|
|
737
|
-
T?.({ productId:
|
|
738
|
-
}, ee = n && s ? Gn(e, n, s,
|
|
733
|
+
const b = Y(null), [x, j] = K(!1), [R, E] = K(null), { menuOpen: c, toggleMenuOpen: d, setMenuOpen: p } = qt(), { triggerThumbnailUpload: C, canUploadVersion: A } = kt(Kt), { onOpenVersionUpload: T } = Mn(), v = wt(), w = P(() => {
|
|
734
|
+
const $ = n || t?.[0] || "noentity";
|
|
735
|
+
return `details-more-menu-${v}-${$}-${s || "noproject"}`;
|
|
736
|
+
}, [v, n, t, s]), O = c === w, U = !!n && !!s && !!C, _ = !!A && !!T, Z = () => {
|
|
737
|
+
T?.({ productId: f, taskId: u, folderId: g });
|
|
738
|
+
}, ee = n && s ? Gn(e, n, s, f) : null, te = !!h && !!ee, ne = Jt(), I = P(() => (a.length ? a : n ? [{ entityId: n, entityType: e, projectName: s }] : []).map((V) => {
|
|
739
739
|
const q = V.entityType || e, ce = V.projectName || s;
|
|
740
740
|
return !Xt(q) || !V.entityId || !ce ? null : {
|
|
741
741
|
id: V.entityId,
|
|
@@ -747,7 +747,7 @@ const Nn = S(Me)`
|
|
|
747
747
|
parentId: V.parentId
|
|
748
748
|
};
|
|
749
749
|
}).filter((V) => V !== null), [a, n, e, s]), se = !!ne && I.length > 0, ie = () => {
|
|
750
|
-
|
|
750
|
+
p(!1), ne?.deleteEntities(I);
|
|
751
751
|
}, { items: le } = Bn({
|
|
752
752
|
entityType: e,
|
|
753
753
|
entityId: n,
|
|
@@ -756,15 +756,15 @@ const Nn = S(Me)`
|
|
|
756
756
|
deleteEntities: I,
|
|
757
757
|
canUploadThumbnail: U,
|
|
758
758
|
canUploadVersion: _,
|
|
759
|
-
canOpenPip: !!
|
|
759
|
+
canOpenPip: !!l,
|
|
760
760
|
canOpenViewer: te,
|
|
761
761
|
canDelete: se,
|
|
762
762
|
entityListsContext: r,
|
|
763
|
-
onPip: () =>
|
|
764
|
-
onOpenViewer: () => ee &&
|
|
763
|
+
onPip: () => l?.(),
|
|
764
|
+
onOpenViewer: () => ee && h?.(ee),
|
|
765
765
|
onUploadThumbnail: () => C?.(),
|
|
766
766
|
onUploadVersion: Z,
|
|
767
|
-
onShare: (
|
|
767
|
+
onShare: ($) => E($),
|
|
768
768
|
onViewData: () => j(!0),
|
|
769
769
|
onDelete: ie
|
|
770
770
|
}), Q = t?.length ? t : n ? [n] : [], re = o || n || "";
|
|
@@ -772,7 +772,7 @@ const Nn = S(Me)`
|
|
|
772
772
|
/* @__PURE__ */ i(
|
|
773
773
|
X,
|
|
774
774
|
{
|
|
775
|
-
ref:
|
|
775
|
+
ref: b,
|
|
776
776
|
icon: "more_horiz",
|
|
777
777
|
variant: "text",
|
|
778
778
|
"data-tooltip": "More actions",
|
|
@@ -781,7 +781,7 @@ const Nn = S(Me)`
|
|
|
781
781
|
onClick: () => d(w)
|
|
782
782
|
}
|
|
783
783
|
),
|
|
784
|
-
/* @__PURE__ */ i(ln, { id: w, target:
|
|
784
|
+
/* @__PURE__ */ i(ln, { id: w, target: b.current, align: "right", children: /* @__PURE__ */ i(cn, { menu: le, onClose: () => p(!1) }) }),
|
|
785
785
|
x && s && Q.length > 0 && /* @__PURE__ */ i(
|
|
786
786
|
dn,
|
|
787
787
|
{
|
|
@@ -834,27 +834,27 @@ const Nn = S(Me)`
|
|
|
834
834
|
// @ts-expect-error - patch is not part of the query args
|
|
835
835
|
{ projectName: t, patch: ["id", "name", "label"] },
|
|
836
836
|
{ skip: !t || o }
|
|
837
|
-
), r =
|
|
837
|
+
), r = mn(
|
|
838
838
|
{ projectName: t || "", isLoading: o },
|
|
839
839
|
a
|
|
840
|
-
), { data:
|
|
840
|
+
), { data: l } = Nt(
|
|
841
841
|
{ productId: e.product?.id || "", projectName: t },
|
|
842
842
|
{ skip: n !== "version" || !e.product?.id }
|
|
843
|
-
),
|
|
844
|
-
() =>
|
|
843
|
+
), h = P(
|
|
844
|
+
() => l?.project.product?.versionList ? [...l.project.product?.versionList || []].sort((g, b) => g.name === "HERO" ? -1 : b.name === "HERO" ? 1 : b.name.localeCompare(g.name)).map((g) => ({
|
|
845
845
|
type: "version",
|
|
846
846
|
label: g.name,
|
|
847
847
|
id: g.id
|
|
848
848
|
})) : [],
|
|
849
|
-
[
|
|
850
|
-
),
|
|
849
|
+
[l]
|
|
850
|
+
), f = P(
|
|
851
851
|
() => new Map(s.map((g) => [g.id, g])),
|
|
852
852
|
[s]
|
|
853
853
|
);
|
|
854
854
|
return [P(
|
|
855
|
-
() => r ? [] : Kn(e,
|
|
855
|
+
() => r ? [] : Kn(e, f),
|
|
856
856
|
[r, s, e]
|
|
857
|
-
),
|
|
857
|
+
), h];
|
|
858
858
|
}, et = (e, n) => {
|
|
859
859
|
let t = Object.entries(e).filter(([s]) => n ? n.includes(s) : !0).map(([, s]) => s?.statuses || []).flat();
|
|
860
860
|
const o = new Map(t.map((s) => [s.name, s]));
|
|
@@ -867,11 +867,11 @@ const Nn = S(Me)`
|
|
|
867
867
|
projectName: s,
|
|
868
868
|
projectInfo: a,
|
|
869
869
|
annotations: r,
|
|
870
|
-
removeAnnotation:
|
|
871
|
-
exportAnnotationComposite:
|
|
872
|
-
...
|
|
870
|
+
removeAnnotation: l,
|
|
871
|
+
exportAnnotationComposite: h,
|
|
872
|
+
...f
|
|
873
873
|
}) => {
|
|
874
|
-
const u = { annotations: r, removeAnnotation:
|
|
874
|
+
const u = { annotations: r, removeAnnotation: l, exportAnnotationComposite: h }, { user: g } = G(), b = g.name || "", x = g.attrib?.fullName || "";
|
|
875
875
|
return /* @__PURE__ */ k(
|
|
876
876
|
Je,
|
|
877
877
|
{
|
|
@@ -880,12 +880,12 @@ const Nn = S(Me)`
|
|
|
880
880
|
projectName: s,
|
|
881
881
|
entityType: t,
|
|
882
882
|
projectInfo: a,
|
|
883
|
-
userName:
|
|
883
|
+
userName: b,
|
|
884
884
|
userFullName: x,
|
|
885
885
|
...u,
|
|
886
|
-
...
|
|
886
|
+
...f,
|
|
887
887
|
children: [
|
|
888
|
-
/* @__PURE__ */ i(gn, { ...
|
|
888
|
+
/* @__PURE__ */ i(gn, { ...f, statuses: f.statuses }),
|
|
889
889
|
/* @__PURE__ */ i(fn, {})
|
|
890
890
|
]
|
|
891
891
|
}
|
|
@@ -898,11 +898,11 @@ const Nn = S(Me)`
|
|
|
898
898
|
projectName: s,
|
|
899
899
|
projectInfo: a,
|
|
900
900
|
annotations: r,
|
|
901
|
-
removeAnnotation:
|
|
902
|
-
exportAnnotationComposite:
|
|
903
|
-
...
|
|
901
|
+
removeAnnotation: l,
|
|
902
|
+
exportAnnotationComposite: h,
|
|
903
|
+
...f
|
|
904
904
|
}) => {
|
|
905
|
-
const u = { annotations: r, removeAnnotation:
|
|
905
|
+
const u = { annotations: r, removeAnnotation: l, exportAnnotationComposite: h }, { user: g } = G(), b = g?.name ?? "", x = g?.attrib?.fullName ?? "", [j, R] = K(null);
|
|
906
906
|
return /* @__PURE__ */ i(
|
|
907
907
|
Je,
|
|
908
908
|
{
|
|
@@ -911,12 +911,12 @@ const Nn = S(Me)`
|
|
|
911
911
|
projectName: s,
|
|
912
912
|
entityType: o,
|
|
913
913
|
projectInfo: a,
|
|
914
|
-
userName:
|
|
914
|
+
userName: b,
|
|
915
915
|
userFullName: x,
|
|
916
916
|
...u,
|
|
917
917
|
editingId: j,
|
|
918
918
|
setEditingId: R,
|
|
919
|
-
...
|
|
919
|
+
...f,
|
|
920
920
|
children: e
|
|
921
921
|
}
|
|
922
922
|
);
|
|
@@ -943,8 +943,8 @@ const Nn = S(Me)`
|
|
|
943
943
|
}
|
|
944
944
|
const t = {}, o = (a) => {
|
|
945
945
|
const r = {};
|
|
946
|
-
return a.flat().forEach((
|
|
947
|
-
|
|
946
|
+
return a.flat().forEach((l) => {
|
|
947
|
+
l && l.name && (r[l.name] = l);
|
|
948
948
|
}), Object.values(r);
|
|
949
949
|
}, s = {
|
|
950
950
|
statuses: [],
|
|
@@ -956,10 +956,10 @@ const Nn = S(Me)`
|
|
|
956
956
|
};
|
|
957
957
|
return n.forEach((a) => {
|
|
958
958
|
const r = e[a];
|
|
959
|
-
r && (Object.keys(s).forEach((
|
|
960
|
-
|
|
961
|
-
}), Object.keys(r).forEach((
|
|
962
|
-
|
|
959
|
+
r && (Object.keys(s).forEach((l) => {
|
|
960
|
+
l === "productTypes" ? r.productTypes && s[l].push(r) : Array.isArray(r[l]) && s[l].push(r[l]);
|
|
961
|
+
}), Object.keys(r).forEach((l) => {
|
|
962
|
+
l in s || (t[l] = r[l]);
|
|
963
963
|
}));
|
|
964
964
|
}), Object.keys(s).forEach((a) => {
|
|
965
965
|
(a === "productTypes" || s[a].length > 0) && (t[a] = o(s[a]));
|
|
@@ -1057,75 +1057,75 @@ const Nn = S(Me)`
|
|
|
1057
1057
|
onFilterChange: o,
|
|
1058
1058
|
isLoading: s
|
|
1059
1059
|
}) => {
|
|
1060
|
-
const [a, r] = K(null), [
|
|
1060
|
+
const [a, r] = K(null), [l, h] = K(""), f = Y(null), u = (c) => typeof c == "object" && c !== null && !Array.isArray(c);
|
|
1061
1061
|
W(() => {
|
|
1062
|
-
a &&
|
|
1062
|
+
a && f.current && f.current.focus();
|
|
1063
1063
|
}, [a]), W(() => {
|
|
1064
1064
|
if (a && u(t)) {
|
|
1065
|
-
if (document.activeElement ===
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1065
|
+
if (document.activeElement === f.current) return;
|
|
1066
|
+
const c = t.conditions?.find((d) => ue(d, a));
|
|
1067
|
+
h(c ? Te(c) : "");
|
|
1068
1068
|
}
|
|
1069
1069
|
}, [a, t]);
|
|
1070
|
-
const g = (
|
|
1070
|
+
const g = (c, d) => {
|
|
1071
1071
|
if (!u(t)) {
|
|
1072
|
-
o(
|
|
1072
|
+
o(c.id);
|
|
1073
1073
|
return;
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const p = t.conditions ? [...t.conditions] : [], C = {
|
|
1076
1076
|
...t,
|
|
1077
|
-
conditions:
|
|
1077
|
+
conditions: p,
|
|
1078
1078
|
operator: t.operator || "and"
|
|
1079
|
-
}, A = String(
|
|
1079
|
+
}, A = String(c.id), T = p.findIndex((w) => ue(w, A)), v = c.type || "boolean";
|
|
1080
1080
|
if (v === "boolean")
|
|
1081
|
-
T > -1 ?
|
|
1081
|
+
T > -1 ? p.splice(T, 1) : p.push({ key: A, operator: c.operator || "eq", value: !0 });
|
|
1082
1082
|
else if (v === "enum") {
|
|
1083
1083
|
const w = Array.isArray(d) ? d : [d];
|
|
1084
1084
|
if (w.length === 0 || w.length === 1 && w[0] === void 0)
|
|
1085
|
-
T > -1 &&
|
|
1085
|
+
T > -1 && p.splice(T, 1);
|
|
1086
1086
|
else {
|
|
1087
1087
|
const O = {
|
|
1088
1088
|
key: A,
|
|
1089
|
-
operator:
|
|
1089
|
+
operator: c.operator || "in",
|
|
1090
1090
|
value: w
|
|
1091
1091
|
};
|
|
1092
|
-
T > -1 ?
|
|
1092
|
+
T > -1 ? p[T] = O : p.push(O);
|
|
1093
1093
|
}
|
|
1094
1094
|
} else if (v === "search") {
|
|
1095
1095
|
const w = typeof d == "string" ? d : "";
|
|
1096
1096
|
if (!w)
|
|
1097
|
-
T > -1 &&
|
|
1097
|
+
T > -1 && p.splice(T, 1);
|
|
1098
1098
|
else {
|
|
1099
|
-
const O = st(w, A,
|
|
1100
|
-
T > -1 ?
|
|
1099
|
+
const O = st(w, A, c.operator || "like");
|
|
1100
|
+
T > -1 ? p[T] = O : p.push(O);
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
o(C);
|
|
1104
|
-
},
|
|
1105
|
-
const d = String(
|
|
1104
|
+
}, b = (c) => {
|
|
1105
|
+
const d = String(c.id);
|
|
1106
1106
|
if (a !== d && (r(d), u(t))) {
|
|
1107
|
-
const
|
|
1108
|
-
p
|
|
1107
|
+
const p = t.conditions?.find((C) => ue(C, d));
|
|
1108
|
+
h(p ? Te(p) : "");
|
|
1109
1109
|
}
|
|
1110
|
-
}, x = (
|
|
1111
|
-
|
|
1112
|
-
}, j = (
|
|
1113
|
-
|
|
1114
|
-
}, R = (
|
|
1115
|
-
(
|
|
1110
|
+
}, x = (c, d) => {
|
|
1111
|
+
h(d), g(c, d);
|
|
1112
|
+
}, j = (c) => {
|
|
1113
|
+
h(""), r(null), g(c, "");
|
|
1114
|
+
}, R = (c) => u(t) ? t.conditions?.some((d) => ue(d, String(c.id))) : c.id === t, E = (c) => u(t) ? t.conditions?.find(
|
|
1115
|
+
(p) => De(p) && p.key === String(c.id)
|
|
1116
1116
|
)?.value || [] : [];
|
|
1117
1117
|
return /* @__PURE__ */ k(Yn, { className: oe("panel-tabs", { loading: s }), children: [
|
|
1118
1118
|
/* @__PURE__ */ i(Zn, { className: "panel-header-label", children: e }),
|
|
1119
1119
|
/* @__PURE__ */ i(He, {}),
|
|
1120
|
-
/* @__PURE__ */ i(es, { className: "panel-header-filters", children: n.map((
|
|
1121
|
-
const d = R(
|
|
1122
|
-
if (
|
|
1120
|
+
/* @__PURE__ */ i(es, { className: "panel-header-filters", children: n.map((c) => {
|
|
1121
|
+
const d = R(c), p = c.type || "boolean";
|
|
1122
|
+
if (p === "enum")
|
|
1123
1123
|
return /* @__PURE__ */ i(
|
|
1124
1124
|
ns,
|
|
1125
1125
|
{
|
|
1126
|
-
options:
|
|
1127
|
-
value: E(
|
|
1128
|
-
onChange: (C) => g(
|
|
1126
|
+
options: c.options || [],
|
|
1127
|
+
value: E(c),
|
|
1128
|
+
onChange: (C) => g(c, C),
|
|
1129
1129
|
isEditing: !0,
|
|
1130
1130
|
autoOpen: !1,
|
|
1131
1131
|
align: "right",
|
|
@@ -1134,18 +1134,18 @@ const Nn = S(Me)`
|
|
|
1134
1134
|
Ce,
|
|
1135
1135
|
{
|
|
1136
1136
|
selected: d,
|
|
1137
|
-
icon:
|
|
1138
|
-
"data-tooltip":
|
|
1137
|
+
icon: c.icon,
|
|
1138
|
+
"data-tooltip": c.tooltip,
|
|
1139
1139
|
"data-tooltip-delay": 0
|
|
1140
1140
|
}
|
|
1141
1141
|
),
|
|
1142
1142
|
widthExpand: !0,
|
|
1143
1143
|
className: "panel-filter panel-filter-enum"
|
|
1144
1144
|
},
|
|
1145
|
-
String(
|
|
1145
|
+
String(c.id)
|
|
1146
1146
|
);
|
|
1147
|
-
if (
|
|
1148
|
-
const C = a === String(
|
|
1147
|
+
if (p === "search") {
|
|
1148
|
+
const C = a === String(c.id);
|
|
1149
1149
|
return /* @__PURE__ */ k(
|
|
1150
1150
|
ts,
|
|
1151
1151
|
{
|
|
@@ -1155,9 +1155,9 @@ const Nn = S(Me)`
|
|
|
1155
1155
|
Ce,
|
|
1156
1156
|
{
|
|
1157
1157
|
selected: d || C,
|
|
1158
|
-
onClick: () =>
|
|
1159
|
-
icon:
|
|
1160
|
-
"data-tooltip": C ? void 0 :
|
|
1158
|
+
onClick: () => b(c),
|
|
1159
|
+
icon: c.icon,
|
|
1160
|
+
"data-tooltip": C ? void 0 : c.tooltip,
|
|
1161
1161
|
"data-tooltip-delay": 0
|
|
1162
1162
|
}
|
|
1163
1163
|
),
|
|
@@ -1165,20 +1165,20 @@ const Nn = S(Me)`
|
|
|
1165
1165
|
/* @__PURE__ */ i(
|
|
1166
1166
|
ss,
|
|
1167
1167
|
{
|
|
1168
|
-
ref:
|
|
1169
|
-
value:
|
|
1170
|
-
onChange: (A) => x(
|
|
1168
|
+
ref: f,
|
|
1169
|
+
value: l,
|
|
1170
|
+
onChange: (A) => x(c, A.target.value),
|
|
1171
1171
|
onKeyDown: (A) => {
|
|
1172
|
-
A.key === "Escape" && j(
|
|
1172
|
+
A.key === "Escape" && j(c);
|
|
1173
1173
|
},
|
|
1174
|
-
placeholder:
|
|
1174
|
+
placeholder: c.placeholder || "Search..."
|
|
1175
1175
|
}
|
|
1176
1176
|
),
|
|
1177
1177
|
/* @__PURE__ */ i(
|
|
1178
1178
|
as,
|
|
1179
1179
|
{
|
|
1180
1180
|
icon: "close",
|
|
1181
|
-
onClick: () => j(
|
|
1181
|
+
onClick: () => j(c),
|
|
1182
1182
|
"data-tooltip": "Clear",
|
|
1183
1183
|
"data-tooltip-delay": 0
|
|
1184
1184
|
}
|
|
@@ -1186,20 +1186,20 @@ const Nn = S(Me)`
|
|
|
1186
1186
|
] })
|
|
1187
1187
|
]
|
|
1188
1188
|
},
|
|
1189
|
-
String(
|
|
1189
|
+
String(c.id)
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
1192
1192
|
return /* @__PURE__ */ i(
|
|
1193
1193
|
Ce,
|
|
1194
1194
|
{
|
|
1195
1195
|
selected: d,
|
|
1196
|
-
onClick: () => g(
|
|
1197
|
-
icon:
|
|
1198
|
-
"data-tooltip":
|
|
1196
|
+
onClick: () => g(c),
|
|
1197
|
+
icon: c.icon,
|
|
1198
|
+
"data-tooltip": c.tooltip,
|
|
1199
1199
|
"data-tooltip-delay": 0,
|
|
1200
1200
|
className: "panel-filter panel-filter-boolean"
|
|
1201
1201
|
},
|
|
1202
|
-
String(
|
|
1202
|
+
String(c.id)
|
|
1203
1203
|
);
|
|
1204
1204
|
}) })
|
|
1205
1205
|
] });
|
|
@@ -1207,32 +1207,32 @@ const Nn = S(Me)`
|
|
|
1207
1207
|
const t = [], o = [], s = (a) => {
|
|
1208
1208
|
if (!a) return;
|
|
1209
1209
|
if (is(a)) {
|
|
1210
|
-
const
|
|
1211
|
-
if (
|
|
1210
|
+
const l = a.key;
|
|
1211
|
+
if (l === "search") {
|
|
1212
1212
|
const u = String(a.value ?? "");
|
|
1213
1213
|
u && o.push({ id: u, label: u });
|
|
1214
1214
|
return;
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1217
|
-
if (!
|
|
1218
|
-
if (at.includes(
|
|
1216
|
+
const h = n.find((u) => u.id === l);
|
|
1217
|
+
if (!h) return;
|
|
1218
|
+
if (at.includes(l)) {
|
|
1219
1219
|
a.value !== void 0 && t.push({
|
|
1220
|
-
id: ke(
|
|
1221
|
-
label:
|
|
1222
|
-
icon:
|
|
1220
|
+
id: ke(l),
|
|
1221
|
+
label: h.label,
|
|
1222
|
+
icon: h.icon,
|
|
1223
1223
|
type: "boolean",
|
|
1224
1224
|
singleSelect: !0,
|
|
1225
1225
|
values: [{ id: String(a.value), label: a.value ? "Done" : "Not Done" }]
|
|
1226
1226
|
});
|
|
1227
1227
|
return;
|
|
1228
1228
|
}
|
|
1229
|
-
if (
|
|
1229
|
+
if (h.type === "datetime") {
|
|
1230
1230
|
const u = Array.isArray(a.value) ? a.value[0] : a.value;
|
|
1231
1231
|
t.push({
|
|
1232
|
-
id: ke(
|
|
1233
|
-
label:
|
|
1232
|
+
id: ke(l),
|
|
1233
|
+
label: h.label,
|
|
1234
1234
|
type: "datetime",
|
|
1235
|
-
icon:
|
|
1235
|
+
icon: h.icon,
|
|
1236
1236
|
values: [
|
|
1237
1237
|
{
|
|
1238
1238
|
id: String(u),
|
|
@@ -1244,15 +1244,15 @@ const Nn = S(Me)`
|
|
|
1244
1244
|
});
|
|
1245
1245
|
return;
|
|
1246
1246
|
}
|
|
1247
|
-
const
|
|
1247
|
+
const f = Array.isArray(a.value) ? a.value : [a.value];
|
|
1248
1248
|
t.push({
|
|
1249
|
-
id: ke(
|
|
1250
|
-
label:
|
|
1251
|
-
type:
|
|
1252
|
-
icon:
|
|
1249
|
+
id: ke(l),
|
|
1250
|
+
label: h.label,
|
|
1251
|
+
type: h.type,
|
|
1252
|
+
icon: h.icon,
|
|
1253
1253
|
operator: "OR",
|
|
1254
|
-
values:
|
|
1255
|
-
const g =
|
|
1254
|
+
values: f.map((u) => {
|
|
1255
|
+
const g = h.values?.find((b) => b.id === String(u));
|
|
1256
1256
|
return g ? { ...g } : { id: String(u), label: String(u) };
|
|
1257
1257
|
})
|
|
1258
1258
|
});
|
|
@@ -1301,7 +1301,7 @@ const Nn = S(Me)`
|
|
|
1301
1301
|
doneCount: a = 0,
|
|
1302
1302
|
onSearchTextChange: r
|
|
1303
1303
|
}) => {
|
|
1304
|
-
const
|
|
1304
|
+
const l = P(
|
|
1305
1305
|
() => [
|
|
1306
1306
|
{
|
|
1307
1307
|
id: "isDone",
|
|
@@ -1345,21 +1345,21 @@ const Nn = S(Me)`
|
|
|
1345
1345
|
// },
|
|
1346
1346
|
],
|
|
1347
1347
|
[t]
|
|
1348
|
-
),
|
|
1348
|
+
), h = P(() => rs(e, l), [e, l]), [f, u] = K(h), g = Y(null), b = xn();
|
|
1349
1349
|
W(() => {
|
|
1350
|
-
u(
|
|
1351
|
-
}, [JSON.stringify(
|
|
1350
|
+
u(h);
|
|
1351
|
+
}, [JSON.stringify(h)]);
|
|
1352
1352
|
const x = (d) => {
|
|
1353
|
-
const
|
|
1354
|
-
n(
|
|
1353
|
+
const p = ls(d);
|
|
1354
|
+
n(p), r?.("");
|
|
1355
1355
|
}, j = (d) => {
|
|
1356
|
-
|
|
1357
|
-
}, R = (d,
|
|
1358
|
-
|
|
1356
|
+
b.wrapFilterChange(d, f, u);
|
|
1357
|
+
}, R = (d, p) => {
|
|
1358
|
+
p || r?.(d);
|
|
1359
1359
|
};
|
|
1360
1360
|
let E = "";
|
|
1361
1361
|
s > 0 && (E = `${a}/${s}`);
|
|
1362
|
-
const
|
|
1362
|
+
const c = P(
|
|
1363
1363
|
() => [{ id: "isDone", label: E, tooltip: "Status" }],
|
|
1364
1364
|
[E]
|
|
1365
1365
|
);
|
|
@@ -1369,24 +1369,24 @@ const Nn = S(Me)`
|
|
|
1369
1369
|
{
|
|
1370
1370
|
ref: g,
|
|
1371
1371
|
compact: !0,
|
|
1372
|
-
options:
|
|
1373
|
-
filters:
|
|
1372
|
+
options: l,
|
|
1373
|
+
filters: f,
|
|
1374
1374
|
onChange: j,
|
|
1375
1375
|
onFinish: x,
|
|
1376
1376
|
enableGlobalSearch: !0,
|
|
1377
1377
|
enableMultipleSameFilters: !1,
|
|
1378
1378
|
enableAutosuggestion: !1,
|
|
1379
1379
|
onSearchChange: R,
|
|
1380
|
-
quickActions:
|
|
1380
|
+
quickActions: c,
|
|
1381
1381
|
placeholder: "Search and filter subtasks...",
|
|
1382
1382
|
pt: {
|
|
1383
1383
|
searchBar: {
|
|
1384
|
-
onClickCapture: (d) =>
|
|
1384
|
+
onClickCapture: (d) => b.handleSearchBarClickCapture(d, f)
|
|
1385
1385
|
},
|
|
1386
1386
|
dropdown: {
|
|
1387
1387
|
pt: {
|
|
1388
1388
|
item: {
|
|
1389
|
-
onClick: (d) =>
|
|
1389
|
+
onClick: (d) => b.handleDropdownItemClick(d, f, l)
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
@@ -1396,35 +1396,35 @@ const Nn = S(Me)`
|
|
|
1396
1396
|
/* @__PURE__ */ i(
|
|
1397
1397
|
bn,
|
|
1398
1398
|
{
|
|
1399
|
-
isOpen: !!
|
|
1400
|
-
header:
|
|
1401
|
-
startDate:
|
|
1402
|
-
endDate:
|
|
1403
|
-
onStartDateChange:
|
|
1404
|
-
onEndDateChange:
|
|
1405
|
-
onApply: () =>
|
|
1406
|
-
onClose:
|
|
1399
|
+
isOpen: !!b.customRangeFilterId,
|
|
1400
|
+
header: l.find((d) => d.id === b.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
|
|
1401
|
+
startDate: b.customStartDate,
|
|
1402
|
+
endDate: b.customEndDate,
|
|
1403
|
+
onStartDateChange: b.setCustomStartDate,
|
|
1404
|
+
onEndDateChange: b.setCustomEndDate,
|
|
1405
|
+
onApply: () => b.handleCustomRangeApply(f, l, x, g),
|
|
1406
|
+
onClose: b.handleCustomRangeClose
|
|
1407
1407
|
}
|
|
1408
1408
|
)
|
|
1409
1409
|
] });
|
|
1410
1410
|
}, us = ({ ...e }) => {
|
|
1411
|
-
const [n, t] = K({}), [o, s] = K(""), [a, r] = K([]), { dispatch:
|
|
1412
|
-
let
|
|
1411
|
+
const [n, t] = K({}), [o, s] = K(""), [a, r] = K([]), { dispatch: l } = G(), { data: h = [] } = ze({ projectName: e.projectName }), f = e.subtasks?.length || 0, u = e.subtasks?.filter((b) => b.isDone).length || 0, g = P(() => {
|
|
1412
|
+
let b = n;
|
|
1413
1413
|
if (o) {
|
|
1414
1414
|
const x = { key: "search", operator: "like", value: o };
|
|
1415
|
-
|
|
1415
|
+
b = {
|
|
1416
1416
|
...n,
|
|
1417
1417
|
conditions: [...n.conditions || [], x],
|
|
1418
1418
|
operator: "and"
|
|
1419
1419
|
};
|
|
1420
1420
|
}
|
|
1421
|
-
return Sn(
|
|
1421
|
+
return Sn(b);
|
|
1422
1422
|
}, [n, o]);
|
|
1423
1423
|
return /* @__PURE__ */ k(Ne, { children: [
|
|
1424
1424
|
/* @__PURE__ */ i(
|
|
1425
1425
|
os,
|
|
1426
1426
|
{
|
|
1427
|
-
label: `Subtasks (${
|
|
1427
|
+
label: `Subtasks (${f})`,
|
|
1428
1428
|
filters: [],
|
|
1429
1429
|
currentFilter: n,
|
|
1430
1430
|
onFilterChange: t
|
|
@@ -1435,8 +1435,8 @@ const Nn = S(Me)`
|
|
|
1435
1435
|
{
|
|
1436
1436
|
subtasksFilter: n,
|
|
1437
1437
|
setSubtasksFilter: t,
|
|
1438
|
-
users:
|
|
1439
|
-
totalCount:
|
|
1438
|
+
users: h,
|
|
1439
|
+
totalCount: f,
|
|
1440
1440
|
doneCount: u,
|
|
1441
1441
|
onSearchTextChange: s
|
|
1442
1442
|
}
|
|
@@ -1451,11 +1451,11 @@ const Nn = S(Me)`
|
|
|
1451
1451
|
onSelectSubtasks: r,
|
|
1452
1452
|
filters: g,
|
|
1453
1453
|
actionsPortalClassName: "panel-header-filters",
|
|
1454
|
-
dispatch:
|
|
1454
|
+
dispatch: l
|
|
1455
1455
|
}
|
|
1456
1456
|
)
|
|
1457
1457
|
] });
|
|
1458
|
-
}, ps = ["product", "representation"],
|
|
1458
|
+
}, ps = ["product", "representation"], hs = ({
|
|
1459
1459
|
entityType: e,
|
|
1460
1460
|
entitySubTypes: n = [],
|
|
1461
1461
|
// entities is data we already have from kanban
|
|
@@ -1465,19 +1465,19 @@ const Nn = S(Me)`
|
|
|
1465
1465
|
tagsOptions: s = [],
|
|
1466
1466
|
disabledStatuses: a,
|
|
1467
1467
|
projectUsers: r,
|
|
1468
|
-
disabledProjectUsers:
|
|
1469
|
-
activeProjectUsers:
|
|
1470
|
-
projectsInfo:
|
|
1468
|
+
disabledProjectUsers: l,
|
|
1469
|
+
activeProjectUsers: h,
|
|
1470
|
+
projectsInfo: f = {},
|
|
1471
1471
|
projectNames: u = [],
|
|
1472
1472
|
isSlideOut: g = !1,
|
|
1473
|
-
style:
|
|
1473
|
+
style: b = {},
|
|
1474
1474
|
scope: x,
|
|
1475
1475
|
isCompact: j = !1,
|
|
1476
1476
|
onClose: R,
|
|
1477
1477
|
onWatchersUpdate: E,
|
|
1478
|
-
onOpenViewer:
|
|
1478
|
+
onOpenViewer: c,
|
|
1479
1479
|
onEntityFocus: d,
|
|
1480
|
-
onOpen:
|
|
1480
|
+
onOpen: p,
|
|
1481
1481
|
onUriOpen: C,
|
|
1482
1482
|
// when the details panel is opened from uri
|
|
1483
1483
|
// annotations
|
|
@@ -1500,28 +1500,28 @@ const Nn = S(Me)`
|
|
|
1500
1500
|
useSearchParams: le,
|
|
1501
1501
|
SubtasksManager: Q,
|
|
1502
1502
|
useNavigate: re
|
|
1503
|
-
} = G(), { currentTab:
|
|
1503
|
+
} = G(), { currentTab: $, setTab: V, isFeed: q } = Yt(x), [ce, pe] = le(), de = Y(!1), N = I?.entityType ?? e, he = I?.entities ?? o, me = I?.entitySubTypes ?? n, m = I?.entities ? [] : t, D = I?.entities ? I.entities.map((y) => y.projectName) : u;
|
|
1504
1504
|
W(() => {
|
|
1505
|
-
|
|
1505
|
+
p && !de.current && (de.current = !0, p());
|
|
1506
1506
|
}, []), W(() => {
|
|
1507
|
-
ps.includes(N) &&
|
|
1508
|
-
}, [N,
|
|
1507
|
+
ps.includes(N) && $ !== "details" && V("details");
|
|
1508
|
+
}, [N, $, V]), W(() => {
|
|
1509
1509
|
o.length && I && se(null);
|
|
1510
1510
|
}, [o, I, se]);
|
|
1511
1511
|
const H = P(
|
|
1512
|
-
() => nt(
|
|
1513
|
-
[
|
|
1512
|
+
() => nt(f, D),
|
|
1513
|
+
[f, D]
|
|
1514
1514
|
), ot = P(() => Ye(H), [H]);
|
|
1515
1515
|
W(() => {
|
|
1516
|
-
|
|
1517
|
-
}, [N,
|
|
1518
|
-
let J =
|
|
1516
|
+
$ === "files" && N !== "version" && V("feed"), $ === "subtasks" && N !== "task" && V("feed");
|
|
1517
|
+
}, [N, $, x]);
|
|
1518
|
+
let J = he.length ? he.map((y) => ({ id: y.id, projectName: y.projectName })) : (
|
|
1519
1519
|
// @ts-expect-error = not sure what's going on with activeEntitiesData, we should try and remove it
|
|
1520
|
-
|
|
1520
|
+
m.map((y) => ({ id: y.id, projectName: y.projectName }))
|
|
1521
1521
|
);
|
|
1522
1522
|
J = J.filter((y) => y.id);
|
|
1523
1523
|
const {
|
|
1524
|
-
data:
|
|
1524
|
+
data: L = [],
|
|
1525
1525
|
isFetching: ae,
|
|
1526
1526
|
isError: it,
|
|
1527
1527
|
originalArgs: rt
|
|
@@ -1541,12 +1541,12 @@ const Nn = S(Me)`
|
|
|
1541
1541
|
if (!ae && (I?.source === "uri" || I?.source === "url") && I?.entities?.length && C) {
|
|
1542
1542
|
const y = I.entities[0].id;
|
|
1543
1543
|
if (be.current === y) return;
|
|
1544
|
-
const F =
|
|
1544
|
+
const F = L.find((B) => B.id === y);
|
|
1545
1545
|
if (!F) return;
|
|
1546
1546
|
be.current = y, C(F, I.source);
|
|
1547
1547
|
}
|
|
1548
|
-
}, [
|
|
1549
|
-
const Pe = et(
|
|
1548
|
+
}, [L, ae, I, C]);
|
|
1549
|
+
const Pe = et(f), z = D[0], Ie = f[z] || {}, M = L[0] || {}, ge = L[L.length - 1], ve = D[D.length - 1], Ee = x === "inbox" && N === "version" && L.length === 1 ? _n(L[0]) : void 0, [Fe, lt] = Jn({
|
|
1550
1550
|
entity: M,
|
|
1551
1551
|
entityType: N,
|
|
1552
1552
|
projectName: z,
|
|
@@ -1568,7 +1568,7 @@ const Nn = S(Me)`
|
|
|
1568
1568
|
}), () => {
|
|
1569
1569
|
Ae("");
|
|
1570
1570
|
};
|
|
1571
|
-
}, [
|
|
1571
|
+
}, [L, D, N]), Tn({
|
|
1572
1572
|
entityData: ge,
|
|
1573
1573
|
project: ve,
|
|
1574
1574
|
activeEntityType: N,
|
|
@@ -1595,7 +1595,7 @@ const Nn = S(Me)`
|
|
|
1595
1595
|
};
|
|
1596
1596
|
return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
|
|
1597
1597
|
}, [ye, g, ie]);
|
|
1598
|
-
const { requestPipWindow: ut } = en(), Oe = Y(null), je = Y(null), pt =
|
|
1598
|
+
const { requestPipWindow: ut } = en(), Oe = Y(null), je = Y(null), pt = L.length === 1 && N !== "representation", ht = P(() => {
|
|
1599
1599
|
const y = M?.label || M?.name || "", F = M?.parents || [], B = [z];
|
|
1600
1600
|
switch (N) {
|
|
1601
1601
|
case "folder":
|
|
@@ -1613,7 +1613,7 @@ const Nn = S(Me)`
|
|
|
1613
1613
|
B.push(y);
|
|
1614
1614
|
}
|
|
1615
1615
|
return B.filter(Boolean).join(" - ");
|
|
1616
|
-
}, [M, N, z]),
|
|
1616
|
+
}, [M, N, z]), mt = () => {
|
|
1617
1617
|
ee({
|
|
1618
1618
|
entityType: N,
|
|
1619
1619
|
entities: J,
|
|
@@ -1651,9 +1651,9 @@ const Nn = S(Me)`
|
|
|
1651
1651
|
entityType: N,
|
|
1652
1652
|
entityId: M?.id,
|
|
1653
1653
|
entityIds: J.map((y) => y.id).filter(Boolean),
|
|
1654
|
-
entityLabel:
|
|
1654
|
+
entityLabel: ht,
|
|
1655
1655
|
projectName: z,
|
|
1656
|
-
selectedEntities:
|
|
1656
|
+
selectedEntities: L.filter((y) => !!y?.id).map((y) => {
|
|
1657
1657
|
const F = y.entityType || N;
|
|
1658
1658
|
return {
|
|
1659
1659
|
entityId: y.id,
|
|
@@ -1666,8 +1666,8 @@ const Nn = S(Me)`
|
|
|
1666
1666
|
};
|
|
1667
1667
|
}),
|
|
1668
1668
|
entityListsContext: U,
|
|
1669
|
-
onOpenPip:
|
|
1670
|
-
onOpenViewer:
|
|
1669
|
+
onOpenPip: mt,
|
|
1670
|
+
onOpenViewer: c,
|
|
1671
1671
|
productId: M?.product?.id,
|
|
1672
1672
|
taskId: M?.task?.id,
|
|
1673
1673
|
folderId: M?.folder?.id
|
|
@@ -1695,7 +1695,7 @@ const Nn = S(Me)`
|
|
|
1695
1695
|
] })
|
|
1696
1696
|
] }),
|
|
1697
1697
|
Ee && /* @__PURE__ */ i(
|
|
1698
|
-
|
|
1698
|
+
Ln,
|
|
1699
1699
|
{
|
|
1700
1700
|
latestVersion: Ee,
|
|
1701
1701
|
resolveVersionJump: _
|
|
@@ -1705,18 +1705,18 @@ const Nn = S(Me)`
|
|
|
1705
1705
|
Un,
|
|
1706
1706
|
{
|
|
1707
1707
|
entityType: N,
|
|
1708
|
-
entitySubTypes:
|
|
1709
|
-
entities:
|
|
1708
|
+
entitySubTypes: me,
|
|
1709
|
+
entities: L,
|
|
1710
1710
|
users: r,
|
|
1711
|
-
disabledAssignees:
|
|
1711
|
+
disabledAssignees: l,
|
|
1712
1712
|
disabledStatuses: a,
|
|
1713
1713
|
tagsOptions: s,
|
|
1714
1714
|
isFetching: ae,
|
|
1715
1715
|
isCompact: j,
|
|
1716
|
-
currentTab:
|
|
1716
|
+
currentTab: $,
|
|
1717
1717
|
onTabChange: V,
|
|
1718
1718
|
projectInfo: H,
|
|
1719
|
-
onOpenViewer: (y) =>
|
|
1719
|
+
onOpenViewer: (y) => c?.(y),
|
|
1720
1720
|
onEntityFocus: d,
|
|
1721
1721
|
thumbnailInputRef: Oe,
|
|
1722
1722
|
versionsInputRef: je
|
|
@@ -1727,8 +1727,8 @@ const Nn = S(Me)`
|
|
|
1727
1727
|
tt,
|
|
1728
1728
|
{
|
|
1729
1729
|
entityType: N,
|
|
1730
|
-
entities:
|
|
1731
|
-
activeUsers:
|
|
1730
|
+
entities: L,
|
|
1731
|
+
activeUsers: h || [],
|
|
1732
1732
|
projectInfo: Ie,
|
|
1733
1733
|
projectName: z,
|
|
1734
1734
|
disabled: !Re(),
|
|
@@ -1742,7 +1742,7 @@ const Nn = S(Me)`
|
|
|
1742
1742
|
isSlideOut: g
|
|
1743
1743
|
}
|
|
1744
1744
|
),
|
|
1745
|
-
|
|
1745
|
+
$ === "subtasks" && N === "task" && M?.id && Q && /* @__PURE__ */ i(
|
|
1746
1746
|
us,
|
|
1747
1747
|
{
|
|
1748
1748
|
projectName: z,
|
|
@@ -1755,20 +1755,20 @@ const Nn = S(Me)`
|
|
|
1755
1755
|
onNotFound: () => V("feed")
|
|
1756
1756
|
}
|
|
1757
1757
|
),
|
|
1758
|
-
|
|
1759
|
-
|
|
1758
|
+
$ === "files" && /* @__PURE__ */ i(
|
|
1759
|
+
$n,
|
|
1760
1760
|
{
|
|
1761
|
-
entities:
|
|
1761
|
+
entities: L,
|
|
1762
1762
|
scope: x,
|
|
1763
1763
|
isLoadingVersion: ae
|
|
1764
1764
|
}
|
|
1765
1765
|
),
|
|
1766
|
-
|
|
1766
|
+
$ === "details" && /* @__PURE__ */ i(
|
|
1767
1767
|
Xn,
|
|
1768
1768
|
{
|
|
1769
1769
|
entityType: N,
|
|
1770
|
-
entities:
|
|
1771
|
-
activeUsers:
|
|
1770
|
+
entities: L,
|
|
1771
|
+
activeUsers: h || [],
|
|
1772
1772
|
projectInfo: Ie,
|
|
1773
1773
|
projectName: z,
|
|
1774
1774
|
disabled: !Re(),
|
|
@@ -1781,7 +1781,7 @@ const Nn = S(Me)`
|
|
|
1781
1781
|
children: /* @__PURE__ */ i(
|
|
1782
1782
|
Ht,
|
|
1783
1783
|
{
|
|
1784
|
-
entities:
|
|
1784
|
+
entities: L,
|
|
1785
1785
|
isLoading: ae
|
|
1786
1786
|
}
|
|
1787
1787
|
)
|
|
@@ -1791,13 +1791,13 @@ const Nn = S(Me)`
|
|
|
1791
1791
|
] })
|
|
1792
1792
|
}
|
|
1793
1793
|
);
|
|
1794
|
-
},
|
|
1794
|
+
}, ms = ({
|
|
1795
1795
|
isOpen: e,
|
|
1796
1796
|
entityType: n,
|
|
1797
1797
|
...t
|
|
1798
1798
|
}) => {
|
|
1799
1799
|
const { entities: o } = G();
|
|
1800
|
-
return !e && !o || !n && !o ? null : /* @__PURE__ */ i(
|
|
1800
|
+
return !e && !o || !n && !o ? null : /* @__PURE__ */ i(hs, { ...t, entityType: n || o?.entityType });
|
|
1801
1801
|
}, gs = xt`
|
|
1802
1802
|
from {
|
|
1803
1803
|
translate: 0 0;
|
|
@@ -1816,23 +1816,23 @@ to {
|
|
|
1816
1816
|
max-width: 533px;
|
|
1817
1817
|
|
|
1818
1818
|
animation: ${gs} 0.2s ease forwards;
|
|
1819
|
-
`,
|
|
1820
|
-
const { slideOut: t, onOpenViewer: o } = G(), { entityType: s, entityId: a, projectName: r } = t || {},
|
|
1821
|
-
return
|
|
1822
|
-
|
|
1819
|
+
`, ma = ({ projectsInfo: e, scope: n }) => {
|
|
1820
|
+
const { slideOut: t, onOpenViewer: o } = G(), { entityType: s, entityId: a, projectName: r } = t || {}, l = !!s && !!a && !!r, { data: h } = ze({ projectName: r }, { skip: !r }), f = e[r || ""] || {}, { tags: u = [] } = f, { closeSlideOut: g } = G(), b = () => g(), x = (j) => o?.(j);
|
|
1821
|
+
return l ? /* @__PURE__ */ i(fs, { children: /* @__PURE__ */ i(
|
|
1822
|
+
ms,
|
|
1823
1823
|
{
|
|
1824
1824
|
isOpen: !0,
|
|
1825
1825
|
entityType: s,
|
|
1826
1826
|
entitySubTypes: [],
|
|
1827
1827
|
entities: [{ id: a, projectName: r }],
|
|
1828
|
-
projectsInfo: { [r]:
|
|
1828
|
+
projectsInfo: { [r]: f },
|
|
1829
1829
|
projectNames: [r],
|
|
1830
1830
|
tagsOptions: u,
|
|
1831
|
-
projectUsers:
|
|
1832
|
-
activeProjectUsers:
|
|
1831
|
+
projectUsers: h,
|
|
1832
|
+
activeProjectUsers: h,
|
|
1833
1833
|
isSlideOut: !0,
|
|
1834
1834
|
scope: n,
|
|
1835
|
-
onClose:
|
|
1835
|
+
onClose: b,
|
|
1836
1836
|
onOpenViewer: x
|
|
1837
1837
|
}
|
|
1838
1838
|
) }) : null;
|
|
@@ -1935,48 +1935,48 @@ const bs = S.div`
|
|
|
1935
1935
|
font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 300, 'opsz' 20;
|
|
1936
1936
|
}
|
|
1937
1937
|
`, ga = () => {
|
|
1938
|
-
const { pip: e } = G(), n = e?.entityType, t = e?.entities || [], o = e?.scope || "", s = t.length > 0 && !!n, a = t.map((v) => v.projectName), { data: r = [] } = Pt({ projects: a }, { skip: !s }), { data:
|
|
1938
|
+
const { pip: e } = G(), n = e?.entityType, t = e?.entities || [], o = e?.scope || "", s = t.length > 0 && !!n, a = t.map((v) => v.projectName), { data: r = [] } = Pt({ projects: a }, { skip: !s }), { data: l = {}, isFetching: h } = It(
|
|
1939
1939
|
{
|
|
1940
1940
|
projects: a
|
|
1941
1941
|
},
|
|
1942
1942
|
{ skip: !s }
|
|
1943
|
-
),
|
|
1944
|
-
() => et(
|
|
1945
|
-
[
|
|
1943
|
+
), f = P(
|
|
1944
|
+
() => et(l, a),
|
|
1945
|
+
[l, a]
|
|
1946
1946
|
), { data: u = [], isFetching: g } = Ge(
|
|
1947
1947
|
// @ts-expect-error
|
|
1948
1948
|
{ entityType: n, entities: t },
|
|
1949
1949
|
{
|
|
1950
|
-
skip: !s ||
|
|
1950
|
+
skip: !s || h
|
|
1951
1951
|
}
|
|
1952
|
-
),
|
|
1953
|
-
() => nt(
|
|
1954
|
-
[
|
|
1952
|
+
), b = P(
|
|
1953
|
+
() => nt(l, a),
|
|
1954
|
+
[l, a]
|
|
1955
1955
|
), x = P(
|
|
1956
1956
|
() => ({
|
|
1957
|
-
task:
|
|
1958
|
-
folder:
|
|
1959
|
-
product:
|
|
1957
|
+
task: b.taskTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {}),
|
|
1958
|
+
folder: b.folderTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {}),
|
|
1959
|
+
product: b.productTypes.filter((v) => !!v.icon).reduce((v, w) => ({ ...v, [w.name]: w.icon }), {})
|
|
1960
1960
|
}),
|
|
1961
|
-
[
|
|
1961
|
+
[b]
|
|
1962
1962
|
), j = P(
|
|
1963
1963
|
() => n ? Xe(u, n, x) : [],
|
|
1964
1964
|
[u, n]
|
|
1965
1965
|
), R = P(() => r.filter((v) => u.some((w) => w?.task?.assignees?.includes(v.name))).map((v) => ({ ...v, avatarUrl: `/api/users/${v.name}/avatar` })), [r, t]), E = u[0];
|
|
1966
1966
|
if (!u.length || !E) return null;
|
|
1967
1967
|
if (g) return /* @__PURE__ */ i("div", { children: "Loading..." });
|
|
1968
|
-
const
|
|
1968
|
+
const c = E?.projectName, C = u.some((v) => v?.status !== E?.status) ? {
|
|
1969
1969
|
icon: "question_mark",
|
|
1970
1970
|
color: "var(--md-sys-color-surface-container-highest)",
|
|
1971
1971
|
name: "Mixed statuses"
|
|
1972
|
-
} :
|
|
1972
|
+
} : f.find((v) => v.name === E?.status) || {
|
|
1973
1973
|
icon: "",
|
|
1974
1974
|
color: "",
|
|
1975
1975
|
name: "None"
|
|
1976
1976
|
};
|
|
1977
1977
|
if (!n) return null;
|
|
1978
1978
|
const { title: A, subTitle: T } = Ze(u, n);
|
|
1979
|
-
return /* @__PURE__ */ i(tn, { children: /* @__PURE__ */ i(Ke, { projectName:
|
|
1979
|
+
return /* @__PURE__ */ i(tn, { children: /* @__PURE__ */ i(Ke, { projectName: c, children: /* @__PURE__ */ k(bs, { children: [
|
|
1980
1980
|
/* @__PURE__ */ k(vs, { children: [
|
|
1981
1981
|
/* @__PURE__ */ i(Qe, { thumbnails: j }),
|
|
1982
1982
|
/* @__PURE__ */ k(ys, { children: [
|
|
@@ -2013,31 +2013,31 @@ const bs = S.div`
|
|
|
2013
2013
|
entities: u,
|
|
2014
2014
|
thumbnailHash: E?.thumbnailHash,
|
|
2015
2015
|
activeUsers: [],
|
|
2016
|
-
projectInfo: c
|
|
2017
|
-
projectName:
|
|
2016
|
+
projectInfo: l[c],
|
|
2017
|
+
projectName: c,
|
|
2018
2018
|
disabled: !1,
|
|
2019
2019
|
scope: o,
|
|
2020
2020
|
readOnly: !0,
|
|
2021
|
-
statuses:
|
|
2021
|
+
statuses: f
|
|
2022
2022
|
}
|
|
2023
2023
|
) })
|
|
2024
2024
|
] }) }) });
|
|
2025
2025
|
};
|
|
2026
2026
|
export {
|
|
2027
|
-
|
|
2027
|
+
Lt as AssigneeSelect,
|
|
2028
2028
|
va as CloseButton,
|
|
2029
2029
|
Rt as Content,
|
|
2030
2030
|
ya as ContentRow,
|
|
2031
|
-
|
|
2031
|
+
ms as DetailsPanel,
|
|
2032
2032
|
ga as DetailsPanelFloating,
|
|
2033
|
-
|
|
2033
|
+
ma as DetailsPanelSlideOut,
|
|
2034
2034
|
ka as Footer,
|
|
2035
2035
|
Ot as Grid,
|
|
2036
2036
|
jt as Header,
|
|
2037
2037
|
At as HeaderContainer,
|
|
2038
2038
|
wa as LabelWrapper,
|
|
2039
2039
|
_t as PriorityEnumDropdown,
|
|
2040
|
-
|
|
2040
|
+
$t as StatusSelect,
|
|
2041
2041
|
Vt as TagsSelect,
|
|
2042
2042
|
xa as ThumbnailWrapper,
|
|
2043
2043
|
Ut as Title,
|