@dignite-ng/expand.file-explorer 3.0.0-rc.4 → 3.0.0-rc.41

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 (53) hide show
  1. package/README.md +128 -24
  2. package/esm2022/config/dignite-ng-expand.file-explorer-config.mjs +1 -1
  3. package/esm2022/config/enums/index.mjs +1 -1
  4. package/esm2022/config/enums/route-names.mjs +1 -1
  5. package/esm2022/config/file-config.module.mjs +1 -1
  6. package/esm2022/config/providers/index.mjs +1 -1
  7. package/esm2022/config/providers/route.provider.mjs +1 -1
  8. package/esm2022/config/public-api.mjs +1 -1
  9. package/esm2022/dignite-ng-expand.file-explorer.mjs +1 -1
  10. package/esm2022/lib/components/dome/file-dome.component.mjs +1 -1
  11. package/esm2022/lib/components/dynamic-form/file-explorer/file-explorer-config.component.mjs +3 -2
  12. package/esm2022/lib/components/dynamic-form/file-explorer/file-explorer-config.mjs +1 -1
  13. package/esm2022/lib/components/dynamic-form/file-explorer/file-explorer-control.component.mjs +17 -3
  14. package/esm2022/lib/components/dynamic-form/file-explorer/file-explorer-view.component.mjs +41 -0
  15. package/esm2022/lib/components/dynamic-form/file-explorer/index.mjs +1 -1
  16. package/esm2022/lib/components/dynamic-form/form-control-group.mjs +3 -2
  17. package/esm2022/lib/components/file-edit/file-edit.component.mjs +4 -3
  18. package/esm2022/lib/components/file-modal/file-modal.component.mjs +294 -82
  19. package/esm2022/lib/components/file-modal-tree/file-modal-tree.component.mjs +129 -52
  20. package/esm2022/lib/components/file-picker/file-picker.component.mjs +15 -5
  21. package/esm2022/lib/components/index.mjs +1 -1
  22. package/esm2022/lib/file-explorer-routing.module.mjs +1 -1
  23. package/esm2022/lib/file-explorer.module.mjs +19 -4
  24. package/esm2022/lib/pipe/get-directory-name.pipe.mjs +20 -0
  25. package/esm2022/lib/previews/file-preview.component.mjs +7 -3
  26. package/esm2022/lib/previews/index.mjs +1 -1
  27. package/esm2022/lib/previews/models.mjs +1 -1
  28. package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +2 -1
  29. package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +1 -1
  30. package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +1 -1
  31. package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +11 -3
  32. package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +1 -1
  33. package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +1 -1
  34. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +1 -1
  35. package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +1 -1
  36. package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +1 -1
  37. package/esm2022/lib/proxy/volo/abp/content/models.mjs +1 -1
  38. package/esm2022/lib/services/file-api.service.mjs +1 -1
  39. package/esm2022/public-api.mjs +1 -1
  40. package/fesm2022/dignite-ng-expand.file-explorer-config.mjs.map +1 -1
  41. package/fesm2022/dignite-ng-expand.file-explorer.mjs +528 -152
  42. package/fesm2022/dignite-ng-expand.file-explorer.mjs.map +1 -1
  43. package/lib/components/dynamic-form/file-explorer/file-explorer-control.component.d.ts +4 -1
  44. package/lib/components/dynamic-form/file-explorer/file-explorer-view.component.d.ts +17 -0
  45. package/lib/components/file-modal/file-modal.component.d.ts +63 -22
  46. package/lib/components/file-modal-tree/file-modal-tree.component.d.ts +21 -10
  47. package/lib/components/file-picker/file-picker.component.d.ts +2 -0
  48. package/lib/file-explorer.module.d.ts +12 -8
  49. package/lib/pipe/get-directory-name.pipe.d.ts +7 -0
  50. package/lib/previews/file-preview.component.d.ts +2 -1
  51. package/lib/proxy/dignite/file-explorer/files/file-descriptor.service.d.ts +3 -1
  52. package/lib/proxy/dignite/file-explorer/files/models.d.ts +5 -2
  53. package/package.json +25 -7
@@ -1,23 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, EventEmitter, Output, ViewChild, inject, NgModule, ChangeDetectorRef } from '@angular/core';
2
+ import { Injectable, Input, Component, EventEmitter, ViewChild, Output, inject, Pipe, NgModule, ChangeDetectorRef } from '@angular/core';
3
3
  import * as i3 from '@abp/ng.core';
4
- import { ListService, LIST_QUERY_DEBOUNCE_TIME, CoreModule } from '@abp/ng.core';
4
+ import { ListService, LIST_QUERY_DEBOUNCE_TIME, ConfigStateService, EnvironmentService, CoreModule } from '@abp/ng.core';
5
5
  import * as i2$1 from '@abp/ng.theme.shared';
6
6
  import { ThemeSharedModule } from '@abp/ng.theme.shared';
