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