@ynput/ayon-frontend-shared 0.8.1 → 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 +4 -2
- package/dist/ProjectTreeTable.es.js +4208 -4185
- package/dist/ProjectsTable.es.js +5 -4
- package/dist/Slicer.es.js +327 -294
- package/dist/Views.es.js +725 -713
- package/dist/chunks/ColumnDropIndicator.es.js +33 -27
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +112 -110
- package/dist/chunks/FilmstripEntityCard.es.js +2 -2
- package/dist/chunks/GroupSettingsFallback.es.js +3 -2
- package/dist/chunks/MetaWidget.es.js +828 -809
- package/dist/chunks/NewEntityContextInstance.es.js +6 -5
- package/dist/chunks/ReviewablesSelector.es.js +76 -76
- package/dist/chunks/SimpleTable.es.js +151 -149
- package/dist/chunks/Slicer.es.js +637 -617
- package/dist/chunks/TableExportContextInstance.es.js +415 -471
- package/dist/chunks/ThumbnailSimple.es.js +11 -11
- package/dist/chunks/Watchers.es.js +46 -46
- package/dist/chunks/getUris.es.js +1069 -1057
- package/dist/chunks/searchTerms.es.js +617 -581
- package/dist/chunks/useCreateContextMenu.es.js +15 -13
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +916 -884
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/index.es.js +11 -10
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +18 -17
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +18 -17
- package/dist/types/ListTable.d.ts +28 -18
- package/dist/types/NewEntity.d.ts +19 -16
- package/dist/types/ProjectTreeTable.d.ts +62 -19
- package/dist/types/ProjectsTable.d.ts +18 -17
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +18 -17
- package/dist/types/Slicer.d.ts +24 -17
- package/dist/types/Views.d.ts +23 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +64 -18
- package/dist/types/context.d.ts +28 -18
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +38 -16
- package/dist/util.es.js +116 -113
- package/package.json +2 -2
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c, jsxs as x, Fragment as Te } from "react/jsx-runtime";
|
|
2
|
-
import nn, { useMemo as I, useState as
|
|
2
|
+
import nn, { useMemo as I, useState as $, useEffect as W, lazy as xo, Suspense as ko, useCallback as Ke, useRef as pe, forwardRef as ft, useId as Ao, Fragment as Fo } from "react";
|
|
3
3
|
import { v4 as xn } from "uuid";
|
|
4
4
|
import ne, { clsx as kn } from "clsx";
|
|
5
5
|
import An from "react-markdown";
|
|
@@ -10,8 +10,8 @@ import To from "remark-directive-rehype";
|
|
|
10
10
|
import { toast as Ce } from "react-toastify";
|
|
11
11
|
import { $createListItemNode as Do, $createListNode as No } from "@lexical/list";
|
|
12
12
|
import { $getRoot as Io } from "lexical";
|
|
13
|
-
import { Button as st, Dialog as So, getFileSizeString as Eo, Icon as se, theme as Tn, getTextColor as
|
|
14
|
-
import { a8 as
|
|
13
|
+
import { Button as st, Dialog as So, getFileSizeString as Eo, Icon as se, theme as Tn, getTextColor as $t, Dropdown as Mo, SaveButton as Po, UserImage as Dn, SEARCH_FILTER_ID as Nn, buildFilterId as on, getFilterFromId as _o, SearchFilter as Ro } from "@ynput/ayon-react-components";
|
|
14
|
+
import { a8 as $o, aa as In, ab as Lo, P as Oo, ac as Vo, ad as an, ae as jo, af as Uo, ag as zo, J as Bo, ah as Go, ai as Ho, aj as qo, ak as Wo, al as Qo, am as Yo, an as Jo, ao as Ko, ap as Xo, aq as Zo, ar as ea, V as Lt, a3 as Sn, a0 as ta, as as na, at as oa, au as aa, av as ra, aw as ia, ax as sa, ay as ca, az as rn, aA as la, b as da, c as ua, i as ma, aB as pa, _ as ga, e as ha, T as fa, S as ya, U as va } from "./FilmstripEntityCard.es.js";
|
|
15
15
|
import "@lexical/code";
|
|
16
16
|
import "@lexical/rich-text";
|
|
17
17
|
import "@lexical/selection";
|
|
@@ -25,12 +25,12 @@ import "./EmptyPlaceholderFlex.styled.es.js";
|
|
|
25
25
|
import { a_ as wa, bs as sn } from "./searchTerms.es.js";
|
|
26
26
|
import { bl as xa, bo as ka, aJ as Aa, dp as Fa, aW as Ca, aQ as Ta, b3 as Da, Q as Na, bG as Ia, bn as Sa, by as Ea, bs as Ma, bm as Pa, cF as _a, c2 as Ra } from "./getUris.es.js";
|
|
27
27
|
import "primereact/confirmdialog";
|
|
28
|
-
import { union as
|
|
29
|
-
import { b as Oa, F as Va, u as
|
|
28
|
+
import { union as $a, isEqual as La } from "lodash";
|
|
29
|
+
import { b as Oa, F as Va, u as Le, a as En, T as ja, C as Ua } from "./ThumbnailSimple.es.js";
|
|
30
30
|
import "@module-federation/enhanced/runtime";
|
|
31
31
|
import "@ynput/ayon-addon/host";
|
|
32
32
|
import Vt from "axios";
|
|
33
|
-
import { m as Be,
|
|
33
|
+
import { m as Be, o as za, $ as yt, u as Ba } from "./TableExportContextInstance.es.js";
|
|
34
34
|
import "semver";
|
|
35
35
|
import "./ContextMenuContextInstance.es.js";
|
|
36
36
|
import "react-dom";
|
|
@@ -38,7 +38,7 @@ import "react-router-dom";
|
|
|
38
38
|
import { p as ve } from "./parseFilename.es.js";
|
|
39
39
|
import { b as cn } from "./colorUtils.es.js";
|
|
40
40
|
import "./EntityTooltip.es.js";
|
|
41
|
-
import { isValid as
|
|
41
|
+
import { isValid as Xe, isToday as Ga, isSameYear as Ha, isSameDay as qa, isSameWeek as Wa, isSameMinute as Qa, format as St, formatISO as Ya, differenceInMinutes as Ja, differenceInSeconds as Ka, compareAsc as Xa } from "date-fns";
|
|
42
42
|
import "@ynput/ayon-addon";
|
|
43
43
|
import { a as Za, M as er } from "./Menu.es.js";
|
|
44
44
|
import { InView as tr } from "react-intersection-observer";
|
|
@@ -83,10 +83,10 @@ const lr = ({
|
|
|
83
83
|
return console.log("loading next page..."), await b();
|
|
84
84
|
}, f = I(() => {
|
|
85
85
|
if (!g) return !1;
|
|
86
|
-
const w =
|
|
86
|
+
const w = $a(
|
|
87
87
|
M?.flatMap((A) => A.entityId ? A.entityId : [])
|
|
88
88
|
);
|
|
89
|
-
return
|
|
89
|
+
return !La(w, i);
|
|
90
90
|
}, [M, i, g]);
|
|
91
91
|
return l && (g = !0), {
|
|
92
92
|
activitiesData: D,
|
|
@@ -103,10 +103,10 @@ const lr = ({
|
|
|
103
103
|
), r = I(
|
|
104
104
|
() => a.filter((j) => j.members?.some((de) => de.name === t.userName)).map((j) => j.name),
|
|
105
105
|
[a, t.userName]
|
|
106
|
-
), [s, i] =
|
|
106
|
+
), [s, i] = $({
|
|
107
107
|
operator: "and",
|
|
108
108
|
conditions: []
|
|
109
|
-
}), [l, m] =
|
|
109
|
+
}), [l, m] = $(""), p = t.feedFilter ?? s, g = t.setFeedFilter ?? i, [u, h] = $(null), [b, y] = $(null), [D, { isLoading: M }] = Aa(), [C, { isLoading: f }] = Fa(), [w, { isLoading: A }] = Ca(), S = M || f || A, P = async (j) => await D(j).unwrap(), _ = async (j) => await C(j).unwrap(), E = async (j) => await w(j).unwrap(), [N] = Ta(), [G] = Da(), X = async (j) => await N(j).unwrap(), Q = async (j) => await G(j).unwrap(), Z = Na(p), Y = I(() => Oa(p), [p]), L = lr({
|
|
110
110
|
entities: t.entities,
|
|
111
111
|
filter: p,
|
|
112
112
|
backendFilter: Y,
|
|
@@ -136,7 +136,7 @@ const lr = ({
|
|
|
136
136
|
{
|
|
137
137
|
value: {
|
|
138
138
|
...t,
|
|
139
|
-
|
|
139
|
+
...L,
|
|
140
140
|
mentionSuggestionsData: oe,
|
|
141
141
|
categories: ae,
|
|
142
142
|
checklistCount: J,
|
|
@@ -422,7 +422,7 @@ const lr = ({
|
|
|
422
422
|
background: none;
|
|
423
423
|
opacity: 1;
|
|
424
424
|
}
|
|
425
|
-
`, hr = F(
|
|
425
|
+
`, hr = F($o)`
|
|
426
426
|
--icon-size: 32px;
|
|
427
427
|
top: calc(50% - 10px);
|
|
428
428
|
left: 50%;
|
|
@@ -571,7 +571,7 @@ const lr = ({
|
|
|
571
571
|
overflow: auto !important;
|
|
572
572
|
`, br = ({ file: e }) => {
|
|
573
573
|
let t = ct(e.id, e.projectName);
|
|
574
|
-
const [o, n] =
|
|
574
|
+
const [o, n] = $(""), [a, r] = $(null);
|
|
575
575
|
return W(() => {
|
|
576
576
|
(async () => {
|
|
577
577
|
try {
|
|
@@ -589,7 +589,7 @@ const lr = ({
|
|
|
589
589
|
a
|
|
590
590
|
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ c(An, { remarkPlugins: [Cn, Fn], children: o }) : /* @__PURE__ */ c(vr, { value: o, language: e.extension, readOnly: !0 });
|
|
591
591
|
}, Pn = () => import("./VideoPlayer.es.js"), wr = xo(Pn), xr = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, kr = 1e4, Ar = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", Fr = (e, t) => {
|
|
592
|
-
const [o, n] =
|
|
592
|
+
const [o, n] = $({ status: "loading" });
|
|
593
593
|
return W(() => {
|
|
594
594
|
n({ status: "loading" });
|
|
595
595
|
let a = !1, r = null, s;
|
|
@@ -752,18 +752,18 @@ const lr = ({
|
|
|
752
752
|
className: b,
|
|
753
753
|
...y
|
|
754
754
|
}) => {
|
|
755
|
-
const D = i && i < 100, [M, C] =
|
|
755
|
+
const D = i && i < 100, [M, C] = $(!1), [f, w] = $(!1), { feedAnnotationsEnabled: A } = Be(), { entities: S } = Le(), P = e.split("."), _ = P.pop() || "", E = P.join("."), N = vt(t || "." + _), G = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, Z = /* @__PURE__ */ x(Te, { children: [
|
|
756
756
|
/* @__PURE__ */ c("span", { className: "size", children: Eo(s) }),
|
|
757
757
|
/* @__PURE__ */ c(se, { icon: "download", className: "download-icon" })
|
|
758
758
|
] }), Y = I(
|
|
759
759
|
() => n ?? a,
|
|
760
760
|
[n, a]
|
|
761
|
-
),
|
|
761
|
+
), L = I(() => S.at(0), [S]), oe = I(() => {
|
|
762
762
|
if (!Y?.range)
|
|
763
763
|
return [1, 1];
|
|
764
|
-
const ae = r === void 0 ?
|
|
764
|
+
const ae = r === void 0 ? L?.attrib?.frameStart : r;
|
|
765
765
|
return Number.isFinite(ae) ? [ae - 1 + Y.range[0], ae - 1 + Y.range[1]] : Y.range;
|
|
766
|
-
}, [Y, r,
|
|
766
|
+
}, [Y, r, L]);
|
|
767
767
|
return /* @__PURE__ */ x(
|
|
768
768
|
ur,
|
|
769
769
|
{
|
|
@@ -883,7 +883,7 @@ const lr = ({
|
|
|
883
883
|
...p
|
|
884
884
|
}) => {
|
|
885
885
|
if (!e.length) return null;
|
|
886
|
-
const g =
|
|
886
|
+
const g = Ke(
|
|
887
887
|
(u) => {
|
|
888
888
|
const h = e.filter((y) => vt(y.mime, y.ext)), b = h.findIndex((y) => y.id === e[u].id);
|
|
889
889
|
i?.({ files: h, index: b, activityId: t || "" });
|
|
@@ -919,7 +919,7 @@ const lr = ({
|
|
|
919
919
|
const r = a.match(/\(([^)]+)\)/)[1], s = r.split("?")[0];
|
|
920
920
|
n = e.replace(r, s);
|
|
921
921
|
}), n;
|
|
922
|
-
}, Er = new AbortController(), Mr = Vt.CancelToken, Pr = Mr.source(),
|
|
922
|
+
}, Er = new AbortController(), Mr = Vt.CancelToken, Pr = Mr.source(), Ze = (e, t, o) => new Promise((n, a) => {
|
|
923
923
|
new FormData().append("image", e);
|
|
924
924
|
const s = {
|
|
925
925
|
signal: Er.signal,
|
|
@@ -941,7 +941,7 @@ const lr = ({
|
|
|
941
941
|
if (r?.length) {
|
|
942
942
|
if (r.length === 0) return;
|
|
943
943
|
for (const s of r)
|
|
944
|
-
|
|
944
|
+
Ze(s, t, o).then(
|
|
945
945
|
(i) => n(i),
|
|
946
946
|
(i) => {
|
|
947
947
|
a && a(s), Ce.error(i.message), console.warn(i);
|
|
@@ -955,8 +955,8 @@ const lr = ({
|
|
|
955
955
|
).map((n) => ({
|
|
956
956
|
...n,
|
|
957
957
|
unsavedAnnotation: n
|
|
958
|
-
}))),
|
|
959
|
-
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } =
|
|
958
|
+
}))), $r = ({ entityId: e, filesUploading: t }) => {
|
|
959
|
+
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = Le(), { onGoToFrame: s } = Be(), i = Rr(a || [], e, t);
|
|
960
960
|
return W(() => {
|
|
961
961
|
i.length > 0 && !o && n(rt);
|
|
962
962
|
}, [i]), {
|
|
@@ -975,8 +975,8 @@ const lr = ({
|
|
|
975
975
|
primary: s,
|
|
976
976
|
secondary: i
|
|
977
977
|
};
|
|
978
|
-
}, [e]),
|
|
979
|
-
const { exportAnnotationComposite: r } =
|
|
978
|
+
}, [e]), Lr = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
|
|
979
|
+
const { exportAnnotationComposite: r } = Le(), s = async (l) => {
|
|
980
980
|
const m = await r?.(l.id);
|
|
981
981
|
if (!m)
|
|
982
982
|
throw new Error(`Exporting composite image for annotation ${l.id} failed`);
|
|
@@ -985,8 +985,8 @@ const lr = ({
|
|
|
985
985
|
}), g = await fetch(l.annotationData).then((M) => M.blob()), u = new File([g], `annotation-${l.name}`, {
|
|
986
986
|
type: "image/png"
|
|
987
987
|
}), h = await Promise.all([
|
|
988
|
-
|
|
989
|
-
|
|
988
|
+
Ze(p, e, o),
|
|
989
|
+
Ze(u, e, () => {
|
|
990
990
|
})
|
|
991
991
|
]), [b, y] = h, D = [t(b), t(y, !0)];
|
|
992
992
|
return { annotation: l, uploads: h, files: D };
|
|
@@ -1017,7 +1017,7 @@ const lr = ({
|
|
|
1017
1017
|
return Ce.error("Upload failed: " + m.message), { files: [], metadata: [] };
|
|
1018
1018
|
}
|
|
1019
1019
|
};
|
|
1020
|
-
},
|
|
1020
|
+
}, $n = "ayon-comment-draft/", Ln = 720 * 60 * 60 * 1e3, Or = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, On = (e) => {
|
|
1021
1021
|
try {
|
|
1022
1022
|
const t = localStorage.getItem(e);
|
|
1023
1023
|
return t ? JSON.parse(t) : null;
|
|
@@ -1034,13 +1034,13 @@ const lr = ({
|
|
|
1034
1034
|
try {
|
|
1035
1035
|
const e = Date.now();
|
|
1036
1036
|
for (const t of Object.keys(localStorage)) {
|
|
1037
|
-
if (!t.startsWith(
|
|
1037
|
+
if (!t.startsWith($n)) continue;
|
|
1038
1038
|
const o = On(t);
|
|
1039
|
-
(!o || e - o.savedAt >
|
|
1039
|
+
(!o || e - o.savedAt > Ln) && localStorage.removeItem(t);
|
|
1040
1040
|
}
|
|
1041
1041
|
} catch {
|
|
1042
1042
|
}
|
|
1043
|
-
}, Ur = (e, t, o) => e && t && o.length ? `${
|
|
1043
|
+
}, Ur = (e, t, o) => e && t && o.length ? `${$n}${e}/${t}/${[...o].sort().join(",")}` : null, zr = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
|
|
1044
1044
|
const a = pe(null), r = pe(!1);
|
|
1045
1045
|
W(() => {
|
|
1046
1046
|
if (!e || o) return;
|
|
@@ -1048,7 +1048,7 @@ const lr = ({
|
|
|
1048
1048
|
if (a.current = e, s === e) return;
|
|
1049
1049
|
s || jr();
|
|
1050
1050
|
const i = On(e);
|
|
1051
|
-
i && Date.now() - i.savedAt <=
|
|
1051
|
+
i && Date.now() - i.savedAt <= Ln ? (r.current = !0, n({
|
|
1052
1052
|
text: i.text ?? "",
|
|
1053
1053
|
files: i.files ?? [],
|
|
1054
1054
|
uploadedAnnotations: i.uploadedAnnotations ?? [],
|
|
@@ -1128,7 +1128,7 @@ const lr = ({
|
|
|
1128
1128
|
...t && {
|
|
1129
1129
|
backgroundColor: t,
|
|
1130
1130
|
borderColor: t,
|
|
1131
|
-
color:
|
|
1131
|
+
color: $t(t)
|
|
1132
1132
|
}
|
|
1133
1133
|
},
|
|
1134
1134
|
children: e || Br
|
|
@@ -1170,7 +1170,7 @@ const lr = ({
|
|
|
1170
1170
|
{
|
|
1171
1171
|
...m,
|
|
1172
1172
|
className: ne(l, { selected: n }),
|
|
1173
|
-
style: { backgroundColor: n && t ? t : "", color:
|
|
1173
|
+
style: { backgroundColor: n && t ? t : "", color: $t(n && t ? t : ""), ...i },
|
|
1174
1174
|
ref: p,
|
|
1175
1175
|
children: [
|
|
1176
1176
|
a,
|
|
@@ -1302,10 +1302,10 @@ const lr = ({
|
|
|
1302
1302
|
|
|
1303
1303
|
${Tn.bodySmall}
|
|
1304
1304
|
`, lt = ({ date: e, isExact: t, exactTooltip: o = !1, ...n }) => {
|
|
1305
|
-
const [a, r] =
|
|
1305
|
+
const [a, r] = $(!0), [s, i] = $(/* @__PURE__ */ new Date());
|
|
1306
1306
|
if (!e) return null;
|
|
1307
1307
|
const l = new Date(e);
|
|
1308
|
-
if (!
|
|
1308
|
+
if (!Xe(l)) return null;
|
|
1309
1309
|
W(() => {
|
|
1310
1310
|
const w = setInterval(
|
|
1311
1311
|
() => i(/* @__PURE__ */ new Date()),
|
|
@@ -1359,13 +1359,13 @@ const zn = (e) => {
|
|
|
1359
1359
|
return "task_alt";
|
|
1360
1360
|
}
|
|
1361
1361
|
}, ai = ({ lastOwnVersionReview: e }) => {
|
|
1362
|
-
const [t, o] =
|
|
1362
|
+
const [t, o] = $(/* @__PURE__ */ new Date());
|
|
1363
1363
|
W(() => {
|
|
1364
1364
|
const r = setInterval(() => o(/* @__PURE__ */ new Date()), Un);
|
|
1365
1365
|
return () => clearInterval(r);
|
|
1366
1366
|
}, []);
|
|
1367
1367
|
const n = I(() => e?.activityData?.feedback, [e]), a = I(() => e?.createdAt ? In(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
|
|
1368
|
-
return /* @__PURE__ */ x(
|
|
1368
|
+
return /* @__PURE__ */ x(Lo, { className: kn(n), children: [
|
|
1369
1369
|
/* @__PURE__ */ c(se, { icon: Bn(n) }),
|
|
1370
1370
|
"You last ",
|
|
1371
1371
|
zn(n),
|
|
@@ -1387,8 +1387,8 @@ const zn = (e) => {
|
|
|
1387
1387
|
const { data: r } = await Vt.get(`/api/projects/${e}/files/${t}`, {
|
|
1388
1388
|
responseType: "blob"
|
|
1389
1389
|
}), s = new File([r], o, { type: n || r.type });
|
|
1390
|
-
return
|
|
1391
|
-
}, hn = (e, t) => `/api/projects/${e}/files/${t}`, fn = (e, t) => !!e &&
|
|
1390
|
+
return Ze(s, e, a);
|
|
1391
|
+
}, hn = (e, t) => `/api/projects/${e}/files/${t}`, fn = (e, t) => !!e && Lt(t).has(e), ii = [
|
|
1392
1392
|
{ trigger: "@", icon: "person", tooltip: "Mention user" },
|
|
1393
1393
|
{ trigger: "@@", icon: "layers", tooltip: "Mention version" },
|
|
1394
1394
|
{ trigger: "@@@", icon: "check_circle", tooltip: "Mention task" }
|
|
@@ -1423,55 +1423,55 @@ const zn = (e) => {
|
|
|
1423
1423
|
isGuest: E,
|
|
1424
1424
|
userName: N,
|
|
1425
1425
|
editingId: G
|
|
1426
|
-
} =
|
|
1426
|
+
} = Le(), { hasLicense: X, onPowerFeature: Q, user: Z, openSlideOut: Y, commentFrameLink: L } = Be(), oe = Z?.data?.isAdmin, ae = za(), [, J] = En(), [j, de] = $(e || ""), [H, ee] = $(
|
|
1427
1427
|
() => t.map(
|
|
1428
1428
|
(d) => fn(d.id, e || "") ? { ...d, isInline: !0 } : d
|
|
1429
1429
|
)
|
|
1430
|
-
), [Oe, De] =
|
|
1430
|
+
), [Oe, De] = $(0), Ve = pe(/* @__PURE__ */ new Map()), [be, ge] = $([]), [Ge, ue] = $(!1), [xe, he] = $(!1), [Ne, Ie] = $([]), [et, Re] = $([]), { annotations: fe, removeAnnotation: He, goToAnnotation: qe } = $r({
|
|
1431
1431
|
entityId: w[0]?.id,
|
|
1432
1432
|
filesUploading: be
|
|
1433
|
-
}), re = w.length === 1 && w[0].entityType === "version" ? w[0] : void 0,
|
|
1433
|
+
}), re = w.length === 1 && w[0].entityType === "version" ? w[0] : void 0, tt = L?.draft && L.draft.entityId === re?.id ? L.draft : null, [je, We] = $(
|
|
1434
1434
|
() => u && Number.isSafeInteger(a?.startFrame) && a.startFrame > 0 ? {
|
|
1435
1435
|
startFrame: a.startFrame,
|
|
1436
1436
|
endFrame: Number.isSafeInteger(a.endFrame) && a.endFrame >= a.startFrame ? a.endFrame : a.startFrame
|
|
1437
1437
|
} : null
|
|
1438
|
-
), Ee = (d) => We(d && { ...d, entityId: re?.id }), Ue = u || je?.entityId === re?.id ? je : null, [ke, Me] =
|
|
1438
|
+
), Ee = (d) => We(d && { ...d, entityId: re?.id }), Ue = u || je?.entityId === re?.id ? je : null, [ke, Me] = $(!1), q = u ? Ue : Ue ?? tt, Pe = u ? !!re || !!Ue : !!L && !!re, T = L?.formatFrame, R = T ?? ((d) => Gn(d, o)), U = (d) => T ? pn(d) : ri(pn(d), o), v = q ? q.endFrame > q.startFrame ? `${R(q.startFrame)}-${R(q.endFrame)}` : R(q.startFrame) : void 0, [K, we] = $(v ?? ""), Ae = pe(!1), Fe = pe(null), $e = (d) => {
|
|
1439
1439
|
if (!re) return;
|
|
1440
1440
|
const k = d ? { ...d, entityId: re.id } : null;
|
|
1441
1441
|
if (!u) {
|
|
1442
|
-
|
|
1442
|
+
L?.setDraft(k);
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
|
-
r &&
|
|
1445
|
+
r && L?.setEditPreview({
|
|
1446
1446
|
activityId: r,
|
|
1447
1447
|
link: k
|
|
1448
1448
|
});
|
|
1449
1449
|
}, jt = (d) => {
|
|
1450
1450
|
we(d);
|
|
1451
1451
|
const k = U(d);
|
|
1452
|
-
k &&
|
|
1452
|
+
k && $e(k);
|
|
1453
1453
|
};
|
|
1454
1454
|
W(() => {
|
|
1455
1455
|
ke || we(v ?? "");
|
|
1456
1456
|
}, [v, ke]), W(
|
|
1457
1457
|
() => () => {
|
|
1458
|
-
u &&
|
|
1458
|
+
u && L?.setEditPreview(null);
|
|
1459
1459
|
},
|
|
1460
|
-
[u,
|
|
1460
|
+
[u, L?.setEditPreview]
|
|
1461
1461
|
);
|
|
1462
1462
|
const dt = () => {
|
|
1463
1463
|
if (Ae.current) {
|
|
1464
|
-
Ae.current = !1, we(v ?? ""),
|
|
1464
|
+
Ae.current = !1, we(v ?? ""), $e(Fe.current), Me(!1);
|
|
1465
1465
|
return;
|
|
1466
1466
|
}
|
|
1467
1467
|
const d = U(K);
|
|
1468
|
-
d ? (Ee(d),
|
|
1468
|
+
d ? (Ee(d), $e(d)) : (we(v ?? ""), $e(Fe.current)), Me(!1);
|
|
1469
1469
|
}, Qe = () => {
|
|
1470
|
-
Ee(null), u ?
|
|
1470
|
+
Ee(null), u ? $e(null) : L?.unlink();
|
|
1471
1471
|
}, Ye = () => {
|
|
1472
|
-
!u &&
|
|
1472
|
+
!u && L && re ? L.link(re.id) : (we(""), Me(!0));
|
|
1473
1473
|
}, bt = () => q ? Qe() : Ye(), ut = I(() => {
|
|
1474
|
-
if (!Pe || !u &&
|
|
1474
|
+
if (!Pe || !u && !L || !re) return;
|
|
1475
1475
|
const d = ["frame", "time", "timecode", "link", "range"];
|
|
1476
1476
|
return [
|
|
1477
1477
|
q ? {
|
|
@@ -1489,7 +1489,7 @@ const zn = (e) => {
|
|
|
1489
1489
|
run: Ye
|
|
1490
1490
|
}
|
|
1491
1491
|
];
|
|
1492
|
-
}, [Pe, u,
|
|
1492
|
+
}, [Pe, u, L, re?.id, !!q, v]), [_e, mt] = $(n);
|
|
1493
1493
|
zr({
|
|
1494
1494
|
draftKey: C && !u ? Ur(
|
|
1495
1495
|
f,
|
|
@@ -1502,12 +1502,12 @@ const zn = (e) => {
|
|
|
1502
1502
|
de(d.text), ee(d.files), Ie(d.uploadedAnnotations), mt(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !y && !G && D?.();
|
|
1503
1503
|
}
|
|
1504
1504
|
});
|
|
1505
|
-
const Ut = _.filter((d) => d.accessLevel >= 20), zt = _.find((d) => d.name === _e), Bt = Rn(zt?.color),
|
|
1505
|
+
const Ut = _.filter((d) => d.accessLevel >= 20), zt = _.find((d) => d.name === _e), Bt = Rn(zt?.color), Je = pe(null), Gt = pe(null), Ht = pe(null), pt = !!j.trim(), no = !pt && !H.length && !be.length && !Oe && !Ne.length && !fe.length && !xe, qt = !!S?.conditions?.some(
|
|
1506
1506
|
(d) => "key" in d && d.key === "checklists" && d.value === !0
|
|
1507
1507
|
);
|
|
1508
1508
|
W(() => {
|
|
1509
1509
|
if (!y || u || !qt) return;
|
|
1510
|
-
const d =
|
|
1510
|
+
const d = Je.current;
|
|
1511
1511
|
!d || !d.isEmpty() || d.getEditor().update(() => {
|
|
1512
1512
|
const k = Do(!1);
|
|
1513
1513
|
Io().clear().append(No("check").append(k)), k.select();
|
|
@@ -1530,14 +1530,14 @@ const zn = (e) => {
|
|
|
1530
1530
|
}, ro = ({ type: d, id: k, label: O }, V) => {
|
|
1531
1531
|
const { x: z, y: ce, width: le } = V.getBoundingClientRect();
|
|
1532
1532
|
J({ id: k, name: k, type: d, label: O, pos: { left: z + le / 2, top: ce } });
|
|
1533
|
-
}, [io, wt] =
|
|
1533
|
+
}, [io, wt] = $(!1);
|
|
1534
1534
|
W(() => {
|
|
1535
1535
|
y || wt(!1);
|
|
1536
1536
|
}, [y]);
|
|
1537
1537
|
const so = () => {
|
|
1538
1538
|
y || h || (wt(!0), D && D());
|
|
1539
1539
|
}, Yt = () => {
|
|
1540
|
-
u &&
|
|
1540
|
+
u && L?.setEditPreview(null), (!pt || u) && de(""), M && M(), Ht.current?.closest("#viewer-dialog")?.focus();
|
|
1541
1541
|
}, nt = ({ file: d, data: k }, O = !1) => {
|
|
1542
1542
|
const V = ve(d.name), z = {
|
|
1543
1543
|
id: k.id,
|
|
@@ -1570,7 +1570,7 @@ const zn = (e) => {
|
|
|
1570
1570
|
ge((k) => k.filter((O) => O.name !== ve(d)));
|
|
1571
1571
|
}, Jt = (d) => {
|
|
1572
1572
|
for (const k of d) {
|
|
1573
|
-
const O =
|
|
1573
|
+
const O = Ze(k, f, ot);
|
|
1574
1574
|
Ve.current.set(k, O), O.then(
|
|
1575
1575
|
(V) => nt(V),
|
|
1576
1576
|
(V) => {
|
|
@@ -1590,7 +1590,7 @@ const zn = (e) => {
|
|
|
1590
1590
|
mime: d.type
|
|
1591
1591
|
};
|
|
1592
1592
|
}
|
|
1593
|
-
const { data: O } = await
|
|
1593
|
+
const { data: O } = await Ze(d, f, void 0), V = ve(d.name);
|
|
1594
1594
|
return ee((z) => [
|
|
1595
1595
|
...z,
|
|
1596
1596
|
{ id: O.id, name: V, mime: d.type, size: d.size, order: z.length, isInline: !0 }
|
|
@@ -1612,14 +1612,14 @@ const zn = (e) => {
|
|
|
1612
1612
|
d.preventDefault(), d.stopPropagation(), ue(!0);
|
|
1613
1613
|
}, Kt = pe(null), po = async ({ activity: d }) => {
|
|
1614
1614
|
const k = yt(d);
|
|
1615
|
-
k && k.entityId === re?.id && (Ee({ startFrame: k.startFrame, endFrame: k.endFrame }),
|
|
1616
|
-
const O = Sn(d.body || ""), V = d.files || [], z =
|
|
1615
|
+
k && k.entityId === re?.id && (Ee({ startFrame: k.startFrame, endFrame: k.endFrame }), L?.setDraft(k));
|
|
1616
|
+
const O = Sn(d.body || ""), V = d.files || [], z = Lt(O), ce = w.length === 1 && w[0].id === (d.origin?.id ?? d.entityId), le = (B) => {
|
|
1617
1617
|
const me = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ie = `[Source](${ta(d.activityId, me)})`, te = [B.trim(), ie].filter(Boolean).join(`
|
|
1618
1618
|
|
|
1619
1619
|
`);
|
|
1620
1620
|
de((ye) => ye.trim() ? `${ye.trim()}
|
|
1621
1621
|
|
|
1622
|
-
${te}` : te),
|
|
1622
|
+
${te}` : te), Je.current?.focus();
|
|
1623
1623
|
}, ze = async (B) => {
|
|
1624
1624
|
const me = z.has(B.id);
|
|
1625
1625
|
try {
|
|
@@ -1684,7 +1684,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1684
1684
|
W(() => {
|
|
1685
1685
|
!p || Kt.current === p.key || (Kt.current = p.key, wt(!0), g?.(), po(p));
|
|
1686
1686
|
}, [p?.key]);
|
|
1687
|
-
const go =
|
|
1687
|
+
const go = Lr({
|
|
1688
1688
|
projectName: f,
|
|
1689
1689
|
onSuccess: nt,
|
|
1690
1690
|
onProgress: ot,
|
|
@@ -1701,7 +1701,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1701
1701
|
const { files: me, metadata: ie } = await go(fe);
|
|
1702
1702
|
d = me, k = [...k, ...ie], O = ie.map((te) => te.id), Re(O);
|
|
1703
1703
|
}
|
|
1704
|
-
const { annotations: V = [] } = a || {}, z = k.length ? [...V, ...k] : void 0, ce = Sr(
|
|
1704
|
+
const { annotations: V = [] } = a || {}, z = k.length ? [...V, ...k] : void 0, ce = Sr(Je.current?.getMarkdown() ?? j), le = H.filter((me) => !me.isInline || fn(me.id, ce)), ze = [...le, ...d], B = {
|
|
1705
1705
|
...a,
|
|
1706
1706
|
annotations: z,
|
|
1707
1707
|
// could be undefined
|
|
@@ -1715,7 +1715,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1715
1715
|
const me = j;
|
|
1716
1716
|
de(""), ee([]);
|
|
1717
1717
|
try {
|
|
1718
|
-
await l(ce, ze, B), O.forEach((ie) => He?.(ie)), u &&
|
|
1718
|
+
await l(ce, ze, B), O.forEach((ie) => He?.(ie)), u && L?.setEditPreview(null), Ie([]), !u && q && L?.unlink(), u || Ee(null);
|
|
1719
1719
|
} catch {
|
|
1720
1720
|
de(me), ee(le), Ie(Ne);
|
|
1721
1721
|
return;
|
|
@@ -1727,7 +1727,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1727
1727
|
Re([]), he(!1);
|
|
1728
1728
|
}
|
|
1729
1729
|
}, Xt = [
|
|
1730
|
-
...fe.filter((d) => !
|
|
1730
|
+
...fe.filter((d) => !et.includes(d.id)),
|
|
1731
1731
|
...(H || []).filter((d) => !d.isAnnotationLayer && !d.isInline),
|
|
1732
1732
|
...be
|
|
1733
1733
|
].sort((d, k) => d.order - k.order), fo = Xt.length > 3, Zt = (d) => h ? E ? "You do not have permission to comment." : "Commenting is disabled across multiple projects." : E || !d ? "Leave a comment" : "Comment, or type / to add mentions, checklists, code and more...", en = async (d) => {
|
|
@@ -1763,7 +1763,9 @@ ${te}` : te), tt.current?.focus();
|
|
|
1763
1763
|
{
|
|
1764
1764
|
value: _e,
|
|
1765
1765
|
categories: Ut,
|
|
1766
|
-
onChange: (d) =>
|
|
1766
|
+
onChange: (d) => {
|
|
1767
|
+
mt(d), requestAnimationFrame(() => Je.current?.focus());
|
|
1768
|
+
},
|
|
1767
1769
|
isCompact: u,
|
|
1768
1770
|
hasPowerpack: X,
|
|
1769
1771
|
onPowerFeature: Q,
|
|
@@ -1855,7 +1857,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1855
1857
|
/* @__PURE__ */ c(
|
|
1856
1858
|
Bo,
|
|
1857
1859
|
{
|
|
1858
|
-
ref:
|
|
1860
|
+
ref: Je,
|
|
1859
1861
|
className: "comment-editor",
|
|
1860
1862
|
value: j,
|
|
1861
1863
|
onChange: de,
|
|
@@ -1891,7 +1893,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
1891
1893
|
icon: k,
|
|
1892
1894
|
variant: "text",
|
|
1893
1895
|
onMouseDown: (V) => V.preventDefault(),
|
|
1894
|
-
onClick: () =>
|
|
1896
|
+
onClick: () => Je.current?.insertMentionTrigger(d),
|
|
1895
1897
|
"data-tooltip": O,
|
|
1896
1898
|
"data-shortcut": d
|
|
1897
1899
|
},
|
|
@@ -2174,7 +2176,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
2174
2176
|
categorySecondary: n,
|
|
2175
2177
|
categoryTertiary: a
|
|
2176
2178
|
}) => {
|
|
2177
|
-
const [r, s] =
|
|
2179
|
+
const [r, s] = $(!1), i = e.filter((l) => l.isActive).map((l) => l.type);
|
|
2178
2180
|
return /* @__PURE__ */ x(
|
|
2179
2181
|
mi,
|
|
2180
2182
|
{
|
|
@@ -2303,7 +2305,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
2303
2305
|
children: xi(a)
|
|
2304
2306
|
}
|
|
2305
2307
|
};
|
|
2306
|
-
}), o =
|
|
2308
|
+
}), o = Ke((n) => {
|
|
2307
2309
|
const a = window.getSelection();
|
|
2308
2310
|
if (!a || a.rangeCount === 0 || a.isCollapsed) return;
|
|
2309
2311
|
const r = a.getRangeAt(0), s = n.currentTarget;
|
|
@@ -2343,7 +2345,7 @@ ${te}` : te), tt.current?.focus();
|
|
|
2343
2345
|
const n = Si(e, t);
|
|
2344
2346
|
return /* @__PURE__ */ x(Di, { children: [
|
|
2345
2347
|
o,
|
|
2346
|
-
/* @__PURE__ */ x(Ni, { $color:
|
|
2348
|
+
/* @__PURE__ */ x(Ni, { $color: $t(n.color), style: { backgroundColor: n.color }, children: [
|
|
2347
2349
|
n.icon && /* @__PURE__ */ c(se, { icon: n.icon }),
|
|
2348
2350
|
e
|
|
2349
2351
|
] })
|
|
@@ -2449,16 +2451,16 @@ const Tt = F.span`
|
|
|
2449
2451
|
font-size: 12px;
|
|
2450
2452
|
font-weight: 800;
|
|
2451
2453
|
}
|
|
2452
|
-
`,
|
|
2454
|
+
`, $i = "#c5c5c5";
|
|
2453
2455
|
function Wn(e) {
|
|
2454
|
-
const { categories: t } =
|
|
2456
|
+
const { categories: t } = Le(), { categoryData: o, categoryNotFound: n } = I(() => {
|
|
2455
2457
|
let a = !1;
|
|
2456
2458
|
if (e) {
|
|
2457
2459
|
const r = t.find((s) => s.name === e);
|
|
2458
2460
|
return r || (a = !0), {
|
|
2459
2461
|
categoryData: r || {
|
|
2460
2462
|
name: e,
|
|
2461
|
-
color:
|
|
2463
|
+
color: $i
|
|
2462
2464
|
},
|
|
2463
2465
|
categoryNotFound: a
|
|
2464
2466
|
};
|
|
@@ -2470,7 +2472,7 @@ function Wn(e) {
|
|
|
2470
2472
|
}, [e, t]);
|
|
2471
2473
|
return { categoryData: o, categoryNotFound: n };
|
|
2472
2474
|
}
|
|
2473
|
-
const
|
|
2475
|
+
const Li = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (e) => !e || !e.name ? Vi : e.name === Li && !e.label ? Oi : e.label ? e.label : e.name, Pt = "anonymous.guest", ji = ({ isGuest: e, activity: t }) => {
|
|
2474
2476
|
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s = I(
|
|
2475
2477
|
() => [
|
|
2476
2478
|
Qn({ name: o, label: n }),
|
|
@@ -2667,12 +2669,12 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2667
2669
|
setEditingId: w,
|
|
2668
2670
|
isGuest: A,
|
|
2669
2671
|
userTeamNames: S
|
|
2670
|
-
} =
|
|
2672
|
+
} = Le(), P = pe(null), { toggleMenuOpen: _, menuOpen: E } = Ba(), { categoryData: N, categoryNotFound: G } = Wn(e?.activityData?.category), X = Rn(N?.color);
|
|
2671
2673
|
let {
|
|
2672
2674
|
body: Q,
|
|
2673
2675
|
authorName: Z,
|
|
2674
2676
|
authorFullName: Y,
|
|
2675
|
-
createdAt:
|
|
2677
|
+
createdAt: L,
|
|
2676
2678
|
referenceType: oe,
|
|
2677
2679
|
entityId: ae,
|
|
2678
2680
|
activityId: J,
|
|
@@ -2684,7 +2686,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2684
2686
|
Z || (Z = j?.name || ""), Y = Qn({ name: Z, label: Y });
|
|
2685
2687
|
const Oe = Ao(), De = `activity-comment-menu-${J}-${Oe}`, Ve = E === De, { onGoToFrame: be, setHighlightedActivities: ge, user: Ge, commentFrameLink: ue } = Be(), xe = !!Ge?.data?.isAdmin, he = de || xe, Ne = de || xe, Ie = () => {
|
|
2686
2688
|
w(J);
|
|
2687
|
-
},
|
|
2689
|
+
}, et = () => {
|
|
2688
2690
|
w(null);
|
|
2689
2691
|
}, Re = async (v, K, we) => {
|
|
2690
2692
|
await a?.(v, K, void 0, we), w(null);
|
|
@@ -2693,7 +2695,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2693
2695
|
}, qe = oe !== "origin" || u, re = async () => {
|
|
2694
2696
|
const v = wi(Q);
|
|
2695
2697
|
qe && ee && v.push({ id: ee.id, type: ee.type }), n && await n(J, ae, v);
|
|
2696
|
-
},
|
|
2698
|
+
}, tt = () => {
|
|
2697
2699
|
cr({
|
|
2698
2700
|
title: "Delete comment",
|
|
2699
2701
|
message: "Are you sure you want to delete this comment?",
|
|
@@ -2720,12 +2722,12 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2720
2722
|
activityId: J,
|
|
2721
2723
|
reaction: v.type
|
|
2722
2724
|
});
|
|
2723
|
-
}, Ue =
|
|
2725
|
+
}, Ue = Ke(
|
|
2724
2726
|
(v) => {
|
|
2725
2727
|
v.annotation && (be?.(v.annotation.range[0]), ge([J]));
|
|
2726
2728
|
},
|
|
2727
2729
|
[be]
|
|
2728
|
-
), ke = I(() =>
|
|
2730
|
+
), ke = I(() => Lt(Q), [Q]), Me = I(
|
|
2729
2731
|
() => (H || []).filter((v) => !ke.has(v.id)),
|
|
2730
2732
|
[H, ke]
|
|
2731
2733
|
), q = (v) => {
|
|
@@ -2755,7 +2757,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2755
2757
|
{
|
|
2756
2758
|
name: Z,
|
|
2757
2759
|
fullName: Y,
|
|
2758
|
-
date:
|
|
2760
|
+
date: L,
|
|
2759
2761
|
isRef: qe,
|
|
2760
2762
|
activity: e,
|
|
2761
2763
|
projectName: l,
|
|
@@ -2791,7 +2793,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2791
2793
|
activityId: J,
|
|
2792
2794
|
versionReview: !1,
|
|
2793
2795
|
isEditing: !0,
|
|
2794
|
-
onClose:
|
|
2796
|
+
onClose: et,
|
|
2795
2797
|
onSubmit: Re,
|
|
2796
2798
|
isOpen: !0,
|
|
2797
2799
|
...i
|
|
@@ -2907,7 +2909,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
2907
2909
|
children: /* @__PURE__ */ c(
|
|
2908
2910
|
Bi,
|
|
2909
2911
|
{
|
|
2910
|
-
onDelete: he && n ?
|
|
2912
|
+
onDelete: he && n ? tt : void 0,
|
|
2911
2913
|
onEdit: Ne ? Ie : void 0,
|
|
2912
2914
|
onCopyText: Pe ? () => Mn(Pe) : void 0,
|
|
2913
2915
|
onDuplicate: r ? () => r(e) : void 0,
|
|
@@ -3207,7 +3209,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
3207
3209
|
}) => {
|
|
3208
3210
|
const { onOpenViewer: s } = Be();
|
|
3209
3211
|
let { authorName: i, authorFullName: l, createdAt: m, versions: p = [] } = e;
|
|
3210
|
-
const g = a === "versions" || a && typeof a == "object" && a.conditions?.some((C) => C.key === "versions" && C.value === !0), [u, h] =
|
|
3212
|
+
const g = a === "versions" || a && typeof a == "object" && a.conditions?.some((C) => C.key === "versions" && C.value === !0), [u, h] = $(g), b = 2, [y, D] = $(!1), M = (C, f, w) => {
|
|
3211
3213
|
const A = fa(C);
|
|
3212
3214
|
s?.({
|
|
3213
3215
|
versionIds: [f],
|
|
@@ -3276,7 +3278,7 @@ const $i = "anonymous.guest", Oi = "Anonymous User", Vi = "unknown.user", Qn = (
|
|
|
3276
3278
|
] })
|
|
3277
3279
|
] });
|
|
3278
3280
|
}, ls = ({ activities: e, editProps: t, ...o }) => {
|
|
3279
|
-
const [n, a] =
|
|
3281
|
+
const [n, a] = $(!1);
|
|
3280
3282
|
return /* @__PURE__ */ x(Te, { children: [
|
|
3281
3283
|
/* @__PURE__ */ c(ss, { children: /* @__PURE__ */ x(Xn, { onClick: () => a(!n), children: [
|
|
3282
3284
|
/* @__PURE__ */ c(se, { icon: n ? "expand_less" : "chevron_right" }),
|
|
@@ -3450,7 +3452,7 @@ const us = F.ul`
|
|
|
3450
3452
|
userName: m,
|
|
3451
3453
|
userFullName: p,
|
|
3452
3454
|
activityTypes: g
|
|
3453
|
-
} =
|
|
3455
|
+
} = Le(), u = o.map((C) => C.id), h = ({
|
|
3454
3456
|
entityId: C,
|
|
3455
3457
|
newId: f,
|
|
3456
3458
|
subTitle: w,
|
|
@@ -3679,7 +3681,7 @@ const us = F.ul`
|
|
|
3679
3681
|
a = { ...s }, r = new Date(s.createdAt);
|
|
3680
3682
|
continue;
|
|
3681
3683
|
}
|
|
3682
|
-
const i = a.authorName === s.authorName, l = a.origin.id === s.entityId, m = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), u = r !== null &&
|
|
3684
|
+
const i = a.authorName === s.authorName, l = a.origin.id === s.entityId, m = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), u = r !== null && Xe(r) && Xe(p) && Math.abs(Ka(r, p)) <= 20;
|
|
3683
3685
|
i && u && l && m ? (s[o] !== void 0 && (a[o] = s[o]), a.activityData = {
|
|
3684
3686
|
...a.activityData,
|
|
3685
3687
|
oldValue: s.activityData.oldValue
|
|
@@ -3710,7 +3712,7 @@ const us = F.ul`
|
|
|
3710
3712
|
() => ws(i, ["version"], n),
|
|
3711
3713
|
[i, n]
|
|
3712
3714
|
), m = I(() => [...l].sort((D, M) => {
|
|
3713
|
-
const C = new Date(D.createdAt), f = new Date(M.createdAt), w =
|
|
3715
|
+
const C = new Date(D.createdAt), f = new Date(M.createdAt), w = Xe(C), A = Xe(f);
|
|
3714
3716
|
if (!w && !A)
|
|
3715
3717
|
return 0;
|
|
3716
3718
|
if (w) {
|
|
@@ -3973,7 +3975,7 @@ const us = F.ul`
|
|
|
3973
3975
|
), g = I(
|
|
3974
3976
|
() => Is(e, l),
|
|
3975
3977
|
[e, l]
|
|
3976
|
-
), [u, h] =
|
|
3978
|
+
), [u, h] = $(g), b = sr(), y = pe(null);
|
|
3977
3979
|
W(() => {
|
|
3978
3980
|
h(g);
|
|
3979
3981
|
}, [JSON.stringify(g)]), W(() => {
|
|
@@ -4080,7 +4082,7 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4080
4082
|
{ skip: !e || !r.length }
|
|
4081
4083
|
);
|
|
4082
4084
|
return I(() => ({ ...s, ...a }), [s, a]);
|
|
4083
|
-
}, Rc = 30,
|
|
4085
|
+
}, Rc = 30, $c = ({
|
|
4084
4086
|
disabled: e,
|
|
4085
4087
|
readOnly: t,
|
|
4086
4088
|
statuses: o = [],
|
|
@@ -4110,13 +4112,13 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4110
4112
|
isGuest: _,
|
|
4111
4113
|
searchText: E,
|
|
4112
4114
|
setSearchText: N
|
|
4113
|
-
} =
|
|
4115
|
+
} = Le(), {
|
|
4114
4116
|
openSlideOut: G,
|
|
4115
4117
|
highlightedActivities: X,
|
|
4116
4118
|
setHighlightedActivities: Q,
|
|
4117
4119
|
onOpenImage: Z,
|
|
4118
4120
|
setFeedAnnotations: Y,
|
|
4119
|
-
setFeedFrameLinks:
|
|
4121
|
+
setFeedFrameLinks: L,
|
|
4120
4122
|
user: oe
|
|
4121
4123
|
} = Be(), ae = S.conditions?.some(
|
|
4122
4124
|
(T) => "key" in T && T.key === "versions" && T.value === !0
|
|
@@ -4142,7 +4144,7 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4142
4144
|
const U = yt(R);
|
|
4143
4145
|
return U && { ...U, activityId: R.activityId };
|
|
4144
4146
|
}).filter((R) => !!R);
|
|
4145
|
-
|
|
4147
|
+
L(T);
|
|
4146
4148
|
}, [b]);
|
|
4147
4149
|
const Ge = _s({
|
|
4148
4150
|
projectName: i,
|
|
@@ -4181,7 +4183,7 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4181
4183
|
const {
|
|
4182
4184
|
submitComment: Ne,
|
|
4183
4185
|
updateComment: Ie,
|
|
4184
|
-
deleteComment:
|
|
4186
|
+
deleteComment: et,
|
|
4185
4187
|
submitReview: Re,
|
|
4186
4188
|
isSaving: fe
|
|
4187
4189
|
} = gs({
|
|
@@ -4190,12 +4192,12 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4190
4192
|
entities: l,
|
|
4191
4193
|
filter: S,
|
|
4192
4194
|
entityListId: n
|
|
4193
|
-
}), He =
|
|
4195
|
+
}), He = Ke(
|
|
4194
4196
|
async (T, R = [], U = {}) => {
|
|
4195
4197
|
await Ne(T, R, U), he.current && he.current.scrollTo({ top: 0 });
|
|
4196
4198
|
},
|
|
4197
4199
|
[Ne, he]
|
|
4198
|
-
), qe =
|
|
4200
|
+
), qe = Ke(
|
|
4199
4201
|
async (T) => {
|
|
4200
4202
|
await Re(T);
|
|
4201
4203
|
},
|
|
@@ -4206,19 +4208,19 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4206
4208
|
const v = U.checked, K = v ? "[ ]" : "[x]", we = v ? "[x]" : "[ ]", { body: Ae } = R, Fe = Array.from(
|
|
4207
4209
|
U.closest(".comment-body")?.querySelectorAll(".task-list-item") || []
|
|
4208
4210
|
).findIndex((_e) => _e === U.closest("li"));
|
|
4209
|
-
let
|
|
4211
|
+
let $e = Fe;
|
|
4210
4212
|
(Ae.match(/\[.\]/g) || []).forEach((_e, mt) => {
|
|
4211
|
-
_e !== K && mt < Fe &&
|
|
4213
|
+
_e !== K && mt < Fe && $e--;
|
|
4212
4214
|
});
|
|
4213
4215
|
const dt = [];
|
|
4214
4216
|
let Qe = -1;
|
|
4215
4217
|
for (; (Qe = Ae.indexOf(K, Qe + 1)) > -1; )
|
|
4216
4218
|
dt.push(Qe);
|
|
4217
|
-
const Ye = dt[
|
|
4219
|
+
const Ye = dt[$e];
|
|
4218
4220
|
if (Ye === void 0) return;
|
|
4219
4221
|
const bt = Ye + K.length, ut = Ae.slice(0, Ye) + we + Ae.slice(bt);
|
|
4220
4222
|
ut && Ie(R, ut, R.files);
|
|
4221
|
-
},
|
|
4223
|
+
}, tt = (T) => {
|
|
4222
4224
|
const { entityId: R, entityType: U, activityId: v } = T;
|
|
4223
4225
|
if (!U || !["version", "task", "folder"].includes(U))
|
|
4224
4226
|
return console.log("Entity type not supported yet");
|
|
@@ -4230,7 +4232,7 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4230
4232
|
files: v.files.filter((K) => vt(K.mime, K.ext))
|
|
4231
4233
|
})).filter((v) => v.files.length > 0);
|
|
4232
4234
|
Z?.({ files: U, activityId: R, index: T, projectName: i });
|
|
4233
|
-
}, [We, Ee] =
|
|
4235
|
+
}, [We, Ee] = $(null), Ue = !be && !t && !e, ke = Ke(
|
|
4234
4236
|
(T) => {
|
|
4235
4237
|
Ee({ key: xn(), activity: T }), u(rt);
|
|
4236
4238
|
},
|
|
@@ -4265,13 +4267,13 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4265
4267
|
activity: T,
|
|
4266
4268
|
annotationFrameStart: Ge[T.origin?.id],
|
|
4267
4269
|
onCheckChange: re,
|
|
4268
|
-
onDelete:
|
|
4270
|
+
onDelete: et,
|
|
4269
4271
|
onUpdate: async (R, U, v, K) => await Ie(T, R, U, K),
|
|
4270
4272
|
onDuplicate: Ue ? ke : void 0,
|
|
4271
4273
|
projectInfo: g,
|
|
4272
4274
|
projectName: i,
|
|
4273
4275
|
entityType: m,
|
|
4274
|
-
onReferenceClick:
|
|
4276
|
+
onReferenceClick: tt,
|
|
4275
4277
|
createdAts: l.map((R) => R.createdAt),
|
|
4276
4278
|
onFileExpand: je,
|
|
4277
4279
|
showOrigin: l.length > 1,
|
|
@@ -4299,7 +4301,7 @@ const Ps = (e) => !!e.activityData?.annotations?.length || !!yt(e), _s = ({ proj
|
|
|
4299
4301
|
children: /* @__PURE__ */ c(ms, { style: { height: 0 }, onClick: () => M(), children: D ? "Loading more..." : "Click to load more" })
|
|
4300
4302
|
}
|
|
4301
4303
|
),
|
|
4302
|
-
!y && !S.conditions?.length && !E && H?.createdAt &&
|
|
4304
|
+
!y && !S.conditions?.length && !E && H?.createdAt && Xe(new Date(H.createdAt)) && /* @__PURE__ */ c(Jn, { children: /* @__PURE__ */ x(Kn, { style: { alignItems: "center" }, children: [
|
|
4303
4305
|
/* @__PURE__ */ x(Rt, { children: [
|
|
4304
4306
|
"Folder created at ",
|
|
4305
4307
|
St(new Date(H.createdAt), "PPpp"),
|
|
@@ -4345,7 +4347,7 @@ export {
|
|
|
4345
4347
|
_c as S,
|
|
4346
4348
|
qr as a,
|
|
4347
4349
|
it as b,
|
|
4348
|
-
|
|
4350
|
+
$c as c,
|
|
4349
4351
|
Mc as d,
|
|
4350
4352
|
Tr as e,
|
|
4351
4353
|
Rc as f,
|