@dignite-ng/expand.file-explorer 3.0.0-rc.8 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) 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 +2 -4
  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 +3 -3
  14. package/esm2022/lib/components/dynamic-form/file-explorer/file-explorer-view.component.mjs +3 -3
  15. package/esm2022/lib/components/dynamic-form/file-explorer/index.mjs +1 -1
  16. package/esm2022/lib/components/dynamic-form/form-control-group.mjs +1 -1
  17. package/esm2022/lib/components/file-edit/file-edit.component.mjs +34 -24
  18. package/esm2022/lib/components/file-modal/file-modal.component.mjs +293 -85
  19. package/esm2022/lib/components/file-modal-tree/file-modal-tree.component.mjs +135 -60
  20. package/esm2022/lib/components/file-picker/file-picker.component.mjs +20 -12
  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 +36 -11
  24. package/esm2022/lib/pipe/format-file-size.pipe.mjs +35 -0
  25. package/esm2022/lib/pipe/get-directory-name.pipe.mjs +20 -0
  26. package/esm2022/lib/previews/file-preview.component.mjs +2 -1
  27. package/esm2022/lib/previews/index.mjs +1 -1
  28. package/esm2022/lib/previews/models.mjs +1 -1
  29. package/esm2022/lib/proxy/dignite/file-explorer/directories/file-descriptor.service.mjs +2 -1
  30. package/esm2022/lib/proxy/dignite/file-explorer/directories/index.mjs +1 -1
  31. package/esm2022/lib/proxy/dignite/file-explorer/directories/models.mjs +1 -1
  32. package/esm2022/lib/proxy/dignite/file-explorer/files/file-descriptor.service.mjs +11 -3
  33. package/esm2022/lib/proxy/dignite/file-explorer/files/index.mjs +1 -1
  34. package/esm2022/lib/proxy/dignite/file-explorer/files/models.mjs +1 -1
  35. package/esm2022/lib/proxy/microsoft/asp-net-core/mvc/models.mjs +1 -1
  36. package/esm2022/lib/proxy/microsoft/extensions/primitives/models.mjs +1 -1
  37. package/esm2022/lib/proxy/microsoft/net/http/headers/models.mjs +1 -1
  38. package/esm2022/lib/proxy/volo/abp/content/models.mjs +1 -1
  39. package/esm2022/public-api.mjs +1 -3
  40. package/fesm2022/dignite-ng-expand.file-explorer-config.mjs.map +1 -1
  41. package/fesm2022/dignite-ng-expand.file-explorer.mjs +541 -238
  42. package/fesm2022/dignite-ng-expand.file-explorer.mjs.map +1 -1
  43. package/lib/components/dome/file-dome.component.d.ts +0 -1
  44. package/lib/components/file-edit/file-edit.component.d.ts +6 -4
  45. package/lib/components/file-modal/file-modal.component.d.ts +63 -25
  46. package/lib/components/file-modal-tree/file-modal-tree.component.d.ts +21 -12
  47. package/lib/components/file-picker/file-picker.component.d.ts +2 -3
  48. package/lib/file-explorer.module.d.ts +5 -1
  49. package/lib/pipe/format-file-size.pipe.d.ts +14 -0
  50. package/lib/pipe/get-directory-name.pipe.d.ts +7 -0
  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
  54. package/esm2022/lib/services/file-api.service.mjs +0 -68
  55. package/lib/services/file-api.service.d.ts +0 -14
@@ -1,28 +1,40 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, Component, EventEmitter, ViewChild, Output, inject, NgModule, ChangeDetectorRef } from '@angular/core';
2
+ import { Pipe, Input, Component, EventEmitter, ViewChild, Output, Injectable, inject, NgModule, ChangeDetectorRef } from '@angular/core';
3
3
  import * as i3 from '@abp/ng.core';
4
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
- import * as i2 from '@angular/common';
16
+ import * as i2 from '@dignite-ng/expand.core';
17
+ import { ValidatorsService } from '@dignite-ng/expand.core';
18
+ import * as i5 from '@angular/common';
19
+ import * as i3$2 from '@angular/cdk/drag-drop';
20
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
18
21
  import * as i6 from '@swimlane/ngx-datatable';
19
22
  import { SelectionType } from '@swimlane/ngx-datatable';
20
- import { of } from 'rxjs';
23
+ import { tap, map, of, finalize } from 'rxjs';
24
+ import * as i8 from '@abp/ng.components/tree';
25
+ import { TreeModule } from '@abp/ng.components/tree';
21
26
 
22
- class FileApiService {
23
- constructor() { }
27
+ /**
28
+ * 转换文件大小单位 输入k
29
+ * @description 用于转换文件大小单位 输入k
30
+ * @returns {string} 文件大小单位 输入k
31
+ */
32
+ class FormatFileSizePipe {
33
+ transform(value, ...args) {
34
+ return this.get(value);
35
+ }
24
36
  /**转换文件大小单位 输入k */
25
- formatFileSize(bytes) {
37
+ get(bytes) {
26
38
  const units = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
27
39
  let size = bytes;
28
40
  let unitIndex = 0;
@@ -34,56 +46,16 @@ class FileApiService {
34
46
  size = size.toFixed(1);
35
47
  return `${size} ${units[unitIndex]}`;
36
48
  }
37
- /**获取图片的本地连接 */
38
- getImageLacolBase64Url(file) {
39
- return new Promise((resolve, rejects) => {
40
- const reader = new FileReader();
41
- reader.readAsDataURL(file);
42
- reader.onload = (e) => {
43
- resolve(e.target.result);
44
- };
45
- reader.onerror = error => rejects(error);
46
- });
47
- }
48
- /**
49
- * 深拷贝--方法
50
- * $api.deepClone() */
51
- deepClone(obj) {
52
- if (typeof obj !== 'object' || obj === null)
53
- return obj;
54
- const result = Array.isArray(obj) ? [] : {};
55
- for (let key in obj) {
56
- if (obj.hasOwnProperty(key)) {
57
- if (typeof obj[key] === 'object' && obj[key] !== null) {
58
- if (obj[key] instanceof Date) {
59
- result[key] = new Date(obj[key].getTime());
60
- }
61
- else if (obj[key] instanceof RegExp) {
62
- result[key] = new RegExp(obj[key]);
63
- }
64
- else if (obj[key] instanceof File) {
65
- result[key] = obj[key];
66
- }
67
- else {
68
- result[key] = this.deepClone(obj[key]);
69
- }
70
- }
71
- else {
72
- result[key] = obj[key];
73
- }
74
- }
75
- }
76
- return result;
77
- }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
79
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileApiService, providedIn: 'root' }); }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormatFileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
50
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: FormatFileSizePipe, isStandalone: true, name: "formatFileSize" }); }
80
51
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileApiService, decorators: [{
82
- type: Injectable,
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormatFileSizePipe, decorators: [{
53
+ type: Pipe,
83
54
  args: [{
84
- providedIn: 'root'
55
+ name: 'formatFileSize',
56
+ standalone: true
85
57
  }]
86
- }], ctorParameters: () => [] });
58
+ }] });
87
59
 
