@anzusystems/common-admin 2.0.0-rc.28 → 2.0.0-rc.29
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/domains/dam/api/damAssetApi.d.ts +12 -1
- package/dist/domains/dam/api/damAssetApi.js +151 -95
- package/dist/domains/dam/api/damAssetApi.js.map +1 -1
- package/dist/domains/dam/api/damMetadataOnServer.d.ts +35 -0
- package/dist/domains/dam/api/damMetadataOnServer.js +28 -0
- package/dist/domains/dam/api/damMetadataOnServer.js.map +1 -0
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue.js +26 -25
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue.js.map +1 -1
- package/dist/domains/dam/assetDetail/store/assetDetailStore.js +40 -39
- package/dist/domains/dam/assetDetail/store/assetDetailStore.js.map +1 -1
- package/dist/domains/dam/cropper/components/ACropper.vue.d.ts +1 -1
- package/dist/domains/dam/cropper/components/ACropper.vue.js +153 -136
- package/dist/domains/dam/cropper/components/ACropper.vue.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue.js +106 -106
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue.js +13 -13
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue.js.map +1 -1
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js +115 -114
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js.map +1 -1
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js +147 -143
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js.map +1 -1
- package/dist/domains/filters/components/FiltersSelected.vue.js +5 -5
- package/dist/domains/filters/components/FiltersSelected.vue.js.map +1 -1
- package/dist/domains/filters/composables/filterFactory.js +41 -38
- package/dist/domains/filters/composables/filterFactory.js.map +1 -1
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue.js +46 -38
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue.js.map +1 -1
- package/dist/domains/system/composables/alerts.js +8 -2
- package/dist/domains/system/composables/alerts.js.map +1 -1
- package/dist/domains/system/systemBar/utils/appReload.d.ts +9 -1
- package/dist/domains/system/systemBar/utils/appReload.js +3 -3
- package/dist/domains/system/systemBar/utils/appReload.js.map +1 -1
- package/dist/lib.d.ts +2 -2
- package/package.json +2 -2
|
@@ -2,59 +2,60 @@ import { requestedUrl as e } from "../../../api/composables/request.js";
|
|
|
2
2
|
import { apiErrorIsReported as t, apiErrorStatus as n, mapApiError as r, report as i } from "../../../api/utils/apiErrors.js";
|
|
3
3
|
import { useCommonAdminCoreDamOptions as a } from "../../composables/commonAdminCoreDamOptions.js";
|
|
4
4
|
import { ENTITY as o, fetchAsset as s, fetchAssetByFileId as c, fetchAssetListByIds as l } from "../../api/damAssetApi.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
5
|
+
import { metadataOfAsset as u, metadataOnServer as d, setMetadataOnServer as f } from "../../api/damMetadataOnServer.js";
|
|
6
|
+
import { SYSTEM_CORE_DAM as p } from "../../api/damConstants.js";
|
|
7
|
+
import { useDamCachedAuthors as m } from "../../author/composables/cachedAuthors.js";
|
|
8
|
+
import { useUploadQueueItemFactory as h } from "../factory/UploadQueueItemFactory.js";
|
|
9
|
+
import { useAssetSuggestions as ee } from "../composables/assetSuggestions.js";
|
|
10
|
+
import { useDamConfigState as g } from "../../config/composables/damConfigState.js";
|
|
11
|
+
import { useDamNotifications as _ } from "../../composables/damNotifications.js";
|
|
12
|
+
import { useDamNotificationsConnection as v } from "../../composables/damNotificationsConnection.js";
|
|
13
|
+
import { DamNotificationName as y } from "../../composables/damNotificationsEventBus.js";
|
|
14
|
+
import { getAssetTypeByMimeType as b } from "../utils/mimeTypeHelper.js";
|
|
15
|
+
import { UPLOAD_QUEUE_ITEM_CHUNK_SIZE as x, createUploadQueueCore as S } from "../core/uploadQueueCore.js";
|
|
16
|
+
import { libraryQueuePreset as C } from "../presets/queuePresets.js";
|
|
17
|
+
import { UploadRowRole as w } from "../settlement/uploadSettlementTypes.js";
|
|
18
|
+
import { useDamCachedKeywords as T } from "../../keyword/composables/cachedKeywords.js";
|
|
19
|
+
import { damFileTypeFix as E } from "../../../ui/file/utils/fileType.js";
|
|
20
|
+
import { DamAssetType as D } from "../../types/Asset.js";
|
|
21
|
+
import { UploadQueueItemStatus as O, UploadQueueItemType as k } from "../../types/UploadQueue.js";
|
|
22
|
+
import { AnzuApiResponseCodeError as A } from "../../../../shared/error/AnzuApiResponseCodeError.js";
|
|
23
|
+
import { cloneDeep as j, isArray as M, isString as te, isUndefined as N } from "../../../../shared/utils/common.js";
|
|
24
|
+
import { commonT as P } from "../../../../plugins/i18n.js";
|
|
25
|
+
import { defineStore as F } from "pinia";
|
|
26
|
+
import { getCurrentScope as ne, ref as re } from "vue";
|
|
26
27
|
// src/domains/dam/uploadQueue/store/uploadQueuesStore.ts
|
|
27
|
-
var
|
|
28
|
+
var ie = (e) => j({
|
|
28
29
|
keywords: e.keywords,
|
|
29
30
|
authors: e.authors,
|
|
30
31
|
sources: e.sources,
|
|
31
32
|
customData: e.customData,
|
|
32
33
|
mainFileSingleUse: e.mainFileSingleUse
|
|
33
|
-
}),
|
|
34
|
+
}), I = (e, t) => JSON.stringify(e) === JSON.stringify(t), L = (e, t, n) => {
|
|
34
35
|
let r = {
|
|
35
36
|
fields: /* @__PURE__ */ new Set(),
|
|
36
37
|
customKeys: /* @__PURE__ */ new Set()
|
|
37
|
-
}, i = (n) => !t ||
|
|
38
|
+
}, i = (n) => !t || I(e[n], t[n]) ? !0 : (r.fields.add(n), !1);
|
|
38
39
|
i("keywords") && (e.keywords = [...n.keywords]), i("authors") && (e.authors = [...n.authors]), i("sources") && (e.sources = [...n.sources ?? []]);
|
|
39
|
-
let a =
|
|
40
|
+
let a = j(n.customData);
|
|
40
41
|
if (t && a) {
|
|
41
42
|
let n = e.customData ?? {}, i = t.customData ?? {};
|
|
42
43
|
(/* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(i)])).forEach((e) => {
|
|
43
|
-
|
|
44
|
+
I(n[e], i[e]) || (r.customKeys.add(e), e in n ? a[e] = j(n[e]) : delete a[e]);
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
return e.customData = a,
|
|
47
|
-
},
|
|
47
|
+
return e.customData = a, N(n.mainFileSingleUse) ? r.fields.add("mainFileSingleUse") : i("mainFileSingleUse") && (e.mainFileSingleUse = n.mainFileSingleUse), r;
|
|
48
|
+
}, R = (e, t, n) => {
|
|
48
49
|
let r = e.rows.get(t);
|
|
49
50
|
if (!r) return;
|
|
50
51
|
n.fields.has("keywords") || (r.keywords = [...t.keywords]), n.fields.has("authors") || (r.authors = [...t.authors]), n.fields.has("sources") || (r.sources = [...t.sources ?? []]), n.fields.has("mainFileSingleUse") || (r.mainFileSingleUse = t.mainFileSingleUse);
|
|
51
52
|
let i = t.customData ?? {}, a = r.customData = { ...r.customData };
|
|
52
53
|
(/* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(a)])).forEach((e) => {
|
|
53
|
-
n.customKeys.has(e) || (e in i ? a[e] =
|
|
54
|
+
n.customKeys.has(e) || (e in i ? a[e] = j(i[e]) : delete a[e]);
|
|
54
55
|
});
|
|
55
|
-
},
|
|
56
|
-
let
|
|
57
|
-
roleOf: (e) => e.type ===
|
|
56
|
+
}, z = F("commonAdminUploadQueuesStore", () => {
|
|
57
|
+
let j = re(/* @__PURE__ */ new Map()), { createDefault: F } = h(), I = /* @__PURE__ */ new Map(), z = (e) => (N(e) ? void 0 : I.get(e)) ?? "default", B = (e) => a(z(e)), V = {
|
|
58
|
+
roleOf: (e) => e.type === k.Asset ? w.Copy : w.Upload,
|
|
58
59
|
policyFor: () => ({
|
|
59
60
|
reader: "asset",
|
|
60
61
|
settleOn: "read",
|
|
@@ -64,7 +65,7 @@ var ne = (e) => k({
|
|
|
64
65
|
matches: (e, t) => e.assetId === t.assetId,
|
|
65
66
|
readers: {
|
|
66
67
|
asset: async (e, t) => {
|
|
67
|
-
let { damClient: r, endPointAsset: i } =
|
|
68
|
+
let { damClient: r, endPointAsset: i } = B(t?.queueKey);
|
|
68
69
|
try {
|
|
69
70
|
return t?.report === !1 ? await s(r, i, e, { report: !1 }) : await s(r, i, e);
|
|
70
71
|
} catch (e) {
|
|
@@ -73,70 +74,70 @@ var ne = (e) => k({
|
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
assets: async (t, n, a) => {
|
|
76
|
-
let { damClient: s, endPointAsset: c } =
|
|
77
|
+
let { damClient: s, endPointAsset: c } = B(a?.queueKey);
|
|
77
78
|
try {
|
|
78
79
|
return await l(s, c, n, t);
|
|
79
80
|
} catch (l) {
|
|
80
81
|
if (a?.report) {
|
|
81
|
-
let a =
|
|
82
|
-
system:
|
|
82
|
+
let a = M(l) ? l.at(-1) : void 0, u = `${c}/licence/${t}/ids/${n.join(",")}`, d = {
|
|
83
|
+
system: p,
|
|
83
84
|
entity: o,
|
|
84
|
-
url: e(s,
|
|
85
|
-
},
|
|
86
|
-
throw i(r(
|
|
85
|
+
url: e(s, u, {}, l, a?.config)
|
|
86
|
+
}, f = M(l) ? new A(a?.status ?? 0) : l;
|
|
87
|
+
throw i(r(f, d), d);
|
|
87
88
|
}
|
|
88
89
|
throw l;
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
duplicateOriginAsset: async (e, t) => {
|
|
92
|
-
let { damClient: n, endPointAsset: r } =
|
|
93
|
+
let { damClient: n, endPointAsset: r } = B(t?.queueKey);
|
|
93
94
|
return c(n, r, e);
|
|
94
95
|
},
|
|
95
96
|
failureReported: t
|
|
96
97
|
},
|
|
97
|
-
configOf:
|
|
98
|
+
configOf: z,
|
|
98
99
|
caches: {
|
|
99
|
-
addAuthors: (e, t) =>
|
|
100
|
-
addKeywords: (e, t) =>
|
|
101
|
-
fetchAuthors: (e) =>
|
|
102
|
-
fetchKeywords: (e) =>
|
|
100
|
+
addAuthors: (e, t) => m(z(t)).addToCachedAuthors(e),
|
|
101
|
+
addKeywords: (e, t) => T(z(t)).addToCachedKeywords(e),
|
|
102
|
+
fetchAuthors: (e) => m(z(e)).fetchCachedAuthors(),
|
|
103
|
+
fetchKeywords: (e) => T(z(e)).fetchCachedKeywords()
|
|
103
104
|
},
|
|
104
105
|
messages: {
|
|
105
|
-
processingTooLong: () =>
|
|
106
|
-
readFailed: () =>
|
|
107
|
-
assetMissing: () =>
|
|
108
|
-
assetGone: () =>
|
|
106
|
+
processingTooLong: () => P("common.damImage.uploadErrors.processingTooLong"),
|
|
107
|
+
readFailed: () => P("common.damImage.uploadErrors.readFailed"),
|
|
108
|
+
assetMissing: () => P("common.damImage.uploadErrors.unknownError"),
|
|
109
|
+
assetGone: () => P("common.damImage.queueItem.assetGone")
|
|
109
110
|
},
|
|
110
111
|
connection: {
|
|
111
|
-
isPushAlive: (e) =>
|
|
112
|
-
onChange:
|
|
112
|
+
isPushAlive: (e) => v(z(e)).isPushAlive(),
|
|
113
|
+
onChange: v().onChange
|
|
113
114
|
}
|
|
114
|
-
},
|
|
115
|
-
queues:
|
|
116
|
-
settlement:
|
|
117
|
-
configOf:
|
|
118
|
-
})), { settlement:
|
|
119
|
-
function
|
|
120
|
-
let r =
|
|
121
|
-
if (!
|
|
122
|
-
|
|
115
|
+
}, H = S(C({
|
|
116
|
+
queues: j,
|
|
117
|
+
settlement: V,
|
|
118
|
+
configOf: z
|
|
119
|
+
})), { settlement: U } = H;
|
|
120
|
+
function W(e, t, n) {
|
|
121
|
+
let r = I.get(e);
|
|
122
|
+
if (!N(r) && r !== t && H.getQueueItems(e).length > 0) throw Error(`useUploadQueuesStore: the queue "${e}" has rows under the DAM configuration "${r}", none is added under "${t}".`);
|
|
123
|
+
I.set(e, t), H.addRow(e, n);
|
|
123
124
|
}
|
|
124
|
-
let
|
|
125
|
+
let G = ne(), ae = (e, t) => {
|
|
125
126
|
switch (e.name) {
|
|
126
|
-
case
|
|
127
|
+
case y.AssetFileProcessed: return {
|
|
127
128
|
kind: "processed",
|
|
128
129
|
assetId: e.data.asset,
|
|
129
130
|
fileId: null,
|
|
130
131
|
configNames: t
|
|
131
132
|
};
|
|
132
|
-
case
|
|
133
|
+
case y.AssetFileFailed: return {
|
|
133
134
|
kind: "failed",
|
|
134
135
|
assetId: e.data.asset,
|
|
135
136
|
fileId: null,
|
|
136
137
|
failReason: e.data.failReason,
|
|
137
138
|
configNames: t
|
|
138
139
|
};
|
|
139
|
-
case
|
|
140
|
+
case y.AssetFileDuplicate: return {
|
|
140
141
|
kind: "duplicate",
|
|
141
142
|
assetId: e.data.asset,
|
|
142
143
|
fileId: null,
|
|
@@ -144,13 +145,13 @@ var ne = (e) => k({
|
|
|
144
145
|
assetType: e.data.assetType,
|
|
145
146
|
configNames: t
|
|
146
147
|
};
|
|
147
|
-
case
|
|
148
|
+
case y.AssetMetadataProcessed: return {
|
|
148
149
|
kind: "metadata",
|
|
149
150
|
assetId: e.data.asset,
|
|
150
151
|
fileId: null,
|
|
151
152
|
configNames: t
|
|
152
153
|
};
|
|
153
|
-
case
|
|
154
|
+
case y.AssetFileCopied: return {
|
|
154
155
|
kind: "copied",
|
|
155
156
|
assetId: e.data.asset,
|
|
156
157
|
fileId: null,
|
|
@@ -158,72 +159,72 @@ var ne = (e) => k({
|
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
return null;
|
|
161
|
-
}, { addDamNotificationListener:
|
|
162
|
+
}, { addDamNotificationListener: oe } = _(), K = !1;
|
|
162
163
|
function q() {
|
|
163
164
|
if (K) return;
|
|
164
165
|
K = !0;
|
|
165
|
-
let e = () =>
|
|
166
|
-
let n =
|
|
167
|
-
n &&
|
|
166
|
+
let e = () => oe((e, t) => {
|
|
167
|
+
let n = ae(e, t);
|
|
168
|
+
n && U.notify(n);
|
|
168
169
|
}, { all: !0 });
|
|
169
|
-
|
|
170
|
+
G ? G.run(e) : e();
|
|
170
171
|
}
|
|
171
|
-
async function
|
|
172
|
+
async function se(e, t, n, r, i) {
|
|
172
173
|
a(i);
|
|
173
|
-
let { getDamConfigExtSystem: o } =
|
|
174
|
-
if (
|
|
174
|
+
let { getDamConfigExtSystem: o } = g(void 0, i), s = o(t);
|
|
175
|
+
if (N(s)) throw Error("useUploadQueuesStore.addByCopyToLicence: Ext system must be initialised.");
|
|
175
176
|
q();
|
|
176
177
|
for (let t of r) {
|
|
177
|
-
let r =
|
|
178
|
-
r.assetId = t,
|
|
179
|
-
let a =
|
|
180
|
-
a &&
|
|
178
|
+
let r = F(H.uniqueKey("asset_" + t), k.Asset, O.Processing, D.Image, x, n);
|
|
179
|
+
r.assetId = t, W(e, i, r);
|
|
180
|
+
let a = H.getQueueItems(e).at(-1);
|
|
181
|
+
a && H.track(e, a);
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
async function
|
|
184
|
+
async function ce(e, t, n, r, i) {
|
|
184
185
|
a(i);
|
|
185
|
-
let { getDamConfigExtSystem: o } =
|
|
186
|
-
if (
|
|
186
|
+
let { getDamConfigExtSystem: o } = g(void 0, i), s = o(t);
|
|
187
|
+
if (N(s)) throw Error("useUploadQueuesStore.addByFiles: Ext system must be initialised.");
|
|
187
188
|
q();
|
|
188
189
|
for await (let t of r) {
|
|
189
|
-
let r =
|
|
190
|
-
if (!r || r !==
|
|
191
|
-
let a =
|
|
192
|
-
a.file = t, a.displayTitle = t.name,
|
|
190
|
+
let r = b(E(t), s);
|
|
191
|
+
if (!r || r !== D.Image) continue;
|
|
192
|
+
let a = F(H.uniqueKey("file_" + t.name), k.File, O.Waiting, r, x, n);
|
|
193
|
+
a.file = t, a.displayTitle = t.name, W(e, i, a);
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
let J = (e, t) => ({
|
|
196
197
|
assetId: e,
|
|
197
198
|
fileId: null,
|
|
198
|
-
configNames: [
|
|
199
|
+
configNames: [te(t) ? t : z(t.queueKey)]
|
|
199
200
|
});
|
|
200
|
-
function
|
|
201
|
-
return
|
|
201
|
+
function le(e, t) {
|
|
202
|
+
return U.notify({
|
|
202
203
|
kind: "processed",
|
|
203
204
|
...J(e, t)
|
|
204
205
|
});
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
207
|
+
function ue(e, t) {
|
|
208
|
+
return U.settleKnownProcessed(J(e, t), { withMetadata: !0 });
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
-
return
|
|
210
|
+
function de(e, t, n, r) {
|
|
211
|
+
return U.settleKnownDuplicate(J(e, r), t, n);
|
|
211
212
|
}
|
|
212
|
-
async function
|
|
213
|
-
|
|
213
|
+
async function fe(e, t, n) {
|
|
214
|
+
U.settleKnownFailed(J(e, n), t);
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
216
|
+
function pe(e, t) {
|
|
217
|
+
return U.refreshAsset(J(e, t));
|
|
217
218
|
}
|
|
218
|
-
async function
|
|
219
|
-
|
|
219
|
+
async function me(e, t, n) {
|
|
220
|
+
H.stopItemUpload(e, t);
|
|
220
221
|
}
|
|
221
|
-
let Y = /* @__PURE__ */ new Map(),
|
|
222
|
+
let Y = /* @__PURE__ */ new Map(), he = (e, t) => `${e}\u0000${t}`, ge = 0, X = /* @__PURE__ */ new Set();
|
|
222
223
|
function Z(e, t) {
|
|
223
224
|
let n = /* @__PURE__ */ new Map();
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
t.assetId === e && t.type && n.set(t,
|
|
225
|
+
j.value.forEach((r, i) => {
|
|
226
|
+
z(i) === t && r.items.forEach((t) => {
|
|
227
|
+
t.assetId === e && t.type && n.set(t, ie(t));
|
|
227
228
|
});
|
|
228
229
|
});
|
|
229
230
|
let r = {
|
|
@@ -238,85 +239,88 @@ var ne = (e) => k({
|
|
|
238
239
|
}
|
|
239
240
|
let $ = (e, t, n) => {
|
|
240
241
|
X.forEach((r) => {
|
|
241
|
-
r !== e && r.assetId === e.assetId && r.configName === e.configName &&
|
|
242
|
+
r !== e && r.assetId === e.assetId && r.configName === e.configName && R(r, t, n);
|
|
242
243
|
});
|
|
243
244
|
};
|
|
244
|
-
async function
|
|
245
|
-
let { updateNewNames: i, getAuthorConflicts: o } =
|
|
245
|
+
async function _e(e, t, n, r) {
|
|
246
|
+
let { updateNewNames: i, getAuthorConflicts: o } = ee(), c;
|
|
246
247
|
try {
|
|
247
248
|
c = a(t);
|
|
248
249
|
} catch {
|
|
249
250
|
return;
|
|
250
251
|
}
|
|
251
|
-
let { addToCachedKeywords: l, fetchCachedKeywords:
|
|
252
|
-
if (!
|
|
252
|
+
let { addToCachedKeywords: l, fetchCachedKeywords: p } = T(t), { addToCachedAuthors: h, fetchCachedAuthors: g } = m(t), _ = () => Array.from(j.value.entries()).filter(([e]) => z(e) === t), v = _().flatMap(([, e]) => e.items);
|
|
253
|
+
if (!v.some((t) => t.assetId === e.id && !!t.type) && !v.some((t) => !!t.type && t.status === O.Processing && t.licenceId === e.licence)) {
|
|
253
254
|
r && Q(r);
|
|
254
255
|
return;
|
|
255
256
|
}
|
|
256
|
-
let
|
|
257
|
-
Y.set(
|
|
258
|
-
let
|
|
257
|
+
let y = r ?? Z(e.id, t), b = y.rows, x = ++ge, S = he(t, e.id);
|
|
258
|
+
Y.set(S, x);
|
|
259
|
+
let C = () => Y.get(S) === x;
|
|
259
260
|
try {
|
|
260
261
|
let t = await s(c.damClient, c.endPointAsset, e.id);
|
|
261
|
-
if (!
|
|
262
|
-
|
|
262
|
+
if (!C()) return;
|
|
263
|
+
_().forEach(([e, n]) => {
|
|
263
264
|
n.items.forEach((e) => {
|
|
264
265
|
if (e.assetId === t.id && e.type) {
|
|
265
|
-
let r =
|
|
266
|
+
let r = L(e, b.get(e), {
|
|
266
267
|
keywords: t.keywords,
|
|
267
268
|
authors: t.authors,
|
|
268
269
|
sources: t.sources,
|
|
269
270
|
customData: t.metadata.customData,
|
|
270
271
|
mainFileSingleUse: t.mainFileSingleUse
|
|
271
272
|
});
|
|
272
|
-
$(
|
|
273
|
+
f(e, u(t)), $(y, e, r), i(t.metadata.authorSuggestions, n.suggestions.newAuthorNames), i(t.metadata.keywordSuggestions, n.suggestions.newKeywordNames), e.authorConflicts = o(t.metadata.authorSuggestions), l(e.keywords), h(e.authors), h(e.sources), h(e.authorConflicts);
|
|
273
274
|
}
|
|
274
|
-
}),
|
|
275
|
+
}), H.recalculateQueueCounts(e), g(), p();
|
|
275
276
|
});
|
|
276
277
|
} catch {
|
|
277
|
-
if (!
|
|
278
|
-
|
|
278
|
+
if (!C()) return;
|
|
279
|
+
_().forEach(([, t]) => {
|
|
279
280
|
t.items.forEach((t) => {
|
|
280
281
|
if (t.assetId === e.id && t.type) {
|
|
281
|
-
let r =
|
|
282
|
+
let r = L(t, b.get(t), {
|
|
282
283
|
keywords: e.keywords,
|
|
283
284
|
authors: e.authors,
|
|
284
285
|
sources: e.sources,
|
|
285
286
|
customData: e.metadata.customData,
|
|
286
|
-
mainFileSingleUse:
|
|
287
|
-
});
|
|
288
|
-
|
|
287
|
+
mainFileSingleUse: N(n) ? void 0 : n
|
|
288
|
+
}), i = d(t);
|
|
289
|
+
i && f(t, {
|
|
290
|
+
...u(e),
|
|
291
|
+
mainFileSingleUse: N(n) ? i.mainFileSingleUse : n
|
|
292
|
+
}), $(y, t, r), l(t.keywords), h(t.authors), h(t.sources);
|
|
289
293
|
}
|
|
290
294
|
});
|
|
291
|
-
}),
|
|
295
|
+
}), g(), p();
|
|
292
296
|
} finally {
|
|
293
|
-
Q(
|
|
297
|
+
Q(y), C() && Y.delete(S);
|
|
294
298
|
}
|
|
295
299
|
}
|
|
296
300
|
return {
|
|
297
|
-
getQueue:
|
|
298
|
-
getQueueItems:
|
|
299
|
-
addByFiles:
|
|
300
|
-
addByCopyToLicence:
|
|
301
|
-
queueItemProcessed:
|
|
302
|
-
queueItemFullyProcessed:
|
|
303
|
-
queueItemDuplicate:
|
|
304
|
-
queueItemFailed:
|
|
305
|
-
refreshAsset:
|
|
306
|
-
refreshMayHelp:
|
|
307
|
-
isGivenUpMissing: (e) =>
|
|
308
|
-
removeByIndex:
|
|
309
|
-
stopItemUpload:
|
|
310
|
-
getQueueTotalCount:
|
|
311
|
-
getQueueProcessedCount:
|
|
312
|
-
stopUpload:
|
|
313
|
-
getQueueItemsTypes:
|
|
314
|
-
updateFromDetail:
|
|
301
|
+
getQueue: H.getQueue,
|
|
302
|
+
getQueueItems: H.getQueueItems,
|
|
303
|
+
addByFiles: ce,
|
|
304
|
+
addByCopyToLicence: se,
|
|
305
|
+
queueItemProcessed: le,
|
|
306
|
+
queueItemFullyProcessed: ue,
|
|
307
|
+
queueItemDuplicate: de,
|
|
308
|
+
queueItemFailed: fe,
|
|
309
|
+
refreshAsset: pe,
|
|
310
|
+
refreshMayHelp: H.refreshMayHelp,
|
|
311
|
+
isGivenUpMissing: (e) => U.isGivenUpMissing(e),
|
|
312
|
+
removeByIndex: H.removeByIndex,
|
|
313
|
+
stopItemUpload: me,
|
|
314
|
+
getQueueTotalCount: H.getQueueTotalCount,
|
|
315
|
+
getQueueProcessedCount: H.getQueueProcessedCount,
|
|
316
|
+
stopUpload: H.stopUpload,
|
|
317
|
+
getQueueItemsTypes: H.getQueueItemsTypes,
|
|
318
|
+
updateFromDetail: _e,
|
|
315
319
|
noteRowsOfAsset: Z,
|
|
316
320
|
forgetRowsNote: Q,
|
|
317
|
-
forceReloadFileInput:
|
|
321
|
+
forceReloadFileInput: H.forceReloadFileInput
|
|
318
322
|
};
|
|
319
323
|
});
|
|
320
|
-
export {
|
|
324
|
+
export { z as useUploadQueuesStore };
|
|
321
325
|
|
|
322
326
|
//# sourceMappingURL=uploadQueuesStore.js.map
|