@ynput/ayon-frontend-shared 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContextMenu.es.js +34 -16
- package/dist/DetailsPanel.es.js +292 -298
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +32 -35
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4451 -2965
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/chunks/Actions.es.js +9 -4
- package/dist/chunks/ColumnDropIndicator.es.js +174 -328
- package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
- package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
- package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +58 -53
- package/dist/chunks/EntityPickerDialog.es.js +24 -20
- package/dist/chunks/EntityTooltip.es.js +20 -13
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +1495 -1439
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -65
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2835 -4301
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +1532 -1594
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +457 -458
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +163 -154
- package/dist/chunks/TableSettingsFallback.es.js +25 -13
- package/dist/chunks/ThumbnailSimple.es.js +150 -261
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +384 -389
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +61 -16
- package/dist/chunks/getUris.es.js +737 -712
- package/dist/chunks/searchTerms.es.js +57 -56
- package/dist/chunks/useAttributeEnums.es.js +4 -4
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useHierarchySelection.es.js +24 -0
- package/dist/chunks/useLoadModule.es.js +74 -0
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
- package/dist/chunks/versionUploadHelpers.es.js +16 -42
- package/dist/chunks/viewUpdateHelper.es.js +67 -50
- package/dist/components.es.js +1425 -999
- package/dist/context.es.js +791 -80
- package/dist/hooks.es.js +115 -120
- package/dist/index.es.js +19 -23
- package/dist/types/Actions.d.ts +7 -7
- package/dist/types/ContextMenu.d.ts +11 -8
- package/dist/types/DetailsPanel.d.ts +102 -9
- package/dist/types/EntityPickerDialog.d.ts +7 -7
- package/dist/types/Feed.d.ts +11 -8
- package/dist/types/ListTable.d.ts +7 -7
- package/dist/types/NewEntity.d.ts +16 -10
- package/dist/types/ProjectTreeTable.d.ts +22 -115
- package/dist/types/RepresentationsList.d.ts +7 -7
- package/dist/types/SimpleTable.d.ts +11 -8
- package/dist/types/Slicer.d.ts +10 -7
- package/dist/types/Views.d.ts +10 -7
- package/dist/types/api.d.ts +132 -120
- package/dist/types/components.d.ts +13 -8
- package/dist/types/context.d.ts +56 -16
- package/dist/types/hooks.d.ts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/util.d.ts +12 -7
- package/dist/util.es.js +72 -71
- package/package.json +1 -1
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/DetailsPanelContext.es.js +0 -155
- package/dist/chunks/GlobalContext.es.js +0 -52
- package/dist/chunks/NewEntityContext.es.js +0 -1242
- package/dist/chunks/ProjectFoldersContext.es.js +0 -134
- package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
- package/dist/chunks/VersionUploadContext.es.js +0 -232
- package/dist/chunks/ViewsContext.es.js +0 -878
- package/dist/chunks/uriUtils.es.js +0 -48
- package/dist/chunks/useColumnDragRestriction.es.js +0 -158
- package/dist/chunks/useLocalStorage.es.js +0 -355
- package/dist/chunks/useSessionStorage.es.js +0 -61
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { R as
|
|
1
|
+
import { jsx as o, jsxs as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { R as e, P as n } from "./ReviewablesSelector.es.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@ynput/ayon-react-components";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import "@module-federation/enhanced/runtime";
|
|
6
|
+
import "./searchTerms.es.js";
|
|
7
|
+
import "./getUris.es.js";
|
|
8
|
+
import "primereact/confirmdialog";
|
|
9
|
+
import { a as c } from "./DeleteEntitiesContextInstance.es.js";
|
|
10
|
+
import "lodash";
|
|
11
|
+
import "react-toastify";
|
|
12
|
+
import "uuid";
|
|
13
|
+
import "semver";
|
|
14
|
+
import "./ContextMenuContextInstance.es.js";
|
|
15
|
+
import "clsx";
|
|
16
|
+
import "react-dom";
|
|
17
|
+
import "react-redux";
|
|
18
|
+
const A = ({
|
|
7
19
|
requiredVersion: r,
|
|
8
20
|
feature: t,
|
|
9
|
-
button:
|
|
10
|
-
children:
|
|
21
|
+
button: i,
|
|
22
|
+
children: m
|
|
11
23
|
}) => {
|
|
12
|
-
const { setPowerpackDialog:
|
|
13
|
-
return r ? /* @__PURE__ */ o(
|
|
14
|
-
!!
|
|
15
|
-
|
|
24
|
+
const { setPowerpackDialog: p } = c();
|
|
25
|
+
return r ? /* @__PURE__ */ o(e, { requiredVersion: r }) : /* @__PURE__ */ a(s, { children: [
|
|
26
|
+
!!i && /* @__PURE__ */ o(
|
|
27
|
+
n,
|
|
16
28
|
{
|
|
17
29
|
style: { width: "100%" },
|
|
18
30
|
icon: "add",
|
|
19
31
|
variant: "filled",
|
|
20
|
-
...
|
|
32
|
+
...i,
|
|
21
33
|
feature: t
|
|
22
34
|
}
|
|
23
35
|
),
|
|
24
|
-
/* @__PURE__ */ o("div", { onClick: () =>
|
|
36
|
+
/* @__PURE__ */ o("div", { onClick: () => p(t), children: m })
|
|
25
37
|
] });
|
|
26
38
|
};
|
|
27
39
|
export {
|
|
28
|
-
|
|
40
|
+
A as T
|
|
29
41
|
};
|
|
@@ -1,91 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createPortal as
|
|
3
|
-
import {
|
|
4
|
-
import { aQ as
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { createPortal as R } from "react-dom";
|
|
3
|
+
import { createContext as z, useContext as L, useEffect as $ } from "react";
|
|
4
|
+
import { aQ as j } from "./searchTerms.es.js";
|
|
5
|
+
import { C as A } from "./getUris.es.js";
|
|
6
6
|
import "primereact/confirmdialog";
|
|
7
|
-
import
|
|
8
|
-
import { e as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import y, { keyframes as Te } from "styled-components";
|
|
12
|
-
import { Icon as P, Dialog as ke, FormRow as I, InputDate as j, SaveButton as Me } from "@ynput/ayon-react-components";
|
|
13
|
-
import { a as _e } from "./EntityTooltip.es.js";
|
|
14
|
-
import { format as L, parse as R } from "date-fns";
|
|
7
|
+
import "lodash";
|
|
8
|
+
import { e as F } from "./expandRelativeDates.es.js";
|
|
9
|
+
import "@module-federation/enhanced/runtime";
|
|
10
|
+
import "./DeleteEntitiesContextInstance.es.js";
|
|
15
11
|
import "react-toastify";
|
|
16
12
|
import "uuid";
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
[e]
|
|
29
|
-
).map((p) => p.id), a = !e.length || !t || !n || !r, f = {
|
|
30
|
-
entityIds: o,
|
|
31
|
-
projectName: r,
|
|
32
|
-
referenceTypes: ["origin", "mention", "relation"],
|
|
33
|
-
activityTypes: n,
|
|
34
|
-
activityFilter: i,
|
|
35
|
-
filter: t
|
|
36
|
-
};
|
|
37
|
-
let {
|
|
38
|
-
data: u,
|
|
39
|
-
isLoading: l,
|
|
40
|
-
isFetchingNextPage: h,
|
|
41
|
-
currentData: v,
|
|
42
|
-
fetchNextPage: w,
|
|
43
|
-
hasNextPage: x
|
|
44
|
-
} = ae(f, { skip: a });
|
|
45
|
-
const T = b(() => u?.pages ? u.pages.flatMap((p) => p.activities || []) : [], [u?.pages]), k = b(() => v?.pages ? v.pages.flatMap((p) => p.activities || []) : [], [v?.pages]), N = async () => {
|
|
46
|
-
if (!x) {
|
|
47
|
-
console.log("No more activities to load");
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
return console.log("loading next page..."), await w();
|
|
51
|
-
}, A = b(() => {
|
|
52
|
-
if (!l) return !1;
|
|
53
|
-
const p = ve(
|
|
54
|
-
k?.flatMap((M) => M.entityId ? M.entityId : [])
|
|
55
|
-
);
|
|
56
|
-
return !he(p, o);
|
|
57
|
-
}, [k, o, l]);
|
|
58
|
-
return a && (l = !0), {
|
|
59
|
-
activitiesData: T,
|
|
60
|
-
isLoadingActivities: l,
|
|
61
|
-
isLoadingNew: A,
|
|
62
|
-
isLoadingNextPage: h,
|
|
63
|
-
hasNextPage: x,
|
|
64
|
-
loadNextPage: N
|
|
65
|
-
};
|
|
66
|
-
}, Ee = new Set(Object.keys(se).filter((e) => e !== "activity")), Ce = {
|
|
13
|
+
import "semver";
|
|
14
|
+
import { Icon as w, Dialog as N, FormRow as v, InputDate as x, SaveButton as B } from "@ynput/ayon-react-components";
|
|
15
|
+
import "./ContextMenuContextInstance.es.js";
|
|
16
|
+
import "clsx";
|
|
17
|
+
import "react-redux";
|
|
18
|
+
import { U } from "./PlayableIcon.es.js";
|
|
19
|
+
import p, { keyframes as O } from "styled-components";
|
|
20
|
+
import { a as K } from "./EntityTooltip.es.js";
|
|
21
|
+
import { format as b, parse as k } from "date-fns";
|
|
22
|
+
import { g as P } from "./getThumbnailUrl.es.js";
|
|
23
|
+
const Y = new Set(Object.keys(A).filter((e) => e !== "activity")), D = {
|
|
67
24
|
has_attachments: "activity_data.files",
|
|
68
25
|
// not `entity_type`: on inbox rows that column is always 'user'
|
|
69
26
|
origin_type: "activity_data.origin.type"
|
|
70
|
-
},
|
|
71
|
-
const t =
|
|
27
|
+
}, q = (e) => !!e && "key" in e, H = (e) => {
|
|
28
|
+
const t = D[e.key] ?? e.key;
|
|
72
29
|
if (e.key === "has_attachments")
|
|
73
30
|
return e.value ? { key: t, operator: "ne", value: [] } : null;
|
|
74
31
|
if (e.key === "in_review_session")
|
|
75
32
|
return e.value ? { key: "activity_data.entityList", operator: "notnull" } : null;
|
|
76
33
|
if (e.key === "category") {
|
|
77
|
-
const
|
|
34
|
+
const o = Array.isArray(e.value) ? e.value : [], n = o.includes("__none__"), s = o.filter((a) => a !== "__none__"), l = {
|
|
78
35
|
operator: "or",
|
|
79
36
|
conditions: [
|
|
80
37
|
{ key: "activity_data.category", operator: "isnull" },
|
|
81
38
|
{ key: "activity_data.category", operator: "eq", value: "" }
|
|
82
39
|
]
|
|
83
|
-
},
|
|
40
|
+
}, c = {
|
|
84
41
|
key: "activity_data.category",
|
|
85
42
|
operator: "in",
|
|
86
|
-
value:
|
|
43
|
+
value: s
|
|
87
44
|
};
|
|
88
|
-
return n &&
|
|
45
|
+
return n && s.length ? { operator: "or", conditions: [l, c] } : n ? l : s.length ? c : null;
|
|
89
46
|
}
|
|
90
47
|
return e.key === "body" && e.operator === "like" && typeof e.value == "string" ? { ...e, key: t, value: `%${e.value}%` } : e.key === "author" ? {
|
|
91
48
|
operator: "or",
|
|
@@ -94,98 +51,30 @@ const Ae = ({
|
|
|
94
51
|
{ ...e, key: "activity_data.assignee" }
|
|
95
52
|
]
|
|
96
53
|
} : { ...e, key: t };
|
|
97
|
-
},
|
|
98
|
-
if (
|
|
99
|
-
return
|
|
100
|
-
const t = (e.conditions || []).map((
|
|
54
|
+
}, C = (e) => {
|
|
55
|
+
if (q(e))
|
|
56
|
+
return Y.has(e.key) ? null : H(e);
|
|
57
|
+
const t = (e.conditions || []).map((o) => C(o)).filter((o) => o !== null);
|
|
101
58
|
return t.length === 0 ? null : { operator: e.operator || "and", conditions: t };
|
|
102
|
-
},
|
|
59
|
+
}, Q = (e) => {
|
|
103
60
|
if (!e || !e.conditions?.length) return null;
|
|
104
|
-
const t =
|
|
105
|
-
return
|
|
106
|
-
},
|
|
107
|
-
const t =
|
|
61
|
+
const t = F(e), o = C(t);
|
|
62
|
+
return o || null;
|
|
63
|
+
}, $e = (e) => {
|
|
64
|
+
const t = Q(e);
|
|
108
65
|
if (t)
|
|
109
66
|
return JSON.stringify(t);
|
|
110
|
-
},
|
|
111
|
-
const
|
|
112
|
-
{ projectName: t.projectName, showMembers: !0 },
|
|
113
|
-
{ skip: !t.projectName }
|
|
114
|
-
), c = b(
|
|
115
|
-
() => r.filter((m) => m.members?.some((ee) => ee.name === t.userName)).map((m) => m.name),
|
|
116
|
-
[r, t.userName]
|
|
117
|
-
), [d, o] = _({
|
|
118
|
-
operator: "and",
|
|
119
|
-
conditions: []
|
|
120
|
-
}), [a, f] = _(""), u = t.feedFilter ?? d, l = t.setFeedFilter ?? o, [h, v] = _(null), [w, x] = _(null), [T, { isLoading: k }] = ce(), [N, { isLoading: A }] = le(), [p, { isLoading: M }] = de(), G = k || A || M, B = async (m) => await T(m).unwrap(), O = async (m) => await N(m).unwrap(), K = async (m) => await p(m).unwrap(), [q] = ue(), [Y] = me(), W = async (m) => await q(m).unwrap(), H = async (m) => await Y(m).unwrap(), C = pe(u), F = b(() => Le(u), [u]), J = Ae({
|
|
121
|
-
entities: t.entities,
|
|
122
|
-
filter: u,
|
|
123
|
-
backendFilter: F,
|
|
124
|
-
activityTypes: C,
|
|
125
|
-
projectName: t.projectName,
|
|
126
|
-
entityType: t.entityType
|
|
127
|
-
}), { data: V = {} } = ye(
|
|
128
|
-
{
|
|
129
|
-
suggestRequest: {
|
|
130
|
-
entityType: t.entityType,
|
|
131
|
-
entityId: t.entities[0]?.id
|
|
132
|
-
},
|
|
133
|
-
projectName: t.projectName
|
|
134
|
-
},
|
|
135
|
-
{ skip: !h }
|
|
136
|
-
), { data: X = [] } = fe({
|
|
137
|
-
projectName: t.projectName
|
|
138
|
-
}), { data: Z } = ge(
|
|
139
|
-
{
|
|
140
|
-
projectName: t.projectName,
|
|
141
|
-
entityIds: t.entities.map((m) => m.id)
|
|
142
|
-
},
|
|
143
|
-
{ skip: !t.projectName || !t.entities.length }
|
|
144
|
-
);
|
|
145
|
-
return /* @__PURE__ */ s(
|
|
146
|
-
U.Provider,
|
|
147
|
-
{
|
|
148
|
-
value: {
|
|
149
|
-
...t,
|
|
150
|
-
...J,
|
|
151
|
-
mentionSuggestionsData: V,
|
|
152
|
-
categories: X,
|
|
153
|
-
checklistCount: Z,
|
|
154
|
-
users: n,
|
|
155
|
-
isUpdatingActivity: G,
|
|
156
|
-
userTeamNames: c,
|
|
157
|
-
refTooltip: w,
|
|
158
|
-
activityTypes: C,
|
|
159
|
-
feedFilter: u,
|
|
160
|
-
setFeedFilter: l,
|
|
161
|
-
backendFilter: F,
|
|
162
|
-
searchText: a,
|
|
163
|
-
setSearchText: f,
|
|
164
|
-
isGuest: i,
|
|
165
|
-
editingId: h,
|
|
166
|
-
setEditingId: v,
|
|
167
|
-
setRefTooltip: x,
|
|
168
|
-
// Query functions
|
|
169
|
-
createEntityActivity: B,
|
|
170
|
-
updateActivity: O,
|
|
171
|
-
deleteActivity: K,
|
|
172
|
-
createReaction: W,
|
|
173
|
-
deleteReaction: H
|
|
174
|
-
},
|
|
175
|
-
children: e
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
}, E = () => {
|
|
179
|
-
const e = ne(U);
|
|
67
|
+
}, W = z(void 0), g = () => {
|
|
68
|
+
const e = L(W);
|
|
180
69
|
if (!e)
|
|
181
70
|
throw new Error("useFeedContext must be used within a FeedProvider");
|
|
182
71
|
return e;
|
|
183
|
-
},
|
|
184
|
-
const { refTooltip: e, setRefTooltip: t } =
|
|
72
|
+
}, G = () => {
|
|
73
|
+
const { refTooltip: e, setRefTooltip: t } = g();
|
|
185
74
|
return [e, (n) => {
|
|
186
75
|
n && n.id !== e?.id && t(n), n || t(null);
|
|
187
76
|
}];
|
|
188
|
-
},
|
|
77
|
+
}, J = p.span`
|
|
189
78
|
display: flex;
|
|
190
79
|
align-items: center;
|
|
191
80
|
gap: var(--base-gap-large);
|
|
@@ -202,7 +91,7 @@ const Ae = ({
|
|
|
202
91
|
span {
|
|
203
92
|
white-space: nowrap;
|
|
204
93
|
}
|
|
205
|
-
`,
|
|
94
|
+
`, V = p.span`
|
|
206
95
|
display: flex;
|
|
207
96
|
flex-direction: column;
|
|
208
97
|
|
|
@@ -210,13 +99,13 @@ const Ae = ({
|
|
|
210
99
|
color: var(--md-sys-color-outline);
|
|
211
100
|
font-size: 0.85em;
|
|
212
101
|
}
|
|
213
|
-
`,
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
t && /* @__PURE__ */
|
|
218
|
-
] }) : /* @__PURE__ */
|
|
219
|
-
] }),
|
|
102
|
+
`, E = ({ name: e, fullName: t, showSubtitle: o, size: n = 24 }) => /* @__PURE__ */ m(J, { $size: n, children: [
|
|
103
|
+
/* @__PURE__ */ i(U, { name: e, size: n }),
|
|
104
|
+
o ? /* @__PURE__ */ m(V, { children: [
|
|
105
|
+
/* @__PURE__ */ i("span", { children: t || e }),
|
|
106
|
+
t && /* @__PURE__ */ i("span", { className: "label", children: e })
|
|
107
|
+
] }) : /* @__PURE__ */ i("span", { children: t || e })
|
|
108
|
+
] }), X = O`
|
|
220
109
|
from {
|
|
221
110
|
opacity: 0.4;
|
|
222
111
|
scale: 0.9;
|
|
@@ -225,7 +114,7 @@ const Ae = ({
|
|
|
225
114
|
opacity: 1;
|
|
226
115
|
scale: 1;
|
|
227
116
|
}
|
|
228
|
-
`,
|
|
117
|
+
`, M = p.span`
|
|
229
118
|
display: flex;
|
|
230
119
|
padding: 8px;
|
|
231
120
|
gap: var(--base-gap-large);
|
|
@@ -249,14 +138,14 @@ const Ae = ({
|
|
|
249
138
|
}
|
|
250
139
|
}
|
|
251
140
|
|
|
252
|
-
animation: ${
|
|
141
|
+
animation: ${X} 50ms ease-out;
|
|
253
142
|
transform-origin: left bottom;
|
|
254
|
-
`,
|
|
143
|
+
`, Z = ({ name: e, label: t, pos: o }) => /* @__PURE__ */ i(M, { style: { ...o }, children: /* @__PURE__ */ i(E, { name: e || "", fullName: t, showSubtitle: !0, size: 32 }) }), ee = p(M)`
|
|
255
144
|
flex-direction: column;
|
|
256
145
|
align-items: flex-start;
|
|
257
146
|
gap: 8px;
|
|
258
147
|
min-width: 180px;
|
|
259
|
-
`,
|
|
148
|
+
`, te = p.span`
|
|
260
149
|
display: flex;
|
|
261
150
|
align-items: center;
|
|
262
151
|
gap: var(--base-gap-large);
|
|
@@ -264,7 +153,7 @@ const Ae = ({
|
|
|
264
153
|
.icon {
|
|
265
154
|
font-size: 20px;
|
|
266
155
|
}
|
|
267
|
-
`,
|
|
156
|
+
`, oe = p.span`
|
|
268
157
|
display: flex;
|
|
269
158
|
flex-direction: column;
|
|
270
159
|
|
|
@@ -276,7 +165,7 @@ const Ae = ({
|
|
|
276
165
|
color: var(--md-sys-color-outline);
|
|
277
166
|
font-size: 0.85em;
|
|
278
167
|
}
|
|
279
|
-
`,
|
|
168
|
+
`, ne = p.ul`
|
|
280
169
|
list-style: none;
|
|
281
170
|
margin: 0;
|
|
282
171
|
padding: 0;
|
|
@@ -284,124 +173,124 @@ const Ae = ({
|
|
|
284
173
|
flex-direction: column;
|
|
285
174
|
gap: 4px;
|
|
286
175
|
width: 100%;
|
|
287
|
-
`,
|
|
176
|
+
`, ie = p.li`
|
|
288
177
|
display: flex;
|
|
289
178
|
align-items: center;
|
|
290
|
-
`,
|
|
179
|
+
`, re = p.span`
|
|
291
180
|
color: var(--md-sys-color-outline);
|
|
292
181
|
font-size: 0.85em;
|
|
293
182
|
padding-left: 32px;
|
|
294
|
-
`,
|
|
295
|
-
const { projectName:
|
|
296
|
-
{ projectName:
|
|
297
|
-
{ skip: !
|
|
298
|
-
),
|
|
299
|
-
return /* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
305
|
-
|
|
183
|
+
`, _ = 5, ae = ({ name: e, pos: t }) => {
|
|
184
|
+
const { projectName: o, users: n } = g(), { data: s = [] } = j.useGetTeamsQuery(
|
|
185
|
+
{ projectName: o, showMembers: !0 },
|
|
186
|
+
{ skip: !o || !e }
|
|
187
|
+
), l = s.find((d) => d.name === e), c = l?.members ?? [], a = l?.memberCount ?? 0, r = c.slice(0, _), u = Math.max(0, a - _), f = new Map(n.map((d) => [d.name, d.attrib?.fullName || void 0]));
|
|
188
|
+
return /* @__PURE__ */ m(ee, { style: { ...t }, children: [
|
|
189
|
+
/* @__PURE__ */ m(te, { children: [
|
|
190
|
+
/* @__PURE__ */ i(w, { icon: "group" }),
|
|
191
|
+
/* @__PURE__ */ m(oe, { children: [
|
|
192
|
+
/* @__PURE__ */ i("span", { children: e }),
|
|
193
|
+
l && /* @__PURE__ */ m("span", { className: "label", children: [
|
|
194
|
+
a,
|
|
306
195
|
" ",
|
|
307
|
-
|
|
196
|
+
a === 1 ? "member" : "members"
|
|
308
197
|
] })
|
|
309
198
|
] })
|
|
310
199
|
] }),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
200
|
+
r.length > 0 && /* @__PURE__ */ m(ne, { children: [
|
|
201
|
+
r.map((d) => /* @__PURE__ */ i(ie, { children: /* @__PURE__ */ i(
|
|
202
|
+
E,
|
|
314
203
|
{
|
|
315
|
-
name:
|
|
316
|
-
fullName:
|
|
204
|
+
name: d.name,
|
|
205
|
+
fullName: f.get(d.name),
|
|
317
206
|
size: 20
|
|
318
207
|
}
|
|
319
|
-
) },
|
|
320
|
-
|
|
208
|
+
) }, d.name)),
|
|
209
|
+
u > 0 && /* @__PURE__ */ m(re, { children: [
|
|
321
210
|
"+",
|
|
322
|
-
|
|
211
|
+
u,
|
|
323
212
|
" more"
|
|
324
213
|
] })
|
|
325
214
|
] })
|
|
326
215
|
] });
|
|
327
|
-
},
|
|
328
|
-
const { projectInfo: n, projectName:
|
|
329
|
-
return /* @__PURE__ */
|
|
330
|
-
|
|
216
|
+
}, se = ({ type: e, id: t, pos: o }) => {
|
|
217
|
+
const { projectInfo: n, projectName: s } = g();
|
|
218
|
+
return /* @__PURE__ */ i(
|
|
219
|
+
K,
|
|
331
220
|
{
|
|
332
221
|
entityType: e,
|
|
333
222
|
entityId: t,
|
|
334
|
-
projectName:
|
|
223
|
+
projectName: s,
|
|
335
224
|
projectInfo: n,
|
|
336
|
-
pos:
|
|
225
|
+
pos: o
|
|
337
226
|
}
|
|
338
227
|
);
|
|
339
|
-
},
|
|
340
|
-
const [e, t] =
|
|
341
|
-
return
|
|
342
|
-
if (
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
!
|
|
228
|
+
}, je = () => {
|
|
229
|
+
const [e, t] = G(), { type: o, label: n, name: s, pos: l, id: c } = e || {}, a = document.querySelector(".feed ul");
|
|
230
|
+
return $(() => {
|
|
231
|
+
if (c) {
|
|
232
|
+
const r = (u) => {
|
|
233
|
+
const f = u.target, d = CSS.escape(`ref-${c.replaceAll(".", "-")}`), y = f?.closest(`#${d}`), h = f?.closest("[data-mention-value], .reference");
|
|
234
|
+
!y && !h && (t(null), document.removeEventListener("mouseover", r), a && a.removeEventListener("scroll", r));
|
|
346
235
|
};
|
|
347
|
-
return document.addEventListener("mouseover",
|
|
348
|
-
document.removeEventListener("mouseover",
|
|
236
|
+
return document.addEventListener("mouseover", r), a && a.addEventListener("scroll", r), () => {
|
|
237
|
+
document.removeEventListener("mouseover", r), a && a.removeEventListener("scroll", r);
|
|
349
238
|
};
|
|
350
239
|
}
|
|
351
|
-
}, [
|
|
352
|
-
|
|
240
|
+
}, [c, t, a]), c ? R(
|
|
241
|
+
o === "user" && l ? /* @__PURE__ */ i(Z, { name: s, label: n, pos: l }) : o === "team" && l ? /* @__PURE__ */ i(ae, { name: s, pos: l }) : /* @__PURE__ */ i(se, { type: o, label: n, name: s, pos: l, id: c }),
|
|
353
242
|
document.body
|
|
354
243
|
) : null;
|
|
355
|
-
},
|
|
244
|
+
}, le = p.div`
|
|
356
245
|
display: flex;
|
|
357
246
|
flex-direction: column;
|
|
358
247
|
gap: 12px;
|
|
359
|
-
`,
|
|
248
|
+
`, Ae = ({
|
|
360
249
|
isOpen: e,
|
|
361
250
|
header: t,
|
|
362
|
-
startDate:
|
|
251
|
+
startDate: o,
|
|
363
252
|
endDate: n,
|
|
364
|
-
onStartDateChange:
|
|
365
|
-
onEndDateChange:
|
|
366
|
-
onApply:
|
|
367
|
-
onClose:
|
|
368
|
-
}) => /* @__PURE__ */
|
|
369
|
-
|
|
253
|
+
onStartDateChange: s,
|
|
254
|
+
onEndDateChange: l,
|
|
255
|
+
onApply: c,
|
|
256
|
+
onClose: a
|
|
257
|
+
}) => /* @__PURE__ */ i(
|
|
258
|
+
N,
|
|
370
259
|
{
|
|
371
260
|
isOpen: e,
|
|
372
|
-
onClose:
|
|
261
|
+
onClose: a,
|
|
373
262
|
header: t,
|
|
374
263
|
size: "sm",
|
|
375
264
|
hideCancelButton: !0,
|
|
376
|
-
footer: /* @__PURE__ */
|
|
377
|
-
|
|
265
|
+
footer: /* @__PURE__ */ i(
|
|
266
|
+
B,
|
|
378
267
|
{
|
|
379
268
|
label: "Confirm",
|
|
380
269
|
icon: "check",
|
|
381
|
-
onClick:
|
|
382
|
-
active: !!
|
|
270
|
+
onClick: c,
|
|
271
|
+
active: !!o && !!n && n >= o
|
|
383
272
|
}
|
|
384
273
|
),
|
|
385
|
-
children: /* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
|
|
274
|
+
children: /* @__PURE__ */ m(le, { children: [
|
|
275
|
+
/* @__PURE__ */ i(v, { label: "Start date", children: /* @__PURE__ */ i(
|
|
276
|
+
x,
|
|
388
277
|
{
|
|
389
|
-
selected:
|
|
390
|
-
onChange: (
|
|
278
|
+
selected: o ? k(o, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
279
|
+
onChange: (r) => s(r ? b(r, "yyyy-MM-dd") : ""),
|
|
391
280
|
autoFocus: !0
|
|
392
281
|
}
|
|
393
282
|
) }),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
|
|
283
|
+
/* @__PURE__ */ i(v, { label: "End date", children: /* @__PURE__ */ i(
|
|
284
|
+
x,
|
|
396
285
|
{
|
|
397
|
-
selected: n ?
|
|
398
|
-
onChange: (
|
|
399
|
-
openToDate:
|
|
286
|
+
selected: n ? k(n, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
|
|
287
|
+
onChange: (r) => l(r ? b(r, "yyyy-MM-dd") : ""),
|
|
288
|
+
openToDate: o ? new Date(o) : void 0
|
|
400
289
|
}
|
|
401
290
|
) })
|
|
402
291
|
] })
|
|
403
292
|
}
|
|
404
|
-
),
|
|
293
|
+
), ce = p.div`
|
|
405
294
|
position: relative;
|
|
406
295
|
width: 100%;
|
|
407
296
|
max-width: 500px;
|
|
@@ -423,7 +312,7 @@ const Ae = ({
|
|
|
423
312
|
background-color: hsl(220 20% 8%);
|
|
424
313
|
color: var(--md-sys-color-outline);
|
|
425
314
|
}
|
|
426
|
-
`,
|
|
315
|
+
`, de = p.img`
|
|
427
316
|
width: 100%;
|
|
428
317
|
height: 100%;
|
|
429
318
|
object-fit: contain;
|
|
@@ -432,46 +321,46 @@ const Ae = ({
|
|
|
432
321
|
display: block;
|
|
433
322
|
position: absolute;
|
|
434
323
|
inset: 0;
|
|
435
|
-
`,
|
|
324
|
+
`, Fe = ({
|
|
436
325
|
projectName: e,
|
|
437
326
|
entityType: t,
|
|
438
|
-
entityId:
|
|
327
|
+
entityId: o,
|
|
439
328
|
icon: n,
|
|
440
|
-
thumbnailHash:
|
|
441
|
-
isLoading:
|
|
442
|
-
className:
|
|
443
|
-
disabled:
|
|
444
|
-
src:
|
|
445
|
-
onLoad:
|
|
446
|
-
onError:
|
|
447
|
-
iconOnly:
|
|
448
|
-
...
|
|
329
|
+
thumbnailHash: s,
|
|
330
|
+
isLoading: l,
|
|
331
|
+
className: c,
|
|
332
|
+
disabled: a,
|
|
333
|
+
src: r,
|
|
334
|
+
onLoad: u,
|
|
335
|
+
onError: f,
|
|
336
|
+
iconOnly: d,
|
|
337
|
+
...y
|
|
449
338
|
}) => {
|
|
450
|
-
const
|
|
339
|
+
const h = P({
|
|
451
340
|
projectName: e,
|
|
452
341
|
entityType: t,
|
|
453
|
-
entityId:
|
|
454
|
-
thumbnailHash:
|
|
455
|
-
}),
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
-
!
|
|
458
|
-
(t && !
|
|
459
|
-
|
|
342
|
+
entityId: o,
|
|
343
|
+
thumbnailHash: s ? String(s) : void 0
|
|
344
|
+
}), T = t === "project", S = ["product"].includes(t), I = T ? !!e : !!o;
|
|
345
|
+
return /* @__PURE__ */ m(ce, { className: c + " thumbnail", ...y, children: [
|
|
346
|
+
!l && !a && /* @__PURE__ */ i(w, { icon: n || "image" }),
|
|
347
|
+
(t && !S && I || r) && !d && /* @__PURE__ */ i(
|
|
348
|
+
de,
|
|
460
349
|
{
|
|
461
|
-
alt: `Entity thumbnail ${
|
|
462
|
-
src:
|
|
463
|
-
onLoad:
|
|
464
|
-
onError:
|
|
350
|
+
alt: `Entity thumbnail ${o || e}`,
|
|
351
|
+
src: r || h || void 0,
|
|
352
|
+
onLoad: u,
|
|
353
|
+
onError: f
|
|
465
354
|
}
|
|
466
355
|
)
|
|
467
356
|
] });
|
|
468
357
|
};
|
|
469
358
|
export {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
359
|
+
je as A,
|
|
360
|
+
Ae as C,
|
|
361
|
+
W as F,
|
|
362
|
+
Fe as T,
|
|
363
|
+
G as a,
|
|
364
|
+
$e as b,
|
|
365
|
+
g as u
|
|
477
366
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext as n, useContext as t } from "react";
|
|
2
|
+
const e = n(void 0), s = () => {
|
|
3
|
+
const o = t(e);
|
|
4
|
+
if (o === void 0)
|
|
5
|
+
throw new Error("useVersionUploadContext must be used within a VersionUploadProvider");
|
|
6
|
+
return o;
|
|
7
|
+
}, i = () => t(e) ?? null;
|
|
8
|
+
export {
|
|
9
|
+
e as V,
|
|
10
|
+
s as a,
|
|
11
|
+
i as u
|
|
12
|
+
};
|