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