@volo/abp.ng.file-management 5.0.0-beta.3 → 5.0.1

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.
Files changed (39) hide show
  1. package/README.md +3 -24
  2. package/bundles/volo-abp.ng.file-management-common.umd.js +1 -1
  3. package/bundles/volo-abp.ng.file-management-config.umd.js +1 -1
  4. package/bundles/volo-abp.ng.file-management-proxy.umd.js +1 -1
  5. package/bundles/volo-abp.ng.file-management.umd.js +2 -2
  6. package/esm2015/common/tokens/features.token.js +1 -1
  7. package/esm2015/config/file-management-config.module.js +1 -1
  8. package/esm2015/lib/components/file-management-breadcrumb/file-management-breadcrumb.component.js +1 -1
  9. package/esm2015/lib/components/file-management-buttons/file-management-buttons.component.js +1 -1
  10. package/esm2015/lib/components/file-management-directory-tree/file-management-directory-tree.component.js +1 -1
  11. package/esm2015/lib/components/file-management-folder-content/file-management-folder-content.component.js +1 -1
  12. package/esm2015/lib/components/file-management-folder-filter/file-management-folder-filter.component.js +1 -1
  13. package/esm2015/lib/components/file-management-folder-panel/file-management-folder-panel.component.js +1 -1
  14. package/esm2015/lib/file-management-routing.module.js +1 -1
  15. package/esm2015/lib/file-management.component.js +1 -1
  16. package/esm2015/lib/file-management.initializer.js +1 -1
  17. package/esm2015/lib/file-management.module.js +1 -1
  18. package/esm2015/lib/guards/file-management.guard.js +1 -1
  19. package/esm2015/lib/modals/base-modal.component.js +1 -1
  20. package/esm2015/lib/modals/create-folder-modal/create-folder-modal.component.js +1 -1
  21. package/esm2015/lib/modals/create-folder-modal/create-folder-modal.service.js +1 -1
  22. package/esm2015/lib/modals/move-file-modal/move-file-modal.component.js +1 -1
  23. package/esm2015/lib/modals/move-file-modal/move-file-modal.service.js +1 -1
  24. package/esm2015/lib/modals/rename-modal/rename-modal.component.js +1 -1
  25. package/esm2015/lib/modals/rename-modal/rename-modal.service.js +1 -1
  26. package/esm2015/lib/services/delete.service.js +1 -1
  27. package/esm2015/lib/services/directory-tree.service.js +1 -1
  28. package/esm2015/lib/services/download.service.js +1 -1
  29. package/esm2015/lib/services/move.service.js +1 -1
  30. package/esm2015/lib/services/navigator.service.js +1 -1
  31. package/esm2015/lib/services/update-stream.service.js +1 -1
  32. package/esm2015/lib/services/upload.service.js +1 -1
  33. package/esm2015/proxy/lib/proxy/file-management/directories/directory-descriptor.service.js +1 -1
  34. package/esm2015/proxy/lib/proxy/file-management/files/file-descriptor.service.js +1 -1
  35. package/fesm2015/volo-abp.ng.file-management-config.js +4 -4
  36. package/fesm2015/volo-abp.ng.file-management-proxy.js +8 -8
  37. package/fesm2015/volo-abp.ng.file-management.js +153 -153
  38. package/lib/guards/file-management.guard.d.ts +2 -2
  39. package/package.json +7 -6
