@volo/abp.ng.file-management 4.4.1 → 5.0.0-beta.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.
Files changed (138) hide show
  1. package/bundles/volo-abp.ng.file-management-common.umd.js +1 -1
  2. package/bundles/volo-abp.ng.file-management-config.umd.js +1 -1
  3. package/bundles/volo-abp.ng.file-management-proxy.umd.js +1 -0
  4. package/bundles/volo-abp.ng.file-management.umd.js +3 -2
  5. package/common/enums/index.d.ts +1 -1
  6. package/common/enums/route-names.d.ts +3 -3
  7. package/common/package.json +0 -1
  8. package/common/public-api.d.ts +2 -2
  9. package/common/tokens/features.token.d.ts +12 -12
  10. package/common/tokens/index.d.ts +1 -1
  11. package/common/volo-abp.ng.file-management-common.d.ts +5 -4
  12. package/config/enums/index.d.ts +2 -2
  13. package/config/enums/policy-names.d.ts +10 -10
  14. package/config/enums/route-names.d.ts +2 -2
  15. package/config/file-management-config.module.d.ts +8 -4
  16. package/config/package.json +0 -1
  17. package/config/providers/index.d.ts +1 -1
  18. package/config/providers/route.provider.d.ts +8 -8
  19. package/config/public-api.d.ts +3 -3
  20. package/config/volo-abp.ng.file-management-config.d.ts +5 -5
  21. package/esm2015/common/tokens/features.token.js +1 -1
  22. package/esm2015/config/file-management-config.module.js +1 -1
  23. package/esm2015/config/volo-abp.ng.file-management-config.js +1 -1
  24. package/esm2015/lib/components/file-management-breadcrumb/file-management-breadcrumb.component.js +1 -1
  25. package/esm2015/lib/components/file-management-buttons/file-management-buttons.component.js +1 -1
  26. package/esm2015/lib/components/file-management-directory-tree/file-management-directory-tree.component.js +1 -1
  27. package/esm2015/lib/components/file-management-folder-content/file-management-folder-content.component.js +1 -1
  28. package/esm2015/lib/components/file-management-folder-filter/file-management-folder-filter.component.js +1 -1
  29. package/esm2015/lib/components/file-management-folder-panel/file-management-folder-panel.component.js +1 -1
  30. package/esm2015/lib/defaults/default-file-management-entity-actions.js +1 -1
  31. package/esm2015/lib/defaults/default-file-management-entity-props.js +1 -1
  32. package/esm2015/lib/file-management-routing.module.js +1 -1
  33. package/esm2015/lib/file-management.component.js +1 -1
  34. package/esm2015/lib/file-management.initializer.js +1 -1
  35. package/esm2015/lib/file-management.module.js +1 -1
  36. package/esm2015/lib/guards/file-management.guard.js +1 -1
  37. package/esm2015/lib/index.js +1 -1
  38. package/esm2015/lib/modals/base-modal.component.js +1 -1
  39. package/esm2015/lib/modals/create-folder-modal/create-folder-modal.component.js +1 -1
  40. package/esm2015/lib/modals/create-folder-modal/create-folder-modal.service.js +1 -1
  41. package/esm2015/lib/modals/move-file-modal/move-file-modal.component.js +1 -1
  42. package/esm2015/lib/modals/move-file-modal/move-file-modal.service.js +1 -1
  43. package/esm2015/lib/modals/rename-modal/rename-modal.component.js +1 -1
  44. package/esm2015/lib/modals/rename-modal/rename-modal.service.js +1 -1
  45. package/esm2015/lib/services/delete.service.js +1 -1
  46. package/esm2015/lib/services/directory-tree.service.js +1 -1
  47. package/esm2015/lib/services/download.service.js +1 -1
  48. package/esm2015/lib/services/move.service.js +1 -1
  49. package/esm2015/lib/services/navigator.service.js +1 -1
  50. package/esm2015/lib/services/update-stream.service.js +1 -1
  51. package/esm2015/lib/services/upload.service.js +1 -1
  52. package/esm2015/lib/tokens/extensions.token.js +1 -1
  53. package/esm2015/proxy/lib/index.js +1 -0
  54. package/esm2015/{lib → proxy/lib}/proxy/abp/content/index.js +0 -0
  55. package/esm2015/{lib → proxy/lib}/proxy/abp/content/models.js +0 -0
  56. package/esm2015/proxy/lib/proxy/file-management/directories/directory-descriptor.service.js +1 -0
  57. package/esm2015/{lib → proxy/lib}/proxy/file-management/directories/index.js +0 -0
  58. package/esm2015/{lib → proxy/lib}/proxy/file-management/directories/models.js +0 -0
  59. package/esm2015/proxy/lib/proxy/file-management/files/file-descriptor.service.js +1 -0
  60. package/esm2015/{lib → proxy/lib}/proxy/file-management/files/file-icon-type.enum.js +0 -0
  61. package/esm2015/{lib → proxy/lib}/proxy/file-management/files/index.js +0 -0
  62. package/esm2015/{lib → proxy/lib}/proxy/file-management/files/models.js +0 -0
  63. package/esm2015/proxy/public-api.js +1 -0
  64. package/esm2015/proxy/volo-abp.ng.file-management-proxy.js +1 -0
  65. package/fesm2015/volo-abp.ng.file-management-common.js +29 -30
  66. package/fesm2015/volo-abp.ng.file-management-config.js +43 -39
  67. package/fesm2015/volo-abp.ng.file-management-proxy.js +128 -0
  68. package/fesm2015/volo-abp.ng.file-management.js +1548 -1609
  69. package/lib/components/file-management-breadcrumb/file-management-breadcrumb.component.d.ts +12 -9
  70. package/lib/components/file-management-buttons/file-management-buttons.component.d.ts +15 -12
  71. package/lib/components/file-management-directory-tree/file-management-directory-tree.component.d.ts +48 -45
  72. package/lib/components/file-management-folder-content/file-management-folder-content.component.d.ts +44 -41
  73. package/lib/components/file-management-folder-filter/file-management-folder-filter.component.d.ts +14 -11
  74. package/lib/components/file-management-folder-panel/file-management-folder-panel.component.d.ts +11 -8
  75. package/lib/components/index.d.ts +6 -6
  76. package/lib/defaults/default-file-management-entity-actions.d.ts +3 -3
  77. package/lib/defaults/default-file-management-entity-props.d.ts +3 -3
  78. package/lib/defaults/default-file-management-toolbar-actions.d.ts +3 -3
  79. package/lib/defaults/index.d.ts +2 -2
  80. package/lib/enums/components.d.ts +3 -3
  81. package/lib/enums/index.d.ts +1 -1
  82. package/lib/file-management-routing.module.d.ts +7 -2
  83. package/lib/file-management.component.d.ts +12 -9
  84. package/lib/file-management.initializer.d.ts +11 -8
  85. package/lib/file-management.module.d.ts +29 -6
  86. package/lib/guards/file-management.guard.d.ts +11 -8
  87. package/lib/index.d.ts +12 -15
  88. package/lib/modals/base-modal.component.d.ts +22 -19
  89. package/lib/modals/create-folder-modal/create-folder-modal.component.d.ts +16 -13
  90. package/lib/modals/create-folder-modal/create-folder-modal.service.d.ts +11 -8
  91. package/lib/modals/create-folder-modal/index.d.ts +2 -2
  92. package/lib/modals/index.d.ts +4 -4
  93. package/lib/modals/move-file-modal/index.d.ts +2 -2
  94. package/lib/modals/move-file-modal/move-file-modal.component.d.ts +17 -14
  95. package/lib/modals/move-file-modal/move-file-modal.service.d.ts +30 -29
  96. package/lib/modals/rename-modal/index.d.ts +2 -2
  97. package/lib/modals/rename-modal/rename-modal.component.d.ts +22 -19
  98. package/lib/modals/rename-modal/rename-modal.service.d.ts +14 -13
  99. package/lib/models/common-types.d.ts +3 -3
  100. package/lib/models/config-options.d.ts +18 -18
  101. package/lib/models/index.d.ts +2 -2
  102. package/lib/services/delete.service.d.ts +17 -16
  103. package/lib/services/directory-tree.service.d.ts +41 -39
  104. package/lib/services/download.service.d.ts +15 -17
  105. package/lib/services/index.d.ts +7 -7
  106. package/lib/services/move.service.d.ts +15 -12
  107. package/lib/services/navigator.service.d.ts +30 -27
  108. package/lib/services/update-stream.service.d.ts +42 -39
  109. package/lib/services/upload.service.d.ts +50 -47
  110. package/lib/tokens/extensions.token.d.ts +22 -23
  111. package/lib/tokens/index.d.ts +1 -1
  112. package/lib/utils/functions.d.ts +3 -3
  113. package/lib/utils/index.d.ts +1 -1
  114. package/package.json +4 -5
  115. package/proxy/lib/index.d.ts +3 -0
  116. package/{lib → proxy/lib}/proxy/abp/content/index.d.ts +1 -1
  117. package/proxy/lib/proxy/abp/content/models.d.ts +5 -0
  118. package/{lib → proxy/lib}/proxy/file-management/directories/directory-descriptor.service.d.ts +18 -15
  119. package/{lib → proxy/lib}/proxy/file-management/directories/index.d.ts +2 -2
  120. package/{lib → proxy/lib}/proxy/file-management/directories/models.d.ts +39 -35
  121. package/{lib → proxy/lib}/proxy/file-management/files/file-descriptor.service.d.ts +22 -19
  122. package/{lib → proxy/lib}/proxy/file-management/files/file-icon-type.enum.d.ts +5 -5
  123. package/{lib → proxy/lib}/proxy/file-management/files/index.d.ts +3 -3
  124. package/{lib → proxy/lib}/proxy/file-management/files/models.d.ts +40 -38
  125. package/proxy/package.json +10 -0
  126. package/proxy/public-api.d.ts +1 -0
  127. package/proxy/volo-abp.ng.file-management-proxy.d.ts +5 -0
  128. package/public-api.d.ts +1 -1
  129. package/volo-abp.ng.file-management.d.ts +5 -4
  130. package/bundles/volo-abp.ng.file-management-common.umd.min.js +0 -1
  131. package/bundles/volo-abp.ng.file-management-config.umd.min.js +0 -1
  132. package/bundles/volo-abp.ng.file-management.umd.min.js +0 -15
  133. package/common/volo-abp.ng.file-management-common.metadata.json +0 -1
  134. package/config/volo-abp.ng.file-management-config.metadata.json +0 -1
  135. package/esm2015/lib/proxy/file-management/directories/directory-descriptor.service.js +0 -1
  136. package/esm2015/lib/proxy/file-management/files/file-descriptor.service.js +0 -1
  137. package/lib/proxy/abp/content/models.d.ts +0 -4
  138. package/volo-abp.ng.file-management.metadata.json +0 -1
