@ynput/ayon-frontend-shared 0.6.4 → 0.6.5
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 +480 -477
- package/dist/ListTable.es.js +24 -25
- package/dist/NewEntity.es.js +6 -7
- package/dist/ProjectTreeTable.es.js +2016 -1996
- package/dist/Views.es.js +28 -28
- package/dist/api.es.js +291 -289
- package/dist/chunks/Actions.es.js +12 -12
- package/dist/chunks/ColumnDropIndicator.es.js +8 -9
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
- package/dist/chunks/DetailsDialog.es.js +1 -1
- package/dist/chunks/EmptyPlaceholder.es.js +13 -12
- package/dist/chunks/EntityPath.es.js +67 -67
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +8 -8
- package/dist/chunks/Feed.es.js +75 -76
- package/dist/chunks/MetaWidget.es.js +1283 -1279
- package/dist/chunks/PlayableIcon.es.js +458 -451
- package/dist/chunks/ProjectContext.es.js +20 -20
- package/dist/chunks/RepresentationsList.es.js +9 -9
- package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
- package/dist/chunks/Slicer.es.js +68 -69
- package/dist/chunks/ThumbnailSimple.es.js +4 -4
- package/dist/chunks/Watchers.es.js +104 -105
- package/dist/chunks/activeEntities.es.js +58 -0
- package/dist/chunks/columnConfigConverter.es.js +57 -63
- package/dist/chunks/getUris.es.js +886 -831
- package/dist/chunks/iconUtils.es.js +151 -0
- package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
- package/dist/chunks/searchTerms.es.js +329 -247
- package/dist/chunks/useAttributeEnums.es.js +34 -34
- package/dist/chunks/viewUpdateHelper.es.js +11 -11
- package/dist/components.es.js +340 -337
- package/dist/context.es.js +48 -48
- package/dist/hooks.es.js +34 -34
- package/dist/index.es.js +1 -1
- package/dist/types/ContextMenu.d.ts +1 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -1
- package/dist/types/SimpleTable.d.ts +1 -1
- package/dist/types/Slicer.d.ts +5 -5
- package/dist/types/Views.d.ts +4 -4
- package/dist/types/api.d.ts +545 -171
- package/dist/types/components.d.ts +64 -9
- package/dist/types/context.d.ts +5 -5
- package/dist/types/util.d.ts +237 -2
- package/dist/util.es.js +127 -114
- package/package.json +1 -1
- package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
- package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
package/dist/chunks/Feed.es.js
CHANGED
|
@@ -11,7 +11,7 @@ import { toast as ke } from "react-toastify";
|
|
|
11
11
|
import { $createListItemNode as go, $createListNode as ho } from "@lexical/list";
|
|
12
12
|
import { $getRoot as fo } from "lexical";
|
|
13
13
|
import { Button as at, Dialog as yo, getFileSizeString as vo, Icon as re, theme as bn, getTextColor as St, Dropdown as bo, SaveButton as wo, UserImage as wn, SEARCH_FILTER_ID as xn, buildFilterId as Yt, getFilterFromId as xo, SearchFilter as ko } from "@ynput/ayon-react-components";
|
|
14
|
-
import { p as Ao, Y as Fo, q as Co, P as To, o as kn, L as Do, l as No, V as So, r as Jt, s as Io, u as Eo, E as Mo, M as _o, T as Po, v as Ro, F as $o, w as Lo, x as Oo, y as jo, z as Vo, G as zo, S as Uo, H as Bo, I as Go, J as It, n as An, K as Ho, A as qo, O as Wo, Q as Qo, R as Yo, W as Jo, X as
|
|
14
|
+
import { p as Ao, Y as Fo, q as Co, P as To, o as kn, L as Do, l as No, V as So, r as Jt, s as Io, u as Eo, E as Mo, M as _o, T as Po, v as Ro, F as $o, w as Lo, x as Oo, y as jo, z as Vo, G as zo, S as Uo, H as Bo, I as Go, J as It, n as An, K as Ho, A as qo, O as Wo, Q as Qo, R as Yo, W as Jo, X as Xo, Z as Ko, _ as Xt, $ as Zo, a0 as ea, a1 as ta, a2 as na, a3 as oa, a4 as aa, b as ra, j as ia } from "./PlayableIcon.es.js";
|
|
15
15
|
import "@lexical/markdown";
|
|
16
16
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
17
17
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
@@ -23,8 +23,8 @@ import F, { css as Et } from "styled-components";
|
|
|
23
23
|
import sa from "@uiw/react-textarea-code-editor";
|
|
24
24
|
import { E as Ct } from "./EmptyPlaceholder.es.js";
|
|
25
25
|
import { a as ca, M as la } from "./Menu.es.js";
|
|
26
|
-
import { aQ as da, bi as
|
|
27
|
-
import {
|
|
26
|
+
import { aQ as da, bi as Kt } from "./searchTerms.es.js";
|
|
27
|
+
import { bg as ua, bj as ma, aF as pa, df as ga, aS as ha, aM as fa, a$ as ya, N as va, bB as ba, bi as wa, bt as xa, bn as ka, bh as Aa, bX as Fa } from "./getUris.es.js";
|
|
28
28
|
import "primereact/confirmdialog";
|
|
29
29
|
import { union as Ca, isEqual as Ta } from "lodash";
|
|
30
30
|
import { b as Da, F as Na, u as Re, a as Fn, T as Sa, C as Ia } from "./ThumbnailSimple.es.js";
|
|
@@ -39,7 +39,6 @@ import _t from "axios";
|
|
|
39
39
|
import { b as Zt } from "./colorUtils.es.js";
|
|
40
40
|
import "./EntityTooltip.es.js";
|
|
41
41
|
import { isValid as rt, isToday as _a, isSameYear as Pa, isSameDay as Ra, isSameWeek as $a, isSameMinute as La, format as en, formatISO as Oa, differenceInMinutes as ja, differenceInSeconds as Va, compareAsc as za } from "date-fns";
|
|
42
|
-
import "react-router-dom";
|
|
43
42
|
import "./MenuItem.es.js";
|
|
44
43
|
import { InView as Ua } from "react-intersection-observer";
|
|
45
44
|
import { t as Ba, c as Ga } from "./queryFilterToClientFilter.es.js";
|
|
@@ -118,7 +117,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
118
117
|
hasNextPage: b,
|
|
119
118
|
loadNextPage: v
|
|
120
119
|
};
|
|
121
|
-
}, nt = "__new__",
|
|
120
|
+
}, nt = "__new__", pc = ({ children: e, ...t }) => {
|
|
122
121
|
const { isGuest: o } = ze(), { data: n = [] } = ma({ projects: [t.projectName] }), { data: a = [] } = da.useGetTeamsQuery(
|
|
123
122
|
{ projectName: t.projectName, showMembers: !0 },
|
|
124
123
|
{ skip: !t.projectName }
|
|
@@ -128,7 +127,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
128
127
|
), [s, i] = L({
|
|
129
128
|
operator: "and",
|
|
130
129
|
conditions: []
|
|
131
|
-
}), [l, u] = L(""), p = t.feedFilter ?? s, m = t.setFeedFilter ?? i, [g, f] = L(null), [h, b] = L(null), [D, { isLoading: R }] = pa(), [v, { isLoading: y }] = ga(), [A, { isLoading: C }] = ha(), S = R || y || C, M = async (O) => await D(O).unwrap(), I = async (O) => await v(O).unwrap(), E = async (O) => await A(O).unwrap(), [P] = fa(), [H] = ya(), Q = async (O) => await P(O).unwrap(),
|
|
130
|
+
}), [l, u] = L(""), p = t.feedFilter ?? s, m = t.setFeedFilter ?? i, [g, f] = L(null), [h, b] = L(null), [D, { isLoading: R }] = pa(), [v, { isLoading: y }] = ga(), [A, { isLoading: C }] = ha(), S = R || y || C, M = async (O) => await D(O).unwrap(), I = async (O) => await v(O).unwrap(), E = async (O) => await A(O).unwrap(), [P] = fa(), [H] = ya(), Q = async (O) => await P(O).unwrap(), X = async (O) => await H(O).unwrap(), q = va(p), $ = N(() => Da(p), [p]), ue = Ja({
|
|
132
131
|
entities: t.entities,
|
|
133
132
|
filter: p,
|
|
134
133
|
backendFilter: $,
|
|
@@ -181,12 +180,12 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
181
180
|
updateActivity: I,
|
|
182
181
|
deleteActivity: E,
|
|
183
182
|
createReaction: Q,
|
|
184
|
-
deleteReaction:
|
|
183
|
+
deleteReaction: X
|
|
185
184
|
},
|
|
186
185
|
children: e
|
|
187
186
|
}
|
|
188
187
|
);
|
|
189
|
-
},
|
|
188
|
+
}, Xa = F.div`
|
|
190
189
|
display: grid;
|
|
191
190
|
grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
|
|
192
191
|
gap: var(--base-gap-large);
|
|
@@ -202,7 +201,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
202
201
|
301px + var(--padding-s) + var(--padding-s) + var(--base-gap-large)+ var(--base-gap-large)
|
|
203
202
|
);
|
|
204
203
|
overflow: auto;
|
|
205
|
-
`,
|
|
204
|
+
`, Ka = F.div`
|
|
206
205
|
position: relative;
|
|
207
206
|
display: flex;
|
|
208
207
|
flex-direction: column;
|
|
@@ -456,7 +455,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
456
455
|
.icon {
|
|
457
456
|
font-size: var(--icon-size);
|
|
458
457
|
}
|
|
459
|
-
`,
|
|
458
|
+
`, gc = F(yo)`
|
|
460
459
|
min-height: 90vh;
|
|
461
460
|
max-height: 90vh;
|
|
462
461
|
min-width: min(90vw, 100%);
|
|
@@ -551,7 +550,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
551
550
|
max-width: 90vw;
|
|
552
551
|
min-width: 300px;
|
|
553
552
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
554
|
-
`,
|
|
553
|
+
`, hc = F.div`
|
|
555
554
|
&.scrollable {
|
|
556
555
|
position: absolute;
|
|
557
556
|
inset: 56px;
|
|
@@ -773,7 +772,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
773
772
|
className: f,
|
|
774
773
|
...h
|
|
775
774
|
}) => {
|
|
776
|
-
const b = s && s < 100, [D, R] = L(!1), [v, y] = L(!1), { feedAnnotationsEnabled: A } = ze(), { entities: C } = Re(), S = e.split("."), M = S.pop() || "", I = S.join("."), E = gt(t || "." + M), P = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0,
|
|
775
|
+
const b = s && s < 100, [D, R] = L(!1), [v, y] = L(!1), { feedAnnotationsEnabled: A } = ze(), { entities: C } = Re(), S = e.split("."), M = S.pop() || "", I = S.join("."), E = gt(t || "." + M), P = t?.includes("image/") || !!n, Q = !!t?.includes("video/") && !n && o ? `${o}/thumbnail` : void 0, X = /* @__PURE__ */ x(Ae, { children: [
|
|
777
776
|
/* @__PURE__ */ c("span", { className: "size", children: vo(r) }),
|
|
778
777
|
/* @__PURE__ */ c(re, { icon: "download", className: "download-icon" })
|
|
779
778
|
] }), q = N(
|
|
@@ -788,7 +787,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
788
787
|
return isNaN(J) ? q?.range ?? [1, 1] : [J - 1 + q.range[0], J - 1 + q.range[1]];
|
|
789
788
|
}, [q]);
|
|
790
789
|
return /* @__PURE__ */ x(
|
|
791
|
-
|
|
790
|
+
Ka,
|
|
792
791
|
{
|
|
793
792
|
className: te(f, {
|
|
794
793
|
compact: l,
|
|
@@ -884,7 +883,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
884
883
|
M
|
|
885
884
|
] })
|
|
886
885
|
] }) }),
|
|
887
|
-
u && (i ? /* @__PURE__ */ c("div", { className: "download", children:
|
|
886
|
+
u && (i ? /* @__PURE__ */ c("div", { className: "download", children: X }) : /* @__PURE__ */ c("a", { href: o, target: "_blank", rel: "noopener noreferrer", className: "download", children: X }))
|
|
888
887
|
]
|
|
889
888
|
}
|
|
890
889
|
),
|
|
@@ -913,7 +912,7 @@ const Wa = (e) => e.replace(/\r\n?/g, `
|
|
|
913
912
|
},
|
|
914
913
|
[i]
|
|
915
914
|
);
|
|
916
|
-
return /* @__PURE__ */ c(
|
|
915
|
+
return /* @__PURE__ */ c(Xa, { className: te({ compact: o }), ...p, children: e.map((g, f) => /* @__PURE__ */ c(
|
|
917
916
|
fr,
|
|
918
917
|
{
|
|
919
918
|
id: g.id || g.name,
|
|
@@ -1420,19 +1419,19 @@ const _n = (e) => {
|
|
|
1420
1419
|
isGuest: I,
|
|
1421
1420
|
userName: E,
|
|
1422
1421
|
editingId: P
|
|
1423
|
-
} = Re(), { hasLicense: H, onPowerFeature: Q, user:
|
|
1422
|
+
} = Re(), { hasLicense: H, onPowerFeature: Q, user: X, openSlideOut: q, commentFrameLink: $ } = ze(), ue = X?.data?.isAdmin, J = Ea(), [, W] = Fn(), [ve, O] = L(e || ""), [ne, K] = L(
|
|
1424
1423
|
() => t.map(
|
|
1425
1424
|
(d) => ln(d.id, e || "") ? { ...d, isInline: !0 } : d
|
|
1426
1425
|
)
|
|
1427
1426
|
), [Ye, Te] = L(0), De = fe(/* @__PURE__ */ new Map()), [me, pe] = L([]), [Ie, Z] = L(!1), [Ne, $e] = L(!1), [Ee, Fe] = L([]), [Je, Le] = L([]), { annotations: ye, removeAnnotation: Ue, goToAnnotation: Be } = Ar({
|
|
1428
1427
|
entityId: y[0]?.id,
|
|
1429
1428
|
filesUploading: me
|
|
1430
|
-
}), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0,
|
|
1429
|
+
}), oe = y.length === 1 && y[0].entityType === "version" ? y[0] : void 0, Xe = $?.draft && $.draft.entityId === oe?.id ? $.draft : null, [Me, Ge] = L(
|
|
1431
1430
|
() => m && Number.isSafeInteger(n?.startFrame) && n.startFrame > 0 ? {
|
|
1432
1431
|
startFrame: n.startFrame,
|
|
1433
1432
|
endFrame: Number.isSafeInteger(n.endFrame) && n.endFrame >= n.startFrame ? n.endFrame : n.startFrame
|
|
1434
1433
|
} : null
|
|
1435
|
-
), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe = m || Me?.entityId === oe?.id ? Me : null, [be, Pe] = L(!1), w = m ? Oe : Oe ??
|
|
1434
|
+
), _e = (d) => Ge(d && { ...d, entityId: oe?.id }), Oe = m || Me?.entityId === oe?.id ? Me : null, [be, Pe] = L(!1), w = m ? Oe : Oe ?? Xe, _ = m ? !!oe || !!Oe : !!$ && !!oe, j = $?.formatFrame ?? String, U = w ? w.endFrame > w.startFrame ? `${j(w.startFrame)}-${j(w.endFrame)}` : j(w.startFrame) : void 0, [ie, T] = L(U ?? ""), le = fe(!1), we = fe(null), xe = (d) => {
|
|
1436
1435
|
if (!oe) return;
|
|
1437
1436
|
const k = d ? { ...d, entityId: oe.id } : null;
|
|
1438
1437
|
if (!m) {
|
|
@@ -1496,15 +1495,15 @@ const _n = (e) => {
|
|
|
1496
1495
|
draft: { text: ve, files: ne, uploadedAnnotations: Ee, category: Se },
|
|
1497
1496
|
paused: Ne,
|
|
1498
1497
|
restore: (d) => {
|
|
1499
|
-
O(d.text),
|
|
1498
|
+
O(d.text), K(d.files), Fe(d.uploadedAnnotations), dt(d.category), (d.text.trim() || d.files.length || d.uploadedAnnotations.length) && !h && !P && b?.();
|
|
1500
1499
|
}
|
|
1501
1500
|
});
|
|
1502
|
-
const Pt = M.filter((d) => d.accessLevel >= 20), Rt = M.find((d) => d.name === Se), $t = Nn(Rt?.color),
|
|
1501
|
+
const Pt = M.filter((d) => d.accessLevel >= 20), Rt = M.find((d) => d.name === Se), $t = Nn(Rt?.color), Ke = fe(null), Lt = fe(null), ft = !!ve.trim(), Ot = !!C?.conditions?.some(
|
|
1503
1502
|
(d) => "key" in d && d.key === "checklists" && d.value === !0
|
|
1504
1503
|
);
|
|
1505
1504
|
Y(() => {
|
|
1506
1505
|
if (!h || m || !Ot) return;
|
|
1507
|
-
const d =
|
|
1506
|
+
const d = Ke.current;
|
|
1508
1507
|
!d || !d.isEmpty() || d.getEditor().update(() => {
|
|
1509
1508
|
const k = go(!1);
|
|
1510
1509
|
fo().clear().append(ho("check").append(k)), k.select();
|
|
@@ -1544,11 +1543,11 @@ const _n = (e) => {
|
|
|
1544
1543
|
order: ne.length,
|
|
1545
1544
|
isAnnotationLayer: z
|
|
1546
1545
|
};
|
|
1547
|
-
return
|
|
1546
|
+
return K((se) => [...se, B]), pe(
|
|
1548
1547
|
(se) => se.filter((ce) => he(ce.name) !== V)
|
|
1549
1548
|
), B;
|
|
1550
1549
|
}, Yn = (d, k, z) => {
|
|
1551
|
-
z ? Ue?.(d) : (
|
|
1550
|
+
z ? Ue?.(d) : (K((V) => V.filter((B) => B.id !== d)), pe((V) => V.filter((B) => he(B.name) !== he(k))));
|
|
1552
1551
|
}, et = (d, k) => {
|
|
1553
1552
|
const z = Math.round(d.loaded * 100 / d.total);
|
|
1554
1553
|
if (z !== 100) {
|
|
@@ -1581,14 +1580,14 @@ const _n = (e) => {
|
|
|
1581
1580
|
const k = De.current.get(d);
|
|
1582
1581
|
if (k) {
|
|
1583
1582
|
const { data: B } = await k;
|
|
1584
|
-
return
|
|
1583
|
+
return K((se) => se.map((ce) => ce.id === B.id ? { ...ce, isInline: !0 } : ce)), {
|
|
1585
1584
|
src: cn(v, B.id),
|
|
1586
1585
|
name: he(d.name),
|
|
1587
1586
|
mime: d.type
|
|
1588
1587
|
};
|
|
1589
1588
|
}
|
|
1590
1589
|
const { data: z } = await Qe(d, v, void 0), V = he(d.name);
|
|
1591
|
-
return
|
|
1590
|
+
return K((B) => [
|
|
1592
1591
|
...B,
|
|
1593
1592
|
{ id: z.id, name: V, mime: d.type, size: d.size, order: B.length, isInline: !0 }
|
|
1594
1593
|
]), { src: cn(v, z.id), name: V, mime: d.type };
|
|
@@ -1597,7 +1596,7 @@ const _n = (e) => {
|
|
|
1597
1596
|
} finally {
|
|
1598
1597
|
Te((k) => k - 1);
|
|
1599
1598
|
}
|
|
1600
|
-
},
|
|
1599
|
+
}, Xn = (d) => {
|
|
1601
1600
|
Z(!1), !d.defaultPrevented && xr(
|
|
1602
1601
|
d,
|
|
1603
1602
|
v,
|
|
@@ -1605,7 +1604,7 @@ const _n = (e) => {
|
|
|
1605
1604
|
Ze,
|
|
1606
1605
|
(k) => ut(k.name)
|
|
1607
1606
|
);
|
|
1608
|
-
},
|
|
1607
|
+
}, Kn = (d) => {
|
|
1609
1608
|
d.preventDefault(), d.stopPropagation(), Z(!0);
|
|
1610
1609
|
}, Bt = fe(null), Zn = async ({ activity: d }) => {
|
|
1611
1610
|
const k = Mt(d);
|
|
@@ -1616,7 +1615,7 @@ const _n = (e) => {
|
|
|
1616
1615
|
`);
|
|
1617
1616
|
O((ge) => ge.trim() ? `${ge.trim()}
|
|
1618
1617
|
|
|
1619
|
-
${ee}` : ee),
|
|
1618
|
+
${ee}` : ee), Ke.current?.focus();
|
|
1620
1619
|
}, Ve = async (G) => {
|
|
1621
1620
|
const de = B.has(G.id);
|
|
1622
1621
|
try {
|
|
@@ -1629,7 +1628,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1629
1628
|
);
|
|
1630
1629
|
if (de) {
|
|
1631
1630
|
const { file: ge, data: tt } = ae, mt = he(ge.name);
|
|
1632
|
-
|
|
1631
|
+
K((Wt) => [
|
|
1633
1632
|
...Wt,
|
|
1634
1633
|
{ id: tt.id, name: mt, mime: ge.type, size: ge.size, order: Wt.length, isInline: de }
|
|
1635
1634
|
]);
|
|
@@ -1698,7 +1697,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1698
1697
|
const { files: de, metadata: ae } = await eo(ye);
|
|
1699
1698
|
d = de, k = [...k, ...ae], z = ae.map((ee) => ee.id), Le(z);
|
|
1700
1699
|
}
|
|
1701
|
-
const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se = yr(
|
|
1700
|
+
const { annotations: V = [] } = n || {}, B = k.length ? [...V, ...k] : void 0, se = yr(Ke.current?.getMarkdown() ?? ve), ce = ne.filter((de) => !de.isInline || ln(de.id, se)), Ve = [...ce, ...d], G = {
|
|
1702
1701
|
...n,
|
|
1703
1702
|
annotations: B,
|
|
1704
1703
|
// could be undefined
|
|
@@ -1710,11 +1709,11 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1710
1709
|
};
|
|
1711
1710
|
if ((se || Ve.length) && i) {
|
|
1712
1711
|
const de = ve;
|
|
1713
|
-
O(""),
|
|
1712
|
+
O(""), K([]);
|
|
1714
1713
|
try {
|
|
1715
1714
|
await i(se, Ve, G), z.forEach((ae) => Ue?.(ae)), m && $?.setEditPreview(null), Fe([]), !m && w && $?.unlink(), m || _e(null);
|
|
1716
1715
|
} catch {
|
|
1717
|
-
O(de),
|
|
1716
|
+
O(de), K(ce), Fe(Ee);
|
|
1718
1717
|
return;
|
|
1719
1718
|
}
|
|
1720
1719
|
}
|
|
@@ -1795,9 +1794,9 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1795
1794
|
Io,
|
|
1796
1795
|
{
|
|
1797
1796
|
className: te("comment-container", "md-mention-anchor", { isOpen: h, isEditing: m }),
|
|
1798
|
-
onDragOver:
|
|
1797
|
+
onDragOver: Kn,
|
|
1799
1798
|
onDragLeave: () => Z(!1),
|
|
1800
|
-
onDrop:
|
|
1799
|
+
onDrop: Xn,
|
|
1801
1800
|
onClick: () => Z(!1),
|
|
1802
1801
|
onKeyDown: (d) => d.stopPropagation(),
|
|
1803
1802
|
children: [
|
|
@@ -1847,7 +1846,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1847
1846
|
/* @__PURE__ */ c(
|
|
1848
1847
|
_o,
|
|
1849
1848
|
{
|
|
1850
|
-
ref:
|
|
1849
|
+
ref: Ke,
|
|
1851
1850
|
className: "comment-editor",
|
|
1852
1851
|
value: ve,
|
|
1853
1852
|
onChange: O,
|
|
@@ -1883,7 +1882,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
1883
1882
|
icon: k,
|
|
1884
1883
|
variant: "text",
|
|
1885
1884
|
onMouseDown: (V) => V.preventDefault(),
|
|
1886
|
-
onClick: () =>
|
|
1885
|
+
onClick: () => Ke.current?.insertMentionTrigger(d),
|
|
1887
1886
|
"data-tooltip": z,
|
|
1888
1887
|
"data-shortcut": d
|
|
1889
1888
|
},
|
|
@@ -2114,7 +2113,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
2114
2113
|
"heart_plus",
|
|
2115
2114
|
"celebration",
|
|
2116
2115
|
"notes"
|
|
2117
|
-
],
|
|
2116
|
+
], Xr = (e) => [...e].sort(
|
|
2118
2117
|
(o, n) => Tt.indexOf(o.type) - Tt.indexOf(n.type)
|
|
2119
2118
|
), $n = ({
|
|
2120
2119
|
reaction: e,
|
|
@@ -2140,7 +2139,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
2140
2139
|
]
|
|
2141
2140
|
}
|
|
2142
2141
|
);
|
|
2143
|
-
},
|
|
2142
|
+
}, Kr = ({
|
|
2144
2143
|
reactions: e,
|
|
2145
2144
|
changeHandler: t,
|
|
2146
2145
|
categoryPrimary: o,
|
|
@@ -2235,7 +2234,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
2235
2234
|
...i
|
|
2236
2235
|
}
|
|
2237
2236
|
),
|
|
2238
|
-
/* @__PURE__ */ c(
|
|
2237
|
+
/* @__PURE__ */ c(Kr, { reactions: e, changeHandler: t, ...i })
|
|
2239
2238
|
] });
|
|
2240
2239
|
}, ti = (e = "") => (e.match(/\((.*?)\)/g) || []).flatMap((o) => {
|
|
2241
2240
|
if (o.includes("http")) return [];
|
|
@@ -2309,7 +2308,7 @@ ${ee}` : ee), Xe.current?.focus();
|
|
|
2309
2308
|
return e.forEach((n) => {
|
|
2310
2309
|
const a = n.reaction;
|
|
2311
2310
|
Tt.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));
|
|
2312
|
-
}),
|
|
2311
|
+
}), Xr(Object.values(o));
|
|
2313
2312
|
}, ci = F.div`
|
|
2314
2313
|
display: flex;
|
|
2315
2314
|
align-items: center;
|
|
@@ -2661,7 +2660,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2661
2660
|
} = Re(), S = fe(null), { toggleMenuOpen: M, menuOpen: I } = Ma(), { categoryData: E, categoryNotFound: P } = Ln(e?.activityData?.category), H = Nn(E?.color);
|
|
2662
2661
|
let {
|
|
2663
2662
|
body: Q,
|
|
2664
|
-
authorName:
|
|
2663
|
+
authorName: X,
|
|
2665
2664
|
authorFullName: q,
|
|
2666
2665
|
createdAt: $,
|
|
2667
2666
|
referenceType: ue,
|
|
@@ -2670,9 +2669,9 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2670
2669
|
author: ve,
|
|
2671
2670
|
isOwner: O,
|
|
2672
2671
|
files: ne = [],
|
|
2673
|
-
origin:
|
|
2672
|
+
origin: K
|
|
2674
2673
|
} = e;
|
|
2675
|
-
|
|
2674
|
+
X || (X = ve?.name || ""), q = On({ name: X, label: q });
|
|
2676
2675
|
const Ye = lo(), Te = `activity-comment-menu-${W}-${Ye}`, De = I === Te, { onGoToFrame: me, setHighlightedActivities: pe, user: Ie, commentFrameLink: Z } = ze(), Ne = !!Ie?.data?.isAdmin, $e = O || Ne, Ee = O || Ne, Fe = () => {
|
|
2677
2676
|
y(W);
|
|
2678
2677
|
}, Je = () => {
|
|
@@ -2683,8 +2682,8 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2683
2682
|
document.getElementById(T) ? pe([T]) : window.open(le, "_blank", "noreferrer");
|
|
2684
2683
|
}, Be = ue !== "origin" || m, oe = async () => {
|
|
2685
2684
|
const T = ti(Q);
|
|
2686
|
-
Be &&
|
|
2687
|
-
},
|
|
2685
|
+
Be && K && T.push({ id: K.id, type: K.type }), o && await o(W, J, T);
|
|
2686
|
+
}, Xe = () => {
|
|
2688
2687
|
qa({
|
|
2689
2688
|
title: "Delete comment",
|
|
2690
2689
|
message: "Are you sure you want to delete this comment?",
|
|
@@ -2744,7 +2743,7 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2744
2743
|
/* @__PURE__ */ c(
|
|
2745
2744
|
jn,
|
|
2746
2745
|
{
|
|
2747
|
-
name:
|
|
2746
|
+
name: X,
|
|
2748
2747
|
fullName: q,
|
|
2749
2748
|
date: $,
|
|
2750
2749
|
isRef: Be,
|
|
@@ -2756,11 +2755,11 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2756
2755
|
children: void 0
|
|
2757
2756
|
}
|
|
2758
2757
|
),
|
|
2759
|
-
/* @__PURE__ */ x(
|
|
2760
|
-
!f && /* @__PURE__ */ x(
|
|
2761
|
-
Ee && /* @__PURE__ */ c(
|
|
2758
|
+
/* @__PURE__ */ x(Xo, { className: te("comment-body", { isEditing: ye }), children: [
|
|
2759
|
+
!f && /* @__PURE__ */ x(Ko, { className: "tools", children: [
|
|
2760
|
+
Ee && /* @__PURE__ */ c(Xt, { icon: "edit_square", onClick: Fe, variant: "text" }),
|
|
2762
2761
|
/* @__PURE__ */ c(
|
|
2763
|
-
|
|
2762
|
+
Xt,
|
|
2764
2763
|
{
|
|
2765
2764
|
icon: "more_horiz",
|
|
2766
2765
|
ref: S,
|
|
@@ -2812,8 +2811,8 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2812
2811
|
a: (T) => (
|
|
2813
2812
|
// @ts-ignore
|
|
2814
2813
|
oa(T, {
|
|
2815
|
-
entityId:
|
|
2816
|
-
entityType:
|
|
2814
|
+
entityId: K?.id ?? J,
|
|
2815
|
+
entityType: K?.type ?? l,
|
|
2817
2816
|
userName: b,
|
|
2818
2817
|
userTeamNames: C,
|
|
2819
2818
|
projectName: i,
|
|
@@ -2890,14 +2889,14 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
2890
2889
|
children: /* @__PURE__ */ c(
|
|
2891
2890
|
Fi,
|
|
2892
2891
|
{
|
|
2893
|
-
onDelete: $e && o ?
|
|
2892
|
+
onDelete: $e && o ? Xe : void 0,
|
|
2894
2893
|
onEdit: Ee ? Fe : void 0,
|
|
2895
2894
|
onCopyText: _ ? () => Cn(_) : void 0,
|
|
2896
2895
|
onDuplicate: a ? () => a(e) : void 0,
|
|
2897
2896
|
activityId: W,
|
|
2898
2897
|
onSelect: () => M(!1),
|
|
2899
2898
|
projectName: i,
|
|
2900
|
-
entity:
|
|
2899
|
+
entity: K ?? (J ? { id: J, type: l } : void 0)
|
|
2901
2900
|
}
|
|
2902
2901
|
)
|
|
2903
2902
|
}
|
|
@@ -3008,9 +3007,9 @@ const vi = "anonymous.guest", bi = "Anonymous User", wi = "unknown.user", On = (
|
|
|
3008
3007
|
}), C = (P) => {
|
|
3009
3008
|
const H = Array.isArray(P) ? P.map(String) : [];
|
|
3010
3009
|
if (!H.length) return { name: "none" };
|
|
3011
|
-
const Q = H.map((
|
|
3012
|
-
label:
|
|
3013
|
-
color: t?.tags?.find((q) => q.name ===
|
|
3010
|
+
const Q = H.map((X) => ({
|
|
3011
|
+
label: X,
|
|
3012
|
+
color: t?.tags?.find((q) => q.name === X)?.color
|
|
3014
3013
|
}));
|
|
3015
3014
|
return { name: H.join(", "), items: Q };
|
|
3016
3015
|
}, S = n === "status.change", M = (P, H) => S ? A(H) : b ? C(P) : Pi(P, v, p), I = M(m, i), E = M(g, l);
|
|
@@ -3397,7 +3396,7 @@ const Yi = F.ul`
|
|
|
3397
3396
|
padding: 16px 8px;
|
|
3398
3397
|
color: var(--md-sys-color-outline);
|
|
3399
3398
|
font-size: 11px;
|
|
3400
|
-
`,
|
|
3399
|
+
`, Xi = F.div`
|
|
3401
3400
|
height: 50px;
|
|
3402
3401
|
border-radius: 8px;
|
|
3403
3402
|
overflow: hidden;
|
|
@@ -3405,7 +3404,7 @@ const Yi = F.ul`
|
|
|
3405
3404
|
opacity: 0.5;
|
|
3406
3405
|
|
|
3407
3406
|
position: relative;
|
|
3408
|
-
`,
|
|
3407
|
+
`, Ki = ({
|
|
3409
3408
|
projectName: e,
|
|
3410
3409
|
entityType: t,
|
|
3411
3410
|
entities: o = [],
|
|
@@ -3452,7 +3451,7 @@ const Yi = F.ul`
|
|
|
3452
3451
|
return {
|
|
3453
3452
|
submitComment: async (v, y = [], A = {}) => {
|
|
3454
3453
|
const C = o.map(({ id: I, subTitle: E }) => {
|
|
3455
|
-
const P = tn(), H = y.map((J) => J.id), Q = a ? { ...A, entityList: a } : A,
|
|
3454
|
+
const P = tn(), H = y.map((J) => J.id), Q = a ? { ...A, entityList: a } : A, X = {
|
|
3456
3455
|
body: v,
|
|
3457
3456
|
activityType: "comment",
|
|
3458
3457
|
id: P,
|
|
@@ -3467,14 +3466,14 @@ const Yi = F.ul`
|
|
|
3467
3466
|
projectName: e,
|
|
3468
3467
|
entityType: t,
|
|
3469
3468
|
entityId: I,
|
|
3470
|
-
data:
|
|
3469
|
+
data: X,
|
|
3471
3470
|
patch: $,
|
|
3472
3471
|
filter: n,
|
|
3473
3472
|
...{ entityIds: g, activityTypes: m }
|
|
3474
3473
|
});
|
|
3475
3474
|
}), M = (await Promise.all(C)).filter((I) => I.error);
|
|
3476
3475
|
if (M.length > 0) {
|
|
3477
|
-
const I =
|
|
3476
|
+
const I = Kt(M[0].error) || "Failed to create comment";
|
|
3478
3477
|
throw ke.error(I), new Error(I);
|
|
3479
3478
|
}
|
|
3480
3479
|
},
|
|
@@ -3500,7 +3499,7 @@ const Yi = F.ul`
|
|
|
3500
3499
|
...E
|
|
3501
3500
|
});
|
|
3502
3501
|
} catch (P) {
|
|
3503
|
-
throw ke.error(
|
|
3502
|
+
throw ke.error(Kt(P)), P;
|
|
3504
3503
|
}
|
|
3505
3504
|
},
|
|
3506
3505
|
deleteComment: async (v, y, A = []) => {
|
|
@@ -3740,7 +3739,7 @@ const Yi = F.ul`
|
|
|
3740
3739
|
e.current.scrollTop === 0 || (t ? e.current.scrollBy(0, n) : e.current.scrollBy(0, -n));
|
|
3741
3740
|
}, [t, e, o]);
|
|
3742
3741
|
}, cs = (e = 50, t = 200) => Math.floor(Math.random() * (t - e + 1) + e), ls = (e) => new Array(e).fill(0).map((t, o) => /* @__PURE__ */ c(
|
|
3743
|
-
|
|
3742
|
+
Xi,
|
|
3744
3743
|
{
|
|
3745
3744
|
className: "loading",
|
|
3746
3745
|
style: { minHeight: cs(50, 150) }
|
|
@@ -4032,7 +4031,7 @@ function fs({
|
|
|
4032
4031
|
);
|
|
4033
4032
|
return N(() => s ?? l?.activities.at(-1), [s, l]);
|
|
4034
4033
|
}
|
|
4035
|
-
const
|
|
4034
|
+
const fc = 30, yc = ({
|
|
4036
4035
|
disabled: e,
|
|
4037
4036
|
readOnly: t,
|
|
4038
4037
|
statuses: o = [],
|
|
@@ -4065,7 +4064,7 @@ const yc = 30, vc = ({
|
|
|
4065
4064
|
} = Re(), {
|
|
4066
4065
|
openSlideOut: H,
|
|
4067
4066
|
highlightedActivities: Q,
|
|
4068
|
-
setHighlightedActivities:
|
|
4067
|
+
setHighlightedActivities: X,
|
|
4069
4068
|
onOpenImage: q,
|
|
4070
4069
|
setFeedAnnotations: $,
|
|
4071
4070
|
setFeedFrameLinks: ue,
|
|
@@ -4076,7 +4075,7 @@ const yc = 30, vc = ({
|
|
|
4076
4075
|
(w) => "key" in w && ["comments", "checklists", "versions", "updates"].includes(w.key) && w.value === !0
|
|
4077
4076
|
), O = S.conditions?.some(
|
|
4078
4077
|
(w) => "key" in w && (w.key === "comments" || w.key === "checklists") && w.value === !0
|
|
4079
|
-
), ne = u === "version" || u === "folder", { data:
|
|
4078
|
+
), ne = u === "version" || u === "folder", { data: K, isLoading: Ye } = Fa({ projectName: i }, { skip: !i }), De = !J.data?.isManager && !J.data?.isAdmin && !Ye && K?.activities?.enabled && !K?.activities?.activities?.includes("comment") || ve && !O, me = N(
|
|
4080
4079
|
() => us(h),
|
|
4081
4080
|
[h]
|
|
4082
4081
|
);
|
|
@@ -4131,7 +4130,7 @@ const yc = 30, vc = ({
|
|
|
4131
4130
|
deleteComment: Ee,
|
|
4132
4131
|
submitReview: Fe,
|
|
4133
4132
|
isSaving: Je
|
|
4134
|
-
} =
|
|
4133
|
+
} = Ki({
|
|
4135
4134
|
projectName: i,
|
|
4136
4135
|
entityType: u,
|
|
4137
4136
|
entities: l,
|
|
@@ -4170,14 +4169,14 @@ const yc = 30, vc = ({
|
|
|
4170
4169
|
if (!j || !["version", "task", "folder"].includes(j))
|
|
4171
4170
|
return console.log("Entity type not supported yet");
|
|
4172
4171
|
if (!_ || !j || !i) return console.log("No entity id or type found");
|
|
4173
|
-
H({ entityId: _, entityType: j, projectName: i }),
|
|
4172
|
+
H({ entityId: _, entityType: j, projectName: i }), X([U]);
|
|
4174
4173
|
}, oe = ({ index: w, activityId: _ }) => {
|
|
4175
4174
|
const j = Object.values(Ie).reverse().filter((U) => U.activityType == "comment").map((U) => ({
|
|
4176
4175
|
id: U.activityId,
|
|
4177
4176
|
files: U.files.filter((ie) => gt(ie.mime, ie.ext))
|
|
4178
4177
|
})).filter((U) => U.files.length > 0);
|
|
4179
4178
|
q?.({ files: j, activityId: _, index: w, projectName: i });
|
|
4180
|
-
}, [
|
|
4179
|
+
}, [Xe, Me] = L(null), Ge = !De && !t && !e, _e = We(
|
|
4181
4180
|
(w) => {
|
|
4182
4181
|
Me({ key: gn(), activity: w }), g(nt);
|
|
4183
4182
|
},
|
|
@@ -4259,7 +4258,7 @@ const yc = 30, vc = ({
|
|
|
4259
4258
|
versionReview: r,
|
|
4260
4259
|
lastOwnVersionReview: be,
|
|
4261
4260
|
onReview: ye,
|
|
4262
|
-
duplicate:
|
|
4261
|
+
duplicate: Xe,
|
|
4263
4262
|
onDuplicateHandled: () => Me(null),
|
|
4264
4263
|
saveDraft: s
|
|
4265
4264
|
}
|
|
@@ -4269,14 +4268,14 @@ const yc = 30, vc = ({
|
|
|
4269
4268
|
export {
|
|
4270
4269
|
$r as A,
|
|
4271
4270
|
_r as C,
|
|
4272
|
-
|
|
4271
|
+
gc as D,
|
|
4273
4272
|
nt as F,
|
|
4274
4273
|
an as P,
|
|
4275
|
-
|
|
4274
|
+
hc as S,
|
|
4276
4275
|
ot as a,
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4276
|
+
yc as b,
|
|
4277
|
+
pc as c,
|
|
4278
|
+
fc as d,
|
|
4280
4279
|
pr as e,
|
|
4281
4280
|
gt as f,
|
|
4282
4281
|
Lr as i
|