@@ -1 +1 @@
1
- import{Component,ChangeDetectionStrategy,Input}from"@angular/core";import{Validators}from"@angular/forms";import{CreateFolderModalService}from"./create-folder-modal.service";import{BaseModalComponent}from"../base-modal.component";import*as i0 from"@angular/core";import*as i1 from"@angular/forms";import*as i2 from"./create-folder-modal.service";import*as i3 from"../base-modal.component";import*as i4 from"@ngx-validate/core";import*as i5 from"@abp/ng.core";export class CreateFolderModalComponent extends BaseModalComponent{constructor(e,o){super(),this.fb=e,this.service=o,this.form=this.fb.group({name:["",Validators.required]})}shouldSave(){return this.form.valid}saveAction(){return this.service.create(this.form.controls.name.value,this.parentId)}clear(){this.form.reset()}}CreateFolderModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:CreateFolderModalComponent,deps:[{token:i1.FormBuilder},{token:i2.CreateFolderModalService}],target:i0.ɵɵFactoryTarget.Component}),CreateFolderModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:CreateFolderModalComponent,selector:"abp-create-folder-modal",inputs:{parentId:"parentId"},providers:[CreateFolderModalService],usesInheritance:!0,ngImport:i0,template:'<abp-file-management-modal title="CreateFolder" [parent]="self">\n <form [formGroup]="form" (keyup.enter)="save()">\n <div class="form-group">\n <label for="createFolderInput"\n >{{ "FileManagement::Name" | abpLocalization }} *</label\n >\n <input\n formControlName="name"\n type="text"\n class="form-control"\n id="createFolderInput"\n />\n </div>\n </form>\n</abp-file-management-modal>\n',components:[{type:i3.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]}],directives:[{type:i1.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{type:i1.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{type:i1.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{type:i4.ValidationGroupDirective,selector:"[formGroup],[formGroupName]",inputs:["blueprints","errorTemplate","invalidClasses","mapErrorsFn","skipValidation","targetSelector","validateOnSubmit"]},{type:i1.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{type:i1.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{type:i1.FormControlName,selector:"[formControlName]",inputs:["disabled","formControlName","ngModel"],outputs:["ngModelChange"]},{type:i4.ValidationDirective,selector:"[formControl],[formControlName]",inputs:["blueprints","errorTemplate","invalidClasses","mapErrorsFn","skipValidation","targetSelector","validateOnSubmit"]}],pipes:{abpLocalization:i5.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:CreateFolderModalComponent,decorators:[{type:Component,args:[{selector:"abp-create-folder-modal",templateUrl:"./create-folder-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[CreateFolderModalService]}]}],ctorParameters:function(){return[{type:i1.FormBuilder},{type:i2.CreateFolderModalService}]},propDecorators:{parentId:[{type:Input}]}});
1
+ import{Component,ChangeDetectionStrategy,Input}from"@angular/core";import{FormBuilder,Validators}from"@angular/forms";import{CreateFolderModalService}from"./create-folder-modal.service";import{BaseModalComponent}from"../base-modal.component";import*as i0 from"@angular/core";import*as i1 from"@angular/forms";import*as i2 from"./create-folder-modal.service";import*as i3 from"../base-modal.component";import*as i4 from"@ngx-validate/core";import*as i5 from"@abp/ng.core";export class CreateFolderModalComponent extends BaseModalComponent{constructor(e,o){super(),this.fb=e,this.service=o,this.form=this.fb.group({name:["",Validators.required]})}shouldSave(){return this.form.valid}saveAction(){return this.service.create(this.form.controls.name.value,this.parentId)}clear(){this.form.reset()}}CreateFolderModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:CreateFolderModalComponent,deps:[{token:i1.FormBuilder},{token:i2.CreateFolderModalService}],target:i0.ɵɵFactoryTarget.Component}),CreateFolderModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.0",type:CreateFolderModalComponent,selector:"abp-create-folder-modal",inputs:{parentId:"parentId"},providers:[CreateFolderModalService],usesInheritance:!0,ngImport:i0,template:'<abp-file-management-modal title="CreateFolder" [parent]="self">\r\n <form [formGroup]="form" (keyup.enter)="save()">\r\n <div class="form-group">\r\n <label for="createFolderInput"\r\n >{{ "FileManagement::Name" | abpLocalization }} *</label\r\n >\r\n <input\r\n formControlName="name"\r\n type="text"\r\n class="form-control"\r\n id="createFolderInput"\r\n />\r\n </div>\r\n </form>\r\n</abp-file-management-modal>\r\n',components:[{type:i3.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]}],directives:[{type:i1.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{type:i1.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{type:i1.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{type:i4.ValidationGroupDirective,selector:"[formGroup],[formGroupName]",exportAs:["validationGroup"]},{type:i1.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{type:i1.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{type:i1.FormControlName,selector:"[formControlName]",inputs:["disabled","formControlName","ngModel"],outputs:["ngModelChange"]},{type:i4.ValidationDirective,selector:"[formControl],[formControlName]",exportAs:["validationDirective"]}],pipes:{abpLocalization:i5.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:CreateFolderModalComponent,decorators:[{type:Component,args:[{selector:"abp-create-folder-modal",templateUrl:"./create-folder-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[CreateFolderModalService]}]}],ctorParameters:function(){return[{type:i1.FormBuilder},{type:i2.CreateFolderModalService}]},propDecorators:{parentId:[{type:Input}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import{tap}from"rxjs/operators";import{mapRootIdToEmpty}from"../../services/directory-tree.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";export class CreateFolderModalService{constructor(e,r){this.service=e,this.updateStream=r}create(e,r){const t=mapRootIdToEmpty(r||this.updateStream.currentDirectory);return this.service.create({name:e,parentId:mapRootIdToEmpty(t)}).pipe(tap(e=>this.updateStream.patchStore({createdDirectory:t})))}}CreateFolderModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:CreateFolderModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),CreateFolderModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:CreateFolderModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:CreateFolderModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.UpdateStreamService}]}});
1
+ import{Injectable}from"@angular/core";import{DirectoryDescriptorService}from"@volo/abp.ng.file-management/proxy";import{tap}from"rxjs/operators";import{mapRootIdToEmpty}from"../../services/directory-tree.service";import{UpdateStreamService}from"../../services/update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";export class CreateFolderModalService{constructor(e,r){this.service=e,this.updateStream=r}create(e,r){const t=mapRootIdToEmpty(r||this.updateStream.currentDirectory);return this.service.create({name:e,parentId:mapRootIdToEmpty(t)}).pipe(tap(e=>this.updateStream.patchStore({createdDirectory:t})))}}CreateFolderModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:CreateFolderModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),CreateFolderModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:CreateFolderModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:CreateFolderModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.UpdateStreamService}]}});
@@ -1 +1 @@
1
- import{ListService}from"@abp/ng.core";import{ChangeDetectionStrategy,Component,Input}from"@angular/core";import{BaseModalComponent}from"../base-modal.component";import{MoveFileModalService}from"./move-file-modal.service";import*as i0 from"@angular/core";import*as i1 from"./move-file-modal.service";import*as i2 from"../base-modal.component";import*as i3 from"../../components/file-management-breadcrumb/file-management-breadcrumb.component";import*as i4 from"@swimlane/ngx-datatable";import*as i5 from"@abp/ng.theme.shared";import*as i6 from"@abp/ng.core";import*as i7 from"@angular/common";export class MoveFileModalComponent extends BaseModalComponent{constructor(e){super(),this.service=e}ngOnChanges({visible:e}){e.currentValue&&this.service.reset()}onBreadcrumbClick(e){this.service.goTo(e)}saveAction(){return this.fileToMove.isDirectory?this.service.moveFolder(this.fileToMove,this.oldParentId):this.service.move(this.fileToMove)}}MoveFileModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveFileModalComponent,deps:[{token:i1.MoveFileModalService}],target:i0.ɵɵFactoryTarget.Component}),MoveFileModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:MoveFileModalComponent,selector:"abp-move-file-modal",inputs:{fileToMove:"fileToMove",oldParentId:"oldParentId"},providers:[MoveFileModalService,ListService],usesInheritance:!0,usesOnChanges:!0,ngImport:i0,template:'<abp-file-management-modal title="Move" [parent]="self">\n <span class="d-block p-2">{{\n "FileManagement::MoveToUnder" | abpLocalization\n }}</span>\n <abp-file-management-breadcrumb\n [navigatedFolders]="service.breadcrumbs$ | async"\n rootBreadcrumbName="FileManagement::Root"\n (breadcrumbClick)="onBreadcrumbClick($event)"\n ></abp-file-management-breadcrumb>\n\n <ngx-datatable\n [rows]="service.directoryContent$ | async"\n default\n [messages]="{ emptyMessage: \'FileManagement::MoveHere\' | abpLocalization }"\n >\n <ngx-datatable-column\n [sortable]="true"\n [name]="\'FileManagement::Name\' | abpLocalization"\n >\n <ng-template let-row="row" let-i="index" ngx-datatable-cell-template>\n <div (click)="service.goTo(row)" class="pointer">\n <i class="fa fa-folder text-primary me-1"></i> {{ row.name }}\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n</abp-file-management-modal>\n',components:[{type:i2.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]},{type:i3.FileManagementBreadcrumbComponent,selector:"abp-file-management-breadcrumb",inputs:["rootBreadcrumbName","navigatedFolders"],outputs:["breadcrumbClick"]},{type:i4.DatatableComponent,selector:"ngx-datatable",inputs:["selected","scrollbarV","scrollbarH","rowHeight","columnMode","headerHeight","footerHeight","externalPaging","externalSorting","loadingIndicator","reorderable","swapColumns","sortType","sorts","cssClasses","messages","groupExpansionDefault","selectAllRowsOnPage","virtualization","summaryRow","summaryHeight","summaryPosition","rowIdentity","rows","groupedRows","groupRowsBy","columns","limit","count","offset","targetMarkerTemplate","selectionType","rowClass","selectCheck","displayCheck","trackByProp","treeFromRelation","treeToRelation"],outputs:["scroll","activate","select","sort","page","reorder","resize","tableContextmenu","treeAction"]}],directives:[{type:i5.NgxDatatableDefaultDirective,selector:"ngx-datatable[default]",inputs:["class"],exportAs:["ngxDatatableDefault"]},{type:i4.DataTableColumnDirective,selector:"ngx-datatable-column",inputs:["name","prop","frozenLeft","frozenRight","flexGrow","resizeable","comparator","pipe","sortable","draggable","canAutoResize","minWidth","width","maxWidth","checkboxable","headerCheckboxable","headerClass","cellClass","isTreeColumn","treeLevelIndent","summaryFunc","summaryTemplate","cellTemplate","headerTemplate","treeToggleTemplate"]},{type:i4.DataTableColumnCellDirective,selector:"[ngx-datatable-cell-template]"}],pipes:{abpLocalization:i6.LocalizationPipe,async:i7.AsyncPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveFileModalComponent,decorators:[{type:Component,args:[{selector:"abp-move-file-modal",templateUrl:"./move-file-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[MoveFileModalService,ListService]}]}],ctorParameters:function(){return[{type:i1.MoveFileModalService}]},propDecorators:{fileToMove:[{type:Input}],oldParentId:[{type:Input}]}});
1
+ import{ListService}from"@abp/ng.core";import{ChangeDetectionStrategy,Component,Input}from"@angular/core";import{BaseModalComponent}from"../base-modal.component";import{MoveFileModalService}from"./move-file-modal.service";import*as i0 from"@angular/core";import*as i1 from"./move-file-modal.service";import*as i2 from"../base-modal.component";import*as i3 from"../../components/file-management-breadcrumb/file-management-breadcrumb.component";import*as i4 from"@swimlane/ngx-datatable";import*as i5 from"@abp/ng.theme.shared";import*as i6 from"@abp/ng.core";import*as i7 from"@angular/common";export class MoveFileModalComponent extends BaseModalComponent{constructor(e){super(),this.service=e}ngOnChanges({visible:e}){e.currentValue&&this.service.reset()}onBreadcrumbClick(e){this.service.goTo(e)}saveAction(){return this.fileToMove.isDirectory?this.service.moveFolder(this.fileToMove,this.oldParentId):this.service.move(this.fileToMove)}}MoveFileModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveFileModalComponent,deps:[{token:i1.MoveFileModalService}],target:i0.ɵɵFactoryTarget.Component}),MoveFileModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.0",type:MoveFileModalComponent,selector:"abp-move-file-modal",inputs:{fileToMove:"fileToMove",oldParentId:"oldParentId"},providers:[MoveFileModalService,ListService],usesInheritance:!0,usesOnChanges:!0,ngImport:i0,template:'<abp-file-management-modal title="Move" [parent]="self">\r\n <span class="d-block p-2">{{\r\n "FileManagement::MoveToUnder" | abpLocalization\r\n }}</span>\r\n <abp-file-management-breadcrumb\r\n [navigatedFolders]="service.breadcrumbs$ | async"\r\n rootBreadcrumbName="FileManagement::Root"\r\n (breadcrumbClick)="onBreadcrumbClick($event)"\r\n ></abp-file-management-breadcrumb>\r\n\r\n <ngx-datatable\r\n [rows]="service.directoryContent$ | async"\r\n default\r\n [messages]="{ emptyMessage: \'FileManagement::MoveHere\' | abpLocalization }"\r\n >\r\n <ngx-datatable-column\r\n [sortable]="true"\r\n [name]="\'FileManagement::Name\' | abpLocalization"\r\n >\r\n <ng-template let-row="row" let-i="index" ngx-datatable-cell-template>\r\n <div (click)="service.goTo(row)" class="pointer">\r\n <i class="fa fa-folder text-primary me-1"></i> {{ row.name }}\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n</abp-file-management-modal>\r\n',components:[{type:i2.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]},{type:i3.FileManagementBreadcrumbComponent,selector:"abp-file-management-breadcrumb",inputs:["rootBreadcrumbName","navigatedFolders"],outputs:["breadcrumbClick"]},{type:i4.DatatableComponent,selector:"ngx-datatable",inputs:["selected","scrollbarV","scrollbarH","rowHeight","columnMode","headerHeight","footerHeight","externalPaging","externalSorting","loadingIndicator","reorderable","swapColumns","sortType","sorts","cssClasses","messages","groupExpansionDefault","selectAllRowsOnPage","virtualization","summaryRow","summaryHeight","summaryPosition","rowIdentity","rows","groupedRows","groupRowsBy","columns","limit","count","offset","targetMarkerTemplate","selectionType","rowClass","selectCheck","displayCheck","trackByProp","treeFromRelation","treeToRelation"],outputs:["scroll","activate","select","sort","page","reorder","resize","tableContextmenu","treeAction"]}],directives:[{type:i5.NgxDatatableDefaultDirective,selector:"ngx-datatable[default]",inputs:["class"],exportAs:["ngxDatatableDefault"]},{type:i4.DataTableColumnDirective,selector:"ngx-datatable-column",inputs:["name","prop","frozenLeft","frozenRight","flexGrow","resizeable","comparator","pipe","sortable","draggable","canAutoResize","minWidth","width","maxWidth","checkboxable","headerCheckboxable","headerClass","cellClass","isTreeColumn","treeLevelIndent","summaryFunc","summaryTemplate","cellTemplate","headerTemplate","treeToggleTemplate"]},{type:i4.DataTableColumnCellDirective,selector:"[ngx-datatable-cell-template]"}],pipes:{abpLocalization:i6.LocalizationPipe,async:i7.AsyncPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveFileModalComponent,decorators:[{type:Component,args:[{selector:"abp-move-file-modal",templateUrl:"./move-file-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[MoveFileModalService,ListService]}]}],ctorParameters:function(){return[{type:i1.MoveFileModalService}]},propDecorators:{fileToMove:[{type:Input}],oldParentId:[{type:Input}]}});
@@ -1 +1 @@
1
- import{InternalStore}from"@abp/ng.core";import{Injectable}from"@angular/core";import{tap}from"rxjs/operators";import{mapRootIdToEmpty,ROOT_NODE}from"../../services/directory-tree.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";import*as i3 from"@abp/ng.theme.shared";import*as i4 from"../../services/move.service";import*as i5 from"../../services/navigator.service";export class MoveFileModalService{constructor(e,t,r,i,o,s){this.service=e,this.fileService=t,this.updateStream=r,this.toaster=i,this.moveService=o,this.navigatorService=s,this.directoryContentStore=new InternalStore([]),this.directoryContent$=this.directoryContentStore.sliceState(e=>e),this.breadcrumbStore=new InternalStore([ROOT_NODE]),this.breadcrumbs$=this.breadcrumbStore.sliceState(e=>e)}reset(){this.breadcrumbStore.reset(),this.directoryContentStore.reset(),this.updateContent().subscribe()}updateContent(){return this.service.getList(this.getCurrentFolderIdForRequest()).pipe(tap(e=>this.directoryContentStore.patch(e.items)))}goTo(e){let t=this.getNavigatedFolders();const r=t.findIndex(t=>t.id===e.id);t=r<0?[...t,e]:t.slice(0,r+1),this.breadcrumbStore.patch(t),this.updateContent().subscribe()}move(e){return this.fileService.move({id:e.id,newDirectoryId:this.getCurrentFolderIdForRequest()}).pipe(tap(e=>{this.updateStream.refreshContent(),this.toaster.success("FileManagement::SuccessfullyMoved")}))}moveFolder(e,t){return this.moveService.moveTo(e,this.getCurrentFolder(),t)}getCurrentFolder(){const e=this.getNavigatedFolders();return e[e.length-1]}getCurrentFolderIdForRequest(){var e;const t=this.getNavigatedFolders();return mapRootIdToEmpty(null===(e=t[t.length-1])||void 0===e?void 0:e.id)}getNavigatedFolders(){return this.breadcrumbStore.state}}MoveFileModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveFileModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i1.FileDescriptorService},{token:i2.UpdateStreamService},{token:i3.ToasterService},{token:i4.MoveService},{token:i5.NavigatorService}],target:i0.ɵɵFactoryTarget.Injectable}),MoveFileModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveFileModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveFileModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i1.FileDescriptorService},{type:i2.UpdateStreamService},{type:i3.ToasterService},{type:i4.MoveService},{type:i5.NavigatorService}]}});
1
+ import{InternalStore}from"@abp/ng.core";import{ToasterService}from"@abp/ng.theme.shared";import{Injectable}from"@angular/core";import{DirectoryDescriptorService,FileDescriptorService}from"@volo/abp.ng.file-management/proxy";import{tap}from"rxjs/operators";import{mapRootIdToEmpty,ROOT_NODE}from"../../services/directory-tree.service";import{MoveService}from"../../services/move.service";import{NavigatorService}from"../../services/navigator.service";import{UpdateStreamService}from"../../services/update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";import*as i3 from"@abp/ng.theme.shared";import*as i4 from"../../services/move.service";import*as i5 from"../../services/navigator.service";export class MoveFileModalService{constructor(e,r,t,i,o,s){this.service=e,this.fileService=r,this.updateStream=t,this.toaster=i,this.moveService=o,this.navigatorService=s,this.directoryContentStore=new InternalStore([]),this.directoryContent$=this.directoryContentStore.sliceState(e=>e),this.breadcrumbStore=new InternalStore([ROOT_NODE]),this.breadcrumbs$=this.breadcrumbStore.sliceState(e=>e)}reset(){this.breadcrumbStore.reset(),this.directoryContentStore.reset(),this.updateContent().subscribe()}updateContent(){return this.service.getList(this.getCurrentFolderIdForRequest()).pipe(tap(e=>this.directoryContentStore.patch(e.items)))}goTo(e){let r=this.getNavigatedFolders();const t=r.findIndex(r=>r.id===e.id);r=t<0?[...r,e]:r.slice(0,t+1),this.breadcrumbStore.patch(r),this.updateContent().subscribe()}move(e){return this.fileService.move({id:e.id,newDirectoryId:this.getCurrentFolderIdForRequest()}).pipe(tap(e=>{this.updateStream.refreshContent(),this.toaster.success("FileManagement::SuccessfullyMoved")}))}moveFolder(e,r){return this.moveService.moveTo(e,this.getCurrentFolder(),r)}getCurrentFolder(){const e=this.getNavigatedFolders();return e[e.length-1]}getCurrentFolderIdForRequest(){var e;const r=this.getNavigatedFolders();return mapRootIdToEmpty(null===(e=r[r.length-1])||void 0===e?void 0:e.id)}getNavigatedFolders(){return this.breadcrumbStore.state}}MoveFileModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveFileModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i1.FileDescriptorService},{token:i2.UpdateStreamService},{token:i3.ToasterService},{token:i4.MoveService},{token:i5.NavigatorService}],target:i0.ɵɵFactoryTarget.Injectable}),MoveFileModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveFileModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveFileModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i1.FileDescriptorService},{type:i2.UpdateStreamService},{type:i3.ToasterService},{type:i4.MoveService},{type:i5.NavigatorService}]}});
@@ -1 +1 @@
1
- import{ChangeDetectionStrategy,Component,EventEmitter,Input,Output}from"@angular/core";import{Validators}from"@angular/forms";import{BaseModalComponent}from"../base-modal.component";import{RenameModalService}from"./rename-modal.service";import*as i0 from"@angular/core";import*as i1 from"./rename-modal.service";import*as i2 from"@angular/forms";import*as i3 from"../base-modal.component";import*as i4 from"@ngx-validate/core";import*as i5 from"@abp/ng.core";export class RenameModalComponent extends BaseModalComponent{constructor(e,o){super(),this.service=e,this.fb=o,this.form=this.fb.group({name:["",Validators.required]}),this.contentToRenameChange=new EventEmitter}set contentToRename(e){this._contentToRename=e,this.form.controls.name.patchValue(null==e?void 0:e.name)}get contentToRename(){return this._contentToRename}ngOnInit(){}saveAction(){return this.service.rename(Object.assign(Object.assign({},this.contentToRename),this.form.value))}shouldSave(){return this.form.valid}clear(){this.form.reset(),this.contentToRename=null,this.contentToRenameChange.emit(this.contentToRename)}}RenameModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:RenameModalComponent,deps:[{token:i1.RenameModalService},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component}),RenameModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:RenameModalComponent,selector:"abp-rename-modal",inputs:{contentToRename:"contentToRename"},outputs:{contentToRenameChange:"contentToRenameChange"},providers:[RenameModalService],usesInheritance:!0,ngImport:i0,template:'<abp-file-management-modal title="Rename" [parent]="self">\n <form [formGroup]="form" (keyup.enter)="save()">\n <div class="form-group">\n <label for="renameFileInput"\n >{{ "FileManagement::Name" | abpLocalization }} *</label\n >\n <input\n formControlName="name"\n type="text"\n class="form-control"\n id="renameFileInput"\n />\n </div>\n </form>\n</abp-file-management-modal>\n',components:[{type:i3.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]}],directives:[{type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{type:i4.ValidationGroupDirective,selector:"[formGroup],[formGroupName]",inputs:["blueprints","errorTemplate","invalidClasses","mapErrorsFn","skipValidation","targetSelector","validateOnSubmit"]},{type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{type:i2.FormControlName,selector:"[formControlName]",inputs:["disabled","formControlName","ngModel"],outputs:["ngModelChange"]},{type:i4.ValidationDirective,selector:"[formControl],[formControlName]",inputs:["blueprints","errorTemplate","invalidClasses","mapErrorsFn","skipValidation","targetSelector","validateOnSubmit"]}],pipes:{abpLocalization:i5.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:RenameModalComponent,decorators:[{type:Component,args:[{selector:"abp-rename-modal",templateUrl:"./rename-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[RenameModalService]}]}],ctorParameters:function(){return[{type:i1.RenameModalService},{type:i2.FormBuilder}]},propDecorators:{contentToRename:[{type:Input}],contentToRenameChange:[{type:Output}]}});
1
+ import{ChangeDetectionStrategy,Component,EventEmitter,Input,Output}from"@angular/core";import{FormBuilder,Validators}from"@angular/forms";import{BaseModalComponent}from"../base-modal.component";import{RenameModalService}from"./rename-modal.service";import*as i0 from"@angular/core";import*as i1 from"./rename-modal.service";import*as i2 from"@angular/forms";import*as i3 from"../base-modal.component";import*as i4 from"@ngx-validate/core";import*as i5 from"@abp/ng.core";export class RenameModalComponent extends BaseModalComponent{constructor(e,o){super(),this.service=e,this.fb=o,this.form=this.fb.group({name:["",Validators.required]}),this.contentToRenameChange=new EventEmitter}set contentToRename(e){this._contentToRename=e,this.form.controls.name.patchValue(null==e?void 0:e.name)}get contentToRename(){return this._contentToRename}ngOnInit(){}saveAction(){return this.service.rename(Object.assign(Object.assign({},this.contentToRename),this.form.value))}shouldSave(){return this.form.valid}clear(){this.form.reset(),this.contentToRename=null,this.contentToRenameChange.emit(this.contentToRename)}}RenameModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:RenameModalComponent,deps:[{token:i1.RenameModalService},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component}),RenameModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.0",type:RenameModalComponent,selector:"abp-rename-modal",inputs:{contentToRename:"contentToRename"},outputs:{contentToRenameChange:"contentToRenameChange"},providers:[RenameModalService],usesInheritance:!0,ngImport:i0,template:'<abp-file-management-modal title="Rename" [parent]="self">\r\n <form [formGroup]="form" (keyup.enter)="save()">\r\n <div class="form-group">\r\n <label for="renameFileInput"\r\n >{{ "FileManagement::Name" | abpLocalization }} *</label\r\n >\r\n <input\r\n formControlName="name"\r\n type="text"\r\n class="form-control"\r\n id="renameFileInput"\r\n />\r\n </div>\r\n </form>\r\n</abp-file-management-modal>\r\n',components:[{type:i3.BaseModalComponent,selector:"abp-file-management-modal",inputs:["title","size","visible","parent"],outputs:["visibleChange","contentSaved"]}],directives:[{type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{type:i4.ValidationGroupDirective,selector:"[formGroup],[formGroupName]",exportAs:["validationGroup"]},{type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{type:i2.FormControlName,selector:"[formControlName]",inputs:["disabled","formControlName","ngModel"],outputs:["ngModelChange"]},{type:i4.ValidationDirective,selector:"[formControl],[formControlName]",exportAs:["validationDirective"]}],pipes:{abpLocalization:i5.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:RenameModalComponent,decorators:[{type:Component,args:[{selector:"abp-rename-modal",templateUrl:"./rename-modal.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[RenameModalService]}]}],ctorParameters:function(){return[{type:i1.RenameModalService},{type:i2.FormBuilder}]},propDecorators:{contentToRename:[{type:Input}],contentToRenameChange:[{type:Output}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import{mapTo,tap}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";export class RenameModalService{constructor(e,r,i){this.directoryService=e,this.fileService=r,this.updateStream=i}rename(e){const r=e.id,i=e.name;return e.isDirectory?this.callService(this.directoryService,r,i).pipe(tap(e=>this.updateStream.patchStore({renamedDirectory:{id:r,name:i}}))):this.callService(this.fileService,r,i).pipe(tap(e=>this.updateStream.refreshContent()))}callService(e,r,i){return e.rename(r,{name:i}).pipe(mapTo(!0))}}RenameModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:RenameModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i1.FileDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),RenameModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:RenameModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:RenameModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i1.FileDescriptorService},{type:i2.UpdateStreamService}]}});
1
+ import{Injectable}from"@angular/core";import{DirectoryDescriptorService,FileDescriptorService}from"@volo/abp.ng.file-management/proxy";import{mapTo,tap}from"rxjs/operators";import{UpdateStreamService}from"../../services/update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"../../services/update-stream.service";export class RenameModalService{constructor(e,r,i){this.directoryService=e,this.fileService=r,this.updateStream=i}rename(e){const r=e.id,i=e.name;return e.isDirectory?this.callService(this.directoryService,r,i).pipe(tap(e=>this.updateStream.patchStore({renamedDirectory:{id:r,name:i}}))):this.callService(this.fileService,r,i).pipe(tap(e=>this.updateStream.refreshContent()))}callService(e,r,i){return e.rename(r,{name:i}).pipe(mapTo(!0))}}RenameModalService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:RenameModalService,deps:[{token:i1.DirectoryDescriptorService},{token:i1.FileDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),RenameModalService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:RenameModalService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:RenameModalService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i1.FileDescriptorService},{type:i2.UpdateStreamService}]}});
@@ -1 +1 @@
1
- import{Confirmation}from"@abp/ng.theme.shared";import{Injectable}from"@angular/core";import{filter,switchMap,take,tap}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.theme.shared";import*as i2 from"@volo/abp.ng.file-management/proxy";import*as i3 from"./update-stream.service";export class DeleteService{constructor(e,t,r,i,a){this.confirmationService=e,this.directoryService=t,this.fileService=r,this.updateStream=i,this.toaster=a}deleteFolder(e){return this.delete("FileManagement::DirectoryDeleteConfirmationMessage",e,this.directoryService).pipe(tap(t=>this.updateStream.patchStore({deletedDirectory:e.id})))}deleteFile(e){return this.delete("FileManagement::FileDeleteConfirmationMessage",e,this.fileService).pipe(tap(e=>this.updateStream.refreshContent()))}delete(e,t,r){return this.confirmationService.warn(e,"FileManagement::AreYouSure").pipe(filter(e=>e===Confirmation.Status.confirm),take(1),switchMap(e=>r.delete(t.id)),tap(e=>{this.toaster.warn("FileManagement::SuccessfullyDeleted")}))}}DeleteService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DeleteService,deps:[{token:i1.ConfirmationService},{token:i2.DirectoryDescriptorService},{token:i2.FileDescriptorService},{token:i3.UpdateStreamService},{token:i1.ToasterService}],target:i0.ɵɵFactoryTarget.Injectable}),DeleteService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DeleteService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DeleteService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.ConfirmationService},{type:i2.DirectoryDescriptorService},{type:i2.FileDescriptorService},{type:i3.UpdateStreamService},{type:i1.ToasterService}]}});
1
+ import{Confirmation,ConfirmationService,ToasterService}from"@abp/ng.theme.shared";import{Injectable}from"@angular/core";import{DirectoryDescriptorService,FileDescriptorService}from"@volo/abp.ng.file-management/proxy";import{filter,switchMap,take,tap}from"rxjs/operators";import{UpdateStreamService}from"./update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.theme.shared";import*as i2 from"@volo/abp.ng.file-management/proxy";import*as i3 from"./update-stream.service";export class DeleteService{constructor(e,r,t,i,o){this.confirmationService=e,this.directoryService=r,this.fileService=t,this.updateStream=i,this.toaster=o}deleteFolder(e){return this.delete("FileManagement::DirectoryDeleteConfirmationMessage",e,this.directoryService).pipe(tap(r=>this.updateStream.patchStore({deletedDirectory:e.id})))}deleteFile(e){return this.delete("FileManagement::FileDeleteConfirmationMessage",e,this.fileService).pipe(tap(e=>this.updateStream.refreshContent()))}delete(e,r,t){return this.confirmationService.warn(e,"FileManagement::AreYouSure").pipe(filter(e=>e===Confirmation.Status.confirm),take(1),switchMap(e=>t.delete(r.id)),tap(e=>{this.toaster.warn("FileManagement::SuccessfullyDeleted")}))}}DeleteService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DeleteService,deps:[{token:i1.ConfirmationService},{token:i2.DirectoryDescriptorService},{token:i2.FileDescriptorService},{token:i3.UpdateStreamService},{token:i1.ToasterService}],target:i0.ɵɵFactoryTarget.Injectable}),DeleteService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DeleteService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DeleteService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.ConfirmationService},{type:i2.DirectoryDescriptorService},{type:i2.FileDescriptorService},{type:i3.UpdateStreamService},{type:i1.ToasterService}]}});
@@ -1 +1 @@
1
- import{TreeAdapter}from"@abp/ng.components/tree";import{InternalStore}from"@abp/ng.core";import{Injectable}from"@angular/core";import{merge,Subscription}from"rxjs";import{map}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"./update-stream.service";export const ROOT_ID="ROOT_ID";export const ROOT_NODE={id:ROOT_ID,parentId:null,name:"All Files",isRoot:!0,hasChildren:!0};export function mapRootIdToEmpty(e){return e===ROOT_ID?null:e}export class DirectoryTreeService{constructor(e,t){this.directoryService=e,this.updateStream=t,this.store=new InternalStore([]),this.directoryTree$=this.store.sliceState(e=>e),this.subscription=new Subscription,this.extendedKeys=[],this.updateDirectories=(e=null)=>{this.collapseFolder(e),this.fetchDirectories(mapRootIdToEmpty(e)).subscribe(t=>{this.updateTree(e,t)})},this.handleMove=({oldParentId:e,newParentId:t})=>{this.treeHolder.handleUpdate({key:e,children:[]}),this.treeHolder.handleUpdate({key:t,children:[]}),this.updateDirectories(e),this.updateDirectories(t)},this.setupListener()}ngOnDestroy(){this.subscription.unsubscribe()}setupListener(){this.subscription.add(merge(this.updateStream.currentDirectory$,this.updateStream.directoryRename$.pipe(map(e=>this.getParentOf(e.id))),this.updateStream.directoryCreate$,this.updateStream.directoryDelete$.pipe(map(e=>this.getParentOf(e)))).subscribe(this.updateDirectories)),this.subscription.add(this.updateStream.directoryMove$.subscribe(this.handleMove))}findFullPathOf(e){let t=null==e?void 0:e.id;const r=this.treeHolder.getList(),i=[];for(;t;){const e=r.find(e=>e.id===t);e&&e.id!==ROOT_ID&&i.push(e),t=null==e?void 0:e.parentId}return i.concat(ROOT_NODE).map(e=>({id:e.id,name:e.name})).reverse()}getParentOf(e){const t=this.treeHolder.getList().find(t=>t.id===e);return(null==t?void 0:t.parentId)||ROOT_ID}getRootNode(){return ROOT_NODE}collapseFolder(e){const t=this.extendedKeys.indexOf(e);t>-1&&this.extendedKeys.splice(t,1)}updateTree(e,t){t&&(this.treeHolder&&e?this.onTreeExistAndNavigatedToNode(e,t):this.onTreeNotExistOrNavigatedToRoot(t),this.updateStore())}updateStore(){this.store.patch(this.treeHolder.getTree())}onTreeExistAndNavigatedToNode(e,t){this.treeHolder.handleUpdate({key:e,children:t}),this.extendedKeys=[...this.extendedKeys,e]}onTreeNotExistOrNavigatedToRoot(e){this.extendedKeys=[ROOT_ID],this.treeHolder=new TreeAdapter([ROOT_NODE,...e])}fetchDirectories(e){return this.directoryService.getList(e).pipe(map(e=>this.bindInitialListToRoot(e.items)))}bindInitialListToRoot(e){return e.map(e=>Object.assign(Object.assign({},e),{parentId:e.parentId||ROOT_ID}))}}DirectoryTreeService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryTreeService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),DirectoryTreeService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryTreeService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryTreeService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.UpdateStreamService}]}});
1
+ import{TreeAdapter}from"@abp/ng.components/tree";import{InternalStore}from"@abp/ng.core";import{Injectable}from"@angular/core";import{DirectoryDescriptorService}from"@volo/abp.ng.file-management/proxy";import{merge,Subscription}from"rxjs";import{map}from"rxjs/operators";import{UpdateStreamService}from"./update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"./update-stream.service";export const ROOT_ID="ROOT_ID";export const ROOT_NODE={id:ROOT_ID,parentId:null,name:"All Files",isRoot:!0,hasChildren:!0};export function mapRootIdToEmpty(e){return e===ROOT_ID?null:e}export class DirectoryTreeService{constructor(e,t){this.directoryService=e,this.updateStream=t,this.store=new InternalStore([]),this.directoryTree$=this.store.sliceState(e=>e),this.subscription=new Subscription,this.extendedKeys=[],this.updateDirectories=(e=null)=>{this.collapseFolder(e),this.fetchDirectories(mapRootIdToEmpty(e)).subscribe(t=>{this.updateTree(e,t)})},this.handleMove=({oldParentId:e,newParentId:t})=>{this.treeHolder.handleUpdate({key:e,children:[]}),this.treeHolder.handleUpdate({key:t,children:[]}),this.updateDirectories(e),this.updateDirectories(t)},this.setupListener()}ngOnDestroy(){this.subscription.unsubscribe()}setupListener(){this.subscription.add(merge(this.updateStream.currentDirectory$,this.updateStream.directoryRename$.pipe(map(e=>this.getParentOf(e.id))),this.updateStream.directoryCreate$,this.updateStream.directoryDelete$.pipe(map(e=>this.getParentOf(e)))).subscribe(this.updateDirectories)),this.subscription.add(this.updateStream.directoryMove$.subscribe(this.handleMove))}findFullPathOf(e){let t=null==e?void 0:e.id;const r=this.treeHolder.getList(),i=[];for(;t;){const e=r.find(e=>e.id===t);e&&e.id!==ROOT_ID&&i.push(e),t=null==e?void 0:e.parentId}return i.concat(ROOT_NODE).map(e=>({id:e.id,name:e.name})).reverse()}getParentOf(e){const t=this.treeHolder.getList().find(t=>t.id===e);return(null==t?void 0:t.parentId)||ROOT_ID}getRootNode(){return ROOT_NODE}collapseFolder(e){const t=this.extendedKeys.indexOf(e);t>-1&&this.extendedKeys.splice(t,1)}updateTree(e,t){t&&(this.treeHolder&&e?this.onTreeExistAndNavigatedToNode(e,t):this.onTreeNotExistOrNavigatedToRoot(t),this.updateStore())}updateStore(){this.store.patch(this.treeHolder.getTree())}onTreeExistAndNavigatedToNode(e,t){this.treeHolder.handleUpdate({key:e,children:t}),this.extendedKeys=[...this.extendedKeys,e]}onTreeNotExistOrNavigatedToRoot(e){this.extendedKeys=[ROOT_ID],this.treeHolder=new TreeAdapter([ROOT_NODE,...e])}fetchDirectories(e){return this.directoryService.getList(e).pipe(map(e=>this.bindInitialListToRoot(e.items)))}bindInitialListToRoot(e){return e.map(e=>Object.assign(Object.assign({},e),{parentId:e.parentId||ROOT_ID}))}}DirectoryTreeService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryTreeService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),DirectoryTreeService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryTreeService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryTreeService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.UpdateStreamService}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import{tap}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";import*as i2 from"@volo/abp.ng.file-management/proxy";export class DownloadService{constructor(e,r,i){this.restService=e,this.fileDescriptorService=r,this.environment=i,this.apiName="FileManagement"}get apiUrl(){return this.environment.getApiUrl(this.apiName)}downloadFile(e){return this.fileDescriptorService.getDownloadToken(e.id).pipe(tap(r=>{window.open(`${this.apiUrl}/api/file-management/file-descriptor/download/${e.id}?token=${r.token}`,"_self")}))}}DownloadService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DownloadService,deps:[{token:i1.RestService},{token:i2.FileDescriptorService},{token:i1.EnvironmentService}],target:i0.ɵɵFactoryTarget.Injectable}),DownloadService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DownloadService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DownloadService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.RestService},{type:i2.FileDescriptorService},{type:i1.EnvironmentService}]}});
1
+ import{EnvironmentService,RestService}from"@abp/ng.core";import{Injectable}from"@angular/core";import{FileDescriptorService}from"@volo/abp.ng.file-management/proxy";import{tap}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";import*as i2 from"@volo/abp.ng.file-management/proxy";export class DownloadService{constructor(e,r,i){this.restService=e,this.fileDescriptorService=r,this.environment=i,this.apiName="FileManagement"}get apiUrl(){return this.environment.getApiUrl(this.apiName)}downloadFile(e){return this.fileDescriptorService.getDownloadToken(e.id).pipe(tap(r=>{window.open(`${this.apiUrl}/api/file-management/file-descriptor/download/${e.id}?token=${r.token}`,"_self")}))}}DownloadService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DownloadService,deps:[{token:i1.RestService},{token:i2.FileDescriptorService},{token:i1.EnvironmentService}],target:i0.ɵɵFactoryTarget.Injectable}),DownloadService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DownloadService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DownloadService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.RestService},{type:i2.FileDescriptorService},{type:i1.EnvironmentService}]}});
@@ -1 +1 @@
1
- import{Confirmation}from"@abp/ng.theme.shared";import{Injectable}from"@angular/core";import{filter,switchMap,tap}from"rxjs/operators";import{mapRootIdToEmpty}from"./directory-tree.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"@abp/ng.theme.shared";import*as i3 from"./update-stream.service";export class MoveService{constructor(e,r,t,i){this.service=e,this.confirmation=r,this.updateStream=t,this.toaster=i}moveTo(e,r,t){const i=e.id,o=mapRootIdToEmpty(r.id);return this.confirmation.warn("FileManagement::DirectoryMoveConfirmMessage","FileManagement::AreYouSure",{messageLocalizationParams:[e.name,r.name]}).pipe(filter(e=>e===Confirmation.Status.confirm),switchMap(e=>this.service.move({id:i,newParentId:o})),tap(e=>{this.updateStream.patchStore({movedDirectory:{id:i,newParentId:o,oldParentId:t}}),this.toaster.success("FileManagement::SuccessfullyMoved")}))}}MoveService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.ConfirmationService},{token:i3.UpdateStreamService},{token:i2.ToasterService}],target:i0.ɵɵFactoryTarget.Injectable}),MoveService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:MoveService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.ConfirmationService},{type:i3.UpdateStreamService},{type:i2.ToasterService}]}});
1
+ import{Confirmation,ConfirmationService,ToasterService}from"@abp/ng.theme.shared";import{Injectable}from"@angular/core";import{DirectoryDescriptorService}from"@volo/abp.ng.file-management/proxy";import{filter,switchMap,tap}from"rxjs/operators";import{mapRootIdToEmpty}from"./directory-tree.service";import{UpdateStreamService}from"./update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@volo/abp.ng.file-management/proxy";import*as i2 from"@abp/ng.theme.shared";import*as i3 from"./update-stream.service";export class MoveService{constructor(e,r,t,i){this.service=e,this.confirmation=r,this.updateStream=t,this.toaster=i}moveTo(e,r,t){const i=e.id,o=mapRootIdToEmpty(r.id);return this.confirmation.warn("FileManagement::DirectoryMoveConfirmMessage","FileManagement::AreYouSure",{messageLocalizationParams:[e.name,r.name]}).pipe(filter(e=>e===Confirmation.Status.confirm),switchMap(e=>this.service.move({id:i,newParentId:o})),tap(e=>{this.updateStream.patchStore({movedDirectory:{id:i,newParentId:o,oldParentId:t}}),this.toaster.success("FileManagement::SuccessfullyMoved")}))}}MoveService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveService,deps:[{token:i1.DirectoryDescriptorService},{token:i2.ConfirmationService},{token:i3.UpdateStreamService},{token:i2.ToasterService}],target:i0.ɵɵFactoryTarget.Injectable}),MoveService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:MoveService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryDescriptorService},{type:i2.ConfirmationService},{type:i3.UpdateStreamService},{type:i2.ToasterService}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import{InternalStore}from"@abp/ng.core";import{Subscription}from"rxjs";import{mapRootIdToEmpty,ROOT_NODE}from"./directory-tree.service";import*as i0 from"@angular/core";import*as i1 from"./directory-tree.service";import*as i2 from"./update-stream.service";export class NavigatorService{constructor(e,t){this.directory=e,this.updateStream=t,this.navigatedFolders=[ROOT_NODE],this.store=new InternalStore(this.navigatedFolders),this.navigatedFolderPath$=this.store.sliceState(e=>e,(e,t)=>e===t),this.subscription=new Subscription,this.updateFolderName=e=>{const t=[...this.navigatedFolders];t.filter(t=>t.id===e.id).forEach(t=>t.name=e.name),this.next(t)},this.removeDeletedFolder=e=>{const t=this.findIndexOf(e);t>-1&&this.next(this.navigatedFolders.slice(0,t))},this.updateMovedFolder=({id:e,newParentId:t})=>{if(this.findIndexOf(e)>-1){const e=this.findIndexOf(t);let r=[];r=e>-1?this.navigatedFolders.slice(0,e+1):[this.directory.getRootNode()],this.next(r)}},this.setupListeners()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}goToFolder(e){this.updateCurrentFolderPath(e)}goToRoot(){this.goToFolder(null)}goUpFolder(){if(0!==this.navigatedFolders.length)if(1===this.navigatedFolders.length)this.goToRoot();else{const e=this.navigatedFolders[this.navigatedFolders.length-2];this.goToFolder(e)}}getCurrentFolder(){return this.navigatedFolders.length&&this.navigatedFolders[this.navigatedFolders.length-1]}getCurrentFolderId(){var e;return mapRootIdToEmpty(null===(e=this.getCurrentFolder())||void 0===e?void 0:e.id)}updateCurrentFolderPath(e){this.next([...this.directory.findFullPathOf(e)])}next(e){this.navigatedFolders=e,this.store.patch(this.navigatedFolders),this.updateStream.patchStore({currentDirectory:this.getCurrentFolderId()})}setupListeners(){this.subscription.add(this.updateStream.directoryRename$.subscribe(this.updateFolderName)),this.subscription.add(this.updateStream.directoryDelete$.subscribe(this.removeDeletedFolder)),this.subscription.add(this.updateStream.directoryMove$.subscribe(this.updateMovedFolder))}findIndexOf(e){return this.navigatedFolders.findIndex(t=>t.id===e)}}NavigatorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:NavigatorService,deps:[{token:i1.DirectoryTreeService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),NavigatorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:NavigatorService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:NavigatorService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryTreeService},{type:i2.UpdateStreamService}]}});
1
+ import{Injectable}from"@angular/core";import{InternalStore}from"@abp/ng.core";import{Subscription}from"rxjs";import{DirectoryTreeService,mapRootIdToEmpty,ROOT_NODE}from"./directory-tree.service";import{UpdateStreamService}from"./update-stream.service";import*as i0 from"@angular/core";import*as i1 from"./directory-tree.service";import*as i2 from"./update-stream.service";export class NavigatorService{constructor(e,t){this.directory=e,this.updateStream=t,this.navigatedFolders=[ROOT_NODE],this.store=new InternalStore(this.navigatedFolders),this.navigatedFolderPath$=this.store.sliceState(e=>e,(e,t)=>e===t),this.subscription=new Subscription,this.updateFolderName=e=>{const t=[...this.navigatedFolders];t.filter(t=>t.id===e.id).forEach(t=>t.name=e.name),this.next(t)},this.removeDeletedFolder=e=>{const t=this.findIndexOf(e);t>-1&&this.next(this.navigatedFolders.slice(0,t))},this.updateMovedFolder=({id:e,newParentId:t})=>{if(this.findIndexOf(e)>-1){const e=this.findIndexOf(t);let r=[];r=e>-1?this.navigatedFolders.slice(0,e+1):[this.directory.getRootNode()],this.next(r)}},this.setupListeners()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}goToFolder(e){this.updateCurrentFolderPath(e)}goToRoot(){this.goToFolder(null)}goUpFolder(){if(0!==this.navigatedFolders.length)if(1===this.navigatedFolders.length)this.goToRoot();else{const e=this.navigatedFolders[this.navigatedFolders.length-2];this.goToFolder(e)}}getCurrentFolder(){return this.navigatedFolders.length&&this.navigatedFolders[this.navigatedFolders.length-1]}getCurrentFolderId(){var e;return mapRootIdToEmpty(null===(e=this.getCurrentFolder())||void 0===e?void 0:e.id)}updateCurrentFolderPath(e){this.next([...this.directory.findFullPathOf(e)])}next(e){this.navigatedFolders=e,this.store.patch(this.navigatedFolders),this.updateStream.patchStore({currentDirectory:this.getCurrentFolderId()})}setupListeners(){this.subscription.add(this.updateStream.directoryRename$.subscribe(this.updateFolderName)),this.subscription.add(this.updateStream.directoryDelete$.subscribe(this.removeDeletedFolder)),this.subscription.add(this.updateStream.directoryMove$.subscribe(this.updateMovedFolder))}findIndexOf(e){return this.navigatedFolders.findIndex(t=>t.id===e)}}NavigatorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:NavigatorService,deps:[{token:i1.DirectoryTreeService},{token:i2.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Injectable}),NavigatorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:NavigatorService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:NavigatorService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.DirectoryTreeService},{type:i2.UpdateStreamService}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import{skip,filter}from"rxjs/operators";import{merge}from"rxjs";import{InternalStore}from"@abp/ng.core";import*as i0 from"@angular/core";export class UpdateStreamService{constructor(){this.store=new InternalStore({}),this.currentDirectory$=this.sliceState(e=>e.currentDirectory),this.directoryRename$=this.sliceState(e=>e.renamedDirectory),this.directoryDelete$=this.sliceState(e=>e.deletedDirectory),this.directoryCreate$=this.store.sliceUpdate(e=>e.createdDirectory),this.directoryMove$=this.sliceState(e=>e.movedDirectory),this.contentRefresh$=merge(this.sliceState(e=>e.content),this.currentDirectory$,this.directoryCreate$.pipe(filter(e=>e===this.currentDirectory)),this.directoryMove$.pipe(filter(({oldParentId:e,newParentId:t})=>e===this.currentDirectory||t===this.currentDirectory))),this.patchStore=e=>this.store.patch(e),this.refreshContent=()=>this.store.patch({content:(new Date).getTime()})}get currentDirectory(){return this.store.state.currentDirectory}sliceState(e){return this.store.sliceState(e).pipe(skip(1))}}UpdateStreamService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UpdateStreamService,deps:[],target:i0.ɵɵFactoryTarget.Injectable}),UpdateStreamService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UpdateStreamService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UpdateStreamService,decorators:[{type:Injectable}]});
1
+ import{Injectable}from"@angular/core";import{skip,filter}from"rxjs/operators";import{merge}from"rxjs";import{InternalStore}from"@abp/ng.core";import*as i0 from"@angular/core";export class UpdateStreamService{constructor(){this.store=new InternalStore({}),this.currentDirectory$=this.sliceState(e=>e.currentDirectory),this.directoryRename$=this.sliceState(e=>e.renamedDirectory),this.directoryDelete$=this.sliceState(e=>e.deletedDirectory),this.directoryCreate$=this.store.sliceUpdate(e=>e.createdDirectory),this.directoryMove$=this.sliceState(e=>e.movedDirectory),this.contentRefresh$=merge(this.sliceState(e=>e.content),this.currentDirectory$,this.directoryCreate$.pipe(filter(e=>e===this.currentDirectory)),this.directoryMove$.pipe(filter(({oldParentId:e,newParentId:t})=>e===this.currentDirectory||t===this.currentDirectory))),this.patchStore=e=>this.store.patch(e),this.refreshContent=()=>this.store.patch({content:(new Date).getTime()})}get currentDirectory(){return this.store.state.currentDirectory}sliceState(e){return this.store.sliceState(e).pipe(skip(1))}}UpdateStreamService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UpdateStreamService,deps:[],target:i0.ɵɵFactoryTarget.Injectable}),UpdateStreamService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UpdateStreamService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UpdateStreamService,decorators:[{type:Injectable}]});
@@ -1 +1 @@
1
- import{Confirmation}from"@abp/ng.theme.shared";import{Inject,Injectable}from"@angular/core";import{Uppy}from"@uppy/core";import Dashboard from"@uppy/dashboard";import XHRUpload from"@uppy/xhr-upload";import{fromEvent}from"rxjs";import{bufferTime,filter,map,take}from"rxjs/operators";import{FILE_MANAGEMENT_XSRF_HEADER_NAME}from"../tokens/extensions.token";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";import*as i2 from"@volo/abp.ng.file-management/proxy";import*as i3 from"@abp/ng.theme.shared";import*as i4 from"./update-stream.service";import*as i5 from"@angular/common/http";export class UploadService{constructor(e,i,r,t,s,o,a,l){this.localization=e,this.fileService=i,this.confirmation=r,this.updateStream=t,this.apiInterceptor=s,this.environmentService=o,this.httpXsrfToken=a,this.headerName=l,this.filesAlreadyChecked=!1,this.subscriptions=[],this.onBeforeUpload=e=>!!this.filesAlreadyChecked||(this.checkFilesForUpload(e),!1),this.cancelModal=()=>{this.uppy.cancelAll();const e=this.uppy.getPlugin("Dashboard");e.isModalOpen()&&e.closeModal()},this.getPreInfo=e=>{this.callPreInfoWithFiles(e).pipe(filter(e=>e.length>0),map(this.findAnyIfExistOrInvalidName)).subscribe(e=>{e.doesExist&&this.giveExistFileWarning(),e.hasInvalidName&&this.giveInvalidFileNameWarning(e.fileName)})}}ngOnDestroy(){this.subscriptions&&this.subscriptions.forEach(e=>e.unsubscribe())}initUppy({trigger:e}){const i=this.apiInterceptor.getAdditionalHeaders();return i[this.headerName]=this.httpXsrfToken.getToken(),this.subscriptions.push(this.localization.getResource$("FileManagement").pipe(take(1)).subscribe(r=>{this.resource=r,this.uppy=new Uppy({onBeforeUpload:this.onBeforeUpload}).use(Dashboard,{trigger:e,inline:!1,target:"body",metaFields:[{id:"name",name:r.Name,placeholder:r.FileName}],browserBackButtonClose:!0,proudlyDisplayPoweredByUppy:!1,onRequestCloseModal:this.cancelModal,locale:{strings:this.getTranslations()}}).use(XHRUpload,{endpoint:this.getRawApiUrl(),formData:!0,fieldName:"file",headers:i})})),this.subscriptions.push(fromEvent(this.uppy,"file-added").pipe(map(e=>e[0]),bufferTime(500),filter(e=>e.length>0)).subscribe(this.getPreInfo)),this.subscriptions.push(fromEvent(this.uppy,"complete").subscribe(e=>{this.cancelModal(),this.updateStream.refreshContent()})),this.subscriptions}giveInvalidFileNameWarning(e){this.uppy.info(this.resource["FileManagement:0002"].replace("{FileName}",e),"error",7e3)}giveExistFileWarning(){this.uppy.info(this.resource.FilesAlreadyExist,"warning",7e3)}checkFilesForUpload(e){this.callPreInfoWithFiles(Object.values(e)).subscribe(e=>{const i=e.filter(e=>!e.hasValidName);if(i.length){const e=i.map(e=>`'${e.fileName}'`).join(", ");this.confirmation.error("FileManagement::NotValidFileNames","",{messageLocalizationParams:[e],hideCancelBtn:!0,yesText:"AbpUi::Ok"})}else{const i=e.filter(e=>e.doesExist);if(i.length){const e=i.map(e=>`'${e.fileName}'`).join(", ");this.confirmation.warn("FileManagement::FilesWillBeOverrided","FileManagement::AreYouSure",{messageLocalizationParams:[e]}).pipe(take(1),filter(e=>e===Confirmation.Status.confirm)).subscribe(e=>this.callUppyUpload())}else this.callUppyUpload()}})}callUppyUpload(){this.filesAlreadyChecked=!0,this.updateXHREndpoint(),this.uppy.upload(),this.filesAlreadyChecked=!1}updateXHREndpoint(){const e=this.updateStream.currentDirectory,i=this.uppy.getPlugin("XHRUpload");e?i.setOptions({endpoint:this.getRawApiUrl()+"?directoryId="+e}):i.setOptions({endpoint:this.getRawApiUrl()})}getRawApiUrl(){return this.environmentService.getApiUrl("FileManagement")+"/api/file-management/file-descriptor/upload"}callPreInfoWithFiles(e){const i=this.updateStream.currentDirectory;return this.fileService.getPreInfo(e.map(e=>({fileName:e.meta.name,size:e.size,directoryId:i})))}findAnyIfExistOrInvalidName(e){return e.reduce((e,i)=>({doesExist:e.doesExist||i.doesExist,hasInvalidName:e.hasInvalidName||!i.hasValidName,fileName:i.hasValidName?e.fileName:i.fileName}),{doesExist:!1,hasInvalidName:!1,fileName:""})}getTranslations(){return{closeModal:this.resource.CloseModal,addMoreFiles:this.resource.AddMoreFiles,addingMoreFiles:this.resource.AddingMoreFiles,importFrom:this.resource.ImportFrom,dashboardWindowTitle:this.resource.DashboardWindowTitle,dashboardTitle:this.resource.DashboardTitle,copyLinkToClipboardSuccess:this.resource.CopyLinkToClipboardSuccess,copyLinkToClipboardFallback:this.resource.CopyLinkToClipboardFallback,copyLink:this.resource.CopyLink,fileSource:this.resource.FileSource,done:this.resource.Done,back:this.resource.Back,removeFile:this.resource.RemoveFile,editFile:this.resource.EditFile,editing:this.resource.Editing,edit:this.resource.Edit,finishEditingFile:this.resource.FinishEditingFile,saveChanges:this.resource.SaveChanges,myDevice:this.resource.MyDevice,dropPasteImport:this.resource.DropPasteImport,dropPaste:this.resource.DropPaste,dropHint:this.resource.DropHint,browse:this.resource.Browse,uploadComplete:this.resource.UploadComplete,uploadPaused:this.resource.UploadPaused,resumeUpload:this.resource.ResumeUpload,pauseUpload:this.resource.PauseUpload,retryUpload:this.resource.RetryUpload,cancelUpload:this.resource.CancelUpload,xFilesSelected:{0:this.resource.FileSelected,1:this.resource.NFileSelected},uploadingXFiles:{0:this.resource.UploadingFile,1:this.resource.NUploadingFile},processingXFiles:{0:this.resource.ProcessingFile,1:this.resource.NProcessingFile},uploading:this.resource.Uploading,complete:this.resource.Complete,uploadFailed:this.resource.UploadFailed,paused:this.resource.Paused,retry:this.resource.Retry,cancel:this.resource.Cancel,filesUploadedOfTotal:{0:this.resource.FileUploadedOfTotal,1:this.resource.NFileUploadedOfTotal},dataUploadedOfTotal:this.resource.DataUploadedOfTotal,xTimeLeft:this.resource.XTimeLeft,uploadXFiles:{0:this.resource.UploadFile,1:this.resource.UploadXFiles},uploadXNewFiles:{0:this.resource.UploadNewFile,1:this.resource.UploadXNewFile}}}}UploadService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UploadService,deps:[{token:i1.LocalizationService},{token:i2.FileDescriptorService},{token:i3.ConfirmationService},{token:i4.UpdateStreamService},{token:i1.ApiInterceptor},{token:i1.EnvironmentService},{token:i5.HttpXsrfTokenExtractor},{token:FILE_MANAGEMENT_XSRF_HEADER_NAME}],target:i0.ɵɵFactoryTarget.Injectable}),UploadService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UploadService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:UploadService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.LocalizationService},{type:i2.FileDescriptorService},{type:i3.ConfirmationService},{type:i4.UpdateStreamService},{type:i1.ApiInterceptor},{type:i1.EnvironmentService},{type:i5.HttpXsrfTokenExtractor},{type:void 0,decorators:[{type:Inject,args:[FILE_MANAGEMENT_XSRF_HEADER_NAME]}]}]}});
1
+ import{ApiInterceptor,EnvironmentService,LocalizationService}from"@abp/ng.core";import{Confirmation,ConfirmationService}from"@abp/ng.theme.shared";import{HttpXsrfTokenExtractor}from"@angular/common/http";import{Inject,Injectable}from"@angular/core";import{Uppy}from"@uppy/core";import Dashboard from"@uppy/dashboard";import XHRUpload from"@uppy/xhr-upload";import{FileDescriptorService}from"@volo/abp.ng.file-management/proxy";import{fromEvent}from"rxjs";import{bufferTime,filter,map,take}from"rxjs/operators";import{FILE_MANAGEMENT_XSRF_HEADER_NAME}from"../tokens/extensions.token";import{UpdateStreamService}from"./update-stream.service";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";import*as i2 from"@volo/abp.ng.file-management/proxy";import*as i3 from"@abp/ng.theme.shared";import*as i4 from"./update-stream.service";import*as i5 from"@angular/common/http";export class UploadService{constructor(e,i,r,t,o,s,a,l){this.localization=e,this.fileService=i,this.confirmation=r,this.updateStream=t,this.apiInterceptor=o,this.environmentService=s,this.httpXsrfToken=a,this.headerName=l,this.filesAlreadyChecked=!1,this.subscriptions=[],this.onBeforeUpload=e=>!!this.filesAlreadyChecked||(this.checkFilesForUpload(e),!1),this.cancelModal=()=>{this.uppy.cancelAll();const e=this.uppy.getPlugin("Dashboard");e.isModalOpen()&&e.closeModal()},this.getPreInfo=e=>{this.callPreInfoWithFiles(e).pipe(filter(e=>e.length>0),map(this.findAnyIfExistOrInvalidName)).subscribe(e=>{e.doesExist&&this.giveExistFileWarning(),e.hasInvalidName&&this.giveInvalidFileNameWarning(e.fileName)})}}ngOnDestroy(){this.subscriptions&&this.subscriptions.forEach(e=>e.unsubscribe())}initUppy({trigger:e}){const i=this.apiInterceptor.getAdditionalHeaders();return i[this.headerName]=this.httpXsrfToken.getToken(),this.subscriptions.push(this.localization.getResource$("FileManagement").pipe(take(1)).subscribe(r=>{this.resource=r,this.uppy=new Uppy({onBeforeUpload:this.onBeforeUpload}).use(Dashboard,{trigger:e,inline:!1,target:"body",metaFields:[{id:"name",name:r.Name,placeholder:r.FileName}],browserBackButtonClose:!0,proudlyDisplayPoweredByUppy:!1,onRequestCloseModal:this.cancelModal,locale:{strings:this.getTranslations()}}).use(XHRUpload,{endpoint:this.getRawApiUrl(),formData:!0,fieldName:"file",headers:i})})),this.subscriptions.push(fromEvent(this.uppy,"file-added").pipe(map(e=>e[0]),bufferTime(500),filter(e=>e.length>0)).subscribe(this.getPreInfo)),this.subscriptions.push(fromEvent(this.uppy,"complete").subscribe(e=>{this.cancelModal(),this.updateStream.refreshContent()})),this.subscriptions}giveInvalidFileNameWarning(e){this.uppy.info(this.resource["FileManagement:0002"].replace("{FileName}",e),"error",7e3)}giveExistFileWarning(){this.uppy.info(this.resource.FilesAlreadyExist,"warning",7e3)}checkFilesForUpload(e){this.callPreInfoWithFiles(Object.values(e)).subscribe(e=>{const i=e.filter(e=>!e.hasValidName);if(i.length){const e=i.map(e=>`'${e.fileName}'`).join(", ");this.confirmation.error("FileManagement::NotValidFileNames","",{messageLocalizationParams:[e],hideCancelBtn:!0,yesText:"AbpUi::Ok"})}else{const i=e.filter(e=>e.doesExist);if(i.length){const e=i.map(e=>`'${e.fileName}'`).join(", ");this.confirmation.warn("FileManagement::FilesWillBeOverrided","FileManagement::AreYouSure",{messageLocalizationParams:[e]}).pipe(take(1),filter(e=>e===Confirmation.Status.confirm)).subscribe(e=>this.callUppyUpload())}else this.callUppyUpload()}})}callUppyUpload(){this.filesAlreadyChecked=!0,this.updateXHREndpoint(),this.uppy.upload(),this.filesAlreadyChecked=!1}updateXHREndpoint(){const e=this.updateStream.currentDirectory,i=this.uppy.getPlugin("XHRUpload");e?i.setOptions({endpoint:this.getRawApiUrl()+"?directoryId="+e}):i.setOptions({endpoint:this.getRawApiUrl()})}getRawApiUrl(){return this.environmentService.getApiUrl("FileManagement")+"/api/file-management/file-descriptor/upload"}callPreInfoWithFiles(e){const i=this.updateStream.currentDirectory;return this.fileService.getPreInfo(e.map(e=>({fileName:e.meta.name,size:e.size,directoryId:i})))}findAnyIfExistOrInvalidName(e){return e.reduce((e,i)=>({doesExist:e.doesExist||i.doesExist,hasInvalidName:e.hasInvalidName||!i.hasValidName,fileName:i.hasValidName?e.fileName:i.fileName}),{doesExist:!1,hasInvalidName:!1,fileName:""})}getTranslations(){return{closeModal:this.resource.CloseModal,addMoreFiles:this.resource.AddMoreFiles,addingMoreFiles:this.resource.AddingMoreFiles,importFrom:this.resource.ImportFrom,dashboardWindowTitle:this.resource.DashboardWindowTitle,dashboardTitle:this.resource.DashboardTitle,copyLinkToClipboardSuccess:this.resource.CopyLinkToClipboardSuccess,copyLinkToClipboardFallback:this.resource.CopyLinkToClipboardFallback,copyLink:this.resource.CopyLink,fileSource:this.resource.FileSource,done:this.resource.Done,back:this.resource.Back,removeFile:this.resource.RemoveFile,editFile:this.resource.EditFile,editing:this.resource.Editing,edit:this.resource.Edit,finishEditingFile:this.resource.FinishEditingFile,saveChanges:this.resource.SaveChanges,myDevice:this.resource.MyDevice,dropPasteImport:this.resource.DropPasteImport,dropPaste:this.resource.DropPaste,dropHint:this.resource.DropHint,browse:this.resource.Browse,uploadComplete:this.resource.UploadComplete,uploadPaused:this.resource.UploadPaused,resumeUpload:this.resource.ResumeUpload,pauseUpload:this.resource.PauseUpload,retryUpload:this.resource.RetryUpload,cancelUpload:this.resource.CancelUpload,xFilesSelected:{0:this.resource.FileSelected,1:this.resource.NFileSelected},uploadingXFiles:{0:this.resource.UploadingFile,1:this.resource.NUploadingFile},processingXFiles:{0:this.resource.ProcessingFile,1:this.resource.NProcessingFile},uploading:this.resource.Uploading,complete:this.resource.Complete,uploadFailed:this.resource.UploadFailed,paused:this.resource.Paused,retry:this.resource.Retry,cancel:this.resource.Cancel,filesUploadedOfTotal:{0:this.resource.FileUploadedOfTotal,1:this.resource.NFileUploadedOfTotal},dataUploadedOfTotal:this.resource.DataUploadedOfTotal,xTimeLeft:this.resource.XTimeLeft,uploadXFiles:{0:this.resource.UploadFile,1:this.resource.UploadXFiles},uploadXNewFiles:{0:this.resource.UploadNewFile,1:this.resource.UploadXNewFile}}}}UploadService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UploadService,deps:[{token:i1.LocalizationService},{token:i2.FileDescriptorService},{token:i3.ConfirmationService},{token:i4.UpdateStreamService},{token:i1.ApiInterceptor},{token:i1.EnvironmentService},{token:i5.HttpXsrfTokenExtractor},{token:FILE_MANAGEMENT_XSRF_HEADER_NAME}],target:i0.ɵɵFactoryTarget.Injectable}),UploadService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UploadService}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:UploadService,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.LocalizationService},{type:i2.FileDescriptorService},{type:i3.ConfirmationService},{type:i4.UpdateStreamService},{type:i1.ApiInterceptor},{type:i1.EnvironmentService},{type:i5.HttpXsrfTokenExtractor},{type:void 0,decorators:[{type:Inject,args:[FILE_MANAGEMENT_XSRF_HEADER_NAME]}]}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";export class DirectoryDescriptorService{constructor(e){this.restService=e,this.apiName="FileManagement",this.create=e=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor",body:e},{apiName:this.apiName}),this.delete=e=>this.restService.request({method:"DELETE",url:"/api/file-management/directory-descriptor/"+e},{apiName:this.apiName}),this.get=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor/"+e},{apiName:this.apiName}),this.getContent=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor",params:{filter:e.filter,sorting:e.sorting,id:e.id}},{apiName:this.apiName}),this.getList=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor/sub-directories",params:{parentId:e}},{apiName:this.apiName}),this.move=e=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor/move",body:e},{apiName:this.apiName}),this.rename=(e,r)=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor/"+e,body:r},{apiName:this.apiName})}}DirectoryDescriptorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryDescriptorService,deps:[{token:i1.RestService}],target:i0.ɵɵFactoryTarget.Injectable}),DirectoryDescriptorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryDescriptorService,providedIn:"root"}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:DirectoryDescriptorService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:i1.RestService}]}});
1
+ import{RestService}from"@abp/ng.core";import{Injectable}from"@angular/core";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";export class DirectoryDescriptorService{constructor(e){this.restService=e,this.apiName="FileManagement",this.create=e=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor",body:e},{apiName:this.apiName}),this.delete=e=>this.restService.request({method:"DELETE",url:"/api/file-management/directory-descriptor/"+e},{apiName:this.apiName}),this.get=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor/"+e},{apiName:this.apiName}),this.getContent=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor",params:{filter:e.filter,sorting:e.sorting,id:e.id}},{apiName:this.apiName}),this.getList=e=>this.restService.request({method:"GET",url:"/api/file-management/directory-descriptor/sub-directories",params:{parentId:e}},{apiName:this.apiName}),this.move=e=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor/move",body:e},{apiName:this.apiName}),this.rename=(e,r)=>this.restService.request({method:"POST",url:"/api/file-management/directory-descriptor/"+e,body:r},{apiName:this.apiName})}}DirectoryDescriptorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryDescriptorService,deps:[{token:i1.RestService}],target:i0.ɵɵFactoryTarget.Injectable}),DirectoryDescriptorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryDescriptorService,providedIn:"root"}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:DirectoryDescriptorService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:i1.RestService}]}});
@@ -1 +1 @@
1
- import{Injectable}from"@angular/core";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";export class FileDescriptorService{constructor(e){this.restService=e,this.apiName="FileManagement",this.create=(e,i)=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/upload",params:{directoryId:e,name:i.name}},{apiName:this.apiName}),this.delete=e=>this.restService.request({method:"DELETE",url:"/api/file-management/file-descriptor/"+e},{apiName:this.apiName}),this.download=(e,i)=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/download/"+e,params:{token:i}},{apiName:this.apiName}),this.get=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/"+e},{apiName:this.apiName}),this.getContent=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/content",params:{id:e}},{apiName:this.apiName}),this.getDownloadToken=e=>this.restService.request({method:"GET",url:`/api/file-management/file-descriptor/download/${e}/token`},{apiName:this.apiName}),this.getList=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor",params:{directoryId:e}},{apiName:this.apiName}),this.getPreInfo=e=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/pre-upload-info",body:e},{apiName:this.apiName}),this.move=e=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/move",body:e},{apiName:this.apiName}),this.rename=(e,i)=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/"+e,body:i},{apiName:this.apiName})}}FileDescriptorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileDescriptorService,deps:[{token:i1.RestService}],target:i0.ɵɵFactoryTarget.Injectable}),FileDescriptorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileDescriptorService,providedIn:"root"}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileDescriptorService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:i1.RestService}]}});
1
+ import{RestService}from"@abp/ng.core";import{Injectable}from"@angular/core";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.core";export class FileDescriptorService{constructor(e){this.restService=e,this.apiName="FileManagement",this.create=(e,i)=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/upload",params:{directoryId:e,name:i.name}},{apiName:this.apiName}),this.delete=e=>this.restService.request({method:"DELETE",url:"/api/file-management/file-descriptor/"+e},{apiName:this.apiName}),this.download=(e,i)=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/download/"+e,params:{token:i}},{apiName:this.apiName}),this.get=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/"+e},{apiName:this.apiName}),this.getContent=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/content",params:{id:e}},{apiName:this.apiName}),this.getDownloadToken=e=>this.restService.request({method:"GET",url:`/api/file-management/file-descriptor/download/${e}/token`},{apiName:this.apiName}),this.getList=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor",params:{directoryId:e}},{apiName:this.apiName}),this.getPreInfo=e=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/pre-upload-info",body:e},{apiName:this.apiName}),this.move=e=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/move",body:e},{apiName:this.apiName}),this.rename=(e,i)=>this.restService.request({method:"POST",url:"/api/file-management/file-descriptor/"+e,body:i},{apiName:this.apiName})}}FileDescriptorService.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:FileDescriptorService,deps:[{token:i1.RestService}],target:i0.ɵɵFactoryTarget.Injectable}),FileDescriptorService.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:FileDescriptorService,providedIn:"root"}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.0",ngImport:i0,type:FileDescriptorService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:function(){return[{type:i1.RestService}]}});
@@ -38,10 +38,10 @@ class FileManagementConfigModule {
38
38
  };
