@sumaris-net/ngx-components 1.23.3 → 1.23.6

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.
@@ -20036,6 +20036,7 @@
20036
20036
  this._subscription = new rxjs.Subscription();
20037
20037
  this._enable = false;
20038
20038
  this.i18nFieldPrefix = null;
20039
+ this.destroySubject = new rxjs.Subject();
20039
20040
  this.readySubject = new rxjs.BehaviorSubject(false);
20040
20041
  this.loadingSubject = new rxjs.BehaviorSubject(true);
20041
20042
  this.errorSubject = new rxjs.BehaviorSubject(undefined);
@@ -20221,6 +20222,8 @@
20221
20222
  this.errorSubject.unsubscribe();
20222
20223
  this.onCancel.unsubscribe();
20223
20224
  this.onSubmit.unsubscribe();
20225
+ this.destroySubject.next();
20226
+ this.destroySubject.unsubscribe();
20224
20227
  };
20225
20228
  AppForm.prototype.cancel = function () {
20226
20229
  return __awaiter(this, void 0, void 0, function () {
@@ -26087,14 +26090,13 @@
26087
26090
  delete: { get: function () { return _super_1.prototype.delete; } }
26088
26091
  });
26089
26092
  return __awaiter(this, void 0, void 0, function () {
26090
- var data, rowsById, rowNotDeleted, err_1;
26093
+ var data, rowNotDeleted, err_1;
26091
26094
  var _this = this;
26092
26095
  return __generator(this, function (_b) {
26093
26096
  switch (_b.label) {
26094
26097
  case 0:
26095
26098
  this.markAsLoading();
26096
26099
  data = this.getDataFromRows(rows);
26097
- rowsById = Beans.collectById(rows);
26098
26100
  _b.label = 1;
26099
26101
  case 1:
26100
26102
  _b.trys.push([1, 3, 4, 5]);
@@ -26103,18 +26105,11 @@
26103
26105
  case 2:
26104
26106
  // Call service deletion
26105
26107
  _b.sent();
26106
- rowNotDeleted = Object.getOwnPropertyNames(rowsById)
26107
- .reduce(function (res, id) {
26108
- var row = rowsById[id];
26109
- var present = _this.getRow(+id) === row;
26110
- return present ? res.concat(row) : res;
26111
- }, []);
26112
- //this.getRows().filter(row => rows.includes(row));
26113
- // Apply missing deletion
26108
+ rowNotDeleted = this.getRows().filter(rows.includes);
26114
26109
  if (isNotEmptyArray(rowNotDeleted)) {
26115
- console.warn("[table-datasource] Force deletion of " + rowNotDeleted.length + " rows (Is service update the cache ?)");
26110
+ console.warn("[table-datasource] Force deletion of " + rowNotDeleted.length + " rows! Please check that data service update the cache, after deletion");
26116
26111
  rowNotDeleted
26117
- // Start from the end
26112
+ // Start at the end
26118
26113
  .sort(function (a, b) { return a.id > b.id ? -1 : 1; })
26119
26114
  .forEach(function (r) { return _super.delete.call(_this, r.id); });
26120
26115
  }
@@ -26272,8 +26267,8 @@
26272
26267
  this._subscription = new rxjs.Subscription();
26273
26268
  this._cellValueChangesDefs = {};
26274
26269
  this._enabled = true;
26275
- this._destroy$ = new rxjs.Subject();
26276
26270
  this.allowRowDetail = true;
26271
+ this.destroySubject = new rxjs.Subject();
26277
26272
  this.excludesColumns = [];
26278
26273
  this.totalRowCount = null;
26279
26274
  this.readySubject = new rxjs.BehaviorSubject(false);
@@ -26657,7 +26652,7 @@
26657
26652
  // Stop if next another row, or destroying
26658
26653
  rxjs.combineLatest([
26659
26654
  _this.onStartEditingRow,
26660
- _this._destroy$
26655
+ _this.destroySubject
26661
26656
  ])
26662
26657
  // DEBUG
26663
26658
  //.pipe(
@@ -26760,8 +26755,8 @@
26760
26755
  this.onSort.unsubscribe();
26761
26756
  this.onDirty.unsubscribe();
26762
26757
  this.onError.unsubscribe();
26763
- this._destroy$.next();
26764
- this._destroy$.unsubscribe();
26758
+ this.destroySubject.next();
26759
+ this.destroySubject.unsubscribe();
26765
26760
  (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.ngOnDestroy();
26766
26761
  };
26767
26762
  AppTable.prototype.updateView = function (res, opts) {
@@ -28171,6 +28166,7 @@
28171
28166
  this._subscription = new rxjs.Subscription();
28172
28167
  this._enabled = false;
28173
28168
  this._dirty = false;
28169
+ this.destroySubject = new rxjs.Subject();
28174
28170
  this.readySubject = new rxjs.BehaviorSubject(false);
28175
28171
  this.loadingSubject = new rxjs.BehaviorSubject(true);
28176
28172
  this.errorSubject = new rxjs.BehaviorSubject(undefined);
@@ -28320,13 +28316,15 @@
28320
28316
  }
28321
28317
  };
28322
28318
  AppEditor.prototype.ngAfterViewInit = function () {
28323
- // Can be override by subclasses
28319
+ // Can be overridden by subclasses
28324
28320
  };
28325
28321
  AppEditor.prototype.ngOnDestroy = function () {
28326
28322
  this._subscription.unsubscribe();
28327
28323
  this.readySubject.unsubscribe();
28328
28324
  this.loadingSubject.unsubscribe();
28329
28325
  this.errorSubject.unsubscribe();
28326
+ this.destroySubject.next();
28327
+ this.destroySubject.unsubscribe();
28330
28328
  };
28331
28329
  AppEditor.prototype.addChildForm = function (form) {
28332
28330
  if (!form)