@ynput/ayon-frontend-shared 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +39 -39
- package/dist/ListTable.es.js +738 -651
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +827 -827
- package/dist/Slicer.es.js +10 -10
- package/dist/Views.es.js +36 -34
- package/dist/chunks/ColumnDropIndicator.es.js +27 -21
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +77 -77
- package/dist/chunks/FilmstripEntityCard.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +444 -439
- package/dist/chunks/ReviewablesSelector.es.js +1 -1
- package/dist/chunks/Slicer.es.js +32 -32
- package/dist/chunks/TableExportContextInstance.es.js +408 -469
- package/dist/chunks/Watchers.es.js +1 -1
- package/dist/chunks/getUris.es.js +1069 -1057
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +50 -50
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +17 -16
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +17 -16
- package/dist/types/ListTable.d.ts +27 -17
- package/dist/types/NewEntity.d.ts +17 -16
- package/dist/types/ProjectTreeTable.d.ts +18 -16
- package/dist/types/ProjectsTable.d.ts +17 -16
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +17 -16
- package/dist/types/Views.d.ts +18 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +18 -17
- package/dist/types/context.d.ts +26 -17
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +17 -16
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@ import { jsx as s, jsxs as M, Fragment as he } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as Q, useState as G, useLayoutEffect as Mt, createElement as Fn, forwardRef as Se, useEffect as q, Fragment as wt, useMemo as ee, useCallback as Y, createContext as ye, useContext as ae, memo as kt } from "react";
|
|
3
3
|
import W from "clsx";
|
|
4
4
|
import x, { css as Ot } from "styled-components";
|
|
5
|
-
import { Icon as re, getTextColor as Hn, Dropdown as cn, FormRow as
|
|
5
|
+
import { Icon as re, getTextColor as Hn, Dropdown as cn, FormRow as Ze, Dialog as dn, InputText as tt, IconSelect as Bn, ColorPicker as Wn, Button as xe, SaveButton as Un, TagsSelect as Kn, BorderedSection as zt, theme as Ke, getMixedCounts as Vn, applyMixedChange as Gn } from "@ynput/ayon-react-components";
|
|
6
6
|
import "@module-federation/enhanced/runtime";
|
|
7
7
|
import "@ynput/ayon-addon/host";
|
|
8
8
|
import { toast as we } from "react-toastify";
|
|
9
9
|
import { bC as jn, bs as Tt, bL as Yn, bD as qn, a as Qn } from "./searchTerms.es.js";
|
|
10
|
-
import { bv as Jn, d8 as Zn, bG as Xn, L as er, a2 as tr, c0 as
|
|
10
|
+
import { bv as Jn, d8 as Zn, bG as Xn, L as er, a2 as tr, c0 as st, aZ as nr, aK as rr, cj as or, v as ir, dB as ar, dr as sr, cA as lr, aj as cr } from "./getUris.es.js";
|
|
11
11
|
import "primereact/confirmdialog";
|
|
12
12
|
import { upperFirst as He, debounce as un } from "lodash";
|
|
13
13
|
import "uuid";
|
|
14
|
-
import { e as dr, g as
|
|
14
|
+
import { e as dr, g as Xe, d as yt, b as pn, p as Ft, c as ur, a as pr } from "./iconUtils.es.js";
|
|
15
15
|
import "axios";
|
|
16
|
-
import {
|
|
16
|
+
import { o as Be, b as mr, c as mn } from "./TableExportContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
18
18
|
import "./ContextMenuContextInstance.es.js";
|
|
19
19
|
import "react-dom";
|
|
@@ -22,7 +22,7 @@ import { e as ft, P as gr, a6 as hr, r as We, J as Ct, as as yr, G as fr, s as b
|
|
|
22
22
|
import "lexical";
|
|
23
23
|
import "@lexical/markdown";
|
|
24
24
|
import "match-sorter";
|
|
25
|
-
import { parseISO as
|
|
25
|
+
import { parseISO as lt, isValid as Ht, subMilliseconds as bt, format as Sr } from "date-fns";
|
|
26
26
|
import "@lexical/code";
|
|
27
27
|
import "@lexical/list";
|
|
28
28
|
import "@lexical/rich-text";
|
|
@@ -32,7 +32,7 @@ import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
|
32
32
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
33
33
|
import "@ynput/ayon-addon";
|
|
34
34
|
import { sortingFns as Ne } from "@tanstack/react-table";
|
|
35
|
-
import { W as Ir, l as _e, L as $e, R as Bt, g as
|
|
35
|
+
import { W as Ir, l as _e, L as $e, R as Bt, g as ct, C as Er, m as Rr } from "./realtimeUpdatesUtils.es.js";
|
|
36
36
|
import gn, { defaultUrlTransform as Lr } from "react-markdown";
|
|
37
37
|
import hn from "remark-gfm";
|
|
38
38
|
import { useSelector as Wt } from "react-redux";
|
|
@@ -110,27 +110,27 @@ const _r = x.div`
|
|
|
110
110
|
if (!m || g.length === 0 || g.length !== e.length) return;
|
|
111
111
|
const S = Array.from(m.querySelectorAll(".offscreen-chip"));
|
|
112
112
|
if (S.length !== e.length) return;
|
|
113
|
-
const
|
|
113
|
+
const p = parseFloat(getComputedStyle(m).rowGap) || 0, b = S.map((E) => E.getBoundingClientRect().width), y = S[0].getBoundingClientRect().height, w = m.querySelector(".offscreen-more-chip")?.getBoundingClientRect().width || 60, R = (E, T, z) => {
|
|
114
114
|
let H = 1, B = 0;
|
|
115
115
|
const A = (P, U) => {
|
|
116
|
-
U ? B = P : B +
|
|
116
|
+
U ? B = P : B + p + P <= z ? B += p + P : (H++, B = P);
|
|
117
117
|
};
|
|
118
|
-
for (let P = 0; P <
|
|
119
|
-
return T && A(T,
|
|
118
|
+
for (let P = 0; P < E; P++) A(b[P], P === 0);
|
|
119
|
+
return T && A(T, E === 0), H;
|
|
120
120
|
}, _ = () => {
|
|
121
|
-
const
|
|
121
|
+
const E = m.getBoundingClientRect().width, T = m.offsetHeight, z = y ? Math.max(1, Math.floor((T + p) / (y + p))) : 1;
|
|
122
122
|
let H = e.length;
|
|
123
|
-
for (; H > 1 && R(H, H < e.length ? w : 0,
|
|
123
|
+
for (; H > 1 && R(H, H < e.length ? w : 0, E) > z; )
|
|
124
124
|
H--;
|
|
125
125
|
c(
|
|
126
126
|
(B) => B.visibleCount === H && B.rows === z ? B : { visibleCount: H, rows: z }
|
|
127
127
|
);
|
|
128
|
-
},
|
|
129
|
-
return
|
|
128
|
+
}, I = new ResizeObserver(_);
|
|
129
|
+
return I.observe(m), _(), () => I.disconnect();
|
|
130
130
|
}, [e, g]), t) return null;
|
|
131
131
|
if (!e.length)
|
|
132
132
|
return /* @__PURE__ */ s(Mr, { icon: "add", className: o?.chip?.className });
|
|
133
|
-
const f = e.slice(0, i),
|
|
133
|
+
const f = e.slice(0, i), u = i ? e.length - f.length : 0;
|
|
134
134
|
return /* @__PURE__ */ M(_r, { ref: a, className: W(n, { "multi-row": l > 1 }), children: [
|
|
135
135
|
f.map((m, S) => /* @__PURE__ */ Fn(
|
|
136
136
|
It,
|
|
@@ -139,10 +139,10 @@ const _r = x.div`
|
|
|
139
139
|
key: m.label + S,
|
|
140
140
|
"data-tooltip": m.tooltip,
|
|
141
141
|
onClick: m.onClick ?? o?.chip?.onClick,
|
|
142
|
-
onMouseDown: m.onClick ? (
|
|
142
|
+
onMouseDown: m.onClick ? (p) => p.stopPropagation() : o?.chip?.onMouseDown,
|
|
143
143
|
className: W(
|
|
144
144
|
"chip",
|
|
145
|
-
{ last: S === f.length - 1 &&
|
|
145
|
+
{ last: S === f.length - 1 && u > 0 },
|
|
146
146
|
o?.chip?.className
|
|
147
147
|
)
|
|
148
148
|
},
|
|
@@ -151,9 +151,9 @@ const _r = x.div`
|
|
|
151
151
|
m.label,
|
|
152
152
|
m.suffix
|
|
153
153
|
)),
|
|
154
|
-
|
|
154
|
+
u > 0 && /* @__PURE__ */ M($r, { className: W("more-chip", o?.chip?.className), children: [
|
|
155
155
|
"+",
|
|
156
|
-
|
|
156
|
+
u
|
|
157
157
|
] }),
|
|
158
158
|
g.map((m, S) => /* @__PURE__ */ M(Ut, { className: "offscreen-chip", children: [
|
|
159
159
|
m.prefix,
|
|
@@ -203,10 +203,10 @@ const _r = x.div`
|
|
|
203
203
|
}, l) => {
|
|
204
204
|
const [c, g] = G(() => {
|
|
205
205
|
if (e) {
|
|
206
|
-
const
|
|
207
|
-
if (Ht(
|
|
206
|
+
const p = lt(e);
|
|
207
|
+
if (Ht(p))
|
|
208
208
|
return ft(
|
|
209
|
-
a ? bt(
|
|
209
|
+
a ? bt(p, 1) : p,
|
|
210
210
|
"yyyy-MM-dd"
|
|
211
211
|
);
|
|
212
212
|
}
|
|
@@ -214,10 +214,10 @@ const _r = x.div`
|
|
|
214
214
|
});
|
|
215
215
|
q(() => {
|
|
216
216
|
if (e) {
|
|
217
|
-
const
|
|
218
|
-
Ht(
|
|
217
|
+
const p = lt(e);
|
|
218
|
+
Ht(p) ? g(
|
|
219
219
|
ft(
|
|
220
|
-
a ? bt(
|
|
220
|
+
a ? bt(p, 1) : p,
|
|
221
221
|
"yyyy-MM-dd"
|
|
222
222
|
)
|
|
223
223
|
) : g("");
|
|
@@ -228,28 +228,28 @@ const _r = x.div`
|
|
|
228
228
|
o && d.current && (d.current.focus(), setTimeout(() => {
|
|
229
229
|
try {
|
|
230
230
|
d.current?.showPicker();
|
|
231
|
-
} catch (
|
|
232
|
-
console.debug("Date picker could not be shown automatically:",
|
|
231
|
+
} catch (p) {
|
|
232
|
+
console.debug("Date picker could not be shown automatically:", p);
|
|
233
233
|
}
|
|
234
234
|
}, 100));
|
|
235
235
|
}, [o]);
|
|
236
|
-
const f = (
|
|
237
|
-
|
|
236
|
+
const f = (p) => {
|
|
237
|
+
p.preventDefault();
|
|
238
238
|
try {
|
|
239
239
|
d.current?.showPicker();
|
|
240
240
|
} catch (b) {
|
|
241
241
|
console.debug("Date picker could not be shown on click:", b);
|
|
242
242
|
}
|
|
243
|
-
},
|
|
243
|
+
}, u = (p) => {
|
|
244
244
|
if (c) {
|
|
245
245
|
const [b, y, w] = c.split("-").map(Number);
|
|
246
246
|
if (b && y && w) {
|
|
247
247
|
const _ = new Date(Date.UTC(b, y - 1, w + Number(a))).toISOString();
|
|
248
|
-
if (
|
|
249
|
-
return t(_,
|
|
250
|
-
if (
|
|
251
|
-
const
|
|
252
|
-
return _ !==
|
|
248
|
+
if (p === "Enter")
|
|
249
|
+
return t(_, p), !0;
|
|
250
|
+
if (p === "Click") {
|
|
251
|
+
const I = e ? lt(e).toISOString() : "";
|
|
252
|
+
return _ !== I ? (t(_, p), !0) : !1;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}
|
|
@@ -262,25 +262,25 @@ const _r = x.div`
|
|
|
262
262
|
ref: d,
|
|
263
263
|
type: "date",
|
|
264
264
|
value: c,
|
|
265
|
-
onChange: (
|
|
265
|
+
onChange: (p) => g(p.target.value),
|
|
266
266
|
onBlur: () => {
|
|
267
|
-
|
|
267
|
+
u("Click") || n?.();
|
|
268
268
|
},
|
|
269
|
-
onKeyDown: (
|
|
270
|
-
|
|
269
|
+
onKeyDown: (p) => {
|
|
270
|
+
p.key === "Enter" ? (p.preventDefault(), u("Enter"), d.current?.blur()) : p.key === "Escape" && (p.preventDefault(), n?.());
|
|
271
271
|
},
|
|
272
272
|
onClick: f
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
|
-
),
|
|
276
|
+
), ot = (e, ...t) => Ot`
|
|
277
277
|
@container cell (min-height: ${Ir}px) {
|
|
278
278
|
${Ot(e, ...t)}
|
|
279
279
|
}
|
|
280
280
|
`, Br = x.span`
|
|
281
281
|
white-space: nowrap;
|
|
282
282
|
|
|
283
|
-
${
|
|
283
|
+
${ot`
|
|
284
284
|
white-space: normal;
|
|
285
285
|
`}
|
|
286
286
|
`, Wr = x.span`
|
|
@@ -297,13 +297,13 @@ const _r = x.div`
|
|
|
297
297
|
isMidnightExclusive: c = !1,
|
|
298
298
|
...g
|
|
299
299
|
}, d) => {
|
|
300
|
-
let f = "",
|
|
300
|
+
let f = "", u = !1;
|
|
301
301
|
if (e)
|
|
302
302
|
try {
|
|
303
|
-
const S = l ? "dd-MM-yyyy HH:mm:ss" : "dd-MM-yyyy",
|
|
304
|
-
f = l ? Sr(
|
|
303
|
+
const S = l ? "dd-MM-yyyy HH:mm:ss" : "dd-MM-yyyy", p = c ? bt(new Date(e), 1) : new Date(e);
|
|
304
|
+
f = l ? Sr(p, S) : ft(p, S);
|
|
305
305
|
} catch {
|
|
306
|
-
console.error("Invalid date value:", e), f = "Invalid Date",
|
|
306
|
+
console.error("Invalid date value:", e), f = "Invalid Date", u = !0;
|
|
307
307
|
}
|
|
308
308
|
if (t)
|
|
309
309
|
return /* @__PURE__ */ s(
|
|
@@ -318,11 +318,11 @@ const _r = x.div`
|
|
|
318
318
|
...g
|
|
319
319
|
}
|
|
320
320
|
);
|
|
321
|
-
const m = f && !
|
|
322
|
-
return /* @__PURE__ */ s(Br, { ...g, ref: d, children:
|
|
323
|
-
|
|
321
|
+
const m = f && !u ? f.split(" ") : [];
|
|
322
|
+
return /* @__PURE__ */ s(Br, { ...g, ref: d, children: u ? f : m.map((S, p) => /* @__PURE__ */ M(wt, { children: [
|
|
323
|
+
p > 0 && " ",
|
|
324
324
|
/* @__PURE__ */ s(Wr, { children: S })
|
|
325
|
-
] },
|
|
325
|
+
] }, p)) });
|
|
326
326
|
}
|
|
327
327
|
), Kr = "edit-trigger", vt = x.span`
|
|
328
328
|
text-align: left;
|
|
@@ -365,7 +365,7 @@ const _r = x.div`
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
/* wrapped rows sit on a fixed row lattice, so the height clip can only land between rows */
|
|
368
|
-
${
|
|
368
|
+
${ot`
|
|
369
369
|
&.multi-select:not(.item) {
|
|
370
370
|
.values {
|
|
371
371
|
--wrap-row-height: 24px;
|
|
@@ -459,15 +459,15 @@ const _r = x.div`
|
|
|
459
459
|
iconOnlyColor: g = !1,
|
|
460
460
|
className: d,
|
|
461
461
|
pt: f,
|
|
462
|
-
...
|
|
462
|
+
...u
|
|
463
463
|
}) => {
|
|
464
464
|
const {
|
|
465
465
|
icon: m = {},
|
|
466
466
|
img: S = {},
|
|
467
|
-
value:
|
|
467
|
+
value: p = {},
|
|
468
468
|
expand: b = {},
|
|
469
469
|
close: y = {}
|
|
470
|
-
} = f || {}, { style: w, className: R, ..._ } = m, { style:
|
|
470
|
+
} = f || {}, { style: w, className: R, ..._ } = m, { style: I, className: E, ...T } = S, { style: z, className: H, ...B } = p, { style: A, className: P, ...U } = b, { style: r, className: h, ...v } = y, N = e.every((k) => k.icon), C = !n || !N, L = !N && o && !i, D = !e.length && t;
|
|
471
471
|
return D && (e = [
|
|
472
472
|
{
|
|
473
473
|
label: t,
|
|
@@ -481,7 +481,7 @@ const _r = x.div`
|
|
|
481
481
|
item: i,
|
|
482
482
|
"multi-select": o
|
|
483
483
|
}),
|
|
484
|
-
...
|
|
484
|
+
...u,
|
|
485
485
|
children: [
|
|
486
486
|
/* @__PURE__ */ s(Gr, { className: "values", children: e.map((k, O) => /* @__PURE__ */ M(
|
|
487
487
|
jr,
|
|
@@ -492,8 +492,8 @@ const _r = x.div`
|
|
|
492
492
|
Yr,
|
|
493
493
|
{
|
|
494
494
|
src: k.icon,
|
|
495
|
-
className: W({ avatar: Jr(k.icon) },
|
|
496
|
-
style:
|
|
495
|
+
className: W({ avatar: Jr(k.icon) }, E),
|
|
496
|
+
style: I,
|
|
497
497
|
"data-tooltip": k.label,
|
|
498
498
|
...T
|
|
499
499
|
}
|
|
@@ -557,7 +557,7 @@ const _r = x.div`
|
|
|
557
557
|
width: 100%;
|
|
558
558
|
|
|
559
559
|
/* the value template clips against the button, so it has to grow with the cell */
|
|
560
|
-
${({ $multiSelect: e }) => e &&
|
|
560
|
+
${({ $multiSelect: e }) => e && ot`
|
|
561
561
|
.button {
|
|
562
562
|
height: 100%;
|
|
563
563
|
}
|
|
@@ -575,10 +575,10 @@ const _r = x.div`
|
|
|
575
575
|
onOpen: g,
|
|
576
576
|
onChange: d,
|
|
577
577
|
onCancelEdit: f,
|
|
578
|
-
onNext:
|
|
578
|
+
onNext: u,
|
|
579
579
|
pt: m,
|
|
580
580
|
...S
|
|
581
|
-
},
|
|
581
|
+
}, p) => {
|
|
582
582
|
const b = JSON.stringify(e), y = ee(
|
|
583
583
|
() => e.map((A) => A?.toString()).filter((A) => !!A),
|
|
584
584
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -600,15 +600,15 @@ const _r = x.div`
|
|
|
600
600
|
w = [...w, P], R.push(P);
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
|
-
const _ = w.length > 1,
|
|
603
|
+
const _ = w.length > 1, I = [...jn(n, y), ...R], E = Q(null), [T, z] = G(!1);
|
|
604
604
|
q(() => {
|
|
605
|
-
t &&
|
|
606
|
-
}, [t,
|
|
607
|
-
if (T && !S.search &&
|
|
608
|
-
const P =
|
|
605
|
+
t && E.current && a ? (!E.current.isOpen && E.current?.open(), z(!0)) : z(!1);
|
|
606
|
+
}, [t, E.current, a]), q(() => {
|
|
607
|
+
if (T && !S.search && I.length < 20) {
|
|
608
|
+
const P = E.current?.getOptions()?.querySelector("li");
|
|
609
609
|
P && (P.focus(), P.style.outline = "none");
|
|
610
610
|
}
|
|
611
|
-
}, [T, S.search,
|
|
611
|
+
}, [T, S.search, I.length]);
|
|
612
612
|
const H = !!o?.includes("list"), B = (A) => {
|
|
613
613
|
let P = l ? A : A.filter((U) => n.find((r) => r.value === U));
|
|
614
614
|
o?.includes("list") || (P = Array.isArray(P) ? P[0] : P), d(P, "Click");
|
|
@@ -616,9 +616,9 @@ const _r = x.div`
|
|
|
616
616
|
return t ? /* @__PURE__ */ s(
|
|
617
617
|
Zr,
|
|
618
618
|
{
|
|
619
|
-
options:
|
|
619
|
+
options: I,
|
|
620
620
|
value: y,
|
|
621
|
-
ref:
|
|
621
|
+
ref: E,
|
|
622
622
|
valueTemplate: (A, P, U) => /* @__PURE__ */ s(
|
|
623
623
|
Ve,
|
|
624
624
|
{
|
|
@@ -688,29 +688,29 @@ const _r = x.div`
|
|
|
688
688
|
);
|
|
689
689
|
return ee(() => {
|
|
690
690
|
if (!a) return;
|
|
691
|
-
const g = new Set(t.map((
|
|
692
|
-
i?.resolve(
|
|
691
|
+
const g = new Set(t.map((u) => u.name)), d = (u) => {
|
|
692
|
+
i?.resolve(u), l(null);
|
|
693
693
|
}, f = {
|
|
694
694
|
item: i?.item,
|
|
695
695
|
isNew: i?.isNew,
|
|
696
696
|
fields: ["color"],
|
|
697
697
|
itemLabel: "tag",
|
|
698
|
-
onSave: ({ value:
|
|
699
|
-
c([{ name:
|
|
698
|
+
onSave: ({ value: u, color: m }) => {
|
|
699
|
+
c([{ name: u, color: m || void 0 }]), d(u);
|
|
700
700
|
},
|
|
701
701
|
onCancel: () => d()
|
|
702
702
|
};
|
|
703
703
|
return {
|
|
704
704
|
// the dropdown's edit button and "add new" option open the dialog, and select a new tag
|
|
705
|
-
onEditOption: (
|
|
706
|
-
(S) => l({ item: { value:
|
|
705
|
+
onEditOption: (u, m) => new Promise(
|
|
706
|
+
(S) => l({ item: { value: u.name || "", color: u.color || "" }, isNew: m, resolve: S })
|
|
707
707
|
),
|
|
708
708
|
dialog: f,
|
|
709
709
|
// tags added to entities go to the anatomy too, with its default colour
|
|
710
|
-
addTags: (
|
|
710
|
+
addTags: (u) => c(u.filter((m) => m && !g.has(m)).map((m) => ({ name: m })))
|
|
711
711
|
};
|
|
712
712
|
}, [a, t, c, i]);
|
|
713
|
-
}, to = x(
|
|
713
|
+
}, to = x(Ze)`
|
|
714
714
|
.field {
|
|
715
715
|
padding: 4px;
|
|
716
716
|
margin: -4px;
|
|
@@ -731,7 +731,7 @@ const _r = x.div`
|
|
|
731
731
|
q(() => {
|
|
732
732
|
e && c(e);
|
|
733
733
|
}, [e]);
|
|
734
|
-
const g = (
|
|
734
|
+
const g = (u) => c({ ...l, ...u }), d = l.value.trim(), f = () => d && a({ ...l, value: d });
|
|
735
735
|
return /* @__PURE__ */ s(
|
|
736
736
|
"div",
|
|
737
737
|
{
|
|
@@ -768,31 +768,31 @@ const _r = x.div`
|
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
770
|
children: /* @__PURE__ */ M(no, { children: [
|
|
771
|
-
t && /* @__PURE__ */ s(
|
|
772
|
-
|
|
771
|
+
t && /* @__PURE__ */ s(Ze, { label: "Name", children: /* @__PURE__ */ s(
|
|
772
|
+
tt,
|
|
773
773
|
{
|
|
774
774
|
value: l.value,
|
|
775
|
-
onChange: (
|
|
776
|
-
onKeyDown: (
|
|
775
|
+
onChange: (u) => g({ value: u.target.value }),
|
|
776
|
+
onKeyDown: (u) => u.key === "Enter" && f(),
|
|
777
777
|
autoFocus: !0
|
|
778
778
|
}
|
|
779
779
|
) }),
|
|
780
|
-
n.includes("label") && /* @__PURE__ */ s(
|
|
781
|
-
|
|
780
|
+
n.includes("label") && /* @__PURE__ */ s(Ze, { label: "Label", children: /* @__PURE__ */ s(
|
|
781
|
+
tt,
|
|
782
782
|
{
|
|
783
783
|
value: l.label || "",
|
|
784
784
|
placeholder: l.value,
|
|
785
|
-
onChange: (
|
|
785
|
+
onChange: (u) => g({ label: u.target.value })
|
|
786
786
|
}
|
|
787
787
|
) }),
|
|
788
|
-
n.includes("icon") && /* @__PURE__ */ s(
|
|
788
|
+
n.includes("icon") && /* @__PURE__ */ s(Ze, { label: "Icon", children: /* @__PURE__ */ s(
|
|
789
789
|
Bn,
|
|
790
790
|
{
|
|
791
791
|
value: l.icon ? [l.icon] : [],
|
|
792
|
-
onChange: (
|
|
792
|
+
onChange: (u) => g({ icon: u[0] })
|
|
793
793
|
}
|
|
794
794
|
) }),
|
|
795
|
-
n.includes("color") && /* @__PURE__ */ s(to, { label: "Colour", style: { padding: 4 }, children: /* @__PURE__ */ s(Wn, { value: l.color, onChange: (
|
|
795
|
+
n.includes("color") && /* @__PURE__ */ s(to, { label: "Colour", style: { padding: 4 }, children: /* @__PURE__ */ s(Wn, { value: l.color, onChange: (u) => g({ color: u }) }) })
|
|
796
796
|
] })
|
|
797
797
|
}
|
|
798
798
|
)
|
|
@@ -813,23 +813,23 @@ const _r = x.div`
|
|
|
813
813
|
align: g,
|
|
814
814
|
className: d,
|
|
815
815
|
isProjectTags: f,
|
|
816
|
-
pt:
|
|
816
|
+
pt: u,
|
|
817
817
|
...m
|
|
818
818
|
}) => {
|
|
819
|
-
const S = JSON.stringify(e),
|
|
820
|
-
() => e.map((
|
|
819
|
+
const S = JSON.stringify(e), p = ee(
|
|
820
|
+
() => e.map((E) => E?.toString()).filter((E) => !!E),
|
|
821
821
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
822
822
|
[S]
|
|
823
823
|
), b = ee(() => {
|
|
824
|
-
const
|
|
824
|
+
const E = {};
|
|
825
825
|
for (const T of t) {
|
|
826
826
|
const z = T.value.toString();
|
|
827
|
-
|
|
827
|
+
E[z] = { name: z, color: T.color || "" };
|
|
828
828
|
}
|
|
829
|
-
for (const T of
|
|
830
|
-
return
|
|
831
|
-
}, [t,
|
|
832
|
-
() => t.map((
|
|
829
|
+
for (const T of p) E[T] || (E[T] = { name: T, color: "" });
|
|
830
|
+
return E;
|
|
831
|
+
}, [t, p]), y = !!o && !a, w = ee(
|
|
832
|
+
() => t.map((E) => ({ name: E.value.toString() })),
|
|
833
833
|
[t]
|
|
834
834
|
), R = eo(
|
|
835
835
|
f && y ? n : void 0,
|
|
@@ -843,20 +843,20 @@ const _r = x.div`
|
|
|
843
843
|
io,
|
|
844
844
|
{
|
|
845
845
|
ref: _,
|
|
846
|
-
value:
|
|
846
|
+
value: p,
|
|
847
847
|
tags: b,
|
|
848
848
|
options: [],
|
|
849
849
|
editor: !0,
|
|
850
850
|
align: g,
|
|
851
851
|
placeholder: c,
|
|
852
|
-
onChange: (
|
|
853
|
-
R?.addTags(
|
|
852
|
+
onChange: (E) => {
|
|
853
|
+
R?.addTags(E.filter((T) => !p.includes(T))), i(E, "Click");
|
|
854
854
|
},
|
|
855
855
|
onEditOption: R?.onEditOption,
|
|
856
856
|
editOptionTooltip: "Change the colour in the project tags",
|
|
857
857
|
...m,
|
|
858
|
-
onMixedChange: m.onMixedChange && ((
|
|
859
|
-
R?.addTags(
|
|
858
|
+
onMixedChange: m.onMixedChange && ((E) => {
|
|
859
|
+
R?.addTags(E.add), m.onMixedChange?.(E);
|
|
860
860
|
}),
|
|
861
861
|
onClose: l,
|
|
862
862
|
className: d
|
|
@@ -864,23 +864,23 @@ const _r = x.div`
|
|
|
864
864
|
),
|
|
865
865
|
R && /* @__PURE__ */ s(ro, { ...R.dialog })
|
|
866
866
|
] });
|
|
867
|
-
const
|
|
868
|
-
(
|
|
869
|
-
value:
|
|
870
|
-
label:
|
|
867
|
+
const I = p.map(
|
|
868
|
+
(E) => t.find((T) => T.value === E) ?? {
|
|
869
|
+
value: E,
|
|
870
|
+
label: E,
|
|
871
871
|
color: oo
|
|
872
872
|
}
|
|
873
873
|
);
|
|
874
874
|
return /* @__PURE__ */ s(
|
|
875
875
|
Ve,
|
|
876
876
|
{
|
|
877
|
-
selectedOptions:
|
|
878
|
-
hasMultipleValues:
|
|
877
|
+
selectedOptions: I,
|
|
878
|
+
hasMultipleValues: I.length > 1,
|
|
879
879
|
isMultiSelect: !0,
|
|
880
880
|
isReadOnly: a,
|
|
881
881
|
placeholder: c,
|
|
882
|
-
...
|
|
883
|
-
className: W("enum-value",
|
|
882
|
+
...u?.template,
|
|
883
|
+
className: W("enum-value", u?.template?.className, d)
|
|
884
884
|
}
|
|
885
885
|
);
|
|
886
886
|
}, so = x.input`
|
|
@@ -903,7 +903,7 @@ const _r = x.div`
|
|
|
903
903
|
box-shadow: inset 0 0 0 2px var(--md-sys-color-primary);
|
|
904
904
|
`, lo = Se(
|
|
905
905
|
({ value: e, onChange: t, onCancel: n, autoFocus: o = !0, type: a = "string", ...i }, l) => {
|
|
906
|
-
const [c, g] = G(e), d = Q(null), f = Q(!1),
|
|
906
|
+
const [c, g] = G(e), d = Q(null), f = Q(!1), u = Q(e), m = (y) => {
|
|
907
907
|
const w = y != null ? String(y).trim() : "";
|
|
908
908
|
if (y == null) return "";
|
|
909
909
|
if (w === "")
|
|
@@ -921,7 +921,7 @@ const _r = x.div`
|
|
|
921
921
|
return w;
|
|
922
922
|
}
|
|
923
923
|
}, S = (y) => {
|
|
924
|
-
const w =
|
|
924
|
+
const w = u.current;
|
|
925
925
|
if (a !== "string") {
|
|
926
926
|
const R = y == null || y === "", _ = w == null || w === "";
|
|
927
927
|
if (R && _)
|
|
@@ -1118,12 +1118,12 @@ const _r = x.div`
|
|
|
1118
1118
|
valueType: g = "string",
|
|
1119
1119
|
draftValue: d,
|
|
1120
1120
|
onEditingDraftChange: f,
|
|
1121
|
-
onDismissWithoutSave:
|
|
1121
|
+
onDismissWithoutSave: u,
|
|
1122
1122
|
onPreviewMouseEnter: m,
|
|
1123
1123
|
onPreviewMouseLeave: S,
|
|
1124
|
-
mentionEntity:
|
|
1124
|
+
mentionEntity: p
|
|
1125
1125
|
}) => {
|
|
1126
|
-
const b = Q(d != null), y = typeof e == "string" ? e : e == null ? "" : String(e), [w, R] = G(d ?? y), _ = Q(null),
|
|
1126
|
+
const b = Q(d != null), y = typeof e == "string" ? e : e == null ? "" : String(e), [w, R] = G(d ?? y), _ = Q(null), I = i === "preview", E = c, T = Q(null), z = Q(!1), H = Q(null), B = Q(y);
|
|
1127
1127
|
q(() => {
|
|
1128
1128
|
B.current = y;
|
|
1129
1129
|
}, [y]);
|
|
@@ -1138,9 +1138,9 @@ const _r = x.div`
|
|
|
1138
1138
|
b.current = !1;
|
|
1139
1139
|
return;
|
|
1140
1140
|
}
|
|
1141
|
-
!t && !
|
|
1142
|
-
}, [t,
|
|
1143
|
-
if (
|
|
1141
|
+
!t && !I || R(y);
|
|
1142
|
+
}, [t, I, y]), q(() => {
|
|
1143
|
+
if (I || !t || E) {
|
|
1144
1144
|
z.current = !1;
|
|
1145
1145
|
return;
|
|
1146
1146
|
}
|
|
@@ -1151,7 +1151,7 @@ const _r = x.div`
|
|
|
1151
1151
|
const O = k.value.length;
|
|
1152
1152
|
k.setSelectionRange(O, O), z.current = !0;
|
|
1153
1153
|
});
|
|
1154
|
-
}, [t,
|
|
1154
|
+
}, [t, I, E]);
|
|
1155
1155
|
const P = Y(
|
|
1156
1156
|
(k) => {
|
|
1157
1157
|
const O = k.trim();
|
|
@@ -1172,7 +1172,7 @@ const _r = x.div`
|
|
|
1172
1172
|
[g]
|
|
1173
1173
|
), U = Y(
|
|
1174
1174
|
(k = "Click") => {
|
|
1175
|
-
if (!
|
|
1175
|
+
if (!E) {
|
|
1176
1176
|
const { value: F, error: te } = P(w);
|
|
1177
1177
|
if (te) {
|
|
1178
1178
|
we.error(te);
|
|
@@ -1192,13 +1192,13 @@ const _r = x.div`
|
|
|
1192
1192
|
}
|
|
1193
1193
|
o?.(O, k);
|
|
1194
1194
|
},
|
|
1195
|
-
[P, w,
|
|
1195
|
+
[P, w, E, o, a, f]
|
|
1196
1196
|
), { projectName: r, productTypes: h, taskTypes: v } = Be(), N = ee(
|
|
1197
|
-
() =>
|
|
1198
|
-
[
|
|
1199
|
-
), C = yn(N, { skip:
|
|
1197
|
+
() => p?.entityId && p.entityType && r ? { projectName: r, ...p, productTypes: h, taskTypes: v } : void 0,
|
|
1198
|
+
[p?.entityId, p?.entityType, r, h, v]
|
|
1199
|
+
), C = yn(N, { skip: I || !E }), L = Y(
|
|
1200
1200
|
(k) => {
|
|
1201
|
-
if (
|
|
1201
|
+
if (I || !E) return;
|
|
1202
1202
|
if (k.key === "Enter" || k.key === "Escape") {
|
|
1203
1203
|
k.stopPropagation();
|
|
1204
1204
|
return;
|
|
@@ -1207,21 +1207,21 @@ const _r = x.div`
|
|
|
1207
1207
|
const O = fo[k.key.toLowerCase()], F = _.current?.getEditor();
|
|
1208
1208
|
!O || !F || (k.preventDefault(), hr(F, O));
|
|
1209
1209
|
},
|
|
1210
|
-
[
|
|
1210
|
+
[I, E]
|
|
1211
1211
|
), D = /* @__PURE__ */ s(
|
|
1212
1212
|
go,
|
|
1213
1213
|
{
|
|
1214
1214
|
ref: H,
|
|
1215
|
-
className:
|
|
1215
|
+
className: I ? "preview" : "editing",
|
|
1216
1216
|
onKeyDown: L,
|
|
1217
1217
|
onMouseDown: (k) => {
|
|
1218
1218
|
k.stopPropagation();
|
|
1219
1219
|
},
|
|
1220
1220
|
onMouseEnter: () => {
|
|
1221
|
-
|
|
1221
|
+
I && m?.();
|
|
1222
1222
|
},
|
|
1223
1223
|
onMouseLeave: () => {
|
|
1224
|
-
|
|
1224
|
+
I && S?.();
|
|
1225
1225
|
},
|
|
1226
1226
|
children: /* @__PURE__ */ s(
|
|
1227
1227
|
Rt,
|
|
@@ -1230,31 +1230,31 @@ const _r = x.div`
|
|
|
1230
1230
|
k.stopPropagation();
|
|
1231
1231
|
},
|
|
1232
1232
|
onClick: (k) => {
|
|
1233
|
-
if (k.stopPropagation(),
|
|
1233
|
+
if (k.stopPropagation(), I) {
|
|
1234
1234
|
k.target.closest("a") || l?.();
|
|
1235
1235
|
return;
|
|
1236
1236
|
}
|
|
1237
1237
|
},
|
|
1238
|
-
children:
|
|
1238
|
+
children: E ? /* @__PURE__ */ s(
|
|
1239
1239
|
Ct,
|
|
1240
1240
|
{
|
|
1241
1241
|
ref: _,
|
|
1242
|
-
value:
|
|
1243
|
-
onChange:
|
|
1244
|
-
readOnly:
|
|
1242
|
+
value: I ? y : w,
|
|
1243
|
+
onChange: I ? void 0 : A,
|
|
1244
|
+
readOnly: I,
|
|
1245
1245
|
toolbar: !1,
|
|
1246
|
-
floatingToolbar: !
|
|
1246
|
+
floatingToolbar: !I,
|
|
1247
1247
|
bordered: !1,
|
|
1248
|
-
autoFocus: !
|
|
1248
|
+
autoFocus: !I,
|
|
1249
1249
|
minHeight: 64,
|
|
1250
1250
|
placeholder: "",
|
|
1251
|
-
mentions:
|
|
1251
|
+
mentions: I ? void 0 : C,
|
|
1252
1252
|
submitOnEnter: !0,
|
|
1253
|
-
onSubmit:
|
|
1254
|
-
onEscape:
|
|
1253
|
+
onSubmit: I ? void 0 : () => U("Enter"),
|
|
1254
|
+
onEscape: I ? void 0 : () => a?.()
|
|
1255
1255
|
},
|
|
1256
1256
|
`text-editor-${i}-${t}`
|
|
1257
|
-
) :
|
|
1257
|
+
) : I ? /* @__PURE__ */ s(yo, { children: y }) : /* @__PURE__ */ s(
|
|
1258
1258
|
ho,
|
|
1259
1259
|
{
|
|
1260
1260
|
ref: T,
|
|
@@ -1277,10 +1277,10 @@ const _r = x.div`
|
|
|
1277
1277
|
)
|
|
1278
1278
|
}
|
|
1279
1279
|
);
|
|
1280
|
-
return /* @__PURE__ */ s(he, { children: (t ||
|
|
1280
|
+
return /* @__PURE__ */ s(he, { children: (t || I) && /* @__PURE__ */ s(
|
|
1281
1281
|
We,
|
|
1282
1282
|
{
|
|
1283
|
-
isEditing: !!(t ||
|
|
1283
|
+
isEditing: !!(t || I),
|
|
1284
1284
|
anchorId: n,
|
|
1285
1285
|
onClose: a,
|
|
1286
1286
|
matchAnchorWidth: !0,
|
|
@@ -1309,7 +1309,7 @@ const _r = x.div`
|
|
|
1309
1309
|
display: block;
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
|
-
${
|
|
1312
|
+
${ot`
|
|
1313
1313
|
&:not(.markdown) {
|
|
1314
1314
|
white-space: normal;
|
|
1315
1315
|
word-break: break-word;
|
|
@@ -1336,7 +1336,7 @@ const vo = () => bo ??= import("rehype-raw").then((e) => bn = e.default), xo = (
|
|
|
1336
1336
|
o = !1;
|
|
1337
1337
|
};
|
|
1338
1338
|
}, [e, t]), t;
|
|
1339
|
-
},
|
|
1339
|
+
}, dt = x.a`
|
|
1340
1340
|
color: var(--md-sys-color-primary, #0066cc);
|
|
1341
1341
|
text-decoration: none;
|
|
1342
1342
|
cursor: pointer;
|
|
@@ -1387,7 +1387,7 @@ class ko {
|
|
|
1387
1387
|
this.lastShownTime = Date.now();
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
const jt = new ko(),
|
|
1390
|
+
const jt = new ko(), ut = "projectTreeTextPreviewOpen", To = (e) => {
|
|
1391
1391
|
try {
|
|
1392
1392
|
const t = new URL(e.trim());
|
|
1393
1393
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
@@ -1413,15 +1413,15 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1413
1413
|
type: g,
|
|
1414
1414
|
columnId: d,
|
|
1415
1415
|
cellId: f,
|
|
1416
|
-
onRequestEdit:
|
|
1416
|
+
onRequestEdit: u,
|
|
1417
1417
|
getDraftValue: m,
|
|
1418
1418
|
setDraftValue: S,
|
|
1419
|
-
mentionEntity:
|
|
1419
|
+
mentionEntity: p,
|
|
1420
1420
|
className: b,
|
|
1421
1421
|
...y
|
|
1422
1422
|
}, w) => {
|
|
1423
|
-
const R = xo(!!n), _ =
|
|
1424
|
-
}),
|
|
1423
|
+
const R = xo(!!n), _ = u || (() => {
|
|
1424
|
+
}), I = m || (() => null), E = S || (() => {
|
|
1425
1425
|
}), [T, z] = G(!1), [H, B] = G(!1), [A, P] = G(!1), [U, r] = G(!1), h = Q(null), v = Q(), N = Q(), C = Q(!1), L = T || H, D = t?.label || e, k = typeof D == "string" ? D : String(D ?? ""), O = !n && !qt(k) && !k.match(/(https?:\/\/\S+)/gi);
|
|
1426
1426
|
q(() => {
|
|
1427
1427
|
const K = h.current;
|
|
@@ -1451,14 +1451,14 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1451
1451
|
C.current = K, P(K);
|
|
1452
1452
|
}, []);
|
|
1453
1453
|
q(() => (clearTimeout(v.current), clearTimeout(N.current), o ? F(!1) : L ? C.current || U && f && (v.current = setTimeout(() => {
|
|
1454
|
-
C.current || (F(!0), jt.markShown(), window.dispatchEvent(new CustomEvent(
|
|
1454
|
+
C.current || (F(!0), jt.markShown(), window.dispatchEvent(new CustomEvent(ut, { detail: { cellId: f } })));
|
|
1455
1455
|
}, jt.getDelay())) : N.current = setTimeout(() => F(!1), 300), () => {
|
|
1456
1456
|
clearTimeout(v.current), clearTimeout(N.current);
|
|
1457
1457
|
}), [L, U, o, f, F]), q(() => {
|
|
1458
1458
|
const K = (V) => {
|
|
1459
1459
|
V.detail?.cellId !== f && F(!1);
|
|
1460
1460
|
};
|
|
1461
|
-
return window.addEventListener(
|
|
1461
|
+
return window.addEventListener(ut, K), () => window.removeEventListener(ut, K);
|
|
1462
1462
|
}, [f, F]);
|
|
1463
1463
|
const te = Y(() => {
|
|
1464
1464
|
F(!1), f && _(f);
|
|
@@ -1492,7 +1492,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1492
1492
|
);
|
|
1493
1493
|
}
|
|
1494
1494
|
return /* @__PURE__ */ s(
|
|
1495
|
-
|
|
1495
|
+
dt,
|
|
1496
1496
|
{
|
|
1497
1497
|
href: V || "#",
|
|
1498
1498
|
onMouseDown: (Z) => Z.stopPropagation(),
|
|
@@ -1506,7 +1506,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1506
1506
|
children: k
|
|
1507
1507
|
}
|
|
1508
1508
|
) : qt(k) ? dr(k).map(($) => $.type === "url" && $.href ? /* @__PURE__ */ s(
|
|
1509
|
-
|
|
1509
|
+
dt,
|
|
1510
1510
|
{
|
|
1511
1511
|
href: $.href,
|
|
1512
1512
|
onMouseDown: (j) => j.stopPropagation(),
|
|
@@ -1516,7 +1516,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1516
1516
|
},
|
|
1517
1517
|
$.key
|
|
1518
1518
|
) : /* @__PURE__ */ s("span", { style: { whiteSpace: "pre-line" }, children: $.content }, $.key)) : k.match(/(https?:\/\/\S+)/gi) ? Co(k).map(($) => $.type === "url" ? /* @__PURE__ */ s(
|
|
1519
|
-
|
|
1519
|
+
dt,
|
|
1520
1520
|
{
|
|
1521
1521
|
href: $.content,
|
|
1522
1522
|
onMouseDown: (j) => j.stopPropagation(),
|
|
@@ -1576,9 +1576,9 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1576
1576
|
onChange: ue,
|
|
1577
1577
|
onCancelEdit: l,
|
|
1578
1578
|
onDismissWithoutSave: l,
|
|
1579
|
-
draftValue:
|
|
1580
|
-
onEditingDraftChange:
|
|
1581
|
-
mentionEntity:
|
|
1579
|
+
draftValue: I(),
|
|
1580
|
+
onEditingDraftChange: E,
|
|
1581
|
+
mentionEntity: p
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
1584
|
A && !o && n && f && /* @__PURE__ */ s(
|
|
@@ -1650,24 +1650,24 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1650
1650
|
onMentionClick: d,
|
|
1651
1651
|
onMentionHover: f
|
|
1652
1652
|
}) => {
|
|
1653
|
-
const { isEditing:
|
|
1653
|
+
const { isEditing: u, editorValue: m, setEditorValue: S, handleStartEditing: p, handleSave: b, handleCancel: y } = So({
|
|
1654
1654
|
description: e,
|
|
1655
1655
|
enableEditing: o,
|
|
1656
1656
|
isMixed: n,
|
|
1657
1657
|
onChange: i
|
|
1658
|
-
}), w = yn(g, { skip: !
|
|
1658
|
+
}), w = yn(g, { skip: !u });
|
|
1659
1659
|
if (q(() => {
|
|
1660
|
-
a && !
|
|
1660
|
+
a && !u && p();
|
|
1661
1661
|
}, [a]), c)
|
|
1662
1662
|
return /* @__PURE__ */ s(zt, { title: "Description", children: /* @__PURE__ */ s(po, {}) });
|
|
1663
|
-
const R = (
|
|
1664
|
-
if (
|
|
1665
|
-
const
|
|
1666
|
-
if (
|
|
1667
|
-
|
|
1663
|
+
const R = (I) => {
|
|
1664
|
+
if (u) return;
|
|
1665
|
+
const E = I.target;
|
|
1666
|
+
if (E.closest("a") || d && E.closest(".mention")) {
|
|
1667
|
+
I.stopPropagation();
|
|
1668
1668
|
return;
|
|
1669
1669
|
}
|
|
1670
|
-
|
|
1670
|
+
p();
|
|
1671
1671
|
}, _ = () => {
|
|
1672
1672
|
y(), l?.();
|
|
1673
1673
|
};
|
|
@@ -1675,32 +1675,32 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1675
1675
|
zt,
|
|
1676
1676
|
{
|
|
1677
1677
|
title: "Description",
|
|
1678
|
-
showHeader: !
|
|
1679
|
-
enableHover: !
|
|
1680
|
-
onClick:
|
|
1678
|
+
showHeader: !u,
|
|
1679
|
+
enableHover: !u,
|
|
1680
|
+
onClick: u ? void 0 : p,
|
|
1681
1681
|
description: t,
|
|
1682
|
-
children: /* @__PURE__ */ M(co, { className: W({ editing:
|
|
1682
|
+
children: /* @__PURE__ */ M(co, { className: W({ editing: u }), onClick: R, children: [
|
|
1683
1683
|
/* @__PURE__ */ s(Rt, { className: "block-shortcuts", children: /* @__PURE__ */ s(
|
|
1684
1684
|
Ct,
|
|
1685
1685
|
{
|
|
1686
1686
|
className: "description-editor",
|
|
1687
|
-
value:
|
|
1688
|
-
onChange:
|
|
1689
|
-
placeholder:
|
|
1690
|
-
mentions:
|
|
1687
|
+
value: u ? m : e || "",
|
|
1688
|
+
onChange: u ? S : void 0,
|
|
1689
|
+
placeholder: u ? "Describe it, or type / to add headings, lists, mentions, code and more..." : "Add a description...",
|
|
1690
|
+
mentions: u ? w : void 0,
|
|
1691
1691
|
onMentionClick: d,
|
|
1692
1692
|
onMentionHover: f,
|
|
1693
|
-
readOnly: !
|
|
1694
|
-
toolbar:
|
|
1693
|
+
readOnly: !u,
|
|
1694
|
+
toolbar: u ? br : !1,
|
|
1695
1695
|
bordered: !1,
|
|
1696
|
-
autoFocus:
|
|
1697
|
-
minHeight:
|
|
1698
|
-
onSubmit:
|
|
1699
|
-
onEscape:
|
|
1696
|
+
autoFocus: u,
|
|
1697
|
+
minHeight: u ? 60 : 20,
|
|
1698
|
+
onSubmit: u ? b : void 0,
|
|
1699
|
+
onEscape: u ? _ : void 0
|
|
1700
1700
|
},
|
|
1701
|
-
|
|
1701
|
+
u ? "edit" : "view"
|
|
1702
1702
|
) }),
|
|
1703
|
-
|
|
1703
|
+
u && /* @__PURE__ */ s(uo, { children: /* @__PURE__ */ M(mo, { children: [
|
|
1704
1704
|
/* @__PURE__ */ s(xe, { variant: "text", label: "Cancel", onClick: _ }),
|
|
1705
1705
|
/* @__PURE__ */ s(xe, { variant: "filled", label: "Save", onClick: b })
|
|
1706
1706
|
] }) })
|
|
@@ -1751,14 +1751,14 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1751
1751
|
onExpand: i,
|
|
1752
1752
|
showExpand: l
|
|
1753
1753
|
}) => {
|
|
1754
|
-
const [c, g] = G(e || ""), [d, f] = G(0), [
|
|
1754
|
+
const [c, g] = G(e || ""), [d, f] = G(0), [u, m] = G(!1), S = Q(null), p = Q(null), b = o && !a;
|
|
1755
1755
|
q(() => {
|
|
1756
|
-
if (!
|
|
1756
|
+
if (!p.current) return;
|
|
1757
1757
|
const T = new ResizeObserver((z) => {
|
|
1758
1758
|
for (const H of z)
|
|
1759
1759
|
f(H.contentRect.width);
|
|
1760
1760
|
});
|
|
1761
|
-
return T.observe(
|
|
1761
|
+
return T.observe(p.current), () => T.disconnect();
|
|
1762
1762
|
}, []), q(() => {
|
|
1763
1763
|
b && g(e || "");
|
|
1764
1764
|
}, [b]);
|
|
@@ -1778,7 +1778,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1778
1778
|
}, [t, n, e, c]), _ = Y(
|
|
1779
1779
|
(T) => {
|
|
1780
1780
|
const z = T.relatedTarget;
|
|
1781
|
-
if (!(z && (
|
|
1781
|
+
if (!(z && (p.current?.contains(z) || z.closest(".md-popover")))) {
|
|
1782
1782
|
if (z?.closest(".expand-button")) {
|
|
1783
1783
|
n?.();
|
|
1784
1784
|
return;
|
|
@@ -1787,12 +1787,12 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
},
|
|
1789
1789
|
[R, n]
|
|
1790
|
-
),
|
|
1790
|
+
), I = Y((T) => {
|
|
1791
1791
|
(T.key === "Escape" || T.key === "Enter" && (T.metaKey || T.ctrlKey)) && T.stopPropagation();
|
|
1792
1792
|
}, []);
|
|
1793
1793
|
if (!e && !b) return null;
|
|
1794
|
-
const
|
|
1795
|
-
return /* @__PURE__ */ M("div", { ref:
|
|
1794
|
+
const E = b && !u;
|
|
1795
|
+
return /* @__PURE__ */ M("div", { ref: p, style: { width: "100%", height: y, position: "relative", minWidth: 0 }, children: [
|
|
1796
1796
|
l && w >= 3 && /* @__PURE__ */ s(
|
|
1797
1797
|
Eo,
|
|
1798
1798
|
{
|
|
@@ -1809,32 +1809,32 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1809
1809
|
{
|
|
1810
1810
|
style: { height: y, overflow: "auto" },
|
|
1811
1811
|
className: "block-shortcuts compact",
|
|
1812
|
-
onBlur:
|
|
1813
|
-
onKeyDown:
|
|
1812
|
+
onBlur: E ? _ : void 0,
|
|
1813
|
+
onKeyDown: E ? I : void 0,
|
|
1814
1814
|
children: /* @__PURE__ */ s(
|
|
1815
1815
|
Ct,
|
|
1816
1816
|
{
|
|
1817
1817
|
ref: S,
|
|
1818
|
-
value:
|
|
1819
|
-
onChange:
|
|
1820
|
-
readOnly: !
|
|
1818
|
+
value: E ? c : e || "",
|
|
1819
|
+
onChange: E ? g : void 0,
|
|
1820
|
+
readOnly: !E,
|
|
1821
1821
|
toolbar: !1,
|
|
1822
|
-
floatingToolbar:
|
|
1822
|
+
floatingToolbar: E,
|
|
1823
1823
|
bordered: !1,
|
|
1824
|
-
autoFocus:
|
|
1824
|
+
autoFocus: E,
|
|
1825
1825
|
minHeight: y,
|
|
1826
|
-
onSubmit:
|
|
1827
|
-
onEscape:
|
|
1826
|
+
onSubmit: E ? R : void 0,
|
|
1827
|
+
onEscape: E ? () => n?.() : void 0,
|
|
1828
1828
|
placeholder: ""
|
|
1829
1829
|
},
|
|
1830
|
-
|
|
1830
|
+
E ? "edit" : "view"
|
|
1831
1831
|
)
|
|
1832
1832
|
}
|
|
1833
1833
|
),
|
|
1834
1834
|
/* @__PURE__ */ s(
|
|
1835
1835
|
Ro,
|
|
1836
1836
|
{
|
|
1837
|
-
isOpen:
|
|
1837
|
+
isOpen: u,
|
|
1838
1838
|
onClose: () => m(!1),
|
|
1839
1839
|
value: b ? c : e,
|
|
1840
1840
|
onSave: (T) => {
|
|
@@ -1880,7 +1880,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
1880
1880
|
readOnly: n
|
|
1881
1881
|
}
|
|
1882
1882
|
)
|
|
1883
|
-
),
|
|
1883
|
+
), it = x.div`
|
|
1884
1884
|
padding: var(--padding-m);
|
|
1885
1885
|
background-color: var(--md-sys-color-surface-container-high);
|
|
1886
1886
|
border-radius: var(--border-radius-l);
|
|
@@ -2025,7 +2025,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2025
2025
|
&:hover {
|
|
2026
2026
|
background-color: var(--md-sys-color-surface-container-low-hover);
|
|
2027
2027
|
}
|
|
2028
|
-
`, Do = x(
|
|
2028
|
+
`, Do = x(tt).attrs({ type: "number" })`
|
|
2029
2029
|
height: 22px !important;
|
|
2030
2030
|
min-height: 22px !important;
|
|
2031
2031
|
max-height: 22px !important;
|
|
@@ -2079,7 +2079,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2079
2079
|
min-width: 110px;
|
|
2080
2080
|
flex: 1;
|
|
2081
2081
|
width: 100%;
|
|
2082
|
-
`, Mo = x(
|
|
2082
|
+
`, Mo = x(tt)`
|
|
2083
2083
|
flex: 1;
|
|
2084
2084
|
border: none;
|
|
2085
2085
|
background-color: var(--md-sys-color-surface-container);
|
|
@@ -2220,7 +2220,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2220
2220
|
listType: "review-session",
|
|
2221
2221
|
entityTypes: ["version"]
|
|
2222
2222
|
}
|
|
2223
|
-
}, Bo = Object.keys(Me),
|
|
2223
|
+
}, Bo = Object.keys(Me), pt = (e, t) => !!Me[e]?.entityTypes.includes(t), de = {
|
|
2224
2224
|
folder: "folder_entity",
|
|
2225
2225
|
task: "task_entity",
|
|
2226
2226
|
version: "version_entity"
|
|
@@ -2229,7 +2229,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2229
2229
|
folderName: de.folder,
|
|
2230
2230
|
taskLabel: de.task,
|
|
2231
2231
|
taskName: de.task
|
|
2232
|
-
}, ge = (e, t = {}) => t[e] || Wo[e] || e,
|
|
2232
|
+
}, ge = (e, t = {}) => t[e] || Wo[e] || e, mt = (e = [], t = {}) => Array.from(new Set(e.map((n) => ge(n, t)))), Ue = (e = {}, t = {}) => {
|
|
2233
2233
|
const n = {};
|
|
2234
2234
|
return Object.entries(e).forEach(([o, a]) => {
|
|
2235
2235
|
const i = ge(o, t);
|
|
@@ -2239,9 +2239,9 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2239
2239
|
if (!e) return {};
|
|
2240
2240
|
const n = {
|
|
2241
2241
|
...e.columnPinning,
|
|
2242
|
-
left:
|
|
2243
|
-
right:
|
|
2244
|
-
}, o = Ue(e.columnSizing, t), a = Ue(e.columnVisibility, t), i =
|
|
2242
|
+
left: mt(e.columnPinning?.left, t),
|
|
2243
|
+
right: mt(e.columnPinning?.right, t)
|
|
2244
|
+
}, o = Ue(e.columnSizing, t), a = Ue(e.columnVisibility, t), i = mt(e.columnOrder, t), l = e.sorting?.map((c) => ({
|
|
2245
2245
|
...c,
|
|
2246
2246
|
id: ge(c.id, t)
|
|
2247
2247
|
}));
|
|
@@ -2352,7 +2352,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2352
2352
|
},
|
|
2353
2353
|
[a, i, l]
|
|
2354
2354
|
);
|
|
2355
|
-
}, le = "next-page", be = "_ungrouped", At = "__",
|
|
2355
|
+
}, le = "next-page", be = "_ungrouped", At = "__", Je = (e) => e ? Array.isArray(e) ? [...new Set(e.map((t) => t.toString()))] : [e.toString()] : [], jo = (e, t, n, o, a) => {
|
|
2356
2356
|
const i = o?.get(t), l = n?.find((g) => g.value === t), c = l ? {
|
|
2357
2357
|
value: l.value,
|
|
2358
2358
|
label: l.label || l.value,
|
|
@@ -2362,7 +2362,7 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2362
2362
|
img: e === "assignees" ? `/api/users/${l.value}/avatar` : void 0
|
|
2363
2363
|
} : { value: t, label: t };
|
|
2364
2364
|
return i ? (c.count = i.count, c.percentage = i.percentage) : o && a && (c.count = 0, c.percentage = void 0), c;
|
|
2365
|
-
},
|
|
2365
|
+
}, nt = "_GROUP_", Jt = (e) => `${nt}${e}`, Yo = (e) => e.startsWith(nt) ? e.slice(nt.length) : null, Ks = (e) => e.startsWith(nt), qo = (e, t, n = []) => {
|
|
2366
2366
|
const o = e.id.replace("attrib.", "");
|
|
2367
2367
|
return o === "status" ? t?.statuses?.map((a) => a.name) || [] : o === "taskType" ? t?.taskTypes?.map((a) => a.name) || [] : o === "folderType" ? t?.folderTypes?.map((a) => a.name) || [] : e.id.startsWith("attrib.") ? n.find((a) => a.name === o)?.data.enum?.map((a) => a.value.toString()) || [] : [];
|
|
2368
2368
|
}, Qo = (e, t, n, o, a) => {
|
|
@@ -2387,11 +2387,11 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2387
2387
|
groupCountsComplete: c
|
|
2388
2388
|
}) => {
|
|
2389
2389
|
const g = Be(), d = Go({ projectInfo: g }), f = Y(
|
|
2390
|
-
(
|
|
2391
|
-
const S = i ? i(
|
|
2392
|
-
return t === "task" && (S.primary.links = Fi(
|
|
2390
|
+
(u, m) => {
|
|
2391
|
+
const S = i ? i(u) : Qo(u, m, t, e, d);
|
|
2392
|
+
return t === "task" && (S.primary.links = Fi(u.links, "task", g.anatomy)), {
|
|
2393
2393
|
...S,
|
|
2394
|
-
id:
|
|
2394
|
+
id: u.id + At + m,
|
|
2395
2395
|
// unique id for the task in the group
|
|
2396
2396
|
subRows: S.subRows || []
|
|
2397
2397
|
};
|
|
@@ -2399,22 +2399,22 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2399
2399
|
[i, d, t, e, g]
|
|
2400
2400
|
);
|
|
2401
2401
|
return Y(
|
|
2402
|
-
(
|
|
2402
|
+
(u) => {
|
|
2403
2403
|
const m = /* @__PURE__ */ new Map();
|
|
2404
|
-
for (const
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
|
|
2404
|
+
for (const I of n) {
|
|
2405
|
+
const E = I.value?.toString(), T = Jt(E), z = jo(
|
|
2406
|
+
u.id,
|
|
2407
|
+
E,
|
|
2408
2408
|
n,
|
|
2409
2409
|
l,
|
|
2410
2410
|
c
|
|
2411
2411
|
);
|
|
2412
|
-
m.set(
|
|
2412
|
+
m.set(E, {
|
|
2413
2413
|
id: T,
|
|
2414
2414
|
primary: {
|
|
2415
2415
|
id: T,
|
|
2416
2416
|
entityType: "folder",
|
|
2417
|
-
name:
|
|
2417
|
+
name: E,
|
|
2418
2418
|
label: z.label,
|
|
2419
2419
|
subType: ""
|
|
2420
2420
|
},
|
|
@@ -2422,10 +2422,10 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2422
2422
|
group: z
|
|
2423
2423
|
});
|
|
2424
2424
|
}
|
|
2425
|
-
const S = Jt(be),
|
|
2426
|
-
let
|
|
2427
|
-
if (!
|
|
2428
|
-
const
|
|
2425
|
+
const S = Jt(be), p = () => {
|
|
2426
|
+
let I = m.get(be);
|
|
2427
|
+
if (!I) {
|
|
2428
|
+
const E = l?.get(be), T = {
|
|
2429
2429
|
id: S,
|
|
2430
2430
|
primary: {
|
|
2431
2431
|
id: S,
|
|
@@ -2438,33 +2438,36 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2438
2438
|
group: {
|
|
2439
2439
|
value: be,
|
|
2440
2440
|
label: "Ungrouped",
|
|
2441
|
-
count:
|
|
2442
|
-
percentage:
|
|
2441
|
+
count: E?.count,
|
|
2442
|
+
percentage: E?.percentage
|
|
2443
2443
|
}
|
|
2444
2444
|
};
|
|
2445
|
-
m.set(be, T),
|
|
2445
|
+
m.set(be, T), I = T;
|
|
2446
2446
|
}
|
|
2447
|
-
return
|
|
2447
|
+
return I;
|
|
2448
2448
|
};
|
|
2449
|
-
(
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2449
|
+
(u.id === "tags" || u.id === "assignees" || // folder groups come from the cached folder list, which can miss a folder's first version
|
|
2450
|
+
u.id === "folderId" || u.id.startsWith("attrib.")) && p();
|
|
2451
|
+
for (const [, I] of e) {
|
|
2452
|
+
if (I.entityType !== t) continue;
|
|
2453
|
+
let E = [];
|
|
2454
|
+
if (u.id.startsWith("attrib.")) {
|
|
2455
|
+
const T = u.id.split(".")[1];
|
|
2456
|
+
E = Je(I.attrib?.[T]);
|
|
2457
|
+
} else u.id === "folderType" && "folder" in I ? E = Je(
|
|
2458
|
+
I.folder?.folderType
|
|
2459
|
+
) : u.id === "folderId" && "product" in I ? E = Je(
|
|
2460
|
+
I.product?.folder?.id
|
|
2461
|
+
) : E = Je(I[u.id]);
|
|
2462
|
+
E.length === 0 && p().subRows?.push(f(I, be));
|
|
2463
|
+
for (const T of E) {
|
|
2461
2464
|
const z = m.get(T);
|
|
2462
|
-
z ? z.subRows?.push(f(
|
|
2463
|
-
f(
|
|
2465
|
+
z ? z.subRows?.push(f(I, T)) : p().subRows?.push(
|
|
2466
|
+
f(I, be)
|
|
2464
2467
|
);
|
|
2465
2468
|
}
|
|
2466
|
-
if ("groups" in
|
|
2467
|
-
for (const T of
|
|
2469
|
+
if ("groups" in I && Array.isArray(I.groups)) {
|
|
2470
|
+
for (const T of I.groups)
|
|
2468
2471
|
if (T.hasNextPage && m.has(T.value)) {
|
|
2469
2472
|
const H = m.get(T.value);
|
|
2470
2473
|
H && H.subRows?.push({
|
|
@@ -2482,18 +2485,18 @@ const jt = new ko(), dt = "projectTreeTextPreviewOpen", To = (e) => {
|
|
|
2482
2485
|
}
|
|
2483
2486
|
}
|
|
2484
2487
|
}
|
|
2485
|
-
const y = Array.from(m.values()), w = qo(
|
|
2486
|
-
y.sort((
|
|
2487
|
-
if (
|
|
2488
|
-
if (
|
|
2488
|
+
const y = Array.from(m.values()), w = qo(u, g, o), R = u.desc ? -1 : 1;
|
|
2489
|
+
y.sort((I, E) => {
|
|
2490
|
+
if (I.group?.value === be) return 1;
|
|
2491
|
+
if (E.group?.value === be) return -1;
|
|
2489
2492
|
if (w.length) {
|
|
2490
|
-
const T = w.indexOf(
|
|
2491
|
-
return T !== -1 && z !== -1 ? (T - z) * R : T !== -1 ? -1 : z !== -1 ? 1 : (
|
|
2493
|
+
const T = w.indexOf(I.group?.value || ""), z = w.indexOf(E.group?.value || "");
|
|
2494
|
+
return T !== -1 && z !== -1 ? (T - z) * R : T !== -1 ? -1 : z !== -1 ? 1 : (I.group?.label?.localeCompare(E.group?.label || "") || 0) * R;
|
|
2492
2495
|
} else
|
|
2493
|
-
return (
|
|
2496
|
+
return (I.group?.label?.localeCompare(E.group?.label || "") || 0) * R;
|
|
2494
2497
|
});
|
|
2495
2498
|
const _ = y.filter(
|
|
2496
|
-
(
|
|
2499
|
+
(I) => I.group?.count === void 0 || I.group.count > 0 || (I.subRows?.length ?? 0) > 0 || I.group?.value === be
|
|
2497
2500
|
);
|
|
2498
2501
|
return a ? y : _;
|
|
2499
2502
|
},
|
|
@@ -3322,17 +3325,17 @@ const yl = x.div`
|
|
|
3322
3325
|
folder_entity: Te("folder"),
|
|
3323
3326
|
task_entity: Te("task"),
|
|
3324
3327
|
version_entity: Te("version"),
|
|
3325
|
-
createdAt:
|
|
3328
|
+
createdAt: Xe("createdAt", "datetime"),
|
|
3326
3329
|
createdBy: "person",
|
|
3327
|
-
updatedAt:
|
|
3330
|
+
updatedAt: Xe("updatedAt", "datetime"),
|
|
3328
3331
|
updatedBy: "person",
|
|
3329
3332
|
subtasks: "checklist",
|
|
3330
|
-
comments:
|
|
3333
|
+
comments: Xe("comment"),
|
|
3331
3334
|
[$e]: Me[$e].icon,
|
|
3332
3335
|
[_e]: Me[_e].icon
|
|
3333
3336
|
}, vl = (e) => {
|
|
3334
3337
|
const t = ge(e);
|
|
3335
|
-
return vi[t] ??
|
|
3338
|
+
return vi[t] ?? Xe(t);
|
|
3336
3339
|
}, Pe = {
|
|
3337
3340
|
thumbnail: { enabled: !1, label: J.thumbnail },
|
|
3338
3341
|
name: { sortKey: "name", enabled: !0, label: "Name" },
|
|
@@ -3462,13 +3465,13 @@ const yl = x.div`
|
|
|
3462
3465
|
}, en = (e, t, n) => {
|
|
3463
3466
|
const o = e.getValue(n), a = t.getValue(n), i = Array.isArray(o) ? o.length : o ? String(o).length : 0, l = Array.isArray(a) ? a.length : a ? String(a).length : 0;
|
|
3464
3467
|
return i - l;
|
|
3465
|
-
},
|
|
3468
|
+
}, et = (e, t, n, o) => {
|
|
3466
3469
|
const a = e.getValue(n), i = t.getValue(n);
|
|
3467
3470
|
if (o?.enum?.length) {
|
|
3468
3471
|
const l = o.enum.findIndex((g) => g.value === a), c = o.enum.findIndex((g) => g.value === i);
|
|
3469
3472
|
return l - c;
|
|
3470
3473
|
} else return o?.type === "datetime" ? Ne.datetime(e, t, n) : o?.type === "boolean" ? (a === !0 ? 1 : 0) - (i === !0 ? 1 : 0) : Ne.alphanumeric(e, t, n);
|
|
3471
|
-
}, Ci = (e) => e.data.type === "list_of_strings", Si = (e, t) => `${e.linkType.charAt(0).toUpperCase() + e.linkType.slice(1)} (${t})`,
|
|
3474
|
+
}, Ci = (e) => e.data.type === "list_of_strings", Si = (e, t) => `${e.linkType.charAt(0).toUpperCase() + e.linkType.slice(1)} (${t})`, rt = (e, t) => `${e.name.replaceAll("_", "").replaceAll("-", "").replaceAll("|", "_")}_${t}`, Ii = (e, t) => `link_${rt(e, t)}`, Mn = (e, t) => e === "primary" ? t : `${He(e)} ${t}`, Ei = (e, t, n) => {
|
|
3472
3475
|
const o = qe(n, t), a = typeof e.header == "string" ? Mn(n, e.header) : e.header;
|
|
3473
3476
|
return {
|
|
3474
3477
|
...e,
|
|
@@ -3502,7 +3505,7 @@ const yl = x.div`
|
|
|
3502
3505
|
const d = a(l.original);
|
|
3503
3506
|
if (!d || l.original.group || l.original.metaType) return null;
|
|
3504
3507
|
if (!Dt(n, d.entityType)) return /* @__PURE__ */ s("div", { className: "readonly" });
|
|
3505
|
-
const f = i(l.original),
|
|
3508
|
+
const f = i(l.original), u = g.options.meta, m = e.updateField || n, S = e.readOnly === !0 || u?.readOnly?.includes(c.id) || e.readOnly !== !1 && u?.readOnly?.includes(m);
|
|
3506
3509
|
return /* @__PURE__ */ s(
|
|
3507
3510
|
ne,
|
|
3508
3511
|
{
|
|
@@ -3511,15 +3514,15 @@ const yl = x.div`
|
|
|
3511
3514
|
columnId: c.id,
|
|
3512
3515
|
value: f,
|
|
3513
3516
|
attributeData: { type: e.dataType || "string" },
|
|
3514
|
-
options: e.optionKey ?
|
|
3517
|
+
options: e.optionKey ? u?.options?.[e.optionKey] : void 0,
|
|
3515
3518
|
isCollapsed: !!l.original.childOnlyMatch,
|
|
3516
3519
|
isReadOnly: S,
|
|
3517
|
-
onChange: (
|
|
3520
|
+
onChange: (p) => !S && u?.updateEntities?.({
|
|
3518
3521
|
id: d.id,
|
|
3519
3522
|
rowId: l.id,
|
|
3520
3523
|
type: d.entityType,
|
|
3521
3524
|
field: m,
|
|
3522
|
-
value:
|
|
3525
|
+
value: p,
|
|
3523
3526
|
entityData: d
|
|
3524
3527
|
})
|
|
3525
3528
|
}
|
|
@@ -3538,7 +3541,7 @@ const yl = x.div`
|
|
|
3538
3541
|
enablePinning: !0,
|
|
3539
3542
|
enableHiding: !0,
|
|
3540
3543
|
sortingFn: ie(
|
|
3541
|
-
me((o, a, i) =>
|
|
3544
|
+
me((o, a, i) => et(o, a, i, e.data))
|
|
3542
3545
|
),
|
|
3543
3546
|
cell: ({ row: o, column: a, table: i }) => {
|
|
3544
3547
|
const l = De(o.original, t);
|
|
@@ -3558,12 +3561,12 @@ const yl = x.div`
|
|
|
3558
3561
|
options: e.data.enum || [],
|
|
3559
3562
|
isInherited: d,
|
|
3560
3563
|
isReadOnly: f,
|
|
3561
|
-
onChange: (
|
|
3564
|
+
onChange: (u) => !f && c?.updateEntities?.({
|
|
3562
3565
|
id: l.id,
|
|
3563
3566
|
rowId: o.id,
|
|
3564
3567
|
type: l.entityType,
|
|
3565
3568
|
field: e.name,
|
|
3566
|
-
value:
|
|
3569
|
+
value: u,
|
|
3567
3570
|
entityData: l,
|
|
3568
3571
|
isAttrib: !0
|
|
3569
3572
|
})
|
|
@@ -3607,12 +3610,12 @@ const yl = x.div`
|
|
|
3607
3610
|
excludedSorting: g,
|
|
3608
3611
|
extraColumns: d,
|
|
3609
3612
|
groupBy: f,
|
|
3610
|
-
nameLabel:
|
|
3613
|
+
nameLabel: u = "Entity",
|
|
3611
3614
|
includeParents: m = [],
|
|
3612
3615
|
parentColumns: S = []
|
|
3613
3616
|
}) => {
|
|
3614
|
-
const
|
|
3615
|
-
b(Bt) &&
|
|
3617
|
+
const p = [], b = (r) => !c?.some((h) => ge(h) === ge(r)), y = (r) => xi(r) && !g?.some((h) => ge(h) === ge(r));
|
|
3618
|
+
b(Bt) && p.push({
|
|
3616
3619
|
id: Bt,
|
|
3617
3620
|
enableResizing: !1,
|
|
3618
3621
|
enableSorting: !1,
|
|
@@ -3621,10 +3624,10 @@ const yl = x.div`
|
|
|
3621
3624
|
header: () => /* @__PURE__ */ s(pi, {}),
|
|
3622
3625
|
cell: ({ row: r }) => r.original.group || r.original.metaType ? null : /* @__PURE__ */ s(ci, {}),
|
|
3623
3626
|
size: 20
|
|
3624
|
-
}), b("thumbnail") &&
|
|
3627
|
+
}), b("thumbnail") && p.push(tn("primary")), b("name") && p.push({
|
|
3625
3628
|
id: "name",
|
|
3626
3629
|
accessorFn: (r) => se(r, "primary", "name"),
|
|
3627
|
-
header:
|
|
3630
|
+
header: u,
|
|
3628
3631
|
minSize: X,
|
|
3629
3632
|
sortingFn: ie(ze),
|
|
3630
3633
|
enableSorting: f && f.id !== "folder" ? !1 : y("name"),
|
|
@@ -3733,14 +3736,14 @@ const yl = x.div`
|
|
|
3733
3736
|
}
|
|
3734
3737
|
);
|
|
3735
3738
|
}
|
|
3736
|
-
}), b("status") &&
|
|
3739
|
+
}), b("status") && p.push({
|
|
3737
3740
|
id: "status",
|
|
3738
3741
|
accessorFn: (r) => se(r, "primary", "status"),
|
|
3739
3742
|
minSize: X,
|
|
3740
3743
|
header: oe("status"),
|
|
3741
3744
|
sortingFn: ie(
|
|
3742
3745
|
me(
|
|
3743
|
-
(r, h, v) =>
|
|
3746
|
+
(r, h, v) => et(r, h, v, { enum: l.status, type: "string" })
|
|
3744
3747
|
)
|
|
3745
3748
|
),
|
|
3746
3749
|
sortDescFirst: Pe.status.sortDescFirst,
|
|
@@ -3783,7 +3786,7 @@ const yl = x.div`
|
|
|
3783
3786
|
}
|
|
3784
3787
|
);
|
|
3785
3788
|
}
|
|
3786
|
-
}), b("entityType") &&
|
|
3789
|
+
}), b("entityType") && p.push({
|
|
3787
3790
|
id: "entityType",
|
|
3788
3791
|
accessorFn: (r) => r.group ? void 0 : r.primary.entityType,
|
|
3789
3792
|
header: oe("entityType"),
|
|
@@ -3811,7 +3814,7 @@ const yl = x.div`
|
|
|
3811
3814
|
}
|
|
3812
3815
|
);
|
|
3813
3816
|
}
|
|
3814
|
-
}), b("subType") &&
|
|
3817
|
+
}), b("subType") && p.push({
|
|
3815
3818
|
id: "subType",
|
|
3816
3819
|
accessorFn: ki,
|
|
3817
3820
|
header: oe("subType", e),
|
|
@@ -3823,7 +3826,7 @@ const yl = x.div`
|
|
|
3823
3826
|
sortDescFirst: Pe.taskType.sortDescFirst,
|
|
3824
3827
|
sortingFn: ie(
|
|
3825
3828
|
me(
|
|
3826
|
-
(r, h, v) =>
|
|
3829
|
+
(r, h, v) => et(r, h, v, {
|
|
3827
3830
|
enum: [...l.folderType, ...l.taskType],
|
|
3828
3831
|
type: "string"
|
|
3829
3832
|
})
|
|
@@ -3861,7 +3864,7 @@ const yl = x.div`
|
|
|
3861
3864
|
}
|
|
3862
3865
|
);
|
|
3863
3866
|
}
|
|
3864
|
-
}), b("assignees") &&
|
|
3867
|
+
}), b("assignees") && p.push({
|
|
3865
3868
|
id: "assignees",
|
|
3866
3869
|
accessorFn: (r) => se(r, "primary", "assignees"),
|
|
3867
3870
|
header: oe("assignees"),
|
|
@@ -3909,7 +3912,7 @@ const yl = x.div`
|
|
|
3909
3912
|
}
|
|
3910
3913
|
);
|
|
3911
3914
|
}
|
|
3912
|
-
}), b(de.folder) &&
|
|
3915
|
+
}), b(de.folder) && p.push({
|
|
3913
3916
|
id: de.folder,
|
|
3914
3917
|
accessorFn: (r) => Uo(r),
|
|
3915
3918
|
header: oe(de.folder),
|
|
@@ -3936,7 +3939,7 @@ const yl = x.div`
|
|
|
3936
3939
|
}
|
|
3937
3940
|
) : null;
|
|
3938
3941
|
}
|
|
3939
|
-
}), b(de.task) && ["version", "product"].some((r) => e.includes(r)) &&
|
|
3942
|
+
}), b(de.task) && ["version", "product"].some((r) => e.includes(r)) && p.push({
|
|
3940
3943
|
id: de.task,
|
|
3941
3944
|
accessorFn: (r) => r.parents?.task?.label || r.parents?.task?.name,
|
|
3942
3945
|
header: oe(de.task),
|
|
@@ -3962,7 +3965,7 @@ const yl = x.div`
|
|
|
3962
3965
|
}
|
|
3963
3966
|
);
|
|
3964
3967
|
}
|
|
3965
|
-
}), b("author") && ["version", "product"].some((r) => e.includes(r)) &&
|
|
3968
|
+
}), b("author") && ["version", "product"].some((r) => e.includes(r)) && p.push({
|
|
3966
3969
|
id: "author",
|
|
3967
3970
|
accessorFn: (r) => ve(r)?.author,
|
|
3968
3971
|
header: oe("author"),
|
|
@@ -3989,7 +3992,7 @@ const yl = x.div`
|
|
|
3989
3992
|
}
|
|
3990
3993
|
);
|
|
3991
3994
|
}
|
|
3992
|
-
}), b(de.version) && ["version", "product"].some((r) => e.includes(r)) &&
|
|
3995
|
+
}), b(de.version) && ["version", "product"].some((r) => e.includes(r)) && p.push({
|
|
3993
3996
|
id: de.version,
|
|
3994
3997
|
accessorFn: (r) => ve(r)?.versionName || ve(r)?.name,
|
|
3995
3998
|
header: oe(de.version),
|
|
@@ -4017,7 +4020,7 @@ const yl = x.div`
|
|
|
4017
4020
|
}
|
|
4018
4021
|
);
|
|
4019
4022
|
}
|
|
4020
|
-
}), b("version") && ["version", "product"].some((r) => e.includes(r)) &&
|
|
4023
|
+
}), b("version") && ["version", "product"].some((r) => e.includes(r)) && p.push({
|
|
4021
4024
|
id: "version",
|
|
4022
4025
|
accessorFn: (r) => ve(r)?.version,
|
|
4023
4026
|
header: oe("version"),
|
|
@@ -4043,7 +4046,7 @@ const yl = x.div`
|
|
|
4043
4046
|
}
|
|
4044
4047
|
);
|
|
4045
4048
|
}
|
|
4046
|
-
}), b("product") && ["version", "product"].some((r) => e.includes(r)) &&
|
|
4049
|
+
}), b("product") && ["version", "product"].some((r) => e.includes(r)) && p.push({
|
|
4047
4050
|
id: "product",
|
|
4048
4051
|
accessorFn: (r) => je(r)?.label || je(r)?.name,
|
|
4049
4052
|
header: oe("product"),
|
|
@@ -4068,7 +4071,7 @@ const yl = x.div`
|
|
|
4068
4071
|
}
|
|
4069
4072
|
);
|
|
4070
4073
|
}
|
|
4071
|
-
}), b("tags") &&
|
|
4074
|
+
}), b("tags") && p.push({
|
|
4072
4075
|
id: "tags",
|
|
4073
4076
|
accessorFn: (r) => se(r, "primary", "tags"),
|
|
4074
4077
|
header: oe("tags"),
|
|
@@ -4099,7 +4102,7 @@ const yl = x.div`
|
|
|
4099
4102
|
}
|
|
4100
4103
|
);
|
|
4101
4104
|
}
|
|
4102
|
-
}), b("createdAt") &&
|
|
4105
|
+
}), b("createdAt") && p.push({
|
|
4103
4106
|
id: "createdAt",
|
|
4104
4107
|
accessorFn: (r) => se(r, "primary", "createdAt"),
|
|
4105
4108
|
header: oe("createdAt"),
|
|
@@ -4125,7 +4128,7 @@ const yl = x.div`
|
|
|
4125
4128
|
}
|
|
4126
4129
|
);
|
|
4127
4130
|
}
|
|
4128
|
-
}), b("updatedAt") &&
|
|
4131
|
+
}), b("updatedAt") && p.push({
|
|
4129
4132
|
id: "updatedAt",
|
|
4130
4133
|
accessorFn: (r) => se(r, "primary", "updatedAt"),
|
|
4131
4134
|
header: oe("updatedAt"),
|
|
@@ -4153,7 +4156,7 @@ const yl = x.div`
|
|
|
4153
4156
|
}
|
|
4154
4157
|
});
|
|
4155
4158
|
for (const r of ["createdBy", "updatedBy"])
|
|
4156
|
-
b(r) &&
|
|
4159
|
+
b(r) && p.push({
|
|
4157
4160
|
id: r,
|
|
4158
4161
|
accessorFn: (h) => se(h, "primary", r),
|
|
4159
4162
|
header: oe(r),
|
|
@@ -4189,7 +4192,7 @@ const yl = x.div`
|
|
|
4189
4192
|
);
|
|
4190
4193
|
}
|
|
4191
4194
|
});
|
|
4192
|
-
b("subtasks") && e.includes("task") &&
|
|
4195
|
+
b("subtasks") && e.includes("task") && p.push({
|
|
4193
4196
|
id: "subtasks",
|
|
4194
4197
|
accessorFn: (r) => r.primary.entityType === "task" ? r.primary.subtasks : void 0,
|
|
4195
4198
|
header: oe("subtasks"),
|
|
@@ -4221,7 +4224,7 @@ const yl = x.div`
|
|
|
4221
4224
|
}
|
|
4222
4225
|
);
|
|
4223
4226
|
}
|
|
4224
|
-
}), b("comments") && e.some((r) => ["task", "version", "product", "folder"].includes(r)) &&
|
|
4227
|
+
}), b("comments") && e.some((r) => ["task", "version", "product", "folder"].includes(r)) && p.push({
|
|
4225
4228
|
id: "comments",
|
|
4226
4229
|
accessorFn: (r) => r.group ? void 0 : r.primary.entityType === "product" ? r.parents?.version?.latestComments || [] : r.primary.latestComments || [],
|
|
4227
4230
|
header: oe("comments"),
|
|
@@ -4249,7 +4252,7 @@ const yl = x.div`
|
|
|
4249
4252
|
}
|
|
4250
4253
|
});
|
|
4251
4254
|
for (const r of Bo)
|
|
4252
|
-
!b(r) || !e.some((h) =>
|
|
4255
|
+
!b(r) || !e.some((h) => pt(r, h)) || p.push({
|
|
4253
4256
|
id: r,
|
|
4254
4257
|
header: oe(r),
|
|
4255
4258
|
minSize: X,
|
|
@@ -4260,9 +4263,9 @@ const yl = x.div`
|
|
|
4260
4263
|
cell: ({ row: h, column: v }) => {
|
|
4261
4264
|
const { group: N, metaType: C, isLoading: L, primary: D } = h.original;
|
|
4262
4265
|
if (N || C) return null;
|
|
4263
|
-
if (!L && !
|
|
4266
|
+
if (!L && !pt(v.id, D.entityType))
|
|
4264
4267
|
return /* @__PURE__ */ s("div", { className: "readonly" });
|
|
4265
|
-
const k = !L &&
|
|
4268
|
+
const k = !L && pt(v.id, D.entityType) ? { entityId: D.id, entityType: D.entityType, columnId: v.id } : void 0;
|
|
4266
4269
|
return /* @__PURE__ */ s(
|
|
4267
4270
|
ne,
|
|
4268
4271
|
{
|
|
@@ -4288,7 +4291,7 @@ const yl = x.div`
|
|
|
4288
4291
|
minSize: X,
|
|
4289
4292
|
filterFn: "fuzzy",
|
|
4290
4293
|
sortingFn: ie(
|
|
4291
|
-
me((v, N, C) =>
|
|
4294
|
+
me((v, N, C) => et(v, N, C, r.data))
|
|
4292
4295
|
),
|
|
4293
4296
|
enableSorting: !Ci(r) && y(r.name) && y("attrib"),
|
|
4294
4297
|
enableResizing: !0,
|
|
@@ -4350,7 +4353,7 @@ const yl = x.div`
|
|
|
4350
4353
|
const N = Ii(h, v);
|
|
4351
4354
|
return {
|
|
4352
4355
|
id: r === "primary" ? N : qe(r, N),
|
|
4353
|
-
accessorFn: (L) => L.group ? void 0 : De(L, r)?.links?.[
|
|
4356
|
+
accessorFn: (L) => L.group ? void 0 : De(L, r)?.links?.[rt(h, v)],
|
|
4354
4357
|
header: () => /* @__PURE__ */ M(si, { children: [
|
|
4355
4358
|
r === "primary" ? "" : `${He(r)} `,
|
|
4356
4359
|
Si(h, v),
|
|
@@ -4398,7 +4401,7 @@ const yl = x.div`
|
|
|
4398
4401
|
}
|
|
4399
4402
|
};
|
|
4400
4403
|
})
|
|
4401
|
-
), _ = o ? R("primary") : [],
|
|
4404
|
+
), _ = o ? R("primary") : [], I = /* @__PURE__ */ new Set([
|
|
4402
4405
|
"status",
|
|
4403
4406
|
"assignees",
|
|
4404
4407
|
"author",
|
|
@@ -4408,11 +4411,11 @@ const yl = x.div`
|
|
|
4408
4411
|
"createdBy",
|
|
4409
4412
|
"updatedAt",
|
|
4410
4413
|
"updatedBy"
|
|
4411
|
-
]),
|
|
4414
|
+
]), E = new Set(
|
|
4412
4415
|
S.map((r) => `${r.scope}:${r.field}`)
|
|
4413
4416
|
), T = m.flatMap(
|
|
4414
|
-
(r) =>
|
|
4415
|
-
(h) =>
|
|
4417
|
+
(r) => p.filter(
|
|
4418
|
+
(h) => I.has(h.id) && !E.has(`${r}:${h.id}`)
|
|
4416
4419
|
).map((h) => Ei(h, h.id, r))
|
|
4417
4420
|
), z = S.filter((r) => m.includes(r.scope)).map(Ri), H = b("thumbnail") ? m.map((r) => tn(r)) : [], B = o ? m.flatMap((r) => R(r)) : [], A = new Set(
|
|
4418
4421
|
m.filter((r) => {
|
|
@@ -4422,7 +4425,7 @@ const yl = x.div`
|
|
|
4422
4425
|
), P = m.filter((r) => A.has(r)).flatMap(
|
|
4423
4426
|
(r) => t.flatMap((h) => h.scope && !h.scope.includes(r) ? [] : [Li(h, r)])
|
|
4424
4427
|
), U = [
|
|
4425
|
-
...
|
|
4428
|
+
...p,
|
|
4426
4429
|
...H,
|
|
4427
4430
|
...T,
|
|
4428
4431
|
...z,
|
|
@@ -4442,29 +4445,29 @@ const yl = x.div`
|
|
|
4442
4445
|
id: e.original.id,
|
|
4443
4446
|
type: "group"
|
|
4444
4447
|
};
|
|
4445
|
-
const { scope: o, field: a, isAttrib: i } = Ce(t), c = De(e.original, o) || e.original.primary, g = ve(e.original), d = je(e.original), f = e.original.primary.entityType === "product",
|
|
4446
|
-
let
|
|
4447
|
-
|
|
4448
|
+
const { scope: o, field: a, isAttrib: i } = Ce(t), c = De(e.original, o) || e.original.primary, g = ve(e.original), d = je(e.original), f = e.original.primary.entityType === "product", u = o === "primary" && !i && ["author", "version", "versionName"].includes(a), m = o === "primary" && !i && a === "product", S = o === "primary" && !i && a === "subType" && e.original.primary.entityType === "version";
|
|
4449
|
+
let p = c;
|
|
4450
|
+
u && g ? p = g : S && d || m && d ? p = d : n === "latestComments" && f && g && (p = g);
|
|
4448
4451
|
let b;
|
|
4449
4452
|
if (n === "attrib")
|
|
4450
4453
|
b = se(e.original, o, a, !0);
|
|
4451
4454
|
else if (n === "links")
|
|
4452
|
-
b =
|
|
4455
|
+
b = p.links?.[a.replace(/^link_/, "")];
|
|
4453
4456
|
else if (n === "subtasks")
|
|
4454
|
-
b =
|
|
4457
|
+
b = p.entityType === "task" ? p.subtasks : void 0;
|
|
4455
4458
|
else if (n === "latestComments")
|
|
4456
4459
|
b = f ? g?.latestComments || e.original.primary.latestComments : c.latestComments;
|
|
4457
4460
|
else if (t === "folder")
|
|
4458
4461
|
b = e.original.parents?.folder?.label || e.original.parents?.folder?.name;
|
|
4459
4462
|
else if (t === "product")
|
|
4460
4463
|
b = d?.label || d?.name;
|
|
4461
|
-
else if (
|
|
4464
|
+
else if (p === c)
|
|
4462
4465
|
b = se(e.original, o, a, i);
|
|
4463
4466
|
else {
|
|
4464
|
-
const y =
|
|
4467
|
+
const y = p.entityType === "version" ? "version" : "product";
|
|
4465
4468
|
b = se(e.original, y, a, i);
|
|
4466
4469
|
}
|
|
4467
|
-
return { value: b, id: e.id, type:
|
|
4470
|
+
return { value: b, id: e.id, type: p.entityType };
|
|
4468
4471
|
}, Ni = 200, Di = (e) => er.includes(e), Cl = ({
|
|
4469
4472
|
projectName: e,
|
|
4470
4473
|
entities: t,
|
|
@@ -4475,18 +4478,18 @@ const yl = x.div`
|
|
|
4475
4478
|
const c = ee(() => {
|
|
4476
4479
|
const d = { folder: [], task: [], version: [] };
|
|
4477
4480
|
for (const f of a ? a.split(",") : []) {
|
|
4478
|
-
const [
|
|
4479
|
-
d[
|
|
4481
|
+
const [u, m] = f.split(":");
|
|
4482
|
+
d[u].push(m);
|
|
4480
4483
|
}
|
|
4481
4484
|
return d;
|
|
4482
4485
|
}, [a]), g = (d) => !n || !e || !c[d].length;
|
|
4483
|
-
|
|
4486
|
+
st(
|
|
4484
4487
|
{ projectName: e, entityType: "folder", entityIds: c.folder },
|
|
4485
4488
|
{ skip: g("folder") }
|
|
4486
|
-
),
|
|
4489
|
+
), st(
|
|
4487
4490
|
{ projectName: e, entityType: "task", entityIds: c.task },
|
|
4488
4491
|
{ skip: g("task") }
|
|
4489
|
-
),
|
|
4492
|
+
), st(
|
|
4490
4493
|
{ projectName: e, entityType: "version", entityIds: c.version },
|
|
4491
4494
|
{ skip: g("version") }
|
|
4492
4495
|
);
|
|
@@ -4559,7 +4562,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4559
4562
|
}, Ll = (e, t) => t.get(Xo(e)), Fi = (e, t, n) => e?.reduce((o, a) => {
|
|
4560
4563
|
const { linkType: i, direction: l, entityType: c, id: g, node: d, isRestricted: f } = a;
|
|
4561
4564
|
if (f || !d) {
|
|
4562
|
-
const
|
|
4565
|
+
const p = {
|
|
4563
4566
|
label: "",
|
|
4564
4567
|
parents: [],
|
|
4565
4568
|
linkId: g,
|
|
@@ -4568,10 +4571,10 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4568
4571
|
icon: yt(c, void 0, n),
|
|
4569
4572
|
color: void 0,
|
|
4570
4573
|
isRestricted: !0
|
|
4571
|
-
}, b = nn(i, t, c, l), y =
|
|
4572
|
-
return o[y] || (o[y] = []), o[y].includes(
|
|
4574
|
+
}, b = nn(i, t, c, l), y = rt({ name: b }, l);
|
|
4575
|
+
return o[y] || (o[y] = []), o[y].includes(p) || o[y].push(p), o;
|
|
4573
4576
|
}
|
|
4574
|
-
const
|
|
4577
|
+
const u = {
|
|
4575
4578
|
label: d.label || d.name,
|
|
4576
4579
|
parents: d.parents,
|
|
4577
4580
|
linkId: g,
|
|
@@ -4579,8 +4582,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4579
4582
|
entityType: c,
|
|
4580
4583
|
icon: yt(c, d.subType, n),
|
|
4581
4584
|
color: pn(c, d.subType, n)
|
|
4582
|
-
}, m = nn(i, t, c, l), S =
|
|
4583
|
-
return o[S] || (o[S] = []), o[S].includes(
|
|
4585
|
+
}, m = nn(i, t, c, l), S = rt({ name: m }, l);
|
|
4586
|
+
return o[S] || (o[S] = []), o[S].includes(u) || o[S].push(u), o;
|
|
4584
4587
|
}, {}) || {}, nn = (e, t, n, o) => `${e}|${o === "in" ? n : t}|${o === "in" ? t : n}`, _t = (e) => ({
|
|
4585
4588
|
id: e.id,
|
|
4586
4589
|
primary: {
|
|
@@ -4681,11 +4684,11 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4681
4684
|
linkType: i
|
|
4682
4685
|
}) => {
|
|
4683
4686
|
const l = Fo()?.history, [c] = nr(), [g] = rr(), d = Y(
|
|
4684
|
-
async (
|
|
4687
|
+
async (u, m = !0) => {
|
|
4685
4688
|
try {
|
|
4686
|
-
if (
|
|
4689
|
+
if (u.some((b) => b.targetEntityId === n))
|
|
4687
4690
|
return we.error("You can't link an entity to itself"), !1;
|
|
4688
|
-
const
|
|
4691
|
+
const p = u.map((b) => ({
|
|
4689
4692
|
targetEntityId: b.targetEntityId,
|
|
4690
4693
|
linkId: b.linkId,
|
|
4691
4694
|
sourceEntityId: n,
|
|
@@ -4695,9 +4698,9 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4695
4698
|
direction: t,
|
|
4696
4699
|
projectName: e
|
|
4697
4700
|
}));
|
|
4698
|
-
return await Vo(
|
|
4701
|
+
return await Vo(p, g), m && l && l.pushHistory([
|
|
4699
4702
|
() => f(
|
|
4700
|
-
|
|
4703
|
+
u.map((b) => ({
|
|
4701
4704
|
id: b.linkId,
|
|
4702
4705
|
target: { entityId: b.targetEntityId, entityType: a }
|
|
4703
4706
|
})),
|
|
@@ -4710,13 +4713,13 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4710
4713
|
},
|
|
4711
4714
|
[g, e, n, o, a, i, t, l]
|
|
4712
4715
|
), f = Y(
|
|
4713
|
-
async (
|
|
4716
|
+
async (u, m = !0) => {
|
|
4714
4717
|
try {
|
|
4715
|
-
if (
|
|
4718
|
+
if (u.some((b) => b.target.entityId === n)) {
|
|
4716
4719
|
we.error("You can't link an entity to itself");
|
|
4717
4720
|
return;
|
|
4718
4721
|
}
|
|
4719
|
-
const
|
|
4722
|
+
const p = u.map((b) => ({
|
|
4720
4723
|
id: b.id,
|
|
4721
4724
|
target: b.target,
|
|
4722
4725
|
source: { entityType: o, entityId: n },
|
|
@@ -4724,8 +4727,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4724
4727
|
direction: t,
|
|
4725
4728
|
projectName: e
|
|
4726
4729
|
}));
|
|
4727
|
-
await Ko(
|
|
4728
|
-
|
|
4730
|
+
await Ko(p, c), m && l && l.pushHistory(
|
|
4731
|
+
u.map(
|
|
4729
4732
|
(b) => () => d([{ targetEntityId: b.target.entityId, linkId: b.id }], !1)
|
|
4730
4733
|
)
|
|
4731
4734
|
);
|
|
@@ -4768,14 +4771,14 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4768
4771
|
if (S !== 0)
|
|
4769
4772
|
switch (m.key) {
|
|
4770
4773
|
case "ArrowDown":
|
|
4771
|
-
m.preventDefault(), g((
|
|
4772
|
-
const b =
|
|
4774
|
+
m.preventDefault(), g((p) => {
|
|
4775
|
+
const b = p < S - 1 ? p + 1 : 0;
|
|
4773
4776
|
return b >= e.length ? 0 : b;
|
|
4774
4777
|
});
|
|
4775
4778
|
break;
|
|
4776
4779
|
case "ArrowUp":
|
|
4777
|
-
m.preventDefault(), g((
|
|
4778
|
-
const b =
|
|
4780
|
+
m.preventDefault(), g((p) => {
|
|
4781
|
+
const b = p > 0 ? p - 1 : S - 1;
|
|
4779
4782
|
return b >= e.length ? e.length - 1 : b;
|
|
4780
4783
|
});
|
|
4781
4784
|
break;
|
|
@@ -4795,7 +4798,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4795
4798
|
document.removeEventListener("keydown", f);
|
|
4796
4799
|
};
|
|
4797
4800
|
}, [o, f]);
|
|
4798
|
-
const
|
|
4801
|
+
const u = Y(
|
|
4799
4802
|
(m) => ({
|
|
4800
4803
|
"data-index": m,
|
|
4801
4804
|
className: c === m ? "selected" : "",
|
|
@@ -4808,13 +4811,13 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4808
4811
|
return {
|
|
4809
4812
|
selectedIndex: c,
|
|
4810
4813
|
containerRef: d,
|
|
4811
|
-
getItemProps:
|
|
4814
|
+
getItemProps: u
|
|
4812
4815
|
};
|
|
4813
4816
|
}, Ui = ({}) => Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ M(Tn, { className: "loading", children: [
|
|
4814
4817
|
/* @__PURE__ */ s("div", { className: "icon", children: "•" }),
|
|
4815
4818
|
/* @__PURE__ */ s("div", { className: "label", children: "Loading..." }),
|
|
4816
4819
|
/* @__PURE__ */ s("div", { className: "type", children: "•" })
|
|
4817
|
-
] }, `loading-${t}`)),
|
|
4820
|
+
] }, `loading-${t}`)), at = ({ entity: e, icon: t, color: n, ...o }) => {
|
|
4818
4821
|
const { anatomy: a } = Be();
|
|
4819
4822
|
return /* @__PURE__ */ s(
|
|
4820
4823
|
re,
|
|
@@ -4836,10 +4839,10 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4836
4839
|
const [i, l] = G(""), [c, g] = G(""), d = Q(null), f = ee(() => un(g, 300), []);
|
|
4837
4840
|
q(() => (f(i), () => f.cancel()), [i, f]);
|
|
4838
4841
|
const {
|
|
4839
|
-
data:
|
|
4842
|
+
data: u,
|
|
4840
4843
|
error: m,
|
|
4841
4844
|
isLoading: S,
|
|
4842
|
-
hasNextPage:
|
|
4845
|
+
hasNextPage: p,
|
|
4843
4846
|
isFetchingNextPage: b,
|
|
4844
4847
|
fetchNextPage: y
|
|
4845
4848
|
} = or(
|
|
@@ -4849,16 +4852,16 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4849
4852
|
search: c
|
|
4850
4853
|
},
|
|
4851
4854
|
{ skip: !c }
|
|
4852
|
-
), w = ee(() =>
|
|
4855
|
+
), w = ee(() => u?.pages.flatMap((T) => T.entities) || [], [u]), R = (T) => {
|
|
4853
4856
|
a?.(T.id), l("");
|
|
4854
4857
|
}, _ = () => {
|
|
4855
4858
|
n?.();
|
|
4856
|
-
}, { containerRef:
|
|
4859
|
+
}, { containerRef: I, getItemProps: E } = Wi({
|
|
4857
4860
|
entities: w,
|
|
4858
4861
|
onSelect: R,
|
|
4859
4862
|
onClose: _,
|
|
4860
4863
|
isActive: !!(i && w.length > 0),
|
|
4861
|
-
hasNextPage:
|
|
4864
|
+
hasNextPage: p,
|
|
4862
4865
|
isFetchingNextPage: b,
|
|
4863
4866
|
fetchNextPage: y
|
|
4864
4867
|
});
|
|
@@ -4867,7 +4870,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4867
4870
|
d.current && d.current.focus();
|
|
4868
4871
|
}, 0);
|
|
4869
4872
|
return () => clearTimeout(T);
|
|
4870
|
-
}, [
|
|
4873
|
+
}, [u, i]), /* @__PURE__ */ M(Ao, { children: [
|
|
4871
4874
|
/* @__PURE__ */ s(xn, { children: "Add new link" }),
|
|
4872
4875
|
/* @__PURE__ */ M(Po, { children: [
|
|
4873
4876
|
/* @__PURE__ */ M(_o, { children: [
|
|
@@ -4894,18 +4897,18 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4894
4897
|
}
|
|
4895
4898
|
)
|
|
4896
4899
|
] }),
|
|
4897
|
-
i &&
|
|
4898
|
-
|
|
4900
|
+
i && u && /* @__PURE__ */ M(zo, { ref: I, children: [
|
|
4901
|
+
u?.pages.map(
|
|
4899
4902
|
(T, z) => T.entities.map((H, B) => {
|
|
4900
|
-
const A =
|
|
4903
|
+
const A = u.pages.slice(0, z).reduce((P, U) => P + U.entities.length, 0) + B;
|
|
4901
4904
|
return /* @__PURE__ */ M(
|
|
4902
4905
|
Tn,
|
|
4903
4906
|
{
|
|
4904
4907
|
onClick: () => R(H),
|
|
4905
4908
|
tabIndex: 0,
|
|
4906
|
-
...
|
|
4909
|
+
...E(A),
|
|
4907
4910
|
children: [
|
|
4908
|
-
/* @__PURE__ */ s(
|
|
4911
|
+
/* @__PURE__ */ s(at, { entity: H }),
|
|
4909
4912
|
/* @__PURE__ */ M("span", { className: "label", children: [
|
|
4910
4913
|
H.parents?.map((P, U) => /* @__PURE__ */ M(wt, { children: [
|
|
4911
4914
|
/* @__PURE__ */ s("span", { children: P }, U + "-path"),
|
|
@@ -4920,7 +4923,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4920
4923
|
);
|
|
4921
4924
|
})
|
|
4922
4925
|
),
|
|
4923
|
-
(S || b ||
|
|
4926
|
+
(S || b || p) && /* @__PURE__ */ s(Ui, {})
|
|
4924
4927
|
] }),
|
|
4925
4928
|
!S && m && /* @__PURE__ */ s(Oo, { children: m.message })
|
|
4926
4929
|
] });
|
|
@@ -4934,15 +4937,15 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4934
4937
|
isManager: l = !1,
|
|
4935
4938
|
readOnly: c = !1
|
|
4936
4939
|
}) => {
|
|
4937
|
-
const [g, d] = G(!1), [f,
|
|
4938
|
-
R.stopPropagation(), !(e.isRestricted || c) && (
|
|
4940
|
+
const [g, d] = G(!1), [f, u] = G(t), m = (R) => {
|
|
4941
|
+
R.stopPropagation(), !(e.isRestricted || c) && (u(t), d(!0));
|
|
4939
4942
|
}, S = () => {
|
|
4940
4943
|
const R = Math.max(1, f);
|
|
4941
4944
|
R !== t && i?.(R), d(!1);
|
|
4942
|
-
},
|
|
4943
|
-
|
|
4945
|
+
}, p = () => {
|
|
4946
|
+
u(t), d(!1);
|
|
4944
4947
|
}, b = (R) => {
|
|
4945
|
-
R.stopPropagation(), R.key === "Enter" ? R.currentTarget.blur() : R.key === "Escape" &&
|
|
4948
|
+
R.stopPropagation(), R.key === "Enter" ? R.currentTarget.blur() : R.key === "Escape" && p();
|
|
4946
4949
|
}, w = ir.includes(e.entityType) && !e.isRestricted;
|
|
4947
4950
|
return /* @__PURE__ */ M(
|
|
4948
4951
|
kn,
|
|
@@ -4956,7 +4959,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4956
4959
|
unknown: e.isRestricted && l
|
|
4957
4960
|
}),
|
|
4958
4961
|
children: [
|
|
4959
|
-
/* @__PURE__ */ s(
|
|
4962
|
+
/* @__PURE__ */ s(at, { entity: { entityType: e.entityType }, icon: e?.icon, color: e.color }),
|
|
4960
4963
|
/* @__PURE__ */ s("span", { className: "title", children: e.isRestricted ? /* @__PURE__ */ s("span", { className: "label", children: l ? "Unknown" : "Access Restricted" }) : /* @__PURE__ */ M(he, { children: [
|
|
4961
4964
|
e.parents?.map((R, _) => /* @__PURE__ */ M(wt, { children: [
|
|
4962
4965
|
/* @__PURE__ */ s("span", { children: R }, _ + "-path"),
|
|
@@ -4970,7 +4973,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
4970
4973
|
value: f,
|
|
4971
4974
|
min: 1,
|
|
4972
4975
|
autoFocus: !0,
|
|
4973
|
-
onChange: (R) =>
|
|
4976
|
+
onChange: (R) => u(parseInt(R.target.value) || 1),
|
|
4974
4977
|
onFocus: (R) => R.target.select(),
|
|
4975
4978
|
onBlur: S,
|
|
4976
4979
|
onKeyDown: b,
|
|
@@ -5027,27 +5030,27 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5027
5030
|
folderId: g,
|
|
5028
5031
|
selectedEntityIds: d = [],
|
|
5029
5032
|
onClose: f,
|
|
5030
|
-
onEntityClick:
|
|
5033
|
+
onEntityClick: u
|
|
5031
5034
|
}) => {
|
|
5032
|
-
const { user: m } = mn(), S = m?.data?.isAdmin || m?.data?.isManager,
|
|
5035
|
+
const { user: m } = mn(), S = m?.data?.isAdmin || m?.data?.isManager, p = Bi({
|
|
5033
5036
|
projectName: o,
|
|
5034
5037
|
direction: t,
|
|
5035
5038
|
entityId: a,
|
|
5036
5039
|
entityType: i,
|
|
5037
5040
|
targetEntityType: c,
|
|
5038
5041
|
linkType: l
|
|
5039
|
-
}), [b, y] = G(null), [w, R] = G(!1), [_,
|
|
5042
|
+
}), [b, y] = G(null), [w, R] = G(!1), [_, I] = G({}), E = On(n), T = (A) => {
|
|
5040
5043
|
const P = _[A.groupKey];
|
|
5041
5044
|
return P !== void 0 && P !== A.count ? P : A.count;
|
|
5042
5045
|
}, z = async (A) => {
|
|
5043
5046
|
if (w) return;
|
|
5044
5047
|
R(!0);
|
|
5045
|
-
const P = await
|
|
5046
|
-
A.map((U) => ({ targetEntityId: U, linkId:
|
|
5048
|
+
const P = await p.add(
|
|
5049
|
+
A.map((U) => ({ targetEntityId: U, linkId: ct() }))
|
|
5047
5050
|
);
|
|
5048
5051
|
R(!1), P && y(null);
|
|
5049
5052
|
}, H = (A, P) => {
|
|
5050
|
-
A.stopPropagation(),
|
|
5053
|
+
A.stopPropagation(), p.remove(
|
|
5051
5054
|
P.linkIds.map((U) => ({
|
|
5052
5055
|
id: U,
|
|
5053
5056
|
target: { entityId: P.entityId, entityType: P.representative.entityType }
|
|
@@ -5055,25 +5058,25 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5055
5058
|
);
|
|
5056
5059
|
}, B = (A, P) => {
|
|
5057
5060
|
const U = T(A);
|
|
5058
|
-
|
|
5061
|
+
I((h) => ({ ...h, [A.groupKey]: P }));
|
|
5059
5062
|
const r = P - U;
|
|
5060
5063
|
if (r > 0) {
|
|
5061
5064
|
const h = Array.from({ length: r }, () => ({
|
|
5062
5065
|
targetEntityId: A.entityId,
|
|
5063
|
-
linkId:
|
|
5066
|
+
linkId: ct()
|
|
5064
5067
|
}));
|
|
5065
|
-
|
|
5068
|
+
p.add(h);
|
|
5066
5069
|
} else if (r < 0) {
|
|
5067
5070
|
const h = A.linkIds.slice(r).map((v) => ({
|
|
5068
5071
|
id: v,
|
|
5069
5072
|
target: { entityId: A.entityId, entityType: A.representative.entityType }
|
|
5070
5073
|
}));
|
|
5071
|
-
|
|
5074
|
+
p.remove(h);
|
|
5072
5075
|
}
|
|
5073
5076
|
};
|
|
5074
5077
|
return /* @__PURE__ */ M(he, { children: [
|
|
5075
5078
|
/* @__PURE__ */ M(
|
|
5076
|
-
|
|
5079
|
+
it,
|
|
5077
5080
|
{
|
|
5078
5081
|
onMouseDown: (A) => {
|
|
5079
5082
|
A.target !== document.activeElement && document.activeElement instanceof HTMLInputElement && document.activeElement.blur();
|
|
@@ -5097,13 +5100,13 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5097
5100
|
)
|
|
5098
5101
|
] }),
|
|
5099
5102
|
/* @__PURE__ */ M(wn, { children: [
|
|
5100
|
-
|
|
5103
|
+
E.map((A) => /* @__PURE__ */ s(
|
|
5101
5104
|
Vi,
|
|
5102
5105
|
{
|
|
5103
5106
|
link: A.representative,
|
|
5104
5107
|
count: T(A),
|
|
5105
5108
|
isSelected: d.includes(A.entityId),
|
|
5106
|
-
onEntityClick:
|
|
5109
|
+
onEntityClick: u,
|
|
5107
5110
|
onRemove: (P) => H(P, A),
|
|
5108
5111
|
onCountChange: (P) => B(A, P),
|
|
5109
5112
|
isManager: S
|
|
@@ -5118,7 +5121,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5118
5121
|
targetEntityType: c,
|
|
5119
5122
|
projectName: o,
|
|
5120
5123
|
onClose: f,
|
|
5121
|
-
onAdd: (A) =>
|
|
5124
|
+
onAdd: (A) => p.add([{ targetEntityId: A, linkId: ct() }]),
|
|
5122
5125
|
onSearchTypeChange: y
|
|
5123
5126
|
}
|
|
5124
5127
|
)
|
|
@@ -5167,34 +5170,34 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5167
5170
|
isLoading: g
|
|
5168
5171
|
}) => {
|
|
5169
5172
|
const { user: d } = mn(), f = d?.data?.isAdmin || d?.data?.isManager;
|
|
5170
|
-
let
|
|
5173
|
+
let u, m;
|
|
5171
5174
|
const S = [];
|
|
5172
5175
|
try {
|
|
5173
5176
|
const w = ti();
|
|
5174
|
-
|
|
5177
|
+
u = w.setSelectedEntity, w.selectedEntity && S.push(w.selectedEntity.entityId);
|
|
5175
5178
|
} catch {
|
|
5176
5179
|
}
|
|
5177
5180
|
try {
|
|
5178
5181
|
m = An().clearRowsSelection;
|
|
5179
5182
|
} catch {
|
|
5180
5183
|
}
|
|
5181
|
-
const
|
|
5182
|
-
Ge(R) || (m && m(),
|
|
5184
|
+
const p = (w, R) => {
|
|
5185
|
+
Ge(R) || (m && m(), u ? u({
|
|
5183
5186
|
entityId: w,
|
|
5184
5187
|
entityType: R
|
|
5185
5188
|
}) : console.log("Entity clicked:", w, R));
|
|
5186
5189
|
}, b = e?.links ? ji(e.links) : [], y = On(b);
|
|
5187
5190
|
if (g) {
|
|
5188
5191
|
const w = e?.entityId ?? "", R = w.charCodeAt(0) % 3 + 1;
|
|
5189
|
-
return /* @__PURE__ */ s(qi, { children: Array.from({ length: R }, (_,
|
|
5192
|
+
return /* @__PURE__ */ s(qi, { children: Array.from({ length: R }, (_, I) => /* @__PURE__ */ s(
|
|
5190
5193
|
Qi,
|
|
5191
5194
|
{
|
|
5192
5195
|
className: "loading",
|
|
5193
5196
|
style: {
|
|
5194
|
-
width: rn[(w.charCodeAt(
|
|
5197
|
+
width: rn[(w.charCodeAt(I) ?? I * 13) % rn.length]
|
|
5195
5198
|
}
|
|
5196
5199
|
},
|
|
5197
|
-
|
|
5200
|
+
I
|
|
5198
5201
|
)) });
|
|
5199
5202
|
}
|
|
5200
5203
|
return /* @__PURE__ */ M(he, { children: [
|
|
@@ -5202,10 +5205,10 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5202
5205
|
Et,
|
|
5203
5206
|
{
|
|
5204
5207
|
values: y.map((w) => {
|
|
5205
|
-
const R = w.representative, _ = R.isRestricted ? f ? "Unknown" : "Restricted" : R.label,
|
|
5208
|
+
const R = w.representative, _ = R.isRestricted ? f ? "Unknown" : "Restricted" : R.label, I = R.isRestricted ? f ? "Unknown Link - Entity not found" : "Access Restricted - Insufficient Permissions to Entity" : R.parents.join("/") + "/" + R.label + (w.count > 1 ? ` (x${w.count})` : "");
|
|
5206
5209
|
return {
|
|
5207
5210
|
label: _,
|
|
5208
|
-
tooltip:
|
|
5211
|
+
tooltip: I,
|
|
5209
5212
|
icon: R.isRestricted ? f ? "help" : "lock" : void 0,
|
|
5210
5213
|
suffix: w.count > 1 ? /* @__PURE__ */ M(Lt, { style: { cursor: "default", pointerEvents: "none" }, children: [
|
|
5211
5214
|
"x",
|
|
@@ -5217,7 +5220,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5217
5220
|
disabled: a
|
|
5218
5221
|
}
|
|
5219
5222
|
),
|
|
5220
|
-
t && e && /* @__PURE__ */ s(We, { isEditing: t, anchorId: n, onClose: c, children: a ? /* @__PURE__ */ s(
|
|
5223
|
+
t && e && /* @__PURE__ */ s(We, { isEditing: t, anchorId: n, onClose: c, children: a ? /* @__PURE__ */ s(it, { style: { color: "var(--md-sys-color-outline)" }, children: `${e.link.label || ""} ${e.direction} link is not of type ${e.entityType}` }) : /* @__PURE__ */ s(
|
|
5221
5224
|
Gi,
|
|
5222
5225
|
{
|
|
5223
5226
|
projectName: o,
|
|
@@ -5229,7 +5232,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5229
5232
|
targetEntityType: e.link.targetEntityType,
|
|
5230
5233
|
linkType: e.link.linkType,
|
|
5231
5234
|
selectedEntityIds: S,
|
|
5232
|
-
onEntityClick:
|
|
5235
|
+
onEntityClick: p,
|
|
5233
5236
|
folderId: i,
|
|
5234
5237
|
onClose: c
|
|
5235
5238
|
}
|
|
@@ -5271,10 +5274,10 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5271
5274
|
onChange: i,
|
|
5272
5275
|
onCancelEdit: l
|
|
5273
5276
|
}) => {
|
|
5274
|
-
const { SubtasksManager: c, useNavigate: g, dispatch: d } = Pt(), [f,
|
|
5275
|
-
label:
|
|
5276
|
-
tooltip:
|
|
5277
|
-
prefix: /* @__PURE__ */ s(St, { checked:
|
|
5277
|
+
const { SubtasksManager: c, useNavigate: g, dispatch: d } = Pt(), [f, u] = G([]), m = e?.subtasks || [], S = m.map((p) => ({
|
|
5278
|
+
label: p.label || p.name,
|
|
5279
|
+
tooltip: p.description || p.label || p.name,
|
|
5280
|
+
prefix: /* @__PURE__ */ s(St, { checked: p.isDone, isReadOnly: !0, style: { fontSize: 20 } })
|
|
5278
5281
|
}));
|
|
5279
5282
|
return /* @__PURE__ */ M(he, { children: [
|
|
5280
5283
|
/* @__PURE__ */ s(
|
|
@@ -5285,7 +5288,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5285
5288
|
disabled: a
|
|
5286
5289
|
}
|
|
5287
5290
|
),
|
|
5288
|
-
t && e && c && /* @__PURE__ */ s(We, { isEditing: t, anchorId: n, onClose: l, children: a ? /* @__PURE__ */ s(
|
|
5291
|
+
t && e && c && /* @__PURE__ */ s(We, { isEditing: t, anchorId: n, onClose: l, children: a ? /* @__PURE__ */ s(it, { style: { color: "var(--md-sys-color-outline)" }, children: "Subtasks are disabled for this task" }) : /* @__PURE__ */ s(
|
|
5289
5292
|
Zi,
|
|
5290
5293
|
{
|
|
5291
5294
|
projectName: o,
|
|
@@ -5294,7 +5297,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5294
5297
|
folderId: e.folderId,
|
|
5295
5298
|
subtasks: m,
|
|
5296
5299
|
selectedSubtaskIds: f,
|
|
5297
|
-
onSelectSubtasks:
|
|
5300
|
+
onSelectSubtasks: u,
|
|
5298
5301
|
onClose: l,
|
|
5299
5302
|
SubtasksManager: c,
|
|
5300
5303
|
useNavigate: g,
|
|
@@ -5474,12 +5477,12 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5474
5477
|
isEditing: i,
|
|
5475
5478
|
onCancelEdit: l
|
|
5476
5479
|
}) => {
|
|
5477
|
-
const { useNavigate: c = ma, hiddenListIds: g } = Pt(), d = c(), { lists: f, error:
|
|
5480
|
+
const { useNavigate: c = ma, hiddenListIds: g } = Pt(), d = c(), { lists: f, error: u } = Ai(o, t, e), m = Me[n], S = ee(
|
|
5478
5481
|
() => f?.filter(
|
|
5479
5482
|
(y) => y.entityListType === m?.listType && !g?.includes(y.id)
|
|
5480
5483
|
),
|
|
5481
5484
|
[f, m, g]
|
|
5482
|
-
),
|
|
5485
|
+
), p = ee(
|
|
5483
5486
|
() => (S || []).map((y) => {
|
|
5484
5487
|
const w = pa(o, y);
|
|
5485
5488
|
return { list: y, open: w && d ? (_) => {
|
|
@@ -5488,7 +5491,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5488
5491
|
}),
|
|
5489
5492
|
[S, o, d]
|
|
5490
5493
|
), b = ee(
|
|
5491
|
-
() =>
|
|
5494
|
+
() => p.map(({ list: y, open: w }) => ({
|
|
5492
5495
|
label: y.label,
|
|
5493
5496
|
tooltip: y.itemIds.length > 1 ? `${y.label} (x${y.itemIds.length})` : y.label,
|
|
5494
5497
|
suffix: /* @__PURE__ */ M(he, { children: [
|
|
@@ -5497,7 +5500,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5497
5500
|
] }),
|
|
5498
5501
|
onClick: w
|
|
5499
5502
|
})),
|
|
5500
|
-
[
|
|
5503
|
+
[p]
|
|
5501
5504
|
);
|
|
5502
5505
|
return q(() => {
|
|
5503
5506
|
if (!i) return;
|
|
@@ -5505,14 +5508,14 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5505
5508
|
w.key === "Escape" && l?.();
|
|
5506
5509
|
};
|
|
5507
5510
|
return document.addEventListener("keydown", y), () => document.removeEventListener("keydown", y);
|
|
5508
|
-
}, [i, l]),
|
|
5511
|
+
}, [i, l]), u ? /* @__PURE__ */ M(da, { "data-tooltip": `Lists failed to load, sync to try again: ${u}`, children: [
|
|
5509
5512
|
/* @__PURE__ */ s(re, { icon: "error" }),
|
|
5510
5513
|
"Failed to load"
|
|
5511
5514
|
] }) : S ? S.length ? /* @__PURE__ */ M(he, { children: [
|
|
5512
5515
|
/* @__PURE__ */ s(ca, { values: b, pt: { chip: { className: $t } } }),
|
|
5513
|
-
i && /* @__PURE__ */ s(We, { isEditing: i, anchorId: a, onClose: l, children: /* @__PURE__ */ M(
|
|
5516
|
+
i && /* @__PURE__ */ s(We, { isEditing: i, anchorId: a, onClose: l, children: /* @__PURE__ */ M(it, { onMouseDown: (y) => y.stopPropagation(), children: [
|
|
5514
5517
|
/* @__PURE__ */ s(vn, { children: m?.label }),
|
|
5515
|
-
/* @__PURE__ */ s(wn, { children:
|
|
5518
|
+
/* @__PURE__ */ s(wn, { children: p.map(({ list: y, open: w }) => /* @__PURE__ */ M(kn, { className: W({ clickable: !!w }), onClick: w, children: [
|
|
5516
5519
|
/* @__PURE__ */ s(re, { icon: Dr({ entityListType: y.entityListType, entityType: t }) }),
|
|
5517
5520
|
/* @__PURE__ */ s("span", { className: "title", children: y.label }),
|
|
5518
5521
|
/* @__PURE__ */ s(on, { count: y.itemIds.length })
|
|
@@ -5558,16 +5561,16 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5558
5561
|
nameDisabled: l = !1,
|
|
5559
5562
|
labelDisabled: c = !1
|
|
5560
5563
|
}) => {
|
|
5561
|
-
const { anatomy: g } = Be(), { entity_naming: d = { capitalization: "lower", separator: "_" } } = g, [f,
|
|
5564
|
+
const { anatomy: g } = Be(), { entity_naming: d = { capitalization: "lower", separator: "_" } } = g, [f, u] = G(o), [m, S] = G(n), { setEditingCellId: p, updateEntities: b } = Nt(), y = Q(null), w = Q(null), R = Ft(f, d), _ = m === R || !m;
|
|
5562
5565
|
q(() => {
|
|
5563
5566
|
const C = setTimeout(() => {
|
|
5564
5567
|
!c && y.current ? (y.current.focus(), y.current.select()) : !l && w.current && (w.current.focus(), w.current.select());
|
|
5565
5568
|
}, 0);
|
|
5566
5569
|
return () => clearTimeout(C);
|
|
5567
5570
|
}, [c, l]), q(() => {
|
|
5568
|
-
|
|
5571
|
+
u(o), S(n);
|
|
5569
5572
|
}, [o, n]);
|
|
5570
|
-
const
|
|
5573
|
+
const I = Y(async () => {
|
|
5571
5574
|
if (m !== n || f !== o) {
|
|
5572
5575
|
if (f !== o && !c) {
|
|
5573
5576
|
const D = ur(f);
|
|
@@ -5581,7 +5584,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5581
5584
|
console.error("Invalid name:", L.error), we.error(`Invalid name: ${L.error}`);
|
|
5582
5585
|
return;
|
|
5583
5586
|
}
|
|
5584
|
-
|
|
5587
|
+
p(null), a?.();
|
|
5585
5588
|
try {
|
|
5586
5589
|
const { entityRowId: D } = i || {}, k = D, O = t, F = [];
|
|
5587
5590
|
m !== n && !l && F.push({ field: "name", value: m, type: O, rowId: k, id: k }), f !== o && !c && F.push({ field: "label", value: f.trim(), type: O, rowId: k, id: k }), F.length && await b(F, !0);
|
|
@@ -5589,25 +5592,25 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5589
5592
|
console.error("Failed to update entity:", D);
|
|
5590
5593
|
}
|
|
5591
5594
|
} else
|
|
5592
|
-
|
|
5595
|
+
p(null), a?.();
|
|
5593
5596
|
}, [
|
|
5594
5597
|
f,
|
|
5595
5598
|
m,
|
|
5596
5599
|
n,
|
|
5597
5600
|
o,
|
|
5598
5601
|
i,
|
|
5599
|
-
|
|
5602
|
+
p,
|
|
5600
5603
|
a,
|
|
5601
5604
|
l,
|
|
5602
5605
|
c,
|
|
5603
5606
|
b,
|
|
5604
5607
|
t
|
|
5605
|
-
]),
|
|
5606
|
-
|
|
5607
|
-
}, [
|
|
5608
|
+
]), E = Y(() => {
|
|
5609
|
+
p(null), a?.();
|
|
5610
|
+
}, [p, a]), T = Y(
|
|
5608
5611
|
(C) => {
|
|
5609
5612
|
const L = C.target.value;
|
|
5610
|
-
|
|
5613
|
+
u(L), _ && !l && S(Ft(L, d));
|
|
5611
5614
|
},
|
|
5612
5615
|
[_, l]
|
|
5613
5616
|
), z = Y((C) => {
|
|
@@ -5621,9 +5624,9 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5621
5624
|
const L = w.current.value.length;
|
|
5622
5625
|
w.current.setSelectionRange(L, L);
|
|
5623
5626
|
}
|
|
5624
|
-
} else C.key === "Enter" && (C.preventDefault(),
|
|
5627
|
+
} else C.key === "Enter" && (C.preventDefault(), I());
|
|
5625
5628
|
},
|
|
5626
|
-
[
|
|
5629
|
+
[I, E, l]
|
|
5627
5630
|
), B = Y(
|
|
5628
5631
|
(C) => {
|
|
5629
5632
|
if (C.key === "ArrowUp") {
|
|
@@ -5632,9 +5635,9 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5632
5635
|
const L = y.current.value.length;
|
|
5633
5636
|
y.current.setSelectionRange(L, L);
|
|
5634
5637
|
}
|
|
5635
|
-
} else C.key === "Enter" && (C.preventDefault(),
|
|
5638
|
+
} else C.key === "Enter" && (C.preventDefault(), I());
|
|
5636
5639
|
},
|
|
5637
|
-
[
|
|
5640
|
+
[I, E, c]
|
|
5638
5641
|
), A = Y((C) => {
|
|
5639
5642
|
C.stopPropagation();
|
|
5640
5643
|
}, []), P = Y((C) => {
|
|
@@ -5724,9 +5727,9 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5724
5727
|
const l = [], c = [], g = /* @__PURE__ */ new Set();
|
|
5725
5728
|
if (o.has(e))
|
|
5726
5729
|
for (const f of o) {
|
|
5727
|
-
const { rowId:
|
|
5728
|
-
if (!
|
|
5729
|
-
const S = a(
|
|
5730
|
+
const { rowId: u, colId: m } = Mi(f) || {};
|
|
5731
|
+
if (!u || m !== t) continue;
|
|
5732
|
+
const S = a(u);
|
|
5730
5733
|
S && (l.push(f), c.push(xa(S, t)), g.add(S.entityType));
|
|
5731
5734
|
}
|
|
5732
5735
|
const [d] = g;
|
|
@@ -5795,18 +5798,18 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5795
5798
|
isPlaceholder: g,
|
|
5796
5799
|
isReadOnly: d,
|
|
5797
5800
|
enableCustomValues: f,
|
|
5798
|
-
isLoadingOptions:
|
|
5801
|
+
isLoadingOptions: u,
|
|
5799
5802
|
isLinksLoading: m,
|
|
5800
5803
|
folderId: S,
|
|
5801
|
-
midnightExclusiveFields:
|
|
5804
|
+
midnightExclusiveFields: p,
|
|
5802
5805
|
tooltip: b,
|
|
5803
5806
|
mark: y,
|
|
5804
5807
|
onChange: w,
|
|
5805
5808
|
entityType: R,
|
|
5806
5809
|
pt: _,
|
|
5807
|
-
...
|
|
5810
|
+
...I
|
|
5808
5811
|
}) => {
|
|
5809
|
-
const
|
|
5812
|
+
const E = Q(null), T = a?.type, { projectName: z } = Be(), { isEditing: H, setEditingCellId: B, getEditingDraft: A, setEditingDraft: P } = Nt(), { isCellFocused: U, gridMap: r, selectCell: h, focusCell: v, selectedCells: N } = In(), C = Ye(e, t), L = p?.includes(t) ?? !1, D = H(C), k = U(C), O = wa(
|
|
5810
5813
|
C,
|
|
5811
5814
|
t,
|
|
5812
5815
|
D && !d && T === "list_of_strings"
|
|
@@ -5830,7 +5833,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5830
5833
|
const Z = N.size > 1 && N.has(C);
|
|
5831
5834
|
if (j === "Enter" && (Z || T === "boolean")) {
|
|
5832
5835
|
B(null), w?.($, j);
|
|
5833
|
-
const fe =
|
|
5836
|
+
const fe = E.current?.closest("td");
|
|
5834
5837
|
fe && fe.focus();
|
|
5835
5838
|
} else j === "Enter" ? (F(), w?.($, j)) : j === "Click" && Ca($, n) ? (B(null), w?.($, j)) : B(null);
|
|
5836
5839
|
}, ue = ($) => {
|
|
@@ -5844,7 +5847,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5844
5847
|
onMixedChange: ue
|
|
5845
5848
|
}, K = () => {
|
|
5846
5849
|
B(null);
|
|
5847
|
-
const $ =
|
|
5850
|
+
const $ = E.current?.closest("td");
|
|
5848
5851
|
$ && $.focus();
|
|
5849
5852
|
}, V = ee(() => {
|
|
5850
5853
|
const $ = {
|
|
@@ -5964,7 +5967,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
5964
5967
|
type: T,
|
|
5965
5968
|
onOpen: () => B(C),
|
|
5966
5969
|
enableCustomValues: f,
|
|
5967
|
-
isLoadingOptions:
|
|
5970
|
+
isLoadingOptions: u,
|
|
5968
5971
|
...Ae,
|
|
5969
5972
|
...$,
|
|
5970
5973
|
..._?.enum
|
|
@@ -6028,17 +6031,17 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6028
6031
|
/* @__PURE__ */ s(
|
|
6029
6032
|
ka,
|
|
6030
6033
|
{
|
|
6031
|
-
...
|
|
6034
|
+
...I,
|
|
6032
6035
|
onKeyDown: ($) => {
|
|
6033
|
-
|
|
6036
|
+
I.onKeyDown?.($), !($.defaultPrevented || $.key !== "Enter" || T !== "boolean" || i.length || a?.enumResolver || d || l) && ($.preventDefault(), $.stopPropagation(), te(!n, "Enter"));
|
|
6034
6037
|
},
|
|
6035
|
-
className: W(
|
|
6038
|
+
className: W(I.className, {
|
|
6036
6039
|
inherited: c && !D,
|
|
6037
6040
|
[Fe]: d,
|
|
6038
6041
|
editable: !d,
|
|
6039
6042
|
warning: y?.warning
|
|
6040
6043
|
}),
|
|
6041
|
-
ref:
|
|
6044
|
+
ref: E,
|
|
6042
6045
|
id: C,
|
|
6043
6046
|
"data-tooltip": b || !D && y?.tooltip || (c && !D && k ? "Inherited" : void 0),
|
|
6044
6047
|
"data-tooltip-delay": 200,
|
|
@@ -6181,8 +6184,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6181
6184
|
rowHeight: c = 40,
|
|
6182
6185
|
columnDisplayConfig: g
|
|
6183
6186
|
}) => {
|
|
6184
|
-
const d = Ge(t.entityType), f = c < Rr,
|
|
6185
|
-
return /* @__PURE__ */ M(Ia, { className:
|
|
6187
|
+
const d = Ge(t.entityType), f = c < Rr, u = f ? "compact" : "stacked", m = Zt(g, "path", "compact") ?? !0, S = Zt(g, "path", "full") ?? !0, p = f ? m : S;
|
|
6188
|
+
return /* @__PURE__ */ M(Ia, { className: u, children: [
|
|
6186
6189
|
o ? /* @__PURE__ */ s(
|
|
6187
6190
|
Sa,
|
|
6188
6191
|
{
|
|
@@ -6193,9 +6196,9 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6193
6196
|
icon: a ? "expand_more" : "chevron_right"
|
|
6194
6197
|
}
|
|
6195
6198
|
) : null,
|
|
6196
|
-
/* @__PURE__ */ s(Ea, { className:
|
|
6199
|
+
/* @__PURE__ */ s(Ea, { className: u, children: /* @__PURE__ */ s(Ra, { children: /* @__PURE__ */ M(La, { className: u, children: [
|
|
6197
6200
|
/* @__PURE__ */ s(
|
|
6198
|
-
|
|
6201
|
+
at,
|
|
6199
6202
|
{
|
|
6200
6203
|
entity: {
|
|
6201
6204
|
entityType: t.entityType,
|
|
@@ -6205,8 +6208,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6205
6208
|
color: t.color || void 0
|
|
6206
6209
|
}
|
|
6207
6210
|
),
|
|
6208
|
-
/* @__PURE__ */ M(Na, { className:
|
|
6209
|
-
|
|
6211
|
+
/* @__PURE__ */ M(Na, { className: u, children: [
|
|
6212
|
+
p && !d && /* @__PURE__ */ M("span", { className: "path", children: [
|
|
6210
6213
|
n,
|
|
6211
6214
|
f && n ? "/" : ""
|
|
6212
6215
|
] }),
|
|
@@ -6254,7 +6257,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6254
6257
|
}) => {
|
|
6255
6258
|
const g = ae(Ln), d = oi(), f = (m) => {
|
|
6256
6259
|
m.button !== 0 || !o || !g || (d?.clearRowsSelection(), g.setSelectedEntity({ entityId: o, entityType: a }), m.preventDefault());
|
|
6257
|
-
},
|
|
6260
|
+
}, u = (m) => {
|
|
6258
6261
|
m.detail === 2 && f(m);
|
|
6259
6262
|
};
|
|
6260
6263
|
return /* @__PURE__ */ s(
|
|
@@ -6262,10 +6265,10 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6262
6265
|
{
|
|
6263
6266
|
id: `${e}-${t}`,
|
|
6264
6267
|
className: W(_a, Fe, l, { loading: c }),
|
|
6265
|
-
onMouseDown:
|
|
6268
|
+
onMouseDown: u,
|
|
6266
6269
|
"data-tooltip-delay": 200,
|
|
6267
6270
|
children: /* @__PURE__ */ M(zn, { onMouseDown: f, children: [
|
|
6268
|
-
i && /* @__PURE__ */ s(
|
|
6271
|
+
i && /* @__PURE__ */ s(at, { entity: { entityType: a, subType: i } }),
|
|
6269
6272
|
String(n ?? ""),
|
|
6270
6273
|
/* @__PURE__ */ s(Pa, { icon: "dock_to_left" })
|
|
6271
6274
|
] })
|
|
@@ -6333,6 +6336,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6333
6336
|
object-fit: cover;
|
|
6334
6337
|
`, ln = x.span`
|
|
6335
6338
|
color: var(--md-sys-color-outline);
|
|
6339
|
+
white-space: nowrap;
|
|
6340
|
+
flex-shrink: 0;
|
|
6336
6341
|
`, Wa = ({
|
|
6337
6342
|
id: e,
|
|
6338
6343
|
label: t,
|
|
@@ -6349,8 +6354,8 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6349
6354
|
/* @__PURE__ */ s(
|
|
6350
6355
|
$a,
|
|
6351
6356
|
{
|
|
6352
|
-
onClick: (
|
|
6353
|
-
|
|
6357
|
+
onClick: (u) => {
|
|
6358
|
+
u.stopPropagation(), f();
|
|
6354
6359
|
},
|
|
6355
6360
|
className: "expander",
|
|
6356
6361
|
icon: g ? "expand_more" : "chevron_right"
|
|
@@ -6362,7 +6367,7 @@ const Ye = (e, t) => `cell-${e}-${t}`, Mi = (e) => {
|
|
|
6362
6367
|
/* @__PURE__ */ s(Ha, { style: { color: c || void 0 }, children: /* @__PURE__ */ s("span", { className: "label", children: t || n }) }),
|
|
6363
6368
|
i !== void 0 && i > 0 ? /* @__PURE__ */ M(ln, { children: [
|
|
6364
6369
|
i,
|
|
6365
|
-
l !== void 0 && ` (${l}%)`
|
|
6370
|
+
l !== void 0 && ` (${l === 0 ? "<1" : l}%)`
|
|
6366
6371
|
] }) : d ? /* @__PURE__ */ s(ln, { children: "(Empty)" }) : null
|
|
6367
6372
|
] }) }) })
|
|
6368
6373
|
] }), Ua = x.div`
|
|
@@ -6481,7 +6486,7 @@ export {
|
|
|
6481
6486
|
Dn as a1,
|
|
6482
6487
|
qs as a2,
|
|
6483
6488
|
js as a3,
|
|
6484
|
-
|
|
6489
|
+
nt as a4,
|
|
6485
6490
|
Ge as a5,
|
|
6486
6491
|
kl as a6,
|
|
6487
6492
|
Ks as a7,
|
|
@@ -6551,7 +6556,7 @@ export {
|
|
|
6551
6556
|
vl as b7,
|
|
6552
6557
|
oe as b8,
|
|
6553
6558
|
Ii as b9,
|
|
6554
|
-
|
|
6559
|
+
rt as ba,
|
|
6555
6560
|
Si as bb,
|
|
6556
6561
|
qe as bc,
|
|
6557
6562
|
De as bd,
|
|
@@ -6562,11 +6567,11 @@ export {
|
|
|
6562
6567
|
xi as bi,
|
|
6563
6568
|
Dt as bj,
|
|
6564
6569
|
Yi as bk,
|
|
6565
|
-
|
|
6570
|
+
pt as bl,
|
|
6566
6571
|
Di as bm,
|
|
6567
6572
|
Ci as bn,
|
|
6568
6573
|
ge as bo,
|
|
6569
|
-
|
|
6574
|
+
mt as bp,
|
|
6570
6575
|
Yo as bq,
|
|
6571
6576
|
Ce as br,
|
|
6572
6577
|
ji as bs,
|
|
@@ -6575,17 +6580,17 @@ export {
|
|
|
6575
6580
|
Ys as bv,
|
|
6576
6581
|
oi as bw,
|
|
6577
6582
|
_i as bx,
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6583
|
+
Pn as c,
|
|
6584
|
+
tl as d,
|
|
6585
|
+
el as e,
|
|
6586
|
+
eo as f,
|
|
6582
6587
|
ni as g,
|
|
6583
6588
|
Us as h,
|
|
6584
6589
|
Gs as i,
|
|
6585
6590
|
$t as j,
|
|
6586
6591
|
Et as k,
|
|
6587
6592
|
Io as l,
|
|
6588
|
-
|
|
6593
|
+
at as m,
|
|
6589
6594
|
ro as n,
|
|
6590
6595
|
Gi as o,
|
|
6591
6596
|
Mi as p,
|