@sumaris-net/ngx-components 1.23.51 → 1.23.53

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.
@@ -1043,11 +1043,11 @@
1043
1043
  function filterFalse(obs, opts) {
1044
1044
  return obs.pipe(operators.filter(function (v) { return v === false; }));
1045
1045
  }
1046
- function decorateForFirst(obs, opts) {
1046
+ function decorateWithTakeUntil(obs, opts) {
1047
1047
  // Set take until notifier
1048
1048
  var takeUntil$ = (opts === null || opts === void 0 ? void 0 : opts.stop) || ((opts === null || opts === void 0 ? void 0 : opts.timeout) && rxjs.timer(opts.timeout));
1049
1049
  if (!takeUntil$)
1050
- return obs;
1050
+ return obs; // Skip
1051
1051
  // When stop, throw an error (useful when used with a toPromise())
1052
1052
  if (opts.stopError) {
1053
1053
  var error_1;
@@ -1068,15 +1068,15 @@
1068
1068
  .pipe(operators.takeUntil(takeUntil$));
1069
1069
  }
1070
1070
  function firstNotNil(obs, opts) {
1071
- return decorateForFirst(obs, opts).pipe(operators.first(isNotNil));
1071
+ return decorateWithTakeUntil(obs.pipe(operators.first(isNotNil)), opts);
1072
1072
  }
1073
1073
  function firstTrue(obs, opts) {
1074
- return decorateForFirst(obs.pipe(operators.first(function (v) { return v === true; }), operators.map(function (_) { }) // Convert to void
1074
+ return decorateWithTakeUntil(obs.pipe(operators.first(function (v) { return v === true; }), operators.map(function (_) { }) // Convert to void
1075
1075
  ), opts);
1076
1076
  }
1077
1077
  function firstFalse(obs, opts) {
1078
- return decorateForFirst(obs, opts).pipe(operators.first(function (v) { return v === false; }), operators.map(function (_) { }) // Convert to void
1079
- );
1078
+ return decorateWithTakeUntil(obs.pipe(operators.first(function (v) { return v === false; }), operators.map(function (_) { }) // Convert to void
1079
+ ), opts);
1080
1080
  }
1081
1081
  function firstTruePromise(obs, opts) {
1082
1082
  return firstTrue(obs, Object.assign({ stopError: true }, opts)).toPromise();
@@ -20458,6 +20458,10 @@
20458
20458
  this.markForCheck();
20459
20459
  }
20460
20460
  };
20461
+ AppForm.prototype.destroyed = function () {
20462
+ var _a;
20463
+ return ((_a = this.destroySubject) === null || _a === void 0 ? void 0 : _a.closed) !== false;
20464
+ };
20461
20465
  Object.defineProperty(AppForm.prototype, "form", {
20462
20466
  get: function () {
20463
20467
  return this._form;
@@ -26965,6 +26969,10 @@
26965
26969
  enumerable: false,
26966
26970
  configurable: true
26967
26971
  });
26972
+ AppTable.prototype.destroyed = function () {
26973
+ var _a;
26974
+ return ((_a = this.destroySubject) === null || _a === void 0 ? void 0 : _a.closed) !== false;
26975
+ };
26968
26976
  AppTable.prototype.ngOnInit = function () {
26969
26977
  var _this = this;
26970
26978
  var _a;
@@ -27001,17 +27009,19 @@
27001
27009
  // Propagate row dirty state to table
27002
27010
  this.registerSubscription(this.onStartEditingRow
27003
27011
  .pipe(operators.filter(function (row) { return (row === null || row === void 0 ? void 0 : row.validator) && true; }), operators.mergeMap(function (row) { return row.validator.valueChanges
27004
- .pipe(operators.takeUntil(
27012
+ .pipe(operators.map(function () { var _a; return (_a = row.validator) === null || _a === void 0 ? void 0 : _a.dirty; }), operators.filter(function (dirty) { return dirty === true; }), operators.first(),
27013
+ // DEBUG
27014
+ //tap(() => console.debug("Propagate row's dirty to table..."))
27005
27015
  // Stop if next another row, or destroying
27006
- rxjs.combineLatest([
27016
+ operators.takeUntil(rxjs.combineLatest([
27007
27017
  _this.onStartEditingRow,
27008
27018
  _this.destroySubject
27009
- ])
27019
+ ]))
27010
27020
  // DEBUG
27011
27021
  //.pipe(
27012
27022
  // tap(() => console.debug('TODO stopping previous row listener'))
27013
27023
  //)
27014
- ), operators.map(function () { var _a; return (_a = row.validator) === null || _a === void 0 ? void 0 : _a.dirty; }), operators.filter(function (dirty) { return dirty === true; }), operators.first()); }))
27024
+ ); }))
27015
27025
  .subscribe(function () { return _this.markAsDirty(); }));
27016
27026
  // Call datasource refresh, on each refresh events
27017
27027
  this.registerSubscription(this.onRefresh
@@ -28610,6 +28620,10 @@
28610
28620
  enumerable: false,
28611
28621
  configurable: true
28612
28622
  });
28623
+ AppEditor.prototype.destroyed = function () {
28624
+ var _a;
28625
+ return ((_a = this.destroySubject) === null || _a === void 0 ? void 0 : _a.closed) !== false;
28626
+ };
28613
28627
  Object.defineProperty(AppEditor.prototype, "tables", {
28614
28628
  get: function () {
28615
28629
  return this._children && this._children.filter(function (c) { return c instanceof AppTable; });