88
60
  let ImageTypeOption = [{
89
61
  label: '',
@@ -233,13 +205,13 @@ class FilePreviewComponent {
233
205
  return this.rotate = 0;
234
206
  this.rotate += 90;
235
207
  }
236
- 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 }); }
237
- 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"] }] }); }
208
+ 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 }); }
209
+ 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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] }); }
238
210
  }
239
211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePreviewComponent, decorators: [{
240
212
  type: Component,
241
213
  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"] }]
242
- }], ctorParameters: () => [{ type: i8.NgbModal }], propDecorators: { width: [{
214
+ }], ctorParameters: () => [{ type: i1.NgbModal }], propDecorators: { width: [{
243
215
  type: Input
244
216
  }], src: [{
245
217
  type: Input
@@ -253,9 +225,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
253
225
  type: Input
254
226
  }] } });
255
227
 
228
+ /* eslint-disable @angular-eslint/component-selector */
256
229
  class FileEditComponent {
257
- constructor(_FileApiService) {
258
- this._FileApiService = _FileApiService;
230
+ constructor(_FormatFileSizePipe, _GetImageLacolBase64urlService) {
231
+ this._FormatFileSizePipe = _FormatFileSizePipe;
232
+ this._GetImageLacolBase64urlService = _GetImageLacolBase64urlService;
259
233
  /**是否多选 */
260
234
  this._multiple = true;
261
235
  /**文件数据--已上传的数据 */
@@ -264,7 +238,7 @@ class FileEditComponent {
264
238
  this.fileDataChange = new EventEmitter();
265
239
  /**文件大小限制
266
240
  * @param 1mb
267
- */
241
+ */
268
242
  this.sizeLimit = 1048576;
269
243
  /**文件表格数据 */
270
244
  this.filesTableData = [];
@@ -273,7 +247,7 @@ class FileEditComponent {
273
247
  }
274
248
  set multiple(v) {
275
249
  this._multiple = v;
276
- if (v) { }
250
+ // if (v) { }
277
251
  }
278
252
  set fileData(v) {
279
253
  this._fileData = v;
@@ -286,15 +260,16 @@ class FileEditComponent {
286
260
  }
287
261
  /**获取文件信息改变 */
288
262
  async getFileChange(event) {
289
- let files = new Array(...event.target.files);
263
+ const files = new Array(...event.target.files);
290
264
  /**需要等待setfileSizeUnits执行完后在执行其他方法--需要完善 */
291
265
  await this.waitFileToAddTable(files);
292
266
  this.fileHandling();
293
267
  }
294
268
  /**等待将文件数据加入到文件表格数据中 */
295
269
  waitFileToAddTable(files) {
296
- return new Promise(async (resolve, rejects) => {
297
- this.filesTableData.push(...await this.setfileSizeUnits(files));
270
+ // eslint-disable-next-line no-async-promise-executor
271
+ return new Promise(async (resolve) => {
272
+ this.filesTableData.push(...(await this.setfileSizeUnits(files)));
298
273
  resolve(true);
299
274
  });
300
275
  }
@@ -308,32 +283,36 @@ class FileEditComponent {
308
283
  }
309
284
  /**文件处理-调用回调函数 */
310
285
  fileHandling() {
311
- let theFilesToBeUploaded = this.filesTableData.filter(el => !el.id);
286
+ const theFilesToBeUploaded = this.filesTableData.filter(el => !el.id);
312
287
  //判断图片大小是否超过限制-用于判断表单是否允许提交
313
- let isSubmit = !this.filesTableData.some(el => el.size > this.sizeLimit);
314
- this.fileDataChange.emit({ theFilesToBeUploaded, deleteTheUploadedFiles: this.deleteTheUploadedFiles, isSubmit });
288
+ const isSubmit = !this.filesTableData.some(el => el.size > this.sizeLimit);
289
+ this.fileDataChange.emit({
290
+ theFilesToBeUploaded,
291
+ deleteTheUploadedFiles: this.deleteTheUploadedFiles,
292
+ isSubmit,
293
+ });
315
294
  }
316
295
  /**设置值文件大小单位/ */
317
296
  async setfileSizeUnits(files) {
318
- return new Promise((resolve, rejects) => {
319
- let formattedFiles = [];
297
+ return new Promise((resolve) => {
298
+ const formattedFiles = [];
320
299
  files.forEach(async (file) => {
321
- file.fileSize = this._FileApiService.formatFileSize(file.size);
300
+ file.fileSize = this._FormatFileSizePipe.transform(file.size);
322
301
  formattedFiles.push(file);
323
302
  //设置选择图片的本地url
324
303
  if (!file.src)
325
- file.src = await this._FileApiService.getImageLacolBase64Url(file);
304
+ file.src = await this._GetImageLacolBase64urlService.get(file);
326
305
  });
327
306
  resolve(files);
328
307
  });
329
308
  }
330
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileEditComponent, deps: [{ token: FileApiService }], target: i0.ɵɵFactoryTarget.Component }); }
331
- 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" }] }); }
309
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileEditComponent, deps: [{ token: FormatFileSizePipe }, { token: i2.GetImageLacolBase64urlService }], target: i0.ɵɵFactoryTarget.Component }); }
310
+ 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:(sizeLimit|formatFileSize)}}</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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.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" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }] }); }
332
311
  }
