@sumaris-net/ngx-components 1.23.34 → 1.23.36
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 +21 -12
- 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/esm2015/src/app/core/form/form.utils.js +9 -6
- package/esm2015/src/app/shared/services/startable-observable-service.class.js +6 -4
- package/esm2015/src/app/shared/services/startable-service.class.js +7 -5
- package/fesm2015/sumaris-net.ngx-components.js +19 -12
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/form.utils.d.ts +2 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -4553,7 +4553,8 @@
|
|
|
4553
4553
|
configurable: true
|
|
4554
4554
|
});
|
|
4555
4555
|
FormArrayHelper.prototype.add = function (value, options) {
|
|
4556
|
-
|
|
4556
|
+
var _this = this;
|
|
4557
|
+
return addValueInArray(this._formArray, function () { return _this.createControl(value); }, this.equals, this.isEmpty, value, options);
|
|
4557
4558
|
};
|
|
4558
4559
|
FormArrayHelper.prototype.removeAt = function (index) {
|
|
4559
4560
|
// Do not remove if last criterion
|
|
@@ -4589,12 +4590,16 @@
|
|
|
4589
4590
|
};
|
|
4590
4591
|
/**
|
|
4591
4592
|
* Resize the FormArray, then set values
|
|
4592
|
-
* @param
|
|
4593
|
+
* @param values
|
|
4593
4594
|
* @param opts
|
|
4594
4595
|
*/
|
|
4595
|
-
FormArrayHelper.prototype.setValue = function (
|
|
4596
|
-
|
|
4597
|
-
this.
|
|
4596
|
+
FormArrayHelper.prototype.setValue = function (values, opts) {
|
|
4597
|
+
var _this = this;
|
|
4598
|
+
this.resize(0);
|
|
4599
|
+
(values || []).forEach(function (value, i) {
|
|
4600
|
+
var isLast = i === values.length - 1;
|
|
4601
|
+
_this.add(value, { emitEvent: isLast });
|
|
4602
|
+
});
|
|
4598
4603
|
};
|
|
4599
4604
|
/**
|
|
4600
4605
|
* Resize the FormArray, then patch values
|
|
@@ -10189,9 +10194,11 @@
|
|
|
10189
10194
|
return data;
|
|
10190
10195
|
})
|
|
10191
10196
|
.catch(function (err) {
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10197
|
+
if (!_this.stopped) {
|
|
10198
|
+
console.error('Failed to start a service: ' + (err && err.message || err), err);
|
|
10199
|
+
_this._startPromise = null;
|
|
10200
|
+
_this._started = false;
|
|
10201
|
+
}
|
|
10195
10202
|
return null;
|
|
10196
10203
|
});
|
|
10197
10204
|
return this._startPromise;
|
|
@@ -10224,10 +10231,10 @@
|
|
|
10224
10231
|
console.error('Failed to stop a service: ' + (err_1 && err_1.message || err_1), err_1);
|
|
10225
10232
|
return [3 /*break*/, 4];
|
|
10226
10233
|
case 3:
|
|
10227
|
-
this.stopSubject.next();
|
|
10228
10234
|
this._data = null;
|
|
10229
10235
|
this._started = false;
|
|
10230
10236
|
this._startPromise = undefined;
|
|
10237
|
+
this.stopSubject.next();
|
|
10231
10238
|
return [7 /*endfinally*/];
|
|
10232
10239
|
case 4: return [2 /*return*/];
|
|
10233
10240
|
}
|
|
@@ -12850,9 +12857,11 @@
|
|
|
12850
12857
|
return data;
|
|
12851
12858
|
})
|
|
12852
12859
|
.catch(function (err) {
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12860
|
+
if (!_this.stopped) {
|
|
12861
|
+
console.error('Failed to start a service: ' + (err && err.message || err), err);
|
|
12862
|
+
_this._started = false;
|
|
12863
|
+
_this._startPromise = null;
|
|
12864
|
+
}
|
|
12856
12865
|
return null;
|
|
12857
12866
|
});
|
|
12858
12867
|
return this._startPromise;
|