@ynput/ayon-frontend-shared 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +2 -2
- package/dist/Feed.es.js +64 -58
- package/dist/ListTable.es.js +3 -3
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +1314 -1314
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/Feed.es.js +783 -804
- package/dist/chunks/MetaWidget.es.js +814 -825
- package/dist/chunks/PlayableIcon.es.js +123 -84
- package/dist/chunks/ReviewablesSelector.es.js +2 -2
- package/dist/chunks/SimpleForm.es.js +10 -9
- package/dist/chunks/Slicer.es.js +2 -2
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/getBundleMode.es.js +33 -25
- package/dist/chunks/useDateRangeFilter.es.js +85 -59
- package/dist/chunks/viewUpdateHelper.es.js +30 -30
- package/dist/components.es.js +791 -753
- package/dist/context.es.js +83 -82
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/Feed.d.ts +54 -0
- package/dist/types/ProjectTreeTable.d.ts +5 -2
- package/dist/types/components.d.ts +512 -0
- package/dist/types/util.d.ts +4 -0
- package/dist/util.es.js +67 -65
- package/package.json +1 -1
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import Zt, { useMemo as
|
|
1
|
+
import { jsx as l, jsxs as x, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
+
import Zt, { useMemo as N, useState as L, useEffect as G, lazy as fo, Suspense as yo, useCallback as qe, useRef as ve, forwardRef as ht, useId as vo, Fragment as bo } from "react";
|
|
3
3
|
import { v4 as bn } from "uuid";
|
|
4
4
|
import ee, { clsx as wn } from "clsx";
|
|
5
5
|
import xn from "react-markdown";
|
|
@@ -10,66 +10,43 @@ import xo from "remark-directive-rehype";
|
|
|
10
10
|
import { toast as Fe } from "react-toastify";
|
|
11
11
|
import { $createListItemNode as ko, $createListNode as Fo } from "@lexical/list";
|
|
12
12
|
import { $getRoot as Ao } from "lexical";
|
|
13
|
-
import { Button as st, Dialog as Co, getFileSizeString as To, Icon as ie, theme as An, getTextColor as
|
|
14
|
-
import {
|
|
15
|
-
import "@lexical/markdown";
|
|
16
|
-
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
17
|
-
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
13
|
+
import { Button as st, Dialog as Co, getFileSizeString as To, Icon as ie, theme as An, getTextColor as _t, Dropdown as Do, SaveButton as So, UserImage as Cn, SEARCH_FILTER_ID as Tn, buildFilterId as en, getFilterFromId as No, SearchFilter as Io } from "@ynput/ayon-react-components";
|
|
14
|
+
import { _ as Eo, a2 as Dn, a3 as Mo, H as Po, a4 as _o, a5 as tn, a6 as Ro, a7 as Lo, a8 as $o, y as Oo, a9 as Vo, aa as jo, ab as Uo, ac as zo, ad as Bo, ae as Go, af as Ho, ag as qo, ah as Wo, ai as Qo, aj as Yo, O as Rt, W as Sn, T as Jo, a1 as Xo, ak as Ko, al as Zo, am as ea, an as ta, ao as na, ap as oa, aq as nn, ar as aa, b as ra, c as ia, i as sa, as as ca, S as la, e as da, L as ua } from "./PlayableIcon.es.js";
|
|
18
15
|
import "@lexical/code";
|
|
19
16
|
import "@lexical/rich-text";
|
|
20
17
|
import "@lexical/selection";
|
|
21
18
|
import "@lexical/utils";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
19
|
+
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
20
|
+
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
21
|
+
import A, { css as Lt } from "styled-components";
|
|
22
|
+
import { C as ma } from "./CodeEditor.es.js";
|
|
23
|
+
import { E as Nt } from "./EmptyPlaceholder.es.js";
|
|
24
|
+
import { a as pa, M as ga } from "./Menu.es.js";
|
|
25
|
+
import { aR as ha, bj as on } from "./searchTerms.es.js";
|
|
26
|
+
import { bg as fa, bj as ya, aF as va, dg as ba, aS as wa, aM as xa, a$ as ka, N as Fa, bB as Aa, bi as Ca, bt as Ta, bn as Da, bh as Sa, cy as Na, bX as Ia } from "./getUris.es.js";
|
|
28
27
|
import "primereact/confirmdialog";
|
|
29
|
-
import { union as
|
|
30
|
-
import { b as
|
|
28
|
+
import { union as Ea, isEqual as Ma } from "lodash";
|
|
29
|
+
import { b as Pa, F as _a, u as $e, a as Nn, T as Ra, C as La } from "./ThumbnailSimple.es.js";
|
|
31
30
|
import "@module-federation/enhanced/runtime";
|
|
32
|
-
import { o as
|
|
31
|
+
import { o as ze, x as $a, _ as ft, u as Oa } from "./DeleteEntitiesContextInstance.es.js";
|
|
33
32
|
import "semver";
|
|
34
33
|
import "./ContextMenuContextInstance.es.js";
|
|
35
34
|
import "react-dom";
|
|
36
35
|
import "react-redux";
|
|
37
36
|
import { p as ye } from "./parseFilename.es.js";
|
|
38
|
-
import
|
|
37
|
+
import $t from "axios";
|
|
39
38
|
import { b as an } from "./colorUtils.es.js";
|
|
40
39
|
import "./EntityTooltip.es.js";
|
|
41
|
-
import { isValid as ct, isToday as
|
|
40
|
+
import { isValid as ct, isToday as Va, isSameYear as ja, isSameDay as Ua, isSameWeek as za, isSameMinute as Ba, format as rn, formatISO as Ga, differenceInMinutes as Ha, differenceInSeconds as qa, compareAsc as Wa } from "date-fns";
|
|
42
41
|
import "./MenuItem.es.js";
|
|
43
|
-
import { InView as
|
|
44
|
-
import { t as
|
|
45
|
-
import { u as er } from "./useDateRangeFilter.es.js";
|
|
42
|
+
import { InView as Qa } from "react-intersection-observer";
|
|
43
|
+
import { t as Ya, c as Ja } from "./queryFilterToClientFilter.es.js";
|
|
44
|
+
import { r as Xa, a as Ka, m as Za, u as er } from "./useDateRangeFilter.es.js";
|
|
46
45
|
import "match-sorter";
|
|
47
46
|
import { c as tr } from "./confirmDelete.es.js";
|
|
48
47
|
import { c as In } from "./copyToClipboard.es.js";
|
|
49
48
|
import { g as sn } from "./realtimeUpdatesUtils.es.js";
|
|
50
|
-
const nr = (
|
|
51
|
-
`).replace(/^\s*(```|~~~).*$/gm, "").replace(/!?\[([^\]]*)\]\((?:\\.|[^)\\])*\)/g, "$1").replace(/<(https?:[^>]+)>/g, "$1").replace(/<\/?[a-z][^>]*>/gi, "").replace(/[<>]/g, "").replace(/ /g, " ").replace(/^\s*#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/gm, "").replace(/`([^`]*)`/g, "$1").replace(/(\*\*|__)(.+?)\1/g, "$2").replace(/~~(.+?)~~/g, "$1").replace(/(^|[^\w*\\])\*(?!\s)([^*]+?)\*(?!\w)/g, "$1$2").replace(/(^|[^\w\\])_(?!\s)([^_]+?)_(?!\w)/g, "$1$2").replace(/\\\n/g, `
|
|
52
|
-
`).replace(/\\([\\`*_{}[\]()#+\-.!~>|])/g, "$1").replace(/\s+/g, " ").trim(), or = (e) => {
|
|
53
|
-
const t = (e.node?.children ?? []).filter(
|
|
54
|
-
(s) => !(s.type === "text" && !s.value?.trim())
|
|
55
|
-
);
|
|
56
|
-
if (t.length !== 1) return null;
|
|
57
|
-
const [o] = t;
|
|
58
|
-
if (o.type !== "element" || o.tagName !== "a") return null;
|
|
59
|
-
const n = o.properties?.href, a = o.children?.map((s) => s.value ?? "").join("");
|
|
60
|
-
if (!n || a?.trim() !== n) return null;
|
|
61
|
-
const r = Eo(n);
|
|
62
|
-
return r ? /* @__PURE__ */ c(Mo, { video: r }) : null;
|
|
63
|
-
}, ar = (e, { onOpen: t } = {}) => {
|
|
64
|
-
const o = (e.node?.children ?? []).filter(
|
|
65
|
-
(i) => !(i.type === "text" && !i.value?.trim())
|
|
66
|
-
);
|
|
67
|
-
if (o.length !== 1) return null;
|
|
68
|
-
const [n] = o;
|
|
69
|
-
if (n.type !== "element" || n.tagName !== "img") return null;
|
|
70
|
-
const { src: a, alt: r, title: s } = n.properties ?? {};
|
|
71
|
-
return a ? /* @__PURE__ */ c(_o, { src: a, alt: r, mime: s, onOpen: t ? () => t(a) : void 0 }) : null;
|
|
72
|
-
}, rr = ({
|
|
49
|
+
const nr = ({
|
|
73
50
|
entities: e,
|
|
74
51
|
filter: t,
|
|
75
52
|
backendFilter: o,
|
|
@@ -77,10 +54,10 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
77
54
|
projectName: a,
|
|
78
55
|
entityType: r
|
|
79
56
|
}) => {
|
|
80
|
-
const i =
|
|
57
|
+
const i = N(
|
|
81
58
|
() => e.map((b) => ({ id: b.id, projectName: b.projectName, entityType: r })),
|
|
82
59
|
[e]
|
|
83
|
-
).map((b) => b.id),
|
|
60
|
+
).map((b) => b.id), c = !e.length || !t || !n || !a, m = {
|
|
84
61
|
entityIds: i,
|
|
85
62
|
projectName: a,
|
|
86
63
|
referenceTypes: ["origin", "mention", "relation"],
|
|
@@ -95,21 +72,21 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
95
72
|
currentData: h,
|
|
96
73
|
fetchNextPage: v,
|
|
97
74
|
hasNextPage: y
|
|
98
|
-
} =
|
|
99
|
-
const D =
|
|
75
|
+
} = fa(m, { skip: c });
|
|
76
|
+
const D = N(() => p?.pages ? p.pages.flatMap((b) => b.activities || []) : [], [p?.pages]), P = N(() => h?.pages ? h.pages.flatMap((b) => b.activities || []) : [], [h?.pages]), C = async () => {
|
|
100
77
|
if (!y) {
|
|
101
78
|
console.log("No more activities to load");
|
|
102
79
|
return;
|
|
103
80
|
}
|
|
104
81
|
return console.log("loading next page..."), await v();
|
|
105
|
-
}, f =
|
|
82
|
+
}, f = N(() => {
|
|
106
83
|
if (!g) return !1;
|
|
107
|
-
const b =
|
|
108
|
-
|
|
84
|
+
const b = Ea(
|
|
85
|
+
P?.flatMap((T) => T.entityId ? T.entityId : [])
|
|
109
86
|
);
|
|
110
|
-
return !
|
|
111
|
-
}, [
|
|
112
|
-
return
|
|
87
|
+
return !Ma(b, i);
|
|
88
|
+
}, [P, i, g]);
|
|
89
|
+
return c && (g = !0), {
|
|
113
90
|
activitiesData: D,
|
|
114
91
|
isLoadingActivities: g,
|
|
115
92
|
isLoadingNew: f,
|
|
@@ -117,24 +94,24 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
117
94
|
hasNextPage: y,
|
|
118
95
|
loadNextPage: C
|
|
119
96
|
};
|
|
120
|
-
}, rt = "__new__",
|
|
121
|
-
const { isGuest: o } =
|
|
97
|
+
}, rt = "__new__", Tc = ({ children: e, ...t }) => {
|
|
98
|
+
const { isGuest: o } = ze(), { data: n = [] } = ya({ projects: [t.projectName] }), { data: a = [] } = ha.useGetTeamsQuery(
|
|
122
99
|
{ projectName: t.projectName, showMembers: !0 },
|
|
123
100
|
{ skip: !t.projectName }
|
|
124
|
-
), r =
|
|
101
|
+
), r = N(
|
|
125
102
|
() => a.filter((j) => j.members?.some((de) => de.name === t.userName)).map((j) => j.name),
|
|
126
103
|
[a, t.userName]
|
|
127
|
-
), [s, i] =
|
|
104
|
+
), [s, i] = L({
|
|
128
105
|
operator: "and",
|
|
129
106
|
conditions: []
|
|
130
|
-
}), [
|
|
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 (j) => await D(j).unwrap(), R = async (j) => await C(j).unwrap(), E = async (j) => await b(j).unwrap(), [S] = xa(), [Q] = ka(), Y = async (j) => await S(j).unwrap(), H = async (j) => await Q(j).unwrap(), J = Fa(p), q = N(() => Pa(p), [p]), $ = nr({
|
|
131
108
|
entities: t.entities,
|
|
132
109
|
filter: p,
|
|
133
110
|
backendFilter: q,
|
|
134
111
|
activityTypes: J,
|
|
135
112
|
projectName: t.projectName,
|
|
136
113
|
entityType: t.entityType
|
|
137
|
-
}), { data: te = {} } =
|
|
114
|
+
}), { data: te = {} } = Aa(
|
|
138
115
|
{
|
|
139
116
|
suggestRequest: {
|
|
140
117
|
entityType: t.entityType,
|
|
@@ -143,21 +120,21 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
143
120
|
projectName: t.projectName
|
|
144
121
|
},
|
|
145
122
|
{ skip: !u }
|
|
146
|
-
), { data: oe = [] } =
|
|
123
|
+
), { data: oe = [] } = Ca({
|
|
147
124
|
projectName: t.projectName
|
|
148
|
-
}), { data: W } =
|
|
125
|
+
}), { data: W } = Ta(
|
|
149
126
|
{
|
|
150
127
|
projectName: t.projectName,
|
|
151
128
|
entityIds: t.entities.map((j) => j.id)
|
|
152
129
|
},
|
|
153
130
|
{ skip: !t.projectName || !t.entities.length }
|
|
154
131
|
);
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
|
|
132
|
+
return /* @__PURE__ */ l(
|
|
133
|
+
_a.Provider,
|
|
157
134
|
{
|
|
158
135
|
value: {
|
|
159
136
|
...t,
|
|
160
|
-
|
|
137
|
+
...$,
|
|
161
138
|
mentionSuggestionsData: te,
|
|
162
139
|
categories: oe,
|
|
163
140
|
checklistCount: W,
|
|
@@ -169,14 +146,14 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
169
146
|
feedFilter: p,
|
|
170
147
|
setFeedFilter: g,
|
|
171
148
|
backendFilter: q,
|
|
172
|
-
searchText:
|
|
149
|
+
searchText: c,
|
|
173
150
|
setSearchText: m,
|
|
174
151
|
isGuest: o,
|
|
175
152
|
editingId: u,
|
|
176
153
|
setEditingId: h,
|
|
177
154
|
setRefTooltip: y,
|
|
178
155
|
// Query functions
|
|
179
|
-
createEntityActivity:
|
|
156
|
+
createEntityActivity: _,
|
|
180
157
|
updateActivity: R,
|
|
181
158
|
deleteActivity: E,
|
|
182
159
|
createReaction: Y,
|
|
@@ -185,7 +162,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
185
162
|
children: e
|
|
186
163
|
}
|
|
187
164
|
);
|
|
188
|
-
},
|
|
165
|
+
}, or = A.div`
|
|
189
166
|
display: grid;
|
|
190
167
|
grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
|
|
191
168
|
gap: var(--base-gap-large);
|
|
@@ -201,7 +178,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
201
178
|
301px + var(--padding-s) + var(--padding-s) + var(--base-gap-large)+ var(--base-gap-large)
|
|
202
179
|
);
|
|
203
180
|
overflow: auto;
|
|
204
|
-
`,
|
|
181
|
+
`, ar = A.div`
|
|
205
182
|
position: relative;
|
|
206
183
|
display: flex;
|
|
207
184
|
flex-direction: column;
|
|
@@ -247,7 +224,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
247
224
|
.download-icon {
|
|
248
225
|
color: var(--md-sys-color-outline);
|
|
249
226
|
}
|
|
250
|
-
`,
|
|
227
|
+
`, rr = A.footer`
|
|
251
228
|
background-color: var(--md-sys-color-surface-container-low);
|
|
252
229
|
display: flex;
|
|
253
230
|
align-items: center;
|
|
@@ -347,7 +324,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
347
324
|
}
|
|
348
325
|
}
|
|
349
326
|
}
|
|
350
|
-
`,
|
|
327
|
+
`, ir = A.div`
|
|
351
328
|
position: relative;
|
|
352
329
|
display: flex;
|
|
353
330
|
justify-content: center;
|
|
@@ -423,7 +400,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
423
400
|
&.posterError {
|
|
424
401
|
background-color: transparent;
|
|
425
402
|
}
|
|
426
|
-
`,
|
|
403
|
+
`, sr = A.div`
|
|
427
404
|
display: none;
|
|
428
405
|
position: absolute;
|
|
429
406
|
left: 0;
|
|
@@ -443,7 +420,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
443
420
|
background: none;
|
|
444
421
|
opacity: 1;
|
|
445
422
|
}
|
|
446
|
-
`,
|
|
423
|
+
`, cr = A(Eo)`
|
|
447
424
|
--icon-size: 32px;
|
|
448
425
|
top: calc(50% - 10px);
|
|
449
426
|
left: 50%;
|
|
@@ -455,7 +432,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
455
432
|
.icon {
|
|
456
433
|
font-size: var(--icon-size);
|
|
457
434
|
}
|
|
458
|
-
`,
|
|
435
|
+
`, Dc = A(Co)`
|
|
459
436
|
min-height: 90vh;
|
|
460
437
|
max-height: 90vh;
|
|
461
438
|
min-width: min(90vw, 100%);
|
|
@@ -540,7 +517,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
540
517
|
&:focus-visible {
|
|
541
518
|
outline: none;
|
|
542
519
|
}
|
|
543
|
-
`,
|
|
520
|
+
`, lr = A.img`
|
|
544
521
|
height: 100%;
|
|
545
522
|
width: 100%;
|
|
546
523
|
|
|
@@ -550,7 +527,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
550
527
|
max-width: 90vw;
|
|
551
528
|
min-width: 300px;
|
|
552
529
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
553
|
-
`,
|
|
530
|
+
`, Sc = A.div`
|
|
554
531
|
&.scrollable {
|
|
555
532
|
position: absolute;
|
|
556
533
|
inset: 56px;
|
|
@@ -579,28 +556,28 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
579
556
|
flex: 1;
|
|
580
557
|
min-width: 0;
|
|
581
558
|
}
|
|
582
|
-
`, lt = (e, t) => `/api/projects/${t}/files/${e}`,
|
|
559
|
+
`, lt = (e, t) => `/api/projects/${t}/files/${e}`, dr = ({
|
|
583
560
|
file: e,
|
|
584
561
|
fullPreviews: t = ["png", "jpg", "jpeg", "gif", "svg", "webp"]
|
|
585
562
|
}) => {
|
|
586
563
|
const { id: o, projectName: n, mime: a } = e;
|
|
587
564
|
let r = lt(o, n);
|
|
588
|
-
return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */
|
|
589
|
-
},
|
|
565
|
+
return t.some((i) => a.includes(i)) || (r += "/thumbnail"), /* @__PURE__ */ l(lr, { src: r, autoFocus: !0 });
|
|
566
|
+
}, ur = A(ma)`
|
|
590
567
|
border-radius: var(--border-radius-m);
|
|
591
568
|
height: 100%;
|
|
592
569
|
overflow: auto !important;
|
|
593
|
-
`,
|
|
570
|
+
`, mr = ({ file: e }) => {
|
|
594
571
|
let t = lt(e.id, e.projectName);
|
|
595
|
-
const [o, n] =
|
|
572
|
+
const [o, n] = L(""), [a, r] = L(null);
|
|
596
573
|
return G(() => {
|
|
597
574
|
(async () => {
|
|
598
575
|
try {
|
|
599
576
|
const i = await fetch(t);
|
|
600
577
|
if (!i.ok)
|
|
601
578
|
throw new Error(`HTTP error! status: ${i.status}`);
|
|
602
|
-
const
|
|
603
|
-
n(
|
|
579
|
+
const c = await i.text();
|
|
580
|
+
n(c);
|
|
604
581
|
} catch (i) {
|
|
605
582
|
r(i.message);
|
|
606
583
|
}
|
|
@@ -608,16 +585,16 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
608
585
|
}, [e.projectName, e.id, t]), a ? /* @__PURE__ */ x("div", { children: [
|
|
609
586
|
"Error: ",
|
|
610
587
|
a
|
|
611
|
-
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */
|
|
612
|
-
}, En = () => import("./VideoPlayer.es.js"),
|
|
613
|
-
const [o, n] =
|
|
588
|
+
] }) : e.mime?.includes("markdown") ? /* @__PURE__ */ l(xn, { remarkPlugins: [Fn, kn], children: o }) : /* @__PURE__ */ l(ur, { value: o, language: e.extension, readOnly: !0 });
|
|
589
|
+
}, En = () => import("./VideoPlayer.es.js"), pr = fo(En), gr = ({ duration: e, width: t, height: o }) => Number.isFinite(e) && e > 0 && t > 0 && o > 0, hr = 1e4, fr = (e) => e ? `code ${e.code}${e.message ? `: ${e.message}` : ""}` : "no MediaError", yr = (e, t) => {
|
|
590
|
+
const [o, n] = L({ status: "loading" });
|
|
614
591
|
return G(() => {
|
|
615
592
|
n({ status: "loading" });
|
|
616
593
|
let a = !1, r = null, s;
|
|
617
594
|
const i = () => {
|
|
618
|
-
r && (r.removeEventListener("loadedmetadata",
|
|
595
|
+
r && (r.removeEventListener("loadedmetadata", c), r.removeEventListener("error", m), r.removeAttribute("src"), r.load(), r = null);
|
|
619
596
|
};
|
|
620
|
-
function
|
|
597
|
+
function c() {
|
|
621
598
|
if (a || !r) return;
|
|
622
599
|
clearTimeout(s);
|
|
623
600
|
const u = {
|
|
@@ -625,14 +602,14 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
625
602
|
width: r.videoWidth,
|
|
626
603
|
height: r.videoHeight
|
|
627
604
|
};
|
|
628
|
-
if (
|
|
605
|
+
if (gr(u)) {
|
|
629
606
|
i(), n({ status: "ready", metadata: u });
|
|
630
607
|
return;
|
|
631
608
|
}
|
|
632
609
|
p(`unusable metadata ${JSON.stringify(u)}`);
|
|
633
610
|
}
|
|
634
611
|
function m() {
|
|
635
|
-
a || (clearTimeout(s), p(
|
|
612
|
+
a || (clearTimeout(s), p(fr(r?.error ?? null)));
|
|
636
613
|
}
|
|
637
614
|
const p = (u) => {
|
|
638
615
|
const h = r?.preload === "metadata";
|
|
@@ -643,7 +620,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
643
620
|
console.warn(`[VideoMime] video cannot be played: ${u}`, e), n({ status: "error" });
|
|
644
621
|
};
|
|
645
622
|
function g(u) {
|
|
646
|
-
r = document.createElement("video"), r.preload = u, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"),
|
|
623
|
+
r = document.createElement("video"), r.preload = u, r.muted = !0, r.playsInline = !0, s = setTimeout(() => !a && p("timed out"), hr), r.addEventListener("loadedmetadata", c), r.addEventListener("error", m), r.src = e;
|
|
647
624
|
}
|
|
648
625
|
return g("metadata"), () => {
|
|
649
626
|
a = !0, clearTimeout(s), i();
|
|
@@ -659,18 +636,18 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
659
636
|
codec: t?.codec
|
|
660
637
|
}
|
|
661
638
|
};
|
|
662
|
-
},
|
|
663
|
-
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = lt(t, o), s =
|
|
639
|
+
}, vr = ({ file: e }) => {
|
|
640
|
+
const { id: t, projectName: o, name: n, mediaInfo: a } = e, r = lt(t, o), s = yr(r, a);
|
|
664
641
|
if (G(() => {
|
|
665
642
|
En();
|
|
666
643
|
}, []), s.status === "error")
|
|
667
|
-
return /* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ l(dn, { children: /* @__PURE__ */ l(Nt, { icon: "videocam_off", message: "This video cannot be played in the browser", children: /* @__PURE__ */ x("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: [
|
|
668
645
|
"Download ",
|
|
669
646
|
n
|
|
670
647
|
] }) }) });
|
|
671
|
-
const i = /* @__PURE__ */
|
|
672
|
-
return s.status === "loading" ? i : /* @__PURE__ */
|
|
673
|
-
|
|
648
|
+
const i = /* @__PURE__ */ l(dn, { children: /* @__PURE__ */ l(Nt, { icon: "hourglass_empty", message: "Loading video..." }) });
|
|
649
|
+
return s.status === "loading" ? i : /* @__PURE__ */ l(yo, { fallback: i, children: /* @__PURE__ */ l(
|
|
650
|
+
pr,
|
|
674
651
|
{
|
|
675
652
|
id: t,
|
|
676
653
|
name: n,
|
|
@@ -683,20 +660,20 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
683
660
|
codec: s.metadata.codec
|
|
684
661
|
}
|
|
685
662
|
) });
|
|
686
|
-
},
|
|
663
|
+
}, br = {
|
|
687
664
|
image: {
|
|
688
|
-
component:
|
|
665
|
+
component: dr,
|
|
689
666
|
mimeTypes: ["image/"],
|
|
690
667
|
fullPreviews: ["png", "jpg", "jpeg", "gif", "svg", "webp"],
|
|
691
668
|
id: "image"
|
|
692
669
|
},
|
|
693
670
|
video: {
|
|
694
|
-
component:
|
|
671
|
+
component: vr,
|
|
695
672
|
mimeTypes: ["video/"],
|
|
696
673
|
id: "video"
|
|
697
674
|
},
|
|
698
675
|
text: {
|
|
699
|
-
component:
|
|
676
|
+
component: mr,
|
|
700
677
|
mimeTypes: ["text/", "application/json", "scss", "jsx"],
|
|
701
678
|
id: "text"
|
|
702
679
|
},
|
|
@@ -706,9 +683,9 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
706
683
|
id: "pdf",
|
|
707
684
|
callback: (e) => window.open(lt(e.id, e.projectName), "_blank")
|
|
708
685
|
}
|
|
709
|
-
}, yt = (e = "", t = "") => Object.values(
|
|
686
|
+
}, yt = (e = "", t = "") => Object.values(br).some(
|
|
710
687
|
({ mimeTypes: o = [] }) => o.some((n) => (e || t)?.includes(n))
|
|
711
|
-
),
|
|
688
|
+
), wr = {
|
|
712
689
|
// special cases
|
|
713
690
|
description: ["doc"],
|
|
714
691
|
folder_zip: ["zip"],
|
|
@@ -750,12 +727,12 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
750
727
|
filter_none: ["sequence"],
|
|
751
728
|
font_download: ["font"],
|
|
752
729
|
deployed_code: ["model", ".obj", ".abc", ".stl", ".fbx", ".gltf", ".glb", ".usd"]
|
|
753
|
-
},
|
|
754
|
-
for (const [t, o] of Object.entries(
|
|
730
|
+
}, xr = (e) => {
|
|
731
|
+
for (const [t, o] of Object.entries(wr))
|
|
755
732
|
if (o.some((n) => e.includes(n)))
|
|
756
733
|
return t;
|
|
757
734
|
return "draft";
|
|
758
|
-
},
|
|
735
|
+
}, kr = ({
|
|
759
736
|
name: e,
|
|
760
737
|
mime: t,
|
|
761
738
|
src: o,
|
|
@@ -764,7 +741,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
764
741
|
annotationFrameStart: r,
|
|
765
742
|
size: s,
|
|
766
743
|
progress: i,
|
|
767
|
-
onRemove:
|
|
744
|
+
onRemove: c,
|
|
768
745
|
isCompact: m,
|
|
769
746
|
isDownloadable: p = !1,
|
|
770
747
|
onExpand: g,
|
|
@@ -773,52 +750,52 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
773
750
|
className: v,
|
|
774
751
|
...y
|
|
775
752
|
}) => {
|
|
776
|
-
const D = i && i < 100, [
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
] }), q =
|
|
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("."), S = yt(t || "." + R), Q = t?.includes("image/") || !!n, H = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, J = /* @__PURE__ */ x(Ae, { children: [
|
|
754
|
+
/* @__PURE__ */ l("span", { className: "size", children: To(s) }),
|
|
755
|
+
/* @__PURE__ */ l(ie, { icon: "download", className: "download-icon" })
|
|
756
|
+
] }), q = N(
|
|
780
757
|
() => n ?? a,
|
|
781
758
|
[n, a]
|
|
782
|
-
),
|
|
759
|
+
), $ = N(() => I.at(0), [I]), te = N(() => {
|
|
783
760
|
if (!q?.range)
|
|
784
761
|
return [1, 1];
|
|
785
|
-
const oe = r === void 0 ?
|
|
762
|
+
const oe = r === void 0 ? $?.attrib?.frameStart : r;
|
|
786
763
|
return Number.isFinite(oe) ? [oe - 1 + q.range[0], oe - 1 + q.range[1]] : q.range;
|
|
787
|
-
}, [q, r,
|
|
764
|
+
}, [q, r, $]);
|
|
788
765
|
return /* @__PURE__ */ x(
|
|
789
|
-
|
|
766
|
+
ar,
|
|
790
767
|
{
|
|
791
768
|
className: ee(v, {
|
|
792
769
|
compact: m,
|
|
793
770
|
isDownloadable: p,
|
|
794
|
-
isPreviewable:
|
|
771
|
+
isPreviewable: S,
|
|
795
772
|
isUnsavedAnnotation: !!n
|
|
796
773
|
}),
|
|
797
774
|
...y,
|
|
798
775
|
children: [
|
|
799
776
|
/* @__PURE__ */ x(
|
|
800
|
-
|
|
777
|
+
ir,
|
|
801
778
|
{
|
|
802
779
|
className: ee("content-wrapper", {
|
|
803
|
-
isPreviewable:
|
|
780
|
+
isPreviewable: S,
|
|
804
781
|
isUnsavedAnnotation: !!n
|
|
805
782
|
}),
|
|
806
783
|
children: [
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
Q && o && /* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ l(ie, { icon: xr(t || "." + R), className: "type-icon" }),
|
|
785
|
+
Q && o && /* @__PURE__ */ l(
|
|
809
786
|
cn,
|
|
810
787
|
{
|
|
811
788
|
className: ee({
|
|
812
789
|
"image-wrapper": !0,
|
|
813
|
-
isDownloadable: p ||
|
|
790
|
+
isDownloadable: p || S || n
|
|
814
791
|
}),
|
|
815
|
-
children: /* @__PURE__ */
|
|
792
|
+
children: /* @__PURE__ */ l(
|
|
816
793
|
"img",
|
|
817
794
|
{
|
|
818
795
|
src: o,
|
|
819
796
|
onError: () => C(!0),
|
|
820
797
|
style: {
|
|
821
|
-
display:
|
|
798
|
+
display: P ? "none" : "block"
|
|
822
799
|
}
|
|
823
800
|
}
|
|
824
801
|
)
|
|
@@ -829,17 +806,17 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
829
806
|
{
|
|
830
807
|
className: ee({
|
|
831
808
|
"image-wrapper": !0,
|
|
832
|
-
isDownloadable: p ||
|
|
809
|
+
isDownloadable: p || S,
|
|
833
810
|
posterError: f
|
|
834
811
|
}),
|
|
835
812
|
children: [
|
|
836
|
-
!f && /* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
813
|
+
!f && /* @__PURE__ */ l("img", { src: H, onError: () => b(!0) }),
|
|
814
|
+
/* @__PURE__ */ l(cr, {})
|
|
838
815
|
]
|
|
839
816
|
}
|
|
840
817
|
),
|
|
841
|
-
/* @__PURE__ */ x(
|
|
842
|
-
|
|
818
|
+
/* @__PURE__ */ x(sr, { className: "expand-buttons", children: [
|
|
819
|
+
S && !u && /* @__PURE__ */ l(
|
|
843
820
|
ln,
|
|
844
821
|
{
|
|
845
822
|
"data-tooltip": "Open preview",
|
|
@@ -848,7 +825,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
848
825
|
onClick: g
|
|
849
826
|
}
|
|
850
827
|
),
|
|
851
|
-
(n || T && a) && /* @__PURE__ */
|
|
828
|
+
(n || T && a) && /* @__PURE__ */ l(
|
|
852
829
|
ln,
|
|
853
830
|
{
|
|
854
831
|
"data-tooltip": "Jump to annotation",
|
|
@@ -862,17 +839,17 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
862
839
|
}
|
|
863
840
|
),
|
|
864
841
|
/* @__PURE__ */ x(
|
|
865
|
-
|
|
842
|
+
rr,
|
|
866
843
|
{
|
|
867
844
|
className: ee({
|
|
868
845
|
inProgress: D,
|
|
869
|
-
isPreviewable:
|
|
846
|
+
isPreviewable: S && !u,
|
|
870
847
|
isDownloadable: p
|
|
871
848
|
}),
|
|
872
849
|
children: [
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ l("span", { className: "progress", style: { right: `${100 - i}%` } }),
|
|
851
|
+
/* @__PURE__ */ l("div", { className: "name-wrapper", children: q ? /* @__PURE__ */ x("span", { className: "name", children: [
|
|
852
|
+
/* @__PURE__ */ l(ie, { icon: "draw" }),
|
|
876
853
|
te[0],
|
|
877
854
|
te[1] !== te[0] && ` - ${te[1]}`
|
|
878
855
|
] }) : /* @__PURE__ */ x("span", { className: "name", children: [
|
|
@@ -882,11 +859,11 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
882
859
|
R
|
|
883
860
|
] })
|
|
884
861
|
] }) }),
|
|
885
|
-
p && (
|
|
862
|
+
p && (c ? /* @__PURE__ */ l("div", { className: "download", children: J }) : /* @__PURE__ */ l("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "download", children: J }))
|
|
886
863
|
]
|
|
887
864
|
}
|
|
888
865
|
),
|
|
889
|
-
|
|
866
|
+
c && /* @__PURE__ */ l(st, { className: "remove", onClick: c, icon: "close" })
|
|
890
867
|
]
|
|
891
868
|
}
|
|
892
869
|
);
|
|
@@ -899,7 +876,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
899
876
|
projectName: r,
|
|
900
877
|
isDownloadable: s,
|
|
901
878
|
onExpand: i,
|
|
902
|
-
onAnnotationClick:
|
|
879
|
+
onAnnotationClick: c,
|
|
903
880
|
pt: m,
|
|
904
881
|
...p
|
|
905
882
|
}) => {
|
|
@@ -911,8 +888,8 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
911
888
|
},
|
|
912
889
|
[i]
|
|
913
890
|
);
|
|
914
|
-
return /* @__PURE__ */
|
|
915
|
-
|
|
891
|
+
return /* @__PURE__ */ l(or, { className: ee({ compact: o }), ...p, children: e.map((u, h) => /* @__PURE__ */ l(
|
|
892
|
+
kr,
|
|
916
893
|
{
|
|
917
894
|
id: u.id || u.name,
|
|
918
895
|
name: u.name,
|
|
@@ -926,13 +903,13 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
926
903
|
isCompact: o,
|
|
927
904
|
isDownloadable: s,
|
|
928
905
|
onExpand: () => g(h),
|
|
929
|
-
onJumpTo: () =>
|
|
906
|
+
onJumpTo: () => c?.(u),
|
|
930
907
|
disableExpand: n,
|
|
931
908
|
...m?.file
|
|
932
909
|
},
|
|
933
910
|
u.id || u.name
|
|
934
911
|
)) });
|
|
935
|
-
},
|
|
912
|
+
}, Fr = (e) => {
|
|
936
913
|
const t = /!\[.*?\]\((.*?)\)/g, o = e.match(t);
|
|
937
914
|
let n = e;
|
|
938
915
|
return o && o.forEach((a) => {
|
|
@@ -940,23 +917,23 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
940
917
|
const r = a.match(/\(([^)]+)\)/)[1], s = r.split("?")[0];
|
|
941
918
|
n = e.replace(r, s);
|
|
942
919
|
}), n;
|
|
943
|
-
},
|
|
920
|
+
}, Ar = new AbortController(), Cr = $t.CancelToken, Tr = Cr.source(), We = (e, t, o) => new Promise((n, a) => {
|
|
944
921
|
new FormData().append("image", e);
|
|
945
922
|
const s = {
|
|
946
|
-
signal:
|
|
947
|
-
cancelToken:
|
|
923
|
+
signal: Ar.signal,
|
|
924
|
+
cancelToken: Tr.token,
|
|
948
925
|
onUploadProgress: (i) => o && o(i, e),
|
|
949
926
|
headers: {
|
|
950
927
|
"Content-Type": e.type,
|
|
951
928
|
"x-file-name": ye(e.name)
|
|
952
929
|
}
|
|
953
930
|
};
|
|
954
|
-
|
|
931
|
+
$t.post(`/api/projects/${t}/files`, e, s).then((i) => {
|
|
955
932
|
n({ file: e, data: i.data });
|
|
956
933
|
}).catch((i) => {
|
|
957
934
|
console.error(i), a({ message: "Upload failed: " + i.response.data.detail });
|
|
958
935
|
});
|
|
959
|
-
}),
|
|
936
|
+
}), Dr = (e, t, o, n, a) => {
|
|
960
937
|
e.preventDefault(), e.stopPropagation();
|
|
961
938
|
let r = e.dataTransfer.files;
|
|
962
939
|
if (r?.length) {
|
|
@@ -969,15 +946,15 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
969
946
|
}
|
|
970
947
|
);
|
|
971
948
|
}
|
|
972
|
-
},
|
|
949
|
+
}, Sr = (e, t, o) => (t || console.warn("filterEntityAnnotations: entityId is empty"), Object.values(e).forEach((n) => {
|
|
973
950
|
n.versionId || console.warn("filterEntityAnnotations: annotation.versionId is empty", n);
|
|
974
951
|
}), Object.values(e).filter(
|
|
975
952
|
(n) => n.versionId === t && !o.some((a) => a.name === ye(n.name))
|
|
976
953
|
).map((n) => ({
|
|
977
954
|
...n,
|
|
978
955
|
unsavedAnnotation: n
|
|
979
|
-
}))),
|
|
980
|
-
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } =
|
|
956
|
+
}))), Nr = ({ entityId: e, filesUploading: t }) => {
|
|
957
|
+
const { editingId: o, setEditingId: n, annotations: a, removeAnnotation: r } = $e(), { onGoToFrame: s } = ze(), i = Sr(a || [], e, t);
|
|
981
958
|
return G(() => {
|
|
982
959
|
i.length > 0 && !o && n(rt);
|
|
983
960
|
}, [i]), {
|
|
@@ -988,7 +965,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
988
965
|
},
|
|
989
966
|
removeAnnotation: r
|
|
990
967
|
};
|
|
991
|
-
},
|
|
968
|
+
}, Pn = (e) => N(() => {
|
|
992
969
|
if (!e)
|
|
993
970
|
return { primary: void 0, secondary: void 0 };
|
|
994
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 = an(e, a, 0.1) || e, i = an(e, r, 0.2) || e;
|
|
@@ -996,25 +973,25 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
996
973
|
primary: s,
|
|
997
974
|
secondary: i
|
|
998
975
|
};
|
|
999
|
-
}, [e]),
|
|
1000
|
-
const { exportAnnotationComposite: r } =
|
|
1001
|
-
const m = await r?.(
|
|
976
|
+
}, [e]), Ir = ({ projectName: e, onSuccess: t, onProgress: o, onStart: n, onError: a }) => {
|
|
977
|
+
const { exportAnnotationComposite: r } = $e(), s = async (c) => {
|
|
978
|
+
const m = await r?.(c.id);
|
|
1002
979
|
if (!m)
|
|
1003
|
-
throw new Error(`Exporting composite image for annotation ${
|
|
1004
|
-
const p = new File([m],
|
|
980
|
+
throw new Error(`Exporting composite image for annotation ${c.id} failed`);
|
|
981
|
+
const p = new File([m], c.name, {
|
|
1005
982
|
type: "image/png"
|
|
1006
|
-
}), g = await fetch(
|
|
983
|
+
}), g = await fetch(c.annotationData).then((P) => P.blob()), u = new File([g], `annotation-${c.name}`, {
|
|
1007
984
|
type: "image/png"
|
|
1008
985
|
}), h = await Promise.all([
|
|
1009
986
|
We(p, e, o),
|
|
1010
987
|
We(u, e, () => {
|
|
1011
988
|
})
|
|
1012
989
|
]), [v, y] = h, D = [t(v), t(y, !0)];
|
|
1013
|
-
return { annotation:
|
|
990
|
+
return { annotation: c, uploads: h, files: D };
|
|
1014
991
|
};
|
|
1015
|
-
return async (
|
|
992
|
+
return async (c) => {
|
|
1016
993
|
try {
|
|
1017
|
-
const m =
|
|
994
|
+
const m = c.map(async (h) => {
|
|
1018
995
|
n?.(h);
|
|
1019
996
|
try {
|
|
1020
997
|
return await s(h);
|
|
@@ -1038,37 +1015,37 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1038
1015
|
return Fe.error("Upload failed: " + m.message), { files: [], metadata: [] };
|
|
1039
1016
|
}
|
|
1040
1017
|
};
|
|
1041
|
-
},
|
|
1018
|
+
}, _n = "ayon-comment-draft/", Rn = 720 * 60 * 60 * 1e3, Er = (e) => !e.text.trim() && !e.files.length && !e.uploadedAnnotations.length, Ln = (e) => {
|
|
1042
1019
|
try {
|
|
1043
1020
|
const t = localStorage.getItem(e);
|
|
1044
1021
|
return t ? JSON.parse(t) : null;
|
|
1045
1022
|
} catch {
|
|
1046
1023
|
return null;
|
|
1047
1024
|
}
|
|
1048
|
-
},
|
|
1025
|
+
}, Mr = (e, t) => {
|
|
1049
1026
|
try {
|
|
1050
|
-
|
|
1027
|
+
Er(t) ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ ...t, savedAt: Date.now() }));
|
|
1051
1028
|
} catch (o) {
|
|
1052
1029
|
console.warn("Could not save comment draft", o);
|
|
1053
1030
|
}
|
|
1054
|
-
},
|
|
1031
|
+
}, Pr = () => {
|
|
1055
1032
|
try {
|
|
1056
1033
|
const e = Date.now();
|
|
1057
1034
|
for (const t of Object.keys(localStorage)) {
|
|
1058
|
-
if (!t.startsWith(
|
|
1059
|
-
const o =
|
|
1035
|
+
if (!t.startsWith(_n)) continue;
|
|
1036
|
+
const o = Ln(t);
|
|
1060
1037
|
(!o || e - o.savedAt > Rn) && localStorage.removeItem(t);
|
|
1061
1038
|
}
|
|
1062
1039
|
} catch {
|
|
1063
1040
|
}
|
|
1064
|
-
},
|
|
1041
|
+
}, _r = (e, t, o) => e && t && o.length ? `${_n}${e}/${t}/${[...o].sort().join(",")}` : null, Rr = ({ draftKey: e, draft: t, paused: o, restore: n }) => {
|
|
1065
1042
|
const a = ve(null), r = ve(!1);
|
|
1066
1043
|
G(() => {
|
|
1067
1044
|
if (!e || o) return;
|
|
1068
1045
|
const s = a.current;
|
|
1069
1046
|
if (a.current = e, s === e) return;
|
|
1070
|
-
s ||
|
|
1071
|
-
const i =
|
|
1047
|
+
s || Pr();
|
|
1048
|
+
const i = Ln(e);
|
|
1072
1049
|
i && Date.now() - i.savedAt <= Rn ? (r.current = !0, n({
|
|
1073
1050
|
text: i.text ?? "",
|
|
1074
1051
|
files: i.files ?? [],
|
|
@@ -1080,9 +1057,9 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1080
1057
|
r.current = !1;
|
|
1081
1058
|
return;
|
|
1082
1059
|
}
|
|
1083
|
-
!e || o ||
|
|
1060
|
+
!e || o || Mr(e, t);
|
|
1084
1061
|
}, [e, o, t.text, t.files, t.uploadedAnnotations, t.category]);
|
|
1085
|
-
},
|
|
1062
|
+
}, Lr = "Category", $r = A.div`
|
|
1086
1063
|
display: flex;
|
|
1087
1064
|
padding: 2px 4px;
|
|
1088
1065
|
justify-content: center;
|
|
@@ -1132,10 +1109,10 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1132
1109
|
}
|
|
1133
1110
|
}
|
|
1134
1111
|
`, it = ht(
|
|
1135
|
-
({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style: s, className: i, ...
|
|
1136
|
-
|
|
1112
|
+
({ value: e, color: t, isCompact: o, isEditing: n, isPower: a, isDisabled: r, style: s, className: i, ...c }, m) => /* @__PURE__ */ l(
|
|
1113
|
+
$r,
|
|
1137
1114
|
{
|
|
1138
|
-
...
|
|
1115
|
+
...c,
|
|
1139
1116
|
ref: m,
|
|
1140
1117
|
className: ee(i, {
|
|
1141
1118
|
none: !e,
|
|
@@ -1149,13 +1126,13 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1149
1126
|
...t && {
|
|
1150
1127
|
backgroundColor: t,
|
|
1151
1128
|
borderColor: t,
|
|
1152
|
-
color:
|
|
1129
|
+
color: _t(t)
|
|
1153
1130
|
}
|
|
1154
1131
|
},
|
|
1155
|
-
children: e ||
|
|
1132
|
+
children: e || Lr
|
|
1156
1133
|
}
|
|
1157
1134
|
)
|
|
1158
|
-
),
|
|
1135
|
+
), Or = A.span`
|
|
1159
1136
|
display: flex;
|
|
1160
1137
|
justify-content: flex-start;
|
|
1161
1138
|
align-items: center;
|
|
@@ -1174,7 +1151,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1174
1151
|
color: var(--md-sys-color-on-surface) !important;
|
|
1175
1152
|
}
|
|
1176
1153
|
}
|
|
1177
|
-
`,
|
|
1154
|
+
`, Vr = ht(
|
|
1178
1155
|
({
|
|
1179
1156
|
label: e,
|
|
1180
1157
|
color: t,
|
|
@@ -1184,18 +1161,18 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1184
1161
|
endContent: r,
|
|
1185
1162
|
isClear: s,
|
|
1186
1163
|
style: i,
|
|
1187
|
-
className:
|
|
1164
|
+
className: c,
|
|
1188
1165
|
...m
|
|
1189
1166
|
}, p) => /* @__PURE__ */ x(
|
|
1190
|
-
|
|
1167
|
+
Or,
|
|
1191
1168
|
{
|
|
1192
1169
|
...m,
|
|
1193
|
-
className: ee(
|
|
1194
|
-
style: { backgroundColor: n && t ? t : "", color:
|
|
1170
|
+
className: ee(c, { selected: n }),
|
|
1171
|
+
style: { backgroundColor: n && t ? t : "", color: _t(n && t ? t : ""), ...i },
|
|
1195
1172
|
ref: p,
|
|
1196
1173
|
children: [
|
|
1197
1174
|
a,
|
|
1198
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ l(
|
|
1199
1176
|
ie,
|
|
1200
1177
|
{
|
|
1201
1178
|
icon: o || (s ? "clear" : "crop_square"),
|
|
@@ -1207,7 +1184,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1207
1184
|
]
|
|
1208
1185
|
}
|
|
1209
1186
|
)
|
|
1210
|
-
),
|
|
1187
|
+
), jr = "1.3.0", Ur = A(Do)`
|
|
1211
1188
|
button {
|
|
1212
1189
|
/* remove all styles and just use a wrapper */
|
|
1213
1190
|
background-color: unset !important;
|
|
@@ -1218,7 +1195,7 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1218
1195
|
width: unset !important;
|
|
1219
1196
|
color: var(--md-sys-color-on-surface) !important;
|
|
1220
1197
|
}
|
|
1221
|
-
`,
|
|
1198
|
+
`, zr = ({
|
|
1222
1199
|
value: e,
|
|
1223
1200
|
categories: t,
|
|
1224
1201
|
readonly: o,
|
|
@@ -1227,34 +1204,34 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1227
1204
|
hasPowerpack: r,
|
|
1228
1205
|
onPowerFeature: s,
|
|
1229
1206
|
onChange: i,
|
|
1230
|
-
...
|
|
1207
|
+
...c
|
|
1231
1208
|
}) => {
|
|
1232
1209
|
if (n) return null;
|
|
1233
1210
|
const m = t.find((u) => u.name === e), { color: p } = m || {};
|
|
1234
1211
|
if (!r)
|
|
1235
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ l(
|
|
1236
1213
|
it,
|
|
1237
1214
|
{
|
|
1238
1215
|
value: null,
|
|
1239
1216
|
isPower: !0,
|
|
1240
1217
|
isDisabled: !0,
|
|
1241
|
-
style:
|
|
1218
|
+
style: c.style,
|
|
1242
1219
|
onClick: () => s?.("commentCategories"),
|
|
1243
1220
|
"data-tooltip": "Comment categories is a Powerpack feature"
|
|
1244
1221
|
}
|
|
1245
1222
|
);
|
|
1246
1223
|
if (o)
|
|
1247
|
-
return /* @__PURE__ */
|
|
1224
|
+
return /* @__PURE__ */ l(it, { value: e, color: p, isCompact: a, style: c.style });
|
|
1248
1225
|
if (!t.length)
|
|
1249
|
-
return /* @__PURE__ */
|
|
1226
|
+
return /* @__PURE__ */ l(
|
|
1250
1227
|
it,
|
|
1251
1228
|
{
|
|
1252
1229
|
value: e,
|
|
1253
1230
|
color: p,
|
|
1254
1231
|
isCompact: a,
|
|
1255
|
-
style:
|
|
1232
|
+
style: c.style,
|
|
1256
1233
|
onClick: () => Fe.warning(
|
|
1257
|
-
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${
|
|
1234
|
+
`No categories found. Ensure they are set in the Powerpack settings and the version is at least ${jr}.`
|
|
1258
1235
|
)
|
|
1259
1236
|
}
|
|
1260
1237
|
);
|
|
@@ -1267,15 +1244,15 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1267
1244
|
icon: null
|
|
1268
1245
|
}))
|
|
1269
1246
|
];
|
|
1270
|
-
return /* @__PURE__ */
|
|
1271
|
-
|
|
1247
|
+
return /* @__PURE__ */ l(
|
|
1248
|
+
Ur,
|
|
1272
1249
|
{
|
|
1273
1250
|
options: g,
|
|
1274
1251
|
value: e ? [e] : [],
|
|
1275
1252
|
onChange: (u) => i(u[0]),
|
|
1276
|
-
valueTemplate: () => /* @__PURE__ */
|
|
1277
|
-
itemTemplate: (u, h, v, y) => /* @__PURE__ */
|
|
1278
|
-
|
|
1253
|
+
valueTemplate: () => /* @__PURE__ */ l(it, { value: e, color: p, isCompact: a, isEditing: !0 }),
|
|
1254
|
+
itemTemplate: (u, h, v, y) => /* @__PURE__ */ l(
|
|
1255
|
+
Vr,
|
|
1279
1256
|
{
|
|
1280
1257
|
label: u.label,
|
|
1281
1258
|
color: u.color,
|
|
@@ -1284,10 +1261,31 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1284
1261
|
},
|
|
1285
1262
|
y
|
|
1286
1263
|
),
|
|
1287
|
-
...
|
|
1264
|
+
...c
|
|
1288
1265
|
}
|
|
1289
1266
|
);
|
|
1290
|
-
},
|
|
1267
|
+
}, Br = (e, { isGuest: t, isAdmin: o }) => !!(t || !e.length && !o), Gr = ["tip", "status"], Hr = ["textDirective", "leafDirective", "containerDirective"], $n = (e) => ({ type: "text", value: e }), At = (e) => ({ type: "paragraph", children: [$n(e)] }), qr = (e, t) => {
|
|
1268
|
+
const o = e.position?.start.offset, n = e.position?.end.offset;
|
|
1269
|
+
return o === void 0 || n === void 0 ? null : t.slice(o, n);
|
|
1270
|
+
}, Wr = (e, t) => {
|
|
1271
|
+
const o = qr(e, t);
|
|
1272
|
+
if (o === null) return null;
|
|
1273
|
+
if (e.type === "textDirective") return [$n(o)];
|
|
1274
|
+
if (e.type === "leafDirective") return [At(o)];
|
|
1275
|
+
const [n, ...a] = o.split(`
|
|
1276
|
+
`), r = a.length ? a[a.length - 1].match(/:{3,}\s*$/) : null;
|
|
1277
|
+
return [At(n), ...e.children || [], ...r ? [At(r[0])] : []];
|
|
1278
|
+
}, On = (e, t, o) => {
|
|
1279
|
+
if (!e.children) return;
|
|
1280
|
+
const n = [];
|
|
1281
|
+
for (const a of e.children) {
|
|
1282
|
+
const s = Hr.includes(a.type) && !o.includes(a.name || "") ? Wr(a, t) : null;
|
|
1283
|
+
n.push(...s || [a]);
|
|
1284
|
+
}
|
|
1285
|
+
e.children = n, n.forEach((a) => On(a, t, o));
|
|
1286
|
+
}, Qr = (e = Gr) => (t, o) => {
|
|
1287
|
+
On(t, String(o.value ?? ""), e);
|
|
1288
|
+
}, Vn = 1e4, Yr = A.span`
|
|
1291
1289
|
margin-left: auto;
|
|
1292
1290
|
color: var(--md-sys-color-outline);
|
|
1293
1291
|
user-select: none;
|
|
@@ -1302,39 +1300,39 @@ const nr = (e) => e.replace(/\r\n?/g, `
|
|
|
1302
1300
|
|
|
1303
1301
|
${An.bodySmall}
|
|
1304
1302
|
`, dt = ({ date: e, isExact: t, exactTooltip: o = !1, ...n }) => {
|
|
1305
|
-
const [a, r] =
|
|
1303
|
+
const [a, r] = L(!0), [s, i] = L(/* @__PURE__ */ new Date());
|
|
1306
1304
|
if (!e) return null;
|
|
1307
|
-
const
|
|
1308
|
-
if (!ct(
|
|
1305
|
+
const c = new Date(e);
|
|
1306
|
+
if (!ct(c)) return null;
|
|
1309
1307
|
G(() => {
|
|
1310
1308
|
const b = setInterval(
|
|
1311
1309
|
() => i(/* @__PURE__ */ new Date()),
|
|
1312
|
-
|
|
1310
|
+
Vn
|
|
1313
1311
|
);
|
|
1314
1312
|
return () => clearInterval(b);
|
|
1315
1313
|
}, []);
|
|
1316
|
-
const m =
|
|
1317
|
-
let C = a && !t ? D :
|
|
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 = N(() => Dn(c), [c]), P = N(() => m ? rn(c, `${v}, ${y}`) : rn(c, `EEEE, dd MMM yyyy ${y}`), [c, m]);
|
|
1315
|
+
let C = a && !t ? D : P;
|
|
1318
1316
|
g && a && !t && (C = `Yesterday${C}`), h && (C = "Just now");
|
|
1319
1317
|
const f = () => {
|
|
1320
1318
|
r(!a);
|
|
1321
1319
|
};
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
|
|
1320
|
+
return /* @__PURE__ */ l(
|
|
1321
|
+
Yr,
|
|
1324
1322
|
{
|
|
1325
1323
|
className: ee("date"),
|
|
1326
1324
|
...n,
|
|
1327
1325
|
onClick: f,
|
|
1328
1326
|
onMouseOver: () => !o && r(!1),
|
|
1329
1327
|
onMouseOut: () => !o && r(!0),
|
|
1330
|
-
"data-tooltip": o ?
|
|
1328
|
+
"data-tooltip": o ? P : null,
|
|
1331
1329
|
"data-tooltip-delay": 0,
|
|
1332
1330
|
children: C
|
|
1333
1331
|
}
|
|
1334
1332
|
);
|
|
1335
1333
|
};
|
|
1336
1334
|
var De = /* @__PURE__ */ ((e) => (e.APPROVE = "approve", e.REQUEST_CHANGES = "request_changes", e))(De || {});
|
|
1337
|
-
const
|
|
1335
|
+
const jn = (e) => {
|
|
1338
1336
|
switch (e) {
|
|
1339
1337
|
case De.REQUEST_CHANGES:
|
|
1340
1338
|
return "requested changes";
|
|
@@ -1342,7 +1340,7 @@ const On = (e) => {
|
|
|
1342
1340
|
default:
|
|
1343
1341
|
return "approved this";
|
|
1344
1342
|
}
|
|
1345
|
-
},
|
|
1343
|
+
}, Jr = (e, t) => {
|
|
1346
1344
|
switch (e) {
|
|
1347
1345
|
case De.REQUEST_CHANGES:
|
|
1348
1346
|
return "Requested changes on " + t;
|
|
@@ -1350,7 +1348,7 @@ const On = (e) => {
|
|
|
1350
1348
|
default:
|
|
1351
1349
|
return "Approved " + t;
|
|
1352
1350
|
}
|
|
1353
|
-
},
|
|
1351
|
+
}, Un = (e) => {
|
|
1354
1352
|
switch (e) {
|
|
1355
1353
|
case De.REQUEST_CHANGES:
|
|
1356
1354
|
return "refresh";
|
|
@@ -1358,17 +1356,17 @@ const On = (e) => {
|
|
|
1358
1356
|
default:
|
|
1359
1357
|
return "task_alt";
|
|
1360
1358
|
}
|
|
1361
|
-
},
|
|
1362
|
-
const [t, o] =
|
|
1359
|
+
}, Xr = ({ lastOwnVersionReview: e }) => {
|
|
1360
|
+
const [t, o] = L(/* @__PURE__ */ new Date());
|
|
1363
1361
|
G(() => {
|
|
1364
|
-
const r = setInterval(() => o(/* @__PURE__ */ new Date()),
|
|
1362
|
+
const r = setInterval(() => o(/* @__PURE__ */ new Date()), Vn);
|
|
1365
1363
|
return () => clearInterval(r);
|
|
1366
1364
|
}, []);
|
|
1367
|
-
const n =
|
|
1368
|
-
return /* @__PURE__ */ x(
|
|
1369
|
-
/* @__PURE__ */
|
|
1365
|
+
const n = N(() => e?.activityData?.feedback, [e]), a = N(() => e?.createdAt ? Dn(new Date(e?.createdAt)).toLowerCase() : "", [e?.createdAt, t]);
|
|
1366
|
+
return /* @__PURE__ */ x(Mo, { className: wn(n), children: [
|
|
1367
|
+
/* @__PURE__ */ l(ie, { icon: Un(n) }),
|
|
1370
1368
|
"You last ",
|
|
1371
|
-
|
|
1369
|
+
jn(n),
|
|
1372
1370
|
" ",
|
|
1373
1371
|
a,
|
|
1374
1372
|
" ",
|
|
@@ -1379,20 +1377,20 @@ const On = (e) => {
|
|
|
1379
1377
|
if (!t) return null;
|
|
1380
1378
|
const o = Number(t[1]), n = t[2] ? Number(t[2]) : o;
|
|
1381
1379
|
return Number.isSafeInteger(o) && o > 0 && Number.isSafeInteger(n) && n >= o ? { startFrame: o, endFrame: n } : null;
|
|
1382
|
-
}, It = (e) => typeof e == "number" && Number.isFinite(e) ? e - 1 : 0,
|
|
1380
|
+
}, It = (e) => typeof e == "number" && Number.isFinite(e) ? e - 1 : 0, zn = (e, t) => String(e + It(t)), Kr = (e, t) => {
|
|
1383
1381
|
if (!e) return null;
|
|
1384
1382
|
const o = e.startFrame - It(t), n = e.endFrame - It(t);
|
|
1385
1383
|
return o > 0 ? { startFrame: o, endFrame: n } : null;
|
|
1386
1384
|
}, mn = async (e, t, o, n, a) => {
|
|
1387
|
-
const { data: r } = await
|
|
1385
|
+
const { data: r } = await $t.get(`/api/projects/${e}/files/${t}`, {
|
|
1388
1386
|
responseType: "blob"
|
|
1389
1387
|
}), s = new File([r], o, { type: n || r.type });
|
|
1390
1388
|
return We(s, e, a);
|
|
1391
|
-
}, pn = (e, t) => `/api/projects/${e}/files/${t}`, gn = (e, t) => !!e && Rt(t).has(e),
|
|
1389
|
+
}, pn = (e, t) => `/api/projects/${e}/files/${t}`, gn = (e, t) => !!e && Rt(t).has(e), Zr = [
|
|
1392
1390
|
{ trigger: "@", icon: "person", tooltip: "Mention user" },
|
|
1393
1391
|
{ trigger: "@@", icon: "layers", tooltip: "Mention version" },
|
|
1394
1392
|
{ trigger: "@@@", icon: "check_circle", tooltip: "Mention task" }
|
|
1395
|
-
],
|
|
1393
|
+
], Bn = ({
|
|
1396
1394
|
initValue: e,
|
|
1397
1395
|
initFiles: t = [],
|
|
1398
1396
|
annotationFrameStart: o,
|
|
@@ -1401,7 +1399,7 @@ const On = (e) => {
|
|
|
1401
1399
|
activityId: r,
|
|
1402
1400
|
versionReview: s,
|
|
1403
1401
|
lastOwnVersionReview: i,
|
|
1404
|
-
onSubmit:
|
|
1402
|
+
onSubmit: c,
|
|
1405
1403
|
onReview: m,
|
|
1406
1404
|
duplicate: p,
|
|
1407
1405
|
onDuplicateHandled: g,
|
|
@@ -1410,7 +1408,7 @@ const On = (e) => {
|
|
|
1410
1408
|
isLoading: v,
|
|
1411
1409
|
isOpen: y,
|
|
1412
1410
|
onOpen: D,
|
|
1413
|
-
onClose:
|
|
1411
|
+
onClose: P,
|
|
1414
1412
|
saveDraft: C = !0
|
|
1415
1413
|
}) => {
|
|
1416
1414
|
const {
|
|
@@ -1418,60 +1416,60 @@ const On = (e) => {
|
|
|
1418
1416
|
entities: b,
|
|
1419
1417
|
projectInfo: T,
|
|
1420
1418
|
feedFilter: I,
|
|
1421
|
-
mentionSuggestionsData:
|
|
1419
|
+
mentionSuggestionsData: _,
|
|
1422
1420
|
categories: R,
|
|
1423
1421
|
isGuest: E,
|
|
1424
|
-
userName:
|
|
1422
|
+
userName: S,
|
|
1425
1423
|
editingId: Q
|
|
1426
|
-
} =
|
|
1424
|
+
} = $e(), { hasLicense: Y, onPowerFeature: H, user: J, openSlideOut: q, commentFrameLink: $ } = ze(), te = J?.data?.isAdmin, oe = $a(), [, W] = Nn(), [j, de] = L(e || ""), [se, ne] = L(
|
|
1427
1425
|
() => t.map(
|
|
1428
1426
|
(d) => gn(d.id, e || "") ? { ...d, isInline: !0 } : d
|
|
1429
1427
|
)
|
|
1430
|
-
), [ut, we] =
|
|
1428
|
+
), [ut, we] = L(0), xe = ve(/* @__PURE__ */ new Map()), [Ce, ge] = L([]), [Ee, X] = L(!1), [Se, Oe] = L(!1), [Me, Te] = L([]), [Qe, Ve] = L([]), { annotations: be, removeAnnotation: Be, goToAnnotation: Ge } = Nr({
|
|
1431
1429
|
entityId: b[0]?.id,
|
|
1432
1430
|
filesUploading: Ce
|
|
1433
|
-
}), ae = b.length === 1 && b[0].entityType === "version" ? b[0] : void 0, Ye =
|
|
1431
|
+
}), ae = b.length === 1 && b[0].entityType === "version" ? b[0] : void 0, Ye = $?.draft && $.draft.entityId === ae?.id ? $.draft : null, [Pe, He] = L(
|
|
1434
1432
|
() => u && Number.isSafeInteger(a?.startFrame) && a.startFrame > 0 ? {
|
|
1435
1433
|
startFrame: a.startFrame,
|
|
1436
1434
|
endFrame: Number.isSafeInteger(a.endFrame) && a.endFrame >= a.startFrame ? a.endFrame : a.startFrame
|
|
1437
1435
|
} : null
|
|
1438
|
-
),
|
|
1436
|
+
), _e = (d) => He(d && { ...d, entityId: ae?.id }), je = u || Pe?.entityId === ae?.id ? Pe : null, [ke, Re] = L(!1), w = u ? je : je ?? Ye, M = u ? !!ae || !!je : !!$ && !!ae, O = $?.formatFrame, K = O ?? ((d) => zn(d, o)), ue = (d) => O ? un(d) : Kr(un(d), o), F = w ? w.endFrame > w.startFrame ? `${K(w.startFrame)}-${K(w.endFrame)}` : K(w.startFrame) : void 0, [me, he] = L(F ?? ""), Ne = ve(!1), Ie = ve(null), Le = (d) => {
|
|
1439
1437
|
if (!ae) return;
|
|
1440
1438
|
const k = d ? { ...d, entityId: ae.id } : null;
|
|
1441
1439
|
if (!u) {
|
|
1442
|
-
|
|
1440
|
+
$?.setDraft(k);
|
|
1443
1441
|
return;
|
|
1444
1442
|
}
|
|
1445
|
-
r &&
|
|
1443
|
+
r && $?.setEditPreview({
|
|
1446
1444
|
activityId: r,
|
|
1447
1445
|
link: k
|
|
1448
1446
|
});
|
|
1449
1447
|
}, Je = (d) => {
|
|
1450
1448
|
he(d);
|
|
1451
1449
|
const k = ue(d);
|
|
1452
|
-
k &&
|
|
1450
|
+
k && Le(k);
|
|
1453
1451
|
};
|
|
1454
1452
|
G(() => {
|
|
1455
1453
|
ke || he(F ?? "");
|
|
1456
1454
|
}, [F, ke]), G(
|
|
1457
1455
|
() => () => {
|
|
1458
|
-
u &&
|
|
1456
|
+
u && $?.setEditPreview(null);
|
|
1459
1457
|
},
|
|
1460
|
-
[u,
|
|
1458
|
+
[u, $?.setEditPreview]
|
|
1461
1459
|
);
|
|
1462
1460
|
const Xe = () => {
|
|
1463
|
-
if (
|
|
1464
|
-
|
|
1461
|
+
if (Ne.current) {
|
|
1462
|
+
Ne.current = !1, he(F ?? ""), Le(Ie.current), Re(!1);
|
|
1465
1463
|
return;
|
|
1466
1464
|
}
|
|
1467
1465
|
const d = ue(me);
|
|
1468
|
-
d ? (
|
|
1466
|
+
d ? (_e(d), Le(d)) : (he(F ?? ""), Le(Ie.current)), Re(!1);
|
|
1469
1467
|
}, mt = () => {
|
|
1470
|
-
|
|
1468
|
+
_e(null), u ? Le(null) : $?.unlink();
|
|
1471
1469
|
}, Ke = () => {
|
|
1472
|
-
!u &&
|
|
1473
|
-
}, Ze = () => w ? mt() : Ke(), vt =
|
|
1474
|
-
if (!M || !u &&
|
|
1470
|
+
!u && $ && ae ? $.link(ae.id) : (he(""), Re(!0));
|
|
1471
|
+
}, Ze = () => w ? mt() : Ke(), vt = N(() => {
|
|
1472
|
+
if (!M || !u && !$ || !ae) return;
|
|
1475
1473
|
const d = ["frame", "time", "timecode", "link", "range"];
|
|
1476
1474
|
return [
|
|
1477
1475
|
w ? {
|
|
@@ -1489,20 +1487,20 @@ const On = (e) => {
|
|
|
1489
1487
|
run: Ke
|
|
1490
1488
|
}
|
|
1491
1489
|
];
|
|
1492
|
-
}, [M, u,
|
|
1493
|
-
|
|
1494
|
-
draftKey: C && !u ?
|
|
1490
|
+
}, [M, u, $, ae?.id, !!w, F]), [et, Ot] = L(n);
|
|
1491
|
+
Rr({
|
|
1492
|
+
draftKey: C && !u ? _r(
|
|
1495
1493
|
f,
|
|
1496
|
-
|
|
1494
|
+
S,
|
|
1497
1495
|
b.map((d) => d.id)
|
|
1498
1496
|
) : null,
|
|
1499
1497
|
draft: { text: j, files: se, uploadedAnnotations: Me, category: et },
|
|
1500
|
-
paused:
|
|
1498
|
+
paused: Se,
|
|
1501
1499
|
restore: (d) => {
|
|
1502
1500
|
de(d.text), ne(d.files), Te(d.uploadedAnnotations), Ot(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !y && !Q && D?.();
|
|
1503
1501
|
}
|
|
1504
1502
|
});
|
|
1505
|
-
const Vt = R.filter((d) => d.accessLevel >= 20), jt = R.find((d) => d.name === et),
|
|
1503
|
+
const Vt = R.filter((d) => d.accessLevel >= 20), jt = R.find((d) => d.name === et), Ut = Pn(jt?.color), tt = ve(null), zt = ve(null), bt = !!j.trim(), Bt = !!I?.conditions?.some(
|
|
1506
1504
|
(d) => "key" in d && d.key === "checklists" && d.value === !0
|
|
1507
1505
|
);
|
|
1508
1506
|
G(() => {
|
|
@@ -1513,10 +1511,10 @@ const On = (e) => {
|
|
|
1513
1511
|
Ao().clear().append(Fo("check").append(k)), k.select();
|
|
1514
1512
|
});
|
|
1515
1513
|
}, [y, u, Bt]);
|
|
1516
|
-
const Gt = b[0]?.entityType, Ht = oe?.productTypes, Kn =
|
|
1514
|
+
const Gt = b[0]?.entityType, Ht = oe?.productTypes, Kn = N(
|
|
1517
1515
|
() => E ? void 0 : {
|
|
1518
|
-
|
|
1519
|
-
suggestions:
|
|
1516
|
+
...Po({
|
|
1517
|
+
suggestions: _,
|
|
1520
1518
|
project: { productTypes: Ht },
|
|
1521
1519
|
taskTypes: T?.taskTypes,
|
|
1522
1520
|
entityType: Gt
|
|
@@ -1524,54 +1522,54 @@ const On = (e) => {
|
|
|
1524
1522
|
// keep the picker short
|
|
1525
1523
|
limit: 5
|
|
1526
1524
|
},
|
|
1527
|
-
[E,
|
|
1525
|
+
[E, _, Ht, T?.taskTypes, Gt]
|
|
1528
1526
|
), Zn = ({ type: d, id: k }) => {
|
|
1529
1527
|
d === "user" || d === "team" || q({ entityId: k, entityType: d, projectName: f });
|
|
1530
|
-
}, eo = ({ type: d, id: k, label:
|
|
1531
|
-
const { x:
|
|
1532
|
-
W({ id: k, name: k, type: d, label:
|
|
1533
|
-
}, [to, wt] =
|
|
1528
|
+
}, eo = ({ type: d, id: k, label: U }, V) => {
|
|
1529
|
+
const { x: z, y: ce, width: le } = V.getBoundingClientRect();
|
|
1530
|
+
W({ id: k, name: k, type: d, label: U, pos: { left: z + le / 2, top: ce } });
|
|
1531
|
+
}, [to, wt] = L(!1);
|
|
1534
1532
|
G(() => {
|
|
1535
1533
|
y || wt(!1);
|
|
1536
1534
|
}, [y]);
|
|
1537
1535
|
const no = () => {
|
|
1538
1536
|
y || h || (wt(!0), D && D());
|
|
1539
1537
|
}, qt = () => {
|
|
1540
|
-
u &&
|
|
1541
|
-
}, nt = ({ file: d, data: k },
|
|
1542
|
-
const V = ye(d.name),
|
|
1538
|
+
u && $?.setEditPreview(null), (!bt || u) && de(""), P && P();
|
|
1539
|
+
}, nt = ({ file: d, data: k }, U = !1) => {
|
|
1540
|
+
const V = ye(d.name), z = {
|
|
1543
1541
|
id: k.id,
|
|
1544
1542
|
name: V,
|
|
1545
1543
|
mime: d.type,
|
|
1546
1544
|
size: d.size,
|
|
1547
1545
|
order: se.length,
|
|
1548
|
-
isAnnotationLayer:
|
|
1546
|
+
isAnnotationLayer: U
|
|
1549
1547
|
};
|
|
1550
|
-
return ne((ce) => [...ce,
|
|
1548
|
+
return ne((ce) => [...ce, z]), ge(
|
|
1551
1549
|
(ce) => ce.filter((le) => ye(le.name) !== V)
|
|
1552
|
-
),
|
|
1553
|
-
}, oo = (d, k,
|
|
1554
|
-
|
|
1550
|
+
), z;
|
|
1551
|
+
}, oo = (d, k, U) => {
|
|
1552
|
+
U ? Be?.(d) : (ne((V) => V.filter((z) => z.id !== d)), ge((V) => V.filter((z) => ye(z.name) !== ye(k))));
|
|
1555
1553
|
}, ot = (d, k) => {
|
|
1556
|
-
const
|
|
1557
|
-
if (
|
|
1554
|
+
const U = Math.round(d.loaded * 100 / d.total);
|
|
1555
|
+
if (U !== 100) {
|
|
1558
1556
|
const V = ye(k.name);
|
|
1559
|
-
ge((
|
|
1560
|
-
const ce =
|
|
1557
|
+
ge((z) => {
|
|
1558
|
+
const ce = z.find((B) => ye(B.name) === V), le = z.filter((B) => ye(B.name) !== V), Ue = {
|
|
1561
1559
|
name: V,
|
|
1562
|
-
progress:
|
|
1560
|
+
progress: U,
|
|
1563
1561
|
type: k.type,
|
|
1564
|
-
order: ce?.order ?? se.length +
|
|
1562
|
+
order: ce?.order ?? se.length + z.length
|
|
1565
1563
|
};
|
|
1566
|
-
return [...le,
|
|
1564
|
+
return [...le, Ue];
|
|
1567
1565
|
});
|
|
1568
1566
|
}
|
|
1569
1567
|
}, pt = (d) => {
|
|
1570
|
-
ge((k) => k.filter((
|
|
1568
|
+
ge((k) => k.filter((U) => U.name !== ye(d)));
|
|
1571
1569
|
}, Wt = (d) => {
|
|
1572
1570
|
for (const k of d) {
|
|
1573
|
-
const
|
|
1574
|
-
xe.current.set(k,
|
|
1571
|
+
const U = We(k, f, ot);
|
|
1572
|
+
xe.current.set(k, U), U.then(
|
|
1575
1573
|
(V) => nt(V),
|
|
1576
1574
|
(V) => {
|
|
1577
1575
|
pt(k.name), Fe.error(V.message), console.warn(V);
|
|
@@ -1583,25 +1581,25 @@ const On = (e) => {
|
|
|
1583
1581
|
try {
|
|
1584
1582
|
const k = xe.current.get(d);
|
|
1585
1583
|
if (k) {
|
|
1586
|
-
const { data:
|
|
1587
|
-
return ne((ce) => ce.map((le) => le.id ===
|
|
1588
|
-
src: pn(f,
|
|
1584
|
+
const { data: z } = await k;
|
|
1585
|
+
return ne((ce) => ce.map((le) => le.id === z.id ? { ...le, isInline: !0 } : le)), {
|
|
1586
|
+
src: pn(f, z.id),
|
|
1589
1587
|
name: ye(d.name),
|
|
1590
1588
|
mime: d.type
|
|
1591
1589
|
};
|
|
1592
1590
|
}
|
|
1593
|
-
const { data:
|
|
1594
|
-
return ne((
|
|
1595
|
-
...
|
|
1596
|
-
{ id:
|
|
1597
|
-
]), { src: pn(f,
|
|
1591
|
+
const { data: U } = await We(d, f, void 0), V = ye(d.name);
|
|
1592
|
+
return ne((z) => [
|
|
1593
|
+
...z,
|
|
1594
|
+
{ id: U.id, name: V, mime: d.type, size: d.size, order: z.length, isInline: !0 }
|
|
1595
|
+
]), { src: pn(f, U.id), name: V, mime: d.type };
|
|
1598
1596
|
} catch (k) {
|
|
1599
1597
|
throw xe.current.has(d) || Fe.error(k?.message || "Upload failed"), k;
|
|
1600
1598
|
} finally {
|
|
1601
1599
|
we((k) => k - 1);
|
|
1602
1600
|
}
|
|
1603
1601
|
}, ro = (d) => {
|
|
1604
|
-
X(!1), !d.defaultPrevented &&
|
|
1602
|
+
X(!1), !d.defaultPrevented && Dr(
|
|
1605
1603
|
d,
|
|
1606
1604
|
f,
|
|
1607
1605
|
ot,
|
|
@@ -1612,16 +1610,16 @@ const On = (e) => {
|
|
|
1612
1610
|
d.preventDefault(), d.stopPropagation(), X(!0);
|
|
1613
1611
|
}, Qt = ve(null), so = async ({ activity: d }) => {
|
|
1614
1612
|
const k = ft(d);
|
|
1615
|
-
k && k.entityId === ae?.id && (
|
|
1616
|
-
const
|
|
1617
|
-
const pe = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), re = `[Source](${
|
|
1613
|
+
k && k.entityId === ae?.id && (_e({ startFrame: k.startFrame, endFrame: k.endFrame }), $?.setDraft(k));
|
|
1614
|
+
const U = Sn(d.body || ""), V = d.files || [], z = Rt(U), ce = b.length === 1 && b[0].id === (d.origin?.id ?? d.entityId), le = (B) => {
|
|
1615
|
+
const pe = d.origin ?? (d.entityId && d.entityType ? { id: d.entityId, type: d.entityType } : void 0), re = `[Source](${Jo(d.activityId, pe)})`, Z = [B.trim(), re].filter(Boolean).join(`
|
|
1618
1616
|
|
|
1619
1617
|
`);
|
|
1620
1618
|
de((fe) => fe.trim() ? `${fe.trim()}
|
|
1621
1619
|
|
|
1622
1620
|
${Z}` : Z), tt.current?.focus();
|
|
1623
|
-
},
|
|
1624
|
-
const pe =
|
|
1621
|
+
}, Ue = async (B) => {
|
|
1622
|
+
const pe = z.has(B.id);
|
|
1625
1623
|
try {
|
|
1626
1624
|
const re = await mn(
|
|
1627
1625
|
f,
|
|
@@ -1662,20 +1660,20 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1662
1660
|
};
|
|
1663
1661
|
we((B) => B + 1);
|
|
1664
1662
|
try {
|
|
1665
|
-
const B = V.filter((Z) =>
|
|
1663
|
+
const B = V.filter((Z) => z.has(Z.id)), pe = V.filter((Z) => !z.has(Z.id)), re = Promise.all(pe.map(Ue));
|
|
1666
1664
|
if (B.length) {
|
|
1667
1665
|
const Z = new Map(
|
|
1668
|
-
(await Promise.all(B.map(
|
|
1666
|
+
(await Promise.all(B.map(Ue))).filter(
|
|
1669
1667
|
(fe) => !!fe
|
|
1670
1668
|
)
|
|
1671
1669
|
);
|
|
1672
1670
|
le(
|
|
1673
|
-
|
|
1671
|
+
U.replace(
|
|
1674
1672
|
/(\/api\/projects\/[^/]+\/files\/)([\w-]+)/g,
|
|
1675
1673
|
(fe, at, gt) => Z.has(gt) ? at + Z.get(gt) : fe
|
|
1676
1674
|
)
|
|
1677
1675
|
);
|
|
1678
|
-
} else le(
|
|
1676
|
+
} else le(U);
|
|
1679
1677
|
await re;
|
|
1680
1678
|
} finally {
|
|
1681
1679
|
we((B) => B - 1);
|
|
@@ -1684,26 +1682,26 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1684
1682
|
G(() => {
|
|
1685
1683
|
!p || Qt.current === p.key || (Qt.current = p.key, wt(!0), g?.(), so(p));
|
|
1686
1684
|
}, [p?.key]);
|
|
1687
|
-
const co =
|
|
1685
|
+
const co = Ir({
|
|
1688
1686
|
projectName: f,
|
|
1689
1687
|
onSuccess: nt,
|
|
1690
1688
|
onProgress: ot,
|
|
1691
1689
|
// seed progress so the card switches to uploading before the export finishes
|
|
1692
1690
|
onStart: (d) => ot({ loaded: 1, total: 100 }, { name: d.name, type: "image/png" }),
|
|
1693
1691
|
onError: (d) => pt(d.name)
|
|
1694
|
-
}), lo = Ce.length > 0 || ut > 0, xt =
|
|
1692
|
+
}), lo = Ce.length > 0 || ut > 0, xt = Se || lo, kt = async () => {
|
|
1695
1693
|
if (!xt)
|
|
1696
1694
|
try {
|
|
1697
1695
|
Oe(!0);
|
|
1698
|
-
let d = [], k = Me,
|
|
1696
|
+
let d = [], k = Me, U = [];
|
|
1699
1697
|
if (be.length) {
|
|
1700
1698
|
Ve(be.map((Z) => Z.id));
|
|
1701
1699
|
const { files: pe, metadata: re } = await co(be);
|
|
1702
|
-
d = pe, k = [...k, ...re],
|
|
1700
|
+
d = pe, k = [...k, ...re], U = re.map((Z) => Z.id), Ve(U);
|
|
1703
1701
|
}
|
|
1704
|
-
const { annotations: V = [] } = a || {},
|
|
1702
|
+
const { annotations: V = [] } = a || {}, z = k.length ? [...V, ...k] : void 0, ce = Fr(tt.current?.getMarkdown() ?? j), le = se.filter((pe) => !pe.isInline || gn(pe.id, ce)), Ue = [...le, ...d], B = {
|
|
1705
1703
|
...a,
|
|
1706
|
-
annotations:
|
|
1704
|
+
annotations: z,
|
|
1707
1705
|
// could be undefined
|
|
1708
1706
|
category: E ? null : et,
|
|
1709
1707
|
// guests cannot set category (it is done by default on backend)
|
|
@@ -1711,11 +1709,11 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1711
1709
|
startFrame: w?.startFrame ?? void 0,
|
|
1712
1710
|
endFrame: w?.endFrame ?? void 0
|
|
1713
1711
|
};
|
|
1714
|
-
if ((ce ||
|
|
1712
|
+
if ((ce || Ue.length) && c) {
|
|
1715
1713
|
const pe = j;
|
|
1716
1714
|
de(""), ne([]);
|
|
1717
1715
|
try {
|
|
1718
|
-
await
|
|
1716
|
+
await c(ce, Ue, B), U.forEach((re) => Be?.(re)), u && $?.setEditPreview(null), Te([]), !u && w && $?.unlink(), u || _e(null);
|
|
1719
1717
|
} catch {
|
|
1720
1718
|
de(pe), ne(le), Te(Me);
|
|
1721
1719
|
return;
|
|
@@ -1737,29 +1735,29 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1737
1735
|
} catch (k) {
|
|
1738
1736
|
console.error(k), Fe.error("Something went wrong while submitting the review");
|
|
1739
1737
|
}
|
|
1740
|
-
}, mo = s && m && !h && /* @__PURE__ */ x(
|
|
1741
|
-
/* @__PURE__ */
|
|
1738
|
+
}, mo = s && m && !h && /* @__PURE__ */ x(_o, { className: ee("version-review-buttons", { guest: E }), children: [
|
|
1739
|
+
/* @__PURE__ */ l(
|
|
1742
1740
|
tn,
|
|
1743
1741
|
{
|
|
1744
1742
|
icon: "check",
|
|
1745
1743
|
variant: "tertiary",
|
|
1746
1744
|
"data-tooltip": "Approve",
|
|
1747
1745
|
onClick: () => Xt(De.APPROVE),
|
|
1748
|
-
children: /* @__PURE__ */
|
|
1746
|
+
children: /* @__PURE__ */ l("span", { className: "label", children: "Approve" })
|
|
1749
1747
|
}
|
|
1750
1748
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1749
|
+
/* @__PURE__ */ l(
|
|
1752
1750
|
tn,
|
|
1753
1751
|
{
|
|
1754
1752
|
icon: "refresh",
|
|
1755
1753
|
variant: "danger",
|
|
1756
1754
|
"data-tooltip": "Request changes",
|
|
1757
1755
|
onClick: () => Xt(De.REQUEST_CHANGES),
|
|
1758
|
-
children: /* @__PURE__ */
|
|
1756
|
+
children: /* @__PURE__ */ l("span", { className: "label", children: "Request changes" })
|
|
1759
1757
|
}
|
|
1760
1758
|
)
|
|
1761
|
-
] }), Ft = !E && /* @__PURE__ */
|
|
1762
|
-
|
|
1759
|
+
] }), Ft = !E && /* @__PURE__ */ l(
|
|
1760
|
+
zr,
|
|
1763
1761
|
{
|
|
1764
1762
|
value: et,
|
|
1765
1763
|
categories: Vt,
|
|
@@ -1767,10 +1765,10 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1767
1765
|
isCompact: u,
|
|
1768
1766
|
hasPowerpack: Y,
|
|
1769
1767
|
onPowerFeature: H,
|
|
1770
|
-
isHidden:
|
|
1768
|
+
isHidden: Br(Vt, { isGuest: E, isAdmin: te })
|
|
1771
1769
|
}
|
|
1772
1770
|
), po = /* @__PURE__ */ x(Ae, { children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ l(
|
|
1774
1772
|
st,
|
|
1775
1773
|
{
|
|
1776
1774
|
icon: "attach_file",
|
|
@@ -1778,13 +1776,13 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1778
1776
|
className: "md-toolbar-button",
|
|
1779
1777
|
"data-tooltip": "Attach files",
|
|
1780
1778
|
onMouseDown: (d) => d.preventDefault(),
|
|
1781
|
-
onClick: () =>
|
|
1779
|
+
onClick: () => zt.current?.click()
|
|
1782
1780
|
}
|
|
1783
1781
|
),
|
|
1784
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ l(
|
|
1785
1783
|
"input",
|
|
1786
1784
|
{
|
|
1787
|
-
ref:
|
|
1785
|
+
ref: zt,
|
|
1788
1786
|
type: "file",
|
|
1789
1787
|
multiple: !0,
|
|
1790
1788
|
hidden: !0,
|
|
@@ -1794,8 +1792,8 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1794
1792
|
}
|
|
1795
1793
|
)
|
|
1796
1794
|
] }), go = u || to, ho = `calc(${Math.max((ke ? me || "Frame or range" : F || "").length, 1) + 2}ch + 16px)`;
|
|
1797
|
-
return /* @__PURE__ */
|
|
1798
|
-
|
|
1795
|
+
return /* @__PURE__ */ l(Ae, { children: /* @__PURE__ */ x(
|
|
1796
|
+
Ro,
|
|
1799
1797
|
{
|
|
1800
1798
|
className: ee("comment-container", "md-mention-anchor", { isOpen: y, isEditing: u }),
|
|
1801
1799
|
onDragOver: io,
|
|
@@ -1804,9 +1802,9 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1804
1802
|
onClick: () => X(!1),
|
|
1805
1803
|
onKeyDown: (d) => d.stopPropagation(),
|
|
1806
1804
|
children: [
|
|
1807
|
-
s && i && /* @__PURE__ */
|
|
1805
|
+
s && i && /* @__PURE__ */ l(Xr, { lastOwnVersionReview: i }),
|
|
1808
1806
|
/* @__PURE__ */ x(
|
|
1809
|
-
|
|
1807
|
+
Lo,
|
|
1810
1808
|
{
|
|
1811
1809
|
className: ee("block-shortcuts", {
|
|
1812
1810
|
isOpen: y,
|
|
@@ -1815,15 +1813,15 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1815
1813
|
isDropping: Ee,
|
|
1816
1814
|
disabled: h,
|
|
1817
1815
|
isLoading: v,
|
|
1818
|
-
isSubmitting:
|
|
1816
|
+
isSubmitting: Se,
|
|
1819
1817
|
category: !!et && !E
|
|
1820
1818
|
}),
|
|
1821
1819
|
onClick: no,
|
|
1822
1820
|
$categoryPrimary: jt?.color,
|
|
1823
|
-
$categoryTertiary:
|
|
1824
|
-
$categorySecondary:
|
|
1821
|
+
$categoryTertiary: Ut.primary,
|
|
1822
|
+
$categorySecondary: Ut.secondary,
|
|
1825
1823
|
children: [
|
|
1826
|
-
y && /* @__PURE__ */
|
|
1824
|
+
y && /* @__PURE__ */ l(
|
|
1827
1825
|
Mn,
|
|
1828
1826
|
{
|
|
1829
1827
|
files: Yt,
|
|
@@ -1847,9 +1845,9 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1847
1845
|
}
|
|
1848
1846
|
),
|
|
1849
1847
|
y && !h ? /* @__PURE__ */ x(Ae, { children: [
|
|
1850
|
-
u && Ft && /* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
|
|
1848
|
+
u && Ft && /* @__PURE__ */ l($o, { children: Ft }),
|
|
1849
|
+
/* @__PURE__ */ l(
|
|
1850
|
+
Oo,
|
|
1853
1851
|
{
|
|
1854
1852
|
ref: tt,
|
|
1855
1853
|
className: "comment-editor",
|
|
@@ -1869,7 +1867,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1869
1867
|
floatingToolbar: u,
|
|
1870
1868
|
toolbarStart: Ft,
|
|
1871
1869
|
toolbarEnd: /* @__PURE__ */ x(Ae, { children: [
|
|
1872
|
-
/* @__PURE__ */
|
|
1870
|
+
/* @__PURE__ */ l(Vo, {}),
|
|
1873
1871
|
po
|
|
1874
1872
|
] }),
|
|
1875
1873
|
bordered: !1,
|
|
@@ -1878,28 +1876,28 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1878
1876
|
maxHeight: 259
|
|
1879
1877
|
}
|
|
1880
1878
|
)
|
|
1881
|
-
] }) : /* @__PURE__ */
|
|
1882
|
-
/* @__PURE__ */ x(
|
|
1883
|
-
(!E || M) && /* @__PURE__ */ x(
|
|
1884
|
-
!E &&
|
|
1879
|
+
] }) : /* @__PURE__ */ l(jo, { children: Jt() }),
|
|
1880
|
+
/* @__PURE__ */ x(Uo, { children: [
|
|
1881
|
+
(!E || M) && /* @__PURE__ */ x(zo, { children: [
|
|
1882
|
+
!E && Zr.map(({ trigger: d, icon: k, tooltip: U }) => /* @__PURE__ */ l(
|
|
1885
1883
|
st,
|
|
1886
1884
|
{
|
|
1887
1885
|
icon: k,
|
|
1888
1886
|
variant: "text",
|
|
1889
1887
|
onMouseDown: (V) => V.preventDefault(),
|
|
1890
1888
|
onClick: () => tt.current?.insertMentionTrigger(d),
|
|
1891
|
-
"data-tooltip":
|
|
1889
|
+
"data-tooltip": U,
|
|
1892
1890
|
"data-shortcut": d
|
|
1893
1891
|
},
|
|
1894
1892
|
d
|
|
1895
1893
|
)),
|
|
1896
1894
|
M && /* @__PURE__ */ x(
|
|
1897
|
-
|
|
1895
|
+
Bo,
|
|
1898
1896
|
{
|
|
1899
1897
|
className: ee("frame-link", { selected: !!w || ke }),
|
|
1900
1898
|
children: [
|
|
1901
|
-
/* @__PURE__ */
|
|
1902
|
-
|
|
1899
|
+
/* @__PURE__ */ l(
|
|
1900
|
+
Go,
|
|
1903
1901
|
{
|
|
1904
1902
|
icon: "timer",
|
|
1905
1903
|
variant: "text",
|
|
@@ -1909,8 +1907,8 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1909
1907
|
"data-testid": "comment-frame-link"
|
|
1910
1908
|
}
|
|
1911
1909
|
),
|
|
1912
|
-
(w || ke) && (ke ? /* @__PURE__ */
|
|
1913
|
-
|
|
1910
|
+
(w || ke) && (ke ? /* @__PURE__ */ l(
|
|
1911
|
+
Ho,
|
|
1914
1912
|
{
|
|
1915
1913
|
autoFocus: !0,
|
|
1916
1914
|
"aria-label": "Linked frame or range",
|
|
@@ -1923,12 +1921,12 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1923
1921
|
onBlur: Xe,
|
|
1924
1922
|
style: { width: ho },
|
|
1925
1923
|
onKeyDown: (d) => {
|
|
1926
|
-
d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (
|
|
1924
|
+
d.key === "Enter" && (d.preventDefault(), d.currentTarget.blur()), d.key === "Escape" && (Ne.current = !0, d.currentTarget.blur());
|
|
1927
1925
|
},
|
|
1928
1926
|
"data-testid": "comment-frame-link-input"
|
|
1929
1927
|
}
|
|
1930
|
-
) : /* @__PURE__ */
|
|
1931
|
-
|
|
1928
|
+
) : /* @__PURE__ */ l(
|
|
1929
|
+
qo,
|
|
1932
1930
|
{
|
|
1933
1931
|
variant: "text",
|
|
1934
1932
|
"aria-label": `Edit linked frame ${F ?? ""}`,
|
|
@@ -1941,10 +1939,10 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1941
1939
|
}
|
|
1942
1940
|
)
|
|
1943
1941
|
] }),
|
|
1944
|
-
/* @__PURE__ */ x(
|
|
1945
|
-
u && /* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
|
|
1942
|
+
/* @__PURE__ */ x(Wo, { children: [
|
|
1943
|
+
u && /* @__PURE__ */ l(st, { variant: "text", onClick: qt, children: "Cancel" }),
|
|
1944
|
+
/* @__PURE__ */ l(
|
|
1945
|
+
So,
|
|
1948
1946
|
{
|
|
1949
1947
|
label: u ? "Save" : "Comment",
|
|
1950
1948
|
className: "comment",
|
|
@@ -1956,21 +1954,21 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1956
1954
|
)
|
|
1957
1955
|
] })
|
|
1958
1956
|
] }),
|
|
1959
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ l(Qo, { className: ee({ show: Ee && y }), children: /* @__PURE__ */ l(ie, { icon: "cloud_upload" }) })
|
|
1960
1958
|
]
|
|
1961
1959
|
}
|
|
1962
1960
|
),
|
|
1963
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ l(Yo, {}),
|
|
1964
1962
|
mo
|
|
1965
1963
|
]
|
|
1966
1964
|
}
|
|
1967
1965
|
) });
|
|
1968
|
-
},
|
|
1966
|
+
}, ei = (e, t, o) => e && Lt`
|
|
1969
1967
|
--reaction-border-color: ${e};
|
|
1970
1968
|
--reaction-active-bg: ${t};
|
|
1971
1969
|
--reaction-hover-bg: ${t};
|
|
1972
1970
|
--reaction-active-border: ${e};
|
|
1973
|
-
`,
|
|
1971
|
+
`, ti = A.div`
|
|
1974
1972
|
/* VARS */
|
|
1975
1973
|
--reaction-border-color: var(--md-sys-color-outline-variant);
|
|
1976
1974
|
--reaction-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
@@ -1983,7 +1981,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
1983
1981
|
--reaction-compact-active-hover-bg: var(--md-sys-color-primary-container-hover);
|
|
1984
1982
|
|
|
1985
1983
|
/* CATEGORY */
|
|
1986
|
-
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) =>
|
|
1984
|
+
${({ $categoryPrimary: e, $categorySecondary: t, $categoryTertiary: o }) => ei(e, t)}
|
|
1987
1985
|
|
|
1988
1986
|
display: flex;
|
|
1989
1987
|
justify-content: center;
|
|
@@ -2034,23 +2032,23 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2034
2032
|
position: relative;
|
|
2035
2033
|
height: 19px;
|
|
2036
2034
|
}
|
|
2037
|
-
`,
|
|
2035
|
+
`, ni = A.div`
|
|
2038
2036
|
outline: 'solid 1px red';
|
|
2039
2037
|
display: flex;
|
|
2040
2038
|
gap: 8px;
|
|
2041
|
-
`,
|
|
2039
|
+
`, oi = A.div`
|
|
2042
2040
|
position: fixed;
|
|
2043
2041
|
top: 0;
|
|
2044
2042
|
bottom: 0;
|
|
2045
2043
|
left: 0;
|
|
2046
2044
|
right: 0;
|
|
2047
2045
|
z-index: 55;
|
|
2048
|
-
`,
|
|
2046
|
+
`, ai = A.div`
|
|
2049
2047
|
/* VARS */
|
|
2050
2048
|
--panel-bg: var(--md-sys-color-surface-container-high);
|
|
2051
2049
|
|
|
2052
2050
|
/* CATEGORY */
|
|
2053
|
-
${({ $categoryPrimary: e, $categorySecondary: t }) => t &&
|
|
2051
|
+
${({ $categoryPrimary: e, $categorySecondary: t }) => t && Lt`
|
|
2054
2052
|
--panel-bg: ${t};
|
|
2055
2053
|
`}
|
|
2056
2054
|
|
|
@@ -2066,14 +2064,14 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2066
2064
|
padding: 4px;
|
|
2067
2065
|
border-radius: 4px;
|
|
2068
2066
|
box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.15);
|
|
2069
|
-
`,
|
|
2067
|
+
`, ri = A.div`
|
|
2070
2068
|
/* VARS */
|
|
2071
2069
|
--opener-bg: var(--md-sys-color-surface-container-high);
|
|
2072
2070
|
--opener-hover-bg: var(--md-sys-color-surface-container-high-hover);
|
|
2073
2071
|
--opener-color: var(--md-sys-color-outline);
|
|
2074
2072
|
|
|
2075
2073
|
/* CATEGORY */
|
|
2076
|
-
${({ $categoryPrimary: e, $categorySecondary: t }) => t &&
|
|
2074
|
+
${({ $categoryPrimary: e, $categorySecondary: t }) => t && Lt`
|
|
2077
2075
|
--opener-bg: ${t};
|
|
2078
2076
|
--opener-hover-bg: ${t};
|
|
2079
2077
|
--opener-color: ${e};
|
|
@@ -2096,17 +2094,17 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2096
2094
|
filter: ${({ $categoryPrimary: e }) => e ? "brightness(1.2)" : "none"};
|
|
2097
2095
|
}
|
|
2098
2096
|
}
|
|
2099
|
-
`,
|
|
2097
|
+
`, ii = A.div`
|
|
2100
2098
|
display: flex;
|
|
2101
2099
|
gap: 8px;
|
|
2102
2100
|
position: relative;
|
|
2103
|
-
`,
|
|
2101
|
+
`, si = [
|
|
2104
2102
|
{ key: "thumb_up", value: "👍" },
|
|
2105
2103
|
{ key: "thumb_down", value: "👎" },
|
|
2106
2104
|
{ key: "heart_plus", value: "❤" },
|
|
2107
2105
|
{ key: "celebration", value: "🎉" },
|
|
2108
2106
|
{ key: "notes", value: "📝" }
|
|
2109
|
-
],
|
|
2107
|
+
], ci = {
|
|
2110
2108
|
thumb_up: "👍",
|
|
2111
2109
|
thumb_down: "👎",
|
|
2112
2110
|
heart_plus: "❤️",
|
|
@@ -2118,9 +2116,9 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2118
2116
|
"heart_plus",
|
|
2119
2117
|
"celebration",
|
|
2120
2118
|
"notes"
|
|
2121
|
-
],
|
|
2119
|
+
], li = (e) => [...e].sort(
|
|
2122
2120
|
(o, n) => Et.indexOf(o.type) - Et.indexOf(n.type)
|
|
2123
|
-
),
|
|
2121
|
+
), Gn = ({
|
|
2124
2122
|
reaction: e,
|
|
2125
2123
|
variant: t = "standard",
|
|
2126
2124
|
onClick: o,
|
|
@@ -2130,7 +2128,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2130
2128
|
}) => {
|
|
2131
2129
|
const s = e.users?.join(", ") || void 0;
|
|
2132
2130
|
return /* @__PURE__ */ x(
|
|
2133
|
-
|
|
2131
|
+
ti,
|
|
2134
2132
|
{
|
|
2135
2133
|
className: ee(t, { active: e.isActive }),
|
|
2136
2134
|
onClick: o,
|
|
@@ -2139,19 +2137,19 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2139
2137
|
$categorySecondary: a,
|
|
2140
2138
|
$categoryTertiary: r,
|
|
2141
2139
|
children: [
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
e.users && /* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ l("span", { className: "emoji", children: ci[e.type] }),
|
|
2141
|
+
e.users && /* @__PURE__ */ l("span", { children: e.users.length })
|
|
2144
2142
|
]
|
|
2145
2143
|
}
|
|
2146
2144
|
);
|
|
2147
|
-
},
|
|
2145
|
+
}, di = ({
|
|
2148
2146
|
reactions: e,
|
|
2149
2147
|
changeHandler: t,
|
|
2150
2148
|
categoryPrimary: o,
|
|
2151
2149
|
categorySecondary: n,
|
|
2152
2150
|
categoryTertiary: a
|
|
2153
|
-
}) => /* @__PURE__ */
|
|
2154
|
-
|
|
2151
|
+
}) => /* @__PURE__ */ l(ni, { children: e.map((r) => /* @__PURE__ */ l(
|
|
2152
|
+
Gn,
|
|
2155
2153
|
{
|
|
2156
2154
|
reaction: r,
|
|
2157
2155
|
isActive: r.isActive,
|
|
@@ -2163,22 +2161,22 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2163
2161
|
categoryTertiary: a
|
|
2164
2162
|
},
|
|
2165
2163
|
r.type
|
|
2166
|
-
)) }),
|
|
2164
|
+
)) }), ui = ({
|
|
2167
2165
|
reactions: e,
|
|
2168
2166
|
changeHandler: t,
|
|
2169
2167
|
categoryPrimary: o,
|
|
2170
2168
|
categorySecondary: n,
|
|
2171
2169
|
categoryTertiary: a
|
|
2172
2170
|
}) => {
|
|
2173
|
-
const [r, s] =
|
|
2171
|
+
const [r, s] = L(!1), i = e.filter((c) => c.isActive).map((c) => c.type);
|
|
2174
2172
|
return /* @__PURE__ */ x(
|
|
2175
|
-
|
|
2173
|
+
ri,
|
|
2176
2174
|
{
|
|
2177
2175
|
$categoryPrimary: o,
|
|
2178
2176
|
$categorySecondary: n,
|
|
2179
2177
|
$categoryTertiary: a,
|
|
2180
2178
|
children: [
|
|
2181
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ l(
|
|
2182
2180
|
ie,
|
|
2183
2181
|
{
|
|
2184
2182
|
icon: "add_reaction",
|
|
@@ -2187,20 +2185,20 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2187
2185
|
}
|
|
2188
2186
|
),
|
|
2189
2187
|
r && /* @__PURE__ */ x(Ae, { children: [
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
|
|
2188
|
+
/* @__PURE__ */ l(oi, { onClick: () => s(!1) }),
|
|
2189
|
+
/* @__PURE__ */ l(
|
|
2190
|
+
ai,
|
|
2193
2191
|
{
|
|
2194
2192
|
$categoryPrimary: o,
|
|
2195
2193
|
$categorySecondary: n,
|
|
2196
2194
|
$categoryTertiary: a,
|
|
2197
|
-
children:
|
|
2195
|
+
children: si.map((c) => {
|
|
2198
2196
|
const m = {
|
|
2199
|
-
type:
|
|
2200
|
-
isActive: i.includes(
|
|
2197
|
+
type: c.key,
|
|
2198
|
+
isActive: i.includes(c.key)
|
|
2201
2199
|
};
|
|
2202
|
-
return /* @__PURE__ */
|
|
2203
|
-
|
|
2200
|
+
return /* @__PURE__ */ l(
|
|
2201
|
+
Gn,
|
|
2204
2202
|
{
|
|
2205
2203
|
reaction: m,
|
|
2206
2204
|
variant: "compact",
|
|
@@ -2220,7 +2218,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2220
2218
|
]
|
|
2221
2219
|
}
|
|
2222
2220
|
);
|
|
2223
|
-
},
|
|
2221
|
+
}, mi = ({
|
|
2224
2222
|
reactions: e,
|
|
2225
2223
|
changeHandler: t,
|
|
2226
2224
|
readOnly: o,
|
|
@@ -2230,34 +2228,34 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2230
2228
|
categoryTertiary: s
|
|
2231
2229
|
}) => {
|
|
2232
2230
|
const i = n ? { categoryPrimary: a, categorySecondary: r, categoryTertiary: s } : {};
|
|
2233
|
-
return /* @__PURE__ */ x(
|
|
2234
|
-
!o && /* @__PURE__ */
|
|
2235
|
-
|
|
2231
|
+
return /* @__PURE__ */ x(ii, { children: [
|
|
2232
|
+
!o && /* @__PURE__ */ l(
|
|
2233
|
+
ui,
|
|
2236
2234
|
{
|
|
2237
2235
|
reactions: e,
|
|
2238
2236
|
changeHandler: t,
|
|
2239
2237
|
...i
|
|
2240
2238
|
}
|
|
2241
2239
|
),
|
|
2242
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ l(di, { reactions: e, changeHandler: t, ...i })
|
|
2243
2241
|
] });
|
|
2244
|
-
},
|
|
2242
|
+
}, pi = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
|
|
2245
2243
|
if (o.includes("http")) return [];
|
|
2246
2244
|
const n = o.match(/\(([^)]+)\)/), a = n ? n[1].split(":") : [];
|
|
2247
2245
|
return { type: a[0], id: a[1] };
|
|
2248
|
-
}),
|
|
2246
|
+
}), gi = (e) => e.replace(/@(?=@|\[)/g, ""), hi = {
|
|
2249
2247
|
"&": "&",
|
|
2250
2248
|
"<": "<",
|
|
2251
2249
|
">": ">",
|
|
2252
2250
|
'"': """
|
|
2253
|
-
},
|
|
2251
|
+
}, Ct = (e) => e.replace(/[&<>"]/g, (t) => hi[t]), fi = (e) => e.replaceAll(" ", "%20"), yi = (e, t) => {
|
|
2254
2252
|
const o = t.cloneContents();
|
|
2255
2253
|
if (!o.querySelector("[data-mention-value]")) return null;
|
|
2256
2254
|
let n = "", a = "";
|
|
2257
2255
|
const r = (s) => {
|
|
2258
2256
|
if (s.nodeType === Node.TEXT_NODE) {
|
|
2259
2257
|
const m = s.data;
|
|
2260
|
-
n += m, a +=
|
|
2258
|
+
n += m, a += Ct(m);
|
|
2261
2259
|
return;
|
|
2262
2260
|
}
|
|
2263
2261
|
if (s.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
@@ -2265,12 +2263,12 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2265
2263
|
return;
|
|
2266
2264
|
}
|
|
2267
2265
|
if (s.nodeType !== Node.ELEMENT_NODE) return;
|
|
2268
|
-
const i = s,
|
|
2269
|
-
if (
|
|
2266
|
+
const i = s, c = i.getAttribute("data-mention-value");
|
|
2267
|
+
if (c) {
|
|
2270
2268
|
const m = i.getAttribute("data-mention-label") || (i.textContent || "").trim();
|
|
2271
2269
|
if (m) {
|
|
2272
|
-
const p =
|
|
2273
|
-
n += `[${m}](${p})`, a += `<a href="@${
|
|
2270
|
+
const p = fi(c);
|
|
2271
|
+
n += `[${m}](${p})`, a += `<a href="@${Ct(p)}">@${Ct(m)}</a>`;
|
|
2274
2272
|
}
|
|
2275
2273
|
return;
|
|
2276
2274
|
}
|
|
@@ -2288,7 +2286,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2288
2286
|
s.childNodes.forEach(r);
|
|
2289
2287
|
};
|
|
2290
2288
|
return r(o), n ? { text: n, html: a } : null;
|
|
2291
|
-
},
|
|
2289
|
+
}, vi = ({ children: e }) => {
|
|
2292
2290
|
const t = Zt.Children.map(e, (n) => {
|
|
2293
2291
|
if (!Zt.isValidElement(n)) return n;
|
|
2294
2292
|
const a = n.props.children;
|
|
@@ -2296,7 +2294,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2296
2294
|
...n,
|
|
2297
2295
|
props: {
|
|
2298
2296
|
...n.props,
|
|
2299
|
-
children:
|
|
2297
|
+
children: gi(a)
|
|
2300
2298
|
}
|
|
2301
2299
|
};
|
|
2302
2300
|
}), o = qe((n) => {
|
|
@@ -2304,42 +2302,21 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2304
2302
|
if (!a || a.rangeCount === 0 || a.isCollapsed) return;
|
|
2305
2303
|
const r = a.getRangeAt(0), s = n.currentTarget;
|
|
2306
2304
|
if (!s.contains(r.startContainer) || !s.contains(r.endContainer)) return;
|
|
2307
|
-
const i =
|
|
2305
|
+
const i = yi(s, r);
|
|
2308
2306
|
i && (n.preventDefault(), n.clipboardData.setData("text/plain", i.text), n.clipboardData.setData("text/html", i.html));
|
|
2309
2307
|
}, []);
|
|
2310
|
-
return /* @__PURE__ */
|
|
2311
|
-
},
|
|
2312
|
-
const o = e.position?.start.offset, n = e.position?.end.offset;
|
|
2313
|
-
return o === void 0 || n === void 0 ? null : t.slice(o, n);
|
|
2314
|
-
}, wi = (e, t) => {
|
|
2315
|
-
const o = bi(e, t);
|
|
2316
|
-
if (o === null) return null;
|
|
2317
|
-
if (e.type === "textDirective") return [Bn(o)];
|
|
2318
|
-
if (e.type === "leafDirective") return [Ct(o)];
|
|
2319
|
-
const [n, ...a] = o.split(`
|
|
2320
|
-
`), r = a.length ? a[a.length - 1].match(/:{3,}\s*$/) : null;
|
|
2321
|
-
return [Ct(n), ...e.children || [], ...r ? [Ct(r[0])] : []];
|
|
2322
|
-
}, Gn = (e, t, o) => {
|
|
2323
|
-
if (!e.children) return;
|
|
2324
|
-
const n = [];
|
|
2325
|
-
for (const a of e.children) {
|
|
2326
|
-
const s = vi.includes(a.type) && !o.includes(a.name || "") ? wi(a, t) : null;
|
|
2327
|
-
n.push(...s || [a]);
|
|
2328
|
-
}
|
|
2329
|
-
e.children = n, n.forEach((a) => Gn(a, t, o));
|
|
2330
|
-
}, xi = (e = yi) => (t, o) => {
|
|
2331
|
-
Gn(t, String(o.value ?? ""), e);
|
|
2332
|
-
}, ki = (e = [], t) => {
|
|
2308
|
+
return /* @__PURE__ */ l("div", { className: "comment-text", onCopy: o, children: t });
|
|
2309
|
+
}, bi = (e = [], t) => {
|
|
2333
2310
|
let o = {};
|
|
2334
2311
|
return e.forEach((n) => {
|
|
2335
2312
|
const a = n.reaction;
|
|
2336
2313
|
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));
|
|
2337
|
-
}),
|
|
2338
|
-
},
|
|
2314
|
+
}), li(Object.values(o));
|
|
2315
|
+
}, wi = A.div`
|
|
2339
2316
|
display: flex;
|
|
2340
2317
|
align-items: center;
|
|
2341
2318
|
gap: var(--base-gap-small);
|
|
2342
|
-
`,
|
|
2319
|
+
`, xi = A.span`
|
|
2343
2320
|
border-radius: var(--border-radius-m);
|
|
2344
2321
|
padding: 2px 6px;
|
|
2345
2322
|
margin: 0 2px;
|
|
@@ -2356,19 +2333,19 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2356
2333
|
font-size: 16px;
|
|
2357
2334
|
font-variation-settings: 'FILL' 1;
|
|
2358
2335
|
}
|
|
2359
|
-
`,
|
|
2360
|
-
const n =
|
|
2361
|
-
return /* @__PURE__ */ x(
|
|
2336
|
+
`, ki = ({ name: e, statuses: t, children: o }) => {
|
|
2337
|
+
const n = Fi(e, t);
|
|
2338
|
+
return /* @__PURE__ */ x(wi, { children: [
|
|
2362
2339
|
o,
|
|
2363
|
-
/* @__PURE__ */ x(
|
|
2364
|
-
n.icon && /* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ x(xi, { $color: _t(n.color), style: { backgroundColor: n.color }, children: [
|
|
2341
|
+
n.icon && /* @__PURE__ */ l(ie, { icon: n.icon }),
|
|
2365
2342
|
e
|
|
2366
2343
|
] })
|
|
2367
2344
|
] });
|
|
2368
|
-
},
|
|
2345
|
+
}, Fi = (e, t) => {
|
|
2369
2346
|
const o = { name: e, color: "var(--md-sys-color-primary)", icon: void 0 };
|
|
2370
2347
|
return t.find((n) => n.name === e) || o;
|
|
2371
|
-
},
|
|
2348
|
+
}, Ai = A.header`
|
|
2372
2349
|
display: flex;
|
|
2373
2350
|
align-items: flex-end;
|
|
2374
2351
|
gap: var(--base-gap-small);
|
|
@@ -2380,7 +2357,7 @@ ${Z}` : Z), tt.current?.focus();
|
|
|
2380
2357
|
margin-left: 4px;
|
|
2381
2358
|
font-weight: 800;
|
|
2382
2359
|
}
|
|
2383
|
-
`,
|
|
2360
|
+
`, Ci = A.div`
|
|
2384
2361
|
display: flex;
|
|
2385
2362
|
gap: var(--base-gap-small);
|
|
2386
2363
|
align-items: center;
|
|
@@ -2409,7 +2386,7 @@ const Tt = A.span`
|
|
|
2409
2386
|
strong {
|
|
2410
2387
|
font-weight: 800;
|
|
2411
2388
|
}
|
|
2412
|
-
`,
|
|
2389
|
+
`, Ti = A.li`
|
|
2413
2390
|
list-style: none;
|
|
2414
2391
|
margin: var(--padding-s) var(--padding-m);
|
|
2415
2392
|
padding: var(--padding-s) var(--padding-m) var(--padding-s) 0;
|
|
@@ -2436,7 +2413,7 @@ const Tt = A.span`
|
|
|
2436
2413
|
&.request_changes .date, {
|
|
2437
2414
|
color: var(--md-sys-color-error);
|
|
2438
2415
|
}
|
|
2439
|
-
`,
|
|
2416
|
+
`, Di = A.div`
|
|
2440
2417
|
display: flex;
|
|
2441
2418
|
flex-wrap: nowrap;
|
|
2442
2419
|
align-items: center;
|
|
@@ -2455,7 +2432,7 @@ const Tt = A.span`
|
|
|
2455
2432
|
color: var(--md-sys-color-outline);
|
|
2456
2433
|
opacity: 0.5;
|
|
2457
2434
|
}
|
|
2458
|
-
`,
|
|
2435
|
+
`, Si = A.span`
|
|
2459
2436
|
white-space: nowrap;
|
|
2460
2437
|
font-size: 12px;
|
|
2461
2438
|
text-overflow: ellipsis;
|
|
@@ -2466,16 +2443,16 @@ const Tt = A.span`
|
|
|
2466
2443
|
font-size: 12px;
|
|
2467
2444
|
font-weight: 800;
|
|
2468
2445
|
}
|
|
2469
|
-
`,
|
|
2446
|
+
`, Ni = "#c5c5c5";
|
|
2470
2447
|
function Hn(e) {
|
|
2471
|
-
const { categories: t } =
|
|
2448
|
+
const { categories: t } = $e(), { categoryData: o, categoryNotFound: n } = N(() => {
|
|
2472
2449
|
let a = !1;
|
|
2473
2450
|
if (e) {
|
|
2474
2451
|
const r = t.find((s) => s.name === e);
|
|
2475
2452
|
return r || (a = !0), {
|
|
2476
2453
|
categoryData: r || {
|
|
2477
2454
|
name: e,
|
|
2478
|
-
color:
|
|
2455
|
+
color: Ni
|
|
2479
2456
|
},
|
|
2480
2457
|
categoryNotFound: a
|
|
2481
2458
|
};
|
|
@@ -2487,20 +2464,20 @@ function Hn(e) {
|
|
|
2487
2464
|
}, [e, t]);
|
|
2488
2465
|
return { categoryData: o, categoryNotFound: n };
|
|
2489
2466
|
}
|
|
2490
|
-
const
|
|
2491
|
-
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s =
|
|
2467
|
+
const Ii = "anonymous.guest", Ei = "Anonymous User", Mi = "unknown.user", qn = (e) => !e || !e.name ? Mi : e.name === Ii && !e.label ? Ei : e.label ? e.label : e.name, Mt = "anonymous.guest", Pi = ({ isGuest: e, activity: t }) => {
|
|
2468
|
+
const { authorName: o, authorFullName: n, createdAt: a, activityData: r } = t || {}, s = N(
|
|
2492
2469
|
() => [
|
|
2493
2470
|
qn({ name: o, label: n }),
|
|
2494
|
-
|
|
2471
|
+
jn(r?.feedback ?? De.APPROVE)
|
|
2495
2472
|
].join(" "),
|
|
2496
2473
|
[n, o, r?.feedback, a]
|
|
2497
|
-
), { categoryData: i, categoryNotFound:
|
|
2474
|
+
), { categoryData: i, categoryNotFound: c } = Hn(r?.category), m = N(() => {
|
|
2498
2475
|
if (!o?.startsWith(Mt))
|
|
2499
2476
|
return `/api/users/${o}/avatar`;
|
|
2500
2477
|
}, [o]);
|
|
2501
2478
|
if (r?.feedback)
|
|
2502
|
-
return /* @__PURE__ */
|
|
2503
|
-
o && /* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ l(Ti, { className: wn(r.feedback), children: /* @__PURE__ */ x(Di, { children: [
|
|
2480
|
+
o && /* @__PURE__ */ l(
|
|
2504
2481
|
Cn,
|
|
2505
2482
|
{
|
|
2506
2483
|
name: o,
|
|
@@ -2509,19 +2486,19 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2509
2486
|
size: 22
|
|
2510
2487
|
}
|
|
2511
2488
|
),
|
|
2512
|
-
/* @__PURE__ */
|
|
2513
|
-
i && !e && /* @__PURE__ */
|
|
2489
|
+
/* @__PURE__ */ l(ie, { icon: Un(r.feedback) }),
|
|
2490
|
+
i && !e && /* @__PURE__ */ l(
|
|
2514
2491
|
it,
|
|
2515
2492
|
{
|
|
2516
2493
|
value: i.name,
|
|
2517
2494
|
color: i.color,
|
|
2518
2495
|
isCompact: !0,
|
|
2519
|
-
"data-tooltip":
|
|
2496
|
+
"data-tooltip": c ? "Category not found. It may have been deleted." : void 0,
|
|
2520
2497
|
"data-tooltip-delay": 0
|
|
2521
2498
|
}
|
|
2522
2499
|
),
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ l(Si, { children: s }),
|
|
2501
|
+
/* @__PURE__ */ l(dt, { date: a, exactTooltip: !0 })
|
|
2525
2502
|
] }) });
|
|
2526
2503
|
}, Wn = ({
|
|
2527
2504
|
name: e,
|
|
@@ -2532,28 +2509,28 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2532
2509
|
children: r,
|
|
2533
2510
|
projectName: s,
|
|
2534
2511
|
entityType: i,
|
|
2535
|
-
onReferenceClick:
|
|
2512
|
+
onReferenceClick: c,
|
|
2536
2513
|
onReferenceTooltip: m
|
|
2537
2514
|
}) => {
|
|
2538
|
-
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,
|
|
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, _ = N(() => {
|
|
2539
2516
|
if (!e?.startsWith(Mt))
|
|
2540
2517
|
return `/api/users/${e}/avatar`;
|
|
2541
2518
|
}, [e]);
|
|
2542
|
-
return /* @__PURE__ */ x(
|
|
2543
|
-
/* @__PURE__ */ x(
|
|
2544
|
-
e && !I && /* @__PURE__ */
|
|
2545
|
-
I && /* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2519
|
+
return /* @__PURE__ */ x(Ai, { children: [
|
|
2520
|
+
/* @__PURE__ */ x(Ci, { children: [
|
|
2521
|
+
e && !I && /* @__PURE__ */ l(Cn, { name: e, fullName: t, src: _, size: 22 }),
|
|
2522
|
+
I && /* @__PURE__ */ l(ie, { icon: "account_circle" }),
|
|
2523
|
+
/* @__PURE__ */ l("h5", { children: t || a.activityData?.author || "Unknown" }),
|
|
2547
2524
|
n && /* @__PURE__ */ x(Ae, { children: [
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
g && /* @__PURE__ */
|
|
2551
|
-
|
|
2525
|
+
/* @__PURE__ */ l(Tt, { children: /* @__PURE__ */ l("strong", { children: f }) }),
|
|
2526
|
+
/* @__PURE__ */ l(Tt, { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: b }),
|
|
2527
|
+
g && /* @__PURE__ */ l(
|
|
2528
|
+
Xo,
|
|
2552
2529
|
{
|
|
2553
2530
|
id: g.id,
|
|
2554
2531
|
type: g.type,
|
|
2555
2532
|
variant: "text",
|
|
2556
|
-
onClick: () =>
|
|
2533
|
+
onClick: () => c?.({
|
|
2557
2534
|
entityId: g.id,
|
|
2558
2535
|
entityType: g.type,
|
|
2559
2536
|
projectName: s,
|
|
@@ -2570,13 +2547,13 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2570
2547
|
}
|
|
2571
2548
|
)
|
|
2572
2549
|
] }),
|
|
2573
|
-
D && /* @__PURE__ */
|
|
2550
|
+
D && /* @__PURE__ */ l(Tt, { children: C }),
|
|
2574
2551
|
r
|
|
2575
2552
|
] }),
|
|
2576
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ l(dt, { date: o })
|
|
2577
2554
|
] });
|
|
2578
|
-
},
|
|
2579
|
-
|
|
2555
|
+
}, _i = ({ flags: e }) => e.length ? /* @__PURE__ */ l(Ko, { children: e.map(({ id: t, label: o, icon: n, tooltip: a, onClick: r, disabled: s, testId: i }) => /* @__PURE__ */ x(
|
|
2556
|
+
Zo,
|
|
2580
2557
|
{
|
|
2581
2558
|
as: r ? "button" : "span",
|
|
2582
2559
|
type: r ? "button" : void 0,
|
|
@@ -2586,12 +2563,12 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2586
2563
|
"data-tooltip-delay": 0,
|
|
2587
2564
|
"data-testid": i,
|
|
2588
2565
|
children: [
|
|
2589
|
-
n && /* @__PURE__ */
|
|
2566
|
+
n && /* @__PURE__ */ l(ie, { icon: n }),
|
|
2590
2567
|
o
|
|
2591
2568
|
]
|
|
2592
2569
|
},
|
|
2593
2570
|
t
|
|
2594
|
-
)) }) : null,
|
|
2571
|
+
)) }) : null, Ri = ({
|
|
2595
2572
|
category: e,
|
|
2596
2573
|
categoryNotFound: t,
|
|
2597
2574
|
frameLink: o,
|
|
@@ -2618,7 +2595,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2618
2595
|
testId: "comment-frame-link-chip"
|
|
2619
2596
|
}
|
|
2620
2597
|
] : []
|
|
2621
|
-
],
|
|
2598
|
+
], Li = ({
|
|
2622
2599
|
onDelete: e,
|
|
2623
2600
|
onEdit: t,
|
|
2624
2601
|
onCopyText: o,
|
|
@@ -2628,37 +2605,37 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2628
2605
|
projectName: s,
|
|
2629
2606
|
entity: i
|
|
2630
2607
|
}) => {
|
|
2631
|
-
const
|
|
2608
|
+
const c = [], m = (p) => () => {
|
|
2632
2609
|
a?.(), p();
|
|
2633
2610
|
};
|
|
2634
|
-
return t &&
|
|
2611
|
+
return t && c.push({
|
|
2635
2612
|
id: "edit",
|
|
2636
2613
|
label: "Edit",
|
|
2637
2614
|
icon: "edit_square",
|
|
2638
2615
|
onClick: m(t)
|
|
2639
|
-
}), o &&
|
|
2616
|
+
}), o && c.push({
|
|
2640
2617
|
id: "copy-text",
|
|
2641
2618
|
label: "Copy text",
|
|
2642
2619
|
icon: "content_copy",
|
|
2643
2620
|
onClick: m(o)
|
|
2644
|
-
}), n &&
|
|
2621
|
+
}), n && c.push({
|
|
2645
2622
|
id: "duplicate",
|
|
2646
2623
|
label: "Duplicate",
|
|
2647
2624
|
icon: "library_add",
|
|
2648
2625
|
onClick: m(n)
|
|
2649
|
-
}),
|
|
2626
|
+
}), c.push({
|
|
2650
2627
|
id: "copy-link",
|
|
2651
2628
|
label: "Copy link",
|
|
2652
2629
|
icon: "link",
|
|
2653
|
-
onClick: m(() => In(
|
|
2654
|
-
}), e &&
|
|
2630
|
+
onClick: m(() => In(ea(s, r, i)))
|
|
2631
|
+
}), e && c.push({
|
|
2655
2632
|
id: "delete",
|
|
2656
2633
|
label: "Delete",
|
|
2657
2634
|
icon: "delete",
|
|
2658
2635
|
onClick: m(e),
|
|
2659
2636
|
danger: !0
|
|
2660
|
-
}), /* @__PURE__ */
|
|
2661
|
-
},
|
|
2637
|
+
}), /* @__PURE__ */ l(pa, { menu: c });
|
|
2638
|
+
}, $i = ({
|
|
2662
2639
|
activity: e = {},
|
|
2663
2640
|
annotationFrameStart: t,
|
|
2664
2641
|
onCheckChange: o,
|
|
@@ -2667,7 +2644,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2667
2644
|
onDuplicate: r,
|
|
2668
2645
|
projectInfo: s,
|
|
2669
2646
|
editProps: i,
|
|
2670
|
-
projectName:
|
|
2647
|
+
projectName: c,
|
|
2671
2648
|
entityType: m,
|
|
2672
2649
|
onReferenceClick: p,
|
|
2673
2650
|
onFileExpand: g,
|
|
@@ -2678,18 +2655,18 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2678
2655
|
}) => {
|
|
2679
2656
|
const {
|
|
2680
2657
|
userName: D,
|
|
2681
|
-
createReaction:
|
|
2658
|
+
createReaction: P,
|
|
2682
2659
|
deleteReaction: C,
|
|
2683
2660
|
editingId: f,
|
|
2684
2661
|
setEditingId: b,
|
|
2685
2662
|
isGuest: T,
|
|
2686
2663
|
userTeamNames: I
|
|
2687
|
-
} =
|
|
2664
|
+
} = $e(), _ = ve(null), { toggleMenuOpen: R, menuOpen: E } = Oa(), { categoryData: S, categoryNotFound: Q } = Hn(e?.activityData?.category), Y = Pn(S?.color);
|
|
2688
2665
|
let {
|
|
2689
2666
|
body: H,
|
|
2690
2667
|
authorName: J,
|
|
2691
2668
|
authorFullName: q,
|
|
2692
|
-
createdAt:
|
|
2669
|
+
createdAt: $,
|
|
2693
2670
|
referenceType: te,
|
|
2694
2671
|
entityId: oe,
|
|
2695
2672
|
activityId: W,
|
|
@@ -2699,7 +2676,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2699
2676
|
origin: ne
|
|
2700
2677
|
} = e;
|
|
2701
2678
|
J || (J = j?.name || ""), q = qn({ name: J, label: q });
|
|
2702
|
-
const ut = vo(), we = `activity-comment-menu-${W}-${ut}`, xe = E === we, { onGoToFrame: Ce, setHighlightedActivities: ge, user: Ee, commentFrameLink: X } =
|
|
2679
|
+
const ut = vo(), we = `activity-comment-menu-${W}-${ut}`, xe = E === we, { onGoToFrame: Ce, setHighlightedActivities: ge, user: Ee, commentFrameLink: X } = ze(), Se = !!Ee?.data?.isAdmin, Oe = de || Se, Me = de || Se, Te = () => {
|
|
2703
2680
|
b(W);
|
|
2704
2681
|
}, Qe = () => {
|
|
2705
2682
|
b(null);
|
|
@@ -2708,7 +2685,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2708
2685
|
}, be = f === W, Be = ({ activityId: F, url: me }) => {
|
|
2709
2686
|
document.getElementById(F) ? ge([F]) : window.open(me, "_blank", "noreferrer");
|
|
2710
2687
|
}, Ge = te !== "origin" || u, ae = async () => {
|
|
2711
|
-
const F =
|
|
2688
|
+
const F = pi(H);
|
|
2712
2689
|
Ge && ne && F.push({ id: ne.id, type: ne.type }), n && await n(W, oe, F);
|
|
2713
2690
|
}, Ye = () => {
|
|
2714
2691
|
tr({
|
|
@@ -2718,12 +2695,12 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2718
2695
|
await ae();
|
|
2719
2696
|
}
|
|
2720
2697
|
});
|
|
2721
|
-
}, [,
|
|
2722
|
-
() =>
|
|
2698
|
+
}, [, Pe] = Nn(), He = N(
|
|
2699
|
+
() => bi(e.reactions, D),
|
|
2723
2700
|
[[...e.reactions || []]]
|
|
2724
|
-
),
|
|
2725
|
-
F.isActive ?
|
|
2726
|
-
projectName:
|
|
2701
|
+
), _e = (F) => {
|
|
2702
|
+
F.isActive ? P({
|
|
2703
|
+
projectName: c,
|
|
2727
2704
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2728
2705
|
userName: D,
|
|
2729
2706
|
activityId: W,
|
|
@@ -2731,7 +2708,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2731
2708
|
reaction: F.type
|
|
2732
2709
|
}
|
|
2733
2710
|
}) : C({
|
|
2734
|
-
projectName:
|
|
2711
|
+
projectName: c,
|
|
2735
2712
|
// @ts-ignore exposed endpoint doesn't need the username, we still need to pass it for the optimistic update
|
|
2736
2713
|
userName: D,
|
|
2737
2714
|
activityId: W,
|
|
@@ -2742,54 +2719,54 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2742
2719
|
F.annotation && (Ce?.(F.annotation.range[0]), ge([W]));
|
|
2743
2720
|
},
|
|
2744
2721
|
[Ce]
|
|
2745
|
-
), ke =
|
|
2722
|
+
), ke = N(() => Rt(H), [H]), Re = N(
|
|
2746
2723
|
() => (se || []).filter((F) => !ke.has(F.id)),
|
|
2747
2724
|
[se, ke]
|
|
2748
2725
|
), w = (F) => {
|
|
2749
|
-
const me =
|
|
2750
|
-
|
|
2751
|
-
}, M =
|
|
2726
|
+
const me = la(F), he = (se || []).filter((Ie) => yt(Ie.mime, Ie.ext)), Ne = he.findIndex((Ie) => Ie.id === me);
|
|
2727
|
+
Ne !== -1 && g?.({ files: he, index: Ne, activityId: W });
|
|
2728
|
+
}, M = N(() => Sn(H || ""), [H]), O = N(() => ft(e), [e]), K = X?.formatFrame ?? ((F) => zn(F, t)), ue = () => {
|
|
2752
2729
|
O && (X ? X.goTo(O) : Ce?.(O.startFrame), ge([W]));
|
|
2753
2730
|
};
|
|
2754
2731
|
return /* @__PURE__ */ x(Ae, { children: [
|
|
2755
2732
|
/* @__PURE__ */ x(
|
|
2756
|
-
|
|
2733
|
+
ta,
|
|
2757
2734
|
{
|
|
2758
2735
|
className: ee("comment", {
|
|
2759
2736
|
isOwner: de,
|
|
2760
2737
|
isEditing: be,
|
|
2761
2738
|
isHighlighted: h,
|
|
2762
|
-
category: !!
|
|
2739
|
+
category: !!S && !T,
|
|
2763
2740
|
menuOpen: xe
|
|
2764
2741
|
}),
|
|
2765
2742
|
id: W,
|
|
2766
|
-
$categoryPrimary:
|
|
2743
|
+
$categoryPrimary: S?.color,
|
|
2767
2744
|
$categoryTertiary: Y.primary,
|
|
2768
2745
|
$categorySecondary: Y.secondary,
|
|
2769
2746
|
children: [
|
|
2770
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ l(
|
|
2771
2748
|
Wn,
|
|
2772
2749
|
{
|
|
2773
2750
|
name: J,
|
|
2774
2751
|
fullName: q,
|
|
2775
|
-
date:
|
|
2752
|
+
date: $,
|
|
2776
2753
|
isRef: Ge,
|
|
2777
2754
|
activity: e,
|
|
2778
|
-
projectName:
|
|
2755
|
+
projectName: c,
|
|
2779
2756
|
entityType: m,
|
|
2780
2757
|
onReferenceClick: p,
|
|
2781
|
-
onReferenceTooltip:
|
|
2758
|
+
onReferenceTooltip: Pe,
|
|
2782
2759
|
children: void 0
|
|
2783
2760
|
}
|
|
2784
2761
|
),
|
|
2785
|
-
/* @__PURE__ */ x(
|
|
2786
|
-
!v && /* @__PURE__ */ x(
|
|
2787
|
-
Me && /* @__PURE__ */
|
|
2788
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ x(na, { className: ee("comment-body", { isEditing: be }), children: [
|
|
2763
|
+
!v && /* @__PURE__ */ x(oa, { className: "tools", children: [
|
|
2764
|
+
Me && /* @__PURE__ */ l(nn, { icon: "edit_square", onClick: Te, variant: "text" }),
|
|
2765
|
+
/* @__PURE__ */ l(
|
|
2789
2766
|
nn,
|
|
2790
2767
|
{
|
|
2791
2768
|
icon: "more_horiz",
|
|
2792
|
-
ref:
|
|
2769
|
+
ref: _,
|
|
2793
2770
|
onClick: (F) => {
|
|
2794
2771
|
F.stopPropagation(), R(we);
|
|
2795
2772
|
},
|
|
@@ -2797,13 +2774,13 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2797
2774
|
}
|
|
2798
2775
|
)
|
|
2799
2776
|
] }),
|
|
2800
|
-
be ? /* @__PURE__ */
|
|
2801
|
-
|
|
2777
|
+
be ? /* @__PURE__ */ l(
|
|
2778
|
+
Bn,
|
|
2802
2779
|
{
|
|
2803
2780
|
initValue: H,
|
|
2804
2781
|
initFiles: se,
|
|
2805
2782
|
annotationFrameStart: t,
|
|
2806
|
-
initCategory:
|
|
2783
|
+
initCategory: S?.name,
|
|
2807
2784
|
data: e.activityData,
|
|
2808
2785
|
activityId: W,
|
|
2809
2786
|
versionReview: !1,
|
|
@@ -2814,11 +2791,11 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2814
2791
|
...i
|
|
2815
2792
|
}
|
|
2816
2793
|
) : /* @__PURE__ */ x(Ae, { children: [
|
|
2817
|
-
/* @__PURE__ */
|
|
2818
|
-
|
|
2794
|
+
/* @__PURE__ */ l(
|
|
2795
|
+
_i,
|
|
2819
2796
|
{
|
|
2820
|
-
flags:
|
|
2821
|
-
category:
|
|
2797
|
+
flags: Ri({
|
|
2798
|
+
category: S,
|
|
2822
2799
|
categoryNotFound: Q,
|
|
2823
2800
|
frameLink: O,
|
|
2824
2801
|
formatFrame: K,
|
|
@@ -2828,14 +2805,14 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2828
2805
|
})
|
|
2829
2806
|
}
|
|
2830
2807
|
),
|
|
2831
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ l(vi, { children: /* @__PURE__ */ l(
|
|
2832
2809
|
xn,
|
|
2833
2810
|
{
|
|
2834
2811
|
remarkPlugins: [
|
|
2835
2812
|
Fn,
|
|
2836
2813
|
kn,
|
|
2837
2814
|
wo,
|
|
2838
|
-
|
|
2815
|
+
Qr,
|
|
2839
2816
|
xo
|
|
2840
2817
|
],
|
|
2841
2818
|
urlTransform: (F) => F,
|
|
@@ -2844,50 +2821,50 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2844
2821
|
// @ts-ignore
|
|
2845
2822
|
a: (F) => (
|
|
2846
2823
|
// @ts-ignore
|
|
2847
|
-
|
|
2824
|
+
ca(F, {
|
|
2848
2825
|
entityId: ne?.id ?? oe,
|
|
2849
2826
|
entityType: ne?.type ?? m,
|
|
2850
2827
|
userName: D,
|
|
2851
2828
|
userTeamNames: I,
|
|
2852
|
-
projectName:
|
|
2829
|
+
projectName: c,
|
|
2853
2830
|
onReferenceClick: p,
|
|
2854
|
-
onReferenceTooltip:
|
|
2831
|
+
onReferenceTooltip: Pe,
|
|
2855
2832
|
activityId: W,
|
|
2856
|
-
categoryPrimary:
|
|
2833
|
+
categoryPrimary: S?.color,
|
|
2857
2834
|
categorySecondary: Y.secondary,
|
|
2858
2835
|
onActivityLinkClick: Be
|
|
2859
2836
|
})
|
|
2860
2837
|
),
|
|
2861
2838
|
// checkbox inputs
|
|
2862
2839
|
// @ts-ignore
|
|
2863
|
-
input: (F) =>
|
|
2840
|
+
input: (F) => sa(F, { activity: e, onCheckChange: o }),
|
|
2864
2841
|
// code syntax highlighting
|
|
2865
2842
|
// eslint-disable-next-line
|
|
2866
2843
|
// @ts-ignore
|
|
2867
|
-
code: (F) =>
|
|
2844
|
+
code: (F) => ia(F),
|
|
2868
2845
|
// @ts-ignore
|
|
2869
|
-
blockquote: (F) =>
|
|
2846
|
+
blockquote: (F) => ra(F),
|
|
2870
2847
|
// @ts-ignore
|
|
2871
|
-
tip: (F) => /* @__PURE__ */ x(
|
|
2872
|
-
/* @__PURE__ */
|
|
2848
|
+
tip: (F) => /* @__PURE__ */ x(aa, { children: [
|
|
2849
|
+
/* @__PURE__ */ l(ie, { icon: "info" }),
|
|
2873
2850
|
F.children
|
|
2874
2851
|
] }),
|
|
2875
2852
|
// a video url on its own line is an embedded video
|
|
2876
2853
|
// @ts-ignore
|
|
2877
|
-
p: (F) =>
|
|
2854
|
+
p: (F) => Xa(F, { onOpen: w }) ?? Ka(F) ?? /* @__PURE__ */ l("p", { children: F.children }),
|
|
2878
2855
|
// @ts-ignore
|
|
2879
|
-
status: (F) => /* @__PURE__ */
|
|
2856
|
+
status: (F) => /* @__PURE__ */ l(ki, { name: F.id, statuses: y, children: F.children })
|
|
2880
2857
|
},
|
|
2881
2858
|
children: M
|
|
2882
2859
|
}
|
|
2883
2860
|
) }),
|
|
2884
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ l(
|
|
2885
2862
|
Mn,
|
|
2886
2863
|
{
|
|
2887
2864
|
files: Re,
|
|
2888
2865
|
isCompact: Re.length > 6,
|
|
2889
2866
|
activityId: W,
|
|
2890
|
-
projectName:
|
|
2867
|
+
projectName: c,
|
|
2891
2868
|
isDownloadable: !0,
|
|
2892
2869
|
onExpand: g,
|
|
2893
2870
|
onAnnotationClick: je,
|
|
@@ -2896,14 +2873,14 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2896
2873
|
}
|
|
2897
2874
|
)
|
|
2898
2875
|
] }),
|
|
2899
|
-
!be && /* @__PURE__ */
|
|
2900
|
-
|
|
2876
|
+
!be && /* @__PURE__ */ l("div", { style: { marginTop: "16px" }, children: He && /* @__PURE__ */ l(
|
|
2877
|
+
mi,
|
|
2901
2878
|
{
|
|
2902
2879
|
reactions: He,
|
|
2903
|
-
changeHandler:
|
|
2880
|
+
changeHandler: _e,
|
|
2904
2881
|
readOnly: v,
|
|
2905
|
-
category:
|
|
2906
|
-
categoryPrimary:
|
|
2882
|
+
category: S && !T ? S.name : void 0,
|
|
2883
|
+
categoryPrimary: S?.color,
|
|
2907
2884
|
categorySecondary: Y.secondary,
|
|
2908
2885
|
categoryTertiary: Y.primary
|
|
2909
2886
|
}
|
|
@@ -2912,17 +2889,17 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2912
2889
|
]
|
|
2913
2890
|
}
|
|
2914
2891
|
),
|
|
2915
|
-
/* @__PURE__ */
|
|
2916
|
-
|
|
2892
|
+
/* @__PURE__ */ l(
|
|
2893
|
+
ga,
|
|
2917
2894
|
{
|
|
2918
|
-
target:
|
|
2895
|
+
target: _.current,
|
|
2919
2896
|
id: we,
|
|
2920
2897
|
align: "right",
|
|
2921
2898
|
onClose: (F) => {
|
|
2922
2899
|
F?.stopPropagation(), R(!1);
|
|
2923
2900
|
},
|
|
2924
|
-
children: /* @__PURE__ */
|
|
2925
|
-
|
|
2901
|
+
children: /* @__PURE__ */ l(
|
|
2902
|
+
Li,
|
|
2926
2903
|
{
|
|
2927
2904
|
onDelete: Oe && n ? Ye : void 0,
|
|
2928
2905
|
onEdit: Me ? Te : void 0,
|
|
@@ -2930,14 +2907,14 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2930
2907
|
onDuplicate: r ? () => r(e) : void 0,
|
|
2931
2908
|
activityId: W,
|
|
2932
2909
|
onSelect: () => R(!1),
|
|
2933
|
-
projectName:
|
|
2910
|
+
projectName: c,
|
|
2934
2911
|
entity: ne ?? (oe ? { id: oe, type: m } : void 0)
|
|
2935
2912
|
}
|
|
2936
2913
|
)
|
|
2937
2914
|
}
|
|
2938
2915
|
)
|
|
2939
2916
|
] });
|
|
2940
|
-
},
|
|
2917
|
+
}, Oi = A.li`
|
|
2941
2918
|
list-style: none;
|
|
2942
2919
|
margin: 0;
|
|
2943
2920
|
padding: 0;
|
|
@@ -2947,7 +2924,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2947
2924
|
padding: 4px 8px;
|
|
2948
2925
|
border-radius: var(--border-radius-m);
|
|
2949
2926
|
user-select: none;
|
|
2950
|
-
`,
|
|
2927
|
+
`, Vi = A.div`
|
|
2951
2928
|
display: flex;
|
|
2952
2929
|
flex-wrap: wrap;
|
|
2953
2930
|
align-items: center;
|
|
@@ -2970,10 +2947,10 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2970
2947
|
font-size: 12px;
|
|
2971
2948
|
font-weight: 800;
|
|
2972
2949
|
}
|
|
2973
|
-
`,
|
|
2950
|
+
`, ji = (e, t) => {
|
|
2974
2951
|
let o = [], n = {};
|
|
2975
2952
|
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;
|
|
2976
|
-
},
|
|
2953
|
+
}, Ui = A.div`
|
|
2977
2954
|
display: inline-flex;
|
|
2978
2955
|
align-items: center;
|
|
2979
2956
|
gap: var(--base-gap-small);
|
|
@@ -2982,7 +2959,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2982
2959
|
font-variation-settings: 'FILL' 1;
|
|
2983
2960
|
font-size: 16px;
|
|
2984
2961
|
}
|
|
2985
|
-
`,
|
|
2962
|
+
`, zi = A.span`
|
|
2986
2963
|
color: var(--md-sys-color-outline);
|
|
2987
2964
|
font-size: 12px;
|
|
2988
2965
|
max-width: 300px;
|
|
@@ -2992,37 +2969,37 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
2992
2969
|
span {
|
|
2993
2970
|
font-size: inherit;
|
|
2994
2971
|
}
|
|
2995
|
-
`,
|
|
2996
|
-
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(
|
|
2997
|
-
e && /* @__PURE__ */
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
2972
|
+
`, Pt = ht(
|
|
2973
|
+
({ icon: e, color: t, name: o, items: n, ...a }, r) => /* @__PURE__ */ x(Ui, { ...a, ref: r, children: [
|
|
2974
|
+
e && /* @__PURE__ */ l(ie, { icon: e, style: { color: t } }),
|
|
2975
|
+
/* @__PURE__ */ l(zi, { title: o, children: n ? n.map((s, i) => /* @__PURE__ */ x(bo, { children: [
|
|
2976
|
+
/* @__PURE__ */ l("span", { style: { color: s.color }, children: s.label }),
|
|
3000
2977
|
i < n.length - 1 && ", "
|
|
3001
2978
|
] }, i)) : o })
|
|
3002
2979
|
] })
|
|
3003
|
-
),
|
|
2980
|
+
), Bi = (e) => {
|
|
3004
2981
|
const t = typeof e.icon == "string" ? e.icon : e.icon?.name, o = e.color ?? (typeof e.icon == "object" ? e.icon?.color : void 0);
|
|
3005
2982
|
return { name: e.label, icon: t, color: o };
|
|
3006
|
-
},
|
|
2983
|
+
}, Gi = (e, t) => {
|
|
3007
2984
|
const o = t?.data.enum?.find((n) => n.value === e)?.label;
|
|
3008
2985
|
if (o) return o;
|
|
3009
2986
|
if (t?.data.type === "datetime") {
|
|
3010
2987
|
const n = new Date(String(e));
|
|
3011
|
-
if (!isNaN(n.getTime())) return
|
|
2988
|
+
if (!isNaN(n.getTime())) return da(n, "dd-MM-yyyy");
|
|
3012
2989
|
}
|
|
3013
2990
|
return String(e);
|
|
3014
|
-
},
|
|
2991
|
+
}, Hi = (e, t) => e === "description" || t?.data.widget === "markdown", qi = (e, t, o) => {
|
|
3015
2992
|
if (e == null || e === "" || Array.isArray(e) && !e.length) return { name: "none" };
|
|
3016
|
-
if (typeof e == "string" &&
|
|
3017
|
-
return { name:
|
|
2993
|
+
if (typeof e == "string" && Hi(o, t))
|
|
2994
|
+
return { name: Za(e) || "none" };
|
|
3018
2995
|
if (t?.data.type === "boolean") return { name: e ? "Checked" : "Unchecked" };
|
|
3019
2996
|
const a = Array.isArray(e) ? e : [e];
|
|
3020
2997
|
if (a.length === 1) {
|
|
3021
2998
|
const r = t?.data.enum?.find((s) => s.value === a[0]);
|
|
3022
|
-
if (r) return
|
|
2999
|
+
if (r) return Bi(r);
|
|
3023
3000
|
}
|
|
3024
|
-
return { name: a.map((r) =>
|
|
3025
|
-
},
|
|
3001
|
+
return { name: a.map((r) => Gi(r, t)).join(", ") };
|
|
3002
|
+
}, Wi = ({
|
|
3026
3003
|
entityType: e,
|
|
3027
3004
|
projectInfo: t,
|
|
3028
3005
|
activity: o = {}
|
|
@@ -3033,37 +3010,37 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3033
3010
|
authorFullName: r,
|
|
3034
3011
|
createdAt: s,
|
|
3035
3012
|
oldStatus: i,
|
|
3036
|
-
newStatus:
|
|
3013
|
+
newStatus: c,
|
|
3037
3014
|
activityData: m = {}
|
|
3038
|
-
} = o, { key: p, oldValue: g, newValue: u } = m, h =
|
|
3039
|
-
name:
|
|
3040
|
-
icon:
|
|
3041
|
-
color:
|
|
3042
|
-
}), T = (
|
|
3043
|
-
const Q = Array.isArray(
|
|
3015
|
+
} = o, { key: p, oldValue: g, newValue: u } = m, h = ji(o, e), v = n === "attrib.change", y = n === "tags.change", D = n === "subtype.change", { data: P = [] } = Da(void 0, { skip: !v }), C = N(() => P.find((S) => S.name === p), [P, p]), f = v ? C?.data.title || p : y ? "Tags" : D ? "Type" : void 0, b = (S) => ({
|
|
3016
|
+
name: S?.name || "",
|
|
3017
|
+
icon: S?.icon,
|
|
3018
|
+
color: S?.color
|
|
3019
|
+
}), T = (S) => {
|
|
3020
|
+
const Q = Array.isArray(S) ? S.map(String) : [];
|
|
3044
3021
|
if (!Q.length) return { name: "none" };
|
|
3045
3022
|
const Y = Q.map((H) => ({
|
|
3046
3023
|
label: H,
|
|
3047
3024
|
color: t?.tags?.find((J) => J.name === H)?.color
|
|
3048
3025
|
}));
|
|
3049
3026
|
return { name: Q.join(", "), items: Y };
|
|
3050
|
-
}, I = n === "status.change",
|
|
3051
|
-
return /* @__PURE__ */ x(
|
|
3052
|
-
/* @__PURE__ */ x(
|
|
3053
|
-
/* @__PURE__ */
|
|
3027
|
+
}, I = n === "status.change", _ = (S, Q) => I ? b(Q) : y ? T(S) : qi(S, C, p), R = _(g, i), E = _(u, c);
|
|
3028
|
+
return /* @__PURE__ */ x(Oi, { children: [
|
|
3029
|
+
/* @__PURE__ */ x(Vi, { children: [
|
|
3030
|
+
/* @__PURE__ */ l(Dt, { children: r || a }),
|
|
3054
3031
|
/* @__PURE__ */ x(Dt, { children: [
|
|
3055
3032
|
"- ",
|
|
3056
3033
|
h.join(" / "),
|
|
3057
3034
|
" -"
|
|
3058
3035
|
] }),
|
|
3059
|
-
f && /* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3036
|
+
f && /* @__PURE__ */ l(Dt, { children: /* @__PURE__ */ l("strong", { children: f }) }),
|
|
3037
|
+
/* @__PURE__ */ l(Pt, { ...R }),
|
|
3038
|
+
/* @__PURE__ */ l(ie, { icon: "trending_flat" }),
|
|
3039
|
+
/* @__PURE__ */ l(Pt, { ...E })
|
|
3063
3040
|
] }),
|
|
3064
|
-
/* @__PURE__ */
|
|
3041
|
+
/* @__PURE__ */ l(dt, { date: s })
|
|
3065
3042
|
] });
|
|
3066
|
-
},
|
|
3043
|
+
}, Qi = A.li`
|
|
3067
3044
|
/* reset default */
|
|
3068
3045
|
list-style: none;
|
|
3069
3046
|
margin: 0;
|
|
@@ -3076,7 +3053,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3076
3053
|
padding: 4px 8px;
|
|
3077
3054
|
border-radius: var(--border-radius-m);
|
|
3078
3055
|
user-select: none;
|
|
3079
|
-
`,
|
|
3056
|
+
`, Yi = A.div`
|
|
3080
3057
|
display: flex;
|
|
3081
3058
|
flex-wrap: nowrap;
|
|
3082
3059
|
align-items: start;
|
|
@@ -3084,18 +3061,18 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3084
3061
|
gap: var(--base-gap-small);
|
|
3085
3062
|
padding: 0px 4px;
|
|
3086
3063
|
overflow: hidden;
|
|
3087
|
-
`,
|
|
3064
|
+
`, Ji = A.span`
|
|
3088
3065
|
color: var(--md-sys-color-outline);
|
|
3089
3066
|
white-space: wrap;
|
|
3090
3067
|
font-size: 12px;
|
|
3091
3068
|
`, hn = ({ activity: e, isAdding: t }) => {
|
|
3092
3069
|
const { authorFullName: o, createdAt: n, activityData: a, authorName: r } = e || {}, { assignee: s } = a || {};
|
|
3093
3070
|
let i = o || r;
|
|
3094
|
-
return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */
|
|
3095
|
-
/* @__PURE__ */
|
|
3096
|
-
/* @__PURE__ */
|
|
3071
|
+
return i += t ? " added " : " removed ", i += "assignee: " + s, /* @__PURE__ */ l(Qi, { children: /* @__PURE__ */ x(Yi, { children: [
|
|
3072
|
+
/* @__PURE__ */ l(Ji, { children: i }),
|
|
3073
|
+
/* @__PURE__ */ l(dt, { date: n })
|
|
3097
3074
|
] }) });
|
|
3098
|
-
},
|
|
3075
|
+
}, Xi = A.li`
|
|
3099
3076
|
/* reset default */
|
|
3100
3077
|
list-style: none;
|
|
3101
3078
|
margin: 0;
|
|
@@ -3107,7 +3084,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3107
3084
|
|
|
3108
3085
|
width: 100%;
|
|
3109
3086
|
padding: 8px;
|
|
3110
|
-
`,
|
|
3087
|
+
`, Ki = A.div`
|
|
3111
3088
|
border-radius: var(--border-radius-m);
|
|
3112
3089
|
padding: var(--padding-m);
|
|
3113
3090
|
|
|
@@ -3123,7 +3100,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3123
3100
|
display: inline;
|
|
3124
3101
|
}
|
|
3125
3102
|
}
|
|
3126
|
-
`,
|
|
3103
|
+
`, Zi = A.div`
|
|
3127
3104
|
display: flex;
|
|
3128
3105
|
flex-direction: row;
|
|
3129
3106
|
justify-content: space-between;
|
|
@@ -3161,7 +3138,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3161
3138
|
display: none;
|
|
3162
3139
|
flex: 1;
|
|
3163
3140
|
}
|
|
3164
|
-
`,
|
|
3141
|
+
`, es = A(Ra)`
|
|
3165
3142
|
width: 74px;
|
|
3166
3143
|
min-width: 74px;
|
|
3167
3144
|
height: unset;
|
|
@@ -3175,17 +3152,17 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3175
3152
|
img {
|
|
3176
3153
|
object-fit: cover;
|
|
3177
3154
|
}
|
|
3178
|
-
`,
|
|
3155
|
+
`, ts = A.span`
|
|
3179
3156
|
overflow: hidden;
|
|
3180
3157
|
text-overflow: ellipsis;
|
|
3181
3158
|
white-space: nowrap;
|
|
3182
3159
|
display: block;
|
|
3183
3160
|
min-width: 0;
|
|
3184
|
-
`,
|
|
3161
|
+
`, ns = A.div`
|
|
3185
3162
|
margin-top: var(--base-gap-small);
|
|
3186
3163
|
color: var(--md-sys-color-outline);
|
|
3187
3164
|
word-break: break-word;
|
|
3188
|
-
`,
|
|
3165
|
+
`, os = A.li`
|
|
3189
3166
|
/* reset default */
|
|
3190
3167
|
list-style: none;
|
|
3191
3168
|
margin: 0;
|
|
@@ -3214,7 +3191,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3214
3191
|
&:hover {
|
|
3215
3192
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
3216
3193
|
}
|
|
3217
|
-
`,
|
|
3194
|
+
`, as = ({
|
|
3218
3195
|
activity: e,
|
|
3219
3196
|
projectName: t,
|
|
3220
3197
|
entityType: o,
|
|
@@ -3222,15 +3199,15 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3222
3199
|
filter: a,
|
|
3223
3200
|
statuses: r = []
|
|
3224
3201
|
}) => {
|
|
3225
|
-
const { onOpenViewer: s } =
|
|
3226
|
-
let { authorName: i, authorFullName:
|
|
3227
|
-
const g = a === "versions" || a && typeof a == "object" && a.conditions?.some((C) => C.key === "versions" && C.value === !0), [u, h] =
|
|
3228
|
-
return /* @__PURE__ */ x(
|
|
3229
|
-
/* @__PURE__ */
|
|
3202
|
+
const { onOpenViewer: s } = ze();
|
|
3203
|
+
let { authorName: i, authorFullName: c, createdAt: m, versions: p = [] } = e;
|
|
3204
|
+
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__ */ x(Xi, { children: [
|
|
3206
|
+
/* @__PURE__ */ l(
|
|
3230
3207
|
Wn,
|
|
3231
3208
|
{
|
|
3232
3209
|
name: i,
|
|
3233
|
-
fullName:
|
|
3210
|
+
fullName: c || i,
|
|
3234
3211
|
date: m,
|
|
3235
3212
|
activity: e,
|
|
3236
3213
|
projectName: t,
|
|
@@ -3239,29 +3216,29 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3239
3216
|
}
|
|
3240
3217
|
),
|
|
3241
3218
|
p.flatMap((C, f) => {
|
|
3242
|
-
const { name: b, id: T, productId: I, productName:
|
|
3243
|
-
return (f < v || u) && /* @__PURE__ */ x(
|
|
3244
|
-
/* @__PURE__ */ x(
|
|
3219
|
+
const { name: b, id: T, productId: I, productName: _, thumbnailHash: R, comment: E } = C, S = r.find((Q) => Q.name === C.status);
|
|
3220
|
+
return (f < v || u) && /* @__PURE__ */ x(Ki, { onClick: () => P(T, I), children: [
|
|
3221
|
+
/* @__PURE__ */ x(Zi, { children: [
|
|
3245
3222
|
/* @__PURE__ */ x("div", { children: [
|
|
3246
3223
|
/* @__PURE__ */ x(fn, { children: [
|
|
3247
|
-
/* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3224
|
+
/* @__PURE__ */ l("span", { children: _ }),
|
|
3225
|
+
/* @__PURE__ */ l(dt, { date: m, isExact: !0 })
|
|
3249
3226
|
] }),
|
|
3250
3227
|
/* @__PURE__ */ x(fn, { children: [
|
|
3251
|
-
/* @__PURE__ */
|
|
3228
|
+
/* @__PURE__ */ l(ts, { className: "version", children: b }),
|
|
3252
3229
|
" -",
|
|
3253
|
-
/* @__PURE__ */
|
|
3254
|
-
|
|
3230
|
+
/* @__PURE__ */ l(
|
|
3231
|
+
Pt,
|
|
3255
3232
|
{
|
|
3256
|
-
icon:
|
|
3257
|
-
color:
|
|
3258
|
-
name:
|
|
3233
|
+
icon: S?.icon,
|
|
3234
|
+
color: S?.color,
|
|
3235
|
+
name: S?.name || ""
|
|
3259
3236
|
}
|
|
3260
3237
|
)
|
|
3261
3238
|
] })
|
|
3262
3239
|
] }),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
|
|
3240
|
+
/* @__PURE__ */ l(
|
|
3241
|
+
es,
|
|
3265
3242
|
{
|
|
3266
3243
|
projectName: t,
|
|
3267
3244
|
entityId: T,
|
|
@@ -3273,24 +3250,24 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3273
3250
|
}
|
|
3274
3251
|
)
|
|
3275
3252
|
] }),
|
|
3276
|
-
E && /* @__PURE__ */
|
|
3253
|
+
E && /* @__PURE__ */ l(ns, { children: E })
|
|
3277
3254
|
] }, T);
|
|
3278
3255
|
}),
|
|
3279
3256
|
!g && p.length > v && /* @__PURE__ */ x(Qn, { onClick: () => h(!u), children: [
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ l(ie, { icon: "more" }),
|
|
3258
|
+
/* @__PURE__ */ l("span", { children: u ? "Show less" : `Show ${p.length - v} more versions` })
|
|
3282
3259
|
] })
|
|
3283
3260
|
] });
|
|
3284
|
-
},
|
|
3285
|
-
const [n, a] =
|
|
3261
|
+
}, rs = ({ activities: e, editProps: t, ...o }) => {
|
|
3262
|
+
const [n, a] = L(!1);
|
|
3286
3263
|
return /* @__PURE__ */ x(Ae, { children: [
|
|
3287
|
-
/* @__PURE__ */
|
|
3288
|
-
/* @__PURE__ */
|
|
3264
|
+
/* @__PURE__ */ l(os, { children: /* @__PURE__ */ x(Qn, { onClick: () => a(!n), children: [
|
|
3265
|
+
/* @__PURE__ */ l(ie, { icon: n ? "expand_less" : "chevron_right" }),
|
|
3289
3266
|
n ? "Show less" : "Show more"
|
|
3290
3267
|
] }) }),
|
|
3291
3268
|
n && e.map((r) => (
|
|
3292
3269
|
// @ts-expect-error
|
|
3293
|
-
/* @__PURE__ */
|
|
3270
|
+
/* @__PURE__ */ l(
|
|
3294
3271
|
Yn,
|
|
3295
3272
|
{
|
|
3296
3273
|
editProps: t,
|
|
@@ -3311,7 +3288,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3311
3288
|
editProps: r,
|
|
3312
3289
|
filter: s,
|
|
3313
3290
|
readOnly: i,
|
|
3314
|
-
statuses:
|
|
3291
|
+
statuses: c,
|
|
3315
3292
|
isSlideOut: m,
|
|
3316
3293
|
isGuest: p,
|
|
3317
3294
|
...g
|
|
@@ -3320,15 +3297,15 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3320
3297
|
case "comment":
|
|
3321
3298
|
return (
|
|
3322
3299
|
// @ts-expect-error
|
|
3323
|
-
/* @__PURE__ */
|
|
3324
|
-
|
|
3300
|
+
/* @__PURE__ */ l(
|
|
3301
|
+
$i,
|
|
3325
3302
|
{
|
|
3326
3303
|
activity: e,
|
|
3327
3304
|
annotationFrameStart: o,
|
|
3328
3305
|
projectInfo: n,
|
|
3329
3306
|
editProps: r,
|
|
3330
3307
|
readOnly: i,
|
|
3331
|
-
statuses:
|
|
3308
|
+
statuses: c,
|
|
3332
3309
|
isSlideOut: m,
|
|
3333
3310
|
...g
|
|
3334
3311
|
}
|
|
@@ -3338,18 +3315,18 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3338
3315
|
case "attrib.change":
|
|
3339
3316
|
case "tags.change":
|
|
3340
3317
|
case "subtype.change":
|
|
3341
|
-
return /* @__PURE__ */
|
|
3318
|
+
return /* @__PURE__ */ l(Wi, { activity: e, projectInfo: n, ...g });
|
|
3342
3319
|
case "assignee.add":
|
|
3343
|
-
return /* @__PURE__ */
|
|
3320
|
+
return /* @__PURE__ */ l(hn, { activity: e, ...g, isAdding: !0 });
|
|
3344
3321
|
case "assignee.remove":
|
|
3345
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ l(hn, { activity: e, ...g });
|
|
3346
3323
|
case "version.publish":
|
|
3347
|
-
return /* @__PURE__ */
|
|
3324
|
+
return /* @__PURE__ */ l(as, { activity: e, projectInfo: n, filter: s, statuses: c, ...g });
|
|
3348
3325
|
case "version.review":
|
|
3349
|
-
return /* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ l(Pi, { activity: e, isGuest: p, ...g });
|
|
3350
3327
|
case "group":
|
|
3351
|
-
return !t && /* @__PURE__ */
|
|
3352
|
-
|
|
3328
|
+
return !t && /* @__PURE__ */ l(
|
|
3329
|
+
rs,
|
|
3353
3330
|
{
|
|
3354
3331
|
editProps: r,
|
|
3355
3332
|
activities: e.items || [],
|
|
@@ -3360,7 +3337,7 @@ const _i = "anonymous.guest", Pi = "Anonymous User", Ri = "unknown.user", qn = (
|
|
|
3360
3337
|
default:
|
|
3361
3338
|
return null;
|
|
3362
3339
|
}
|
|
3363
|
-
},
|
|
3340
|
+
}, is = A.section`
|
|
3364
3341
|
padding-bottom: 4px;
|
|
3365
3342
|
overflow: hidden;
|
|
3366
3343
|
position: relative;
|
|
@@ -3408,7 +3385,7 @@ A.div`
|
|
|
3408
3385
|
color: inherit;
|
|
3409
3386
|
}
|
|
3410
3387
|
`;
|
|
3411
|
-
const
|
|
3388
|
+
const ss = A.ul`
|
|
3412
3389
|
gap: var(--base-gap-large);
|
|
3413
3390
|
overflow-y: auto;
|
|
3414
3391
|
padding: 24px 0;
|
|
@@ -3429,11 +3406,11 @@ const ds = A.ul`
|
|
|
3429
3406
|
& > *:last-child {
|
|
3430
3407
|
margin-top: 32px;
|
|
3431
3408
|
}
|
|
3432
|
-
`,
|
|
3409
|
+
`, cs = A.span`
|
|
3433
3410
|
padding: 16px 8px;
|
|
3434
3411
|
color: var(--md-sys-color-outline);
|
|
3435
3412
|
font-size: 11px;
|
|
3436
|
-
`,
|
|
3413
|
+
`, ls = A.div`
|
|
3437
3414
|
height: 50px;
|
|
3438
3415
|
border-radius: 8px;
|
|
3439
3416
|
overflow: hidden;
|
|
@@ -3441,7 +3418,7 @@ const ds = A.ul`
|
|
|
3441
3418
|
opacity: 0.5;
|
|
3442
3419
|
|
|
3443
3420
|
position: relative;
|
|
3444
|
-
`,
|
|
3421
|
+
`, ds = ({
|
|
3445
3422
|
projectName: e,
|
|
3446
3423
|
entityType: t,
|
|
3447
3424
|
entities: o = [],
|
|
@@ -3452,17 +3429,17 @@ const ds = A.ul`
|
|
|
3452
3429
|
createEntityActivity: r,
|
|
3453
3430
|
updateActivity: s,
|
|
3454
3431
|
deleteActivity: i,
|
|
3455
|
-
isUpdatingActivity:
|
|
3432
|
+
isUpdatingActivity: c,
|
|
3456
3433
|
userName: m,
|
|
3457
3434
|
userFullName: p,
|
|
3458
3435
|
activityTypes: g
|
|
3459
|
-
} =
|
|
3436
|
+
} = $e(), u = o.map((C) => C.id), h = ({
|
|
3460
3437
|
entityId: C,
|
|
3461
3438
|
newId: f,
|
|
3462
3439
|
subTitle: b,
|
|
3463
3440
|
value: T,
|
|
3464
3441
|
files: I = [],
|
|
3465
|
-
data:
|
|
3442
|
+
data: _ = {}
|
|
3466
3443
|
}) => ({
|
|
3467
3444
|
body: T,
|
|
3468
3445
|
activityType: "comment",
|
|
@@ -3471,10 +3448,10 @@ const ds = A.ul`
|
|
|
3471
3448
|
referenceType: "origin",
|
|
3472
3449
|
authorName: m,
|
|
3473
3450
|
authorFullName: p,
|
|
3474
|
-
createdAt:
|
|
3451
|
+
createdAt: Ga(/* @__PURE__ */ new Date()),
|
|
3475
3452
|
files: I,
|
|
3476
3453
|
reactions: [],
|
|
3477
|
-
activityData:
|
|
3454
|
+
activityData: _,
|
|
3478
3455
|
origin: {
|
|
3479
3456
|
id: "8090c2dafcc811eeaf820242c0a80002",
|
|
3480
3457
|
type: t,
|
|
@@ -3488,17 +3465,17 @@ const ds = A.ul`
|
|
|
3488
3465
|
return {
|
|
3489
3466
|
submitComment: async (C, f = [], b = {}) => {
|
|
3490
3467
|
const T = o.map(({ id: R, subTitle: E }) => {
|
|
3491
|
-
const
|
|
3468
|
+
const S = sn(), Q = f.map((te) => te.id), Y = a ? { ...b, entityList: a } : b, H = {
|
|
3492
3469
|
body: C,
|
|
3493
3470
|
activityType: "comment",
|
|
3494
|
-
id:
|
|
3471
|
+
id: S,
|
|
3495
3472
|
files: Q,
|
|
3496
3473
|
data: Y
|
|
3497
3474
|
}, J = f.filter(
|
|
3498
3475
|
({ id: te }) => !b.annotations?.some(
|
|
3499
3476
|
(oe) => oe.transparent === te
|
|
3500
3477
|
)
|
|
3501
|
-
), q = h({ entityId: R, newId:
|
|
3478
|
+
), q = h({ entityId: R, newId: S, subTitle: E, value: C, files: J, data: b });
|
|
3502
3479
|
return r({
|
|
3503
3480
|
projectName: e,
|
|
3504
3481
|
entityType: t,
|
|
@@ -3508,35 +3485,35 @@ const ds = A.ul`
|
|
|
3508
3485
|
filter: n,
|
|
3509
3486
|
...{ entityIds: u, activityTypes: g }
|
|
3510
3487
|
});
|
|
3511
|
-
}),
|
|
3512
|
-
if (
|
|
3513
|
-
const R = on(
|
|
3488
|
+
}), _ = (await Promise.all(T)).filter((R) => R.error);
|
|
3489
|
+
if (_.length > 0) {
|
|
3490
|
+
const R = on(_[0].error) || "Failed to create comment";
|
|
3514
3491
|
throw Fe.error(R), new Error(R);
|
|
3515
3492
|
}
|
|
3516
3493
|
},
|
|
3517
3494
|
updateComment: async (C, f, b = [], T = {}) => {
|
|
3518
|
-
const I = b.map((
|
|
3495
|
+
const I = b.map((S) => S.id), _ = {
|
|
3519
3496
|
body: f,
|
|
3520
3497
|
files: I,
|
|
3521
3498
|
data: T
|
|
3522
3499
|
}, R = {
|
|
3523
3500
|
...C,
|
|
3524
|
-
...
|
|
3501
|
+
..._,
|
|
3525
3502
|
files: b,
|
|
3526
3503
|
activityData: T
|
|
3527
3504
|
}, E = { entityType: t, entityIds: u, activityTypes: g };
|
|
3528
3505
|
try {
|
|
3529
3506
|
await s({
|
|
3530
3507
|
projectName: e,
|
|
3531
|
-
data:
|
|
3508
|
+
data: _,
|
|
3532
3509
|
activityId: C.activityId,
|
|
3533
3510
|
entityId: C.entityId,
|
|
3534
3511
|
patch: R,
|
|
3535
3512
|
filter: n,
|
|
3536
3513
|
...E
|
|
3537
3514
|
});
|
|
3538
|
-
} catch (
|
|
3539
|
-
throw Fe.error(on(
|
|
3515
|
+
} catch (S) {
|
|
3516
|
+
throw Fe.error(on(S)), S;
|
|
3540
3517
|
}
|
|
3541
3518
|
},
|
|
3542
3519
|
deleteComment: async (C, f, b = []) => {
|
|
@@ -3557,12 +3534,12 @@ const ds = A.ul`
|
|
|
3557
3534
|
},
|
|
3558
3535
|
submitReview: async (C) => {
|
|
3559
3536
|
const f = o.map(({ id: b, subTitle: T }) => {
|
|
3560
|
-
const I = sn(),
|
|
3561
|
-
body:
|
|
3537
|
+
const I = sn(), _ = { feedback: C, entityList: a }, R = {
|
|
3538
|
+
body: Jr(C, t),
|
|
3562
3539
|
activityType: "version.review",
|
|
3563
3540
|
id: I,
|
|
3564
|
-
data:
|
|
3565
|
-
}, E = h({ entityId: b, newId: I, subTitle: T, value: "", data:
|
|
3541
|
+
data: _
|
|
3542
|
+
}, E = h({ entityId: b, newId: I, subTitle: T, value: "", data: _ });
|
|
3566
3543
|
return r({
|
|
3567
3544
|
projectName: e,
|
|
3568
3545
|
entityType: t,
|
|
@@ -3574,18 +3551,18 @@ const ds = A.ul`
|
|
|
3574
3551
|
});
|
|
3575
3552
|
await Promise.all(f);
|
|
3576
3553
|
},
|
|
3577
|
-
isSaving:
|
|
3554
|
+
isSaving: c
|
|
3578
3555
|
};
|
|
3579
|
-
},
|
|
3556
|
+
}, St = (e = {}) => {
|
|
3580
3557
|
const {
|
|
3581
3558
|
updatedAt: t,
|
|
3582
3559
|
createdAt: o,
|
|
3583
3560
|
origin: n = {},
|
|
3584
3561
|
activityData: { context: { productName: a, productType: r, productId: s } = {} } = {},
|
|
3585
3562
|
version: i
|
|
3586
|
-
} = e, { name:
|
|
3563
|
+
} = e, { name: c, id: m } = n;
|
|
3587
3564
|
return {
|
|
3588
|
-
name:
|
|
3565
|
+
name: c,
|
|
3589
3566
|
id: m,
|
|
3590
3567
|
productId: s,
|
|
3591
3568
|
productName: a,
|
|
@@ -3596,7 +3573,7 @@ const ds = A.ul`
|
|
|
3596
3573
|
status: i?.status,
|
|
3597
3574
|
thumbnailHash: i?.thumbnailHash
|
|
3598
3575
|
};
|
|
3599
|
-
},
|
|
3576
|
+
}, us = 5, ms = (e = []) => {
|
|
3600
3577
|
const t = [];
|
|
3601
3578
|
let o = null;
|
|
3602
3579
|
for (const n of e) {
|
|
@@ -3605,29 +3582,29 @@ const ds = A.ul`
|
|
|
3605
3582
|
continue;
|
|
3606
3583
|
}
|
|
3607
3584
|
if (!o) {
|
|
3608
|
-
o = { ...n }, o.versions = [
|
|
3585
|
+
o = { ...n }, o.versions = [St(n)];
|
|
3609
3586
|
continue;
|
|
3610
3587
|
}
|
|
3611
|
-
const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, i =
|
|
3588
|
+
const a = o.authorName === n.authorName, r = o.origin.id === n.origin.id, i = Ha(
|
|
3612
3589
|
new Date(o.createdAt),
|
|
3613
3590
|
new Date(n.createdAt)
|
|
3614
|
-
) <=
|
|
3591
|
+
) <= us;
|
|
3615
3592
|
if (a && i && r) {
|
|
3616
|
-
o.versions.push(
|
|
3593
|
+
o.versions.push(St(n));
|
|
3617
3594
|
continue;
|
|
3618
3595
|
} else {
|
|
3619
|
-
t.push(o), o = { ...n }, o.versions = [
|
|
3596
|
+
t.push(o), o = { ...n }, o.versions = [St(n)];
|
|
3620
3597
|
continue;
|
|
3621
3598
|
}
|
|
3622
3599
|
}
|
|
3623
3600
|
return o && t.push(o), t;
|
|
3624
|
-
},
|
|
3601
|
+
}, ps = (e, t) => {
|
|
3625
3602
|
let o = {};
|
|
3626
|
-
t.reduce((i,
|
|
3603
|
+
t.reduce((i, c) => (i[c.name] = c, i), o);
|
|
3627
3604
|
const n = [];
|
|
3628
3605
|
let a = [];
|
|
3629
3606
|
const r = (i) => {
|
|
3630
|
-
const
|
|
3607
|
+
const c = (h) => ["assignee.add", "assignee.remove"].includes(h[0].activityType) ? [
|
|
3631
3608
|
{
|
|
3632
3609
|
...h[0],
|
|
3633
3610
|
activityType: h[0].activityType,
|
|
@@ -3646,9 +3623,9 @@ const ds = A.ul`
|
|
|
3646
3623
|
] : h;
|
|
3647
3624
|
let m = [], p = [], g = null, u = null;
|
|
3648
3625
|
return i.forEach((h) => {
|
|
3649
|
-
g === null || g === h.activityType && u == h.authorName ? p.push(h) : (m.push(...
|
|
3650
|
-
}), p.length != 0 && m.push(...
|
|
3651
|
-
}, s = (i,
|
|
3626
|
+
g === null || g === h.activityType && u == h.authorName ? p.push(h) : (m.push(...c(p)), p = [h]), g = h.activityType, u = h.authorName;
|
|
3627
|
+
}), p.length != 0 && m.push(...c(p)), m;
|
|
3628
|
+
}, s = (i, c) => {
|
|
3652
3629
|
if (a.length > 2) {
|
|
3653
3630
|
if (i) {
|
|
3654
3631
|
const m = a[0].activityData.assignee;
|
|
@@ -3663,17 +3640,17 @@ const ds = A.ul`
|
|
|
3663
3640
|
n.push({
|
|
3664
3641
|
activityType: "group",
|
|
3665
3642
|
items: r(i ? a.slice(1) : a),
|
|
3666
|
-
activityId: "group-" +
|
|
3643
|
+
activityId: "group-" + c
|
|
3667
3644
|
});
|
|
3668
3645
|
} else a.length > 0 && a.forEach((m) => n.push(m));
|
|
3669
3646
|
a = [];
|
|
3670
3647
|
};
|
|
3671
3648
|
for (const i of e)
|
|
3672
|
-
if (
|
|
3649
|
+
if (gs.includes(i.activityType))
|
|
3673
3650
|
a.push(i);
|
|
3674
3651
|
else {
|
|
3675
|
-
const
|
|
3676
|
-
s(
|
|
3652
|
+
const c = n.length === 0;
|
|
3653
|
+
s(c, n.length), n.push(i);
|
|
3677
3654
|
}
|
|
3678
3655
|
return a.length > 0 && s(!1, n.length), n;
|
|
3679
3656
|
}, yn = (e, t, o = "oldValue") => {
|
|
@@ -3685,61 +3662,61 @@ const ds = A.ul`
|
|
|
3685
3662
|
a = { ...s }, r = new Date(s.createdAt);
|
|
3686
3663
|
continue;
|
|
3687
3664
|
}
|
|
3688
|
-
const i = a.authorName === s.authorName,
|
|
3689
|
-
i && u &&
|
|
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 && ct(r) && ct(p) && Math.abs(qa(r, p)) <= 20;
|
|
3666
|
+
i && u && c && m ? (s[o] !== void 0 && (a[o] = s[o]), a.activityData = {
|
|
3690
3667
|
...a.activityData,
|
|
3691
3668
|
oldValue: s.activityData.oldValue
|
|
3692
3669
|
}, a.hasPreviousPage = s.hasPreviousPage, a.cursor = s.cursor, r = p) : (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = { ...s }, r = p);
|
|
3693
3670
|
} else
|
|
3694
3671
|
a && (a.activityData.oldValue !== a.activityData.newValue && n.push(a), a = null, r = null), n.push(s);
|
|
3695
3672
|
return a && a.activityData.oldValue !== a.activityData.newValue && !n.some((s) => s.activityId === a.activityId) && n.push(a), n;
|
|
3696
|
-
},
|
|
3673
|
+
}, gs = [
|
|
3697
3674
|
"status.change",
|
|
3698
3675
|
"assignee.add",
|
|
3699
3676
|
"assignee.remove",
|
|
3700
3677
|
"attrib.change",
|
|
3701
3678
|
"tags.change",
|
|
3702
3679
|
"subtype.change"
|
|
3703
|
-
],
|
|
3680
|
+
], hs = (e = [], t = {}) => e.map((o) => {
|
|
3704
3681
|
const n = { ...o, origin: { ...o.origin } };
|
|
3705
3682
|
if (n.activityType === "status.change") {
|
|
3706
3683
|
if (!t) return n;
|
|
3707
|
-
const a = n.activityData?.oldValue, r = n.activityData?.newValue, s = t.statuses?.find((
|
|
3684
|
+
const a = n.activityData?.oldValue, r = n.activityData?.newValue, s = t.statuses?.find((c) => c.name === a), i = t.statuses?.find((c) => c.name === r);
|
|
3708
3685
|
n.oldStatus = { ...s, name: a }, n.newStatus = { ...i, name: r };
|
|
3709
3686
|
}
|
|
3710
3687
|
return n;
|
|
3711
|
-
}),
|
|
3712
|
-
const s =
|
|
3713
|
-
() =>
|
|
3688
|
+
}), fs = (e = [], t = [], o) => t.includes(o) ? e.filter((n) => n.referenceType !== "relation") : e, ys = (e = [], t = [], o = {}, n, a, r) => {
|
|
3689
|
+
const s = N(
|
|
3690
|
+
() => hs(e, o),
|
|
3714
3691
|
[e, o]
|
|
3715
|
-
), i =
|
|
3716
|
-
() =>
|
|
3692
|
+
), i = N(() => s.map((y) => ({ ...y, isOwner: a === y.authorName })), [s, a]), c = N(
|
|
3693
|
+
() => fs(i, ["version"], n),
|
|
3717
3694
|
[i, n]
|
|
3718
|
-
), m =
|
|
3719
|
-
const C = new Date(D.createdAt), f = new Date(
|
|
3695
|
+
), m = N(() => [...c].sort((D, P) => {
|
|
3696
|
+
const C = new Date(D.createdAt), f = new Date(P.createdAt), b = ct(C), T = ct(f);
|
|
3720
3697
|
if (!b && !T)
|
|
3721
3698
|
return 0;
|
|
3722
3699
|
if (b) {
|
|
3723
3700
|
if (!T)
|
|
3724
3701
|
return -1;
|
|
3725
3702
|
} else return 1;
|
|
3726
|
-
return
|
|
3727
|
-
}), [
|
|
3703
|
+
return Wa(f, C);
|
|
3704
|
+
}), [c]), p = N(
|
|
3728
3705
|
() => yn(m, "status.change", "oldStatus"),
|
|
3729
3706
|
[m]
|
|
3730
|
-
), g =
|
|
3707
|
+
), g = N(
|
|
3731
3708
|
() => yn(p, "attrib.change"),
|
|
3732
3709
|
[p]
|
|
3733
|
-
), u =
|
|
3710
|
+
), u = N(() => r?.conditions?.some(
|
|
3734
3711
|
(D) => "key" in D && D.key === "updates" && D.value === !0
|
|
3735
|
-
) ? g :
|
|
3736
|
-
() =>
|
|
3712
|
+
) ? g : ps(g, t), [g, t, r]), h = N(
|
|
3713
|
+
() => ms(u),
|
|
3737
3714
|
[u]
|
|
3738
3715
|
);
|
|
3739
|
-
return
|
|
3716
|
+
return N(() => [...new Map(
|
|
3740
3717
|
h.filter((D) => D && D.activityId).map((D) => [D.activityId, D])
|
|
3741
3718
|
).values()], [h]);
|
|
3742
|
-
}, vn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }),
|
|
3719
|
+
}, vn = (e, t) => JSON.stringify({ entities: e.map((o) => o.id), filter: t }), vs = ({
|
|
3743
3720
|
entities: e = [],
|
|
3744
3721
|
feedRef: t,
|
|
3745
3722
|
filter: o,
|
|
@@ -3747,7 +3724,7 @@ const ds = A.ul`
|
|
|
3747
3724
|
isLoading: a
|
|
3748
3725
|
}) => {
|
|
3749
3726
|
const r = ve({}), s = (i) => {
|
|
3750
|
-
const
|
|
3727
|
+
const c = i.current.querySelectorAll(".scroll-to"), m = Array.from(c).map((g) => g.closest("li.comment"));
|
|
3751
3728
|
return (m[m.length - 1]?.offsetTop || 0) - 8 || 0;
|
|
3752
3729
|
};
|
|
3753
3730
|
G(() => {
|
|
@@ -3756,7 +3733,7 @@ const ds = A.ul`
|
|
|
3756
3733
|
}, [e, o, t.current, a]), G(() => {
|
|
3757
3734
|
let i = null;
|
|
3758
3735
|
if (!t.current || n) return;
|
|
3759
|
-
const
|
|
3736
|
+
const c = (m) => {
|
|
3760
3737
|
if (i)
|
|
3761
3738
|
return;
|
|
3762
3739
|
i = setTimeout(() => {
|
|
@@ -3765,24 +3742,24 @@ const ds = A.ul`
|
|
|
3765
3742
|
const { scrollTop: p } = m.target, g = vn(e, o);
|
|
3766
3743
|
r.current[g] = p;
|
|
3767
3744
|
};
|
|
3768
|
-
return t.current?.addEventListener("scroll",
|
|
3769
|
-
t.current?.removeEventListener("scroll",
|
|
3745
|
+
return t.current?.addEventListener("scroll", c), () => {
|
|
3746
|
+
t.current?.removeEventListener("scroll", c);
|
|
3770
3747
|
};
|
|
3771
3748
|
}, [t.current, o, e, n]);
|
|
3772
|
-
},
|
|
3749
|
+
}, bs = ({ feedRef: e, isInputOpen: t, height: o }) => {
|
|
3773
3750
|
G(() => {
|
|
3774
3751
|
if (!e.current) return;
|
|
3775
3752
|
const n = o;
|
|
3776
3753
|
e.current.scrollTop === 0 || (t ? e.current.scrollBy(0, n) : e.current.scrollBy(0, -n));
|
|
3777
3754
|
}, [t, e, o]);
|
|
3778
|
-
},
|
|
3779
|
-
|
|
3755
|
+
}, ws = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), xs = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ l(
|
|
3756
|
+
ls,
|
|
3780
3757
|
{
|
|
3781
3758
|
className: "loading",
|
|
3782
|
-
style: { minHeight:
|
|
3759
|
+
style: { minHeight: ws(50, 150) }
|
|
3783
3760
|
},
|
|
3784
3761
|
o
|
|
3785
|
-
)),
|
|
3762
|
+
)), ks = ({
|
|
3786
3763
|
feedRef: e,
|
|
3787
3764
|
highlighted: t = [],
|
|
3788
3765
|
isLoading: o,
|
|
@@ -3797,7 +3774,7 @@ const ds = A.ul`
|
|
|
3797
3774
|
if (p++, p > 10) return null;
|
|
3798
3775
|
const u = await n();
|
|
3799
3776
|
return !u || !u.hasNextPage ? null : (await new Promise((v) => requestAnimationFrame(() => v())), i(m, p));
|
|
3800
|
-
},
|
|
3777
|
+
}, c = async (m) => {
|
|
3801
3778
|
const p = await i(m);
|
|
3802
3779
|
if (!p) {
|
|
3803
3780
|
console.error("No highlighted element found");
|
|
@@ -3807,9 +3784,9 @@ const ds = A.ul`
|
|
|
3807
3784
|
console.log("FOUND: scrolling to highlighted..."), m.scrollTo({ top: D }), s.current = t;
|
|
3808
3785
|
};
|
|
3809
3786
|
G(() => {
|
|
3810
|
-
!t.length || !e.current || o || !n || t.every((m) => s.current?.includes(m)) || (console.log("trying to scroll to highlighted..."),
|
|
3787
|
+
!t.length || !e.current || o || !n || t.every((m) => s.current?.includes(m)) || (console.log("trying to scroll to highlighted..."), c(e.current));
|
|
3811
3788
|
}, [e, t, r, o, n, s, a]);
|
|
3812
|
-
},
|
|
3789
|
+
}, Fs = (e) => e.map((t) => {
|
|
3813
3790
|
if (t.activityType !== "comment" || !t.activityData?.annotations) return t;
|
|
3814
3791
|
const o = t.files.map((a) => {
|
|
3815
3792
|
const r = t.activityData.annotations.find(
|
|
@@ -3825,47 +3802,47 @@ const ds = A.ul`
|
|
|
3825
3802
|
"checklists",
|
|
3826
3803
|
"has_attachments",
|
|
3827
3804
|
"in_review_session"
|
|
3828
|
-
],
|
|
3805
|
+
], As = (e) => !!e && "key" in e, Cs = (e, t) => {
|
|
3829
3806
|
const o = [], n = [], a = (r) => {
|
|
3830
3807
|
if (!r) return;
|
|
3831
|
-
if (
|
|
3808
|
+
if (As(r)) {
|
|
3832
3809
|
const i = r.key;
|
|
3833
3810
|
if (i === "body") {
|
|
3834
3811
|
const p = String(r.value ?? "");
|
|
3835
3812
|
p && n.push({ id: p, label: p });
|
|
3836
3813
|
return;
|
|
3837
3814
|
}
|
|
3838
|
-
const
|
|
3839
|
-
if (!
|
|
3815
|
+
const c = t.find((p) => p.id === i);
|
|
3816
|
+
if (!c) return;
|
|
3840
3817
|
if (Jn.includes(i)) {
|
|
3841
3818
|
r.value === !0 && o.push({
|
|
3842
3819
|
id: en(i),
|
|
3843
|
-
label:
|
|
3844
|
-
icon:
|
|
3820
|
+
label: c.label,
|
|
3821
|
+
icon: c.icon,
|
|
3845
3822
|
type: "boolean",
|
|
3846
3823
|
singleSelect: !0,
|
|
3847
3824
|
// value label = filter name so the compact chip (label hidden) reads
|
|
3848
3825
|
// e.g. "Checklists" instead of "Yes"
|
|
3849
|
-
values: [{ id: "true", label:
|
|
3826
|
+
values: [{ id: "true", label: c.label }]
|
|
3850
3827
|
});
|
|
3851
3828
|
return;
|
|
3852
3829
|
}
|
|
3853
3830
|
const m = Array.isArray(r.value) ? r.value : [r.value];
|
|
3854
3831
|
o.push({
|
|
3855
3832
|
id: en(i),
|
|
3856
|
-
label:
|
|
3857
|
-
type:
|
|
3858
|
-
icon:
|
|
3859
|
-
singleSelect:
|
|
3833
|
+
label: c.label,
|
|
3834
|
+
type: c.type,
|
|
3835
|
+
icon: c.icon,
|
|
3836
|
+
singleSelect: c.singleSelect,
|
|
3860
3837
|
operator: "OR",
|
|
3861
3838
|
values: m.map((p) => {
|
|
3862
|
-
const g =
|
|
3839
|
+
const g = c.values?.find((u) => u.id === String(p));
|
|
3863
3840
|
return g ? { ...g } : { id: String(p), label: String(p) };
|
|
3864
3841
|
})
|
|
3865
3842
|
});
|
|
3866
3843
|
return;
|
|
3867
3844
|
}
|
|
3868
|
-
const s =
|
|
3845
|
+
const s = Ya(r, t);
|
|
3869
3846
|
if (s) {
|
|
3870
3847
|
o.push(s);
|
|
3871
3848
|
return;
|
|
@@ -3873,10 +3850,10 @@ const ds = A.ul`
|
|
|
3873
3850
|
r.conditions?.forEach(a);
|
|
3874
3851
|
};
|
|
3875
3852
|
return e?.conditions?.forEach(a), n.length && o.push({ id: Tn, label: "", values: n }), o;
|
|
3876
|
-
},
|
|
3853
|
+
}, Ts = (e) => {
|
|
3877
3854
|
const t = [], o = [];
|
|
3878
3855
|
return e.forEach((n) => {
|
|
3879
|
-
const a =
|
|
3856
|
+
const a = No(n.id), r = (n.values || []).map((s) => s.id);
|
|
3880
3857
|
if (r.length)
|
|
3881
3858
|
if (a === Tn)
|
|
3882
3859
|
r.forEach(
|
|
@@ -3885,12 +3862,12 @@ const ds = A.ul`
|
|
|
3885
3862
|
else if (Jn.includes(a))
|
|
3886
3863
|
r.includes("true") && t.push({ key: a, operator: "eq", value: !0 });
|
|
3887
3864
|
else if (n.type === "datetime") {
|
|
3888
|
-
const s =
|
|
3865
|
+
const s = Ja(a, n);
|
|
3889
3866
|
s && t.push(s);
|
|
3890
3867
|
} else
|
|
3891
3868
|
t.push({ key: a, operator: "in", value: r.map(String) });
|
|
3892
3869
|
}), o.length === 1 ? t.push(o[0]) : o.length > 1 && t.push({ operator: "or", conditions: o }), { operator: "and", conditions: t };
|
|
3893
|
-
},
|
|
3870
|
+
}, Ds = A.div`
|
|
3894
3871
|
padding: 4px 8px;
|
|
3895
3872
|
padding-bottom: 0;
|
|
3896
3873
|
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25));
|
|
@@ -3916,11 +3893,11 @@ const ds = A.ul`
|
|
|
3916
3893
|
checklistCount: s,
|
|
3917
3894
|
onSearchTextChange: i
|
|
3918
3895
|
}) => {
|
|
3919
|
-
const
|
|
3920
|
-
const f = (T, I,
|
|
3896
|
+
const c = N(() => {
|
|
3897
|
+
const f = (T, I, _) => ({
|
|
3921
3898
|
id: T,
|
|
3922
3899
|
label: I,
|
|
3923
|
-
icon:
|
|
3900
|
+
icon: _,
|
|
3924
3901
|
type: "boolean",
|
|
3925
3902
|
singleSelect: !0,
|
|
3926
3903
|
values: []
|
|
@@ -3967,19 +3944,19 @@ const ds = A.ul`
|
|
|
3967
3944
|
label: "Posted date",
|
|
3968
3945
|
icon: "calendar_today",
|
|
3969
3946
|
type: "datetime",
|
|
3970
|
-
values:
|
|
3947
|
+
values: ua()
|
|
3971
3948
|
}
|
|
3972
3949
|
];
|
|
3973
3950
|
}, [o, n, a]);
|
|
3974
3951
|
let m = "";
|
|
3975
3952
|
s?.total && s.total > 0 && (m = `${s.checked}/${s.total}`);
|
|
3976
|
-
const p =
|
|
3953
|
+
const p = N(
|
|
3977
3954
|
() => ["comments", { id: "checklists", label: m, tooltip: "Checklists" }],
|
|
3978
3955
|
[m]
|
|
3979
|
-
), g =
|
|
3980
|
-
() =>
|
|
3981
|
-
[e,
|
|
3982
|
-
), [u, h] =
|
|
3956
|
+
), g = N(
|
|
3957
|
+
() => Cs(e, c),
|
|
3958
|
+
[e, c]
|
|
3959
|
+
), [u, h] = L(g), v = er(), y = ve(null);
|
|
3983
3960
|
G(() => {
|
|
3984
3961
|
h(g);
|
|
3985
3962
|
}, [JSON.stringify(g)]), G(() => {
|
|
@@ -3992,15 +3969,15 @@ const ds = A.ul`
|
|
|
3992
3969
|
};
|
|
3993
3970
|
}, [y]);
|
|
3994
3971
|
const D = (f) => {
|
|
3995
|
-
t(
|
|
3972
|
+
t(Ts(f)), i?.("");
|
|
3996
3973
|
};
|
|
3997
|
-
return /* @__PURE__ */ x(
|
|
3998
|
-
/* @__PURE__ */
|
|
3974
|
+
return /* @__PURE__ */ x(Ds, { className: r ? "loading" : void 0, children: [
|
|
3975
|
+
/* @__PURE__ */ l(
|
|
3999
3976
|
Io,
|
|
4000
3977
|
{
|
|
4001
3978
|
ref: y,
|
|
4002
3979
|
compact: !0,
|
|
4003
|
-
options:
|
|
3980
|
+
options: c,
|
|
4004
3981
|
filters: u,
|
|
4005
3982
|
onChange: (f) => {
|
|
4006
3983
|
v.wrapFilterChange(f, u, h);
|
|
@@ -4021,23 +3998,23 @@ const ds = A.ul`
|
|
|
4021
3998
|
dropdown: {
|
|
4022
3999
|
pt: {
|
|
4023
4000
|
item: {
|
|
4024
|
-
onClick: (f) => v.handleDropdownItemClick(f, u,
|
|
4001
|
+
onClick: (f) => v.handleDropdownItemClick(f, u, c)
|
|
4025
4002
|
}
|
|
4026
4003
|
}
|
|
4027
4004
|
}
|
|
4028
4005
|
}
|
|
4029
4006
|
}
|
|
4030
4007
|
),
|
|
4031
|
-
/* @__PURE__ */
|
|
4032
|
-
|
|
4008
|
+
/* @__PURE__ */ l(
|
|
4009
|
+
La,
|
|
4033
4010
|
{
|
|
4034
4011
|
isOpen: !!v.customRangeFilterId,
|
|
4035
|
-
header:
|
|
4012
|
+
header: c.find((f) => f.id === v.customRangeFilterId?.split("__")[0])?.label ?? "Custom range",
|
|
4036
4013
|
startDate: v.customStartDate,
|
|
4037
4014
|
endDate: v.customEndDate,
|
|
4038
4015
|
onStartDateChange: v.setCustomStartDate,
|
|
4039
4016
|
onEndDateChange: v.setCustomEndDate,
|
|
4040
|
-
onApply: () => v.handleCustomRangeApply(u,
|
|
4017
|
+
onApply: () => v.handleCustomRangeApply(u, c, D, y),
|
|
4041
4018
|
onClose: v.handleCustomRangeClose
|
|
4042
4019
|
}
|
|
4043
4020
|
)
|
|
@@ -4045,7 +4022,7 @@ const ds = A.ul`
|
|
|
4045
4022
|
}
|
|
4046
4023
|
);
|
|
4047
4024
|
Xn.displayName = "FeedSearchFilter";
|
|
4048
|
-
function
|
|
4025
|
+
function Ss({
|
|
4049
4026
|
projectName: e,
|
|
4050
4027
|
enabled: t,
|
|
4051
4028
|
entityIds: o,
|
|
@@ -4053,10 +4030,10 @@ function Es({
|
|
|
4053
4030
|
loadingActivities: a,
|
|
4054
4031
|
userName: r
|
|
4055
4032
|
}) {
|
|
4056
|
-
const s =
|
|
4033
|
+
const s = N(
|
|
4057
4034
|
() => n.find((p) => p.activityType === "version.review" && p.authorName === r),
|
|
4058
4035
|
[n, r]
|
|
4059
|
-
), i = !!(o.length === 0 || !t || a || s), { data:
|
|
4036
|
+
), i = !!(o.length === 0 || !t || a || s), { data: c } = Sa(
|
|
4060
4037
|
{
|
|
4061
4038
|
projectName: e,
|
|
4062
4039
|
entityIds: o,
|
|
@@ -4066,27 +4043,27 @@ function Es({
|
|
|
4066
4043
|
},
|
|
4067
4044
|
{ skip: i }
|
|
4068
4045
|
);
|
|
4069
|
-
return
|
|
4046
|
+
return N(() => s ?? c?.activities.at(-1), [s, c]);
|
|
4070
4047
|
}
|
|
4071
|
-
const
|
|
4072
|
-
const a =
|
|
4048
|
+
const Ns = (e) => !!e.activityData?.annotations?.length || !!ft(e), Is = ({ projectName: e, entityType: t, entities: o, activities: n }) => {
|
|
4049
|
+
const a = N(
|
|
4073
4050
|
() => t === "version" ? Object.fromEntries(
|
|
4074
4051
|
o.filter((i) => i.attrib).map((i) => [i.id, i.attrib?.frameStart ?? null])
|
|
4075
4052
|
) : {},
|
|
4076
4053
|
[t, o]
|
|
4077
|
-
), r =
|
|
4054
|
+
), r = N(() => {
|
|
4078
4055
|
const i = /* @__PURE__ */ new Set();
|
|
4079
|
-
for (const
|
|
4080
|
-
const m =
|
|
4081
|
-
|
|
4056
|
+
for (const c of n) {
|
|
4057
|
+
const m = c.origin;
|
|
4058
|
+
c.activityType !== "comment" || m?.type !== "version" || m.id in a || !Ns(c) || i.add(m.id);
|
|
4082
4059
|
}
|
|
4083
4060
|
return [...i].sort();
|
|
4084
|
-
}, [n, a]), { data: s } =
|
|
4061
|
+
}, [n, a]), { data: s } = Na(
|
|
4085
4062
|
{ projectName: e, versionIds: r },
|
|
4086
4063
|
{ skip: !e || !r.length }
|
|
4087
4064
|
);
|
|
4088
|
-
return
|
|
4089
|
-
},
|
|
4065
|
+
return N(() => ({ ...s, ...a }), [s, a]);
|
|
4066
|
+
}, Nc = 30, Ic = ({
|
|
4090
4067
|
disabled: e,
|
|
4091
4068
|
readOnly: t,
|
|
4092
4069
|
statuses: o = [],
|
|
@@ -4097,7 +4074,7 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4097
4074
|
}) => {
|
|
4098
4075
|
const {
|
|
4099
4076
|
projectName: i,
|
|
4100
|
-
entities:
|
|
4077
|
+
entities: c,
|
|
4101
4078
|
entityType: m,
|
|
4102
4079
|
editingId: p,
|
|
4103
4080
|
projectInfo: g,
|
|
@@ -4106,32 +4083,32 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4106
4083
|
activitiesData: v,
|
|
4107
4084
|
isLoadingNew: y,
|
|
4108
4085
|
isLoadingNextPage: D,
|
|
4109
|
-
loadNextPage:
|
|
4086
|
+
loadNextPage: P,
|
|
4110
4087
|
hasNextPage: C,
|
|
4111
4088
|
users: f,
|
|
4112
4089
|
categories: b,
|
|
4113
4090
|
checklistCount: T,
|
|
4114
4091
|
feedFilter: I,
|
|
4115
|
-
setFeedFilter:
|
|
4092
|
+
setFeedFilter: _,
|
|
4116
4093
|
isGuest: R,
|
|
4117
4094
|
searchText: E,
|
|
4118
|
-
setSearchText:
|
|
4119
|
-
} =
|
|
4095
|
+
setSearchText: S
|
|
4096
|
+
} = $e(), {
|
|
4120
4097
|
openSlideOut: Q,
|
|
4121
4098
|
highlightedActivities: Y,
|
|
4122
4099
|
setHighlightedActivities: H,
|
|
4123
4100
|
onOpenImage: J,
|
|
4124
4101
|
setFeedAnnotations: q,
|
|
4125
|
-
setFeedFrameLinks:
|
|
4102
|
+
setFeedFrameLinks: $,
|
|
4126
4103
|
user: te
|
|
4127
|
-
} =
|
|
4104
|
+
} = ze(), oe = I.conditions?.some(
|
|
4128
4105
|
(w) => "key" in w && w.key === "versions" && w.value === !0
|
|
4129
4106
|
), W = I.conditions?.some(
|
|
4130
4107
|
(w) => "key" in w && ["comments", "checklists", "versions", "updates"].includes(w.key) && w.value === !0
|
|
4131
4108
|
), j = I.conditions?.some(
|
|
4132
4109
|
(w) => "key" in w && (w.key === "comments" || w.key === "checklists") && w.value === !0
|
|
4133
|
-
), de = m === "version" || m === "folder", { data: se, isLoading: ne } =
|
|
4134
|
-
() =>
|
|
4110
|
+
), de = m === "version" || m === "folder", { data: se, isLoading: ne } = Ia({ projectName: i }, { skip: !i }), we = !te.data?.isManager && !te.data?.isAdmin && !ne && se?.activities?.enabled && !se?.activities?.activities?.includes("comment") || W && !j, xe = N(
|
|
4111
|
+
() => Fs(v),
|
|
4135
4112
|
[v]
|
|
4136
4113
|
);
|
|
4137
4114
|
G(() => {
|
|
@@ -4148,14 +4125,14 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4148
4125
|
const O = ft(M);
|
|
4149
4126
|
return O && { ...O, activityId: M.activityId };
|
|
4150
4127
|
}).filter((M) => !!M);
|
|
4151
|
-
|
|
4128
|
+
$(w);
|
|
4152
4129
|
}, [v]);
|
|
4153
|
-
const Ce =
|
|
4130
|
+
const Ce = Is({
|
|
4154
4131
|
projectName: i,
|
|
4155
4132
|
entityType: m,
|
|
4156
|
-
entities:
|
|
4133
|
+
entities: c,
|
|
4157
4134
|
activities: v
|
|
4158
|
-
}), ge =
|
|
4135
|
+
}), ge = ys(
|
|
4159
4136
|
// @ts-ignore
|
|
4160
4137
|
xe,
|
|
4161
4138
|
f,
|
|
@@ -4163,44 +4140,44 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4163
4140
|
m,
|
|
4164
4141
|
h,
|
|
4165
4142
|
I
|
|
4166
|
-
), Ee =
|
|
4143
|
+
), Ee = N(() => {
|
|
4167
4144
|
if (!E) return ge;
|
|
4168
4145
|
const w = E.toLowerCase();
|
|
4169
4146
|
return ge.filter(
|
|
4170
4147
|
(M) => M.body?.toLowerCase().includes(w)
|
|
4171
4148
|
);
|
|
4172
4149
|
}, [ge, E]), X = ve(null);
|
|
4173
|
-
|
|
4174
|
-
entities:
|
|
4150
|
+
bs({ feedRef: X, isInputOpen: p === rt, height: 93 }), vs({
|
|
4151
|
+
entities: c,
|
|
4175
4152
|
feedRef: X,
|
|
4176
4153
|
filter: I,
|
|
4177
4154
|
disabled: !!Y.length,
|
|
4178
4155
|
isLoading: y
|
|
4179
|
-
}),
|
|
4156
|
+
}), ks({
|
|
4180
4157
|
feedRef: X,
|
|
4181
4158
|
highlighted: Y,
|
|
4182
4159
|
isLoading: y || D,
|
|
4183
|
-
loadNextPage:
|
|
4184
|
-
hasNextPage: !!
|
|
4160
|
+
loadNextPage: P,
|
|
4161
|
+
hasNextPage: !!P,
|
|
4185
4162
|
activities: v
|
|
4186
4163
|
});
|
|
4187
4164
|
const {
|
|
4188
|
-
submitComment:
|
|
4165
|
+
submitComment: Se,
|
|
4189
4166
|
updateComment: Oe,
|
|
4190
4167
|
deleteComment: Me,
|
|
4191
4168
|
submitReview: Te,
|
|
4192
4169
|
isSaving: Qe
|
|
4193
|
-
} =
|
|
4170
|
+
} = ds({
|
|
4194
4171
|
projectName: i,
|
|
4195
4172
|
entityType: m,
|
|
4196
|
-
entities:
|
|
4173
|
+
entities: c,
|
|
4197
4174
|
filter: I,
|
|
4198
4175
|
entityListId: n
|
|
4199
4176
|
}), Ve = qe(
|
|
4200
4177
|
async (w, M = [], O = {}) => {
|
|
4201
|
-
await
|
|
4178
|
+
await Se(w, M, O), X.current && X.current.scrollTo({ top: 0 });
|
|
4202
4179
|
},
|
|
4203
|
-
[
|
|
4180
|
+
[Se, X]
|
|
4204
4181
|
), be = qe(
|
|
4205
4182
|
async (w) => {
|
|
4206
4183
|
await Te(w);
|
|
@@ -4212,15 +4189,15 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4212
4189
|
const K = O.checked, ue = K ? "[ ]" : "[x]", F = K ? "[x]" : "[ ]", { body: me } = M, he = Array.from(
|
|
4213
4190
|
O.closest(".comment-body")?.querySelectorAll(".task-list-item") || []
|
|
4214
4191
|
).findIndex((Ze) => Ze === O.closest("li"));
|
|
4215
|
-
let
|
|
4192
|
+
let Ne = he;
|
|
4216
4193
|
(me.match(/\[.\]/g) || []).forEach((Ze, vt) => {
|
|
4217
|
-
Ze !== ue && vt < he &&
|
|
4194
|
+
Ze !== ue && vt < he && Ne--;
|
|
4218
4195
|
});
|
|
4219
|
-
const
|
|
4196
|
+
const Le = [];
|
|
4220
4197
|
let Je = -1;
|
|
4221
4198
|
for (; (Je = me.indexOf(ue, Je + 1)) > -1; )
|
|
4222
|
-
|
|
4223
|
-
const Xe =
|
|
4199
|
+
Le.push(Je);
|
|
4200
|
+
const Xe = Le[Ne];
|
|
4224
4201
|
if (Xe === void 0) return;
|
|
4225
4202
|
const mt = Xe + ue.length, Ke = me.slice(0, Xe) + F + me.slice(mt);
|
|
4226
4203
|
Ke && Oe(M, Ke, M.files);
|
|
@@ -4236,36 +4213,36 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4236
4213
|
files: K.files.filter((ue) => yt(ue.mime, ue.ext))
|
|
4237
4214
|
})).filter((K) => K.files.length > 0);
|
|
4238
4215
|
J?.({ files: O, activityId: M, index: w, projectName: i });
|
|
4239
|
-
}, [Ye,
|
|
4216
|
+
}, [Ye, Pe] = L(null), He = !we && !t && !e, _e = qe(
|
|
4240
4217
|
(w) => {
|
|
4241
|
-
|
|
4218
|
+
Pe({ key: bn(), activity: w }), u(rt);
|
|
4242
4219
|
},
|
|
4243
4220
|
[u]
|
|
4244
|
-
), je =
|
|
4221
|
+
), je = N(() => xs(10), []), ke = Ss({
|
|
4245
4222
|
projectName: i,
|
|
4246
4223
|
enabled: r,
|
|
4247
|
-
entityIds:
|
|
4224
|
+
entityIds: c.map((w) => w.id),
|
|
4248
4225
|
activities: ge,
|
|
4249
4226
|
loadingActivities: y,
|
|
4250
4227
|
userName: h
|
|
4251
4228
|
});
|
|
4252
|
-
return /* @__PURE__ */
|
|
4229
|
+
return /* @__PURE__ */ l(Ae, { children: /* @__PURE__ */ x(is, { className: "feed", children: [
|
|
4253
4230
|
void 0,
|
|
4254
|
-
/* @__PURE__ */
|
|
4231
|
+
/* @__PURE__ */ l(
|
|
4255
4232
|
Xn,
|
|
4256
4233
|
{
|
|
4257
4234
|
feedFilter: I,
|
|
4258
|
-
setFeedFilter:
|
|
4235
|
+
setFeedFilter: _,
|
|
4259
4236
|
users: f,
|
|
4260
4237
|
categories: b,
|
|
4261
4238
|
supportsReviewSession: de,
|
|
4262
4239
|
isLoading: y,
|
|
4263
|
-
onSearchTextChange:
|
|
4240
|
+
onSearchTextChange: S,
|
|
4264
4241
|
checklistCount: T
|
|
4265
4242
|
}
|
|
4266
4243
|
),
|
|
4267
|
-
/* @__PURE__ */ x(
|
|
4268
|
-
y ? je : Ee.map((w) => /* @__PURE__ */
|
|
4244
|
+
/* @__PURE__ */ x(ss, { ref: X, className: ee({ loading: y }, "no-shimmer"), children: [
|
|
4245
|
+
y ? je : Ee.map((w) => /* @__PURE__ */ l(
|
|
4269
4246
|
Yn,
|
|
4270
4247
|
{
|
|
4271
4248
|
activity: w,
|
|
@@ -4273,18 +4250,18 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4273
4250
|
onCheckChange: Be,
|
|
4274
4251
|
onDelete: Me,
|
|
4275
4252
|
onUpdate: async (M, O, K, ue) => await Oe(w, M, O, ue),
|
|
4276
|
-
onDuplicate: He ?
|
|
4253
|
+
onDuplicate: He ? _e : void 0,
|
|
4277
4254
|
projectInfo: g,
|
|
4278
4255
|
projectName: i,
|
|
4279
4256
|
entityType: m,
|
|
4280
4257
|
onReferenceClick: Ge,
|
|
4281
|
-
createdAts:
|
|
4258
|
+
createdAts: c.map((M) => M.createdAt),
|
|
4282
4259
|
onFileExpand: ae,
|
|
4283
|
-
showOrigin:
|
|
4260
|
+
showOrigin: c.length > 1,
|
|
4284
4261
|
filter: I,
|
|
4285
4262
|
editProps: {
|
|
4286
4263
|
projectName: i,
|
|
4287
|
-
entities:
|
|
4264
|
+
entities: c,
|
|
4288
4265
|
entityType: m
|
|
4289
4266
|
},
|
|
4290
4267
|
isHighlighted: Y.includes(w.activityId),
|
|
@@ -4295,19 +4272,19 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4295
4272
|
},
|
|
4296
4273
|
w.activityId
|
|
4297
4274
|
)),
|
|
4298
|
-
Ee.length === 0 && oe && !j && !y && /* @__PURE__ */
|
|
4299
|
-
C &&
|
|
4300
|
-
|
|
4275
|
+
Ee.length === 0 && oe && !j && !y && /* @__PURE__ */ l(Nt, { message: "No versions published yet", icon: "layers" }),
|
|
4276
|
+
C && P && /* @__PURE__ */ l(
|
|
4277
|
+
Qa,
|
|
4301
4278
|
{
|
|
4302
4279
|
root: X.current,
|
|
4303
|
-
onChange: (w) => w &&
|
|
4280
|
+
onChange: (w) => w && P(),
|
|
4304
4281
|
rootMargin: "400px 0px 0px 0px",
|
|
4305
|
-
children: /* @__PURE__ */
|
|
4282
|
+
children: /* @__PURE__ */ l(cs, { style: { height: 0 }, onClick: () => P(), children: D ? "Loading more..." : "Click to load more" })
|
|
4306
4283
|
}
|
|
4307
4284
|
)
|
|
4308
4285
|
] }),
|
|
4309
|
-
!we && /* @__PURE__ */
|
|
4310
|
-
|
|
4286
|
+
!we && /* @__PURE__ */ l(
|
|
4287
|
+
Bn,
|
|
4311
4288
|
{
|
|
4312
4289
|
initValue: null,
|
|
4313
4290
|
onSubmit: Ve,
|
|
@@ -4315,29 +4292,31 @@ const Ms = (e) => !!e.activityData?.annotations?.length || !!ft(e), _s = ({ proj
|
|
|
4315
4292
|
onClose: () => u(null),
|
|
4316
4293
|
onOpen: () => u(rt),
|
|
4317
4294
|
disabled: e,
|
|
4318
|
-
isLoading: y || !
|
|
4295
|
+
isLoading: y || !c.length || Qe,
|
|
4319
4296
|
versionReview: r,
|
|
4320
4297
|
lastOwnVersionReview: ke,
|
|
4321
4298
|
onReview: be,
|
|
4322
4299
|
duplicate: Ye,
|
|
4323
|
-
onDuplicateHandled: () =>
|
|
4300
|
+
onDuplicateHandled: () => Pe(null),
|
|
4324
4301
|
saveDraft: s
|
|
4325
4302
|
}
|
|
4326
4303
|
)
|
|
4327
4304
|
] }) });
|
|
4328
4305
|
};
|
|
4329
4306
|
export {
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4307
|
+
zr as A,
|
|
4308
|
+
Gr as C,
|
|
4309
|
+
Dc as D,
|
|
4333
4310
|
rt as F,
|
|
4334
4311
|
dn as P,
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4312
|
+
Sc as S,
|
|
4313
|
+
Vr as a,
|
|
4314
|
+
it as b,
|
|
4338
4315
|
Ic as c,
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4316
|
+
Tc as d,
|
|
4317
|
+
br as e,
|
|
4318
|
+
Nc as f,
|
|
4319
|
+
yt as g,
|
|
4320
|
+
Br as i,
|
|
4321
|
+
Qr as r
|
|
4343
4322
|
};
|