@@ -1 +1 @@
1
- import{Component,ChangeDetectionStrategy,Output,EventEmitter}from"@angular/core";import{ListService}from"@abp/ng.core";import{NavigatorService}from"../../services/navigator.service";export class FileManagementFolderPanelComponent{constructor(e){this.navigator=e,this.contentUpdate=new EventEmitter}}FileManagementFolderPanelComponent.decorators=[{type:Component,args:[{selector:"abp-file-management-folder-panel",template:'<div class="row mb-3">\n <div class="col">\n <abp-file-management-breadcrumb\n [navigatedFolders]="navigator.navigatedFolderPath$ | async"\n (breadcrumbClick)="navigator.goToFolder($event)"\n ></abp-file-management-breadcrumb>\n </div>\n</div>\n\n<abp-file-management-folder-filter></abp-file-management-folder-filter>\n<abp-file-management-folder-content\n (contentUpdate)="contentUpdate.emit($event)"\n></abp-file-management-folder-content>\n',changeDetection:ChangeDetectionStrategy.OnPush,providers:[ListService]}]}],FileManagementFolderPanelComponent.ctorParameters=()=>[{type:NavigatorService}],FileManagementFolderPanelComponent.propDecorators={contentUpdate:[{type:Output}]};
1
+ import{ListService}from"@abp/ng.core";import{ChangeDetectionStrategy,Component,EventEmitter,Output}from"@angular/core";import*as i0 from"@angular/core";import*as i1 from"../../services/navigator.service";import*as i2 from"../file-management-breadcrumb/file-management-breadcrumb.component";import*as i3 from"../file-management-folder-filter/file-management-folder-filter.component";import*as i4 from"../file-management-folder-content/file-management-folder-content.component";import*as i5 from"@angular/common";export class FileManagementFolderPanelComponent{constructor(e){this.navigator=e,this.contentUpdate=new EventEmitter}}FileManagementFolderPanelComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementFolderPanelComponent,deps:[{token:i1.NavigatorService}],target:i0.ɵɵFactoryTarget.Component}),FileManagementFolderPanelComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:FileManagementFolderPanelComponent,selector:"abp-file-management-folder-panel",outputs:{contentUpdate:"contentUpdate"},providers:[ListService],ngImport:i0,template:'<div class="row mb-3">\n <div class="col">\n <abp-file-management-breadcrumb\n [navigatedFolders]="navigator.navigatedFolderPath$ | async"\n (breadcrumbClick)="navigator.goToFolder($event)"\n ></abp-file-management-breadcrumb>\n </div>\n</div>\n\n<abp-file-management-folder-filter></abp-file-management-folder-filter>\n<abp-file-management-folder-content\n (contentUpdate)="contentUpdate.emit($event)"\n></abp-file-management-folder-content>\n',components:[{type:i2.FileManagementBreadcrumbComponent,selector:"abp-file-management-breadcrumb",inputs:["rootBreadcrumbName","navigatedFolders"],outputs:["breadcrumbClick"]},{type:i3.FileManagementFolderFilterComponent,selector:"abp-file-management-folder-filter"},{type:i4.FileManagementFolderContentComponent,selector:"abp-file-management-folder-content",outputs:["contentUpdate"]}],pipes:{async:i5.AsyncPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementFolderPanelComponent,decorators:[{type:Component,args:[{selector:"abp-file-management-folder-panel",templateUrl:"./file-management-folder-panel.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[ListService]}]}],ctorParameters:function(){return[{type:i1.NavigatorService}]},propDecorators:{contentUpdate:[{type:Output}]}});
@@ -1 +1 @@
1
- import{EntityAction}from"@abp/ng.theme.shared/extensions";import{FileManagementFolderContentComponent}from"../components/file-management-folder-content/file-management-folder-content.component";function isDirectory(e){return e.record.isDirectory}function isFile(e){return!isDirectory(e)}const ɵ0=e=>{e.getInjected(FileManagementFolderContentComponent).openFolder(e.record)};export const DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS=EntityAction.createMany([{text:"FileManagement::Open",action:ɵ0,visible:isDirectory},{text:"FileManagement::Rename",action:e=>{e.getInjected(FileManagementFolderContentComponent).renameFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Update",visible:isDirectory},{text:"FileManagement::Move",action:e=>{e.getInjected(FileManagementFolderContentComponent).moveFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Update",visible:isDirectory},{text:"AbpUi::Delete",action:e=>{e.getInjected(FileManagementFolderContentComponent).deleteFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Delete",visible:isDirectory},{text:"FileManagement::Download",action:e=>{e.getInjected(FileManagementFolderContentComponent).downloadFile(e.record)},visible:isFile},{text:"FileManagement::Rename",action:e=>{e.getInjected(FileManagementFolderContentComponent).renameFile(e.record)},permission:"FileManagement.FileDescriptor.Update",visible:isFile},{text:"FileManagement::Move",action:e=>{e.getInjected(FileManagementFolderContentComponent).moveFile(e.record)},permission:"FileManagement.FileDescriptor.Update",visible:isFile},{text:"AbpUi::Delete",action:e=>{e.getInjected(FileManagementFolderContentComponent).deleteFile(e.record)},permission:"FileManagement.FileDescriptor.Delete",visible:isFile}]);export{ɵ0};
1
+ import{EntityAction}from"@abp/ng.theme.shared/extensions";import{FileManagementFolderContentComponent}from"../components/file-management-folder-content/file-management-folder-content.component";function isDirectory(e){return e.record.isDirectory}function isFile(e){return!isDirectory(e)}export const DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS=EntityAction.createMany([{text:"FileManagement::Open",action:e=>{e.getInjected(FileManagementFolderContentComponent).openFolder(e.record)},visible:isDirectory},{text:"FileManagement::Rename",action:e=>{e.getInjected(FileManagementFolderContentComponent).renameFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Update",visible:isDirectory},{text:"FileManagement::Move",action:e=>{e.getInjected(FileManagementFolderContentComponent).moveFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Update",visible:isDirectory},{text:"AbpUi::Delete",action:e=>{e.getInjected(FileManagementFolderContentComponent).deleteFolder(e.record)},permission:"FileManagement.DirectoryDescriptor.Delete",visible:isDirectory},{text:"FileManagement::Download",action:e=>{e.getInjected(FileManagementFolderContentComponent).downloadFile(e.record)},visible:isFile},{text:"FileManagement::Rename",action:e=>{e.getInjected(FileManagementFolderContentComponent).renameFile(e.record)},permission:"FileManagement.FileDescriptor.Update",visible:isFile},{text:"FileManagement::Move",action:e=>{e.getInjected(FileManagementFolderContentComponent).moveFile(e.record)},permission:"FileManagement.FileDescriptor.Update",visible:isFile},{text:"AbpUi::Delete",action:e=>{e.getInjected(FileManagementFolderContentComponent).deleteFile(e.record)},permission:"FileManagement.FileDescriptor.Delete",visible:isFile}]);
@@ -1 +1 @@
1
- import{of}from"rxjs";import{EntityProp}from"@abp/ng.theme.shared/extensions";import{transformDirectoryContentSize}from"../utils/functions";import{NavigatorService}from"../services/navigator.service";import{DownloadService}from"../services/download.service";const ɵ0=e=>{const r=e.getInjected(NavigatorService),o=e.getInjected(DownloadService);e.record.isDirectory?r.goToFolder(e.record):o.downloadFile(e.record).subscribe()},ɵ1=e=>{const r=e.record;let o;return r.isDirectory?o='<i class="fa fa-folder text-primary" aria-hidden="true"></i>':r.iconInfo&&(o=0===r.iconInfo.type?`<i class="${e.record.iconInfo.icon}" aria-hidden="true"></i>`:`<img src="${e.record.iconInfo.icon}" />`),of(`${o} ${e.record.name}`)},ɵ2=e=>of(transformDirectoryContentSize(e.record));export const DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS=EntityProp.createMany([{type:"string",name:"name",displayName:"FileManagement::Name",sortable:!0,action:ɵ0,valueResolver:ɵ1},{type:"string",name:"size",displayName:"FileManagement::Size",sortable:!0,columnWidth:150,valueResolver:ɵ2}]);export{ɵ0,ɵ1,ɵ2};
1
+ import{EntityProp}from"@abp/ng.theme.shared/extensions";import{of}from"rxjs";import{DownloadService}from"../services/download.service";import{NavigatorService}from"../services/navigator.service";import{transformDirectoryContentSize}from"../utils/functions";export const DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS=EntityProp.createMany([{type:"string",name:"name",displayName:"FileManagement::Name",sortable:!0,action:e=>{const r=e.getInjected(NavigatorService),o=e.getInjected(DownloadService);e.record.isDirectory?r.goToFolder(e.record):o.downloadFile(e.record).subscribe()},valueResolver:e=>{const r=e.record;let o;return r.isDirectory?o='<i class="fa fa-folder text-primary" aria-hidden="true"></i>':r.iconInfo&&(o=0===r.iconInfo.type?`<i class="${e.record.iconInfo.icon}" aria-hidden="true"></i>`:`<img src="${e.record.iconInfo.icon}" />`),of(`${o} ${e.record.name}`)}},{type:"string",name:"size",displayName:"FileManagement::Size",sortable:!0,columnWidth:150,valueResolver:e=>of(transformDirectoryContentSize(e.record))}]);
@@ -1 +1 @@
1
- import{NgModule}from"@angular/core";import{RouterModule}from"@angular/router";import{PermissionGuard,AuthGuard}from"@abp/ng.core";import{FileManagementComponent}from"./file-management.component";import{FileManagementInitializer}from"./file-management.initializer";import{FileManagementGuard}from"./guards/file-management.guard";const routes=[{path:"",pathMatch:"full",canActivate:[AuthGuard,PermissionGuard,FileManagementInitializer,FileManagementGuard],component:FileManagementComponent}];export class FileManagementRoutingModule{}FileManagementRoutingModule.decorators=[{type:NgModule,args:[{imports:[RouterModule.forChild(routes)],exports:[RouterModule]}]}];
1
+ import{NgModule}from"@angular/core";import{RouterModule}from"@angular/router";import{PermissionGuard,AuthGuard}from"@abp/ng.core";import{FileManagementComponent}from"./file-management.component";import{FileManagementInitializer}from"./file-management.initializer";import{FileManagementGuard}from"./guards/file-management.guard";import*as i0 from"@angular/core";import*as i1 from"@angular/router";const routes=[{path:"",pathMatch:"full",canActivate:[AuthGuard,PermissionGuard,FileManagementInitializer,FileManagementGuard],component:FileManagementComponent}];export class FileManagementRoutingModule{}FileManagementRoutingModule.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementRoutingModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule}),FileManagementRoutingModule.ɵmod=i0.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementRoutingModule,imports:[i1.RouterModule],exports:[RouterModule]}),FileManagementRoutingModule.ɵinj=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementRoutingModule,imports:[[RouterModule.forChild(routes)],RouterModule]}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementRoutingModule,decorators:[{type:NgModule,args:[{imports:[RouterModule.forChild(routes)],exports:[RouterModule]}]}]});
@@ -1 +1 @@
1
- import{Component,ChangeDetectionStrategy}from"@angular/core";import{EXTENSIONS_IDENTIFIER}from"@abp/ng.theme.shared/extensions";import{UpdateStreamService}from"./services/update-stream.service";import{DeleteService}from"./services/delete.service";import{DownloadService}from"./services/download.service";import{DirectoryTreeService}from"./services/directory-tree.service";import{NavigatorService}from"./services/navigator.service";import{MoveService}from"./services/move.service";import{UploadService}from"./services/upload.service";const ɵ0="FileManagement.FolderContentComponent";export class FileManagementComponent{constructor(e){this.updateStream=e,this.currentContent=[]}ngOnInit(){this.updateStream.patchStore({currentDirectory:null})}}FileManagementComponent.decorators=[{type:Component,args:[{selector:"abp-file-management",template:'<abp-page\n [title]="\'FileManagement::Menu:FileManagement\' | abpLocalization"\n [toolbar]="currentContent"\n>\n <div class="card">\n <div class="card-body">\n <div class="row">\n <div class="col-md-4 col-lg-3 col">\n <div class="p-lg-3 p-md-0 mb-4">\n <abp-file-management-buttons></abp-file-management-buttons>\n <abp-file-management-directory-tree></abp-file-management-directory-tree>\n </div>\n </div>\n <div class="col-md-8 col-lg-9 col">\n <div class="p-lg-3 p-md-0">\n <abp-file-management-folder-panel\n (contentUpdate)="currentContent = $event"\n ></abp-file-management-folder-panel>\n </div>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n',changeDetection:ChangeDetectionStrategy.OnPush,providers:[DeleteService,DownloadService,DirectoryTreeService,NavigatorService,MoveService,UploadService,UpdateStreamService,{provide:EXTENSIONS_IDENTIFIER,useValue:ɵ0}]}]}],FileManagementComponent.ctorParameters=()=>[{type:UpdateStreamService}];export{ɵ0};
1
+ import{EXTENSIONS_IDENTIFIER}from"@abp/ng.theme.shared/extensions";import{ChangeDetectionStrategy,Component}from"@angular/core";import{DeleteService}from"./services/delete.service";import{DirectoryTreeService}from"./services/directory-tree.service";import{DownloadService}from"./services/download.service";import{MoveService}from"./services/move.service";import{NavigatorService}from"./services/navigator.service";import{UpdateStreamService}from"./services/update-stream.service";import{UploadService}from"./services/upload.service";import*as i0 from"@angular/core";import*as i1 from"./services/update-stream.service";import*as i2 from"@abp/ng.components/page";import*as i3 from"./components/file-management-buttons/file-management-buttons.component";import*as i4 from"./components/file-management-directory-tree/file-management-directory-tree.component";import*as i5 from"./components/file-management-folder-panel/file-management-folder-panel.component";import*as i6 from"@abp/ng.core";export class FileManagementComponent{constructor(e){this.updateStream=e,this.currentContent=[]}ngOnInit(){this.updateStream.patchStore({currentDirectory:null})}}FileManagementComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementComponent,deps:[{token:i1.UpdateStreamService}],target:i0.ɵɵFactoryTarget.Component}),FileManagementComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:FileManagementComponent,selector:"abp-file-management",providers:[DeleteService,DownloadService,DirectoryTreeService,NavigatorService,MoveService,UploadService,UpdateStreamService,{provide:EXTENSIONS_IDENTIFIER,useValue:"FileManagement.FolderContentComponent"}],ngImport:i0,template:'<abp-page\n [title]="\'FileManagement::Menu:FileManagement\' | abpLocalization"\n [toolbar]="currentContent"\n>\n <div class="card">\n <div class="card-body">\n <div class="row">\n <div class="col-md-4 col-lg-3 col">\n <div class="p-lg-3 p-md-0 mb-4">\n <abp-file-management-buttons></abp-file-management-buttons>\n <abp-file-management-directory-tree></abp-file-management-directory-tree>\n </div>\n </div>\n <div class="col-md-8 col-lg-9 col">\n <div class="p-lg-3 p-md-0">\n <abp-file-management-folder-panel\n (contentUpdate)="currentContent = $event"\n ></abp-file-management-folder-panel>\n </div>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n',components:[{type:i2.PageComponent,selector:"abp-page",inputs:["title","toolbar","breadcrumb"]},{type:i3.FileManagementButtonsComponent,selector:"abp-file-management-buttons"},{type:i4.FileManagementDirectoryTreeComponent,selector:"abp-file-management-directory-tree"},{type:i5.FileManagementFolderPanelComponent,selector:"abp-file-management-folder-panel",outputs:["contentUpdate"]}],pipes:{abpLocalization:i6.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.OnPush}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementComponent,decorators:[{type:Component,args:[{selector:"abp-file-management",templateUrl:"./file-management.component.html",changeDetection:ChangeDetectionStrategy.OnPush,providers:[DeleteService,DownloadService,DirectoryTreeService,NavigatorService,MoveService,UploadService,UpdateStreamService,{provide:EXTENSIONS_IDENTIFIER,useValue:"FileManagement.FolderContentComponent"}]}]}],ctorParameters:function(){return[{type:i1.UpdateStreamService}]}});
@@ -1 +1 @@
1
- import{ExtensionsService,getObjectExtensionEntitiesFromStore,mapEntitiesToContributors,mergeWithDefaultActions,mergeWithDefaultProps}from"@abp/ng.theme.shared/extensions";import{Injectable,Injector}from"@angular/core";import{map,mapTo,tap}from"rxjs/operators";import{FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS,DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS,DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS,FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS}from"./tokens/extensions.token";import{ConfigStateService}from"@abp/ng.core";export class FileManagementInitializer{constructor(t){this.injector=t}canActivate(){const t=this.injector.get(ExtensionsService),e=this.injector.get(FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,null)||{},i=this.injector.get(FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,null)||{},n=this.injector.get(FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,null)||{},o=this.injector.get(ConfigStateService);return getObjectExtensionEntitiesFromStore(o,"FileManagement").pipe(map(t=>({})),mapEntitiesToContributors(o,"FileManagement"),tap(o=>{mergeWithDefaultActions(t.entityActions,DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS,e),mergeWithDefaultActions(t.toolbarActions,DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS,i),mergeWithDefaultProps(t.entityProps,DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS,o.prop,n)}),mapTo(!0))}}FileManagementInitializer.decorators=[{type:Injectable}],FileManagementInitializer.ctorParameters=()=>[{type:Injector}];
1
+ import{ExtensionsService,getObjectExtensionEntitiesFromStore,mapEntitiesToContributors,mergeWithDefaultActions,mergeWithDefaultProps}from"@abp/ng.theme.shared/extensions";import{Injectable}from"@angular/core";import{map,mapTo,tap}from"rxjs/operators";import{FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS,DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS,DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS,FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS}from"./tokens/extensions.token";import{ConfigStateService}from"@abp/ng.core";import*as i0 from"@angular/core";export class FileManagementInitializer{constructor(e){this.injector=e}canActivate(){const e=this.injector.get(ExtensionsService),t=this.injector.get(FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,null)||{},i=this.injector.get(FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,null)||{},n=this.injector.get(FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,null)||{},r=this.injector.get(ConfigStateService);return getObjectExtensionEntitiesFromStore(r,"FileManagement").pipe(map(e=>({})),mapEntitiesToContributors(r,"FileManagement"),tap(r=>{mergeWithDefaultActions(e.entityActions,DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS,t),mergeWithDefaultActions(e.toolbarActions,DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS,i),mergeWithDefaultProps(e.entityProps,DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS,r.prop,n)}),mapTo(!0))}}FileManagementInitializer.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementInitializer,deps:[{token:i0.Injector}],target:i0.ɵɵFactoryTarget.Injectable}),FileManagementInitializer.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementInitializer}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementInitializer,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i0.Injector}]}});
@@ -1 +1 @@
1
- import{NgModule}from"@angular/core";import{CoreModule,LazyModuleFactory}from"@abp/ng.core";import{NgbDropdownModule}from"@ng-bootstrap/ng-bootstrap";import{ThemeSharedModule}from"@abp/ng.theme.shared";import{UiExtensionsModule}from"@abp/ng.theme.shared/extensions";import{NgxValidateCoreModule}from"@ngx-validate/core";import{TreeModule}from"@abp/ng.components/tree";import{PageModule}from"@abp/ng.components/page";import{FileManagementComponent}from"./file-management.component";import{FileManagementRoutingModule}from"./file-management-routing.module";import{FileManagementDirectoryTreeComponent}from"./components/file-management-directory-tree/file-management-directory-tree.component";import{FileManagementButtonsComponent}from"./components/file-management-buttons/file-management-buttons.component";import{FileManagementBreadcrumbComponent}from"./components/file-management-breadcrumb/file-management-breadcrumb.component";import{FileManagementFolderContentComponent}from"./components/file-management-folder-content/file-management-folder-content.component";import{FileManagementFolderFilterComponent}from"./components/file-management-folder-filter/file-management-folder-filter.component";import{FileManagementFolderPanelComponent}from"./components/file-management-folder-panel/file-management-folder-panel.component";import{FileManagementInitializer}from"./file-management.initializer";import{FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_XSRF_HEADER_NAME}from"./tokens/extensions.token";import{RenameModalComponent}from"./modals/rename-modal/rename-modal.component";import{CreateFolderModalComponent}from"./modals/create-folder-modal/create-folder-modal.component";import{BaseModalComponent}from"./modals/base-modal.component";import{MoveFileModalComponent}from"./modals/move-file-modal/move-file-modal.component";import{FileManagementGuard}from"./guards/file-management.guard";const exportedComponents=[FileManagementComponent,FileManagementDirectoryTreeComponent,FileManagementButtonsComponent,FileManagementBreadcrumbComponent,FileManagementFolderContentComponent,FileManagementFolderFilterComponent,FileManagementFolderPanelComponent],modals=[RenameModalComponent,CreateFolderModalComponent,BaseModalComponent,MoveFileModalComponent];export class FileManagementModule{static forChild(e={}){return{ngModule:FileManagementModule,providers:[{provide:FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,useValue:e.entityActionContributors},{provide:FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,useValue:e.toolbarActionContributors},{provide:FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,useValue:e.entityPropContributors},{provide:FILE_MANAGEMENT_XSRF_HEADER_NAME,useValue:e.xsrfHeaderName||"RequestVerificationToken"},FileManagementInitializer,FileManagementGuard]}}static forLazy(e={}){return new LazyModuleFactory(FileManagementModule.forChild(e))}}FileManagementModule.decorators=[{type:NgModule,args:[{declarations:[...exportedComponents,...modals],imports:[CoreModule,ThemeSharedModule,TreeModule,FileManagementRoutingModule,NgbDropdownModule,UiExtensionsModule,NgxValidateCoreModule,PageModule],exports:[...exportedComponents]}]}];
1
+ import{NgModule}from"@angular/core";import{CoreModule,LazyModuleFactory}from"@abp/ng.core";import{NgbDropdownModule}from"@ng-bootstrap/ng-bootstrap";import{ThemeSharedModule}from"@abp/ng.theme.shared";import{UiExtensionsModule}from"@abp/ng.theme.shared/extensions";import{NgxValidateCoreModule}from"@ngx-validate/core";import{TreeModule}from"@abp/ng.components/tree";import{PageModule}from"@abp/ng.components/page";import{FileManagementComponent}from"./file-management.component";import{FileManagementRoutingModule}from"./file-management-routing.module";import{FileManagementDirectoryTreeComponent}from"./components/file-management-directory-tree/file-management-directory-tree.component";import{FileManagementButtonsComponent}from"./components/file-management-buttons/file-management-buttons.component";import{FileManagementBreadcrumbComponent}from"./components/file-management-breadcrumb/file-management-breadcrumb.component";import{FileManagementFolderContentComponent}from"./components/file-management-folder-content/file-management-folder-content.component";import{FileManagementFolderFilterComponent}from"./components/file-management-folder-filter/file-management-folder-filter.component";import{FileManagementFolderPanelComponent}from"./components/file-management-folder-panel/file-management-folder-panel.component";import{FileManagementInitializer}from"./file-management.initializer";import{FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,FILE_MANAGEMENT_XSRF_HEADER_NAME}from"./tokens/extensions.token";import{RenameModalComponent}from"./modals/rename-modal/rename-modal.component";import{CreateFolderModalComponent}from"./modals/create-folder-modal/create-folder-modal.component";import{BaseModalComponent}from"./modals/base-modal.component";import{MoveFileModalComponent}from"./modals/move-file-modal/move-file-modal.component";import{FileManagementGuard}from"./guards/file-management.guard";import*as i0 from"@angular/core";const exportedComponents=[FileManagementComponent,FileManagementDirectoryTreeComponent,FileManagementButtonsComponent,FileManagementBreadcrumbComponent,FileManagementFolderContentComponent,FileManagementFolderFilterComponent,FileManagementFolderPanelComponent],modals=[RenameModalComponent,CreateFolderModalComponent,BaseModalComponent,MoveFileModalComponent];export class FileManagementModule{static forChild(e={}){return{ngModule:FileManagementModule,providers:[{provide:FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,useValue:e.entityActionContributors},{provide:FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,useValue:e.toolbarActionContributors},{provide:FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,useValue:e.entityPropContributors},{provide:FILE_MANAGEMENT_XSRF_HEADER_NAME,useValue:e.xsrfHeaderName||"RequestVerificationToken"},FileManagementInitializer,FileManagementGuard]}}static forLazy(e={}){return new LazyModuleFactory(FileManagementModule.forChild(e))}}FileManagementModule.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule}),FileManagementModule.ɵmod=i0.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementModule,declarations:[FileManagementComponent,FileManagementDirectoryTreeComponent,FileManagementButtonsComponent,FileManagementBreadcrumbComponent,FileManagementFolderContentComponent,FileManagementFolderFilterComponent,FileManagementFolderPanelComponent,RenameModalComponent,CreateFolderModalComponent,BaseModalComponent,MoveFileModalComponent],imports:[CoreModule,ThemeSharedModule,TreeModule,FileManagementRoutingModule,NgbDropdownModule,UiExtensionsModule,NgxValidateCoreModule,PageModule],exports:[FileManagementComponent,FileManagementDirectoryTreeComponent,FileManagementButtonsComponent,FileManagementBreadcrumbComponent,FileManagementFolderContentComponent,FileManagementFolderFilterComponent,FileManagementFolderPanelComponent]}),FileManagementModule.ɵinj=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementModule,imports:[[CoreModule,ThemeSharedModule,TreeModule,FileManagementRoutingModule,NgbDropdownModule,UiExtensionsModule,NgxValidateCoreModule,PageModule]]}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementModule,decorators:[{type:NgModule,args:[{declarations:[...exportedComponents,...modals],imports:[CoreModule,ThemeSharedModule,TreeModule,FileManagementRoutingModule,NgbDropdownModule,UiExtensionsModule,NgxValidateCoreModule,PageModule],exports:[...exportedComponents]}]}]});
@@ -1 +1 @@
1
- import{Inject,Injectable}from"@angular/core";import{FILE_MANAGEMENT_FEATURES}from"@volo/abp.ng.file-management/common";import{Observable}from"rxjs";import{map}from"rxjs/operators";export class FileManagementGuard{constructor(e){this.auditLoggingFeatures=e}canActivate(){return this.auditLoggingFeatures.pipe(map(e=>e.enable))}}FileManagementGuard.decorators=[{type:Injectable}],FileManagementGuard.ctorParameters=()=>[{type:Observable,decorators:[{type:Inject,args:[FILE_MANAGEMENT_FEATURES]}]}];
1
+ import{Inject,Injectable}from"@angular/core";import{FILE_MANAGEMENT_FEATURES}from"@volo/abp.ng.file-management/common";import{map}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"rxjs";export class FileManagementGuard{constructor(e){this.auditLoggingFeatures=e}canActivate(){return this.auditLoggingFeatures.pipe(map(e=>e.enable))}}FileManagementGuard.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementGuard,deps:[{token:FILE_MANAGEMENT_FEATURES}],target:i0.ɵɵFactoryTarget.Injectable}),FileManagementGuard.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementGuard}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:FileManagementGuard,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:i1.Observable,decorators:[{type:Inject,args:[FILE_MANAGEMENT_FEATURES]}]}]}});
@@ -1 +1 @@
1
- export*from"./components";export*from"./defaults";export*from"./enums";export*from"./modals";export*from"./models";export*from"./proxy/abp/content";export*from"./proxy/file-management/directories";export*from"./proxy/file-management/files";export*from"./services";export*from"./tokens";export*from"./utils";export*from"./file-management-routing.module";export*from"./file-management.component";export*from"./file-management.initializer";export*from"./file-management.module";
1
+ export*from"./components";export*from"./defaults";export*from"./enums";export*from"./file-management-routing.module";export*from"./file-management.component";export*from"./file-management.initializer";export*from"./file-management.module";export*from"./modals";export*from"./models";export*from"./services";export*from"./tokens";export*from"./utils";
@@ -1 +1 @@
1
- import{Component,Input,Output,EventEmitter,ChangeDetectionStrategy}from"@angular/core";import{of}from"rxjs";import{finalize}from"rxjs/operators";export class BaseModalComponent{constructor(){this.size="md",this.visibleChange=new EventEmitter,this.contentSaved=new EventEmitter,this.loading=!1,this.success=e=>{this.closeModal(),this.contentSaved.emit(e)}}get self(){return this}onVisibleChange(e){this.visible=e,this.visibleChange.emit(this.visible)}closeModal(){this.onVisibleChange(!1),this.clear()}clear(){}save(){this.shouldSave()&&(this.loading=!0,this.saveAction().pipe(finalize(()=>{this.loading=!1})).subscribe(this.success))}shouldSave(){return!0}saveAction(){return of({})}}BaseModalComponent.decorators=[{type:Component,args:[{selector:"abp-file-management-modal",changeDetection:ChangeDetectionStrategy.Default,template:'\n <abp-modal\n [size]="parent.size"\n [visible]="parent.visible"\n (visibleChange)="parent.onVisibleChange($event)"\n >\n <ng-template #abpHeader>\n <h5 class="modal-title">\n {{ \'FileManagement::\' + title | abpLocalization }}\n </h5>\n </ng-template>\n\n <ng-template #abpBody>\n <ng-content></ng-content>\n </ng-template>\n\n <ng-template #abpFooter>\n <button\n (click)="parent.closeModal()"\n type="button"\n [disabled]="parent.loading"\n class="btn btn-secondary"\n >\n {{ \'AbpUi::Cancel\' | abpLocalization }}\n </button>\n <abp-button\n type="abp-button"\n [loading]="loading"\n iconClass="fa fa-check"\n (click)="parent.save()"\n >\n {{ \'AbpUi::Save\' | abpLocalization }}\n </abp-button>\n </ng-template>\n </abp-modal>\n '}]}],BaseModalComponent.propDecorators={title:[{type:Input}],size:[{type:Input}],visible:[{type:Input}],visibleChange:[{type:Output}],contentSaved:[{type:Output}],parent:[{type:Input}]};
1
+ import{ChangeDetectionStrategy,Component,EventEmitter,Input,Output}from"@angular/core";import{of}from"rxjs";import{finalize}from"rxjs/operators";import*as i0 from"@angular/core";import*as i1 from"@abp/ng.theme.shared";import*as i2 from"@abp/ng.core";export class BaseModalComponent{constructor(){this.size="md",this.visibleChange=new EventEmitter,this.contentSaved=new EventEmitter,this.loading=!1,this.success=n=>{this.closeModal(),this.contentSaved.emit(n)}}get self(){return this}onVisibleChange(n){this.visible=n,this.visibleChange.emit(this.visible)}closeModal(){this.onVisibleChange(!1),this.clear()}clear(){}save(){this.shouldSave()&&(this.loading=!0,this.saveAction().pipe(finalize(()=>{this.loading=!1})).subscribe(this.success))}shouldSave(){return!0}saveAction(){return of({})}}BaseModalComponent.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:BaseModalComponent,deps:[],target:i0.ɵɵFactoryTarget.Component}),BaseModalComponent.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.9",type:BaseModalComponent,selector:"abp-file-management-modal",inputs:{title:"title",size:"size",visible:"visible",parent:"parent"},outputs:{visibleChange:"visibleChange",contentSaved:"contentSaved"},ngImport:i0,template:'\n <abp-modal\n [options]="{ size: parent.size }"\n [visible]="parent.visible"\n (visibleChange)="parent.onVisibleChange($event)"\n >\n <ng-template #abpHeader>\n <h5 class="modal-title">\n {{ \'FileManagement::\' + title | abpLocalization }}\n </h5>\n </ng-template>\n\n <ng-template #abpBody>\n <ng-content></ng-content>\n </ng-template>\n\n <ng-template #abpFooter>\n <button\n (click)="parent.closeModal()"\n type="button"\n [disabled]="parent.loading"\n class="btn btn-secondary"\n >\n {{ \'AbpUi::Cancel\' | abpLocalization }}\n </button>\n <abp-button\n type="abp-button"\n [loading]="loading"\n iconClass="fa fa-check"\n (click)="parent.save()"\n >\n {{ \'AbpUi::Save\' | abpLocalization }}\n </abp-button>\n </ng-template>\n </abp-modal>\n ',isInline:!0,components:[{type:i1.ModalComponent,selector:"abp-modal",inputs:["visible","busy","options","suppressUnsavedChangesWarning"],outputs:["visibleChange","init","appear","disappear"]},{type:i1.ButtonComponent,selector:"abp-button",inputs:["buttonId","buttonClass","buttonType","iconClass","loading","disabled","attributes"],outputs:["click","focus","blur","abpClick","abpFocus","abpBlur"]}],pipes:{abpLocalization:i2.LocalizationPipe},changeDetection:i0.ChangeDetectionStrategy.Default}),i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.9",ngImport:i0,type:BaseModalComponent,decorators:[{type:Component,args:[{selector:"abp-file-management-modal",changeDetection:ChangeDetectionStrategy.Default,template:'\n <abp-modal\n [options]="{ size: parent.size }"\n [visible]="parent.visible"\n (visibleChange)="parent.onVisibleChange($event)"\n >\n <ng-template #abpHeader>\n <h5 class="modal-title">\n {{ \'FileManagement::\' + title | abpLocalization }}\n </h5>\n </ng-template>\n\n <ng-template #abpBody>\n <ng-content></ng-content>\n </ng-template>\n\n <ng-template #abpFooter>\n <button\n (click)="parent.closeModal()"\n type="button"\n [disabled]="parent.loading"\n class="btn btn-secondary"\n >\n {{ \'AbpUi::Cancel\' | abpLocalization }}\n </button>\n <abp-button\n type="abp-button"\n [loading]="loading"\n iconClass="fa fa-check"\n (click)="parent.save()"\n >\n {{ \'AbpUi::Save\' | abpLocalization }}\n </abp-button>\n </ng-template>\n </abp-modal>\n '}]}],propDecorators:{title:[{type:Input}],size:[{type:Input}],visible:[{type:Input}],visibleChange:[{type:Output}],contentSaved:[{type:Output}],parent:[{type:Input}]}});
@@ -1 +1 @@
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";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.decorators=[{type:Component,args:[{selector:"abp-create-folder-modal",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',changeDetection:ChangeDetectionStrategy.OnPush,providers:[CreateFolderModalService]}]}],CreateFolderModalComponent.ctorParameters=()=>[{type:FormBuilder},{type:CreateFolderModalService}],CreateFolderModalComponent.propDecorators={parentId:[{type:Input}]};
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 +1 @@
1
- import{Injectable}from"@angular/core";import{tap}from"rxjs/operators";import{DirectoryDescriptorService}from"../../proxy/file-management/directories/directory-descriptor.service";import{UpdateStreamService}from"../../services/update-stream.service";import{mapRootIdToEmpty}from"../../services/directory-tree.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.decorators=[{type:Injectable}],CreateFolderModalService.ctorParameters=()=>[{type:DirectoryDescriptorService},{type:UpdateStreamService}];
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 +1 @@
1
- import{Component,ChangeDetectionStrategy,Input}from"@angular/core";import{ListService}from"@abp/ng.core";import{BaseModalComponent}from"../base-modal.component";import{MoveFileModalService}from"./move-file-modal.service";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.decorators=[{type:Component,args:[{selector:"abp-move-file-modal",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 mr-1"></i> {{ row.name }}\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n</abp-file-management-modal>\n',changeDetection:ChangeDetectionStrategy.OnPush,providers:[MoveFileModalService,ListService]}]}],MoveFileModalComponent.ctorParameters=()=>[{type:MoveFileModalService}],MoveFileModalComponent.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.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 mr-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 +1 @@
1
- import{Injectable}from"@angular/core";import{InternalStore}from"@abp/ng.core";import{ToasterService}from"@abp/ng.theme.shared";import{tap}from"rxjs/operators";import{ROOT_NODE,mapRootIdToEmpty}from"../../services/directory-tree.service";import{DirectoryDescriptorService}from"../../proxy/file-management/directories/directory-descriptor.service";import{FileDescriptorService}from"../../proxy/file-management/files/file-descriptor.service";import{UpdateStreamService}from"../../services/update-stream.service";import{MoveService}from"../../services/move.service";import{NavigatorService}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.decorators=[{type:Injectable}],MoveFileModalService.ctorParameters=()=>[{type:DirectoryDescriptorService},{type:FileDescriptorService},{type:UpdateStreamService},{type:ToasterService},{type:MoveService},{type:NavigatorService}];
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 +1 @@
1
- import{Component,Input,ChangeDetectionStrategy,Output,EventEmitter}from"@angular/core";import{Validators,FormBuilder}from"@angular/forms";import{BaseModalComponent}from"../base-modal.component";import{RenameModalService}from"./rename-modal.service";export class RenameModalComponent extends BaseModalComponent{constructor(e,n){super(),this.service=e,this.fb=n,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.decorators=[{type:Component,args:[{selector:"abp-rename-modal",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',changeDetection:ChangeDetectionStrategy.OnPush,providers:[RenameModalService]}]}],RenameModalComponent.ctorParameters=()=>[{type:RenameModalService},{type:FormBuilder}],RenameModalComponent.propDecorators={contentToRename:[{type:Input}],contentToRenameChange:[{type:Output}]};
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 +1 @@
1
- import{Injectable}from"@angular/core";import{mapTo,tap}from"rxjs/operators";import{DirectoryDescriptorService}from"../../proxy/file-management/directories/directory-descriptor.service";import{FileDescriptorService}from"../../proxy/file-management/files/file-descriptor.service";import{UpdateStreamService}from"../../services/update-stream.service";export class RenameModalService{constructor(e,r,t){this.directoryService=e,this.fileService=r,this.updateStream=t}rename(e){const r=e.id,t=e.name;return e.isDirectory?this.callService(this.directoryService,r,t).pipe(tap(e=>this.updateStream.patchStore({renamedDirectory:{id:r,name:t}}))):this.callService(this.fileService,r,t).pipe(tap(e=>this.updateStream.refreshContent()))}callService(e,r,t){return e.rename(r,{name:t}).pipe(mapTo(!0))}}RenameModalService.decorators=[{type:Injectable}],RenameModalService.ctorParameters=()=>[{type:DirectoryDescriptorService},{type:FileDescriptorService},{type:UpdateStreamService}];
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 +1 @@
1
- import{Injectable}from"@angular/core";import{tap,switchMap,filter,take}from"rxjs/operators";import{Confirmation,ConfirmationService,ToasterService}from"@abp/ng.theme.shared";import{DirectoryDescriptorService}from"../proxy/file-management/directories/directory-descriptor.service";import{FileDescriptorService}from"../proxy/file-management/files/file-descriptor.service";import{UpdateStreamService}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.decorators=[{type:Injectable}],DeleteService.ctorParameters=()=>[{type:ConfirmationService},{type:DirectoryDescriptorService},{type:FileDescriptorService},{type:UpdateStreamService},{type:ToasterService}];
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 +1 @@
1
- import{Injectable}from"@angular/core";import{map}from"rxjs/operators";import{Subscription,merge}from"rxjs";import{TreeAdapter}from"@abp/ng.components/tree";import{InternalStore}from"@abp/ng.core";import{DirectoryDescriptorService}from"../proxy/file-management/directories/directory-descriptor.service";import{UpdateStreamService}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.decorators=[{type:Injectable}],DirectoryTreeService.ctorParameters=()=>[{type:DirectoryDescriptorService},{type:UpdateStreamService}];
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 +1 @@
1
- import{Injectable}from"@angular/core";import{tap}from"rxjs/operators";import{EnvironmentService,RestService}from"@abp/ng.core";import{FileDescriptorService}from"../proxy/file-management/files/file-descriptor.service";export class DownloadService{constructor(e,r,i){this.restService=e,this.fileDescriptorService=r,this.environment=i,this.apiName="FileManagement",this.download=e=>this.restService.request({method:"GET",url:"/api/file-management/file-descriptor/download/"+e,responseType:"blob"},{apiName:this.apiName})}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.decorators=[{type:Injectable}],DownloadService.ctorParameters=()=>[{type:RestService},{type:FileDescriptorService},{type:EnvironmentService}];
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 +1 @@
1
- import{Injectable}from"@angular/core";import{filter,tap,switchMap}from"rxjs/operators";import{ConfirmationService,Confirmation,ToasterService}from"@abp/ng.theme.shared";import{DirectoryDescriptorService}from"../proxy/file-management/directories/directory-descriptor.service";import{mapRootIdToEmpty}from"./directory-tree.service";import{UpdateStreamService}from"./update-stream.service";export class MoveService{constructor(e,r,t,o){this.service=e,this.confirmation=r,this.updateStream=t,this.toaster=o}moveTo(e,r,t){const o=e.id,i=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:o,newParentId:i})),tap(e=>{this.updateStream.patchStore({movedDirectory:{id:o,newParentId:i,oldParentId:t}}),this.toaster.success("FileManagement::SuccessfullyMoved")}))}}MoveService.decorators=[{type:Injectable}],MoveService.ctorParameters=()=>[{type:DirectoryDescriptorService},{type:ConfirmationService},{type:UpdateStreamService},{type:ToasterService}];
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 +1 @@
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";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.decorators=[{type:Injectable}],NavigatorService.ctorParameters=()=>[{type:DirectoryTreeService},{type:UpdateStreamService}];
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 +1 @@
1
- import{Injectable}from"@angular/core";import{skip,filter}from"rxjs/operators";import{merge}from"rxjs";import{InternalStore}from"@abp/ng.core";export class UpdateStreamService{constructor(){this.store=new InternalStore({}),this.currentDirectory$=this.sliceState(t=>t.currentDirectory),this.directoryRename$=this.sliceState(t=>t.renamedDirectory),this.directoryDelete$=this.sliceState(t=>t.deletedDirectory),this.directoryCreate$=this.store.sliceUpdate(t=>t.createdDirectory),this.directoryMove$=this.sliceState(t=>t.movedDirectory),this.contentRefresh$=merge(this.sliceState(t=>t.content),this.currentDirectory$,this.directoryCreate$.pipe(filter(t=>t===this.currentDirectory)),this.directoryMove$.pipe(filter(({oldParentId:t,newParentId:e})=>t===this.currentDirectory||e===this.currentDirectory))),this.patchStore=t=>this.store.patch(t),this.refreshContent=()=>this.store.patch({content:(new Date).getTime()})}get currentDirectory(){return this.store.state.currentDirectory}sliceState(t){return this.store.sliceState(t).pipe(skip(1))}}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.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 +1 @@
1
- import{Injectable,Inject}from"@angular/core";import{HttpXsrfTokenExtractor}from"@angular/common/http";import{take,bufferTime,filter,map}from"rxjs/operators";import{fromEvent}from"rxjs";import{LocalizationService,ApiInterceptor,EnvironmentService}from"@abp/ng.core";import{Uppy}from"@uppy/core";import Dashboard from"@uppy/dashboard";import XHRUpload from"@uppy/xhr-upload";import{ConfirmationService,Confirmation}from"@abp/ng.theme.shared";import{FileDescriptorService}from"../proxy/file-management/files/file-descriptor.service";import{FILE_MANAGEMENT_XSRF_HEADER_NAME}from"../tokens/extensions.token";import{UpdateStreamService}from"./update-stream.service";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.decorators=[{type:Injectable}],UploadService.ctorParameters=()=>[{type:LocalizationService},{type:FileDescriptorService},{type:ConfirmationService},{type:UpdateStreamService},{type:ApiInterceptor},{type:EnvironmentService},{type:HttpXsrfTokenExtractor},{type:String,decorators:[{type:Inject,args:[FILE_MANAGEMENT_XSRF_HEADER_NAME]}]}];
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 +1 @@
1
- import{InjectionToken}from"@angular/core";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS}from"../defaults/default-file-management-entity-props";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS}from"../defaults/default-file-management-entity-actions";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_TOOLBAR_ACTIONS}from"../defaults/default-file-management-toolbar-actions";export const DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS};export const DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_TOOLBAR_ACTIONS};export const DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS};export const FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS");export const FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS");export const FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS");export const FILE_MANAGEMENT_XSRF_HEADER_NAME=new InjectionToken("FILE_MANAGEMENT_XSRF_HEADER_NAME");
1
+ import{InjectionToken}from"@angular/core";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS}from"../defaults/default-file-management-entity-actions";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS}from"../defaults/default-file-management-entity-props";import{DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_TOOLBAR_ACTIONS}from"../defaults/default-file-management-toolbar-actions";export const DEFAULT_FILE_MANAGEMENT_ENTITY_ACTIONS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_ACTIONS};export const DEFAULT_FILE_MANAGEMENT_TOOLBAR_ACTIONS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_TOOLBAR_ACTIONS};export const DEFAULT_FILE_MANAGEMENT_ENTITY_PROPS={"FileManagement.FolderContentComponent":DEFAULT_FILE_MANAGEMENT_DIRECTORY_CONTENT_DTO_ENTITY_PROPS};export const FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS");export const FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS");export const FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS=new InjectionToken("FILE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS");export const FILE_MANAGEMENT_XSRF_HEADER_NAME=new InjectionToken("FILE_MANAGEMENT_XSRF_HEADER_NAME");
@@ -0,0 +1 @@
1
+ export*from"./proxy/abp/content";export*from"./proxy/file-management/directories";export*from"./proxy/file-management/files";
@@ -0,0 +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}]}});
@@ -0,0 +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}]}});
@@ -0,0 +1 @@
1
+ export*from"./lib/index";
@@ -0,0 +1 @@
1
+ export*from"./public-api";
@@ -2,38 +2,37 @@ import { ConfigStateService, featuresFactory, RoutesService, noop } from '@abp/n
2
2
  import { InjectionToken, inject, APP_INITIALIZER } from '@angular/core';
