@overmap-ai/core 1.0.44-tiptap.4 → 1.0.44-tiptap.6
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/overmap-core.js +41 -18
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +41 -18
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1674,8 +1674,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1674
1674
|
[selectAllComponentAttachments, (_state, componentId) => componentId],
|
|
1675
1675
|
(attachments, componentId) => {
|
|
1676
1676
|
const attachmentsOfComponent = attachments.filter(({ component_id }) => componentId === component_id);
|
|
1677
|
-
const fileAttachments = attachmentsOfComponent.filter(
|
|
1678
|
-
|
|
1677
|
+
const fileAttachments = attachmentsOfComponent.filter(
|
|
1678
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1679
|
+
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1680
|
+
);
|
|
1681
|
+
const imageAttachments = attachmentsOfComponent.filter(
|
|
1682
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1683
|
+
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1684
|
+
);
|
|
1679
1685
|
return { fileAttachments, imageAttachments };
|
|
1680
1686
|
}
|
|
1681
1687
|
)
|
|
@@ -1940,8 +1946,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1940
1946
|
const attachmentsOfComponent = attachments.filter(
|
|
1941
1947
|
({ component_type_id }) => component_type_id === componentTypeId
|
|
1942
1948
|
);
|
|
1943
|
-
const fileAttachments = attachmentsOfComponent.filter(
|
|
1944
|
-
|
|
1949
|
+
const fileAttachments = attachmentsOfComponent.filter(
|
|
1950
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1951
|
+
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1952
|
+
);
|
|
1953
|
+
const imageAttachments = attachmentsOfComponent.filter(
|
|
1954
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1955
|
+
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1956
|
+
);
|
|
1945
1957
|
return { fileAttachments, imageAttachments };
|
|
1946
1958
|
}
|
|
1947
1959
|
)
|
|
@@ -2241,8 +2253,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2241
2253
|
[selectIssueAttachments, (_state, issueId) => issueId],
|
|
2242
2254
|
(attachments, issueId) => {
|
|
2243
2255
|
const attachmentsOfComponent = attachments.filter(({ issue_id }) => issue_id === issueId);
|
|
2244
|
-
const fileAttachments = attachmentsOfComponent.filter(
|
|
2245
|
-
|
|
2256
|
+
const fileAttachments = attachmentsOfComponent.filter(
|
|
2257
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
2258
|
+
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
2259
|
+
);
|
|
2260
|
+
const imageAttachments = attachmentsOfComponent.filter(
|
|
2261
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
2262
|
+
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
2263
|
+
);
|
|
2246
2264
|
return { fileAttachments, imageAttachments };
|
|
2247
2265
|
}
|
|
2248
2266
|
)
|
|
@@ -6512,18 +6530,23 @@ var __publicField = (obj, key, value) => {
|
|
|
6512
6530
|
let promise = cachedRequestPromises[requestCacheKey];
|
|
6513
6531
|
let isFirstRequest = true;
|
|
6514
6532
|
if (!promise) {
|
|
6515
|
-
promise =
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6533
|
+
promise = new Promise((resolve) => {
|
|
6534
|
+
void this.enqueueRequest({
|
|
6535
|
+
description: "Download file",
|
|
6536
|
+
method: HttpMethod.GET,
|
|
6537
|
+
url,
|
|
6538
|
+
// If in development, we should assume the files are saved at localhost by the Django development server.
|
|
6539
|
+
// Setting this to true will lead to localhost:8000 being prepended to the URL.
|
|
6540
|
+
isExternalUrl: true,
|
|
6541
|
+
isResponseBlob: true,
|
|
6542
|
+
isAuthNeeded: false,
|
|
6543
|
+
blockers: [expectedSha1],
|
|
6544
|
+
blocks: [expectedSha1]
|
|
6545
|
+
}).then((blob) => {
|
|
6546
|
+
const blobToFile = new File([blob], downloadedName ?? expectedSha1, { type: blob.type });
|
|
6547
|
+
resolve(blobToFile);
|
|
6548
|
+
});
|
|
6549
|
+
});
|
|
6527
6550
|
cachedRequestPromises[requestCacheKey] = promise;
|
|
6528
6551
|
} else {
|
|
6529
6552
|
isFirstRequest = false;
|