@dignite-ng/expand.file-explorer 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/{src/enums/index.ts → enums/index.d.ts} +1 -1
- package/config/enums/route-names.d.ts +3 -0
- package/config/file-config.module.d.ts +8 -0
- package/config/index.d.ts +5 -0
- package/config/{src/providers/index.ts → providers/index.d.ts} +1 -1
- package/config/providers/route.provider.d.ts +8 -0
- package/config/{src/public-api.ts → public-api.d.ts} +3 -3
- package/esm2022/config/dignite-ng-expand.file-explorer-config.mjs +5 -0
- package/esm2022/config/enums/index.mjs +2 -0
- package/esm2022/config/enums/route-names.mjs +2 -0
- package/esm2022/config/file-config.module.mjs +19 -0
- package/esm2022/config/providers/index.mjs +2 -0
- package/esm2022/config/providers/route.provider.mjs +24 -0
- package/esm2022/config/public-api.mjs +4 -0
- package/esm2022/dignite-ng-expand.file-explorer.mjs +5 -0
- package/esm2022/lib/components/dome/file-dome.component.mjs +32 -0
- package/esm2022/lib/components/file-edit/file-edit.component.mjs +102 -0
- package/esm2022/lib/components/file-modal/file-modal.component.mjs +271 -0
- package/esm2022/lib/components/file-modal-tree/file-modal-tree.component.mjs +195 -0
- package/esm2022/lib/components/file-picker/file-picker.component.mjs +57 -0
- package/esm2022/lib/components/index.mjs +6 -0
- package/esm2022/lib/file-explorer-routing.module.mjs +25 -0
- package/esm2022/lib/file-explorer.module.mjs +83 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +48 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +60 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +3 -0
- package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +2 -0
- package/esm2022/lib/proxy/dignite/file-explorer/index.mjs +4 -0
- package/esm2022/lib/proxy/dignite/index.mjs +3 -0
- package/esm2022/lib/proxy/index.mjs +5 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/extensions/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/extensions/primitives/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/index.mjs +5 -0
- package/esm2022/lib/proxy/microsoft/net/http/headers/index.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +2 -0
- package/esm2022/lib/proxy/microsoft/net/http/index.mjs +3 -0
- package/esm2022/lib/proxy/microsoft/net/index.mjs +3 -0
- package/esm2022/lib/proxy/volo/abp/content/index.mjs +2 -0
- package/esm2022/lib/proxy/volo/abp/content/models.mjs +2 -0
- package/esm2022/lib/proxy/volo/abp/index.mjs +3 -0
- package/esm2022/lib/proxy/volo/index.mjs +3 -0
- package/esm2022/lib/services/file-api.service.mjs +66 -0
- package/esm2022/lib/services/index.mjs +2 -0
- package/esm2022/public-api.mjs +8 -0
- package/fesm2022/dignite-ng-expand.file-explorer-config.mjs +47 -0
- package/fesm2022/dignite-ng-expand.file-explorer-config.mjs.map +1 -0
- package/fesm2022/dignite-ng-expand.file-explorer.mjs +972 -0
- package/fesm2022/dignite-ng-expand.file-explorer.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/dome/file-dome.component.d.ts +19 -0
- package/lib/components/file-edit/file-edit.component.d.ts +38 -0
- package/lib/components/file-modal/file-modal.component.d.ts +93 -0
- package/lib/components/file-modal-tree/file-modal-tree.component.d.ts +66 -0
- package/lib/components/file-picker/file-picker.component.d.ts +23 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/file-explorer-routing.module.d.ts +7 -0
- package/lib/file-explorer.module.d.ts +18 -0
- package/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.d.ts +17 -0
- package/{src/lib/proxy/dignite/file-explorer/directories/models.ts → lib/proxy/dignite/file-explorer/directories/models.d.ts} +29 -35
- package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +20 -0
- package/lib/proxy/dignite/file-explorer/files/models.d.ts +50 -0
- package/{src/lib/proxy/microsoft/asp-net-core/mvc/models.ts → lib/proxy/microsoft/asp-net-core/mvc/models.d.ts} +10 -12
- package/lib/proxy/microsoft/extensions/primitives/models.d.ts +8 -0
- package/{src/lib/proxy/microsoft/net/http/headers/models.ts → lib/proxy/microsoft/net/http/headers/models.d.ts} +6 -7
- package/lib/proxy/volo/abp/content/models.d.ts +5 -0
- package/lib/services/file-api.service.d.ts +14 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +21 -2
- package/{src/public-api.ts → public-api.d.ts} +0 -5
- package/config/ng-package.json +0 -7
- package/config/src/enums/route-names.ts +0 -15
- package/config/src/file-config.module.ts +0 -12
- package/config/src/providers/route.provider.ts +0 -26
- package/ng-package.json +0 -7
- package/src/lib/components/dome/file-dome.component.html +0 -18
- package/src/lib/components/dome/file-dome.component.scss +0 -0
- package/src/lib/components/dome/file-dome.component.spec.ts +0 -21
- package/src/lib/components/dome/file-dome.component.ts +0 -33
- package/src/lib/components/file-edit/file-edit.component.html +0 -29
- package/src/lib/components/file-edit/file-edit.component.scss +0 -0
- package/src/lib/components/file-edit/file-edit.component.spec.ts +0 -21
- package/src/lib/components/file-edit/file-edit.component.ts +0 -98
- package/src/lib/components/file-modal/file-modal.component.html +0 -112
- package/src/lib/components/file-modal/file-modal.component.scss +0 -56
- package/src/lib/components/file-modal/file-modal.component.spec.ts +0 -21
- package/src/lib/components/file-modal/file-modal.component.ts +0 -284
- package/src/lib/components/file-modal-tree/file-modal-tree.component.html +0 -63
- package/src/lib/components/file-modal-tree/file-modal-tree.component.scss +0 -0
- package/src/lib/components/file-modal-tree/file-modal-tree.component.spec.ts +0 -21
- package/src/lib/components/file-modal-tree/file-modal-tree.component.ts +0 -207
- package/src/lib/components/file-picker/file-picker.component.html +0 -28
- package/src/lib/components/file-picker/file-picker.component.scss +0 -0
- package/src/lib/components/file-picker/file-picker.component.spec.ts +0 -21
- package/src/lib/components/file-picker/file-picker.component.ts +0 -58
- package/src/lib/components/index.ts +0 -5
- package/src/lib/file-explorer-routing.module.ts +0 -18
- package/src/lib/file-explorer.module.ts +0 -46
- package/src/lib/proxy/README.md +0 -17
- package/src/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.ts +0 -65
- package/src/lib/proxy/dignite/file-explorer/files/file-descriptor.service.ts +0 -86
- package/src/lib/proxy/dignite/file-explorer/files/models.ts +0 -58
- package/src/lib/proxy/generate-proxy.json +0 -11810
- package/src/lib/proxy/microsoft/extensions/primitives/models.ts +0 -9
- package/src/lib/proxy/volo/abp/content/models.ts +0 -6
- package/src/lib/services/file-api.service.ts +0 -59
- package/src/lib/services/index.ts +0 -1
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/lib/proxy/dignite/file-explorer/directories/index.ts → lib/proxy/dignite/file-explorer/directories/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/file-explorer/files/index.ts → lib/proxy/dignite/file-explorer/files/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/file-explorer/index.ts → lib/proxy/dignite/file-explorer/index.d.ts} +0 -0
- /package/{src/lib/proxy/dignite/index.ts → lib/proxy/dignite/index.d.ts} +0 -0
- /package/{src/lib/proxy/index.ts → lib/proxy/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/asp-net-core/index.ts → lib/proxy/microsoft/asp-net-core/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/asp-net-core/mvc/index.ts → lib/proxy/microsoft/asp-net-core/mvc/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/extensions/index.ts → lib/proxy/microsoft/extensions/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/extensions/primitives/index.ts → lib/proxy/microsoft/extensions/primitives/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/index.ts → lib/proxy/microsoft/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/http/headers/index.ts → lib/proxy/microsoft/net/http/headers/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/http/index.ts → lib/proxy/microsoft/net/http/index.d.ts} +0 -0
- /package/{src/lib/proxy/microsoft/net/index.ts → lib/proxy/microsoft/net/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/abp/content/index.ts → lib/proxy/volo/abp/content/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/abp/index.ts → lib/proxy/volo/abp/index.d.ts} +0 -0
- /package/{src/lib/proxy/volo/index.ts → lib/proxy/volo/index.d.ts} +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { FileApiService } from '../../services/file-api.service';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'fe-file-picker',
|
|
6
|
-
templateUrl: './file-picker.component.html',
|
|
7
|
-
styleUrls: ['./file-picker.component.scss']
|
|
8
|
-
})
|
|
9
|
-
export class FilePickerComponent implements OnChanges{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
private _FileApiService: FileApiService,
|
|
14
|
-
) {
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**图片容器 */
|
|
19
|
-
_fileContainerName: string = 'images'
|
|
20
|
-
@Input()
|
|
21
|
-
public set fileContainerName(v: string) {
|
|
22
|
-
this._fileContainerName = v;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**已选定的文件 */
|
|
26
|
-
@Input() selectFormFile:any[]
|
|
27
|
-
|
|
28
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
29
|
-
let selectFormFilengOnChanges=changes.selectFormFile['currentValue']
|
|
30
|
-
if(selectFormFilengOnChanges.length>0){
|
|
31
|
-
this._fileShowTable=selectFormFilengOnChanges
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@Output() selectedFileChange = new EventEmitter()
|
|
36
|
-
|
|
37
|
-
_fileShowTable: any[] = []
|
|
38
|
-
|
|
39
|
-
/**表格选择的文件回调 */
|
|
40
|
-
_selectFilefn(event: any[]) {
|
|
41
|
-
let _fileShowTable= this._FileApiService.deepClone(event)
|
|
42
|
-
this._fileShowTable =_fileShowTable
|
|
43
|
-
this.selectFormFile=_fileShowTable
|
|
44
|
-
this.selectedFileChange.emit(_fileShowTable)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**模态框-状态-是否打开 */
|
|
48
|
-
ModalOpen: boolean = false
|
|
49
|
-
|
|
50
|
-
/**删除文件表格项 */
|
|
51
|
-
deleteFileTableItem(i, file) {
|
|
52
|
-
this._fileShowTable.splice(i, 1)
|
|
53
|
-
this.selectFormFile=this._fileShowTable
|
|
54
|
-
this.selectedFileChange.emit([])
|
|
55
|
-
this.selectedFileChange.emit(this.selectFormFile)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { Router, RouterModule, Routes } from '@angular/router';
|
|
3
|
-
import { FileDomeComponent } from './components/dome/file-dome.component';
|
|
4
|
-
|
|
5
|
-
const routes: Routes = [
|
|
6
|
-
{
|
|
7
|
-
path: 'file-dome',
|
|
8
|
-
component: FileDomeComponent
|
|
9
|
-
},
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
@NgModule({
|
|
13
|
-
imports: [RouterModule.forChild(routes)],
|
|
14
|
-
exports: [RouterModule]
|
|
15
|
-
})
|
|
16
|
-
export class FileExplorerRoutingModule {
|
|
17
|
-
|
|
18
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CoreModule, LIST_QUERY_DEBOUNCE_TIME, ListService } from '@abp/ng.core';
|
|
3
|
-
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
4
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
-
import { NzTreeModule } from 'ng-zorro-antd/tree';
|
|
7
|
-
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
8
|
-
import { FileExplorerRoutingModule } from './file-explorer-routing.module';
|
|
9
|
-
import { FileEditComponent, FilePickerComponent, FileModalComponent, FileModalTreeComponent, FileDomeComponent } from './components';
|
|
10
|
-
@NgModule({
|
|
11
|
-
declarations: [
|
|
12
|
-
FileEditComponent,
|
|
13
|
-
FilePickerComponent,
|
|
14
|
-
FileModalComponent,
|
|
15
|
-
FileModalTreeComponent,
|
|
16
|
-
FileDomeComponent,
|
|
17
|
-
],
|
|
18
|
-
imports: [
|
|
19
|
-
FormsModule,
|
|
20
|
-
CoreModule,
|
|
21
|
-
ThemeSharedModule,
|
|
22
|
-
ReactiveFormsModule,
|
|
23
|
-
NgbDropdownModule,
|
|
24
|
-
NzTreeModule,
|
|
25
|
-
NgxValidateCoreModule,
|
|
26
|
-
FileExplorerRoutingModule,
|
|
27
|
-
],
|
|
28
|
-
exports: [
|
|
29
|
-
FileEditComponent,
|
|
30
|
-
FilePickerComponent,
|
|
31
|
-
FileModalComponent,
|
|
32
|
-
FileModalTreeComponent,
|
|
33
|
-
FileDomeComponent
|
|
34
|
-
],
|
|
35
|
-
providers: [
|
|
36
|
-
// [Required]
|
|
37
|
-
ListService,
|
|
38
|
-
// [Optional]
|
|
39
|
-
// Provide this token if you want a different debounce time.
|
|
40
|
-
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
41
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
42
|
-
],
|
|
43
|
-
})
|
|
44
|
-
export class FileExplorerModule {
|
|
45
|
-
|
|
46
|
-
}
|
package/src/lib/proxy/README.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Proxy Generation Output
|
|
2
|
-
|
|
3
|
-
This directory includes the output of the latest proxy generation.
|
|
4
|
-
The files and folders in it will be overwritten when proxy generation is run again.
|
|
5
|
-
Therefore, please do not place your own content in this folder.
|
|
6
|
-
|
|
7
|
-
In addition, `generate-proxy.json` works like a lock file.
|
|
8
|
-
It includes information used by the proxy generator, so please do not delete or modify it.
|
|
9
|
-
|
|
10
|
-
Finally, the name of the files and folders should not be changed for two reasons:
|
|
11
|
-
- Proxy generator will keep creating them at those paths and you will have multiple copies of the same content.
|
|
12
|
-
- ABP Suite generates files which include imports from this folder.
|
|
13
|
-
|
|
14
|
-
> **Important Notice:** If you are building a module and are planning to publish to npm,
|
|
15
|
-
> some of the generated proxies are likely to be exported from public-api.ts file. In such a case,
|
|
16
|
-
> please make sure you export files directly and not from barrel exports. In other words,
|
|
17
|
-
> do not include index.ts exports in your public-api.ts exports.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { CreateDirectoryInput, DirectoryDescriptorDto, DirectoryDescriptorInfoDto, GetDirectoriesInput, MoveDirectoryInput, UpdateDirectoryInput } from './models';
|
|
2
|
-
import { RestService, Rest } from '@abp/ng.core';
|
|
3
|
-
import type { PagedResultDto } from '@abp/ng.core';
|
|
4
|
-
import { Injectable } from '@angular/core';
|
|
5
|
-
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root',
|
|
8
|
-
})
|
|
9
|
-
export class FileDescriptorService {
|
|
10
|
-
apiName = 'FileExplorer';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
create = (input: CreateDirectoryInput, config?: Partial<Rest.Config>) =>
|
|
14
|
-
this.restService.request<any, DirectoryDescriptorDto>({
|
|
15
|
-
method: 'POST',
|
|
16
|
-
url: '/api/file-explorer/directories',
|
|
17
|
-
body: input,
|
|
18
|
-
},
|
|
19
|
-
{ apiName: this.apiName,...config });
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
delete = (id: string, config?: Partial<Rest.Config>) =>
|
|
23
|
-
this.restService.request<any, void>({
|
|
24
|
-
method: 'DELETE',
|
|
25
|
-
url: `/api/file-explorer/directories/${id}`,
|
|
26
|
-
},
|
|
27
|
-
{ apiName: this.apiName,...config });
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
get = (id: string, config?: Partial<Rest.Config>) =>
|
|
31
|
-
this.restService.request<any, DirectoryDescriptorDto>({
|
|
32
|
-
method: 'GET',
|
|
33
|
-
url: `/api/file-explorer/directories/${id}`,
|
|
34
|
-
},
|
|
35
|
-
{ apiName: this.apiName,...config });
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
getList = (input: GetDirectoriesInput, config?: Partial<Rest.Config>) =>
|
|
39
|
-
this.restService.request<any, PagedResultDto<DirectoryDescriptorInfoDto>>({
|
|
40
|
-
method: 'GET',
|
|
41
|
-
url: '/api/file-explorer/directories',
|
|
42
|
-
params: { containerName: input.containerName },
|
|
43
|
-
},
|
|
44
|
-
{ apiName: this.apiName,...config });
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
move = (id: string, input: MoveDirectoryInput, config?: Partial<Rest.Config>) =>
|
|
48
|
-
this.restService.request<any, DirectoryDescriptorDto>({
|
|
49
|
-
method: 'PUT',
|
|
50
|
-
url: `/api/file-explorer/directories/${id}/move`,
|
|
51
|
-
body: input,
|
|
52
|
-
},
|
|
53
|
-
{ apiName: this.apiName,...config });
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
update = (id: string, input: UpdateDirectoryInput, config?: Partial<Rest.Config>) =>
|
|
57
|
-
this.restService.request<any, DirectoryDescriptorDto>({
|
|
58
|
-
method: 'PUT',
|
|
59
|
-
url: `/api/file-explorer/directories/${id}`,
|
|
60
|
-
body: input,
|
|
61
|
-
},
|
|
62
|
-
{ apiName: this.apiName,...config });
|
|
63
|
-
|
|
64
|
-
constructor(private restService: RestService) {}
|
|
65
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { CreateFileInput, FileContainerConfigurationDto, FileDescriptorDto, GetFilesInput, ImageResizeInput, UpdateFileInput } from './models';
|
|
2
|
-
import { RestService, Rest } from '@abp/ng.core';
|
|
3
|
-
import type { PagedResultDto } from '@abp/ng.core';
|
|
4
|
-
import { Injectable } from '@angular/core';
|
|
5
|
-
import type { FileResult } from '../../../microsoft/asp-net-core/mvc/models';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root',
|
|
9
|
-
})
|
|
10
|
-
export class FileDescriptorService {
|
|
11
|
-
apiName = 'FileExplorer';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
create = (input: CreateFileInput, config?: Partial<Rest.Config>) =>
|
|
15
|
-
this.restService.request<any, FileDescriptorDto>({
|
|
16
|
-
method: 'POST',
|
|
17
|
-
url: '/api/file-explorer/files',
|
|
18
|
-
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
19
|
-
body: input.file,
|
|
20
|
-
},
|
|
21
|
-
{ apiName: this.apiName,...config });
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
delete = (id: string, config?: Partial<Rest.Config>) =>
|
|
25
|
-
this.restService.request<any, void>({
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
url: `/api/file-explorer/files/${id}`,
|
|
28
|
-
},
|
|
29
|
-
{ apiName: this.apiName,...config });
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
download = (containerName: string, blobName: string, fileName: string, config?: Partial<Rest.Config>) =>
|
|
33
|
-
this.restService.request<any, FileResult>({
|
|
34
|
-
method: 'GET',
|
|
35
|
-
url: `/api/file-explorer/files/download/${containerName}/${blobName}`,
|
|
36
|
-
params: { fileName },
|
|
37
|
-
},
|
|
38
|
-
{ apiName: this.apiName,...config });
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
get = (id: string, config?: Partial<Rest.Config>) =>
|
|
42
|
-
this.restService.request<any, FileDescriptorDto>({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
url: `/api/file-explorer/files/${id}`,
|
|
45
|
-
},
|
|
46
|
-
{ apiName: this.apiName,...config });
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
getFileContainerConfiguration = (containerName: string, config?: Partial<Rest.Config>) =>
|
|
50
|
-
this.restService.request<any, FileContainerConfigurationDto>({
|
|
51
|
-
method: 'GET',
|
|
52
|
-
url: '/api/file-explorer/files/configuration',
|
|
53
|
-
params: { containerName },
|
|
54
|
-
},
|
|
55
|
-
{ apiName: this.apiName,...config });
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
getList = (input: GetFilesInput, config?: Partial<Rest.Config>) =>
|
|
59
|
-
this.restService.request<any, PagedResultDto<FileDescriptorDto>>({
|
|
60
|
-
method: 'GET',
|
|
61
|
-
url: '/api/file-explorer/files',
|
|
62
|
-
params: { containerName: input.containerName, directoryId: input.directoryId, creatorId: input.creatorId, filter: input.filter, entityId: input.entityId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
63
|
-
},
|
|
64
|
-
{ apiName: this.apiName,...config });
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
getStream = (containerName: string, blobName: string, imageResize?: ImageResizeInput, config?: Partial<Rest.Config>) =>
|
|
68
|
-
this.restService.request<any, Blob>({
|
|
69
|
-
method: 'GET',
|
|
70
|
-
responseType: 'blob',
|
|
71
|
-
url: `/api/file-explorer/files/${containerName}/${blobName}`,
|
|
72
|
-
params: { width: imageResize.width, height: imageResize.height },
|
|
73
|
-
},
|
|
74
|
-
{ apiName: this.apiName,...config });
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
update = (id: string, input: UpdateFileInput, config?: Partial<Rest.Config>) =>
|
|
78
|
-
this.restService.request<any, FileDescriptorDto>({
|
|
79
|
-
method: 'PUT',
|
|
80
|
-
url: `/api/file-explorer/files/${id}`,
|
|
81
|
-
body: input,
|
|
82
|
-
},
|
|
83
|
-
{ apiName: this.apiName,...config });
|
|
84
|
-
|
|
85
|
-
constructor(private restService: RestService) {}
|
|
86
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { IRemoteStreamContent } from '../../../volo/abp/content/models';
|
|
2
|
-
import type { CreationAuditedEntityDto, PagedAndSortedResultRequestDto } from '@abp/ng.core';
|
|
3
|
-
|
|
4
|
-
export interface CreateFileInput {
|
|
5
|
-
containerName: string;
|
|
6
|
-
cellName?: string;
|
|
7
|
-
directoryId?: string;
|
|
8
|
-
entityId?: string;
|
|
9
|
-
// file: any;
|
|
10
|
-
file: IRemoteStreamContent;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface FileCellDto {
|
|
14
|
-
name?: string;
|
|
15
|
-
displayName?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface FileContainerConfigurationDto {
|
|
19
|
-
maxBlobSize: number;
|
|
20
|
-
allowedFileTypeNames: string[];
|
|
21
|
-
fileCells: FileCellDto[];
|
|
22
|
-
createDirectoryPermissionName?: string;
|
|
23
|
-
createFilePermissionName?: string;
|
|
24
|
-
updateFilePermissionName?: string;
|
|
25
|
-
deleteFilePermissionName?: string;
|
|
26
|
-
getFilePermissionName?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface FileDescriptorDto extends CreationAuditedEntityDto<string> {
|
|
30
|
-
entityId?: string;
|
|
31
|
-
containerName?: string;
|
|
32
|
-
blobName?: string;
|
|
33
|
-
cellName?: string;
|
|
34
|
-
directoryId?: string;
|
|
35
|
-
size: number;
|
|
36
|
-
name?: string;
|
|
37
|
-
mimeType?: string;
|
|
38
|
-
url?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface GetFilesInput extends PagedAndSortedResultRequestDto {
|
|
42
|
-
containerName: string;
|
|
43
|
-
directoryId?: string;
|
|
44
|
-
creatorId?: string;
|
|
45
|
-
filter?: string;
|
|
46
|
-
entityId?: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ImageResizeInput {
|
|
50
|
-
width?: number;
|
|
51
|
-
height?: number;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface UpdateFileInput {
|
|
55
|
-
cellName?: string;
|
|
56
|
-
directoryId?: string;
|
|
57
|
-
name?: string;
|
|
58
|
-
}
|