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