@seniorsistemas/angular-components 15.4.1 → 16.0.0
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/bundles/seniorsistemas-angular-components.umd.js +14 -5
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/file-upload/file-upload.component.d.ts +2 -2
- package/components/file-upload/models/index.d.ts +1 -0
- package/components/file-upload/models/uploadError.d.ts +6 -0
- package/esm2015/components/file-upload/file-upload.component.js +15 -6
- package/esm2015/components/file-upload/models/index.js +1 -1
- package/esm2015/components/file-upload/models/uploadError.js +1 -0
- package/esm5/components/file-upload/file-upload.component.js +15 -6
- package/esm5/components/file-upload/models/index.js +1 -1
- package/esm5/components/file-upload/models/uploadError.js +1 -0
- package/fesm2015/seniorsistemas-angular-components.js +14 -5
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +14 -5
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -2830,7 +2830,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
2830
2830
|
this.removeFile = new EventEmitter();
|
|
2831
2831
|
this.cancelUpload = new EventEmitter();
|
|
2832
2832
|
this.downloadFile = new EventEmitter();
|
|
2833
|
-
this.
|
|
2833
|
+
this.validateErrors = new EventEmitter();
|
|
2834
2834
|
this._files = [];
|
|
2835
2835
|
this.ngUsubscribe = new Subject();
|
|
2836
2836
|
this.inputValue = "";
|
|
@@ -2873,18 +2873,27 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
2873
2873
|
this.files = [];
|
|
2874
2874
|
}
|
|
2875
2875
|
if (this.isFileLimitExceeded(files)) {
|
|
2876
|
-
this.
|
|
2876
|
+
this.validateErrors.emit({
|
|
2877
|
+
files: files,
|
|
2878
|
+
validation: ValidateErrors.MAX_FILE_LIMIT,
|
|
2879
|
+
});
|
|
2877
2880
|
return;
|
|
2878
2881
|
}
|
|
2879
2882
|
try {
|
|
2880
2883
|
for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
|
|
2881
2884
|
var file = files_1_1.value;
|
|
2882
2885
|
if (this.isUnsupportedFileExtension(file)) {
|
|
2883
|
-
this.
|
|
2886
|
+
this.validateErrors.emit({
|
|
2887
|
+
files: [file],
|
|
2888
|
+
validation: ValidateErrors.UNSUPPORTED_EXTENSION,
|
|
2889
|
+
});
|
|
2884
2890
|
continue;
|
|
2885
2891
|
}
|
|
2886
2892
|
if (this.isFileSizeExceeded(file)) {
|
|
2887
|
-
this.
|
|
2893
|
+
this.validateErrors.emit({
|
|
2894
|
+
files: [file],
|
|
2895
|
+
validation: ValidateErrors.MAX_FILE_SIZE,
|
|
2896
|
+
});
|
|
2888
2897
|
continue;
|
|
2889
2898
|
}
|
|
2890
2899
|
newFiles.push(file);
|
|
@@ -3032,7 +3041,7 @@ var FileUploadComponent = /** @class */ (function () {
|
|
|
3032
3041
|
], FileUploadComponent.prototype, "downloadFile", void 0);
|
|
3033
3042
|
__decorate([
|
|
3034
3043
|
Output()
|
|
3035
|
-
], FileUploadComponent.prototype, "
|
|
3044
|
+
], FileUploadComponent.prototype, "validateErrors", void 0);
|
|
3036
3045
|
__decorate([
|
|
3037
3046
|
HostListener("window:resize")
|
|
3038
3047
|
], FileUploadComponent.prototype, "onResize", null);
|