@ynput/ayon-frontend-shared 0.7.0 → 0.7.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/DetailsPanel.es.js +765 -739
- package/dist/ListTable.es.js +80 -80
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +1424 -1409
- package/dist/Views.es.js +572 -570
- package/dist/api.es.js +300 -298
- package/dist/chunks/Actions.es.js +5 -5
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EntityPath.es.js +14 -14
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +18 -18
- package/dist/chunks/Feed.es.js +2 -2
- package/dist/chunks/MetaWidget.es.js +2422 -2149
- package/dist/chunks/PlayableIcon.es.js +20 -20
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +2 -2
- package/dist/chunks/Slicer.es.js +2 -2
- package/dist/chunks/TableExportContextInstance.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +12 -12
- package/dist/chunks/Watchers.es.js +907 -855
- package/dist/chunks/getUris.es.js +1272 -1209
- package/dist/chunks/searchTerms.es.js +30 -66
- package/dist/chunks/useAttributeEnums.es.js +37 -37
- package/dist/chunks/viewUpdateHelper.es.js +10 -10
- package/dist/components.es.js +132 -131
- package/dist/context.es.js +76 -76
- package/dist/hooks.es.js +51 -50
- package/dist/types/ProjectTreeTable.d.ts +21 -1
- package/dist/types/Slicer.d.ts +6 -4
- package/dist/types/Views.d.ts +4 -0
- package/dist/types/api.d.ts +411 -438
- package/dist/types/components.d.ts +22 -0
- package/dist/types/context.d.ts +2 -0
- package/dist/types/hooks.d.ts +36 -1
- package/package.json +3 -3
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as g, jsxs as R, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as I, useCallback as Y, useState as O, useEffect as q, useRef as ne, forwardRef as ee, useContext as Se } from "react";
|
|
3
|
+
import { getMixedCounts as Te, BorderedSection as J, Button as _, applyMixedChange as je, StatusSelect as De, AssigneeSelect as Fe, TagsSelect as Ce, EnumDropdown as Ae, Icon as V, getMimeTypeIcon as Ne, theme as $e, getFileSizeString as Me, WatcherSelect as ze } from "@ynput/ayon-react-components";
|
|
4
|
+
import { snakeCase as Re, upperFirst as Ue, intersectionBy as he } from "lodash";
|
|
4
5
|
import "primereact/confirmdialog";
|
|
5
|
-
import { toast as
|
|
6
|
-
import { c as
|
|
6
|
+
import { toast as te } from "react-toastify";
|
|
7
|
+
import { c as oe } from "./copyToClipboard.es.js";
|
|
7
8
|
import "uuid";
|
|
8
|
-
import { aF as
|
|
9
|
-
import p, { keyframes as
|
|
9
|
+
import { aF as fe, b6 as Le, bs as ve, b9 as Pe, ba as We, bb as Oe, bB as Ie, by as Ve, bJ as Be, br as He, a as K, bz as _e } from "./searchTerms.es.js";
|
|
10
|
+
import p, { keyframes as ye, css as be } from "styled-components";
|
|
10
11
|
import U from "clsx";
|
|
11
|
-
import {
|
|
12
|
-
import { o as Be, M as He, T as _e, n as Qe, B as qe, D as Ge } from "./MetaWidget.es.js";
|
|
12
|
+
import { r as Qe, t as qe, M as Ge, T as Ke, q as Je, B as Ze, D as Xe } from "./MetaWidget.es.js";
|
|
13
13
|
import "./PlayableIcon.es.js";
|
|
14
|
-
import {
|
|
14
|
+
import { dq as Ye, c0 as et, ce as xe, bk as tt, as as ot, bz as rt, dd as at } from "./getUris.es.js";
|
|
15
15
|
import "@module-federation/enhanced/runtime";
|
|
16
|
-
import { o as
|
|
16
|
+
import { o as re, d as nt, x as it, T as st } from "./TableExportContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
18
18
|
import "./ContextMenuContextInstance.es.js";
|
|
19
19
|
import "react-dom";
|
|
20
20
|
import "react-redux";
|
|
21
21
|
import "react-router-dom";
|
|
22
|
-
import { format as
|
|
22
|
+
import { format as lt } from "date-fns";
|
|
23
23
|
import "lexical";
|
|
24
24
|
import "@lexical/markdown";
|
|
25
25
|
import "match-sorter";
|
|
@@ -31,16 +31,16 @@ import "@lexical/utils";
|
|
|
31
31
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
32
32
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
33
33
|
import "@tanstack/react-table";
|
|
34
|
-
import { g as
|
|
35
|
-
import { a as
|
|
36
|
-
import
|
|
37
|
-
import { p as
|
|
38
|
-
import { classNames as
|
|
39
|
-
import { u as
|
|
40
|
-
import { g as
|
|
41
|
-
const
|
|
42
|
-
const { data: t, isError: r } =
|
|
43
|
-
return
|
|
34
|
+
import { g as ct, h as ie } from "./humanizeFieldName.es.js";
|
|
35
|
+
import { a as dt, A as pt } from "./ThumbnailSimple.es.js";
|
|
36
|
+
import we from "axios";
|
|
37
|
+
import { p as Q } from "./parseFilename.es.js";
|
|
38
|
+
import { classNames as ut } from "primereact/utils";
|
|
39
|
+
import { u as mt } from "./useCreateContextMenu.es.js";
|
|
40
|
+
import { g as gt } from "./getThumbnailUrl.es.js";
|
|
41
|
+
const se = [], ht = (e) => {
|
|
42
|
+
const { data: t, isError: r } = Oe(void 0, { skip: !e });
|
|
43
|
+
return I(
|
|
44
44
|
() => ({
|
|
45
45
|
// a failed registry is settled too: every param is sent, same fallback as the batch
|
|
46
46
|
isRegistryLoaded: !!t || r,
|
|
@@ -48,55 +48,55 @@ const ee = [], pt = (e) => {
|
|
|
48
48
|
}),
|
|
49
49
|
[t, r, e]
|
|
50
50
|
);
|
|
51
|
-
},
|
|
52
|
-
const [e] =
|
|
53
|
-
return
|
|
51
|
+
}, Go = () => {
|
|
52
|
+
const [e] = Pe(), [t] = We();
|
|
53
|
+
return Y(
|
|
54
54
|
async (r, o) => {
|
|
55
|
-
const
|
|
56
|
-
}))?.find(({ name:
|
|
55
|
+
const n = (await t(void 0, !0).unwrap().catch(() => {
|
|
56
|
+
}))?.find(({ name: a }) => a === r.enumResolver)?.acceptedParams;
|
|
57
57
|
try {
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const a = await e(
|
|
59
|
+
fe(r, { projectName: o }, n),
|
|
60
60
|
!0
|
|
61
61
|
).unwrap();
|
|
62
|
-
if (
|
|
63
|
-
return
|
|
64
|
-
} catch (
|
|
65
|
-
throw
|
|
62
|
+
if (a.error) throw new Error(a.error);
|
|
63
|
+
return ve(a.items);
|
|
64
|
+
} catch (a) {
|
|
65
|
+
throw ft(a);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
[e, t]
|
|
69
69
|
);
|
|
70
|
-
},
|
|
70
|
+
}, ft = (e) => {
|
|
71
71
|
if (e instanceof Error) return e;
|
|
72
72
|
const {
|
|
73
73
|
message: t,
|
|
74
74
|
data: r,
|
|
75
75
|
status: o,
|
|
76
|
-
error:
|
|
76
|
+
error: c
|
|
77
77
|
} = e || {};
|
|
78
|
-
return typeof r?.detail == "string" ? new Error(r.detail) : typeof
|
|
79
|
-
},
|
|
80
|
-
const o = e?.enumResolver, { acceptedParams:
|
|
81
|
-
() =>
|
|
78
|
+
return typeof r?.detail == "string" ? new Error(r.detail) : typeof c == "string" ? new Error(c) : typeof t == "string" ? new Error(t) : new Error(o ? `Request failed (${o})` : "Request failed");
|
|
79
|
+
}, vt = (e, { projectName: t, skip: r } = {}) => {
|
|
80
|
+
const o = e?.enumResolver, { acceptedParams: c, isRegistryLoaded: n } = ht(o), a = I(
|
|
81
|
+
() => fe(e, { projectName: t }, c),
|
|
82
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
[o, e?.enumResolverSettings, t,
|
|
83
|
+
[o, e?.enumResolverSettings, t, c]
|
|
84
84
|
), {
|
|
85
|
-
currentData:
|
|
86
|
-
isFetching:
|
|
87
|
-
isError:
|
|
88
|
-
} =
|
|
85
|
+
currentData: d,
|
|
86
|
+
isFetching: h,
|
|
87
|
+
isError: i
|
|
88
|
+
} = Le(a, {
|
|
89
89
|
// waiting for the registry keeps the cache key final: no request is sent with params that get dropped
|
|
90
|
-
skip: !o || !!r || !
|
|
91
|
-
}), u =
|
|
90
|
+
skip: !o || !!r || !n
|
|
91
|
+
}), u = I(() => o ? d ? ve(d.items) : se : e?.enum || se, [o, d, e?.enum]), f = !!o && !h && (i || !!d?.error);
|
|
92
92
|
return {
|
|
93
93
|
options: u,
|
|
94
94
|
// a background refetch (tag invalidation) keeps the cached options, so it is not a load
|
|
95
|
-
isLoading: !!o && !r && (!
|
|
96
|
-
isError:
|
|
97
|
-
errorMessage:
|
|
95
|
+
isLoading: !!o && !r && (!n || h && !d),
|
|
96
|
+
isError: f,
|
|
97
|
+
errorMessage: f ? d?.error : void 0
|
|
98
98
|
};
|
|
99
|
-
},
|
|
99
|
+
}, yt = [
|
|
100
100
|
"id",
|
|
101
101
|
"name",
|
|
102
102
|
"label",
|
|
@@ -111,14 +111,14 @@ const ee = [], pt = (e) => {
|
|
|
111
111
|
"projectName",
|
|
112
112
|
"path",
|
|
113
113
|
"description"
|
|
114
|
-
],
|
|
114
|
+
], le = [
|
|
115
115
|
"id",
|
|
116
116
|
"entityType",
|
|
117
117
|
"projectName",
|
|
118
118
|
"path",
|
|
119
119
|
"createdAt",
|
|
120
120
|
"updatedAt"
|
|
121
|
-
],
|
|
121
|
+
], bt = [
|
|
122
122
|
"name",
|
|
123
123
|
"label",
|
|
124
124
|
"taskType",
|
|
@@ -126,68 +126,68 @@ const ee = [], pt = (e) => {
|
|
|
126
126
|
"productType",
|
|
127
127
|
"tags",
|
|
128
128
|
"status"
|
|
129
|
-
],
|
|
130
|
-
const [r, o] =
|
|
131
|
-
const
|
|
132
|
-
e.forEach((
|
|
129
|
+
], xt = (e, t) => {
|
|
130
|
+
const [r, o] = O([]), [c, n] = O(null), a = () => {
|
|
131
|
+
const i = {}, u = /* @__PURE__ */ new Set();
|
|
132
|
+
e.forEach((s) => {
|
|
133
133
|
const v = {
|
|
134
|
-
id:
|
|
135
|
-
name:
|
|
136
|
-
label:
|
|
137
|
-
entityType:
|
|
138
|
-
createdAt:
|
|
139
|
-
updatedAt:
|
|
140
|
-
projectName:
|
|
141
|
-
status:
|
|
142
|
-
tags:
|
|
143
|
-
path:
|
|
144
|
-
folderType:
|
|
145
|
-
productType:
|
|
146
|
-
taskType:
|
|
147
|
-
description:
|
|
134
|
+
id: s.id,
|
|
135
|
+
name: s.name,
|
|
136
|
+
label: s.label,
|
|
137
|
+
entityType: s.entityType,
|
|
138
|
+
createdAt: s.createdAt,
|
|
139
|
+
updatedAt: s.updatedAt,
|
|
140
|
+
projectName: s.projectName,
|
|
141
|
+
status: s.status,
|
|
142
|
+
tags: s.tags || [],
|
|
143
|
+
path: s.path,
|
|
144
|
+
folderType: s.folder?.folderType,
|
|
145
|
+
productType: s.product?.productType,
|
|
146
|
+
taskType: s.task?.taskType,
|
|
147
|
+
description: s.attrib?.description?.toString() ?? ""
|
|
148
148
|
};
|
|
149
|
-
Object.keys(v).forEach((
|
|
150
|
-
|
|
151
|
-
}),
|
|
152
|
-
if (
|
|
153
|
-
const w = `attrib.${
|
|
154
|
-
|
|
149
|
+
Object.keys(v).forEach((m) => {
|
|
150
|
+
yt.includes(m) && (i[m] = i[m] || [], i[m].push(v[m]));
|
|
151
|
+
}), s.attrib && Object.keys(s.attrib).forEach((m) => {
|
|
152
|
+
if (m !== "description") {
|
|
153
|
+
const w = `attrib.${m}`;
|
|
154
|
+
i[w] = i[w] || [], i[w].push(s.attrib?.[m]);
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
|
-
const
|
|
159
|
-
const { value: w, isMixed:
|
|
160
|
-
return
|
|
158
|
+
const f = Object.entries(i).reduce((s, [v, m]) => {
|
|
159
|
+
const { value: w, isMixed: T } = ct(m);
|
|
160
|
+
return s[v] = w, T && u.add(v), s;
|
|
161
161
|
}, {});
|
|
162
|
-
|
|
162
|
+
n(f), o(Array.from(u));
|
|
163
163
|
};
|
|
164
|
-
return
|
|
165
|
-
t || e.length === 0 ||
|
|
164
|
+
return q(() => {
|
|
165
|
+
t || e.length === 0 || a();
|
|
166
166
|
}, [e, t]), {
|
|
167
|
-
formData:
|
|
167
|
+
formData: c,
|
|
168
168
|
mixedFields: r,
|
|
169
|
-
updateFormData: (
|
|
170
|
-
|
|
171
|
-
...
|
|
172
|
-
[
|
|
169
|
+
updateFormData: (i, u) => {
|
|
170
|
+
n((f) => f && {
|
|
171
|
+
...f,
|
|
172
|
+
[i]: u
|
|
173
173
|
});
|
|
174
174
|
},
|
|
175
|
-
clearMixedField: (
|
|
176
|
-
o((u) => u.filter((
|
|
175
|
+
clearMixedField: (i) => {
|
|
176
|
+
o((u) => u.filter((f) => f !== i));
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
},
|
|
179
|
+
}, wt = ({
|
|
180
180
|
attributes: e,
|
|
181
181
|
folderTypes: t,
|
|
182
182
|
taskTypes: r,
|
|
183
183
|
statuses: o,
|
|
184
|
-
tags:
|
|
185
|
-
entityType:
|
|
186
|
-
folderHasVersions:
|
|
187
|
-
attribAccess:
|
|
184
|
+
tags: c,
|
|
185
|
+
entityType: n,
|
|
186
|
+
folderHasVersions: a,
|
|
187
|
+
attribAccess: d
|
|
188
188
|
}) => {
|
|
189
|
-
const
|
|
190
|
-
const { readableAttributes:
|
|
189
|
+
const h = I(() => {
|
|
190
|
+
const { readableAttributes: f, writableAttributes: s, writableFields: v } = d || {}, w = [
|
|
191
191
|
{
|
|
192
192
|
name: "name",
|
|
193
193
|
data: {
|
|
@@ -206,29 +206,29 @@ const ee = [], pt = (e) => {
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
name: "folderType",
|
|
209
|
-
hidden:
|
|
209
|
+
hidden: n !== "folder",
|
|
210
210
|
data: {
|
|
211
211
|
type: "string",
|
|
212
212
|
title: "Folder Type",
|
|
213
213
|
description: "Type of the folder",
|
|
214
|
-
enum: t.map((
|
|
215
|
-
value:
|
|
216
|
-
label:
|
|
217
|
-
icon:
|
|
214
|
+
enum: t.map((l) => ({
|
|
215
|
+
value: l.name,
|
|
216
|
+
label: l.name,
|
|
217
|
+
icon: l.icon
|
|
218
218
|
}))
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
222
|
name: "taskType",
|
|
223
|
-
hidden:
|
|
223
|
+
hidden: n !== "task",
|
|
224
224
|
data: {
|
|
225
225
|
type: "string",
|
|
226
226
|
title: "Task Type",
|
|
227
227
|
description: "Type of the task",
|
|
228
|
-
enum: r.map((
|
|
229
|
-
value:
|
|
230
|
-
label:
|
|
231
|
-
icon:
|
|
228
|
+
enum: r.map((l) => ({
|
|
229
|
+
value: l.name,
|
|
230
|
+
label: l.name,
|
|
231
|
+
icon: l.icon
|
|
232
232
|
}))
|
|
233
233
|
}
|
|
234
234
|
},
|
|
@@ -238,11 +238,11 @@ const ee = [], pt = (e) => {
|
|
|
238
238
|
type: "string",
|
|
239
239
|
title: "Status",
|
|
240
240
|
description: "The state the entity is in, is it approved or in progress etc.",
|
|
241
|
-
enum: o.map((
|
|
242
|
-
value:
|
|
243
|
-
label:
|
|
244
|
-
icon:
|
|
245
|
-
color:
|
|
241
|
+
enum: o.map((l) => ({
|
|
242
|
+
value: l.name,
|
|
243
|
+
label: l.name,
|
|
244
|
+
icon: l.icon,
|
|
245
|
+
color: l.color
|
|
246
246
|
}))
|
|
247
247
|
}
|
|
248
248
|
},
|
|
@@ -251,161 +251,162 @@ const ee = [], pt = (e) => {
|
|
|
251
251
|
data: {
|
|
252
252
|
type: "list_of_strings",
|
|
253
253
|
title: "Tags",
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
widget: "tags",
|
|
255
|
+
enum: c.map((l) => ({
|
|
256
|
+
value: l.name,
|
|
257
|
+
label: l.name,
|
|
258
|
+
color: l.color
|
|
258
259
|
}))
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
].map(
|
|
262
|
-
(
|
|
263
|
-
...
|
|
263
|
+
(l) => l.name === "folderType" && n === "folder" && a ? {
|
|
264
|
+
...l,
|
|
264
265
|
readonly: !0,
|
|
265
266
|
data: {
|
|
266
|
-
...
|
|
267
|
+
...l.data,
|
|
267
268
|
description: "Folder type is locked because the folder has published versions."
|
|
268
269
|
}
|
|
269
|
-
} :
|
|
270
|
-
),
|
|
270
|
+
} : l
|
|
271
|
+
), T = n === "version" ? [
|
|
271
272
|
...w.map(
|
|
272
|
-
(
|
|
273
|
+
(l) => ["tags", "status"].includes(l.name) ? l : { ...l, readonly: !0 }
|
|
273
274
|
)
|
|
274
|
-
] : w,
|
|
275
|
-
(
|
|
276
|
-
) :
|
|
277
|
-
name: "attrib." +
|
|
278
|
-
data:
|
|
279
|
-
...
|
|
280
|
-
...
|
|
281
|
-
})) : [],
|
|
282
|
-
name:
|
|
275
|
+
] : w, S = v ? T.map(
|
|
276
|
+
(l) => v.includes(l.name) || v.includes(Re(l.name)) ? l : { ...l, readonly: !0 }
|
|
277
|
+
) : T, b = n ? e.filter((l) => l.scope?.includes(n) && l.name !== "description").filter((l) => !f || f.includes(l.name)).map((l) => ({
|
|
278
|
+
name: "attrib." + l.name,
|
|
279
|
+
data: l.data,
|
|
280
|
+
...n === "version" && l.builtin ? { readonly: !0 } : {},
|
|
281
|
+
...s && !s.includes(l.name) ? { readonly: !0 } : {}
|
|
282
|
+
})) : [], k = le.map((l) => ({
|
|
283
|
+
name: l,
|
|
283
284
|
readonly: !0,
|
|
284
285
|
data: {
|
|
285
286
|
type: "string",
|
|
286
|
-
title:
|
|
287
|
+
title: Ue(l)
|
|
287
288
|
}
|
|
288
|
-
})),
|
|
289
|
-
...
|
|
290
|
-
...
|
|
291
|
-
...
|
|
292
|
-
],
|
|
293
|
-
return [...
|
|
294
|
-
const
|
|
295
|
-
return
|
|
289
|
+
})), C = [
|
|
290
|
+
...S,
|
|
291
|
+
...b,
|
|
292
|
+
...k
|
|
293
|
+
], E = ["path", "name"];
|
|
294
|
+
return [...C].sort((l, N) => {
|
|
295
|
+
const $ = E.indexOf(l.name), z = E.indexOf(N.name);
|
|
296
|
+
return $ === -1 && z === -1 ? 0 : $ === -1 ? 1 : z === -1 ? -1 : $ - z;
|
|
296
297
|
});
|
|
297
298
|
}, [
|
|
298
299
|
e,
|
|
299
300
|
t,
|
|
300
301
|
r,
|
|
301
302
|
o,
|
|
302
|
-
|
|
303
|
-
a,
|
|
303
|
+
c,
|
|
304
304
|
n,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
a,
|
|
306
|
+
d
|
|
307
|
+
]), i = h.filter(
|
|
308
|
+
(f) => bt.includes(f.name) || f.name.startsWith("attrib.")
|
|
309
|
+
), u = h.filter(
|
|
310
|
+
(f) => le.includes(f.name)
|
|
310
311
|
);
|
|
311
312
|
return {
|
|
312
|
-
fields:
|
|
313
|
-
editableFields:
|
|
313
|
+
fields: h,
|
|
314
|
+
editableFields: i,
|
|
314
315
|
readOnlyFieldsData: u
|
|
315
316
|
};
|
|
316
|
-
},
|
|
317
|
-
const [r] =
|
|
318
|
-
return { updateEntity: async (
|
|
319
|
-
if (
|
|
317
|
+
}, kt = ({ entities: e, entityType: t }) => {
|
|
318
|
+
const [r] = Ye(), { onUpdateEntity: o } = re();
|
|
319
|
+
return { updateEntity: async (n, a) => {
|
|
320
|
+
if (a == null) {
|
|
320
321
|
console.error("value is null or undefined");
|
|
321
322
|
return;
|
|
322
323
|
}
|
|
323
324
|
try {
|
|
324
|
-
const
|
|
325
|
-
id:
|
|
326
|
-
projectName:
|
|
325
|
+
const d = e.map((h) => ({
|
|
326
|
+
id: h.id,
|
|
327
|
+
projectName: h.projectName,
|
|
327
328
|
data: {
|
|
328
|
-
[
|
|
329
|
+
[n]: typeof a == "function" ? a(h.id) : a
|
|
329
330
|
},
|
|
330
|
-
currentAssignees:
|
|
331
|
+
currentAssignees: h.users,
|
|
331
332
|
meta: {
|
|
332
|
-
folderId:
|
|
333
|
+
folderId: h.folderId
|
|
333
334
|
}
|
|
334
335
|
}));
|
|
335
|
-
await r({ operations:
|
|
336
|
+
await r({ operations: d, entityType: t }), o?.({ operations: d, entityType: t });
|
|
336
337
|
} catch {
|
|
337
|
-
|
|
338
|
+
te.error(`Error updating ${t}`);
|
|
338
339
|
}
|
|
339
340
|
} };
|
|
340
|
-
},
|
|
341
|
+
}, X = (e) => e.reduce(
|
|
341
342
|
(t, r) => r ? t ? t.filter((o) => r.includes(o)) : r : t,
|
|
342
343
|
void 0
|
|
343
|
-
),
|
|
344
|
-
const { data: o } =
|
|
344
|
+
), Et = ({ entities: e, entityType: t }) => {
|
|
345
|
+
const { data: o } = et(), c = I(() => {
|
|
345
346
|
if (!o?.projects) return {};
|
|
346
|
-
const
|
|
347
|
-
(
|
|
348
|
-
),
|
|
347
|
+
const a = [...new Set(e.map((i) => i.projectName))].map(
|
|
348
|
+
(i) => o.projects?.[i] || {}
|
|
349
|
+
), d = a.map((i) => i.attrib_read), h = a.map((i) => i.attrib_write);
|
|
349
350
|
return {
|
|
350
|
-
readableAttributes:
|
|
351
|
-
|
|
351
|
+
readableAttributes: X(
|
|
352
|
+
d.map((i) => i?.enabled ? i.attributes ?? [] : void 0)
|
|
352
353
|
),
|
|
353
|
-
writableAttributes:
|
|
354
|
-
|
|
354
|
+
writableAttributes: X(
|
|
355
|
+
h.map((i) => i?.enabled ? i.attributes ?? [] : void 0)
|
|
355
356
|
),
|
|
356
|
-
writableFields:
|
|
357
|
+
writableFields: X(h.map((i) => i?.enabled ? i.fields ?? [] : void 0))
|
|
357
358
|
};
|
|
358
|
-
}, [o, e]), { updateEntity:
|
|
359
|
-
entities: e.map((
|
|
360
|
-
id:
|
|
361
|
-
projectName:
|
|
362
|
-
folderId:
|
|
363
|
-
productId:
|
|
364
|
-
users:
|
|
359
|
+
}, [o, e]), { updateEntity: n } = kt({
|
|
360
|
+
entities: e.map((a) => ({
|
|
361
|
+
id: a.id,
|
|
362
|
+
projectName: a.projectName || "",
|
|
363
|
+
folderId: a.folder?.id,
|
|
364
|
+
productId: a.product?.id,
|
|
365
|
+
users: a.task?.assignees || []
|
|
365
366
|
})),
|
|
366
367
|
entityType: t
|
|
367
368
|
});
|
|
368
369
|
return {
|
|
369
370
|
enableEditing: !0,
|
|
370
|
-
attribAccess:
|
|
371
|
-
updateEntity:
|
|
371
|
+
attribAccess: c,
|
|
372
|
+
updateEntity: n
|
|
372
373
|
};
|
|
373
|
-
},
|
|
374
|
-
const r =
|
|
374
|
+
}, St = (e, t) => {
|
|
375
|
+
const r = xe({ projects: [...new Set(e).values()] });
|
|
375
376
|
if (!r || !r.data)
|
|
376
377
|
return [];
|
|
377
378
|
let o;
|
|
378
|
-
for (const
|
|
379
|
-
const
|
|
380
|
-
(
|
|
379
|
+
for (const c of Object.values(r.data)) {
|
|
380
|
+
const n = c.statuses?.filter(
|
|
381
|
+
(a) => t.every((d) => !a.scope || a.scope?.includes(d))
|
|
381
382
|
) || [];
|
|
382
383
|
if (o === void 0) {
|
|
383
|
-
o =
|
|
384
|
+
o = n;
|
|
384
385
|
continue;
|
|
385
386
|
}
|
|
386
|
-
o =
|
|
387
|
+
o = he(o, n, "name");
|
|
387
388
|
}
|
|
388
389
|
return o;
|
|
389
|
-
},
|
|
390
|
+
}, Ko = (e, t) => {
|
|
390
391
|
let r = Object.values(e || {});
|
|
391
392
|
return r.length == 0 || r[0].scope === void 0 ? r : r.filter(
|
|
392
|
-
(o) => t.every((
|
|
393
|
+
(o) => t.every((c) => o.scope === void 0 || o.scope.includes(c))
|
|
393
394
|
);
|
|
394
|
-
},
|
|
395
|
-
const r =
|
|
395
|
+
}, Tt = (e, t) => {
|
|
396
|
+
const r = xe({ projects: [...new Set(e).values()] });
|
|
396
397
|
if (!r || !r.data)
|
|
397
398
|
return [];
|
|
398
399
|
let o;
|
|
399
|
-
for (const
|
|
400
|
-
let
|
|
401
|
-
if (t === "task" ?
|
|
402
|
-
o =
|
|
400
|
+
for (const c of Object.values(r.data)) {
|
|
401
|
+
let n = [];
|
|
402
|
+
if (t === "task" ? n = c.taskTypes || [] : t === "folder" && (n = c.folderTypes || []), o === void 0) {
|
|
403
|
+
o = n;
|
|
403
404
|
continue;
|
|
404
405
|
}
|
|
405
|
-
o =
|
|
406
|
+
o = he(o, n, "name");
|
|
406
407
|
}
|
|
407
408
|
return o || [];
|
|
408
|
-
},
|
|
409
|
+
}, ce = p.div`
|
|
409
410
|
width: 100%;
|
|
410
411
|
overflow: hidden;
|
|
411
412
|
text-overflow: ellipsis;
|
|
@@ -415,7 +416,7 @@ const ee = [], pt = (e) => {
|
|
|
415
416
|
input {
|
|
416
417
|
text-align: left;
|
|
417
418
|
}
|
|
418
|
-
`,
|
|
419
|
+
`, jt = p(Qe)`
|
|
419
420
|
.enum,
|
|
420
421
|
.edit-trigger {
|
|
421
422
|
&:hover {
|
|
@@ -425,144 +426,179 @@ const ee = [], pt = (e) => {
|
|
|
425
426
|
&:hover {
|
|
426
427
|
background-color: unset;
|
|
427
428
|
}
|
|
428
|
-
`,
|
|
429
|
+
`, Dt = p(qe)`
|
|
430
|
+
&.enum:hover {
|
|
431
|
+
background-color: unset;
|
|
432
|
+
}
|
|
433
|
+
`, Ft = ({
|
|
429
434
|
field: e,
|
|
430
435
|
value: t,
|
|
431
436
|
isEditing: r,
|
|
432
437
|
isReadOnly: o,
|
|
433
|
-
isMixed:
|
|
434
|
-
onChange:
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
isMixed: c,
|
|
439
|
+
onChange: n,
|
|
440
|
+
onMixedChange: a,
|
|
441
|
+
onCancelEdit: d,
|
|
442
|
+
onExpand: h,
|
|
443
|
+
entities: i = [],
|
|
444
|
+
entityType: u = "task",
|
|
445
|
+
projectName: f
|
|
440
446
|
}) => {
|
|
441
|
-
const { type:
|
|
447
|
+
const { type: s, widget: v } = e.data, m = {
|
|
442
448
|
isEditing: r && !o,
|
|
443
449
|
isReadOnly: o,
|
|
444
450
|
isInherited: !1,
|
|
445
|
-
onChange: (
|
|
446
|
-
},
|
|
447
|
-
options:
|
|
448
|
-
isLoading:
|
|
449
|
-
isError:
|
|
450
|
-
errorMessage:
|
|
451
|
-
} =
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
451
|
+
onChange: (A) => n(e.name, A)
|
|
452
|
+
}, w = i.map((A) => A.projectName), T = St(w, [u]), S = Tt(w, u), b = f || w[0], {
|
|
453
|
+
options: k,
|
|
454
|
+
isLoading: C,
|
|
455
|
+
isError: E,
|
|
456
|
+
errorMessage: D
|
|
457
|
+
} = vt(e.data, { projectName: b }), l = E ? He(D) : void 0, N = I(() => {
|
|
458
|
+
if (!(!a || i.length < 2 || s !== "list_of_strings"))
|
|
459
|
+
return Te(
|
|
460
|
+
i.map((A) => {
|
|
461
|
+
const L = e.name === "tags" ? A.tags : e.name.startsWith("attrib.") ? A.attrib?.[e.name.slice(7)] : void 0;
|
|
462
|
+
return Array.isArray(L) ? L.map(String) : [];
|
|
463
|
+
})
|
|
464
|
+
);
|
|
465
|
+
}, [a, i, s, e.name]), $ = N && {
|
|
466
|
+
mixedCounts: N,
|
|
467
|
+
mixedTotal: i.length,
|
|
468
|
+
mixedLabel: `${u}s`,
|
|
469
|
+
onMixedChange: (A) => a?.(e.name, A)
|
|
470
|
+
}, z = e.name === "attrib.endDate" && i.length > 0 && i.every((A) => A.data?.schedulerSyncData?.allDay === !0);
|
|
471
|
+
let F = t ?? "";
|
|
472
|
+
const y = e.data.title || e.name, j = t == null || t === "" || Array.isArray(t) && t.length === 0;
|
|
473
|
+
if (s !== "boolean" && o && !c && j)
|
|
474
|
+
return /* @__PURE__ */ g(ce, { children: "-" });
|
|
456
475
|
switch (!0) {
|
|
457
|
-
case
|
|
458
|
-
return /* @__PURE__ */
|
|
459
|
-
case
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
|
|
476
|
+
case s === "boolean":
|
|
477
|
+
return /* @__PURE__ */ g(Ze, { value: !!F, ...m, style: { margin: 0 } });
|
|
478
|
+
case s === "datetime":
|
|
479
|
+
return /* @__PURE__ */ g(
|
|
480
|
+
Je,
|
|
462
481
|
{
|
|
463
|
-
value:
|
|
464
|
-
...
|
|
482
|
+
value: F,
|
|
483
|
+
...m,
|
|
465
484
|
isEditing: !0,
|
|
466
|
-
onCancelEdit:
|
|
485
|
+
onCancelEdit: d,
|
|
467
486
|
style: { width: "fit-content" },
|
|
468
487
|
autoFocus: !1,
|
|
469
|
-
isMidnightExclusive:
|
|
488
|
+
isMidnightExclusive: z
|
|
470
489
|
}
|
|
471
490
|
);
|
|
472
|
-
case
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
491
|
+
case v === "tags":
|
|
492
|
+
return /* @__PURE__ */ g(
|
|
493
|
+
Dt,
|
|
494
|
+
{
|
|
495
|
+
value: Array.isArray(F) ? F : [],
|
|
496
|
+
options: k,
|
|
497
|
+
projectName: b,
|
|
498
|
+
isProjectTags: e.name === "tags" && new Set(w).size <= 1,
|
|
499
|
+
pt: { template: { style: { height: 32 }, className: "enum" } },
|
|
500
|
+
placeholder: c ? `Mixed ${y}` : `Select ${y}...`,
|
|
501
|
+
...$,
|
|
502
|
+
onCancelEdit: d,
|
|
503
|
+
align: "right",
|
|
504
|
+
...m
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
case Ie(e.data): {
|
|
508
|
+
const A = s?.includes("list");
|
|
509
|
+
let L = [];
|
|
510
|
+
A ? L = Array.isArray(F) ? F : [] : c ? L = [] : L = [F];
|
|
511
|
+
let P = k.map((x) => ({
|
|
512
|
+
value: x.value,
|
|
513
|
+
label: x.label,
|
|
514
|
+
icon: Ve(x.icon),
|
|
515
|
+
color: x.color,
|
|
516
|
+
group: x.group,
|
|
517
|
+
hidden: x.hidden
|
|
483
518
|
}));
|
|
484
|
-
return e.name === "status" &&
|
|
485
|
-
value:
|
|
486
|
-
label:
|
|
487
|
-
icon:
|
|
488
|
-
color:
|
|
489
|
-
}))), e.name === "taskType" &&
|
|
490
|
-
value:
|
|
491
|
-
label:
|
|
492
|
-
icon:
|
|
493
|
-
color:
|
|
494
|
-
}))), e.allowNone &&
|
|
519
|
+
return e.name === "status" && i.length > 0 && T && T.length > 0 && (P = T.map((x) => ({
|
|
520
|
+
value: x.name,
|
|
521
|
+
label: x.name,
|
|
522
|
+
icon: x.icon,
|
|
523
|
+
color: x.color
|
|
524
|
+
}))), e.name === "taskType" && i.length > 0 && S && S.length > 0 && (P = S.map((x) => ({
|
|
525
|
+
value: x.name,
|
|
526
|
+
label: x.name,
|
|
527
|
+
icon: x.icon,
|
|
528
|
+
color: x.color
|
|
529
|
+
}))), e.allowNone && L.length && !A && F && F !== "" && (P = [
|
|
495
530
|
{ value: "", label: `No ${e.data.title || e.name}` },
|
|
496
|
-
...
|
|
497
|
-
]), /* @__PURE__ */
|
|
498
|
-
|
|
531
|
+
...P
|
|
532
|
+
]), /* @__PURE__ */ g(
|
|
533
|
+
jt,
|
|
499
534
|
{
|
|
500
|
-
"data-tooltip":
|
|
501
|
-
value:
|
|
502
|
-
options:
|
|
503
|
-
type:
|
|
535
|
+
"data-tooltip": l,
|
|
536
|
+
value: L,
|
|
537
|
+
options: P,
|
|
538
|
+
type: s,
|
|
504
539
|
pt: {
|
|
505
540
|
template: {
|
|
506
541
|
style: { height: 32 },
|
|
507
542
|
className: "enum"
|
|
508
543
|
}
|
|
509
544
|
},
|
|
510
|
-
placeholder:
|
|
511
|
-
error:
|
|
512
|
-
onCancelEdit:
|
|
545
|
+
placeholder: l ? `Could not load ${y}` : c ? `Mixed ${y}` : `Select ${y}...`,
|
|
546
|
+
error: Be(l),
|
|
547
|
+
onCancelEdit: d,
|
|
513
548
|
align: "right",
|
|
514
549
|
enableCustomValues: e.enableCustomValues,
|
|
515
|
-
isLoadingOptions:
|
|
516
|
-
search: e.enableSearch ??
|
|
517
|
-
sortBySelected: !
|
|
518
|
-
|
|
550
|
+
isLoadingOptions: C,
|
|
551
|
+
search: e.enableSearch ?? P.length >= 5,
|
|
552
|
+
sortBySelected: !P,
|
|
553
|
+
...$,
|
|
554
|
+
...m
|
|
519
555
|
}
|
|
520
556
|
);
|
|
521
557
|
}
|
|
522
|
-
case (
|
|
558
|
+
case (s === "string" || s === "integer" || s === "float"):
|
|
523
559
|
default:
|
|
524
|
-
return
|
|
525
|
-
|
|
560
|
+
return v === "markdown" ? /* @__PURE__ */ g(
|
|
561
|
+
Ge,
|
|
526
562
|
{
|
|
527
|
-
value:
|
|
528
|
-
onCancelEdit:
|
|
529
|
-
onExpand:
|
|
530
|
-
showExpand: !!
|
|
531
|
-
...
|
|
563
|
+
value: F.toString(),
|
|
564
|
+
onCancelEdit: d,
|
|
565
|
+
onExpand: h,
|
|
566
|
+
showExpand: !!h,
|
|
567
|
+
...m
|
|
532
568
|
}
|
|
533
|
-
) : /* @__PURE__ */
|
|
534
|
-
|
|
569
|
+
) : /* @__PURE__ */ g(ce, { children: /* @__PURE__ */ g(
|
|
570
|
+
Ke,
|
|
535
571
|
{
|
|
536
|
-
value:
|
|
537
|
-
onCancelEdit:
|
|
538
|
-
type:
|
|
539
|
-
...
|
|
572
|
+
value: F.toString(),
|
|
573
|
+
onCancelEdit: d,
|
|
574
|
+
type: s,
|
|
575
|
+
...m
|
|
540
576
|
}
|
|
541
577
|
) });
|
|
542
578
|
}
|
|
543
|
-
},
|
|
579
|
+
}, Ct = p.div`
|
|
544
580
|
color: var(--md-sys-color-outline);
|
|
545
581
|
white-space: nowrap;
|
|
546
582
|
overflow: hidden;
|
|
547
583
|
text-overflow: ellipsis;
|
|
548
584
|
font-size: 14px;
|
|
549
|
-
`,
|
|
585
|
+
`, ke = ({
|
|
550
586
|
name: e,
|
|
551
587
|
data: t,
|
|
552
588
|
showDetailedTooltip: r = !1,
|
|
553
589
|
...o
|
|
554
590
|
}) => {
|
|
555
|
-
const
|
|
556
|
-
return /* @__PURE__ */
|
|
557
|
-
|
|
591
|
+
const c = t.title ? ie(t.title) : ie(e), n = r ? `${c} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || c;
|
|
592
|
+
return /* @__PURE__ */ g(
|
|
593
|
+
Ct,
|
|
558
594
|
{
|
|
559
|
-
"data-tooltip": r ?
|
|
595
|
+
"data-tooltip": r ? n : void 0,
|
|
560
596
|
"data-tooltip-delay": 700,
|
|
561
597
|
...o,
|
|
562
|
-
children:
|
|
598
|
+
children: c
|
|
563
599
|
}
|
|
564
600
|
);
|
|
565
|
-
},
|
|
601
|
+
}, Ee = p.div`
|
|
566
602
|
display: grid;
|
|
567
603
|
grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr) 32px;
|
|
568
604
|
row-gap: 2px;
|
|
@@ -596,7 +632,7 @@ const ee = [], pt = (e) => {
|
|
|
596
632
|
margin-top: 6px;
|
|
597
633
|
}
|
|
598
634
|
}
|
|
599
|
-
`,
|
|
635
|
+
`, At = p.div`
|
|
600
636
|
height: 32px;
|
|
601
637
|
overflow: hidden;
|
|
602
638
|
width: 100%;
|
|
@@ -632,7 +668,7 @@ const ee = [], pt = (e) => {
|
|
|
632
668
|
&.readonly {
|
|
633
669
|
pointer-events: none;
|
|
634
670
|
}
|
|
635
|
-
`,
|
|
671
|
+
`, Nt = p.div`
|
|
636
672
|
display: flex;
|
|
637
673
|
flex-direction: column;
|
|
638
674
|
gap: var(--base-gap-small);
|
|
@@ -642,7 +678,7 @@ const ee = [], pt = (e) => {
|
|
|
642
678
|
height: 32px;
|
|
643
679
|
padding: 2px;
|
|
644
680
|
}
|
|
645
|
-
`,
|
|
681
|
+
`, $t = p(Ee)`
|
|
646
682
|
&.loading {
|
|
647
683
|
width: 100%;
|
|
648
684
|
height: 33px;
|
|
@@ -650,110 +686,114 @@ const ee = [], pt = (e) => {
|
|
|
650
686
|
border-radius: 4px;
|
|
651
687
|
margin-bottom: 4px;
|
|
652
688
|
}
|
|
653
|
-
`,
|
|
689
|
+
`, Mt = ({
|
|
654
690
|
title: e,
|
|
655
691
|
isLoading: t,
|
|
656
692
|
form: r,
|
|
657
693
|
fields: o,
|
|
658
|
-
enableEditing:
|
|
659
|
-
mixedFields:
|
|
660
|
-
onChange:
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
694
|
+
enableEditing: c,
|
|
695
|
+
mixedFields: n,
|
|
696
|
+
onChange: a,
|
|
697
|
+
onMixedChange: d,
|
|
698
|
+
entities: h = [],
|
|
699
|
+
projectName: i,
|
|
700
|
+
entityType: u = "task"
|
|
664
701
|
}) => {
|
|
665
|
-
const [
|
|
666
|
-
() =>
|
|
667
|
-
[
|
|
702
|
+
const [f, s] = O(null), v = I(
|
|
703
|
+
() => h.map((b) => b?.id).join("|"),
|
|
704
|
+
[h]
|
|
668
705
|
);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
}, [
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
enableEditing:
|
|
675
|
-
fieldReadonly: o.find((
|
|
706
|
+
q(() => {
|
|
707
|
+
s(null);
|
|
708
|
+
}, [v]);
|
|
709
|
+
const m = (b) => {
|
|
710
|
+
c && !o.find((k) => k.name === b)?.readonly ? s(b) : console.log("Editing not allowed:", {
|
|
711
|
+
enableEditing: c,
|
|
712
|
+
fieldReadonly: o.find((k) => k.name === b)?.readonly
|
|
676
713
|
});
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
},
|
|
680
|
-
|
|
714
|
+
}, w = (b, k) => {
|
|
715
|
+
s(null), a?.(b, k);
|
|
716
|
+
}, T = (b, k) => {
|
|
717
|
+
s(null), d?.(b, k);
|
|
718
|
+
}, S = () => {
|
|
719
|
+
s(null);
|
|
681
720
|
};
|
|
682
|
-
return t ? /* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
] },
|
|
686
|
-
|
|
721
|
+
return t ? /* @__PURE__ */ g(J, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((b, k) => /* @__PURE__ */ R($t, { children: [
|
|
722
|
+
/* @__PURE__ */ g("div", { className: "loading" }),
|
|
723
|
+
/* @__PURE__ */ g("div", { className: "loading" })
|
|
724
|
+
] }, k)) }) : /* @__PURE__ */ g(
|
|
725
|
+
J,
|
|
687
726
|
{
|
|
688
727
|
title: "Attributes",
|
|
689
728
|
autoHeight: !0,
|
|
690
729
|
showHeader: !0,
|
|
691
730
|
withPadding: !0,
|
|
692
731
|
pt: { content: { style: { minHeight: "unset" } } },
|
|
693
|
-
children: o.filter((
|
|
694
|
-
const
|
|
695
|
-
return /* @__PURE__ */
|
|
696
|
-
|
|
732
|
+
children: o.filter((b) => !b.hidden).map((b) => {
|
|
733
|
+
const k = r[b.name], C = f === b.name, E = b.readonly || !c, D = n?.includes(b.name) || !1;
|
|
734
|
+
return /* @__PURE__ */ R(
|
|
735
|
+
Ee,
|
|
697
736
|
{
|
|
698
|
-
className: U("field-row", { "multi-line":
|
|
737
|
+
className: U("field-row", { "multi-line": b.data.widget === "markdown" }),
|
|
699
738
|
children: [
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
|
|
739
|
+
/* @__PURE__ */ g(
|
|
740
|
+
ke,
|
|
702
741
|
{
|
|
703
|
-
name:
|
|
704
|
-
data:
|
|
742
|
+
name: b.name,
|
|
743
|
+
data: b.data,
|
|
705
744
|
showDetailedTooltip: !0,
|
|
706
745
|
className: "field-label"
|
|
707
746
|
}
|
|
708
747
|
),
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
|
|
748
|
+
/* @__PURE__ */ g(
|
|
749
|
+
At,
|
|
711
750
|
{
|
|
712
751
|
className: U("field-value", {
|
|
713
|
-
editing:
|
|
714
|
-
readonly:
|
|
752
|
+
editing: C,
|
|
753
|
+
readonly: E
|
|
715
754
|
}),
|
|
716
|
-
onClick: (
|
|
717
|
-
|
|
755
|
+
onClick: (l) => {
|
|
756
|
+
l.target.closest("a") || (l.preventDefault(), !C && !E && b.data.type !== "boolean" && m(b.name));
|
|
718
757
|
},
|
|
719
|
-
children: /* @__PURE__ */
|
|
720
|
-
|
|
758
|
+
children: /* @__PURE__ */ g(
|
|
759
|
+
Ft,
|
|
721
760
|
{
|
|
722
|
-
field:
|
|
723
|
-
value:
|
|
724
|
-
isEditing:
|
|
725
|
-
isReadOnly:
|
|
726
|
-
isMixed:
|
|
727
|
-
onChange:
|
|
728
|
-
|
|
761
|
+
field: b,
|
|
762
|
+
value: k,
|
|
763
|
+
isEditing: C,
|
|
764
|
+
isReadOnly: E,
|
|
765
|
+
isMixed: D,
|
|
766
|
+
onChange: w,
|
|
767
|
+
onMixedChange: d && T,
|
|
768
|
+
onCancelEdit: S,
|
|
729
769
|
onExpand: () => {
|
|
730
770
|
},
|
|
731
|
-
entities:
|
|
732
|
-
projectName:
|
|
733
|
-
entityType:
|
|
771
|
+
entities: h,
|
|
772
|
+
projectName: i,
|
|
773
|
+
entityType: u
|
|
734
774
|
}
|
|
735
775
|
)
|
|
736
776
|
}
|
|
737
777
|
),
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
|
|
778
|
+
/* @__PURE__ */ g(Nt, { className: "field-tools", children: /* @__PURE__ */ g(
|
|
779
|
+
_,
|
|
740
780
|
{
|
|
741
781
|
className: "tool",
|
|
742
782
|
variant: "text",
|
|
743
783
|
icon: "content_copy",
|
|
744
|
-
onClick: (
|
|
745
|
-
|
|
784
|
+
onClick: (l) => {
|
|
785
|
+
l.preventDefault(), l.stopPropagation(), oe((k ?? "").toString(), !0);
|
|
746
786
|
}
|
|
747
787
|
}
|
|
748
788
|
) })
|
|
749
789
|
]
|
|
750
790
|
},
|
|
751
|
-
|
|
791
|
+
b.name
|
|
752
792
|
);
|
|
753
793
|
})
|
|
754
794
|
}
|
|
755
795
|
);
|
|
756
|
-
},
|
|
796
|
+
}, de = p.div`
|
|
757
797
|
display: grid;
|
|
758
798
|
grid-template-columns: minmax(200px, 1fr) 1fr 32px;
|
|
759
799
|
row-gap: 2px;
|
|
@@ -776,7 +816,7 @@ const ee = [], pt = (e) => {
|
|
|
776
816
|
&:hover .copy-icon {
|
|
777
817
|
opacity: 1;
|
|
778
818
|
}
|
|
779
|
-
`,
|
|
819
|
+
`, zt = p.div`
|
|
780
820
|
text-align: left;
|
|
781
821
|
color: var(--md-sys-color-on-surface);
|
|
782
822
|
white-space: nowrap;
|
|
@@ -785,7 +825,7 @@ const ee = [], pt = (e) => {
|
|
|
785
825
|
justify-self: end;
|
|
786
826
|
font-size: 14px;
|
|
787
827
|
width: 100%;
|
|
788
|
-
`,
|
|
828
|
+
`, pe = p.div`
|
|
789
829
|
height: 20px;
|
|
790
830
|
background: var(--md-sys-color-surface-container-low);
|
|
791
831
|
border-radius: 4px;
|
|
@@ -802,55 +842,55 @@ const ee = [], pt = (e) => {
|
|
|
802
842
|
opacity: 0.5;
|
|
803
843
|
}
|
|
804
844
|
}
|
|
805
|
-
`,
|
|
845
|
+
`, Rt = ({
|
|
806
846
|
fields: e,
|
|
807
847
|
form: t,
|
|
808
848
|
mixedFields: r = [],
|
|
809
849
|
isLoading: o
|
|
810
850
|
}) => {
|
|
811
|
-
const
|
|
812
|
-
if (
|
|
851
|
+
const c = (n, a) => {
|
|
852
|
+
if (n == null)
|
|
813
853
|
return "-";
|
|
814
|
-
if (
|
|
854
|
+
if (a === "createdAt" || a === "updatedAt")
|
|
815
855
|
try {
|
|
816
|
-
return
|
|
856
|
+
return lt(new Date(n), "PPpp");
|
|
817
857
|
} catch {
|
|
818
|
-
return
|
|
858
|
+
return n.toString();
|
|
819
859
|
}
|
|
820
|
-
return
|
|
860
|
+
return n.toString();
|
|
821
861
|
};
|
|
822
|
-
return o ? /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
] },
|
|
827
|
-
const
|
|
828
|
-
return /* @__PURE__ */
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
|
|
862
|
+
return o ? /* @__PURE__ */ g(J, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((n, a) => /* @__PURE__ */ R(de, { children: [
|
|
863
|
+
/* @__PURE__ */ g(pe, { style: { width: "80px" } }),
|
|
864
|
+
/* @__PURE__ */ g(pe, { style: { width: "120px", justifySelf: "end" } }),
|
|
865
|
+
/* @__PURE__ */ g("div", { style: { width: "24px" } })
|
|
866
|
+
] }, a)) }) : /* @__PURE__ */ g(J, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((n) => !n.hidden).map((n) => {
|
|
867
|
+
const a = t[n.name], d = r.includes(n.name), h = d ? "Multiple values" : c(a, n.name);
|
|
868
|
+
return /* @__PURE__ */ R(de, { children: [
|
|
869
|
+
/* @__PURE__ */ g(ke, { name: n.name, data: n.data, showDetailedTooltip: !0 }),
|
|
870
|
+
/* @__PURE__ */ g(
|
|
871
|
+
zt,
|
|
832
872
|
{
|
|
833
873
|
style: {
|
|
834
|
-
color:
|
|
835
|
-
fontStyle:
|
|
874
|
+
color: d ? "var(--md-sys-color-on-surface-variant)" : "var(--md-sys-color-on-surface)",
|
|
875
|
+
fontStyle: d ? "italic" : "normal"
|
|
836
876
|
},
|
|
837
|
-
children:
|
|
877
|
+
children: h
|
|
838
878
|
}
|
|
839
879
|
),
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
|
|
880
|
+
/* @__PURE__ */ g(
|
|
881
|
+
_,
|
|
842
882
|
{
|
|
843
883
|
className: "copy-icon",
|
|
844
884
|
variant: "text",
|
|
845
885
|
icon: "content_copy",
|
|
846
|
-
onClick: (
|
|
847
|
-
|
|
886
|
+
onClick: (i) => {
|
|
887
|
+
i.stopPropagation(), oe((a ?? "").toString(), !0);
|
|
848
888
|
}
|
|
849
889
|
}
|
|
850
890
|
)
|
|
851
|
-
] },
|
|
891
|
+
] }, n.name);
|
|
852
892
|
}) });
|
|
853
|
-
},
|
|
893
|
+
}, Ut = p.div`
|
|
854
894
|
display: flex;
|
|
855
895
|
flex-direction: column;
|
|
856
896
|
height: 100%;
|
|
@@ -859,94 +899,106 @@ const ee = [], pt = (e) => {
|
|
|
859
899
|
padding-right: 8px;
|
|
860
900
|
padding-left: 8px;
|
|
861
901
|
margin-top: 16px;
|
|
862
|
-
`,
|
|
863
|
-
const { formData: r, mixedFields: o, updateFormData:
|
|
902
|
+
`, Jo = ({ entities: e = [], isLoading: t }) => {
|
|
903
|
+
const { formData: r, mixedFields: o, updateFormData: c, clearMixedField: n } = xt(
|
|
864
904
|
e,
|
|
865
905
|
t
|
|
866
|
-
), { attributes:
|
|
867
|
-
folderTypes:
|
|
868
|
-
taskTypes:
|
|
869
|
-
statuses:
|
|
906
|
+
), { attributes: a } = nt(), {
|
|
907
|
+
folderTypes: d = [],
|
|
908
|
+
taskTypes: h = [],
|
|
909
|
+
statuses: i = [],
|
|
870
910
|
tags: u = [],
|
|
871
|
-
productTypes:
|
|
872
|
-
} =
|
|
911
|
+
productTypes: f
|
|
912
|
+
} = it(), { openSlideOut: s } = re(), [, v] = dt(), m = (e || []).filter((x) => x.entityType === "folder"), { data: w } = tt(
|
|
873
913
|
{
|
|
874
|
-
entityIds:
|
|
914
|
+
entityIds: m.map((x) => x.id),
|
|
875
915
|
projectName: r?.projectName || "",
|
|
876
916
|
referenceTypes: ["origin", "mention", "relation"],
|
|
877
917
|
activityTypes: ["version.publish"]
|
|
878
918
|
},
|
|
879
919
|
{
|
|
880
|
-
skip: !r?.projectName ||
|
|
920
|
+
skip: !r?.projectName || m.length === 0
|
|
881
921
|
}
|
|
882
|
-
),
|
|
922
|
+
), T = !!w?.pages?.[0]?.activities?.length, S = r?.entityType || "task", { enableEditing: b, attribAccess: k, updateEntity: C } = Et({
|
|
883
923
|
entities: e,
|
|
884
|
-
entityType:
|
|
885
|
-
}), { editableFields:
|
|
886
|
-
attributes:
|
|
887
|
-
folderTypes:
|
|
888
|
-
taskTypes:
|
|
889
|
-
statuses:
|
|
924
|
+
entityType: S
|
|
925
|
+
}), { editableFields: E, readOnlyFieldsData: D } = wt({
|
|
926
|
+
attributes: a,
|
|
927
|
+
folderTypes: d,
|
|
928
|
+
taskTypes: h,
|
|
929
|
+
statuses: i,
|
|
890
930
|
tags: u,
|
|
891
931
|
entityType: r?.entityType,
|
|
892
|
-
folderHasVersions:
|
|
893
|
-
attribAccess:
|
|
894
|
-
}), { writableAttributes:
|
|
895
|
-
|
|
896
|
-
[
|
|
897
|
-
},
|
|
898
|
-
},
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
932
|
+
folderHasVersions: T,
|
|
933
|
+
attribAccess: k
|
|
934
|
+
}), { writableAttributes: l } = k, N = !l || l.includes("description"), $ = (x, M) => {
|
|
935
|
+
x === "tags" && (Array.isArray(M) || (M == null || M === "" ? M = [] : M = [String(M)])), x.startsWith("attrib.") && (M = {
|
|
936
|
+
[x.replace("attrib.", "")]: M
|
|
937
|
+
}, x = "attrib"), c(x, M), C(x, M);
|
|
938
|
+
}, z = (x, M) => {
|
|
939
|
+
const B = x.startsWith("attrib.") ? x.replace("attrib.", "") : void 0, Z = (W) => {
|
|
940
|
+
const H = B ? W.attrib?.[B] : W.tags;
|
|
941
|
+
return Array.isArray(H) ? H.map(String) : [];
|
|
942
|
+
}, G = new Map(
|
|
943
|
+
e.map((W) => [W.id, je(Z(W), M)])
|
|
944
|
+
);
|
|
945
|
+
c(x, [...new Set([...G.values()].flat())]), C(B ? "attrib" : x, (W) => {
|
|
946
|
+
const H = G.get(W) || [];
|
|
947
|
+
return B ? { [B]: H } : H;
|
|
948
|
+
});
|
|
949
|
+
}, F = r?.projectName || e[0]?.projectName, y = e[0]?.id, j = I(
|
|
950
|
+
() => F && y ? { projectName: F, entityType: S, entityId: y, productTypes: f, taskTypes: h } : void 0,
|
|
951
|
+
[F, S, y, f, h]
|
|
952
|
+
), A = ({ type: x, id: M }) => {
|
|
953
|
+
x === "user" || x === "team" || !F || s({ entityId: M, entityType: x, projectName: F });
|
|
954
|
+
}, L = ({ type: x, id: M, label: B }, Z) => {
|
|
955
|
+
const { x: G, y: W, width: H } = Z.getBoundingClientRect();
|
|
956
|
+
v({ id: M, name: M, type: x, label: B, pos: { left: G + H / 2, top: W } });
|
|
957
|
+
}, P = (x) => {
|
|
958
|
+
c("description", x), n("description"), C("attrib", { description: x });
|
|
908
959
|
};
|
|
909
|
-
return /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
|
|
960
|
+
return /* @__PURE__ */ R(Ut, { children: [
|
|
961
|
+
/* @__PURE__ */ g(
|
|
962
|
+
Xe,
|
|
912
963
|
{
|
|
913
964
|
description: r?.description || "",
|
|
914
965
|
isMixed: o.includes("description"),
|
|
915
|
-
enableEditing:
|
|
916
|
-
onChange:
|
|
966
|
+
enableEditing: N,
|
|
967
|
+
onChange: P,
|
|
917
968
|
isLoading: t,
|
|
918
|
-
mentionsContext:
|
|
919
|
-
onMentionClick:
|
|
920
|
-
onMentionHover:
|
|
969
|
+
mentionsContext: j,
|
|
970
|
+
onMentionClick: A,
|
|
971
|
+
onMentionHover: L
|
|
921
972
|
}
|
|
922
973
|
),
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
|
|
974
|
+
/* @__PURE__ */ g(pt, {}),
|
|
975
|
+
/* @__PURE__ */ g(
|
|
976
|
+
Mt,
|
|
926
977
|
{
|
|
927
|
-
fields:
|
|
978
|
+
fields: E,
|
|
928
979
|
form: r || {},
|
|
929
980
|
mixedFields: o,
|
|
930
981
|
isLoading: t,
|
|
931
|
-
enableEditing:
|
|
932
|
-
onChange:
|
|
982
|
+
enableEditing: b,
|
|
983
|
+
onChange: $,
|
|
984
|
+
onMixedChange: z,
|
|
933
985
|
entities: e,
|
|
934
|
-
entityType:
|
|
986
|
+
entityType: S
|
|
935
987
|
}
|
|
936
988
|
),
|
|
937
|
-
/* @__PURE__ */
|
|
938
|
-
|
|
989
|
+
/* @__PURE__ */ g(
|
|
990
|
+
Rt,
|
|
939
991
|
{
|
|
940
|
-
fields:
|
|
992
|
+
fields: D,
|
|
941
993
|
form: r || {},
|
|
942
994
|
mixedFields: o,
|
|
943
995
|
isLoading: t
|
|
944
996
|
}
|
|
945
997
|
)
|
|
946
998
|
] });
|
|
947
|
-
},
|
|
999
|
+
}, Zo = p.div`
|
|
948
1000
|
position: relative;
|
|
949
|
-
`,
|
|
1001
|
+
`, Xo = p.div`
|
|
950
1002
|
position: relative;
|
|
951
1003
|
padding: 8px;
|
|
952
1004
|
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
@@ -978,13 +1030,13 @@ const ee = [], pt = (e) => {
|
|
|
978
1030
|
/* align center */
|
|
979
1031
|
align-items: center;
|
|
980
1032
|
}
|
|
981
|
-
`,
|
|
1033
|
+
`, Yo = p(_)`
|
|
982
1034
|
position: absolute;
|
|
983
1035
|
right: 4px;
|
|
984
1036
|
top: 4px;
|
|
985
1037
|
width: fit-content;
|
|
986
1038
|
z-index: 50;
|
|
987
|
-
`,
|
|
1039
|
+
`, er = p.header`
|
|
988
1040
|
display: flex;
|
|
989
1041
|
align-items: center;
|
|
990
1042
|
gap: var(--base-gap-large);
|
|
@@ -999,7 +1051,7 @@ const ee = [], pt = (e) => {
|
|
|
999
1051
|
display: none;
|
|
1000
1052
|
}
|
|
1001
1053
|
}
|
|
1002
|
-
`,
|
|
1054
|
+
`, tr = p.div`
|
|
1003
1055
|
display: flex;
|
|
1004
1056
|
align-items: center;
|
|
1005
1057
|
gap: var(--base-gap-small);
|
|
@@ -1007,7 +1059,7 @@ const ee = [], pt = (e) => {
|
|
|
1007
1059
|
h2 {
|
|
1008
1060
|
min-width: fit-content;
|
|
1009
1061
|
}
|
|
1010
|
-
`,
|
|
1062
|
+
`, or = p.div`
|
|
1011
1063
|
position: relative;
|
|
1012
1064
|
height: 100%;
|
|
1013
1065
|
|
|
@@ -1022,7 +1074,7 @@ const ee = [], pt = (e) => {
|
|
|
1022
1074
|
flex-direction: column;
|
|
1023
1075
|
gap: var(--base-gap-small);
|
|
1024
1076
|
}
|
|
1025
|
-
`,
|
|
1077
|
+
`, rr = p.div`
|
|
1026
1078
|
display: flex;
|
|
1027
1079
|
flex-direction: column;
|
|
1028
1080
|
height: 100%;
|
|
@@ -1060,7 +1112,7 @@ const ee = [], pt = (e) => {
|
|
|
1060
1112
|
align-items: center;
|
|
1061
1113
|
gap: var(--base-gap-medium);
|
|
1062
1114
|
}
|
|
1063
|
-
`,
|
|
1115
|
+
`, ar = p.div`
|
|
1064
1116
|
display: flex;
|
|
1065
1117
|
justify-content: space-between;
|
|
1066
1118
|
align-items: flex-start;
|
|
@@ -1069,10 +1121,10 @@ const ee = [], pt = (e) => {
|
|
|
1069
1121
|
label {
|
|
1070
1122
|
color: var(--md-sys-color-outline);
|
|
1071
1123
|
}
|
|
1072
|
-
`,
|
|
1124
|
+
`, nr = p.div`
|
|
1073
1125
|
display: flex;
|
|
1074
1126
|
flex-direction: column;
|
|
1075
|
-
`,
|
|
1127
|
+
`, ir = p(De)`
|
|
1076
1128
|
width: fit-content;
|
|
1077
1129
|
.status-field.value {
|
|
1078
1130
|
position: relative;
|
|
@@ -1083,11 +1135,11 @@ const ee = [], pt = (e) => {
|
|
|
1083
1135
|
margin-bottom: 2px;
|
|
1084
1136
|
color: ${(e) => e.$textColor};
|
|
1085
1137
|
}
|
|
1086
|
-
`,
|
|
1138
|
+
`, sr = p(Fe)`
|
|
1087
1139
|
width: fit-content;
|
|
1088
1140
|
justify-self: end;
|
|
1089
1141
|
max-width: 100%;
|
|
1090
|
-
`,
|
|
1142
|
+
`, lr = p(Ce)`
|
|
1091
1143
|
height: 24px;
|
|
1092
1144
|
.template-value {
|
|
1093
1145
|
padding: 0 2px;
|
|
@@ -1101,7 +1153,7 @@ const ee = [], pt = (e) => {
|
|
|
1101
1153
|
display: none;
|
|
1102
1154
|
}
|
|
1103
1155
|
}
|
|
1104
|
-
`,
|
|
1156
|
+
`, cr = p.div`
|
|
1105
1157
|
display: flex;
|
|
1106
1158
|
align-items: center;
|
|
1107
1159
|
gap: 4px;
|
|
@@ -1121,7 +1173,7 @@ const ee = [], pt = (e) => {
|
|
|
1121
1173
|
border-radius: 3px;
|
|
1122
1174
|
padding: 0 4px;
|
|
1123
1175
|
}
|
|
1124
|
-
`,
|
|
1176
|
+
`, dr = p(Ae)`
|
|
1125
1177
|
width: max-content;
|
|
1126
1178
|
justify-self: end;
|
|
1127
1179
|
/* remove text and dropdown icon */
|
|
@@ -1145,12 +1197,12 @@ const ee = [], pt = (e) => {
|
|
|
1145
1197
|
background-color: var(--md-sys-color-surface-container-low-hover);
|
|
1146
1198
|
}
|
|
1147
1199
|
}
|
|
1148
|
-
`,
|
|
1200
|
+
`, pr = p.footer`
|
|
1149
1201
|
display: flex;
|
|
1150
1202
|
align-items: center;
|
|
1151
1203
|
gap: var(--base-gap-small);
|
|
1152
1204
|
justify-content: space-between;
|
|
1153
|
-
`,
|
|
1205
|
+
`, ur = p.div`
|
|
1154
1206
|
height: 100%;
|
|
1155
1207
|
|
|
1156
1208
|
> input[type='file'] {
|
|
@@ -1161,7 +1213,7 @@ const ee = [], pt = (e) => {
|
|
|
1161
1213
|
input[type='file'] {
|
|
1162
1214
|
display: none;
|
|
1163
1215
|
}
|
|
1164
|
-
`,
|
|
1216
|
+
`, mr = p.div`
|
|
1165
1217
|
z-index: 100;
|
|
1166
1218
|
position: absolute;
|
|
1167
1219
|
inset: 0;
|
|
@@ -1173,7 +1225,7 @@ const ee = [], pt = (e) => {
|
|
|
1173
1225
|
display: flex;
|
|
1174
1226
|
align-items: center;
|
|
1175
1227
|
justify-content: center;
|
|
1176
|
-
`,
|
|
1228
|
+
`, gr = p.div`
|
|
1177
1229
|
flex: 1;
|
|
1178
1230
|
height: 100%;
|
|
1179
1231
|
border-radius: var(--border-radius-l);
|
|
@@ -1202,11 +1254,11 @@ const ee = [], pt = (e) => {
|
|
|
1202
1254
|
/* show children */
|
|
1203
1255
|
opacity: 1;
|
|
1204
1256
|
}
|
|
1205
|
-
`,
|
|
1257
|
+
`, hr = p(_)`
|
|
1206
1258
|
position: absolute;
|
|
1207
1259
|
top: 4px;
|
|
1208
1260
|
right: 4px;
|
|
1209
|
-
`,
|
|
1261
|
+
`, fr = p.div`
|
|
1210
1262
|
display: flex;
|
|
1211
1263
|
flex-direction: column;
|
|
1212
1264
|
align-items: center;
|
|
@@ -1219,7 +1271,7 @@ const ee = [], pt = (e) => {
|
|
|
1219
1271
|
top: 12px;
|
|
1220
1272
|
position: relative;
|
|
1221
1273
|
}
|
|
1222
|
-
`,
|
|
1274
|
+
`, vr = p.div`
|
|
1223
1275
|
height: 8px;
|
|
1224
1276
|
position: absolute;
|
|
1225
1277
|
border-radius: 4px;
|
|
@@ -1228,14 +1280,14 @@ const ee = [], pt = (e) => {
|
|
|
1228
1280
|
background-color: var(--md-sys-color-primary);
|
|
1229
1281
|
|
|
1230
1282
|
transition: right 0.2s;
|
|
1231
|
-
`,
|
|
1283
|
+
`, Lt = ye`
|
|
1232
1284
|
from {
|
|
1233
1285
|
transform: rotate(0deg);
|
|
1234
1286
|
}
|
|
1235
1287
|
to {
|
|
1236
1288
|
transform: rotate(360deg);
|
|
1237
1289
|
}
|
|
1238
|
-
`,
|
|
1290
|
+
`, Pt = p.div`
|
|
1239
1291
|
position: relative;
|
|
1240
1292
|
display: flex;
|
|
1241
1293
|
justify-content: center;
|
|
@@ -1244,10 +1296,10 @@ const ee = [], pt = (e) => {
|
|
|
1244
1296
|
overflow: hidden;
|
|
1245
1297
|
|
|
1246
1298
|
background-color: var(--md-sys-color-surface-container-low);
|
|
1247
|
-
`,
|
|
1248
|
-
animation: ${
|
|
1299
|
+
`, Wt = p(V)`
|
|
1300
|
+
animation: ${Lt} 1s linear infinite;
|
|
1249
1301
|
opacity: 0.6;
|
|
1250
|
-
`,
|
|
1302
|
+
`, Ot = p.img`
|
|
1251
1303
|
position: absolute;
|
|
1252
1304
|
inset: 0;
|
|
1253
1305
|
object-fit: cover;
|
|
@@ -1259,56 +1311,56 @@ const ee = [], pt = (e) => {
|
|
|
1259
1311
|
&.hidden {
|
|
1260
1312
|
opacity: 0;
|
|
1261
1313
|
}
|
|
1262
|
-
`,
|
|
1263
|
-
const [o,
|
|
1264
|
-
return
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
const u =
|
|
1268
|
-
let
|
|
1269
|
-
const w = (
|
|
1270
|
-
|
|
1271
|
-
},
|
|
1272
|
-
!u ||
|
|
1273
|
-
|
|
1314
|
+
`, It = ({ mimetype: e = "", src: t, ...r }) => {
|
|
1315
|
+
const [o, c] = O(!1), [n, a] = O(!1), d = ne(null), h = ne(0);
|
|
1316
|
+
return q(() => {
|
|
1317
|
+
const i = h.current + 1;
|
|
1318
|
+
h.current = i, a(!1), c(!1);
|
|
1319
|
+
const u = d.current;
|
|
1320
|
+
let f = !1, s = 0, v = 0, m = 0;
|
|
1321
|
+
const w = (k) => {
|
|
1322
|
+
f || i !== h.current || (f = !0, cancelAnimationFrame(s), window.clearInterval(v), window.clearTimeout(m), k());
|
|
1323
|
+
}, T = () => {
|
|
1324
|
+
!u || i !== h.current || u.complete && u.naturalWidth > 0 && w(() => {
|
|
1325
|
+
a(!0), c(!1);
|
|
1274
1326
|
});
|
|
1275
|
-
},
|
|
1276
|
-
|
|
1277
|
-
}),
|
|
1278
|
-
|
|
1327
|
+
}, S = () => w(() => {
|
|
1328
|
+
a(!0), c(!1);
|
|
1329
|
+
}), b = () => w(() => {
|
|
1330
|
+
a(!0), c(!0);
|
|
1279
1331
|
});
|
|
1280
|
-
return u && (u.addEventListener("load",
|
|
1332
|
+
return u && (u.addEventListener("load", S), u.addEventListener("error", b), typeof u.decode == "function" && u.decode().then(
|
|
1281
1333
|
() => w(() => {
|
|
1282
|
-
|
|
1334
|
+
a(!0), c(!1);
|
|
1283
1335
|
})
|
|
1284
1336
|
).catch(() => {
|
|
1285
|
-
|
|
1286
|
-
})),
|
|
1337
|
+
T();
|
|
1338
|
+
})), s = requestAnimationFrame(T), v = window.setInterval(T, 250), m = window.setTimeout(() => {
|
|
1287
1339
|
w(() => {
|
|
1288
|
-
u && u.naturalWidth > 0 ? (
|
|
1340
|
+
u && u.naturalWidth > 0 ? (a(!0), c(!1)) : a(!0);
|
|
1289
1341
|
});
|
|
1290
1342
|
}, 1e4), () => {
|
|
1291
|
-
cancelAnimationFrame(
|
|
1343
|
+
cancelAnimationFrame(s), window.clearInterval(v), window.clearTimeout(m), u && (u.removeEventListener("load", S), u.removeEventListener("error", b));
|
|
1292
1344
|
};
|
|
1293
|
-
}, [t]), /* @__PURE__ */
|
|
1294
|
-
|
|
1295
|
-
/* @__PURE__ */
|
|
1296
|
-
|
|
1345
|
+
}, [t]), /* @__PURE__ */ R(Pt, { ...r, className: U("file-thumbnail", r.className), children: [
|
|
1346
|
+
n ? /* @__PURE__ */ g(V, { icon: Ne(e) }) : /* @__PURE__ */ g(Wt, { icon: "progress_activity" }),
|
|
1347
|
+
/* @__PURE__ */ g(
|
|
1348
|
+
Ot,
|
|
1297
1349
|
{
|
|
1298
|
-
ref:
|
|
1350
|
+
ref: d,
|
|
1299
1351
|
src: t,
|
|
1300
1352
|
...r,
|
|
1301
|
-
onError: (
|
|
1302
|
-
|
|
1353
|
+
onError: (i) => {
|
|
1354
|
+
i.currentTarget === d.current && (a(!0), c(!0));
|
|
1303
1355
|
},
|
|
1304
|
-
onLoad: (
|
|
1305
|
-
|
|
1356
|
+
onLoad: (i) => {
|
|
1357
|
+
i.currentTarget === d.current && (a(!0), c(!1));
|
|
1306
1358
|
},
|
|
1307
|
-
className: U({ hidden: !
|
|
1359
|
+
className: U({ hidden: !n || o })
|
|
1308
1360
|
}
|
|
1309
1361
|
)
|
|
1310
1362
|
] });
|
|
1311
|
-
},
|
|
1363
|
+
}, Vt = p.div`
|
|
1312
1364
|
display: flex;
|
|
1313
1365
|
align-items: center;
|
|
1314
1366
|
overflow: hidden;
|
|
@@ -1375,7 +1427,7 @@ const ee = [], pt = (e) => {
|
|
|
1375
1427
|
background-color: var(--md-sys-color-primary-container);
|
|
1376
1428
|
}
|
|
1377
1429
|
}
|
|
1378
|
-
`,
|
|
1430
|
+
`, Bt = p.div`
|
|
1379
1431
|
display: flex;
|
|
1380
1432
|
flex-direction: column;
|
|
1381
1433
|
flex: 1;
|
|
@@ -1400,15 +1452,15 @@ const ee = [], pt = (e) => {
|
|
|
1400
1452
|
.name {
|
|
1401
1453
|
color: var(--md-sys-color-outline);
|
|
1402
1454
|
}
|
|
1403
|
-
`,
|
|
1455
|
+
`, Ht = p.div`
|
|
1404
1456
|
display: flex;
|
|
1405
1457
|
align-items: center;
|
|
1406
1458
|
gap: var(--base-gap-small);
|
|
1407
1459
|
|
|
1408
1460
|
h4 {
|
|
1409
|
-
${
|
|
1461
|
+
${$e.titleSmall}
|
|
1410
1462
|
}
|
|
1411
|
-
`,
|
|
1463
|
+
`, _t = p(_)`
|
|
1412
1464
|
/* hidden by default and show on card hover */
|
|
1413
1465
|
display: none;
|
|
1414
1466
|
.icon {
|
|
@@ -1420,78 +1472,78 @@ const ee = [], pt = (e) => {
|
|
|
1420
1472
|
}
|
|
1421
1473
|
|
|
1422
1474
|
margin: -2px;
|
|
1423
|
-
`,
|
|
1475
|
+
`, Qt = p(It)`
|
|
1424
1476
|
width: 71px;
|
|
1425
1477
|
height: 40px;
|
|
1426
1478
|
|
|
1427
1479
|
border-radius: var(--border-radius-m);
|
|
1428
1480
|
|
|
1429
1481
|
object-fit: cover;
|
|
1430
|
-
`,
|
|
1482
|
+
`, qt = p(V)`
|
|
1431
1483
|
font-size: 25px;
|
|
1432
1484
|
|
|
1433
1485
|
cursor: grab;
|
|
1434
1486
|
|
|
1435
1487
|
/* default hidden */
|
|
1436
1488
|
opacity: 0;
|
|
1437
|
-
`,
|
|
1489
|
+
`, yr = ee(
|
|
1438
1490
|
({
|
|
1439
1491
|
availability: e,
|
|
1440
1492
|
projectName: t,
|
|
1441
1493
|
fileId: r,
|
|
1442
1494
|
filename: o,
|
|
1443
|
-
label:
|
|
1444
|
-
processing:
|
|
1445
|
-
mimetype:
|
|
1446
|
-
isDragOverlay:
|
|
1447
|
-
isDropPlaceholder:
|
|
1448
|
-
isSelected:
|
|
1495
|
+
label: c,
|
|
1496
|
+
processing: n,
|
|
1497
|
+
mimetype: a,
|
|
1498
|
+
isDragOverlay: d,
|
|
1499
|
+
isDropPlaceholder: h,
|
|
1500
|
+
isSelected: i,
|
|
1449
1501
|
isDragging: u,
|
|
1450
|
-
dragProps:
|
|
1451
|
-
sortingDisabled:
|
|
1502
|
+
dragProps: f = {},
|
|
1503
|
+
sortingDisabled: s,
|
|
1452
1504
|
onEdit: v,
|
|
1453
|
-
...
|
|
1505
|
+
...m
|
|
1454
1506
|
}, w) => {
|
|
1455
|
-
const
|
|
1456
|
-
let
|
|
1457
|
-
|
|
1458
|
-
let
|
|
1459
|
-
return
|
|
1460
|
-
|
|
1507
|
+
const T = (f || d) && !s, S = e === "conversionRecommended", b = S && !!n;
|
|
1508
|
+
let k = o;
|
|
1509
|
+
S && (k = "Unoptimized - conversion recommended"), b && (k = "Unoptimized - queued for conversion");
|
|
1510
|
+
let C = c;
|
|
1511
|
+
return S && (C = o), /* @__PURE__ */ R(
|
|
1512
|
+
Vt,
|
|
1461
1513
|
{
|
|
1462
1514
|
id: r,
|
|
1463
1515
|
ref: w,
|
|
1464
1516
|
className: U({
|
|
1465
|
-
draggable:
|
|
1466
|
-
"drop-placeholder":
|
|
1467
|
-
"drag-overlay":
|
|
1517
|
+
draggable: T,
|
|
1518
|
+
"drop-placeholder": h,
|
|
1519
|
+
"drag-overlay": d,
|
|
1468
1520
|
dragging: u,
|
|
1469
1521
|
// is anything dragging
|
|
1470
|
-
selected:
|
|
1522
|
+
selected: i,
|
|
1471
1523
|
editable: !!v
|
|
1472
1524
|
}),
|
|
1473
|
-
...
|
|
1525
|
+
...m,
|
|
1474
1526
|
children: [
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
|
|
1527
|
+
/* @__PURE__ */ g(
|
|
1528
|
+
Qt,
|
|
1477
1529
|
{
|
|
1478
1530
|
src: `/api/projects/${t}/files/${r}/thumbnail`,
|
|
1479
|
-
mimetype:
|
|
1531
|
+
mimetype: a
|
|
1480
1532
|
}
|
|
1481
1533
|
),
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
!!v && /* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ R(Bt, { children: [
|
|
1535
|
+
/* @__PURE__ */ R(Ht, { children: [
|
|
1536
|
+
/* @__PURE__ */ g("h4", { children: C }),
|
|
1537
|
+
!!v && /* @__PURE__ */ g(_t, { icon: "edit", variant: "text", className: "edit", onClick: v })
|
|
1486
1538
|
] }),
|
|
1487
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ g("span", { className: "name", children: k })
|
|
1488
1540
|
] }),
|
|
1489
|
-
|
|
1541
|
+
T && /* @__PURE__ */ g(qt, { className: "handle", ...f, icon: "drag_indicator" })
|
|
1490
1542
|
]
|
|
1491
1543
|
}
|
|
1492
1544
|
);
|
|
1493
1545
|
}
|
|
1494
|
-
),
|
|
1546
|
+
), Gt = ye`
|
|
1495
1547
|
from {
|
|
1496
1548
|
transform: rotate(360deg);
|
|
1497
1549
|
}
|
|
@@ -1500,7 +1552,7 @@ const ee = [], pt = (e) => {
|
|
|
1500
1552
|
transform: rotate(0deg);
|
|
1501
1553
|
}
|
|
1502
1554
|
|
|
1503
|
-
`,
|
|
1555
|
+
`, Kt = p.div`
|
|
1504
1556
|
position: relative;
|
|
1505
1557
|
width: 100%;
|
|
1506
1558
|
min-height: 50px;
|
|
@@ -1566,13 +1618,13 @@ const ee = [], pt = (e) => {
|
|
|
1566
1618
|
& > * {
|
|
1567
1619
|
z-index: 10;
|
|
1568
1620
|
}
|
|
1569
|
-
`,
|
|
1621
|
+
`, Jt = p.div`
|
|
1570
1622
|
position: absolute;
|
|
1571
1623
|
inset: 0;
|
|
1572
1624
|
background-color: var(--md-sys-color-primary-container);
|
|
1573
1625
|
z-index: 0;
|
|
1574
1626
|
transition: right 0.2s;
|
|
1575
|
-
`,
|
|
1627
|
+
`, Zt = p.div`
|
|
1576
1628
|
position: relative;
|
|
1577
1629
|
width: 71px;
|
|
1578
1630
|
height: 40px;
|
|
@@ -1591,7 +1643,7 @@ const ee = [], pt = (e) => {
|
|
|
1591
1643
|
|
|
1592
1644
|
&.spinning {
|
|
1593
1645
|
/* spin animation */
|
|
1594
|
-
animation: ${
|
|
1646
|
+
animation: ${Gt} 1s infinite linear;
|
|
1595
1647
|
}
|
|
1596
1648
|
}
|
|
1597
1649
|
|
|
@@ -1603,63 +1655,63 @@ const ee = [], pt = (e) => {
|
|
|
1603
1655
|
object-fit: cover;
|
|
1604
1656
|
opacity: 0.5;
|
|
1605
1657
|
}
|
|
1606
|
-
`,
|
|
1658
|
+
`, ue = ({
|
|
1607
1659
|
name: e,
|
|
1608
1660
|
progress: t,
|
|
1609
1661
|
size: r,
|
|
1610
1662
|
type: o,
|
|
1611
|
-
fileId:
|
|
1612
|
-
src:
|
|
1613
|
-
error:
|
|
1614
|
-
tooltip:
|
|
1615
|
-
onRemove:
|
|
1616
|
-
...
|
|
1663
|
+
fileId: c,
|
|
1664
|
+
src: n,
|
|
1665
|
+
error: a,
|
|
1666
|
+
tooltip: d,
|
|
1667
|
+
onRemove: h,
|
|
1668
|
+
...i
|
|
1617
1669
|
}) => {
|
|
1618
|
-
let u = "",
|
|
1670
|
+
let u = "", f = !1, s = "";
|
|
1619
1671
|
switch (o) {
|
|
1620
1672
|
case "processing":
|
|
1621
|
-
u = "Transcoding",
|
|
1673
|
+
u = "Transcoding", f = !0, s = "settings";
|
|
1622
1674
|
break;
|
|
1623
1675
|
case "unsupported":
|
|
1624
|
-
u = "Unsupported - conversion required",
|
|
1676
|
+
u = "Unsupported - conversion required", s = "visibility_off";
|
|
1625
1677
|
break;
|
|
1626
1678
|
case "upload":
|
|
1627
|
-
u = "Uploading",
|
|
1679
|
+
u = "Uploading", f = !0, s = "sync";
|
|
1628
1680
|
break;
|
|
1629
1681
|
case "queued":
|
|
1630
|
-
u = "Queued - waiting to be transcoded",
|
|
1682
|
+
u = "Queued - waiting to be transcoded", s = "hourglass";
|
|
1631
1683
|
break;
|
|
1632
1684
|
case "waiting":
|
|
1633
|
-
u = "Waiting for upload",
|
|
1685
|
+
u = "Waiting for upload", s = "schedule";
|
|
1634
1686
|
break;
|
|
1635
1687
|
case "importing":
|
|
1636
|
-
u = "Importing",
|
|
1688
|
+
u = "Importing", s = "upload_file";
|
|
1637
1689
|
break;
|
|
1638
1690
|
case "validating":
|
|
1639
|
-
u = "Validating",
|
|
1691
|
+
u = "Validating", s = "checklist";
|
|
1640
1692
|
break;
|
|
1641
1693
|
}
|
|
1642
|
-
|
|
1694
|
+
a && (f = !1, s = "error");
|
|
1643
1695
|
const v = t !== void 0 ? `- ${t}%` : "";
|
|
1644
|
-
return /* @__PURE__ */
|
|
1645
|
-
|
|
1696
|
+
return /* @__PURE__ */ R(
|
|
1697
|
+
Kt,
|
|
1646
1698
|
{
|
|
1647
|
-
className: U({ finished: t === 100, error: !!
|
|
1648
|
-
id:
|
|
1649
|
-
...
|
|
1699
|
+
className: U({ finished: t === 100, error: !!a, [o]: !0 }),
|
|
1700
|
+
id: c,
|
|
1701
|
+
...i,
|
|
1650
1702
|
children: [
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
|
|
1653
|
-
|
|
1703
|
+
/* @__PURE__ */ R(Zt, { children: [
|
|
1704
|
+
n && /* @__PURE__ */ g("img", { src: n }),
|
|
1705
|
+
s && /* @__PURE__ */ g(V, { icon: s, className: U({ spinning: f }) })
|
|
1654
1706
|
] }),
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */
|
|
1707
|
+
/* @__PURE__ */ R("span", { className: "content", children: [
|
|
1708
|
+
/* @__PURE__ */ g("span", { className: "name", children: e }),
|
|
1709
|
+
/* @__PURE__ */ g("span", { className: "message", children: a || `${u} ${v}` })
|
|
1658
1710
|
] }),
|
|
1659
|
-
r && /* @__PURE__ */
|
|
1660
|
-
|
|
1661
|
-
(
|
|
1662
|
-
/* @__PURE__ */
|
|
1711
|
+
r && /* @__PURE__ */ g("span", { className: "size", children: Me(r) }),
|
|
1712
|
+
d && /* @__PURE__ */ g(V, { icon: "info", className: "info", "data-tooltip": d, "data-tooltip-as": "markdown" }),
|
|
1713
|
+
(a || o === "waiting") && /* @__PURE__ */ g(_, { icon: "close", variant: "text", onClick: h }),
|
|
1714
|
+
/* @__PURE__ */ g(Jt, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
|
|
1663
1715
|
]
|
|
1664
1716
|
},
|
|
1665
1717
|
e
|
|
@@ -1672,15 +1724,15 @@ p.div`
|
|
|
1672
1724
|
min-height: 100%;
|
|
1673
1725
|
padding-bottom: var(--padding-m);
|
|
1674
1726
|
`;
|
|
1675
|
-
const
|
|
1727
|
+
const br = p.div`
|
|
1676
1728
|
position: relative;
|
|
1677
1729
|
overflow: hidden;
|
|
1678
1730
|
border-radius: var(--border-radius-m);
|
|
1679
1731
|
width: 100%;
|
|
1680
1732
|
min-height: 50px;
|
|
1681
|
-
`,
|
|
1733
|
+
`, xr = p.div`
|
|
1682
1734
|
word-break: break-all;
|
|
1683
|
-
`,
|
|
1735
|
+
`, Xt = p.div`
|
|
1684
1736
|
display: flex;
|
|
1685
1737
|
flex-direction: column;
|
|
1686
1738
|
gap: var(--base-gap-small);
|
|
@@ -1697,7 +1749,7 @@ const gr = p.div`
|
|
|
1697
1749
|
&.dragging {
|
|
1698
1750
|
opacity: 0;
|
|
1699
1751
|
}
|
|
1700
|
-
`,
|
|
1752
|
+
`, Yt = p.div`
|
|
1701
1753
|
position: relative;
|
|
1702
1754
|
min-height: 50px;
|
|
1703
1755
|
display: flex;
|
|
@@ -1726,7 +1778,7 @@ const gr = p.div`
|
|
|
1726
1778
|
opacity: 0;
|
|
1727
1779
|
cursor: pointer;
|
|
1728
1780
|
}
|
|
1729
|
-
`,
|
|
1781
|
+
`, eo = p.div`
|
|
1730
1782
|
position: absolute;
|
|
1731
1783
|
inset: var(--padding-s);
|
|
1732
1784
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
@@ -1748,8 +1800,8 @@ const gr = p.div`
|
|
|
1748
1800
|
.icon {
|
|
1749
1801
|
font-size: 32px;
|
|
1750
1802
|
}
|
|
1751
|
-
`,
|
|
1752
|
-
if (
|
|
1803
|
+
`, me = (e) => {
|
|
1804
|
+
if (we.isAxiosError(e)) {
|
|
1753
1805
|
const t = e.response?.data;
|
|
1754
1806
|
if (typeof t == "string" && t)
|
|
1755
1807
|
return t;
|
|
@@ -1761,226 +1813,226 @@ const gr = p.div`
|
|
|
1761
1813
|
return e.message || e.response?.statusText || "Unknown upload error";
|
|
1762
1814
|
}
|
|
1763
1815
|
return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown upload error";
|
|
1764
|
-
},
|
|
1816
|
+
}, to = ({
|
|
1765
1817
|
projectName: e,
|
|
1766
1818
|
versionId: t,
|
|
1767
1819
|
taskId: r,
|
|
1768
1820
|
folderId: o,
|
|
1769
|
-
productId:
|
|
1770
|
-
dispatch:
|
|
1771
|
-
onUpload:
|
|
1772
|
-
onProgress:
|
|
1821
|
+
productId: c,
|
|
1822
|
+
dispatch: n,
|
|
1823
|
+
onUpload: a,
|
|
1824
|
+
onProgress: d
|
|
1773
1825
|
}) => {
|
|
1774
|
-
const [
|
|
1775
|
-
(
|
|
1776
|
-
t &&
|
|
1826
|
+
const [h, i] = O({}), u = Y(
|
|
1827
|
+
(s) => {
|
|
1828
|
+
t && i((v) => ({
|
|
1777
1829
|
...v,
|
|
1778
|
-
[t]: v[t]?.filter((
|
|
1830
|
+
[t]: v[t]?.filter((m) => m.name !== s) || []
|
|
1779
1831
|
}));
|
|
1780
1832
|
},
|
|
1781
1833
|
[t]
|
|
1782
1834
|
);
|
|
1783
1835
|
return {
|
|
1784
|
-
handleFileUpload:
|
|
1785
|
-
async (
|
|
1786
|
-
const
|
|
1787
|
-
if (!
|
|
1788
|
-
const w = Array.from(
|
|
1789
|
-
name:
|
|
1790
|
-
size:
|
|
1836
|
+
handleFileUpload: Y(
|
|
1837
|
+
async (s, v) => {
|
|
1838
|
+
const m = v || t;
|
|
1839
|
+
if (!m || !e) return;
|
|
1840
|
+
const w = Array.from(s), T = w.map((E) => ({
|
|
1841
|
+
name: Q(E.name),
|
|
1842
|
+
size: E.size,
|
|
1791
1843
|
progress: 0
|
|
1792
|
-
})),
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1795
|
-
if (!
|
|
1796
|
-
console.log(`Upload successful for ${
|
|
1797
|
-
const
|
|
1798
|
-
e && (
|
|
1844
|
+
})), S = [...h[m] || [], ...T];
|
|
1845
|
+
i({ ...h, [m]: S });
|
|
1846
|
+
const b = (E) => (D) => {
|
|
1847
|
+
if (!m) return;
|
|
1848
|
+
console.log(`Upload successful for ${E.name}`);
|
|
1849
|
+
const l = D.data;
|
|
1850
|
+
e && (n(
|
|
1799
1851
|
// @ts-ignore
|
|
1800
|
-
|
|
1852
|
+
ot.util.updateQueryData(
|
|
1801
1853
|
"getReviewablesForVersion",
|
|
1802
|
-
{ projectName: e, versionId:
|
|
1803
|
-
(
|
|
1804
|
-
|
|
1854
|
+
{ projectName: e, versionId: m },
|
|
1855
|
+
(N) => {
|
|
1856
|
+
N.reviewables || (N.reviewables = []), N.reviewables.push(l);
|
|
1805
1857
|
}
|
|
1806
1858
|
)
|
|
1807
|
-
),
|
|
1808
|
-
},
|
|
1809
|
-
|
|
1810
|
-
const
|
|
1811
|
-
...
|
|
1812
|
-
error:
|
|
1859
|
+
), c && n(K.util.invalidateTags([{ type: "viewer", id: c }])), n(K.util.invalidateTags([{ type: "viewer", id: m }])), o && n(K.util.invalidateTags([{ type: "viewer", id: o }])), r && n(K.util.invalidateTags([{ type: "viewer", id: r }])), u(Q(E.name)));
|
|
1860
|
+
}, k = (E) => (D) => {
|
|
1861
|
+
m && (console.error(`Upload failed for ${E.name}: ${D}`), i((l) => {
|
|
1862
|
+
const $ = (l[m] || []).map((z) => z.name !== Q(E.name) ? z : {
|
|
1863
|
+
...z,
|
|
1864
|
+
error: me(D)
|
|
1813
1865
|
});
|
|
1814
1866
|
return {
|
|
1815
|
-
...
|
|
1816
|
-
[
|
|
1867
|
+
...l,
|
|
1868
|
+
[m]: $
|
|
1817
1869
|
};
|
|
1818
1870
|
}));
|
|
1819
|
-
},
|
|
1820
|
-
const
|
|
1821
|
-
...
|
|
1822
|
-
progress:
|
|
1823
|
-
}),
|
|
1824
|
-
(
|
|
1871
|
+
}, C = (E) => m ? (D) => i((l) => {
|
|
1872
|
+
const $ = (l[m] || []).map((y) => y.name !== Q(E.name) ? y : {
|
|
1873
|
+
...y,
|
|
1874
|
+
progress: D.total ? Math.round(D.loaded / D.total * 100) : 0
|
|
1875
|
+
}), z = $.reduce(
|
|
1876
|
+
(y, j) => y + (j.progress || 0),
|
|
1825
1877
|
0
|
|
1826
|
-
),
|
|
1827
|
-
return
|
|
1828
|
-
...
|
|
1829
|
-
[
|
|
1878
|
+
), F = Math.round(z / $.length);
|
|
1879
|
+
return d?.(F), {
|
|
1880
|
+
...l,
|
|
1881
|
+
[m]: $
|
|
1830
1882
|
};
|
|
1831
1883
|
}) : () => {
|
|
1832
1884
|
};
|
|
1833
1885
|
try {
|
|
1834
|
-
const
|
|
1835
|
-
const
|
|
1836
|
-
return
|
|
1837
|
-
throw
|
|
1886
|
+
const E = w.map((D) => {
|
|
1887
|
+
const l = Q(D.name), N = l.split(".").slice(0, -1).join(".") || "unnamed", $ = `/api/projects/${e}/versions/${m}/reviewables?label=${N}`, z = { "content-type": D.type, "x-file-name": l };
|
|
1888
|
+
return we.post($, D, { headers: z, onUploadProgress: C(D) }).then(b(D)).catch((F) => {
|
|
1889
|
+
throw k(D)(F), F;
|
|
1838
1890
|
});
|
|
1839
1891
|
});
|
|
1840
|
-
await Promise.all(
|
|
1841
|
-
} catch (
|
|
1842
|
-
throw console.error(
|
|
1892
|
+
await Promise.all(E), a && a();
|
|
1893
|
+
} catch (E) {
|
|
1894
|
+
throw console.error(E), te.error(`Failed to upload file/s: ${me(E)}`), E;
|
|
1843
1895
|
}
|
|
1844
1896
|
},
|
|
1845
1897
|
[
|
|
1846
1898
|
t,
|
|
1847
1899
|
e,
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1900
|
+
h,
|
|
1901
|
+
n,
|
|
1902
|
+
c,
|
|
1851
1903
|
o,
|
|
1852
1904
|
r,
|
|
1853
1905
|
u,
|
|
1854
|
-
|
|
1855
|
-
|
|
1906
|
+
a,
|
|
1907
|
+
d
|
|
1856
1908
|
]
|
|
1857
1909
|
),
|
|
1858
1910
|
handleRemoveUpload: u,
|
|
1859
|
-
uploading:
|
|
1911
|
+
uploading: h
|
|
1860
1912
|
};
|
|
1861
|
-
},
|
|
1913
|
+
}, wr = ({
|
|
1862
1914
|
projectName: e,
|
|
1863
1915
|
taskId: t,
|
|
1864
1916
|
folderId: r,
|
|
1865
1917
|
versionId: o,
|
|
1866
|
-
productId:
|
|
1867
|
-
onUpload:
|
|
1868
|
-
onFilesAdded:
|
|
1869
|
-
children:
|
|
1870
|
-
dispatch:
|
|
1871
|
-
variant:
|
|
1918
|
+
productId: c,
|
|
1919
|
+
onUpload: n,
|
|
1920
|
+
onFilesAdded: a,
|
|
1921
|
+
children: d,
|
|
1922
|
+
dispatch: h,
|
|
1923
|
+
variant: i = "normal",
|
|
1872
1924
|
pendingFiles: u = [],
|
|
1873
|
-
setPendingFiles:
|
|
1874
|
-
className:
|
|
1925
|
+
setPendingFiles: f,
|
|
1926
|
+
className: s,
|
|
1875
1927
|
readOnly: v = !1,
|
|
1876
|
-
pt:
|
|
1928
|
+
pt: m,
|
|
1877
1929
|
...w
|
|
1878
1930
|
}) => {
|
|
1879
|
-
const [
|
|
1880
|
-
handleFileUpload:
|
|
1881
|
-
handleRemoveUpload:
|
|
1882
|
-
uploading:
|
|
1883
|
-
} =
|
|
1931
|
+
const [T, S] = O(!1), {
|
|
1932
|
+
handleFileUpload: b,
|
|
1933
|
+
handleRemoveUpload: k,
|
|
1934
|
+
uploading: C
|
|
1935
|
+
} = to({
|
|
1884
1936
|
projectName: e,
|
|
1885
1937
|
versionId: o,
|
|
1886
1938
|
taskId: t,
|
|
1887
1939
|
folderId: r,
|
|
1888
|
-
productId:
|
|
1889
|
-
dispatch:
|
|
1890
|
-
onUpload:
|
|
1891
|
-
}),
|
|
1892
|
-
|
|
1893
|
-
if (
|
|
1894
|
-
const
|
|
1895
|
-
u.forEach((
|
|
1896
|
-
|
|
1897
|
-
}),
|
|
1940
|
+
productId: c,
|
|
1941
|
+
dispatch: h,
|
|
1942
|
+
onUpload: n
|
|
1943
|
+
}), E = !!o;
|
|
1944
|
+
q(() => {
|
|
1945
|
+
if (E && o && u.length > 0 && f) {
|
|
1946
|
+
const y = u.map((j) => j.file);
|
|
1947
|
+
u.forEach((j) => {
|
|
1948
|
+
j.preview && URL.revokeObjectURL(j.preview);
|
|
1949
|
+
}), f([]), b(y);
|
|
1898
1950
|
}
|
|
1899
|
-
}, [
|
|
1900
|
-
const
|
|
1901
|
-
file:
|
|
1902
|
-
preview:
|
|
1903
|
-
})),
|
|
1904
|
-
const
|
|
1905
|
-
if (
|
|
1906
|
-
|
|
1951
|
+
}, [E, o, u.length, b, f]);
|
|
1952
|
+
const D = (y) => y.type.startsWith("image/"), l = (y) => y.map((j) => ({
|
|
1953
|
+
file: j,
|
|
1954
|
+
preview: D(j) ? URL.createObjectURL(j) : void 0
|
|
1955
|
+
})), N = async (y) => {
|
|
1956
|
+
const j = Array.from(y);
|
|
1957
|
+
if (a?.(j), !E || !o) {
|
|
1958
|
+
f && f((A) => [...A, ...l(j)]);
|
|
1907
1959
|
return;
|
|
1908
1960
|
}
|
|
1909
|
-
await
|
|
1910
|
-
},
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1913
|
-
},
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1917
|
-
},
|
|
1918
|
-
return /* @__PURE__ */
|
|
1919
|
-
/* @__PURE__ */
|
|
1920
|
-
|
|
1961
|
+
await b(y);
|
|
1962
|
+
}, $ = (y) => {
|
|
1963
|
+
const j = y.target.files;
|
|
1964
|
+
j && N(j);
|
|
1965
|
+
}, z = (y) => {
|
|
1966
|
+
y.preventDefault(), S(!1);
|
|
1967
|
+
const j = y.dataTransfer.files;
|
|
1968
|
+
j && N(j);
|
|
1969
|
+
}, F = i === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
|
|
1970
|
+
return /* @__PURE__ */ R(ae, { children: [
|
|
1971
|
+
/* @__PURE__ */ g(
|
|
1972
|
+
Xt,
|
|
1921
1973
|
{
|
|
1922
|
-
className: U(
|
|
1974
|
+
className: U(s, i, { dragging: T }),
|
|
1923
1975
|
...w,
|
|
1924
|
-
onDragEnter: () => !v &&
|
|
1925
|
-
onDragOver: (
|
|
1926
|
-
onDrop: (
|
|
1927
|
-
v && (
|
|
1976
|
+
onDragEnter: () => !v && S(!0),
|
|
1977
|
+
onDragOver: (y) => y.preventDefault(),
|
|
1978
|
+
onDrop: (y) => {
|
|
1979
|
+
v && (y.preventDefault(), y.stopPropagation());
|
|
1928
1980
|
},
|
|
1929
|
-
children: /* @__PURE__ */
|
|
1930
|
-
|
|
1931
|
-
!
|
|
1932
|
-
|
|
1981
|
+
children: /* @__PURE__ */ R(ae, { children: [
|
|
1982
|
+
d,
|
|
1983
|
+
!E && u?.map((y) => /* @__PURE__ */ g(
|
|
1984
|
+
ue,
|
|
1933
1985
|
{
|
|
1934
|
-
name:
|
|
1935
|
-
size:
|
|
1936
|
-
src:
|
|
1986
|
+
name: y.file.name,
|
|
1987
|
+
size: y.file.size,
|
|
1988
|
+
src: y.preview,
|
|
1937
1989
|
type: "waiting",
|
|
1938
1990
|
onRemove: () => {
|
|
1939
|
-
|
|
1991
|
+
f && f((j) => j.filter((A) => A.file.name !== y.file.name));
|
|
1940
1992
|
}
|
|
1941
1993
|
},
|
|
1942
|
-
|
|
1994
|
+
y.file.name
|
|
1943
1995
|
)),
|
|
1944
|
-
o &&
|
|
1945
|
-
|
|
1996
|
+
o && C[o]?.map((y) => /* @__PURE__ */ g(
|
|
1997
|
+
ue,
|
|
1946
1998
|
{
|
|
1947
|
-
...
|
|
1999
|
+
...y,
|
|
1948
2000
|
type: "upload",
|
|
1949
|
-
onRemove: () =>
|
|
2001
|
+
onRemove: () => k(y.name)
|
|
1950
2002
|
},
|
|
1951
|
-
|
|
2003
|
+
y.name
|
|
1952
2004
|
)),
|
|
1953
|
-
!v && /* @__PURE__ */
|
|
1954
|
-
|
|
2005
|
+
!v && /* @__PURE__ */ R(
|
|
2006
|
+
Yt,
|
|
1955
2007
|
{
|
|
1956
2008
|
id: "upload",
|
|
1957
|
-
className: U("upload",
|
|
1958
|
-
style:
|
|
1959
|
-
...
|
|
2009
|
+
className: U("upload", i),
|
|
2010
|
+
style: F,
|
|
2011
|
+
...m?.upload,
|
|
1960
2012
|
children: [
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
/* @__PURE__ */
|
|
2013
|
+
/* @__PURE__ */ g("span", { children: "Drop or click to upload" }),
|
|
2014
|
+
/* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange: $ })
|
|
1963
2015
|
]
|
|
1964
2016
|
}
|
|
1965
2017
|
)
|
|
1966
2018
|
] })
|
|
1967
2019
|
}
|
|
1968
2020
|
),
|
|
1969
|
-
|
|
1970
|
-
|
|
2021
|
+
T && !v && /* @__PURE__ */ R(
|
|
2022
|
+
eo,
|
|
1971
2023
|
{
|
|
1972
|
-
onDragOver: (
|
|
1973
|
-
onDragLeave: () =>
|
|
1974
|
-
onDrop:
|
|
1975
|
-
...
|
|
2024
|
+
onDragOver: (y) => y.preventDefault(),
|
|
2025
|
+
onDragLeave: () => S(!1),
|
|
2026
|
+
onDrop: z,
|
|
2027
|
+
...m?.dropzone,
|
|
1976
2028
|
children: [
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ g(V, { icon: "upload" }),
|
|
2030
|
+
/* @__PURE__ */ g("span", { children: "Upload reviewable" })
|
|
1979
2031
|
]
|
|
1980
2032
|
}
|
|
1981
2033
|
)
|
|
1982
2034
|
] });
|
|
1983
|
-
},
|
|
2035
|
+
}, kr = p.div`
|
|
1984
2036
|
position: relative;
|
|
1985
2037
|
border-radius: var(--border-radius-m);
|
|
1986
2038
|
display: flex;
|
|
@@ -1995,9 +2047,9 @@ const gr = p.div`
|
|
|
1995
2047
|
}
|
|
1996
2048
|
|
|
1997
2049
|
flex: 1;
|
|
1998
|
-
`,
|
|
2050
|
+
`, Er = p.div`
|
|
1999
2051
|
position: relative;
|
|
2000
|
-
`,
|
|
2052
|
+
`, Sr = p.span`
|
|
2001
2053
|
position: relative;
|
|
2002
2054
|
padding: 0px 2px;
|
|
2003
2055
|
border-radius: var(--border-radius-m);
|
|
@@ -2019,29 +2071,29 @@ const gr = p.div`
|
|
|
2019
2071
|
color: var(--md-sys-color-on-surface);
|
|
2020
2072
|
}
|
|
2021
2073
|
}
|
|
2022
|
-
`,
|
|
2074
|
+
`, Tr = p.span`
|
|
2023
2075
|
text-overflow: ellipsis;
|
|
2024
2076
|
overflow: hidden;
|
|
2025
2077
|
display: inline-block;
|
|
2026
2078
|
white-space: nowrap;
|
|
2027
|
-
`,
|
|
2079
|
+
`, ge = be`
|
|
2028
2080
|
background-color: var(--md-sys-color-surface-container);
|
|
2029
2081
|
&,
|
|
2030
2082
|
.icon {
|
|
2031
2083
|
color: var(--md-sys-color-on-surface);
|
|
2032
2084
|
}
|
|
2033
|
-
`,
|
|
2085
|
+
`, oo = p.div`
|
|
2034
2086
|
& > span,
|
|
2035
2087
|
& > li {
|
|
2036
2088
|
cursor: pointer;
|
|
2037
2089
|
&:hover {
|
|
2038
|
-
${
|
|
2090
|
+
${ge}
|
|
2039
2091
|
}
|
|
2040
2092
|
}
|
|
2041
2093
|
|
|
2042
2094
|
&.open {
|
|
2043
2095
|
& > span {
|
|
2044
|
-
${
|
|
2096
|
+
${ge}
|
|
2045
2097
|
}
|
|
2046
2098
|
}
|
|
2047
2099
|
|
|
@@ -2053,7 +2105,7 @@ const gr = p.div`
|
|
|
2053
2105
|
}
|
|
2054
2106
|
}
|
|
2055
2107
|
}
|
|
2056
|
-
`,
|
|
2108
|
+
`, jr = p.div`
|
|
2057
2109
|
position: absolute;
|
|
2058
2110
|
top: 100%;
|
|
2059
2111
|
left: 0px;
|
|
@@ -2062,7 +2114,7 @@ const gr = p.div`
|
|
|
2062
2114
|
|
|
2063
2115
|
z-index: 200;
|
|
2064
2116
|
padding-top: 4px;
|
|
2065
|
-
`,
|
|
2117
|
+
`, Dr = p.ul`
|
|
2066
2118
|
display: flex;
|
|
2067
2119
|
flex-direction: column;
|
|
2068
2120
|
gap: var(--base-gap-small);
|
|
@@ -2077,46 +2129,46 @@ const gr = p.div`
|
|
|
2077
2129
|
|
|
2078
2130
|
max-height: 500px;
|
|
2079
2131
|
overflow: auto;
|
|
2080
|
-
`,
|
|
2132
|
+
`, Fr = p.li`
|
|
2081
2133
|
padding: var(--base-gap-small);
|
|
2082
2134
|
border-radius: var(--border-radius-m);
|
|
2083
2135
|
color: var(--md-sys-color-on-surface);
|
|
2084
2136
|
min-width: max-content;
|
|
2085
2137
|
width: 100%;
|
|
2086
|
-
`,
|
|
2087
|
-
({ children: e, segment: t, isOpen: r, scope: o, projectName:
|
|
2088
|
-
const { openSlideOut:
|
|
2089
|
-
if (!
|
|
2090
|
-
const { type: v, id:
|
|
2091
|
-
!v || v === "project" || v === "product" || !
|
|
2138
|
+
`, Cr = ee(
|
|
2139
|
+
({ children: e, segment: t, isOpen: r, scope: o, projectName: c, ...n }, a) => {
|
|
2140
|
+
const { openSlideOut: d } = re(), h = t?.type !== "product" && t?.type !== "project", i = () => {
|
|
2141
|
+
if (!h) return;
|
|
2142
|
+
const { type: v, id: m } = t || {};
|
|
2143
|
+
!v || v === "project" || v === "product" || !m || d({
|
|
2092
2144
|
entityType: v,
|
|
2093
|
-
entityId:
|
|
2094
|
-
projectName:
|
|
2145
|
+
entityId: m,
|
|
2146
|
+
projectName: c
|
|
2095
2147
|
});
|
|
2096
2148
|
}, u = (v) => [
|
|
2097
2149
|
{
|
|
2098
2150
|
label: `ID: ${v}`,
|
|
2099
2151
|
icon: "content_copy",
|
|
2100
|
-
command: () =>
|
|
2152
|
+
command: () => oe(v)
|
|
2101
2153
|
}
|
|
2102
|
-
], [
|
|
2103
|
-
return /* @__PURE__ */
|
|
2104
|
-
|
|
2154
|
+
], [f] = mt();
|
|
2155
|
+
return /* @__PURE__ */ g(
|
|
2156
|
+
oo,
|
|
2105
2157
|
{
|
|
2106
|
-
onClick:
|
|
2158
|
+
onClick: i,
|
|
2107
2159
|
onContextMenu: (v) => {
|
|
2108
2160
|
if (!t) return;
|
|
2109
|
-
const
|
|
2110
|
-
|
|
2161
|
+
const m = u(t.id);
|
|
2162
|
+
f(v, m);
|
|
2111
2163
|
},
|
|
2112
|
-
className:
|
|
2113
|
-
...
|
|
2114
|
-
ref:
|
|
2164
|
+
className: ut({ link: h, open: r }),
|
|
2165
|
+
...n,
|
|
2166
|
+
ref: a,
|
|
2115
2167
|
children: e
|
|
2116
2168
|
}
|
|
2117
2169
|
);
|
|
2118
2170
|
}
|
|
2119
|
-
),
|
|
2171
|
+
), ro = p.div`
|
|
2120
2172
|
position: relative;
|
|
2121
2173
|
width: 100%;
|
|
2122
2174
|
height: 52px;
|
|
@@ -2206,7 +2258,7 @@ const gr = p.div`
|
|
|
2206
2258
|
border: none;
|
|
2207
2259
|
border-color: transparent;
|
|
2208
2260
|
}
|
|
2209
|
-
`,
|
|
2261
|
+
`, ao = p.img`
|
|
2210
2262
|
width: 100%;
|
|
2211
2263
|
height: 100%;
|
|
2212
2264
|
object-fit: contain;
|
|
@@ -2218,63 +2270,63 @@ const gr = p.div`
|
|
|
2218
2270
|
inset: 0;
|
|
2219
2271
|
|
|
2220
2272
|
transition: scale 0.2s, opacity 0.2s;
|
|
2221
|
-
`,
|
|
2273
|
+
`, no = ({
|
|
2222
2274
|
projectName: e = "",
|
|
2223
2275
|
entityType: t = "",
|
|
2224
2276
|
entityId: r = "",
|
|
2225
2277
|
icon: o,
|
|
2226
|
-
color:
|
|
2227
|
-
thumbnailHash:
|
|
2228
|
-
isLoading:
|
|
2229
|
-
shimmer:
|
|
2230
|
-
className:
|
|
2231
|
-
disabled:
|
|
2278
|
+
color: c,
|
|
2279
|
+
thumbnailHash: n,
|
|
2280
|
+
isLoading: a,
|
|
2281
|
+
shimmer: d,
|
|
2282
|
+
className: h,
|
|
2283
|
+
disabled: i,
|
|
2232
2284
|
src: u,
|
|
2233
|
-
hoverIcon:
|
|
2234
|
-
showBorder:
|
|
2285
|
+
hoverIcon: f,
|
|
2286
|
+
showBorder: s = !0,
|
|
2235
2287
|
...v
|
|
2236
2288
|
}) => {
|
|
2237
|
-
const
|
|
2238
|
-
let
|
|
2239
|
-
t && (
|
|
2240
|
-
const [
|
|
2241
|
-
return
|
|
2242
|
-
if (
|
|
2243
|
-
|
|
2289
|
+
const m = t === "project", w = ["product"].includes(t), T = m ? !!e : !!r;
|
|
2290
|
+
let S = "";
|
|
2291
|
+
t && (n || m) && T && (u ? S = u : S = gt({ projectName: e, entityType: t, entityId: r, thumbnailHash: n }) ?? "");
|
|
2292
|
+
const [b, k] = O(!1), [C, E] = O(!1);
|
|
2293
|
+
return q(() => {
|
|
2294
|
+
if (S === "") {
|
|
2295
|
+
E(!0), k(!0);
|
|
2244
2296
|
return;
|
|
2245
2297
|
}
|
|
2246
|
-
|
|
2247
|
-
}, [
|
|
2248
|
-
|
|
2298
|
+
E(!1), k(!1);
|
|
2299
|
+
}, [S]), /* @__PURE__ */ R(
|
|
2300
|
+
ro,
|
|
2249
2301
|
{
|
|
2250
|
-
className: U(
|
|
2251
|
-
loading:
|
|
2252
|
-
loaded:
|
|
2253
|
-
error:
|
|
2302
|
+
className: U(h, "thumbnail", {
|
|
2303
|
+
loading: d && (a || !C),
|
|
2304
|
+
loaded: C,
|
|
2305
|
+
error: b,
|
|
2254
2306
|
clickable: !!v.onClick,
|
|
2255
|
-
border:
|
|
2307
|
+
border: s
|
|
2256
2308
|
}),
|
|
2257
2309
|
...v,
|
|
2258
2310
|
children: [
|
|
2259
|
-
(!
|
|
2260
|
-
t && e && !w &&
|
|
2261
|
-
|
|
2311
|
+
(!a || !C) && !i && /* @__PURE__ */ g(V, { style: { color: c || void 0 }, icon: o || "image", className: "type-icon" }),
|
|
2312
|
+
t && e && !w && T && /* @__PURE__ */ g(
|
|
2313
|
+
ao,
|
|
2262
2314
|
{
|
|
2263
2315
|
alt: `Entity thumbnail ${r || e}`,
|
|
2264
|
-
src:
|
|
2316
|
+
src: S,
|
|
2265
2317
|
onLoad: () => {
|
|
2266
|
-
|
|
2318
|
+
E(!0), k(!1);
|
|
2267
2319
|
},
|
|
2268
2320
|
onError: () => {
|
|
2269
|
-
|
|
2321
|
+
E(!0), k(!0);
|
|
2270
2322
|
}
|
|
2271
2323
|
}
|
|
2272
2324
|
),
|
|
2273
|
-
|
|
2325
|
+
f && /* @__PURE__ */ g(V, { icon: f, className: "hover-icon" })
|
|
2274
2326
|
]
|
|
2275
2327
|
}
|
|
2276
2328
|
);
|
|
2277
|
-
},
|
|
2329
|
+
}, io = p.div`
|
|
2278
2330
|
display: flex;
|
|
2279
2331
|
z-index: 10;
|
|
2280
2332
|
height: 100%;
|
|
@@ -2295,7 +2347,7 @@ const gr = p.div`
|
|
|
2295
2347
|
font-size: 24px;
|
|
2296
2348
|
}
|
|
2297
2349
|
|
|
2298
|
-
${({ $length: e }) => e > 1 &&
|
|
2350
|
+
${({ $length: e }) => e > 1 && be`
|
|
2299
2351
|
:not(:last-child) {
|
|
2300
2352
|
box-shadow: 0 0 4px 0px black;
|
|
2301
2353
|
}
|
|
@@ -2311,131 +2363,131 @@ const gr = p.div`
|
|
|
2311
2363
|
object-fit: cover;
|
|
2312
2364
|
}
|
|
2313
2365
|
}
|
|
2314
|
-
`,
|
|
2366
|
+
`, Ar = ({
|
|
2315
2367
|
thumbnails: e = [],
|
|
2316
2368
|
isLoading: t,
|
|
2317
2369
|
className: r,
|
|
2318
2370
|
style: o,
|
|
2319
|
-
...
|
|
2371
|
+
...c
|
|
2320
2372
|
}) => {
|
|
2321
|
-
const { onContextMenu:
|
|
2373
|
+
const { onContextMenu: n } = Se(st);
|
|
2322
2374
|
e = e.slice(0, 5);
|
|
2323
|
-
const
|
|
2324
|
-
return e.length ? /* @__PURE__ */
|
|
2325
|
-
|
|
2375
|
+
const a = e.length > 1;
|
|
2376
|
+
return e.length ? /* @__PURE__ */ g(
|
|
2377
|
+
io,
|
|
2326
2378
|
{
|
|
2327
2379
|
$length: e.length,
|
|
2328
|
-
className: U("stacked-thumbnails", r, { stacking:
|
|
2380
|
+
className: U("stacked-thumbnails", r, { stacking: a }),
|
|
2329
2381
|
children: e.map(
|
|
2330
|
-
(
|
|
2331
|
-
|
|
2382
|
+
(d, h) => d ? /* @__PURE__ */ g(
|
|
2383
|
+
no,
|
|
2332
2384
|
{
|
|
2333
|
-
projectName:
|
|
2334
|
-
entityType:
|
|
2335
|
-
entityId:
|
|
2336
|
-
icon:
|
|
2337
|
-
color:
|
|
2338
|
-
style: { ...o, zIndex: -
|
|
2339
|
-
thumbnailHash:
|
|
2385
|
+
projectName: d.projectName,
|
|
2386
|
+
entityType: d.type,
|
|
2387
|
+
entityId: d.id,
|
|
2388
|
+
icon: d.icon,
|
|
2389
|
+
color: d.color,
|
|
2390
|
+
style: { ...o, zIndex: -h },
|
|
2391
|
+
thumbnailHash: d.thumbnailHash,
|
|
2340
2392
|
isLoading: t,
|
|
2341
|
-
src:
|
|
2342
|
-
onContextMenu:
|
|
2343
|
-
...
|
|
2393
|
+
src: d.src,
|
|
2394
|
+
onContextMenu: n,
|
|
2395
|
+
...c
|
|
2344
2396
|
},
|
|
2345
|
-
|
|
2397
|
+
d.id || d.src || h
|
|
2346
2398
|
) : null
|
|
2347
2399
|
)
|
|
2348
2400
|
}
|
|
2349
2401
|
) : null;
|
|
2350
|
-
},
|
|
2351
|
-
({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...
|
|
2352
|
-
const
|
|
2353
|
-
entityId:
|
|
2402
|
+
}, Nr = ee(
|
|
2403
|
+
({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...c }, n) => {
|
|
2404
|
+
const a = e.map((f) => ({
|
|
2405
|
+
entityId: f.id,
|
|
2354
2406
|
entityType: t,
|
|
2355
|
-
projectName:
|
|
2356
|
-
})), { data:
|
|
2407
|
+
projectName: f.projectName
|
|
2408
|
+
})), { data: d = [] } = rt(
|
|
2357
2409
|
{
|
|
2358
|
-
entities:
|
|
2410
|
+
entities: a
|
|
2359
2411
|
},
|
|
2360
2412
|
{ skip: !e.length }
|
|
2361
|
-
),
|
|
2362
|
-
const
|
|
2363
|
-
const
|
|
2364
|
-
return
|
|
2413
|
+
), h = Array.from(new Set(d.flatMap((f) => f.watchers))), [i] = at(), u = async (f) => {
|
|
2414
|
+
const s = f.filter((w) => !h.includes(w)), v = h.filter((w) => !f.includes(w)), m = d.map((w) => {
|
|
2415
|
+
const T = w.watchers.filter((S) => !v.includes(S));
|
|
2416
|
+
return T.push(...s), {
|
|
2365
2417
|
...w,
|
|
2366
|
-
watchers:
|
|
2418
|
+
watchers: T
|
|
2367
2419
|
};
|
|
2368
2420
|
});
|
|
2369
2421
|
try {
|
|
2370
|
-
await
|
|
2422
|
+
await i({ entities: m }).unwrap(), r && r(s, v);
|
|
2371
2423
|
} catch {
|
|
2372
|
-
|
|
2424
|
+
te.error("Failed to update watchers");
|
|
2373
2425
|
}
|
|
2374
2426
|
};
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
|
|
2427
|
+
return /* @__PURE__ */ g(
|
|
2428
|
+
ze,
|
|
2377
2429
|
{
|
|
2378
2430
|
align: "right",
|
|
2379
|
-
...
|
|
2380
|
-
options:
|
|
2381
|
-
value:
|
|
2431
|
+
...c,
|
|
2432
|
+
options: _e(c.options, h),
|
|
2433
|
+
value: h,
|
|
2382
2434
|
currentUser: o,
|
|
2383
2435
|
onChange: u,
|
|
2384
|
-
ref:
|
|
2436
|
+
ref: n,
|
|
2385
2437
|
buttonProps: { "data-tooltip": "Watchers" }
|
|
2386
2438
|
}
|
|
2387
2439
|
);
|
|
2388
2440
|
}
|
|
2389
2441
|
);
|
|
2390
2442
|
export {
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2443
|
+
rr as A,
|
|
2444
|
+
tr as B,
|
|
2445
|
+
hr as C,
|
|
2446
|
+
gr as D,
|
|
2447
|
+
lr as E,
|
|
2448
|
+
Tr as F,
|
|
2449
|
+
Xo as G,
|
|
2450
|
+
Zo as H,
|
|
2451
|
+
cr as I,
|
|
2452
|
+
ir as J,
|
|
2453
|
+
sr as K,
|
|
2454
|
+
br as L,
|
|
2455
|
+
jr as M,
|
|
2456
|
+
dr as N,
|
|
2457
|
+
Yo as O,
|
|
2458
|
+
vr as P,
|
|
2459
|
+
ar as Q,
|
|
2460
|
+
yr as R,
|
|
2461
|
+
Sr as S,
|
|
2462
|
+
or as T,
|
|
2463
|
+
fr as U,
|
|
2464
|
+
pr as V,
|
|
2465
|
+
Nr as W,
|
|
2466
|
+
nr as X,
|
|
2467
|
+
xr as a,
|
|
2468
|
+
wr as b,
|
|
2469
|
+
ue as c,
|
|
2470
|
+
ur as d,
|
|
2471
|
+
mr as e,
|
|
2472
|
+
kr as f,
|
|
2473
|
+
Dr as g,
|
|
2474
|
+
Cr as h,
|
|
2475
|
+
Fr as i,
|
|
2476
|
+
Er as j,
|
|
2477
|
+
Ko as k,
|
|
2478
|
+
vt as l,
|
|
2479
|
+
kt as m,
|
|
2480
|
+
Go as n,
|
|
2481
|
+
St as o,
|
|
2482
|
+
Tt as p,
|
|
2483
|
+
Mt as q,
|
|
2484
|
+
Rt as r,
|
|
2485
|
+
Jo as s,
|
|
2486
|
+
ke as t,
|
|
2487
|
+
to as u,
|
|
2488
|
+
It as v,
|
|
2489
|
+
Ar as w,
|
|
2490
|
+
no as x,
|
|
2491
|
+
Et as y,
|
|
2492
|
+
er as z
|
|
2441
2493
|
};
|