@acorex/modules 20.7.3 → 20.7.4
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 +27 -35
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-D7dEWzjn.mjs → acorex-modules-task-management-task-board.page-CIlxqtgJ.mjs} +90 -14
- package/fesm2022/acorex-modules-task-management-task-board.page-CIlxqtgJ.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +1 -1
- package/package.json +6 -6
- package/fesm2022/acorex-modules-task-management-task-board.page-D7dEWzjn.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
2
2
|
import { AXPEntityService, AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, cloneLayoutArrays, ensureLayoutSection, ensureLayoutPropertyView, ensureListActions, actionExists, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
3
|
-
import { AXPPlatformScope, AXPDataGenerator,
|
|
4
|
-
import { AXPSearchCommandProvider, createAllQueryView, createQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPFilterOperatorMiddlewareService, AXPSettingsService, AXPLockService, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
|
3
|
+
import { AXPPlatformScope, AXPDataGenerator, AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPDeviceService, resolvePlatformScopeKey, resolvePlatformScopeName } from '@acorex/platform/core';
|
|
4
|
+
import { AXPSearchCommandProvider, createAllQueryView, createQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPFilterOperatorMiddlewareService, AXPSettingsService, AXPLockService, UploadFromComputerActionProvider, AXP_FILE_ACTION_PROVIDER, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, inject, Injector, NgModule, ChangeDetectionStrategy, Component, signal, viewChild, computed, input, effect, ViewEncapsulation, untracked, HostListener } from '@angular/core';
|
|
7
7
|
import * as i3$3 from '@acorex/core/translation';
|
|
@@ -5439,7 +5439,7 @@ class AXMDocumentManagerService {
|
|
|
5439
5439
|
return ext && ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'pdf'].includes(ext);
|
|
5440
5440
|
});
|
|
5441
5441
|
// Fetch documents with null fileId.source.value
|
|
5442
|
-
const documentsWithNullFileId = filteredDocuments.filter((doc) =>
|
|
5442
|
+
const documentsWithNullFileId = filteredDocuments.filter((doc) => !doc.fileId.source.value);
|
|
5443
5443
|
// Fetch missing documents and replace them in the array
|
|
5444
5444
|
if (documentsWithNullFileId.length > 0) {
|
|
5445
5445
|
const fetchedDocuments = await Promise.all(documentsWithNullFileId.map((doc) => this.documentService.getOne(doc.id)));
|
|
@@ -5453,7 +5453,7 @@ class AXMDocumentManagerService {
|
|
|
5453
5453
|
}
|
|
5454
5454
|
// Collect all fileIds that need to be fetched
|
|
5455
5455
|
const fileIds = filteredDocuments
|
|
5456
|
-
.filter((doc) => doc.fileId
|
|
5456
|
+
.filter((doc) => doc.fileId.source.value)
|
|
5457
5457
|
.map((doc) => doc.fileId.source.value);
|
|
5458
5458
|
// Fetch all file info at once (need URL for media viewer)
|
|
5459
5459
|
const fileInfosMap = new Map();
|
|
@@ -6697,9 +6697,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6697
6697
|
], template: "<!-- Breadcrumbs Section -->\n<div class=\"__breadcrumb ax-xs\">\n <!-- Desktop Breadcrumb -->\n @for (item of vm.currentPath(); track item.id; let i = $index;let last = $last) {\n <!-- Navigation Button -->\n <ax-button look=\"blank\" (onClick)=\"vm.navigateToFolder(item.id)\" [text]=\"item.name\" [disabled]=\"last\">\n @if(i === 0) {\n <ax-icon icon=\"fa-light fa-cloud\"></ax-icon>\n }@else {\n <ax-icon icon=\"fa-light fa-folder-closed\"></ax-icon>\n }\n </ax-button>\n <!-- Separator -->\n @if(!last) {\n <i class=\"far fa-chevron-right rtl:ax-rotate-180 fa-fw fa-xs ax-me-2\"></i>\n }\n <!-- End Navigation Button -->\n }\n</div>\n", styles: [":host{display:flex;width:100%;align-items:center}:host .__nav{display:flex;flex-direction:row;align-items:center;gap:.25rem;border-inline-end-width:1px;padding-inline-start:.25rem;padding-inline-end:.5rem}:host .__breadcrumb{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding-inline-start:.5rem;padding-inline-end:.25rem}:host .__breadcrumb .ax-state-disabled button,:host .__breadcrumb .ax-state-loading button{cursor:default!important}\n"] }]
|
|
6698
6698
|
}] });
|
|
6699
6699
|
|
|
6700
|
-
const
|
|
6700
|
+
const UploadFromDriveActionProvider = {
|
|
6701
6701
|
key: 'file-uploader.actions',
|
|
6702
|
-
priority:
|
|
6702
|
+
priority: 2,
|
|
6703
6703
|
execute: (payload) => {
|
|
6704
6704
|
const driveService = inject(AXMDocumentManagerService);
|
|
6705
6705
|
const fileStorageService = inject(AXPFileStorageService);
|
|
@@ -6712,7 +6712,7 @@ const UploadFromDriveHookProvider = {
|
|
|
6712
6712
|
global: true,
|
|
6713
6713
|
textKey: '@document-management:actions.choose-from-drive',
|
|
6714
6714
|
icon: 'fa-light fa-file-arrow-up',
|
|
6715
|
-
run: async (
|
|
6715
|
+
run: async (capabilities) => {
|
|
6716
6716
|
const result = await driveService.showChooseFileDialog(AXPPlatformScope.Tenant);
|
|
6717
6717
|
if (!result || result.length === 0) {
|
|
6718
6718
|
return;
|
|
@@ -6724,29 +6724,25 @@ const UploadFromDriveHookProvider = {
|
|
|
6724
6724
|
const dialogResult = await dialogService.confirm(dialogTitle, dialogMessage, 'primary', 'horizontal', false, 'cancel');
|
|
6725
6725
|
// Yes/Okay -> clone, No/Cancel -> by-reference
|
|
6726
6726
|
const attachmentType = dialogResult.result ? 'clone' : 'by-reference';
|
|
6727
|
-
// Add files
|
|
6728
|
-
|
|
6729
|
-
...(
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
})),
|
|
6734
|
-
]);
|
|
6727
|
+
// Add files with uploading status
|
|
6728
|
+
const initialFiles = result.map((item) => ({
|
|
6729
|
+
...(item.fileId ?? {}),
|
|
6730
|
+
status: 'uploading',
|
|
6731
|
+
}));
|
|
6732
|
+
capabilities.addFiles(initialFiles);
|
|
6735
6733
|
// Process files based on attachment type
|
|
6736
6734
|
for await (const item of result) {
|
|
6737
6735
|
if (item.type === 'folder') {
|
|
6738
6736
|
continue;
|
|
6739
6737
|
}
|
|
6740
|
-
const
|
|
6741
|
-
const
|
|
6742
|
-
if (
|
|
6738
|
+
const fileId = item.fileId?.id ?? '';
|
|
6739
|
+
const currentFile = capabilities.getFileById(fileId);
|
|
6740
|
+
if (!currentFile) {
|
|
6743
6741
|
continue;
|
|
6744
6742
|
}
|
|
6745
6743
|
if (attachmentType === 'by-reference') {
|
|
6746
6744
|
// By reference: just set documentId
|
|
6747
|
-
|
|
6748
|
-
updatedFiles[fileIndex] = {
|
|
6749
|
-
...updatedFiles[fileIndex],
|
|
6745
|
+
capabilities.updateFileById(fileId, {
|
|
6750
6746
|
status: 'attached',
|
|
6751
6747
|
source: {
|
|
6752
6748
|
kind: 'reference',
|
|
@@ -6755,33 +6751,27 @@ const UploadFromDriveHookProvider = {
|
|
|
6755
6751
|
type: 'document',
|
|
6756
6752
|
},
|
|
6757
6753
|
},
|
|
6758
|
-
};
|
|
6759
|
-
host.setValue(updatedFiles);
|
|
6754
|
+
});
|
|
6760
6755
|
}
|
|
6761
6756
|
else {
|
|
6762
6757
|
// Clone: get file info and create blob
|
|
6763
6758
|
try {
|
|
6764
|
-
const storageInfo = await fileStorageService.getInfo(
|
|
6759
|
+
const storageInfo = await fileStorageService.getInfo(fileId);
|
|
6765
6760
|
if (!storageInfo) {
|
|
6766
|
-
|
|
6767
|
-
host.setValue(currentFiles.filter((f) => f.id !== (item.fileId?.id ?? '')));
|
|
6761
|
+
capabilities.removeFile(currentFile);
|
|
6768
6762
|
continue;
|
|
6769
6763
|
}
|
|
6770
|
-
|
|
6771
|
-
updatedFiles[fileIndex] = {
|
|
6772
|
-
...updatedFiles[fileIndex],
|
|
6764
|
+
capabilities.updateFileById(fileId, {
|
|
6773
6765
|
id: AXPDataGenerator.uuid(),
|
|
6774
6766
|
status: 'attached',
|
|
6775
6767
|
source: {
|
|
6776
6768
|
kind: 'blob',
|
|
6777
6769
|
value: new Blob([storageInfo.binary], { type: storageInfo.mimeType }),
|
|
6778
6770
|
},
|
|
6779
|
-
};
|
|
6780
|
-
host.setValue(updatedFiles);
|
|
6771
|
+
});
|
|
6781
6772
|
}
|
|
6782
6773
|
catch {
|
|
6783
|
-
|
|
6784
|
-
host.setValue(currentFiles.filter((f) => f.id !== (item.fileId?.id ?? '')));
|
|
6774
|
+
capabilities.removeFile(currentFile);
|
|
6785
6775
|
}
|
|
6786
6776
|
}
|
|
6787
6777
|
}
|
|
@@ -6796,7 +6786,8 @@ class AXMDriveChooseModule {
|
|
|
6796
6786
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDriveChooseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6797
6787
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDriveChooseModule }); }
|
|
6798
6788
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDriveChooseModule, providers: [
|
|
6799
|
-
{ provide:
|
|
6789
|
+
{ provide: AXP_FILE_ACTION_PROVIDER, useValue: UploadFromComputerActionProvider, multi: true },
|
|
6790
|
+
{ provide: AXP_FILE_ACTION_PROVIDER, useValue: UploadFromDriveActionProvider, multi: true }
|
|
6800
6791
|
] }); }
|
|
6801
6792
|
}
|
|
6802
6793
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDriveChooseModule, decorators: [{
|
|
@@ -6804,7 +6795,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6804
6795
|
args: [{
|
|
6805
6796
|
imports: [],
|
|
6806
6797
|
providers: [
|
|
6807
|
-
{ provide:
|
|
6798
|
+
{ provide: AXP_FILE_ACTION_PROVIDER, useValue: UploadFromComputerActionProvider, multi: true },
|
|
6799
|
+
{ provide: AXP_FILE_ACTION_PROVIDER, useValue: UploadFromDriveActionProvider, multi: true }
|
|
6808
6800
|
]
|
|
6809
6801
|
}]
|
|
6810
6802
|
}] });
|