@sumaris-net/ngx-components 1.22.11-rc10 → 1.22.11-rc11

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.
@@ -28796,10 +28796,10 @@
28796
28796
  _this.savingSubject = new rxjs.BehaviorSubject(false);
28797
28797
  _this.$title = new rxjs.Subject();
28798
28798
  _this.onUpdateView = new i0.EventEmitter();
28799
- _this.environement = injector.get(ENVIRONMENT);
28799
+ _this.environment = injector.get(ENVIRONMENT);
28800
28800
  options = Object.assign({
28801
28801
  // Default options
28802
- enableListenChanges: ((_a = _this.environement.entityEditor) === null || _a === void 0 ? void 0 : _a.enableListenChanges) || false, listenIntervalInSeconds: toNumber((_b = _this.environement.entityEditor) === null || _b === void 0 ? void 0 : _b.listenIntervalInSeconds, 0), pathIdAttribute: 'id', autoLoad: true, autoUpdateRoute: true, i18nPrefix: ''
28802
+ enableListenChanges: ((_a = _this.environment.entityEditor) === null || _a === void 0 ? void 0 : _a.enableListenChanges) || false, listenIntervalInSeconds: toNumber((_b = _this.environment.entityEditor) === null || _b === void 0 ? void 0 : _b.listenIntervalInSeconds, 0), pathIdAttribute: 'id', autoLoad: true, autoUpdateRoute: true, i18nPrefix: ''
28803
28803
  }, options);
28804
28804
  _this.settings = injector.get(LocalSettingsService);
28805
28805
  _this.errorTranslator = injector.get(FormErrorTranslator);
@@ -29098,13 +29098,14 @@
29098
29098
  * Enable or disable state
29099
29099
  */
29100
29100
  AppEntityEditor.prototype.updateViewState = function (data, opts) {
29101
+ var _a;
29101
29102
  if (this.isNewData || this.canUserWrite(data)) {
29102
29103
  this.enable(opts);
29103
29104
  }
29104
29105
  else {
29105
29106
  this.disable(opts);
29106
29107
  // Allow to sort table
29107
- this.tables.forEach(function (t) { return t.enableSort(); });
29108
+ (_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
29108
29109
  }
29109
29110
  };
29110
29111
  /**
@@ -29838,13 +29839,14 @@
29838
29839
  * Enable or disable state
29839
29840
  */
29840
29841
  AppEntityEditorModal.prototype.updateViewState = function (data, opts) {
29842
+ var _a;
29841
29843
  if (this.isNewData || this.enabled) {
29842
29844
  this.enable(opts);
29843
29845
  }
29844
29846
  else {
29845
29847
  this.disable(opts);
29846
29848
  // Allow to sort table
29847
- this.tables.forEach(function (t) { return t.enableSort(); });
29849
+ (_a = this.tables) === null || _a === void 0 ? void 0 : _a.forEach(function (t) { return t.enableSort(); });
29848
29850
  }
29849
29851
  };
29850
29852
  AppEntityEditorModal.prototype.saveAndClose = function (event) {
@@ -30631,7 +30633,7 @@
30631
30633
  });
30632
30634
  });
30633
30635
  };
30634
- AbstractUserEventService.prototype.markAsRead = function (entities) {
30636
+ AbstractUserEventService.prototype.markAllAsRead = function (entities) {
30635
30637
  return __awaiter(this, void 0, void 0, function () {
30636
30638
  var userEventWithoutReadListeners, _loop_1, this_1, _b, _c, entity, e_1_1;
30637
30639
  var e_1, _d;
@@ -31126,12 +31128,12 @@
31126
31128
  // Wait service
31127
31129
  _a.sent();
31128
31130
  // Subscribe to read event
31129
- this._readEvent.subscribe(function (value) {
31131
+ this._readEvent.subscribe(function (item) {
31130
31132
  // default: mark event as read
31131
- _this.userEventService.markAsRead([value]);
31133
+ _this.userEventService.markAllAsRead([item]);
31132
31134
  });
31133
- this._readEvents.subscribe(function (value) {
31134
- _this.userEventService.markAsRead(value);
31135
+ this._readEvents.subscribe(function (items) {
31136
+ _this.userEventService.markAllAsRead(items);
31135
31137
  });
31136
31138
  return [2 /*return*/];
31137
31139
  }