@ng-nest/ui 13.1.5 → 13.1.8
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/auto-complete/auto-complete.component.d.ts +1 -0
- package/auto-complete/auto-complete.property.d.ts +6 -1
- package/core/config/config.d.ts +6 -0
- package/dropdown/dropdown-portal.component.d.ts +2 -0
- package/dropdown/dropdown.component.d.ts +1 -0
- package/dropdown/dropdown.module.d.ts +2 -1
- package/dropdown/dropdown.property.d.ts +11 -1
- package/esm2020/auto-complete/auto-complete.component.mjs +25 -10
- package/esm2020/auto-complete/auto-complete.property.mjs +8 -2
- package/esm2020/core/config/config.mjs +1 -1
- package/esm2020/core/interfaces/identify.type.mjs +1 -1
- package/esm2020/description/description.component.mjs +3 -3
- package/esm2020/dialog/dialog-portal.component.mjs +6 -1
- package/esm2020/dropdown/dropdown-portal.component.mjs +10 -4
- package/esm2020/dropdown/dropdown.component.mjs +8 -1
- package/esm2020/dropdown/dropdown.module.mjs +5 -4
- package/esm2020/dropdown/dropdown.property.mjs +11 -2
- package/esm2020/list/list.component.mjs +4 -4
- package/esm2020/menu/menu.component.mjs +3 -3
- package/esm2020/table/table-body.component.mjs +14 -7
- package/esm2020/table/table.component.mjs +65 -17
- package/esm2020/table/table.module.mjs +5 -1
- package/esm2020/table/table.property.mjs +44 -3
- package/esm2020/tree/tree-node.component.mjs +74 -19
- package/esm2020/tree/tree.component.mjs +34 -7
- package/esm2020/tree/tree.module.mjs +5 -4
- package/esm2020/tree/tree.property.mjs +34 -3
- package/esm2020/upload/upload.component.mjs +18 -11
- package/esm2020/upload/upload.property.mjs +17 -3
- package/fesm2015/ng-nest-ui-auto-complete.mjs +31 -10
- package/fesm2015/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-description.mjs +2 -2
- package/fesm2015/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-dialog.mjs +5 -0
- package/fesm2015/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-dropdown.mjs +32 -9
- package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-list.mjs +3 -3
- package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-menu.mjs +2 -2
- package/fesm2015/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-table.mjs +124 -22
- package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-tree.mjs +143 -27
- package/fesm2015/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-upload.mjs +32 -11
- package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-auto-complete.mjs +31 -10
- package/fesm2020/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-description.mjs +2 -2
- package/fesm2020/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-dialog.mjs +5 -0
- package/fesm2020/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-dropdown.mjs +32 -9
- package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-list.mjs +3 -3
- package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-menu.mjs +2 -2
- package/fesm2020/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-table.mjs +122 -22
- package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-tree.mjs +141 -27
- package/fesm2020/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-upload.mjs +32 -11
- package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
- package/package.json +1 -1
- package/table/examples/en_US/default/expand/README.md +8 -0
- package/table/examples/zh_CN/default/expand/README.md +8 -0
- package/table/table-body.component.d.ts +1 -0
- package/table/table.component.d.ts +10 -2
- package/table/table.module.d.ts +5 -4
- package/table/table.property.d.ts +60 -5
- package/tree/examples/en_US/default/virtual-scroll/README.md +7 -0
- package/tree/examples/zh_CN/default/virtual-scroll/README.md +7 -0
- package/tree/tree-node.component.d.ts +2 -0
- package/tree/tree.component.d.ts +2 -0
- package/tree/tree.module.d.ts +2 -1
- package/tree/tree.property.d.ts +27 -2
- package/upload/examples/en_US/default/custom/README.md +6 -0
- package/upload/examples/zh_CN/default/custom/README.md +6 -0
- package/upload/upload.component.d.ts +3 -1
- package/upload/upload.property.d.ts +21 -1
|
@@ -3,11 +3,12 @@ import { HttpRequest, HttpEventType } from '@angular/common/http';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, NgModule } from '@angular/core';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
|
-
import
|
|
6
|
+
import * as i4 from '@ng-nest/ui/core';
|
|
7
|
+
import { XInputBoolean, XWithConfig, XClamp, XIsTemplateRef } from '@ng-nest/ui/core';
|
|
7
8
|
import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
|
|
8
9
|
import { takeUntil, map } from 'rxjs/operators';
|
|
9
10
|
import { Subject, fromEvent } from 'rxjs';
|
|
10
|
-
import * as
|
|
11
|
+
import * as i8 from '@angular/common';
|
|
11
12
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
12
13
|
import * as i1 from '@ng-nest/ui/icon';
|
|
13
14
|
import { XIconModule } from '@ng-nest/ui/icon';
|
|
@@ -15,9 +16,9 @@ import * as i2 from '@ng-nest/ui/portal';
|
|
|
15
16
|
import { XPortalModule } from '@ng-nest/ui/portal';
|
|
16
17
|
import * as i3 from '@ng-nest/ui/i18n';
|
|
17
18
|
import { XI18nModule } from '@ng-nest/ui/i18n';
|
|
18
|
-
import * as
|
|
19
|
+
import * as i5 from '@ng-nest/ui/button';
|
|
19
20
|
import { XButtonModule } from '@ng-nest/ui/button';
|
|
20
|
-
import * as
|
|
21
|
+
import * as i7 from '@ng-nest/ui/outlet';
|
|
21
22
|
import { XOutletModule } from '@ng-nest/ui/outlet';
|
|
22
23
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
23
24
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
@@ -28,6 +29,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
|
28
29
|
* @decorator component
|
|
29
30
|
*/
|
|
30
31
|
const XUploadPrefix = 'x-upload';
|
|
32
|
+
const X_CONFIG_NAME = 'upload';
|
|
31
33
|
/**
|
|
32
34
|
* Upload Property
|
|
33
35
|
*/
|
|
@@ -67,13 +69,20 @@ class XUploadProperty extends XControlValueAccessor {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
/** @nocollapse */ /** @nocollapse */ XUploadProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XUploadProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
/** @nocollapse */ /** @nocollapse */ XUploadProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XUploadProperty, selector: "ng-component", inputs: { text: "text", action: "action", accept: "accept", type: "type", imgCut: "imgCut", multiple: "multiple" }, outputs: { removeClick: "removeClick", uploadReady: "uploadReady", uploading: "uploading", uploadSuccess: "uploadSuccess", uploadError: "uploadError" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
72
|
+
/** @nocollapse */ /** @nocollapse */ XUploadProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XUploadProperty, selector: "ng-component", inputs: { text: "text", action: "action", accept: "accept", type: "type", imgCut: "imgCut", multiple: "multiple", download: "download", multipleModel: "multipleModel", filesTpl: "filesTpl" }, outputs: { removeClick: "removeClick", uploadReady: "uploadReady", uploading: "uploading", uploadSuccess: "uploadSuccess", uploadError: "uploadError" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
71
73
|
__decorate([
|
|
72
74
|
XInputBoolean()
|
|
73
75
|
], XUploadProperty.prototype, "imgCut", void 0);
|
|
74
76
|
__decorate([
|
|
75
77
|
XInputBoolean()
|
|
76
78
|
], XUploadProperty.prototype, "multiple", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
XWithConfig(X_CONFIG_NAME, true),
|
|
81
|
+
XInputBoolean()
|
|
82
|
+
], XUploadProperty.prototype, "download", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
XWithConfig(X_CONFIG_NAME, 'cover')
|
|
85
|
+
], XUploadProperty.prototype, "multipleModel", void 0);
|
|
77
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XUploadProperty, decorators: [{
|
|
78
87
|
type: Component,
|
|
79
88
|
args: [{ template: '' }]
|
|
@@ -89,6 +98,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
89
98
|
type: Input
|
|
90
99
|
}], multiple: [{
|
|
91
100
|
type: Input
|
|
101
|
+
}], download: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], multipleModel: [{
|
|
104
|
+
type: Input
|
|
105
|
+
}], filesTpl: [{
|
|
106
|
+
type: Input
|
|
92
107
|
}], removeClick: [{
|
|
93
108
|
type: Output
|
|
94
109
|
}], uploadReady: [{
|
|
@@ -299,7 +314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
299
314
|
}] } });
|
|
300
315
|
|
|
301
316
|
class XUploadComponent extends XUploadProperty {
|
|
302
|
-
constructor(renderer, elementRef, http, cdr, portalService, viewContainerRef, i18n) {
|
|
317
|
+
constructor(renderer, elementRef, http, cdr, portalService, viewContainerRef, i18n, configService) {
|
|
303
318
|
super();
|
|
304
319
|
this.renderer = renderer;
|
|
305
320
|
this.elementRef = elementRef;
|
|
@@ -308,6 +323,7 @@ class XUploadComponent extends XUploadProperty {
|
|
|
308
323
|
this.portalService = portalService;
|
|
309
324
|
this.viewContainerRef = viewContainerRef;
|
|
310
325
|
this.i18n = i18n;
|
|
326
|
+
this.configService = configService;
|
|
311
327
|
this.files = [];
|
|
312
328
|
this.showUpload = false;
|
|
313
329
|
this.uploadNodes = [];
|
|
@@ -361,7 +377,12 @@ class XUploadComponent extends XUploadProperty {
|
|
|
361
377
|
}
|
|
362
378
|
if (files.length > 0)
|
|
363
379
|
this.showUpload = true;
|
|
364
|
-
this.
|
|
380
|
+
if (this.multipleModel === 'cover') {
|
|
381
|
+
this.files = files;
|
|
382
|
+
}
|
|
383
|
+
else if (this.multipleModel === 'add') {
|
|
384
|
+
this.files = [...this.files, ...files];
|
|
385
|
+
}
|
|
365
386
|
this.value = this.files;
|
|
366
387
|
this.onChange && this.onChange(this.value);
|
|
367
388
|
this.onUploading();
|
|
@@ -503,12 +524,12 @@ class XUploadComponent extends XUploadProperty {
|
|
|
503
524
|
this.cdr.detectChanges();
|
|
504
525
|
}
|
|
505
526
|
}
|
|
506
|
-
/** @nocollapse */ /** @nocollapse */ XUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XUploadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$1.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i2.XPortalService }, { token: i0.ViewContainerRef }, { token: i3.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
507
|
-
/** @nocollapse */ /** @nocollapse */ XUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XUploadComponent, selector: "x-upload", providers: [XValueAccessor(XUploadComponent)], viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container [ngSwitch]=\"type\">\r\n
|
|
527
|
+
/** @nocollapse */ /** @nocollapse */ XUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XUploadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$1.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i2.XPortalService }, { token: i0.ViewContainerRef }, { token: i3.XI18nService }, { token: i4.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
528
|
+
/** @nocollapse */ /** @nocollapse */ XUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XUploadComponent, selector: "x-upload", providers: [XValueAccessor(XUploadComponent)], viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container *xOutlet=\"filesTpl; context: { $files: files }\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'list'\">\r\n <ul class=\"x-upload-files\">\r\n <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"download\">\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!download\">\r\n <a>\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <div class=\"x-upload-img-item {{ file.state }}\" *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [title]=\"file.name\">\r\n <div class=\"x-upload-img-inner\">\r\n <img [src]=\"file.url\" (load)=\"imgLoad(file)\" (error)=\"imgError($event, file)\" />\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span *ngIf=\"file.state == 'uploading'\">{{ file.percent }}%</span>\r\n </div>\r\n <div class=\"x-upload-img-btns\">\r\n <div class=\"x-upload-img-btns-inner\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n <a [href]=\"file.url\" target=\"_blank\" *ngSwitchCase=\"'success'\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n </a>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n", styles: [".x-upload{margin:0;padding:0;color:var(--x-text);font-size:var(--x-font-size)}.x-upload-buttons{display:inline-flex}.x-upload-buttons>.x-button:not(:first-child){margin-left:.4rem}.x-upload-buttons-template{cursor:pointer}.x-upload-files{margin-top:.4rem}.x-upload-files>li{padding:0 .2rem;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);display:flex;align-items:center;overflow:hidden;cursor:pointer;border-radius:var(--x-border-radius)}.x-upload-files>li .x-icon{color:var(--x-text-400);font-size:1rem}.x-upload-files>li .x-icon.x-upload-state.success{color:var(--x-success)}.x-upload-files>li .x-icon.x-upload-state.error{color:var(--x-danger)}.x-upload-files>li a{flex:1;display:flex;align-items:center;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);color:inherit;text-decoration:none;overflow:hidden}.x-upload-files>li span.x-upload-filename{margin-left:.2rem;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-upload-files>li span.x-upload-percent{color:var(--x-text-400)}.x-upload-files>li>.x-button{display:none;padding:0}.x-upload-files>li:not(:first-child){margin-top:.2rem}.x-upload-files>li.x-upload-disabled{cursor:default}.x-upload-files>li.x-upload-disabled>a{cursor:default}.x-upload-files>li:hover:not(.x-upload-disabled){color:var(--x-primary);background-color:var(--x-background)}.x-upload-files>li:hover>.x-button{display:inline-block}.x-upload-files>li:hover>.x-upload-state{display:none}.x-upload-img{display:flex;flex-wrap:wrap}.x-upload-img .x-upload-buttons-template{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:6.25rem;height:6.25rem;margin-right:.5rem;margin-bottom:.5rem;border:var(--x-border-width) dashed var(--x-border);background:var(--x-background);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base)}.x-upload-img .x-upload-buttons-template:hover{border-color:var(--x-primary)}.x-upload-img-item{height:6.25rem;width:6.25rem;padding:.325rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base);margin-right:.5rem;margin-bottom:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.x-upload-img-item .x-upload-img-inner{height:100%;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column}.x-upload-img-item .x-upload-img-inner>img{width:100%;border-radius:var(--x-border-radius)}.x-upload-img-item .x-upload-img-inner>x-icon{display:none;font-size:3rem;color:var(--x-danger)}.x-upload-img-item.error{border-color:var(--x-danger)}.x-upload-img-item.error .x-upload-img-inner>img{display:none}.x-upload-img-item.error .x-upload-img-inner>x-icon{display:inherit}.x-upload-img-item:hover .x-upload-img-btns{background-color:#00000073}.x-upload-img-item:hover .x-upload-img-btns-inner{display:initial}.x-upload-img-btns{position:absolute;height:100%;width:100%;display:flex;align-items:center;justify-content:center;border-radius:var(--x-border-radius);background-color:#0000;transition:all var(--x-animation-duration-base)}.x-upload-img-btns x-icon{cursor:pointer;font-size:1rem;padding:.25rem;color:#ffffffb3}.x-upload-img-btns x-icon:hover{color:#fff}.x-upload-img-btns-inner{display:none}\n"], components: [{ type: i5.XButtonComponent, selector: "x-button" }, { type: i1.XIconComponent, selector: "x-icon" }], directives: [{ type: i7.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i8.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i8.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
508
529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XUploadComponent, decorators: [{
|
|
509
530
|
type: Component,
|
|
510
|
-
args: [{ selector: `${XUploadPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XUploadComponent)], template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container [ngSwitch]=\"type\">\r\n
|
|
511
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1$1.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i2.XPortalService }, { type: i0.ViewContainerRef }, { type: i3.XI18nService }]; }, propDecorators: { file: [{
|
|
531
|
+
args: [{ selector: `${XUploadPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XUploadComponent)], template: "<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container *xOutlet=\"filesTpl; context: { $files: files }\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'list'\">\r\n <ul class=\"x-upload-files\">\r\n <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"download\">\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!download\">\r\n <a>\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <div class=\"x-upload-img-item {{ file.state }}\" *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [title]=\"file.name\">\r\n <div class=\"x-upload-img-inner\">\r\n <img [src]=\"file.url\" (load)=\"imgLoad(file)\" (error)=\"imgError($event, file)\" />\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span *ngIf=\"file.state == 'uploading'\">{{ file.percent }}%</span>\r\n </div>\r\n <div class=\"x-upload-img-btns\">\r\n <div class=\"x-upload-img-btns-inner\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n <a [href]=\"file.url\" target=\"_blank\" *ngSwitchCase=\"'success'\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n </a>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n", styles: [".x-upload{margin:0;padding:0;color:var(--x-text);font-size:var(--x-font-size)}.x-upload-buttons{display:inline-flex}.x-upload-buttons>.x-button:not(:first-child){margin-left:.4rem}.x-upload-buttons-template{cursor:pointer}.x-upload-files{margin-top:.4rem}.x-upload-files>li{padding:0 .2rem;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);display:flex;align-items:center;overflow:hidden;cursor:pointer;border-radius:var(--x-border-radius)}.x-upload-files>li .x-icon{color:var(--x-text-400);font-size:1rem}.x-upload-files>li .x-icon.x-upload-state.success{color:var(--x-success)}.x-upload-files>li .x-icon.x-upload-state.error{color:var(--x-danger)}.x-upload-files>li a{flex:1;display:flex;align-items:center;height:calc(var(--x-font-size) + .6rem);line-height:calc(var(--x-font-size) + .6rem);color:inherit;text-decoration:none;overflow:hidden}.x-upload-files>li span.x-upload-filename{margin-left:.2rem;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x-upload-files>li span.x-upload-percent{color:var(--x-text-400)}.x-upload-files>li>.x-button{display:none;padding:0}.x-upload-files>li:not(:first-child){margin-top:.2rem}.x-upload-files>li.x-upload-disabled{cursor:default}.x-upload-files>li.x-upload-disabled>a{cursor:default}.x-upload-files>li:hover:not(.x-upload-disabled){color:var(--x-primary);background-color:var(--x-background)}.x-upload-files>li:hover>.x-button{display:inline-block}.x-upload-files>li:hover>.x-upload-state{display:none}.x-upload-img{display:flex;flex-wrap:wrap}.x-upload-img .x-upload-buttons-template{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:6.25rem;height:6.25rem;margin-right:.5rem;margin-bottom:.5rem;border:var(--x-border-width) dashed var(--x-border);background:var(--x-background);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base)}.x-upload-img .x-upload-buttons-template:hover{border-color:var(--x-primary)}.x-upload-img-item{height:6.25rem;width:6.25rem;padding:.325rem;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);transition:border-color var(--x-animation-duration-base);margin-right:.5rem;margin-bottom:.5rem;position:relative;display:flex;align-items:center;justify-content:center}.x-upload-img-item .x-upload-img-inner{height:100%;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column}.x-upload-img-item .x-upload-img-inner>img{width:100%;border-radius:var(--x-border-radius)}.x-upload-img-item .x-upload-img-inner>x-icon{display:none;font-size:3rem;color:var(--x-danger)}.x-upload-img-item.error{border-color:var(--x-danger)}.x-upload-img-item.error .x-upload-img-inner>img{display:none}.x-upload-img-item.error .x-upload-img-inner>x-icon{display:inherit}.x-upload-img-item:hover .x-upload-img-btns{background-color:#00000073}.x-upload-img-item:hover .x-upload-img-btns-inner{display:initial}.x-upload-img-btns{position:absolute;height:100%;width:100%;display:flex;align-items:center;justify-content:center;border-radius:var(--x-border-radius);background-color:#0000;transition:all var(--x-animation-duration-base)}.x-upload-img-btns x-icon{cursor:pointer;font-size:1rem;padding:.25rem;color:#ffffffb3}.x-upload-img-btns x-icon:hover{color:#fff}.x-upload-img-btns-inner{display:none}\n"] }]
|
|
532
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1$1.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i2.XPortalService }, { type: i0.ViewContainerRef }, { type: i3.XI18nService }, { type: i4.XConfigService }]; }, propDecorators: { file: [{
|
|
512
533
|
type: ViewChild,
|
|
513
534
|
args: ['file', { static: true }]
|
|
514
535
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-upload.mjs","sources":["../../../../lib/ng-nest/ui/upload/upload.property.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.html","../../../../lib/ng-nest/ui/upload/upload.component.ts","../../../../lib/ng-nest/ui/upload/upload.component.html","../../../../lib/ng-nest/ui/upload/upload.module.ts","../../../../lib/ng-nest/ui/upload/ng-nest-ui-upload.ts"],"sourcesContent":["import { XInputBoolean, XBoolean, XTemplate, XPosition, XCorner } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\nimport { XControlValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Upload\r\n * @selector x-upload\r\n * @decorator component\r\n */\r\nexport const XUploadPrefix = 'x-upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ template: '' })\r\nexport class XUploadProperty extends XControlValueAccessor<XUploadNode[]> {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n @Input() text?: XTemplate;\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n @Input() action?: string;\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n @Input() accept?: string;\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n @Input() type: XUploadType = 'list';\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n @Input() @XInputBoolean() imgCut?: XBoolean;\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n @Input() @XInputBoolean() multiple?: XBoolean;\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n @Output() removeClick = new EventEmitter<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadReady = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploading = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadSuccess = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadError = new EventEmitter<XUploadNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN Upload 数据对象\r\n * @en_US Upload data object\r\n */\r\nexport interface XUploadNode extends File {\r\n /**\r\n * @zh_CN 地址\r\n * @en_US address\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 状态\r\n * @en_US status\r\n */\r\n state?: XStateType;\r\n /**\r\n * @zh_CN 上传进度\r\n * @en_US Upload progress\r\n */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件状态\r\n * @en_US File status\r\n */\r\nexport type XStateType = 'ready' | 'uploading' | 'success' | 'error';\r\n\r\n/**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\nexport type XUploadType = 'list' | 'img';\r\n\r\n/**\r\n * @zh_CN 剪裁的方位\r\n * @en_US Tailored orientation\r\n */\r\nexport type XUploadCutType = XPosition | XCorner | '';\r\n\r\n/**\r\n * Upload Portal\r\n * @selector x-upload-portal\r\n * @decorator component\r\n */\r\nexport const XUploadPortalPrefix = 'x-upload-portal';\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n ElementRef,\r\n Renderer2,\r\n ChangeDetectorRef,\r\n Inject\r\n} from '@angular/core';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { XClamp } from '@ng-nest/ui/core';\r\nimport { XUploadCutType, XUploadNode, XUploadPortalPrefix } from './upload.property';\r\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\r\n templateUrl: './upload-portal.component.html',\r\n styleUrls: ['./upload-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XUploadPortalComponent {\r\n file!: XUploadNode;\r\n @ViewChild('imgRef') imgRef!: ElementRef;\r\n @ViewChild('imgClipRef') imgClipRef!: ElementRef;\r\n @ViewChild('boundaryRef') boundaryRef!: ElementRef;\r\n @ViewChild('cutRef') cutRef!: ElementRef;\r\n ready = false;\r\n cutType: XUploadCutType = '';\r\n proportion = 1;\r\n originalSize = {\r\n width: 0,\r\n height: 0\r\n };\r\n boundaryBox!: {\r\n width: 0;\r\n height: 0;\r\n };\r\n cutBox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n clipRect!: {\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n left: number;\r\n };\r\n\r\n doc: Document;\r\n\r\n closePortal!: () => void;\r\n destroyPortal!: () => void;\r\n surePortal!: (blob: Blob) => void;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(private renderer: Renderer2, private cdr: ChangeDetectorRef, @Inject(DOCUMENT) document: any) {\r\n this.doc = document;\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n ngAfterViewInit() {\r\n this.setCut();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.complete();\r\n }\r\n\r\n setCut() {\r\n let width = this.imgRef.nativeElement.clientWidth;\r\n let height = this.imgRef.nativeElement.clientHeight;\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.boundaryRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.boundaryRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgClipRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgClipRef.nativeElement, 'height', `${height}px`);\r\n this.cutBox.width = width;\r\n this.cutBox.height = height;\r\n this.boundaryBox = { width, height };\r\n this.clipRect = {\r\n top: 0,\r\n right: width,\r\n bottom: height,\r\n left: 0\r\n };\r\n this.setOriginalSize();\r\n this.ready = true;\r\n this.cdr.detectChanges();\r\n\r\n const mouseDown = fromEvent<MouseEvent>(this.cutRef.nativeElement, 'mousedown').pipe(takeUntil(this._unSubject));\r\n\r\n mouseDown.subscribe((downMe: MouseEvent) => {\r\n let x = downMe.pageX;\r\n let y = downMe.pageY;\r\n let offsetX = 0;\r\n let offsetY = 0;\r\n const _unSub = new Subject<void>();\r\n let className = (downMe.target as HTMLDivElement).className;\r\n const spt = `${XUploadPortalPrefix}-cut-`;\r\n if (className.includes(spt)) {\r\n this.cutType = className.replace(spt, '') as XUploadCutType;\r\n this.cdr.detectChanges();\r\n }\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mousemove')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe((moveMe: MouseEvent) => {\r\n offsetX = moveMe.pageX - x;\r\n offsetY = moveMe.pageY - y;\r\n x = moveMe.pageX;\r\n y = moveMe.pageY;\r\n this.setCutEle(this.cutType, offsetX, offsetY);\r\n });\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mouseup')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe(() => {\r\n this.cutType = '';\r\n this.cdr.detectChanges();\r\n _unSub.next();\r\n _unSub.complete();\r\n });\r\n });\r\n }\r\n\r\n setOriginalSize() {\r\n const img = new Image();\r\n img.src = this.file.url!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion = this.boundaryBox.width / this.originalSize.width;\r\n };\r\n }\r\n\r\n setCutEle(position: XUploadCutType, x: number, y: number) {\r\n switch (position) {\r\n case 'top-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height -= y;\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top':\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'right':\r\n this.cutBox.width += x;\r\n break;\r\n case 'bottom-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom':\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height += y;\r\n this.cutBox.x += x;\r\n break;\r\n case 'left':\r\n this.cutBox.width -= x;\r\n this.cutBox.x += x;\r\n break;\r\n case '':\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n }\r\n const boundaryRect = this.boundaryRef.nativeElement.getBoundingClientRect();\r\n\r\n const maxY = boundaryRect.height - this.cutBox.height;\r\n const maxX = boundaryRect.width - this.cutBox.width;\r\n\r\n this.cutBox.x = XClamp(this.cutBox.x, 0, maxX);\r\n this.cutBox.y = XClamp(this.cutBox.y, 0, maxY);\r\n\r\n // const maxWidth = boundaryRect.height - this.cutBox.y;\r\n // const maxHeight = boundaryRect.width - this.cutBox.x;\r\n\r\n // this.cutBox.width = XClamp(this.cutBox.width, 0, maxWidth);\r\n // this.cutBox.height = XClamp(this.cutBox.width, 0, maxHeight);\r\n\r\n this.clipRect = {\r\n top: this.cutBox.y,\r\n right: this.cutBox.width + this.cutBox.x,\r\n bottom: this.cutBox.height + this.cutBox.y,\r\n left: this.cutBox.x\r\n };\r\n this.renderer.setStyle(\r\n this.imgClipRef.nativeElement,\r\n 'clip',\r\n `rect(${this.clipRect.top}px,${this.clipRect.right}px,${this.clipRect.bottom}px,${this.clipRect.left}px)`\r\n );\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'width', `${this.cutBox.width}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'height', `${this.cutBox.height}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'transform', `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`);\r\n }\r\n\r\n sure() {\r\n const canvas = this.doc.createElement('canvas');\r\n canvas.width = this.cutBox.width / this.proportion;\r\n canvas.height = this.cutBox.height / this.proportion;\r\n const context = canvas.getContext('2d')!;\r\n const img = new Image();\r\n img.src = this.file.url!;\r\n img.crossOrigin = 'anonymous';\r\n img.onload = () => {\r\n context.drawImage(img, -this.cutBox.x / this.proportion, -this.cutBox.y / this.proportion);\r\n canvas.toBlob((blob) => {\r\n this.surePortal(blob as Blob);\r\n this.closePortal();\r\n });\r\n };\r\n }\r\n}\r\n","<div class=\"x-upload-portal {{ cutType }}\" [class.x-upload-portal-ready]=\"ready\">\r\n <div class=\"x-upload-portal-tools\">\r\n <div class=\"x-upload-portal-title\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span>{{ file?.name }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"file.url\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"file.url\" />\r\n <div #cutRef class=\"x-upload-portal-cut\">\r\n <div class=\"x-upload-portal-cut-top-start\"></div>\r\n <div class=\"x-upload-portal-cut-top\"></div>\r\n <div class=\"x-upload-portal-cut-top-end\"></div>\r\n <div class=\"x-upload-portal-cut-left\"></div>\r\n <div class=\"x-upload-portal-cut-right\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-start\"></div>\r\n <div class=\"x-upload-portal-cut-bottom\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-end\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-upload-portal-bottom-tools\">\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-check\" (click)=\"sure()\"></x-icon>\r\n </div>\r\n</div>\r\n","import { HttpClient, HttpEventType, HttpRequest, HttpEvent } from '@angular/common/http';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewChild,\r\n ViewContainerRef,\r\n OnInit,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nUpload } from '@ng-nest/ui/i18n';\r\nimport { XPortalOverlayRef, XPortalService } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\r\n templateUrl: './upload.component.html',\r\n styleUrls: ['./upload.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XUploadComponent)]\r\n})\r\nexport class XUploadComponent extends XUploadProperty implements OnInit, OnDestroy {\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n files: XUploadNode[] = [];\r\n showUpload = false;\r\n uploadNodes: XUploadNode[] = [];\r\n locale: XI18nUpload = {};\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n get getText() {\r\n return this.text || this.locale.uploadText;\r\n }\r\n\r\n get isTemplateText() {\r\n return XIsTemplateRef(this.getText);\r\n }\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value = value;\r\n this.setFiles();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public http: HttpClient,\r\n public cdr: ChangeDetectorRef,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public i18n: XI18nService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.upload as XI18nUpload),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.cdr.markForCheck();\r\n });\r\n if (this.type === 'img') this.accept = 'image/*';\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value)) return;\r\n // if (this.type !== 'img') return;\r\n this.files = this.value.map((x) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\r\n });\r\n }\r\n\r\n change(event: Event) {\r\n let input = event.target as HTMLInputElement;\r\n if (typeof input === 'undefined' || input.files?.length === 0) return;\r\n let files: XUploadNode[] = [];\r\n for (let i = 0; i < (input.files as FileList).length; i++) {\r\n let file: XUploadNode = (input.files as FileList).item(i) as XUploadNode;\r\n file.state = 'ready';\r\n files = [...files, file];\r\n }\r\n if (files.length > 0) this.showUpload = true;\r\n this.files = files;\r\n this.value = this.files;\r\n this.onChange && this.onChange(this.value);\r\n this.onUploading();\r\n input.value = '';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.splice(index, 1);\r\n if (this.files.length === 0) this.file.nativeElement.value = '';\r\n this.showUpload = this.files.find((x) => x.state === 'ready') != null;\r\n const vindex = this.value.indexOf(file);\r\n if (vindex > -1) {\r\n this.value.splice(vindex, 1);\r\n this.onChange && this.onChange(this.value);\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabled) return;\r\n this.file.nativeElement.click();\r\n }\r\n\r\n onUploading() {\r\n if (!this.action) return;\r\n let readyFiles = this.files.filter((x) => x.state === 'ready');\r\n readyFiles.forEach((x) => {\r\n this.uploadFile(x);\r\n });\r\n }\r\n\r\n uploadFile(file: XUploadNode, index = -1) {\r\n let formData = new FormData();\r\n formData.append('file', file);\r\n const req = new HttpRequest('POST', this.action as string, formData, {\r\n reportProgress: true,\r\n responseType: 'arraybuffer'\r\n });\r\n this.http\r\n .request(req)\r\n .pipe(\r\n map((event) =>\r\n this.getEventMessage(event, file, (body: BlobPart) => {\r\n let blob = new Blob([body]);\r\n let reader = new FileReader();\r\n reader.readAsText(blob, 'utf-8');\r\n reader.onload = () => {\r\n file.url = JSON.parse(reader.result as string)[0];\r\n if (index === -1) {\r\n // this.value.push(file);\r\n } else {\r\n // this.value[index] = file;\r\n this.files[index] = file;\r\n }\r\n this.cdr.detectChanges();\r\n };\r\n })\r\n )\r\n )\r\n .subscribe(\r\n () => {\r\n this.showUpload = this.files.find((y) => y.state === 'ready') != null;\r\n this.cdr.detectChanges();\r\n },\r\n () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n this.cdr.detectChanges();\r\n }\r\n );\r\n }\r\n\r\n getEventMessage(event: HttpEvent<any>, file: XUploadNode, fun: Function) {\r\n switch (event.type) {\r\n case HttpEventType.Sent:\r\n file.state = 'ready';\r\n this.uploadReady.emit(file);\r\n return `开始上传文件`;\r\n case HttpEventType.UploadProgress:\r\n file.state = 'uploading';\r\n if (event.total) file.percent = Math.round((100 * event.loaded) / event.total);\r\n this.uploading.emit(file);\r\n return `上传中`;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n fun(event.body);\r\n this.uploadSuccess.emit(file);\r\n return `文件上传完毕`;\r\n }\r\n return;\r\n }\r\n\r\n trackByItem(_index: number, item: XUploadNode) {\r\n return `${item.name}-${item.lastModified}`;\r\n }\r\n\r\n onImgCut(file: XUploadNode, index: number) {\r\n this.portal = this.portalService.attach({\r\n content: XUploadPortalComponent,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: [XUploadPortalPrefix],\r\n hasBackdrop: true,\r\n positionStrategy: this.portalService.setPlace('center')\r\n }\r\n });\r\n this.setInstance(file, index);\r\n }\r\n\r\n setInstance(file: XUploadNode, index: number) {\r\n let componentRef = this.portal?.componentRef;\r\n if (!componentRef) return;\r\n Object.assign(componentRef.instance, {\r\n file: file,\r\n closePortal: () => this.closePortal(),\r\n destroyPortal: () => this.destroyPortal(),\r\n surePortal: (blob: Blob) => {\r\n const fl = new File([blob], file.name, { type: blob.type }) as XUploadNode;\r\n fl.state = 'ready';\r\n this.uploadFile(fl, index);\r\n }\r\n });\r\n componentRef.changeDetectorRef.detectChanges();\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.cdr.detectChanges();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n destroyPortal() {\r\n this.portal?.overlayRef?.dispose();\r\n }\r\n\r\n imgError(event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n console.error(event.error);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'list'\">\r\n <ul class=\"x-upload-files\">\r\n <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\">\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <div class=\"x-upload-img-item {{ file.state }}\" *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [title]=\"file.name\">\r\n <div class=\"x-upload-img-inner\">\r\n <img [src]=\"file.url\" (load)=\"imgLoad(file)\" (error)=\"imgError($event, file)\" />\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span *ngIf=\"file.state == 'uploading'\">{{ file.percent }}%</span>\r\n </div>\r\n <div class=\"x-upload-img-btns\">\r\n <div class=\"x-upload-img-btns-inner\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n <a [href]=\"file.url\" target=\"_blank\" *ngSwitchCase=\"'success'\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n </a>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XUploadComponent } from './upload.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XUploadProperty } from './upload.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XUploadComponent, XUploadPortalComponent, XUploadProperty],\r\n exports: [XUploadComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n DragDropModule,\r\n XPortalModule,\r\n XOutletModule,\r\n XButtonModule,\r\n XIconModule,\r\n XI18nModule,\r\n XBaseFormModule\r\n ]\r\n})\r\nexport class XUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AAExC;;AAEG;AAEG,MAAO,eAAgB,SAAQ,qBAAoC,CAAA;AADzE,IAAA,WAAA,GAAA;;AAiBE;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAgB,MAAM,CAAC;AAWpC;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAwC,CAAC;AACjF;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAe,CAAC;AACxD;;;AAGG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAe,CAAC;AACtD;;;AAGG;AACO,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAe,CAAC;AAC1D;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAe,CAAC;AACzD,KAAA;;kJAxDY,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,sCAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,wVADL,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AA0BG,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAAmB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKlB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAAqB,CAAA,EAAA,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,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,aAAa;QACb,aAAa;QACb,aAAa;QACb,WAAW;QACX,WAAW;AACX,QAAA,eAAe,aAXP,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAcf,sCAAA,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAbf,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,cAAc;YACd,aAAa;YACb,aAAa;YACb,aAAa;YACb,WAAW;YACX,WAAW;YACX,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,CAAC;oBACzE,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,WAAW;wBACX,WAAW;wBACX,eAAe;AAChB,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-upload.mjs","sources":["../../../../lib/ng-nest/ui/upload/upload.property.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.ts","../../../../lib/ng-nest/ui/upload/upload-portal.component.html","../../../../lib/ng-nest/ui/upload/upload.component.ts","../../../../lib/ng-nest/ui/upload/upload.component.html","../../../../lib/ng-nest/ui/upload/upload.module.ts","../../../../lib/ng-nest/ui/upload/ng-nest-ui-upload.ts"],"sourcesContent":["import { XInputBoolean, XBoolean, XTemplate, XPosition, XCorner, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\nimport { XControlValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Upload\r\n * @selector x-upload\r\n * @decorator component\r\n */\r\nexport const XUploadPrefix = 'x-upload';\r\nconst X_CONFIG_NAME = 'upload';\r\n\r\n/**\r\n * Upload Property\r\n */\r\n@Component({ template: '' })\r\nexport class XUploadProperty extends XControlValueAccessor<XUploadNode[]> {\r\n /**\r\n * @zh_CN 显示文字\r\n * @en_US Display text\r\n */\r\n @Input() text?: XTemplate;\r\n /**\r\n * @zh_CN 请求地址\r\n * @en_US Request address\r\n */\r\n @Input() action?: string;\r\n /**\r\n * @zh_CN 上传文件类型,与原生的 input file 组件一致\r\n * @en_US Upload file type, consistent with native input file component\r\n */\r\n @Input() accept?: string;\r\n /**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\n @Input() type: XUploadType = 'list';\r\n /**\r\n * @zh_CN 图片剪裁\r\n * @en_US Picture cropping\r\n */\r\n @Input() @XInputBoolean() imgCut?: XBoolean;\r\n /**\r\n * @zh_CN 多文件上传\r\n * @en_US Multiple file upload\r\n */\r\n @Input() @XInputBoolean() multiple?: XBoolean;\r\n /**\r\n * @zh_CN 点击下载\r\n * @en_US click download\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_CONFIG_NAME, true) @XInputBoolean() download!: XBoolean;\r\n /**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有 add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\n @Input() @XWithConfig<XUploadMultipleModel>(X_CONFIG_NAME, 'cover') multipleModel!: XUploadMultipleModel;\r\n /**\r\n * @zh_CN 文件列表自定义显示模板\r\n * @en_US File list custom display template\r\n */\r\n @Input() filesTpl?: XTemplate;\r\n /**\r\n * @zh_CN 删除按钮的事件\r\n * @en_US Delete button event\r\n */\r\n @Output() removeClick = new EventEmitter<{ file: XUploadNode; index: number }>();\r\n /**\r\n * @zh_CN 开始上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadReady = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 正在上传事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploading = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传成功事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadSuccess = new EventEmitter<XUploadNode>();\r\n /**\r\n * @zh_CN 上传失败事件\r\n * @en_US Start upload event\r\n */\r\n @Output() uploadError = new EventEmitter<XUploadNode>();\r\n}\r\n\r\n/**\r\n * @zh_CN Upload 数据对象\r\n * @en_US Upload data object\r\n */\r\nexport interface XUploadNode extends File {\r\n /**\r\n * @zh_CN 地址\r\n * @en_US address\r\n */\r\n url?: string;\r\n /**\r\n * @zh_CN 状态\r\n * @en_US status\r\n */\r\n state?: XStateType;\r\n /**\r\n * @zh_CN 上传进度\r\n * @en_US Upload progress\r\n */\r\n percent?: number;\r\n}\r\n\r\n/**\r\n * @zh_CN 文件状态\r\n * @en_US File status\r\n */\r\nexport type XStateType = 'ready' | 'uploading' | 'success' | 'error';\r\n\r\n/**\r\n * @zh_CN 文件显示类型\r\n * @en_US File display type\r\n */\r\nexport type XUploadType = 'list' | 'img';\r\n\r\n/**\r\n * @zh_CN 多次上传的模式,cover 覆盖现有 add 继续添加\r\n * @en_US For many upload mode, 'cover' covers the existing, 'add' continue to add\r\n */\r\nexport type XUploadMultipleModel = 'cover' | 'add';\r\n\r\n/**\r\n * @zh_CN 剪裁的方位\r\n * @en_US Tailored orientation\r\n */\r\nexport type XUploadCutType = XPosition | XCorner | '';\r\n\r\n/**\r\n * Upload Portal\r\n * @selector x-upload-portal\r\n * @decorator component\r\n */\r\nexport const XUploadPortalPrefix = 'x-upload-portal';\r\n","import { DOCUMENT } from '@angular/common';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n ElementRef,\r\n Renderer2,\r\n ChangeDetectorRef,\r\n Inject\r\n} from '@angular/core';\r\nimport { fromEvent, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { XClamp } from '@ng-nest/ui/core';\r\nimport { XUploadCutType, XUploadNode, XUploadPortalPrefix } from './upload.property';\r\n\r\n@Component({\r\n selector: `${XUploadPortalPrefix}`,\r\n templateUrl: './upload-portal.component.html',\r\n styleUrls: ['./upload-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XUploadPortalComponent {\r\n file!: XUploadNode;\r\n @ViewChild('imgRef') imgRef!: ElementRef;\r\n @ViewChild('imgClipRef') imgClipRef!: ElementRef;\r\n @ViewChild('boundaryRef') boundaryRef!: ElementRef;\r\n @ViewChild('cutRef') cutRef!: ElementRef;\r\n ready = false;\r\n cutType: XUploadCutType = '';\r\n proportion = 1;\r\n originalSize = {\r\n width: 0,\r\n height: 0\r\n };\r\n boundaryBox!: {\r\n width: 0;\r\n height: 0;\r\n };\r\n cutBox = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0\r\n };\r\n clipRect!: {\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n left: number;\r\n };\r\n\r\n doc: Document;\r\n\r\n closePortal!: () => void;\r\n destroyPortal!: () => void;\r\n surePortal!: (blob: Blob) => void;\r\n private _unSubject = new Subject<void>();\r\n\r\n constructor(private renderer: Renderer2, private cdr: ChangeDetectorRef, @Inject(DOCUMENT) document: any) {\r\n this.doc = document;\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n ngAfterViewInit() {\r\n this.setCut();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.complete();\r\n }\r\n\r\n setCut() {\r\n let width = this.imgRef.nativeElement.clientWidth;\r\n let height = this.imgRef.nativeElement.clientHeight;\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.boundaryRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.boundaryRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgRef.nativeElement, 'height', `${height}px`);\r\n this.renderer.setStyle(this.imgClipRef.nativeElement, 'width', `${width}px`);\r\n this.renderer.setStyle(this.imgClipRef.nativeElement, 'height', `${height}px`);\r\n this.cutBox.width = width;\r\n this.cutBox.height = height;\r\n this.boundaryBox = { width, height };\r\n this.clipRect = {\r\n top: 0,\r\n right: width,\r\n bottom: height,\r\n left: 0\r\n };\r\n this.setOriginalSize();\r\n this.ready = true;\r\n this.cdr.detectChanges();\r\n\r\n const mouseDown = fromEvent<MouseEvent>(this.cutRef.nativeElement, 'mousedown').pipe(takeUntil(this._unSubject));\r\n\r\n mouseDown.subscribe((downMe: MouseEvent) => {\r\n let x = downMe.pageX;\r\n let y = downMe.pageY;\r\n let offsetX = 0;\r\n let offsetY = 0;\r\n const _unSub = new Subject<void>();\r\n let className = (downMe.target as HTMLDivElement).className;\r\n const spt = `${XUploadPortalPrefix}-cut-`;\r\n if (className.includes(spt)) {\r\n this.cutType = className.replace(spt, '') as XUploadCutType;\r\n this.cdr.detectChanges();\r\n }\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mousemove')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe((moveMe: MouseEvent) => {\r\n offsetX = moveMe.pageX - x;\r\n offsetY = moveMe.pageY - y;\r\n x = moveMe.pageX;\r\n y = moveMe.pageY;\r\n this.setCutEle(this.cutType, offsetX, offsetY);\r\n });\r\n fromEvent<MouseEvent>(this.doc.documentElement, 'mouseup')\r\n .pipe(takeUntil(_unSub))\r\n .subscribe(() => {\r\n this.cutType = '';\r\n this.cdr.detectChanges();\r\n _unSub.next();\r\n _unSub.complete();\r\n });\r\n });\r\n }\r\n\r\n setOriginalSize() {\r\n const img = new Image();\r\n img.src = this.file.url!;\r\n img.onload = () => {\r\n this.originalSize = { width: img.width, height: img.height };\r\n this.proportion = this.boundaryBox.width / this.originalSize.width;\r\n };\r\n }\r\n\r\n setCutEle(position: XUploadCutType, x: number, y: number) {\r\n switch (position) {\r\n case 'top-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height -= y;\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top':\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'top-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height -= y;\r\n this.cutBox.y += y;\r\n break;\r\n case 'right':\r\n this.cutBox.width += x;\r\n break;\r\n case 'bottom-end':\r\n this.cutBox.width += x;\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom':\r\n this.cutBox.height += y;\r\n break;\r\n case 'bottom-start':\r\n this.cutBox.width -= x;\r\n this.cutBox.height += y;\r\n this.cutBox.x += x;\r\n break;\r\n case 'left':\r\n this.cutBox.width -= x;\r\n this.cutBox.x += x;\r\n break;\r\n case '':\r\n this.cutBox.x += x;\r\n this.cutBox.y += y;\r\n break;\r\n }\r\n const boundaryRect = this.boundaryRef.nativeElement.getBoundingClientRect();\r\n\r\n const maxY = boundaryRect.height - this.cutBox.height;\r\n const maxX = boundaryRect.width - this.cutBox.width;\r\n\r\n this.cutBox.x = XClamp(this.cutBox.x, 0, maxX);\r\n this.cutBox.y = XClamp(this.cutBox.y, 0, maxY);\r\n\r\n // const maxWidth = boundaryRect.height - this.cutBox.y;\r\n // const maxHeight = boundaryRect.width - this.cutBox.x;\r\n\r\n // this.cutBox.width = XClamp(this.cutBox.width, 0, maxWidth);\r\n // this.cutBox.height = XClamp(this.cutBox.width, 0, maxHeight);\r\n\r\n this.clipRect = {\r\n top: this.cutBox.y,\r\n right: this.cutBox.width + this.cutBox.x,\r\n bottom: this.cutBox.height + this.cutBox.y,\r\n left: this.cutBox.x\r\n };\r\n this.renderer.setStyle(\r\n this.imgClipRef.nativeElement,\r\n 'clip',\r\n `rect(${this.clipRect.top}px,${this.clipRect.right}px,${this.clipRect.bottom}px,${this.clipRect.left}px)`\r\n );\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'width', `${this.cutBox.width}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'height', `${this.cutBox.height}px`);\r\n this.renderer.setStyle(this.cutRef.nativeElement, 'transform', `translate3d(${this.cutBox.x}px, ${this.cutBox.y}px, 0)`);\r\n }\r\n\r\n sure() {\r\n const canvas = this.doc.createElement('canvas');\r\n canvas.width = this.cutBox.width / this.proportion;\r\n canvas.height = this.cutBox.height / this.proportion;\r\n const context = canvas.getContext('2d')!;\r\n const img = new Image();\r\n img.src = this.file.url!;\r\n img.crossOrigin = 'anonymous';\r\n img.onload = () => {\r\n context.drawImage(img, -this.cutBox.x / this.proportion, -this.cutBox.y / this.proportion);\r\n canvas.toBlob((blob) => {\r\n this.surePortal(blob as Blob);\r\n this.closePortal();\r\n });\r\n };\r\n }\r\n}\r\n","<div class=\"x-upload-portal {{ cutType }}\" [class.x-upload-portal-ready]=\"ready\">\r\n <div class=\"x-upload-portal-tools\">\r\n <div class=\"x-upload-portal-title\">\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span>{{ file?.name }}</span>\r\n </div>\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-x\" (click)=\"closePortal()\"></x-icon>\r\n </div>\r\n <div class=\"x-upload-portal-img\">\r\n <img #imgRef class=\"x-upload-portal-full-img\" [src]=\"file.url\" />\r\n <div #boundaryRef class=\"x-upload-portal-boundary\">\r\n <img #imgClipRef class=\"x-upload-portal-clip-img\" [src]=\"file.url\" />\r\n <div #cutRef class=\"x-upload-portal-cut\">\r\n <div class=\"x-upload-portal-cut-top-start\"></div>\r\n <div class=\"x-upload-portal-cut-top\"></div>\r\n <div class=\"x-upload-portal-cut-top-end\"></div>\r\n <div class=\"x-upload-portal-cut-left\"></div>\r\n <div class=\"x-upload-portal-cut-right\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-start\"></div>\r\n <div class=\"x-upload-portal-cut-bottom\"></div>\r\n <div class=\"x-upload-portal-cut-bottom-end\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-upload-portal-bottom-tools\">\r\n <x-icon class=\"x-upload-portal-close\" type=\"fto-check\" (click)=\"sure()\"></x-icon>\r\n </div>\r\n</div>\r\n","import { HttpClient, HttpEventType, HttpRequest, HttpEvent } from '@angular/common/http';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewChild,\r\n ViewContainerRef,\r\n OnInit,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport { XUploadPrefix, XUploadNode, XUploadProperty, XUploadPortalPrefix } from './upload.property';\r\nimport { XConfigService, XIsTemplateRef } from '@ng-nest/ui/core';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nUpload } from '@ng-nest/ui/i18n';\r\nimport { XPortalOverlayRef, XPortalService } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XUploadPrefix}`,\r\n templateUrl: './upload.component.html',\r\n styleUrls: ['./upload.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XUploadComponent)]\r\n})\r\nexport class XUploadComponent extends XUploadProperty implements OnInit, OnDestroy {\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n files: XUploadNode[] = [];\r\n showUpload = false;\r\n uploadNodes: XUploadNode[] = [];\r\n locale: XI18nUpload = {};\r\n portal!: XPortalOverlayRef<XUploadPortalComponent>;\r\n\r\n get getText() {\r\n return this.text || this.locale.uploadText;\r\n }\r\n\r\n get isTemplateText() {\r\n return XIsTemplateRef(this.getText);\r\n }\r\n\r\n private _unSubject = new Subject<void>();\r\n\r\n override writeValue(value: XUploadNode[]) {\r\n this.value = value;\r\n this.setFiles();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public http: HttpClient,\r\n public cdr: ChangeDetectorRef,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public i18n: XI18nService,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.upload as XI18nUpload),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.cdr.markForCheck();\r\n });\r\n if (this.type === 'img') this.accept = 'image/*';\r\n }\r\n\r\n ngOnDestroy() {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n setFiles() {\r\n if (!Array.isArray(this.value)) return;\r\n // if (this.type !== 'img') return;\r\n this.files = this.value.map((x) => {\r\n if (!x.state) x.state = 'success';\r\n return x;\r\n });\r\n }\r\n\r\n change(event: Event) {\r\n let input = event.target as HTMLInputElement;\r\n if (typeof input === 'undefined' || input.files?.length === 0) return;\r\n let files: XUploadNode[] = [];\r\n for (let i = 0; i < (input.files as FileList).length; i++) {\r\n let file: XUploadNode = (input.files as FileList).item(i) as XUploadNode;\r\n file.state = 'ready';\r\n files = [...files, file];\r\n }\r\n if (files.length > 0) this.showUpload = true;\r\n if (this.multipleModel === 'cover') {\r\n this.files = files;\r\n } else if (this.multipleModel === 'add') {\r\n this.files = [...this.files, ...files];\r\n }\r\n this.value = this.files;\r\n this.onChange && this.onChange(this.value);\r\n this.onUploading();\r\n input.value = '';\r\n this.cdr.detectChanges();\r\n }\r\n\r\n remove(file: XUploadNode, index: number) {\r\n this.files.splice(index, 1);\r\n if (this.files.length === 0) this.file.nativeElement.value = '';\r\n this.showUpload = this.files.find((x) => x.state === 'ready') != null;\r\n const vindex = this.value.indexOf(file);\r\n if (vindex > -1) {\r\n this.value.splice(vindex, 1);\r\n this.onChange && this.onChange(this.value);\r\n }\r\n this.removeClick.emit({ file: file, index: index });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n uploadClick() {\r\n if (this.disabled) return;\r\n this.file.nativeElement.click();\r\n }\r\n\r\n onUploading() {\r\n if (!this.action) return;\r\n let readyFiles = this.files.filter((x) => x.state === 'ready');\r\n readyFiles.forEach((x) => {\r\n this.uploadFile(x);\r\n });\r\n }\r\n\r\n uploadFile(file: XUploadNode, index = -1) {\r\n let formData = new FormData();\r\n formData.append('file', file);\r\n const req = new HttpRequest('POST', this.action as string, formData, {\r\n reportProgress: true,\r\n responseType: 'arraybuffer'\r\n });\r\n this.http\r\n .request(req)\r\n .pipe(\r\n map((event) =>\r\n this.getEventMessage(event, file, (body: BlobPart) => {\r\n let blob = new Blob([body]);\r\n let reader = new FileReader();\r\n reader.readAsText(blob, 'utf-8');\r\n reader.onload = () => {\r\n file.url = JSON.parse(reader.result as string)[0];\r\n if (index === -1) {\r\n // this.value.push(file);\r\n } else {\r\n // this.value[index] = file;\r\n this.files[index] = file;\r\n }\r\n this.cdr.detectChanges();\r\n };\r\n })\r\n )\r\n )\r\n .subscribe(\r\n () => {\r\n this.showUpload = this.files.find((y) => y.state === 'ready') != null;\r\n this.cdr.detectChanges();\r\n },\r\n () => {\r\n file.state = 'error';\r\n this.uploadError.emit(file);\r\n this.cdr.detectChanges();\r\n }\r\n );\r\n }\r\n\r\n getEventMessage(event: HttpEvent<any>, file: XUploadNode, fun: Function) {\r\n switch (event.type) {\r\n case HttpEventType.Sent:\r\n file.state = 'ready';\r\n this.uploadReady.emit(file);\r\n return `开始上传文件`;\r\n case HttpEventType.UploadProgress:\r\n file.state = 'uploading';\r\n if (event.total) file.percent = Math.round((100 * event.loaded) / event.total);\r\n this.uploading.emit(file);\r\n return `上传中`;\r\n case HttpEventType.Response:\r\n file.state = 'success';\r\n fun(event.body);\r\n this.uploadSuccess.emit(file);\r\n return `文件上传完毕`;\r\n }\r\n return;\r\n }\r\n\r\n trackByItem(_index: number, item: XUploadNode) {\r\n return `${item.name}-${item.lastModified}`;\r\n }\r\n\r\n onImgCut(file: XUploadNode, index: number) {\r\n this.portal = this.portalService.attach({\r\n content: XUploadPortalComponent,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: [XUploadPortalPrefix],\r\n hasBackdrop: true,\r\n positionStrategy: this.portalService.setPlace('center')\r\n }\r\n });\r\n this.setInstance(file, index);\r\n }\r\n\r\n setInstance(file: XUploadNode, index: number) {\r\n let componentRef = this.portal?.componentRef;\r\n if (!componentRef) return;\r\n Object.assign(componentRef.instance, {\r\n file: file,\r\n closePortal: () => this.closePortal(),\r\n destroyPortal: () => this.destroyPortal(),\r\n surePortal: (blob: Blob) => {\r\n const fl = new File([blob], file.name, { type: blob.type }) as XUploadNode;\r\n fl.state = 'ready';\r\n this.uploadFile(fl, index);\r\n }\r\n });\r\n componentRef.changeDetectorRef.detectChanges();\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.cdr.detectChanges();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n destroyPortal() {\r\n this.portal?.overlayRef?.dispose();\r\n }\r\n\r\n imgError(event: ErrorEvent, file: XUploadNode) {\r\n file.state = 'error';\r\n console.error(event.error);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n imgLoad(file: XUploadNode) {\r\n file.state = 'success';\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div #upload class=\"x-upload x-upload-{{ type }}\" [class.x-disabled]=\"disabled\">\r\n <input type=\"file\" #file (change)=\"change($event)\" [attr.accept]=\"accept\" [multiple]=\"multiple\" style=\"display: none\" />\r\n <div class=\"x-upload-buttons\" [class.x-upload-buttons-template]=\"isTemplateText\" (click)=\"uploadClick()\">\r\n <ng-container *xOutlet=\"getText\">\r\n <x-button icon=\"fto-upload\" [disabled]=\"disabled\" type=\"primary\">{{ getText }}</x-button>\r\n </ng-container>\r\n </div>\r\n <ng-container *xOutlet=\"filesTpl; context: { $files: files }\">\r\n <ng-container [ngSwitch]=\"type\">\r\n <ng-container *ngSwitchCase=\"'list'\">\r\n <ul class=\"x-upload-files\">\r\n <li *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [class.x-upload-disabled]=\"!download\">\r\n <ng-container *ngIf=\"download\">\r\n <a [href]=\"file.url\" target=\"_blank\" [title]=\"file.name\">\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!download\">\r\n <a>\r\n <x-icon type=\"fto-file-text\"></x-icon>\r\n <span class=\"x-upload-filename\">{{ file.name }}</span>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <span class=\"x-upload-percent\" *ngSwitchCase=\"'uploading'\">{{ file.percent }}%</span>\r\n <x-icon class=\"x-upload-state success\" *ngSwitchCase=\"'success'\" type=\"fto-check\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n </ng-container>\r\n <x-button *ngIf=\"file.state !== 'uploading'\" icon=\"fto-x\" (click)=\"remove(file, i)\" onlyIcon closable size=\"mini\"></x-button>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'img'\">\r\n <div class=\"x-upload-img-item {{ file.state }}\" *ngFor=\"let file of files; index as i; trackBy: trackByItem\" [title]=\"file.name\">\r\n <div class=\"x-upload-img-inner\">\r\n <img [src]=\"file.url\" (load)=\"imgLoad(file)\" (error)=\"imgError($event, file)\" />\r\n <x-icon type=\"fto-image\"></x-icon>\r\n <span *ngIf=\"file.state == 'uploading'\">{{ file.percent }}%</span>\r\n </div>\r\n <div class=\"x-upload-img-btns\">\r\n <div class=\"x-upload-img-btns-inner\">\r\n <ng-container [ngSwitch]=\"file.state\">\r\n <x-icon class=\"x-upload-state\" *ngSwitchCase=\"'ready'\" type=\"fto-clock\"></x-icon>\r\n <x-icon class=\"x-upload-state error\" *ngSwitchCase=\"'error'\" type=\"fto-info\"></x-icon>\r\n <a [href]=\"file.url\" target=\"_blank\" *ngSwitchCase=\"'success'\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n </a>\r\n </ng-container>\r\n <x-icon *ngIf=\"imgCut && file.state === 'success'\" type=\"fto-crop\" (click)=\"onImgCut(file, i)\"></x-icon>\r\n <x-icon *ngIf=\"file.state !== 'uploading'\" type=\"fto-trash-2\" (click)=\"remove(file, i)\"></x-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XUploadComponent } from './upload.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XUploadProperty } from './upload.property';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XUploadPortalComponent } from './upload-portal.component';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XUploadComponent, XUploadPortalComponent, XUploadProperty],\r\n exports: [XUploadComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n DragDropModule,\r\n XPortalModule,\r\n XOutletModule,\r\n XButtonModule,\r\n XIconModule,\r\n XI18nModule,\r\n XBaseFormModule\r\n ]\r\n})\r\nexport class XUploadModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AAEG,MAAO,eAAgB,SAAQ,qBAAoC,CAAA;AADzE,IAAA,WAAA,GAAA;;AAiBE;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAgB,MAAM,CAAC;AA0BpC;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAwC,CAAC;AACjF;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAe,CAAC;AACxD;;;AAGG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAe,CAAC;AACtD;;;AAGG;AACO,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAe,CAAC;AAC1D;;;AAGG;AACO,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAe,CAAC;AACzD,KAAA;;kJAvEY,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,sCAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,oaADL,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AA0BG,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAAmB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK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Aa;YACb,aAAa;YACb,WAAW;YACX,WAAW;YACX,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,aAAa,EAAA,UAAA,EAAA,CAAA;kBAhBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,CAAC;oBACzE,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,WAAW;wBACX,WAAW;wBACX,eAAe;AAChB,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@ export declare class XTableBodyComponent extends XTableBodyProperty implements O
|
|
|
33
33
|
getTitle(row: XTableRow, column: XTableCell | any): string;
|
|
34
34
|
setAdaptionHeight(): void;
|
|
35
35
|
rowClick(row: XTableRow): void;
|
|
36
|
+
onExpanded(_event: Event, node: XTableRow): void;
|
|
36
37
|
trackByItem(_index: number, item: XTableRow | XTableColumn): any;
|
|
37
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<XTableBodyComponent, never>;
|
|
38
39
|
static ɵcmp: i0.ɵɵComponentDeclaration<XTableBodyComponent, "x-table-body", never, { "table": "table"; }, {}, never, never>;
|
|
@@ -26,9 +26,12 @@ export declare class XTableComponent extends XTableProperty implements OnInit, O
|
|
|
26
26
|
scrollTop: number;
|
|
27
27
|
rowChecked: XTableColumn;
|
|
28
28
|
headCheckboxList: XTableColumn[];
|
|
29
|
+
rowExpand: XTableColumn;
|
|
30
|
+
headExpandList: XTableColumn[];
|
|
29
31
|
dataIsFunc: boolean;
|
|
30
32
|
getting: boolean;
|
|
31
33
|
tableData: XTableRow[];
|
|
34
|
+
treeTableData: XTableRow[];
|
|
32
35
|
checkedValues: {
|
|
33
36
|
[prop: string]: boolean;
|
|
34
37
|
};
|
|
@@ -48,11 +51,16 @@ export declare class XTableComponent extends XTableProperty implements OnInit, O
|
|
|
48
51
|
getDataByFunc(): void;
|
|
49
52
|
setManual(): void;
|
|
50
53
|
setRowChecked(): void;
|
|
54
|
+
setRowExpand(): void;
|
|
55
|
+
isExpandColumn(column: XTableColumn): boolean;
|
|
51
56
|
setMerge(): void;
|
|
52
57
|
change(index: number): void;
|
|
53
58
|
resetScroll(x?: boolean, y?: boolean): void;
|
|
54
|
-
setChecked(): void;
|
|
55
|
-
setHeadCheckboxList(): void;
|
|
59
|
+
setChecked(data: XTableRow[]): void;
|
|
60
|
+
setHeadCheckboxList(data: XTableRow[]): void;
|
|
61
|
+
setExpand(data: XTableRow[]): void;
|
|
62
|
+
setExpandedAll(): void;
|
|
63
|
+
setHeadExpandList(): void;
|
|
56
64
|
checkSort(sort: XSort[]): void;
|
|
57
65
|
headChecked(checked: boolean, column: XTableColumn): void;
|
|
58
66
|
bodyChecked(_checked: boolean, column: XTableColumn): void;
|
package/table/table.module.d.ts
CHANGED
|
@@ -11,11 +11,12 @@ import * as i9 from "@ng-nest/ui/pagination";
|
|
|
11
11
|
import * as i10 from "@ng-nest/ui/outlet";
|
|
12
12
|
import * as i11 from "@ng-nest/ui/checkbox";
|
|
13
13
|
import * as i12 from "@ng-nest/ui/icon";
|
|
14
|
-
import * as i13 from "@
|
|
15
|
-
import * as i14 from "@
|
|
16
|
-
import * as i15 from "@ng-nest/ui/
|
|
14
|
+
import * as i13 from "@ng-nest/ui/button";
|
|
15
|
+
import * as i14 from "@angular/cdk/scrolling";
|
|
16
|
+
import * as i15 from "@ng-nest/ui/empty";
|
|
17
|
+
import * as i16 from "@ng-nest/ui/loading";
|
|
17
18
|
export declare class XTableModule {
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<XTableModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<XTableModule, [typeof i1.XDragDirective, typeof i2.XTableComponent, typeof i3.XTableProperty, typeof i4.XTableHeadComponent, typeof i3.XTableHeadProperty, typeof i5.XTableBodyComponent, typeof i3.XTableBodyProperty, typeof i6.XTableFootComponent, typeof i3.XTableFootProperty], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.XPaginationModule, typeof i10.XOutletModule, typeof i11.XCheckboxModule, typeof i12.XIconModule, typeof i13.
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<XTableModule, [typeof i1.XDragDirective, typeof i2.XTableComponent, typeof i3.XTableProperty, typeof i4.XTableHeadComponent, typeof i3.XTableHeadProperty, typeof i5.XTableBodyComponent, typeof i3.XTableBodyProperty, typeof i6.XTableFootComponent, typeof i3.XTableFootProperty], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.XPaginationModule, typeof i10.XOutletModule, typeof i11.XCheckboxModule, typeof i12.XIconModule, typeof i13.XButtonModule, typeof i14.ScrollingModule, typeof i15.XEmptyModule, typeof i16.XLoadingModule], [typeof i2.XTableComponent]>;
|
|
20
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<XTableModule>;
|
|
21
22
|
}
|