333
312
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileEditComponent, decorators: [{
334
313
  type: Component,
335
- args: [{ selector: 'fe-file-edit', 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>" }]
336
- }], ctorParameters: () => [{ type: FileApiService }], propDecorators: { multiple: [{
314
+ args: [{ selector: 'fe-file-edit', 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:(sizeLimit|formatFileSize)}}</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>" }]
315
+ }], ctorParameters: () => [{ type: FormatFileSizePipe }, { type: i2.GetImageLacolBase64urlService }], propDecorators: { multiple: [{
337
316
  type: Input
338
317
  }], fileData: [{
339
318
  type: Input
@@ -360,6 +339,10 @@ let FileDescriptorService$1 = class FileDescriptorService {
360
339
  method: 'DELETE',
361
340
  url: `/api/file-explorer/files/${id}`,
362
341
  }, { apiName: this.apiName, ...config });
342
+ this.deleteByEntityId = (containerName, entityId, config) => this.restService.request({
343
+ method: 'DELETE',
344
+ url: `/api/file-explorer/files/${containerName}/${entityId}`,
345
+ }, { apiName: this.apiName, ...config });
363
346
  this.download = (containerName, blobName, fileName, config) => this.restService.request({
364
347
  method: 'GET',
365
348
  url: `/api/file-explorer/files/download/${containerName}/${blobName}`,
@@ -371,14 +354,17 @@ let FileDescriptorService$1 = class FileDescriptorService {
371
354
  }, { apiName: this.apiName, ...config });
372
355
  this.getFileContainerConfiguration = (containerName, config) => this.restService.request({
373
356
  method: 'GET',
374
- url: '/api/file-explorer/files/configuration',
375
- params: { containerName },
357
+ url: `/api/file-explorer/files/${containerName}/configuration`,
376
358
  }, { apiName: this.apiName, ...config });
377
359
  this.getList = (input, config) => this.restService.request({
378
360
  method: 'GET',
379
361
  url: '/api/file-explorer/files',
380
362
  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 },
381
363
  }, { apiName: this.apiName, ...config });
364
+ this.getListByEntityId = (containerName, entityId, config) => this.restService.request({
365
+ method: 'GET',
366
+ url: `/api/file-explorer/files/${containerName}/${entityId}/all`,
367
+ }, { apiName: this.apiName, ...config });
382
368
  this.getStream = (containerName, blobName, imageResize, config) => this.restService.request({
383
369
  method: 'GET',
384
370
  responseType: 'blob',
@@ -444,15 +430,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
444
430
  }]
445
431
  }], ctorParameters: () => [{ type: i3.RestService }] });
446
432
 
433
+ /* eslint-disable @typescript-eslint/no-this-alias */
447
434
  /* eslint-disable @angular-eslint/component-selector */
448
- var that$1;
435
+ let that;
449
436
  class FileModalTreeComponent {
450
- constructor(_DescriptorService, fb, toaster, _FileApiService, _LocalizationService) {
437
+ constructor(_DescriptorService, fb, toaster, _LocalizationService, confirmation) {
451
438
  this._DescriptorService = _DescriptorService;
452
439
  this.fb = fb;
453
440
  this.toaster = toaster;
454
- this._FileApiService = _FileApiService;
455
441
  this._LocalizationService = _LocalizationService;
442
+ this.confirmation = confirmation;
456
443
  /**文件分组列表 */
457
444
  this.fileGroupList = [];
458
445
  /**选择的tree节点 */
@@ -463,25 +450,41 @@ class FileModalTreeComponent {
463
450
  this.anExpandedNode = [];
464
451
  /**tree节点选择回调 */
465
452
  this.nodeClick = new EventEmitter();
466
- this.handleClick = (event) => event.stopPropagation();
453
+ /**获取数据后回调给file-modal */
454
+ this.treeNodeData = new EventEmitter();
455
+ /**查看所有文件回调函数,在file-modal中处理逻辑 */
456
+ this.lookAllBtn = new EventEmitter();
457
+ this.handleClick = event => event.stopPropagation();
458
+ this.selectedNode = [];
467
459
  /**判断节点是否选中 */
468
- this.isNodeSelected = (el) => el.key === this._theSelectedTreeNode?.key;
460
+ this.isNodeSelected = el => {
461
+ return el.key === this._theSelectedTreeNode?.key;
462
+ };
469
463
  /**分组 */
470
464
  /**模态框-状态-是否打开 */
471
465
  this.ModalDescriptorOpen = false;
472
466
  /**模态框-descriptor-繁忙状态-用于确定模态的繁忙状态是否为真 */
473
467
  this.ModalDescriptorBusy = false;
474
- that$1 = this;
468
+ this.formValidation = '';
469
+ this._ValidatorsService = inject(ValidatorsService);
470
+ that = this;
475
471
  }
476
472
  set theSelectedTreeNode(v) {
477
473
  this._theSelectedTreeNode = v;
478
- if (v.length > 0) {
474
+ if (v == '') {
479
475
  this.loadData();
480
476
  }
481
477
  }
482
478
  set fileContainerName(v) {
483
479
  if (v) {
484
480
  this._fileContainerName = v;
481
+ // this.loadData();
482
+ }
483
+ }
484
+ ngAfterContentInit() {
485
+ //Called after ngOnInit when the component's or directive's content has been initialized.
486
+ //Add 'implements AfterContentInit' to the class.
487
+ if (this._fileContainerName) {
485
488
  this.loadData();
486
489
  }
487
490
  }
@@ -492,48 +495,70 @@ class FileModalTreeComponent {
492
495
  }
493
496
  /**获取文件分组 */
494
497
  getFileGroupList() {
495
- this._DescriptorService.getList({
498
+ this._DescriptorService
499
+ .getList({
496
500
  containerName: this._fileContainerName,
497
- }).subscribe(async (res) => {
501
+ })
502
+ .subscribe(async (res) => {
498
503
  this.fileGroupList = await this.setTheValueOfTheNodeRecursively(res.items);
504
+ this.treeNodeData.emit(this.fileGroupList);
499
505
  });
500
506
  }
501
- /**递归设置节点的值 */
502
- setTheValueOfTheNodeRecursively(array) {
503
- return new Promise((reslove, rejects) => {
504
- array.forEach((el) => {
505
- el.title = el.name;
506
- el.key = el.id;
507
- el.expanded = this.anExpandedNode.includes(el.key);
508
- if (el.children.length > 0) {
509
- this.setTheValueOfTheNodeRecursively(el.children);
510
- }
511
- });
512
- reslove(array);
507
+ /**查看所有文件 */
508
+ onLookAllBtn() {
509
+ this.lookAllBtn.emit();
510
+ }
511
+ /**递归-将列表转化为父子级结构 */
512
+ setTheValueOfTheNodeRecursively(array, parentId = null, root) {
513
+ const rootList = root || array;
514
+ const result = array.filter(item => item.parentId === parentId);
515
+ result.sort((a, b) => a.order - b.order);
516
+ result.map((el) => {
517
+ el.title = el.name;
518
+ el.key = el.id;
519
+ el.entity = el.id; /** 节点值 */
520
+ el.expanded = this.anExpandedNode.includes(el.key);
521
+ el.children.sort((a, b) => a.order - b.order);
522
+ if (el.children.length > 0) {
523
+ this.setTheValueOfTheNodeRecursively(el.children, el.id, rootList);
524
+ }
513
525
  });
526
+ return result;
514
527
  }
515
528
  /**tree-拖拽 */
516
- nzEvent(event) {
517
- }
529
+ nzEvent(event) { }
518
530
  /**tree-拖拽 -验证*/
519
531
  beforeDrop(arg) {
520
- if (arg.pos === 0 || arg.pos === 1) {
521
- that$1._DescriptorService.move(arg.dragNode.key, {
522
- "parentId": arg.pos === 1 ? (arg.node.parentNode?.key || '') : arg.node.key,
523
- "order": arg.pos === 1 ? arg.node.origin.order + 1 : arg.node.origin.children.length + 1
524
- }).subscribe(res => {
525
- that$1.getFileGroupList();
526
- });
527
- return of(true);
528
- }
529
- else {
530
- return of(false);
532
+ const { pos, dragNode, node } = arg;
533
+ // 只处理有效的拖拽位置
534
+ if (pos === 0 || pos === 1 || pos === -1) {
535
+ // 根据不同的拖拽位置计算参数
536
+ const parentId = pos === 0 ? node.key : node.parentNode?.key || '';
537
+ let order;
538
+ if (pos === 1) {
539
+ order = node.origin.order + 1;
540
+ }
541
+ else if (pos === 0) {
542
+ order = node.origin.children.length + 1;
543
+ }
544
+ else {
545
+ // pos === -1
546
+ order = Math.max(0, node.origin.order - 1);
547
+ }
548
+ // 统一处理移动逻辑
549
+ return that._DescriptorService.move(dragNode.key, { parentId, order }).pipe(tap(() => that.getFileGroupList()), map(() => true));
531
550
  }
551
+ return of(false);
532
552
  }
533
553
  /**tree--选择节点 */
534
- activeNode(event) {
535
- this._theSelectedTreeNode = event.node;
536
- this.nodeClick.emit(event.node);
554
+ activeNode(node) {
555
+ if (event?.target?.localName == 'i')
556
+ return;
557
+ if (this._theSelectedTreeNode?.key == node.key)
558
+ return;
559
+ this.selectedNode = [node];
560
+ this._theSelectedTreeNode = node;
561
+ this.nodeClick.emit(node);
537
562
  }
538
563
  /**点击展开树节点图标触发 */
539
564
  nzExpandChange(event) {
@@ -552,23 +577,32 @@ class FileModalTreeComponent {
552
577
  this.ModalDescriptorForm = this.fb.group({
553
578
  containerName: [this._fileContainerName || '', Validators.required],
554
579
  name: ['', Validators.required],
555
- parentId: [items?.key || '', Validators.required],
580
+ parentId: [items?.key || ''],
556
581
  });
557
582
  /**编辑 */
558
583
  if (edit) {
559
584
  this.theNodeBeingEdited = items.origin;
560
585
  this.ModalDescriptorForm.patchValue({
561
- name: items.origin.name
586
+ name: items.origin.name,
562
587
  });
563
588
  }
564
589
  }
565
590
  /**删除分组 */
566
591
  deleteDescriptorBtn(node) {
567
- this._DescriptorService.delete(node.key).subscribe(res => {
568
- this.ModalDescriptorOpen = false;
569
- if (this.theNodeBeingEdited.key == node.key)
570
- this.theNodeBeingEdited = '';
571
- this.getFileGroupList();
592
+ this.confirmation
593
+ .warn('', {
594
+ key: '',
595
+ defaultValue: this._LocalizationService.instant(`FileExplorer::DeletionConfirmationMessage`, node.title),
596
+ })
597
+ .subscribe((status) => {
598
+ if (status == 'confirm') {
599
+ this._DescriptorService.delete(node.key).subscribe(res => {
600
+ this.ModalDescriptorOpen = false;
601
+ if (this.theNodeBeingEdited.key == node.key)
602
+ this.theNodeBeingEdited = '';
603
+ this.getFileGroupList();
604
+ });
605
+ }
572
606
  });
573
607
  }
574
608
  /**模态框-descriptor-状态改变回调 */
@@ -581,29 +615,53 @@ class FileModalTreeComponent {
581
615
  }
582
616
  /**f分组模态框保存 */
583
617
  createOrEditSave() {
584
- let input = this.ModalDescriptorForm.value;
618
+ const input = this.ModalDescriptorForm.value;
619
+ this.formValidation = this._ValidatorsService.getFormValidationStatus(this.ModalDescriptorForm);
620
+ if (this._ValidatorsService.isCheckForm(this.formValidation, 'FileExplorer'))
621
+ return;
622
+ if (!this.ModalDescriptorForm.valid)
623
+ return;
624
+ if (this.ModalDescriptorBusy)
625
+ return;
626
+ this.ModalDescriptorBusy = true;
585
627
  if (this.theNodeBeingEdited) {
586
- this._DescriptorService.update(this.theNodeBeingEdited.key, input).subscribe(res => {
628
+ this._DescriptorService
629
+ .update(this.theNodeBeingEdited.key, input)
630
+ .pipe(finalize(() => {
631
+ this.ModalDescriptorBusy = false;
632
+ }))
633
+ .subscribe(res => {
587
634
  this.ModalDescriptorOpen = false;
635
+ this.ModalDescriptorVisibleChange(false);
588
636
  this.getFileGroupList();
589
637
  });
590
638
  return;
591
639
  }
592
- this._DescriptorService.create(input).subscribe(res => {
640
+ this._DescriptorService
641
+ .create(input)
642
+ .pipe(finalize(() => {
643
+ this.ModalDescriptorBusy = false;
644
+ }))
645
+ .subscribe(res => {
593
646
  this.ModalDescriptorOpen = false;
647
+ this.ModalDescriptorVisibleChange(false);
594
648
  this.getFileGroupList();
595
649
  });
596
650
  }
597
- 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 }); }
598
- 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" }] }); }
651
+ 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: i3.LocalizationService }, { token: i2$1.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component }); }
652
+ 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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.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: i8.ExpandedIconTemplateDirective, selector: "[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]" }, { kind: "component", type: i8.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" }] }); }
599
653
  }
600
654
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalTreeComponent, decorators: [{
601
655
  type: Component,
602
- 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>" }]
603
- }], ctorParameters: () => [{ type: FileDescriptorService }, { type: i1.FormBuilder }, { type: i2$1.ToasterService }, { type: FileApiService }, { type: i3.LocalizationService }], propDecorators: { theSelectedTreeNode: [{
656
+ 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>" }]
657
+ }], ctorParameters: () => [{ type: FileDescriptorService }, { type: i1$1.FormBuilder }, { type: i2$1.ToasterService }, { type: i3.LocalizationService }, { type: i2$1.ConfirmationService }], propDecorators: { theSelectedTreeNode: [{
604
658
  type: Input
605
659
  }], nodeClick: [{
606
660
  type: Output
661
+ }], treeNodeData: [{
662
+ type: Output
663
+ }], lookAllBtn: [{
664
+ type: Output
607
665
  }], fileContainerName: [{
608
666
  type: Input
609
667
  }], ModalFormDescriptorSubmit: [{
@@ -611,13 +669,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
611
669
  args: ['ModalFormDescriptorSubmit', { static: false }]
612
670
  }] } });
613
671
 
614
- var that;
672
+ class GetDirectoryNamePipe {
673
+ transform(value, ...args) {
674
+ if (value) {
675
+ return args[0].find(el => el.id == value)?.name;
676
+ }
677
+ return '';
678
+ }
679
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
680
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, isStandalone: true, name: "getDirectoryName" }); }
681
+ }
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetDirectoryNamePipe, decorators: [{
683
+ type: Pipe,
684
+ args: [{
685
+ name: 'getDirectoryName',
686
+ standalone: true
687
+ }]
688
+ }] });
689
+
690
+ /* eslint-disable @typescript-eslint/no-this-alias */
691
+ /* eslint-disable @typescript-eslint/no-unused-vars */
615
692
  class FileModalComponent {
616
- constructor(_FileService, toaster, list, _FileApiService, restService, confirmation, _LocalizationService) {
693
+ constructor(_FileService, toaster, list, restService, confirmation, _LocalizationService) {
617
694
  this._FileService = _FileService;
618
695
  this.toaster = toaster;
619
696
  this.list = list;
620
- this._FileApiService = _FileApiService;
621
697
  this.restService = restService;
622
698
  this.confirmation = confirmation;
623
699
  this._LocalizationService = _LocalizationService;
@@ -627,8 +703,8 @@ class FileModalComponent {
627
703
  /**是否多选 */
628
704
  this._multiple = false;
629
705
  /**文件大小限制
630
- * @param 1mb
631
- */
706
+ * @param 1mb
707
+ */
632
708
  this.sizeLimit = 1048576;
633
709
  /**模态框状态回调 */
634
710
  this.visibleChange = new EventEmitter();
@@ -639,6 +715,9 @@ class FileModalComponent {
639
715
  /**dignite-file-modal-tree */
640
716
  /**选择的tree节点 */
641
717
  this._theSelectedTreeNode = '';
718
+ this.isCreateList = false;
719
+ /** 从tree获取来的数据 */
720
+ this.fileGroupList = [];
642
721
  /**图片上传-要上传图片的状态文件列表 */
643
722
  this.uploadPictureStatusList = [];
644
723
  /**文件表格-数据*/
@@ -650,45 +729,54 @@ class FileModalComponent {
650
729
  this.filters = {};
651
730
  /**文件表格-表格自带选择类型 */
652
731
  this.SelectionType = SelectionType;
653
- /**文件表格-选择的表格数据项 */
654
- this.selectedTable = [];
655
- /**当前选择的table项 id */
656
- this.nowSelectId = '';
657
732
  /**选择文件回调 */
658
733
  this.selectFilefn = new EventEmitter();
659
- /**一个布尔or函数,可用于检查是否要根据条件选择特定行。 */
660
- this.selectCheck = (row, column, value) => {
661
- this.nowSelectId = row.id;
662
- return true;
663
- };
664
- /**判断row是否选中 */
665
- this.selectedcheckbox = (id) => {
666
- return this.selectedTable.some(el => el.id == id);
667
- };
668
734
  /**创建图片的接口,代理中的file类型不匹配,切换为any类型 */
669
735
  this.createFile = (input, config) => this.restService.request({
670
736
  method: 'POST',
671
737
  url: '/api/file-explorer/files',
672
- params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
738
+ params: {
739
+ containerName: input.containerName,
740
+ cellName: input.cellName,
741
+ directoryId: input.directoryId,
742
+ entityId: input.entityId,
743
+ },
673
744
  body: input.file,
674
745
  }, { apiName: 'FileExplorer', ...config });
675
- that = this;
746
+ /**文件表格-选择的表格数据项 */
747
+ this.selectedTable = [];
748
+ /**当前选择的table项 id */
749
+ this.nowSelectId = '';
750
+ /**是否全选 */
751
+ this.isAllSelected = false;
752
+ /**判断row是否选中 */
753
+ this.selectedcheckbox = id => {
754
+ return this.selectedTable.some(el => el.id === id);
755
+ };
756
+ /**当前编辑的row */
757
+ this.newEditRow = '';
758
+ /**是否正在加载 */
759
+ this.isloading = false;
676
760
  }
677
761
  /**获取目录配置 */
678
762
  getFilesConfiguration() {
679
- this._FileDescriptorService.getFileContainerConfiguration(this._fileContainerName).subscribe(res => {
680
- this.createDirectoryPermissionName = res?.createDirectoryPermissionName;
763
+ return new Promise((resolve, reject) => {
764
+ this._FileDescriptorService
765
+ .getFileContainerConfiguration(this._fileContainerName)
766
+ .subscribe(res => {
767
+ this.createDirectoryPermissionName = res?.createDirectoryPermissionName;
768
+ resolve(res);
769
+ });
681
770
  });
682
771
  }
683
772
  set fileContainerName(v) {
684
773
  if (v) {
685
774
  this._fileContainerName = v;
686
- this.loadData();
775
+ // this.loadData()
687
776
  }
688
777
  }
689
778
  set multiple(v) {
690
779
  this._multiple = v;
691
- if (v) { }
692
780
  }
693
781
  set limit(v) {
694
782
  this.sizeLimit = v;
@@ -703,52 +791,98 @@ class FileModalComponent {
703
791
  /**模态框-状态改变回调 */
704
792
  ModalVisibleChange(event) {
705
793
  if (!event) {
794
+ this.ModalOpen = false;
795
+ this.ModalBusy = false;
706
796
  this.visibleChange.emit(event);
797
+ this.createDirectoryPermissionName = '';
798
+ this._theSelectedTreeNode = '';
799
+ this.selectedTable = [];
800
+ this.uploadPictureStatusList = [];
707
801
  return;
708
802
  }
709
803
  }
710
804
  /**模态框保存 */
711
805
  modalSave() {
712
- let selectedTablearr = this._FileApiService.deepClone(this.selectedTable);
806
+ const selectedTablearr = structuredClone(this.selectedTable);
713
807
  this.selectFilefn.emit(selectedTablearr);
714
808
  this.ModalVisibleChange(false);
715
809
  }
716
810
  /**初始化数据 */
717
811
  loadData() {
718
812
  if (this.ModalOpen && this._fileContainerName) {
719
- this.hookToQuery();
813
+ this.list.maxResultCount = 100;
814
+ // this.filters.skipCount = 0;
720
815
  this.getFilesConfiguration();
816
+ if (!this.isCreateList) {
817
+ this.hookToQuery();
818
+ this.isCreateList = true;
819
+ }
820
+ else {
821
+ this.list.get();
822
+ }
823
+ }
824
+ }
825
+ /** 从tree获取数据 */
826
+ treeNodeData(event) {
827
+ this.fileGroupList = this.flattenNestedArray(event);
828
+ }
829
+ /**
830
+ * 将嵌套数组扁平化
831
+ * @param {Array} nestedArray - 包含嵌套children的数组
832
+ * @returns {Array} - 扁平化后的数组
833
+ */
834
+ flattenNestedArray(nestedArray) {
835
+ const result = [];
836
+ function flatten(items) {
837
+ if (!items)
838
+ return;
839
+ for (const item of items) {
840
+ // 将当前项添加到结果数组
841
+ result.push({ ...item });
842
+ // 如果有children属性且是数组,递归处理
843
+ if (item.children && Array.isArray(item.children)) {
844
+ flatten(item.children);
845
+ }
846
+ }
721
847
  }
848
+ flatten(nestedArray);
849
+ return result;
722
850
  }
723
851
  /**tree-节点选择 */
724
852
  _nodeClick(event) {
853
+ this.filters.skipCount = 0;
725
854
  this._theSelectedTreeNode = event;
726
855
  this.list.get();
727
856
  }
728
857
  /**图片上传-获取文件信息改变 */
729
858
  async getFileChange(event) {
730
- let files = new Array(...event.target.files);
859
+ const _that = this;
860
+ const files = new Array(...event.target.files);
731
861
  this.uploadPictureStatusList = files;
862
+ const uploadPromises = [];
732
863
  for (const file of files) {
733
864
  if (file.size > this.sizeLimit) {
734
865
  this.setuploadPictureStatus(file, 2);
735
866
  continue;
736
867
  }
737
- await this.uploadingFile(file).then(() => {
868
+ uploadPromises.push(this.uploadingFile(file)
869
+ .then(res => {
738
870
  this.setuploadPictureStatus(file, 1);
739
- this.list.get();
740
- }).catch(() => {
871
+ })
872
+ .catch(function (err) {
741
873
  this.setuploadPictureStatus(file, 2);
742
- }); // 等待每个文件上传完成
743
- }
744
- this.list.get();
745
- let isSubmit = !this.uploadPictureStatusList.some(el => el.status == 2);
746
- if (isSubmit) {
747
- // this.toaster.success("上传完成");
748
- setTimeout(() => {
749
- this.uploadPictureStatusList = [];
750
- }, 6000);
874
+ return err;
875
+ }));
751
876
  }
877
+ Promise.all(uploadPromises).then((results) => {
878
+ _that.list.get();
879
+ const isSubmit = !_that.uploadPictureStatusList.some(el => el.status == 2);
880
+ if (isSubmit) {
881
+ setTimeout(() => {
882
+ _that.uploadPictureStatusList = [];
883
+ }, 4000);
884
+ }
885
+ });
752
886
  }
753
887
  /**图片上传-设置uploadPictureStatusList的状态 */
754
888
  setuploadPictureStatus(file, type) {
@@ -760,49 +894,163 @@ class FileModalComponent {
760
894
  /**图片上传-递归按顺序上传 */
761
895
  uploadingFile(file) {
762
896
  return new Promise((resolve, rejects) => {
763
- let formData = new FormData();
897
+ const formData = new FormData();
764
898
  formData.append('file', file, file.name);
765
899
  this.createFile({
766
900
  file: formData,
767
901
  containerName: this._fileContainerName,
768
902
  directoryId: this._theSelectedTreeNode?.key || '',
769
- entityId: ''
903
+ entityId: '',
770
904
  }).subscribe(res => {
771
- resolve(true);
772
- }, (err) => {
773
- rejects(false);
905
+ resolve({ file: file.name, status: 'success', response: res });
906
+ }, err => {
907
+ rejects({ file: file.name, status: 'fail', error: err });
774
908
  });
775
909
  });
776
910
  }
777
- ngOnChanges(changes) {
778
- //Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
779
- //Add '${implements OnChanges}' to the class.
780
- this.selectedTable = this._FileApiService.deepClone(this.selectPickerFile);
781
- }
782
911
  /**文件表格-获取表格数据 */
783
912
  hookToQuery() {
784
913
  const getData = (query) => this._FileService.getList({
785
914
  ...query,
786
915
  ...this.filters,
787
916
  containerName: this._fileContainerName,
788
- directoryId: this._theSelectedTreeNode.key
917
+ directoryId: this._theSelectedTreeNode.key,
789
918
  });
790
- const setData = (list) => (this.data = list);
919
+ const setData = (list) => {
920
+ this.data = list;
921
+ this.onPageChange(list.items);
922
+ };
791
923
  this.list.hookToQuery(getData).subscribe(setData);
792
924
  }
793
925
  /**文件表格-查看所有分组的文件数据 */
794
926
  lookAllFile() {
927
+ this.filters.skipCount = 0;
795
928
  this._theSelectedTreeNode = '';
796
929
  this.list.get();
797
930
  }
798
- /**选择表格项 */
799
- onSelectTableItem({ selected }) {
800
- this.selectedTable = this._FileApiService.deepClone(selected);
801
- let selectedTablearr = this.removeDuplicatesById(this.selectedTable);
802
- if (selected.length > selectedTablearr.length) {
803
- selectedTablearr = selectedTablearr.filter(el => el.id !== this.nowSelectId);
931
+ /**删除图片 */
932
+ deleteFile(file) {
933
+ this._FileService.delete(file.id).subscribe(res => {
934
+ this.toaster.success(this._LocalizationService.instant(`FileExplorer::DeletedSuccessfully`));
935
+ this.list.get();
936
+ const selectedTables = this.selectedTable;
937
+ this.selectedTable = selectedTables.filter(el => el.id != file.id);
938
+ });
939
+ }
940
+ /**删除所有选中图片 */
941
+ onDeleteAllSelectFile() {
942
+ this.confirmation
943
+ .warn('', {
944
+ key: '',
945
+ defaultValue: this._LocalizationService.instant(`FileExplorer::AreYouSure`),
946
+ })
947
+ .subscribe(async (status) => {
948
+ if (status == 'confirm') {
949
+ const selectedTable = this.selectedTable;
950
+ try {
951
+ const result = await this.batchDeleteItems(selectedTable);
952
+ console.log(result, 'resultresultresult');
953
+ if (result.success) {
954
+ this.toaster.success(result.message);
955
+ this.list.get();
956
+ this.selectedTable = [];
957
+ // 可能需要刷新表格或更新UI
958
+ }
959
+ else {
960
+ //删除失败的项
961
+ this.list.get();
962
+ // 可以选择展示失败项或重试
963
+ this.selectedTable = result.failedItems;
964
+ }
965
+ }
966
+ catch (error) {
967
+ //批量删除过程中发生错误
968
+ }
969
+ }
970
+ });
971
+ }
972
+ /**
973
+ * 批量删除表格项
974
+ * @param selectedTable 需要删除的表格项数组
975
+ * @returns 包含成功状态和失败项的结果对象
976
+ */
977
+ async batchDeleteItems(selectedTable) {
978
+ // 存储所有删除请求的Promise
979
+ const deletePromises = selectedTable.map(item => {
980
+ return new Promise((resolve, reject) => {
981
+ this._FileService.delete(item.id).subscribe(() => {
982
+ resolve(null);
983
+ }, () => {
984
+ reject(item);
985
+ });
986
+ });
987
+ });
988
+ // 等待所有请求完成
989
+ const results = await Promise.allSettled(deletePromises);
990
+ // 收集失败的项
991
+ const failedItems = [];
992
+ results.forEach(result => {
993
+ if (result.status === 'rejected') {
994
+ failedItems.push(result.reason);
995
+ }
996
+ });
997
+ return {
998
+ success: failedItems.length === 0,
999
+ failedItems,
1000
+ message: failedItems.length === 0
1001
+ ? this._LocalizationService.instant(`FileExplorer::DeletedSuccessfully`)
1002
+ : `${failedItems.length}个项删除失败`,
1003
+ };
1004
+ }
1005
+ /**关闭文件状态弹窗 */
1006
+ closeFileStatusModal() {
1007
+ this.uploadPictureStatusList = [];
1008
+ }
1009
+ ngOnChanges(changes) {
1010
+ //Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
1011
+ //Add '${implements OnChanges}' to the class.
1012
+ this.selectedTable = structuredClone(this.selectPickerFile);
1013
+ }
1014
+ /**表格分页切换 */
1015
+ onPageChange(newArray) {
1016
+ this.isAllSelected = this.isAllSelectedFn(newArray, this.selectedTable);
1017
+ }
1018
+ /**行选择框改变 */
1019
+ onCheckboxChangeFn(event, row, array) {
1020
+ const { checked } = event.target;
1021
+ let selectedTableArray = [...this.selectedTable];
1022
+ if (this._multiple) {
1023
+ if (checked) {
1024
+ selectedTableArray.push(row);
1025
+ }
1026
+ else {
1027
+ selectedTableArray = selectedTableArray.filter(el => el.id != row.id);
1028
+ }
1029
+ this.isAllSelected = this.isAllSelectedFn(array, selectedTableArray);
804
1030
  }
805
- this.selectedTable = selectedTablearr;
1031
+ else {
1032
+ selectedTableArray.length = 0;
1033
+ selectedTableArray = checked ? [row] : [];
1034
+ }
1035
+ this.selectedTable = this.removeDuplicatesById(selectedTableArray);
1036
+ }
1037
+ /**如果selectedTableArray不含array中的所有项,则将isAllSelected设为true,否则设为false */
1038
+ isAllSelectedFn(tolalArray, selectedArray = []) {
1039
+ if (tolalArray.length == 0)
1040
+ return false;
1041
+ return tolalArray.every(item => selectedArray.some(el => el.id === item.id));
1042
+ }
1043
+ /**选择当前页全部 */
1044
+ onSelectAllFn(event, array) {
1045
+ let selectedTableArray = this.selectedTable;
1046
+ if (event.target.checked) {
1047
+ selectedTableArray = this.removeDuplicatesById([...selectedTableArray, ...array]);
1048
+ }
1049
+ else {
1050
+ selectedTableArray = selectedTableArray.filter(el => !array.some(item => item.id === el.id));
1051
+ }
1052
+ this.isAllSelected = event.target.checked;
1053
+ this.selectedTable = selectedTableArray;
806
1054
  }
807
1055
  /**删除数组中重复的项 */
808
1056
  removeDuplicatesById(array) {
@@ -815,32 +1063,61 @@ class FileModalComponent {
815
1063
  return false;
816
1064
  });
817
1065
  }
818
- /**删除图片 */
819
- deleteFile(file) {
820
- this.confirmation
821
- .warn('', { key: '', defaultValue: this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`) })
822
- .subscribe((status) => {
823
- if (status == 'confirm') {
824
- this._FileService.delete(file.id).subscribe(res => {
825
- this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
826
- this.list.get();
827
- });
1066
+ /**提交FileName编辑 */
1067
+ onSubmitFileName(event) {
1068
+ const input = this.FileNameForm.value;
1069
+ if (!this.FileNameForm.valid)
1070
+ return;
1071
+ if (this.isloading)
1072
+ return;
1073
+ this.isloading = true;
1074
+ this._FileService
1075
+ .update(input.id, {
1076
+ name: input.fileName,
1077
+ })
1078
+ .pipe(finalize(() => {
1079
+ this.isloading = false;
1080
+ }))
1081
+ .subscribe(res => {
1082
+ //通过当前newEditRow的id,修改data.items中对应项的name
1083
+ for (const element of this.data.items) {
1084
+ if (element.id == this.newEditRow.id) {
1085
+ element.name = input.fileName;
1086
+ break;
1087
+ }
828
1088
  }
1089
+ this.FileNameForm = undefined;
1090
+ this.newEditRow = '';
1091
+ this.toaster.success(this._LocalizationService.instant(`FileExplorer::SavedSuccessfully`));
1092
+ // this.list.get();
829
1093
  });
830
1094
  }
831
- /**关闭文件状态弹窗 */
832
- closeFileStatusModal() {
833
- this.uploadPictureStatusList = [];
1095
+ /**打开编辑 */
1096
+ onEditFileName(row) {
1097
+ this.FileNameForm = new FormGroup({
1098
+ fileName: new FormControl('', [Validators.required]),
1099
+ id: new FormControl('', [Validators.required]),
1100
+ });
1101
+ this.FileNameForm.patchValue({
1102
+ fileName: row.name,
1103
+ id: row.id,
1104
+ });
1105
+ this.newEditRow = row;
1106
+ }
1107
+ /**关闭编辑 */
1108
+ onCancelFileName(row) {
1109
+ this.newEditRow = '';
1110
+ this.FileNameForm = undefined;
834
1111
  }
835
- 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 }); }
836
- 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: [
1112
+ 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: i3.RestService }, { token: i2$1.ConfirmationService }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
1113
+ 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: [
837
1114
  // [Required]
838
1115
  ListService,
839
1116
  // [Optional]
840
1117
  // Provide this token if you want a different debounce time.
841
1118
  // Default is 300. Cannot be 0. Any value below 100 is not recommended.
842
1119
  { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
843
- ], 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", "className"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1120
+ ], 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 {{(value|formatFileSize) }}\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:(sizeLimit|formatFileSize)}}\n </div>\n </th>\n <td>{{ item.size | formatFileSize }}</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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.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: 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: 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: i5.DatePipe, name: "date" }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: GetDirectoryNamePipe, name: "getDirectoryName" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }] }); }
844
1121
  }
845
1122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileModalComponent, decorators: [{
846
1123
  type: Component,
@@ -851,8 +1128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
851
1128
  // Provide this token if you want a different debounce time.
852
1129
  // Default is 300. Cannot be 0. Any value below 100 is not recommended.
853
1130
  { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
854
- ], 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"] }]
855
- }], 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: [{
1131
+ ], 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 {{(value|formatFileSize) }}\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:(sizeLimit|formatFileSize)}}\n </div>\n </th>\n <td>{{ item.size | formatFileSize }}</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"] }]
1132
+ }], ctorParameters: () => [{ type: FileDescriptorService$1 }, { type: i2$1.ToasterService }, { type: i3.ListService }, { type: i3.RestService }, { type: i2$1.ConfirmationService }, { type: i3.LocalizationService }], propDecorators: { fileContainerName: [{
856
1133
  type: Input
857
1134
  }], multiple: [{
858
1135
  type: Input
@@ -862,16 +1139,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
862
1139
  type: Input
863
1140
  }], visibleChange: [{
864
1141
  type: Output
865
- }], selectPickerFile: [{
866
- type: Input
867
1142
  }], selectFilefn: [{
868
1143
  type: Output
1144
+ }], selectPickerFile: [{
1145
+ type: Input
869
1146
  }] } });
870
1147
 
871
1148
  /* eslint-disable @angular-eslint/component-selector */
872
1149
  class FilePickerComponent {
873
- constructor(_FileApiService) {
874
- this._FileApiService = _FileApiService;
1150
+ constructor() {
875
1151
  /**是否多选 */
876
1152
  this._multiple = false;
877
1153
  /**图片容器 */
@@ -888,14 +1164,14 @@ class FilePickerComponent {
888
1164
  this._fileContainerName = v;
889
1165
  }
890
1166
  ngOnChanges(changes) {
891
- let selectFormFilengOnChanges = changes.selectFormFile['currentValue'];
1167
+ const selectFormFilengOnChanges = changes.selectFormFile['currentValue'];
892
1168
  if (selectFormFilengOnChanges.length > 0) {
893
1169
  this._fileShowTable = selectFormFilengOnChanges;
894
1170
  }
895
1171
  }
896
1172
  /**表格选择的文件回调 */
897
1173
  _selectFilefn(event) {
898
- let _fileShowTable = this._FileApiService.deepClone(event);
1174
+ const _fileShowTable = structuredClone(event);
899
1175
  this._fileShowTable = _fileShowTable;
900
1176
  this.selectFormFile = _fileShowTable;
901
1177
  this.selectedFileChange.emit(_fileShowTable);
@@ -907,13 +1183,20 @@ class FilePickerComponent {
907
1183
  this.selectedFileChange.emit([]);
908
1184
  this.selectedFileChange.emit(this.selectFormFile);
909
1185
  }
910
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePickerComponent, deps: [{ token: FileApiService }], target: i0.ɵɵFactoryTarget.Component }); }
911
- 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", "className"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
1186
+ /**调整表格位置 */
1187
+ drop(event) {
1188
+ moveItemInArray(this._fileShowTable, event.previousIndex, event.currentIndex);
1189
+ this.selectFormFile = this._fileShowTable;
1190
+ this.selectedFileChange.emit(this.selectFormFile);
1191
+ // this._fileShowTable.updateValueAndValidity()
1192
+ }
1193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1194
+ 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>{{(item.Size||item.size)|formatFileSize}}</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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i3$2.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: i3$2.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: i3$2.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" }, { kind: "pipe", type: FormatFileSizePipe, name: "formatFileSize" }] }); }
912
1195
  }
913
1196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FilePickerComponent, decorators: [{
914
1197
  type: Component,
915
- 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"] }]
916
- }], ctorParameters: () => [{ type: FileApiService }], propDecorators: { multiple: [{
1198
+ 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>{{(item.Size||item.size)|formatFileSize}}</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"] }]
1199
+ }], propDecorators: { multiple: [{
917
1200
  type: Input
918
1201
  }], fileContainerName: [{
919
1202
  type: Input
@@ -927,7 +1210,6 @@ class FileDomeComponent {
927
1210
  constructor() {
928
1211
  /**跟随表单提交--已提交的数据,或选择的数据源 */
929
1212
  this.fileSubmittedData = [];
930
- this.FileApiService = inject(FileApiService);
931
1213
  /**选择文件-弹窗的-已选定的文件 */
932
1214
  this.selectedFileGroup = [];
933
1215
  }
@@ -955,7 +1237,7 @@ const routes = [
955
1237
  ];
956
1238
  class FileExplorerRoutingModule {
957
1239
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
958
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
1240
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] }); }
959
1241
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
960
1242
  }
961
1243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerRoutingModule, decorators: [{
@@ -1020,13 +1302,13 @@ class FileExplorerConfigComponent {
1020
1302
  resolve(true);
1021
1303
  });
1022
1304
  }
1023
- 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 }); }
1024
- 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" }] }); }
1305
+ 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 }); }
1306
+ 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" }] }); }
1025
1307
  }
1026
1308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerConfigComponent, decorators: [{
1027
1309
  type: Component,
1028
1310
  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>" }]
1029
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { type: [{
1311
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { type: [{
1030
1312
  type: Input
1031
1313
  }], Entity: [{
1032
1314
  type: Input
@@ -1118,13 +1400,13 @@ class FileExplorerControlComponent {
1118
1400
  obj[fieldName] = event;
1119
1401
  this.extraProperties.patchValue(obj);
1120
1402
  }
1121
- 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 }); }
1122
- 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"] }] }); }
1403
+ 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 }); }
1404
+ 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: i5.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"] }] }); }
1123
1405
  }
1124
1406
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerControlComponent, decorators: [{
1125
1407
  type: Component,
1126
1408
  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>" }]
1127
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { entity: [{
1409
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { entity: [{
1128
1410
  type: Input
1129
1411
  }], fields: [{
1130
1412
  type: Input
@@ -1159,11 +1441,11 @@ class FileExplorerViewComponent {
1159
1441
  }
1160
1442
  }
1161
1443
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1162
- 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"] }] }); }
1444
+ 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]=\"'60px'\" [className]=\"'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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FilePreviewComponent, selector: "fe-file-preview", inputs: ["width", "src", "preview", "type", "name", "className"] }] }); }
1163
1445
  }
1164
1446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerViewComponent, decorators: [{
1165
1447
  type: Component,
1166
- 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}" }]
1448
+ 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]=\"'60px'\" [className]=\"'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}" }]
1167
1449
  }], propDecorators: { showInList: [{
1168
1450
  type: Input
1169
1451
  }], fields: [{
@@ -1211,20 +1493,35 @@ class FileExplorerModule {
1211
1493
  NgbDropdownModule,
1212
1494
  NzTreeModule,
1213
1495
  NgxValidateCoreModule,
1214
- FileExplorerRoutingModule], exports: [FileEditComponent,
1496
+ FileExplorerRoutingModule,
1497
+ TreeModule,
1498
+ GetDirectoryNamePipe,
1499
+ DragDropModule,
1500
+ FormatFileSizePipe], exports: [FileEditComponent,
1215
1501
  FilePickerComponent,
1216
1502
  FileModalComponent,
1217
1503
  FileModalTreeComponent,
1218
1504
  FileDomeComponent,
1219
1505
  FilePreviewComponent] }); }
1220
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerModule, imports: [FormsModule,
1506
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerModule, providers: [
1507
+ FormatFileSizePipe,
1508
+ // GetImageUrlPipe
1509
+ // // [Required]
1510
+ // ListService,
1511
+ // // [Optional]
1512
+ // // Provide this token if you want a different debounce time.
1513
+ // // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1514
+ // { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1515
+ ], imports: [FormsModule,
1221
1516
  CoreModule,
1222
1517
  ThemeSharedModule,
1223
1518
  ReactiveFormsModule,
1224
1519
  NgbDropdownModule,
1225
1520
  NzTreeModule,
1226
1521
  NgxValidateCoreModule,
1227
- FileExplorerRoutingModule] }); }
1522
+ FileExplorerRoutingModule,
1523
+ TreeModule,
1524
+ DragDropModule] }); }
1228
1525
  }
1229
1526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FileExplorerModule, decorators: [{
1230
1527
  type: NgModule,
@@ -1249,6 +1546,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1249
1546
  NzTreeModule,
1250
1547
  NgxValidateCoreModule,
1251
1548
  FileExplorerRoutingModule,
1549
+ TreeModule,
1550
+ GetDirectoryNamePipe,
1551
+ DragDropModule,
1552
+ FormatFileSizePipe,
1252
1553
  ],
1253
1554
  exports: [
1254
1555
  FileEditComponent,
@@ -1257,17 +1558,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
1257
1558
  FileModalTreeComponent,
1258
1559
  FileDomeComponent,
1259
1560
  FilePreviewComponent,
1561
+ // FormatFileSizePipe
1260
1562
  // FileExplorerConfigComponent,
1261
1563
  // FileExplorerControlComponent,
1262
1564
  ],
1263
1565
  providers: [
1264
- // GetImageUrlPipe
1265
- // // [Required]
1266
- // ListService,
1267
- // // [Optional]
1268
- // // Provide this token if you want a different debounce time.
1269
- // // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1270
- // { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1566
+ FormatFileSizePipe,
1567
+ // GetImageUrlPipe
1568
+ // // [Required]
1569
+ // ListService,
1570
+ // // [Optional]
1571
+ // // Provide this token if you want a different debounce time.
1572
+ // // Default is 300. Cannot be 0. Any value below 100 is not recommended.
1573
+ // { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
1271
1574
  ],
1272
1575
  }]
1273
1576
  }] });