3
3
  import { setModuleVisibilityFactory } from '@volo/abp.commercial.ng.ui/config';
4
4
 
5
- const FILE_MANAGEMENT_FEATURES = new InjectionToken('FILE_MANAGEMENT_FEATURES', {
6
- providedIn: 'root',
7
- factory: () => {
8
- const configState = inject(ConfigStateService);
9
- const featureKey = 'FileManagement.Enable';
10
- const mapFn = (features) => ({
11
- enable: features[featureKey].toLowerCase() !== 'false',
12
- });
13
- return featuresFactory(configState, [featureKey], mapFn);
14
- },
15
- });
16
- const SET_FILE_MANAGEMENT_ROUTE_VISIBILITY = new InjectionToken('SET_FILE_MANAGEMENT_ROUTE_VISIBILITY', {
17
- providedIn: 'root',
18
- factory: () => {
19
- const routes = inject(RoutesService);
20
- const stream = inject(FILE_MANAGEMENT_FEATURES);
21
- setModuleVisibilityFactory(stream, routes, "FileManagement::Menu:FileManagement" /* FileManagement */).subscribe();
22
- },
23
- });
24
- const ɵ0 = noop;
25
- const FILE_MANAGEMENT_FEATURES_PROVIDERS = [
26
- {
27
- provide: APP_INITIALIZER,
28
- useFactory: ɵ0,
29
- deps: [SET_FILE_MANAGEMENT_ROUTE_VISIBILITY],
30
- multi: true,
31
- },
5
+ const FILE_MANAGEMENT_FEATURES = new InjectionToken('FILE_MANAGEMENT_FEATURES', {
6
+ providedIn: 'root',
7
+ factory: () => {
8
+ const configState = inject(ConfigStateService);
9
+ const featureKey = 'FileManagement.Enable';
10
+ const mapFn = (features) => ({
11
+ enable: features[featureKey].toLowerCase() !== 'false',
12
+ });
13
+ return featuresFactory(configState, [featureKey], mapFn);
14
+ },
15
+ });
16
+ const SET_FILE_MANAGEMENT_ROUTE_VISIBILITY = new InjectionToken('SET_FILE_MANAGEMENT_ROUTE_VISIBILITY', {
17
+ providedIn: 'root',
18
+ factory: () => {
19
+ const routes = inject(RoutesService);
20
+ const stream = inject(FILE_MANAGEMENT_FEATURES);
21
+ setModuleVisibilityFactory(stream, routes, "FileManagement::Menu:FileManagement" /* FileManagement */).subscribe();
22
+ },
23
+ });
24
+ const FILE_MANAGEMENT_FEATURES_PROVIDERS = [
25
+ {
26
+ provide: APP_INITIALIZER,
27
+ useFactory: noop,
28
+ deps: [SET_FILE_MANAGEMENT_ROUTE_VISIBILITY],
29
+ multi: true,
30
+ },
32
31
  ];
33
32
 
34
- /**
35
- * Generated bundle index. Do not edit.
33
+ /**
34
+ * Generated bundle index. Do not edit.
36
35
  */
37
36
 
38
- export { FILE_MANAGEMENT_FEATURES, FILE_MANAGEMENT_FEATURES_PROVIDERS, SET_FILE_MANAGEMENT_ROUTE_VISIBILITY, ɵ0 };
37
+ export { FILE_MANAGEMENT_FEATURES, FILE_MANAGEMENT_FEATURES_PROVIDERS, SET_FILE_MANAGEMENT_ROUTE_VISIBILITY };
39
38
  //# sourceMappingURL=volo-abp.ng.file-management-common.js.map
@@ -1,49 +1,53 @@
1
+ import * as i0 from '@angular/core';
1
2
  import { APP_INITIALIZER, NgModule } from '@angular/core';
2
3
  import { RoutesService } from '@abp/ng.core';
3
4
  import { FILE_MANAGEMENT_FEATURES_PROVIDERS } from '@volo/abp.ng.file-management/common';
4
5
 
5
- const FILE_MANAGEMENT_ROUTE_PROVIDERS = [
6
- {
7
- provide: APP_INITIALIZER,
8
- useFactory: configureRoutes,
9
- deps: [RoutesService],
10
- multi: true,
11
- },
12
- ];
13
- function configureRoutes(routes) {
14
- return () => {
15
- routes.add([
16
- {
17
- path: '/file-management',
18
- name: "FileManagement::Menu:FileManagement" /* FileManagement */,
19
- layout: "application" /* application */,
20
- iconClass: 'fa fa-folder-open',
21
- // let people know about this number
22
- order: 30,
23
- requiredPolicy: "FileManagement.DirectoryDescriptor" /* DirectoryDescriptor */,
24
- },
25
- ]);
26
- };
6
+ const FILE_MANAGEMENT_ROUTE_PROVIDERS = [
7
+ {
8
+ provide: APP_INITIALIZER,
9
+ useFactory: configureRoutes,
10
+ deps: [RoutesService],
11
+ multi: true,
12
+ },
13
+ ];
14
+ function configureRoutes(routes) {
15
+ return () => {
16
+ routes.add([
17
+ {
18
+ path: '/file-management',
19
+ name: "FileManagement::Menu:FileManagement" /* FileManagement */,
20
+ layout: "application" /* application */,
21
+ iconClass: 'fa fa-folder-open',
22
+ // let people know about this number
23
+ order: 30,
24
+ requiredPolicy: "FileManagement.DirectoryDescriptor" /* DirectoryDescriptor */,
25
+ },
26
+ ]);
27
+ };
27
28
  }
28
29
 
29
- class FileManagementConfigModule {
30
- static forRoot() {
31
- return {
32
- ngModule: FileManagementConfigModule,
33
- providers: [
34
- FILE_MANAGEMENT_ROUTE_PROVIDERS,
35
- FILE_MANAGEMENT_FEATURES_PROVIDERS,
36
- ],
37
- };
38
- }
39
- }
40
- FileManagementConfigModule.decorators = [
41
- { type: NgModule }
42
- ];
30
+ class FileManagementConfigModule {
31
+ static forRoot() {
32
+ return {
33
+ ngModule: FileManagementConfigModule,
34
+ providers: [
35
+ FILE_MANAGEMENT_ROUTE_PROVIDERS,
36
+ FILE_MANAGEMENT_FEATURES_PROVIDERS,
37
+ ],
38
+ };
39
+ }
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: [{
45
+ type: NgModule
46
+ }] });
43
47
 
44
- /**
45
- * Generated bundle index. Do not edit.
48
+ /**
49
+ * Generated bundle index. Do not edit.
46
50
  */
47
51
 
48
- export { FILE_MANAGEMENT_ROUTE_PROVIDERS, FileManagementConfigModule, configureRoutes, FILE_MANAGEMENT_ROUTE_PROVIDERS as ɵa, configureRoutes as ɵb };
52
+ export { FILE_MANAGEMENT_ROUTE_PROVIDERS, FileManagementConfigModule, configureRoutes };
49
53
  //# sourceMappingURL=volo-abp.ng.file-management-config.js.map