39
39
  }
40
40
  }
41
- FileManagementConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileManagementConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
- FileManagementConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileManagementConfigModule });
43
- FileManagementConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileManagementConfigModule });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileManagementConfigModule, decorators: [{
41
+ FileManagementConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileManagementConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
+ FileManagementConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileManagementConfigModule });
43
+ FileManagementConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileManagementConfigModule });
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileManagementConfigModule, decorators: [{
45
45
  type: NgModule
46
46
  }] });
47
47
 
@@ -1,7 +1,7 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
3
1
  import * as i1 from '@abp/ng.core';
4
2
  import { mapEnumToOptions } from '@abp/ng.core';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable } from '@angular/core';
5
5
 
6
6
  class DirectoryDescriptorService {
7
7
  constructor(restService) {
@@ -42,9 +42,9 @@ class DirectoryDescriptorService {
42
42
  }, { apiName: this.apiName });
43
43
  }
44
44
  }
45
- DirectoryDescriptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: DirectoryDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
46
- DirectoryDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: DirectoryDescriptorService, providedIn: 'root' });
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: DirectoryDescriptorService, decorators: [{
45
+ DirectoryDescriptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DirectoryDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
46
+ DirectoryDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DirectoryDescriptorService, providedIn: 'root' });
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DirectoryDescriptorService, decorators: [{
48
48
  type: Injectable,
49
49
  args: [{
50
50
  providedIn: 'root',
@@ -104,9 +104,9 @@ class FileDescriptorService {
104
104
  }, { apiName: this.apiName });
105
105
  }
106
106
  }
107
- FileDescriptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
108
- FileDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileDescriptorService, providedIn: 'root' });
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.9", ngImport: i0, type: FileDescriptorService, decorators: [{
107
+ FileDescriptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileDescriptorService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
108
+ FileDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileDescriptorService, providedIn: 'root' });
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FileDescriptorService, decorators: [{
110
110
  type: Injectable,
111
111
  args: [{
112
112
  providedIn: 'root',