@sumaris-net/ngx-components 1.21.0-beta6 → 1.21.0-beta9

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.
@@ -30227,9 +30227,9 @@
30227
30227
  console.debug(this._logPrefix + "Loading user events...", filter);
30228
30228
  filter = this.asFilter(filter);
30229
30229
  // Force recipient to current issuer, if not admin and not specified
30230
- if (isEmptyArray(filter.recipients) || !this.accountService.isAdmin()) {
30230
+ if (isEmptyArray(filter === null || filter === void 0 ? void 0 : filter.recipients) || !this.accountService.isAdmin()) {
30231
30231
  var recipient = this.defaultRecipient();
30232
- if (!((_a = filter.recipients) === null || _a === void 0 ? void 0 : _a.includes(recipient))) {
30232
+ if (!((_a = filter === null || filter === void 0 ? void 0 : filter.recipients) === null || _a === void 0 ? void 0 : _a.includes(recipient))) {
30233
30233
  console.warn('[user-events-service] Force user event filter.recipient=' + recipient);
30234
30234
  filter.recipients = [recipient];
30235
30235
  }
@@ -30239,7 +30239,10 @@
30239
30239
  queryName: withContent ? 'LoadAllWithContent' : 'LoadAll',
30240
30240
  query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
30241
30241
  variables: {
30242
- page: Object.assign({ sortBy: 'updateDate', sortDirection: 'desc' }, page),
30242
+ page: Object.assign(Object.assign({ sortBy: 'creationDate' }, page), {
30243
+ // @ts-ignore
30244
+ sortDirection: (page.sortDirection || 'desc').toUpperCase()
30245
+ }),
30243
30246
  filter: filter && filter.asPodObject()
30244
30247
  },
30245
30248
  arrayFieldName: 'data',
@@ -30984,15 +30987,12 @@
30984
30987
  });
30985
30988
  UserEventNotificationComponent.prototype.ngOnInit = function () {
30986
30989
  var _this = this;
30987
- var _a;
30988
30990
  if (isNil(this.userEventService)) {
30989
30991
  console.warn(this._logPrefix + "No service injected");
30990
30992
  this.disabled = true;
30991
30993
  return;
30992
30994
  }
30993
- this._subscriptions.add(this.userEventService.watchAll(0, 10, 'creationDate', "desc", {
30994
- recipients: [(_a = this.accountService.person) === null || _a === void 0 ? void 0 : _a.pubkey]
30995
- }).subscribe(function (value) {
30995
+ this._subscriptions.add(this.userEventService.watchAll(0, 10, 'creationDate', "desc").subscribe(function (value) {
30996
30996
  var data = value.data;
30997
30997
  if (_this.debug) {
30998
30998
  console.debug(_this._logPrefix + "Receiving user events", data);