@sumaris-net/ngx-components 1.15.10 → 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 +28 -14
- 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 +6 -0
- package/esm2015/src/app/core/services/config.service.js +3 -3
- package/esm2015/src/app/shared/pipes/form.pipes.js +13 -1
- package/esm2015/src/app/shared/pipes/pipes.module.js +6 -4
- 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 +25 -15
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/pipes/form.pipes.d.ts +3 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -4587,6 +4587,21 @@
|
|
|
4587
4587
|
},] },
|
|
4588
4588
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4589
4589
|
];
|
|
4590
|
+
var FormGetGroupPipe = /** @class */ (function () {
|
|
4591
|
+
function FormGetGroupPipe() {
|
|
4592
|
+
}
|
|
4593
|
+
FormGetGroupPipe.prototype.transform = function (form, path) {
|
|
4594
|
+
return form.get(path);
|
|
4595
|
+
};
|
|
4596
|
+
return FormGetGroupPipe;
|
|
4597
|
+
}());
|
|
4598
|
+
FormGetGroupPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4599
|
+
FormGetGroupPipe.decorators = [
|
|
4600
|
+
{ type: i0.Pipe, args: [{
|
|
4601
|
+
name: 'formGetGroup'
|
|
4602
|
+
},] },
|
|
4603
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4604
|
+
];
|
|
4590
4605
|
|
|
4591
4606
|
var SharedPipesModule = /** @class */ (function () {
|
|
4592
4607
|
function SharedPipesModule() {
|
|
@@ -4636,7 +4651,8 @@
|
|
|
4636
4651
|
FormErrorTranslatePipe,
|
|
4637
4652
|
FormGetPipe,
|
|
4638
4653
|
FormGetControlPipe,
|
|
4639
|
-
FormGetArrayPipe
|
|
4654
|
+
FormGetArrayPipe,
|
|
4655
|
+
FormGetGroupPipe
|
|
4640
4656
|
],
|
|
4641
4657
|
exports: [
|
|
4642
4658
|
PropertyGetPipe,
|
|
@@ -4674,7 +4690,8 @@
|
|
|
4674
4690
|
FormErrorTranslatePipe,
|
|
4675
4691
|
FormGetPipe,
|
|
4676
4692
|
FormGetControlPipe,
|
|
4677
|
-
FormGetArrayPipe
|
|
4693
|
+
FormGetArrayPipe,
|
|
4694
|
+
FormGetGroupPipe
|
|
4678
4695
|
]
|
|
4679
4696
|
},] }
|
|
4680
4697
|
];
|
|
@@ -17529,12 +17546,12 @@
|
|
|
17529
17546
|
case 0:
|
|
17530
17547
|
now = Date.now();
|
|
17531
17548
|
console.debug('[config] Clear server cache...');
|
|
17532
|
-
variables =
|
|
17549
|
+
variables = opts && opts.cacheName && { name: opts.cacheName } || undefined;
|
|
17533
17550
|
return [4 /*yield*/, this.graphql.query({
|
|
17534
17551
|
query: ClearCache,
|
|
17535
17552
|
variables: variables,
|
|
17536
17553
|
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
17537
|
-
fetchPolicy: '
|
|
17554
|
+
fetchPolicy: 'no-cache'
|
|
17538
17555
|
})];
|
|
17539
17556
|
case 1:
|
|
17540
17557
|
res = _a.sent();
|
|
@@ -18409,11 +18426,11 @@
|
|
|
18409
18426
|
return FileResponse;
|
|
18410
18427
|
}());
|
|
18411
18428
|
function isProgressEvent(event) {
|
|
18412
|
-
return event.type === i2$1.HttpEventType.UploadProgress
|
|
18413
|
-
|| event.type === i2$1.HttpEventType.DownloadProgress;
|
|
18429
|
+
return event && (event.type === i2$1.HttpEventType.UploadProgress
|
|
18430
|
+
|| event.type === i2$1.HttpEventType.DownloadProgress);
|
|
18414
18431
|
}
|
|
18415
18432
|
function isResponseEvent(event) {
|
|
18416
|
-
return event.type === i2$1.HttpEventType.Response;
|
|
18433
|
+
return event && event.type === i2$1.HttpEventType.Response;
|
|
18417
18434
|
}
|
|
18418
18435
|
|
|
18419
18436
|
var UploadFileComponent = /** @class */ (function () {
|
|
@@ -18556,7 +18573,7 @@
|
|
|
18556
18573
|
});
|
|
18557
18574
|
jobs = files
|
|
18558
18575
|
.map(function (f) { return f; })
|
|
18559
|
-
.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
|
|
18560
18577
|
.map(function (file, i) {
|
|
18561
18578
|
// Wait if need
|
|
18562
18579
|
if (isNotNil(_this.maxParallelUpload)) {
|
|
@@ -18574,12 +18591,12 @@
|
|
|
18574
18591
|
file.progress = 0;
|
|
18575
18592
|
return rxjs.of(file);
|
|
18576
18593
|
})
|
|
18577
|
-
.map(function (file$) { return file$.pipe(
|
|
18594
|
+
.map(function (file$) { return file$.pipe(operators.filter(isNotNil),
|
|
18578
18595
|
// Log
|
|
18579
18596
|
operators.tap(function (file) { return console.debug("[upload-file] " + file.name + ": uploading..."); }),
|
|
18580
18597
|
// Start uploading
|
|
18581
18598
|
operators.switchMap(function (file) { return _this.uploadFn(file)
|
|
18582
|
-
.pipe(operators.map(function (event) {
|
|
18599
|
+
.pipe(operators.filter(isNotNil), operators.map(function (event) {
|
|
18583
18600
|
// Progress event
|
|
18584
18601
|
if (isProgressEvent(event)) {
|
|
18585
18602
|
if (isNotNil(event.loaded) && event.loaded >= 0) {
|
|
@@ -18589,10 +18606,6 @@
|
|
|
18589
18606
|
file.progress = -1; // Indeterminate progression
|
|
18590
18607
|
}
|
|
18591
18608
|
}
|
|
18592
|
-
// User event
|
|
18593
|
-
else if (event.type === i2$1.HttpEventType.User) {
|
|
18594
|
-
file.progress = -1; // Indeterminate progression
|
|
18595
|
-
}
|
|
18596
18609
|
// Response event
|
|
18597
18610
|
else if (isResponseEvent(event)) {
|
|
18598
18611
|
file.progress = 1;
|
|
@@ -31350,6 +31363,7 @@
|
|
|
31350
31363
|
exports.FormFieldValuesHolder = FormFieldValuesHolder;
|
|
31351
31364
|
exports.FormGetArrayPipe = FormGetArrayPipe;
|
|
31352
31365
|
exports.FormGetControlPipe = FormGetControlPipe;
|
|
31366
|
+
exports.FormGetGroupPipe = FormGetGroupPipe;
|
|
31353
31367
|
exports.FormGetPipe = FormGetPipe;
|
|
31354
31368
|
exports.Fragments = Fragments;
|
|
31355
31369
|
exports.GraphqlService = GraphqlService;
|