@ynput/ayon-frontend-shared 0.5.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 +307 -311
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +99 -92
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4459 -2959
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +32 -27
- 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/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +74 -69
- package/dist/chunks/EntityPickerDialog.es.js +25 -21
- package/dist/chunks/EntityTooltip.es.js +29 -22
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +2321 -2668
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -256
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2895 -4919
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +4215 -1179
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +4 -4
- package/dist/chunks/ReviewablesSelector.es.js +468 -460
- package/dist/chunks/SimpleForm.es.js +18 -18
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +109 -98
- package/dist/chunks/TableSettingsFallback.es.js +22 -10
- package/dist/chunks/ThumbnailSimple.es.js +290 -52
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +669 -644
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +737 -710
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +179 -174
- package/dist/chunks/useAttributeEnums.es.js +9 -9
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- 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 +74 -57
- package/dist/components.es.js +1432 -1001
- package/dist/context.es.js +791 -78
- package/dist/hooks.es.js +95 -94
- package/dist/index.es.js +27 -26
- package/dist/types/Actions.d.ts +15 -15
- package/dist/types/ContextMenu.d.ts +19 -16
- package/dist/types/DetailsPanel.d.ts +110 -17
- package/dist/types/EntityPickerDialog.d.ts +15 -15
- package/dist/types/Feed.d.ts +19 -16
- package/dist/types/ListTable.d.ts +15 -15
- package/dist/types/NewEntity.d.ts +24 -18
- package/dist/types/ProjectTreeTable.d.ts +34 -123
- package/dist/types/RepresentationsList.d.ts +15 -15
- package/dist/types/SimpleTable.d.ts +19 -16
- package/dist/types/Slicer.d.ts +18 -15
- package/dist/types/Views.d.ts +19 -16
- package/dist/types/api.d.ts +515 -207
- package/dist/types/components.d.ts +84 -20
- package/dist/types/context.d.ts +108 -25
- package/dist/types/hooks.d.ts +15 -15
- package/dist/types/index.d.ts +15 -15
- package/dist/types/util.d.ts +20 -15
- package/dist/util.es.js +117 -105
- package/package.json +16 -4
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- 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/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useColumnDragRestriction.es.js +0 -148
- package/dist/chunks/useLocalStorage.es.js +0 -355
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { jsx as g, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as g, jsxs as N, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as L, useCallback as B, useState as M, useEffect as O, useRef as K, forwardRef as H, useContext as ye } from "react";
|
|
3
|
+
import { upperFirst as be, intersectionBy as ae } from "lodash";
|
|
3
4
|
import "primereact/confirmdialog";
|
|
4
|
-
import { toast as
|
|
5
|
+
import { toast as Q } from "react-toastify";
|
|
5
6
|
import { c as _ } from "./copyToClipboard.es.js";
|
|
6
7
|
import "uuid";
|
|
7
|
-
import { aw as
|
|
8
|
-
import
|
|
9
|
-
import d, { keyframes as ie, css as se } from "styled-components";
|
|
8
|
+
import { aw as ne, aY as xe, bh as ie, a$ as we, b0 as ke, b1 as Ee, bj as Te, bn as Se, bv as De, bg as je, a as I, bo as Fe } from "./searchTerms.es.js";
|
|
9
|
+
import d, { keyframes as se, css as le } from "styled-components";
|
|
10
10
|
import z from "clsx";
|
|
11
|
-
import { BorderedSection as
|
|
12
|
-
import {
|
|
11
|
+
import { BorderedSection as V, Button as P, StatusSelect as Ce, AssigneeSelect as Ae, TagsSelect as Ne, EnumDropdown as $e, Icon as U, getMimeTypeIcon as Re, theme as ze, getFileSizeString as Me, WatcherSelect as Ue } from "@ynput/ayon-react-components";
|
|
12
|
+
import { m as Le, M as Pe, T as We, l as Oe, B as Ie, D as Ve } from "./MetaWidget.es.js";
|
|
13
13
|
import "./PlayableIcon.es.js";
|
|
14
|
-
import {
|
|
15
|
-
import "./useLocalStorage.es.js";
|
|
14
|
+
import { df as Be, c6 as ce, bf as He, an as Qe, bu as _e, d3 as qe } from "./getUris.es.js";
|
|
16
15
|
import "@module-federation/enhanced/runtime";
|
|
16
|
+
import { v as q, d as Ge, x as Ke, T as Ye } from "./DeleteEntitiesContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
18
|
-
import
|
|
19
|
-
import { T as Ve } from "./DeleteEntitiesContext.es.js";
|
|
18
|
+
import "./ContextMenuContextInstance.es.js";
|
|
20
19
|
import "react-dom";
|
|
21
|
-
import { u as Be } from "./GlobalContext.es.js";
|
|
22
|
-
import { a as He } from "./ProjectContext.es.js";
|
|
23
|
-
import "./ProjectFoldersContextInstance.es.js";
|
|
24
20
|
import "react-redux";
|
|
25
|
-
import "
|
|
26
|
-
import
|
|
21
|
+
import { format as Ze } from "date-fns";
|
|
22
|
+
import "lexical";
|
|
23
|
+
import "@lexical/markdown";
|
|
24
|
+
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
25
|
+
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
26
|
+
import "match-sorter";
|
|
27
|
+
import "@lexical/code";
|
|
28
|
+
import "@lexical/list";
|
|
29
|
+
import "@lexical/rich-text";
|
|
30
|
+
import "@lexical/selection";
|
|
31
|
+
import "@lexical/utils";
|
|
27
32
|
import "react-router-dom";
|
|
28
33
|
import "@tanstack/react-table";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
34
|
+
import { g as Je, h as Y } from "./humanizeFieldName.es.js";
|
|
35
|
+
import { a as Xe, A as et } from "./ThumbnailSimple.es.js";
|
|
31
36
|
import de from "axios";
|
|
32
|
-
import { p as
|
|
33
|
-
import { classNames as
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
import { p as W } from "./parseFilename.es.js";
|
|
38
|
+
import { classNames as tt } from "primereact/utils";
|
|
39
|
+
import { u as ot } from "./useCreateContextMenu.es.js";
|
|
40
|
+
import { g as rt } from "./getThumbnailUrl.es.js";
|
|
41
|
+
const Z = [], at = (e) => {
|
|
42
|
+
const { data: t, isError: r } = Ee(void 0, { skip: !e });
|
|
43
|
+
return L(
|
|
38
44
|
() => ({
|
|
39
45
|
// a failed registry is settled too: every param is sent, same fallback as the batch
|
|
40
46
|
isRegistryLoaded: !!t || r,
|
|
@@ -42,26 +48,26 @@ const Z = [], Ze = (e) => {
|
|
|
42
48
|
}),
|
|
43
49
|
[t, r, e]
|
|
44
50
|
);
|
|
45
|
-
},
|
|
46
|
-
const [e] =
|
|
51
|
+
}, Lo = () => {
|
|
52
|
+
const [e] = we(), [t] = ke();
|
|
47
53
|
return B(
|
|
48
54
|
async (r, o) => {
|
|
49
55
|
const a = (await t(void 0, !0).unwrap().catch(() => {
|
|
50
56
|
}))?.find(({ name: n }) => n === r.enumResolver)?.acceptedParams;
|
|
51
57
|
try {
|
|
52
58
|
const n = await e(
|
|
53
|
-
|
|
59
|
+
ne(r, { projectName: o }, a),
|
|
54
60
|
!0
|
|
55
61
|
).unwrap();
|
|
56
62
|
if (n.error) throw new Error(n.error);
|
|
57
|
-
return
|
|
63
|
+
return ie(n.items);
|
|
58
64
|
} catch (n) {
|
|
59
|
-
throw
|
|
65
|
+
throw nt(n);
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
[e, t]
|
|
63
69
|
);
|
|
64
|
-
},
|
|
70
|
+
}, nt = (e) => {
|
|
65
71
|
if (e instanceof Error) return e;
|
|
66
72
|
const {
|
|
67
73
|
message: t,
|
|
@@ -70,27 +76,27 @@ const Z = [], Ze = (e) => {
|
|
|
70
76
|
error: i
|
|
71
77
|
} = e || {};
|
|
72
78
|
return typeof r?.detail == "string" ? new Error(r.detail) : typeof i == "string" ? new Error(i) : typeof t == "string" ? new Error(t) : new Error(o ? `Request failed (${o})` : "Request failed");
|
|
73
|
-
},
|
|
74
|
-
const o = e?.enumResolver, { acceptedParams: i, isRegistryLoaded: a } =
|
|
75
|
-
() =>
|
|
79
|
+
}, it = (e, { projectName: t, skip: r } = {}) => {
|
|
80
|
+
const o = e?.enumResolver, { acceptedParams: i, isRegistryLoaded: a } = at(o), n = L(
|
|
81
|
+
() => ne(e, { projectName: t }, i),
|
|
76
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
83
|
[o, e?.enumResolverSettings, t, i]
|
|
78
84
|
), {
|
|
79
85
|
currentData: s,
|
|
80
|
-
isFetching:
|
|
86
|
+
isFetching: f,
|
|
81
87
|
isError: y
|
|
82
|
-
} =
|
|
88
|
+
} = xe(n, {
|
|
83
89
|
// waiting for the registry keeps the cache key final: no request is sent with params that get dropped
|
|
84
90
|
skip: !o || !!r || !a
|
|
85
|
-
}),
|
|
91
|
+
}), l = L(() => o ? s ? ie(s.items) : Z : e?.enum || Z, [o, s, e?.enum]), c = !!o && !f && (y || !!s?.error);
|
|
86
92
|
return {
|
|
87
|
-
options:
|
|
93
|
+
options: l,
|
|
88
94
|
// a background refetch (tag invalidation) keeps the cached options, so it is not a load
|
|
89
|
-
isLoading: !!o && !r && (!a ||
|
|
90
|
-
isError:
|
|
91
|
-
errorMessage:
|
|
95
|
+
isLoading: !!o && !r && (!a || f && !s),
|
|
96
|
+
isError: c,
|
|
97
|
+
errorMessage: c ? s?.error : void 0
|
|
92
98
|
};
|
|
93
|
-
},
|
|
99
|
+
}, st = [
|
|
94
100
|
"id",
|
|
95
101
|
"name",
|
|
96
102
|
"label",
|
|
@@ -112,7 +118,7 @@ const Z = [], Ze = (e) => {
|
|
|
112
118
|
"path",
|
|
113
119
|
"createdAt",
|
|
114
120
|
"updatedAt"
|
|
115
|
-
],
|
|
121
|
+
], lt = [
|
|
116
122
|
"name",
|
|
117
123
|
"label",
|
|
118
124
|
"taskType",
|
|
@@ -120,57 +126,57 @@ const Z = [], Ze = (e) => {
|
|
|
120
126
|
"productType",
|
|
121
127
|
"tags",
|
|
122
128
|
"status"
|
|
123
|
-
],
|
|
124
|
-
const [r, o] =
|
|
125
|
-
const y = {},
|
|
126
|
-
e.forEach((
|
|
127
|
-
const
|
|
128
|
-
id:
|
|
129
|
-
name:
|
|
130
|
-
label:
|
|
131
|
-
entityType:
|
|
132
|
-
createdAt:
|
|
133
|
-
updatedAt:
|
|
134
|
-
projectName:
|
|
135
|
-
status:
|
|
136
|
-
tags:
|
|
137
|
-
path:
|
|
138
|
-
folderType:
|
|
139
|
-
productType:
|
|
140
|
-
taskType:
|
|
141
|
-
description:
|
|
129
|
+
], ct = (e, t) => {
|
|
130
|
+
const [r, o] = M([]), [i, a] = M(null), n = () => {
|
|
131
|
+
const y = {}, l = /* @__PURE__ */ new Set();
|
|
132
|
+
e.forEach((h) => {
|
|
133
|
+
const v = {
|
|
134
|
+
id: h.id,
|
|
135
|
+
name: h.name,
|
|
136
|
+
label: h.label,
|
|
137
|
+
entityType: h.entityType,
|
|
138
|
+
createdAt: h.createdAt,
|
|
139
|
+
updatedAt: h.updatedAt,
|
|
140
|
+
projectName: h.projectName,
|
|
141
|
+
status: h.status,
|
|
142
|
+
tags: h.tags || [],
|
|
143
|
+
path: h.path,
|
|
144
|
+
folderType: h.folder?.folderType,
|
|
145
|
+
productType: h.product?.productType,
|
|
146
|
+
taskType: h.task?.taskType,
|
|
147
|
+
description: h.attrib?.description?.toString() ?? ""
|
|
142
148
|
};
|
|
143
|
-
Object.keys(
|
|
144
|
-
|
|
145
|
-
}),
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
y[
|
|
149
|
+
Object.keys(v).forEach((u) => {
|
|
150
|
+
st.includes(u) && (y[u] = y[u] || [], y[u].push(v[u]));
|
|
151
|
+
}), h.attrib && Object.keys(h.attrib).forEach((u) => {
|
|
152
|
+
if (u !== "description") {
|
|
153
|
+
const k = `attrib.${u}`;
|
|
154
|
+
y[k] = y[k] || [], y[k].push(h.attrib?.[u]);
|
|
149
155
|
}
|
|
150
156
|
});
|
|
151
157
|
});
|
|
152
|
-
const
|
|
153
|
-
const { value:
|
|
154
|
-
return
|
|
158
|
+
const c = Object.entries(y).reduce((h, [v, u]) => {
|
|
159
|
+
const { value: k, isMixed: b } = Je(u);
|
|
160
|
+
return h[v] = k, b && l.add(v), h;
|
|
155
161
|
}, {});
|
|
156
|
-
a(
|
|
162
|
+
a(c), o(Array.from(l));
|
|
157
163
|
};
|
|
158
|
-
return
|
|
164
|
+
return O(() => {
|
|
159
165
|
t || e.length === 0 || n();
|
|
160
166
|
}, [e, t]), {
|
|
161
167
|
formData: i,
|
|
162
168
|
mixedFields: r,
|
|
163
|
-
updateFormData: (y,
|
|
164
|
-
a((
|
|
165
|
-
...
|
|
166
|
-
[y]:
|
|
169
|
+
updateFormData: (y, l) => {
|
|
170
|
+
a((c) => c && {
|
|
171
|
+
...c,
|
|
172
|
+
[y]: l
|
|
167
173
|
});
|
|
168
174
|
},
|
|
169
175
|
clearMixedField: (y) => {
|
|
170
|
-
o((
|
|
176
|
+
o((l) => l.filter((c) => c !== y));
|
|
171
177
|
}
|
|
172
178
|
};
|
|
173
|
-
},
|
|
179
|
+
}, dt = ({
|
|
174
180
|
attributes: e,
|
|
175
181
|
folderTypes: t,
|
|
176
182
|
taskTypes: r,
|
|
@@ -179,8 +185,8 @@ const Z = [], Ze = (e) => {
|
|
|
179
185
|
entityType: a,
|
|
180
186
|
folderHasVersions: n
|
|
181
187
|
}) => {
|
|
182
|
-
const s =
|
|
183
|
-
const
|
|
188
|
+
const s = L(() => {
|
|
189
|
+
const c = [
|
|
184
190
|
{
|
|
185
191
|
name: "name",
|
|
186
192
|
data: {
|
|
@@ -204,10 +210,10 @@ const Z = [], Ze = (e) => {
|
|
|
204
210
|
type: "string",
|
|
205
211
|
title: "Folder Type",
|
|
206
212
|
description: "Type of the folder",
|
|
207
|
-
enum: t.map((
|
|
208
|
-
value:
|
|
209
|
-
label:
|
|
210
|
-
icon:
|
|
213
|
+
enum: t.map((m) => ({
|
|
214
|
+
value: m.name,
|
|
215
|
+
label: m.name,
|
|
216
|
+
icon: m.icon
|
|
211
217
|
}))
|
|
212
218
|
}
|
|
213
219
|
},
|
|
@@ -218,10 +224,10 @@ const Z = [], Ze = (e) => {
|
|
|
218
224
|
type: "string",
|
|
219
225
|
title: "Task Type",
|
|
220
226
|
description: "Type of the task",
|
|
221
|
-
enum: r.map((
|
|
222
|
-
value:
|
|
223
|
-
label:
|
|
224
|
-
icon:
|
|
227
|
+
enum: r.map((m) => ({
|
|
228
|
+
value: m.name,
|
|
229
|
+
label: m.name,
|
|
230
|
+
icon: m.icon
|
|
225
231
|
}))
|
|
226
232
|
}
|
|
227
233
|
},
|
|
@@ -231,11 +237,11 @@ const Z = [], Ze = (e) => {
|
|
|
231
237
|
type: "string",
|
|
232
238
|
title: "Status",
|
|
233
239
|
description: "The state the entity is in, is it approved or in progress etc.",
|
|
234
|
-
enum: o.map((
|
|
235
|
-
value:
|
|
236
|
-
label:
|
|
237
|
-
icon:
|
|
238
|
-
color:
|
|
240
|
+
enum: o.map((m) => ({
|
|
241
|
+
value: m.name,
|
|
242
|
+
label: m.name,
|
|
243
|
+
icon: m.icon,
|
|
244
|
+
color: m.color
|
|
239
245
|
}))
|
|
240
246
|
}
|
|
241
247
|
},
|
|
@@ -244,78 +250,78 @@ const Z = [], Ze = (e) => {
|
|
|
244
250
|
data: {
|
|
245
251
|
type: "list_of_strings",
|
|
246
252
|
title: "Tags",
|
|
247
|
-
enum: i.map((
|
|
248
|
-
value:
|
|
249
|
-
label:
|
|
250
|
-
color:
|
|
253
|
+
enum: i.map((m) => ({
|
|
254
|
+
value: m.name,
|
|
255
|
+
label: m.name,
|
|
256
|
+
color: m.color
|
|
251
257
|
}))
|
|
252
258
|
}
|
|
253
259
|
}
|
|
254
260
|
].map(
|
|
255
|
-
(
|
|
256
|
-
...
|
|
261
|
+
(m) => m.name === "folderType" && a === "folder" && n ? {
|
|
262
|
+
...m,
|
|
257
263
|
readonly: !0,
|
|
258
264
|
data: {
|
|
259
|
-
...
|
|
265
|
+
...m.data,
|
|
260
266
|
description: "Folder type is locked because the folder has published versions."
|
|
261
267
|
}
|
|
262
|
-
} :
|
|
263
|
-
),
|
|
264
|
-
...
|
|
265
|
-
(
|
|
268
|
+
} : m
|
|
269
|
+
), h = a === "version" ? [
|
|
270
|
+
...c.map(
|
|
271
|
+
(m) => ["tags", "status"].includes(m.name) ? m : { ...m, readonly: !0 }
|
|
266
272
|
)
|
|
267
|
-
] :
|
|
268
|
-
name: "attrib." +
|
|
269
|
-
data:
|
|
270
|
-
...a === "version" &&
|
|
271
|
-
})) : [],
|
|
272
|
-
name:
|
|
273
|
+
] : c, v = a ? e.filter((m) => m.scope?.includes(a) && m.name !== "description").map((m) => ({
|
|
274
|
+
name: "attrib." + m.name,
|
|
275
|
+
data: m.data,
|
|
276
|
+
...a === "version" && m.builtin ? { readonly: !0 } : {}
|
|
277
|
+
})) : [], u = J.map((m) => ({
|
|
278
|
+
name: m,
|
|
273
279
|
readonly: !0,
|
|
274
280
|
data: {
|
|
275
281
|
type: "string",
|
|
276
|
-
title:
|
|
282
|
+
title: be(m)
|
|
277
283
|
}
|
|
278
|
-
})),
|
|
279
|
-
return [...
|
|
280
|
-
const
|
|
281
|
-
return
|
|
284
|
+
})), k = [...h, ...v, ...u], b = ["path", "name"];
|
|
285
|
+
return [...k].sort((m, T) => {
|
|
286
|
+
const j = b.indexOf(m.name), w = b.indexOf(T.name);
|
|
287
|
+
return j === -1 && w === -1 ? 0 : j === -1 ? 1 : w === -1 ? -1 : j - w;
|
|
282
288
|
});
|
|
283
|
-
}, [e, t, r, o, i, a, n]),
|
|
284
|
-
(
|
|
289
|
+
}, [e, t, r, o, i, a, n]), f = s.filter(
|
|
290
|
+
(l) => lt.includes(l.name) || l.name.startsWith("attrib.")
|
|
285
291
|
), y = s.filter(
|
|
286
|
-
(
|
|
292
|
+
(l) => J.includes(l.name)
|
|
287
293
|
);
|
|
288
294
|
return {
|
|
289
295
|
fields: s,
|
|
290
|
-
editableFields:
|
|
296
|
+
editableFields: f,
|
|
291
297
|
readOnlyFieldsData: y
|
|
292
298
|
};
|
|
293
|
-
},
|
|
294
|
-
const [r] =
|
|
299
|
+
}, pt = ({ entities: e, entityType: t }) => {
|
|
300
|
+
const [r] = Be(), { onUpdateEntity: o } = q();
|
|
295
301
|
return { updateEntity: async (a, n) => {
|
|
296
302
|
if (n == null) {
|
|
297
303
|
console.error("value is null or undefined");
|
|
298
304
|
return;
|
|
299
305
|
}
|
|
300
306
|
try {
|
|
301
|
-
const s = e.map((
|
|
302
|
-
id:
|
|
303
|
-
projectName:
|
|
307
|
+
const s = e.map((f) => ({
|
|
308
|
+
id: f.id,
|
|
309
|
+
projectName: f.projectName,
|
|
304
310
|
data: {
|
|
305
311
|
[a]: n
|
|
306
312
|
},
|
|
307
|
-
currentAssignees:
|
|
313
|
+
currentAssignees: f.users,
|
|
308
314
|
meta: {
|
|
309
|
-
folderId:
|
|
315
|
+
folderId: f.folderId
|
|
310
316
|
}
|
|
311
317
|
}));
|
|
312
318
|
await r({ operations: s, entityType: t }), o?.({ operations: s, entityType: t });
|
|
313
319
|
} catch {
|
|
314
|
-
|
|
320
|
+
Q.error(`Error updating ${t}`);
|
|
315
321
|
}
|
|
316
322
|
} };
|
|
317
|
-
},
|
|
318
|
-
const { updateEntity: o } =
|
|
323
|
+
}, ut = ({ entities: e, entityType: t }) => {
|
|
324
|
+
const { updateEntity: o } = pt({
|
|
319
325
|
entities: e.map((i) => ({
|
|
320
326
|
id: i.id,
|
|
321
327
|
projectName: i.projectName || "",
|
|
@@ -328,8 +334,8 @@ const Z = [], Ze = (e) => {
|
|
|
328
334
|
enableEditing: !0,
|
|
329
335
|
updateEntity: o
|
|
330
336
|
};
|
|
331
|
-
},
|
|
332
|
-
const r =
|
|
337
|
+
}, mt = (e, t) => {
|
|
338
|
+
const r = ce({ projects: [...new Set(e).values()] });
|
|
333
339
|
if (!r || !r.data)
|
|
334
340
|
return [];
|
|
335
341
|
let o;
|
|
@@ -341,16 +347,16 @@ const Z = [], Ze = (e) => {
|
|
|
341
347
|
o = a;
|
|
342
348
|
continue;
|
|
343
349
|
}
|
|
344
|
-
o =
|
|
350
|
+
o = ae(o, a, "name");
|
|
345
351
|
}
|
|
346
352
|
return o;
|
|
347
|
-
},
|
|
353
|
+
}, Po = (e, t) => {
|
|
348
354
|
let r = Object.values(e || {});
|
|
349
355
|
return r.length == 0 || r[0].scope === void 0 ? r : r.filter(
|
|
350
356
|
(o) => t.every((i) => o.scope === void 0 || o.scope.includes(i))
|
|
351
357
|
);
|
|
352
|
-
},
|
|
353
|
-
const r =
|
|
358
|
+
}, gt = (e, t) => {
|
|
359
|
+
const r = ce({ projects: [...new Set(e).values()] });
|
|
354
360
|
if (!r || !r.data)
|
|
355
361
|
return [];
|
|
356
362
|
let o;
|
|
@@ -360,10 +366,10 @@ const Z = [], Ze = (e) => {
|
|
|
360
366
|
o = a;
|
|
361
367
|
continue;
|
|
362
368
|
}
|
|
363
|
-
o =
|
|
369
|
+
o = ae(o, a, "name");
|
|
364
370
|
}
|
|
365
371
|
return o || [];
|
|
366
|
-
},
|
|
372
|
+
}, ht = d.div`
|
|
367
373
|
width: 100%;
|
|
368
374
|
overflow: hidden;
|
|
369
375
|
text-overflow: ellipsis;
|
|
@@ -373,7 +379,7 @@ const Z = [], Ze = (e) => {
|
|
|
373
379
|
input {
|
|
374
380
|
text-align: left;
|
|
375
381
|
}
|
|
376
|
-
`,
|
|
382
|
+
`, ft = d(Le)`
|
|
377
383
|
.enum,
|
|
378
384
|
.edit-trigger {
|
|
379
385
|
&:hover {
|
|
@@ -383,7 +389,7 @@ const Z = [], Ze = (e) => {
|
|
|
383
389
|
&:hover {
|
|
384
390
|
background-color: unset;
|
|
385
391
|
}
|
|
386
|
-
`,
|
|
392
|
+
`, vt = ({
|
|
387
393
|
field: e,
|
|
388
394
|
value: t,
|
|
389
395
|
isEditing: r,
|
|
@@ -392,111 +398,111 @@ const Z = [], Ze = (e) => {
|
|
|
392
398
|
onChange: a,
|
|
393
399
|
onCancelEdit: n,
|
|
394
400
|
onExpand: s,
|
|
395
|
-
entities:
|
|
401
|
+
entities: f = [],
|
|
396
402
|
entityType: y = "task",
|
|
397
|
-
projectName:
|
|
403
|
+
projectName: l
|
|
398
404
|
}) => {
|
|
399
|
-
const { type:
|
|
405
|
+
const { type: c, widget: h } = e.data, v = {
|
|
400
406
|
isEditing: r && !o,
|
|
401
407
|
isReadOnly: o,
|
|
402
408
|
isInherited: !1,
|
|
403
|
-
onChange: (
|
|
404
|
-
},
|
|
405
|
-
options:
|
|
409
|
+
onChange: (C) => a(e.name, C)
|
|
410
|
+
}, u = f.map((C) => C.projectName), k = mt(u, [y]), b = gt(u, y), E = l || u[0], {
|
|
411
|
+
options: m,
|
|
406
412
|
isLoading: T,
|
|
407
|
-
isError:
|
|
408
|
-
errorMessage:
|
|
409
|
-
} =
|
|
410
|
-
let
|
|
411
|
-
const
|
|
413
|
+
isError: j,
|
|
414
|
+
errorMessage: w
|
|
415
|
+
} = it(e.data, { projectName: E }), S = j ? je(w) : void 0, F = e.name === "attrib.endDate" && f.length > 0 && f.every((C) => C.data?.schedulerSyncData?.allDay === !0);
|
|
416
|
+
let D = t ?? "";
|
|
417
|
+
const $ = e.data.title || e.name;
|
|
412
418
|
switch (!0) {
|
|
413
|
-
case
|
|
414
|
-
return /* @__PURE__ */ g(
|
|
415
|
-
case
|
|
419
|
+
case c === "boolean":
|
|
420
|
+
return /* @__PURE__ */ g(Ie, { value: !!D, ...v, style: { margin: 0 } });
|
|
421
|
+
case c === "datetime":
|
|
416
422
|
return /* @__PURE__ */ g(
|
|
417
|
-
|
|
423
|
+
Oe,
|
|
418
424
|
{
|
|
419
|
-
value:
|
|
420
|
-
...
|
|
425
|
+
value: D,
|
|
426
|
+
...v,
|
|
421
427
|
isEditing: !0,
|
|
422
428
|
onCancelEdit: n,
|
|
423
429
|
style: { width: "fit-content" },
|
|
424
430
|
autoFocus: !1,
|
|
425
|
-
isMidnightExclusive:
|
|
431
|
+
isMidnightExclusive: F
|
|
426
432
|
}
|
|
427
433
|
);
|
|
428
|
-
case
|
|
429
|
-
const
|
|
430
|
-
let
|
|
431
|
-
|
|
432
|
-
let x =
|
|
433
|
-
value:
|
|
434
|
-
label:
|
|
435
|
-
icon:
|
|
436
|
-
color:
|
|
437
|
-
group:
|
|
438
|
-
hidden:
|
|
434
|
+
case Te(e.data): {
|
|
435
|
+
const C = c?.includes("list");
|
|
436
|
+
let R = [];
|
|
437
|
+
C ? R = Array.isArray(D) ? D : [] : i ? R = [] : R = [D];
|
|
438
|
+
let x = m.map((p) => ({
|
|
439
|
+
value: p.value,
|
|
440
|
+
label: p.label,
|
|
441
|
+
icon: Se(p.icon),
|
|
442
|
+
color: p.color,
|
|
443
|
+
group: p.group,
|
|
444
|
+
hidden: p.hidden
|
|
439
445
|
}));
|
|
440
|
-
return e.name === "status" &&
|
|
441
|
-
value:
|
|
442
|
-
label:
|
|
443
|
-
icon:
|
|
444
|
-
color:
|
|
445
|
-
}))), e.name === "taskType" &&
|
|
446
|
-
value:
|
|
447
|
-
label:
|
|
448
|
-
icon:
|
|
449
|
-
color:
|
|
450
|
-
}))), e.allowNone &&
|
|
446
|
+
return e.name === "status" && f.length > 0 && k && k.length > 0 && (x = k.map((p) => ({
|
|
447
|
+
value: p.name,
|
|
448
|
+
label: p.name,
|
|
449
|
+
icon: p.icon,
|
|
450
|
+
color: p.color
|
|
451
|
+
}))), e.name === "taskType" && f.length > 0 && b && b.length > 0 && (x = b.map((p) => ({
|
|
452
|
+
value: p.name,
|
|
453
|
+
label: p.name,
|
|
454
|
+
icon: p.icon,
|
|
455
|
+
color: p.color
|
|
456
|
+
}))), e.allowNone && R.length && !C && D && D !== "" && (x = [
|
|
451
457
|
{ value: "", label: `No ${e.data.title || e.name}` },
|
|
452
458
|
...x
|
|
453
459
|
]), /* @__PURE__ */ g(
|
|
454
|
-
|
|
460
|
+
ft,
|
|
455
461
|
{
|
|
456
462
|
"data-tooltip": S,
|
|
457
|
-
value:
|
|
463
|
+
value: R,
|
|
458
464
|
options: x,
|
|
459
|
-
type:
|
|
465
|
+
type: c,
|
|
460
466
|
pt: {
|
|
461
467
|
template: {
|
|
462
468
|
style: { height: 32 },
|
|
463
469
|
className: "enum"
|
|
464
470
|
}
|
|
465
471
|
},
|
|
466
|
-
placeholder: S ? `Could not load ${
|
|
467
|
-
error:
|
|
472
|
+
placeholder: S ? `Could not load ${$}` : i ? `Mixed ${$}` : `Select ${$}...`,
|
|
473
|
+
error: De(S),
|
|
468
474
|
onCancelEdit: n,
|
|
469
475
|
align: "right",
|
|
470
476
|
enableCustomValues: e.enableCustomValues,
|
|
471
477
|
isLoadingOptions: T,
|
|
472
478
|
search: e.enableSearch ?? x.length >= 5,
|
|
473
479
|
sortBySelected: !x,
|
|
474
|
-
...
|
|
480
|
+
...v
|
|
475
481
|
}
|
|
476
482
|
);
|
|
477
483
|
}
|
|
478
|
-
case (
|
|
484
|
+
case (c === "string" || c === "integer" || c === "float"):
|
|
479
485
|
default:
|
|
480
|
-
return
|
|
481
|
-
|
|
486
|
+
return h === "markdown" ? /* @__PURE__ */ g(
|
|
487
|
+
Pe,
|
|
482
488
|
{
|
|
483
|
-
value:
|
|
489
|
+
value: D.toString(),
|
|
484
490
|
onCancelEdit: n,
|
|
485
491
|
onExpand: s,
|
|
486
492
|
showExpand: !!s,
|
|
487
|
-
...
|
|
493
|
+
...v
|
|
488
494
|
}
|
|
489
|
-
) : /* @__PURE__ */ g(
|
|
490
|
-
|
|
495
|
+
) : /* @__PURE__ */ g(ht, { children: /* @__PURE__ */ g(
|
|
496
|
+
We,
|
|
491
497
|
{
|
|
492
|
-
value:
|
|
498
|
+
value: D.toString(),
|
|
493
499
|
onCancelEdit: n,
|
|
494
|
-
type:
|
|
495
|
-
...
|
|
500
|
+
type: c,
|
|
501
|
+
...v
|
|
496
502
|
}
|
|
497
503
|
) });
|
|
498
504
|
}
|
|
499
|
-
},
|
|
505
|
+
}, yt = d.div`
|
|
500
506
|
color: var(--md-sys-color-outline);
|
|
501
507
|
white-space: nowrap;
|
|
502
508
|
overflow: hidden;
|
|
@@ -508,9 +514,9 @@ const Z = [], Ze = (e) => {
|
|
|
508
514
|
showDetailedTooltip: r = !1,
|
|
509
515
|
...o
|
|
510
516
|
}) => {
|
|
511
|
-
const i = t.title ?
|
|
517
|
+
const i = t.title ? Y(t.title) : Y(e), a = r ? `${i} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || i;
|
|
512
518
|
return /* @__PURE__ */ g(
|
|
513
|
-
|
|
519
|
+
yt,
|
|
514
520
|
{
|
|
515
521
|
"data-tooltip": r ? a : void 0,
|
|
516
522
|
"data-tooltip-delay": 700,
|
|
@@ -552,7 +558,7 @@ const Z = [], Ze = (e) => {
|
|
|
552
558
|
margin-top: 6px;
|
|
553
559
|
}
|
|
554
560
|
}
|
|
555
|
-
`,
|
|
561
|
+
`, bt = d.div`
|
|
556
562
|
height: 32px;
|
|
557
563
|
overflow: hidden;
|
|
558
564
|
width: 100%;
|
|
@@ -588,7 +594,7 @@ const Z = [], Ze = (e) => {
|
|
|
588
594
|
&.readonly {
|
|
589
595
|
pointer-events: none;
|
|
590
596
|
}
|
|
591
|
-
`,
|
|
597
|
+
`, xt = d.div`
|
|
592
598
|
display: flex;
|
|
593
599
|
flex-direction: column;
|
|
594
600
|
gap: var(--base-gap-small);
|
|
@@ -598,7 +604,7 @@ const Z = [], Ze = (e) => {
|
|
|
598
604
|
height: 32px;
|
|
599
605
|
padding: 2px;
|
|
600
606
|
}
|
|
601
|
-
`,
|
|
607
|
+
`, wt = d(ue)`
|
|
602
608
|
&.loading {
|
|
603
609
|
width: 100%;
|
|
604
610
|
height: 33px;
|
|
@@ -606,7 +612,7 @@ const Z = [], Ze = (e) => {
|
|
|
606
612
|
border-radius: 4px;
|
|
607
613
|
margin-bottom: 4px;
|
|
608
614
|
}
|
|
609
|
-
`,
|
|
615
|
+
`, kt = ({
|
|
610
616
|
title: e,
|
|
611
617
|
isLoading: t,
|
|
612
618
|
form: r,
|
|
@@ -615,96 +621,96 @@ const Z = [], Ze = (e) => {
|
|
|
615
621
|
mixedFields: a,
|
|
616
622
|
onChange: n,
|
|
617
623
|
entities: s = [],
|
|
618
|
-
projectName:
|
|
624
|
+
projectName: f,
|
|
619
625
|
entityType: y = "task"
|
|
620
626
|
}) => {
|
|
621
|
-
const [
|
|
622
|
-
() => s.map((
|
|
627
|
+
const [l, c] = M(null), h = L(
|
|
628
|
+
() => s.map((b) => b?.id).join("|"),
|
|
623
629
|
[s]
|
|
624
630
|
);
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}, [
|
|
628
|
-
const
|
|
629
|
-
i && !o.find((
|
|
631
|
+
O(() => {
|
|
632
|
+
c(null);
|
|
633
|
+
}, [h]);
|
|
634
|
+
const v = (b) => {
|
|
635
|
+
i && !o.find((E) => E.name === b)?.readonly ? c(b) : console.log("Editing not allowed:", {
|
|
630
636
|
enableEditing: i,
|
|
631
|
-
fieldReadonly: o.find((
|
|
637
|
+
fieldReadonly: o.find((E) => E.name === b)?.readonly
|
|
632
638
|
});
|
|
633
|
-
},
|
|
634
|
-
|
|
635
|
-
},
|
|
636
|
-
|
|
639
|
+
}, u = (b, E) => {
|
|
640
|
+
c(null), n?.(b, E);
|
|
641
|
+
}, k = () => {
|
|
642
|
+
c(null);
|
|
637
643
|
};
|
|
638
|
-
return t ? /* @__PURE__ */ g(
|
|
644
|
+
return t ? /* @__PURE__ */ g(V, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((b, E) => /* @__PURE__ */ N(wt, { children: [
|
|
639
645
|
/* @__PURE__ */ g("div", { className: "loading" }),
|
|
640
646
|
/* @__PURE__ */ g("div", { className: "loading" })
|
|
641
|
-
] },
|
|
642
|
-
|
|
647
|
+
] }, E)) }) : /* @__PURE__ */ g(
|
|
648
|
+
V,
|
|
643
649
|
{
|
|
644
650
|
title: "Attributes",
|
|
645
651
|
autoHeight: !0,
|
|
646
652
|
showHeader: !0,
|
|
647
653
|
withPadding: !0,
|
|
648
654
|
pt: { content: { style: { minHeight: "unset" } } },
|
|
649
|
-
children: o.filter((
|
|
650
|
-
const
|
|
651
|
-
return /* @__PURE__ */
|
|
655
|
+
children: o.filter((b) => !b.hidden).map((b) => {
|
|
656
|
+
const E = r[b.name], m = l === b.name, T = b.readonly || !i, j = a?.includes(b.name) || !1;
|
|
657
|
+
return /* @__PURE__ */ N(
|
|
652
658
|
ue,
|
|
653
659
|
{
|
|
654
|
-
className: z("field-row", { "multi-line":
|
|
660
|
+
className: z("field-row", { "multi-line": b.data.widget === "markdown" }),
|
|
655
661
|
children: [
|
|
656
662
|
/* @__PURE__ */ g(
|
|
657
663
|
pe,
|
|
658
664
|
{
|
|
659
|
-
name:
|
|
660
|
-
data:
|
|
665
|
+
name: b.name,
|
|
666
|
+
data: b.data,
|
|
661
667
|
showDetailedTooltip: !0,
|
|
662
668
|
className: "field-label"
|
|
663
669
|
}
|
|
664
670
|
),
|
|
665
671
|
/* @__PURE__ */ g(
|
|
666
|
-
|
|
672
|
+
bt,
|
|
667
673
|
{
|
|
668
674
|
className: z("field-value", {
|
|
669
|
-
editing:
|
|
675
|
+
editing: m,
|
|
670
676
|
readonly: T
|
|
671
677
|
}),
|
|
672
|
-
onClick: (
|
|
673
|
-
|
|
678
|
+
onClick: (w) => {
|
|
679
|
+
w.target.closest("a") || (w.preventDefault(), !m && !T && b.data.type !== "boolean" && v(b.name));
|
|
674
680
|
},
|
|
675
681
|
children: /* @__PURE__ */ g(
|
|
676
|
-
|
|
682
|
+
vt,
|
|
677
683
|
{
|
|
678
|
-
field:
|
|
679
|
-
value:
|
|
680
|
-
isEditing:
|
|
684
|
+
field: b,
|
|
685
|
+
value: E,
|
|
686
|
+
isEditing: m,
|
|
681
687
|
isReadOnly: T,
|
|
682
|
-
isMixed:
|
|
683
|
-
onChange:
|
|
684
|
-
onCancelEdit:
|
|
688
|
+
isMixed: j,
|
|
689
|
+
onChange: u,
|
|
690
|
+
onCancelEdit: k,
|
|
685
691
|
onExpand: () => {
|
|
686
692
|
},
|
|
687
693
|
entities: s,
|
|
688
|
-
projectName:
|
|
694
|
+
projectName: f,
|
|
689
695
|
entityType: y
|
|
690
696
|
}
|
|
691
697
|
)
|
|
692
698
|
}
|
|
693
699
|
),
|
|
694
|
-
/* @__PURE__ */ g(
|
|
695
|
-
|
|
700
|
+
/* @__PURE__ */ g(xt, { className: "field-tools", children: /* @__PURE__ */ g(
|
|
701
|
+
P,
|
|
696
702
|
{
|
|
697
703
|
className: "tool",
|
|
698
704
|
variant: "text",
|
|
699
705
|
icon: "content_copy",
|
|
700
|
-
onClick: (
|
|
701
|
-
|
|
706
|
+
onClick: (w) => {
|
|
707
|
+
w.preventDefault(), w.stopPropagation(), _((E ?? "").toString(), !0);
|
|
702
708
|
}
|
|
703
709
|
}
|
|
704
710
|
) })
|
|
705
711
|
]
|
|
706
712
|
},
|
|
707
|
-
|
|
713
|
+
b.name
|
|
708
714
|
);
|
|
709
715
|
})
|
|
710
716
|
}
|
|
@@ -732,7 +738,7 @@ const Z = [], Ze = (e) => {
|
|
|
732
738
|
&:hover .copy-icon {
|
|
733
739
|
opacity: 1;
|
|
734
740
|
}
|
|
735
|
-
`,
|
|
741
|
+
`, Et = d.div`
|
|
736
742
|
text-align: left;
|
|
737
743
|
color: var(--md-sys-color-on-surface);
|
|
738
744
|
white-space: nowrap;
|
|
@@ -741,7 +747,7 @@ const Z = [], Ze = (e) => {
|
|
|
741
747
|
justify-self: end;
|
|
742
748
|
font-size: 14px;
|
|
743
749
|
width: 100%;
|
|
744
|
-
`,
|
|
750
|
+
`, ee = d.div`
|
|
745
751
|
height: 20px;
|
|
746
752
|
background: var(--md-sys-color-surface-container-low);
|
|
747
753
|
border-radius: 4px;
|
|
@@ -758,7 +764,7 @@ const Z = [], Ze = (e) => {
|
|
|
758
764
|
opacity: 0.5;
|
|
759
765
|
}
|
|
760
766
|
}
|
|
761
|
-
`,
|
|
767
|
+
`, Tt = ({
|
|
762
768
|
fields: e,
|
|
763
769
|
form: t,
|
|
764
770
|
mixedFields: r = [],
|
|
@@ -769,32 +775,32 @@ const Z = [], Ze = (e) => {
|
|
|
769
775
|
return "-";
|
|
770
776
|
if (n === "createdAt" || n === "updatedAt")
|
|
771
777
|
try {
|
|
772
|
-
return
|
|
778
|
+
return Ze(new Date(a), "PPpp");
|
|
773
779
|
} catch {
|
|
774
780
|
return a.toString();
|
|
775
781
|
}
|
|
776
782
|
return a.toString();
|
|
777
783
|
};
|
|
778
|
-
return o ? /* @__PURE__ */ g(
|
|
779
|
-
/* @__PURE__ */ g(
|
|
780
|
-
/* @__PURE__ */ g(
|
|
784
|
+
return o ? /* @__PURE__ */ g(V, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((a, n) => /* @__PURE__ */ N(X, { children: [
|
|
785
|
+
/* @__PURE__ */ g(ee, { style: { width: "80px" } }),
|
|
786
|
+
/* @__PURE__ */ g(ee, { style: { width: "120px", justifySelf: "end" } }),
|
|
781
787
|
/* @__PURE__ */ g("div", { style: { width: "24px" } })
|
|
782
|
-
] }, n)) }) : /* @__PURE__ */ g(
|
|
783
|
-
const n = t[a.name], s = r.includes(a.name),
|
|
784
|
-
return /* @__PURE__ */
|
|
788
|
+
] }, n)) }) : /* @__PURE__ */ g(V, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((a) => !a.hidden).map((a) => {
|
|
789
|
+
const n = t[a.name], s = r.includes(a.name), f = s ? "Multiple values" : i(n, a.name);
|
|
790
|
+
return /* @__PURE__ */ N(X, { children: [
|
|
785
791
|
/* @__PURE__ */ g(pe, { name: a.name, data: a.data, showDetailedTooltip: !0 }),
|
|
786
792
|
/* @__PURE__ */ g(
|
|
787
|
-
|
|
793
|
+
Et,
|
|
788
794
|
{
|
|
789
795
|
style: {
|
|
790
796
|
color: s ? "var(--md-sys-color-on-surface-variant)" : "var(--md-sys-color-on-surface)",
|
|
791
797
|
fontStyle: s ? "italic" : "normal"
|
|
792
798
|
},
|
|
793
|
-
children:
|
|
799
|
+
children: f
|
|
794
800
|
}
|
|
795
801
|
),
|
|
796
802
|
/* @__PURE__ */ g(
|
|
797
|
-
|
|
803
|
+
P,
|
|
798
804
|
{
|
|
799
805
|
className: "copy-icon",
|
|
800
806
|
variant: "text",
|
|
@@ -806,7 +812,7 @@ const Z = [], Ze = (e) => {
|
|
|
806
812
|
)
|
|
807
813
|
] }, a.name);
|
|
808
814
|
}) });
|
|
809
|
-
},
|
|
815
|
+
}, St = d.div`
|
|
810
816
|
display: flex;
|
|
811
817
|
flex-direction: column;
|
|
812
818
|
height: 100%;
|
|
@@ -815,75 +821,93 @@ const Z = [], Ze = (e) => {
|
|
|
815
821
|
padding-right: 8px;
|
|
816
822
|
padding-left: 8px;
|
|
817
823
|
margin-top: 16px;
|
|
818
|
-
`,
|
|
819
|
-
const { formData: r, mixedFields: o, updateFormData: i, clearMixedField: a } =
|
|
824
|
+
`, Wo = ({ entities: e = [], isLoading: t }) => {
|
|
825
|
+
const { formData: r, mixedFields: o, updateFormData: i, clearMixedField: a } = ct(
|
|
820
826
|
e,
|
|
821
827
|
t
|
|
822
|
-
), { attributes: n } =
|
|
828
|
+
), { attributes: n } = Ge(), {
|
|
829
|
+
folderTypes: s = [],
|
|
830
|
+
taskTypes: f = [],
|
|
831
|
+
statuses: y = [],
|
|
832
|
+
tags: l = [],
|
|
833
|
+
productTypes: c
|
|
834
|
+
} = Ke(), { openSlideOut: h } = q(), [, v] = Xe(), u = (e || []).filter((p) => p.entityType === "folder"), { data: k } = He(
|
|
823
835
|
{
|
|
824
|
-
entityIds:
|
|
836
|
+
entityIds: u.map((p) => p.id),
|
|
825
837
|
projectName: r?.projectName || "",
|
|
826
838
|
referenceTypes: ["origin", "mention", "relation"],
|
|
827
839
|
activityTypes: ["version.publish"]
|
|
828
840
|
},
|
|
829
841
|
{
|
|
830
|
-
skip: !r?.projectName ||
|
|
842
|
+
skip: !r?.projectName || u.length === 0
|
|
831
843
|
}
|
|
832
|
-
),
|
|
844
|
+
), b = !!k?.pages?.[0]?.activities?.length, { editableFields: E, readOnlyFieldsData: m } = dt({
|
|
833
845
|
attributes: n,
|
|
834
846
|
folderTypes: s,
|
|
835
|
-
taskTypes:
|
|
847
|
+
taskTypes: f,
|
|
836
848
|
statuses: y,
|
|
837
|
-
tags:
|
|
849
|
+
tags: l,
|
|
838
850
|
entityType: r?.entityType,
|
|
839
|
-
folderHasVersions:
|
|
840
|
-
}),
|
|
851
|
+
folderHasVersions: b
|
|
852
|
+
}), T = r?.entityType || "task", { enableEditing: j, updateEntity: w } = ut({
|
|
841
853
|
entities: e,
|
|
842
|
-
entityType:
|
|
843
|
-
}),
|
|
844
|
-
|
|
845
|
-
[
|
|
846
|
-
},
|
|
847
|
-
}, D =
|
|
848
|
-
|
|
854
|
+
entityType: T
|
|
855
|
+
}), S = (p, A) => {
|
|
856
|
+
p === "tags" && (Array.isArray(A) || (A == null || A === "" ? A = [] : A = [String(A)])), p.startsWith("attrib.") && (A = {
|
|
857
|
+
[p.replace("attrib.", "")]: A
|
|
858
|
+
}, p = "attrib"), i(p, A), w(p, A);
|
|
859
|
+
}, F = r?.projectName || e[0]?.projectName, D = e[0]?.id, $ = L(
|
|
860
|
+
() => F && D ? { projectName: F, entityType: T, entityId: D, productTypes: c, taskTypes: f } : void 0,
|
|
861
|
+
[F, T, D, c, f]
|
|
862
|
+
), C = ({ type: p, id: A }) => {
|
|
863
|
+
p === "user" || p === "team" || !F || h({ entityId: A, entityType: p, projectName: F });
|
|
864
|
+
}, R = ({ type: p, id: A, label: me }, ge) => {
|
|
865
|
+
const { x: he, y: fe, width: ve } = ge.getBoundingClientRect();
|
|
866
|
+
v({ id: A, name: A, type: p, label: me, pos: { left: he + ve / 2, top: fe } });
|
|
867
|
+
}, x = (p) => {
|
|
868
|
+
i("description", p), a("description"), w("attrib", { description: p });
|
|
849
869
|
};
|
|
850
|
-
return /* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ N(St, { children: [
|
|
851
871
|
/* @__PURE__ */ g(
|
|
852
|
-
|
|
872
|
+
Ve,
|
|
853
873
|
{
|
|
854
874
|
description: r?.description || "",
|
|
855
875
|
isMixed: o.includes("description"),
|
|
856
|
-
enableEditing:
|
|
857
|
-
onChange:
|
|
858
|
-
isLoading: t
|
|
876
|
+
enableEditing: j,
|
|
877
|
+
onChange: x,
|
|
878
|
+
isLoading: t,
|
|
879
|
+
mentionsContext: $,
|
|
880
|
+
onMentionClick: C,
|
|
881
|
+
onMentionHover: R
|
|
859
882
|
}
|
|
860
883
|
),
|
|
884
|
+
/* @__PURE__ */ g(et, {}),
|
|
861
885
|
/* @__PURE__ */ g(
|
|
862
|
-
|
|
886
|
+
kt,
|
|
863
887
|
{
|
|
864
|
-
fields:
|
|
888
|
+
fields: E,
|
|
865
889
|
form: r || {},
|
|
866
890
|
mixedFields: o,
|
|
867
891
|
isLoading: t,
|
|
868
|
-
enableEditing:
|
|
869
|
-
onChange:
|
|
892
|
+
enableEditing: j,
|
|
893
|
+
onChange: S,
|
|
870
894
|
entities: e,
|
|
871
|
-
entityType:
|
|
895
|
+
entityType: T
|
|
872
896
|
}
|
|
873
897
|
),
|
|
874
898
|
/* @__PURE__ */ g(
|
|
875
|
-
|
|
899
|
+
Tt,
|
|
876
900
|
{
|
|
877
|
-
fields:
|
|
901
|
+
fields: m,
|
|
878
902
|
form: r || {},
|
|
879
903
|
mixedFields: o,
|
|
880
904
|
isLoading: t
|
|
881
905
|
}
|
|
882
906
|
)
|
|
883
907
|
] });
|
|
884
|
-
},
|
|
908
|
+
}, Oo = d.div`
|
|
885
909
|
position: relative;
|
|
886
|
-
`,
|
|
910
|
+
`, Io = d.div`
|
|
887
911
|
position: relative;
|
|
888
912
|
padding: 8px;
|
|
889
913
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
@@ -915,13 +939,13 @@ const Z = [], Ze = (e) => {
|
|
|
915
939
|
/* align center */
|
|
916
940
|
align-items: center;
|
|
917
941
|
}
|
|
918
|
-
`,
|
|
942
|
+
`, Vo = d(P)`
|
|
919
943
|
position: absolute;
|
|
920
944
|
right: 4px;
|
|
921
945
|
top: 4px;
|
|
922
946
|
width: fit-content;
|
|
923
947
|
z-index: 50;
|
|
924
|
-
`,
|
|
948
|
+
`, Bo = d.header`
|
|
925
949
|
display: flex;
|
|
926
950
|
align-items: center;
|
|
927
951
|
gap: var(--base-gap-large);
|
|
@@ -936,7 +960,7 @@ const Z = [], Ze = (e) => {
|
|
|
936
960
|
display: none;
|
|
937
961
|
}
|
|
938
962
|
}
|
|
939
|
-
`,
|
|
963
|
+
`, Ho = d.div`
|
|
940
964
|
display: flex;
|
|
941
965
|
align-items: center;
|
|
942
966
|
gap: var(--base-gap-small);
|
|
@@ -944,7 +968,7 @@ const Z = [], Ze = (e) => {
|
|
|
944
968
|
h2 {
|
|
945
969
|
min-width: fit-content;
|
|
946
970
|
}
|
|
947
|
-
`,
|
|
971
|
+
`, Qo = d.div`
|
|
948
972
|
position: relative;
|
|
949
973
|
height: 100%;
|
|
950
974
|
|
|
@@ -959,7 +983,7 @@ const Z = [], Ze = (e) => {
|
|
|
959
983
|
flex-direction: column;
|
|
960
984
|
gap: var(--base-gap-small);
|
|
961
985
|
}
|
|
962
|
-
`,
|
|
986
|
+
`, _o = d.div`
|
|
963
987
|
display: flex;
|
|
964
988
|
flex-direction: column;
|
|
965
989
|
height: 100%;
|
|
@@ -997,7 +1021,7 @@ const Z = [], Ze = (e) => {
|
|
|
997
1021
|
align-items: center;
|
|
998
1022
|
gap: var(--base-gap-medium);
|
|
999
1023
|
}
|
|
1000
|
-
`,
|
|
1024
|
+
`, qo = d.div`
|
|
1001
1025
|
display: flex;
|
|
1002
1026
|
justify-content: space-between;
|
|
1003
1027
|
align-items: flex-start;
|
|
@@ -1006,10 +1030,10 @@ const Z = [], Ze = (e) => {
|
|
|
1006
1030
|
label {
|
|
1007
1031
|
color: var(--md-sys-color-outline);
|
|
1008
1032
|
}
|
|
1009
|
-
`,
|
|
1033
|
+
`, Go = d.div`
|
|
1010
1034
|
display: flex;
|
|
1011
1035
|
flex-direction: column;
|
|
1012
|
-
`,
|
|
1036
|
+
`, Ko = d(Ce)`
|
|
1013
1037
|
width: fit-content;
|
|
1014
1038
|
.status-field.value {
|
|
1015
1039
|
position: relative;
|
|
@@ -1020,11 +1044,11 @@ const Z = [], Ze = (e) => {
|
|
|
1020
1044
|
margin-bottom: 2px;
|
|
1021
1045
|
color: ${(e) => e.$textColor};
|
|
1022
1046
|
}
|
|
1023
|
-
`,
|
|
1047
|
+
`, Yo = d(Ae)`
|
|
1024
1048
|
width: fit-content;
|
|
1025
1049
|
justify-self: end;
|
|
1026
1050
|
max-width: 100%;
|
|
1027
|
-
`,
|
|
1051
|
+
`, Zo = d(Ne)`
|
|
1028
1052
|
height: 24px;
|
|
1029
1053
|
.template-value {
|
|
1030
1054
|
padding: 0 2px;
|
|
@@ -1038,7 +1062,7 @@ const Z = [], Ze = (e) => {
|
|
|
1038
1062
|
display: none;
|
|
1039
1063
|
}
|
|
1040
1064
|
}
|
|
1041
|
-
`,
|
|
1065
|
+
`, Jo = d($e)`
|
|
1042
1066
|
width: max-content;
|
|
1043
1067
|
justify-self: end;
|
|
1044
1068
|
/* remove text and dropdown icon */
|
|
@@ -1062,12 +1086,12 @@ const Z = [], Ze = (e) => {
|
|
|
1062
1086
|
background-color: var(--md-sys-color-surface-container-low-hover);
|
|
1063
1087
|
}
|
|
1064
1088
|
}
|
|
1065
|
-
`,
|
|
1089
|
+
`, Xo = d.footer`
|
|
1066
1090
|
display: flex;
|
|
1067
1091
|
align-items: center;
|
|
1068
1092
|
gap: var(--base-gap-small);
|
|
1069
1093
|
justify-content: space-between;
|
|
1070
|
-
`,
|
|
1094
|
+
`, er = d.div`
|
|
1071
1095
|
height: 100%;
|
|
1072
1096
|
|
|
1073
1097
|
> input[type='file'] {
|
|
@@ -1078,7 +1102,7 @@ const Z = [], Ze = (e) => {
|
|
|
1078
1102
|
input[type='file'] {
|
|
1079
1103
|
display: none;
|
|
1080
1104
|
}
|
|
1081
|
-
`,
|
|
1105
|
+
`, tr = d.div`
|
|
1082
1106
|
z-index: 100;
|
|
1083
1107
|
position: absolute;
|
|
1084
1108
|
inset: 0;
|
|
@@ -1090,7 +1114,7 @@ const Z = [], Ze = (e) => {
|
|
|
1090
1114
|
display: flex;
|
|
1091
1115
|
align-items: center;
|
|
1092
1116
|
justify-content: center;
|
|
1093
|
-
`,
|
|
1117
|
+
`, or = d.div`
|
|
1094
1118
|
flex: 1;
|
|
1095
1119
|
height: 100%;
|
|
1096
1120
|
border-radius: var(--border-radius-l);
|
|
@@ -1119,11 +1143,11 @@ const Z = [], Ze = (e) => {
|
|
|
1119
1143
|
/* show children */
|
|
1120
1144
|
opacity: 1;
|
|
1121
1145
|
}
|
|
1122
|
-
`,
|
|
1146
|
+
`, rr = d(P)`
|
|
1123
1147
|
position: absolute;
|
|
1124
1148
|
top: 4px;
|
|
1125
1149
|
right: 4px;
|
|
1126
|
-
`,
|
|
1150
|
+
`, ar = d.div`
|
|
1127
1151
|
display: flex;
|
|
1128
1152
|
flex-direction: column;
|
|
1129
1153
|
align-items: center;
|
|
@@ -1136,7 +1160,7 @@ const Z = [], Ze = (e) => {
|
|
|
1136
1160
|
top: 12px;
|
|
1137
1161
|
position: relative;
|
|
1138
1162
|
}
|
|
1139
|
-
`,
|
|
1163
|
+
`, nr = d.div`
|
|
1140
1164
|
height: 8px;
|
|
1141
1165
|
position: absolute;
|
|
1142
1166
|
border-radius: 4px;
|
|
@@ -1145,14 +1169,14 @@ const Z = [], Ze = (e) => {
|
|
|
1145
1169
|
background-color: var(--md-sys-color-primary);
|
|
1146
1170
|
|
|
1147
1171
|
transition: right 0.2s;
|
|
1148
|
-
`,
|
|
1172
|
+
`, Dt = se`
|
|
1149
1173
|
from {
|
|
1150
1174
|
transform: rotate(0deg);
|
|
1151
1175
|
}
|
|
1152
1176
|
to {
|
|
1153
1177
|
transform: rotate(360deg);
|
|
1154
1178
|
}
|
|
1155
|
-
`,
|
|
1179
|
+
`, jt = d.div`
|
|
1156
1180
|
position: relative;
|
|
1157
1181
|
display: flex;
|
|
1158
1182
|
justify-content: center;
|
|
@@ -1161,10 +1185,10 @@ const Z = [], Ze = (e) => {
|
|
|
1161
1185
|
overflow: hidden;
|
|
1162
1186
|
|
|
1163
1187
|
background-color: var(--md-sys-color-surface-container-low);
|
|
1164
|
-
`,
|
|
1165
|
-
animation: ${
|
|
1188
|
+
`, Ft = d(U)`
|
|
1189
|
+
animation: ${Dt} 1s linear infinite;
|
|
1166
1190
|
opacity: 0.6;
|
|
1167
|
-
`,
|
|
1191
|
+
`, Ct = d.img`
|
|
1168
1192
|
position: absolute;
|
|
1169
1193
|
inset: 0;
|
|
1170
1194
|
object-fit: cover;
|
|
@@ -1176,41 +1200,41 @@ const Z = [], Ze = (e) => {
|
|
|
1176
1200
|
&.hidden {
|
|
1177
1201
|
opacity: 0;
|
|
1178
1202
|
}
|
|
1179
|
-
`,
|
|
1180
|
-
const [o, i] =
|
|
1181
|
-
return
|
|
1182
|
-
const y =
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1185
|
-
let
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1189
|
-
!
|
|
1203
|
+
`, At = ({ mimetype: e = "", src: t, ...r }) => {
|
|
1204
|
+
const [o, i] = M(!1), [a, n] = M(!1), s = K(null), f = K(0);
|
|
1205
|
+
return O(() => {
|
|
1206
|
+
const y = f.current + 1;
|
|
1207
|
+
f.current = y, n(!1), i(!1);
|
|
1208
|
+
const l = s.current;
|
|
1209
|
+
let c = !1, h = 0, v = 0, u = 0;
|
|
1210
|
+
const k = (T) => {
|
|
1211
|
+
c || y !== f.current || (c = !0, cancelAnimationFrame(h), window.clearInterval(v), window.clearTimeout(u), T());
|
|
1212
|
+
}, b = () => {
|
|
1213
|
+
!l || y !== f.current || l.complete && l.naturalWidth > 0 && k(() => {
|
|
1190
1214
|
n(!0), i(!1);
|
|
1191
1215
|
});
|
|
1192
|
-
},
|
|
1216
|
+
}, E = () => k(() => {
|
|
1193
1217
|
n(!0), i(!1);
|
|
1194
|
-
}),
|
|
1218
|
+
}), m = () => k(() => {
|
|
1195
1219
|
n(!0), i(!0);
|
|
1196
1220
|
});
|
|
1197
|
-
return
|
|
1198
|
-
() =>
|
|
1221
|
+
return l && (l.addEventListener("load", E), l.addEventListener("error", m), typeof l.decode == "function" && l.decode().then(
|
|
1222
|
+
() => k(() => {
|
|
1199
1223
|
n(!0), i(!1);
|
|
1200
1224
|
})
|
|
1201
1225
|
).catch(() => {
|
|
1202
|
-
|
|
1203
|
-
})),
|
|
1204
|
-
|
|
1205
|
-
|
|
1226
|
+
b();
|
|
1227
|
+
})), h = requestAnimationFrame(b), v = window.setInterval(b, 250), u = window.setTimeout(() => {
|
|
1228
|
+
k(() => {
|
|
1229
|
+
l && l.naturalWidth > 0 ? (n(!0), i(!1)) : n(!0);
|
|
1206
1230
|
});
|
|
1207
1231
|
}, 1e4), () => {
|
|
1208
|
-
cancelAnimationFrame(
|
|
1232
|
+
cancelAnimationFrame(h), window.clearInterval(v), window.clearTimeout(u), l && (l.removeEventListener("load", E), l.removeEventListener("error", m));
|
|
1209
1233
|
};
|
|
1210
|
-
}, [t]), /* @__PURE__ */
|
|
1211
|
-
a ? /* @__PURE__ */ g(
|
|
1234
|
+
}, [t]), /* @__PURE__ */ N(jt, { ...r, className: z("file-thumbnail", r.className), children: [
|
|
1235
|
+
a ? /* @__PURE__ */ g(U, { icon: Re(e) }) : /* @__PURE__ */ g(Ft, { icon: "progress_activity" }),
|
|
1212
1236
|
/* @__PURE__ */ g(
|
|
1213
|
-
|
|
1237
|
+
Ct,
|
|
1214
1238
|
{
|
|
1215
1239
|
ref: s,
|
|
1216
1240
|
src: t,
|
|
@@ -1225,7 +1249,7 @@ const Z = [], Ze = (e) => {
|
|
|
1225
1249
|
}
|
|
1226
1250
|
)
|
|
1227
1251
|
] });
|
|
1228
|
-
},
|
|
1252
|
+
}, Nt = d.div`
|
|
1229
1253
|
display: flex;
|
|
1230
1254
|
align-items: center;
|
|
1231
1255
|
overflow: hidden;
|
|
@@ -1292,7 +1316,7 @@ const Z = [], Ze = (e) => {
|
|
|
1292
1316
|
background-color: var(--md-sys-color-primary-container);
|
|
1293
1317
|
}
|
|
1294
1318
|
}
|
|
1295
|
-
`,
|
|
1319
|
+
`, $t = d.div`
|
|
1296
1320
|
display: flex;
|
|
1297
1321
|
flex-direction: column;
|
|
1298
1322
|
flex: 1;
|
|
@@ -1317,15 +1341,15 @@ const Z = [], Ze = (e) => {
|
|
|
1317
1341
|
.name {
|
|
1318
1342
|
color: var(--md-sys-color-outline);
|
|
1319
1343
|
}
|
|
1320
|
-
`,
|
|
1344
|
+
`, Rt = d.div`
|
|
1321
1345
|
display: flex;
|
|
1322
1346
|
align-items: center;
|
|
1323
1347
|
gap: var(--base-gap-small);
|
|
1324
1348
|
|
|
1325
1349
|
h4 {
|
|
1326
|
-
${
|
|
1350
|
+
${ze.titleSmall}
|
|
1327
1351
|
}
|
|
1328
|
-
`,
|
|
1352
|
+
`, zt = d(P)`
|
|
1329
1353
|
/* hidden by default and show on card hover */
|
|
1330
1354
|
display: none;
|
|
1331
1355
|
.icon {
|
|
@@ -1337,21 +1361,21 @@ const Z = [], Ze = (e) => {
|
|
|
1337
1361
|
}
|
|
1338
1362
|
|
|
1339
1363
|
margin: -2px;
|
|
1340
|
-
`,
|
|
1364
|
+
`, Mt = d(At)`
|
|
1341
1365
|
width: 71px;
|
|
1342
1366
|
height: 40px;
|
|
1343
1367
|
|
|
1344
1368
|
border-radius: var(--border-radius-m);
|
|
1345
1369
|
|
|
1346
1370
|
object-fit: cover;
|
|
1347
|
-
`,
|
|
1371
|
+
`, Ut = d(U)`
|
|
1348
1372
|
font-size: 25px;
|
|
1349
1373
|
|
|
1350
1374
|
cursor: grab;
|
|
1351
1375
|
|
|
1352
1376
|
/* default hidden */
|
|
1353
1377
|
opacity: 0;
|
|
1354
|
-
`,
|
|
1378
|
+
`, ir = H(
|
|
1355
1379
|
({
|
|
1356
1380
|
availability: e,
|
|
1357
1381
|
projectName: t,
|
|
@@ -1361,54 +1385,54 @@ const Z = [], Ze = (e) => {
|
|
|
1361
1385
|
processing: a,
|
|
1362
1386
|
mimetype: n,
|
|
1363
1387
|
isDragOverlay: s,
|
|
1364
|
-
isDropPlaceholder:
|
|
1388
|
+
isDropPlaceholder: f,
|
|
1365
1389
|
isSelected: y,
|
|
1366
|
-
isDragging:
|
|
1367
|
-
dragProps:
|
|
1368
|
-
sortingDisabled:
|
|
1369
|
-
onEdit:
|
|
1370
|
-
...
|
|
1371
|
-
},
|
|
1372
|
-
const
|
|
1390
|
+
isDragging: l,
|
|
1391
|
+
dragProps: c = {},
|
|
1392
|
+
sortingDisabled: h,
|
|
1393
|
+
onEdit: v,
|
|
1394
|
+
...u
|
|
1395
|
+
}, k) => {
|
|
1396
|
+
const b = (c || s) && !h, E = e === "conversionRecommended", m = E && !!a;
|
|
1373
1397
|
let T = o;
|
|
1374
|
-
|
|
1375
|
-
let
|
|
1376
|
-
return
|
|
1377
|
-
|
|
1398
|
+
E && (T = "Unoptimized - conversion recommended"), m && (T = "Unoptimized - queued for conversion");
|
|
1399
|
+
let j = i;
|
|
1400
|
+
return E && (j = o), /* @__PURE__ */ N(
|
|
1401
|
+
Nt,
|
|
1378
1402
|
{
|
|
1379
1403
|
id: r,
|
|
1380
|
-
ref:
|
|
1404
|
+
ref: k,
|
|
1381
1405
|
className: z({
|
|
1382
|
-
draggable:
|
|
1383
|
-
"drop-placeholder":
|
|
1406
|
+
draggable: b,
|
|
1407
|
+
"drop-placeholder": f,
|
|
1384
1408
|
"drag-overlay": s,
|
|
1385
|
-
dragging:
|
|
1409
|
+
dragging: l,
|
|
1386
1410
|
// is anything dragging
|
|
1387
1411
|
selected: y,
|
|
1388
|
-
editable: !!
|
|
1412
|
+
editable: !!v
|
|
1389
1413
|
}),
|
|
1390
|
-
...
|
|
1414
|
+
...u,
|
|
1391
1415
|
children: [
|
|
1392
1416
|
/* @__PURE__ */ g(
|
|
1393
|
-
|
|
1417
|
+
Mt,
|
|
1394
1418
|
{
|
|
1395
1419
|
src: `/api/projects/${t}/files/${r}/thumbnail`,
|
|
1396
1420
|
mimetype: n
|
|
1397
1421
|
}
|
|
1398
1422
|
),
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
/* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */ g("h4", { children:
|
|
1402
|
-
!!
|
|
1423
|
+
/* @__PURE__ */ N($t, { children: [
|
|
1424
|
+
/* @__PURE__ */ N(Rt, { children: [
|
|
1425
|
+
/* @__PURE__ */ g("h4", { children: j }),
|
|
1426
|
+
!!v && /* @__PURE__ */ g(zt, { icon: "edit", variant: "text", className: "edit", onClick: v })
|
|
1403
1427
|
] }),
|
|
1404
1428
|
/* @__PURE__ */ g("span", { className: "name", children: T })
|
|
1405
1429
|
] }),
|
|
1406
|
-
|
|
1430
|
+
b && /* @__PURE__ */ g(Ut, { className: "handle", ...c, icon: "drag_indicator" })
|
|
1407
1431
|
]
|
|
1408
1432
|
}
|
|
1409
1433
|
);
|
|
1410
1434
|
}
|
|
1411
|
-
),
|
|
1435
|
+
), Lt = se`
|
|
1412
1436
|
from {
|
|
1413
1437
|
transform: rotate(360deg);
|
|
1414
1438
|
}
|
|
@@ -1417,7 +1441,7 @@ const Z = [], Ze = (e) => {
|
|
|
1417
1441
|
transform: rotate(0deg);
|
|
1418
1442
|
}
|
|
1419
1443
|
|
|
1420
|
-
`,
|
|
1444
|
+
`, Pt = d.div`
|
|
1421
1445
|
position: relative;
|
|
1422
1446
|
width: 100%;
|
|
1423
1447
|
min-height: 50px;
|
|
@@ -1483,13 +1507,13 @@ const Z = [], Ze = (e) => {
|
|
|
1483
1507
|
& > * {
|
|
1484
1508
|
z-index: 10;
|
|
1485
1509
|
}
|
|
1486
|
-
`,
|
|
1510
|
+
`, Wt = d.div`
|
|
1487
1511
|
position: absolute;
|
|
1488
1512
|
inset: 0;
|
|
1489
1513
|
background-color: var(--md-sys-color-primary-container);
|
|
1490
1514
|
z-index: 0;
|
|
1491
1515
|
transition: right 0.2s;
|
|
1492
|
-
`,
|
|
1516
|
+
`, Ot = d.div`
|
|
1493
1517
|
position: relative;
|
|
1494
1518
|
width: 71px;
|
|
1495
1519
|
height: 40px;
|
|
@@ -1508,7 +1532,7 @@ const Z = [], Ze = (e) => {
|
|
|
1508
1532
|
|
|
1509
1533
|
&.spinning {
|
|
1510
1534
|
/* spin animation */
|
|
1511
|
-
animation: ${
|
|
1535
|
+
animation: ${Lt} 1s infinite linear;
|
|
1512
1536
|
}
|
|
1513
1537
|
}
|
|
1514
1538
|
|
|
@@ -1520,7 +1544,7 @@ const Z = [], Ze = (e) => {
|
|
|
1520
1544
|
object-fit: cover;
|
|
1521
1545
|
opacity: 0.5;
|
|
1522
1546
|
}
|
|
1523
|
-
`,
|
|
1547
|
+
`, te = ({
|
|
1524
1548
|
name: e,
|
|
1525
1549
|
progress: t,
|
|
1526
1550
|
size: r,
|
|
@@ -1529,54 +1553,54 @@ const Z = [], Ze = (e) => {
|
|
|
1529
1553
|
src: a,
|
|
1530
1554
|
error: n,
|
|
1531
1555
|
tooltip: s,
|
|
1532
|
-
onRemove:
|
|
1556
|
+
onRemove: f,
|
|
1533
1557
|
...y
|
|
1534
1558
|
}) => {
|
|
1535
|
-
let
|
|
1559
|
+
let l = "", c = !1, h = "";
|
|
1536
1560
|
switch (o) {
|
|
1537
1561
|
case "processing":
|
|
1538
|
-
|
|
1562
|
+
l = "Transcoding", c = !0, h = "settings";
|
|
1539
1563
|
break;
|
|
1540
1564
|
case "unsupported":
|
|
1541
|
-
|
|
1565
|
+
l = "Unsupported - conversion required", h = "visibility_off";
|
|
1542
1566
|
break;
|
|
1543
1567
|
case "upload":
|
|
1544
|
-
|
|
1568
|
+
l = "Uploading", c = !0, h = "sync";
|
|
1545
1569
|
break;
|
|
1546
1570
|
case "queued":
|
|
1547
|
-
|
|
1571
|
+
l = "Queued - waiting to be transcoded", h = "hourglass";
|
|
1548
1572
|
break;
|
|
1549
1573
|
case "waiting":
|
|
1550
|
-
|
|
1574
|
+
l = "Waiting for upload", h = "schedule";
|
|
1551
1575
|
break;
|
|
1552
1576
|
case "importing":
|
|
1553
|
-
|
|
1577
|
+
l = "Importing", h = "upload_file";
|
|
1554
1578
|
break;
|
|
1555
1579
|
case "validating":
|
|
1556
|
-
|
|
1580
|
+
l = "Validating", h = "checklist";
|
|
1557
1581
|
break;
|
|
1558
1582
|
}
|
|
1559
|
-
n && (
|
|
1560
|
-
const
|
|
1561
|
-
return /* @__PURE__ */
|
|
1562
|
-
|
|
1583
|
+
n && (c = !1, h = "error");
|
|
1584
|
+
const v = t !== void 0 ? `- ${t}%` : "";
|
|
1585
|
+
return /* @__PURE__ */ N(
|
|
1586
|
+
Pt,
|
|
1563
1587
|
{
|
|
1564
1588
|
className: z({ finished: t === 100, error: !!n, [o]: !0 }),
|
|
1565
1589
|
id: i,
|
|
1566
1590
|
...y,
|
|
1567
1591
|
children: [
|
|
1568
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ N(Ot, { children: [
|
|
1569
1593
|
a && /* @__PURE__ */ g("img", { src: a }),
|
|
1570
|
-
|
|
1594
|
+
h && /* @__PURE__ */ g(U, { icon: h, className: z({ spinning: c }) })
|
|
1571
1595
|
] }),
|
|
1572
|
-
/* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ N("span", { className: "content", children: [
|
|
1573
1597
|
/* @__PURE__ */ g("span", { className: "name", children: e }),
|
|
1574
|
-
/* @__PURE__ */ g("span", { className: "message", children: n || `${
|
|
1598
|
+
/* @__PURE__ */ g("span", { className: "message", children: n || `${l} ${v}` })
|
|
1575
1599
|
] }),
|
|
1576
|
-
r && /* @__PURE__ */ g("span", { className: "size", children:
|
|
1577
|
-
s && /* @__PURE__ */ g(
|
|
1578
|
-
(n || o === "waiting") && /* @__PURE__ */ g(
|
|
1579
|
-
/* @__PURE__ */ g(
|
|
1600
|
+
r && /* @__PURE__ */ g("span", { className: "size", children: Me(r) }),
|
|
1601
|
+
s && /* @__PURE__ */ g(U, { icon: "info", className: "info", "data-tooltip": s, "data-tooltip-as": "markdown" }),
|
|
1602
|
+
(n || o === "waiting") && /* @__PURE__ */ g(P, { icon: "close", variant: "text", onClick: f }),
|
|
1603
|
+
/* @__PURE__ */ g(Wt, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
|
|
1580
1604
|
]
|
|
1581
1605
|
},
|
|
1582
1606
|
e
|
|
@@ -1589,15 +1613,15 @@ d.div`
|
|
|
1589
1613
|
min-height: 100%;
|
|
1590
1614
|
padding-bottom: var(--padding-m);
|
|
1591
1615
|
`;
|
|
1592
|
-
const
|
|
1616
|
+
const sr = d.div`
|
|
1593
1617
|
position: relative;
|
|
1594
1618
|
overflow: hidden;
|
|
1595
1619
|
border-radius: var(--border-radius-m);
|
|
1596
1620
|
width: 100%;
|
|
1597
1621
|
min-height: 50px;
|
|
1598
|
-
`,
|
|
1622
|
+
`, lr = d.div`
|
|
1599
1623
|
word-break: break-all;
|
|
1600
|
-
`,
|
|
1624
|
+
`, It = d.div`
|
|
1601
1625
|
display: flex;
|
|
1602
1626
|
flex-direction: column;
|
|
1603
1627
|
gap: var(--base-gap-small);
|
|
@@ -1614,7 +1638,7 @@ const qo = d.div`
|
|
|
1614
1638
|
&.dragging {
|
|
1615
1639
|
opacity: 0;
|
|
1616
1640
|
}
|
|
1617
|
-
`,
|
|
1641
|
+
`, Vt = d.div`
|
|
1618
1642
|
position: relative;
|
|
1619
1643
|
min-height: 50px;
|
|
1620
1644
|
display: flex;
|
|
@@ -1643,7 +1667,7 @@ const qo = d.div`
|
|
|
1643
1667
|
opacity: 0;
|
|
1644
1668
|
cursor: pointer;
|
|
1645
1669
|
}
|
|
1646
|
-
`,
|
|
1670
|
+
`, Bt = d.div`
|
|
1647
1671
|
position: absolute;
|
|
1648
1672
|
inset: var(--padding-s);
|
|
1649
1673
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
@@ -1665,7 +1689,7 @@ const qo = d.div`
|
|
|
1665
1689
|
.icon {
|
|
1666
1690
|
font-size: 32px;
|
|
1667
1691
|
}
|
|
1668
|
-
`,
|
|
1692
|
+
`, oe = (e) => {
|
|
1669
1693
|
if (de.isAxiosError(e)) {
|
|
1670
1694
|
const t = e.response?.data;
|
|
1671
1695
|
if (typeof t == "string" && t)
|
|
@@ -1678,7 +1702,7 @@ const qo = d.div`
|
|
|
1678
1702
|
return e.message || e.response?.statusText || "Unknown upload error";
|
|
1679
1703
|
}
|
|
1680
1704
|
return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown upload error";
|
|
1681
|
-
},
|
|
1705
|
+
}, Ht = ({
|
|
1682
1706
|
projectName: e,
|
|
1683
1707
|
versionId: t,
|
|
1684
1708
|
taskId: r,
|
|
@@ -1688,94 +1712,94 @@ const qo = d.div`
|
|
|
1688
1712
|
onUpload: n,
|
|
1689
1713
|
onProgress: s
|
|
1690
1714
|
}) => {
|
|
1691
|
-
const [
|
|
1692
|
-
(
|
|
1693
|
-
t && y((
|
|
1694
|
-
...
|
|
1695
|
-
[t]:
|
|
1715
|
+
const [f, y] = M({}), l = B(
|
|
1716
|
+
(h) => {
|
|
1717
|
+
t && y((v) => ({
|
|
1718
|
+
...v,
|
|
1719
|
+
[t]: v[t]?.filter((u) => u.name !== h) || []
|
|
1696
1720
|
}));
|
|
1697
1721
|
},
|
|
1698
1722
|
[t]
|
|
1699
1723
|
);
|
|
1700
1724
|
return {
|
|
1701
1725
|
handleFileUpload: B(
|
|
1702
|
-
async (
|
|
1703
|
-
const
|
|
1704
|
-
if (!
|
|
1705
|
-
const
|
|
1706
|
-
name:
|
|
1707
|
-
size:
|
|
1726
|
+
async (h, v) => {
|
|
1727
|
+
const u = v || t;
|
|
1728
|
+
if (!u || !e) return;
|
|
1729
|
+
const k = Array.from(h), b = k.map((w) => ({
|
|
1730
|
+
name: W(w.name),
|
|
1731
|
+
size: w.size,
|
|
1708
1732
|
progress: 0
|
|
1709
|
-
})),
|
|
1710
|
-
y({ ...
|
|
1711
|
-
const
|
|
1712
|
-
if (!
|
|
1713
|
-
console.log(`Upload successful for ${
|
|
1714
|
-
const
|
|
1733
|
+
})), E = [...f[u] || [], ...b];
|
|
1734
|
+
y({ ...f, [u]: E });
|
|
1735
|
+
const m = (w) => (S) => {
|
|
1736
|
+
if (!u) return;
|
|
1737
|
+
console.log(`Upload successful for ${w.name}`);
|
|
1738
|
+
const F = S.data;
|
|
1715
1739
|
e && (a(
|
|
1716
1740
|
// @ts-ignore
|
|
1717
|
-
|
|
1741
|
+
Qe.util.updateQueryData(
|
|
1718
1742
|
"getReviewablesForVersion",
|
|
1719
|
-
{ projectName: e, versionId:
|
|
1720
|
-
(
|
|
1721
|
-
|
|
1743
|
+
{ projectName: e, versionId: u },
|
|
1744
|
+
(D) => {
|
|
1745
|
+
D.reviewables || (D.reviewables = []), D.reviewables.push(F);
|
|
1722
1746
|
}
|
|
1723
1747
|
)
|
|
1724
|
-
), i && a(
|
|
1725
|
-
}, T = (
|
|
1726
|
-
|
|
1727
|
-
const
|
|
1728
|
-
...
|
|
1729
|
-
error:
|
|
1748
|
+
), i && a(I.util.invalidateTags([{ type: "viewer", id: i }])), a(I.util.invalidateTags([{ type: "viewer", id: u }])), o && a(I.util.invalidateTags([{ type: "viewer", id: o }])), r && a(I.util.invalidateTags([{ type: "viewer", id: r }])), l(W(w.name)));
|
|
1749
|
+
}, T = (w) => (S) => {
|
|
1750
|
+
u && (console.error(`Upload failed for ${w.name}: ${S}`), y((F) => {
|
|
1751
|
+
const $ = (F[u] || []).map((C) => C.name !== W(w.name) ? C : {
|
|
1752
|
+
...C,
|
|
1753
|
+
error: oe(S)
|
|
1730
1754
|
});
|
|
1731
1755
|
return {
|
|
1732
|
-
...
|
|
1733
|
-
[
|
|
1756
|
+
...F,
|
|
1757
|
+
[u]: $
|
|
1734
1758
|
};
|
|
1735
1759
|
}));
|
|
1736
|
-
},
|
|
1737
|
-
const
|
|
1760
|
+
}, j = (w) => u ? (S) => y((F) => {
|
|
1761
|
+
const $ = (F[u] || []).map((x) => x.name !== W(w.name) ? x : {
|
|
1738
1762
|
...x,
|
|
1739
1763
|
progress: S.total ? Math.round(S.loaded / S.total * 100) : 0
|
|
1740
|
-
}),
|
|
1741
|
-
(x,
|
|
1764
|
+
}), C = $.reduce(
|
|
1765
|
+
(x, p) => x + (p.progress || 0),
|
|
1742
1766
|
0
|
|
1743
|
-
),
|
|
1744
|
-
return s?.(
|
|
1745
|
-
...
|
|
1746
|
-
[
|
|
1767
|
+
), R = Math.round(C / $.length);
|
|
1768
|
+
return s?.(R), {
|
|
1769
|
+
...F,
|
|
1770
|
+
[u]: $
|
|
1747
1771
|
};
|
|
1748
1772
|
}) : () => {
|
|
1749
1773
|
};
|
|
1750
1774
|
try {
|
|
1751
|
-
const
|
|
1752
|
-
const
|
|
1753
|
-
return de.post(
|
|
1754
|
-
throw T(S)(
|
|
1775
|
+
const w = k.map((S) => {
|
|
1776
|
+
const F = W(S.name), D = F.split(".").slice(0, -1).join(".") || "unnamed", $ = `/api/projects/${e}/versions/${u}/reviewables?label=${D}`, C = { "content-type": S.type, "x-file-name": F };
|
|
1777
|
+
return de.post($, S, { headers: C, onUploadProgress: j(S) }).then(m(S)).catch((R) => {
|
|
1778
|
+
throw T(S)(R), R;
|
|
1755
1779
|
});
|
|
1756
1780
|
});
|
|
1757
|
-
await Promise.all(
|
|
1758
|
-
} catch (
|
|
1759
|
-
throw console.error(
|
|
1781
|
+
await Promise.all(w), n && n();
|
|
1782
|
+
} catch (w) {
|
|
1783
|
+
throw console.error(w), Q.error(`Failed to upload file/s: ${oe(w)}`), w;
|
|
1760
1784
|
}
|
|
1761
1785
|
},
|
|
1762
1786
|
[
|
|
1763
1787
|
t,
|
|
1764
1788
|
e,
|
|
1765
|
-
|
|
1789
|
+
f,
|
|
1766
1790
|
a,
|
|
1767
1791
|
i,
|
|
1768
1792
|
o,
|
|
1769
1793
|
r,
|
|
1770
|
-
|
|
1794
|
+
l,
|
|
1771
1795
|
n,
|
|
1772
1796
|
s
|
|
1773
1797
|
]
|
|
1774
1798
|
),
|
|
1775
|
-
handleRemoveUpload:
|
|
1776
|
-
uploading:
|
|
1799
|
+
handleRemoveUpload: l,
|
|
1800
|
+
uploading: f
|
|
1777
1801
|
};
|
|
1778
|
-
},
|
|
1802
|
+
}, cr = ({
|
|
1779
1803
|
projectName: e,
|
|
1780
1804
|
taskId: t,
|
|
1781
1805
|
folderId: r,
|
|
@@ -1784,82 +1808,82 @@ const qo = d.div`
|
|
|
1784
1808
|
onUpload: a,
|
|
1785
1809
|
onFilesAdded: n,
|
|
1786
1810
|
children: s,
|
|
1787
|
-
dispatch:
|
|
1811
|
+
dispatch: f,
|
|
1788
1812
|
variant: y = "normal",
|
|
1789
|
-
pendingFiles:
|
|
1790
|
-
setPendingFiles:
|
|
1791
|
-
className:
|
|
1792
|
-
readOnly:
|
|
1793
|
-
pt:
|
|
1794
|
-
...
|
|
1813
|
+
pendingFiles: l = [],
|
|
1814
|
+
setPendingFiles: c,
|
|
1815
|
+
className: h,
|
|
1816
|
+
readOnly: v = !1,
|
|
1817
|
+
pt: u,
|
|
1818
|
+
...k
|
|
1795
1819
|
}) => {
|
|
1796
|
-
const [
|
|
1797
|
-
handleFileUpload:
|
|
1820
|
+
const [b, E] = M(!1), {
|
|
1821
|
+
handleFileUpload: m,
|
|
1798
1822
|
handleRemoveUpload: T,
|
|
1799
|
-
uploading:
|
|
1800
|
-
} =
|
|
1823
|
+
uploading: j
|
|
1824
|
+
} = Ht({
|
|
1801
1825
|
projectName: e,
|
|
1802
1826
|
versionId: o,
|
|
1803
1827
|
taskId: t,
|
|
1804
1828
|
folderId: r,
|
|
1805
1829
|
productId: i,
|
|
1806
|
-
dispatch:
|
|
1830
|
+
dispatch: f,
|
|
1807
1831
|
onUpload: a
|
|
1808
|
-
}),
|
|
1809
|
-
|
|
1810
|
-
if (
|
|
1811
|
-
const x =
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
}),
|
|
1832
|
+
}), w = !!o;
|
|
1833
|
+
O(() => {
|
|
1834
|
+
if (w && o && l.length > 0 && c) {
|
|
1835
|
+
const x = l.map((p) => p.file);
|
|
1836
|
+
l.forEach((p) => {
|
|
1837
|
+
p.preview && URL.revokeObjectURL(p.preview);
|
|
1838
|
+
}), c([]), m(x);
|
|
1815
1839
|
}
|
|
1816
|
-
}, [
|
|
1817
|
-
const S = (x) => x.type.startsWith("image/"),
|
|
1818
|
-
file:
|
|
1819
|
-
preview: S(
|
|
1820
|
-
})),
|
|
1821
|
-
const
|
|
1822
|
-
if (n?.(
|
|
1823
|
-
|
|
1840
|
+
}, [w, o, l.length, m, c]);
|
|
1841
|
+
const S = (x) => x.type.startsWith("image/"), F = (x) => x.map((p) => ({
|
|
1842
|
+
file: p,
|
|
1843
|
+
preview: S(p) ? URL.createObjectURL(p) : void 0
|
|
1844
|
+
})), D = async (x) => {
|
|
1845
|
+
const p = Array.from(x);
|
|
1846
|
+
if (n?.(p), !w || !o) {
|
|
1847
|
+
c && c((A) => [...A, ...F(p)]);
|
|
1824
1848
|
return;
|
|
1825
1849
|
}
|
|
1826
|
-
await
|
|
1827
|
-
},
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1830
|
-
},
|
|
1831
|
-
x.preventDefault(),
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
},
|
|
1835
|
-
return /* @__PURE__ */
|
|
1850
|
+
await m(x);
|
|
1851
|
+
}, $ = (x) => {
|
|
1852
|
+
const p = x.target.files;
|
|
1853
|
+
p && D(p);
|
|
1854
|
+
}, C = (x) => {
|
|
1855
|
+
x.preventDefault(), E(!1);
|
|
1856
|
+
const p = x.dataTransfer.files;
|
|
1857
|
+
p && D(p);
|
|
1858
|
+
}, R = y === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
|
|
1859
|
+
return /* @__PURE__ */ N(G, { children: [
|
|
1836
1860
|
/* @__PURE__ */ g(
|
|
1837
|
-
|
|
1861
|
+
It,
|
|
1838
1862
|
{
|
|
1839
|
-
className: z(
|
|
1840
|
-
...
|
|
1841
|
-
onDragEnter: () => !
|
|
1863
|
+
className: z(h, y, { dragging: b }),
|
|
1864
|
+
...k,
|
|
1865
|
+
onDragEnter: () => !v && E(!0),
|
|
1842
1866
|
onDragOver: (x) => x.preventDefault(),
|
|
1843
1867
|
onDrop: (x) => {
|
|
1844
|
-
|
|
1868
|
+
v && (x.preventDefault(), x.stopPropagation());
|
|
1845
1869
|
},
|
|
1846
|
-
children: /* @__PURE__ */
|
|
1870
|
+
children: /* @__PURE__ */ N(G, { children: [
|
|
1847
1871
|
s,
|
|
1848
|
-
!
|
|
1849
|
-
|
|
1872
|
+
!w && l?.map((x) => /* @__PURE__ */ g(
|
|
1873
|
+
te,
|
|
1850
1874
|
{
|
|
1851
1875
|
name: x.file.name,
|
|
1852
1876
|
size: x.file.size,
|
|
1853
1877
|
src: x.preview,
|
|
1854
1878
|
type: "waiting",
|
|
1855
1879
|
onRemove: () => {
|
|
1856
|
-
|
|
1880
|
+
c && c((p) => p.filter((A) => A.file.name !== x.file.name));
|
|
1857
1881
|
}
|
|
1858
1882
|
},
|
|
1859
1883
|
x.file.name
|
|
1860
1884
|
)),
|
|
1861
|
-
o &&
|
|
1862
|
-
|
|
1885
|
+
o && j[o]?.map((x) => /* @__PURE__ */ g(
|
|
1886
|
+
te,
|
|
1863
1887
|
{
|
|
1864
1888
|
...x,
|
|
1865
1889
|
type: "upload",
|
|
@@ -1867,37 +1891,37 @@ const qo = d.div`
|
|
|
1867
1891
|
},
|
|
1868
1892
|
x.name
|
|
1869
1893
|
)),
|
|
1870
|
-
!
|
|
1871
|
-
|
|
1894
|
+
!v && /* @__PURE__ */ N(
|
|
1895
|
+
Vt,
|
|
1872
1896
|
{
|
|
1873
1897
|
id: "upload",
|
|
1874
1898
|
className: z("upload", y),
|
|
1875
|
-
style:
|
|
1876
|
-
...
|
|
1899
|
+
style: R,
|
|
1900
|
+
...u?.upload,
|
|
1877
1901
|
children: [
|
|
1878
1902
|
/* @__PURE__ */ g("span", { children: "Drop or click to upload" }),
|
|
1879
|
-
/* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange:
|
|
1903
|
+
/* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange: $ })
|
|
1880
1904
|
]
|
|
1881
1905
|
}
|
|
1882
1906
|
)
|
|
1883
1907
|
] })
|
|
1884
1908
|
}
|
|
1885
1909
|
),
|
|
1886
|
-
|
|
1887
|
-
|
|
1910
|
+
b && !v && /* @__PURE__ */ N(
|
|
1911
|
+
Bt,
|
|
1888
1912
|
{
|
|
1889
1913
|
onDragOver: (x) => x.preventDefault(),
|
|
1890
|
-
onDragLeave: () =>
|
|
1891
|
-
onDrop:
|
|
1892
|
-
...
|
|
1914
|
+
onDragLeave: () => E(!1),
|
|
1915
|
+
onDrop: C,
|
|
1916
|
+
...u?.dropzone,
|
|
1893
1917
|
children: [
|
|
1894
|
-
/* @__PURE__ */ g(
|
|
1918
|
+
/* @__PURE__ */ g(U, { icon: "upload" }),
|
|
1895
1919
|
/* @__PURE__ */ g("span", { children: "Upload reviewable" })
|
|
1896
1920
|
]
|
|
1897
1921
|
}
|
|
1898
1922
|
)
|
|
1899
1923
|
] });
|
|
1900
|
-
},
|
|
1924
|
+
}, dr = d.div`
|
|
1901
1925
|
position: relative;
|
|
1902
1926
|
border-radius: var(--border-radius-m);
|
|
1903
1927
|
display: flex;
|
|
@@ -1912,9 +1936,9 @@ const qo = d.div`
|
|
|
1912
1936
|
}
|
|
1913
1937
|
|
|
1914
1938
|
flex: 1;
|
|
1915
|
-
`,
|
|
1939
|
+
`, pr = d.div`
|
|
1916
1940
|
position: relative;
|
|
1917
|
-
`,
|
|
1941
|
+
`, ur = d.span`
|
|
1918
1942
|
position: relative;
|
|
1919
1943
|
padding: 0px 2px;
|
|
1920
1944
|
border-radius: var(--border-radius-m);
|
|
@@ -1936,29 +1960,29 @@ const qo = d.div`
|
|
|
1936
1960
|
color: var(--md-sys-color-on-surface);
|
|
1937
1961
|
}
|
|
1938
1962
|
}
|
|
1939
|
-
`,
|
|
1963
|
+
`, mr = d.span`
|
|
1940
1964
|
text-overflow: ellipsis;
|
|
1941
1965
|
overflow: hidden;
|
|
1942
1966
|
display: inline-block;
|
|
1943
1967
|
white-space: nowrap;
|
|
1944
|
-
`,
|
|
1968
|
+
`, re = le`
|
|
1945
1969
|
background-color: var(--md-sys-color-surface-container);
|
|
1946
1970
|
&,
|
|
1947
1971
|
.icon {
|
|
1948
1972
|
color: var(--md-sys-color-on-surface);
|
|
1949
1973
|
}
|
|
1950
|
-
`,
|
|
1974
|
+
`, Qt = d.div`
|
|
1951
1975
|
& > span,
|
|
1952
1976
|
& > li {
|
|
1953
1977
|
cursor: pointer;
|
|
1954
1978
|
&:hover {
|
|
1955
|
-
${
|
|
1979
|
+
${re}
|
|
1956
1980
|
}
|
|
1957
1981
|
}
|
|
1958
1982
|
|
|
1959
1983
|
&.open {
|
|
1960
1984
|
& > span {
|
|
1961
|
-
${
|
|
1985
|
+
${re}
|
|
1962
1986
|
}
|
|
1963
1987
|
}
|
|
1964
1988
|
|
|
@@ -1970,7 +1994,7 @@ const qo = d.div`
|
|
|
1970
1994
|
}
|
|
1971
1995
|
}
|
|
1972
1996
|
}
|
|
1973
|
-
`,
|
|
1997
|
+
`, gr = d.div`
|
|
1974
1998
|
position: absolute;
|
|
1975
1999
|
top: 100%;
|
|
1976
2000
|
left: 0px;
|
|
@@ -1979,7 +2003,7 @@ const qo = d.div`
|
|
|
1979
2003
|
|
|
1980
2004
|
z-index: 200;
|
|
1981
2005
|
padding-top: 4px;
|
|
1982
|
-
`,
|
|
2006
|
+
`, hr = d.ul`
|
|
1983
2007
|
display: flex;
|
|
1984
2008
|
flex-direction: column;
|
|
1985
2009
|
gap: var(--base-gap-small);
|
|
@@ -1994,46 +2018,46 @@ const qo = d.div`
|
|
|
1994
2018
|
|
|
1995
2019
|
max-height: 500px;
|
|
1996
2020
|
overflow: auto;
|
|
1997
|
-
`,
|
|
2021
|
+
`, fr = d.li`
|
|
1998
2022
|
padding: var(--base-gap-small);
|
|
1999
2023
|
border-radius: var(--border-radius-m);
|
|
2000
2024
|
color: var(--md-sys-color-on-surface);
|
|
2001
2025
|
min-width: max-content;
|
|
2002
2026
|
width: 100%;
|
|
2003
|
-
`,
|
|
2027
|
+
`, vr = H(
|
|
2004
2028
|
({ children: e, segment: t, isOpen: r, scope: o, projectName: i, ...a }, n) => {
|
|
2005
|
-
const { openSlideOut: s } =
|
|
2006
|
-
if (!
|
|
2007
|
-
const { type:
|
|
2008
|
-
!
|
|
2009
|
-
entityType:
|
|
2010
|
-
entityId:
|
|
2029
|
+
const { openSlideOut: s } = q(), f = t?.type !== "product" && t?.type !== "project", y = () => {
|
|
2030
|
+
if (!f) return;
|
|
2031
|
+
const { type: v, id: u } = t || {};
|
|
2032
|
+
!v || v === "project" || v === "product" || !u || s({
|
|
2033
|
+
entityType: v,
|
|
2034
|
+
entityId: u,
|
|
2011
2035
|
projectName: i
|
|
2012
2036
|
});
|
|
2013
|
-
},
|
|
2037
|
+
}, l = (v) => [
|
|
2014
2038
|
{
|
|
2015
|
-
label: `ID: ${
|
|
2039
|
+
label: `ID: ${v}`,
|
|
2016
2040
|
icon: "content_copy",
|
|
2017
|
-
command: () => _(
|
|
2041
|
+
command: () => _(v)
|
|
2018
2042
|
}
|
|
2019
|
-
], [
|
|
2043
|
+
], [c] = ot();
|
|
2020
2044
|
return /* @__PURE__ */ g(
|
|
2021
|
-
|
|
2045
|
+
Qt,
|
|
2022
2046
|
{
|
|
2023
2047
|
onClick: y,
|
|
2024
|
-
onContextMenu: (
|
|
2048
|
+
onContextMenu: (v) => {
|
|
2025
2049
|
if (!t) return;
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2050
|
+
const u = l(t.id);
|
|
2051
|
+
c(v, u);
|
|
2028
2052
|
},
|
|
2029
|
-
className:
|
|
2053
|
+
className: tt({ link: f, open: r }),
|
|
2030
2054
|
...a,
|
|
2031
2055
|
ref: n,
|
|
2032
2056
|
children: e
|
|
2033
2057
|
}
|
|
2034
2058
|
);
|
|
2035
2059
|
}
|
|
2036
|
-
),
|
|
2060
|
+
), _t = d.div`
|
|
2037
2061
|
position: relative;
|
|
2038
2062
|
width: 100%;
|
|
2039
2063
|
height: 52px;
|
|
@@ -2123,7 +2147,7 @@ const qo = d.div`
|
|
|
2123
2147
|
border: none;
|
|
2124
2148
|
border-color: transparent;
|
|
2125
2149
|
}
|
|
2126
|
-
`,
|
|
2150
|
+
`, qt = d.img`
|
|
2127
2151
|
width: 100%;
|
|
2128
2152
|
height: 100%;
|
|
2129
2153
|
object-fit: contain;
|
|
@@ -2135,7 +2159,7 @@ const qo = d.div`
|
|
|
2135
2159
|
inset: 0;
|
|
2136
2160
|
|
|
2137
2161
|
transition: scale 0.2s, opacity 0.2s;
|
|
2138
|
-
`,
|
|
2162
|
+
`, Gt = ({
|
|
2139
2163
|
projectName: e = "",
|
|
2140
2164
|
entityType: t = "",
|
|
2141
2165
|
entityId: r = "",
|
|
@@ -2144,54 +2168,54 @@ const qo = d.div`
|
|
|
2144
2168
|
thumbnailHash: a,
|
|
2145
2169
|
isLoading: n,
|
|
2146
2170
|
shimmer: s,
|
|
2147
|
-
className:
|
|
2171
|
+
className: f,
|
|
2148
2172
|
disabled: y,
|
|
2149
|
-
src:
|
|
2150
|
-
hoverIcon:
|
|
2151
|
-
showBorder:
|
|
2152
|
-
...
|
|
2173
|
+
src: l,
|
|
2174
|
+
hoverIcon: c,
|
|
2175
|
+
showBorder: h = !0,
|
|
2176
|
+
...v
|
|
2153
2177
|
}) => {
|
|
2154
|
-
const
|
|
2155
|
-
let
|
|
2156
|
-
t && (a ||
|
|
2157
|
-
const [
|
|
2158
|
-
return
|
|
2159
|
-
if (
|
|
2160
|
-
|
|
2178
|
+
const u = t === "project", k = ["product"].includes(t), b = u ? !!e : !!r;
|
|
2179
|
+
let E = "";
|
|
2180
|
+
t && (a || u) && b && (l ? E = l : E = rt({ projectName: e, entityType: t, entityId: r, thumbnailHash: a }) ?? "");
|
|
2181
|
+
const [m, T] = M(!1), [j, w] = M(!1);
|
|
2182
|
+
return O(() => {
|
|
2183
|
+
if (E === "") {
|
|
2184
|
+
w(!0), T(!0);
|
|
2161
2185
|
return;
|
|
2162
2186
|
}
|
|
2163
|
-
|
|
2164
|
-
}, [
|
|
2165
|
-
|
|
2187
|
+
w(!1), T(!1);
|
|
2188
|
+
}, [E]), /* @__PURE__ */ N(
|
|
2189
|
+
_t,
|
|
2166
2190
|
{
|
|
2167
|
-
className: z(
|
|
2168
|
-
loading: s && (n || !
|
|
2169
|
-
loaded:
|
|
2170
|
-
error:
|
|
2171
|
-
clickable: !!
|
|
2172
|
-
border:
|
|
2191
|
+
className: z(f, "thumbnail", {
|
|
2192
|
+
loading: s && (n || !j),
|
|
2193
|
+
loaded: j,
|
|
2194
|
+
error: m,
|
|
2195
|
+
clickable: !!v.onClick,
|
|
2196
|
+
border: h
|
|
2173
2197
|
}),
|
|
2174
|
-
...
|
|
2198
|
+
...v,
|
|
2175
2199
|
children: [
|
|
2176
|
-
(!n || !
|
|
2177
|
-
t && e && !
|
|
2178
|
-
|
|
2200
|
+
(!n || !j) && !y && /* @__PURE__ */ g(U, { style: { color: i || void 0 }, icon: o || "image", className: "type-icon" }),
|
|
2201
|
+
t && e && !k && b && /* @__PURE__ */ g(
|
|
2202
|
+
qt,
|
|
2179
2203
|
{
|
|
2180
2204
|
alt: `Entity thumbnail ${r || e}`,
|
|
2181
|
-
src:
|
|
2205
|
+
src: E,
|
|
2182
2206
|
onLoad: () => {
|
|
2183
|
-
|
|
2207
|
+
w(!0), T(!1);
|
|
2184
2208
|
},
|
|
2185
2209
|
onError: () => {
|
|
2186
|
-
|
|
2210
|
+
w(!0), T(!0);
|
|
2187
2211
|
}
|
|
2188
2212
|
}
|
|
2189
2213
|
),
|
|
2190
|
-
|
|
2214
|
+
c && /* @__PURE__ */ g(U, { icon: c, className: "hover-icon" })
|
|
2191
2215
|
]
|
|
2192
2216
|
}
|
|
2193
2217
|
);
|
|
2194
|
-
},
|
|
2218
|
+
}, Kt = d.div`
|
|
2195
2219
|
display: flex;
|
|
2196
2220
|
z-index: 10;
|
|
2197
2221
|
height: 100%;
|
|
@@ -2212,7 +2236,7 @@ const qo = d.div`
|
|
|
2212
2236
|
font-size: 24px;
|
|
2213
2237
|
}
|
|
2214
2238
|
|
|
2215
|
-
${({ $length: e }) => e > 1 &&
|
|
2239
|
+
${({ $length: e }) => e > 1 && le`
|
|
2216
2240
|
:not(:last-child) {
|
|
2217
2241
|
box-shadow: 0 0 4px 0px black;
|
|
2218
2242
|
}
|
|
@@ -2228,75 +2252,76 @@ const qo = d.div`
|
|
|
2228
2252
|
object-fit: cover;
|
|
2229
2253
|
}
|
|
2230
2254
|
}
|
|
2231
|
-
`,
|
|
2255
|
+
`, yr = ({
|
|
2232
2256
|
thumbnails: e = [],
|
|
2233
2257
|
isLoading: t,
|
|
2234
2258
|
className: r,
|
|
2235
2259
|
style: o,
|
|
2236
2260
|
...i
|
|
2237
2261
|
}) => {
|
|
2238
|
-
const { onContextMenu: a } =
|
|
2262
|
+
const { onContextMenu: a } = ye(Ye);
|
|
2239
2263
|
e = e.slice(0, 5);
|
|
2240
2264
|
const n = e.length > 1;
|
|
2241
2265
|
return e.length ? /* @__PURE__ */ g(
|
|
2242
|
-
|
|
2266
|
+
Kt,
|
|
2243
2267
|
{
|
|
2244
2268
|
$length: e.length,
|
|
2245
2269
|
className: z("stacked-thumbnails", r, { stacking: n }),
|
|
2246
2270
|
children: e.map(
|
|
2247
|
-
(s,
|
|
2248
|
-
|
|
2271
|
+
(s, f) => s ? /* @__PURE__ */ g(
|
|
2272
|
+
Gt,
|
|
2249
2273
|
{
|
|
2250
2274
|
projectName: s.projectName,
|
|
2251
2275
|
entityType: s.type,
|
|
2252
2276
|
entityId: s.id,
|
|
2253
2277
|
icon: s.icon,
|
|
2254
2278
|
color: s.color,
|
|
2255
|
-
style: { ...o, zIndex: -
|
|
2279
|
+
style: { ...o, zIndex: -f },
|
|
2256
2280
|
thumbnailHash: s.thumbnailHash,
|
|
2257
2281
|
isLoading: t,
|
|
2258
2282
|
src: s.src,
|
|
2259
2283
|
onContextMenu: a,
|
|
2260
2284
|
...i
|
|
2261
2285
|
},
|
|
2262
|
-
s.id || s.src ||
|
|
2286
|
+
s.id || s.src || f
|
|
2263
2287
|
) : null
|
|
2264
2288
|
)
|
|
2265
2289
|
}
|
|
2266
2290
|
) : null;
|
|
2267
|
-
},
|
|
2291
|
+
}, br = H(
|
|
2268
2292
|
({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...i }, a) => {
|
|
2269
|
-
const n = e.map((
|
|
2270
|
-
entityId:
|
|
2293
|
+
const n = e.map((c) => ({
|
|
2294
|
+
entityId: c.id,
|
|
2271
2295
|
entityType: t,
|
|
2272
|
-
projectName:
|
|
2273
|
-
})), { data: s = [] } =
|
|
2296
|
+
projectName: c.projectName
|
|
2297
|
+
})), { data: s = [] } = _e(
|
|
2274
2298
|
{
|
|
2275
2299
|
entities: n
|
|
2276
2300
|
},
|
|
2277
2301
|
{ skip: !e.length }
|
|
2278
|
-
),
|
|
2302
|
+
), f = Array.from(new Set(s.flatMap((c) => c.watchers))), [y] = qe(), l = async (c) => {
|
|
2303
|
+
const h = c.filter((k) => !f.includes(k)), v = f.filter((k) => !c.includes(k)), u = s.map((k) => {
|
|
2304
|
+
const b = k.watchers.filter((E) => !v.includes(E));
|
|
2305
|
+
return b.push(...h), {
|
|
2306
|
+
...k,
|
|
2307
|
+
watchers: b
|
|
2308
|
+
};
|
|
2309
|
+
});
|
|
2310
|
+
try {
|
|
2311
|
+
await y({ entities: u }).unwrap(), r && r(h, v);
|
|
2312
|
+
} catch {
|
|
2313
|
+
Q.error("Failed to update watchers");
|
|
2314
|
+
}
|
|
2315
|
+
};
|
|
2279
2316
|
return /* @__PURE__ */ g(
|
|
2280
|
-
|
|
2317
|
+
Ue,
|
|
2281
2318
|
{
|
|
2282
2319
|
align: "right",
|
|
2283
2320
|
...i,
|
|
2284
|
-
|
|
2321
|
+
options: Fe(i.options, f),
|
|
2322
|
+
value: f,
|
|
2285
2323
|
currentUser: o,
|
|
2286
|
-
onChange:
|
|
2287
|
-
const u = l.filter((E) => !b.includes(E)), h = b.filter((E) => !l.includes(E)), m = s.map((E) => {
|
|
2288
|
-
const f = E.watchers.filter((w) => !h.includes(w));
|
|
2289
|
-
return f.push(...u), {
|
|
2290
|
-
...E,
|
|
2291
|
-
watchers: f
|
|
2292
|
-
};
|
|
2293
|
-
});
|
|
2294
|
-
try {
|
|
2295
|
-
await y({ entities: m }).unwrap(), r && r(u, h);
|
|
2296
|
-
} catch {
|
|
2297
|
-
H.error("Failed to update watchers");
|
|
2298
|
-
}
|
|
2299
|
-
},
|
|
2324
|
+
onChange: l,
|
|
2300
2325
|
ref: a,
|
|
2301
2326
|
buttonProps: { "data-tooltip": "Watchers" }
|
|
2302
2327
|
}
|
|
@@ -2304,52 +2329,52 @@ const qo = d.div`
|
|
|
2304
2329
|
}
|
|
2305
2330
|
);
|
|
2306
2331
|
export {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2332
|
+
Ho as A,
|
|
2333
|
+
Zo as B,
|
|
2334
|
+
rr as C,
|
|
2335
|
+
or as D,
|
|
2336
|
+
Ko as E,
|
|
2337
|
+
mr as F,
|
|
2338
|
+
Io as G,
|
|
2339
|
+
Oo as H,
|
|
2340
|
+
Yo as I,
|
|
2341
|
+
Jo as J,
|
|
2342
|
+
Vo as K,
|
|
2343
|
+
sr as L,
|
|
2344
|
+
gr as M,
|
|
2345
|
+
qo as N,
|
|
2346
|
+
Xo as O,
|
|
2347
|
+
nr as P,
|
|
2348
|
+
Go as Q,
|
|
2349
|
+
ir as R,
|
|
2350
|
+
ur as S,
|
|
2351
|
+
Qo as T,
|
|
2352
|
+
ar as U,
|
|
2353
|
+
br as W,
|
|
2354
|
+
pt as a,
|
|
2355
|
+
Lo as b,
|
|
2356
|
+
mt as c,
|
|
2357
|
+
gt as d,
|
|
2358
|
+
lr as e,
|
|
2359
|
+
Po as f,
|
|
2360
|
+
cr as g,
|
|
2361
|
+
te as h,
|
|
2362
|
+
Ht as i,
|
|
2363
|
+
er as j,
|
|
2364
|
+
tr as k,
|
|
2365
|
+
dr as l,
|
|
2366
|
+
hr as m,
|
|
2367
|
+
vr as n,
|
|
2368
|
+
fr as o,
|
|
2369
|
+
pr as p,
|
|
2370
|
+
kt as q,
|
|
2371
|
+
Tt as r,
|
|
2372
|
+
Wo as s,
|
|
2348
2373
|
pe as t,
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2374
|
+
it as u,
|
|
2375
|
+
At as v,
|
|
2376
|
+
yr as w,
|
|
2377
|
+
Gt as x,
|
|
2378
|
+
Bo as y,
|
|
2379
|
+
_o as z
|
|
2355
2380
|
};
|