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