@sumaris-net/ngx-components 1.23.20 → 1.23.22
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 +9 -9
- 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/editor.class.js +7 -5
- package/esm2015/src/app/core/form/entity-editor-modal.class.js +3 -3
- package/esm2015/src/app/core/form/entity-editor.class.js +2 -2
- package/esm2015/src/app/shared/services/memory-entity-service.class.js +4 -2
- package/fesm2015/sumaris-net.ngx-components.js +12 -8
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/editor.class.d.ts +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -21236,8 +21236,10 @@
|
|
|
21236
21236
|
});
|
|
21237
21237
|
};
|
|
21238
21238
|
InMemoryEntitiesService.prototype.sort = function (data, sortBy, sortDirection) {
|
|
21239
|
+
// Make sure to fill sortBy BEFORE checking in the replacement map
|
|
21240
|
+
sortBy = sortBy || 'id';
|
|
21239
21241
|
// Replace sortBy, using the replacement map
|
|
21240
|
-
sortBy =
|
|
21242
|
+
sortBy = this._sortByReplacement[sortBy] || sortBy;
|
|
21241
21243
|
// Execute the sort
|
|
21242
21244
|
return EntityUtils.sort(data, sortBy, sortDirection);
|
|
21243
21245
|
};
|
|
@@ -29140,18 +29142,16 @@
|
|
|
29140
29142
|
});
|
|
29141
29143
|
});
|
|
29142
29144
|
};
|
|
29143
|
-
AppTabEditor.prototype.
|
|
29145
|
+
AppTabEditor.prototype.saveDirtyChildren = function () {
|
|
29144
29146
|
return __awaiter(this, void 0, void 0, function () {
|
|
29145
|
-
var results
|
|
29147
|
+
var results;
|
|
29146
29148
|
return __generator(this, function (_c) {
|
|
29147
29149
|
switch (_c.label) {
|
|
29148
|
-
case 0: return [4 /*yield*/, Promise.all((this.tables
|
|
29149
|
-
.filter(function (c) { return c.dirty; })
|
|
29150
|
+
case 0: return [4 /*yield*/, Promise.all(__spread(this.tables, this.editors).filter(function (c) { return c.dirty; })
|
|
29150
29151
|
.map(function (c) { return c.save(); }))];
|
|
29151
29152
|
case 1:
|
|
29152
29153
|
results = _c.sent();
|
|
29153
|
-
|
|
29154
|
-
return [2 /*return*/, saved];
|
|
29154
|
+
return [2 /*return*/, !results.some(function (saved) { return saved !== true; })];
|
|
29155
29155
|
}
|
|
29156
29156
|
});
|
|
29157
29157
|
});
|
|
@@ -29635,7 +29635,7 @@
|
|
|
29635
29635
|
case 2:
|
|
29636
29636
|
_c.trys.push([2, 8, 9, 10]);
|
|
29637
29637
|
nextTabIndex = this._autoOpenNextTab && isNil(this.previousDataId) && this.computeNextTabIndex();
|
|
29638
|
-
return [4 /*yield*/, this.
|
|
29638
|
+
return [4 /*yield*/, this.saveDirtyChildren()];
|
|
29639
29639
|
case 3:
|
|
29640
29640
|
saved = _c.sent();
|
|
29641
29641
|
if (!saved)
|
|
@@ -30335,7 +30335,7 @@
|
|
|
30335
30335
|
_c.label = 2;
|
|
30336
30336
|
case 2:
|
|
30337
30337
|
_c.trys.push([2, 5, 6, 7]);
|
|
30338
|
-
return [4 /*yield*/, this.
|
|
30338
|
+
return [4 /*yield*/, this.saveDirtyChildren()];
|
|
30339
30339
|
case 3:
|
|
30340
30340
|
saved = _c.sent();
|
|
30341
30341
|
if (!saved)
|