@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.
@@ -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 = sortBy && this._sortByReplacement[sortBy] || sortBy || 'id';
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.saveDirtyTables = function () {
29145
+ AppTabEditor.prototype.saveDirtyChildren = function () {
29144
29146
  return __awaiter(this, void 0, void 0, function () {
29145
- var results, saved;
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
- saved = results.findIndex(function (result) { return result !== true; }) === -1;
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.saveDirtyTables()];
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.saveDirtyTables()];
30338
+ return [4 /*yield*/, this.saveDirtyChildren()];
30339
30339
  case 3:
30340
30340
  saved = _c.sent();
30341
30341
  if (!saved)