@sumaris-net/ngx-components 1.20.29 → 1.20.32
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 +45 -37
- 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 +2 -2
- package/esm2015/src/app/shared/material/datetime/material.date.js +3 -2
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +3 -2
- package/esm2015/src/app/shared/services/memory-entity-service.class.js +9 -8
- package/fesm2015/sumaris-net.ngx-components.js +12 -9
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +3 -2
- package/src/app/shared/services/memory-entity-service.class.d.ts +3 -4
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -5776,10 +5776,10 @@
|
|
|
5776
5776
|
return this._tabindex;
|
|
5777
5777
|
},
|
|
5778
5778
|
set: function (value) {
|
|
5779
|
-
var _this = this;
|
|
5780
5779
|
if (this._tabindex !== value) {
|
|
5781
5780
|
this._tabindex = value;
|
|
5782
|
-
|
|
5781
|
+
if (!this._writing)
|
|
5782
|
+
this.updateTabIndex();
|
|
5783
5783
|
}
|
|
5784
5784
|
},
|
|
5785
5785
|
enumerable: false,
|
|
@@ -6171,10 +6171,10 @@
|
|
|
6171
6171
|
return this._tabindex;
|
|
6172
6172
|
},
|
|
6173
6173
|
set: function (value) {
|
|
6174
|
-
var _this = this;
|
|
6175
6174
|
if (this._tabindex !== value) {
|
|
6176
6175
|
this._tabindex = value;
|
|
6177
|
-
|
|
6176
|
+
if (!this._writing)
|
|
6177
|
+
this.updateTabIndex();
|
|
6178
6178
|
}
|
|
6179
6179
|
},
|
|
6180
6180
|
enumerable: false,
|
|
@@ -20719,14 +20719,14 @@
|
|
|
20719
20719
|
}
|
|
20720
20720
|
return this._onChange
|
|
20721
20721
|
.pipe(operators.filter(isNotNil), operators.mergeMap(function (_) { return waitFor(function () { return !_this._saving; }); }), operators.mergeMap(function (_) { return __awaiter(_this, void 0, void 0, function () {
|
|
20722
|
-
var excludedDataByFilter, excludedDataByPagination, data, promiseOrData,
|
|
20723
|
-
return __generator(this, function (
|
|
20724
|
-
switch (
|
|
20722
|
+
var excludedDataByFilter, excludedDataByPagination, data, promiseOrData, _b, total;
|
|
20723
|
+
return __generator(this, function (_c) {
|
|
20724
|
+
switch (_c.label) {
|
|
20725
20725
|
case 0:
|
|
20726
20726
|
excludedDataByFilter = [];
|
|
20727
|
-
|
|
20727
|
+
_c.label = 1;
|
|
20728
20728
|
case 1:
|
|
20729
|
-
|
|
20729
|
+
_c.trys.push([1, , 6, 7]);
|
|
20730
20730
|
if (isEmptyArray(this.data)) {
|
|
20731
20731
|
return [2 /*return*/, { data: [], total: 0 }];
|
|
20732
20732
|
}
|
|
@@ -20736,14 +20736,14 @@
|
|
|
20736
20736
|
if (!((promiseOrData instanceof Promise))) return [3 /*break*/, 3];
|
|
20737
20737
|
return [4 /*yield*/, promiseOrData];
|
|
20738
20738
|
case 2:
|
|
20739
|
-
|
|
20739
|
+
_b = _c.sent();
|
|
20740
20740
|
return [3 /*break*/, 4];
|
|
20741
20741
|
case 3:
|
|
20742
|
-
|
|
20743
|
-
|
|
20742
|
+
_b = promiseOrData;
|
|
20743
|
+
_c.label = 4;
|
|
20744
20744
|
case 4:
|
|
20745
|
-
data =
|
|
20746
|
-
|
|
20745
|
+
data = _b;
|
|
20746
|
+
_c.label = 5;
|
|
20747
20747
|
case 5:
|
|
20748
20748
|
// Apply filter (will update hiddenData)
|
|
20749
20749
|
data = this.filter(data, filterData, excludedDataByFilter);
|
|
@@ -20799,16 +20799,16 @@
|
|
|
20799
20799
|
};
|
|
20800
20800
|
InMemoryEntitiesService.prototype.saveAll = function (data, options) {
|
|
20801
20801
|
return __awaiter(this, void 0, void 0, function () {
|
|
20802
|
-
var res,
|
|
20803
|
-
return __generator(this, function (
|
|
20804
|
-
switch (
|
|
20802
|
+
var res, _b;
|
|
20803
|
+
return __generator(this, function (_c) {
|
|
20804
|
+
switch (_c.label) {
|
|
20805
20805
|
case 0:
|
|
20806
20806
|
if (!this.data)
|
|
20807
20807
|
throw new Error('[memory-service] Could not save, because value not set');
|
|
20808
20808
|
this.markAsSaving();
|
|
20809
|
-
|
|
20809
|
+
_c.label = 1;
|
|
20810
20810
|
case 1:
|
|
20811
|
-
|
|
20811
|
+
_c.trys.push([1, , 6, 7]);
|
|
20812
20812
|
// Restore hidden data
|
|
20813
20813
|
if (isNotEmptyArray(this._hiddenData))
|
|
20814
20814
|
data = data.concat.apply(data, __spread(this._hiddenData));
|
|
@@ -20817,14 +20817,14 @@
|
|
|
20817
20817
|
if (!((res instanceof Promise))) return [3 /*break*/, 3];
|
|
20818
20818
|
return [4 /*yield*/, res];
|
|
20819
20819
|
case 2:
|
|
20820
|
-
|
|
20820
|
+
_b = _c.sent();
|
|
20821
20821
|
return [3 /*break*/, 4];
|
|
20822
20822
|
case 3:
|
|
20823
|
-
|
|
20824
|
-
|
|
20823
|
+
_b = res;
|
|
20824
|
+
_c.label = 4;
|
|
20825
20825
|
case 4:
|
|
20826
|
-
data =
|
|
20827
|
-
|
|
20826
|
+
data = _b;
|
|
20827
|
+
_c.label = 5;
|
|
20828
20828
|
case 5:
|
|
20829
20829
|
this.data = data;
|
|
20830
20830
|
this.dirty = true;
|
|
@@ -20841,7 +20841,7 @@
|
|
|
20841
20841
|
return __awaiter(this, void 0, void 0, function () {
|
|
20842
20842
|
var updatedData, deleteCount;
|
|
20843
20843
|
var _this = this;
|
|
20844
|
-
return __generator(this, function (
|
|
20844
|
+
return __generator(this, function (_b) {
|
|
20845
20845
|
if (!this.data)
|
|
20846
20846
|
throw new Error('[memory-service] Could not delete, because value not set');
|
|
20847
20847
|
updatedData = this.data.filter(function (entity) {
|
|
@@ -20875,18 +20875,26 @@
|
|
|
20875
20875
|
return this._equalsFn(d1, d2);
|
|
20876
20876
|
return d1 && d1.equals ? d1.equals(d2) : EntityUtils.equals(d1, d2, 'id');
|
|
20877
20877
|
};
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
};
|
|
20878
|
+
Object.defineProperty(InMemoryEntitiesService.prototype, "count", {
|
|
20879
|
+
/**
|
|
20880
|
+
* Count data stored by the service (without hidden data).
|
|
20881
|
+
* @param opts
|
|
20882
|
+
*/
|
|
20883
|
+
get: function () {
|
|
20884
|
+
var _a;
|
|
20885
|
+
return (((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) || 0);
|
|
20886
|
+
},
|
|
20887
|
+
enumerable: false,
|
|
20888
|
+
configurable: true
|
|
20889
|
+
});
|
|
20890
|
+
Object.defineProperty(InMemoryEntitiesService.prototype, "hiddenCount", {
|
|
20891
|
+
get: function () {
|
|
20892
|
+
var _a;
|
|
20893
|
+
return ((_a = this._hiddenData) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
20894
|
+
},
|
|
20895
|
+
enumerable: false,
|
|
20896
|
+
configurable: true
|
|
20897
|
+
});
|
|
20890
20898
|
/* -- protected methods -- */
|
|
20891
20899
|
InMemoryEntitiesService.prototype.filter = function (data, _filter, hiddenData) {
|
|
20892
20900
|
// if filter is DataFilter instance, use its test function
|