@sumaris-net/ngx-components 1.23.22 → 1.23.24

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.
@@ -21026,17 +21026,21 @@
21026
21026
  this.stop();
21027
21027
  };
21028
21028
  InMemoryEntitiesService.prototype.setValue = function (data) {
21029
- if (this.dataSubject.value !== data) {
21030
- // If service already started, then update data
21031
- if (this.started) {
21029
+ // If service already started
21030
+ if (this.started) {
21031
+ // Update the data, if changed
21032
+ if (this.dataSubject.value !== data) {
21032
21033
  this._hiddenData = [];
21033
21034
  this.dataSubject.next(data);
21034
- this.markAsPristine();
21035
- }
21036
- // if service not started yet, then start it, using given data
21037
- else {
21038
- this.start(data);
21039
21035
  }
21036
+ // Reset dirty and saving state
21037
+ // (Fix ObsBio issue on samples table : still dirty after setting the same value again)
21038
+ this.markAsSaved();
21039
+ this.markAsPristine();
21040
+ }
21041
+ // If service not started yet, then start it, using given data
21042
+ else {
21043
+ this.start(data);
21040
21044
  }
21041
21045
  };
21042
21046
  InMemoryEntitiesService.prototype.loadAll = function (offset, size, sortBy, sortDirection, filter, opts) {
@@ -21286,6 +21290,16 @@
21286
21290
  });
21287
21291
  });
21288
21292
  };
21293
+ InMemoryEntitiesService.prototype.markAsDirty = function () {
21294
+ if (!this.dirtySubject.value) {
21295
+ this.dirtySubject.next(true);
21296
+ }
21297
+ };
21298
+ InMemoryEntitiesService.prototype.markAsPristine = function () {
21299
+ if (this.dirtySubject.value) {
21300
+ this.dirtySubject.next(false);
21301
+ }
21302
+ };
21289
21303
  /* -- protected methods -- */
21290
21304
  InMemoryEntitiesService.prototype.filter = function (data, _filter, hiddenData) {
21291
21305
  // if filter is DataFilter instance, use its test function
@@ -21330,16 +21344,6 @@
21330
21344
  this.savingSubject.next(false);
21331
21345
  }
21332
21346
  };
21333
- InMemoryEntitiesService.prototype.markAsDirty = function () {
21334
- if (!this.dirtySubject.value) {
21335
- this.dirtySubject.next(true);
21336
- }
21337
- };
21338
- InMemoryEntitiesService.prototype.markAsPristine = function () {
21339
- if (this.dirtySubject.value) {
21340
- this.dirtySubject.next(false);
21341
- }
21342
- };
21343
21347
  return InMemoryEntitiesService;
21344
21348
  }(StartableObservableService));
21345
21349
  InMemoryEntitiesService.decorators = [
@@ -27953,10 +27957,13 @@
27953
27957
  return (this.i18nColumnPrefix || '') + changeCaseToUnderscore(columnName).toUpperCase();
27954
27958
  };
27955
27959
  AppTable.prototype.generateTableId = function () {
27960
+ var _a;
27956
27961
  var id = this.location.path(true)
27957
27962
  .replace(/[?].*$/g, '')
27958
27963
  .replace(/\/[\d]+/g, '_id')
27959
- + '_' + this.constructor.name;
27964
+ + '_'
27965
+ // Get a component unique name - See https://stackoverflow.com/questions/60114682/how-to-access-components-unique-encapsulation-id-in-angular-9
27966
+ + (((_a = this.constructor['ɵcmp']) === null || _a === void 0 ? void 0 : _a.id) || this.constructor.name);
27960
27967
  //if (this.debug) console.debug("[table] id = " + id);
27961
27968
  return id;
27962
27969
  };