@volo/abp.ng.file-management 6.0.1 → 6.0.2
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/esm2020/lib/components/file-management-directory-tree/file-management-directory-tree.component.mjs +1 -1
- package/esm2020/lib/services/delete.service.mjs +6 -8
- package/fesm2015/volo-abp.ng.file-management.mjs +5 -7
- package/fesm2015/volo-abp.ng.file-management.mjs.map +1 -1
- package/fesm2020/volo-abp.ng.file-management.mjs +5 -7
- package/fesm2020/volo-abp.ng.file-management.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -84,7 +84,7 @@ export class FileManagementDirectoryTreeComponent {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
FileManagementDirectoryTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: FileManagementDirectoryTreeComponent, deps: [{ token: i1.DirectoryTreeService }, { token: i2.NavigatorService }, { token: i3.MoveService }, { token: i0.ChangeDetectorRef }, { token: i4.DeleteService }, { token: i5.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
FileManagementDirectoryTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: FileManagementDirectoryTreeComponent, selector: "abp-file-management-directory-tree", providers: [SubscriptionService], ngImport: i0, template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i7.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { kind: "directive", type: i7.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i7.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "
|
|
87
|
+
FileManagementDirectoryTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: FileManagementDirectoryTreeComponent, selector: "abp-file-management-directory-tree", providers: [SubscriptionService], ngImport: i0, template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i7.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { kind: "directive", type: i7.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i7.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver"] }, { kind: "directive", type: i8.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: i9.RenameModalComponent, selector: "abp-rename-modal", inputs: ["contentToRename"], outputs: ["contentToRenameChange"] }, { kind: "component", type: i10.CreateFolderModalComponent, selector: "abp-create-folder-modal", inputs: ["parentId"] }, { kind: "component", type: i11.MoveFileModalComponent, selector: "abp-move-file-modal", inputs: ["fileToMove", "oldParentId"] }, { kind: "pipe", type: i5.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: FileManagementDirectoryTreeComponent, decorators: [{
|
|
89
89
|
type: Component,
|
|
90
90
|
args: [{ selector: 'abp-file-management-directory-tree', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SubscriptionService], template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n" }]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Confirmation, ConfirmationService, ToasterService
|
|
1
|
+
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
3
|
import { DirectoryDescriptorService, FileDescriptorService, } from '@volo/abp.ng.file-management/proxy';
|
|
4
4
|
import { filter, switchMap, take, tap } from 'rxjs/operators';
|
|
@@ -16,16 +16,14 @@ export class DeleteService {
|
|
|
16
16
|
this.toaster = toaster;
|
|
17
17
|
}
|
|
18
18
|
deleteFolder(content) {
|
|
19
|
-
return this.delete('FileManagement::DirectoryDeleteConfirmationMessage', content, this.directoryService).pipe(tap(
|
|
19
|
+
return this.delete('FileManagement::DirectoryDeleteConfirmationMessage', content, this.directoryService).pipe(tap(_ => this.updateStream.patchStore({ deletedDirectory: content.id })));
|
|
20
20
|
}
|
|
21
21
|
deleteFile(content) {
|
|
22
|
-
return this.delete('FileManagement::FileDeleteConfirmationMessage', content, this.fileService).pipe(tap(
|
|
22
|
+
return this.delete('FileManagement::FileDeleteConfirmationMessage', content, this.fileService).pipe(tap(_ => this.updateStream.refreshContent()));
|
|
23
23
|
}
|
|
24
24
|
delete(message, content, service) {
|
|
25
|
-
return this.confirmationService
|
|
26
|
-
.
|
|
27
|
-
.pipe(filter((status) => status === Confirmation.Status.confirm), take(1), switchMap((_) => service.delete(content.id)), tap((_) => {
|
|
28
|
-
this.toaster.warn('FileManagement::SuccessfullyDeleted');
|
|
25
|
+
return this.confirmationService.warn(message, 'FileManagement::AreYouSure').pipe(filter(status => status === Confirmation.Status.confirm), take(1), switchMap(_ => service.delete(content.id)), tap(_ => {
|
|
26
|
+
this.toaster.success('FileManagement::SuccessfullyDeleted');
|
|
29
27
|
}));
|
|
30
28
|
}
|
|
31
29
|
}
|
|
@@ -34,4 +32,4 @@ DeleteService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", versio
|
|
|
34
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DeleteService, decorators: [{
|
|
35
33
|
type: Injectable
|
|
36
34
|
}], ctorParameters: function () { return [{ type: i1.ConfirmationService }, { type: i2.DirectoryDescriptorService }, { type: i2.FileDescriptorService }, { type: i3.UpdateStreamService }, { type: i1.ToasterService }]; } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9maWxlLW1hbmFnZW1lbnQvc3JjL2xpYi9zZXJ2aWNlcy9kZWxldGUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLG1CQUFtQixFQUFFLGNBQWMsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3pGLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUVMLDBCQUEwQixFQUMxQixxQkFBcUIsR0FDdEIsTUFBTSxvQ0FBb0MsQ0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6IERpcmVjdG9yeUNvbnRlbnREdG8pIHtcclxuICAgIHJldHVybiB0aGlzLmRlbGV0ZShcclxuICAgICAgJ0ZpbGVNYW5hZ2VtZW50OjpGaWxlRGVsZXRlQ29uZmlybWF0aW9uTWVzc2FnZScsXHJcbiAgICAgIGNvbnRlbnQsXHJcbiAgICAgIHRoaXMuZmlsZVNlcnZpY2UsXHJcbiAgICApLnBpcGUodGFwKF8gPT4gdGhpcy51cGRhdGVTdHJlYW0ucmVmcmVzaENvbnRlbnQoKSkpO1xyXG4gIH1cclxuXHJcbiAgcHJpdmF0ZSBkZWxldGUoXHJcbiAgICBtZXNzYWdlOiBzdHJpbmcsXHJcbiAgICBjb250ZW50OiBEaXJlY3RvcnlDb250ZW50RHRvLFxyXG4gICAgc2VydmljZTogRGlyZWN0b3J5RGVzY3JpcHRvclNlcnZpY2UgfCBGaWxlRGVzY3JpcHRvclNlcnZpY2UsXHJcbiAgKSB7XHJcbiAgICByZXR1cm4gdGhpcy5jb25maXJtYXRpb25TZXJ2aWNlLndhcm4obWVzc2FnZSwgJ0ZpbGVNYW5hZ2VtZW50OjpBcmVZb3VTdXJlJykucGlwZShcclxuICAgICAgZmlsdGVyKHN0YXR1cyA9PiBzdGF0dXMgPT09IENvbmZpcm1hdGlvbi5TdGF0dXMuY29uZmlybSksXHJcbiAgICAgIHRha2UoMSksXHJcbiAgICAgIHN3aXRjaE1hcChfID0+IHNlcnZpY2UuZGVsZXRlKGNvbnRlbnQuaWQpKSxcclxuICAgICAgdGFwKF8gPT4ge1xyXG4gICAgICAgIHRoaXMudG9hc3Rlci5zdWNjZXNzKCdGaWxlTWFuYWdlbWVudDo6U3VjY2Vzc2Z1bGx5RGVsZXRlZCcpO1xyXG4gICAgICB9KSxcclxuICAgICk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -91,16 +91,14 @@ class DeleteService {
|
|
|
91
91
|
this.toaster = toaster;
|
|
92
92
|
}
|
|
93
93
|
deleteFolder(content) {
|
|
94
|
-
return this.delete('FileManagement::DirectoryDeleteConfirmationMessage', content, this.directoryService).pipe(tap(
|
|
94
|
+
return this.delete('FileManagement::DirectoryDeleteConfirmationMessage', content, this.directoryService).pipe(tap(_ => this.updateStream.patchStore({ deletedDirectory: content.id })));
|
|
95
95
|
}
|
|
96
96
|
deleteFile(content) {
|
|
97
|
-
return this.delete('FileManagement::FileDeleteConfirmationMessage', content, this.fileService).pipe(tap(
|
|
97
|
+
return this.delete('FileManagement::FileDeleteConfirmationMessage', content, this.fileService).pipe(tap(_ => this.updateStream.refreshContent()));
|
|
98
98
|
}
|
|
99
99
|
delete(message, content, service) {
|
|
100
|
-
return this.confirmationService
|
|
101
|
-
.
|
|
102
|
-
.pipe(filter((status) => status === Confirmation.Status.confirm), take(1), switchMap((_) => service.delete(content.id)), tap((_) => {
|
|
103
|
-
this.toaster.warn('FileManagement::SuccessfullyDeleted');
|
|
100
|
+
return this.confirmationService.warn(message, 'FileManagement::AreYouSure').pipe(filter(status => status === Confirmation.Status.confirm), take(1), switchMap(_ => service.delete(content.id)), tap(_ => {
|
|
101
|
+
this.toaster.success('FileManagement::SuccessfullyDeleted');
|
|
104
102
|
}));
|
|
105
103
|
}
|
|
106
104
|
}
|
|
@@ -1298,7 +1296,7 @@ class FileManagementDirectoryTreeComponent {
|
|
|
1298
1296
|
}
|
|
1299
1297
|
}
|
|
1300
1298
|
FileManagementDirectoryTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: FileManagementDirectoryTreeComponent, deps: [{ token: DirectoryTreeService }, { token: NavigatorService }, { token: MoveService }, { token: i0.ChangeDetectorRef }, { token: DeleteService }, { token: i1$1.SubscriptionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1301
|
-
FileManagementDirectoryTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: FileManagementDirectoryTreeComponent, selector: "abp-file-management-directory-tree", providers: [SubscriptionService], ngImport: i0, template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i7.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { kind: "directive", type: i7.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i7.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "
|
|
1299
|
+
FileManagementDirectoryTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: FileManagementDirectoryTreeComponent, selector: "abp-file-management-directory-tree", providers: [SubscriptionService], ngImport: i0, template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "directive", type: i7.TreeNodeTemplateDirective, selector: "[abpTreeNodeTemplate],[abp-tree-node-template]" }, { kind: "directive", type: i7.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i7.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver"] }, { kind: "directive", type: i8$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["disabled"] }, { kind: "component", type: RenameModalComponent, selector: "abp-rename-modal", inputs: ["contentToRename"], outputs: ["contentToRenameChange"] }, { kind: "component", type: CreateFolderModalComponent, selector: "abp-create-folder-modal", inputs: ["parentId"] }, { kind: "component", type: MoveFileModalComponent, selector: "abp-move-file-modal", inputs: ["fileToMove", "oldParentId"] }, { kind: "pipe", type: i1$1.LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1302
1300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: FileManagementDirectoryTreeComponent, decorators: [{
|
|
1303
1301
|
type: Component,
|
|
1304
1302
|
args: [{ selector: 'abp-file-management-directory-tree', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SubscriptionService], template: "<div>\r\n <ng-container *ngIf=\"directories\">\r\n <abp-tree\r\n [(nodes)]=\"directories\"\r\n [(expandedKeys)]=\"service.extendedKeys\"\r\n [draggable]=\"true\"\r\n (dropOver)=\"onDrop($event)\"\r\n (selectedNodeChange)=\"onNodeClick($event)\"\r\n >\r\n <ng-template abp-tree-expanded-icon-template let-node>\r\n <i\r\n class=\"far\"\r\n style=\"line-height: 30px\"\r\n [class.fa-plus-square]=\"!node.isExpanded\"\r\n [class.fa-minus-square]=\"node.isExpanded\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n </ng-template>\r\n\r\n <ng-template abp-tree-node-template let-node\r\n ><i class=\"fa fa-folder text-primary me-2\" aria-hidden=\"true\"></i\r\n ><ng-container *ngIf=\"node.origin.entity.isRoot; else leafNode\">\r\n {{ \"FileManagement::AllFiles\" | abpLocalization }}\r\n </ng-container>\r\n <ng-template #leafNode>{{ node.title }}</ng-template></ng-template\r\n >\r\n\r\n <ng-container *abpPermission=\"contextMenuPolicy\">\r\n <ng-template #menu let-node>\r\n <li\r\n *abpPermission=\"createPolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onCreate(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::CreateFolder\" | abpLocalization }}\r\n </li>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onRename(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Rename\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"updatePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onMove(node)\"\r\n >\r\n {{ \"FileManagement::Move\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"node.origin.entity.id !== rootId\">\r\n <li\r\n *abpPermission=\"deletePolicy\"\r\n class=\"pointer\"\r\n ngbDropdownItem\r\n (click)=\"onDelete(node.origin.entity)\"\r\n >\r\n {{ \"FileManagement::Delete\" | abpLocalization }}\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </abp-tree>\r\n </ng-container>\r\n</div>\r\n\r\n<abp-create-folder-modal\r\n [(visible)]=\"createModalVisible\"\r\n [parentId]=\"createModalParentId\"\r\n></abp-create-folder-modal>\r\n\r\n<abp-rename-modal\r\n [(visible)]=\"renameModalVisible\"\r\n [(contentToRename)]=\"contentToRename\"\r\n></abp-rename-modal>\r\n\r\n<abp-move-file-modal\r\n [(visible)]=\"moveModalVisible\"\r\n (contentSaved)=\"afterFolderMoved()\"\r\n [fileToMove]=\"folderToMove\"\r\n [oldParentId]=\"parentOfFolderToMove\"\r\n>\r\n</abp-move-file-modal>\r\n" }]
|