@acorex/modules 20.7.11 → 20.7.12
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/fesm2022/acorex-modules-document-management.mjs +6 -42
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-BAIx0BJe.mjs → acorex-modules-platform-management-acorex-modules-platform-management-ndbiBVUt.mjs} +13 -9
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-ndbiBVUt.mjs.map +1 -0
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-BxGLun0f.mjs → acorex-modules-platform-management-menu-list.component-w-Ix2VZA.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-BxGLun0f.mjs.map → acorex-modules-platform-management-menu-list.component-w-Ix2VZA.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +1 -1
- package/fesm2022/{acorex-modules-product-catalog-product.entity-BXDh4Wlu.mjs → acorex-modules-product-catalog-product.entity-CVW7-ye7.mjs} +2 -28
- package/fesm2022/acorex-modules-product-catalog-product.entity-CVW7-ye7.mjs.map +1 -0
- package/fesm2022/acorex-modules-product-catalog.mjs +1 -1
- package/package.json +2 -2
- package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-BAIx0BJe.mjs.map +0 -1
- package/fesm2022/acorex-modules-product-catalog-product.entity-BXDh4Wlu.mjs.map +0 -1
|
@@ -5581,49 +5581,13 @@ class AXMDocumentManagerService {
|
|
|
5581
5581
|
const ext = item.name.split('.').pop()?.toLowerCase();
|
|
5582
5582
|
return ext && AXMDocumentManagerService.GALLERY_EXTENSIONS.includes(ext);
|
|
5583
5583
|
});
|
|
5584
|
-
// Fetch documents with null fileId.source.value
|
|
5585
|
-
const documentsWithNullFileId = filteredDocuments.filter((doc) => !doc.fileId.source.value);
|
|
5586
|
-
// Fetch missing documents and replace them in the array
|
|
5587
|
-
if (documentsWithNullFileId.length > 0) {
|
|
5588
|
-
const fetchedDocuments = await Promise.all(documentsWithNullFileId.map((doc) => this.documentService.getOne(doc.id)));
|
|
5589
|
-
// Replace documents in filteredDocuments with fetched ones
|
|
5590
|
-
fetchedDocuments.forEach((fetchedDoc) => {
|
|
5591
|
-
const index = filteredDocuments.findIndex((doc) => doc.id === fetchedDoc.id);
|
|
5592
|
-
if (index !== -1) {
|
|
5593
|
-
filteredDocuments[index] = fetchedDoc;
|
|
5594
|
-
}
|
|
5595
|
-
});
|
|
5596
|
-
}
|
|
5597
|
-
// Collect all fileIds that need to be fetched
|
|
5598
|
-
const fileIds = filteredDocuments.filter((doc) => doc.fileId.source.value).map((doc) => doc.fileId.source.value);
|
|
5599
|
-
// Fetch all file info at once (need URL for media viewer)
|
|
5600
|
-
const fileInfosMap = new Map();
|
|
5601
|
-
if (fileIds.length > 0) {
|
|
5602
|
-
const infos = await Promise.all(fileIds.map((id) => this.fileService.getInfo(id)));
|
|
5603
|
-
infos.forEach((info) => {
|
|
5604
|
-
if (info?.fileId) {
|
|
5605
|
-
fileInfosMap.set(info.fileId, info);
|
|
5606
|
-
}
|
|
5607
|
-
});
|
|
5608
|
-
}
|
|
5609
5584
|
// Convert documents to AXPFileListItem[] format for the gallery widget
|
|
5610
|
-
const fileListItems =
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
}
|
|
5617
|
-
return {
|
|
5618
|
-
id: doc.id ?? '',
|
|
5619
|
-
name: doc.name,
|
|
5620
|
-
size: doc.size,
|
|
5621
|
-
status: 'attached',
|
|
5622
|
-
source: {
|
|
5623
|
-
kind: 'url',
|
|
5624
|
-
value: url,
|
|
5625
|
-
},
|
|
5626
|
-
};
|
|
5585
|
+
const fileListItems = filteredDocuments.map((doc) => ({
|
|
5586
|
+
id: doc.id ?? '',
|
|
5587
|
+
name: doc.name,
|
|
5588
|
+
size: doc.size,
|
|
5589
|
+
status: 'attached',
|
|
5590
|
+
source: doc.fileId?.source,
|
|
5627
5591
|
}));
|
|
5628
5592
|
// Calculate start index
|
|
5629
5593
|
const startIndex = isVirtualFolder
|