@sumaris-net/ngx-components 1.21.0-beta1 → 1.21.0-beta2

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.
Files changed (25) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +66 -30
  2. package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
  3. package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
  4. package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
  5. package/esm2015/public_api.js +5 -2
  6. package/esm2015/src/app/core/menu/menu.component.js +9 -2
  7. package/esm2015/src/app/social/job/progression/job-progression.component.js +34 -13
  8. package/esm2015/src/app/social/job/progression/job-progression.list.js +2 -2
  9. package/esm2015/src/app/social/social.module.js +3 -2
  10. package/esm2015/src/app/social/user-event/notification/user-event-notification.component.js +12 -5
  11. package/esm2015/src/app/social/user-event/notification/user-event-notification.list.js +2 -2
  12. package/esm2015/src/app/social/user-event/user-event.service.js +1 -1
  13. package/esm2015/sumaris-net.ngx-components.js +8 -11
  14. package/fesm2015/sumaris-net.ngx-components.js +52 -17
  15. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  16. package/package.json +1 -1
  17. package/public_api.d.ts +4 -1
  18. package/src/app/social/job/progression/job-progression.component.d.ts +12 -3
  19. package/src/app/social/social.module.d.ts +8 -0
  20. package/src/app/social/user-event/notification/user-event-notification.component.d.ts +0 -1
  21. package/src/assets/i18n/en-US.json +9 -3
  22. package/src/assets/i18n/en.json +9 -3
  23. package/src/assets/i18n/fr.json +9 -3
  24. package/sumaris-net.ngx-components.d.ts +7 -10
  25. package/sumaris-net.ngx-components.metadata.json +1 -1
@@ -24386,6 +24386,9 @@
24386
24386
  this._subscription = new rxjs.Subscription();
24387
24387
  this.loading = true;
24388
24388
  this.isLogin = false;
24389
+ // showUserEventNotification: boolean;
24390
+ // showJobProgression: boolean;
24391
+ // jobProgressionOptions: JobProgressionOptions;
24389
24392
  this.$items = new rxjs.BehaviorSubject(undefined);
24390
24393
  this.id = 'menu';
24391
24394
  this.menuId = 'left';
@@ -24410,6 +24413,10 @@
24410
24413
  case 2:
24411
24414
  // Wait platform started
24412
24415
  _b.sent();
24416
+ // Init social options
24417
+ // this.showUserEventNotification = toBoolean(this.socialModuleOptions?.showUserEventNotification, false);
24418
+ // this.showJobProgression = toBoolean(this.socialModuleOptions?.showJobProgression, false);
24419
+ // this.jobProgressionOptions = this.socialModuleOptions?.jobProgressionOptions;
24413
24420
  // Listen to menu service event
24414
24421
  this.menuService.splitPaneWhen
24415
24422
  .subscribe(function (value) { return _this.setSplitPaneWhen(value); });
@@ -24749,7 +24756,7 @@
24749
24756
  MenuComponent.decorators = [
24750
24757
  { type: i0.Component, args: [{
24751
24758
  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 ? '&#xab;' : '&#xbb;'}}</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",
24759
+ 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 ? '&#xab;' : '&#xbb;'}}</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
24760
  animations: [fadeInAnimation],
24754
24761
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
24755
24762
  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)}}"]
