@sumaris-net/ngx-components 1.21.0-beta1 → 1.21.0-beta4
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 +61 -34
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/public_api.js +5 -2
- package/esm2015/src/app/core/menu/menu.component.js +2 -2
- package/esm2015/src/app/social/job/progression/job-progression.component.js +34 -13
- package/esm2015/src/app/social/job/progression/job-progression.list.js +2 -2
- package/esm2015/src/app/social/social.module.js +3 -2
- package/esm2015/src/app/social/user-event/notification/user-event-notification.component.js +12 -5
- package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +2 -2
- package/esm2015/src/app/social/user-event/user-event.model.js +1 -1
- package/esm2015/src/app/social/user-event/user-event.service.js +3 -5
- package/esm2015/sumaris-net.ngx-components.js +8 -11
- package/fesm2015/sumaris-net.ngx-components.js +47 -21
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +4 -1
- package/src/app/social/job/progression/job-progression.component.d.ts +12 -3
- package/src/app/social/social.module.d.ts +8 -0
- package/src/app/social/user-event/notification/user-event-notification.component.d.ts +0 -1
- package/src/app/social/user-event/user-event.model.d.ts +1 -1
- package/src/app/social/user-event/user-event.service.d.ts +1 -2
- package/src/assets/i18n/en-US.json +9 -3
- package/src/assets/i18n/en.json +9 -3
- package/src/assets/i18n/fr.json +9 -3
- package/sumaris-net.ngx-components.d.ts +7 -10
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -24749,7 +24749,7 @@
|
|
|
24749
24749
|
MenuComponent.decorators = [
|
|
24750
24750
|
{ type: i0.Component, args: [{
|
|
24751
24751
|
selector: 'app-menu',
|
|
24752
|
-
template: "<ion-split-pane #splitPane [contentId]=\"contentId\" (swiperight)=\"onSwipeRight($event)\">\n\n <ion-menu [id]=\"id\" [menuId]=\"menuId\" contentId=\"menu-content\">\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 </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\" width=\"108px;\">{{appName}}</span>\n </ion-col>\n </ion-row>\n <ion-row class=\"ion-no-padding\">\n\n <button mat-button type=\"button\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\">\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\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",
|
|
24752
|
+
template: "<ion-split-pane #splitPane [contentId]=\"contentId\" (swiperight)=\"onSwipeRight($event)\">\n\n <ion-menu [id]=\"id\" [menuId]=\"menuId\" contentId=\"menu-content\">\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 </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\" width=\"108px;\">{{appName}}</span>\n </ion-col>\n </ion-row>\n <ion-row class=\"ion-no-padding\">\n\n <button mat-button type=\"button\"\n [routerLink]=\"['/account']\"\n routerDirection=\"root\"\n routerLinkActive=\"ion-color-primary\"\n (click)=\"close()\">\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\n<!-- todo ajouter ici les 2 composants du module social -->\n\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",
|
|
24753
24753
|
animations: [fadeInAnimation],
|
|
24754
24754
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
24755
24755
|
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-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)}}"]
|
|
@@ -30172,13 +30172,12 @@
|
|
|
30172
30172
|
var UserEventServiceToken = new i0.InjectionToken('UserEventService');
|
|
30173
30173
|
var AbstractUserEventService = /** @class */ (function (_super) {
|
|
30174
30174
|
__extends(AbstractUserEventService, _super);
|
|
30175
|
-
function AbstractUserEventService(graphql, accountService, network, translate,
|
|
30175
|
+
function AbstractUserEventService(graphql, accountService, network, translate, queries, mutations, subscriptions, environment) {
|
|
30176
30176
|
var _this = _super.call(this, graphql, environment) || this;
|
|
30177
30177
|
_this.graphql = graphql;
|
|
30178
30178
|
_this.accountService = accountService;
|
|
30179
30179
|
_this.network = network;
|
|
30180
30180
|
_this.translate = translate;
|
|
30181
|
-
_this.toastController = toastController;
|
|
30182
30181
|
_this.queries = queries;
|
|
30183
30182
|
_this.mutations = mutations;
|
|
30184
30183
|
_this.subscriptions = subscriptions;
|
|
@@ -30585,7 +30584,6 @@
|
|
|
30585
30584
|
{ type: AccountService },
|
|
30586
30585
|
{ type: NetworkService },
|
|
30587
30586
|
{ type: i1$2.TranslateService },
|
|
30588
|
-
{ type: i1$5.ToastController },
|
|
30589
30587
|
{ type: undefined },
|
|
30590
30588
|
{ type: undefined },
|
|
30591
30589
|
{ type: undefined },
|
|
@@ -30602,7 +30600,7 @@
|
|
|
30602
30600
|
var UserEventService = /** @class */ (function (_super) {
|
|
30603
30601
|
__extends(UserEventService, _super);
|
|
30604
30602
|
function UserEventService(graphql, accountService, network, translate, toastController, environment) {
|
|
30605
|
-
var _this = _super.call(this, graphql, accountService, network, translate,
|
|
30603
|
+
var _this = _super.call(this, graphql, accountService, network, translate, userEventQueries, userEventMutations, undefined, environment) || this;
|
|
30606
30604
|
_this.graphql = graphql;
|
|
30607
30605
|
_this.accountService = accountService;
|
|
30608
30606
|
_this.network = network;
|
|
@@ -30949,7 +30947,7 @@
|
|
|
30949
30947
|
UserEventNotificationList.decorators = [
|
|
30950
30948
|
{ type: i0.Component, args: [{
|
|
30951
30949
|
selector: 'app-user-event-notification-list',
|
|
30952
|
-
template: "\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-row>\n\n <ion-item *ngIf=\"!(userEvents | async)?.length\">\n {{'
|
|
30950
|
+
template: "\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-row>\n\n <ion-item *ngIf=\"!(userEvents | async)?.length\">\n {{'SOCIAL.USER_EVENT.NOTIFICATION.EMPTY' | translate}}\n </ion-item>\n <ion-item\n *ngFor=\"let userEvent of userEvents | async\"\n (click)=\"read($event, userEvent)\"\n >\n\n <ion-avatar slot=\"start\">\n\n <img *ngIf=\"userEvent.avatar; else avatarIcon\" src=\"{{ userEvent.avatar }}\">\n\n <ng-template #avatarIcon>\n <app-icon\n *ngIf=\"userEvent.avatarIcon\"\n [ref]=\"userEvent.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\">\n <ion-row>\n <ion-col>\n <p [class.unread]=\"!userEvent.readDate\">\n {{userEvent.message}}\n </p>\n </ion-col>\n </ion-row>\n <ion-row *ngIf=\"userEvent.actions?.length\">\n <ion-col>\n <p>\n <span *ngFor=\"let action of userEvent.actions\">\n <a\n [style.margin-right.px]=\"8\"\n [style.cursor]=\"'pointer'\"\n (click)=\"executeAction(action, userEvent)\"\n >\n {{ '➞ ' + action.name}}\n </a>\n </span>\n </p>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <app-icon\n *ngIf=\"userEvent.icon\"\n [ref]=\"userEvent.icon\"\n height=\"16\"\n width=\"16\"\n [style.vertical-align]=\"'sub'\"\n ></app-icon>\n <small>\n <span>{{userEvent.creationDate|dateFromNow}}</span>\n <span [style.color]=\"'gray'\">{{ ' | ' + (userEvent.creationDate|dateFormat:{time:true}) }}</span>\n </small>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-item>\n\n</ion-list>\n",
|
|
30953
30951
|
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.unread{font-weight:700}"]
|
|
30954
30952
|
},] }
|
|
30955
30953
|
];
|
|
@@ -30969,7 +30967,7 @@
|
|
|
30969
30967
|
this.popoverController = popoverController;
|
|
30970
30968
|
this.cd = cd;
|
|
30971
30969
|
this.debug = false;
|
|
30972
|
-
this.titleI18n = 'SOCIAL.USER_EVENT.TITLE';
|
|
30970
|
+
this.titleI18n = 'SOCIAL.USER_EVENT.NOTIFICATION.TITLE';
|
|
30973
30971
|
this.disabled = false;
|
|
30974
30972
|
this.userEventsSubject = new rxjs.BehaviorSubject(undefined);
|
|
30975
30973
|
this._subscriptions = new rxjs.Subscription();
|
|
@@ -30978,7 +30976,8 @@
|
|
|
30978
30976
|
}
|
|
30979
30977
|
Object.defineProperty(UserEventNotificationComponent.prototype, "count", {
|
|
30980
30978
|
get: function () {
|
|
30981
|
-
|
|
30979
|
+
var _a;
|
|
30980
|
+
return (_a = this.userEventService) === null || _a === void 0 ? void 0 : _a.userEventCount.pipe(operators.map(function (value) { return value === 0 ? undefined : value; }));
|
|
30982
30981
|
},
|
|
30983
30982
|
enumerable: false,
|
|
30984
30983
|
configurable: true
|
|
@@ -30986,6 +30985,11 @@
|
|
|
30986
30985
|
UserEventNotificationComponent.prototype.ngOnInit = function () {
|
|
30987
30986
|
var _this = this;
|
|
30988
30987
|
var _a;
|
|
30988
|
+
if (isNil(this.userEventService)) {
|
|
30989
|
+
console.warn(this._logPrefix + "No service injected");
|
|
30990
|
+
this.disabled = true;
|
|
30991
|
+
return;
|
|
30992
|
+
}
|
|
30989
30993
|
this._subscriptions.add(this.userEventService.watchAll(0, 10, 'creationDate', "desc", {
|
|
30990
30994
|
recipients: [(_a = this.accountService.person) === null || _a === void 0 ? void 0 : _a.pubkey]
|
|
30991
30995
|
}).subscribe(function (value) {
|
|
@@ -31047,7 +31051,7 @@
|
|
|
31047
31051
|
},] }
|
|
31048
31052
|
];
|
|
31049
31053
|
UserEventNotificationComponent.ctorParameters = function () { return [
|
|
31050
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [UserEventServiceToken,] }] },
|
|
31054
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [UserEventServiceToken,] }] },
|
|
31051
31055
|
{ type: AccountService },
|
|
31052
31056
|
{ type: i1$5.PopoverController },
|
|
31053
31057
|
{ type: i0.ChangeDetectorRef }
|
|
@@ -31415,7 +31419,7 @@
|
|
|
31415
31419
|
JobProgressionList.decorators = [
|
|
31416
31420
|
{ type: i0.Component, args: [{
|
|
31417
31421
|
selector: 'app-job-progression-list',
|
|
31418
|
-
template: "<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-row>\n\n <ion-item *ngIf=\"!jobProgressions?.length\">\n {{'
|
|
31422
|
+
template: "<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-row>\n\n <ion-item *ngIf=\"!jobProgressions?.length\">\n {{'SOCIAL.JOB.PROGRESSION.EMPTY' | translate}}\n </ion-item>\n <ion-item *ngFor=\"let jobProgression of jobProgressions\">\n <ion-grid class=\"ion-no-margin\">\n <ion-row>\n <ion-col>\n {{jobProgression.message}}\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <ion-progress-bar\n [value]=\"jobProgression.total > 0 ? jobProgression.current / jobProgression.total : undefined\"\n [type]=\"jobProgression.total > 0 ? 'determinate' : 'indeterminate'\">\n </ion-progress-bar>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-item>\n\n</ion-list>\n",
|
|
31419
31423
|
styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]
|
|
31420
31424
|
},] }
|
|
31421
31425
|
];
|
|
@@ -31431,10 +31435,7 @@
|
|
|
31431
31435
|
this.popoverController = popoverController;
|
|
31432
31436
|
this.cd = cd;
|
|
31433
31437
|
this.debug = false;
|
|
31434
|
-
this.titleI18n = 'SOCIAL.
|
|
31435
|
-
this.autoRemove = true;
|
|
31436
|
-
this.autoHide = false;
|
|
31437
|
-
this.autoHideDelay = 1000; // millisecond
|
|
31438
|
+
this.titleI18n = 'SOCIAL.JOB.PROGRESSION.TITLE';
|
|
31438
31439
|
this.jobFinished = new i0.EventEmitter();
|
|
31439
31440
|
this.disabled = true;
|
|
31440
31441
|
this.color = 'accent';
|
|
@@ -31446,9 +31447,23 @@
|
|
|
31446
31447
|
this._logPrefix = '[job-progression] ';
|
|
31447
31448
|
}
|
|
31448
31449
|
JobProgressionComponent.prototype.ngOnInit = function () {
|
|
31450
|
+
var _a, _b, _c, _d;
|
|
31451
|
+
if (isNil(this.jobProgressionService)) {
|
|
31452
|
+
console.warn(this._logPrefix + "No service injected");
|
|
31453
|
+
}
|
|
31454
|
+
// parse options
|
|
31455
|
+
this.autoHide = toBoolean((_a = this.options) === null || _a === void 0 ? void 0 : _a.autoHide, false);
|
|
31456
|
+
this.visible = !this.autoHide;
|
|
31457
|
+
this.autoHideDelay = toNumber((_b = this.options) === null || _b === void 0 ? void 0 : _b.autoHideDelay, 1000);
|
|
31458
|
+
this.autoRemove = toBoolean((_c = this.options) === null || _c === void 0 ? void 0 : _c.autoRemove, true);
|
|
31459
|
+
this.autoRemoveDelay = toNumber((_d = this.options) === null || _d === void 0 ? void 0 : _d.autoRemoveDelay, 1000);
|
|
31449
31460
|
};
|
|
31450
31461
|
JobProgressionComponent.prototype.addJob = function (id) {
|
|
31451
31462
|
var _this = this;
|
|
31463
|
+
if (isNil(this.jobProgressionService)) {
|
|
31464
|
+
console.warn(this._logPrefix + "No service injected. Can't add a job");
|
|
31465
|
+
return;
|
|
31466
|
+
}
|
|
31452
31467
|
if (this.debug) {
|
|
31453
31468
|
console.debug(this._logPrefix + "Add job id=" + id);
|
|
31454
31469
|
}
|
|
@@ -31465,6 +31480,8 @@
|
|
|
31465
31480
|
}
|
|
31466
31481
|
return true;
|
|
31467
31482
|
}), operators.map(function (progression) {
|
|
31483
|
+
// Ensure visible
|
|
31484
|
+
_this.visible = true;
|
|
31468
31485
|
// Get current progression object
|
|
31469
31486
|
var currentProgression = _this.getProgression(id);
|
|
31470
31487
|
if (!currentProgression) {
|
|
@@ -31494,7 +31511,17 @@
|
|
|
31494
31511
|
// emit event
|
|
31495
31512
|
_this.jobFinished.emit(progression.id);
|
|
31496
31513
|
if (_this.autoRemove) {
|
|
31497
|
-
setTimeout(function () {
|
|
31514
|
+
setTimeout(function () {
|
|
31515
|
+
var _a;
|
|
31516
|
+
_this.removeJob(progression.id);
|
|
31517
|
+
// If last job
|
|
31518
|
+
if (_this.autoHide && !((_a = _this.jobProgressions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
31519
|
+
setTimeout(function () {
|
|
31520
|
+
_this.visible = false;
|
|
31521
|
+
_this.markForCheck();
|
|
31522
|
+
}, _this.autoHideDelay);
|
|
31523
|
+
}
|
|
31524
|
+
}, _this.autoRemoveDelay);
|
|
31498
31525
|
}
|
|
31499
31526
|
}
|
|
31500
31527
|
});
|
|
@@ -31543,8 +31570,8 @@
|
|
|
31543
31570
|
JobProgressionComponent.prototype.showList = function (event) {
|
|
31544
31571
|
return __awaiter(this, void 0, void 0, function () {
|
|
31545
31572
|
var popover;
|
|
31546
|
-
return __generator(this, function (
|
|
31547
|
-
switch (
|
|
31573
|
+
return __generator(this, function (_e) {
|
|
31574
|
+
switch (_e.label) {
|
|
31548
31575
|
case 0: return [4 /*yield*/, this.popoverController.create({
|
|
31549
31576
|
component: JobProgressionList,
|
|
31550
31577
|
componentProps: {
|
|
@@ -31558,10 +31585,10 @@
|
|
|
31558
31585
|
cssClass: 'popover-large'
|
|
31559
31586
|
})];
|
|
31560
31587
|
case 1:
|
|
31561
|
-
popover =
|
|
31588
|
+
popover = _e.sent();
|
|
31562
31589
|
return [4 /*yield*/, popover.present()];
|
|
31563
31590
|
case 2:
|
|
31564
|
-
|
|
31591
|
+
_e.sent();
|
|
31565
31592
|
return [2 /*return*/];
|
|
31566
31593
|
}
|
|
31567
31594
|
});
|
|
@@ -31581,22 +31608,20 @@
|
|
|
31581
31608
|
JobProgressionComponent.decorators = [
|
|
31582
31609
|
{ type: i0.Component, args: [{
|
|
31583
31610
|
selector: 'app-job-progression',
|
|
31584
|
-
template: "<button\n #button\n mat-icon-button\n [title]=\"titleI18n | translate\"\n [disabled]=\"disabled\"\n *ngIf=\"
|
|
31611
|
+
template: "<button\n #button\n mat-icon-button\n [title]=\"titleI18n | translate\"\n [disabled]=\"disabled\"\n *ngIf=\"visible\"\n (click)=\"showList($event)\"\n>\n <mat-icon\n [matBadge]=\"jobProgressions?.length\"\n [matBadgeHidden]=\"!jobProgressions?.length\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\"\n >{{ disabled || jobProgressions?.length ? 'schedule' : 'task_alt' }}\n </mat-icon>\n <mat-spinner\n #spinner\n *ngIf=\"jobProgressions?.length\"\n class=\"floating-spinner\"\n [color]=\"color\"\n [mode]=\"mode\"\n [value]=\"value\"\n diameter=\"30\"\n strokeWidth=\"3\"\n ></mat-spinner>\n</button>\n\n",
|
|
31585
31612
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
31586
31613
|
styles: [".floating-spinner{position:absolute;top:6px;left:5px}"]
|
|
31587
31614
|
},] }
|
|
31588
31615
|
];
|
|
31589
31616
|
JobProgressionComponent.ctorParameters = function () { return [
|
|
31590
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [JobProgressionServiceToken,] }] },
|
|
31617
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [JobProgressionServiceToken,] }] },
|
|
31591
31618
|
{ type: i1$5.PopoverController },
|
|
31592
31619
|
{ type: i0.ChangeDetectorRef }
|
|
31593
31620
|
]; };
|
|
31594
31621
|
JobProgressionComponent.propDecorators = {
|
|
31595
31622
|
debug: [{ type: i0.Input }],
|
|
31596
31623
|
titleI18n: [{ type: i0.Input }],
|
|
31597
|
-
|
|
31598
|
-
autoHide: [{ type: i0.Input }],
|
|
31599
|
-
autoHideDelay: [{ type: i0.Input }],
|
|
31624
|
+
options: [{ type: i0.Input }],
|
|
31600
31625
|
jobFinished: [{ type: i0.Output }]
|
|
31601
31626
|
};
|
|
31602
31627
|
|
|
@@ -31622,6 +31647,7 @@
|
|
|
31622
31647
|
},] }
|
|
31623
31648
|
];
|
|
31624
31649
|
|
|
31650
|
+
var SocialModuleOptionsToken = new i0.InjectionToken("SocialModuleOptions");
|
|
31625
31651
|
var SocialModule = /** @class */ (function () {
|
|
31626
31652
|
function SocialModule() {
|
|
31627
31653
|
}
|
|
@@ -33911,6 +33937,7 @@
|
|
|
33911
33937
|
exports.IsNotOnFieldModePipe = IsNotOnFieldModePipe;
|
|
33912
33938
|
exports.IsOnFieldModePipe = IsOnFieldModePipe;
|
|
33913
33939
|
exports.Job = Job;
|
|
33940
|
+
exports.JobModule = JobModule;
|
|
33914
33941
|
exports.JobProgressionComponent = JobProgressionComponent;
|
|
33915
33942
|
exports.JobProgressionService = JobProgressionService;
|
|
33916
33943
|
exports.JobProgressionServiceToken = JobProgressionServiceToken;
|
|
@@ -33951,6 +33978,7 @@
|
|
|
33951
33978
|
exports.MenuService = MenuService;
|
|
33952
33979
|
exports.MessageForm = MessageForm;
|
|
33953
33980
|
exports.MessageModal = MessageModal;
|
|
33981
|
+
exports.MessageModule = MessageModule;
|
|
33954
33982
|
exports.MessageService = MessageService;
|
|
33955
33983
|
exports.MessageTypeList = MessageTypeList;
|
|
33956
33984
|
exports.MessageTypes = MessageTypes;
|
|
@@ -34018,6 +34046,7 @@
|
|
|
34018
34046
|
exports.SharedValidators = SharedValidators;
|
|
34019
34047
|
exports.SocialErrorCodes = SocialErrorCodes;
|
|
34020
34048
|
exports.SocialModule = SocialModule;
|
|
34049
|
+
exports.SocialModuleOptionsToken = SocialModuleOptionsToken;
|
|
34021
34050
|
exports.StartableService = StartableService;
|
|
34022
34051
|
exports.StatusById = StatusById;
|
|
34023
34052
|
exports.StatusIds = StatusIds;
|
|
@@ -34046,6 +34075,7 @@
|
|
|
34046
34075
|
exports.UploadFileTestingPage = UploadFileTestingPage;
|
|
34047
34076
|
exports.UriUtils = UriUtils;
|
|
34048
34077
|
exports.UserEventFragments = UserEventFragments;
|
|
34078
|
+
exports.UserEventModule = UserEventModule;
|
|
34049
34079
|
exports.UserEventNotificationComponent = UserEventNotificationComponent;
|
|
34050
34080
|
exports.UserEventService = UserEventService;
|
|
34051
34081
|
exports.UserEventServiceToken = UserEventServiceToken;
|
|
@@ -34213,16 +34243,13 @@
|
|
|
34213
34243
|
exports.ɵh = LocalSettingsValidatorService;
|
|
34214
34244
|
exports.ɵi = AppUpdateOfflineModeCard;
|
|
34215
34245
|
exports.ɵj = AppIconComponent;
|
|
34216
|
-
exports.ɵk =
|
|
34217
|
-
exports.ɵl =
|
|
34218
|
-
exports.ɵm =
|
|
34219
|
-
exports.ɵn =
|
|
34220
|
-
exports.ɵo =
|
|
34221
|
-
exports.ɵp =
|
|
34222
|
-
exports.ɵq =
|
|
34223
|
-
exports.ɵr = MatBadgeIconTestPage;
|
|
34224
|
-
exports.ɵs = ToastTestingModule;
|
|
34225
|
-
exports.ɵt = ToastTestingPage;
|
|
34246
|
+
exports.ɵk = UserEventNotificationList;
|
|
34247
|
+
exports.ɵl = JobProgressionList;
|
|
34248
|
+
exports.ɵm = DateTestPage;
|
|
34249
|
+
exports.ɵn = NumpadTestPage;
|
|
34250
|
+
exports.ɵo = MatBadgeIconTestPage;
|
|
34251
|
+
exports.ɵp = ToastTestingModule;
|
|
34252
|
+
exports.ɵq = ToastTestingPage;
|
|
34226
34253
|
|
|
34227
34254
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
34228
34255
|
|