7
- import * as i1 from '@angular/forms';
8
- import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i8 from '@ng-bootstrap/ng-bootstrap';
7
+ import * as i1$1 from '@angular/forms';
8
+ import { Validators, FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i1 from '@ng-bootstrap/ng-bootstrap';
10
10
  import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
11
- import * as i9 from 'ng-zorro-antd/tree';
12
11
  import { NzTreeModule } from 'ng-zorro-antd/tree';
13
12
  import * as i3$1 from '@ngx-validate/core';
14
13
  import { NgxValidateCoreModule } from '@ngx-validate/core';
15
- import * as i1$1 from '@angular/router';
14
+ import * as i1$2 from '@angular/router';
16
15
  import { RouterModule } from '@angular/router';
17
16
  import * as i2 from '@angular/common';
18
- import * as i6 from '@swimlane/ngx-datatable';
17
+ import * as i4 from '@angular/cdk/drag-drop';
18
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
19
+ import * as i7 from '@swimlane/ngx-datatable';
19
20
  import { SelectionType } from '@swimlane/ngx-datatable';
20
- import { of } from 'rxjs';
21
+ import { tap, map, of, finalize } from 'rxjs';
22
+ import { ValidatorsService } from '@dignite-ng/expand.core';
23
+ import * as i9 from '@abp/ng.components/tree';
24
+ import { TreeModule } from '@abp/ng.components/tree';
21
25
 
22
26
  class FileApiService {
23
27
  constructor() { }
@@ -173,6 +177,7 @@ class FilePreviewComponent {
173
177
  this.type = '';
174
178
  /**文件名称 */
175
179
  this.name = '';
180
+ this.className = '';
176
181
  /**是否是文件 */
177
182
  this.isImage = true;
178
183
  /**是否是视频 */
@@ -232,13 +237,13 @@ class FilePreviewComponent {
232
237
  return this.rotate = 0;
233
238
  this.rotate += 90;
234
239
  }
235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePreviewComponent, deps: [{ token: i8.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
236
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FilePreviewComponent, selector: "fe-file-preview", inputs: { width: "width", src: "src", preview: "preview", type: "type", name: "name" }, ngImport: i0, template: "<div class=\"image_box\" [style]=\"{width:width,maxWidth:'100%'}\">\n <div class=\"img_box\" *ngIf=\"isImage\">\n <img [src]=\"src\" />\n <div class=\"option_box\" *ngIf=\"preview\">\n <i class=\"fa fa-eye \" (click.stop)=\"OpenPreviewImage(content)\"></i>\n </div>\n </div>\n <a [href]=\"src\" [download]=\"name\" target>\n <i class=\"fa fa-file-audio-o fs-1\" *ngIf=\"isAudio\"></i>\n <i class=\"fa fa-file-video-o fs-1\" *ngIf=\"isVideo\"></i>\n <ng-container *ngIf=\"!(isImage||isAudio||isVideo)\">\n <ng-container *ngFor=\"let item of _ImageTypeOption; let i=index\">\n <i class=\"fs-1\" [ngClass]=\"item.icon\" *ngIf=\"item.type===type\"></i>\n </ng-container>\n </ng-container>\n </a>\n</div>\n\n<ng-template #content let-modal>\n <div class=\"modal-header\">\n <div class=\"d-flex justify-content-end w-100 fs-3\">\n <i class=\"mx-2 fa fa fa-repeat\" aria-hidden=\"true\" title=\"\u53F3\u65CB\u8F6C\" role=\"button\" (click)=\"RotateRight()\"></i>\n <i class=\"mx-2 fa fa-search-minus\" aria-hidden=\"true\" title=\"\u7F29\u5C0F\" role=\"button\" (click)=\"zoomOut()\"></i>\n <i class=\"mx-2 fa fa-search-plus\" aria-hidden=\"true\" title=\"\u653E\u5927\" role=\"button\" (click)=\"zoomIn()\"></i>\n <i class=\"mx-2 fa fa-times\" aria-hidden=\"true\" role=\"button\" (click)=\"modal.dismiss('Cross click')\"></i>\n </div>\n </div> \n <div class=\"modal-body d-flex justify-content-center align-items-center \">\n <img width=\"400\" class=\"modal-body-preview\" [src]=\"src\" [style.transform]=\"'scale('+zoom/10+') rotate('+rotate+'deg)'\" >\n </div>\n</ng-template>", styles: [".image_box{text-align:center;position:relative}.image_box img{width:100%}.image_box .img_box:hover .option_box{display:flex}.image_box .option_box{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000040;align-items:center;justify-content:center;display:none;transition:all .2s linear}.image_box .option_box i{cursor:pointer;font-size:18px;color:#fff}.modal-body-preview{transition:all .2s}::ng-deep .dignite-preview .modal-content{background-color:transparent;color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] }); }
240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePreviewComponent, deps: [{ token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
241
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FilePreviewComponent, selector: "fe-file-preview", inputs: { width: "width", src: "src", preview: "preview", type: "type", name: "name", className: "className" }, ngImport: i0, template: "<div class=\"image_box\" [style]=\"{width:width,maxWidth:'100%'}\">\n <div class=\"img_box\" [class]=\"className\" *ngIf=\"isImage\">\n <img [src]=\"src\" />\n <div class=\"option_box\" *ngIf=\"preview\">\n <i class=\"fa fa-eye \" (click.stop)=\"OpenPreviewImage(content)\"></i>\n </div>\n </div>\n <a [href]=\"src\" [download]=\"name\" target>\n <i class=\"fa fa-file-audio-o fs-1\" *ngIf=\"isAudio\"></i>\n <i class=\"fa fa-file-video-o fs-1\" *ngIf=\"isVideo\"></i>\n <ng-container *ngIf=\"!(isImage||isAudio||isVideo)\">\n <ng-container *ngFor=\"let item of _ImageTypeOption; let i=index\">\n <i class=\"fs-1\" [ngClass]=\"item.icon\" *ngIf=\"item.type===type\"></i>\n </ng-container>\n </ng-container>\n </a>\n</div>\n\n<ng-template #content let-modal>\n <div class=\"modal-header\">\n <div class=\"d-flex justify-content-end w-100 fs-3\">\n <i class=\"mx-2 fa fa fa-repeat\" aria-hidden=\"true\" title=\"\u53F3\u65CB\u8F6C\" role=\"button\" (click)=\"RotateRight()\"></i>\n <i class=\"mx-2 fa fa-search-minus\" aria-hidden=\"true\" title=\"\u7F29\u5C0F\" role=\"button\" (click)=\"zoomOut()\"></i>\n <i class=\"mx-2 fa fa-search-plus\" aria-hidden=\"true\" title=\"\u653E\u5927\" role=\"button\" (click)=\"zoomIn()\"></i>\n <i class=\"mx-2 fa fa-times\" aria-hidden=\"true\" role=\"button\" (click)=\"modal.dismiss('Cross click')\"></i>\n </div>\n </div> \n <div class=\"modal-body d-flex justify-content-center align-items-center \">\n <img width=\"400\" class=\"modal-body-preview\" [src]=\"src\" [style.transform]=\"'scale('+zoom/10+') rotate('+rotate+'deg)'\" >\n </div>\n</ng-template>", styles: [".image_box{text-align:center;position:relative}.image_box img{width:100%}.image_box .img_box:hover .option_box{display:flex}.image_box .option_box{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000040;align-items:center;justify-content:center;display:none;transition:all .2s linear}.image_box .option_box i{cursor:pointer;font-size:18px;color:#fff}.modal-body-preview{transition:all .2s}::ng-deep .dignite-preview .modal-content{background-color:transparent;color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] }); }
237
242
  }
238
243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePreviewComponent, decorators: [{
239
244
  type: Component,
240
- args: [{ selector: 'fe-file-preview', template: "<div class=\"image_box\" [style]=\"{width:width,maxWidth:'100%'}\">\n <div class=\"img_box\" *ngIf=\"isImage\">\n <img [src]=\"src\" />\n <div class=\"option_box\" *ngIf=\"preview\">\n <i class=\"fa fa-eye \" (click.stop)=\"OpenPreviewImage(content)\"></i>\n </div>\n </div>\n <a [href]=\"src\" [download]=\"name\" target>\n <i class=\"fa fa-file-audio-o fs-1\" *ngIf=\"isAudio\"></i>\n <i class=\"fa fa-file-video-o fs-1\" *ngIf=\"isVideo\"></i>\n <ng-container *ngIf=\"!(isImage||isAudio||isVideo)\">\n <ng-container *ngFor=\"let item of _ImageTypeOption; let i=index\">\n <i class=\"fs-1\" [ngClass]=\"item.icon\" *ngIf=\"item.type===type\"></i>\n </ng-container>\n </ng-container>\n </a>\n</div>\n\n<ng-template #content let-modal>\n <div class=\"modal-header\">\n <div class=\"d-flex justify-content-end w-100 fs-3\">\n <i class=\"mx-2 fa fa fa-repeat\" aria-hidden=\"true\" title=\"\u53F3\u65CB\u8F6C\" role=\"button\" (click)=\"RotateRight()\"></i>\n <i class=\"mx-2 fa fa-search-minus\" aria-hidden=\"true\" title=\"\u7F29\u5C0F\" role=\"button\" (click)=\"zoomOut()\"></i>\n <i class=\"mx-2 fa fa-search-plus\" aria-hidden=\"true\" title=\"\u653E\u5927\" role=\"button\" (click)=\"zoomIn()\"></i>\n <i class=\"mx-2 fa fa-times\" aria-hidden=\"true\" role=\"button\" (click)=\"modal.dismiss('Cross click')\"></i>\n </div>\n </div> \n <div class=\"modal-body d-flex justify-content-center align-items-center \">\n <img width=\"400\" class=\"modal-body-preview\" [src]=\"src\" [style.transform]=\"'scale('+zoom/10+') rotate('+rotate+'deg)'\" >\n </div>\n</ng-template>", styles: [".image_box{text-align:center;position:relative}.image_box img{width:100%}.image_box .img_box:hover .option_box{display:flex}.image_box .option_box{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000040;align-items:center;justify-content:center;display:none;transition:all .2s linear}.image_box .option_box i{cursor:pointer;font-size:18px;color:#fff}.modal-body-preview{transition:all .2s}::ng-deep .dignite-preview .modal-content{background-color:transparent;color:#fff}\n"] }]
241
- }], ctorParameters: () => [{ type: i8.NgbModal }], propDecorators: { width: [{
245
+ args: [{ selector: 'fe-file-preview', template: "<div class=\"image_box\" [style]=\"{width:width,maxWidth:'100%'}\">\n <div class=\"img_box\" [class]=\"className\" *ngIf=\"isImage\">\n <img [src]=\"src\" />\n <div class=\"option_box\" *ngIf=\"preview\">\n <i class=\"fa fa-eye \" (click.stop)=\"OpenPreviewImage(content)\"></i>\n </div>\n </div>\n <a [href]=\"src\" [download]=\"name\" target>\n <i class=\"fa fa-file-audio-o fs-1\" *ngIf=\"isAudio\"></i>\n <i class=\"fa fa-file-video-o fs-1\" *ngIf=\"isVideo\"></i>\n <ng-container *ngIf=\"!(isImage||isAudio||isVideo)\">\n <ng-container *ngFor=\"let item of _ImageTypeOption; let i=index\">\n <i class=\"fs-1\" [ngClass]=\"item.icon\" *ngIf=\"item.type===type\"></i>\n </ng-container>\n </ng-container>\n </a>\n</div>\n\n<ng-template #content let-modal>\n <div class=\"modal-header\">\n <div class=\"d-flex justify-content-end w-100 fs-3\">\n <i class=\"mx-2 fa fa fa-repeat\" aria-hidden=\"true\" title=\"\u53F3\u65CB\u8F6C\" role=\"button\" (click)=\"RotateRight()\"></i>\n <i class=\"mx-2 fa fa-search-minus\" aria-hidden=\"true\" title=\"\u7F29\u5C0F\" role=\"button\" (click)=\"zoomOut()\"></i>\n <i class=\"mx-2 fa fa-search-plus\" aria-hidden=\"true\" title=\"\u653E\u5927\" role=\"button\" (click)=\"zoomIn()\"></i>\n <i class=\"mx-2 fa fa-times\" aria-hidden=\"true\" role=\"button\" (click)=\"modal.dismiss('Cross click')\"></i>\n </div>\n </div> \n <div class=\"modal-body d-flex justify-content-center align-items-center \">\n <img width=\"400\" class=\"modal-body-preview\" [src]=\"src\" [style.transform]=\"'scale('+zoom/10+') rotate('+rotate+'deg)'\" >\n </div>\n</ng-template>", styles: [".image_box{text-align:center;position:relative}.image_box img{width:100%}.image_box .img_box:hover .option_box{display:flex}.image_box .option_box{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000040;align-items:center;justify-content:center;display:none;transition:all .2s linear}.image_box .option_box i{cursor:pointer;font-size:18px;color:#fff}.modal-body-preview{transition:all .2s}::ng-deep .dignite-preview .modal-content{background-color:transparent;color:#fff}\n"] }]
246
+ }], ctorParameters: () => [{ type: i1.NgbModal }], propDecorators: { width: [{
242
247
  type: Input
243
248
  }], src: [{
244
249
  type: Input
@@ -248,6 +253,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
248
253
  type: Input
249
254
  }], name: [{
250
255
  type: Input
256
+ }], className: [{
257
+ type: Input
251
258
  }] } });
252
259
 
253
260
  class FileEditComponent {
@@ -325,7 +332,7 @@ class FileEditComponent {
325
332
  });
326
333
  }
327
334
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileEditComponent, deps: [{ token: FileApiService }], target: i0.ɵɵFactoryTarget.Component }); }
328
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileEditComponent, selector: "fe-file-edit", inputs: { multiple: "multiple", fileData: "fileData", limit: "limit" }, outputs: { fileDataChange: "fileDataChange" }, viewQueries: [{ propertyName: "fileEdit", first: true, predicate: ["fileEdit"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"input-group mb-3\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" (change)=\"getFileChange($event)\">\n</div>\n\n<table class=\"table\" *ngIf=\"filesTableData.length>0\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of filesTableData;let i =index\">\n <tr>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.src\" [name]=\"item.name\" [type]=\"item.type\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name}}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' |\n abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}</div>\n </th>\n <td>{{item.fileSize}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
335
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileEditComponent, selector: "fe-file-edit", inputs: { multiple: "multiple", fileData: "fileData", limit: "limit" }, outputs: { fileDataChange: "fileDataChange" }, viewQueries: [{ propertyName: "fileEdit", first: true, predicate: ["fileEdit"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"input-group mb-3\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" (change)=\"getFileChange($event)\">\n</div>\n\n<table class=\"table\" *ngIf=\"filesTableData.length>0\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of filesTableData;let i =index\">\n <tr>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.src\" [name]=\"item.name\" [type]=\"item.type\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name}}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' |\n abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}</div>\n </th>\n <td>{{item.fileSize}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name", "className"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
329
336
  }
330
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileEditComponent, decorators: [{
331
338
  type: Component,
@@ -357,6 +364,10 @@ let FileDescriptorService$1 = class FileDescriptorService {
357
364
  method: 'DELETE',
358
365
  url: `/api/file-explorer/files/${id}`,
359
366
  }, { apiName: this.apiName, ...config });
367
+ this.deleteByEntityId = (containerName, entityId, config) => this.restService.request({
368
+ method: 'DELETE',
369
+ url: `/api/file-explorer/files/${containerName}/${entityId}`,
370
+ }, { apiName: this.apiName, ...config });
360
371
  this.download = (containerName, blobName, fileName, config) => this.restService.request({
361
372
  method: 'GET',
362
373
  url: `/api/file-explorer/files/download/${containerName}/${blobName}`,
@@ -368,14 +379,17 @@ let FileDescriptorService$1 = class FileDescriptorService {
368
379
  }, { apiName: this.apiName, ...config });
369
380
  this.getFileContainerConfiguration = (containerName, config) => this.restService.request({
370
381
  method: 'GET',
371
- url: '/api/file-explorer/files/configuration',
372
- params: { containerName },
382
+ url: `/api/file-explorer/files/${containerName}/configuration`,
373
383
  }, { apiName: this.apiName, ...config });
374
384
  this.getList = (input, config) => this.restService.request({
375
385
  method: 'GET',
376
386
  url: '/api/file-explorer/files',
377
387
  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 },
378
388
  }, { apiName: this.apiName, ...config });
389
+ this.getListByEntityId = (containerName, entityId, config) => this.restService.request({
390
+ method: 'GET',
391
+ url: `/api/file-explorer/files/${containerName}/${entityId}/all`,
392
+ }, { apiName: this.apiName, ...config });
379
393
  this.getStream = (containerName, blobName, imageResize, config) => this.restService.request({
380
394
  method: 'GET',
381
395
  responseType: 'blob',
@@ -442,14 +456,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
442
456
  }], ctorParameters: () => [{ type: i3.RestService }] });
443
457
 
444
458
  /* eslint-disable @angular-eslint/component-selector */
445
- var that$1;
459
+ var that;
446
460
  class FileModalTreeComponent {
447
- constructor(_DescriptorService, fb, toaster, _FileApiService, _LocalizationService) {
461
+ constructor(_DescriptorService, fb, toaster, _FileApiService, _LocalizationService, confirmation) {
448
462
  this._DescriptorService = _DescriptorService;
449
463
  this.fb = fb;
450
464
  this.toaster = toaster;
451
465
  this._FileApiService = _FileApiService;
452
466
  this._LocalizationService = _LocalizationService;
467
+ this.confirmation = confirmation;
453
468
  /**文件分组列表 */
454
469
  this.fileGroupList = [];
455
470
  /**选择的tree节点 */
@@ -460,25 +475,41 @@ class FileModalTreeComponent {
460
475
  this.anExpandedNode = [];
461
476
  /**tree节点选择回调 */
462
477
  this.nodeClick = new EventEmitter();
463
- this.handleClick = (event) => event.stopPropagation();
478
+ /**获取数据后回调给file-modal */
479
+ this.treeNodeData = new EventEmitter();
480
+ /**查看所有文件回调函数,在file-modal中处理逻辑 */
481
+ this.lookAllBtn = new EventEmitter();
482
+ this.handleClick = event => event.stopPropagation();
483
+ this.selectedNode = [];
464
484
  /**判断节点是否选中 */
465
- this.isNodeSelected = (el) => el.key === this._theSelectedTreeNode?.key;
485
+ this.isNodeSelected = el => {
486
+ return el.key === this._theSelectedTreeNode?.key;
487
+ };
466
488
  /**分组 */
467
489
  /**模态框-状态-是否打开 */
468
490
  this.ModalDescriptorOpen = false;
469
491
  /**模态框-descriptor-繁忙状态-用于确定模态的繁忙状态是否为真 */
470
492
  this.ModalDescriptorBusy = false;
471
- that$1 = this;
493
+ this.formValidation = '';
494
+ this._ValidatorsService = inject(ValidatorsService);
495
+ that = this;
472
496
  }
473
497
  set theSelectedTreeNode(v) {
474
498
  this._theSelectedTreeNode = v;
475
- if (v.length > 0) {
499
+ if (v == '') {
476
500
  this.loadData();
477
501
  }
478
502
  }
479
503
  set fileContainerName(v) {
480
504
  if (v) {
481
505
  this._fileContainerName = v;
506
+ // this.loadData();
507
+ }
508
+ }
509
+ ngAfterContentInit() {
510
+ //Called after ngOnInit when the component's or directive's content has been initialized.
511
+ //Add 'implements AfterContentInit' to the class.
512
+ if (this._fileContainerName) {
482
513
  this.loadData();
483
514
  }
484
515
  }
@@ -489,48 +520,70 @@ class FileModalTreeComponent {
489
520
  }
490
521
  /**获取文件分组 */
491
522
  getFileGroupList() {
492
- this._DescriptorService.getList({
523
+ this._DescriptorService
524
+ .getList({
493
525
  containerName: this._fileContainerName,
494
- }).subscribe(async (res) => {
526
+ })
527
+ .subscribe(async (res) => {
495
528
  this.fileGroupList = await this.setTheValueOfTheNodeRecursively(res.items);
529
+ this.treeNodeData.emit(this.fileGroupList);
496
530
  });
497
531
  }
498
- /**递归设置节点的值 */
499
- setTheValueOfTheNodeRecursively(array) {
500
- return new Promise((reslove, rejects) => {
501
- array.forEach((el) => {
502
- el.title = el.name;
503
- el.key = el.id;
504
- el.expanded = this.anExpandedNode.includes(el.key);
505
- if (el.children.length > 0) {
506
- this.setTheValueOfTheNodeRecursively(el.children);
507
- }
508
- });
509
- reslove(array);
532
+ /**查看所有文件 */
533
+ onLookAllBtn() {
534
+ this.lookAllBtn.emit();
535
+ }
536
+ /**递归-将列表转化为父子级结构 */
537
+ setTheValueOfTheNodeRecursively(array, parentId = null, root) {
538
+ let rootList = root || array;
539
+ let result = array.filter(item => item.parentId === parentId);
540
+ result.sort((a, b) => a.order - b.order);
541
+ result.map((el) => {
542
+ el.title = el.name;
543
+ el.key = el.id;
544
+ el.entity = el.id; /** 节点值 */
545
+ el.expanded = this.anExpandedNode.includes(el.key);
546
+ el.children.sort((a, b) => a.order - b.order);
547
+ if (el.children.length > 0) {
548
+ this.setTheValueOfTheNodeRecursively(el.children, el.id, rootList);
549
+ }
510
550
  });
551
+ return result;
511
552
  }
512
553
  /**tree-拖拽 */
513
- nzEvent(event) {
514
- }
554
+ nzEvent(event) { }
515
555
  /**tree-拖拽 -验证*/
516
556
  beforeDrop(arg) {
517
- if (arg.pos === 0 || arg.pos === 1) {
518
- that$1._DescriptorService.move(arg.dragNode.key, {
519
- "parentId": arg.pos === 1 ? (arg.node.parentNode?.key || '') : arg.node.key,
520
- "order": arg.pos === 1 ? arg.node.origin.order + 1 : arg.node.origin.children.length + 1
521
- }).subscribe(res => {
522
- that$1.getFileGroupList();
523
- });
524
- return of(true);
525
- }
526
- else {
527
- return of(false);
557
+ const { pos, dragNode, node } = arg;
558
+ // 只处理有效的拖拽位置
559
+ if (pos === 0 || pos === 1 || pos === -1) {
560
+ // 根据不同的拖拽位置计算参数
561
+ const parentId = pos === 0 ? node.key : node.parentNode?.key || '';
562
+ let order;
563
+ if (pos === 1) {
564
+ order = node.origin.order + 1;
565
+ }
566
+ else if (pos === 0) {
567
+ order = node.origin.children.length + 1;
568
+ }
569
+ else {
570
+ // pos === -1
571
+ order = Math.max(0, node.origin.order - 1);
572
+ }
573
+ // 统一处理移动逻辑
574
+ return that._DescriptorService.move(dragNode.key, { parentId, order }).pipe(tap(() => that.getFileGroupList()), map(() => true));
528
575
  }
576
+ return of(false);
529
577
  }
530
578
  /**tree--选择节点 */
531
- activeNode(event) {
532
- this._theSelectedTreeNode = event.node;
533
- this.nodeClick.emit(event.node);
579
+ activeNode(node) {
580
+ if (event?.target?.localName == 'i')
581
+ return;
582
+ if (this._theSelectedTreeNode?.key == node.key)
583
+ return;
584
+ this.selectedNode = [node];
585
+ this._theSelectedTreeNode = node;
586
+ this.nodeClick.emit(node);
534
587
  }
535
588
  /**点击展开树节点图标触发 */
536
589
  nzExpandChange(event) {
@@ -549,23 +602,32 @@ class FileModalTreeComponent {
549
602
  this.ModalDescriptorForm = this.fb.group({
550
603
  containerName: [this._fileContainerName || '', Validators.required],
551
604
  name: ['', Validators.required],
552
- parentId: [items?.key || '', Validators.required],
605
+ parentId: [items?.key || ''],
553
606
  });
554
607
  /**编辑 */
555
608
  if (edit) {
556
609
  this.theNodeBeingEdited = items.origin;
557
610
  this.ModalDescriptorForm.patchValue({
558
- name: items.origin.name
611
+ name: items.origin.name,
559
612
  });
560
613
  }
561
614
  }
562
615
  /**删除分组 */
563
616
  deleteDescriptorBtn(node) {
564
- this._DescriptorService.delete(node.key).subscribe(res => {
565
- this.ModalDescriptorOpen = false;
566
- if (this.theNodeBeingEdited.key == node.key)
567
- this.theNodeBeingEdited = '';
568
- this.getFileGroupList();
617
+ this.confirmation
618
+ .warn('', {
619
+ key: '',
620
+ defaultValue: this._LocalizationService.instant(`FileExplorer::DeletionConfirmationMessage`, node.title),
621
+ })
622
+ .subscribe((status) => {
623
+ if (status == 'confirm') {
624
+ this._DescriptorService.delete(node.key).subscribe(res => {
625
+ this.ModalDescriptorOpen = false;
626
+ if (this.theNodeBeingEdited.key == node.key)
627
+ this.theNodeBeingEdited = '';
628
+ this.getFileGroupList();
629
+ });
630
+ }
569
631
  });
570
632
  }
571
633
  /**模态框-descriptor-状态改变回调 */
@@ -579,28 +641,52 @@ class FileModalTreeComponent {
579
641
  /**f分组模态框保存 */
580
642
  createOrEditSave() {
581
643
  let input = this.ModalDescriptorForm.value;
644
+ this.formValidation = this._ValidatorsService.getFormValidationStatus(this.ModalDescriptorForm);
645
+ if (this._ValidatorsService.isCheckForm(this.formValidation, 'FileExplorer'))
646
+ return;
647
+ if (!this.ModalDescriptorForm.valid)
648
+ return;
649
+ if (this.ModalDescriptorBusy)
650
+ return;
651
+ this.ModalDescriptorBusy = true;
582
652
  if (this.theNodeBeingEdited) {
583
- this._DescriptorService.update(this.theNodeBeingEdited.key, input).subscribe(res => {
653
+ this._DescriptorService
654
+ .update(this.theNodeBeingEdited.key, input)
655
+ .pipe(finalize(() => {
656
+ this.ModalDescriptorBusy = false;
657
+ }))
658
+ .subscribe(res => {
584
659
  this.ModalDescriptorOpen = false;
660
+ this.ModalDescriptorVisibleChange(false);
585
661
  this.getFileGroupList();
586
662
  });
587
663
  return;
588
664
  }
589
- this._DescriptorService.create(input).subscribe(res => {
665
+ this._DescriptorService
666
+ .create(input)
667
+ .pipe(finalize(() => {
668
+ this.ModalDescriptorBusy = false;
669
+ }))
670
+ .subscribe(res => {
590
671
  this.ModalDescriptorOpen = false;
672
+ this.ModalDescriptorVisibleChange(false);
591
673
  this.getFileGroupList();
592
674
  });
593
675
  }
594
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalTreeComponent, deps: [{ token: FileDescriptorService }, { token: i1.FormBuilder }, { token: i2$1.ToasterService }, { token: FileApiService }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
595
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileModalTreeComponent, selector: "fe-file-modal-tree", inputs: { theSelectedTreeNode: "theSelectedTreeNode", fileContainerName: "fileContainerName" }, outputs: { nodeClick: "nodeClick" }, viewQueries: [{ propertyName: "ModalFormDescriptorSubmit", first: true, predicate: ["ModalFormDescriptorSubmit"], descendants: true }], ngImport: i0, template: "<div class=\"card-header p-0 mb-1 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'FileExplorer::MyDirectories' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-light btn-sm ms-2\" (click.stop)=\"addDescriptorBtn()\"><i\n class=\"fas fa-plus-circle\" aria-hidden=\"true\"></i></button>\n</div>\n<nz-tree [nzData]=\"fileGroupList\" class=\"ng-zorro-antd-tree\" nzDraggable nzBlockNode nzShowIcon\n [nzExpandedIcon]=\"multiExpandedIconTpl\" (nzOnDrop)=\"nzEvent($event)\" [nzBeforeDrop]=\"beforeDrop\"\n (nzClick)=\"activeNode($event)\" (nzExpandChange)=\"nzExpandChange($event)\" [nzTreeTemplate]=\"nzTreeTemplate\">\n <ng-template #nzTreeTemplate let-node let-origin=\"origin\">\n <div class=\"custom-node d-inline-block ng-star-inserted dropdown\" [title]=\"node.title\">\n <div #dropdown=\"ngbDropdown\" class=\"d-inline-block\" ngbDropdown placement=\"bottom\" container=\"body\">\n <div class=\"btn-group\" [class.selected]=\"isNodeSelected(node)\">\n <button class=\"btn btn-sm p-0 px-1\">{{ node.title }}</button>\n <button class=\"btn btn-sm p-0\" (click)=\"handleClick($event)\" ngbDropdownToggle\n [class.dropdown-toggle]=\"false\" aria-hidden=\"true\">\n <i class=\"fas fa-caret-down text-muted p-1\"></i>\n </button>\n </div>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click.stop)=\"addDescriptorBtn(node)\">{{'FileExplorer::NewDirectory' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"addDescriptorBtn(node,true)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deleteDescriptorBtn(node)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #multiExpandedIconTpl let-node let-origin=\"origin\">\n <ng-container *ngIf=\"node.children.length > 0\">\n <i [class]=\"node.isExpanded ? 'fas fa-caret-down' : 'fas fa-caret-right'\"></i>\n </ng-container>\n </ng-template>\n</nz-tree>\n\n\n<abp-modal [(visible)]=\"ModalDescriptorOpen\" [busy]=\"ModalDescriptorBusy\"\n (visibleChange)=\"ModalDescriptorVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{theNodeBeingEdited?('AbpUi::Edit' | abpLocalization):('FileExplorer::NewDirectory' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"ModalDescriptorForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"ModalDescriptorForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #ModalFormDescriptorSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'FileExplorer::DirectoryName' | abpLocalization}}</label>\n <input type=\"email\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"ModalFormDescriptorSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", 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]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$1.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i8.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i8.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i8.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i8.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i8.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i9.NzTreeComponent, selector: "nz-tree", inputs: ["nzShowIcon", "nzHideUnMatched", "nzBlockNode", "nzExpandAll", "nzSelectMode", "nzCheckStrictly", "nzShowExpand", "nzShowLine", "nzCheckable", "nzAsyncData", "nzDraggable", "nzMultiple", "nzExpandedIcon", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzTreeTemplate", "nzBeforeDrop", "nzData", "nzExpandedKeys", "nzSelectedKeys", "nzCheckedKeys", "nzSearchValue", "nzSearchFunc"], outputs: ["nzExpandedKeysChange", "nzSelectedKeysChange", "nzCheckedKeysChange", "nzSearchValueChange", "nzClick", "nzDblClick", "nzContextMenu", "nzCheckBoxChange", "nzExpandChange", "nzOnDragStart", "nzOnDragEnter", "nzOnDragOver", "nzOnDragLeave", "nzOnDrop", "nzOnDragEnd"], exportAs: ["nzTree"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
676
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalTreeComponent, deps: [{ token: FileDescriptorService }, { token: i1$1.FormBuilder }, { token: i2$1.ToasterService }, { token: FileApiService }, { token: i3.LocalizationService }, { token: i2$1.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component }); }
677
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: FileModalTreeComponent, selector: "fe-file-modal-tree", inputs: { theSelectedTreeNode: "theSelectedTreeNode", fileContainerName: "fileContainerName" }, outputs: { nodeClick: "nodeClick", treeNodeData: "treeNodeData", lookAllBtn: "lookAllBtn" }, viewQueries: [{ propertyName: "ModalFormDescriptorSubmit", first: true, predicate: ["ModalFormDescriptorSubmit"], descendants: true }], ngImport: i0, template: "<div class=\"card-header p-0 mb-1 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0 btn-link\" role=\"button\" (click.stop)=\"onLookAllBtn()\">{{'FileExplorer::MyDirectories' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-light btn-sm ms-2\" (click.stop)=\"addDescriptorBtn()\"><i\n class=\"fas fa-plus-circle\" aria-hidden=\"true\"></i></button>\n</div>\n@if(fileGroupList.length>0){\n<abp-tree [nodes]=\"fileGroupList\" (nzExpandChange)=\"nzExpandChange($event)\" [draggable]=\"true\"\n (dropOver)=\"nzEvent($event)\" [beforeDrop]=\"beforeDrop\" (selectedNodeChange)=\"activeNode($event)\" [changeCheckboxWithNode]=\"true\" [isNodeSelected]=\"isNodeSelected\">\n\n <ng-template #menu let-node>\n <button ngbDropdownItem (click.stop)=\"addDescriptorBtn(node)\"><i\n class=\" me-1 fa fa-pencil\"></i>{{'FileExplorer::NewDirectory' | abpLocalization}}</button>\n <button ngbDropdownItem (click.stop)=\"addDescriptorBtn(node,true)\"><i\n class=\" me-1 fa fa-plus\"></i>{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem (click.stop)=\"deleteDescriptorBtn(node)\"><i\n class=\" me-1 fa fa-remove\"></i>{{'AbpUi::Delete' | abpLocalization}}</button>\n </ng-template>\n\n <ng-template abpTreeExpandedIconTemplate let-node let-origin=\"origin\">\n <i aria-hidden=\"true\" *ngIf=\"node.children.length>0\">\n <ng-container *ngTemplateOutlet=\"node.isExpanded ? minusIcon : plusIcon\"></ng-container></i>\n </ng-template>\n\n <ng-template #minusIcon>\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\"\n clip-rule=\"evenodd\">\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm-6.5 10h13v1h-13v-1z\" />\n </svg>\n </ng-template>\n\n <ng-template #plusIcon>\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\"\n clip-rule=\"evenodd\">\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm.5 10h6v1h-6v6h-1v-6h-6v-1h6v-6h1v6z\" />\n </svg>\n </ng-template>\n</abp-tree>\n\n}\n<abp-modal [(visible)]=\"ModalDescriptorOpen\" [busy]=\"ModalDescriptorBusy\"\n (visibleChange)=\"ModalDescriptorVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{theNodeBeingEdited?('AbpUi::Edit' | abpLocalization):('FileExplorer::NewDirectory' | abpLocalization)}}\n </h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"ModalDescriptorForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"ModalDescriptorForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #ModalFormDescriptorSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'FileExplorer::DirectoryName' | abpLocalization}}</label>\n <input type=\"email\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [loading]=\"ModalDescriptorBusy\"\n (click)=\"ModalFormDescriptorSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$1.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "directive", type: i9.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i9.TreeComponent, selector: "abp-tree", inputs: ["noAnimation", "draggable", "checkable", "checkStrictly", "checkedKeys", "nodes", "expandedKeys", "selectedNode", "changeCheckboxWithNode", "isNodeSelected", "beforeDrop"], outputs: ["checkedKeysChange", "expandedKeysChange", "selectedNodeChange", "dropOver", "nzExpandChange"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
596
678
  }
597
679
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalTreeComponent, decorators: [{
598
680
  type: Component,
599
- args: [{ selector: 'fe-file-modal-tree', template: "<div class=\"card-header p-0 mb-1 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'FileExplorer::MyDirectories' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-light btn-sm ms-2\" (click.stop)=\"addDescriptorBtn()\"><i\n class=\"fas fa-plus-circle\" aria-hidden=\"true\"></i></button>\n</div>\n<nz-tree [nzData]=\"fileGroupList\" class=\"ng-zorro-antd-tree\" nzDraggable nzBlockNode nzShowIcon\n [nzExpandedIcon]=\"multiExpandedIconTpl\" (nzOnDrop)=\"nzEvent($event)\" [nzBeforeDrop]=\"beforeDrop\"\n (nzClick)=\"activeNode($event)\" (nzExpandChange)=\"nzExpandChange($event)\" [nzTreeTemplate]=\"nzTreeTemplate\">\n <ng-template #nzTreeTemplate let-node let-origin=\"origin\">\n <div class=\"custom-node d-inline-block ng-star-inserted dropdown\" [title]=\"node.title\">\n <div #dropdown=\"ngbDropdown\" class=\"d-inline-block\" ngbDropdown placement=\"bottom\" container=\"body\">\n <div class=\"btn-group\" [class.selected]=\"isNodeSelected(node)\">\n <button class=\"btn btn-sm p-0 px-1\">{{ node.title }}</button>\n <button class=\"btn btn-sm p-0\" (click)=\"handleClick($event)\" ngbDropdownToggle\n [class.dropdown-toggle]=\"false\" aria-hidden=\"true\">\n <i class=\"fas fa-caret-down text-muted p-1\"></i>\n </button>\n </div>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click.stop)=\"addDescriptorBtn(node)\">{{'FileExplorer::NewDirectory' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"addDescriptorBtn(node,true)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deleteDescriptorBtn(node)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #multiExpandedIconTpl let-node let-origin=\"origin\">\n <ng-container *ngIf=\"node.children.length > 0\">\n <i [class]=\"node.isExpanded ? 'fas fa-caret-down' : 'fas fa-caret-right'\"></i>\n </ng-container>\n </ng-template>\n</nz-tree>\n\n\n<abp-modal [(visible)]=\"ModalDescriptorOpen\" [busy]=\"ModalDescriptorBusy\"\n (visibleChange)=\"ModalDescriptorVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{theNodeBeingEdited?('AbpUi::Edit' | abpLocalization):('FileExplorer::NewDirectory' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"ModalDescriptorForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"ModalDescriptorForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #ModalFormDescriptorSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'FileExplorer::DirectoryName' | abpLocalization}}</label>\n <input type=\"email\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"ModalFormDescriptorSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
600
- }], ctorParameters: () => [{ type: FileDescriptorService }, { type: i1.FormBuilder }, { type: i2$1.ToasterService }, { type: FileApiService }, { type: i3.LocalizationService }], propDecorators: { theSelectedTreeNode: [{
681
+ args: [{ selector: 'fe-file-modal-tree', template: "<div class=\"card-header p-0 mb-1 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0 btn-link\" role=\"button\" (click.stop)=\"onLookAllBtn()\">{{'FileExplorer::MyDirectories' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-light btn-sm ms-2\" (click.stop)=\"addDescriptorBtn()\"><i\n class=\"fas fa-plus-circle\" aria-hidden=\"true\"></i></button>\n</div>\n@if(fileGroupList.length>0){\n<abp-tree [nodes]=\"fileGroupList\" (nzExpandChange)=\"nzExpandChange($event)\" [draggable]=\"true\"\n (dropOver)=\"nzEvent($event)\" [beforeDrop]=\"beforeDrop\" (selectedNodeChange)=\"activeNode($event)\" [changeCheckboxWithNode]=\"true\" [isNodeSelected]=\"isNodeSelected\">\n\n <ng-template #menu let-node>\n <button ngbDropdownItem (click.stop)=\"addDescriptorBtn(node)\"><i\n class=\" me-1 fa fa-pencil\"></i>{{'FileExplorer::NewDirectory' | abpLocalization}}</button>\n <button ngbDropdownItem (click.stop)=\"addDescriptorBtn(node,true)\"><i\n class=\" me-1 fa fa-plus\"></i>{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem (click.stop)=\"deleteDescriptorBtn(node)\"><i\n class=\" me-1 fa fa-remove\"></i>{{'AbpUi::Delete' | abpLocalization}}</button>\n </ng-template>\n\n <ng-template abpTreeExpandedIconTemplate let-node let-origin=\"origin\">\n <i aria-hidden=\"true\" *ngIf=\"node.children.length>0\">\n <ng-container *ngTemplateOutlet=\"node.isExpanded ? minusIcon : plusIcon\"></ng-container></i>\n </ng-template>\n\n <ng-template #minusIcon>\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\"\n clip-rule=\"evenodd\">\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm-6.5 10h13v1h-13v-1z\" />\n </svg>\n </ng-template>\n\n <ng-template #plusIcon>\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" fill-rule=\"evenodd\"\n clip-rule=\"evenodd\">\n <path\n d=\"M11.5 0c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5zm0 1c5.795 0 10.5 4.705 10.5 10.5s-4.705 10.5-10.5 10.5-10.5-4.705-10.5-10.5 4.705-10.5 10.5-10.5zm.5 10h6v1h-6v6h-1v-6h-6v-1h6v-6h1v6z\" />\n </svg>\n </ng-template>\n</abp-tree>\n\n}\n<abp-modal [(visible)]=\"ModalDescriptorOpen\" [busy]=\"ModalDescriptorBusy\"\n (visibleChange)=\"ModalDescriptorVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{theNodeBeingEdited?('AbpUi::Edit' | abpLocalization):('FileExplorer::NewDirectory' | abpLocalization)}}\n </h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"ModalDescriptorForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"ModalDescriptorForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #ModalFormDescriptorSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'FileExplorer::DirectoryName' | abpLocalization}}</label>\n <input type=\"email\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [loading]=\"ModalDescriptorBusy\"\n (click)=\"ModalFormDescriptorSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
682
+ }], ctorParameters: () => [{ type: FileDescriptorService }, { type: i1$1.FormBuilder }, { type: i2$1.ToasterService }, { type: FileApiService }, { type: i3.LocalizationService }, { type: i2$1.ConfirmationService }], propDecorators: { theSelectedTreeNode: [{
601
683
  type: Input
602
684
  }], nodeClick: [{
603
685
  type: Output
686
+ }], treeNodeData: [{
687
+ type: Output
688
+ }], lookAllBtn: [{
689
+ type: Output
604
690
  }], fileContainerName: [{
605
691
  type: Input
606
692
  }], ModalFormDescriptorSubmit: [{
@@ -608,7 +694,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
608
694
  args: ['ModalFormDescriptorSubmit', { static: false }]
609
695
  }] } });
610
696
 
611
- var that;
697
+ class GetDirectoryNamePipe {
698
+ transform(value, ...args) {
699
+ if (value) {
700
+ return args[0].find(el => el.id == value)?.name;
701
+ }
702
+ return '';
703
+ }
704
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
705
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, isStandalone: true, name: "getDirectoryName" }); }
706
+ }
707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, decorators: [{
708
+ type: Pipe,
709
+ args: [{
710
+ name: 'getDirectoryName',
711
+ standalone: true
712
+ }]
713
+ }] });
714
+
715
+ /* eslint-disable @typescript-eslint/no-this-alias */
716
+ /* eslint-disable @typescript-eslint/no-unused-vars */
612
717
  class FileModalComponent {
613
718
  constructor(_FileService, toaster, list, _FileApiService, restService, confirmation, _LocalizationService) {
614
719
  this._FileService = _FileService;
@@ -624,8 +729,8 @@ class FileModalComponent {
624
729
  /**是否多选 */
625
730
  this._multiple = false;
626
731
  /**文件大小限制
627
- * @param 1mb
628
- */
732
+ * @param 1mb
733
+ */
629
734
  this.sizeLimit = 1048576;
630
735
  /**模态框状态回调 */
631
736
  this.visibleChange = new EventEmitter();
@@ -636,6 +741,9 @@ class FileModalComponent {
636
741
  /**dignite-file-modal-tree */
637
742
  /**选择的tree节点 */
638
743
  this._theSelectedTreeNode = '';
744
+ this.isCreateList = false;
745
+ /** 从tree获取来的数据 */
746
+ this.fileGroupList = [];
639
747
  /**图片上传-要上传图片的状态文件列表 */
640
748
  this.uploadPictureStatusList = [];
641
749
  /**文件表格-数据*/
@@ -647,45 +755,54 @@ class FileModalComponent {
647
755
  this.filters = {};
648
756
  /**文件表格-表格自带选择类型 */
649
757
  this.SelectionType = SelectionType;
650
- /**文件表格-选择的表格数据项 */
651
- this.selectedTable = [];
652
- /**当前选择的table项 id */
653
- this.nowSelectId = '';
654
758
  /**选择文件回调 */
655
759
  this.selectFilefn = new EventEmitter();
656
- /**一个布尔or函数,可用于检查是否要根据条件选择特定行。 */
657
- this.selectCheck = (row, column, value) => {
658
- this.nowSelectId = row.id;
659
- return true;
660
- };
661
- /**判断row是否选中 */
662
- this.selectedcheckbox = (id) => {
663
- return this.selectedTable.some(el => el.id == id);
664
- };
665
760
  /**创建图片的接口,代理中的file类型不匹配,切换为any类型 */
666
761
  this.createFile = (input, config) => this.restService.request({
667
762
  method: 'POST',
668
763
  url: '/api/file-explorer/files',
669
- params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
764
+ params: {
765
+ containerName: input.containerName,
766
+ cellName: input.cellName,
767
+ directoryId: input.directoryId,
768
+ entityId: input.entityId,
769
+ },
670
770
  body: input.file,
671
771
  }, { apiName: 'FileExplorer', ...config });
672
- that = this;
772
+ /**文件表格-选择的表格数据项 */
773
+ this.selectedTable = [];
774
+ /**当前选择的table项 id */
775
+ this.nowSelectId = '';
776
+ /**是否全选 */
777
+ this.isAllSelected = false;
778
+ /**判断row是否选中 */
779
+ this.selectedcheckbox = id => {
780
+ return this.selectedTable.some(el => el.id === id);
781
+ };
782
+ /**当前编辑的row */
783
+ this.newEditRow = '';
784
+ /**是否正在加载 */
785
+ this.isloading = false;
673
786
  }
674
787
  /**获取目录配置 */
675
788
  getFilesConfiguration() {
676
- this._FileDescriptorService.getFileContainerConfiguration(this._fileContainerName).subscribe(res => {
677
- this.createDirectoryPermissionName = res?.createDirectoryPermissionName;
789
+ return new Promise((resolve, reject) => {
790
+ this._FileDescriptorService
791
+ .getFileContainerConfiguration(this._fileContainerName)
792
+ .subscribe(res => {
793
+ this.createDirectoryPermissionName = res?.createDirectoryPermissionName;
794
+ resolve(res);
795
+ });
678
796
  });
679
797
  }
680
798
  set fileContainerName(v) {
681
799
  if (v) {
682
800
  this._fileContainerName = v;
683
- this.loadData();
801
+ // this.loadData()
684
802
  }
685
803
  }
686
804
  set multiple(v) {
687
805
  this._multiple = v;
688
- if (v) { }
689
806
  }
690
807
  set limit(v) {
691
808
  this.sizeLimit = v;
@@ -700,52 +817,98 @@ class FileModalComponent {
700
817
  /**模态框-状态改变回调 */
701
818
  ModalVisibleChange(event) {
702
819
  if (!event) {
820
+ this.ModalOpen = false;
821
+ this.ModalBusy = false;
703
822
  this.visibleChange.emit(event);
823
+ this.createDirectoryPermissionName = '';
824
+ this._theSelectedTreeNode = '';
825
+ this.selectedTable = [];
826
+ this.uploadPictureStatusList = [];
704
827
  return;
705
828
  }
706
829
  }
707
830
  /**模态框保存 */
708
831
  modalSave() {
709
- let selectedTablearr = this._FileApiService.deepClone(this.selectedTable);
832
+ const selectedTablearr = this._FileApiService.deepClone(this.selectedTable);
710
833
  this.selectFilefn.emit(selectedTablearr);
711
834
  this.ModalVisibleChange(false);
712
835
  }
713
836
  /**初始化数据 */
714
837
  loadData() {
715
838
  if (this.ModalOpen && this._fileContainerName) {
716
- this.hookToQuery();
839
+ this.list.maxResultCount = 100;
840
+ // this.filters.skipCount = 0;
717
841
  this.getFilesConfiguration();
842
+ if (!this.isCreateList) {
843
+ this.hookToQuery();
844
+ this.isCreateList = true;
845
+ }
846
+ else {
847
+ this.list.get();
848
+ }
849
+ }
850
+ }
851
+ /** 从tree获取数据 */
852
+ treeNodeData(event) {
853
+ this.fileGroupList = this.flattenNestedArray(event);
854
+ }
855
+ /**
856
+ * 将嵌套数组扁平化
857
+ * @param {Array} nestedArray - 包含嵌套children的数组
858
+ * @returns {Array} - 扁平化后的数组
859
+ */
860
+ flattenNestedArray(nestedArray) {
861
+ const result = [];
862
+ function flatten(items) {
863
+ if (!items)
864
+ return;
865
+ for (const item of items) {
866
+ // 将当前项添加到结果数组
867
+ result.push({ ...item });
868
+ // 如果有children属性且是数组,递归处理
869
+ if (item.children && Array.isArray(item.children)) {
870
+ flatten(item.children);
871
+ }
872
+ }
718
873
  }
874
+ flatten(nestedArray);
875
+ return result;
719
876
  }
720
877
  /**tree-节点选择 */
721
878
  _nodeClick(event) {
879
+ this.filters.skipCount = 0;
722
880
  this._theSelectedTreeNode = event;
723
881
  this.list.get();
724
882
  }
725
883
  /**图片上传-获取文件信息改变 */
726
884
  async getFileChange(event) {
727
- let files = new Array(...event.target.files);
885
+ const _that = this;
886
+ const files = new Array(...event.target.files);
728
887
  this.uploadPictureStatusList = files;
888
+ const uploadPromises = [];
729
889
  for (const file of files) {
730
890
  if (file.size > this.sizeLimit) {
731
891
  this.setuploadPictureStatus(file, 2);
732
892
  continue;
733
893
  }
734
- await this.uploadingFile(file).then(() => {
894
+ uploadPromises.push(this.uploadingFile(file)
895
+ .then(res => {
735
896
  this.setuploadPictureStatus(file, 1);
736
- this.list.get();
737
- }).catch(() => {
897
+ })
898
+ .catch(function (err) {
738
899
  this.setuploadPictureStatus(file, 2);
739
- }); // 等待每个文件上传完成
740
- }
741
- this.list.get();
742
- let isSubmit = !this.uploadPictureStatusList.some(el => el.status == 2);
743
- if (isSubmit) {
744
- // this.toaster.success("上传完成");
745
- setTimeout(() => {
746
- this.uploadPictureStatusList = [];
747
- }, 6000);
900
+ return err;
901
+ }));
748
902
  }
903
+ Promise.all(uploadPromises).then((results) => {
904
+ _that.list.get();
905
+ const isSubmit = !_that.uploadPictureStatusList.some(el => el.status == 2);
906
+ if (isSubmit) {
907
+ setTimeout(() => {
908
+ _that.uploadPictureStatusList = [];
909
+ }, 4000);
910
+ }
911
+ });
749
912
  }
750
913
  /**图片上传-设置uploadPictureStatusList的状态 */
751
914
  setuploadPictureStatus(file, type) {
@@ -757,49 +920,165 @@ class FileModalComponent {
757
920
  /**图片上传-递归按顺序上传 */
758
921
  uploadingFile(file) {
759
922
  return new Promise((resolve, rejects) => {
760
- let formData = new FormData();
923
+ const formData = new FormData();
761
924
  formData.append('file', file, file.name);
762
925
  this.createFile({
763
926
  file: formData,
764
927
  containerName: this._fileContainerName,
765
928
  directoryId: this._theSelectedTreeNode?.key || '',
766
- entityId: ''
929
+ entityId: '',
767
930
  }).subscribe(res => {
768
- resolve(true);
769
- }, (err) => {
770
- rejects(false);
931
+ resolve({ file: file.name, status: 'success', response: res });
932
+ }, err => {
933
+ rejects({ file: file.name, status: 'fail', error: err });
771
934
  });
772
935
  });
773
936
  }
774
- ngOnChanges(changes) {
775
- //Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
776
- //Add '${implements OnChanges}' to the class.
777
- this.selectedTable = this._FileApiService.deepClone(this.selectPickerFile);
778
- }
779
937
  /**文件表格-获取表格数据 */
780
938
  hookToQuery() {
781
939
  const getData = (query) => this._FileService.getList({
782
940
  ...query,
783
941
  ...this.filters,
784
942
  containerName: this._fileContainerName,
785
- directoryId: this._theSelectedTreeNode.key
943
+ directoryId: this._theSelectedTreeNode.key,
786
944
  });
787
- const setData = (list) => (this.data = list);
945
+ const setData = (list) => {
946
+ this.data = list;
947
+ this.onPageChange(list.items);
948
+ };
788
949
  this.list.hookToQuery(getData).subscribe(setData);
789
950
  }
790
951
  /**文件表格-查看所有分组的文件数据 */
791
952
  lookAllFile() {
953
+ this.filters.skipCount = 0;
792
954
  this._theSelectedTreeNode = '';
793
955
  this.list.get();
794
956
  }
795
- /**选择表格项 */
796
- onSelectTableItem({ selected }) {
797
- this.selectedTable = this._FileApiService.deepClone(selected);
798
- let selectedTablearr = this.removeDuplicatesById(this.selectedTable);
799
- if (selected.length > selectedTablearr.length) {
800
- selectedTablearr = selectedTablearr.filter(el => el.id !== this.nowSelectId);
957
+ /**删除图片 */
958
+ deleteFile(file) {
959
+ this._FileService.delete(file.id).subscribe(res => {
960
+ this.toaster.success(this._LocalizationService.instant(`FileExplorer::DeletedSuccessfully`));
961
+ this.list.get();
962
+ const selectedTables = this.selectedTable;
963
+ this.selectedTable = selectedTables.filter(el => el.id != file.id);
964
+ });
965
+ }
966
+ /**删除所有选中图片 */
967
+ onDeleteAllSelectFile() {
968
+ this.confirmation
969
+ .warn('', {
970
+ key: '',
971
+ defaultValue: this._LocalizationService.instant(`FileExplorer::AreYouSure`),
972
+ })
973
+ .subscribe(async (status) => {
974
+ if (status == 'confirm') {
975
+ const selectedTable = this.selectedTable;
976
+ try {
977
+ const result = await this.batchDeleteItems(selectedTable);
978
+ console.log(result, 'resultresultresult');
979
+ if (result.success) {
980
+ this.toaster.success(result.message);
981
+ this.list.get();
982
+ this.selectedTable = [];
983
+ // 可能需要刷新表格或更新UI
984
+ }
985
+ else {
986
+ //删除失败的项
987
+ this.list.get();
988
+ // 可以选择展示失败项或重试
989
+ this.selectedTable = result.failedItems;
990
+ }
991
+ }
992
+ catch (error) {
993
+ //批量删除过程中发生错误
994
+ }
995
+ }
996
+ });
997
+ }
998
+ /**
999
+ * 批量删除表格项
1000
+ * @param selectedTable 需要删除的表格项数组
1001
+ * @returns 包含成功状态和失败项的结果对象
1002
+ */
1003
+ async batchDeleteItems(selectedTable) {
1004
+ // 存储所有删除请求的Promise
1005
+ const deletePromises = selectedTable.map(item => {
1006
+ return new Promise((resolve, reject) => {
1007
+ this._FileService.delete(item.id).subscribe(() => {
1008
+ resolve(null);
1009
+ }, () => {
1010
+ reject(item);
1011
+ });
1012
+ });
1013
+ });
1014
+ // 等待所有请求完成
1015
+ const results = await Promise.allSettled(deletePromises);
1016
+ // 收集失败的项
1017
+ const failedItems = [];
1018
+ results.forEach(result => {
1019
+ if (result.status === 'rejected') {
1020
+ failedItems.push(result.reason);
1021
+ }
1022
+ });
1023
+ return {
1024
+ success: failedItems.length === 0,
1025
+ failedItems,
1026
+ message: failedItems.length === 0
1027
+ ? this._LocalizationService.instant(`FileExplorer::DeletedSuccessfully`)
1028
+ : `${failedItems.length}个项删除失败`,
1029
+ };
1030
+ }
1031
+ // 使用示例
1032
+ async handleBatchDelete() { }
1033
+ /**关闭文件状态弹窗 */
1034
+ closeFileStatusModal() {
1035
+ this.uploadPictureStatusList = [];
1036
+ }
1037
+ ngOnChanges(changes) {
1038
+ //Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
1039
+ //Add '${implements OnChanges}' to the class.
1040
+ this.selectedTable = this._FileApiService.deepClone(this.selectPickerFile);
1041
+ }
1042
+ /**表格分页切换 */
1043
+ onPageChange(newArray) {
1044
+ this.isAllSelected = this.isAllSelectedFn(newArray, this.selectedTable);
1045
+ }
1046
+ /**行选择框改变 */
1047
+ onCheckboxChangeFn(event, row, array) {
1048
+ const { checked } = event.target;
1049
+ let selectedTableArray = [...this.selectedTable];
1050
+ if (this._multiple) {
1051
+ if (checked) {
1052
+ selectedTableArray.push(row);
1053
+ }
1054
+ else {
1055
+ selectedTableArray = selectedTableArray.filter(el => el.id != row.id);
1056
+ }
1057
+ this.isAllSelected = this.isAllSelectedFn(array, selectedTableArray);
1058
+ }
1059
+ else {
1060
+ selectedTableArray.length = 0;
1061
+ selectedTableArray = checked ? [row] : [];
1062
+ }
1063
+ this.selectedTable = this.removeDuplicatesById(selectedTableArray);
1064
+ }
1065
+ /**如果selectedTableArray不含array中的所有项,则将isAllSelected设为true,否则设为false */
1066
+ isAllSelectedFn(tolalArray, selectedArray = []) {
1067
+ if (tolalArray.length == 0)
1068
+ return false;
1069
+ return tolalArray.every(item => selectedArray.some(el => el.id === item.id));
1070
+ }
1071
+ /**选择当前页全部 */
1072
+ onSelectAllFn(event, array) {
1073
+ let selectedTableArray = this.selectedTable;
1074
+ if (event.target.checked) {
1075
+ selectedTableArray = this.removeDuplicatesById([...selectedTableArray, ...array]);
1076
+ }
1077
+ else {
1078
+ selectedTableArray = selectedTableArray.filter(el => !array.some(item => item.id === el.id));
801
1079
  }
802
- this.selectedTable = selectedTablearr;
1080
+ this.isAllSelected = event.target.checked;
1081
+ this.selectedTable = selectedTableArray;
803
1082
  }
804
1083
  /**删除数组中重复的项 */
805
1084
  removeDuplicatesById(array) {
@@ -812,32 +1091,61 @@ class FileModalComponent {
812
1091
  return false;
813
1092
  });
814
1093
  }
815
- /**删除图片 */
816
- deleteFile(file) {
817
- this.confirmation
818
- .warn('', { key: '', defaultValue: this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`) })
819
- .subscribe((status) => {
820
- if (status == 'confirm') {
821
- this._FileService.delete(file.id).subscribe(res => {
822
- this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
823
- this.list.get();
824
- });
1094
+ /**提交FileName编辑 */
1095
+ onSubmitFileName(event) {
1096
+ const input = this.FileNameForm.value;
1097
+ if (!this.FileNameForm.valid)
1098
+ return;
1099
+ if (this.isloading)
1100
+ return;
1101
+ this.isloading = true;
1102
+ this._FileService
1103
+ .update(input.id, {
1104
+ name: input.fileName,
1105
+ })
1106
+ .pipe(finalize(() => {
1107
+ this.isloading = false;
1108
+ }))
1109
+ .subscribe(res => {
1110
+ //通过当前newEditRow的id,修改data.items中对应项的name
1111
+ for (const element of this.data.items) {
1112
+ if (element.id == this.newEditRow.id) {
1113
+ element.name = input.fileName;
1114
+ break;
1115
+ }
825
1116
  }
1117
+ this.FileNameForm = undefined;
1118
+ this.newEditRow = '';
1119
+ this.toaster.success(this._LocalizationService.instant(`FileExplorer::SavedSuccessfully`));
1120
+ // this.list.get();
826
1121
  });
827
1122
  }
828
- /**关闭文件状态弹窗 */
829
- closeFileStatusModal() {
830
- this.uploadPictureStatusList = [];
1123
+ /**打开编辑 */
1124
+ onEditFileName(row) {
1125
+ this.FileNameForm = new FormGroup({
1126
+ fileName: new FormControl('', [Validators.required]),
1127
+ id: new FormControl('', [Validators.required]),
1128
+ });
1129
+ this.FileNameForm.patchValue({
1130
+ fileName: row.name,
1131
+ id: row.id,
1132
+ });
1133
+ this.newEditRow = row;
1134
+ }
1135
+ /**关闭编辑 */
1136
+ onCancelFileName(row) {
1137
+ this.newEditRow = '';
1138
+ this.FileNameForm = undefined;
831
1139
  }
832
1140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalComponent, deps: [{ token: FileDescriptorService$1 }, { token: i2$1.ToasterService }, { token: i3.ListService }, { token: FileApiService }, { token: i3.RestService }, { token: i2$1.ConfirmationService }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
833
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileModalComponent, selector: "fe-file-modal", inputs: { fileContainerName: "fileContainerName", multiple: "multiple", limit: "limit", visible: "visible", selectPickerFile: "selectPickerFile" }, outputs: { visibleChange: "visibleChange", selectFilefn: "selectFilefn" }, providers: [
1141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: FileModalComponent, selector: "fe-file-modal", inputs: { fileContainerName: "fileContainerName", multiple: "multiple", limit: "limit", visible: "visible", selectPickerFile: "selectPickerFile" }, outputs: { visibleChange: "visibleChange", selectFilefn: "selectFilefn" }, providers: [
834
1142
  // [Required]
835
1143
  ListService,
836
1144
  // [Optional]
837
1145
  // Provide this token if you want a different debounce time.
838
1146
  // Default is 300. Cannot be 0. Any value below 100 is not recommended.
839
1147
  { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
840
- ], usesOnChanges: true, ngImport: i0, template: "<abp-modal [(visible)]=\"ModalOpen\" (visibleChange)=\"ModalVisibleChange($event)\"\n [options]=\"{ size: 'xl', scrollable: false }\">\n <ng-template #abpHeader>\n <h3>{{'FileExplorer::FileExplorer' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <div class=\"row file-explorer-modal-body file-modal\">\n <div class=\"col-3\" *ngIf=\"createDirectoryPermissionName\" style=\"overflow: auto; height: calc(100vh - 240px)\">\n <fe-file-modal-tree [theSelectedTreeNode]=\"_theSelectedTreeNode\" (nodeClick)=\"_nodeClick($event)\"\n [fileContainerName]=\"_fileContainerName\"></fe-file-modal-tree>\n </div>\n <div [class]=\"createDirectoryPermissionName?'col-9':'col-12'\" style=\"height: calc(100vh - 240px)\">\n <div class=\"mb-3 d-flex justify-content-between align-items-center\">\n <div class=\"btn-link\" role=button style=\"flex: 2\" (click)=\"lookAllFile()\">{{'FileExplorer::AllFiles' | abpLocalization}}</div>\n <div class=\"input-group form-file\" style=\"flex: 2\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" \n (change)=\"getFileChange($event)\" />\n </div>\n </div>\n <div>\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\" columnMode=\"flex\"\n [columns]=\"columns\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [scrollbarV]=\"true\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [selected]=\"selectedTable\"\n [selectCheck]=\"selectCheck\" [selectionType]=\"_multiple?SelectionType.multiClick:SelectionType.single\" (select)=\"onSelectTableItem($event)\">\n <ngx-datatable-column [width]=\"50\" prop=\"id\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\"\n [resizeable]=\"false\">\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\n let-selectFn=\"selectFn\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"allRowsSelected\"\n (change)=\"selectFn(!allRowsSelected)\" />\n </ng-template>\n <ng-template ngx-datatable-cell-template let-row=\"row\" let-value=\"value\" let-isSelected=\"isSelected\"\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"selectedcheckbox(value)\"\n (change)=\"onCheckboxChangeFn($event)\" />\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <fe-file-preview [width]=\"'80px'\" [src]=\"row.url\" [name]=\"row.name\" [type]=\"row.mimeType\" [preview]=\"true\"></fe-file-preview>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileName' | abpLocalization\" prop=\"name\" [flexGrow]=\"4\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileSize' | abpLocalization\" prop=\"size\" [flexGrow]=\"1.5\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ _FileApiService.formatFileSize(value) }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::Directory' | abpLocalization\" prop=\"cellName\" [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::CreationTime' | abpLocalization\" prop=\"creationTime\" [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'YYYY/MM/dd HH:mm:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <button class=\"btn btn-sm btn-light p-0\" (click.stop)=\"deleteFile(row)\">\n <i class=\"fas fa-trash text-primary p-2\"></i>\n </button>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n <div *ngIf=\"uploadPictureStatusList.length > 0\"\n class=\"position-fixed bottom-0 end-0 shadow-lg file-status-modal m-5\"\n style=\"border-radius: 10px\">\n <div class=\"card p-1\">\n <div class=\"card-header d-flex align-items-center justify-content-between p-0 py-1 border-bottom\">\n <div>{{'FileExplorer::UploadFiles' | abpLocalization}}</div>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click.stop)=\"closeFileStatusModal()\"></button>\n </div>\n <div class=\"card-body\">\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploadPictureStatusList; let i = index\">\n <tr>\n <th scope=\"row\">\n <div>{{ item.name }}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' | abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}\n </div>\n </th>\n <td>{{ item.fileSize }}</td>\n <td>\n <i *ngIf=\"item.status === 1\" class=\"fas fa-check text-primary\"></i>\n <i *ngIf=\"item.status === 2\" class=\"fas fa-times-circle text-danger\"></i>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"modalSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .file-modal .container-height{height:calc(100vh - 284px)}::ng-deep .file-modal .file-status-modal{background:#fff}::ng-deep .file-modal .file-status-modal .card-body{max-height:300px;overflow-y:auto}::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active .datatable-row-group{background-color:transparent!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper{padding:0}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .custom-node{width:100%}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected{background-color:var(--lpx-brand)!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected .btn{color:var(--lpx-navbar-color)}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}::ng-deep .file-modal .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell,::ng-deep .file-modal .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{overflow:initial;line-break:anywhere}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i6.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i6.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"] }, { kind: "directive", type: i6.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i6.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i2$1.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$1.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: FileModalTreeComponent, selector: "fe-file-modal-tree", inputs: ["theSelectedTreeNode", "fileContainerName"], outputs: ["nodeClick"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1148
+ ], usesOnChanges: true, ngImport: i0, template: "<abp-modal [(visible)]=\"ModalOpen\" (visibleChange)=\"ModalVisibleChange($event)\"\n [options]=\"{ size: 'xl', scrollable: false }\">\n <ng-template #abpHeader>\n <h3>{{'FileExplorer::FileExplorer' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <div class=\"row file-explorer-modal-body file-modal\" *ngIf=\"ModalOpen\">\n <div class=\"col-3\" *ngIf=\"createDirectoryPermissionName\" style=\"overflow: auto; height: calc(100vh - 240px)\">\n <fe-file-modal-tree [theSelectedTreeNode]=\"_theSelectedTreeNode\" (nodeClick)=\"_nodeClick($event)\"\n (lookAllBtn)=\"lookAllFile()\" (treeNodeData)=\"treeNodeData($event)\"\n [fileContainerName]=\"_fileContainerName\"></fe-file-modal-tree>\n </div>\n <div [class]=\"createDirectoryPermissionName?'col-9':'col-12'\" style=\"height: calc(100vh - 240px)\">\n <div class=\"mb-3 d-flex justify-content-between align-items-center\">\n <div style=\"flex: 2\"><span *ngIf=\"selectedTable.length>1\" class=\"btn-link\"\n (click.stop)=\"onDeleteAllSelectFile()\" role=\"button\">{{'FileExplorer::Delete' | abpLocalization}}</span>\n </div>\n <div class=\"input-group form-file\" style=\"flex: 2\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" (change)=\"getFileChange($event)\" />\n </div>\n </div>\n <div>\n <!-- [selectionType]=\"_multiple?SelectionType.checkbox:SelectionType.single\" -->\n <!-- [selectCheck]=\"selectCheck\" -->\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\" columnMode=\"flex\"\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [scrollbarV]=\"true\" [virtualization]=\"false\"\n [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [width]=\"50\" prop=\"id\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\"\n [resizeable]=\"false\">\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\n let-selectFn=\"selectFn\">\n <input type=\"checkbox\" class=\"form-check-input\" *ngIf=\"_multiple\" [checked]=\"isAllSelected\"\n (change)=\"onSelectAllFn($event,data.items)\" />\n </ng-template>\n <ng-template ngx-datatable-cell-template let-row=\"row\" let-value=\"value\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"selectedcheckbox(value)\"\n (change)=\"onCheckboxChangeFn($event,row,data.items)\" />\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <fe-file-preview [width]=\"'80px'\" [src]=\"row.url\" [name]=\"row.name\" [type]=\"row.mimeType\"\n [preview]=\"true\"></fe-file-preview>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileName' | abpLocalization\" prop=\"name\" [sortable]=\"false\"\n [flexGrow]=\"4\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div class=\"d-flex align-items-start titlehover\" *ngIf=\"newEditRow.id!==row.id\">\n <span class=\"me-2\">{{ value }}</span>\n <i class=\"fa fa-pencil-square-o\" role=\"button\" (click.stop)=\"onEditFileName(row)\" style=\"line-height:2;\" aria-hidden=\"true\"></i>\n </div>\n <div *ngIf=\"FileNameForm&&newEditRow.id===row.id\">\n <form [formGroup]=\"FileNameForm\" (ngSubmit)=\"onSubmitFileName($event)\">\n <div class=\"d-flex align-items-start\">\n <div class=\"me-2\">\n <input class=\"form-control \" type=\"text\" formControlName=\"fileName\">\n </div>\n <button class=\" btn btn-sm\" type=\"submit\">\n <i class=\"fa-spin fa fa-spinner\" *ngIf=\"isloading\"></i>\n <i class=\"fa fa-check\" aria-hidden=\"true\" *ngIf=\"!isloading\"></i></button>\n <button class=\" btn btn-sm\" (click.stop)=\"onCancelFileName(row)\"><i class=\"fa fa-times\" type=\"reset\" aria-hidden=\"true\"></i></button>\n \n </div>\n </form>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileSize' | abpLocalization\" prop=\"size\" [flexGrow]=\"1.5\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ _FileApiService.formatFileSize(value) }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::Directory' | abpLocalization\" prop=\"directoryId\"\n [sortable]=\"false\" [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|getDirectoryName:fileGroupList }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::CreationTime' | abpLocalization\" prop=\"creationTime\"\n [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'YYYY/MM/dd HH:mm:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"1\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <button class=\"btn btn-sm btn-light p-0\" (click.stop)=\"deleteFile(row)\">\n <i class=\"fas fa-trash text-primary p-2\"></i>\n </button>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n <div *ngIf=\"uploadPictureStatusList.length > 0\"\n class=\"position-fixed bottom-0 end-0 shadow-lg file-status-modal m-5\" style=\"border-radius: 10px\">\n <div class=\"card p-1\">\n <div class=\"card-header d-flex align-items-center justify-content-between p-0 py-1 border-bottom\">\n <div>{{'FileExplorer::UploadFiles' | abpLocalization}}</div>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click.stop)=\"closeFileStatusModal()\"></button>\n </div>\n <div class=\"card-body\">\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploadPictureStatusList; let i = index\">\n <tr>\n <th scope=\"row\">\n <div>{{ item.name }}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' |\n abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}\n </div>\n </th>\n <td>{{ item.fileSize }}</td>\n <td>\n <i *ngIf=\"item.status === 1\" class=\"fas fa-check text-primary\"></i>\n <i *ngIf=\"item.status === 2\" class=\"fas fa-times-circle text-danger\"></i>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"modalSave()\">{{'FileExplorer::Confirm' | abpLocalization}}\n @if(selectedTable.length>0){\n ({{selectedTable.length}})\n }\n </abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .file-modal .container-height{height:calc(100vh - 284px)}::ng-deep .file-modal .file-status-modal{background:#fff}::ng-deep .file-modal .file-status-modal .card-body{max-height:300px;overflow-y:auto}::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active .datatable-row-group{background-color:transparent!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper{padding:0}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .ng-star-inserted[title]{padding:0 10px}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .custom-node{width:100%}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected{background-color:var(--lpx-brand)!important;color:var(--lpx-brand-text)}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}::ng-deep .file-modal .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell,::ng-deep .file-modal .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{overflow:initial;line-break:anywhere}::ng-deep .file-modal input[type=checkbox]{cursor:pointer}::ng-deep .file-modal .titlehover i{display:none}::ng-deep .file-modal .titlehover:hover i{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i7.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i7.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"] }, { kind: "directive", type: i7.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i7.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i2$1.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i2$1.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i2$1.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: FileModalTreeComponent, selector: "fe-file-modal-tree", inputs: ["theSelectedTreeNode", "fileContainerName"], outputs: ["nodeClick", "treeNodeData", "lookAllBtn"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name", "className"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: GetDirectoryNamePipe, name: "getDirectoryName" }] }); }
841
1149
  }
842
1150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalComponent, decorators: [{
843
1151
  type: Component,
@@ -848,7 +1156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
848
1156
  // Provide this token if you want a different debounce time.
849
1157
  // Default is 300. Cannot be 0. Any value below 100 is not recommended.
850
1158
  { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
851
- ], template: "<abp-modal [(visible)]=\"ModalOpen\" (visibleChange)=\"ModalVisibleChange($event)\"\n [options]=\"{ size: 'xl', scrollable: false }\">\n <ng-template #abpHeader>\n <h3>{{'FileExplorer::FileExplorer' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <div class=\"row file-explorer-modal-body file-modal\">\n <div class=\"col-3\" *ngIf=\"createDirectoryPermissionName\" style=\"overflow: auto; height: calc(100vh - 240px)\">\n <fe-file-modal-tree [theSelectedTreeNode]=\"_theSelectedTreeNode\" (nodeClick)=\"_nodeClick($event)\"\n [fileContainerName]=\"_fileContainerName\"></fe-file-modal-tree>\n </div>\n <div [class]=\"createDirectoryPermissionName?'col-9':'col-12'\" style=\"height: calc(100vh - 240px)\">\n <div class=\"mb-3 d-flex justify-content-between align-items-center\">\n <div class=\"btn-link\" role=button style=\"flex: 2\" (click)=\"lookAllFile()\">{{'FileExplorer::AllFiles' | abpLocalization}}</div>\n <div class=\"input-group form-file\" style=\"flex: 2\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" \n (change)=\"getFileChange($event)\" />\n </div>\n </div>\n <div>\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\" columnMode=\"flex\"\n [columns]=\"columns\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [scrollbarV]=\"true\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [selected]=\"selectedTable\"\n [selectCheck]=\"selectCheck\" [selectionType]=\"_multiple?SelectionType.multiClick:SelectionType.single\" (select)=\"onSelectTableItem($event)\">\n <ngx-datatable-column [width]=\"50\" prop=\"id\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\"\n [resizeable]=\"false\">\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\n let-selectFn=\"selectFn\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"allRowsSelected\"\n (change)=\"selectFn(!allRowsSelected)\" />\n </ng-template>\n <ng-template ngx-datatable-cell-template let-row=\"row\" let-value=\"value\" let-isSelected=\"isSelected\"\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"selectedcheckbox(value)\"\n (change)=\"onCheckboxChangeFn($event)\" />\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <fe-file-preview [width]=\"'80px'\" [src]=\"row.url\" [name]=\"row.name\" [type]=\"row.mimeType\" [preview]=\"true\"></fe-file-preview>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileName' | abpLocalization\" prop=\"name\" [flexGrow]=\"4\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileSize' | abpLocalization\" prop=\"size\" [flexGrow]=\"1.5\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ _FileApiService.formatFileSize(value) }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::Directory' | abpLocalization\" prop=\"cellName\" [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::CreationTime' | abpLocalization\" prop=\"creationTime\" [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'YYYY/MM/dd HH:mm:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <button class=\"btn btn-sm btn-light p-0\" (click.stop)=\"deleteFile(row)\">\n <i class=\"fas fa-trash text-primary p-2\"></i>\n </button>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n <div *ngIf=\"uploadPictureStatusList.length > 0\"\n class=\"position-fixed bottom-0 end-0 shadow-lg file-status-modal m-5\"\n style=\"border-radius: 10px\">\n <div class=\"card p-1\">\n <div class=\"card-header d-flex align-items-center justify-content-between p-0 py-1 border-bottom\">\n <div>{{'FileExplorer::UploadFiles' | abpLocalization}}</div>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click.stop)=\"closeFileStatusModal()\"></button>\n </div>\n <div class=\"card-body\">\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploadPictureStatusList; let i = index\">\n <tr>\n <th scope=\"row\">\n <div>{{ item.name }}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' | abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}\n </div>\n </th>\n <td>{{ item.fileSize }}</td>\n <td>\n <i *ngIf=\"item.status === 1\" class=\"fas fa-check text-primary\"></i>\n <i *ngIf=\"item.status === 2\" class=\"fas fa-times-circle text-danger\"></i>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"modalSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .file-modal .container-height{height:calc(100vh - 284px)}::ng-deep .file-modal .file-status-modal{background:#fff}::ng-deep .file-modal .file-status-modal .card-body{max-height:300px;overflow-y:auto}::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active .datatable-row-group{background-color:transparent!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper{padding:0}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .custom-node{width:100%}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected{background-color:var(--lpx-brand)!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected .btn{color:var(--lpx-navbar-color)}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}::ng-deep .file-modal .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell,::ng-deep .file-modal .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{overflow:initial;line-break:anywhere}\n"] }]
1159
+ ], template: "<abp-modal [(visible)]=\"ModalOpen\" (visibleChange)=\"ModalVisibleChange($event)\"\n [options]=\"{ size: 'xl', scrollable: false }\">\n <ng-template #abpHeader>\n <h3>{{'FileExplorer::FileExplorer' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <div class=\"row file-explorer-modal-body file-modal\" *ngIf=\"ModalOpen\">\n <div class=\"col-3\" *ngIf=\"createDirectoryPermissionName\" style=\"overflow: auto; height: calc(100vh - 240px)\">\n <fe-file-modal-tree [theSelectedTreeNode]=\"_theSelectedTreeNode\" (nodeClick)=\"_nodeClick($event)\"\n (lookAllBtn)=\"lookAllFile()\" (treeNodeData)=\"treeNodeData($event)\"\n [fileContainerName]=\"_fileContainerName\"></fe-file-modal-tree>\n </div>\n <div [class]=\"createDirectoryPermissionName?'col-9':'col-12'\" style=\"height: calc(100vh - 240px)\">\n <div class=\"mb-3 d-flex justify-content-between align-items-center\">\n <div style=\"flex: 2\"><span *ngIf=\"selectedTable.length>1\" class=\"btn-link\"\n (click.stop)=\"onDeleteAllSelectFile()\" role=\"button\">{{'FileExplorer::Delete' | abpLocalization}}</span>\n </div>\n <div class=\"input-group form-file\" style=\"flex: 2\">\n <input type=\"file\" class=\"form-control\" #fileEdit [multiple]=\"_multiple\" (change)=\"getFileChange($event)\" />\n </div>\n </div>\n <div>\n <!-- [selectionType]=\"_multiple?SelectionType.checkbox:SelectionType.single\" -->\n <!-- [selectCheck]=\"selectCheck\" -->\n <ngx-datatable class=\"material container-height\" [rows]=\"data.items\" [list]=\"list\" columnMode=\"flex\"\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [scrollbarV]=\"true\" [virtualization]=\"false\"\n [externalPaging]=\"true\" [count]=\"data.totalCount\">\n <ngx-datatable-column [width]=\"50\" prop=\"id\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\"\n [resizeable]=\"false\">\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\n let-selectFn=\"selectFn\">\n <input type=\"checkbox\" class=\"form-check-input\" *ngIf=\"_multiple\" [checked]=\"isAllSelected\"\n (change)=\"onSelectAllFn($event,data.items)\" />\n </ng-template>\n <ng-template ngx-datatable-cell-template let-row=\"row\" let-value=\"value\">\n <input type=\"checkbox\" class=\"form-check-input\" [checked]=\"selectedcheckbox(value)\"\n (change)=\"onCheckboxChangeFn($event,row,data.items)\" />\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <fe-file-preview [width]=\"'80px'\" [src]=\"row.url\" [name]=\"row.name\" [type]=\"row.mimeType\"\n [preview]=\"true\"></fe-file-preview>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileName' | abpLocalization\" prop=\"name\" [sortable]=\"false\"\n [flexGrow]=\"4\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div class=\"d-flex align-items-start titlehover\" *ngIf=\"newEditRow.id!==row.id\">\n <span class=\"me-2\">{{ value }}</span>\n <i class=\"fa fa-pencil-square-o\" role=\"button\" (click.stop)=\"onEditFileName(row)\" style=\"line-height:2;\" aria-hidden=\"true\"></i>\n </div>\n <div *ngIf=\"FileNameForm&&newEditRow.id===row.id\">\n <form [formGroup]=\"FileNameForm\" (ngSubmit)=\"onSubmitFileName($event)\">\n <div class=\"d-flex align-items-start\">\n <div class=\"me-2\">\n <input class=\"form-control \" type=\"text\" formControlName=\"fileName\">\n </div>\n <button class=\" btn btn-sm\" type=\"submit\">\n <i class=\"fa-spin fa fa-spinner\" *ngIf=\"isloading\"></i>\n <i class=\"fa fa-check\" aria-hidden=\"true\" *ngIf=\"!isloading\"></i></button>\n <button class=\" btn btn-sm\" (click.stop)=\"onCancelFileName(row)\"><i class=\"fa fa-times\" type=\"reset\" aria-hidden=\"true\"></i></button>\n \n </div>\n </form>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::FileSize' | abpLocalization\" prop=\"size\" [flexGrow]=\"1.5\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ _FileApiService.formatFileSize(value) }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::Directory' | abpLocalization\" prop=\"directoryId\"\n [sortable]=\"false\" [flexGrow]=\"1\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|getDirectoryName:fileGroupList }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'FileExplorer::CreationTime' | abpLocalization\" prop=\"creationTime\"\n [flexGrow]=\"2\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'YYYY/MM/dd HH:mm:s' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [flexGrow]=\"1\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <button class=\"btn btn-sm btn-light p-0\" (click.stop)=\"deleteFile(row)\">\n <i class=\"fas fa-trash text-primary p-2\"></i>\n </button>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n <div *ngIf=\"uploadPictureStatusList.length > 0\"\n class=\"position-fixed bottom-0 end-0 shadow-lg file-status-modal m-5\" style=\"border-radius: 10px\">\n <div class=\"card p-1\">\n <div class=\"card-header d-flex align-items-center justify-content-between p-0 py-1 border-bottom\">\n <div>{{'FileExplorer::UploadFiles' | abpLocalization}}</div>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click.stop)=\"closeFileStatusModal()\"></button>\n </div>\n <div class=\"card-body\">\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of uploadPictureStatusList; let i = index\">\n <tr>\n <th scope=\"row\">\n <div>{{ item.name }}</div>\n <div class=\"form-text text-danger\" *ngIf=\"item.size > sizeLimit\">\n {{'FileExplorer::ExceedsMaximumSize' |\n abpLocalization:_FileApiService.formatFileSize(sizeLimit)}}\n </div>\n </th>\n <td>{{ item.fileSize }}</td>\n <td>\n <i *ngIf=\"item.status === 1\" class=\"fas fa-check text-primary\"></i>\n <i *ngIf=\"item.status === 2\" class=\"fas fa-times-circle text-danger\"></i>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"modalSave()\">{{'FileExplorer::Confirm' | abpLocalization}}\n @if(selectedTable.length>0){\n ({{selectedTable.length}})\n }\n </abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .file-modal .container-height{height:calc(100vh - 284px)}::ng-deep .file-modal .file-status-modal{background:#fff}::ng-deep .file-modal .file-status-modal .card-body{max-height:300px;overflow-y:auto}::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-selection .datatable-body-row.active .datatable-row-group,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active,::ng-deep .file-modal .ngx-datatable.material.multi-click-selection .datatable-body-row.active .datatable-row-group{background-color:transparent!important}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper{padding:0}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .ng-star-inserted[title]{padding:0 10px}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .custom-node{width:100%}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper .selected{background-color:var(--lpx-brand)!important;color:var(--lpx-brand-text)}::ng-deep .file-modal .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}::ng-deep .file-modal .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell,::ng-deep .file-modal .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{overflow:initial;line-break:anywhere}::ng-deep .file-modal input[type=checkbox]{cursor:pointer}::ng-deep .file-modal .titlehover i{display:none}::ng-deep .file-modal .titlehover:hover i{display:block}\n"] }]
852
1160
  }], ctorParameters: () => [{ type: FileDescriptorService$1 }, { type: i2$1.ToasterService }, { type: i3.ListService }, { type: FileApiService }, { type: i3.RestService }, { type: i2$1.ConfirmationService }, { type: i3.LocalizationService }], propDecorators: { fileContainerName: [{
853
1161
  type: Input
854
1162
  }], multiple: [{
@@ -859,10 +1167,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
859
1167
  type: Input
860
1168
  }], visibleChange: [{
861
1169
  type: Output
862
- }], selectPickerFile: [{
863
- type: Input
864
1170
  }], selectFilefn: [{
865
1171
  type: Output
1172
+ }], selectPickerFile: [{
1173
+ type: Input
866
1174
  }] } });
867
1175
 
868
1176
  /* eslint-disable @angular-eslint/component-selector */
@@ -904,12 +1212,19 @@ class FilePickerComponent {
904
1212
  this.selectedFileChange.emit([]);
905
1213
  this.selectedFileChange.emit(this.selectFormFile);
906
1214
  }
1215
+ /**调整表格位置 */
1216
+ drop(event) {
1217
+ moveItemInArray(this._fileShowTable, event.previousIndex, event.currentIndex);
1218
+ this.selectFormFile = this._fileShowTable;
1219
+ this.selectedFileChange.emit(this.selectFormFile);
1220
+ // this._fileShowTable.updateValueAndValidity()
1221
+ }
907
1222
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePickerComponent, deps: [{ token: FileApiService }], target: i0.ɵɵFactoryTarget.Component }); }
908
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FilePickerComponent, selector: "fe-file-picker", inputs: { multiple: "multiple", fileContainerName: "fileContainerName", selectFormFile: "selectFormFile" }, outputs: { selectedFileChange: "selectedFileChange" }, usesOnChanges: true, ngImport: i0, template: "<button class=\"btn btn-sm btn-primary ms-2 float-end\" type=\"button\" (click.stop)=\"ModalOpen = true\">{{'FileExplorer::SelectFile' | abpLocalization}}</button>\n<fe-file-modal [(visible)]=\"ModalOpen\" [selectPickerFile]=\"selectFormFile\" [multiple]=\"_multiple\" (selectFilefn)=\"_selectFilefn($event)\" [fileContainerName]=\"_fileContainerName\"></fe-file-modal>\n<table class=\"table\" *ngIf=\"_fileShowTable.length>0\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of _fileShowTable;let i =index\">\n <tr>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.url||item.Url\" [name]=\"item.name||item.Name\" [type]=\"item.mimeType||item.MimeType\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name||item.Name}}</div>\n </th>\n <td >{{_FileApiService.formatFileSize(item.Size||item.size)}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>\n\n\n", styles: [".table{border-collapse:collapse;table-layout:fixed}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: FileModalComponent, selector: "fe-file-modal", inputs: ["fileContainerName", "multiple", "limit", "visible", "selectPickerFile"], outputs: ["visibleChange", "selectFilefn"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1223
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FilePickerComponent, selector: "fe-file-picker", inputs: { multiple: "multiple", fileContainerName: "fileContainerName", selectFormFile: "selectFormFile" }, outputs: { selectedFileChange: "selectedFileChange" }, usesOnChanges: true, ngImport: i0, template: "<button class=\"btn btn-sm btn-dark soft ms-2 float-end\" type=\"button\"\n (click.stop)=\"ModalOpen = true\">{{'FileExplorer::SelectFile' | abpLocalization}}</button>\n\n<fe-file-modal [(visible)]=\"ModalOpen\" [selectPickerFile]=\"selectFormFile\" [multiple]=\"_multiple\"\n (selectFilefn)=\"_selectFilefn($event)\" [fileContainerName]=\"_fileContainerName\"></fe-file-modal>\n<table class=\"table\" *ngIf=\"_fileShowTable.length>0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\" style=\"width: 30px;\"></th>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of _fileShowTable;let i =index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.url||item.Url\" [name]=\"item.name||item.Name\"\n [type]=\"item.mimeType||item.MimeType\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name||item.Name}}</div>\n </th>\n <td>{{_FileApiService.formatFileSize(item.Size||item.size)}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>", styles: [".table{border-collapse:collapse;table-layout:fixed}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: FileModalComponent, selector: "fe-file-modal", inputs: ["fileContainerName", "multiple", "limit", "visible", "selectPickerFile"], outputs: ["visibleChange", "selectFilefn"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name", "className"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
909
1224
  }
910
1225
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePickerComponent, decorators: [{
911
1226
  type: Component,
912
- args: [{ selector: 'fe-file-picker', template: "<button class=\"btn btn-sm btn-primary ms-2 float-end\" type=\"button\" (click.stop)=\"ModalOpen = true\">{{'FileExplorer::SelectFile' | abpLocalization}}</button>\n<fe-file-modal [(visible)]=\"ModalOpen\" [selectPickerFile]=\"selectFormFile\" [multiple]=\"_multiple\" (selectFilefn)=\"_selectFilefn($event)\" [fileContainerName]=\"_fileContainerName\"></fe-file-modal>\n<table class=\"table\" *ngIf=\"_fileShowTable.length>0\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of _fileShowTable;let i =index\">\n <tr>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.url||item.Url\" [name]=\"item.name||item.Name\" [type]=\"item.mimeType||item.MimeType\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name||item.Name}}</div>\n </th>\n <td >{{_FileApiService.formatFileSize(item.Size||item.size)}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>\n\n\n", styles: [".table{border-collapse:collapse;table-layout:fixed}\n"] }]
1227
+ args: [{ selector: 'fe-file-picker', template: "<button class=\"btn btn-sm btn-dark soft ms-2 float-end\" type=\"button\"\n (click.stop)=\"ModalOpen = true\">{{'FileExplorer::SelectFile' | abpLocalization}}</button>\n\n<fe-file-modal [(visible)]=\"ModalOpen\" [selectPickerFile]=\"selectFormFile\" [multiple]=\"_multiple\"\n (selectFilefn)=\"_selectFilefn($event)\" [fileContainerName]=\"_fileContainerName\"></fe-file-modal>\n<table class=\"table\" *ngIf=\"_fileShowTable.length>0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\" style=\"width: 30px;\"></th>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'FileExplorer::FileName' | abpLocalization}}</th>\n <th scope=\"col\">{{'FileExplorer::FileSize' | abpLocalization}}</th>\n <th scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of _fileShowTable;let i =index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td>\n <fe-file-preview [width]=\"'80px'\" [src]=\"item.url||item.Url\" [name]=\"item.name||item.Name\"\n [type]=\"item.mimeType||item.MimeType\" [preview]=\"true\"></fe-file-preview>\n </td>\n <th scope=\"row\">\n <div>{{item.name||item.Name}}</div>\n </th>\n <td>{{_FileApiService.formatFileSize(item.Size||item.size)}}</td>\n <td>\n <button class=\"btn btn-sm p-0 btn-light \" (click.stop)=\"deleteFileTableItem(i,item)\">\n <i class=\"fas fa-trash p-2\"></i>\n </button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n</table>", styles: [".table{border-collapse:collapse;table-layout:fixed}\n"] }]
913
1228
  }], ctorParameters: () => [{ type: FileApiService }], propDecorators: { multiple: [{
914
1229
  type: Input
915
1230
  }], fileContainerName: [{
@@ -952,7 +1267,7 @@ const routes = [
952
1267
  ];
953
1268
  class FileExplorerRoutingModule {
954
1269
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
955
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
1270
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] }); }
956
1271
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
957
1272
  }
958
1273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, decorators: [{
@@ -1017,13 +1332,13 @@ class FileExplorerConfigComponent {
1017
1332
  resolve(true);
1018
1333
  });
1019
1334
  }
1020
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1021
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileExplorerConfigComponent, selector: "fe-file-explorer-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsFileExplorer::FileContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FileExplorer.FileContainerName\">\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"FileExplorer.UploadFileMultiple\" id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpDynamicFormsFileExplorer::UploadFileMultiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", 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]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1335
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerConfigComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1336
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileExplorerConfigComponent, selector: "fe-file-explorer-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsFileExplorer::FileContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FileExplorer.FileContainerName\">\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"FileExplorer.UploadFileMultiple\" id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpDynamicFormsFileExplorer::UploadFileMultiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1022
1337
  }
1023
1338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerConfigComponent, decorators: [{
1024
1339
  type: Component,
1025
1340
  args: [{ selector: 'fe-file-explorer-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsFileExplorer::FileContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"FileExplorer.FileContainerName\">\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"FileExplorer.UploadFileMultiple\" id=\"flexRadioDefault1\">\n <label class=\"form-check-label\" for=\"flexRadioDefault1\">\n {{'DigniteAbpDynamicFormsFileExplorer::UploadFileMultiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
1026
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
1341
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { type: [{
1027
1342
  type: Input
1028
1343
  }], Entity: [{
1029
1344
  type: Input
@@ -1044,6 +1359,8 @@ class FileExplorerControlComponent {
1044
1359
  this.formConfiguration = '';
1045
1360
  /**文件容器名称 */
1046
1361
  this.FileContainerName = '';
1362
+ this.configState = inject(ConfigStateService);
1363
+ this.environment = inject(EnvironmentService);
1047
1364
  /**选择文件-弹窗的-已选定的文件 */
1048
1365
  this.selectedFileGroup = [];
1049
1366
  }
@@ -1087,6 +1404,11 @@ class FileExplorerControlComponent {
1087
1404
  this.formConfiguration = this._fields.field.formConfiguration;
1088
1405
  this.FileContainerName = this.formConfiguration['FileExplorer.FileContainerName'];
1089
1406
  if (this._selected && this._selected.length > 0) {
1407
+ this._selected.map((el) => {
1408
+ if (!el['url']) {
1409
+ el['url'] = this.GetImageUrl(el.blobName, el.containerName, el.tenantId);
1410
+ }
1411
+ });
1090
1412
  this.selectedFileGroup = this._selected;
1091
1413
  }
1092
1414
  let newControl = this.fb.control(this._selected, ValidatorsArray);
@@ -1094,6 +1416,12 @@ class FileExplorerControlComponent {
1094
1416
  resolve(true);
1095
1417
  });
1096
1418
  }
1419
+ GetImageUrl(value, ...args) {
1420
+ let tenantId = args[1];
1421
+ const environment = this.environment.getEnvironment();
1422
+ let imgUrl = `${environment.apis.default.url}/api/file-explorer/files/${args[0]}/${value}?__tenant=${tenantId}&timer=${new Date().getTime()}`;
1423
+ return value ? imgUrl : '';
1424
+ }
1097
1425
  /**_selectedFile改变回调 */
1098
1426
  _selectedFileChange(event) {
1099
1427
  this.selectedFileGroup = event;
@@ -1102,13 +1430,13 @@ class FileExplorerControlComponent {
1102
1430
  obj[fieldName] = event;
1103
1431
  this.extraProperties.patchValue(obj);
1104
1432
  }
1105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerControlComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1106
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileExplorerControlComponent, selector: "fe-file-explorer-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <fe-file-picker [selectFormFile]=\"selectedFileGroup\" [multiple]=\"formConfiguration['FileExplorer.UploadFileMultiple']\"\n (selectedFileChange)=\"_selectedFileChange($event)\" [fileContainerName]=\"FileContainerName\"></fe-file-picker>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: FilePickerComponent, selector: "fe-file-picker", inputs: ["multiple", "fileContainerName", "selectFormFile"], outputs: ["selectedFileChange"] }] }); }
1433
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerControlComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1434
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FileExplorerControlComponent, selector: "fe-file-explorer-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <fe-file-picker [selectFormFile]=\"selectedFileGroup\" [multiple]=\"formConfiguration['FileExplorer.UploadFileMultiple']\"\n (selectedFileChange)=\"_selectedFileChange($event)\" [fileContainerName]=\"FileContainerName\"></fe-file-picker>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: FilePickerComponent, selector: "fe-file-picker", inputs: ["multiple", "fileContainerName", "selectFormFile"], outputs: ["selectedFileChange"] }] }); }
1107
1435
  }
1108
1436
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerControlComponent, decorators: [{
1109
1437
  type: Component,
1110
1438
  args: [{ selector: 'fe-file-explorer-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <fe-file-picker [selectFormFile]=\"selectedFileGroup\" [multiple]=\"formConfiguration['FileExplorer.UploadFileMultiple']\"\n (selectedFileChange)=\"_selectedFileChange($event)\" [fileContainerName]=\"FileContainerName\"></fe-file-picker>\n <small class=\"form-text text-muted d-block\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
1111
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
1439
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { entity: [{
1112
1440
  type: Input
1113
1441
  }], fields: [{
1114
1442
  type: Input
@@ -1121,6 +1449,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1121
1449
  args: ['submitclick', { static: true }]
1122
1450
  }] } });
1123
1451
 
1452
+ /* eslint-disable @angular-eslint/component-selector */
1453
+ class FileExplorerViewComponent {
1454
+ constructor() {
1455
+ /**展示则内容 */
1456
+ this.showValue = '';
1457
+ /**是否显示再列表 */
1458
+ this.showInList = false;
1459
+ /**表单控件Value */
1460
+ this._value = '';
1461
+ }
1462
+ set value(v) {
1463
+ this._value = v;
1464
+ }
1465
+ async ngAfterContentInit() {
1466
+ //Called after ngOnInit when the component's or directive's content has been initialized.
1467
+ //Add 'implements AfterContentInit' to the class.
1468
+ let valueOptions = this._value;
1469
+ if (this.type && valueOptions) {
1470
+ this.showValue = valueOptions;
1471
+ }
1472
+ }
1473
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1474
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: FileExplorerViewComponent, selector: "fe-file-explorer-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n@if(showValue.length>=1){\r\n<div class=\"d-flex align-items-center \">\r\n <fe-file-preview [width]=\"'40px'\" [className]=\"'rounded-5 overflow-hidden me-1'\" [src]=\"showValue[0].url\"\r\n [name]=\"showValue[0].name\" [type]=\"showValue[0].mimeType\" [preview]=\"true\"></fe-file-preview>\r\n @if(showValue.length-1>0){\r\n +{{showValue.length-1}}\r\n }\r\n</div>\r\n}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name", "className"] }] }); }
1475
+ }
1476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerViewComponent, decorators: [{
1477
+ type: Component,
1478
+ args: [{ selector: 'fe-file-explorer-view', template: "@if(showInList){\r\n@if(showValue.length>=1){\r\n<div class=\"d-flex align-items-center \">\r\n <fe-file-preview [width]=\"'40px'\" [className]=\"'rounded-5 overflow-hidden me-1'\" [src]=\"showValue[0].url\"\r\n [name]=\"showValue[0].name\" [type]=\"showValue[0].mimeType\" [preview]=\"true\"></fe-file-preview>\r\n @if(showValue.length-1>0){\r\n +{{showValue.length-1}}\r\n }\r\n</div>\r\n}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}" }]
1479
+ }], propDecorators: { showInList: [{
1480
+ type: Input
1481
+ }], fields: [{
1482
+ type: Input
1483
+ }], type: [{
1484
+ type: Input
1485
+ }], value: [{
1486
+ type: Input
1487
+ }] } });
1488
+
1124
1489
  /**
1125
1490
  * 表单控件分组-包含配置,控件,显示的数组
1126
1491
  */
@@ -1130,7 +1495,7 @@ const fielFieldControlGroup = [
1130
1495
  name: 'FileExplorer',
1131
1496
  fieldConfigComponent: FileExplorerConfigComponent,
1132
1497
  fieldComponent: FileExplorerControlComponent,
1133
- // fieldViewComponent:TextBoxViewComponent,
1498
+ fieldViewComponent: FileExplorerViewComponent,
1134
1499
  }
1135
1500
  ];
1136
1501
  function getExcludeAssignControl(typeName) {
@@ -1150,14 +1515,18 @@ class FileExplorerModule {
1150
1515
  FileDomeComponent,
1151
1516
  FilePreviewComponent,
1152
1517
  FileExplorerConfigComponent,
1153
- FileExplorerControlComponent], imports: [FormsModule,
1518
+ FileExplorerControlComponent,
1519
+ FileExplorerViewComponent], imports: [FormsModule,
1154
1520
  CoreModule,
1155
1521
  ThemeSharedModule,
1156
1522
  ReactiveFormsModule,
1157
1523
  NgbDropdownModule,
1158
1524
  NzTreeModule,
1159
1525
  NgxValidateCoreModule,
1160
- FileExplorerRoutingModule], exports: [FileEditComponent,
1526
+ FileExplorerRoutingModule,
1527
+ TreeModule,
1528
+ GetDirectoryNamePipe,
1529
+ DragDropModule], exports: [FileEditComponent,
1161
1530
  FilePickerComponent,
1162
1531
  FileModalComponent,
1163
1532
  FileModalTreeComponent,
@@ -1170,7 +1539,9 @@ class FileExplorerModule {
1170
1539
  NgbDropdownModule,
1171
1540
  NzTreeModule,
1172
1541
  NgxValidateCoreModule,
1173
- FileExplorerRoutingModule] }); }
1542
+ FileExplorerRoutingModule,
1543
+ TreeModule,
1544
+ DragDropModule] }); }
1174
1545
  }
1175
1546
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerModule, decorators: [{
1176
1547
  type: NgModule,
@@ -1184,6 +1555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1184
1555
  FilePreviewComponent,
1185
1556
  FileExplorerConfigComponent,
1186
1557
  FileExplorerControlComponent,
1558
+ FileExplorerViewComponent,
1187
1559
  ],
1188
1560
  imports: [
1189
1561
  FormsModule,
@@ -1194,6 +1566,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1194
1566
  NzTreeModule,
1195
1567
  NgxValidateCoreModule,
1196
1568
  FileExplorerRoutingModule,
1569
+ TreeModule,
1570
+ GetDirectoryNamePipe,
1571
+ DragDropModule,
1197
1572
  ],
1198
1573
  exports: [
1199
1574
  FileEditComponent,
@@ -1206,6 +1581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1206
1581
  // FileExplorerControlComponent,
1207
1582
  ],
1208
1583
  providers: [
1584
+ // GetImageUrlPipe
1209
1585
  // // [Required]
1210
1586
  // ListService,
1211
1587
  // // [Optional]