@sumaris-net/ngx-components 1.22.7 → 1.22.10
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 +143 -485
- 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/doc/changelog.md +3 -0
- package/esm2015/public_api.js +1 -2
- package/esm2015/src/app/core/menu/menu.component.js +2 -2
- package/esm2015/src/app/social/social.module.js +2 -2
- package/esm2015/src/app/social/user-event/user-event.model.js +5 -1
- package/esm2015/src/app/social/user-event/user-event.module.js +2 -10
- package/esm2015/src/app/social/user-event/user-event.service.js +4 -82
- package/esm2015/sumaris-net.ngx-components.js +7 -8
- package/fesm2015/sumaris-net.ngx-components.js +130 -423
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +0 -1
- package/src/app/social/user-event/user-event.model.d.ts +2 -0
- package/src/app/social/user-event/user-event.service.d.ts +1 -13
- package/sumaris-net.ngx-components.d.ts +6 -7
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/social/user-event/user-events.table.js +0 -159
- package/src/app/social/user-event/user-events.table.d.ts +0 -58
|
@@ -24829,7 +24829,7 @@
|
|
|
24829
24829
|
MenuComponent.decorators = [
|
|
24830
24830
|
{ type: i0.Component, args: [{
|
|
24831
24831
|
selector: 'app-menu',
|
|
24832
|
-
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
|
|
24832
|
+
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 select=\"ion-router-outlet\"></ng-content>\n\n</ion-split-pane>\n\n<ng-template #headerBottomRight>\n <ng-content select=\"[headerBottomRight]\"></ng-content>\n</ng-template>\n",
|
|
24833
24833
|
animations: [fadeInAnimation],
|
|
24834
24834
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
24835
24835
|
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-primary);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-primary-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)}}"]
|
|
@@ -30234,112 +30234,6 @@
|
|
|
30234
30234
|
SUBSCRIBE_JOB_PROGRESSION_ERROR: 50010
|
|
30235
30235
|
};
|
|
30236
30236
|
|
|
30237
|
-
var UserEvent_1;
|
|
30238
|
-
var UserEventTypes = {
|
|
30239
|
-
DEBUG_DATA: 'DEBUG_DATA',
|
|
30240
|
-
INBOX_MESSAGE: 'INBOX_MESSAGE'
|
|
30241
|
-
};
|
|
30242
|
-
// @dynamic
|
|
30243
|
-
exports.UserEvent = UserEvent_1 = /** @class */ (function (_super) {
|
|
30244
|
-
__extends(UserEvent, _super);
|
|
30245
|
-
function UserEvent() {
|
|
30246
|
-
return _super.call(this, UserEvent_1.TYPENAME) || this;
|
|
30247
|
-
}
|
|
30248
|
-
UserEvent.prototype.asObject = function (opts) {
|
|
30249
|
-
var target = _super.prototype.asObject.call(this, opts);
|
|
30250
|
-
target.creationDate = toDateISOString(this.creationDate);
|
|
30251
|
-
target.readDate = toDateISOString(this.readDate);
|
|
30252
|
-
// Serialize content
|
|
30253
|
-
if (typeof target.content === 'object') {
|
|
30254
|
-
target.content = JSON.stringify(target.content);
|
|
30255
|
-
}
|
|
30256
|
-
delete target.avatar;
|
|
30257
|
-
delete target.avatarIcon;
|
|
30258
|
-
delete target.icon;
|
|
30259
|
-
delete target.actions;
|
|
30260
|
-
return target;
|
|
30261
|
-
};
|
|
30262
|
-
UserEvent.prototype.fromObject = function (source) {
|
|
30263
|
-
Object.assign(this, source); // Copy all properties
|
|
30264
|
-
_super.prototype.fromObject.call(this, source);
|
|
30265
|
-
this.creationDate = fromDateISOString(source.creationDate);
|
|
30266
|
-
this.readDate = fromDateISOString(source.readDate);
|
|
30267
|
-
try {
|
|
30268
|
-
// Deserialize content
|
|
30269
|
-
if (typeof source.content === 'string' && source.content.startsWith('{')) {
|
|
30270
|
-
this.content = JSON.parse(source.content);
|
|
30271
|
-
}
|
|
30272
|
-
// Deserialize content.context
|
|
30273
|
-
if (this.content && typeof this.content.context === 'string' && this.content.context.startsWith('{')) {
|
|
30274
|
-
this.content.context = JSON.parse(this.content.context);
|
|
30275
|
-
}
|
|
30276
|
-
}
|
|
30277
|
-
catch (err) {
|
|
30278
|
-
console.error('Error during UserEvent deserialization', err);
|
|
30279
|
-
}
|
|
30280
|
-
};
|
|
30281
|
-
return UserEvent;
|
|
30282
|
-
}(Entity));
|
|
30283
|
-
exports.UserEvent = UserEvent_1 = __decorate([
|
|
30284
|
-
EntityClass({ typename: 'UserEventVO' })
|
|
30285
|
-
], exports.UserEvent);
|
|
30286
|
-
// @dynamic
|
|
30287
|
-
exports.UserEventFilter = /** @class */ (function (_super) {
|
|
30288
|
-
__extends(UserEventFilter, _super);
|
|
30289
|
-
function UserEventFilter() {
|
|
30290
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
30291
|
-
_this.types = [];
|
|
30292
|
-
_this.levels = [];
|
|
30293
|
-
_this.issuers = [];
|
|
30294
|
-
_this.recipients = [];
|
|
30295
|
-
_this.startDate = null;
|
|
30296
|
-
_this.excludeRead = false;
|
|
30297
|
-
return _this;
|
|
30298
|
-
}
|
|
30299
|
-
UserEventFilter.prototype.fromObject = function (source, opts) {
|
|
30300
|
-
_super.prototype.fromObject.call(this, source, opts);
|
|
30301
|
-
this.types = source.types || [];
|
|
30302
|
-
this.levels = source.levels || [];
|
|
30303
|
-
this.issuers = source.issuers || [];
|
|
30304
|
-
this.recipients = source.recipients || [];
|
|
30305
|
-
this.startDate = fromDateISOString(source.startDate);
|
|
30306
|
-
this.excludeRead = source.excludeRead || false;
|
|
30307
|
-
};
|
|
30308
|
-
UserEventFilter.prototype.buildFilter = function () {
|
|
30309
|
-
var _this = this;
|
|
30310
|
-
var filterFns = _super.prototype.buildFilter.call(this);
|
|
30311
|
-
if (isNotEmptyArray(this.types)) {
|
|
30312
|
-
filterFns.push(function (t) { return _this.types.includes(t.type); });
|
|
30313
|
-
}
|
|
30314
|
-
if (isNotEmptyArray(this.levels)) {
|
|
30315
|
-
filterFns.push(function (t) { return _this.levels.includes(t.level); });
|
|
30316
|
-
}
|
|
30317
|
-
if (isNotEmptyArray(this.issuers)) {
|
|
30318
|
-
filterFns.push(function (t) { return _this.issuers.includes(t.issuer); });
|
|
30319
|
-
}
|
|
30320
|
-
if (isNotEmptyArray(this.recipients)) {
|
|
30321
|
-
filterFns.push(function (t) { return _this.recipients.includes(t.recipient); });
|
|
30322
|
-
}
|
|
30323
|
-
if (isNotNil(this.startDate)) {
|
|
30324
|
-
filterFns.push(function (t) { return _this.startDate.isSameOrBefore(t.creationDate); });
|
|
30325
|
-
}
|
|
30326
|
-
if (this.excludeRead === true) {
|
|
30327
|
-
filterFns.push(function (t) { return isNil(t.readSignature); }); // todo or t.signature ?
|
|
30328
|
-
}
|
|
30329
|
-
return filterFns;
|
|
30330
|
-
};
|
|
30331
|
-
return UserEventFilter;
|
|
30332
|
-
}(EntityFilter));
|
|
30333
|
-
exports.UserEventFilter = __decorate([
|
|
30334
|
-
EntityClass({ typename: 'UserEventFilterVO' })
|
|
30335
|
-
], exports.UserEventFilter);
|
|
30336
|
-
|
|
30337
|
-
var UserEventFragments = {
|
|
30338
|
-
userEvent: core.gql(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"], ["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"]))),
|
|
30339
|
-
lightUserEvent: core.gql(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"], ["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"])))
|
|
30340
|
-
};
|
|
30341
|
-
var templateObject_1$2, templateObject_2$2;
|
|
30342
|
-
|
|
30343
30237
|
var moment$6 = momentImported__namespace;
|
|
30344
30238
|
var USER_EVENT_SERVICE = new i0.InjectionToken('UserEventService');
|
|
30345
30239
|
var AbstractUserEventService = /** @class */ (function (_super) {
|
|
@@ -30371,31 +30265,21 @@
|
|
|
30371
30265
|
return __awaiter(this, void 0, void 0, function () {
|
|
30372
30266
|
var _this = this;
|
|
30373
30267
|
return __generator(this, function (_b) {
|
|
30374
|
-
|
|
30375
|
-
|
|
30376
|
-
|
|
30377
|
-
|
|
30378
|
-
|
|
30379
|
-
|
|
30380
|
-
|
|
30381
|
-
|
|
30382
|
-
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
|
|
30388
|
-
|
|
30389
|
-
// First attempt if account is ready
|
|
30390
|
-
return [4 /*yield*/, this.accountService.ready()];
|
|
30391
|
-
case 1:
|
|
30392
|
-
// First attempt if account is ready
|
|
30393
|
-
_b.sent();
|
|
30394
|
-
if (this.accountService.isLogin()) {
|
|
30395
|
-
setTimeout(function () { return _this.onLogin(); });
|
|
30396
|
-
}
|
|
30397
|
-
return [2 /*return*/];
|
|
30398
|
-
}
|
|
30268
|
+
// Update component when refresh is need (=login events)
|
|
30269
|
+
this._subscriptions.add(rxjs.merge(this.accountService.onLogin, this.accountService.onLogout, rxjs.of() // Starts with - first attempt if account is ready
|
|
30270
|
+
)
|
|
30271
|
+
.pipe(
|
|
30272
|
+
// Wait account service ready (can be restarted)
|
|
30273
|
+
operators.mergeMap(function () { return _this.accountService.ready(); }), operators.map(function () { return _this.accountService.isLogin(); }), operators.distinctUntilChanged())
|
|
30274
|
+
.subscribe(function (login) {
|
|
30275
|
+
if (login) {
|
|
30276
|
+
_this.onLogin();
|
|
30277
|
+
}
|
|
30278
|
+
else {
|
|
30279
|
+
_this.onLogout();
|
|
30280
|
+
}
|
|
30281
|
+
}));
|
|
30282
|
+
return [2 /*return*/];
|
|
30399
30283
|
});
|
|
30400
30284
|
});
|
|
30401
30285
|
};
|
|
@@ -30919,234 +30803,6 @@
|
|
|
30919
30803
|
{ type: i1$2.TranslateService },
|
|
30920
30804
|
{ type: undefined }
|
|
30921
30805
|
]; };
|
|
30922
|
-
var userEventQueries = {
|
|
30923
|
-
loadAll: core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n "], ["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n "])), UserEventFragments.lightUserEvent),
|
|
30924
|
-
loadAllWithContent: core.gql(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n "], ["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n "])), UserEventFragments.userEvent)
|
|
30925
|
-
};
|
|
30926
|
-
var userEventMutations = {
|
|
30927
|
-
deleteByIds: core.gql(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n "], ["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n "]))),
|
|
30928
|
-
save: core.gql(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n "], ["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n "])), UserEventFragments.userEvent)
|
|
30929
|
-
};
|
|
30930
|
-
var UserEventService = /** @class */ (function (_super) {
|
|
30931
|
-
__extends(UserEventService, _super);
|
|
30932
|
-
function UserEventService(graphql, accountService, network, translate, environment) {
|
|
30933
|
-
var _this = _super.call(this, graphql, accountService, network, translate, {
|
|
30934
|
-
queries: userEventQueries,
|
|
30935
|
-
mutations: userEventMutations,
|
|
30936
|
-
production: environment === null || environment === void 0 ? void 0 : environment.production
|
|
30937
|
-
}) || this;
|
|
30938
|
-
_this.graphql = graphql;
|
|
30939
|
-
_this.accountService = accountService;
|
|
30940
|
-
_this.network = network;
|
|
30941
|
-
_this.translate = translate;
|
|
30942
|
-
_this.environment = environment;
|
|
30943
|
-
return _this;
|
|
30944
|
-
}
|
|
30945
|
-
UserEventService.prototype.asFilter = function (filter) {
|
|
30946
|
-
return exports.UserEventFilter.fromObject(filter);
|
|
30947
|
-
};
|
|
30948
|
-
UserEventService.prototype.fromObject = function (source) {
|
|
30949
|
-
return exports.UserEvent.fromObject(source);
|
|
30950
|
-
};
|
|
30951
|
-
/* -- protected methods -- */
|
|
30952
|
-
UserEventService.prototype.fillDefaultProperties = function (entity) {
|
|
30953
|
-
entity.issuer = this.accountService.account.pubkey;
|
|
30954
|
-
// TODO: compute hash (using cryptoService)
|
|
30955
|
-
// TODO: compute sign
|
|
30956
|
-
console.warn('TODO: sign user event before sending');
|
|
30957
|
-
};
|
|
30958
|
-
return UserEventService;
|
|
30959
|
-
}(AbstractUserEventService));
|
|
30960
|
-
UserEventService.decorators = [
|
|
30961
|
-
{ type: i0.Injectable }
|
|
30962
|
-
];
|
|
30963
|
-
UserEventService.ctorParameters = function () { return [
|
|
30964
|
-
{ type: GraphqlService },
|
|
30965
|
-
{ type: AccountService },
|
|
30966
|
-
{ type: NetworkService },
|
|
30967
|
-
{ type: i1$2.TranslateService },
|
|
30968
|
-
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
30969
|
-
]; };
|
|
30970
|
-
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2;
|
|
30971
|
-
|
|
30972
|
-
var ICONS_MAP = {
|
|
30973
|
-
DEBUG_DATA: { matIcon: 'bug_report' },
|
|
30974
|
-
INBOX_MESSAGE: { matIcon: 'mail' }
|
|
30975
|
-
};
|
|
30976
|
-
// TODO: refactor with a registration done by data service:
|
|
30977
|
-
// - userEventService.registerEventAction({__typename: 'TripVO', ...})
|
|
30978
|
-
// - userEventService.getActionsFor(__typename): UserEventDetailAction
|
|
30979
|
-
/*const DETAILS_MAP: {[key: string]: UserEventAction<RootDataEntity<any>>} = {
|
|
30980
|
-
"TripVO": {
|
|
30981
|
-
icon: null,
|
|
30982
|
-
matIcon: "content_copy",
|
|
30983
|
-
action: 'copyToLocal',
|
|
30984
|
-
actionTitle: 'SOCIAL.USER_EVENT.BTN_COPY_TO_LOCAL',
|
|
30985
|
-
actionColor: 'primary',
|
|
30986
|
-
fromObject: Trip.fromObject,
|
|
30987
|
-
childrenFields: ['operation', 'landing']
|
|
30988
|
-
},
|
|
30989
|
-
"ObservedLocationVO": {
|
|
30990
|
-
icon: null,
|
|
30991
|
-
matIcon: "content_copy",
|
|
30992
|
-
action: 'copyToLocal',
|
|
30993
|
-
actionTitle: 'SOCIAL.USER_EVENT.BTN_COPY_TO_LOCAL',
|
|
30994
|
-
actionColor: 'primary',
|
|
30995
|
-
fromObject: ObservedLocation.fromObject,
|
|
30996
|
-
childrenFields: ['landings']
|
|
30997
|
-
}
|
|
30998
|
-
}*/
|
|
30999
|
-
var UserEventsTable = /** @class */ (function (_super) {
|
|
31000
|
-
__extends(UserEventsTable, _super);
|
|
31001
|
-
function UserEventsTable(injector, accountService, service, entities, cd, environment) {
|
|
31002
|
-
var _this = _super.call(this, injector,
|
|
31003
|
-
// columns
|
|
31004
|
-
RESERVED_START_COLUMNS
|
|
31005
|
-
.concat([
|
|
31006
|
-
'creationDate',
|
|
31007
|
-
'icon',
|
|
31008
|
-
'eventType',
|
|
31009
|
-
'message'
|
|
31010
|
-
])
|
|
31011
|
-
.concat(RESERVED_END_COLUMNS), null, null) || this;
|
|
31012
|
-
_this.accountService = accountService;
|
|
31013
|
-
_this.service = service;
|
|
31014
|
-
_this.entities = entities;
|
|
31015
|
-
_this.cd = cd;
|
|
31016
|
-
_this.environment = environment;
|
|
31017
|
-
_this.i18nColumnPrefix = 'SOCIAL.USER_EVENT.';
|
|
31018
|
-
_this.autoLoad = false; // this.start()
|
|
31019
|
-
_this.inlineEdition = false;
|
|
31020
|
-
_this.defaultSortBy = 'creationDate';
|
|
31021
|
-
_this.defaultSortDirection = 'desc';
|
|
31022
|
-
return _this;
|
|
31023
|
-
}
|
|
31024
|
-
UserEventsTable.prototype.ngOnInit = function () {
|
|
31025
|
-
_super.prototype.ngOnInit.call(this);
|
|
31026
|
-
// Load date/time pattern
|
|
31027
|
-
this.dateTimePattern = this.translate.instant('COMMON.DATE_TIME_PATTERN');
|
|
31028
|
-
this.withContent = toBoolean(this.withContent, false);
|
|
31029
|
-
var account = this.accountService.account;
|
|
31030
|
-
var pubkey = account && account.pubkey;
|
|
31031
|
-
this.isAdmin = this.accountService.isAdmin();
|
|
31032
|
-
this.canEdit = this.isAdmin || pubkey === this.recipient;
|
|
31033
|
-
this.canDelete = this.canEdit;
|
|
31034
|
-
this.setDatasource(new EntitiesTableDataSource(exports.UserEvent, this.service, null, {
|
|
31035
|
-
prependNewElements: false,
|
|
31036
|
-
suppressErrors: true,
|
|
31037
|
-
dataServiceOptions: {
|
|
31038
|
-
withContent: this.withContent
|
|
31039
|
-
}
|
|
31040
|
-
}));
|
|
31041
|
-
var filter = this.filter || new exports.UserEventFilter();
|
|
31042
|
-
filter.recipients = [this.recipient];
|
|
31043
|
-
this.setFilter(filter, { emitEvent: true });
|
|
31044
|
-
};
|
|
31045
|
-
UserEventsTable.prototype.start = function () {
|
|
31046
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
31047
|
-
return __generator(this, function (_a) {
|
|
31048
|
-
switch (_a.label) {
|
|
31049
|
-
case 0:
|
|
31050
|
-
console.debug('[user-event] Starting...');
|
|
31051
|
-
// Waiting account to be ready
|
|
31052
|
-
return [4 /*yield*/, this.accountService.ready()];
|
|
31053
|
-
case 1:
|
|
31054
|
-
// Waiting account to be ready
|
|
31055
|
-
_a.sent();
|
|
31056
|
-
// Load data
|
|
31057
|
-
this.onRefresh.emit();
|
|
31058
|
-
return [2 /*return*/];
|
|
31059
|
-
}
|
|
31060
|
-
});
|
|
31061
|
-
});
|
|
31062
|
-
};
|
|
31063
|
-
UserEventsTable.prototype.getIcon = function (source) {
|
|
31064
|
-
return ICONS_MAP[source.type];
|
|
31065
|
-
};
|
|
31066
|
-
UserEventsTable.prototype.getDetail = function (source) {
|
|
31067
|
-
if (!source)
|
|
31068
|
-
return undefined;
|
|
31069
|
-
if (source.content && source.type === UserEventTypes.DEBUG_DATA) {
|
|
31070
|
-
var context = source.content.context;
|
|
31071
|
-
if (context && context.__typename) {
|
|
31072
|
-
// const actions = this.service.getActionsByTypename(context.__typename);
|
|
31073
|
-
return {
|
|
31074
|
-
// actions,
|
|
31075
|
-
title: source.content.error && source.content.error.message || source.content.message,
|
|
31076
|
-
description: source.content.error && source.content.error.details || undefined
|
|
31077
|
-
};
|
|
31078
|
-
}
|
|
31079
|
-
}
|
|
31080
|
-
console.debug('TODO: implement getDetail() for event: ', source);
|
|
31081
|
-
return {};
|
|
31082
|
-
};
|
|
31083
|
-
UserEventsTable.prototype.doAction = function (action, row) {
|
|
31084
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
31085
|
-
var event, res, _a, err_1;
|
|
31086
|
-
return __generator(this, function (_b) {
|
|
31087
|
-
switch (_b.label) {
|
|
31088
|
-
case 0:
|
|
31089
|
-
event = row.currentData;
|
|
31090
|
-
// const context = event.content && event.content.context;
|
|
31091
|
-
this.markAsLoading();
|
|
31092
|
-
if (!(action && typeof action.executeAction === 'function')) return [3 /*break*/, 7];
|
|
31093
|
-
_b.label = 1;
|
|
31094
|
-
case 1:
|
|
31095
|
-
_b.trys.push([1, 5, 6, 7]);
|
|
31096
|
-
res = action.executeAction(event /*, context*/);
|
|
31097
|
-
if (!(res instanceof Promise)) return [3 /*break*/, 3];
|
|
31098
|
-
return [4 /*yield*/, res];
|
|
31099
|
-
case 2:
|
|
31100
|
-
_a = _b.sent();
|
|
31101
|
-
return [3 /*break*/, 4];
|
|
31102
|
-
case 3:
|
|
31103
|
-
_a = res;
|
|
31104
|
-
_b.label = 4;
|
|
31105
|
-
case 4:
|
|
31106
|
-
res = _a;
|
|
31107
|
-
return [3 /*break*/, 7];
|
|
31108
|
-
case 5:
|
|
31109
|
-
err_1 = _b.sent();
|
|
31110
|
-
this.setError(err_1 && err_1.message || err_1);
|
|
31111
|
-
console.error("[user-event] Failed to execute action " + action.name + ": " + (err_1 && err_1.message || err_1), err_1);
|
|
31112
|
-
return [3 /*break*/, 7];
|
|
31113
|
-
case 6:
|
|
31114
|
-
this.markAsLoaded();
|
|
31115
|
-
return [7 /*endfinally*/];
|
|
31116
|
-
case 7: return [2 /*return*/];
|
|
31117
|
-
}
|
|
31118
|
-
});
|
|
31119
|
-
});
|
|
31120
|
-
};
|
|
31121
|
-
return UserEventsTable;
|
|
31122
|
-
}(AppTable));
|
|
31123
|
-
UserEventsTable.decorators = [
|
|
31124
|
-
{ type: i0.Component, args: [{
|
|
31125
|
-
selector: 'app-user-events-table',
|
|
31126
|
-
template: "\n<!-- Type = options menu -->\n<mat-menu #optionsMenu=\"matMenu\" xPosition=\"after\">\n\n <!-- display columns -->\n <button mat-menu-item\n (click)=\"openSelectColumnsModal($event)\">\n <mat-icon>view_column</mat-icon>\n <ion-label translate>COMMON.DISPLAYED_COLUMNS_DOTS</ion-label>\n </button>\n\n</mat-menu>\n\n<!-- top header -->\n<mat-toolbar>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n\n <button mat-icon-button [title]=\"'COMMON.BTN_REFRESH'|translate\" (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n </ng-container>\n\n <!-- if row selection -->\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button class=\"hidden-xs hidden-sm\" *ngIf=\"canDelete\"\n [title]=\"'COMMON.BTN_DELETE'|translate\" (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" hidden-xs hidden-sm hidden-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_OPTIONS'|translate\"\n [matMenuTriggerFor]=\"optionsMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n</mat-toolbar>\n\n\n<mat-table [dataSource]=\"dataSource\" matSort\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <!-- select -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <!-- id -->\n <ng-container matColumnDef=\"id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header [class.cdk-visually-hidden]=\"!isAdmin\">\n <app-loading-spinner [loading]=\"loadingSubject|async\"><ion-label>#</ion-label></app-loading-spinner>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!isAdmin\">{{ row.currentData.id | mathAbs }}</mat-cell>\n </ng-container>\n\n <!-- creationDate -->\n <ng-container matColumnDef=\"creationDate\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.CREATION_DATE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ion-text>\n {{row.currentData.creationDate | dateFromNow }}<br/>\n <ion-text color=\"medium\"><small>{{row.currentData.creationDate | dateFormat: {time: true} }}</small></ion-text>\n </ion-text>\n </mat-cell>\n </ng-container>\n\n <!-- icon -->\n <ng-container matColumnDef=\"icon\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getIcon(row.currentData); let details\">\n <ion-icon slot=\"start\" *ngIf=\"details.icon\" [name]=\"details.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"details.matIcon\">{{details.matIcon}}</mat-icon>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- event type -->\n <ng-container matColumnDef=\"eventType\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.EVENT_TYPE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <span>{{'SOCIAL.USER_EVENT.TYPE_ENUM.' + row.currentData.eventType | translate}}</span>\n </mat-cell>\n </ng-container>\n\n <!-- message -->\n <ng-container matColumnDef=\"message\">\n <mat-header-cell *matHeaderCellDef>\n <ion-label translate>SOCIAL.USER_EVENT.MESSAGE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <ion-text [innerHTML]=\"details.title|translate\">\n </ion-text>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- Actions buttons column -->\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <button mat-icon-button color=\"light\"\n *ngFor=\"let action of details.actions\"\n [title]=\"action.title |translate\"\n [color]=\"action.color\"\n (click)=\"doAction(action, row)\">\n <app-icon slot=\"start\" *ngIf=\"action.iconRef\" [ref]=\"action.iconRef\"></app-icon>\n </button>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n class=\"mat-row-disabled\"\n (click)=\"clickRow($event, row)\"></mat-row>\n\n</mat-table>\n\n<ion-row class=\"ion-no-padding\">\n <ion-col></ion-col>\n <ion-col class=\"ion-no-padding\" size=\"auto\">\n <mat-paginator [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\" [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n </ion-col>\n</ion-row>\n",
|
|
31127
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
31128
|
-
providers: [
|
|
31129
|
-
{
|
|
31130
|
-
provide: USER_EVENT_SERVICE, useClass: UserEventService
|
|
31131
|
-
}
|
|
31132
|
-
],
|
|
31133
|
-
styles: [".mat-header-row .mat-column-icon,.mat-row .mat-column-icon{max-width:40px;padding-left:0}.mat-header-row .mat-column-icon ion-icon,.mat-header-row .mat-column-icon mat-icon,.mat-row .mat-column-icon ion-icon,.mat-row .mat-column-icon mat-icon{font-size:1.2em;height:1.2em;width:1.2em}.mat-header-row .mat-column-creationDate,.mat-row .mat-column-creationDate{min-width:100px;max-width:120px}"]
|
|
31134
|
-
},] }
|
|
31135
|
-
];
|
|
31136
|
-
UserEventsTable.ctorParameters = function () { return [
|
|
31137
|
-
{ type: i0.Injector },
|
|
31138
|
-
{ type: AccountService },
|
|
31139
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [USER_EVENT_SERVICE,] }] },
|
|
31140
|
-
{ type: EntitiesStorage },
|
|
31141
|
-
{ type: i0.ChangeDetectorRef },
|
|
31142
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
31143
|
-
]; };
|
|
31144
|
-
UserEventsTable.propDecorators = {
|
|
31145
|
-
recipient: [{ type: i0.Input }],
|
|
31146
|
-
withContent: [{ type: i0.Input }],
|
|
31147
|
-
defaultSortBy: [{ type: i0.Input }],
|
|
31148
|
-
defaultSortDirection: [{ type: i0.Input }]
|
|
31149
|
-
};
|
|
31150
30806
|
|
|
31151
30807
|
var UserEventNotificationList = /** @class */ (function () {
|
|
31152
30808
|
function UserEventNotificationList(cd, popoverController, userEventService) {
|
|
@@ -31331,106 +30987,6 @@
|
|
|
31331
30987
|
disabled: [{ type: i0.Input }]
|
|
31332
30988
|
};
|
|
31333
30989
|
|
|
31334
|
-
var UserEventTestService = /** @class */ (function (_super) {
|
|
31335
|
-
__extends(UserEventTestService, _super);
|
|
31336
|
-
function UserEventTestService(graphql, accountService, network, translate, environment) {
|
|
31337
|
-
var _this = _super.call(this, graphql, accountService, network, translate, {
|
|
31338
|
-
queries: {
|
|
31339
|
-
loadAll: null,
|
|
31340
|
-
loadAllWithContent: null
|
|
31341
|
-
},
|
|
31342
|
-
production: environment === null || environment === void 0 ? void 0 : environment.production
|
|
31343
|
-
}) || this;
|
|
31344
|
-
_this.graphql = graphql;
|
|
31345
|
-
_this.accountService = accountService;
|
|
31346
|
-
_this.network = network;
|
|
31347
|
-
_this.translate = translate;
|
|
31348
|
-
_this.environment = environment;
|
|
31349
|
-
_this.userEvents = [];
|
|
31350
|
-
return _this;
|
|
31351
|
-
}
|
|
31352
|
-
UserEventTestService.prototype.fromObject = function (source) {
|
|
31353
|
-
return exports.UserEvent.fromObject(source);
|
|
31354
|
-
};
|
|
31355
|
-
UserEventTestService.prototype.add = function (entity) {
|
|
31356
|
-
entity = this.processUserEvent(entity);
|
|
31357
|
-
entity.id = this.userEvents.length + 1;
|
|
31358
|
-
this.userEvents.push(entity);
|
|
31359
|
-
this.count$.next(this.userEvents.length);
|
|
31360
|
-
};
|
|
31361
|
-
UserEventTestService.prototype.asFilter = function (filter) {
|
|
31362
|
-
return filter;
|
|
31363
|
-
};
|
|
31364
|
-
UserEventTestService.prototype.count = function (filter, options) {
|
|
31365
|
-
return Promise.resolve(this.userEvents.length);
|
|
31366
|
-
};
|
|
31367
|
-
UserEventTestService.prototype.delete = function (entity) {
|
|
31368
|
-
return Promise.resolve(undefined);
|
|
31369
|
-
};
|
|
31370
|
-
UserEventTestService.prototype.deleteAll = function (data, opts) {
|
|
31371
|
-
return Promise.resolve(undefined);
|
|
31372
|
-
};
|
|
31373
|
-
UserEventTestService.prototype.listenChanges = function (filter, options) {
|
|
31374
|
-
return rxjs.of();
|
|
31375
|
-
};
|
|
31376
|
-
UserEventTestService.prototype.save = function (entity, options) {
|
|
31377
|
-
var _a;
|
|
31378
|
-
var toSave = (_a = this.userEvents) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id == (entity === null || entity === void 0 ? void 0 : entity.id); });
|
|
31379
|
-
Object.assign(toSave, entity);
|
|
31380
|
-
return entity;
|
|
31381
|
-
};
|
|
31382
|
-
UserEventTestService.prototype.saveAll = function (data, opts) {
|
|
31383
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
31384
|
-
var _b, _c, entity, e_1_1;
|
|
31385
|
-
var e_1, _d;
|
|
31386
|
-
return __generator(this, function (_e) {
|
|
31387
|
-
switch (_e.label) {
|
|
31388
|
-
case 0:
|
|
31389
|
-
_e.trys.push([0, 5, 6, 7]);
|
|
31390
|
-
_b = __values((data || [])), _c = _b.next();
|
|
31391
|
-
_e.label = 1;
|
|
31392
|
-
case 1:
|
|
31393
|
-
if (!!_c.done) return [3 /*break*/, 4];
|
|
31394
|
-
entity = _c.value;
|
|
31395
|
-
return [4 /*yield*/, this.save(entity)];
|
|
31396
|
-
case 2:
|
|
31397
|
-
_e.sent();
|
|
31398
|
-
_e.label = 3;
|
|
31399
|
-
case 3:
|
|
31400
|
-
_c = _b.next();
|
|
31401
|
-
return [3 /*break*/, 1];
|
|
31402
|
-
case 4: return [3 /*break*/, 7];
|
|
31403
|
-
case 5:
|
|
31404
|
-
e_1_1 = _e.sent();
|
|
31405
|
-
e_1 = { error: e_1_1 };
|
|
31406
|
-
return [3 /*break*/, 7];
|
|
31407
|
-
case 6:
|
|
31408
|
-
try {
|
|
31409
|
-
if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
|
|
31410
|
-
}
|
|
31411
|
-
finally { if (e_1) throw e_1.error; }
|
|
31412
|
-
return [7 /*endfinally*/];
|
|
31413
|
-
case 7: return [2 /*return*/, Promise.resolve(this.userEvents)];
|
|
31414
|
-
}
|
|
31415
|
-
});
|
|
31416
|
-
});
|
|
31417
|
-
};
|
|
31418
|
-
UserEventTestService.prototype.watchAll = function (offset, size, sortBy, sortDirection, filter, options) {
|
|
31419
|
-
return rxjs.of({ data: this.userEvents });
|
|
31420
|
-
};
|
|
31421
|
-
return UserEventTestService;
|
|
31422
|
-
}(AbstractUserEventService));
|
|
31423
|
-
UserEventTestService.decorators = [
|
|
31424
|
-
{ type: i0.Injectable }
|
|
31425
|
-
];
|
|
31426
|
-
UserEventTestService.ctorParameters = function () { return [
|
|
31427
|
-
{ type: GraphqlService },
|
|
31428
|
-
{ type: AccountService },
|
|
31429
|
-
{ type: NetworkService },
|
|
31430
|
-
{ type: i1$2.TranslateService },
|
|
31431
|
-
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
31432
|
-
]; };
|
|
31433
|
-
|
|
31434
30990
|
var UserEventModule = /** @class */ (function () {
|
|
31435
30991
|
function UserEventModule() {
|
|
31436
30992
|
}
|
|
@@ -31444,16 +31000,11 @@
|
|
|
31444
31000
|
AppIconModule
|
|
31445
31001
|
],
|
|
31446
31002
|
declarations: [
|
|
31447
|
-
UserEventsTable,
|
|
31448
31003
|
UserEventNotificationComponent,
|
|
31449
|
-
UserEventNotificationList
|
|
31004
|
+
UserEventNotificationList
|
|
31450
31005
|
],
|
|
31451
31006
|
exports: [
|
|
31452
|
-
UserEventsTable,
|
|
31453
31007
|
UserEventNotificationComponent
|
|
31454
|
-
],
|
|
31455
|
-
providers: [
|
|
31456
|
-
{ provide: USER_EVENT_SERVICE, useClass: UserEventTestService }
|
|
31457
31008
|
]
|
|
31458
31009
|
},] }
|
|
31459
31010
|
];
|
|
@@ -31742,7 +31293,7 @@
|
|
|
31742
31293
|
], exports.JobProgression);
|
|
31743
31294
|
|
|
31744
31295
|
var JobProgressionServiceToken = new i0.InjectionToken('JobProgressionService');
|
|
31745
|
-
var jobProgressionSubscription = core.gql(templateObject_1$
|
|
31296
|
+
var jobProgressionSubscription = core.gql(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["subscription UpdateJobProgression($id: Int!, $interval: Int){\n data: updateJobProgression(id: $id, interval: $interval) {\n id\n name\n message\n current\n total\n }\n}"], ["subscription UpdateJobProgression($id: Int!, $interval: Int){\n data: updateJobProgression(id: $id, interval: $interval) {\n id\n name\n message\n current\n total\n }\n}"])));
|
|
31746
31297
|
var JobProgressionService = /** @class */ (function (_super) {
|
|
31747
31298
|
__extends(JobProgressionService, _super);
|
|
31748
31299
|
function JobProgressionService(graphql, environment) {
|
|
@@ -31782,7 +31333,7 @@
|
|
|
31782
31333
|
{ type: GraphqlService },
|
|
31783
31334
|
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
31784
31335
|
]; };
|
|
31785
|
-
var templateObject_1$
|
|
31336
|
+
var templateObject_1$2;
|
|
31786
31337
|
|
|
31787
31338
|
var JobProgressionList = /** @class */ (function () {
|
|
31788
31339
|
function JobProgressionList() {
|
|
@@ -32050,13 +31601,123 @@
|
|
|
32050
31601
|
SharedModule,
|
|
32051
31602
|
UserEventModule,
|
|
32052
31603
|
JobModule,
|
|
32053
|
-
MessageModule
|
|
31604
|
+
MessageModule
|
|
32054
31605
|
],
|
|
32055
31606
|
},] }
|
|
32056
31607
|
];
|
|
32057
31608
|
|
|
31609
|
+
var UserEvent_1;
|
|
31610
|
+
var UserEventTypes = {
|
|
31611
|
+
DEBUG_DATA: 'DEBUG_DATA',
|
|
31612
|
+
INBOX_MESSAGE: 'INBOX_MESSAGE'
|
|
31613
|
+
};
|
|
31614
|
+
// @dynamic
|
|
31615
|
+
exports.UserEvent = UserEvent_1 = /** @class */ (function (_super) {
|
|
31616
|
+
__extends(UserEvent, _super);
|
|
31617
|
+
function UserEvent() {
|
|
31618
|
+
return _super.call(this, UserEvent_1.TYPENAME) || this;
|
|
31619
|
+
}
|
|
31620
|
+
UserEvent.prototype.asObject = function (opts) {
|
|
31621
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
31622
|
+
target.creationDate = toDateISOString(this.creationDate);
|
|
31623
|
+
target.readDate = toDateISOString(this.readDate);
|
|
31624
|
+
// Serialize content
|
|
31625
|
+
if (typeof target.content === 'object') {
|
|
31626
|
+
target.content = JSON.stringify(target.content);
|
|
31627
|
+
}
|
|
31628
|
+
delete target.avatar;
|
|
31629
|
+
delete target.avatarIcon;
|
|
31630
|
+
delete target.icon;
|
|
31631
|
+
delete target.actions;
|
|
31632
|
+
return target;
|
|
31633
|
+
};
|
|
31634
|
+
UserEvent.prototype.fromObject = function (source) {
|
|
31635
|
+
Object.assign(this, source); // Copy all properties
|
|
31636
|
+
_super.prototype.fromObject.call(this, source);
|
|
31637
|
+
this.creationDate = fromDateISOString(source.creationDate);
|
|
31638
|
+
this.readDate = fromDateISOString(source.readDate);
|
|
31639
|
+
try {
|
|
31640
|
+
// Deserialize content
|
|
31641
|
+
if (typeof source.content === 'string' && source.content.startsWith('{')) {
|
|
31642
|
+
this.content = JSON.parse(source.content);
|
|
31643
|
+
}
|
|
31644
|
+
// Deserialize content.context
|
|
31645
|
+
if (this.content && typeof this.content.context === 'string' && this.content.context.startsWith('{')) {
|
|
31646
|
+
this.content.context = JSON.parse(this.content.context);
|
|
31647
|
+
}
|
|
31648
|
+
}
|
|
31649
|
+
catch (err) {
|
|
31650
|
+
console.error('Error during UserEvent deserialization', err);
|
|
31651
|
+
}
|
|
31652
|
+
};
|
|
31653
|
+
return UserEvent;
|
|
31654
|
+
}(Entity));
|
|
31655
|
+
exports.UserEvent = UserEvent_1 = __decorate([
|
|
31656
|
+
EntityClass({ typename: 'UserEventVO' })
|
|
31657
|
+
], exports.UserEvent);
|
|
31658
|
+
// @dynamic
|
|
31659
|
+
exports.UserEventFilter = /** @class */ (function (_super) {
|
|
31660
|
+
__extends(UserEventFilter, _super);
|
|
31661
|
+
function UserEventFilter() {
|
|
31662
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
31663
|
+
_this.types = [];
|
|
31664
|
+
_this.levels = [];
|
|
31665
|
+
_this.issuers = [];
|
|
31666
|
+
_this.recipients = [];
|
|
31667
|
+
_this.startDate = null;
|
|
31668
|
+
_this.excludeRead = false;
|
|
31669
|
+
return _this;
|
|
31670
|
+
}
|
|
31671
|
+
UserEventFilter.prototype.fromObject = function (source, opts) {
|
|
31672
|
+
_super.prototype.fromObject.call(this, source, opts);
|
|
31673
|
+
this.types = source.types || [];
|
|
31674
|
+
this.levels = source.levels || [];
|
|
31675
|
+
this.issuers = source.issuers || [];
|
|
31676
|
+
this.recipients = source.recipients || [];
|
|
31677
|
+
this.startDate = fromDateISOString(source.startDate);
|
|
31678
|
+
this.excludeRead = source.excludeRead || false;
|
|
31679
|
+
};
|
|
31680
|
+
UserEventFilter.prototype.buildFilter = function () {
|
|
31681
|
+
var _this = this;
|
|
31682
|
+
var filterFns = _super.prototype.buildFilter.call(this);
|
|
31683
|
+
if (isNotEmptyArray(this.types)) {
|
|
31684
|
+
filterFns.push(function (t) { return _this.types.includes(t.type); });
|
|
31685
|
+
}
|
|
31686
|
+
if (isNotEmptyArray(this.levels)) {
|
|
31687
|
+
filterFns.push(function (t) { return _this.levels.includes(t.level); });
|
|
31688
|
+
}
|
|
31689
|
+
if (isNotEmptyArray(this.issuers)) {
|
|
31690
|
+
filterFns.push(function (t) { return _this.issuers.includes(t.issuer); });
|
|
31691
|
+
}
|
|
31692
|
+
if (isNotEmptyArray(this.recipients)) {
|
|
31693
|
+
filterFns.push(function (t) { return _this.recipients.includes(t.recipient); });
|
|
31694
|
+
}
|
|
31695
|
+
if (isNotNil(this.startDate)) {
|
|
31696
|
+
filterFns.push(function (t) { return _this.startDate.isSameOrBefore(t.creationDate); });
|
|
31697
|
+
}
|
|
31698
|
+
if (this.excludeRead === true) {
|
|
31699
|
+
filterFns.push(function (t) { return isNil(t.readSignature); }); // todo or t.signature ?
|
|
31700
|
+
}
|
|
31701
|
+
return filterFns;
|
|
31702
|
+
};
|
|
31703
|
+
UserEventFilter.prototype.asObject = function (opts) {
|
|
31704
|
+
var target = _super.prototype.asObject.call(this, opts);
|
|
31705
|
+
return target;
|
|
31706
|
+
};
|
|
31707
|
+
return UserEventFilter;
|
|
31708
|
+
}(EntityFilter));
|
|
31709
|
+
exports.UserEventFilter = __decorate([
|
|
31710
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
31711
|
+
], exports.UserEventFilter);
|
|
31712
|
+
|
|
31713
|
+
var UserEventFragments = {
|
|
31714
|
+
userEvent: core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"], ["fragment UserEventFragment on UserEventVO {\n id\n issuer\n updateDate\n creationDate\n eventType\n recipient\n content\n hash\n signature\n readSignature\n __typename\n }"]))),
|
|
31715
|
+
lightUserEvent: core.gql(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"], ["fragment LightUserEventFragment on UserEventVO {\n id\n issuer\n recipient\n updateDate\n creationDate\n eventType\n readSignature\n __typename\n }"])))
|
|
31716
|
+
};
|
|
31717
|
+
var templateObject_1$3, templateObject_2$2;
|
|
31718
|
+
|
|
32058
31719
|
var Mutations = {
|
|
32059
|
-
send: core.gql(templateObject_1$
|
|
31720
|
+
send: core.gql(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"], ["mutation SendMessage($data: MessageVOInput){\n done: sendMessage(message: $data)\n }"])))
|
|
32060
31721
|
};
|
|
32061
31722
|
var MessageService = /** @class */ (function (_super) {
|
|
32062
31723
|
__extends(MessageService, _super);
|
|
@@ -32140,7 +31801,7 @@
|
|
|
32140
31801
|
{ type: i1$5.ToastController },
|
|
32141
31802
|
{ type: Environment, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [ENVIRONMENT,] }] }
|
|
32142
31803
|
]; };
|
|
32143
|
-
var templateObject_1$
|
|
31804
|
+
var templateObject_1$4;
|
|
32144
31805
|
|
|
32145
31806
|
var PersonFilter_1;
|
|
32146
31807
|
// @dynamic
|
|
@@ -32199,15 +31860,15 @@
|
|
|
32199
31860
|
], exports.PersonFilter);
|
|
32200
31861
|
|
|
32201
31862
|
var PersonFragments = {
|
|
32202
|
-
person: core.gql(templateObject_1$
|
|
31863
|
+
person: core.gql(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"], ["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"])))
|
|
32203
31864
|
};
|
|
32204
31865
|
// Load persons query
|
|
32205
31866
|
var PersonQueries = {
|
|
32206
|
-
loadAll: core.gql(templateObject_2$
|
|
32207
|
-
loadAllWithTotal: core.gql(templateObject_3$
|
|
31867
|
+
loadAll: core.gql(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""], ["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
31868
|
+
loadAllWithTotal: core.gql(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""], ["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""])), PersonFragments.person)
|
|
32208
31869
|
};
|
|
32209
31870
|
var PersonMutations = {
|
|
32210
|
-
saveAll: core.gql(templateObject_4$
|
|
31871
|
+
saveAll: core.gql(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""], ["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
|
|
32211
31872
|
deleteAll: core.gql(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"], ["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"])))
|
|
32212
31873
|
};
|
|
32213
31874
|
var PersonService = /** @class */ (function (_super_1) {
|
|
@@ -32339,7 +32000,7 @@
|
|
|
32339
32000
|
{ type: NetworkService },
|
|
32340
32001
|
{ type: EntitiesStorage }
|
|
32341
32002
|
]; };
|
|
32342
|
-
var templateObject_1$
|
|
32003
|
+
var templateObject_1$5, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$2;
|
|
32343
32004
|
|
|
32344
32005
|
var PersonValidatorService = /** @class */ (function () {
|
|
32345
32006
|
function PersonValidatorService(formBuilder, accountValidatorService) {
|
|
@@ -34473,9 +34134,7 @@
|
|
|
34473
34134
|
exports.UserEventFragments = UserEventFragments;
|
|
34474
34135
|
exports.UserEventModule = UserEventModule;
|
|
34475
34136
|
exports.UserEventNotificationComponent = UserEventNotificationComponent;
|
|
34476
|
-
exports.UserEventService = UserEventService;
|
|
34477
34137
|
exports.UserEventTypes = UserEventTypes;
|
|
34478
|
-
exports.UserEventsTable = UserEventsTable;
|
|
34479
34138
|
exports.UsersPage = UsersPage;
|
|
34480
34139
|
exports.accountToString = accountToString;
|
|
34481
34140
|
exports.adaptValueToControl = adaptValueToControl;
|
|
@@ -34639,13 +34298,12 @@
|
|
|
34639
34298
|
exports.ɵh = LocalSettingsValidatorService;
|
|
34640
34299
|
exports.ɵi = AppUpdateOfflineModeCard;
|
|
34641
34300
|
exports.ɵj = UserEventNotificationList;
|
|
34642
|
-
exports.ɵk =
|
|
34643
|
-
exports.ɵl =
|
|
34644
|
-
exports.ɵm =
|
|
34645
|
-
exports.ɵn =
|
|
34646
|
-
exports.ɵo =
|
|
34647
|
-
exports.ɵp =
|
|
34648
|
-
exports.ɵq = ToastTestingPage;
|
|
34301
|
+
exports.ɵk = JobProgressionList;
|
|
34302
|
+
exports.ɵl = DateTestPage;
|
|
34303
|
+
exports.ɵm = NumpadTestPage;
|
|
34304
|
+
exports.ɵn = MatBadgeIconTestPage;
|
|
34305
|
+
exports.ɵo = ToastTestingModule;
|
|
34306
|
+
exports.ɵp = ToastTestingPage;
|
|
34649
34307
|
|
|
34650
34308
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
34651
34309
|
|