@acorex/components 16.0.9 → 16.0.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,27 @@
|
|
1
|
-
import {
|
1
|
+
import { AXRenderService, AXTranslator } from '@acorex/core';
|
2
|
+
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, Renderer2, TemplateRef, ViewChild, ViewEncapsulation, } from '@angular/core';
|
3
|
+
import { AXBaseComponent, } from '../base/element.class';
|
2
4
|
import { AXProgressBarComponent } from '../progress-bar/progress-bar.component';
|
3
|
-
import {
|
4
|
-
import { AXRenderService } from '@acorex/core';
|
5
|
+
import { AXToastService } from '../toast/toast.service';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
import * as i1 from "@acorex/core";
|
7
|
-
import * as i2 from "
|
8
|
-
import * as i3 from "
|
9
|
-
import * as i4 from "../
|
10
|
-
import * as i5 from "../
|
8
|
+
import * as i2 from "../toast/toast.service";
|
9
|
+
import * as i3 from "@angular/common";
|
10
|
+
import * as i4 from "../button/button.component";
|
11
|
+
import * as i5 from "../textbox/textbox.component";
|
12
|
+
import * as i6 from "../form-group/form-group.component";
|
11
13
|
export class AXUploadFileComponent extends AXBaseComponent {
|
12
14
|
el;
|
13
15
|
injectionService;
|
14
16
|
rendrer;
|
15
17
|
cdr;
|
18
|
+
toastService;
|
16
19
|
overlayDiv;
|
17
20
|
contentType = 'image';
|
18
21
|
dropRef;
|
19
22
|
progressRef;
|
20
23
|
label;
|
21
|
-
size =
|
24
|
+
size = 'md';
|
22
25
|
fileInput;
|
23
26
|
type = 'inline';
|
24
27
|
template;
|
@@ -30,45 +33,60 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
30
33
|
{
|
31
34
|
type: 'image',
|
32
35
|
accept: ['image/gif', 'image/jpeg', 'image/png'],
|
36
|
+
message: 'عکس',
|
33
37
|
},
|
34
38
|
{
|
35
39
|
type: 'audio',
|
36
40
|
accept: ['audio/mp3'],
|
41
|
+
message: 'audio',
|
37
42
|
},
|
38
43
|
{
|
39
44
|
type: 'ebook',
|
40
45
|
accept: ['application/pdf'],
|
46
|
+
message: 'pdf',
|
41
47
|
},
|
42
48
|
{
|
43
49
|
type: 'excel',
|
44
|
-
accept: [
|
50
|
+
accept: [
|
51
|
+
'application/vnd.ms-excel',
|
52
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
53
|
+
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
54
|
+
'application/vnd.oasis.opendocument.spreadsheet',
|
55
|
+
'text/csv',
|
56
|
+
],
|
57
|
+
message: 'اکسل',
|
45
58
|
},
|
46
59
|
{
|
47
60
|
type: 'video',
|
48
61
|
accept: ['video/*'],
|
62
|
+
message: 'video',
|
49
63
|
},
|
50
64
|
{
|
51
65
|
type: 'video/image',
|
52
66
|
accept: ['image/gif', 'image/jpeg', 'image/png', 'video/*'],
|
67
|
+
message: 'video/image',
|
53
68
|
},
|
54
69
|
{
|
55
70
|
type: 'json',
|
56
71
|
accept: ['application/json'],
|
72
|
+
message: 'json',
|
57
73
|
},
|
58
74
|
{
|
59
75
|
type: 'any',
|
60
76
|
accept: ['*/*'],
|
77
|
+
message: '',
|
61
78
|
},
|
62
79
|
];
|
63
80
|
files = [];
|
64
81
|
focus() { }
|
65
82
|
fileName = '';
|
66
|
-
constructor(el, injectionService, rendrer, cdr) {
|
83
|
+
constructor(el, injectionService, rendrer, cdr, toastService) {
|
67
84
|
super();
|
68
85
|
this.el = el;
|
69
86
|
this.injectionService = injectionService;
|
70
87
|
this.rendrer = rendrer;
|
71
88
|
this.cdr = cdr;
|
89
|
+
this.toastService = toastService;
|
72
90
|
}
|
73
91
|
onDeleteClick(e) {
|
74
92
|
e.stopPropagation();
|
@@ -91,31 +109,24 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
91
109
|
if (this.dropRef != null) {
|
92
110
|
}
|
93
111
|
else {
|
94
|
-
this.dropRef = this.el.nativeElement;
|
112
|
+
this.dropRef = this.el.nativeElement.querySelector('.upload-file-box');
|
95
113
|
}
|
96
114
|
//
|
97
115
|
if (this.progressRef != null) {
|
98
116
|
}
|
99
117
|
else {
|
100
|
-
this.progressRef =
|
118
|
+
this.progressRef =
|
119
|
+
this.el.nativeElement.querySelector('.upload-file-box');
|
101
120
|
}
|
102
121
|
//
|
103
122
|
if (this.type === 'hidden' || this.type === 'box') {
|
104
|
-
this.
|
105
|
-
this.overlayDiv.classList.add('overlay');
|
106
|
-
this.overlayDiv.innerHTML = `
|
107
|
-
<div class="icon-wrapper">
|
108
|
-
<i class="far fa-cloud-upload-alt fa-3x"></i>
|
109
|
-
<span>Drop File(s) Here</span>
|
110
|
-
</div>
|
111
|
-
`;
|
123
|
+
this.handleShowEmptyFile();
|
112
124
|
this.overlayDiv.addEventListener('drag', this.handleOverlayDragOver);
|
113
125
|
this.overlayDiv.addEventListener('dragover', this.handleOverlayDragOver);
|
114
126
|
this.overlayDiv.addEventListener('dragleave', this.handleOverlayDragOver);
|
115
|
-
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
116
127
|
}
|
117
128
|
//
|
118
|
-
this.dropRef.classList.add('ax-upload-drop-over');
|
129
|
+
// this.dropRef.classList.add('ax-upload-drop-over');
|
119
130
|
this.dropRef.addEventListener('dragover', this.handleDragOver.bind(this));
|
120
131
|
this.dropRef.addEventListener('dragleave', this.handleDragLeave.bind(this));
|
121
132
|
this.dropRef.addEventListener('drop', this.handleDrop.bind(this));
|
@@ -145,6 +156,14 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
145
156
|
}
|
146
157
|
}
|
147
158
|
addFile(file) {
|
159
|
+
if (this.contentType &&
|
160
|
+
this.contentType !== 'any' &&
|
161
|
+
!this.fileTypes
|
162
|
+
.find((x) => x.type === this.contentType)
|
163
|
+
.accept.includes(file.type)) {
|
164
|
+
this.toastService.info(`فایل بارگذاری باید از نوع ${this.fileTypes.find((x) => x.type === this.contentType).message} باشد`);
|
165
|
+
return;
|
166
|
+
}
|
148
167
|
const progressDiv = this.rendrer.createElement('div');
|
149
168
|
progressDiv.classList.add('ax-upload-progress-panel');
|
150
169
|
const progressLabel = this.rendrer.createElement('small');
|
@@ -157,7 +176,7 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
157
176
|
reader.addEventListener('load', (e) => {
|
158
177
|
this.onLoad.emit({
|
159
178
|
file,
|
160
|
-
data: e.target.result
|
179
|
+
data: e.target.result,
|
161
180
|
});
|
162
181
|
//
|
163
182
|
// Fake Upload
|
@@ -174,13 +193,41 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
174
193
|
file,
|
175
194
|
total: e.total,
|
176
195
|
uploaded,
|
177
|
-
value: pv
|
196
|
+
value: pv,
|
178
197
|
});
|
179
198
|
//
|
180
199
|
if (com.progress >= 100) {
|
181
200
|
clearInterval(intv);
|
182
201
|
setTimeout(() => {
|
183
202
|
this.rendrer.removeChild(this.progressRef, progressDiv);
|
203
|
+
if (this.fileName) {
|
204
|
+
this.rendrer.removeChild(this.dropRef, this.overlayDiv);
|
205
|
+
this.overlayDiv = this.rendrer.createElement('div');
|
206
|
+
this.overlayDiv.classList.add('overlay');
|
207
|
+
this.overlayDiv.innerHTML = `
|
208
|
+
<div
|
209
|
+
style="
|
210
|
+
display: flex;
|
211
|
+
flex-direction: column;
|
212
|
+
align-items: center;
|
213
|
+
justify-content: center;
|
214
|
+
gap: 8px;
|
215
|
+
"
|
216
|
+
>
|
217
|
+
<i style="color: var(--ax-danger-color)" class="far fa-times fa-3x"></i>
|
218
|
+
<span>${this.fileName}</span>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
`;
|
222
|
+
const closeIcon = this.overlayDiv.querySelector('.far.fa-times');
|
223
|
+
this.rendrer.listen(closeIcon, 'click', (e) => {
|
224
|
+
this.remove();
|
225
|
+
this.rendrer.removeChild(this.dropRef, this.overlayDiv);
|
226
|
+
this.handleShowEmptyFile();
|
227
|
+
e.stopPropagation();
|
228
|
+
});
|
229
|
+
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
230
|
+
}
|
184
231
|
}, 1000);
|
185
232
|
}
|
186
233
|
}, 100);
|
@@ -191,13 +238,31 @@ export class AXUploadFileComponent extends AXBaseComponent {
|
|
191
238
|
get accessTypes() {
|
192
239
|
return this.fileTypes.find((item) => item.type == this.contentType).accept;
|
193
240
|
}
|
194
|
-
|
195
|
-
|
241
|
+
handleShowEmptyFile() {
|
242
|
+
this.overlayDiv = this.rendrer.createElement('div');
|
243
|
+
this.overlayDiv.classList.add('overlay');
|
244
|
+
this.overlayDiv.innerHTML = `
|
245
|
+
<div style="
|
246
|
+
display: flex;
|
247
|
+
flex-direction: column;
|
248
|
+
align-items: center;
|
249
|
+
justify-content: center;
|
250
|
+
gap: 8px;
|
251
|
+
">
|
252
|
+
<i class="far fa-cloud-upload-alt fa-3x"></i>
|
253
|
+
<span>${AXTranslator.get('common.upload')}</span>
|
254
|
+
</div>
|
255
|
+
`;
|
256
|
+
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
257
|
+
this.dropRef.classList.add('ax-upload-drop-over');
|
258
|
+
}
|
259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXUploadFileComponent, deps: [{ token: i0.ElementRef }, { token: i1.AXRenderService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i2.AXToastService }], target: i0.ɵɵFactoryTarget.Component });
|
260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXUploadFileComponent, selector: "ax-upload-file", inputs: { contentType: "contentType", dropRef: "dropRef", progressRef: "progressRef", label: "label", size: "size", type: "type", template: "template", disabled: "disabled" }, outputs: { onLoad: "onLoad", onProgress: "onProgress", onRemove: "onRemove" }, host: { styleAttribute: "display: block; width:100%; position: relative" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n [accept]=\"accessTypes.join(',')\"\n style=\"display: none\"\n (change)=\"onFileChange($event)\"\n/>\n\n<ng-container *ngIf=\"type == 'inline'; else elseTemplate\">\n <ax-form-group size=\"{{ size }}\">\n <ax-text-box\n [value]=\"fileName\"\n readonly=\"true\"\n [disabled]=\"disabled\"\n ></ax-text-box>\n <ax-button\n type=\"blank light\"\n icon=\"far fa-times\"\n (click)=\"remove()\"\n *ngIf=\"fileName\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n type=\"primary blank\"\n icon=\"far fa-upload\"\n (click)=\"open()\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n </ax-form-group>\n</ng-container>\n\n<ng-template #elseTemplate>\n <div class=\"ax upload-file-box\" (click)=\"open()\" #dropRef></div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: i5.AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { kind: "component", type: i6.AXFormGroupComponent, selector: "ax-form-group", inputs: ["size"] }], encapsulation: i0.ViewEncapsulation.None });
|
196
261
|
}
|
197
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXUploadFileComponent, decorators: [{
|
198
263
|
type: Component,
|
199
|
-
args: [{ selector: 'ax-upload-file', encapsulation: ViewEncapsulation.None, host: { style: 'display: block; width:100%; position: relative' }, template: "<input
|
200
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.AXRenderService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentType: [{
|
264
|
+
args: [{ selector: 'ax-upload-file', encapsulation: ViewEncapsulation.None, host: { style: 'display: block; width:100%; position: relative' }, template: "<input\n #fileInput\n type=\"file\"\n [accept]=\"accessTypes.join(',')\"\n style=\"display: none\"\n (change)=\"onFileChange($event)\"\n/>\n\n<ng-container *ngIf=\"type == 'inline'; else elseTemplate\">\n <ax-form-group size=\"{{ size }}\">\n <ax-text-box\n [value]=\"fileName\"\n readonly=\"true\"\n [disabled]=\"disabled\"\n ></ax-text-box>\n <ax-button\n type=\"blank light\"\n icon=\"far fa-times\"\n (click)=\"remove()\"\n *ngIf=\"fileName\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n type=\"primary blank\"\n icon=\"far fa-upload\"\n (click)=\"open()\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n </ax-form-group>\n</ng-container>\n\n<ng-template #elseTemplate>\n <div class=\"ax upload-file-box\" (click)=\"open()\" #dropRef></div>\n</ng-template>\n" }]
|
265
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.AXRenderService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i2.AXToastService }]; }, propDecorators: { contentType: [{
|
201
266
|
type: Input
|
202
267
|
}], dropRef: [{
|
203
268
|
type: Input
|
@@ -223,4 +288,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
223
288
|
}], onRemove: [{
|
224
289
|
type: Output
|
225
290
|
}] } });
|
226
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLWZpbGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NyYy9saWIvdXBsb2FkLWZpbGUvdXBsb2FkLWZpbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NyYy9saWIvdXBsb2FkLWZpbGU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QuZW1pdCh7XG4gICAgICAgIGZpbGUsXG4gICAgICAgIGRhdGE6IChlIGFzIGFueSkudGFyZ2V0LnJlc3VsdFxuICAgICAgfSk7XG4gICAgICAvL1xuICAgICAgLy8gRmFrZSBVcGxvYWRcbiAgICAgIGxldCBwdiA9IDA7XG4gICAgICBsZXQgdXBsb2FkZWQgPSAwO1xuICAgICAgY29uc3QgaW50diA9IHNldEludGVydmFsKCgpID0+IHtcbiAgICAgICAgdXBsb2FkZWQgKz0gMTAyNCAqIDEwMDA7XG4gICAgICAgIGlmICh1cGxvYWRlZCA+IGUudG90YWwpIHtcbiAgICAgICAgICB1cGxvYWRlZCA9IGUudG90YWw7XG4gICAgICAgIH1cbiAgICAgICAgcHYgPSBNYXRoLmNlaWwoKHVwbG9hZGVkIC8gZS50b3RhbCkgKiAxMDApO1xuICAgICAgICBjb20ucHJvZ3Jlc3MgPSBwdjtcbiAgICAgICAgdGhpcy5vblByb2dyZXNzLmVtaXQoe1xuICAgICAgICAgIGZpbGUsXG4gICAgICAgICAgdG90YWw6IGUudG90YWwsXG4gICAgICAgICAgdXBsb2FkZWQsXG4gICAgICAgICAgdmFsdWU6IHB2XG4gICAgICAgIH0pO1xuICAgICAgICAvL1xuICAgICAgICBpZiAoY29tLnByb2dyZXNzID49IDEwMCkge1xuICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50dik7XG4gICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnJlbmRyZXIucmVtb3ZlQ2hpbGQodGhpcy5wcm9ncmVzc1JlZiwgcHJvZ3Jlc3NEaXYpO1xuICAgICAgICAgIH0sIDEwMDApO1xuICAgICAgICB9XG4gICAgICB9LCAxMDApO1xuICAgIH0pO1xuICAgIHJlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGUpO1xuICAgIHRoaXMuZmlsZXMucHVzaChmaWxlKTtcbiAgfVxuXG4gIGdldCBhY2Nlc3NUeXBlcygpOiBzdHJpbmdbX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H0sXG4gICAgICBwcm9ncmVzc0RpdlxuICAgICkuaW5zdGFuY2UgYXMgQVhQcm9ncmVzc0JhckNvbXBvbmVudDtcbiAgICB0aGlzLnJlbmRyZXIuYXBwZW5kQ2hpbGQocHJvZ3Jlc3NEaXYsIHByb2dyZXNzTGFiZWwpO1xuXG4gICAgY29uc3QgcmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKTtcbiAgICByZWFkZXIuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsIChlKSA9PiB7XG4gICAgICB0aGlzLm9uTG9hZC5lbWl0KHtcbiAgICAgICAgZmlsZSxcbiAgICAgICAgZGF0YTogKGUgYXMgYW55KS50YXJnZXQucmVzdWx0LFxuICAgICAgfSk7XG4gICAgICAvL1xuICAgICAgLy8gRmFrZSBVcGxvYWRcbiAgICAgIGxldCBwdiA9IDA7XG4gICAgICBsZXQgdXBsb2FkZWQgPSAwO1xuICAgICAgY29uc3QgaW50diA9IHNldEludGVydmFsKCgpID0+IHtcbiAgICAgICAgdXBsb2FkZWQgKz0gMTAyNCAqIDEwMDA7XG4gICAgICAgIGlmICh1cGxvYWRlZCA+IGUudG90YWwpIHtcbiAgICAgICAgICB1cGxvYWRlZCA9IGUudG90YWw7XG4gICAgICAgIH1cbiAgICAgICAgcHYgPSBNYXRoLmNlaWwoKHVwbG9hZGVkIC8gZS50b3RhbCkgKiAxMDApO1xuICAgICAgICBjb20ucHJvZ3Jlc3MgPSBwdjtcbiAgICAgICAgdGhpcy5vblByb2dyZXNzLmVtaXQoe1xuICAgICAgICAgIGZpbGUsXG4gICAgICAgICAgdG90YWw6IGUudG90YWwsXG4gICAgICAgICAgdXBsb2FkZWQsXG4gICAgICAgICAgdmFsdWU6IHB2LFxuICAgICAgICB9KTtcbiAgICAgICAgLy9cbiAgICAgICAgaWYgKGNvbS5wcm9ncmVzcyA+PSAxMDApIHtcbiAgICAgICAgICBjbGVhckludGVydmFsKGludHYpO1xuICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5yZW5kcmVyLnJlbW92ZUNoaWxkKHRoaXMucHJvZ3Jlc3NSZWYsIHByb2dyZXNzRGl2KTtcbiAgICAgICAgICAgIGlmICh0aGlzLmZpbGVOYW1lKSB7XG4gICAgICAgICAgICAgIHRoaXMucmVuZHJlci5yZW1vdmVDaGlsZCh0aGlzLmRyb3BSZWYsIHRoaXMub3ZlcmxheURpdik7XG4gICAgICAgICAgICAgIHRoaXMub3ZlcmxheURpdiA9IHRoaXMucmVuZHJlci5jcmVhdGVFbGVtZW50KFxuICAgICAgICAgICAgICAgICdkaXYnXG4gICAgICAgICAgICAgICkgYXMgSFRNTEVsZW1lbnQ7XG4gICAgICAgICAgICAgIHRoaXMub3ZlcmxheURpdi5jbGFzc0xpc3QuYWRkKCdvdmVybGF5Jyk7XG4gICAgICAgICAgICAgIHRoaXMub3ZlcmxheURpdi5pbm5lckhUTUwgPSBgXG4gICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgc3R5bGU9XCJcbiAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgICAgICAgICBnYXA6IDhweDtcbiAgICAgICAgICAgICAgXCJcbiAgICAgICAgICAgID5cbiAgICAgICAgICAgIDxpIHN0eWxlPVwiY29sb3I6IHZhcigtLWF4LWRhbmdlci1jb2xvcilcIiBjbGFzcz1cImZhciBmYS10aW1lcyBmYS0zeFwiPjwvaT5cbiAgICAgICAgICAgICAgPHNwYW4+JHt0aGlzLmZpbGVOYW1lfTwvc3Bhbj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgXG4gICAgICAgICAgICBgO1xuICAgICAgICAgICA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V4dC1ib3g+XG4gICAgPGF4LWJ1dHRvblxuICAgICAgdHlwZT1cImJsYW5rIGxpZ2h0XCJcbiAgICAgIGljb249XCJmYXIgZmEtdGltZXNcIlxuICAgICAgKGNsaWNrKT1cInJlbW92ZSgpXCJcbiAgICAgICpuZ0lmPVwiZmlsZU5hbWVcIlxuICAgICAgW3RhYkluZGV4XT1cIi0xXCJcbiAgICA+XG4gICAgPC9heC1idXR0b24+XG4gICAgPGF4LWJ1dHRvblxuICAgICAgdHlwZT1cInByaW1hcnkgYmxhbmtcIlxuICAgICAgaWNvbj1cImZhciBmYS11cGxvYWRcIlxuICAgICAgKGNsaWNrKT1cIm9wZW4oKVwiXG4gICAgICBbZGlzYWJsZWRdPVwiZGlzYWJsZWRcIlxuICAgICAgW3RhYkluZGV4XT1cIi0xXCJcbiAgICA+XG4gICAgPC9heC1idXR0b24+XG4gIDwvYXgtZm9ybS1ncm91cD5cbjwvbmctY29udGFpbmVyPlxuXG48bmctdGVtcGxhdGUgI2Vsc2VUZW1wbGF0ZT5cbiAgPGRpdiBjbGFzcz1cImF4IHVwbG9hZC1maWxlLWJveFwiIChjbGljayk9XCJvcGVuKClcIiAjZHJvcFJlZj48L2Rpdj5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
@@ -17141,12 +17141,13 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17141
17141
|
injectionService;
|
17142
17142
|
rendrer;
|
17143
17143
|
cdr;
|
17144
|
+
toastService;
|
17144
17145
|
overlayDiv;
|
17145
17146
|
contentType = 'image';
|
17146
17147
|
dropRef;
|
17147
17148
|
progressRef;
|
17148
17149
|
label;
|
17149
|
-
size =
|
17150
|
+
size = 'md';
|
17150
17151
|
fileInput;
|
17151
17152
|
type = 'inline';
|
17152
17153
|
template;
|
@@ -17158,45 +17159,60 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17158
17159
|
{
|
17159
17160
|
type: 'image',
|
17160
17161
|
accept: ['image/gif', 'image/jpeg', 'image/png'],
|
17162
|
+
message: 'عکس',
|
17161
17163
|
},
|
17162
17164
|
{
|
17163
17165
|
type: 'audio',
|
17164
17166
|
accept: ['audio/mp3'],
|
17167
|
+
message: 'audio',
|
17165
17168
|
},
|
17166
17169
|
{
|
17167
17170
|
type: 'ebook',
|
17168
17171
|
accept: ['application/pdf'],
|
17172
|
+
message: 'pdf',
|
17169
17173
|
},
|
17170
17174
|
{
|
17171
17175
|
type: 'excel',
|
17172
|
-
accept: [
|
17176
|
+
accept: [
|
17177
|
+
'application/vnd.ms-excel',
|
17178
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
17179
|
+
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
17180
|
+
'application/vnd.oasis.opendocument.spreadsheet',
|
17181
|
+
'text/csv',
|
17182
|
+
],
|
17183
|
+
message: 'اکسل',
|
17173
17184
|
},
|
17174
17185
|
{
|
17175
17186
|
type: 'video',
|
17176
17187
|
accept: ['video/*'],
|
17188
|
+
message: 'video',
|
17177
17189
|
},
|
17178
17190
|
{
|
17179
17191
|
type: 'video/image',
|
17180
17192
|
accept: ['image/gif', 'image/jpeg', 'image/png', 'video/*'],
|
17193
|
+
message: 'video/image',
|
17181
17194
|
},
|
17182
17195
|
{
|
17183
17196
|
type: 'json',
|
17184
17197
|
accept: ['application/json'],
|
17198
|
+
message: 'json',
|
17185
17199
|
},
|
17186
17200
|
{
|
17187
17201
|
type: 'any',
|
17188
17202
|
accept: ['*/*'],
|
17203
|
+
message: '',
|
17189
17204
|
},
|
17190
17205
|
];
|
17191
17206
|
files = [];
|
17192
17207
|
focus() { }
|
17193
17208
|
fileName = '';
|
17194
|
-
constructor(el, injectionService, rendrer, cdr) {
|
17209
|
+
constructor(el, injectionService, rendrer, cdr, toastService) {
|
17195
17210
|
super();
|
17196
17211
|
this.el = el;
|
17197
17212
|
this.injectionService = injectionService;
|
17198
17213
|
this.rendrer = rendrer;
|
17199
17214
|
this.cdr = cdr;
|
17215
|
+
this.toastService = toastService;
|
17200
17216
|
}
|
17201
17217
|
onDeleteClick(e) {
|
17202
17218
|
e.stopPropagation();
|
@@ -17219,31 +17235,24 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17219
17235
|
if (this.dropRef != null) {
|
17220
17236
|
}
|
17221
17237
|
else {
|
17222
|
-
this.dropRef = this.el.nativeElement;
|
17238
|
+
this.dropRef = this.el.nativeElement.querySelector('.upload-file-box');
|
17223
17239
|
}
|
17224
17240
|
//
|
17225
17241
|
if (this.progressRef != null) {
|
17226
17242
|
}
|
17227
17243
|
else {
|
17228
|
-
this.progressRef =
|
17244
|
+
this.progressRef =
|
17245
|
+
this.el.nativeElement.querySelector('.upload-file-box');
|
17229
17246
|
}
|
17230
17247
|
//
|
17231
17248
|
if (this.type === 'hidden' || this.type === 'box') {
|
17232
|
-
this.
|
17233
|
-
this.overlayDiv.classList.add('overlay');
|
17234
|
-
this.overlayDiv.innerHTML = `
|
17235
|
-
<div class="icon-wrapper">
|
17236
|
-
<i class="far fa-cloud-upload-alt fa-3x"></i>
|
17237
|
-
<span>Drop File(s) Here</span>
|
17238
|
-
</div>
|
17239
|
-
`;
|
17249
|
+
this.handleShowEmptyFile();
|
17240
17250
|
this.overlayDiv.addEventListener('drag', this.handleOverlayDragOver);
|
17241
17251
|
this.overlayDiv.addEventListener('dragover', this.handleOverlayDragOver);
|
17242
17252
|
this.overlayDiv.addEventListener('dragleave', this.handleOverlayDragOver);
|
17243
|
-
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
17244
17253
|
}
|
17245
17254
|
//
|
17246
|
-
this.dropRef.classList.add('ax-upload-drop-over');
|
17255
|
+
// this.dropRef.classList.add('ax-upload-drop-over');
|
17247
17256
|
this.dropRef.addEventListener('dragover', this.handleDragOver.bind(this));
|
17248
17257
|
this.dropRef.addEventListener('dragleave', this.handleDragLeave.bind(this));
|
17249
17258
|
this.dropRef.addEventListener('drop', this.handleDrop.bind(this));
|
@@ -17273,6 +17282,14 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17273
17282
|
}
|
17274
17283
|
}
|
17275
17284
|
addFile(file) {
|
17285
|
+
if (this.contentType &&
|
17286
|
+
this.contentType !== 'any' &&
|
17287
|
+
!this.fileTypes
|
17288
|
+
.find((x) => x.type === this.contentType)
|
17289
|
+
.accept.includes(file.type)) {
|
17290
|
+
this.toastService.info(`فایل بارگذاری باید از نوع ${this.fileTypes.find((x) => x.type === this.contentType).message} باشد`);
|
17291
|
+
return;
|
17292
|
+
}
|
17276
17293
|
const progressDiv = this.rendrer.createElement('div');
|
17277
17294
|
progressDiv.classList.add('ax-upload-progress-panel');
|
17278
17295
|
const progressLabel = this.rendrer.createElement('small');
|
@@ -17285,7 +17302,7 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17285
17302
|
reader.addEventListener('load', (e) => {
|
17286
17303
|
this.onLoad.emit({
|
17287
17304
|
file,
|
17288
|
-
data: e.target.result
|
17305
|
+
data: e.target.result,
|
17289
17306
|
});
|
17290
17307
|
//
|
17291
17308
|
// Fake Upload
|
@@ -17302,13 +17319,41 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17302
17319
|
file,
|
17303
17320
|
total: e.total,
|
17304
17321
|
uploaded,
|
17305
|
-
value: pv
|
17322
|
+
value: pv,
|
17306
17323
|
});
|
17307
17324
|
//
|
17308
17325
|
if (com.progress >= 100) {
|
17309
17326
|
clearInterval(intv);
|
17310
17327
|
setTimeout(() => {
|
17311
17328
|
this.rendrer.removeChild(this.progressRef, progressDiv);
|
17329
|
+
if (this.fileName) {
|
17330
|
+
this.rendrer.removeChild(this.dropRef, this.overlayDiv);
|
17331
|
+
this.overlayDiv = this.rendrer.createElement('div');
|
17332
|
+
this.overlayDiv.classList.add('overlay');
|
17333
|
+
this.overlayDiv.innerHTML = `
|
17334
|
+
<div
|
17335
|
+
style="
|
17336
|
+
display: flex;
|
17337
|
+
flex-direction: column;
|
17338
|
+
align-items: center;
|
17339
|
+
justify-content: center;
|
17340
|
+
gap: 8px;
|
17341
|
+
"
|
17342
|
+
>
|
17343
|
+
<i style="color: var(--ax-danger-color)" class="far fa-times fa-3x"></i>
|
17344
|
+
<span>${this.fileName}</span>
|
17345
|
+
</div>
|
17346
|
+
|
17347
|
+
`;
|
17348
|
+
const closeIcon = this.overlayDiv.querySelector('.far.fa-times');
|
17349
|
+
this.rendrer.listen(closeIcon, 'click', (e) => {
|
17350
|
+
this.remove();
|
17351
|
+
this.rendrer.removeChild(this.dropRef, this.overlayDiv);
|
17352
|
+
this.handleShowEmptyFile();
|
17353
|
+
e.stopPropagation();
|
17354
|
+
});
|
17355
|
+
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
17356
|
+
}
|
17312
17357
|
}, 1000);
|
17313
17358
|
}
|
17314
17359
|
}, 100);
|
@@ -17319,13 +17364,31 @@ class AXUploadFileComponent extends AXBaseComponent {
|
|
17319
17364
|
get accessTypes() {
|
17320
17365
|
return this.fileTypes.find((item) => item.type == this.contentType).accept;
|
17321
17366
|
}
|
17322
|
-
|
17323
|
-
|
17367
|
+
handleShowEmptyFile() {
|
17368
|
+
this.overlayDiv = this.rendrer.createElement('div');
|
17369
|
+
this.overlayDiv.classList.add('overlay');
|
17370
|
+
this.overlayDiv.innerHTML = `
|
17371
|
+
<div style="
|
17372
|
+
display: flex;
|
17373
|
+
flex-direction: column;
|
17374
|
+
align-items: center;
|
17375
|
+
justify-content: center;
|
17376
|
+
gap: 8px;
|
17377
|
+
">
|
17378
|
+
<i class="far fa-cloud-upload-alt fa-3x"></i>
|
17379
|
+
<span>${AXTranslator.get('common.upload')}</span>
|
17380
|
+
</div>
|
17381
|
+
`;
|
17382
|
+
this.rendrer.appendChild(this.dropRef, this.overlayDiv);
|
17383
|
+
this.dropRef.classList.add('ax-upload-drop-over');
|
17384
|
+
}
|
17385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXUploadFileComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.AXRenderService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: AXToastService }], target: i0.ɵɵFactoryTarget.Component });
|
17386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXUploadFileComponent, selector: "ax-upload-file", inputs: { contentType: "contentType", dropRef: "dropRef", progressRef: "progressRef", label: "label", size: "size", type: "type", template: "template", disabled: "disabled" }, outputs: { onLoad: "onLoad", onProgress: "onProgress", onRemove: "onRemove" }, host: { styleAttribute: "display: block; width:100%; position: relative" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<input\n #fileInput\n type=\"file\"\n [accept]=\"accessTypes.join(',')\"\n style=\"display: none\"\n (change)=\"onFileChange($event)\"\n/>\n\n<ng-container *ngIf=\"type == 'inline'; else elseTemplate\">\n <ax-form-group size=\"{{ size }}\">\n <ax-text-box\n [value]=\"fileName\"\n readonly=\"true\"\n [disabled]=\"disabled\"\n ></ax-text-box>\n <ax-button\n type=\"blank light\"\n icon=\"far fa-times\"\n (click)=\"remove()\"\n *ngIf=\"fileName\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n type=\"primary blank\"\n icon=\"far fa-upload\"\n (click)=\"open()\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n </ax-form-group>\n</ng-container>\n\n<ng-template #elseTemplate>\n <div class=\"ax upload-file-box\" (click)=\"open()\" #dropRef></div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { kind: "component", type: AXFormGroupComponent, selector: "ax-form-group", inputs: ["size"] }], encapsulation: i0.ViewEncapsulation.None });
|
17324
17387
|
}
|
17325
17388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXUploadFileComponent, decorators: [{
|
17326
17389
|
type: Component,
|
17327
|
-
args: [{ selector: 'ax-upload-file', encapsulation: ViewEncapsulation.None, host: { style: 'display: block; width:100%; position: relative' }, template: "<input
|
17328
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.AXRenderService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentType: [{
|
17390
|
+
args: [{ selector: 'ax-upload-file', encapsulation: ViewEncapsulation.None, host: { style: 'display: block; width:100%; position: relative' }, template: "<input\n #fileInput\n type=\"file\"\n [accept]=\"accessTypes.join(',')\"\n style=\"display: none\"\n (change)=\"onFileChange($event)\"\n/>\n\n<ng-container *ngIf=\"type == 'inline'; else elseTemplate\">\n <ax-form-group size=\"{{ size }}\">\n <ax-text-box\n [value]=\"fileName\"\n readonly=\"true\"\n [disabled]=\"disabled\"\n ></ax-text-box>\n <ax-button\n type=\"blank light\"\n icon=\"far fa-times\"\n (click)=\"remove()\"\n *ngIf=\"fileName\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n type=\"primary blank\"\n icon=\"far fa-upload\"\n (click)=\"open()\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n </ax-form-group>\n</ng-container>\n\n<ng-template #elseTemplate>\n <div class=\"ax upload-file-box\" (click)=\"open()\" #dropRef></div>\n</ng-template>\n" }]
|
17391
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.AXRenderService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: AXToastService }]; }, propDecorators: { contentType: [{
|
17329
17392
|
type: Input
|
17330
17393
|
}], dropRef: [{
|
17331
17394
|
type: Input
|