@sumaris-net/ngx-components 1.22.11-rc11 → 1.22.11-rc12
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.
- package/bundles/sumaris-net.ngx-components.umd.js +146 -77
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/admin/users/list/users.js +2 -3
- package/esm2015/src/app/core/menu/menu.component.js +1 -1
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +3 -3
- package/esm2015/src/app/social/user-event/testing/user-event.testing.service.js +10 -8
- package/esm2015/src/app/social/user-event/user-event.model.js +1 -1
- package/esm2015/src/app/social/user-event/user-event.module.js +4 -2
- package/esm2015/src/app/social/user-event/user-event.service.js +41 -32
- package/fesm2015/sumaris-net.ngx-components.js +54 -43
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/admin/users/list/users.d.ts +0 -2
- package/src/app/social/user-event/testing/user-event.testing.service.d.ts +1 -1
- package/src/app/social/user-event/user-event.model.d.ts +1 -0
- package/src/app/social/user-event/user-event.service.d.ts +3 -3
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -24837,7 +24837,7 @@
|
|
|
24837
24837
|
template: "<ion-split-pane #splitPane [contentId]=\"contentId\" (swiperight)=\"onSwipeRight($event)\">\n\n <ion-menu [id]=\"id\" [menuId]=\"menuId\" [contentId]=\"contentId\">\n <ion-header>\n\n <ion-toolbar @fadeInAnimation *ngIf=\"isLogin; else notLogin\" class=\"ion-toolbar-top\">\n <ion-grid>\n <ion-row>\n <ion-col size=\"4\">\n <button type=\"button\" mat-flat-button\n class=\"user-avatar\" [class.primary]=\"!accountAvatar\"\n [style.background-image]=\"'url('+(accountAvatar||'./assets/img/person.png')+')'\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\"\n [title]=\"'MENU.BTN_MY_ACCOUNT'|translate\">\n </button>\n </ion-col>\n <ion-col size=\"8\" class=\"user-logo\">\n <img *ngIf=\"logo\" src=\"{{logo}}\" [title]=\"'APP_NAME'|translate: {appName: appName}\" width=\"108px\"/>\n <span *ngIf=\"!logo\" style=\"width: 108px;\">{{appName}}</span>\n </ion-col>\n </ion-row>\n <ion-row class=\"ion-no-padding\">\n <ion-col>\n <button mat-button type=\"button\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\"\n [title]=\"'MENU.BTN_MY_ACCOUNT'|translate\">\n <ion-label color=\"primary\" class=\"ion-text-wrap ion-text-start\">\n <h3 class=\"no-margin username\">\n <b>{{accountName}}</b>\n </h3>\n <h4>{{accountEmail}}</h4>\n </ion-label>\n </button>\n </ion-col>\n\n <!-- Insertion headerBottomRight -->\n <ion-col size=\"auto\">\n <ng-container *ngTemplateOutlet=\"headerBottomRight\"></ng-container>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-toolbar>\n\n <!-- User not logged -->\n <ng-template #notLogin>\n <mat-toolbar class=\"ion-padding\" @fadeInAnimation\n style=\"height: unset; display: block; margin: auto; text-align: center;\">\n <img *ngIf=\"logo\" src=\"{{logo}}\" [title]=\"'APP_NAME'|translate: {appName: appName}\" width=\"150px;\">\n <span *ngIf=\"!logo\" style=\"width: 150px\">{{appName}}</span>\n </mat-toolbar>\n </ng-template>\n </ion-header>\n\n <ion-content [class.has-user-header]=\"isLogin\">\n\n <ion-list lines=\"none\">\n <ion-menu-toggle auto-hide=\"false\"\n [class.flex-spacer]=\"item.cssClass == 'flex-spacer'\"\n *ngFor=\"let item of $items | async\">\n\n <!-- link -->\n <ion-item *ngIf=\"!loading && item.path\"\n @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}} text-1x\"\n tappable\n [routerLink]=\"item.path\"\n routerDirection=\"root\"\n routerLinkActive=\"selected\"\n [routerLinkActiveOptions]=\"{exact: (item.path === '/')}\">\n <ion-icon slot=\"start\" *ngIf=\"item.icon\" [name]=\"item.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"item.matIcon\">{{item.matIcon}}</mat-icon>\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item>\n\n <!-- action -->\n <ion-item *ngIf=\"!loading && item.action\"\n @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}} text-1x\"\n tappable\n (click)=\"doAction(item.action, $event)\">\n <ion-icon slot=\"start\" *ngIf=\"item.icon\" [name]=\"item.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"item.matIcon\">{{item.matIcon}}</mat-icon>\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item>\n\n <!-- divider -->\n <ion-item-divider @fadeInAnimation\n class=\"{{item.cssClass}} {{item.color}}\"\n *ngIf=\"!loading && !item.path && !item.action\">\n <ion-label translate>{{item.title}}</ion-label>\n </ion-item-divider>\n\n </ion-menu-toggle>\n </ion-list>\n </ion-content>\n\n <ion-footer class=\"hidden-xs hidden-sm\">\n <ion-toolbar>\n\n <ion-buttons slot=\"start\">\n <ion-button mat-icon-button color=\"accent\" (click)=\"openAboutModal($event)\">\n <mat-icon slot=\"icon-only\">help_outline</mat-icon>\n </ion-button>\n </ion-buttons>\n\n <ion-title (click)=\"openAboutModal($event)\" color=\"medium\">\n {{'MENU.FOOTER_VERSION_ABOUT'| translate: {version: appVersion} }}\n </ion-title>\n\n <ion-buttons slot=\"end\">\n <button mat-icon-button color=\"accent\" (click)=\"toggleSplitPaneShow($event)\"\n class=\"hidden-xs hidden-sm hidden-md\"\n [title]=\"(splitPane.when ? 'COMMON.BTN_HIDE_MENU' : 'COMMON.BTN_SHOW_MENU') |translate\">\n <mat-icon><span>{{splitPane.when ? '«' : '»'}}</span></mat-icon>\n </button>\n </ion-buttons>\n </ion-toolbar>\n </ion-footer>\n\n </ion-menu>\n\n <ng-content></ng-content>\n\n</ion-split-pane>\n\n<ng-template #headerBottomRight>\n <ng-content select=\"[headerBottomRight]\"></ng-content>\n</ng-template>\n",
|
|
24838
24838
|
animations: [fadeInAnimation],
|
|
24839
24839
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
24840
|
-
styles: ["ion-menu{--ion-item-background:transparent;--ion-item-divider-background:transparent;--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint);--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-text-color-selected:var(--ion-color-primary);--ion-item-icon-color-selected:var(--ion-color-primary);--ion-item-text-color-disable:var(--ion-color-medium);--ion-item-icon-color-disable:var(--ion-color-medium)}ion-menu ion-header ion-text{color:var(--ion-color-primary)}ion-menu ion-header .user-avatar{background-size:cover;background-repeat:no-repeat;background-position:50%;background-color:var(--ion-color-secondary);border:1px solid var(--ion-color-
|
|
24840
|
+
styles: ["ion-menu{--ion-item-background:transparent;--ion-item-divider-background:transparent;--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint);--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-text-color-selected:var(--ion-color-primary);--ion-item-icon-color-selected:var(--ion-color-primary);--ion-item-text-color-disable:var(--ion-color-medium);--ion-item-icon-color-disable:var(--ion-color-medium)}ion-menu ion-header ion-text{color:var(--ion-color-primary)}ion-menu ion-header .user-avatar{background-size:cover;background-repeat:no-repeat;background-position:50%;background-color:var(--ion-color-secondary);border:1px solid rgba(var(--ion-color-secondary-rgb),.5);overflow:hidden!important;font-size:var(--avatar-size,60px)!important;line-height:var(--avatar-size,60px);height:var(--avatar-size,60px)!important;width:var(--avatar-size,60px)!important;border-radius:50%;display:inline-block}ion-menu ion-header .user-avatar:hover{background-color:var(--ion-color-secondary-shade);border:2px solid var(--ion-color-secondary-shade)}ion-menu ion-header .user-logo{text-align:right}ion-menu ion-header .user-logo img{max-width:120px;max-height:var(--avatar-size,60px);width:auto}ion-menu ion-header .username{padding-top:0;margin-top:0;margin-bottom:0;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}ion-menu ion-header button[mat-button]{padding:0;text-align:start!important;width:100%}ion-menu .scroll-content{margin-top:79px!important}ion-menu .has-user-header .scroll-content{margin-top:188px!important}ion-menu ion-content.has-profile-header{--offset-top:188px}ion-menu ion-content.no-profile-header{--offset-top:79px}ion-menu ion-content ion-list{min-height:100%;display:flex;flex-direction:column;justify-content:flex-start}ion-menu ion-content ion-list ion-menu-toggle.flex-spacer{flex:1 1 auto;display:flex;flex-direction:column;justify-content:flex-end}ion-menu ion-content ion-list ion-item.primary{--ion-item-icon-color:var(--ion-color-primary-tint);--ion-item-text-color:var(--ion-color-primary-tint)}ion-menu ion-content ion-list ion-item.secondary{--ion-item-icon-color:var(--ion-color-secondary-tint);--ion-item-text-color:var(--ion-color-secondary-tint)}ion-menu ion-content ion-list ion-item.tertiary{--ion-item-icon-color:var(--ion-color-tertiary-tint);--ion-item-text-color:var(--ion-color-tertiary-tint)}ion-menu ion-content ion-list ion-item.danger{--ion-item-icon-color:var(--ion-color-danger-tint);--ion-item-text-color:var(--ion-color-danger-tint)}ion-menu ion-content ion-list ion-item.medium{--ion-item-icon-color:var(--ion-color-medium-shade);--ion-item-text-color:var(--ion-color-medium-shade)}ion-menu ion-content ion-list ion-item.dark{--ion-item-icon-color:var(--ion-color-dark-tint);--ion-item-text-color:var(--ion-color-dark-tint)}ion-menu ion-content ion-list ion-item ion-icon,ion-menu ion-content ion-list ion-item mat-icon{color:var(--ion-item-icon-color)!important;fill:currentColor;stroke:currentColor}ion-menu ion-content ion-list ion-item ion-label,ion-menu ion-content ion-list ion-item ion-text{color:var(--ion-item-text-color)!important}ion-menu ion-content ion-list ion-item.selected{background-color:var(--ion-item-background-selected)!important;--color-hover:var(--ion-item-background-selected)!important}ion-menu ion-content ion-list ion-item.selected ion-icon,ion-menu ion-content ion-list ion-item.selected mat-icon{color:var(--ion-item-icon-color-selected)!important;fill:currentColor;stroke:currentColor}ion-menu ion-content ion-list ion-item.selected ion-label,ion-menu ion-content ion-list ion-item.selected ion-text{color:var(--ion-item-text-color-selected)!important}ion-menu ion-content ion-list ion-item.selected:hover{--color-hover:var(--ion-item-background-selected)!important;--ion-item-icon-color-selected:var(--ion-item-icon-color)!important;--ion-item-text-color-selected:var(--ion-item-text-color)!important}ion-menu ion-footer{display:block!important}ion-menu ion-footer ion-toolbar ion-title{cursor:pointer;font-size:12pt;font-weight:400;text-align:center;padding:0 8px}ion-menu ion-footer ion-toolbar ion-button{--width:40px}@media screen and (max-width:767px){ion-menu ion-footer{display:none!important;visibility:hidden!important}}@media screen and (min-width:768px){ion-menu ion-scroll{overflow-y:auto!important}ion-menu .user-avatar{font-size:var(--avatar-size,80px)!important;line-height:var(--avatar-size,80px);height:var(--avatar-size,80px)!important;width:var(--avatar-size,80px)!important}ion-menu .user-logo img{max-height:var(--avatar-size,80px)}}"]
|
|
24841
24841
|
},] }
|
|
24842
24842
|
];
|
|
24843
24843
|
MenuComponent.ctorParameters = function () { return [
|
|
@@ -30329,27 +30329,35 @@
|
|
|
30329
30329
|
fetchPolicy: (opts === null || opts === void 0 ? void 0 : opts.fetchPolicy) || 'cache-first',
|
|
30330
30330
|
insertFilterFn: filter && filter.asFilterFn()
|
|
30331
30331
|
})
|
|
30332
|
-
.pipe(operators.
|
|
30333
|
-
var data
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30347
|
-
|
|
30348
|
-
|
|
30332
|
+
.pipe(operators.mergeMap(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
30333
|
+
var data, result, nextOffset_1;
|
|
30334
|
+
var _this = this;
|
|
30335
|
+
return __generator(this, function (_b) {
|
|
30336
|
+
switch (_b.label) {
|
|
30337
|
+
case 0: return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30338
|
+
case 1:
|
|
30339
|
+
data = _b.sent();
|
|
30340
|
+
if (now) {
|
|
30341
|
+
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30342
|
+
now = null;
|
|
30343
|
+
}
|
|
30344
|
+
// Must re-order because of listenAllChanges result will add new event at the end
|
|
30345
|
+
data = EntityUtils.sort(data, page.sortBy, page.sortDirection);
|
|
30346
|
+
result = {
|
|
30347
|
+
data: data,
|
|
30348
|
+
total: toNumber(res === null || res === void 0 ? void 0 : res.total, data.length)
|
|
30349
|
+
};
|
|
30350
|
+
// Add fetch more capability, if total was fetched
|
|
30351
|
+
if (isNotNil(res.total)) {
|
|
30352
|
+
nextOffset_1 = (page.offset || 0) + data.length;
|
|
30353
|
+
if (nextOffset_1 < result.total) {
|
|
30354
|
+
result.fetchMore = function (_) { return _this.loadPage(Object.assign(Object.assign({}, page), { offset: nextOffset_1 }), filter, Object.assign(Object.assign({}, opts), { fetchPolicy: 'no-cache' })); };
|
|
30355
|
+
}
|
|
30356
|
+
}
|
|
30357
|
+
return [2 /*return*/, result];
|
|
30349
30358
|
}
|
|
30350
|
-
}
|
|
30351
|
-
|
|
30352
|
-
}));
|
|
30359
|
+
});
|
|
30360
|
+
}); }));
|
|
30353
30361
|
};
|
|
30354
30362
|
AbstractUserEventService.prototype.loadPage = function (page, filter, opts) {
|
|
30355
30363
|
var _a;
|
|
@@ -30387,7 +30395,9 @@
|
|
|
30387
30395
|
})];
|
|
30388
30396
|
case 1:
|
|
30389
30397
|
res = _b.sent();
|
|
30390
|
-
|
|
30398
|
+
return [4 /*yield*/, Promise.all(((res === null || res === void 0 ? void 0 : res.data) || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30399
|
+
case 2:
|
|
30400
|
+
data = _b.sent();
|
|
30391
30401
|
if (now)
|
|
30392
30402
|
console.debug("" + this._logPrefix + data.length + " user events loaded in " + (Date.now() - now) + "ms");
|
|
30393
30403
|
// Must re-order because of listenAllChanges result will add new event at the end
|
|
@@ -30409,16 +30419,28 @@
|
|
|
30409
30419
|
});
|
|
30410
30420
|
};
|
|
30411
30421
|
AbstractUserEventService.prototype.add = function (entity) {
|
|
30412
|
-
|
|
30413
|
-
|
|
30414
|
-
|
|
30415
|
-
|
|
30416
|
-
|
|
30417
|
-
|
|
30418
|
-
|
|
30422
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30423
|
+
var withContent;
|
|
30424
|
+
return __generator(this, function (_b) {
|
|
30425
|
+
switch (_b.label) {
|
|
30426
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
30427
|
+
case 1:
|
|
30428
|
+
// TODO set an id !!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30429
|
+
entity = _b.sent();
|
|
30430
|
+
if (!entity)
|
|
30431
|
+
return [2 /*return*/]; // Rejected
|
|
30432
|
+
withContent = !!entity.content;
|
|
30433
|
+
// Add user event locally
|
|
30434
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30435
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30436
|
+
data: entity
|
|
30437
|
+
});
|
|
30438
|
+
// Update count
|
|
30439
|
+
this._countSubject.next(this._countSubject.value + 1);
|
|
30440
|
+
return [2 /*return*/];
|
|
30441
|
+
}
|
|
30442
|
+
});
|
|
30419
30443
|
});
|
|
30420
|
-
// Update count
|
|
30421
|
-
this._countSubject.next(this._countSubject.value + 1);
|
|
30422
30444
|
};
|
|
30423
30445
|
AbstractUserEventService.prototype.count = function (filter, options) {
|
|
30424
30446
|
var _a;
|
|
@@ -30506,17 +30528,28 @@
|
|
|
30506
30528
|
code: SocialErrorCodes.SUBSCRIBE_USER_EVENTS_ERROR,
|
|
30507
30529
|
message: 'SOCIAL.ERROR.SUBSCRIBE_USER_EVENTS_ERROR'
|
|
30508
30530
|
}
|
|
30509
|
-
}).pipe(operators.
|
|
30531
|
+
}).pipe(operators.mergeMap(function (_b) {
|
|
30510
30532
|
var data = _b.data;
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30516
|
-
|
|
30517
|
-
|
|
30518
|
-
|
|
30519
|
-
|
|
30533
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
30534
|
+
var updatedData;
|
|
30535
|
+
var _this = this;
|
|
30536
|
+
return __generator(this, function (_b) {
|
|
30537
|
+
switch (_b.label) {
|
|
30538
|
+
case 0:
|
|
30539
|
+
if (data && this._debug)
|
|
30540
|
+
console.debug(this._logPrefix + "Received new user events:", data);
|
|
30541
|
+
return [4 /*yield*/, Promise.all((data || []).map(function (value) { return _this.processUserEvent(value, _this); }))];
|
|
30542
|
+
case 1:
|
|
30543
|
+
updatedData = _b.sent();
|
|
30544
|
+
// Update cache
|
|
30545
|
+
this.insertIntoMutableCachedQueries(this.graphql.cache, {
|
|
30546
|
+
query: withContent ? this.queries.loadAllWithContent : this.queries.loadAll,
|
|
30547
|
+
data: updatedData
|
|
30548
|
+
});
|
|
30549
|
+
return [2 /*return*/, updatedData];
|
|
30550
|
+
}
|
|
30551
|
+
});
|
|
30552
|
+
});
|
|
30520
30553
|
}));
|
|
30521
30554
|
};
|
|
30522
30555
|
AbstractUserEventService.prototype.delete = function (entity) {
|
|
@@ -30766,33 +30799,60 @@
|
|
|
30766
30799
|
this._listenSubscription = undefined;
|
|
30767
30800
|
};
|
|
30768
30801
|
AbstractUserEventService.prototype.processUserEvent = function (source, that) {
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30783
|
-
|
|
30784
|
-
|
|
30802
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
30803
|
+
var target, listeners, listeners_1, listeners_1_1, listener, res, _b, e_3_1;
|
|
30804
|
+
var e_3, _c;
|
|
30805
|
+
return __generator(this, function (_d) {
|
|
30806
|
+
switch (_d.label) {
|
|
30807
|
+
case 0:
|
|
30808
|
+
that = that || this;
|
|
30809
|
+
target = that.fromObject(source);
|
|
30810
|
+
listeners = (that.listeners || [])
|
|
30811
|
+
.filter(function (listener) { return !!listener.onReceived; })
|
|
30812
|
+
.filter(function (listener) { return listener.accept(target); });
|
|
30813
|
+
_d.label = 1;
|
|
30814
|
+
case 1:
|
|
30815
|
+
_d.trys.push([1, 9, 10, 11]);
|
|
30816
|
+
listeners_1 = __values(listeners), listeners_1_1 = listeners_1.next();
|
|
30817
|
+
_d.label = 2;
|
|
30818
|
+
case 2:
|
|
30819
|
+
if (!!listeners_1_1.done) return [3 /*break*/, 8];
|
|
30820
|
+
listener = listeners_1_1.value;
|
|
30821
|
+
if (!target) return [3 /*break*/, 6];
|
|
30822
|
+
res = listener.onReceived(target);
|
|
30823
|
+
if (!(res instanceof Promise)) return [3 /*break*/, 4];
|
|
30824
|
+
return [4 /*yield*/, res];
|
|
30825
|
+
case 3:
|
|
30826
|
+
_b = _d.sent();
|
|
30827
|
+
return [3 /*break*/, 5];
|
|
30828
|
+
case 4:
|
|
30829
|
+
_b = res;
|
|
30830
|
+
_d.label = 5;
|
|
30831
|
+
case 5:
|
|
30832
|
+
target = _b;
|
|
30833
|
+
return [3 /*break*/, 7];
|
|
30834
|
+
case 6:
|
|
30835
|
+
if (that._debug)
|
|
30836
|
+
console.debug(that._logPrefix + "Event has been rejected by a listener", source);
|
|
30837
|
+
return [3 /*break*/, 8];
|
|
30838
|
+
case 7:
|
|
30839
|
+
listeners_1_1 = listeners_1.next();
|
|
30840
|
+
return [3 /*break*/, 2];
|
|
30841
|
+
case 8: return [3 /*break*/, 11];
|
|
30842
|
+
case 9:
|
|
30843
|
+
e_3_1 = _d.sent();
|
|
30844
|
+
e_3 = { error: e_3_1 };
|
|
30845
|
+
return [3 /*break*/, 11];
|
|
30846
|
+
case 10:
|
|
30847
|
+
try {
|
|
30848
|
+
if (listeners_1_1 && !listeners_1_1.done && (_c = listeners_1.return)) _c.call(listeners_1);
|
|
30849
|
+
}
|
|
30850
|
+
finally { if (e_3) throw e_3.error; }
|
|
30851
|
+
return [7 /*endfinally*/];
|
|
30852
|
+
case 11: return [2 /*return*/, target];
|
|
30785
30853
|
}
|
|
30786
|
-
}
|
|
30787
|
-
}
|
|
30788
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
30789
|
-
finally {
|
|
30790
|
-
try {
|
|
30791
|
-
if (listeners_1_1 && !listeners_1_1.done && (_b = listeners_1.return)) _b.call(listeners_1);
|
|
30792
|
-
}
|
|
30793
|
-
finally { if (e_3) throw e_3.error; }
|
|
30794
|
-
}
|
|
30795
|
-
return target;
|
|
30854
|
+
});
|
|
30855
|
+
});
|
|
30796
30856
|
};
|
|
30797
30857
|
AbstractUserEventService.prototype.defaultMarkAsRead = function (userEvents) {
|
|
30798
30858
|
var _a;
|
|
@@ -31061,9 +31121,9 @@
|
|
|
31061
31121
|
UserEventNotificationList.decorators = [
|
|
31062
31122
|
{ type: i0.Component, args: [{
|
|
31063
31123
|
selector: 'app-user-event-notification-list',
|
|
31064
|
-
template: "<ion-content>\n <ion-list class=\"ion-list-popover\">\n\n <ion-row class=\"ion-list-header column\">\n <ion-col>\n <ion-label>{{titleI18n | translate}}</ion-label>\n </ion-col>\n <ion-col class=\"top-action\" *ngIf=\"$items|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"markAllAsRead($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item\n *ngFor=\"let item of $items | async; last as last\"\n [lines]=\"last ? 'none' : undefined\"\n [class.unread]=\"!item.readDate\"\n [class.tappable]=\"item.actions|arrayFilter:isDefaultAction|isNotEmptyArray\"\n (click)=\"click($event, item)\">\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"item.avatar; else avatarIcon\" src=\"{{ item.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"item.avatarIcon\"\n [ref]=\"item.avatarIcon\"\n height=\"40\"\n width=\"40\"\n ></app-icon>\n </ng-template>\n\n </ion-avatar>\n\n <ion-grid class=\"ion-no-margin ion-no-padding message\">\n <ion-row>\n <ion-col size=\"12\">\n <p [class.unread]=\"!item.readDate\" [innerHTML]=\"item.message\"></p>\n </ion-col>\n </ion-row>\n\n <!-- date -->\n <ion-row>\n <ion-col size=\"12\">\n <app-icon\n *ngIf=\"item.icon\"\n [ref]=\"item.icon\"\n height=\"16\"\n width=\"16\"\n style=\"vertical-align: sub; margin-right: 3px\"\n ></app-icon>\n <small>\n <span>{{item.creationDate|dateFromNow}}</span>\n <span style=\"color: gray\">{{ ' | ' + (item.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n\n <!-- actions -->\n <ion-row *ngIf=\"item.actions|isNotEmptyArray\">\n <ion-col></ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngFor=\"let action of item.actions\">\n <a *ngIf=\"!action.default\" class=\"action\" (click)=\"executeAction($event, action, item)\" [title]=\"(action.title || action.name) |translate\">\n <app-icon *ngIf=\"action.iconRef\" slot=\"start\" height=\"20\" width=\"20\" [ref]=\"action.iconRef\"></app-icon>\n <span>{{ action.name | translate }}</span>\n </a>\n </ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <mat-icon slot=\"end\" *ngIf=\"item.actions|arrayFilter: isDefaultAction|isNotEmptyArray\">chevron_right</mat-icon>\n </ion-item>\n\n <!-- loading -->\n <ion-item *ngIf=\"!($items|async); else noResult\" lines=\"none\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </ion-item>\n\n <!-- no result -->\n <ng-template #noResult>\n <ion-item *ngIf=\"$items|async|isEmptyArray\" lines=\"none\">\n <ion-text color=\"dark\" class=\"text-italic\">{{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}</ion-text>\n </ion-item>\n </ng-template>\n\n <!-- Loading more spinner -->\n <ion-item *ngIf=\"canFetchMore\" (ngInit)=\"_initInfiniteScroll()\" lines=\"none\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </ion-item>\n\n <!-- footer -->\n <ion-row *ngIf=\"$itemCount|async; let count\"\n class=\"ion-list-footer column\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </ion-list>\n</ion-content>\n",
|
|
31124
|
+
template: "<ion-content>\n <ion-list class=\"ion-list-popover\">\n\n <ion-row class=\"ion-list-header column\">\n <ion-col>\n <ion-label>{{titleI18n | translate}}</ion-label>\n </ion-col>\n <ion-col class=\"top-action\" *ngIf=\"$items|async|isNotEmptyArray\">\n <ion-text color=\"primary\">\n <a (click)=\"markAllAsRead($event)\">{{'SOCIAL.USER_EVENT.NOTIFICATION.READ_ALL' | translate}}</a>\n </ion-text>\n </ion-col>\n </ion-row>\n\n <ion-item\n *ngFor=\"let item of $items | async; last as last\"\n [lines]=\"last ? 'none' : undefined\"\n [class.unread]=\"!item.readDate\"\n [class.tappable]=\"item.actions|arrayFilter:isDefaultAction|isNotEmptyArray\"\n (click)=\"click($event, item)\">\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"item.avatar; else avatarIcon\" src=\"{{ item.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"item.avatarIcon; else generateIcon\"\n [ref]=\"item.avatarIcon\"\n height=\"40\"\n width=\"40\"\n ></app-icon>\n </ng-template>\n\n <ng-template #generateIcon>\n <div class=\"avatar\" *ngIf=\"item.avatarJdenticon\">\n <svg width=\"40\" width=\"40\" [data-jdenticon-value]=\"item.avatarJdenticon\"></svg>\n </div>\n </ng-template>\n\n </ion-avatar>\n\n <ion-grid class=\"ion-no-margin ion-no-padding message\">\n <ion-row>\n <ion-col size=\"12\">\n <p [class.unread]=\"!item.readDate\" [innerHTML]=\"item.message\"></p>\n </ion-col>\n </ion-row>\n\n <!-- date -->\n <ion-row>\n <ion-col size=\"12\">\n <app-icon\n *ngIf=\"item.icon\"\n [ref]=\"item.icon\"\n height=\"16\"\n width=\"16\"\n style=\"vertical-align: sub; margin-right: 3px\"\n ></app-icon>\n <small>\n <span>{{item.creationDate|dateFromNow}}</span>\n <span style=\"color: gray\">{{ ' | ' + (item.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n\n <!-- actions -->\n <ion-row *ngIf=\"item.actions|isNotEmptyArray\">\n <ion-col></ion-col>\n <ion-col size=\"auto\">\n <ng-container *ngFor=\"let action of item.actions\">\n <a *ngIf=\"!action.default\" class=\"action\" (click)=\"executeAction($event, action, item)\" [title]=\"(action.title || action.name) |translate\">\n <app-icon *ngIf=\"action.iconRef\" slot=\"start\" height=\"20\" width=\"20\" [ref]=\"action.iconRef\"></app-icon>\n <span>{{ action.name | translate }}</span>\n </a>\n </ng-container>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <mat-icon slot=\"end\" *ngIf=\"item.actions|arrayFilter: isDefaultAction|isNotEmptyArray\">chevron_right</mat-icon>\n </ion-item>\n\n <!-- loading -->\n <ion-item *ngIf=\"!($items|async); else noResult\" lines=\"none\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </ion-item>\n\n <!-- no result -->\n <ng-template #noResult>\n <ion-item *ngIf=\"$items|async|isEmptyArray\" lines=\"none\">\n <ion-text color=\"dark\" class=\"text-italic\">{{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}</ion-text>\n </ion-item>\n </ng-template>\n\n <!-- Loading more spinner -->\n <ion-item *ngIf=\"canFetchMore\" (ngInit)=\"_initInfiniteScroll()\" lines=\"none\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </ion-item>\n\n <!-- footer -->\n <ion-row *ngIf=\"$itemCount|async; let count\"\n class=\"ion-list-footer column\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </ion-list>\n</ion-content>\n",
|
|
31065
31125
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
31066
|
-
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-height:calc(90vh - 20px)}ion-list ion-item.tappable{cursor:pointer}ion-list ion-item.tappable:hover{--ion-item-background:var(--ion-item-background-color-hover)}.message{font-size:.9em}.message p{margin-top:5px;margin-bottom:5px}.message p.unread{font-weight:700}.top-action{text-align:end;margin-right:8px}.top-action a{cursor:pointer;color:var(--ion-color-contrast)}.top-action a:hover{text-decoration:underline}a.action{font-size:.9em;margin-right:10px;cursor:pointer}a.action:hover span{text-decoration:underline}a.action app-icon{vertical-align:middle}"]
|
|
31126
|
+
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-height:calc(90vh - 20px)}ion-list ion-item.tappable{cursor:pointer}ion-list ion-item.tappable:hover{--ion-item-background:var(--ion-item-background-color-hover)}.message{font-size:.9em}.message p{margin-top:5px;margin-bottom:5px}.message p.unread{font-weight:700}.top-action{text-align:end;margin-right:8px}.top-action a{cursor:pointer;color:var(--ion-color-contrast)}.top-action a:hover{text-decoration:underline}a.action{font-size:.9em;margin-right:10px;cursor:pointer}a.action:hover span{text-decoration:underline}a.action app-icon{vertical-align:middle}ion-avatar .avatar svg,ion-avatar img{border:1px solid rgba(var(--ion-color-secondary-rgb,.5));border-radius:50%}"]
|
|
31067
31127
|
},] }
|
|
31068
31128
|
];
|
|
31069
31129
|
UserEventNotificationList.ctorParameters = function () { return [
|
|
@@ -31208,7 +31268,8 @@
|
|
|
31208
31268
|
imports: [
|
|
31209
31269
|
i1$4.CommonModule,
|
|
31210
31270
|
SharedModule,
|
|
31211
|
-
AppIconModule
|
|
31271
|
+
AppIconModule,
|
|
31272
|
+
ngxJdenticon.NgxJdenticonModule
|
|
31212
31273
|
],
|
|
31213
31274
|
declarations: [
|
|
31214
31275
|
AppUserEventNotificationIcon,
|
|
@@ -32282,7 +32343,6 @@
|
|
|
32282
32343
|
_this.statusById = StatusById;
|
|
32283
32344
|
_this.filterCriteriaCount = 0;
|
|
32284
32345
|
_this.useSticky = false;
|
|
32285
|
-
_this.referentialToString = referentialToString;
|
|
32286
32346
|
_this.canEdit = accountService.isAdmin();
|
|
32287
32347
|
_this.canSendMessage = _this.canEdit;
|
|
32288
32348
|
_this.inlineEdition = _this.canEdit;
|
|
@@ -34177,12 +34237,21 @@
|
|
|
34177
34237
|
return exports.UserEvent.fromObject(source);
|
|
34178
34238
|
};
|
|
34179
34239
|
UserEventTestService.prototype.add = function (entity) {
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34184
|
-
|
|
34185
|
-
|
|
34240
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
34241
|
+
return __generator(this, function (_b) {
|
|
34242
|
+
switch (_b.label) {
|
|
34243
|
+
case 0: return [4 /*yield*/, this.processUserEvent(entity)];
|
|
34244
|
+
case 1:
|
|
34245
|
+
entity = _b.sent();
|
|
34246
|
+
entity.id = this.userEvents.length + 1;
|
|
34247
|
+
this.userEvents = __spread([
|
|
34248
|
+
entity
|
|
34249
|
+
], this.userEvents);
|
|
34250
|
+
this._countSubject.next((this._countSubject.value || 0) + 1);
|
|
34251
|
+
return [2 /*return*/];
|
|
34252
|
+
}
|
|
34253
|
+
});
|
|
34254
|
+
});
|
|
34186
34255
|
};
|
|
34187
34256
|
UserEventTestService.prototype.asFilter = function (filter) {
|
|
34188
34257
|
return filter;
|