@sumaris-net/ngx-components 2.0.0-rc35 → 2.0.0-rc37

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.
@@ -11180,8 +11180,8 @@ function EntityClass(opts) {
11180
11180
  throw new Error(`Class ${constructor.name} must extends <<Entity>> to be able to use @FromObject!`);
11181
11181
  }
11182
11182
  }
11183
- const typename = opts.typename || `${constructor.name}VO`;
11184
- if (opts.fromObjectReuseStrategy === 'clone') {
11183
+ const typename = opts?.typename || `${constructor.name}VO`;
11184
+ if (opts?.fromObjectReuseStrategy === 'clone') {
11185
11185
  const decoratedClass = (_a = class extends constructor {
11186
11186
  static fromObject(source, opts) {
11187
11187
  if (!source)
@@ -16563,8 +16563,8 @@ class AccountService extends BaseGraphqlService {
16563
16563
  this.onLogin = new Subject();
16564
16564
  this.onLogout = new Subject();
16565
16565
  this.onChange = new Subject();
16566
- this.onAuthTokenChange = new Subject();
16567
- this.onAuthBasicChange = new Subject();
16566
+ this.onAuthTokenChange = new BehaviorSubject(undefined);
16567
+ this.onAuthBasicChange = new BehaviorSubject(undefined);
16568
16568
  this._listenChangesSubscription = null;
16569
16569
  this._cache = {
16570
16570
  loaded: false,
@@ -25006,13 +25006,14 @@ class EntitiesTableDataSource extends TableDataSource {
25006
25006
  // Sometime, the service miss deletion, or GraphQl cache remove failed.
25007
25007
  // In this case, apply missing deletion using the super.delete() function
25008
25008
  const rowNotDeleted = this.getRows().filter(row => rows.includes(row));
25009
- const superDelete = super.delete;
25010
25009
  if (isNotEmptyArray(rowNotDeleted)) {
25010
+ const superDelete = super.delete;
25011
+ const self = this;
25011
25012
  console.warn(`[entities-table-datasource] Force deletion of ${rowNotDeleted.length} rows! Please check that data service update the cache, after deletion`);
25012
25013
  rowNotDeleted
25013
25014
  // Start at the end
25014
25015
  .sort((a, b) => a.id > b.id ? -1 : 1)
25015
- .forEach(r => superDelete(r.id));
25016
+ .forEach(r => superDelete.call(self, r.id));
25016
25017
  }
25017
25018
  }
25018
25019
  catch (err) {