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