@@ -30949,7 +30956,7 @@
30949
30956
  UserEventNotificationList.decorators = [
30950
30957
  { type: i0.Component, args: [{
30951
30958
  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 {{'COMMON.NO_RESULT' | 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 {{ '&#10142;&nbsp;' + 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",
30959
+ 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 {{ '&#10142;&nbsp;' + 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
30960
  styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.unread{font-weight:700}"]
30954
30961
  },] }
30955
30962
  ];
@@ -30969,7 +30976,7 @@
30969
30976
  this.popoverController = popoverController;
30970
30977
  this.cd = cd;
30971
30978
  this.debug = false;
30972
- this.titleI18n = 'SOCIAL.USER_EVENT.TITLE';
30979
+ this.titleI18n = 'SOCIAL.USER_EVENT.NOTIFICATION.TITLE';
30973
30980
  this.disabled = false;
30974
30981
  this.userEventsSubject = new rxjs.BehaviorSubject(undefined);
30975
30982
  this._subscriptions = new rxjs.Subscription();
@@ -30978,7 +30985,8 @@
30978
30985
  }
30979
30986
  Object.defineProperty(UserEventNotificationComponent.prototype, "count", {
30980
30987
  get: function () {
30981
- return this.userEventService.userEventCount.pipe(operators.map(function (value) { return value === 0 ? undefined : value; }));
30988
+ var _a;
30989
+ return (_a = this.userEventService) === null || _a === void 0 ? void 0 : _a.userEventCount.pipe(operators.map(function (value) { return value === 0 ? undefined : value; }));
30982
30990
  },
30983
30991
  enumerable: false,
30984
30992
  configurable: true
@@ -30986,6 +30994,11 @@
30986
30994
  UserEventNotificationComponent.prototype.ngOnInit = function () {
30987
30995
  var _this = this;
30988
30996
  var _a;
30997
+ if (isNil(this.userEventService)) {
30998
+ console.warn(this._logPrefix + "No service injected");
30999
+ this.disabled = true;
31000
+ return;
31001
+ }
30989
31002
  this._subscriptions.add(this.userEventService.watchAll(0, 10, 'creationDate', "desc", {
30990
31003
  recipients: [(_a = this.accountService.person) === null || _a === void 0 ? void 0 : _a.pubkey]
30991
31004
  }).subscribe(function (value) {
@@ -31047,7 +31060,7 @@
31047
31060
  },] }
31048
31061
  ];
31049
31062
  UserEventNotificationComponent.ctorParameters = function () { return [
31050
- { type: undefined, decorators: [{ type: i0.Inject, args: [UserEventServiceToken,] }] },
31063
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [UserEventServiceToken,] }] },
31051
31064
  { type: AccountService },
31052
31065
  { type: i1$5.PopoverController },
31053
31066
  { type: i0.ChangeDetectorRef }
@@ -31415,7 +31428,7 @@
31415
31428
  JobProgressionList.decorators = [
31416
31429
  { type: i0.Component, args: [{
31417
31430
  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 {{'COMMON.NO_RESULT' | 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",
31431
+ 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
31432
  styles: [":host(.popover-viewport){overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]
31420
31433
  },] }
31421
31434
  ];
@@ -31431,10 +31444,7 @@
31431
31444
  this.popoverController = popoverController;
31432
31445
  this.cd = cd;
31433
31446
  this.debug = false;
31434
- this.titleI18n = 'SOCIAL.JOB_PROGRESSION.TITLE';
31435
- this.autoRemove = true;
31436
- this.autoHide = false;
31437
- this.autoHideDelay = 1000; // millisecond
31447
+ this.titleI18n = 'SOCIAL.JOB.PROGRESSION.TITLE';
31438
31448
  this.jobFinished = new i0.EventEmitter();
31439
31449
  this.disabled = true;
31440
31450
  this.color = 'accent';
@@ -31446,9 +31456,23 @@
31446
31456
  this._logPrefix = '[job-progression] ';
31447
31457
  }
31448
31458
  JobProgressionComponent.prototype.ngOnInit = function () {
31459
+ var _a, _b, _c, _d;
31460
+ if (isNil(this.jobProgressionService)) {
31461
+ console.warn(this._logPrefix + "No service injected");
31462
+ }
31463
+ // parse options
31464
+ this.autoHide = toBoolean((_a = this.options) === null || _a === void 0 ? void 0 : _a.autoHide, false);
31465
+ this.visible = !this.autoHide;
31466
+ this.autoHideDelay = toNumber((_b = this.options) === null || _b === void 0 ? void 0 : _b.autoHideDelay, 1000);
31467
+ this.autoRemove = toBoolean((_c = this.options) === null || _c === void 0 ? void 0 : _c.autoRemove, true);
31468
+ this.autoRemoveDelay = toNumber((_d = this.options) === null || _d === void 0 ? void 0 : _d.autoRemoveDelay, 1000);
31449
31469
  };
31450
31470
  JobProgressionComponent.prototype.addJob = function (id) {
31451
31471
  var _this = this;
31472
+ if (isNil(this.jobProgressionService)) {
31473
+ console.warn(this._logPrefix + "No service injected. Can't add a job");
31474
+ return;
31475
+ }
31452
31476
  if (this.debug) {
31453
31477
  console.debug(this._logPrefix + "Add job id=" + id);
31454
31478
  }
@@ -31465,6 +31489,8 @@
31465
31489
  }
31466
31490
  return true;
31467
31491
  }), operators.map(function (progression) {
31492
+ // Ensure visible
31493
+ _this.visible = true;
31468
31494
  // Get current progression object
31469
31495
  var currentProgression = _this.getProgression(id);
31470
31496
  if (!currentProgression) {
@@ -31494,7 +31520,17 @@
31494
31520
  // emit event
31495
31521
  _this.jobFinished.emit(progression.id);
31496
31522
  if (_this.autoRemove) {
31497
- setTimeout(function () { return _this.removeJob(progression.id); }, 1000);
31523
+ setTimeout(function () {
31524
+ var _a;
31525
+ _this.removeJob(progression.id);
31526
+ // If last job
31527
+ if (_this.autoHide && !((_a = _this.jobProgressions) === null || _a === void 0 ? void 0 : _a.length)) {
31528
+ setTimeout(function () {
31529
+ _this.visible = false;
31530
+ _this.markForCheck();
31531
+ }, _this.autoHideDelay);
31532
+ }
31533
+ }, _this.autoRemoveDelay);
31498
31534
  }
31499
31535
  }
31500
31536
  });
@@ -31543,8 +31579,8 @@
31543
31579
  JobProgressionComponent.prototype.showList = function (event) {
31544
31580
  return __awaiter(this, void 0, void 0, function () {
31545
31581
  var popover;
31546
- return __generator(this, function (_a) {
31547
- switch (_a.label) {
31582
+ return __generator(this, function (_e) {
31583
+ switch (_e.label) {
31548
31584
  case 0: return [4 /*yield*/, this.popoverController.create({
31549
31585
  component: JobProgressionList,
31550
31586
  componentProps: {
@@ -31558,10 +31594,10 @@
31558
31594
  cssClass: 'popover-large'
31559
31595
  })];
31560
31596
  case 1:
31561
- popover = _a.sent();
31597
+ popover = _e.sent();
31562
31598
  return [4 /*yield*/, popover.present()];
31563
31599
  case 2:
31564
- _a.sent();
31600
+ _e.sent();
31565
31601
  return [2 /*return*/];
31566
31602
  }
31567
31603
  });
@@ -31581,22 +31617,20 @@
31581
31617
  JobProgressionComponent.decorators = [
31582
31618
  { type: i0.Component, args: [{
31583
31619
  selector: 'app-job-progression',
31584
- template: "<button\n #button\n mat-icon-button\n [title]=\"titleI18n | translate\"\n [disabled]=\"disabled\"\n *ngIf=\"!autoHide || jobProgressions?.length\"\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",
31620
+ 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
31621
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
31586
31622
  styles: [".floating-spinner{position:absolute;top:6px;left:5px}"]
31587
31623
  },] }
31588
31624
  ];
31589
31625
  JobProgressionComponent.ctorParameters = function () { return [
31590
- { type: undefined, decorators: [{ type: i0.Inject, args: [JobProgressionServiceToken,] }] },
31626
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [JobProgressionServiceToken,] }] },
31591
31627
  { type: i1$5.PopoverController },
31592
31628
  { type: i0.ChangeDetectorRef }
31593
31629
  ]; };
31594
31630
  JobProgressionComponent.propDecorators = {
31595
31631
  debug: [{ type: i0.Input }],
31596
31632
  titleI18n: [{ type: i0.Input }],
31597
- autoRemove: [{ type: i0.Input }],
31598
- autoHide: [{ type: i0.Input }],
31599
- autoHideDelay: [{ type: i0.Input }],
31633
+ options: [{ type: i0.Input }],
31600
31634
  jobFinished: [{ type: i0.Output }]
31601
31635
  };
31602
31636
 
@@ -31622,6 +31656,7 @@
31622
31656
  },] }
31623
31657
  ];
31624
31658
 
31659
+ var SocialModuleOptionsToken = new i0.InjectionToken("SocialModuleOptions");
31625
31660
  var SocialModule = /** @class */ (function () {
31626
31661
  function SocialModule() {
31627
31662
  }
@@ -33911,6 +33946,7 @@
33911
33946
  exports.IsNotOnFieldModePipe = IsNotOnFieldModePipe;
33912
33947
  exports.IsOnFieldModePipe = IsOnFieldModePipe;
33913
33948
  exports.Job = Job;
33949
+ exports.JobModule = JobModule;
33914
33950
  exports.JobProgressionComponent = JobProgressionComponent;
33915
33951
  exports.JobProgressionService = JobProgressionService;
33916
33952
  exports.JobProgressionServiceToken = JobProgressionServiceToken;
@@ -33951,6 +33987,7 @@
33951
33987
  exports.MenuService = MenuService;
33952
33988
  exports.MessageForm = MessageForm;
33953
33989
  exports.MessageModal = MessageModal;
33990
+ exports.MessageModule = MessageModule;
33954
33991
  exports.MessageService = MessageService;
33955
33992
  exports.MessageTypeList = MessageTypeList;
33956
33993
  exports.MessageTypes = MessageTypes;
@@ -34018,6 +34055,7 @@
34018
34055
  exports.SharedValidators = SharedValidators;
34019
34056
  exports.SocialErrorCodes = SocialErrorCodes;
34020
34057
  exports.SocialModule = SocialModule;
34058
+ exports.SocialModuleOptionsToken = SocialModuleOptionsToken;
34021
34059
  exports.StartableService = StartableService;
34022
34060
  exports.StatusById = StatusById;
34023
34061
  exports.StatusIds = StatusIds;
@@ -34046,6 +34084,7 @@
34046
34084
  exports.UploadFileTestingPage = UploadFileTestingPage;
34047
34085
  exports.UriUtils = UriUtils;
34048
34086
  exports.UserEventFragments = UserEventFragments;
34087
+ exports.UserEventModule = UserEventModule;
34049
34088
  exports.UserEventNotificationComponent = UserEventNotificationComponent;
34050
34089
  exports.UserEventService = UserEventService;
34051
34090
  exports.UserEventServiceToken = UserEventServiceToken;
@@ -34213,16 +34252,13 @@
34213
34252
  exports.ɵh = LocalSettingsValidatorService;
34214
34253
  exports.ɵi = AppUpdateOfflineModeCard;
34215
34254
  exports.ɵj = AppIconComponent;
34216
- exports.ɵk = UserEventModule;
34217
- exports.ɵl = UserEventNotificationList;
34218
- exports.ɵm = JobModule;
34219
- exports.ɵn = JobProgressionList;
34220
- exports.ɵo = MessageModule;
34221
- exports.ɵp = DateTestPage;
34222
- exports.ɵq = NumpadTestPage;
34223
- exports.ɵr = MatBadgeIconTestPage;
34224
- exports.ɵs = ToastTestingModule;
34225
- exports.ɵt = ToastTestingPage;
34255
+ exports.ɵk = UserEventNotificationList;
34256
+ exports.ɵl = JobProgressionList;
34257
+ exports.ɵm = DateTestPage;
34258
+ exports.ɵn = NumpadTestPage;
34259
+ exports.ɵo = MatBadgeIconTestPage;
34260
+ exports.ɵp = ToastTestingModule;
34261
+ exports.ɵq = ToastTestingPage;
34226
34262
 
34227
34263
  Object.defineProperty(exports, '__esModule', { value: true });
34228
34264