@ynput/ayon-frontend-shared 0.6.1 → 0.6.3
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 +749 -737
- package/dist/NewEntity.es.js +427 -425
- package/dist/ProjectTreeTable.es.js +1524 -1522
- package/dist/chunks/Feed.es.js +1889 -1826
- package/dist/chunks/MetaWidget.es.js +86 -99
- package/dist/chunks/Slicer.es.js +441 -434
- package/dist/chunks/Watchers.es.js +871 -810
- package/dist/chunks/searchTerms.es.js +5 -4
- package/dist/components.es.js +1 -1
- package/dist/context.es.js +255 -255
- package/dist/types/Actions.d.ts +14 -14
- package/dist/types/ContextMenu.d.ts +14 -14
- package/dist/types/DetailsPanel.d.ts +16 -14
- package/dist/types/EntityPickerDialog.d.ts +14 -14
- package/dist/types/Feed.d.ts +16 -15
- package/dist/types/ListTable.d.ts +14 -14
- package/dist/types/NewEntity.d.ts +16 -15
- package/dist/types/ProjectTreeTable.d.ts +14 -14
- package/dist/types/RepresentationsList.d.ts +14 -14
- package/dist/types/SimpleTable.d.ts +14 -14
- package/dist/types/Slicer.d.ts +14 -14
- package/dist/types/Views.d.ts +14 -14
- package/dist/types/api.d.ts +14 -14
- package/dist/types/components.d.ts +14 -14
- package/dist/types/context.d.ts +14 -14
- package/dist/types/hooks.d.ts +14 -14
- package/dist/types/index.d.ts +14 -14
- package/dist/types/util.d.ts +16 -14
- package/dist/util.es.js +61 -60
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import V from "clsx";
|
|
|
4
4
|
import x, { css as wt } from "styled-components";
|
|
5
5
|
import { Icon as ne, getTextColor as hn, Dropdown as Ut, BorderedSection as kt, Button as be, Dialog as yn, InputText as Vt, theme as Oe } from "@ynput/ayon-react-components";
|
|
6
6
|
import "@module-federation/enhanced/runtime";
|
|
7
|
-
import { bp as fn, bi as bn,
|
|
7
|
+
import { bp as fn, bi as bn, bw as vn, bj as xn, a as wn } from "./searchTerms.es.js";
|
|
8
8
|
import { bA as kn, aU as Tn, aF as Cn, ca as Sn, s as En, dq as In, df as Rn, cr as Nn, af as Dn } from "./getUris.es.js";
|
|
9
9
|
import "primereact/confirmdialog";
|
|
10
10
|
import { x as _e, a as An, d as Kt } from "./DeleteEntitiesContextInstance.es.js";
|
|
@@ -109,19 +109,19 @@ const Zn = x.div`
|
|
|
109
109
|
const h = Array.from(u.querySelectorAll(".offscreen-chip"));
|
|
110
110
|
if (h.length !== e.length) return;
|
|
111
111
|
const S = parseFloat(getComputedStyle(u).rowGap) || 0, d = h.map((k) => k.getBoundingClientRect().width), f = h[0].getBoundingClientRect().height, b = u.querySelector(".offscreen-more-chip")?.getBoundingClientRect().width || 60, v = (k, C, D) => {
|
|
112
|
-
let
|
|
112
|
+
let $ = 1, O = 0;
|
|
113
113
|
const z = (R, W) => {
|
|
114
|
-
W ? O = R : O + S + R <= D ? O += S + R : (
|
|
114
|
+
W ? O = R : O + S + R <= D ? O += S + R : ($++, O = R);
|
|
115
115
|
};
|
|
116
116
|
for (let R = 0; R < k; R++) z(d[R], R === 0);
|
|
117
|
-
return C && z(C, k === 0),
|
|
117
|
+
return C && z(C, k === 0), $;
|
|
118
118
|
}, A = () => {
|
|
119
119
|
const k = u.getBoundingClientRect().width, C = u.offsetHeight, D = f ? Math.max(1, Math.floor((C + S) / (f + S))) : 1;
|
|
120
|
-
let
|
|
121
|
-
for (;
|
|
122
|
-
|
|
120
|
+
let $ = e.length;
|
|
121
|
+
for (; $ > 1 && v($, $ < e.length ? b : 0, k) > D; )
|
|
122
|
+
$--;
|
|
123
123
|
l(
|
|
124
|
-
(O) => O.visibleCount ===
|
|
124
|
+
(O) => O.visibleCount === $ && O.rows === D ? O : { visibleCount: $, rows: D }
|
|
125
125
|
);
|
|
126
126
|
}, P = new ResizeObserver(A);
|
|
127
127
|
return P.observe(u), A(), () => P.disconnect();
|
|
@@ -463,7 +463,7 @@ const Zn = x.div`
|
|
|
463
463
|
value: d = {},
|
|
464
464
|
expand: f = {},
|
|
465
465
|
close: b = {}
|
|
466
|
-
} = y || {}, { style: v, className: A, ...P } = h, { style: k, className: C, ...D } = S, { style:
|
|
466
|
+
} = y || {}, { style: v, className: A, ...P } = h, { style: k, className: C, ...D } = S, { style: $, className: O, ...z } = d, { style: R, className: W, ...j } = f, { style: r, className: g, ...w } = b, N = e.every((T) => T.icon), I = !n || !N, E = !N && o && !a, L = !e.length && t;
|
|
467
467
|
return L && (e = [
|
|
468
468
|
{
|
|
469
469
|
label: t,
|
|
@@ -479,7 +479,7 @@ const Zn = x.div`
|
|
|
479
479
|
}),
|
|
480
480
|
...u,
|
|
481
481
|
children: [
|
|
482
|
-
/* @__PURE__ */ s(dr, { className: "values", children: e.map((T,
|
|
482
|
+
/* @__PURE__ */ s(dr, { className: "values", children: e.map((T, _) => /* @__PURE__ */ H(
|
|
483
483
|
ur,
|
|
484
484
|
{
|
|
485
485
|
className: V({ "has-img": It(T.icon) }),
|
|
@@ -508,7 +508,7 @@ const Zn = x.div`
|
|
|
508
508
|
style: {
|
|
509
509
|
color: E && T.color ? hn(T.color) : p && T.icon ? void 0 : T.color,
|
|
510
510
|
backgroundColor: E ? T.color || "var(--md-sys-color-surface-container)" : "transparent",
|
|
511
|
-
|
|
511
|
+
...$
|
|
512
512
|
},
|
|
513
513
|
className: V({ placeholder: L }, O),
|
|
514
514
|
"aria-label": T.label,
|
|
@@ -518,7 +518,7 @@ const Zn = x.div`
|
|
|
518
518
|
)
|
|
519
519
|
]
|
|
520
520
|
},
|
|
521
|
-
T.value.toString() +
|
|
521
|
+
T.value.toString() + _
|
|
522
522
|
)) }),
|
|
523
523
|
!a && !c && /* @__PURE__ */ s(
|
|
524
524
|
mr,
|
|
@@ -601,7 +601,7 @@ const Zn = x.div`
|
|
|
601
601
|
R && (R.focus(), R.style.outline = "none");
|
|
602
602
|
}
|
|
603
603
|
}, [C, S.search, P.length]);
|
|
604
|
-
const
|
|
604
|
+
const $ = !!o?.includes("list"), O = (z) => {
|
|
605
605
|
let R = l ? z : z.filter((W) => n.find((j) => j.value === W));
|
|
606
606
|
o?.includes("list") || (R = Array.isArray(R) ? R[0] : R), m(R, "Click");
|
|
607
607
|
};
|
|
@@ -618,7 +618,7 @@ const Zn = x.div`
|
|
|
618
618
|
hasMultipleValues: R.length > 1,
|
|
619
619
|
isOpen: W,
|
|
620
620
|
isReadOnly: a,
|
|
621
|
-
isMultiSelect:
|
|
621
|
+
isMultiSelect: $,
|
|
622
622
|
...h?.template,
|
|
623
623
|
placeholder: S.placeholder,
|
|
624
624
|
className: V("enum-dropdown-value", h?.template?.className)
|
|
@@ -631,20 +631,20 @@ const Zn = x.div`
|
|
|
631
631
|
hasMultipleValues: !1,
|
|
632
632
|
isOpen: !1,
|
|
633
633
|
isItem: !0,
|
|
634
|
-
isMultiSelect:
|
|
634
|
+
isMultiSelect: $,
|
|
635
635
|
isSelected: W,
|
|
636
636
|
...h?.template,
|
|
637
637
|
className: V("enum-dropdown-item", h?.template?.className)
|
|
638
638
|
}
|
|
639
639
|
),
|
|
640
640
|
widthExpand: !0,
|
|
641
|
-
multiSelect:
|
|
641
|
+
multiSelect: $,
|
|
642
642
|
disableOpen: a,
|
|
643
643
|
disabled: a,
|
|
644
644
|
sortBySelected: !0,
|
|
645
645
|
searchOnNumber: 10,
|
|
646
646
|
...S,
|
|
647
|
-
$multiSelect:
|
|
647
|
+
$multiSelect: $,
|
|
648
648
|
onChange: O,
|
|
649
649
|
onClose: y,
|
|
650
650
|
editable: l
|
|
@@ -654,7 +654,7 @@ const Zn = x.div`
|
|
|
654
654
|
{
|
|
655
655
|
selectedOptions: b,
|
|
656
656
|
hasMultipleValues: A,
|
|
657
|
-
isMultiSelect:
|
|
657
|
+
isMultiSelect: $,
|
|
658
658
|
isReadOnly: a,
|
|
659
659
|
...h?.template,
|
|
660
660
|
placeholder: S.placeholder,
|
|
@@ -902,7 +902,7 @@ const Zn = x.div`
|
|
|
902
902
|
onPreviewMouseLeave: S,
|
|
903
903
|
mentionEntity: d
|
|
904
904
|
}) => {
|
|
905
|
-
const f = q(m != null), b = typeof e == "string" ? e : e == null ? "" : String(e), [v, A] = Y(m ?? b), P = q(null), k = a === "preview", C = c, D = q(null),
|
|
905
|
+
const f = q(m != null), b = typeof e == "string" ? e : e == null ? "" : String(e), [v, A] = Y(m ?? b), P = q(null), k = a === "preview", C = c, D = q(null), $ = q(!1), O = q(null), z = q(b);
|
|
906
906
|
Q(() => {
|
|
907
907
|
z.current = b;
|
|
908
908
|
}, [b]);
|
|
@@ -920,30 +920,30 @@ const Zn = x.div`
|
|
|
920
920
|
!t && !k || A(b);
|
|
921
921
|
}, [t, k, b]), Q(() => {
|
|
922
922
|
if (k || !t || C) {
|
|
923
|
-
|
|
923
|
+
$.current = !1;
|
|
924
924
|
return;
|
|
925
925
|
}
|
|
926
|
-
|
|
926
|
+
$.current || requestAnimationFrame(() => {
|
|
927
927
|
const T = D.current;
|
|
928
928
|
if (!T) return;
|
|
929
929
|
T.focus();
|
|
930
|
-
const
|
|
931
|
-
T.setSelectionRange(
|
|
930
|
+
const _ = T.value.length;
|
|
931
|
+
T.setSelectionRange(_, _), $.current = !0;
|
|
932
932
|
});
|
|
933
933
|
}, [t, k, C]);
|
|
934
934
|
const W = B(
|
|
935
935
|
(T) => {
|
|
936
|
-
const
|
|
936
|
+
const _ = T.trim();
|
|
937
937
|
if (p === "string")
|
|
938
938
|
return { value: T };
|
|
939
|
-
if (
|
|
939
|
+
if (_ === "")
|
|
940
940
|
return { value: null };
|
|
941
941
|
if (p === "integer") {
|
|
942
|
-
const K = parseInt(
|
|
942
|
+
const K = parseInt(_, 10);
|
|
943
943
|
return Number.isNaN(K) ? { value: null, error: "Invalid integer value. Please enter a valid integer." } : { value: K };
|
|
944
944
|
}
|
|
945
945
|
if (p === "float") {
|
|
946
|
-
const K = parseFloat(
|
|
946
|
+
const K = parseFloat(_);
|
|
947
947
|
return Number.isNaN(K) ? { value: null, error: "Invalid number value. Please enter a valid number." } : { value: K };
|
|
948
948
|
}
|
|
949
949
|
return { value: T };
|
|
@@ -964,12 +964,12 @@ const Zn = x.div`
|
|
|
964
964
|
o?.(K, T);
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
|
-
const
|
|
968
|
-
if (T !== "Enter" &&
|
|
967
|
+
const _ = P.current?.getMarkdown() ?? v;
|
|
968
|
+
if (T !== "Enter" && _.trim() === z.current.trim()) {
|
|
969
969
|
i?.();
|
|
970
970
|
return;
|
|
971
971
|
}
|
|
972
|
-
o?.(
|
|
972
|
+
o?.(_, T);
|
|
973
973
|
},
|
|
974
974
|
[W, v, C, o, i, y]
|
|
975
975
|
), { projectName: r, productTypes: g, taskTypes: w } = _e(), N = Ee(
|
|
@@ -983,8 +983,8 @@ const Zn = x.div`
|
|
|
983
983
|
return;
|
|
984
984
|
}
|
|
985
985
|
if (T.shiftKey || T.altKey || !(T.ctrlKey || T.metaKey)) return;
|
|
986
|
-
const
|
|
987
|
-
|
|
986
|
+
const _ = Ir[T.key.toLowerCase()], K = P.current?.getEditor();
|
|
987
|
+
!_ || !K || (T.preventDefault(), Pn(K, _));
|
|
988
988
|
},
|
|
989
989
|
[k, C]
|
|
990
990
|
), L = /* @__PURE__ */ s(
|
|
@@ -1188,7 +1188,7 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1188
1188
|
}, v) => {
|
|
1189
1189
|
const A = u || (() => {
|
|
1190
1190
|
}), P = h || (() => null), k = S || (() => {
|
|
1191
|
-
}), [C, D] = Y(!1), [
|
|
1191
|
+
}), [C, D] = Y(!1), [$, O] = Y(!1), [z, R] = Y(!1), [W, j] = Y(!1), r = q(null), g = q(), w = q(), N = q(!1), I = C || $, E = t?.label || e, L = typeof E == "string" ? E : String(E ?? ""), T = !n && !At(L) && !L.match(/(https?:\/\/\S+)/gi);
|
|
1192
1192
|
Q(() => {
|
|
1193
1193
|
const M = r.current;
|
|
1194
1194
|
if (!M) return;
|
|
@@ -1213,22 +1213,22 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1213
1213
|
F.removeEventListener("mouseenter", G), F.removeEventListener("mouseleave", le);
|
|
1214
1214
|
};
|
|
1215
1215
|
}, []);
|
|
1216
|
-
const
|
|
1216
|
+
const _ = B((M) => {
|
|
1217
1217
|
N.current = M, R(M);
|
|
1218
1218
|
}, []);
|
|
1219
|
-
Q(() => (clearTimeout(g.current), clearTimeout(w.current), o ?
|
|
1220
|
-
N.current || (
|
|
1221
|
-
}, Nt.getDelay())) : w.current = setTimeout(() =>
|
|
1219
|
+
Q(() => (clearTimeout(g.current), clearTimeout(w.current), o ? _(!1) : I ? N.current || W && y && (g.current = setTimeout(() => {
|
|
1220
|
+
N.current || (_(!0), Nt.markShown(), window.dispatchEvent(new CustomEvent(et, { detail: { cellId: y } })));
|
|
1221
|
+
}, Nt.getDelay())) : w.current = setTimeout(() => _(!1), 300), () => {
|
|
1222
1222
|
clearTimeout(g.current), clearTimeout(w.current);
|
|
1223
|
-
}), [I, W, o, y,
|
|
1223
|
+
}), [I, W, o, y, _]), Q(() => {
|
|
1224
1224
|
const M = (F) => {
|
|
1225
|
-
F.detail?.cellId !== y &&
|
|
1225
|
+
F.detail?.cellId !== y && _(!1);
|
|
1226
1226
|
};
|
|
1227
1227
|
return window.addEventListener(et, M), () => window.removeEventListener(et, M);
|
|
1228
|
-
}, [y,
|
|
1228
|
+
}, [y, _]);
|
|
1229
1229
|
const K = B(() => {
|
|
1230
|
-
|
|
1231
|
-
}, [y, A,
|
|
1230
|
+
_(!1), y && A(y);
|
|
1231
|
+
}, [y, A, _]), re = B(
|
|
1232
1232
|
(M, F) => {
|
|
1233
1233
|
a(M, F === "Enter" ? "Click" : F);
|
|
1234
1234
|
},
|
|
@@ -1356,7 +1356,7 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1356
1356
|
variant: "preview",
|
|
1357
1357
|
allowMarkdown: !0,
|
|
1358
1358
|
onChange: a,
|
|
1359
|
-
onCancelEdit: () =>
|
|
1359
|
+
onCancelEdit: () => _(!1),
|
|
1360
1360
|
onPreviewClick: K,
|
|
1361
1361
|
onPreviewMouseEnter: () => O(!0),
|
|
1362
1362
|
onPreviewMouseLeave: () => O(!1)
|
|
@@ -1367,7 +1367,7 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1367
1367
|
{
|
|
1368
1368
|
isEditing: !0,
|
|
1369
1369
|
anchorId: y,
|
|
1370
|
-
onClose: () =>
|
|
1370
|
+
onClose: () => _(!1),
|
|
1371
1371
|
children: /* @__PURE__ */ s(
|
|
1372
1372
|
Rr,
|
|
1373
1373
|
{
|
|
@@ -1535,8 +1535,8 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1535
1535
|
const [c, p] = Y(e || ""), [m, y] = Y(0), [u, h] = Y(!1), S = q(null), d = q(null), f = o && !i;
|
|
1536
1536
|
Q(() => {
|
|
1537
1537
|
if (!d.current) return;
|
|
1538
|
-
const D = new ResizeObserver((
|
|
1539
|
-
for (const O of
|
|
1538
|
+
const D = new ResizeObserver(($) => {
|
|
1539
|
+
for (const O of $)
|
|
1540
1540
|
y(O.contentRect.width);
|
|
1541
1541
|
});
|
|
1542
1542
|
return D.observe(d.current), () => D.disconnect();
|
|
@@ -1547,8 +1547,8 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1547
1547
|
const D = f ? c : e;
|
|
1548
1548
|
if (!D) return { height: 32, lines: 0 };
|
|
1549
1549
|
if (!m) return { height: 32, lines: 0 };
|
|
1550
|
-
const
|
|
1551
|
-
`), z = Math.max(1, Math.floor((m - 7) / 7)), R =
|
|
1550
|
+
const $ = D.replace(/\\\n/g, `
|
|
1551
|
+
`), z = Math.max(1, Math.floor((m - 7) / 7)), R = $.split(`
|
|
1552
1552
|
`).reduce((j, r) => j + Math.max(1, Math.ceil(r.length / z)), 0);
|
|
1553
1553
|
if (R <= 1) return { height: 32, lines: R };
|
|
1554
1554
|
const W = 32 + (R - 1) * 20;
|
|
@@ -1558,9 +1558,9 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
1558
1558
|
D !== (e || "").trim() ? t(D) : n?.();
|
|
1559
1559
|
}, [t, n, e, c]), P = B(
|
|
1560
1560
|
(D) => {
|
|
1561
|
-
const
|
|
1562
|
-
if (!(
|
|
1563
|
-
if (
|
|
1561
|
+
const $ = D.relatedTarget;
|
|
1562
|
+
if (!($ && (d.current?.contains($) || $.closest(".md-popover")))) {
|
|
1563
|
+
if ($?.closest(".expand-button")) {
|
|
1564
1564
|
n?.();
|
|
1565
1565
|
return;
|
|
1566
1566
|
}
|
|
@@ -2160,7 +2160,7 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
2160
2160
|
(u) => {
|
|
2161
2161
|
const h = /* @__PURE__ */ new Map();
|
|
2162
2162
|
for (const k of n) {
|
|
2163
|
-
const C = k.value?.toString(), D = Pt(C),
|
|
2163
|
+
const C = k.value?.toString(), D = Pt(C), $ = ro(
|
|
2164
2164
|
u.id,
|
|
2165
2165
|
C,
|
|
2166
2166
|
n,
|
|
@@ -2173,11 +2173,11 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
2173
2173
|
id: D,
|
|
2174
2174
|
entityType: "folder",
|
|
2175
2175
|
name: C,
|
|
2176
|
-
label:
|
|
2176
|
+
label: $.label,
|
|
2177
2177
|
subType: ""
|
|
2178
2178
|
},
|
|
2179
2179
|
subRows: [],
|
|
2180
|
-
group:
|
|
2180
|
+
group: $
|
|
2181
2181
|
});
|
|
2182
2182
|
}
|
|
2183
2183
|
const S = Pt(ge), d = () => {
|
|
@@ -2216,8 +2216,8 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
2216
2216
|
) : C = nt(k[u.id]);
|
|
2217
2217
|
C.length === 0 && d().subRows?.push(y(k, ge));
|
|
2218
2218
|
for (const D of C) {
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2219
|
+
const $ = h.get(D);
|
|
2220
|
+
$ ? $.subRows?.push(y(k, D)) : d().subRows?.push(
|
|
2221
2221
|
y(k, ge)
|
|
2222
2222
|
);
|
|
2223
2223
|
}
|
|
@@ -2245,8 +2245,8 @@ const Nt = new Nr(), et = "projectTreeTextPreviewOpen", Dr = (e) => {
|
|
|
2245
2245
|
if (k.group?.value === ge) return 1;
|
|
2246
2246
|
if (C.group?.value === ge) return -1;
|
|
2247
2247
|
if (v.length) {
|
|
2248
|
-
const D = v.indexOf(k.group?.value || ""),
|
|
2249
|
-
return D !== -1 &&
|
|
2248
|
+
const D = v.indexOf(k.group?.value || ""), $ = v.indexOf(C.group?.value || "");
|
|
2249
|
+
return D !== -1 && $ !== -1 ? (D - $) * A : D !== -1 ? -1 : $ !== -1 ? 1 : (k.group?.label?.localeCompare(C.group?.label || "") || 0) * A;
|
|
2250
2250
|
} else
|
|
2251
2251
|
return (k.group?.label?.localeCompare(C.group?.label || "") || 0) * A;
|
|
2252
2252
|
});
|
|
@@ -3337,7 +3337,7 @@ const ls = x.div`
|
|
|
3337
3337
|
enablePinning: !0,
|
|
3338
3338
|
enableHiding: !(y && y.id !== "folder"),
|
|
3339
3339
|
cell: ({ row: r, column: g, table: w }) => {
|
|
3340
|
-
const { value: N, id: I, type: E } = pe(r, g.id), L = w.options.meta, { isEditing: T } = qe(), { rowHeight:
|
|
3340
|
+
const { value: N, id: I, type: E } = pe(r, g.id), L = w.options.meta, { isEditing: T } = qe(), { rowHeight: _ = 40 } = lo(), K = Fe(r.id, g.id);
|
|
3341
3341
|
if (r.original.metaType)
|
|
3342
3342
|
return /* @__PURE__ */ s(
|
|
3343
3343
|
rt,
|
|
@@ -3409,7 +3409,7 @@ const ls = x.div`
|
|
|
3409
3409
|
isExpanded: r.getIsExpanded(),
|
|
3410
3410
|
toggleExpandAll: () => L?.toggleExpandAll?.([r.id]),
|
|
3411
3411
|
toggleExpanded: r.getToggleExpandedHandler(),
|
|
3412
|
-
rowHeight:
|
|
3412
|
+
rowHeight: _,
|
|
3413
3413
|
columnDisplayConfig: Ro(L?.columnsConfig, "name")
|
|
3414
3414
|
}
|
|
3415
3415
|
),
|
|
@@ -3537,7 +3537,7 @@ const ls = x.div`
|
|
|
3537
3537
|
cell: ({ row: r, column: g, table: w }) => {
|
|
3538
3538
|
const { value: N, id: I, type: E } = pe(r, g.id);
|
|
3539
3539
|
if (["group", ce].includes(E) || r.original.metaType) return null;
|
|
3540
|
-
const L = E === "product" || E === "version", T = E === "folder" ? "folderType" : L ? "productType" : "taskType",
|
|
3540
|
+
const L = E === "product" || E === "version", T = E === "folder" ? "folderType" : L ? "productType" : "taskType", _ = w.options.meta, K = E === "folder" && r.original.primary.entityType === "folder" && r.original.primary.hasVersions;
|
|
3541
3541
|
return /* @__PURE__ */ s(
|
|
3542
3542
|
te,
|
|
3543
3543
|
{
|
|
@@ -3546,13 +3546,13 @@ const ls = x.div`
|
|
|
3546
3546
|
columnId: g.id,
|
|
3547
3547
|
value: N,
|
|
3548
3548
|
attributeData: { type: "string" },
|
|
3549
|
-
options: E === "folder" ?
|
|
3549
|
+
options: E === "folder" ? _?.options?.folderType : E === "task" ? _?.options?.taskType : L ? _?.options?.productType : [],
|
|
3550
3550
|
isCollapsed: !!r.original.childOnlyMatch,
|
|
3551
|
-
onChange: (re) =>
|
|
3551
|
+
onChange: (re) => _?.updateEntities?.(
|
|
3552
3552
|
{ field: T, value: re, type: E, rowId: r.id },
|
|
3553
|
-
{ selection:
|
|
3553
|
+
{ selection: _?.selection }
|
|
3554
3554
|
),
|
|
3555
|
-
isReadOnly: L ||
|
|
3555
|
+
isReadOnly: L || _?.readOnly?.includes(g.id) || _?.readOnly?.includes(T) || K || Se(g.id).scope !== "primary",
|
|
3556
3556
|
tooltip: K ? "Folder type cannot be edited when versions exist within the folder" : void 0,
|
|
3557
3557
|
pt: {
|
|
3558
3558
|
enum: {
|
|
@@ -3881,7 +3881,7 @@ const ls = x.div`
|
|
|
3881
3881
|
rowId: E,
|
|
3882
3882
|
className: V("subtasks", { loading: r.original.isLoading }),
|
|
3883
3883
|
columnId: g.id,
|
|
3884
|
-
value: T.subtasks?.map((
|
|
3884
|
+
value: T.subtasks?.map((_) => _.label || _.name) || [],
|
|
3885
3885
|
valueData: T,
|
|
3886
3886
|
attributeData: { type: "subtasks" },
|
|
3887
3887
|
isReadOnly: N?.readOnly?.includes(g.id)
|
|
@@ -3934,7 +3934,7 @@ const ls = x.div`
|
|
|
3934
3934
|
enableHiding: !0,
|
|
3935
3935
|
cell: ({ row: w, column: N, table: I }) => {
|
|
3936
3936
|
if (w.original.group || w.original.metaType) return null;
|
|
3937
|
-
const E = I.options.meta, L = N.id.replace("attrib_", ""), { type: T } = pe(w, L, "attrib"),
|
|
3937
|
+
const E = I.options.meta, L = N.id.replace("attrib_", ""), { type: T } = pe(w, L, "attrib"), _ = sn(w.original, r), K = $t(w.original, r), re = _.id, U = _.entityType, J = !_.ownAttrib?.includes(L);
|
|
3938
3938
|
return ["group", ce].includes(U) || w.original.metaType || !r.scope?.includes(T) && K == null ? null : /* @__PURE__ */ s(
|
|
3939
3939
|
te,
|
|
3940
3940
|
{
|
|
@@ -3973,10 +3973,10 @@ const ls = x.div`
|
|
|
3973
3973
|
id: re,
|
|
3974
3974
|
isAttrib: !0,
|
|
3975
3975
|
rowId: w.id,
|
|
3976
|
-
entityData:
|
|
3976
|
+
entityData: _
|
|
3977
3977
|
},
|
|
3978
3978
|
{
|
|
3979
|
-
selection:
|
|
3979
|
+
selection: _ === w.original.primary && Ao(r.data) ? E?.selection : void 0
|
|
3980
3980
|
}
|
|
3981
3981
|
)
|
|
3982
3982
|
}
|
|
@@ -4006,7 +4006,7 @@ const ls = x.div`
|
|
|
4006
4006
|
enableHiding: !0,
|
|
4007
4007
|
cell: ({ row: E, column: L, table: T }) => {
|
|
4008
4008
|
if (E.original.group || E.original.metaType) return null;
|
|
4009
|
-
const { id:
|
|
4009
|
+
const { id: _, value: K } = pe(E, L.id, "links"), re = K?.map((F) => F.label), U = Ie(E.original, r);
|
|
4010
4010
|
if (!U) return null;
|
|
4011
4011
|
const J = r === "primary" && !!T.options.meta?.loadingLinksEntityIds?.has(U.id), M = {
|
|
4012
4012
|
links: K,
|
|
@@ -4022,7 +4022,7 @@ const ls = x.div`
|
|
|
4022
4022
|
return /* @__PURE__ */ s(
|
|
4023
4023
|
te,
|
|
4024
4024
|
{
|
|
4025
|
-
rowId:
|
|
4025
|
+
rowId: _,
|
|
4026
4026
|
className: V("links", { loading: E.original.isLoading }),
|
|
4027
4027
|
columnId: L.id,
|
|
4028
4028
|
value: re,
|
|
@@ -4049,7 +4049,7 @@ const ls = x.div`
|
|
|
4049
4049
|
(r) => d.filter(
|
|
4050
4050
|
(g) => k.has(g.id) && !C.has(`${r}:${g.id}`)
|
|
4051
4051
|
).map((g) => Fo(g, g.id, r))
|
|
4052
|
-
),
|
|
4052
|
+
), $ = S.filter((r) => h.includes(r.scope)).map(Ho), O = f("thumbnail") ? h.map((r) => zt(r)) : [], z = o ? h.flatMap((r) => A(r)) : [], R = new Set(
|
|
4053
4053
|
h.filter((r) => {
|
|
4054
4054
|
const g = S.filter((w) => w.scope === r);
|
|
4055
4055
|
return g.length === 0 || g.some((w) => w.includeAttributes !== !1);
|
|
@@ -4060,7 +4060,7 @@ const ls = x.div`
|
|
|
4060
4060
|
...d,
|
|
4061
4061
|
...O,
|
|
4062
4062
|
...D,
|
|
4063
|
-
|
|
4063
|
+
...$,
|
|
4064
4064
|
...v,
|
|
4065
4065
|
...W,
|
|
4066
4066
|
...P,
|
|
@@ -4493,13 +4493,13 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
4493
4493
|
a && p && /* @__PURE__ */ H(qr, { ref: v, children: [
|
|
4494
4494
|
p?.pages.map(
|
|
4495
4495
|
(P, k) => P.entities.map((C, D) => {
|
|
4496
|
-
const
|
|
4496
|
+
const $ = p.pages.slice(0, k).reduce((O, z) => O + z.entities.length, 0) + D;
|
|
4497
4497
|
return /* @__PURE__ */ H(
|
|
4498
4498
|
Zt,
|
|
4499
4499
|
{
|
|
4500
4500
|
onClick: () => f(C),
|
|
4501
4501
|
tabIndex: 0,
|
|
4502
|
-
...A(
|
|
4502
|
+
...A($),
|
|
4503
4503
|
children: [
|
|
4504
4504
|
/* @__PURE__ */ s(Qe, { entity: C }),
|
|
4505
4505
|
/* @__PURE__ */ H("span", { className: "label", children: [
|
|
@@ -4634,7 +4634,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
4634
4634
|
}), [f, b] = Y(null), [v, A] = Y(!1), [P, k] = Y({}), C = un(n), D = (R) => {
|
|
4635
4635
|
const W = P[R.groupKey];
|
|
4636
4636
|
return W !== void 0 && W !== R.count ? W : R.count;
|
|
4637
|
-
},
|
|
4637
|
+
}, $ = async (R) => {
|
|
4638
4638
|
if (v) return;
|
|
4639
4639
|
A(!0);
|
|
4640
4640
|
const W = await d.add(
|
|
@@ -4727,7 +4727,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
4727
4727
|
projectName: o,
|
|
4728
4728
|
entityType: c,
|
|
4729
4729
|
initialSelection: p ? { folder: { [p]: !0 } } : void 0,
|
|
4730
|
-
onSubmit:
|
|
4730
|
+
onSubmit: $,
|
|
4731
4731
|
isLoading: v,
|
|
4732
4732
|
isMultiSelect: !0
|
|
4733
4733
|
}
|
|
@@ -5085,21 +5085,8 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5085
5085
|
}
|
|
5086
5086
|
d(null), i?.();
|
|
5087
5087
|
try {
|
|
5088
|
-
const {
|
|
5089
|
-
|
|
5090
|
-
field: "name",
|
|
5091
|
-
value: h,
|
|
5092
|
-
type: t,
|
|
5093
|
-
rowId: T
|
|
5094
|
-
}), y !== o && !c) {
|
|
5095
|
-
const $ = y.trim();
|
|
5096
|
-
L?.updateEntities?.({
|
|
5097
|
-
field: "label",
|
|
5098
|
-
value: $,
|
|
5099
|
-
type: t,
|
|
5100
|
-
rowId: T
|
|
5101
|
-
});
|
|
5102
|
-
}
|
|
5088
|
+
const { entityRowId: L } = a || {}, T = L, _ = t, K = [];
|
|
5089
|
+
h !== n && !l && K.push({ field: "name", value: h, type: _, rowId: T, id: T }), y !== o && !c && K.push({ field: "label", value: y.trim(), type: _, rowId: T, id: T }), K.length && await f(K, !0);
|
|
5103
5090
|
} catch (L) {
|
|
5104
5091
|
console.error("Failed to update entity:", L);
|
|
5105
5092
|
}
|
|
@@ -5125,7 +5112,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5125
5112
|
u(E), P && !l && S(St(E, m));
|
|
5126
5113
|
},
|
|
5127
5114
|
[P, l]
|
|
5128
|
-
),
|
|
5115
|
+
), $ = B((I) => {
|
|
5129
5116
|
const E = I.target.value;
|
|
5130
5117
|
S(E);
|
|
5131
5118
|
}, []), O = B(
|
|
@@ -5189,7 +5176,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5189
5176
|
id: `${e}-name`,
|
|
5190
5177
|
type: "text",
|
|
5191
5178
|
value: h,
|
|
5192
|
-
onChange:
|
|
5179
|
+
onChange: $,
|
|
5193
5180
|
onKeyDown: z,
|
|
5194
5181
|
onClick: R,
|
|
5195
5182
|
onDoubleClick: W,
|
|
@@ -5281,7 +5268,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5281
5268
|
pt: A,
|
|
5282
5269
|
...P
|
|
5283
5270
|
}) => {
|
|
5284
|
-
const k = q(null), C = i?.type, { projectName: D } = _e(), { isEditing:
|
|
5271
|
+
const k = q(null), C = i?.type, { projectName: D } = _e(), { isEditing: $, setEditingCellId: O, getEditingDraft: z, setEditingDraft: R } = qe(), { isCellFocused: W, gridMap: j, selectCell: r, focusCell: g, selectedCells: w } = Jr(), N = Fe(e, t), I = d?.includes(t) ?? !1, E = $(N), L = W(N), T = () => {
|
|
5285
5272
|
const U = j.rowIdToIndex.get(e);
|
|
5286
5273
|
if (U === void 0) {
|
|
5287
5274
|
O(null);
|
|
@@ -5293,7 +5280,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5293
5280
|
r(M, !1, !1), g(M), O(M);
|
|
5294
5281
|
} else
|
|
5295
5282
|
O(null);
|
|
5296
|
-
},
|
|
5283
|
+
}, _ = (U, J) => {
|
|
5297
5284
|
if (m) {
|
|
5298
5285
|
O(null);
|
|
5299
5286
|
return;
|
|
@@ -5310,7 +5297,7 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5310
5297
|
U && U.focus();
|
|
5311
5298
|
}, re = Ee(() => {
|
|
5312
5299
|
const U = {
|
|
5313
|
-
onChange:
|
|
5300
|
+
onChange: _,
|
|
5314
5301
|
onCancelEdit: K,
|
|
5315
5302
|
isEditing: E,
|
|
5316
5303
|
isReadOnly: m
|
|
@@ -5453,14 +5440,14 @@ const Fe = (e, t) => `cell-${e}-${t}`, gs = (e) => {
|
|
|
5453
5440
|
a,
|
|
5454
5441
|
l,
|
|
5455
5442
|
I,
|
|
5456
|
-
|
|
5443
|
+
_
|
|
5457
5444
|
]);
|
|
5458
5445
|
return /* @__PURE__ */ s(
|
|
5459
5446
|
vi,
|
|
5460
5447
|
{
|
|
5461
5448
|
...P,
|
|
5462
5449
|
onKeyDown: (U) => {
|
|
5463
|
-
P.onKeyDown?.(U), !(U.defaultPrevented || U.key !== "Enter" || C !== "boolean" || a.length || i?.enumResolver || m || l) && (U.preventDefault(), U.stopPropagation(),
|
|
5450
|
+
P.onKeyDown?.(U), !(U.defaultPrevented || U.key !== "Enter" || C !== "boolean" || a.length || i?.enumResolver || m || l) && (U.preventDefault(), U.stopPropagation(), _(!n, "Enter"));
|
|
5464
5451
|
},
|
|
5465
5452
|
className: V(P.className, {
|
|
5466
5453
|
inherited: c && !E,
|