@ynput/ayon-frontend-shared 0.6.9 → 0.7.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/ContextMenu.es.js +44 -27
- package/dist/DetailsPanel.es.js +225 -224
- package/dist/ListTable.es.js +420 -420
- package/dist/NewEntity.es.js +42 -41
- package/dist/ProjectTreeTable.es.js +3517 -3378
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +366 -352
- package/dist/api.es.js +428 -413
- package/dist/chunks/Actions.es.js +18 -17
- package/dist/chunks/ColumnDropIndicator.es.js +19 -18
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +60 -59
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +15 -14
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +864 -859
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2457 -2196
- package/dist/chunks/PlayableIcon.es.js +77 -76
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +625 -609
- package/dist/chunks/SimpleForm.es.js +1 -1
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +954 -821
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +100 -99
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +222 -221
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3873 -3736
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +621 -499
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +43 -43
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +16 -15
- package/dist/components.es.js +565 -531
- package/dist/context.es.js +529 -503
- package/dist/hooks.es.js +13 -13
- package/dist/index.es.js +4 -4
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +123 -13
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +26 -1
- package/dist/types/Views.d.ts +2 -0
- package/dist/types/api.d.ts +2359 -590
- package/dist/types/components.d.ts +30 -4
- package/dist/types/context.d.ts +94 -2
- package/dist/types/util.d.ts +54 -0
- package/dist/util.es.js +129 -119
- package/package.json +2 -2
- package/dist/chunks/MenuItem.es.js +0 -420
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { v4 as
|
|
4
|
-
import ee, { clsx as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as k, Fragment as Ce } from "react/jsx-runtime";
|
|
2
|
+
import en, { useMemo as S, useState as L, useEffect as G, lazy as vo, Suspense as bo, useCallback as qe, useRef as ge, forwardRef as ft, useId as wo, Fragment as xo } from "react";
|
|
3
|
+
import { v4 as wn } from "uuid";
|
|
4
|
+
import ee, { clsx as xn } from "clsx";
|
|
5
|
+
import kn from "react-markdown";
|
|
6
|
+
import An from "remark-emoji";
|
|
7
7
|
import Fn from "remark-gfm";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import ko from "remark-directive";
|
|
9
|
+
import Ao from "remark-directive-rehype";
|
|
10
10
|
import { toast as Fe } from "react-toastify";
|
|
11
|
-
import { $createListItemNode as
|
|
12
|
-
import { $getRoot as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { _ as
|
|
11
|
+
import { $createListItemNode as Fo, $createListNode as Co } from "@lexical/list";
|
|
12
|
+
import { $getRoot as To } from "lexical";
|
|
13
|
+
import { Button as ct, Dialog as Do, getFileSizeString as No, Icon as se, theme as Cn, getTextColor as _t, Dropdown as So, SaveButton as Io, UserImage as Tn, SEARCH_FILTER_ID as Dn, buildFilterId as tn, getFilterFromId as Eo, SearchFilter as Mo } from "@ynput/ayon-react-components";
|
|
14
|
+
import { _ as Po, a2 as Nn, a3 as _o, H as Ro, a4 as Lo, a5 as nn, a6 as $o, a7 as Oo, a8 as Vo, y as jo, a9 as Uo, aa as zo, ab as Bo, ac as Go, ad as Ho, ae as qo, af as Wo, ag as Qo, ah as Yo, ai as Jo, aj as Ko, O as Rt, W as Sn, T as Xo, a1 as Zo, ak as ea, al as ta, am as na, an as oa, ao as aa, ap as ra, aq as on, ar as ia, b as sa, c as ca, i as la, as as da, S as ua, e as ma, L as pa } from "./PlayableIcon.es.js";
|
|
15
15
|
import "@lexical/code";
|
|
16
16
|
import "@lexical/rich-text";
|
|
17
17
|
import "@lexical/selection";
|
|
18
18
|
import "@lexical/utils";
|
|
19
19
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
20
20
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
21
|
-
import
|
|
22
|
-
import { C as
|
|
23
|
-
import { E as
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
21
|
+
import F, { css as Lt } from "styled-components";
|
|
22
|
+
import { C as ga } from "./CodeEditor.es.js";
|
|
23
|
+
import { E as St } from "./EmptyPlaceholder.es.js";
|
|
24
|
+
import "./EmptyPlaceholderFlex.styled.es.js";
|
|
25
|
+
import { a_ as ha, bt as an } from "./searchTerms.es.js";
|
|
26
|
+
import { bj as fa, bm as ya, aI as va, dl as ba, aV as wa, aP as xa, b2 as ka, O as Aa, bE as Fa, bl as Ca, bw as Ta, bq as Da, bk as Na, cD as Sa, c0 as Ia } from "./getUris.es.js";
|
|
27
27
|
import "primereact/confirmdialog";
|
|
28
28
|
import { union as Ea, isEqual as Ma } from "lodash";
|
|
29
|
-
import { b as Pa, F as _a, u as $e, a as
|
|
29
|
+
import { b as Pa, F as _a, u as $e, a as In, T as Ra, C as La } from "./ThumbnailSimple.es.js";
|
|
30
30
|
import "@module-federation/enhanced/runtime";
|
|
31
|
-
import { o as ze, x as $a,
|
|
31
|
+
import { o as ze, x as $a, a0 as yt, u as Oa } from "./TableExportContextInstance.es.js";
|
|
32
32
|
import "semver";
|
|
33
33
|
import "./ContextMenuContextInstance.es.js";
|
|
34
34
|
import "react-dom";
|
|
35
35
|
import "react-redux";
|
|
36
|
-
import
|
|
36
|
+
import "react-router-dom";
|
|
37
|
+
import { p as be } from "./parseFilename.es.js";
|
|
37
38
|
import $t from "axios";
|
|
38
|
-
import { b as
|
|
39
|
+
import { b as rn } from "./colorUtils.es.js";
|
|
39
40
|
import "./EntityTooltip.es.js";
|
|
40
|
-
import { isValid as
|
|
41
|
-
import "./
|
|
42
|
-
import { InView as
|
|
43
|
-
import { t as
|
|
44
|
-
import { r as
|
|
41
|
+
import { isValid as lt, isToday as Va, isSameYear as ja, isSameDay as Ua, isSameWeek as za, isSameMinute as Ba, format as sn, formatISO as Ga, differenceInMinutes as Ha, differenceInSeconds as qa, compareAsc as Wa } from "date-fns";
|
|
42
|
+
import { a as Qa, M as Ya } from "./Menu.es.js";
|
|
43
|
+
import { InView as Ja } from "react-intersection-observer";
|
|
44
|
+
import { t as Ka, c as Xa } from "./queryFilterToClientFilter.es.js";
|
|
45
|
+
import { r as Za, a as er, m as tr, u as nr } from "./useDateRangeFilter.es.js";
|
|
45
46
|
import "match-sorter";
|
|
46
|
-
import { c as
|
|
47
|
-
import { c as
|
|
48
|
-
import { g as
|
|
49
|
-
const
|
|
47
|
+
import { c as or } from "./confirmDelete.es.js";
|
|
48
|
+
import { c as En } from "./copyToClipboard.es.js";
|
|
49
|
+
import { g as cn } from "./realtimeUpdatesUtils.es.js";
|
|
50
|
+
const ar = ({
|
|
50
51
|
entities: e,
|
|
51
52
|
filter: t,
|
|
52
53
|
backendFilter: o,
|
|
@@ -54,7 +55,7 @@ const nr = ({
|
|
|
54
55
|
projectName: a,
|
|
55
56
|
entityType: r
|
|
56
57
|
}) => {
|
|
57
|
-
const i =
|
|
58
|
+
const i = S(
|
|
58
59
|
() => e.map((b) => ({ id: b.id, projectName: b.projectName, entityType: r })),
|
|
59
60
|
[e]
|
|
60
61
|
).map((b) => b.id), c = !e.length || !t || !n || !a, m = {
|
|
@@ -73,13 +74,13 @@ const nr = ({
|
|
|
73
74
|
fetchNextPage: v,
|
|
74
75
|
hasNextPage: y
|
|
75
76
|
} = fa(m, { skip: c });
|
|
76
|
-
const D =
|
|
77
|
+
const D = S(() => p?.pages ? p.pages.flatMap((b) => b.activities || []) : [], [p?.pages]), P = S(() => h?.pages ? h.pages.flatMap((b) => b.activities || []) : [], [h?.pages]), C = async () => {
|
|
77
78
|
if (!y) {
|
|
78
79
|
console.log("No more activities to load");
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
return console.log("loading next page..."), await v();
|
|
82
|
-
}, f =
|
|
83
|
+
}, f = S(() => {
|
|
83
84
|
if (!g) return !1;
|
|
84
85
|
const b = Ea(
|
|
85
86
|
P?.flatMap((T) => T.entityId ? T.entityId : [])
|
|
@@ -94,24 +95,24 @@ const nr = ({
|
|
|
94
95
|
hasNextPage: y,
|
|
95
96
|
loadNextPage: C
|
|
96
97
|
};
|
|
97
|
-
},
|
|
98
|
+
}, it = "__new__", Sc = ({ children: e, ...t }) => {
|
|
98
99
|
const { isGuest: o } = ze(), { data: n = [] } = ya({ projects: [t.projectName] }), { data: a = [] } = ha.useGetTeamsQuery(
|
|
99
100
|
{ projectName: t.projectName, showMembers: !0 },
|
|
100
101
|
{ skip: !t.projectName }
|
|
101
|
-
), r =
|
|
102
|
-
() => a.filter((
|
|
102
|
+
), r = S(
|
|
103
|
+
() => a.filter((U) => U.members?.some((de) => de.name === t.userName)).map((U) => U.name),
|
|
103
104
|
[a, t.userName]
|
|
104
105
|
), [s, i] = L({
|
|
105
106
|
operator: "and",
|
|
106
107
|
conditions: []
|
|
107
|
-
}), [c, m] = L(""), p = t.feedFilter ?? s, g = t.setFeedFilter ?? i, [u, h] = L(null), [v, y] = L(null), [D, { isLoading: P }] = va(), [C, { isLoading: f }] = ba(), [b, { isLoading: T }] = wa(), I = P || f || T, _ = async (
|
|
108
|
+
}), [c, m] = L(""), p = t.feedFilter ?? s, g = t.setFeedFilter ?? i, [u, h] = L(null), [v, y] = L(null), [D, { isLoading: P }] = va(), [C, { isLoading: f }] = ba(), [b, { isLoading: T }] = wa(), I = P || f || T, _ = async (U) => await D(U).unwrap(), R = async (U) => await C(U).unwrap(), E = async (U) => await b(U).unwrap(), [N] = xa(), [Q] = ka(), Y = async (U) => await N(U).unwrap(), H = async (U) => await Q(U).unwrap(), J = Aa(p), q = S(() => Pa(p), [p]), $ = ar({
|
|
108
109
|
entities: t.entities,
|
|
109
110
|
filter: p,
|
|
110
111
|
backendFilter: q,
|
|
111
112
|
activityTypes: J,
|
|
112
113
|
projectName: t.projectName,
|
|
113
114
|
entityType: t.entityType
|
|
114
|
-
}), { data: te = {} } =
|
|
115
|
+
}), { data: te = {} } = Fa(
|
|
115
116
|
{
|
|
116
117
|
suggestRequest: {
|
|
117
118
|
entityType: t.entityType,
|
|
@@ -125,7 +126,7 @@ const nr = ({
|
|
|
125
126
|
}), { data: W } = Ta(
|
|
126
127
|
{
|
|
127
128
|
projectName: t.projectName,
|
|
128
|
-
entityIds: t.entities.map((
|
|
129
|
+
entityIds: t.entities.map((U) => U.id)
|
|
129
130
|
},
|
|
130
131
|
{ skip: !t.projectName || !t.entities.length }
|
|
131
132
|
);
|
|
@@ -162,7 +163,7 @@ const nr = ({
|
|
|
162
163
|
children: e
|
|
163
164
|
}
|
|
164
165
|
);
|
|
165
|
-
},
|
|
166
|
+
}, rr = F.div`
|
|
166
167
|
display: grid;
|
|
167
168
|
grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
|
|
168
169
|
gap: var(--base-gap-large);
|
|
@@ -178,7 +179,7 @@ const nr = ({
|
|
|
178
179
|
301px + var(--padding-s) + var(--padding-s) + var(--base-gap-large)+ var(--base-gap-large)
|
|
179
180
|
);
|
|
180
181
|
overflow: auto;
|
|
181
|
-
`,
|
|
182
|
+
`, ir = F.div`
|
|
182
183
|
position: relative;
|
|
183
184
|
display: flex;
|
|
184
185
|
flex-direction: column;
|
|
@@ -224,7 +225,7 @@ const nr = ({
|
|
|
224
225
|
.download-icon {
|
|
225
226
|
color: var(--md-sys-color-outline);
|
|
226
227
|
}
|
|
227
|
-
`,
|
|
228
|
+
`, sr = F.footer`
|
|
228
229
|
background-color: var(--md-sys-color-surface-container-low);
|
|
229
230
|
display: flex;
|
|
230
231
|
align-items: center;
|
|
@@ -324,7 +325,7 @@ const nr = ({
|
|
|
324
325
|
}
|
|
325
326
|
}
|
|
326
327
|
}
|
|
327
|
-
`,
|
|
328
|
+
`, cr = F.div`
|
|
328
329
|
position: relative;
|
|
329
330
|
display: flex;
|
|
330
331
|
justify-content: center;
|
|
@@ -361,7 +362,7 @@ const nr = ({
|
|
|
361
362
|
&:hover .image-wrapper::after {
|
|
362
363
|
opacity: 0.8;
|
|
363
364
|
}
|
|
364
|
-
`,
|
|
365
|
+
`, ln = F.div`
|
|
365
366
|
position: absolute;
|
|
366
367
|
inset: 0;
|
|
367
368
|
display: flex;
|
|
@@ -400,7 +401,7 @@ const nr = ({
|
|
|
400
401
|
&.posterError {
|
|
401
402
|
background-color: transparent;
|
|
402
403
|
}
|
|
403
|
-
`,
|
|
404
|
+
`, lr = F.div`
|
|
404
405
|
display: none;
|
|
405
406
|
position: absolute;
|
|
406
407
|
left: 0;
|
|
@@ -409,7 +410,7 @@ const nr = ({
|
|
|
409
410
|
height: calc(100% - 20px);
|
|
410
411
|
width: 100%;
|
|
411
412
|
gap: 0;
|
|
412
|
-
`,
|
|
413
|
+
`, dn = F(ct)`
|
|
413
414
|
height: 100%;
|
|
414
415
|
width: 100%;
|
|
415
416
|
border: none;
|
|
@@ -420,7 +421,7 @@ const nr = ({
|
|
|
420
421
|
background: none;
|
|
421
422
|
opacity: 1;
|
|
422
423
|
}
|
|
423
|
-
`,
|
|
424
|
+
`, dr = F(Po)`
|
|
424
425
|
--icon-size: 32px;
|
|
425
426
|
top: calc(50% - 10px);
|
|
426
427
|
left: 50%;
|
|
@@ -432,7 +433,7 @@ const nr = ({
|
|
|
432
433
|
.icon {
|
|
433
434
|
font-size: var(--icon-size);
|
|
434
435
|
}
|
|
435
|
-
`,
|
|
436
|
+
`, Ic = F(Do)`
|
|
436
437
|
min-height: 90vh;
|
|
437
438
|
max-height: 90vh;
|
|
438
439
|
min-width: min(90vw, 100%);
|
|
@@ -517,7 +518,7 @@ const nr = ({
|
|
|
517
518
|
&:focus-visible {
|
|
518
519
|
outline: none;
|
|
519
520
|
}
|
|
520
|
-
`,
|
|
521
|
+
`, ur = F.img`
|
|
521
522
|
height: 100%;
|
|
522
523
|
width: 100%;
|
|
523
524
|
|
|
@@ -527,7 +528,7 @@ const nr = ({
|
|
|
527
528
|
max-width: 90vw;
|
|
528
529
|
min-width: 300px;
|
|
529
530
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
530
|
-
`,
|
|
531
|
+
`, Ec = F.div`
|
|
531
532
|
&.scrollable {
|
|
532
533
|
position: absolute;
|
|
533
534
|
inset: 56px;
|
|
@@ -539,7 +540,7 @@ const nr = ({
|
|
|
539
540
|
inset: 56px 0 0 0;
|
|
540
541
|
display: flex;
|
|
541
542
|
}
|
|
542
|
-
`,
|
|
543
|
+
`, un = F.div`
|
|
543
544
|
position: relative;
|
|
544
545
|
display: flex;
|
|
545
546
|
flex: 1;
|
|
@@ -556,19 +557,19 @@ const nr = ({
|
|
|
556
557
|
flex: 1;
|
|
557
558
|
min-width: 0;
|
|
558
559
|
}
|
|
559
|
-
`,
|
|
560
|
+
`, dt = (e, t) => `/api/projects/${t}/files/${e}`, mr = ({
|
|
560
561
|
file: e,
|
|
561
562
|
fullPreviews: t = ["png", "jpg", "jpeg", "gif", "svg", "webp"]
|
|
562
563
|
}) => {
|
|
563
564
|
const { id: o, projectName: n, mime: a } = e;
|
|
564
|
-
let r =
|
|
565
|
-
return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */ l(
|
|
566
|
-
},
|
|
565
|
+
let r = dt(o, n);
|
|
566
|
+
return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */ l(ur, { src: r, autoFocus: !0 });
|
|
567
|
+
}, pr = F(ga)`
|
|
567
568
|
border-radius: var(--border-radius-m);
|
|
568
569
|
height: 100%;
|
|
569
570
|
overflow: auto !important;
|
|
570
|
-
`,
|
|
571
|
-
let t =
|
|
571
|
+
`, gr = ({ file: e }) => {
|
|
572
|
+
let t = dt(e.id, e.projectName);
|
|
572
573
|
const [o, n] = L(""), [a, r] = L(null);
|
|
573
574
|
return G(() => {
|
|
574
575
|
(async () => {
|
|
@@ -582,11 +583,11 @@ const nr = ({
|
|
|
582
583
|
r(i.message);
|
|
583
584
|
}
|
|
584
585
|
})();
|
|
585
|
-
}, [e.projectName, e.id, t]), a ? /* @__PURE__ */
|
|
586
|
+
}, [e.projectName, e.id, t]), a ? /* @__PURE__ */ k("div", { children: [
|
|
586
587
|
"Error: ",
|
|
587
588
|
a
|
|
588
|
-
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ l(
|
|
589
|
-
},
|
|
589
|
+
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ l(kn, { remarkPlugins: [Fn, An], children: o }) : /* @__PURE__ */ l(pr, { value: o, language: e.extension, readOnly: !0 });
|
|
590
|
+
}, Mn = () => import("./VideoPlayer.es.js"), hr = vo(Mn), fr = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, yr = 1e4, vr = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", br = (e, t) => {
|
|
590
591
|
const [o, n] = L({ status: "loading" });
|
|
591
592
|
return G(() => {
|
|
592
593
|
n({ status: "loading" });
|
|
@@ -602,14 +603,14 @@ const nr = ({
|
|
|
602
603
|
width: r.videoWidth,
|
|
603
604
|
height: r.videoHeight
|
|
604
605
|
};
|
|
605
|
-
if (
|
|
606
|
+
if (fr(u)) {
|
|
606
607
|
i(), n({ status: "ready", metadata: u });
|
|
607
608
|
return;
|
|
608
609
|
}
|
|
609
610
|
p(`unusable metadata ${JSON.stringify(u)}`);
|
|
610
611
|
}
|
|
611
612
|
function m() {
|
|
612
|
-
a || (clearTimeout(s), p(
|
|
613
|
+
a || (clearTimeout(s), p(vr(r?.error ?? null)));
|
|
613
614
|
}
|
|
614
615
|
const p = (u) => {
|
|
615
616
|
const h = r?.preload === "metadata";
|
|
@@ -620,7 +621,7 @@ const nr = ({
|
|
|
620
621
|
console.warn(`[VideoMime] video cannot be played: ${u}`, e), n({ status: "error" });
|
|
621
622
|
};
|
|
622
623
|
function g(u) {
|
|
623
|
-
r = document.createElement("video"), r.preload = u, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"),
|
|
624
|
+
r = document.createElement("video"), r.preload = u, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"), yr), r.addEventListener("loadedmetadata", c), r.addEventListener("error", m), r.src = e;
|
|
624
625
|
}
|
|
625
626
|
return g("metadata"), () => {
|
|
626
627
|
a = !0, clearTimeout(s), i();
|
|
@@ -636,18 +637,18 @@ const nr = ({
|
|
|
636
637
|
codec: t?.codec
|
|
637
638
|
}
|
|
638
639
|
};
|
|
639
|
-
},
|
|
640
|
-
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r =
|
|
640
|
+
}, wr = ({ file: e }) => {
|
|
641
|
+
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = dt(t, o), s = br(r, a);
|
|
641
642
|
if (G(() => {
|
|
642
|
-
|
|
643
|
+
Mn();
|
|
643
644
|
}, []), s.status === "error")
|
|
644
|
-
return /* @__PURE__ */ l(
|
|
645
|
+
return /* @__PURE__ */ l(un, { children: /* @__PURE__ */ l(St, { icon: "videocam_off", message: "This video cannot be played in the browser", children: /* @__PURE__ */ k("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: [
|
|
645
646
|
"Download ",
|
|
646
647
|
n
|
|
647
648
|
] }) }) });
|
|
648
|
-
const i = /* @__PURE__ */ l(
|
|
649
|
-
return s.status === "loading" ? i : /* @__PURE__ */ l(
|
|
650
|
-
|
|
649
|
+
const i = /* @__PURE__ */ l(un, { children: /* @__PURE__ */ l(St, { icon: "hourglass_empty", message: "Loading video..." }) });
|
|
650
|
+
return s.status === "loading" ? i : /* @__PURE__ */ l(bo, { fallback: i, children: /* @__PURE__ */ l(
|
|
651
|
+
hr,
|
|
651
652
|
{
|
|
652
653
|
id: t,
|
|
653
654
|
name: n,
|
|
@@ -660,20 +661,20 @@ const nr = ({
|
|
|
660
661
|
codec: s.metadata.codec
|
|
661
662
|
}
|
|
662
663
|
) });
|
|
663
|
-
},
|
|
664
|
+
}, xr = {
|
|
664
665
|
image: {
|
|
665
|
-
component:
|
|
666
|
+
component: mr,
|
|
666
667
|
mimeTypes: ["image/"],
|
|
667
668
|
fullPreviews: ["png", "jpg", "jpeg", "gif", "svg", "webp"],
|
|
668
669
|
id: "image"
|
|
669
670
|
},
|
|
670
671
|
video: {
|
|
671
|
-
component:
|
|
672
|
+
component: wr,
|
|
672
673
|
mimeTypes: ["video/"],
|
|
673
674
|
id: "video"
|
|
674
675
|
},
|
|
675
676
|
text: {
|
|
676
|
-
component:
|
|
677
|
+
component: gr,
|
|
677
678
|
mimeTypes: ["text/", "application/json", "scss", "jsx"],
|
|
678
679
|
id: "text"
|
|
679
680
|
},
|
|
@@ -681,11 +682,11 @@ const nr = ({
|
|
|
681
682
|
component: null,
|
|
682
683
|
mimeTypes: ["pdf"],
|
|
683
684
|
id: "pdf",
|
|
684
|
-
callback: (e) => window.open(
|
|
685
|
+
callback: (e) => window.open(dt(e.id, e.projectName), "_blank")
|
|
685
686
|
}
|
|
686
|
-
},
|
|
687
|
+
}, vt = (e = "", t = "") => Object.values(xr).some(
|
|
687
688
|
({ mimeTypes: o = [] }) => o.some((n) => (e || t)?.includes(n))
|
|
688
|
-
),
|
|
689
|
+
), kr = {
|
|
689
690
|
// special cases
|
|
690
691
|
description: ["doc"],
|
|
691
692
|
folder_zip: ["zip"],
|
|
@@ -727,12 +728,12 @@ const nr = ({
|
|
|
727
728
|
filter_none: ["sequence"],
|
|
728
729
|
font_download: ["font"],
|
|
729
730
|
deployed_code: ["model", ".obj", ".abc", ".stl", ".fbx", ".gltf", ".glb", ".usd"]
|
|
730
|
-
},
|
|
731
|
-
for (const [t, o] of Object.entries(
|
|
731
|
+
}, Ar = (e) => {
|
|
732
|
+
for (const [t, o] of Object.entries(kr))
|
|
732
733
|
if (o.some((n) => e.includes(n)))
|
|
733
734
|
return t;
|
|
734
735
|
return "draft";
|
|
735
|
-
},
|
|
736
|
+
}, Fr = ({
|
|
736
737
|
name: e,
|
|
737
738
|
mime: t,
|
|
738
739
|
src: o,
|
|
@@ -750,44 +751,44 @@ const nr = ({
|
|
|
750
751
|
className: v,
|
|
751
752
|
...y
|
|
752
753
|
}) => {
|
|
753
|
-
const D = i && i < 100, [P, C] = L(!1), [f, b] = L(!1), { feedAnnotationsEnabled: T } = ze(), { entities: I } = $e(), _ = e.split("."), R = _.pop() || "", E = _.join("."),
|
|
754
|
-
/* @__PURE__ */ l("span", { className: "size", children:
|
|
755
|
-
/* @__PURE__ */ l(
|
|
756
|
-
] }), q =
|
|
754
|
+
const D = i && i < 100, [P, C] = L(!1), [f, b] = L(!1), { feedAnnotationsEnabled: T } = ze(), { entities: I } = $e(), _ = e.split("."), R = _.pop() || "", E = _.join("."), N = vt(t || "." + R), Q = t?.includes("image/") || !!n, H = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, J = /* @__PURE__ */ k(Ce, { children: [
|
|
755
|
+
/* @__PURE__ */ l("span", { className: "size", children: No(s) }),
|
|
756
|
+
/* @__PURE__ */ l(se, { icon: "download", className: "download-icon" })
|
|
757
|
+
] }), q = S(
|
|
757
758
|
() => n ?? a,
|
|
758
759
|
[n, a]
|
|
759
|
-
), $ =
|
|
760
|
+
), $ = S(() => I.at(0), [I]), te = S(() => {
|
|
760
761
|
if (!q?.range)
|
|
761
762
|
return [1, 1];
|
|
762
763
|
const oe = r === void 0 ? $?.attrib?.frameStart : r;
|
|
763
764
|
return Number.isFinite(oe) ? [oe - 1 + q.range[0], oe - 1 + q.range[1]] : q.range;
|
|
764
765
|
}, [q, r, $]);
|
|
765
|
-
return /* @__PURE__ */
|
|
766
|
-
|
|
766
|
+
return /* @__PURE__ */ k(
|
|
767
|
+
ir,
|
|
767
768
|
{
|
|
768
769
|
className: ee(v, {
|
|
769
770
|
compact: m,
|
|
770
771
|
isDownloadable: p,
|
|
771
|
-
isPreviewable:
|
|
772
|
+
isPreviewable: N,
|
|
772
773
|
isUnsavedAnnotation: !!n
|
|
773
774
|
}),
|
|
774
775
|
...y,
|
|
775
776
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
|
|
777
|
+
/* @__PURE__ */ k(
|
|
778
|
+
cr,
|
|
778
779
|
{
|
|
779
780
|
className: ee("content-wrapper", {
|
|
780
|
-
isPreviewable:
|
|
781
|
+
isPreviewable: N,
|
|
781
782
|
isUnsavedAnnotation: !!n
|
|
782
783
|
}),
|
|
783
784
|
children: [
|
|
784
|
-
/* @__PURE__ */ l(
|
|
785
|
+
/* @__PURE__ */ l(se, { icon: Ar(t || "." + R), className: "type-icon" }),
|
|
785
786
|
Q && o && /* @__PURE__ */ l(
|
|
786
|
-
|
|
787
|
+
ln,
|
|
787
788
|
{
|
|
788
789
|
className: ee({
|
|
789
790
|
"image-wrapper": !0,
|
|
790
|
-
isDownloadable: p ||
|
|
791
|
+
isDownloadable: p || N || n
|
|
791
792
|
}),
|
|
792
793
|
children: /* @__PURE__ */ l(
|
|
793
794
|
"img",
|
|
@@ -801,23 +802,23 @@ const nr = ({
|
|
|
801
802
|
)
|
|
802
803
|
}
|
|
803
804
|
),
|
|
804
|
-
H && /* @__PURE__ */
|
|
805
|
-
|
|
805
|
+
H && /* @__PURE__ */ k(
|
|
806
|
+
ln,
|
|
806
807
|
{
|
|
807
808
|
className: ee({
|
|
808
809
|
"image-wrapper": !0,
|
|
809
|
-
isDownloadable: p ||
|
|
810
|
+
isDownloadable: p || N,
|
|
810
811
|
posterError: f
|
|
811
812
|
}),
|
|
812
813
|
children: [
|
|
813
814
|
!f && /* @__PURE__ */ l("img", { src: H, onError: () => b(!0) }),
|
|
814
|
-
/* @__PURE__ */ l(
|
|
815
|
+
/* @__PURE__ */ l(dr, {})
|
|
815
816
|
]
|
|
816
817
|
}
|
|
817
818
|
),
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
/* @__PURE__ */ k(lr, { className: "expand-buttons", children: [
|
|
820
|
+
N && !u && /* @__PURE__ */ l(
|
|
821
|
+
dn,
|
|
821
822
|
{
|
|
822
823
|
"data-tooltip": "Open preview",
|
|
823
824
|
icon: "open_in_full",
|
|
@@ -826,7 +827,7 @@ const nr = ({
|
|
|
826
827
|
}
|
|
827
828
|
),
|
|
828
829
|
(n || T && a) && /* @__PURE__ */ l(
|
|
829
|
-
|
|
830
|
+
dn,
|
|
830
831
|
{
|
|
831
832
|
"data-tooltip": "Jump to annotation",
|
|
832
833
|
icon: "play_circle",
|
|
@@ -838,23 +839,23 @@ const nr = ({
|
|
|
838
839
|
]
|
|
839
840
|
}
|
|
840
841
|
),
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
|
|
842
|
+
/* @__PURE__ */ k(
|
|
843
|
+
sr,
|
|
843
844
|
{
|
|
844
845
|
className: ee({
|
|
845
846
|
inProgress: D,
|
|
846
|
-
isPreviewable:
|
|
847
|
+
isPreviewable: N && !u,
|
|
847
848
|
isDownloadable: p
|
|
848
849
|
}),
|
|
849
850
|
children: [
|
|
850
851
|
/* @__PURE__ */ l("span", { className: "progress", style: { right: `${100 - i}%` } }),
|
|
851
|
-
/* @__PURE__ */ l("div", { className: "name-wrapper", children: q ? /* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */ l(
|
|
852
|
+
/* @__PURE__ */ l("div", { className: "name-wrapper", children: q ? /* @__PURE__ */ k("span", { className: "name", children: [
|
|
853
|
+
/* @__PURE__ */ l(se, { icon: "draw" }),
|
|
853
854
|
te[0],
|
|
854
855
|
te[1] !== te[0] && ` - ${te[1]}`
|
|
855
|
-
] }) : /* @__PURE__ */
|
|
856
|
+
] }) : /* @__PURE__ */ k("span", { className: "name", children: [
|
|
856
857
|
E,
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ k("span", { className: "extension", children: [
|
|
858
859
|
".",
|
|
859
860
|
R
|
|
860
861
|
] })
|
|
@@ -863,11 +864,11 @@ const nr = ({
|
|
|
863
864
|
]
|
|
864
865
|
}
|
|
865
866
|
),
|
|
866
|
-
c && /* @__PURE__ */ l(
|
|
867
|
+
c && /* @__PURE__ */ l(ct, { className: "remove", onClick: c, icon: "close" })
|
|
867
868
|
]
|
|
868
869
|
}
|
|
869
870
|
);
|
|
870
|
-
},
|
|
871
|
+
}, Pn = ({
|
|
871
872
|
files: e = [],
|
|
872
873
|
activityId: t,
|
|
873
874
|
isCompact: o,
|
|
@@ -883,19 +884,19 @@ const nr = ({
|
|
|
883
884
|
if (!e.length) return null;
|
|
884
885
|
const g = qe(
|
|
885
886
|
(u) => {
|
|
886
|
-
const h = e.filter((y) =>
|
|
887
|
+
const h = e.filter((y) => vt(y.mime, y.ext)), v = h.findIndex((y) => y.id === e[u].id);
|
|
887
888
|
i?.({ files: h, index: v, activityId: t || "" });
|
|
888
889
|
},
|
|
889
890
|
[i]
|
|
890
891
|
);
|
|
891
|
-
return /* @__PURE__ */ l(
|
|
892
|
-
|
|
892
|
+
return /* @__PURE__ */ l(rr, { className: ee({ compact: o }), ...p, children: e.map((u, h) => /* @__PURE__ */ l(
|
|
893
|
+
Fr,
|
|
893
894
|
{
|
|
894
895
|
id: u.id || u.name,
|
|
895
896
|
name: u.name,
|
|
896
897
|
mime: u.mime || u.type,
|
|
897
898
|
size: u.size,
|
|
898
|
-
src: u.unsavedAnnotation ? u.thumbnail : u.id ?
|
|
899
|
+
src: u.unsavedAnnotation ? u.thumbnail : u.id ? dt(u.id, r) : void 0,
|
|
899
900
|
unsavedAnnotation: u.unsavedAnnotation,
|
|
900
901
|
savedAnnotation: u.annotation,
|
|
901
902
|
progress: u.progress,
|
|
@@ -909,7 +910,7 @@ const nr = ({
|
|
|
909
910
|
},
|
|
910
911
|
u.id || u.name
|
|
911
912
|
)) });
|
|
912
|
-
},
|
|
913
|
+
}, Cr = (e) => {
|
|
913
914
|
const t = /!\[.*?\]\((.*?)\)/g, o = e.match(t);
|
|
914
915
|
let n = e;
|
|
915
916
|
return o && o.forEach((a) => {
|
|
@@ -917,15 +918,15 @@ const nr = ({
|
|
|
917
918
|
const r = a.match(/\(([^)]+)\)/)[1], s = r.split("?")[0];
|
|
918
919
|
n = e.replace(r, s);
|
|
919
920
|
}), n;
|
|
920
|
-
},
|
|
921
|
+
}, Tr = new AbortController(), Dr = $t.CancelToken, Nr = Dr.source(), We = (e, t, o) => new Promise((n, a) => {
|
|
921
922
|
new FormData().append("image", e);
|
|
922
923
|
const s = {
|
|
923
|
-
signal:
|
|
924
|
-
cancelToken:
|
|
924
|
+
signal: Tr.signal,
|
|
925
|
+
cancelToken: Nr.token,
|
|
925
926
|
onUploadProgress: (i) => o && o(i, e),
|
|
926
927
|
headers: {
|
|
927
928
|
"Content-Type": e.type,
|
|
928
|
-
"x-file-name":
|
|
929
|
+
"x-file-name": be(e.name)
|
|
929
930
|
}
|
|
930
931
|
};
|
|
931
932
|
$t.post(`/api/projects/${t}/files`, e, s).then((i) => {
|
|
@@ -933,7 +934,7 @@ const nr = ({
|
|
|
933
934
|
}).catch((i) => {
|
|
934
935
|
console.error(i), a({ message: "Upload failed: " + i.response.data.detail });
|
|
935
936
|
});
|
|
936
|
-
}),
|
|
937
|
+
}), Sr = (e, t, o, n, a) => {
|
|
937
938
|
e.preventDefault(), e.stopPropagation();
|
|
938
939
|
let r = e.dataTransfer.files;
|
|
939
940
|
if (r?.length) {
|
|
@@ -946,17 +947,17 @@ const nr = ({
|
|
|
946
947
|
}
|
|
947
948
|
);
|
|
948
949
|
}
|
|
949
|
-
},
|
|
950
|
+
}, Ir = (e, t, o) => (t || console.warn("filterEntityAnnotations: entityId is empty"), Object.values(e).forEach((n) => {
|
|
950
951
|
n.versionId || console.warn("filterEntityAnnotations: annotation.versionId is empty", n);
|
|
951
952
|
}), Object.values(e).filter(
|
|
952
|
-
(n) => n.versionId === t && !o.some((a) => a.name ===
|
|
953
|
+
(n) => n.versionId === t && !o.some((a) => a.name === be(n.name))
|
|
953
954
|
).map((n) => ({
|
|
954
955
|
...n,
|
|
955
956
|
unsavedAnnotation: n
|
|
956
|
-
}))),
|
|
957
|
-
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = $e(), { onGoToFrame: s } = ze(), i =
|
|
957
|
+
}))), Er = ({ entityId: e, filesUploading: t }) => {
|
|
958
|
+
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = $e(), { onGoToFrame: s } = ze(), i = Ir(a || [], e, t);
|
|
958
959
|
return G(() => {
|
|
959
|
-
i.length > 0 && !o && n(
|
|
960
|
+
i.length > 0 && !o && n(it);
|
|
960
961
|
}, [i]), {
|
|
961
962
|
annotations: i,
|
|
962
963
|
goToAnnotation: (m) => {
|
|
@@ -965,15 +966,15 @@ const nr = ({
|
|
|
965
966
|
},
|
|
966
967
|
removeAnnotation: r
|
|
967
968
|
};
|
|
968
|
-
},
|
|
969
|
+
}, _n = (e) => S(() => {
|
|
969
970
|
if (!e)
|
|
970
971
|
return { primary: void 0, secondary: void 0 };
|
|
971
|
-
const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e, s =
|
|
972
|
+
const t = getComputedStyle(document.documentElement), o = t.getPropertyValue("--md-sys-color-surface-container").trim(), n = t.getPropertyValue("--md-sys-color-surface-container-high").trim(), a = o || e, r = n || e, s = rn(e, a, 0.1) || e, i = rn(e, r, 0.2) || e;
|
|
972
973
|
return {
|
|
973
974
|
primary: s,
|
|
974
975
|
secondary: i
|
|
975
976
|
};
|
|
976
|
-
}, [e]),
|
|
977
|
+
}, [e]), Mr = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
|
|
977
978
|
const { exportAnnotationComposite: r } = $e(), s = async (c) => {
|
|
978
979
|
const m = await r?.(c.id);
|
|
979
980
|
if (!m)
|
|
@@ -1015,38 +1016,38 @@ const nr = ({
|
|
|
1015
1016
|
return Fe.error("Upload failed: " + m.message), { files: [], metadata: [] };
|
|
1016
1017
|
}
|
|
1017
1018
|
};
|
|
1018
|
-
},
|
|
1019
|
+
}, Rn = "ayon-comment-draft/", Ln = 720 * 60 * 60 * 1e3, Pr = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, $n = (e) => {
|
|
1019
1020
|
try {
|
|
1020
1021
|
const t = localStorage.getItem(e);
|
|
1021
1022
|
return t ? JSON.parse(t) : null;
|
|
1022
1023
|
} catch {
|
|
1023
1024
|
return null;
|
|
1024
1025
|
}
|
|
1025
|
-
},
|
|
1026
|
+
}, _r = (e, t) => {
|
|
1026
1027
|
try {
|
|
1027
|
-
|
|
1028
|
+
Pr(t) ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ ...t, savedAt: Date.now() }));
|
|
1028
1029
|
} catch (o) {
|
|
1029
1030
|
console.warn("Could not save comment draft", o);
|
|
1030
1031
|
}
|
|
1031
|
-
},
|
|
1032
|
+
}, Rr = () => {
|
|
1032
1033
|
try {
|
|
1033
1034
|
const e = Date.now();
|
|
1034
1035
|
for (const t of Object.keys(localStorage)) {
|
|
1035
|
-
if (!t.startsWith(
|
|
1036
|
-
const o =
|
|
1037
|
-
(!o || e - o.savedAt >
|
|
1036
|
+
if (!t.startsWith(Rn)) continue;
|
|
1037
|
+
const o = $n(t);
|
|
1038
|
+
(!o || e - o.savedAt > Ln) && localStorage.removeItem(t);
|
|
1038
1039
|
}
|
|
1039
1040
|
} catch {
|
|
1040
1041
|
}
|
|
1041
|
-
},
|
|
1042
|
-
const a =
|
|
1042
|
+
}, Lr = (e, t, o) => e && t && o.length ? `${Rn}${e}/${t}/${[...o].sort().join(",")}` : null, $r = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
|
|
1043
|
+
const a = ge(null), r = ge(!1);
|
|
1043
1044
|
G(() => {
|
|
1044
1045
|
if (!e || o) return;
|
|
1045
1046
|
const s = a.current;
|
|
1046
1047
|
if (a.current = e, s === e) return;
|
|
1047
|
-
s ||
|
|
1048
|
-
const i =
|
|
1049
|
-
i && Date.now() - i.savedAt <=
|
|
1048
|
+
s || Rr();
|
|
1049
|
+
const i = $n(e);
|
|
1050
|
+
i && Date.now() - i.savedAt <= Ln ? (r.current = !0, n({
|
|
1050
1051
|
text: i.text ?? "",
|
|
1051
1052
|
files: i.files ?? [],
|
|
1052
1053
|
uploadedAnnotations: i.uploadedAnnotations ?? [],
|
|
@@ -1057,9 +1058,9 @@ const nr = ({
|
|
|
1057
1058
|
r.current = !1;
|
|
1058
1059
|
return;
|
|
1059
1060
|
}
|
|
1060
|
-
!e || o ||
|
|
1061
|
+
!e || o || _r(e, t);
|
|
1061
1062
|
}, [e, o, t.text, t.files, t.uploadedAnnotations, t.category]);
|
|
1062
|
-
},
|
|
1063
|
+
}, Or = "Category", Vr = F.div`
|
|
1063
1064
|
display: flex;
|
|
1064
1065
|
padding: 2px 4px;
|
|
1065
1066
|
justify-content: center;
|
|
@@ -1085,7 +1086,7 @@ const nr = ({
|
|
|
1085
1086
|
|
|
1086
1087
|
&.compact {
|
|
1087
1088
|
padding: 1px 2px;
|
|
1088
|
-
${
|
|
1089
|
+
${Cn.labelMedium}
|
|
1089
1090
|
}
|
|
1090
1091
|
|
|
1091
1092
|
&.editing {
|
|
@@ -1108,9 +1109,9 @@ const nr = ({
|
|
|
1108
1109
|
color: var(--md-sys-color-tertiary);
|
|
1109
1110
|
}
|
|
1110
1111
|
}
|
|
1111
|
-
`,
|
|
1112
|
+
`, st = ft(
|
|
1112
1113
|
({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style: s, className: i, ...c }, m) => /* @__PURE__ */ l(
|
|
1113
|
-
|
|
1114
|
+
Vr,
|
|
1114
1115
|
{
|
|
1115
1116
|
...c,
|
|
1116
1117
|
ref: m,
|
|
@@ -1129,10 +1130,10 @@ const nr = ({
|
|
|
1129
1130
|
color: _t(t)
|
|
1130
1131
|
}
|
|
1131
1132
|
},
|
|
1132
|
-
children: e ||
|
|
1133
|
+
children: e || Or
|
|
1133
1134
|
}
|
|
1134
1135
|
)
|
|
1135
|
-
),
|
|
1136
|
+
), jr = F.span`
|
|
1136
1137
|
display: flex;
|
|
1137
1138
|
justify-content: flex-start;
|
|
1138
1139
|
align-items: center;
|
|
@@ -1151,7 +1152,7 @@ const nr = ({
|
|
|
1151
1152
|
color: var(--md-sys-color-on-surface) !important;
|
|
1152
1153
|
}
|
|
1153
1154
|
}
|
|
1154
|
-
`,
|
|
1155
|
+
`, Ur = ft(
|
|
1155
1156
|
({
|
|
1156
1157
|
label: e,
|
|
1157
1158
|
color: t,
|
|
@@ -1163,8 +1164,8 @@ const nr = ({
|
|
|
1163
1164
|
style: i,
|
|
1164
1165
|
className: c,
|
|
1165
1166
|
...m
|
|
1166
|
-
}, p) => /* @__PURE__ */
|
|
1167
|
-
|
|
1167
|
+
}, p) => /* @__PURE__ */ k(
|
|
1168
|
+
jr,
|
|
1168
1169
|
{
|
|
1169
1170
|
...m,
|
|
1170
1171
|
className: ee(c, { selected: n }),
|
|
@@ -1173,7 +1174,7 @@ const nr = ({
|
|
|
1173
1174
|
children: [
|
|
1174
1175
|
a,
|
|
1175
1176
|
/* @__PURE__ */ l(
|
|
1176
|
-
|
|
1177
|
+
se,
|
|
1177
1178
|
{
|
|
1178
1179
|
icon: o || (s ? "clear" : "crop_square"),
|
|
1179
1180
|
style: { color: t || "" }
|
|
@@ -1184,7 +1185,7 @@ const nr = ({
|
|
|
1184
1185
|
]
|
|
1185
1186
|
}
|
|
1186
1187
|
)
|
|
1187
|
-
),
|
|
1188
|
+
), zr = "1.3.0", Br = F(So)`
|
|
1188
1189
|
button {
|
|
1189
1190
|
/* remove all styles and just use a wrapper */
|
|
1190
1191
|
background-color: unset !important;
|
|
@@ -1195,7 +1196,7 @@ const nr = ({
|
|
|
1195
1196
|
width: unset !important;
|
|
1196
1197
|
color: var(--md-sys-color-on-surface) !important;
|
|
1197
1198
|
}
|
|
1198
|
-
`,
|
|
1199
|
+
`, Gr = ({
|
|
1199
1200
|
value: e,
|
|
1200
1201
|
categories: t,
|
|
1201
1202
|
readonly: o,
|
|
@@ -1210,7 +1211,7 @@ const nr = ({
|
|
|
1210
1211
|
const m = t.find((u) => u.name === e), { color: p } = m || {};
|
|
1211
1212
|
if (!r)
|
|
1212
1213
|
return /* @__PURE__ */ l(
|
|
1213
|
-
|
|
1214
|
+
st,
|
|
1214
1215
|
{
|
|
1215
1216
|
value: null,
|
|
1216
1217
|
isPower: !0,
|
|
@@ -1221,17 +1222,17 @@ const nr = ({
|
|
|
1221
1222
|
}
|
|
1222
1223
|
);
|
|
1223
1224
|
if (o)
|
|
1224
|
-
return /* @__PURE__ */ l(
|
|
1225
|
+
return /* @__PURE__ */ l(st, { value: e, color: p, isCompact: a, style: c.style });
|
|
1225
1226
|
if (!t.length)
|
|
1226
1227
|
return /* @__PURE__ */ l(
|
|
1227
|
-
|
|
1228
|
+
st,
|
|
1228
1229
|
{
|
|
1229
1230
|
value: e,
|
|
1230
1231
|
color: p,
|
|
1231
1232
|
isCompact: a,
|
|
1232
1233
|
style: c.style,
|
|
1233
1234
|
onClick: () => Fe.warning(
|
|
1234
|
-
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${
|
|
1235
|
+
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${zr}.`
|
|
1235
1236
|
)
|
|
1236
1237
|
}
|
|
1237
1238
|
);
|
|
@@ -1245,14 +1246,14 @@ const nr = ({
|
|
|
1245
1246
|
}))
|
|
1246
1247
|
];
|
|
1247
1248
|
return /* @__PURE__ */ l(
|
|
1248
|
-
|
|
1249
|
+
Br,
|
|
1249
1250
|
{
|
|
1250
1251
|
options: g,
|
|
1251
1252
|
value: e ? [e] : [],
|
|
1252
1253
|
onChange: (u) => i(u[0]),
|
|
1253
|
-
valueTemplate: () => /* @__PURE__ */ l(
|
|
1254
|
+
valueTemplate: () => /* @__PURE__ */ l(st, { value: e, color: p, isCompact: a, isEditing: !0 }),
|
|
1254
1255
|
itemTemplate: (u, h, v, y) => /* @__PURE__ */ l(
|
|
1255
|
-
|
|
1256
|
+
Ur,
|
|
1256
1257
|
{
|
|
1257
1258
|
label: u.label,
|
|
1258
1259
|
color: u.color,
|
|
@@ -1264,28 +1265,28 @@ const nr = ({
|
|
|
1264
1265
|
...c
|
|
1265
1266
|
}
|
|
1266
1267
|
);
|
|
1267
|
-
},
|
|
1268
|
+
}, Hr = (e, { isGuest: t, isAdmin: o }) => !!(t || !e.length && !o), qr = ["tip", "status"], Wr = ["textDirective", "leafDirective", "containerDirective"], On = (e) => ({ type: "text", value: e }), Ft = (e) => ({ type: "paragraph", children: [On(e)] }), Qr = (e, t) => {
|
|
1268
1269
|
const o = e.position?.start.offset, n = e.position?.end.offset;
|
|
1269
1270
|
return o === void 0 || n === void 0 ? null : t.slice(o, n);
|
|
1270
|
-
},
|
|
1271
|
-
const o =
|
|
1271
|
+
}, Yr = (e, t) => {
|
|
1272
|
+
const o = Qr(e, t);
|
|
1272
1273
|
if (o === null) return null;
|
|
1273
|
-
if (e.type === "textDirective") return [
|
|
1274
|
-
if (e.type === "leafDirective") return [
|
|
1274
|
+
if (e.type === "textDirective") return [On(o)];
|
|
1275
|
+
if (e.type === "leafDirective") return [Ft(o)];
|
|
1275
1276
|
const [n, ...a] = o.split(`
|
|
1276
1277
|
`), r = a.length ? a[a.length - 1].match(/:{3,}\s*$/) : null;
|
|
1277
|
-
return [
|
|
1278
|
-
},
|
|
1278
|
+
return [Ft(n), ...e.children || [], ...r ? [Ft(r[0])] : []];
|
|
1279
|
+
}, Vn = (e, t, o) => {
|
|
1279
1280
|
if (!e.children) return;
|
|
1280
1281
|
const n = [];
|
|
1281
1282
|
for (const a of e.children) {
|
|
1282
|
-
const s =
|
|
1283
|
+
const s = Wr.includes(a.type) && !o.includes(a.name || "") ? Yr(a, t) : null;
|
|
1283
1284
|
n.push(...s || [a]);
|
|
1284
1285
|
}
|
|
1285
|
-
e.children = n, n.forEach((a) =>
|
|
1286
|
-
},
|
|
1287
|
-
|
|
1288
|
-
},
|
|
1286
|
+
e.children = n, n.forEach((a) => Vn(a, t, o));
|
|
1287
|
+
}, Jr = (e = qr) => (t, o) => {
|
|
1288
|
+
Vn(t, String(o.value ?? ""), e);
|
|
1289
|
+
}, jn = 1e4, Kr = F.span`
|
|
1289
1290
|
margin-left: auto;
|
|
1290
1291
|
color: var(--md-sys-color-outline);
|
|
1291
1292
|
user-select: none;
|
|
@@ -1298,27 +1299,27 @@ const nr = ({
|
|
|
1298
1299
|
min-width: 0;
|
|
1299
1300
|
max-width: fit-content;
|
|
1300
1301
|
|
|
1301
|
-
${
|
|
1302
|
-
`,
|
|
1302
|
+
${Cn.bodySmall}
|
|
1303
|
+
`, ut = ({ date: e, isExact: t, exactTooltip: o = !1, ...n }) => {
|
|
1303
1304
|
const [a, r] = L(!0), [s, i] = L(/* @__PURE__ */ new Date());
|
|
1304
1305
|
if (!e) return null;
|
|
1305
1306
|
const c = new Date(e);
|
|
1306
|
-
if (!
|
|
1307
|
+
if (!lt(c)) return null;
|
|
1307
1308
|
G(() => {
|
|
1308
1309
|
const b = setInterval(
|
|
1309
1310
|
() => i(/* @__PURE__ */ new Date()),
|
|
1310
|
-
|
|
1311
|
+
jn
|
|
1311
1312
|
);
|
|
1312
1313
|
return () => clearInterval(b);
|
|
1313
1314
|
}, []);
|
|
1314
|
-
const m = Va(c), p = ja(c, s), g = Ua(c, new Date(s.setDate(s.getDate() - 1))), u = za(c, s), h = Ba(c, s), v = g ? "" : p ? u ? "E" : "MMM d" : "MMM d yyyy", y = "h:mm a", D =
|
|
1315
|
+
const m = Va(c), p = ja(c, s), g = Ua(c, new Date(s.setDate(s.getDate() - 1))), u = za(c, s), h = Ba(c, s), v = g ? "" : p ? u ? "E" : "MMM d" : "MMM d yyyy", y = "h:mm a", D = S(() => Nn(c), [c]), P = S(() => m ? sn(c, `${v}, ${y}`) : sn(c, `EEEE, dd MMM yyyy ${y}`), [c, m]);
|
|
1315
1316
|
let C = a && !t ? D : P;
|
|
1316
1317
|
g && a && !t && (C = `Yesterday${C}`), h && (C = "Just now");
|
|
1317
1318
|
const f = () => {
|
|
1318
1319
|
r(!a);
|
|
1319
1320
|
};
|
|
1320
1321
|
return /* @__PURE__ */ l(
|
|
1321
|
-
|
|
1322
|
+
Kr,
|
|
1322
1323
|
{
|
|
1323
1324
|
className: ee("date"),
|
|
1324
1325
|
...n,
|
|
@@ -1331,66 +1332,66 @@ const nr = ({
|
|
|
1331
1332
|
}
|
|
1332
1333
|
);
|
|
1333
1334
|
};
|
|
1334
|
-
var
|
|
1335
|
-
const
|
|
1335
|
+
var Ne = /* @__PURE__ */ ((e) => (e.APPROVE = "approve", e.REQUEST_CHANGES = "request_changes", e))(Ne || {});
|
|
1336
|
+
const Un = (e) => {
|
|
1336
1337
|
switch (e) {
|
|
1337
|
-
case
|
|
1338
|
+
case Ne.REQUEST_CHANGES:
|
|
1338
1339
|
return "requested changes";
|
|
1339
|
-
case
|
|
1340
|
+
case Ne.APPROVE:
|
|
1340
1341
|
default:
|
|
1341
1342
|
return "approved this";
|
|
1342
1343
|
}
|
|
1343
|
-
},
|
|
1344
|
+
}, Xr = (e, t) => {
|
|
1344
1345
|
switch (e) {
|
|
1345
|
-
case
|
|
1346
|
+
case Ne.REQUEST_CHANGES:
|
|
1346
1347
|
return "Requested changes on " + t;
|
|
1347
|
-
case
|
|
1348
|
+
case Ne.APPROVE:
|
|
1348
1349
|
default:
|
|
1349
1350
|
return "Approved " + t;
|
|
1350
1351
|
}
|
|
1351
|
-
},
|
|
1352
|
+
}, zn = (e) => {
|
|
1352
1353
|
switch (e) {
|
|
1353
|
-
case
|
|
1354
|
+
case Ne.REQUEST_CHANGES:
|
|
1354
1355
|
return "refresh";
|
|
1355
|
-
case
|
|
1356
|
+
case Ne.APPROVE:
|
|
1356
1357
|
default:
|
|
1357
1358
|
return "task_alt";
|
|
1358
1359
|
}
|
|
1359
|
-
},
|
|
1360
|
+
}, Zr = ({ lastOwnVersionReview: e }) => {
|
|
1360
1361
|
const [t, o] = L(/* @__PURE__ */ new Date());
|
|
1361
1362
|
G(() => {
|
|
1362
|
-
const r = setInterval(() => o(/* @__PURE__ */ new Date()),
|
|
1363
|
+
const r = setInterval(() => o(/* @__PURE__ */ new Date()), jn);
|
|
1363
1364
|
return () => clearInterval(r);
|
|
1364
1365
|
}, []);
|
|
1365
|
-
const n =
|
|
1366
|
-
return /* @__PURE__ */
|
|
1367
|
-
/* @__PURE__ */ l(
|
|
1366
|
+
const n = S(() => e?.activityData?.feedback, [e]), a = S(() => e?.createdAt ? Nn(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
|
|
1367
|
+
return /* @__PURE__ */ k(_o, { className: xn(n), children: [
|
|
1368
|
+
/* @__PURE__ */ l(se, { icon: zn(n) }),
|
|
1368
1369
|
"You last ",
|
|
1369
|
-
|
|
1370
|
+
Un(n),
|
|
1370
1371
|
" ",
|
|
1371
1372
|
a,
|
|
1372
1373
|
" ",
|
|
1373
1374
|
a === "just now" ? "" : "ago"
|
|
1374
1375
|
] });
|
|
1375
|
-
},
|
|
1376
|
+
}, mn = (e) => {
|
|
1376
1377
|
const t = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(e.trim());
|
|
1377
1378
|
if (!t) return null;
|
|
1378
1379
|
const o = Number(t[1]), n = t[2] ? Number(t[2]) : o;
|
|
1379
1380
|
return Number.isSafeInteger(o) && o > 0 && Number.isSafeInteger(n) && n >= o ? { startFrame: o, endFrame: n } : null;
|
|
1380
|
-
}, It = (e) => typeof e == "number" && Number.isFinite(e) ? e - 1 : 0,
|
|
1381
|
+
}, It = (e) => typeof e == "number" && Number.isFinite(e) ? e - 1 : 0, Bn = (e, t) => String(e + It(t)), ei = (e, t) => {
|
|
1381
1382
|
if (!e) return null;
|
|
1382
1383
|
const o = e.startFrame - It(t), n = e.endFrame - It(t);
|
|
1383
1384
|
return o > 0 ? { startFrame: o, endFrame: n } : null;
|
|
1384
|
-
},
|
|
1385
|
+
}, pn = async (e, t, o, n, a) => {
|
|
1385
1386
|
const { data: r } = await $t.get(`/api/projects/${e}/files/${t}`, {
|
|
1386
1387
|
responseType: "blob"
|
|
1387
1388
|
}), s = new File([r], o, { type: n || r.type });
|
|
1388
1389
|
return We(s, e, a);
|
|
1389
|
-
},
|
|
1390
|
+
}, gn = (e, t) => `/api/projects/${e}/files/${t}`, hn = (e, t) => !!e && Rt(t).has(e), ti = [
|
|
1390
1391
|
{ trigger: "@", icon: "person", tooltip: "Mention user" },
|
|
1391
1392
|
{ trigger: "@@", icon: "layers", tooltip: "Mention version" },
|
|
1392
1393
|
{ trigger: "@@@", icon: "check_circle", tooltip: "Mention task" }
|
|
1393
|
-
],
|
|
1394
|
+
], Gn = ({
|
|
1394
1395
|
initValue: e,
|
|
1395
1396
|
initFiles: t = [],
|
|
1396
1397
|
annotationFrameStart: o,
|
|
@@ -1419,57 +1420,57 @@ const jn = (e) => {
|
|
|
1419
1420
|
mentionSuggestionsData: _,
|
|
1420
1421
|
categories: R,
|
|
1421
1422
|
isGuest: E,
|
|
1422
|
-
userName:
|
|
1423
|
+
userName: N,
|
|
1423
1424
|
editingId: Q
|
|
1424
|
-
} = $e(), { hasLicense: Y, onPowerFeature: H, user: J, openSlideOut: q, commentFrameLink: $ } = ze(), te = J?.data?.isAdmin, oe = $a(), [, W] =
|
|
1425
|
+
} = $e(), { hasLicense: Y, onPowerFeature: H, user: J, openSlideOut: q, commentFrameLink: $ } = ze(), te = J?.data?.isAdmin, oe = $a(), [, W] = In(), [U, de] = L(e || ""), [ae, ne] = L(
|
|
1425
1426
|
() => t.map(
|
|
1426
|
-
(d) =>
|
|
1427
|
+
(d) => hn(d.id, e || "") ? { ...d, isInline: !0 } : d
|
|
1427
1428
|
)
|
|
1428
|
-
), [
|
|
1429
|
+
), [Qe, we] = L(0), xe = ge(/* @__PURE__ */ new Map()), [ke, he] = L([]), [Me, K] = L(!1), [Te, Oe] = L(!1), [Se, De] = L([]), [Ye, Ve] = L([]), { annotations: fe, removeAnnotation: Be, goToAnnotation: Ge } = Er({
|
|
1429
1430
|
entityId: b[0]?.id,
|
|
1430
|
-
filesUploading:
|
|
1431
|
-
}),
|
|
1431
|
+
filesUploading: ke
|
|
1432
|
+
}), re = b.length === 1 && b[0].entityType === "version" ? b[0] : void 0, Je = $?.draft && $.draft.entityId === re?.id ? $.draft : null, [Pe, He] = L(
|
|
1432
1433
|
() => u && Number.isSafeInteger(a?.startFrame) && a.startFrame > 0 ? {
|
|
1433
1434
|
startFrame: a.startFrame,
|
|
1434
1435
|
endFrame: Number.isSafeInteger(a.endFrame) && a.endFrame >= a.startFrame ? a.endFrame : a.startFrame
|
|
1435
1436
|
} : null
|
|
1436
|
-
), _e = (d) => He(d && { ...d, entityId:
|
|
1437
|
-
if (!
|
|
1438
|
-
const
|
|
1437
|
+
), _e = (d) => He(d && { ...d, entityId: re?.id }), je = u || Pe?.entityId === re?.id ? Pe : null, [Ae, Re] = L(!1), w = u ? je : je ?? Je, M = u ? !!re || !!je : !!$ && !!re, O = $?.formatFrame, X = O ?? ((d) => Bn(d, o)), ue = (d) => O ? mn(d) : ei(mn(d), o), A = w ? w.endFrame > w.startFrame ? `${X(w.startFrame)}-${X(w.endFrame)}` : X(w.startFrame) : void 0, [me, ye] = L(A ?? ""), Ie = ge(!1), Ee = ge(null), Le = (d) => {
|
|
1438
|
+
if (!re) return;
|
|
1439
|
+
const x = d ? { ...d, entityId: re.id } : null;
|
|
1439
1440
|
if (!u) {
|
|
1440
|
-
$?.setDraft(
|
|
1441
|
+
$?.setDraft(x);
|
|
1441
1442
|
return;
|
|
1442
1443
|
}
|
|
1443
1444
|
r && $?.setEditPreview({
|
|
1444
1445
|
activityId: r,
|
|
1445
|
-
link:
|
|
1446
|
+
link: x
|
|
1446
1447
|
});
|
|
1447
|
-
},
|
|
1448
|
-
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1448
|
+
}, Ke = (d) => {
|
|
1449
|
+
ye(d);
|
|
1450
|
+
const x = ue(d);
|
|
1451
|
+
x && Le(x);
|
|
1451
1452
|
};
|
|
1452
1453
|
G(() => {
|
|
1453
|
-
|
|
1454
|
-
}, [
|
|
1454
|
+
Ae || ye(A ?? "");
|
|
1455
|
+
}, [A, Ae]), G(
|
|
1455
1456
|
() => () => {
|
|
1456
1457
|
u && $?.setEditPreview(null);
|
|
1457
1458
|
},
|
|
1458
1459
|
[u, $?.setEditPreview]
|
|
1459
1460
|
);
|
|
1460
1461
|
const Xe = () => {
|
|
1461
|
-
if (
|
|
1462
|
-
|
|
1462
|
+
if (Ie.current) {
|
|
1463
|
+
Ie.current = !1, ye(A ?? ""), Le(Ee.current), Re(!1);
|
|
1463
1464
|
return;
|
|
1464
1465
|
}
|
|
1465
1466
|
const d = ue(me);
|
|
1466
|
-
d ? (_e(d), Le(d)) : (
|
|
1467
|
+
d ? (_e(d), Le(d)) : (ye(A ?? ""), Le(Ee.current)), Re(!1);
|
|
1467
1468
|
}, mt = () => {
|
|
1468
1469
|
_e(null), u ? Le(null) : $?.unlink();
|
|
1469
|
-
},
|
|
1470
|
-
!u && $ &&
|
|
1471
|
-
},
|
|
1472
|
-
if (!M || !u && !$ || !
|
|
1470
|
+
}, Ze = () => {
|
|
1471
|
+
!u && $ && re ? $.link(re.id) : (ye(""), Re(!0));
|
|
1472
|
+
}, et = () => w ? mt() : Ze(), bt = S(() => {
|
|
1473
|
+
if (!M || !u && !$ || !re) return;
|
|
1473
1474
|
const d = ["frame", "time", "timecode", "link", "range"];
|
|
1474
1475
|
return [
|
|
1475
1476
|
w ? {
|
|
@@ -1477,245 +1478,245 @@ const jn = (e) => {
|
|
|
1477
1478
|
label: "Remove frame link",
|
|
1478
1479
|
icon: "timer_off",
|
|
1479
1480
|
keywords: [...d, "unlink", "remove"],
|
|
1480
|
-
hint:
|
|
1481
|
+
hint: A,
|
|
1481
1482
|
run: mt
|
|
1482
1483
|
} : {
|
|
1483
1484
|
id: "frame-link",
|
|
1484
1485
|
label: u ? "Add frame link" : "Link to current frame",
|
|
1485
1486
|
icon: "timer",
|
|
1486
1487
|
keywords: d,
|
|
1487
|
-
run:
|
|
1488
|
+
run: Ze
|
|
1488
1489
|
}
|
|
1489
1490
|
];
|
|
1490
|
-
}, [M, u, $,
|
|
1491
|
-
|
|
1492
|
-
draftKey: C && !u ?
|
|
1491
|
+
}, [M, u, $, re?.id, !!w, A]), [tt, Ot] = L(n);
|
|
1492
|
+
$r({
|
|
1493
|
+
draftKey: C && !u ? Lr(
|
|
1493
1494
|
f,
|
|
1494
|
-
|
|
1495
|
+
N,
|
|
1495
1496
|
b.map((d) => d.id)
|
|
1496
1497
|
) : null,
|
|
1497
|
-
draft: { text:
|
|
1498
|
-
paused:
|
|
1498
|
+
draft: { text: U, files: ae, uploadedAnnotations: Se, category: tt },
|
|
1499
|
+
paused: Te,
|
|
1499
1500
|
restore: (d) => {
|
|
1500
|
-
de(d.text), ne(d.files),
|
|
1501
|
+
de(d.text), ne(d.files), De(d.uploadedAnnotations), Ot(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !y && !Q && D?.();
|
|
1501
1502
|
}
|
|
1502
1503
|
});
|
|
1503
|
-
const Vt = R.filter((d) => d.accessLevel >= 20), jt = R.find((d) => d.name ===
|
|
1504
|
+
const Vt = R.filter((d) => d.accessLevel >= 20), jt = R.find((d) => d.name === tt), Ut = _n(jt?.color), nt = ge(null), zt = ge(null), Bt = ge(null), pt = !!U.trim(), Zn = !pt && !ae.length && !ke.length && !Qe && !Se.length && !fe.length && !Te, Gt = !!I?.conditions?.some(
|
|
1504
1505
|
(d) => "key" in d && d.key === "checklists" && d.value === !0
|
|
1505
1506
|
);
|
|
1506
1507
|
G(() => {
|
|
1507
|
-
if (!y || u || !
|
|
1508
|
-
const d =
|
|
1508
|
+
if (!y || u || !Gt) return;
|
|
1509
|
+
const d = nt.current;
|
|
1509
1510
|
!d || !d.isEmpty() || d.getEditor().update(() => {
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1511
|
+
const x = Fo(!1);
|
|
1512
|
+
To().clear().append(Co("check").append(x)), x.select();
|
|
1512
1513
|
});
|
|
1513
|
-
}, [y, u,
|
|
1514
|
-
const
|
|
1514
|
+
}, [y, u, Gt]);
|
|
1515
|
+
const Ht = b[0]?.entityType, qt = oe?.productTypes, eo = S(
|
|
1515
1516
|
() => E ? void 0 : {
|
|
1516
|
-
...
|
|
1517
|
+
...Ro({
|
|
1517
1518
|
suggestions: _,
|
|
1518
|
-
project: { productTypes:
|
|
1519
|
+
project: { productTypes: qt },
|
|
1519
1520
|
taskTypes: T?.taskTypes,
|
|
1520
|
-
entityType:
|
|
1521
|
+
entityType: Ht
|
|
1521
1522
|
}),
|
|
1522
1523
|
// keep the picker short
|
|
1523
1524
|
limit: 5
|
|
1524
1525
|
},
|
|
1525
|
-
[E, _,
|
|
1526
|
-
),
|
|
1527
|
-
d === "user" || d === "team" || q({ entityId:
|
|
1528
|
-
},
|
|
1529
|
-
const { x: z, y: ce, width: le } =
|
|
1530
|
-
W({ id:
|
|
1531
|
-
}, [
|
|
1526
|
+
[E, _, qt, T?.taskTypes, Ht]
|
|
1527
|
+
), to = ({ type: d, id: x }) => {
|
|
1528
|
+
d === "user" || d === "team" || q({ entityId: x, entityType: d, projectName: f });
|
|
1529
|
+
}, no = ({ type: d, id: x, label: V }, j) => {
|
|
1530
|
+
const { x: z, y: ce, width: le } = j.getBoundingClientRect();
|
|
1531
|
+
W({ id: x, name: x, type: d, label: V, pos: { left: z + le / 2, top: ce } });
|
|
1532
|
+
}, [oo, wt] = L(!1);
|
|
1532
1533
|
G(() => {
|
|
1533
1534
|
y || wt(!1);
|
|
1534
1535
|
}, [y]);
|
|
1535
|
-
const
|
|
1536
|
+
const ao = () => {
|
|
1536
1537
|
y || h || (wt(!0), D && D());
|
|
1537
|
-
},
|
|
1538
|
-
u && $?.setEditPreview(null), (!
|
|
1539
|
-
},
|
|
1540
|
-
const
|
|
1541
|
-
id:
|
|
1542
|
-
name:
|
|
1538
|
+
}, Wt = () => {
|
|
1539
|
+
u && $?.setEditPreview(null), (!pt || u) && de(""), P && P(), Bt.current?.closest("#viewer-dialog")?.focus();
|
|
1540
|
+
}, ot = ({ file: d, data: x }, V = !1) => {
|
|
1541
|
+
const j = be(d.name), z = {
|
|
1542
|
+
id: x.id,
|
|
1543
|
+
name: j,
|
|
1543
1544
|
mime: d.type,
|
|
1544
1545
|
size: d.size,
|
|
1545
|
-
order:
|
|
1546
|
-
isAnnotationLayer:
|
|
1546
|
+
order: ae.length,
|
|
1547
|
+
isAnnotationLayer: V
|
|
1547
1548
|
};
|
|
1548
|
-
return ne((ce) => [...ce, z]),
|
|
1549
|
-
(ce) => ce.filter((le) =>
|
|
1549
|
+
return ne((ce) => [...ce, z]), he(
|
|
1550
|
+
(ce) => ce.filter((le) => be(le.name) !== j)
|
|
1550
1551
|
), z;
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
const
|
|
1555
|
-
if (
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
const ce = z.find((B) =>
|
|
1559
|
-
name:
|
|
1560
|
-
progress:
|
|
1561
|
-
type:
|
|
1562
|
-
order: ce?.order ??
|
|
1552
|
+
}, ro = (d, x, V) => {
|
|
1553
|
+
V ? Be?.(d) : (ne((j) => j.filter((z) => z.id !== d)), he((j) => j.filter((z) => be(z.name) !== be(x))));
|
|
1554
|
+
}, at = (d, x) => {
|
|
1555
|
+
const V = Math.round(d.loaded * 100 / d.total);
|
|
1556
|
+
if (V !== 100) {
|
|
1557
|
+
const j = be(x.name);
|
|
1558
|
+
he((z) => {
|
|
1559
|
+
const ce = z.find((B) => be(B.name) === j), le = z.filter((B) => be(B.name) !== j), Ue = {
|
|
1560
|
+
name: j,
|
|
1561
|
+
progress: V,
|
|
1562
|
+
type: x.type,
|
|
1563
|
+
order: ce?.order ?? ae.length + z.length
|
|
1563
1564
|
};
|
|
1564
1565
|
return [...le, Ue];
|
|
1565
1566
|
});
|
|
1566
1567
|
}
|
|
1567
|
-
},
|
|
1568
|
-
|
|
1569
|
-
},
|
|
1570
|
-
for (const
|
|
1571
|
-
const
|
|
1572
|
-
xe.current.set(
|
|
1573
|
-
(
|
|
1574
|
-
(
|
|
1575
|
-
|
|
1568
|
+
}, gt = (d) => {
|
|
1569
|
+
he((x) => x.filter((V) => V.name !== be(d)));
|
|
1570
|
+
}, Qt = (d) => {
|
|
1571
|
+
for (const x of d) {
|
|
1572
|
+
const V = We(x, f, at);
|
|
1573
|
+
xe.current.set(x, V), V.then(
|
|
1574
|
+
(j) => ot(j),
|
|
1575
|
+
(j) => {
|
|
1576
|
+
gt(x.name), Fe.error(j.message), console.warn(j);
|
|
1576
1577
|
}
|
|
1577
1578
|
);
|
|
1578
1579
|
}
|
|
1579
|
-
},
|
|
1580
|
-
we((
|
|
1580
|
+
}, io = async (d) => {
|
|
1581
|
+
we((x) => x + 1);
|
|
1581
1582
|
try {
|
|
1582
|
-
const
|
|
1583
|
-
if (
|
|
1584
|
-
const { data: z } = await
|
|
1583
|
+
const x = xe.current.get(d);
|
|
1584
|
+
if (x) {
|
|
1585
|
+
const { data: z } = await x;
|
|
1585
1586
|
return ne((ce) => ce.map((le) => le.id === z.id ? { ...le, isInline: !0 } : le)), {
|
|
1586
|
-
src:
|
|
1587
|
-
name:
|
|
1587
|
+
src: gn(f, z.id),
|
|
1588
|
+
name: be(d.name),
|
|
1588
1589
|
mime: d.type
|
|
1589
1590
|
};
|
|
1590
1591
|
}
|
|
1591
|
-
const { data:
|
|
1592
|
+
const { data: V } = await We(d, f, void 0), j = be(d.name);
|
|
1592
1593
|
return ne((z) => [
|
|
1593
1594
|
...z,
|
|
1594
|
-
{ id:
|
|
1595
|
-
]), { src:
|
|
1596
|
-
} catch (
|
|
1597
|
-
throw xe.current.has(d) || Fe.error(
|
|
1595
|
+
{ id: V.id, name: j, mime: d.type, size: d.size, order: z.length, isInline: !0 }
|
|
1596
|
+
]), { src: gn(f, V.id), name: j, mime: d.type };
|
|
1597
|
+
} catch (x) {
|
|
1598
|
+
throw xe.current.has(d) || Fe.error(x?.message || "Upload failed"), x;
|
|
1598
1599
|
} finally {
|
|
1599
|
-
we((
|
|
1600
|
+
we((x) => x - 1);
|
|
1600
1601
|
}
|
|
1601
|
-
},
|
|
1602
|
-
|
|
1602
|
+
}, so = (d) => {
|
|
1603
|
+
K(!1), !d.defaultPrevented && Sr(
|
|
1603
1604
|
d,
|
|
1604
1605
|
f,
|
|
1606
|
+
at,
|
|
1605
1607
|
ot,
|
|
1606
|
-
|
|
1607
|
-
(k) => pt(k.name)
|
|
1608
|
+
(x) => gt(x.name)
|
|
1608
1609
|
);
|
|
1609
|
-
},
|
|
1610
|
-
d.preventDefault(), d.stopPropagation(),
|
|
1611
|
-
},
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1614
|
-
const
|
|
1615
|
-
const pe = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0),
|
|
1610
|
+
}, co = (d) => {
|
|
1611
|
+
d.preventDefault(), d.stopPropagation(), K(!0);
|
|
1612
|
+
}, Yt = ge(null), lo = async ({ activity: d }) => {
|
|
1613
|
+
const x = yt(d);
|
|
1614
|
+
x && x.entityId === re?.id && (_e({ startFrame: x.startFrame, endFrame: x.endFrame }), $?.setDraft(x));
|
|
1615
|
+
const V = Sn(d.body || ""), j = d.files || [], z = Rt(V), ce = b.length === 1 && b[0].id === (d.origin?.id ?? d.entityId), le = (B) => {
|
|
1616
|
+
const pe = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), ie = `[Source](${Xo(d.activityId, pe)})`, Z = [B.trim(), ie].filter(Boolean).join(`
|
|
1616
1617
|
|
|
1617
1618
|
`);
|
|
1618
|
-
de((
|
|
1619
|
+
de((ve) => ve.trim() ? `${ve.trim()}
|
|
1619
1620
|
|
|
1620
|
-
${Z}` : Z),
|
|
1621
|
+
${Z}` : Z), nt.current?.focus();
|
|
1621
1622
|
}, Ue = async (B) => {
|
|
1622
1623
|
const pe = z.has(B.id);
|
|
1623
1624
|
try {
|
|
1624
|
-
const
|
|
1625
|
+
const ie = await pn(
|
|
1625
1626
|
f,
|
|
1626
1627
|
B.id,
|
|
1627
1628
|
B.name,
|
|
1628
1629
|
B.mime,
|
|
1629
|
-
pe ? void 0 :
|
|
1630
|
+
pe ? void 0 : at
|
|
1630
1631
|
);
|
|
1631
1632
|
if (pe) {
|
|
1632
|
-
const { file:
|
|
1633
|
-
ne((
|
|
1634
|
-
...
|
|
1635
|
-
{ id:
|
|
1633
|
+
const { file: ve, data: rt } = ie, ht = be(ve.name);
|
|
1634
|
+
ne((Zt) => [
|
|
1635
|
+
...Zt,
|
|
1636
|
+
{ id: rt.id, name: ht, mime: ve.type, size: ve.size, order: Zt.length, isInline: pe }
|
|
1636
1637
|
]);
|
|
1637
|
-
} else
|
|
1638
|
+
} else ot(ie);
|
|
1638
1639
|
const Z = B.annotation;
|
|
1639
1640
|
if (Z && ce) {
|
|
1640
|
-
const
|
|
1641
|
+
const ve = await pn(
|
|
1641
1642
|
f,
|
|
1642
1643
|
Z.transparent,
|
|
1643
1644
|
`annotation-${B.name}`,
|
|
1644
1645
|
"image/png"
|
|
1645
1646
|
);
|
|
1646
|
-
|
|
1647
|
-
...
|
|
1647
|
+
ot(ve, !0), De((rt) => [
|
|
1648
|
+
...rt,
|
|
1648
1649
|
{
|
|
1649
1650
|
...Z,
|
|
1650
|
-
id: `${Z.id}-${
|
|
1651
|
-
composite:
|
|
1652
|
-
transparent:
|
|
1651
|
+
id: `${Z.id}-${wn()}`,
|
|
1652
|
+
composite: ie.data.id,
|
|
1653
|
+
transparent: ve.data.id
|
|
1653
1654
|
}
|
|
1654
1655
|
]);
|
|
1655
1656
|
}
|
|
1656
|
-
return [B.id,
|
|
1657
|
-
} catch (
|
|
1658
|
-
return
|
|
1657
|
+
return [B.id, ie.data.id];
|
|
1658
|
+
} catch (ie) {
|
|
1659
|
+
return gt(B.name), Fe.error(`Could not copy ${B.name}`), console.warn(ie), null;
|
|
1659
1660
|
}
|
|
1660
1661
|
};
|
|
1661
1662
|
we((B) => B + 1);
|
|
1662
1663
|
try {
|
|
1663
|
-
const B =
|
|
1664
|
+
const B = j.filter((Z) => z.has(Z.id)), pe = j.filter((Z) => !z.has(Z.id)), ie = Promise.all(pe.map(Ue));
|
|
1664
1665
|
if (B.length) {
|
|
1665
1666
|
const Z = new Map(
|
|
1666
1667
|
(await Promise.all(B.map(Ue))).filter(
|
|
1667
|
-
(
|
|
1668
|
+
(ve) => !!ve
|
|
1668
1669
|
)
|
|
1669
1670
|
);
|
|
1670
1671
|
le(
|
|
1671
|
-
|
|
1672
|
+
V.replace(
|
|
1672
1673
|
/(\/api\/projects\/[^/]+\/files\/)([\w-]+)/g,
|
|
1673
|
-
(
|
|
1674
|
+
(ve, rt, ht) => Z.has(ht) ? rt + Z.get(ht) : ve
|
|
1674
1675
|
)
|
|
1675
1676
|
);
|
|
1676
|
-
} else le(
|
|
1677
|
-
await
|
|
1677
|
+
} else le(V);
|
|
1678
|
+
await ie;
|
|
1678
1679
|
} finally {
|
|
1679
1680
|
we((B) => B - 1);
|
|
1680
1681
|
}
|
|
1681
1682
|
};
|
|
1682
1683
|
G(() => {
|
|
1683
|
-
!p ||
|
|
1684
|
+
!p || Yt.current === p.key || (Yt.current = p.key, wt(!0), g?.(), lo(p));
|
|
1684
1685
|
}, [p?.key]);
|
|
1685
|
-
const
|
|
1686
|
+
const uo = Mr({
|
|
1686
1687
|
projectName: f,
|
|
1687
|
-
onSuccess:
|
|
1688
|
-
onProgress:
|
|
1688
|
+
onSuccess: ot,
|
|
1689
|
+
onProgress: at,
|
|
1689
1690
|
// seed progress so the card switches to uploading before the export finishes
|
|
1690
|
-
onStart: (d) =>
|
|
1691
|
-
onError: (d) =>
|
|
1692
|
-
}),
|
|
1691
|
+
onStart: (d) => at({ loaded: 1, total: 100 }, { name: d.name, type: "image/png" }),
|
|
1692
|
+
onError: (d) => gt(d.name)
|
|
1693
|
+
}), mo = ke.length > 0 || Qe > 0, xt = Te || mo, kt = async () => {
|
|
1693
1694
|
if (!xt)
|
|
1694
1695
|
try {
|
|
1695
1696
|
Oe(!0);
|
|
1696
|
-
let d = [],
|
|
1697
|
-
if (
|
|
1698
|
-
Ve(
|
|
1699
|
-
const { files: pe, metadata:
|
|
1700
|
-
d = pe,
|
|
1697
|
+
let d = [], x = Se, V = [];
|
|
1698
|
+
if (fe.length) {
|
|
1699
|
+
Ve(fe.map((Z) => Z.id));
|
|
1700
|
+
const { files: pe, metadata: ie } = await uo(fe);
|
|
1701
|
+
d = pe, x = [...x, ...ie], V = ie.map((Z) => Z.id), Ve(V);
|
|
1701
1702
|
}
|
|
1702
|
-
const { annotations:
|
|
1703
|
+
const { annotations: j = [] } = a || {}, z = x.length ? [...j, ...x] : void 0, ce = Cr(nt.current?.getMarkdown() ?? U), le = ae.filter((pe) => !pe.isInline || hn(pe.id, ce)), Ue = [...le, ...d], B = {
|
|
1703
1704
|
...a,
|
|
1704
1705
|
annotations: z,
|
|
1705
1706
|
// could be undefined
|
|
1706
|
-
category: E ? null :
|
|
1707
|
+
category: E ? null : tt,
|
|
1707
1708
|
// guests cannot set category (it is done by default on backend)
|
|
1708
1709
|
// one frame link per comment, stored as metadata rather than in the text
|
|
1709
1710
|
startFrame: w?.startFrame ?? void 0,
|
|
1710
1711
|
endFrame: w?.endFrame ?? void 0
|
|
1711
1712
|
};
|
|
1712
1713
|
if ((ce || Ue.length) && c) {
|
|
1713
|
-
const pe =
|
|
1714
|
+
const pe = U;
|
|
1714
1715
|
de(""), ne([]);
|
|
1715
1716
|
try {
|
|
1716
|
-
await c(ce, Ue, B),
|
|
1717
|
+
await c(ce, Ue, B), V.forEach((ie) => Be?.(ie)), u && $?.setEditPreview(null), De([]), !u && w && $?.unlink(), u || _e(null);
|
|
1717
1718
|
} catch {
|
|
1718
|
-
de(pe), ne(le),
|
|
1719
|
+
de(pe), ne(le), De(Se);
|
|
1719
1720
|
return;
|
|
1720
1721
|
}
|
|
1721
1722
|
}
|
|
@@ -1724,52 +1725,52 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1724
1725
|
} finally {
|
|
1725
1726
|
Ve([]), Oe(!1);
|
|
1726
1727
|
}
|
|
1727
|
-
},
|
|
1728
|
-
...
|
|
1729
|
-
...(
|
|
1730
|
-
...
|
|
1731
|
-
].sort((d,
|
|
1728
|
+
}, Jt = [
|
|
1729
|
+
...fe.filter((d) => !Ye.includes(d.id)),
|
|
1730
|
+
...(ae || []).filter((d) => !d.isAnnotationLayer && !d.isInline),
|
|
1731
|
+
...ke
|
|
1732
|
+
].sort((d, x) => d.order - x.order), po = Jt.length > 3, Kt = (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...", Xt = async (d) => {
|
|
1732
1733
|
if (m)
|
|
1733
1734
|
try {
|
|
1734
|
-
(
|
|
1735
|
-
} catch (
|
|
1736
|
-
console.error(
|
|
1735
|
+
(pt || ae.length > 0 || fe.length > 0) && await kt(), m(d);
|
|
1736
|
+
} catch (x) {
|
|
1737
|
+
console.error(x), Fe.error("Something went wrong while submitting the review");
|
|
1737
1738
|
}
|
|
1738
|
-
},
|
|
1739
|
+
}, go = s && m && !h && /* @__PURE__ */ k(Lo, { className: ee("version-review-buttons", { guest: E }), children: [
|
|
1739
1740
|
/* @__PURE__ */ l(
|
|
1740
|
-
|
|
1741
|
+
nn,
|
|
1741
1742
|
{
|
|
1742
1743
|
icon: "check",
|
|
1743
1744
|
variant: "tertiary",
|
|
1744
1745
|
"data-tooltip": "Approve",
|
|
1745
|
-
onClick: () => Xt(
|
|
1746
|
+
onClick: () => Xt(Ne.APPROVE),
|
|
1746
1747
|
children: /* @__PURE__ */ l("span", { className: "label", children: "Approve" })
|
|
1747
1748
|
}
|
|
1748
1749
|
),
|
|
1749
1750
|
/* @__PURE__ */ l(
|
|
1750
|
-
|
|
1751
|
+
nn,
|
|
1751
1752
|
{
|
|
1752
1753
|
icon: "refresh",
|
|
1753
1754
|
variant: "danger",
|
|
1754
1755
|
"data-tooltip": "Request changes",
|
|
1755
|
-
onClick: () => Xt(
|
|
1756
|
+
onClick: () => Xt(Ne.REQUEST_CHANGES),
|
|
1756
1757
|
children: /* @__PURE__ */ l("span", { className: "label", children: "Request changes" })
|
|
1757
1758
|
}
|
|
1758
1759
|
)
|
|
1759
|
-
] }),
|
|
1760
|
-
|
|
1760
|
+
] }), At = !E && /* @__PURE__ */ l(
|
|
1761
|
+
Gr,
|
|
1761
1762
|
{
|
|
1762
|
-
value:
|
|
1763
|
+
value: tt,
|
|
1763
1764
|
categories: Vt,
|
|
1764
1765
|
onChange: (d) => Ot(d),
|
|
1765
1766
|
isCompact: u,
|
|
1766
1767
|
hasPowerpack: Y,
|
|
1767
1768
|
onPowerFeature: H,
|
|
1768
|
-
isHidden:
|
|
1769
|
+
isHidden: Hr(Vt, { isGuest: E, isAdmin: te })
|
|
1769
1770
|
}
|
|
1770
|
-
),
|
|
1771
|
+
), ho = /* @__PURE__ */ k(Ce, { children: [
|
|
1771
1772
|
/* @__PURE__ */ l(
|
|
1772
|
-
|
|
1773
|
+
ct,
|
|
1773
1774
|
{
|
|
1774
1775
|
icon: "attach_file",
|
|
1775
1776
|
variant: "text",
|
|
@@ -1787,46 +1788,50 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1787
1788
|
multiple: !0,
|
|
1788
1789
|
hidden: !0,
|
|
1789
1790
|
onChange: (d) => {
|
|
1790
|
-
|
|
1791
|
+
Qt(Array.from(d.target.files || [])), d.target.value = "";
|
|
1791
1792
|
}
|
|
1792
1793
|
}
|
|
1793
1794
|
)
|
|
1794
|
-
] }),
|
|
1795
|
-
return /* @__PURE__ */ l(
|
|
1796
|
-
|
|
1795
|
+
] }), fo = u || oo, yo = `calc(${Math.max((Ae ? me || "Frame or range" : A || "").length, 1) + 2}ch + 16px)`;
|
|
1796
|
+
return /* @__PURE__ */ l(Ce, { children: /* @__PURE__ */ k(
|
|
1797
|
+
$o,
|
|
1797
1798
|
{
|
|
1799
|
+
ref: Bt,
|
|
1798
1800
|
className: ee("comment-container", "md-mention-anchor", { isOpen: y, isEditing: u }),
|
|
1799
|
-
onDragOver:
|
|
1800
|
-
onDragLeave: () =>
|
|
1801
|
-
onDrop:
|
|
1802
|
-
onClick: () =>
|
|
1803
|
-
onKeyDown: (d) =>
|
|
1801
|
+
onDragOver: co,
|
|
1802
|
+
onDragLeave: () => K(!1),
|
|
1803
|
+
onDrop: so,
|
|
1804
|
+
onClick: () => K(!1),
|
|
1805
|
+
onKeyDown: (d) => {
|
|
1806
|
+
const x = d.key === "ArrowUp" || d.key === "ArrowDown", V = d.target.isContentEditable;
|
|
1807
|
+
x && V && Zn && !u || d.stopPropagation();
|
|
1808
|
+
},
|
|
1804
1809
|
children: [
|
|
1805
|
-
s && i && /* @__PURE__ */ l(
|
|
1806
|
-
/* @__PURE__ */
|
|
1807
|
-
|
|
1810
|
+
s && i && /* @__PURE__ */ l(Zr, { lastOwnVersionReview: i }),
|
|
1811
|
+
/* @__PURE__ */ k(
|
|
1812
|
+
Oo,
|
|
1808
1813
|
{
|
|
1809
1814
|
className: ee("block-shortcuts", {
|
|
1810
1815
|
isOpen: y,
|
|
1811
1816
|
isClosed: !y || h,
|
|
1812
1817
|
isEditing: u,
|
|
1813
|
-
isDropping:
|
|
1818
|
+
isDropping: Me,
|
|
1814
1819
|
disabled: h,
|
|
1815
1820
|
isLoading: v,
|
|
1816
|
-
isSubmitting:
|
|
1817
|
-
category: !!
|
|
1821
|
+
isSubmitting: Te,
|
|
1822
|
+
category: !!tt && !E
|
|
1818
1823
|
}),
|
|
1819
|
-
onClick:
|
|
1824
|
+
onClick: ao,
|
|
1820
1825
|
$categoryPrimary: jt?.color,
|
|
1821
1826
|
$categoryTertiary: Ut.primary,
|
|
1822
1827
|
$categorySecondary: Ut.secondary,
|
|
1823
1828
|
children: [
|
|
1824
1829
|
y && /* @__PURE__ */ l(
|
|
1825
|
-
|
|
1830
|
+
Pn,
|
|
1826
1831
|
{
|
|
1827
|
-
files:
|
|
1828
|
-
isCompact:
|
|
1829
|
-
onRemove:
|
|
1832
|
+
files: Jt,
|
|
1833
|
+
isCompact: po || u,
|
|
1834
|
+
onRemove: ro,
|
|
1830
1835
|
projectName: f,
|
|
1831
1836
|
onAnnotationClick: Ge,
|
|
1832
1837
|
style: {
|
|
@@ -1844,109 +1849,109 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1844
1849
|
}
|
|
1845
1850
|
}
|
|
1846
1851
|
),
|
|
1847
|
-
y && !h ? /* @__PURE__ */
|
|
1848
|
-
u &&
|
|
1852
|
+
y && !h ? /* @__PURE__ */ k(Ce, { children: [
|
|
1853
|
+
u && At && /* @__PURE__ */ l(Vo, { children: At }),
|
|
1849
1854
|
/* @__PURE__ */ l(
|
|
1850
|
-
|
|
1855
|
+
jo,
|
|
1851
1856
|
{
|
|
1852
|
-
ref:
|
|
1857
|
+
ref: nt,
|
|
1853
1858
|
className: "comment-editor",
|
|
1854
|
-
value:
|
|
1859
|
+
value: U,
|
|
1855
1860
|
onChange: de,
|
|
1856
|
-
placeholder:
|
|
1857
|
-
mentions:
|
|
1861
|
+
placeholder: Kt(!0),
|
|
1862
|
+
mentions: eo,
|
|
1858
1863
|
mentionPlacement: u ? "inline" : "top",
|
|
1859
|
-
onMentionClick:
|
|
1860
|
-
onMentionHover:
|
|
1864
|
+
onMentionClick: to,
|
|
1865
|
+
onMentionHover: no,
|
|
1861
1866
|
onSubmit: kt,
|
|
1862
|
-
onEscape:
|
|
1863
|
-
onFiles:
|
|
1864
|
-
onUploadMedia:
|
|
1865
|
-
commands:
|
|
1867
|
+
onEscape: Wt,
|
|
1868
|
+
onFiles: Qt,
|
|
1869
|
+
onUploadMedia: io,
|
|
1870
|
+
commands: bt,
|
|
1866
1871
|
toolbar: !u,
|
|
1867
1872
|
floatingToolbar: u,
|
|
1868
|
-
toolbarStart:
|
|
1869
|
-
toolbarEnd: /* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */ l(
|
|
1871
|
-
|
|
1873
|
+
toolbarStart: At,
|
|
1874
|
+
toolbarEnd: /* @__PURE__ */ k(Ce, { children: [
|
|
1875
|
+
/* @__PURE__ */ l(Uo, {}),
|
|
1876
|
+
ho
|
|
1872
1877
|
] }),
|
|
1873
1878
|
bordered: !1,
|
|
1874
|
-
autoFocus:
|
|
1879
|
+
autoFocus: fo,
|
|
1875
1880
|
minHeight: u ? 40 : 88,
|
|
1876
1881
|
maxHeight: 259
|
|
1877
1882
|
}
|
|
1878
1883
|
)
|
|
1879
|
-
] }) : /* @__PURE__ */ l(
|
|
1880
|
-
/* @__PURE__ */
|
|
1881
|
-
(!E || M) && /* @__PURE__ */
|
|
1882
|
-
!E &&
|
|
1883
|
-
|
|
1884
|
+
] }) : /* @__PURE__ */ l(zo, { children: Kt() }),
|
|
1885
|
+
/* @__PURE__ */ k(Bo, { children: [
|
|
1886
|
+
(!E || M) && /* @__PURE__ */ k(Go, { children: [
|
|
1887
|
+
!E && ti.map(({ trigger: d, icon: x, tooltip: V }) => /* @__PURE__ */ l(
|
|
1888
|
+
ct,
|
|
1884
1889
|
{
|
|
1885
|
-
icon:
|
|
1890
|
+
icon: x,
|
|
1886
1891
|
variant: "text",
|
|
1887
|
-
onMouseDown: (
|
|
1888
|
-
onClick: () =>
|
|
1889
|
-
"data-tooltip":
|
|
1892
|
+
onMouseDown: (j) => j.preventDefault(),
|
|
1893
|
+
onClick: () => nt.current?.insertMentionTrigger(d),
|
|
1894
|
+
"data-tooltip": V,
|
|
1890
1895
|
"data-shortcut": d
|
|
1891
1896
|
},
|
|
1892
1897
|
d
|
|
1893
1898
|
)),
|
|
1894
|
-
M && /* @__PURE__ */
|
|
1895
|
-
|
|
1899
|
+
M && /* @__PURE__ */ k(
|
|
1900
|
+
Ho,
|
|
1896
1901
|
{
|
|
1897
|
-
className: ee("frame-link", { selected: !!w ||
|
|
1902
|
+
className: ee("frame-link", { selected: !!w || Ae }),
|
|
1898
1903
|
children: [
|
|
1899
1904
|
/* @__PURE__ */ l(
|
|
1900
|
-
|
|
1905
|
+
qo,
|
|
1901
1906
|
{
|
|
1902
1907
|
icon: "timer",
|
|
1903
1908
|
variant: "text",
|
|
1904
|
-
onClick:
|
|
1909
|
+
onClick: et,
|
|
1905
1910
|
"aria-label": w ? "Remove frame link" : "Add frame link",
|
|
1906
1911
|
"data-tooltip": w ? "Remove frame link" : u ? "Add frame link" : "Link to current frame",
|
|
1907
1912
|
"data-testid": "comment-frame-link"
|
|
1908
1913
|
}
|
|
1909
1914
|
),
|
|
1910
|
-
(w ||
|
|
1911
|
-
|
|
1915
|
+
(w || Ae) && (Ae ? /* @__PURE__ */ l(
|
|
1916
|
+
Wo,
|
|
1912
1917
|
{
|
|
1913
1918
|
autoFocus: !0,
|
|
1914
1919
|
"aria-label": "Linked frame or range",
|
|
1915
1920
|
value: me,
|
|
1916
1921
|
placeholder: "Frame",
|
|
1917
1922
|
onFocus: (d) => {
|
|
1918
|
-
|
|
1923
|
+
Ee.current = w, d.currentTarget.select();
|
|
1919
1924
|
},
|
|
1920
|
-
onChange: (d) =>
|
|
1925
|
+
onChange: (d) => Ke(d.target.value),
|
|
1921
1926
|
onBlur: Xe,
|
|
1922
|
-
style: { width:
|
|
1927
|
+
style: { width: yo },
|
|
1923
1928
|
onKeyDown: (d) => {
|
|
1924
|
-
d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (
|
|
1929
|
+
d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (Ie.current = !0, d.currentTarget.blur());
|
|
1925
1930
|
},
|
|
1926
1931
|
"data-testid": "comment-frame-link-input"
|
|
1927
1932
|
}
|
|
1928
1933
|
) : /* @__PURE__ */ l(
|
|
1929
|
-
|
|
1934
|
+
Qo,
|
|
1930
1935
|
{
|
|
1931
1936
|
variant: "text",
|
|
1932
|
-
"aria-label": `Edit linked frame ${
|
|
1937
|
+
"aria-label": `Edit linked frame ${A ?? ""}`,
|
|
1933
1938
|
onClick: () => Re(!0),
|
|
1934
1939
|
"data-tooltip": "Edit linked frame or range",
|
|
1935
|
-
children:
|
|
1940
|
+
children: A || "Frame or range"
|
|
1936
1941
|
}
|
|
1937
1942
|
))
|
|
1938
1943
|
]
|
|
1939
1944
|
}
|
|
1940
1945
|
)
|
|
1941
1946
|
] }),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
u && /* @__PURE__ */ l(
|
|
1947
|
+
/* @__PURE__ */ k(Yo, { children: [
|
|
1948
|
+
u && /* @__PURE__ */ l(ct, { variant: "text", onClick: Wt, children: "Cancel" }),
|
|
1944
1949
|
/* @__PURE__ */ l(
|
|
1945
|
-
|
|
1950
|
+
Io,
|
|
1946
1951
|
{
|
|
1947
1952
|
label: u ? "Save" : "Comment",
|
|
1948
1953
|
className: "comment",
|
|
1949
|
-
active:
|
|
1954
|
+
active: pt || !!ae.length,
|
|
1950
1955
|
onClick: kt,
|
|
1951
1956
|
disabled: v || xt,
|
|
1952
1957
|
saving: xt
|
|
@@ -1954,21 +1959,21 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1954
1959
|
)
|
|
1955
1960
|
] })
|
|
1956
1961
|
] }),
|
|
1957
|
-
/* @__PURE__ */ l(
|
|
1962
|
+
/* @__PURE__ */ l(Jo, { className: ee({ show: Me && y }), children: /* @__PURE__ */ l(se, { icon: "cloud_upload" }) })
|
|
1958
1963
|
]
|
|
1959
1964
|
}
|
|
1960
1965
|
),
|
|
1961
|
-
/* @__PURE__ */ l(
|
|
1962
|
-
|
|
1966
|
+
/* @__PURE__ */ l(Ko, {}),
|
|
1967
|
+
go
|
|
1963
1968
|
]
|
|
1964
1969
|
}
|
|
1965
1970
|
) });
|
|
1966
|
-
},
|
|
1971
|
+
}, ni = (e, t, o) => e && Lt`
|
|
1967
1972
|
--reaction-border-color: ${e};
|
|
1968
1973
|
--reaction-active-bg: ${t};
|
|
1969
1974
|
--reaction-hover-bg: ${t};
|
|
1970
1975
|
--reaction-active-border: ${e};
|
|
1971
|
-
`,
|
|
1976
|
+
`, oi = F.div`
|
|
1972
1977
|
/* VARS */
|
|
1973
1978
|
--reaction-border-color: var(--md-sys-color-outline-variant);
|
|
1974
1979
|
--reaction-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
@@ -1981,7 +1986,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1981
1986
|
--reaction-compact-active-hover-bg: var(--md-sys-color-primary-container-hover);
|
|
1982
1987
|
|
|
1983
1988
|
/* CATEGORY */
|
|
1984
|
-
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) =>
|
|
1989
|
+
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) => ni(e, t)}
|
|
1985
1990
|
|
|
1986
1991
|
display: flex;
|
|
1987
1992
|
justify-content: center;
|
|
@@ -2032,18 +2037,18 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2032
2037
|
position: relative;
|
|
2033
2038
|
height: 19px;
|
|
2034
2039
|
}
|
|
2035
|
-
`,
|
|
2040
|
+
`, ai = F.div`
|
|
2036
2041
|
outline: 'solid 1px red';
|
|
2037
2042
|
display: flex;
|
|
2038
2043
|
gap: 8px;
|
|
2039
|
-
`,
|
|
2044
|
+
`, ri = F.div`
|
|
2040
2045
|
position: fixed;
|
|
2041
2046
|
top: 0;
|
|
2042
2047
|
bottom: 0;
|
|
2043
2048
|
left: 0;
|
|
2044
2049
|
right: 0;
|
|
2045
2050
|
z-index: 55;
|
|
2046
|
-
`,
|
|
2051
|
+
`, ii = F.div`
|
|
2047
2052
|
/* VARS */
|
|
2048
2053
|
--panel-bg: var(--md-sys-color-surface-container-high);
|
|
2049
2054
|
|
|
@@ -2064,7 +2069,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2064
2069
|
padding: 4px;
|
|
2065
2070
|
border-radius: 4px;
|
|
2066
2071
|
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.15);
|
|
2067
|
-
`,
|
|
2072
|
+
`, si = F.div`
|
|
2068
2073
|
/* VARS */
|
|
2069
2074
|
--opener-bg: var(--md-sys-color-surface-container-high);
|
|
2070
2075
|
--opener-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
@@ -2094,17 +2099,17 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2094
2099
|
filter: ${({ $categoryPrimary: e }) => e ? "brightness(1.2)" : "none"};
|
|
2095
2100
|
}
|
|
2096
2101
|
}
|
|
2097
|
-
`,
|
|
2102
|
+
`, ci = F.div`
|
|
2098
2103
|
display: flex;
|
|
2099
2104
|
gap: 8px;
|
|
2100
2105
|
position: relative;
|
|
2101
|
-
`,
|
|
2106
|
+
`, li = [
|
|
2102
2107
|
{ key: "thumb_up", value: "👍" },
|
|
2103
2108
|
{ key: "thumb_down", value: "👎" },
|
|
2104
2109
|
{ key: "heart_plus", value: "❤" },
|
|
2105
2110
|
{ key: "celebration", value: "🎉" },
|
|
2106
2111
|
{ key: "notes", value: "📝" }
|
|
2107
|
-
],
|
|
2112
|
+
], di = {
|
|
2108
2113
|
thumb_up: "👍",
|
|
2109
2114
|
thumb_down: "👎",
|
|
2110
2115
|
heart_plus: "❤️",
|
|
@@ -2116,9 +2121,9 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2116
2121
|
"heart_plus",
|
|
2117
2122
|
"celebration",
|
|
2118
2123
|
"notes"
|
|
2119
|
-
],
|
|
2124
|
+
], ui = (e) => [...e].sort(
|
|
2120
2125
|
(o, n) => Et.indexOf(o.type) - Et.indexOf(n.type)
|
|
2121
|
-
),
|
|
2126
|
+
), Hn = ({
|
|
2122
2127
|
reaction: e,
|
|
2123
2128
|
variant: t = "standard",
|
|
2124
2129
|
onClick: o,
|
|
@@ -2127,8 +2132,8 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2127
2132
|
categoryTertiary: r
|
|
2128
2133
|
}) => {
|
|
2129
2134
|
const s = e.users?.join(", ") || void 0;
|
|
2130
|
-
return /* @__PURE__ */
|
|
2131
|
-
|
|
2135
|
+
return /* @__PURE__ */ k(
|
|
2136
|
+
oi,
|
|
2132
2137
|
{
|
|
2133
2138
|
className: ee(t, { active: e.isActive }),
|
|
2134
2139
|
onClick: o,
|
|
@@ -2137,19 +2142,19 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2137
2142
|
$categorySecondary: a,
|
|
2138
2143
|
$categoryTertiary: r,
|
|
2139
2144
|
children: [
|
|
2140
|
-
/* @__PURE__ */ l("span", { className: "emoji", children:
|
|
2145
|
+
/* @__PURE__ */ l("span", { className: "emoji", children: di[e.type] }),
|
|
2141
2146
|
e.users && /* @__PURE__ */ l("span", { children: e.users.length })
|
|
2142
2147
|
]
|
|
2143
2148
|
}
|
|
2144
2149
|
);
|
|
2145
|
-
},
|
|
2150
|
+
}, mi = ({
|
|
2146
2151
|
reactions: e,
|
|
2147
2152
|
changeHandler: t,
|
|
2148
2153
|
categoryPrimary: o,
|
|
2149
2154
|
categorySecondary: n,
|
|
2150
2155
|
categoryTertiary: a
|
|
2151
|
-
}) => /* @__PURE__ */ l(
|
|
2152
|
-
|
|
2156
|
+
}) => /* @__PURE__ */ l(ai, { children: e.map((r) => /* @__PURE__ */ l(
|
|
2157
|
+
Hn,
|
|
2153
2158
|
{
|
|
2154
2159
|
reaction: r,
|
|
2155
2160
|
isActive: r.isActive,
|
|
@@ -2161,7 +2166,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2161
2166
|
categoryTertiary: a
|
|
2162
2167
|
},
|
|
2163
2168
|
r.type
|
|
2164
|
-
)) }),
|
|
2169
|
+
)) }), pi = ({
|
|
2165
2170
|
reactions: e,
|
|
2166
2171
|
changeHandler: t,
|
|
2167
2172
|
categoryPrimary: o,
|
|
@@ -2169,36 +2174,36 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2169
2174
|
categoryTertiary: a
|
|
2170
2175
|
}) => {
|
|
2171
2176
|
const [r, s] = L(!1), i = e.filter((c) => c.isActive).map((c) => c.type);
|
|
2172
|
-
return /* @__PURE__ */
|
|
2173
|
-
|
|
2177
|
+
return /* @__PURE__ */ k(
|
|
2178
|
+
si,
|
|
2174
2179
|
{
|
|
2175
2180
|
$categoryPrimary: o,
|
|
2176
2181
|
$categorySecondary: n,
|
|
2177
2182
|
$categoryTertiary: a,
|
|
2178
2183
|
children: [
|
|
2179
2184
|
/* @__PURE__ */ l(
|
|
2180
|
-
|
|
2185
|
+
se,
|
|
2181
2186
|
{
|
|
2182
2187
|
icon: "add_reaction",
|
|
2183
2188
|
className: "add-reaction",
|
|
2184
2189
|
onClick: () => s(!r)
|
|
2185
2190
|
}
|
|
2186
2191
|
),
|
|
2187
|
-
r && /* @__PURE__ */
|
|
2188
|
-
/* @__PURE__ */ l(
|
|
2192
|
+
r && /* @__PURE__ */ k(Ce, { children: [
|
|
2193
|
+
/* @__PURE__ */ l(ri, { onClick: () => s(!1) }),
|
|
2189
2194
|
/* @__PURE__ */ l(
|
|
2190
|
-
|
|
2195
|
+
ii,
|
|
2191
2196
|
{
|
|
2192
2197
|
$categoryPrimary: o,
|
|
2193
2198
|
$categorySecondary: n,
|
|
2194
2199
|
$categoryTertiary: a,
|
|
2195
|
-
children:
|
|
2200
|
+
children: li.map((c) => {
|
|
2196
2201
|
const m = {
|
|
2197
2202
|
type: c.key,
|
|
2198
2203
|
isActive: i.includes(c.key)
|
|
2199
2204
|
};
|
|
2200
2205
|
return /* @__PURE__ */ l(
|
|
2201
|
-
|
|
2206
|
+
Hn,
|
|
2202
2207
|
{
|
|
2203
2208
|
reaction: m,
|
|
2204
2209
|
variant: "compact",
|
|
@@ -2218,7 +2223,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2218
2223
|
]
|
|
2219
2224
|
}
|
|
2220
2225
|
);
|
|
2221
|
-
},
|
|
2226
|
+
}, gi = ({
|
|
2222
2227
|
reactions: e,
|
|
2223
2228
|
changeHandler: t,
|
|
2224
2229
|
readOnly: o,
|
|
@@ -2228,27 +2233,27 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2228
2233
|
categoryTertiary: s
|
|
2229
2234
|
}) => {
|
|
2230
2235
|
const i = n ? { categoryPrimary: a, categorySecondary: r, categoryTertiary: s } : {};
|
|
2231
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ k(ci, { children: [
|
|
2232
2237
|
!o && /* @__PURE__ */ l(
|
|
2233
|
-
|
|
2238
|
+
pi,
|
|
2234
2239
|
{
|
|
2235
2240
|
reactions: e,
|
|
2236
2241
|
changeHandler: t,
|
|
2237
2242
|
...i
|
|
2238
2243
|
}
|
|
2239
2244
|
),
|
|
2240
|
-
/* @__PURE__ */ l(
|
|
2245
|
+
/* @__PURE__ */ l(mi, { reactions: e, changeHandler: t, ...i })
|
|
2241
2246
|
] });
|
|
2242
|
-
},
|
|
2247
|
+
}, hi = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
|
|
2243
2248
|
if (o.includes("http")) return [];
|
|
2244
2249
|
const n = o.match(/\(([^)]+)\)/), a = n ? n[1].split(":") : [];
|
|
2245
2250
|
return { type: a[0], id: a[1] };
|
|
2246
|
-
}),
|
|
2251
|
+
}), fi = (e) => e.replace(/@(?=@|\[)/g, ""), yi = {
|
|
2247
2252
|
"&": "&",
|
|
2248
2253
|
"<": "<",
|
|
2249
2254
|
">": ">",
|
|
2250
2255
|
'"': """
|
|
2251
|
-
}, Ct = (e) => e.replace(/[&<>"]/g, (t) =>
|
|
2256
|
+
}, Ct = (e) => e.replace(/[&<>"]/g, (t) => yi[t]), vi = (e) => e.replaceAll(" ", "%20"), bi = (e, t) => {
|
|
2252
2257
|
const o = t.cloneContents();
|
|
2253
2258
|
if (!o.querySelector("[data-mention-value]")) return null;
|
|
2254
2259
|
let n = "", a = "";
|
|
@@ -2267,7 +2272,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2267
2272
|
if (c) {
|
|
2268
2273
|
const m = i.getAttribute("data-mention-label") || (i.textContent || "").trim();
|
|
2269
2274
|
if (m) {
|
|
2270
|
-
const p =
|
|
2275
|
+
const p = vi(c);
|
|
2271
2276
|
n += `[${m}](${p})`, a += `<a href="@${Ct(p)}">@${Ct(m)}</a>`;
|
|
2272
2277
|
}
|
|
2273
2278
|
return;
|
|
@@ -2286,15 +2291,15 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2286
2291
|
s.childNodes.forEach(r);
|
|
2287
2292
|
};
|
|
2288
2293
|
return r(o), n ? { text: n, html: a } : null;
|
|
2289
|
-
},
|
|
2290
|
-
const t =
|
|
2291
|
-
if (!
|
|
2294
|
+
}, wi = ({ children: e }) => {
|
|
2295
|
+
const t = en.Children.map(e, (n) => {
|
|
2296
|
+
if (!en.isValidElement(n)) return n;
|
|
2292
2297
|
const a = n.props.children;
|
|
2293
2298
|
return typeof a != "string" ? n : {
|
|
2294
2299
|
...n,
|
|
2295
2300
|
props: {
|
|
2296
2301
|
...n.props,
|
|
2297
|
-
children:
|
|
2302
|
+
children: fi(a)
|
|
2298
2303
|
}
|
|
2299
2304
|
};
|
|
2300
2305
|
}), o = qe((n) => {
|
|
@@ -2302,21 +2307,21 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2302
2307
|
if (!a || a.rangeCount === 0 || a.isCollapsed) return;
|
|
2303
2308
|
const r = a.getRangeAt(0), s = n.currentTarget;
|
|
2304
2309
|
if (!s.contains(r.startContainer) || !s.contains(r.endContainer)) return;
|
|
2305
|
-
const i =
|
|
2310
|
+
const i = bi(s, r);
|
|
2306
2311
|
i && (n.preventDefault(), n.clipboardData.setData("text/plain", i.text), n.clipboardData.setData("text/html", i.html));
|
|
2307
2312
|
}, []);
|
|
2308
2313
|
return /* @__PURE__ */ l("div", { className: "comment-text", onCopy: o, children: t });
|
|
2309
|
-
},
|
|
2314
|
+
}, xi = (e = [], t) => {
|
|
2310
2315
|
let o = {};
|
|
2311
2316
|
return e.forEach((n) => {
|
|
2312
2317
|
const a = n.reaction;
|
|
2313
2318
|
Et.includes(a) && (o[a] === void 0 && (o[a] = { type: a, isActive: !1, users: [] }), t == n.userName && (o[a].isActive = !0), o[a].users?.push(n.fullName || n.userName));
|
|
2314
|
-
}),
|
|
2315
|
-
},
|
|
2319
|
+
}), ui(Object.values(o));
|
|
2320
|
+
}, ki = F.div`
|
|
2316
2321
|
display: flex;
|
|
2317
2322
|
align-items: center;
|
|
2318
2323
|
gap: var(--base-gap-small);
|
|
2319
|
-
`,
|
|
2324
|
+
`, Ai = F.span`
|
|
2320
2325
|
border-radius: var(--border-radius-m);
|
|
2321
2326
|
padding: 2px 6px;
|
|
2322
2327
|
margin: 0 2px;
|
|
@@ -2333,19 +2338,19 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2333
2338
|
font-size: 16px;
|
|
2334
2339
|
font-variation-settings: 'FILL' 1;
|
|
2335
2340
|
}
|
|
2336
|
-
`,
|
|
2337
|
-
const n =
|
|
2338
|
-
return /* @__PURE__ */
|
|
2341
|
+
`, Fi = ({ name: e, statuses: t, children: o }) => {
|
|
2342
|
+
const n = Ci(e, t);
|
|
2343
|
+
return /* @__PURE__ */ k(ki, { children: [
|
|
2339
2344
|
o,
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
n.icon && /* @__PURE__ */ l(
|
|
2345
|
+
/* @__PURE__ */ k(Ai, { $color: _t(n.color), style: { backgroundColor: n.color }, children: [
|
|
2346
|
+
n.icon && /* @__PURE__ */ l(se, { icon: n.icon }),
|
|
2342
2347
|
e
|
|
2343
2348
|
] })
|
|
2344
2349
|
] });
|
|
2345
|
-
},
|
|
2350
|
+
}, Ci = (e, t) => {
|
|
2346
2351
|
const o = { name: e, color: "var(--md-sys-color-primary)", icon: void 0 };
|
|
2347
2352
|
return t.find((n) => n.name === e) || o;
|
|
2348
|
-
},
|
|
2353
|
+
}, Ti = F.header`
|
|
2349
2354
|
display: flex;
|
|
2350
2355
|
align-items: flex-end;
|
|
2351
2356
|
gap: var(--base-gap-small);
|
|
@@ -2357,13 +2362,13 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2357
2362
|
margin-left: 4px;
|
|
2358
2363
|
font-weight: 800;
|
|
2359
2364
|
}
|
|
2360
|
-
`,
|
|
2365
|
+
`, Di = F.div`
|
|
2361
2366
|
display: flex;
|
|
2362
2367
|
gap: var(--base-gap-small);
|
|
2363
2368
|
align-items: center;
|
|
2364
2369
|
flex-wrap: wrap;
|
|
2365
2370
|
`;
|
|
2366
|
-
|
|
2371
|
+
F.li`
|
|
2367
2372
|
display: flex;
|
|
2368
2373
|
gap: var(--base-gap-small);
|
|
2369
2374
|
align-items: center;
|
|
@@ -2379,14 +2384,14 @@ A.li`
|
|
|
2379
2384
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
2380
2385
|
}
|
|
2381
2386
|
`;
|
|
2382
|
-
const Tt =
|
|
2387
|
+
const Tt = F.span`
|
|
2383
2388
|
color: var(--md-sys-color-outline);
|
|
2384
2389
|
white-space: nowrap;
|
|
2385
2390
|
|
|
2386
2391
|
strong {
|
|
2387
2392
|
font-weight: 800;
|
|
2388
2393
|
}
|
|
2389
|
-
`,
|
|
2394
|
+
`, Ni = F.li`
|
|
2390
2395
|
list-style: none;
|
|
2391
2396
|
margin: var(--padding-s) var(--padding-m);
|
|
2392
2397
|
padding: var(--padding-s) var(--padding-m) var(--padding-s) 0;
|
|
@@ -2413,7 +2418,7 @@ const Tt = A.span`
|
|
|
2413
2418
|
&.request_changes .date, {
|
|
2414
2419
|
color: var(--md-sys-color-error);
|
|
2415
2420
|
}
|
|
2416
|
-
`,
|
|
2421
|
+
`, Si = F.div`
|
|
2417
2422
|
display: flex;
|
|
2418
2423
|
flex-wrap: nowrap;
|
|
2419
2424
|
align-items: center;
|
|
@@ -2432,7 +2437,7 @@ const Tt = A.span`
|
|
|
2432
2437
|
color: var(--md-sys-color-outline);
|
|
2433
2438
|
opacity: 0.5;
|
|
2434
2439
|
}
|
|
2435
|
-
`,
|
|
2440
|
+
`, Ii = F.span`
|
|
2436
2441
|
white-space: nowrap;
|
|
2437
2442
|
font-size: 12px;
|
|
2438
2443
|
text-overflow: ellipsis;
|
|
@@ -2443,16 +2448,16 @@ const Tt = A.span`
|
|
|
2443
2448
|
font-size: 12px;
|
|
2444
2449
|
font-weight: 800;
|
|
2445
2450
|
}
|
|
2446
|
-
`,
|
|
2447
|
-
function
|
|
2448
|
-
const { categories: t } = $e(), { categoryData: o, categoryNotFound: n } =
|
|
2451
|
+
`, Ei = "#c5c5c5";
|
|
2452
|
+
function qn(e) {
|
|
2453
|
+
const { categories: t } = $e(), { categoryData: o, categoryNotFound: n } = S(() => {
|
|
2449
2454
|
let a = !1;
|
|
2450
2455
|
if (e) {
|
|
2451
2456
|
const r = t.find((s) => s.name === e);
|
|
2452
2457
|
return r || (a = !0), {
|
|
2453
2458
|
categoryData: r || {
|
|
2454
2459
|
name: e,
|
|
2455
|
-
color:
|
|
2460
|
+
color: Ei
|
|
2456
2461
|
},
|
|
2457
2462
|
categoryNotFound: a
|
|
2458
2463
|
};
|
|
@@ -2464,21 +2469,21 @@ function Hn(e) {
|
|
|
2464
2469
|
}, [e, t]);
|
|
2465
2470
|
return { categoryData: o, categoryNotFound: n };
|
|
2466
2471
|
}
|
|
2467
|
-
const
|
|
2468
|
-
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s =
|
|
2472
|
+
const Mi = "anonymous.guest", Pi = "Anonymous User", _i = "unknown.user", Wn = (e) => !e || !e.name ? _i : e.name === Mi && !e.label ? Pi : e.label ? e.label : e.name, Mt = "anonymous.guest", Ri = ({ isGuest: e, activity: t }) => {
|
|
2473
|
+
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s = S(
|
|
2469
2474
|
() => [
|
|
2470
|
-
|
|
2471
|
-
|
|
2475
|
+
Wn({ name: o, label: n }),
|
|
2476
|
+
Un(r?.feedback ?? Ne.APPROVE)
|
|
2472
2477
|
].join(" "),
|
|
2473
2478
|
[n, o, r?.feedback, a]
|
|
2474
|
-
), { categoryData: i, categoryNotFound: c } =
|
|
2479
|
+
), { categoryData: i, categoryNotFound: c } = qn(r?.category), m = S(() => {
|
|
2475
2480
|
if (!o?.startsWith(Mt))
|
|
2476
2481
|
return `/api/users/${o}/avatar`;
|
|
2477
2482
|
}, [o]);
|
|
2478
2483
|
if (r?.feedback)
|
|
2479
|
-
return /* @__PURE__ */ l(
|
|
2484
|
+
return /* @__PURE__ */ l(Ni, { className: xn(r.feedback), children: /* @__PURE__ */ k(Si, { children: [
|
|
2480
2485
|
o && /* @__PURE__ */ l(
|
|
2481
|
-
|
|
2486
|
+
Tn,
|
|
2482
2487
|
{
|
|
2483
2488
|
name: o,
|
|
2484
2489
|
fullName: n,
|
|
@@ -2486,9 +2491,9 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2486
2491
|
size: 22
|
|
2487
2492
|
}
|
|
2488
2493
|
),
|
|
2489
|
-
/* @__PURE__ */ l(
|
|
2494
|
+
/* @__PURE__ */ l(se, { icon: zn(r.feedback) }),
|
|
2490
2495
|
i && !e && /* @__PURE__ */ l(
|
|
2491
|
-
|
|
2496
|
+
st,
|
|
2492
2497
|
{
|
|
2493
2498
|
value: i.name,
|
|
2494
2499
|
color: i.color,
|
|
@@ -2497,10 +2502,10 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2497
2502
|
"data-tooltip-delay": 0
|
|
2498
2503
|
}
|
|
2499
2504
|
),
|
|
2500
|
-
/* @__PURE__ */ l(
|
|
2501
|
-
/* @__PURE__ */ l(
|
|
2505
|
+
/* @__PURE__ */ l(Ii, { children: s }),
|
|
2506
|
+
/* @__PURE__ */ l(ut, { date: a, exactTooltip: !0 })
|
|
2502
2507
|
] }) });
|
|
2503
|
-
},
|
|
2508
|
+
}, Qn = ({
|
|
2504
2509
|
name: e,
|
|
2505
2510
|
fullName: t,
|
|
2506
2511
|
date: o,
|
|
@@ -2512,20 +2517,20 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2512
2517
|
onReferenceClick: c,
|
|
2513
2518
|
onReferenceTooltip: m
|
|
2514
2519
|
}) => {
|
|
2515
|
-
const { referenceType: p, origin: g, activityType: u, versions: h, activityId: v } = a, y = p === "mention", D = u === "version.publish", C = h && h?.length > 1 ? "published versions" : "published a version", f = y ? "mentioned" : "commented", b = y ? ` ${i} on` : "on", T = e?.startsWith("guest.") || e?.startsWith(Mt), I = (a.author?.deleted || !a.author?.active) && !T, _ =
|
|
2520
|
+
const { referenceType: p, origin: g, activityType: u, versions: h, activityId: v } = a, y = p === "mention", D = u === "version.publish", C = h && h?.length > 1 ? "published versions" : "published a version", f = y ? "mentioned" : "commented", b = y ? ` ${i} on` : "on", T = e?.startsWith("guest.") || e?.startsWith(Mt), I = (a.author?.deleted || !a.author?.active) && !T, _ = S(() => {
|
|
2516
2521
|
if (!e?.startsWith(Mt))
|
|
2517
2522
|
return `/api/users/${e}/avatar`;
|
|
2518
2523
|
}, [e]);
|
|
2519
|
-
return /* @__PURE__ */
|
|
2520
|
-
/* @__PURE__ */
|
|
2521
|
-
e && !I && /* @__PURE__ */ l(
|
|
2522
|
-
I && /* @__PURE__ */ l(
|
|
2524
|
+
return /* @__PURE__ */ k(Ti, { children: [
|
|
2525
|
+
/* @__PURE__ */ k(Di, { children: [
|
|
2526
|
+
e && !I && /* @__PURE__ */ l(Tn, { name: e, fullName: t, src: _, size: 22 }),
|
|
2527
|
+
I && /* @__PURE__ */ l(se, { icon: "account_circle" }),
|
|
2523
2528
|
/* @__PURE__ */ l("h5", { children: t || a.activityData?.author || "Unknown" }),
|
|
2524
|
-
n && /* @__PURE__ */
|
|
2529
|
+
n && /* @__PURE__ */ k(Ce, { children: [
|
|
2525
2530
|
/* @__PURE__ */ l(Tt, { children: /* @__PURE__ */ l("strong", { children: f }) }),
|
|
2526
2531
|
/* @__PURE__ */ l(Tt, { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: b }),
|
|
2527
2532
|
g && /* @__PURE__ */ l(
|
|
2528
|
-
|
|
2533
|
+
Zo,
|
|
2529
2534
|
{
|
|
2530
2535
|
id: g.id,
|
|
2531
2536
|
type: g.type,
|
|
@@ -2550,10 +2555,10 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2550
2555
|
D && /* @__PURE__ */ l(Tt, { children: C }),
|
|
2551
2556
|
r
|
|
2552
2557
|
] }),
|
|
2553
|
-
/* @__PURE__ */ l(
|
|
2558
|
+
/* @__PURE__ */ l(ut, { date: o })
|
|
2554
2559
|
] });
|
|
2555
|
-
},
|
|
2556
|
-
|
|
2560
|
+
}, Li = ({ flags: e }) => e.length ? /* @__PURE__ */ l(ea, { children: e.map(({ id: t, label: o, icon: n, tooltip: a, onClick: r, disabled: s, testId: i }) => /* @__PURE__ */ k(
|
|
2561
|
+
ta,
|
|
2557
2562
|
{
|
|
2558
2563
|
as: r ? "button" : "span",
|
|
2559
2564
|
type: r ? "button" : void 0,
|
|
@@ -2563,12 +2568,12 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2563
2568
|
"data-tooltip-delay": 0,
|
|
2564
2569
|
"data-testid": i,
|
|
2565
2570
|
children: [
|
|
2566
|
-
n && /* @__PURE__ */ l(
|
|
2571
|
+
n && /* @__PURE__ */ l(se, { icon: n }),
|
|
2567
2572
|
o
|
|
2568
2573
|
]
|
|
2569
2574
|
},
|
|
2570
2575
|
t
|
|
2571
|
-
)) }) : null,
|
|
2576
|
+
)) }) : null, $i = ({
|
|
2572
2577
|
category: e,
|
|
2573
2578
|
categoryNotFound: t,
|
|
2574
2579
|
frameLink: o,
|
|
@@ -2595,7 +2600,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2595
2600
|
testId: "comment-frame-link-chip"
|
|
2596
2601
|
}
|
|
2597
2602
|
] : []
|
|
2598
|
-
],
|
|
2603
|
+
], Oi = ({
|
|
2599
2604
|
onDelete: e,
|
|
2600
2605
|
onEdit: t,
|
|
2601
2606
|
onCopyText: o,
|
|
@@ -2627,15 +2632,15 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2627
2632
|
id: "copy-link",
|
|
2628
2633
|
label: "Copy link",
|
|
2629
2634
|
icon: "link",
|
|
2630
|
-
onClick: m(() =>
|
|
2635
|
+
onClick: m(() => En(na(s, r, i)))
|
|
2631
2636
|
}), e && c.push({
|
|
2632
2637
|
id: "delete",
|
|
2633
2638
|
label: "Delete",
|
|
2634
2639
|
icon: "delete",
|
|
2635
2640
|
onClick: m(e),
|
|
2636
2641
|
danger: !0
|
|
2637
|
-
}), /* @__PURE__ */ l(
|
|
2638
|
-
},
|
|
2642
|
+
}), /* @__PURE__ */ l(Qa, { menu: c });
|
|
2643
|
+
}, Vi = ({
|
|
2639
2644
|
activity: e = {},
|
|
2640
2645
|
annotationFrameStart: t,
|
|
2641
2646
|
onCheckChange: o,
|
|
@@ -2661,7 +2666,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2661
2666
|
setEditingId: b,
|
|
2662
2667
|
isGuest: T,
|
|
2663
2668
|
userTeamNames: I
|
|
2664
|
-
} = $e(), _ =
|
|
2669
|
+
} = $e(), _ = ge(null), { toggleMenuOpen: R, menuOpen: E } = Oa(), { categoryData: N, categoryNotFound: Q } = qn(e?.activityData?.category), Y = _n(N?.color);
|
|
2665
2670
|
let {
|
|
2666
2671
|
body: H,
|
|
2667
2672
|
authorName: J,
|
|
@@ -2670,82 +2675,82 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2670
2675
|
referenceType: te,
|
|
2671
2676
|
entityId: oe,
|
|
2672
2677
|
activityId: W,
|
|
2673
|
-
author:
|
|
2678
|
+
author: U,
|
|
2674
2679
|
isOwner: de,
|
|
2675
|
-
files:
|
|
2680
|
+
files: ae = [],
|
|
2676
2681
|
origin: ne
|
|
2677
2682
|
} = e;
|
|
2678
|
-
J || (J =
|
|
2679
|
-
const
|
|
2683
|
+
J || (J = U?.name || ""), q = Wn({ name: J, label: q });
|
|
2684
|
+
const Qe = wo(), we = `activity-comment-menu-${W}-${Qe}`, xe = E === we, { onGoToFrame: ke, setHighlightedActivities: he, user: Me, commentFrameLink: K } = ze(), Te = !!Me?.data?.isAdmin, Oe = de || Te, Se = de || Te, De = () => {
|
|
2680
2685
|
b(W);
|
|
2681
|
-
}, Qe = () => {
|
|
2682
|
-
b(null);
|
|
2683
|
-
}, Ve = async (F, me, he) => {
|
|
2684
|
-
await a?.(F, me, void 0, he), b(null);
|
|
2685
|
-
}, be = f === W, Be = ({ activityId: F, url: me }) => {
|
|
2686
|
-
document.getElementById(F) ? ge([F]) : window.open(me, "_blank", "noreferrer");
|
|
2687
|
-
}, Ge = te !== "origin" || u, ae = async () => {
|
|
2688
|
-
const F = pi(H);
|
|
2689
|
-
Ge && ne && F.push({ id: ne.id, type: ne.type }), n && await n(W, oe, F);
|
|
2690
2686
|
}, Ye = () => {
|
|
2691
|
-
|
|
2687
|
+
b(null);
|
|
2688
|
+
}, Ve = async (A, me, ye) => {
|
|
2689
|
+
await a?.(A, me, void 0, ye), b(null);
|
|
2690
|
+
}, fe = f === W, Be = ({ activityId: A, url: me }) => {
|
|
2691
|
+
document.getElementById(A) ? he([A]) : window.open(me, "_blank", "noreferrer");
|
|
2692
|
+
}, Ge = te !== "origin" || u, re = async () => {
|
|
2693
|
+
const A = hi(H);
|
|
2694
|
+
Ge && ne && A.push({ id: ne.id, type: ne.type }), n && await n(W, oe, A);
|
|
2695
|
+
}, Je = () => {
|
|
2696
|
+
or({
|
|
2692
2697
|
title: "Delete comment",
|
|
2693
2698
|
message: "Are you sure you want to delete this comment?",
|
|
2694
2699
|
accept: async () => {
|
|
2695
|
-
await
|
|
2700
|
+
await re();
|
|
2696
2701
|
}
|
|
2697
2702
|
});
|
|
2698
|
-
}, [, Pe] =
|
|
2699
|
-
() =>
|
|
2703
|
+
}, [, Pe] = In(), He = S(
|
|
2704
|
+
() => xi(e.reactions, D),
|
|
2700
2705
|
[[...e.reactions || []]]
|
|
2701
|
-
), _e = (
|
|
2702
|
-
|
|
2706
|
+
), _e = (A) => {
|
|
2707
|
+
A.isActive ? P({
|
|
2703
2708
|
projectName: c,
|
|
2704
2709
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2705
2710
|
userName: D,
|
|
2706
2711
|
activityId: W,
|
|
2707
2712
|
createReactionModel: {
|
|
2708
|
-
reaction:
|
|
2713
|
+
reaction: A.type
|
|
2709
2714
|
}
|
|
2710
2715
|
}) : C({
|
|
2711
2716
|
projectName: c,
|
|
2712
2717
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2713
2718
|
userName: D,
|
|
2714
2719
|
activityId: W,
|
|
2715
|
-
reaction:
|
|
2720
|
+
reaction: A.type
|
|
2716
2721
|
});
|
|
2717
2722
|
}, je = qe(
|
|
2718
|
-
(
|
|
2719
|
-
|
|
2723
|
+
(A) => {
|
|
2724
|
+
A.annotation && (ke?.(A.annotation.range[0]), he([W]));
|
|
2720
2725
|
},
|
|
2721
|
-
[
|
|
2722
|
-
),
|
|
2723
|
-
() => (
|
|
2724
|
-
[
|
|
2725
|
-
), w = (
|
|
2726
|
-
const me =
|
|
2727
|
-
|
|
2728
|
-
}, M =
|
|
2729
|
-
O && (
|
|
2726
|
+
[ke]
|
|
2727
|
+
), Ae = S(() => Rt(H), [H]), Re = S(
|
|
2728
|
+
() => (ae || []).filter((A) => !Ae.has(A.id)),
|
|
2729
|
+
[ae, Ae]
|
|
2730
|
+
), w = (A) => {
|
|
2731
|
+
const me = ua(A), ye = (ae || []).filter((Ee) => vt(Ee.mime, Ee.ext)), Ie = ye.findIndex((Ee) => Ee.id === me);
|
|
2732
|
+
Ie !== -1 && g?.({ files: ye, index: Ie, activityId: W });
|
|
2733
|
+
}, M = S(() => Sn(H || ""), [H]), O = S(() => yt(e), [e]), X = K?.formatFrame ?? ((A) => Bn(A, t)), ue = () => {
|
|
2734
|
+
O && (K ? K.goTo(O) : ke?.(O.startFrame), he([W]));
|
|
2730
2735
|
};
|
|
2731
|
-
return /* @__PURE__ */
|
|
2732
|
-
/* @__PURE__ */
|
|
2733
|
-
|
|
2736
|
+
return /* @__PURE__ */ k(Ce, { children: [
|
|
2737
|
+
/* @__PURE__ */ k(
|
|
2738
|
+
oa,
|
|
2734
2739
|
{
|
|
2735
2740
|
className: ee("comment", {
|
|
2736
2741
|
isOwner: de,
|
|
2737
|
-
isEditing:
|
|
2742
|
+
isEditing: fe,
|
|
2738
2743
|
isHighlighted: h,
|
|
2739
|
-
category: !!
|
|
2744
|
+
category: !!N && !T,
|
|
2740
2745
|
menuOpen: xe
|
|
2741
2746
|
}),
|
|
2742
2747
|
id: W,
|
|
2743
|
-
$categoryPrimary:
|
|
2748
|
+
$categoryPrimary: N?.color,
|
|
2744
2749
|
$categoryTertiary: Y.primary,
|
|
2745
2750
|
$categorySecondary: Y.secondary,
|
|
2746
2751
|
children: [
|
|
2747
2752
|
/* @__PURE__ */ l(
|
|
2748
|
-
|
|
2753
|
+
Qn,
|
|
2749
2754
|
{
|
|
2750
2755
|
name: J,
|
|
2751
2756
|
fullName: q,
|
|
@@ -2759,69 +2764,69 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2759
2764
|
children: void 0
|
|
2760
2765
|
}
|
|
2761
2766
|
),
|
|
2762
|
-
/* @__PURE__ */
|
|
2763
|
-
!v && /* @__PURE__ */
|
|
2764
|
-
|
|
2767
|
+
/* @__PURE__ */ k(aa, { className: ee("comment-body", { isEditing: fe }), children: [
|
|
2768
|
+
!v && /* @__PURE__ */ k(ra, { className: "tools", children: [
|
|
2769
|
+
Se && /* @__PURE__ */ l(on, { icon: "edit_square", onClick: De, variant: "text" }),
|
|
2765
2770
|
/* @__PURE__ */ l(
|
|
2766
|
-
|
|
2771
|
+
on,
|
|
2767
2772
|
{
|
|
2768
2773
|
icon: "more_horiz",
|
|
2769
2774
|
ref: _,
|
|
2770
|
-
onClick: (
|
|
2771
|
-
|
|
2775
|
+
onClick: (A) => {
|
|
2776
|
+
A.stopPropagation(), R(we);
|
|
2772
2777
|
},
|
|
2773
2778
|
className: xe ? "active" : ""
|
|
2774
2779
|
}
|
|
2775
2780
|
)
|
|
2776
2781
|
] }),
|
|
2777
|
-
|
|
2778
|
-
|
|
2782
|
+
fe ? /* @__PURE__ */ l(
|
|
2783
|
+
Gn,
|
|
2779
2784
|
{
|
|
2780
2785
|
initValue: H,
|
|
2781
|
-
initFiles:
|
|
2786
|
+
initFiles: ae,
|
|
2782
2787
|
annotationFrameStart: t,
|
|
2783
|
-
initCategory:
|
|
2788
|
+
initCategory: N?.name,
|
|
2784
2789
|
data: e.activityData,
|
|
2785
2790
|
activityId: W,
|
|
2786
2791
|
versionReview: !1,
|
|
2787
2792
|
isEditing: !0,
|
|
2788
|
-
onClose:
|
|
2793
|
+
onClose: Ye,
|
|
2789
2794
|
onSubmit: Ve,
|
|
2790
2795
|
isOpen: !0,
|
|
2791
2796
|
...i
|
|
2792
2797
|
}
|
|
2793
|
-
) : /* @__PURE__ */
|
|
2798
|
+
) : /* @__PURE__ */ k(Ce, { children: [
|
|
2794
2799
|
/* @__PURE__ */ l(
|
|
2795
|
-
|
|
2800
|
+
Li,
|
|
2796
2801
|
{
|
|
2797
|
-
flags:
|
|
2798
|
-
category:
|
|
2802
|
+
flags: $i({
|
|
2803
|
+
category: N,
|
|
2799
2804
|
categoryNotFound: Q,
|
|
2800
2805
|
frameLink: O,
|
|
2801
|
-
formatFrame:
|
|
2806
|
+
formatFrame: X,
|
|
2802
2807
|
onFrameLinkClick: ue,
|
|
2803
|
-
canNavigateToFrame: !!
|
|
2808
|
+
canNavigateToFrame: !!K || !!ke,
|
|
2804
2809
|
isGuest: T
|
|
2805
2810
|
})
|
|
2806
2811
|
}
|
|
2807
2812
|
),
|
|
2808
|
-
/* @__PURE__ */ l(
|
|
2809
|
-
|
|
2813
|
+
/* @__PURE__ */ l(wi, { children: /* @__PURE__ */ l(
|
|
2814
|
+
kn,
|
|
2810
2815
|
{
|
|
2811
2816
|
remarkPlugins: [
|
|
2812
2817
|
Fn,
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2818
|
+
An,
|
|
2819
|
+
ko,
|
|
2820
|
+
Jr,
|
|
2821
|
+
Ao
|
|
2817
2822
|
],
|
|
2818
|
-
urlTransform: (
|
|
2823
|
+
urlTransform: (A) => A,
|
|
2819
2824
|
components: {
|
|
2820
2825
|
// a links
|
|
2821
2826
|
// @ts-ignore
|
|
2822
|
-
a: (
|
|
2827
|
+
a: (A) => (
|
|
2823
2828
|
// @ts-ignore
|
|
2824
|
-
|
|
2829
|
+
da(A, {
|
|
2825
2830
|
entityId: ne?.id ?? oe,
|
|
2826
2831
|
entityType: ne?.type ?? m,
|
|
2827
2832
|
userName: D,
|
|
@@ -2830,36 +2835,36 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2830
2835
|
onReferenceClick: p,
|
|
2831
2836
|
onReferenceTooltip: Pe,
|
|
2832
2837
|
activityId: W,
|
|
2833
|
-
categoryPrimary:
|
|
2838
|
+
categoryPrimary: N?.color,
|
|
2834
2839
|
categorySecondary: Y.secondary,
|
|
2835
2840
|
onActivityLinkClick: Be
|
|
2836
2841
|
})
|
|
2837
2842
|
),
|
|
2838
2843
|
// checkbox inputs
|
|
2839
2844
|
// @ts-ignore
|
|
2840
|
-
input: (
|
|
2845
|
+
input: (A) => la(A, { activity: e, onCheckChange: o }),
|
|
2841
2846
|
// code syntax highlighting
|
|
2842
2847
|
// eslint-disable-next-line
|
|
2843
2848
|
// @ts-ignore
|
|
2844
|
-
code: (
|
|
2849
|
+
code: (A) => ca(A),
|
|
2845
2850
|
// @ts-ignore
|
|
2846
|
-
blockquote: (
|
|
2851
|
+
blockquote: (A) => sa(A),
|
|
2847
2852
|
// @ts-ignore
|
|
2848
|
-
tip: (
|
|
2849
|
-
/* @__PURE__ */ l(
|
|
2850
|
-
|
|
2853
|
+
tip: (A) => /* @__PURE__ */ k(ia, { children: [
|
|
2854
|
+
/* @__PURE__ */ l(se, { icon: "info" }),
|
|
2855
|
+
A.children
|
|
2851
2856
|
] }),
|
|
2852
2857
|
// a video url on its own line is an embedded video
|
|
2853
2858
|
// @ts-ignore
|
|
2854
|
-
p: (
|
|
2859
|
+
p: (A) => Za(A, { onOpen: w }) ?? er(A) ?? /* @__PURE__ */ l("p", { children: A.children }),
|
|
2855
2860
|
// @ts-ignore
|
|
2856
|
-
status: (
|
|
2861
|
+
status: (A) => /* @__PURE__ */ l(Fi, { name: A.id, statuses: y, children: A.children })
|
|
2857
2862
|
},
|
|
2858
2863
|
children: M
|
|
2859
2864
|
}
|
|
2860
2865
|
) }),
|
|
2861
2866
|
/* @__PURE__ */ l(
|
|
2862
|
-
|
|
2867
|
+
Pn,
|
|
2863
2868
|
{
|
|
2864
2869
|
files: Re,
|
|
2865
2870
|
isCompact: Re.length > 6,
|
|
@@ -2873,14 +2878,14 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2873
2878
|
}
|
|
2874
2879
|
)
|
|
2875
2880
|
] }),
|
|
2876
|
-
!
|
|
2877
|
-
|
|
2881
|
+
!fe && /* @__PURE__ */ l("div", { style: { marginTop: "16px" }, children: He && /* @__PURE__ */ l(
|
|
2882
|
+
gi,
|
|
2878
2883
|
{
|
|
2879
2884
|
reactions: He,
|
|
2880
2885
|
changeHandler: _e,
|
|
2881
2886
|
readOnly: v,
|
|
2882
|
-
category:
|
|
2883
|
-
categoryPrimary:
|
|
2887
|
+
category: N && !T ? N.name : void 0,
|
|
2888
|
+
categoryPrimary: N?.color,
|
|
2884
2889
|
categorySecondary: Y.secondary,
|
|
2885
2890
|
categoryTertiary: Y.primary
|
|
2886
2891
|
}
|
|
@@ -2890,20 +2895,20 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2890
2895
|
}
|
|
2891
2896
|
),
|
|
2892
2897
|
/* @__PURE__ */ l(
|
|
2893
|
-
|
|
2898
|
+
Ya,
|
|
2894
2899
|
{
|
|
2895
2900
|
target: _.current,
|
|
2896
2901
|
id: we,
|
|
2897
2902
|
align: "right",
|
|
2898
|
-
onClose: (
|
|
2899
|
-
|
|
2903
|
+
onClose: (A) => {
|
|
2904
|
+
A?.stopPropagation(), R(!1);
|
|
2900
2905
|
},
|
|
2901
2906
|
children: /* @__PURE__ */ l(
|
|
2902
|
-
|
|
2907
|
+
Oi,
|
|
2903
2908
|
{
|
|
2904
|
-
onDelete: Oe && n ?
|
|
2905
|
-
onEdit:
|
|
2906
|
-
onCopyText: M ? () =>
|
|
2909
|
+
onDelete: Oe && n ? Je : void 0,
|
|
2910
|
+
onEdit: Se ? De : void 0,
|
|
2911
|
+
onCopyText: M ? () => En(M) : void 0,
|
|
2907
2912
|
onDuplicate: r ? () => r(e) : void 0,
|
|
2908
2913
|
activityId: W,
|
|
2909
2914
|
onSelect: () => R(!1),
|
|
@@ -2914,7 +2919,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2914
2919
|
}
|
|
2915
2920
|
)
|
|
2916
2921
|
] });
|
|
2917
|
-
},
|
|
2922
|
+
}, ji = F.li`
|
|
2918
2923
|
list-style: none;
|
|
2919
2924
|
margin: 0;
|
|
2920
2925
|
padding: 0;
|
|
@@ -2924,7 +2929,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2924
2929
|
padding: 4px 8px;
|
|
2925
2930
|
border-radius: var(--border-radius-m);
|
|
2926
2931
|
user-select: none;
|
|
2927
|
-
`,
|
|
2932
|
+
`, Ui = F.div`
|
|
2928
2933
|
display: flex;
|
|
2929
2934
|
flex-wrap: wrap;
|
|
2930
2935
|
align-items: center;
|
|
@@ -2939,7 +2944,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2939
2944
|
color: var(--md-sys-color-outline);
|
|
2940
2945
|
opacity: 0.5;
|
|
2941
2946
|
}
|
|
2942
|
-
`, Dt =
|
|
2947
|
+
`, Dt = F.span`
|
|
2943
2948
|
color: var(--md-sys-color-outline);
|
|
2944
2949
|
white-space: nowrap;
|
|
2945
2950
|
font-size: 12px;
|
|
@@ -2947,10 +2952,10 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2947
2952
|
font-size: 12px;
|
|
2948
2953
|
font-weight: 800;
|
|
2949
2954
|
}
|
|
2950
|
-
`,
|
|
2955
|
+
`, zi = (e, t) => {
|
|
2951
2956
|
let o = [], n = {};
|
|
2952
2957
|
return e.activityData.origin.type == "folder" && !n.folder && (n.folder = !0, o.push(e.activityData.origin.name)), e.activityData.origin.type == "task" && !n.task && (n.task = !0, o.push(e.activityData.origin.name)), (t == "version" || e.activityData.origin.type == "version") && (n.product || (n.product = !0, o.push(e.activityData.parents?.find((a) => a.type == "product")?.name)), n.version || (n.version = !0, o.push(e.activityData.origin.name))), o;
|
|
2953
|
-
},
|
|
2958
|
+
}, Bi = F.div`
|
|
2954
2959
|
display: inline-flex;
|
|
2955
2960
|
align-items: center;
|
|
2956
2961
|
gap: var(--base-gap-small);
|
|
@@ -2959,7 +2964,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2959
2964
|
font-variation-settings: 'FILL' 1;
|
|
2960
2965
|
font-size: 16px;
|
|
2961
2966
|
}
|
|
2962
|
-
`,
|
|
2967
|
+
`, Gi = F.span`
|
|
2963
2968
|
color: var(--md-sys-color-outline);
|
|
2964
2969
|
font-size: 12px;
|
|
2965
2970
|
max-width: 300px;
|
|
@@ -2969,37 +2974,37 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
2969
2974
|
span {
|
|
2970
2975
|
font-size: inherit;
|
|
2971
2976
|
}
|
|
2972
|
-
`, Pt =
|
|
2973
|
-
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */
|
|
2974
|
-
e && /* @__PURE__ */ l(
|
|
2975
|
-
/* @__PURE__ */ l(
|
|
2977
|
+
`, Pt = ft(
|
|
2978
|
+
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ k(Bi, { ...a, ref: r, children: [
|
|
2979
|
+
e && /* @__PURE__ */ l(se, { icon: e, style: { color: t } }),
|
|
2980
|
+
/* @__PURE__ */ l(Gi, { title: o, children: n ? n.map((s, i) => /* @__PURE__ */ k(xo, { children: [
|
|
2976
2981
|
/* @__PURE__ */ l("span", { style: { color: s.color }, children: s.label }),
|
|
2977
2982
|
i < n.length - 1 && ", "
|
|
2978
2983
|
] }, i)) : o })
|
|
2979
2984
|
] })
|
|
2980
|
-
),
|
|
2985
|
+
), Hi = (e) => {
|
|
2981
2986
|
const t = typeof e.icon == "string" ? e.icon : e.icon?.name, o = e.color ?? (typeof e.icon == "object" ? e.icon?.color : void 0);
|
|
2982
2987
|
return { name: e.label, icon: t, color: o };
|
|
2983
|
-
},
|
|
2988
|
+
}, qi = (e, t) => {
|
|
2984
2989
|
const o = t?.data.enum?.find((n) => n.value === e)?.label;
|
|
2985
2990
|
if (o) return o;
|
|
2986
2991
|
if (t?.data.type === "datetime") {
|
|
2987
2992
|
const n = new Date(String(e));
|
|
2988
|
-
if (!isNaN(n.getTime())) return
|
|
2993
|
+
if (!isNaN(n.getTime())) return ma(n, "dd-MM-yyyy");
|
|
2989
2994
|
}
|
|
2990
2995
|
return String(e);
|
|
2991
|
-
},
|
|
2996
|
+
}, Wi = (e, t) => e === "description" || t?.data.widget === "markdown", Qi = (e, t, o) => {
|
|
2992
2997
|
if (e == null || e === "" || Array.isArray(e) && !e.length) return { name: "none" };
|
|
2993
|
-
if (typeof e == "string" &&
|
|
2994
|
-
return { name:
|
|
2998
|
+
if (typeof e == "string" && Wi(o, t))
|
|
2999
|
+
return { name: tr(e) || "none" };
|
|
2995
3000
|
if (t?.data.type === "boolean") return { name: e ? "Checked" : "Unchecked" };
|
|
2996
3001
|
const a = Array.isArray(e) ? e : [e];
|
|
2997
3002
|
if (a.length === 1) {
|
|
2998
3003
|
const r = t?.data.enum?.find((s) => s.value === a[0]);
|
|
2999
|
-
if (r) return
|
|
3004
|
+
if (r) return Hi(r);
|
|
3000
3005
|
}
|
|
3001
|
-
return { name: a.map((r) =>
|
|
3002
|
-
},
|
|
3006
|
+
return { name: a.map((r) => qi(r, t)).join(", ") };
|
|
3007
|
+
}, Yi = ({
|
|
3003
3008
|
entityType: e,
|
|
3004
3009
|
projectInfo: t,
|
|
3005
3010
|
activity: o = {}
|
|
@@ -3012,35 +3017,35 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3012
3017
|
oldStatus: i,
|
|
3013
3018
|
newStatus: c,
|
|
3014
3019
|
activityData: m = {}
|
|
3015
|
-
} = o, { key: p, oldValue: g, newValue: u } = m, h =
|
|
3016
|
-
name:
|
|
3017
|
-
icon:
|
|
3018
|
-
color:
|
|
3019
|
-
}), T = (
|
|
3020
|
-
const Q = Array.isArray(
|
|
3020
|
+
} = o, { key: p, oldValue: g, newValue: u } = m, h = zi(o, e), v = n === "attrib.change", y = n === "tags.change", D = n === "subtype.change", { data: P = [] } = Da(void 0, { skip: !v }), C = S(() => P.find((N) => N.name === p), [P, p]), f = v ? C?.data.title || p : y ? "Tags" : D ? "Type" : void 0, b = (N) => ({
|
|
3021
|
+
name: N?.name || "",
|
|
3022
|
+
icon: N?.icon,
|
|
3023
|
+
color: N?.color
|
|
3024
|
+
}), T = (N) => {
|
|
3025
|
+
const Q = Array.isArray(N) ? N.map(String) : [];
|
|
3021
3026
|
if (!Q.length) return { name: "none" };
|
|
3022
3027
|
const Y = Q.map((H) => ({
|
|
3023
3028
|
label: H,
|
|
3024
3029
|
color: t?.tags?.find((J) => J.name === H)?.color
|
|
3025
3030
|
}));
|
|
3026
3031
|
return { name: Q.join(", "), items: Y };
|
|
3027
|
-
}, I = n === "status.change", _ = (
|
|
3028
|
-
return /* @__PURE__ */
|
|
3029
|
-
/* @__PURE__ */
|
|
3032
|
+
}, I = n === "status.change", _ = (N, Q) => I ? b(Q) : y ? T(N) : Qi(N, C, p), R = _(g, i), E = _(u, c);
|
|
3033
|
+
return /* @__PURE__ */ k(ji, { children: [
|
|
3034
|
+
/* @__PURE__ */ k(Ui, { children: [
|
|
3030
3035
|
/* @__PURE__ */ l(Dt, { children: r || a }),
|
|
3031
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ k(Dt, { children: [
|
|
3032
3037
|
"- ",
|
|
3033
3038
|
h.join(" / "),
|
|
3034
3039
|
" -"
|
|
3035
3040
|
] }),
|
|
3036
3041
|
f && /* @__PURE__ */ l(Dt, { children: /* @__PURE__ */ l("strong", { children: f }) }),
|
|
3037
3042
|
/* @__PURE__ */ l(Pt, { ...R }),
|
|
3038
|
-
/* @__PURE__ */ l(
|
|
3043
|
+
/* @__PURE__ */ l(se, { icon: "trending_flat" }),
|
|
3039
3044
|
/* @__PURE__ */ l(Pt, { ...E })
|
|
3040
3045
|
] }),
|
|
3041
|
-
/* @__PURE__ */ l(
|
|
3046
|
+
/* @__PURE__ */ l(ut, { date: s })
|
|
3042
3047
|
] });
|
|
3043
|
-
},
|
|
3048
|
+
}, Ji = F.li`
|
|
3044
3049
|
/* reset default */
|
|
3045
3050
|
list-style: none;
|
|
3046
3051
|
margin: 0;
|
|
@@ -3053,7 +3058,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3053
3058
|
padding: 4px 8px;
|
|
3054
3059
|
border-radius: var(--border-radius-m);
|
|
3055
3060
|
user-select: none;
|
|
3056
|
-
`,
|
|
3061
|
+
`, Ki = F.div`
|
|
3057
3062
|
display: flex;
|
|
3058
3063
|
flex-wrap: nowrap;
|
|
3059
3064
|
align-items: start;
|
|
@@ -3061,18 +3066,18 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3061
3066
|
gap: var(--base-gap-small);
|
|
3062
3067
|
padding: 0px 4px;
|
|
3063
3068
|
overflow: hidden;
|
|
3064
|
-
`,
|
|
3069
|
+
`, Xi = F.span`
|
|
3065
3070
|
color: var(--md-sys-color-outline);
|
|
3066
3071
|
white-space: wrap;
|
|
3067
3072
|
font-size: 12px;
|
|
3068
|
-
`,
|
|
3073
|
+
`, fn = ({ activity: e, isAdding: t }) => {
|
|
3069
3074
|
const { authorFullName: o, createdAt: n, activityData: a, authorName: r } = e || {}, { assignee: s } = a || {};
|
|
3070
3075
|
let i = o || r;
|
|
3071
|
-
return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */ l(
|
|
3072
|
-
/* @__PURE__ */ l(
|
|
3073
|
-
/* @__PURE__ */ l(
|
|
3076
|
+
return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */ l(Ji, { children: /* @__PURE__ */ k(Ki, { children: [
|
|
3077
|
+
/* @__PURE__ */ l(Xi, { children: i }),
|
|
3078
|
+
/* @__PURE__ */ l(ut, { date: n })
|
|
3074
3079
|
] }) });
|
|
3075
|
-
},
|
|
3080
|
+
}, Zi = F.li`
|
|
3076
3081
|
/* reset default */
|
|
3077
3082
|
list-style: none;
|
|
3078
3083
|
margin: 0;
|
|
@@ -3084,7 +3089,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3084
3089
|
|
|
3085
3090
|
width: 100%;
|
|
3086
3091
|
padding: 8px;
|
|
3087
|
-
`,
|
|
3092
|
+
`, es = F.div`
|
|
3088
3093
|
border-radius: var(--border-radius-m);
|
|
3089
3094
|
padding: var(--padding-m);
|
|
3090
3095
|
|
|
@@ -3100,7 +3105,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3100
3105
|
display: inline;
|
|
3101
3106
|
}
|
|
3102
3107
|
}
|
|
3103
|
-
`,
|
|
3108
|
+
`, ts = F.div`
|
|
3104
3109
|
display: flex;
|
|
3105
3110
|
flex-direction: row;
|
|
3106
3111
|
justify-content: space-between;
|
|
@@ -3114,7 +3119,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3114
3119
|
min-width: 0;
|
|
3115
3120
|
overflow: hidden;
|
|
3116
3121
|
}
|
|
3117
|
-
`,
|
|
3122
|
+
`, yn = F.div`
|
|
3118
3123
|
display: flex;
|
|
3119
3124
|
align-items: center;
|
|
3120
3125
|
justify-content: space-between;
|
|
@@ -3138,7 +3143,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3138
3143
|
display: none;
|
|
3139
3144
|
flex: 1;
|
|
3140
3145
|
}
|
|
3141
|
-
`,
|
|
3146
|
+
`, ns = F(Ra)`
|
|
3142
3147
|
width: 74px;
|
|
3143
3148
|
min-width: 74px;
|
|
3144
3149
|
height: unset;
|
|
@@ -3152,23 +3157,23 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3152
3157
|
img {
|
|
3153
3158
|
object-fit: cover;
|
|
3154
3159
|
}
|
|
3155
|
-
`,
|
|
3160
|
+
`, os = F.span`
|
|
3156
3161
|
overflow: hidden;
|
|
3157
3162
|
text-overflow: ellipsis;
|
|
3158
3163
|
white-space: nowrap;
|
|
3159
3164
|
display: block;
|
|
3160
3165
|
min-width: 0;
|
|
3161
|
-
`,
|
|
3166
|
+
`, as = F.div`
|
|
3162
3167
|
margin-top: var(--base-gap-small);
|
|
3163
3168
|
color: var(--md-sys-color-outline);
|
|
3164
3169
|
word-break: break-word;
|
|
3165
|
-
`,
|
|
3170
|
+
`, rs = F.li`
|
|
3166
3171
|
/* reset default */
|
|
3167
3172
|
list-style: none;
|
|
3168
3173
|
margin: 0;
|
|
3169
3174
|
padding: 0;
|
|
3170
3175
|
padding: 0px 8px;
|
|
3171
|
-
`,
|
|
3176
|
+
`, Yn = F.div`
|
|
3172
3177
|
width: 100%;
|
|
3173
3178
|
display: flex;
|
|
3174
3179
|
align-items: center;
|
|
@@ -3191,7 +3196,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3191
3196
|
&:hover {
|
|
3192
3197
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
3193
3198
|
}
|
|
3194
|
-
`,
|
|
3199
|
+
`, is = ({
|
|
3195
3200
|
activity: e,
|
|
3196
3201
|
projectName: t,
|
|
3197
3202
|
entityType: o,
|
|
@@ -3202,9 +3207,9 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3202
3207
|
const { onOpenViewer: s } = ze();
|
|
3203
3208
|
let { authorName: i, authorFullName: c, createdAt: m, versions: p = [] } = e;
|
|
3204
3209
|
const g = a === "versions" || a && typeof a == "object" && a.conditions?.some((C) => C.key === "versions" && C.value === !0), [u, h] = L(g), v = 2, [y, D] = L(!1), P = (C, f) => s?.({ versionIds: [C], productId: f, projectName: t });
|
|
3205
|
-
return /* @__PURE__ */
|
|
3210
|
+
return /* @__PURE__ */ k(Zi, { children: [
|
|
3206
3211
|
/* @__PURE__ */ l(
|
|
3207
|
-
|
|
3212
|
+
Qn,
|
|
3208
3213
|
{
|
|
3209
3214
|
name: i,
|
|
3210
3215
|
fullName: c || i,
|
|
@@ -3216,29 +3221,29 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3216
3221
|
}
|
|
3217
3222
|
),
|
|
3218
3223
|
p.flatMap((C, f) => {
|
|
3219
|
-
const { name: b, id: T, productId: I, productName: _, thumbnailHash: R, comment: E } = C,
|
|
3220
|
-
return (f < v || u) && /* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
+
const { name: b, id: T, productId: I, productName: _, thumbnailHash: R, comment: E } = C, N = r.find((Q) => Q.name === C.status);
|
|
3225
|
+
return (f < v || u) && /* @__PURE__ */ k(es, { onClick: () => P(T, I), children: [
|
|
3226
|
+
/* @__PURE__ */ k(ts, { children: [
|
|
3227
|
+
/* @__PURE__ */ k("div", { children: [
|
|
3228
|
+
/* @__PURE__ */ k(yn, { children: [
|
|
3224
3229
|
/* @__PURE__ */ l("span", { children: _ }),
|
|
3225
|
-
/* @__PURE__ */ l(
|
|
3230
|
+
/* @__PURE__ */ l(ut, { date: m, isExact: !0 })
|
|
3226
3231
|
] }),
|
|
3227
|
-
/* @__PURE__ */
|
|
3228
|
-
/* @__PURE__ */ l(
|
|
3232
|
+
/* @__PURE__ */ k(yn, { children: [
|
|
3233
|
+
/* @__PURE__ */ l(os, { className: "version", children: b }),
|
|
3229
3234
|
" -",
|
|
3230
3235
|
/* @__PURE__ */ l(
|
|
3231
3236
|
Pt,
|
|
3232
3237
|
{
|
|
3233
|
-
icon:
|
|
3234
|
-
color:
|
|
3235
|
-
name:
|
|
3238
|
+
icon: N?.icon,
|
|
3239
|
+
color: N?.color,
|
|
3240
|
+
name: N?.name || ""
|
|
3236
3241
|
}
|
|
3237
3242
|
)
|
|
3238
3243
|
] })
|
|
3239
3244
|
] }),
|
|
3240
3245
|
/* @__PURE__ */ l(
|
|
3241
|
-
|
|
3246
|
+
ns,
|
|
3242
3247
|
{
|
|
3243
3248
|
projectName: t,
|
|
3244
3249
|
entityId: T,
|
|
@@ -3250,25 +3255,25 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3250
3255
|
}
|
|
3251
3256
|
)
|
|
3252
3257
|
] }),
|
|
3253
|
-
E && /* @__PURE__ */ l(
|
|
3258
|
+
E && /* @__PURE__ */ l(as, { children: E })
|
|
3254
3259
|
] }, T);
|
|
3255
3260
|
}),
|
|
3256
|
-
!g && p.length > v && /* @__PURE__ */
|
|
3257
|
-
/* @__PURE__ */ l(
|
|
3261
|
+
!g && p.length > v && /* @__PURE__ */ k(Yn, { onClick: () => h(!u), children: [
|
|
3262
|
+
/* @__PURE__ */ l(se, { icon: "more" }),
|
|
3258
3263
|
/* @__PURE__ */ l("span", { children: u ? "Show less" : `Show ${p.length - v} more versions` })
|
|
3259
3264
|
] })
|
|
3260
3265
|
] });
|
|
3261
|
-
},
|
|
3266
|
+
}, ss = ({ activities: e, editProps: t, ...o }) => {
|
|
3262
3267
|
const [n, a] = L(!1);
|
|
3263
|
-
return /* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */ l(
|
|
3265
|
-
/* @__PURE__ */ l(
|
|
3268
|
+
return /* @__PURE__ */ k(Ce, { children: [
|
|
3269
|
+
/* @__PURE__ */ l(rs, { children: /* @__PURE__ */ k(Yn, { onClick: () => a(!n), children: [
|
|
3270
|
+
/* @__PURE__ */ l(se, { icon: n ? "expand_less" : "chevron_right" }),
|
|
3266
3271
|
n ? "Show less" : "Show more"
|
|
3267
3272
|
] }) }),
|
|
3268
3273
|
n && e.map((r) => (
|
|
3269
3274
|
// @ts-expect-error
|
|
3270
3275
|
/* @__PURE__ */ l(
|
|
3271
|
-
|
|
3276
|
+
Jn,
|
|
3272
3277
|
{
|
|
3273
3278
|
editProps: t,
|
|
3274
3279
|
activity: r,
|
|
@@ -3279,7 +3284,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3279
3284
|
)
|
|
3280
3285
|
))
|
|
3281
3286
|
] });
|
|
3282
|
-
},
|
|
3287
|
+
}, Jn = ({
|
|
3283
3288
|
activity: e,
|
|
3284
3289
|
fromGroup: t,
|
|
3285
3290
|
annotationFrameStart: o,
|
|
@@ -3298,7 +3303,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3298
3303
|
return (
|
|
3299
3304
|
// @ts-expect-error
|
|
3300
3305
|
/* @__PURE__ */ l(
|
|
3301
|
-
|
|
3306
|
+
Vi,
|
|
3302
3307
|
{
|
|
3303
3308
|
activity: e,
|
|
3304
3309
|
annotationFrameStart: o,
|
|
@@ -3315,18 +3320,18 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3315
3320
|
case "attrib.change":
|
|
3316
3321
|
case "tags.change":
|
|
3317
3322
|
case "subtype.change":
|
|
3318
|
-
return /* @__PURE__ */ l(
|
|
3323
|
+
return /* @__PURE__ */ l(Yi, { activity: e, projectInfo: n, ...g });
|
|
3319
3324
|
case "assignee.add":
|
|
3320
|
-
return /* @__PURE__ */ l(
|
|
3325
|
+
return /* @__PURE__ */ l(fn, { activity: e, ...g, isAdding: !0 });
|
|
3321
3326
|
case "assignee.remove":
|
|
3322
|
-
return /* @__PURE__ */ l(
|
|
3327
|
+
return /* @__PURE__ */ l(fn, { activity: e, ...g });
|
|
3323
3328
|
case "version.publish":
|
|
3324
|
-
return /* @__PURE__ */ l(
|
|
3329
|
+
return /* @__PURE__ */ l(is, { activity: e, projectInfo: n, filter: s, statuses: c, ...g });
|
|
3325
3330
|
case "version.review":
|
|
3326
|
-
return /* @__PURE__ */ l(
|
|
3331
|
+
return /* @__PURE__ */ l(Ri, { activity: e, isGuest: p, ...g });
|
|
3327
3332
|
case "group":
|
|
3328
3333
|
return !t && /* @__PURE__ */ l(
|
|
3329
|
-
|
|
3334
|
+
ss,
|
|
3330
3335
|
{
|
|
3331
3336
|
editProps: r,
|
|
3332
3337
|
activities: e.items || [],
|
|
@@ -3337,7 +3342,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3337
3342
|
default:
|
|
3338
3343
|
return null;
|
|
3339
3344
|
}
|
|
3340
|
-
},
|
|
3345
|
+
}, cs = F.section`
|
|
3341
3346
|
padding-bottom: 4px;
|
|
3342
3347
|
overflow: hidden;
|
|
3343
3348
|
position: relative;
|
|
@@ -3365,7 +3370,7 @@ const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (
|
|
|
3365
3370
|
z-index: 1;
|
|
3366
3371
|
}
|
|
3367
3372
|
`;
|
|
3368
|
-
|
|
3373
|
+
F.div`
|
|
3369
3374
|
position: absolute;
|
|
3370
3375
|
left: 8px;
|
|
3371
3376
|
right: 8px;
|
|
@@ -3385,7 +3390,7 @@ A.div`
|
|
|
3385
3390
|
color: inherit;
|
|
3386
3391
|
}
|
|
3387
3392
|
`;
|
|
3388
|
-
const
|
|
3393
|
+
const ls = F.ul`
|
|
3389
3394
|
gap: var(--base-gap-large);
|
|
3390
3395
|
overflow-y: auto;
|
|
3391
3396
|
padding: 24px 0;
|
|
@@ -3406,11 +3411,11 @@ const ss = A.ul`
|
|
|
3406
3411
|
& > *:last-child {
|
|
3407
3412
|
margin-top: 32px;
|
|
3408
3413
|
}
|
|
3409
|
-
`,
|
|
3414
|
+
`, ds = F.span`
|
|
3410
3415
|
padding: 16px 8px;
|
|
3411
3416
|
color: var(--md-sys-color-outline);
|
|
3412
3417
|
font-size: 11px;
|
|
3413
|
-
`,
|
|
3418
|
+
`, us = F.div`
|
|
3414
3419
|
height: 50px;
|
|
3415
3420
|
border-radius: 8px;
|
|
3416
3421
|
overflow: hidden;
|
|
@@ -3418,7 +3423,7 @@ const ss = A.ul`
|
|
|
3418
3423
|
opacity: 0.5;
|
|
3419
3424
|
|
|
3420
3425
|
position: relative;
|
|
3421
|
-
`,
|
|
3426
|
+
`, ms = ({
|
|
3422
3427
|
projectName: e,
|
|
3423
3428
|
entityType: t,
|
|
3424
3429
|
entities: o = [],
|
|
@@ -3465,17 +3470,17 @@ const ss = A.ul`
|
|
|
3465
3470
|
return {
|
|
3466
3471
|
submitComment: async (C, f = [], b = {}) => {
|
|
3467
3472
|
const T = o.map(({ id: R, subTitle: E }) => {
|
|
3468
|
-
const
|
|
3473
|
+
const N = cn(), Q = f.map((te) => te.id), Y = a ? { ...b, entityList: a } : b, H = {
|
|
3469
3474
|
body: C,
|
|
3470
3475
|
activityType: "comment",
|
|
3471
|
-
id:
|
|
3476
|
+
id: N,
|
|
3472
3477
|
files: Q,
|
|
3473
3478
|
data: Y
|
|
3474
3479
|
}, J = f.filter(
|
|
3475
3480
|
({ id: te }) => !b.annotations?.some(
|
|
3476
3481
|
(oe) => oe.transparent === te
|
|
3477
3482
|
)
|
|
3478
|
-
), q = h({ entityId: R, newId:
|
|
3483
|
+
), q = h({ entityId: R, newId: N, subTitle: E, value: C, files: J, data: b });
|
|
3479
3484
|
return r({
|
|
3480
3485
|
projectName: e,
|
|
3481
3486
|
entityType: t,
|
|
@@ -3487,12 +3492,12 @@ const ss = A.ul`
|
|
|
3487
3492
|
});
|
|
3488
3493
|
}), _ = (await Promise.all(T)).filter((R) => R.error);
|
|
3489
3494
|
if (_.length > 0) {
|
|
3490
|
-
const R =
|
|
3495
|
+
const R = an(_[0].error) || "Failed to create comment";
|
|
3491
3496
|
throw Fe.error(R), new Error(R);
|
|
3492
3497
|
}
|
|
3493
3498
|
},
|
|
3494
3499
|
updateComment: async (C, f, b = [], T = {}) => {
|
|
3495
|
-
const I = b.map((
|
|
3500
|
+
const I = b.map((N) => N.id), _ = {
|
|
3496
3501
|
body: f,
|
|
3497
3502
|
files: I,
|
|
3498
3503
|
data: T
|
|
@@ -3512,8 +3517,8 @@ const ss = A.ul`
|
|
|
3512
3517
|
filter: n,
|
|
3513
3518
|
...E
|
|
3514
3519
|
});
|
|
3515
|
-
} catch (
|
|
3516
|
-
throw Fe.error(
|
|
3520
|
+
} catch (N) {
|
|
3521
|
+
throw Fe.error(an(N)), N;
|
|
3517
3522
|
}
|
|
3518
3523
|
},
|
|
3519
3524
|
deleteComment: async (C, f, b = []) => {
|
|
@@ -3534,8 +3539,8 @@ const ss = A.ul`
|
|
|
3534
3539
|
},
|
|
3535
3540
|
submitReview: async (C) => {
|
|
3536
3541
|
const f = o.map(({ id: b, subTitle: T }) => {
|
|
3537
|
-
const I =
|
|
3538
|
-
body:
|
|
3542
|
+
const I = cn(), _ = { feedback: C, entityList: a }, R = {
|
|
3543
|
+
body: Xr(C, t),
|
|
3539
3544
|
activityType: "version.review",
|
|
3540
3545
|
id: I,
|
|
3541
3546
|
data: _
|
|
@@ -3553,7 +3558,7 @@ const ss = A.ul`
|
|
|
3553
3558
|
},
|
|
3554
3559
|
isSaving: c
|
|
3555
3560
|
};
|
|
3556
|
-
},
|
|
3561
|
+
}, Nt = (e = {}) => {
|
|
3557
3562
|
const {
|
|
3558
3563
|
updatedAt: t,
|
|
3559
3564
|
createdAt: o,
|
|
@@ -3573,7 +3578,7 @@ const ss = A.ul`
|
|
|
3573
3578
|
status: i?.status,
|
|
3574
3579
|
thumbnailHash: i?.thumbnailHash
|
|
3575
3580
|
};
|
|
3576
|
-
},
|
|
3581
|
+
}, ps = 5, gs = (e = []) => {
|
|
3577
3582
|
const t = [];
|
|
3578
3583
|
let o = null;
|
|
3579
3584
|
for (const n of e) {
|
|
@@ -3582,23 +3587,23 @@ const ss = A.ul`
|
|
|
3582
3587
|
continue;
|
|
3583
3588
|
}
|
|
3584
3589
|
if (!o) {
|
|
3585
|
-
o = { ...n }, o.versions = [
|
|
3590
|
+
o = { ...n }, o.versions = [Nt(n)];
|
|
3586
3591
|
continue;
|
|
3587
3592
|
}
|
|
3588
3593
|
const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, i = Ha(
|
|
3589
3594
|
new Date(o.createdAt),
|
|
3590
3595
|
new Date(n.createdAt)
|
|
3591
|
-
) <=
|
|
3596
|
+
) <= ps;
|
|
3592
3597
|
if (a && i && r) {
|
|
3593
|
-
o.versions.push(
|
|
3598
|
+
o.versions.push(Nt(n));
|
|
3594
3599
|
continue;
|
|
3595
3600
|
} else {
|
|
3596
|
-
t.push(o), o = { ...n }, o.versions = [
|
|
3601
|
+
t.push(o), o = { ...n }, o.versions = [Nt(n)];
|
|
3597
3602
|
continue;
|
|
3598
3603
|
}
|
|
3599
3604
|
}
|
|
3600
3605
|
return o && t.push(o), t;
|
|
3601
|
-
},
|
|
3606
|
+
}, hs = (e, t) => {
|
|
3602
3607
|
let o = {};
|
|
3603
3608
|
t.reduce((i, c) => (i[c.name] = c, i), o);
|
|
3604
3609
|
const n = [];
|
|
@@ -3646,14 +3651,14 @@ const ss = A.ul`
|
|
|
3646
3651
|
a = [];
|
|
3647
3652
|
};
|
|
3648
3653
|
for (const i of e)
|
|
3649
|
-
if (
|
|
3654
|
+
if (fs.includes(i.activityType))
|
|
3650
3655
|
a.push(i);
|
|
3651
3656
|
else {
|
|
3652
3657
|
const c = n.length === 0;
|
|
3653
3658
|
s(c, n.length), n.push(i);
|
|
3654
3659
|
}
|
|
3655
3660
|
return a.length > 0 && s(!1, n.length), n;
|
|
3656
|
-
},
|
|
3661
|
+
}, vn = (e, t, o = "oldValue") => {
|
|
3657
3662
|
const n = [];
|
|
3658
3663
|
let a = null, r = null;
|
|
3659
3664
|
for (const s of e)
|
|
@@ -3662,7 +3667,7 @@ const ss = A.ul`
|
|
|
3662
3667
|
a = { ...s }, r = new Date(s.createdAt);
|
|
3663
3668
|
continue;
|
|
3664
3669
|
}
|
|
3665
|
-
const i = a.authorName === s.authorName, c = a.origin.id === s.entityId, m = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), u = r !== null &&
|
|
3670
|
+
const i = a.authorName === s.authorName, c = a.origin.id === s.entityId, m = a.activityData?.key === s.activityData?.key, p = new Date(s.createdAt), u = r !== null && lt(r) && lt(p) && Math.abs(qa(r, p)) <= 20;
|
|
3666
3671
|
i && u && c && m ? (s[o] !== void 0 && (a[o] = s[o]), a.activityData = {
|
|
3667
3672
|
...a.activityData,
|
|
3668
3673
|
oldValue: s.activityData.oldValue
|
|
@@ -3670,14 +3675,14 @@ const ss = A.ul`
|
|
|
3670
3675
|
} else
|
|
3671
3676
|
a && (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = null, r = null), n.push(s);
|
|
3672
3677
|
return a && a.activityData.oldValue !== a.activityData.newValue && !n.some((s) => s.activityId === a.activityId) && n.push(a), n;
|
|
3673
|
-
},
|
|
3678
|
+
}, fs = [
|
|
3674
3679
|
"status.change",
|
|
3675
3680
|
"assignee.add",
|
|
3676
3681
|
"assignee.remove",
|
|
3677
3682
|
"attrib.change",
|
|
3678
3683
|
"tags.change",
|
|
3679
3684
|
"subtype.change"
|
|
3680
|
-
],
|
|
3685
|
+
], ys = (e = [], t = {}) => e.map((o) => {
|
|
3681
3686
|
const n = { ...o, origin: { ...o.origin } };
|
|
3682
3687
|
if (n.activityType === "status.change") {
|
|
3683
3688
|
if (!t) return n;
|
|
@@ -3685,15 +3690,15 @@ const ss = A.ul`
|
|
|
3685
3690
|
n.oldStatus = { ...s, name: a }, n.newStatus = { ...i, name: r };
|
|
3686
3691
|
}
|
|
3687
3692
|
return n;
|
|
3688
|
-
}),
|
|
3689
|
-
const s =
|
|
3690
|
-
() =>
|
|
3693
|
+
}), vs = (e = [], t = [], o) => t.includes(o) ? e.filter((n) => n.referenceType !== "relation") : e, bs = (e = [], t = [], o = {}, n, a, r) => {
|
|
3694
|
+
const s = S(
|
|
3695
|
+
() => ys(e, o),
|
|
3691
3696
|
[e, o]
|
|
3692
|
-
), i =
|
|
3693
|
-
() =>
|
|
3697
|
+
), i = S(() => s.map((y) => ({ ...y, isOwner: a === y.authorName })), [s, a]), c = S(
|
|
3698
|
+
() => vs(i, ["version"], n),
|
|
3694
3699
|
[i, n]
|
|
3695
|
-
), m =
|
|
3696
|
-
const C = new Date(D.createdAt), f = new Date(P.createdAt), b =
|
|
3700
|
+
), m = S(() => [...c].sort((D, P) => {
|
|
3701
|
+
const C = new Date(D.createdAt), f = new Date(P.createdAt), b = lt(C), T = lt(f);
|
|
3697
3702
|
if (!b && !T)
|
|
3698
3703
|
return 0;
|
|
3699
3704
|
if (b) {
|
|
@@ -3701,34 +3706,34 @@ const ss = A.ul`
|
|
|
3701
3706
|
return -1;
|
|
3702
3707
|
} else return 1;
|
|
3703
3708
|
return Wa(f, C);
|
|
3704
|
-
}), [c]), p =
|
|
3705
|
-
() =>
|
|
3709
|
+
}), [c]), p = S(
|
|
3710
|
+
() => vn(m, "status.change", "oldStatus"),
|
|
3706
3711
|
[m]
|
|
3707
|
-
), g =
|
|
3708
|
-
() =>
|
|
3712
|
+
), g = S(
|
|
3713
|
+
() => vn(p, "attrib.change"),
|
|
3709
3714
|
[p]
|
|
3710
|
-
), u =
|
|
3715
|
+
), u = S(() => r?.conditions?.some(
|
|
3711
3716
|
(D) => "key" in D && D.key === "updates" && D.value === !0
|
|
3712
|
-
) ? g :
|
|
3713
|
-
() =>
|
|
3717
|
+
) ? g : hs(g, t), [g, t, r]), h = S(
|
|
3718
|
+
() => gs(u),
|
|
3714
3719
|
[u]
|
|
3715
3720
|
);
|
|
3716
|
-
return
|
|
3721
|
+
return S(() => [...new Map(
|
|
3717
3722
|
h.filter((D) => D && D.activityId).map((D) => [D.activityId, D])
|
|
3718
3723
|
).values()], [h]);
|
|
3719
|
-
},
|
|
3724
|
+
}, bn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }), ws = ({
|
|
3720
3725
|
entities: e = [],
|
|
3721
3726
|
feedRef: t,
|
|
3722
3727
|
filter: o,
|
|
3723
3728
|
disabled: n,
|
|
3724
3729
|
isLoading: a
|
|
3725
3730
|
}) => {
|
|
3726
|
-
const r =
|
|
3731
|
+
const r = ge({}), s = (i) => {
|
|
3727
3732
|
const c = i.current.querySelectorAll(".scroll-to"), m = Array.from(c).map((g) => g.closest("li.comment"));
|
|
3728
3733
|
return (m[m.length - 1]?.offsetTop || 0) - 8 || 0;
|
|
3729
3734
|
};
|
|
3730
3735
|
G(() => {
|
|
3731
|
-
const i =
|
|
3736
|
+
const i = bn(e, o);
|
|
3732
3737
|
!t.current || n || a || (t.current.scrollTop = r.current[i] || s(t));
|
|
3733
3738
|
}, [e, o, t.current, a]), G(() => {
|
|
3734
3739
|
let i = null;
|
|
@@ -3739,27 +3744,27 @@ const ss = A.ul`
|
|
|
3739
3744
|
i = setTimeout(() => {
|
|
3740
3745
|
i = null;
|
|
3741
3746
|
}, 300);
|
|
3742
|
-
const { scrollTop: p } = m.target, g =
|
|
3747
|
+
const { scrollTop: p } = m.target, g = bn(e, o);
|
|
3743
3748
|
r.current[g] = p;
|
|
3744
3749
|
};
|
|
3745
3750
|
return t.current?.addEventListener("scroll", c), () => {
|
|
3746
3751
|
t.current?.removeEventListener("scroll", c);
|
|
3747
3752
|
};
|
|
3748
3753
|
}, [t.current, o, e, n]);
|
|
3749
|
-
},
|
|
3754
|
+
}, xs = ({ feedRef: e, isInputOpen: t, height: o }) => {
|
|
3750
3755
|
G(() => {
|
|
3751
3756
|
if (!e.current) return;
|
|
3752
3757
|
const n = o;
|
|
3753
3758
|
e.current.scrollTop === 0 || (t ? e.current.scrollBy(0, n) : e.current.scrollBy(0, -n));
|
|
3754
3759
|
}, [t, e, o]);
|
|
3755
|
-
},
|
|
3756
|
-
|
|
3760
|
+
}, ks = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), As = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ l(
|
|
3761
|
+
us,
|
|
3757
3762
|
{
|
|
3758
3763
|
className: "loading",
|
|
3759
|
-
style: { minHeight:
|
|
3764
|
+
style: { minHeight: ks(50, 150) }
|
|
3760
3765
|
},
|
|
3761
3766
|
o
|
|
3762
|
-
)),
|
|
3767
|
+
)), Fs = ({
|
|
3763
3768
|
feedRef: e,
|
|
3764
3769
|
highlighted: t = [],
|
|
3765
3770
|
isLoading: o,
|
|
@@ -3767,7 +3772,7 @@ const ss = A.ul`
|
|
|
3767
3772
|
hasNextPage: a,
|
|
3768
3773
|
activities: r
|
|
3769
3774
|
}) => {
|
|
3770
|
-
const s =
|
|
3775
|
+
const s = ge([]), i = async (m, p = 0) => {
|
|
3771
3776
|
if (!n) return null;
|
|
3772
3777
|
const g = m.querySelector("li.isHighlighted");
|
|
3773
3778
|
if (g) return g;
|
|
@@ -3786,7 +3791,7 @@ const ss = A.ul`
|
|
|
3786
3791
|
G(() => {
|
|
3787
3792
|
!t.length || !e.current || o || !n || t.every((m) => s.current?.includes(m)) || (console.log("trying to scroll to highlighted..."), c(e.current));
|
|
3788
3793
|
}, [e, t, r, o, n, s, a]);
|
|
3789
|
-
},
|
|
3794
|
+
}, Cs = (e) => e.map((t) => {
|
|
3790
3795
|
if (t.activityType !== "comment" || !t.activityData?.annotations) return t;
|
|
3791
3796
|
const o = t.files.map((a) => {
|
|
3792
3797
|
const r = t.activityData.annotations.find(
|
|
@@ -3795,17 +3800,17 @@ const ss = A.ul`
|
|
|
3795
3800
|
return r ? r.transparent === a.id ? null : { ...a, annotation: r } : a;
|
|
3796
3801
|
}).filter(Boolean);
|
|
3797
3802
|
return { ...t, files: o };
|
|
3798
|
-
}),
|
|
3803
|
+
}), Kn = [
|
|
3799
3804
|
"comments",
|
|
3800
3805
|
"versions",
|
|
3801
3806
|
"updates",
|
|
3802
3807
|
"checklists",
|
|
3803
3808
|
"has_attachments",
|
|
3804
3809
|
"in_review_session"
|
|
3805
|
-
],
|
|
3810
|
+
], Ts = (e) => !!e && "key" in e, Ds = (e, t) => {
|
|
3806
3811
|
const o = [], n = [], a = (r) => {
|
|
3807
3812
|
if (!r) return;
|
|
3808
|
-
if (
|
|
3813
|
+
if (Ts(r)) {
|
|
3809
3814
|
const i = r.key;
|
|
3810
3815
|
if (i === "body") {
|
|
3811
3816
|
const p = String(r.value ?? "");
|
|
@@ -3814,9 +3819,9 @@ const ss = A.ul`
|
|
|
3814
3819
|
}
|
|
3815
3820
|
const c = t.find((p) => p.id === i);
|
|
3816
3821
|
if (!c) return;
|
|
3817
|
-
if (
|
|
3822
|
+
if (Kn.includes(i)) {
|
|
3818
3823
|
r.value === !0 && o.push({
|
|
3819
|
-
id:
|
|
3824
|
+
id: tn(i),
|
|
3820
3825
|
label: c.label,
|
|
3821
3826
|
icon: c.icon,
|
|
3822
3827
|
type: "boolean",
|
|
@@ -3829,7 +3834,7 @@ const ss = A.ul`
|
|
|
3829
3834
|
}
|
|
3830
3835
|
const m = Array.isArray(r.value) ? r.value : [r.value];
|
|
3831
3836
|
o.push({
|
|
3832
|
-
id:
|
|
3837
|
+
id: tn(i),
|
|
3833
3838
|
label: c.label,
|
|
3834
3839
|
type: c.type,
|
|
3835
3840
|
icon: c.icon,
|
|
@@ -3842,32 +3847,32 @@ const ss = A.ul`
|
|
|
3842
3847
|
});
|
|
3843
3848
|
return;
|
|
3844
3849
|
}
|
|
3845
|
-
const s =
|
|
3850
|
+
const s = Ka(r, t);
|
|
3846
3851
|
if (s) {
|
|
3847
3852
|
o.push(s);
|
|
3848
3853
|
return;
|
|
3849
3854
|
}
|
|
3850
3855
|
r.conditions?.forEach(a);
|
|
3851
3856
|
};
|
|
3852
|
-
return e?.conditions?.forEach(a), n.length && o.push({ id:
|
|
3853
|
-
},
|
|
3857
|
+
return e?.conditions?.forEach(a), n.length && o.push({ id: Dn, label: "", values: n }), o;
|
|
3858
|
+
}, Ns = (e) => {
|
|
3854
3859
|
const t = [], o = [];
|
|
3855
3860
|
return e.forEach((n) => {
|
|
3856
|
-
const a =
|
|
3861
|
+
const a = Eo(n.id), r = (n.values || []).map((s) => s.id);
|
|
3857
3862
|
if (r.length)
|
|
3858
|
-
if (a ===
|
|
3863
|
+
if (a === Dn)
|
|
3859
3864
|
r.forEach(
|
|
3860
3865
|
(s) => o.push({ key: "body", operator: "like", value: String(s) })
|
|
3861
3866
|
);
|
|
3862
|
-
else if (
|
|
3867
|
+
else if (Kn.includes(a))
|
|
3863
3868
|
r.includes("true") && t.push({ key: a, operator: "eq", value: !0 });
|
|
3864
3869
|
else if (n.type === "datetime") {
|
|
3865
|
-
const s =
|
|
3870
|
+
const s = Xa(a, n);
|
|
3866
3871
|
s && t.push(s);
|
|
3867
3872
|
} else
|
|
3868
3873
|
t.push({ key: a, operator: "in", value: r.map(String) });
|
|
3869
3874
|
}), o.length === 1 ? t.push(o[0]) : o.length > 1 && t.push({ operator: "or", conditions: o }), { operator: "and", conditions: t };
|
|
3870
|
-
},
|
|
3875
|
+
}, Ss = F.div`
|
|
3871
3876
|
padding: 4px 8px;
|
|
3872
3877
|
padding-bottom: 0;
|
|
3873
3878
|
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25));
|
|
@@ -3882,7 +3887,7 @@ const ss = A.ul`
|
|
|
3882
3887
|
opacity: 0.5;
|
|
3883
3888
|
pointer-events: none;
|
|
3884
3889
|
}
|
|
3885
|
-
`, Xn =
|
|
3890
|
+
`, Xn = ft(
|
|
3886
3891
|
({
|
|
3887
3892
|
feedFilter: e,
|
|
3888
3893
|
setFeedFilter: t,
|
|
@@ -3893,7 +3898,7 @@ const ss = A.ul`
|
|
|
3893
3898
|
checklistCount: s,
|
|
3894
3899
|
onSearchTextChange: i
|
|
3895
3900
|
}) => {
|
|
3896
|
-
const c =
|
|
3901
|
+
const c = S(() => {
|
|
3897
3902
|
const f = (T, I, _) => ({
|
|
3898
3903
|
id: T,
|
|
3899
3904
|
label: I,
|
|
@@ -3944,19 +3949,19 @@ const ss = A.ul`
|
|
|
3944
3949
|
label: "Posted date",
|
|
3945
3950
|
icon: "calendar_today",
|
|
3946
3951
|
type: "datetime",
|
|
3947
|
-
values:
|
|
3952
|
+
values: pa()
|
|
3948
3953
|
}
|
|
3949
3954
|
];
|
|
3950
3955
|
}, [o, n, a]);
|
|
3951
3956
|
let m = "";
|
|
3952
3957
|
s?.total && s.total > 0 && (m = `${s.checked}/${s.total}`);
|
|
3953
|
-
const p =
|
|
3958
|
+
const p = S(
|
|
3954
3959
|
() => ["comments", { id: "checklists", label: m, tooltip: "Checklists" }],
|
|
3955
3960
|
[m]
|
|
3956
|
-
), g =
|
|
3957
|
-
() =>
|
|
3961
|
+
), g = S(
|
|
3962
|
+
() => Ds(e, c),
|
|
3958
3963
|
[e, c]
|
|
3959
|
-
), [u, h] = L(g), v =
|
|
3964
|
+
), [u, h] = L(g), v = nr(), y = ge(null);
|
|
3960
3965
|
G(() => {
|
|
3961
3966
|
h(g);
|
|
3962
3967
|
}, [JSON.stringify(g)]), G(() => {
|
|
@@ -3969,11 +3974,11 @@ const ss = A.ul`
|
|
|
3969
3974
|
};
|
|
3970
3975
|
}, [y]);
|
|
3971
3976
|
const D = (f) => {
|
|
3972
|
-
t(
|
|
3977
|
+
t(Ns(f)), i?.("");
|
|
3973
3978
|
};
|
|
3974
|
-
return /* @__PURE__ */
|
|
3979
|
+
return /* @__PURE__ */ k(Ss, { className: r ? "loading" : void 0, children: [
|
|
3975
3980
|
/* @__PURE__ */ l(
|
|
3976
|
-
|
|
3981
|
+
Mo,
|
|
3977
3982
|
{
|
|
3978
3983
|
ref: y,
|
|
3979
3984
|
compact: !0,
|
|
@@ -4022,7 +4027,7 @@ const ss = A.ul`
|
|
|
4022
4027
|
}
|
|
4023
4028
|
);
|
|
4024
4029
|
Xn.displayName = "FeedSearchFilter";
|
|
4025
|
-
function
|
|
4030
|
+
function Is({
|
|
4026
4031
|
projectName: e,
|
|
4027
4032
|
enabled: t,
|
|
4028
4033
|
entityIds: o,
|
|
@@ -4030,10 +4035,10 @@ function Ss({
|
|
|
4030
4035
|
loadingActivities: a,
|
|
4031
4036
|
userName: r
|
|
4032
4037
|
}) {
|
|
4033
|
-
const s =
|
|
4038
|
+
const s = S(
|
|
4034
4039
|
() => n.find((p) => p.activityType === "version.review" && p.authorName === r),
|
|
4035
4040
|
[n, r]
|
|
4036
|
-
), i = !!(o.length === 0 || !t || a || s), { data: c } =
|
|
4041
|
+
), i = !!(o.length === 0 || !t || a || s), { data: c } = Na(
|
|
4037
4042
|
{
|
|
4038
4043
|
projectName: e,
|
|
4039
4044
|
entityIds: o,
|
|
@@ -4043,27 +4048,27 @@ function Ss({
|
|
|
4043
4048
|
},
|
|
4044
4049
|
{ skip: i }
|
|
4045
4050
|
);
|
|
4046
|
-
return
|
|
4051
|
+
return S(() => s ?? c?.activities.at(-1), [s, c]);
|
|
4047
4052
|
}
|
|
4048
|
-
const
|
|
4049
|
-
const a =
|
|
4053
|
+
const Es = (e) => !!e.activityData?.annotations?.length || !!yt(e), Ms = ({ projectName: e, entityType: t, entities: o, activities: n }) => {
|
|
4054
|
+
const a = S(
|
|
4050
4055
|
() => t === "version" ? Object.fromEntries(
|
|
4051
4056
|
o.filter((i) => i.attrib).map((i) => [i.id, i.attrib?.frameStart ?? null])
|
|
4052
4057
|
) : {},
|
|
4053
4058
|
[t, o]
|
|
4054
|
-
), r =
|
|
4059
|
+
), r = S(() => {
|
|
4055
4060
|
const i = /* @__PURE__ */ new Set();
|
|
4056
4061
|
for (const c of n) {
|
|
4057
4062
|
const m = c.origin;
|
|
4058
|
-
c.activityType !== "comment" || m?.type !== "version" || m.id in a || !
|
|
4063
|
+
c.activityType !== "comment" || m?.type !== "version" || m.id in a || !Es(c) || i.add(m.id);
|
|
4059
4064
|
}
|
|
4060
4065
|
return [...i].sort();
|
|
4061
|
-
}, [n, a]), { data: s } =
|
|
4066
|
+
}, [n, a]), { data: s } = Sa(
|
|
4062
4067
|
{ projectName: e, versionIds: r },
|
|
4063
4068
|
{ skip: !e || !r.length }
|
|
4064
4069
|
);
|
|
4065
|
-
return
|
|
4066
|
-
},
|
|
4070
|
+
return S(() => ({ ...s, ...a }), [s, a]);
|
|
4071
|
+
}, Mc = 30, Pc = ({
|
|
4067
4072
|
disabled: e,
|
|
4068
4073
|
readOnly: t,
|
|
4069
4074
|
statuses: o = [],
|
|
@@ -4092,7 +4097,7 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4092
4097
|
setFeedFilter: _,
|
|
4093
4098
|
isGuest: R,
|
|
4094
4099
|
searchText: E,
|
|
4095
|
-
setSearchText:
|
|
4100
|
+
setSearchText: N
|
|
4096
4101
|
} = $e(), {
|
|
4097
4102
|
openSlideOut: Q,
|
|
4098
4103
|
highlightedActivities: Y,
|
|
@@ -4105,10 +4110,10 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4105
4110
|
(w) => "key" in w && w.key === "versions" && w.value === !0
|
|
4106
4111
|
), W = I.conditions?.some(
|
|
4107
4112
|
(w) => "key" in w && ["comments", "checklists", "versions", "updates"].includes(w.key) && w.value === !0
|
|
4108
|
-
),
|
|
4113
|
+
), U = I.conditions?.some(
|
|
4109
4114
|
(w) => "key" in w && (w.key === "comments" || w.key === "checklists") && w.value === !0
|
|
4110
|
-
), de = m === "version" || m === "folder", { data:
|
|
4111
|
-
() =>
|
|
4115
|
+
), de = m === "version" || m === "folder", { data: ae, isLoading: ne } = Ia({ projectName: i }, { skip: !i }), we = !te.data?.isManager && !te.data?.isAdmin && !ne && ae?.activities?.enabled && !ae?.activities?.activities?.includes("comment") || W && !U, xe = S(
|
|
4116
|
+
() => Cs(v),
|
|
4112
4117
|
[v]
|
|
4113
4118
|
);
|
|
4114
4119
|
G(() => {
|
|
@@ -4122,17 +4127,17 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4122
4127
|
q(w);
|
|
4123
4128
|
}, [xe]), G(() => {
|
|
4124
4129
|
const w = v.map((M) => {
|
|
4125
|
-
const O =
|
|
4130
|
+
const O = yt(M);
|
|
4126
4131
|
return O && { ...O, activityId: M.activityId };
|
|
4127
4132
|
}).filter((M) => !!M);
|
|
4128
4133
|
$(w);
|
|
4129
4134
|
}, [v]);
|
|
4130
|
-
const
|
|
4135
|
+
const ke = Ms({
|
|
4131
4136
|
projectName: i,
|
|
4132
4137
|
entityType: m,
|
|
4133
4138
|
entities: c,
|
|
4134
4139
|
activities: v
|
|
4135
|
-
}),
|
|
4140
|
+
}), he = bs(
|
|
4136
4141
|
// @ts-ignore
|
|
4137
4142
|
xe,
|
|
4138
4143
|
f,
|
|
@@ -4140,21 +4145,21 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4140
4145
|
m,
|
|
4141
4146
|
h,
|
|
4142
4147
|
I
|
|
4143
|
-
),
|
|
4144
|
-
if (!E) return
|
|
4148
|
+
), Me = S(() => {
|
|
4149
|
+
if (!E) return he;
|
|
4145
4150
|
const w = E.toLowerCase();
|
|
4146
|
-
return
|
|
4151
|
+
return he.filter(
|
|
4147
4152
|
(M) => M.body?.toLowerCase().includes(w)
|
|
4148
4153
|
);
|
|
4149
|
-
}, [
|
|
4150
|
-
|
|
4154
|
+
}, [he, E]), K = ge(null);
|
|
4155
|
+
xs({ feedRef: K, isInputOpen: p === it, height: 93 }), ws({
|
|
4151
4156
|
entities: c,
|
|
4152
|
-
feedRef:
|
|
4157
|
+
feedRef: K,
|
|
4153
4158
|
filter: I,
|
|
4154
4159
|
disabled: !!Y.length,
|
|
4155
4160
|
isLoading: y
|
|
4156
|
-
}),
|
|
4157
|
-
feedRef:
|
|
4161
|
+
}), Fs({
|
|
4162
|
+
feedRef: K,
|
|
4158
4163
|
highlighted: Y,
|
|
4159
4164
|
isLoading: y || D,
|
|
4160
4165
|
loadNextPage: P,
|
|
@@ -4162,12 +4167,12 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4162
4167
|
activities: v
|
|
4163
4168
|
});
|
|
4164
4169
|
const {
|
|
4165
|
-
submitComment:
|
|
4170
|
+
submitComment: Te,
|
|
4166
4171
|
updateComment: Oe,
|
|
4167
|
-
deleteComment:
|
|
4168
|
-
submitReview:
|
|
4169
|
-
isSaving:
|
|
4170
|
-
} =
|
|
4172
|
+
deleteComment: Se,
|
|
4173
|
+
submitReview: De,
|
|
4174
|
+
isSaving: Ye
|
|
4175
|
+
} = ms({
|
|
4171
4176
|
projectName: i,
|
|
4172
4177
|
entityType: m,
|
|
4173
4178
|
entities: c,
|
|
@@ -4175,58 +4180,58 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4175
4180
|
entityListId: n
|
|
4176
4181
|
}), Ve = qe(
|
|
4177
4182
|
async (w, M = [], O = {}) => {
|
|
4178
|
-
await
|
|
4183
|
+
await Te(w, M, O), K.current && K.current.scrollTo({ top: 0 });
|
|
4179
4184
|
},
|
|
4180
|
-
[
|
|
4181
|
-
),
|
|
4185
|
+
[Te, K]
|
|
4186
|
+
), fe = qe(
|
|
4182
4187
|
async (w) => {
|
|
4183
|
-
await
|
|
4188
|
+
await De(w);
|
|
4184
4189
|
},
|
|
4185
|
-
[
|
|
4190
|
+
[De]
|
|
4186
4191
|
), Be = (w, M) => {
|
|
4187
4192
|
const O = w?.target;
|
|
4188
4193
|
if (!O || !M) return console.log("no target or activity");
|
|
4189
|
-
const
|
|
4194
|
+
const X = O.checked, ue = X ? "[ ]" : "[x]", A = X ? "[x]" : "[ ]", { body: me } = M, ye = Array.from(
|
|
4190
4195
|
O.closest(".comment-body")?.querySelectorAll(".task-list-item") || []
|
|
4191
|
-
).findIndex((
|
|
4192
|
-
let
|
|
4193
|
-
(me.match(/\[.\]/g) || []).forEach((
|
|
4194
|
-
|
|
4196
|
+
).findIndex((et) => et === O.closest("li"));
|
|
4197
|
+
let Ie = ye;
|
|
4198
|
+
(me.match(/\[.\]/g) || []).forEach((et, bt) => {
|
|
4199
|
+
et !== ue && bt < ye && Ie--;
|
|
4195
4200
|
});
|
|
4196
4201
|
const Le = [];
|
|
4197
|
-
let
|
|
4198
|
-
for (; (
|
|
4199
|
-
Le.push(
|
|
4200
|
-
const Xe = Le[
|
|
4202
|
+
let Ke = -1;
|
|
4203
|
+
for (; (Ke = me.indexOf(ue, Ke + 1)) > -1; )
|
|
4204
|
+
Le.push(Ke);
|
|
4205
|
+
const Xe = Le[Ie];
|
|
4201
4206
|
if (Xe === void 0) return;
|
|
4202
|
-
const mt = Xe + ue.length,
|
|
4203
|
-
|
|
4207
|
+
const mt = Xe + ue.length, Ze = me.slice(0, Xe) + A + me.slice(mt);
|
|
4208
|
+
Ze && Oe(M, Ze, M.files);
|
|
4204
4209
|
}, Ge = (w) => {
|
|
4205
|
-
const { entityId: M, entityType: O, activityId:
|
|
4210
|
+
const { entityId: M, entityType: O, activityId: X } = w;
|
|
4206
4211
|
if (!O || !["version", "task", "folder"].includes(O))
|
|
4207
4212
|
return console.log("Entity type not supported yet");
|
|
4208
4213
|
if (!M || !O || !i) return console.log("No entity id or type found");
|
|
4209
|
-
Q({ entityId: M, entityType: O, projectName: i }), H([
|
|
4210
|
-
},
|
|
4211
|
-
const O = Object.values(
|
|
4212
|
-
id:
|
|
4213
|
-
files:
|
|
4214
|
-
})).filter((
|
|
4214
|
+
Q({ entityId: M, entityType: O, projectName: i }), H([X]);
|
|
4215
|
+
}, re = ({ index: w, activityId: M }) => {
|
|
4216
|
+
const O = Object.values(Me).reverse().filter((X) => X.activityType == "comment").map((X) => ({
|
|
4217
|
+
id: X.activityId,
|
|
4218
|
+
files: X.files.filter((ue) => vt(ue.mime, ue.ext))
|
|
4219
|
+
})).filter((X) => X.files.length > 0);
|
|
4215
4220
|
J?.({ files: O, activityId: M, index: w, projectName: i });
|
|
4216
|
-
}, [
|
|
4221
|
+
}, [Je, Pe] = L(null), He = !we && !t && !e, _e = qe(
|
|
4217
4222
|
(w) => {
|
|
4218
|
-
Pe({ key:
|
|
4223
|
+
Pe({ key: wn(), activity: w }), u(it);
|
|
4219
4224
|
},
|
|
4220
4225
|
[u]
|
|
4221
|
-
), je =
|
|
4226
|
+
), je = S(() => As(10), []), Ae = Is({
|
|
4222
4227
|
projectName: i,
|
|
4223
4228
|
enabled: r,
|
|
4224
4229
|
entityIds: c.map((w) => w.id),
|
|
4225
|
-
activities:
|
|
4230
|
+
activities: he,
|
|
4226
4231
|
loadingActivities: y,
|
|
4227
4232
|
userName: h
|
|
4228
4233
|
});
|
|
4229
|
-
return /* @__PURE__ */ l(
|
|
4234
|
+
return /* @__PURE__ */ l(Ce, { children: /* @__PURE__ */ k(cs, { className: "feed", children: [
|
|
4230
4235
|
void 0,
|
|
4231
4236
|
/* @__PURE__ */ l(
|
|
4232
4237
|
Xn,
|
|
@@ -4237,26 +4242,26 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4237
4242
|
categories: b,
|
|
4238
4243
|
supportsReviewSession: de,
|
|
4239
4244
|
isLoading: y,
|
|
4240
|
-
onSearchTextChange:
|
|
4245
|
+
onSearchTextChange: N,
|
|
4241
4246
|
checklistCount: T
|
|
4242
4247
|
}
|
|
4243
4248
|
),
|
|
4244
|
-
/* @__PURE__ */
|
|
4245
|
-
y ? je :
|
|
4246
|
-
|
|
4249
|
+
/* @__PURE__ */ k(ls, { ref: K, className: ee({ loading: y }, "no-shimmer"), children: [
|
|
4250
|
+
y ? je : Me.map((w) => /* @__PURE__ */ l(
|
|
4251
|
+
Jn,
|
|
4247
4252
|
{
|
|
4248
4253
|
activity: w,
|
|
4249
|
-
annotationFrameStart:
|
|
4254
|
+
annotationFrameStart: ke[w.origin?.id],
|
|
4250
4255
|
onCheckChange: Be,
|
|
4251
|
-
onDelete:
|
|
4252
|
-
onUpdate: async (M, O,
|
|
4256
|
+
onDelete: Se,
|
|
4257
|
+
onUpdate: async (M, O, X, ue) => await Oe(w, M, O, ue),
|
|
4253
4258
|
onDuplicate: He ? _e : void 0,
|
|
4254
4259
|
projectInfo: g,
|
|
4255
4260
|
projectName: i,
|
|
4256
4261
|
entityType: m,
|
|
4257
4262
|
onReferenceClick: Ge,
|
|
4258
4263
|
createdAts: c.map((M) => M.createdAt),
|
|
4259
|
-
onFileExpand:
|
|
4264
|
+
onFileExpand: re,
|
|
4260
4265
|
showOrigin: c.length > 1,
|
|
4261
4266
|
filter: I,
|
|
4262
4267
|
editProps: {
|
|
@@ -4272,31 +4277,31 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4272
4277
|
},
|
|
4273
4278
|
w.activityId
|
|
4274
4279
|
)),
|
|
4275
|
-
|
|
4280
|
+
Me.length === 0 && oe && !U && !y && /* @__PURE__ */ l(St, { message: "No versions published yet", icon: "layers" }),
|
|
4276
4281
|
C && P && /* @__PURE__ */ l(
|
|
4277
|
-
|
|
4282
|
+
Ja,
|
|
4278
4283
|
{
|
|
4279
|
-
root:
|
|
4284
|
+
root: K.current,
|
|
4280
4285
|
onChange: (w) => w && P(),
|
|
4281
4286
|
rootMargin: "400px 0px 0px 0px",
|
|
4282
|
-
children: /* @__PURE__ */ l(
|
|
4287
|
+
children: /* @__PURE__ */ l(ds, { style: { height: 0 }, onClick: () => P(), children: D ? "Loading more..." : "Click to load more" })
|
|
4283
4288
|
}
|
|
4284
4289
|
)
|
|
4285
4290
|
] }),
|
|
4286
4291
|
!we && /* @__PURE__ */ l(
|
|
4287
|
-
|
|
4292
|
+
Gn,
|
|
4288
4293
|
{
|
|
4289
4294
|
initValue: null,
|
|
4290
4295
|
onSubmit: Ve,
|
|
4291
|
-
isOpen: p ===
|
|
4296
|
+
isOpen: p === it,
|
|
4292
4297
|
onClose: () => u(null),
|
|
4293
|
-
onOpen: () => u(
|
|
4298
|
+
onOpen: () => u(it),
|
|
4294
4299
|
disabled: e,
|
|
4295
|
-
isLoading: y || !c.length ||
|
|
4300
|
+
isLoading: y || !c.length || Ye,
|
|
4296
4301
|
versionReview: r,
|
|
4297
|
-
lastOwnVersionReview:
|
|
4298
|
-
onReview:
|
|
4299
|
-
duplicate:
|
|
4302
|
+
lastOwnVersionReview: Ae,
|
|
4303
|
+
onReview: fe,
|
|
4304
|
+
duplicate: Je,
|
|
4300
4305
|
onDuplicateHandled: () => Pe(null),
|
|
4301
4306
|
saveDraft: s
|
|
4302
4307
|
}
|
|
@@ -4304,19 +4309,19 @@ const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ proj
|
|
|
4304
4309
|
] }) });
|
|
4305
4310
|
};
|
|
4306
4311
|
export {
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4312
|
+
Gr as A,
|
|
4313
|
+
qr as C,
|
|
4314
|
+
Ic as D,
|
|
4315
|
+
it as F,
|
|
4316
|
+
un as P,
|
|
4317
|
+
Ec as S,
|
|
4318
|
+
Ur as a,
|
|
4319
|
+
st as b,
|
|
4320
|
+
Pc as c,
|
|
4321
|
+
Sc as d,
|
|
4322
|
+
xr as e,
|
|
4323
|
+
Mc as f,
|
|
4324
|
+
vt as g,
|
|
4325
|
+
Hr as i,
|
|
4326
|
+
Jr as r
|
|
4322
4327
|
};
|