@ynput/ayon-frontend-shared 0.6.2 → 0.6.4

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