@sumaris-net/ngx-components 1.15.12 → 1.15.13
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/sumaris-net.ngx-components.umd.js +6 -10
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +4 -0
- package/esm2015/src/app/shared/upload-file/upload-file.component.js +4 -9
- package/esm2015/src/app/shared/upload-file/upload-file.model.js +4 -4
- package/fesm2015/sumaris-net.ngx-components.js +6 -10
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -18426,11 +18426,11 @@
|
|
|
18426
18426
|
return FileResponse;
|
|
18427
18427
|
}());
|
|
18428
18428
|
function isProgressEvent(event) {
|
|
18429
|
-
return event.type === i2$1.HttpEventType.UploadProgress
|
|
18430
|
-
|| event.type === i2$1.HttpEventType.DownloadProgress;
|
|
18429
|
+
return event && (event.type === i2$1.HttpEventType.UploadProgress
|
|
18430
|
+
|| event.type === i2$1.HttpEventType.DownloadProgress);
|
|
18431
18431
|
}
|
|
18432
18432
|
function isResponseEvent(event) {
|
|
18433
|
-
return event.type === i2$1.HttpEventType.Response;
|
|
18433
|
+
return event && event.type === i2$1.HttpEventType.Response;
|
|
18434
18434
|
}
|
|
18435
18435
|
|
|
18436
18436
|
var UploadFileComponent = /** @class */ (function () {
|
|
@@ -18573,7 +18573,7 @@
|
|
|
18573
18573
|
});
|
|
18574
18574
|
jobs = files
|
|
18575
18575
|
.map(function (f) { return f; })
|
|
18576
|
-
.filter(function (file) { return isNil(file.progress) && !file.error; }) // Skip if already started or in error
|
|
18576
|
+
.filter(function (file) { return file && isNil(file.progress) && !file.error; }) // Skip if already started or in error
|
|
18577
18577
|
.map(function (file, i) {
|
|
18578
18578
|
// Wait if need
|
|
18579
18579
|
if (isNotNil(_this.maxParallelUpload)) {
|
|
@@ -18591,12 +18591,12 @@
|
|
|
18591
18591
|
file.progress = 0;
|
|
18592
18592
|
return rxjs.of(file);
|
|
18593
18593
|
})
|
|
18594
|
-
.map(function (file$) { return file$.pipe(
|
|
18594
|
+
.map(function (file$) { return file$.pipe(operators.filter(isNotNil),
|
|
18595
18595
|
// Log
|
|
18596
18596
|
operators.tap(function (file) { return console.debug("[upload-file] " + file.name + ": uploading..."); }),
|
|
18597
18597
|
// Start uploading
|
|
18598
18598
|
operators.switchMap(function (file) { return _this.uploadFn(file)
|
|
18599
|
-
.pipe(operators.map(function (event) {
|
|
18599
|
+
.pipe(operators.filter(isNotNil), operators.map(function (event) {
|
|
18600
18600
|
// Progress event
|
|
18601
18601
|
if (isProgressEvent(event)) {
|
|
18602
18602
|
if (isNotNil(event.loaded) && event.loaded >= 0) {
|
|
@@ -18606,10 +18606,6 @@
|
|
|
18606
18606
|
file.progress = -1; // Indeterminate progression
|
|
18607
18607
|
}
|
|
18608
18608
|
}
|
|
18609
|
-
// User event
|
|
18610
|
-
else if (event.type === i2$1.HttpEventType.User) {
|
|
18611
|
-
file.progress = -1; // Indeterminate progression
|
|
18612
|
-
}
|
|
18613
18609
|
// Response event
|
|
18614
18610
|
else if (isResponseEvent(event)) {
|
|
18615
18611
|
file.progress = 1;
|