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