{"version":3,"file":"onepoint-yap-dashboard-notification.mjs","sources":["../../../../projects/onepoint-yap/dashboard/notification/store/notification.actions.ts","../../../../projects/onepoint-yap/dashboard/notification/store/notification.selectors.ts","../../../../projects/onepoint-yap/dashboard/notification/components/notification/content/notification-content.component.ts","../../../../projects/onepoint-yap/dashboard/notification/components/notification/content/notification-content.component.html","../../../../projects/onepoint-yap/dashboard/notification/style/css.component.ts","../../../../projects/onepoint-yap/dashboard/notification/components/notification/notification.component.ts","../../../../projects/onepoint-yap/dashboard/notification/components/notification/notification.component.html","../../../../projects/onepoint-yap/dashboard/notification/i18n/en.translations.ts","../../../../projects/onepoint-yap/dashboard/notification/i18n/fr.translations.ts","../../../../projects/onepoint-yap/dashboard/notification/store/notification.service.ts","../../../../projects/onepoint-yap/dashboard/notification/store/notification.effects.ts","../../../../projects/onepoint-yap/dashboard/notification/store/notification.reducer.ts","../../../../projects/onepoint-yap/dashboard/notification/notification.module.ts","../../../../projects/onepoint-yap/dashboard/notification/onepoint-yap-dashboard-notification.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport { YapNotification } from '@onepoint-yap/dashboard';\n\nexport const NotificationActions = {\n  add: createAction('[Notification] received', props<{ notification: YapNotification }>()),\n  delete: createAction('[Notification] delete', props<{ id: string }>()),\n  deleteSuccess: createAction('[Notification] delete success', props<{ id: string }>()),\n  deleteAll: createAction('[Notification] delete all'),\n  deleteAllSuccess: createAction('[Notification] delete all success')\n};\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { notificationFeatureKey } from '@onepoint-yap/dashboard';\nimport * as fromNotification from './notification.reducer';\n\nconst feature = createFeatureSelector<fromNotification.NotificationState>(notificationFeatureKey);\n\nconst list = createSelector(feature, (state) => state.list);\n\nexport const NotificationSelectors = {\n  feature,\n  list\n};\n","import {\n  AfterViewInit,\n  Component,\n  DoCheck,\n  ElementRef,\n  EventEmitter,\n  HostListener,\n  Output,\n  ViewChild\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { YapNotification } from '@onepoint-yap/dashboard';\nimport { Observable } from 'rxjs';\nimport { NotificationActions } from '../../../store/notification.actions';\nimport { NotificationSelectors } from '../../../store/notification.selectors';\nimport { map } from 'rxjs/operators';\n\n@Component({\n  selector: 'yap-notification-content',\n  templateUrl: './notification-content.component.html'\n})\nexport class YapNotificationContentComponent implements DoCheck, AfterViewInit {\n  open: boolean = false;\n  notifications$: Observable<YapNotification[]>;\n  @Output() closed = new EventEmitter<boolean>();\n  @ViewChild('caret') caret!: ElementRef;\n  @ViewChild('button') button!: ElementRef<HTMLButtonElement>;\n  left: number = 0;\n\n  constructor(protected store: Store, private router: Router) {\n    this.notifications$ = this.store\n      .select(NotificationSelectors.list)\n      .pipe(\n        map((notifications: YapNotification[]) =>\n          [...notifications].sort((a, b) => (a.creationDate < b.creationDate ? 1 : -1))\n        )\n      );\n  }\n  ngAfterViewInit() {\n    if (!this.open) {\n      this.button.nativeElement.focus();\n    }\n  }\n  @HostListener('window:resize')\n  ngDoCheck() {\n    if (this.caret) {\n      this.left = this.caret.nativeElement.offsetWidth - 48;\n    }\n  }\n\n  delete(notification: YapNotification) {\n    this.store.dispatch(NotificationActions.delete({ id: notification.id }));\n  }\n\n  deleteAll() {\n    this.store.dispatch(NotificationActions.deleteAll());\n  }\n\n  goTo(notification: YapNotification) {\n    this.router.navigateByUrl(notification.link ?? '');\n    this.closed.next(true);\n  }\n  closeToEscape() {\n    this.closed.next(true);\n  }\n}\n","<div\n  class=\"m-notifications-list\"\n  id=\"notifications_list\"\n  aria-labelledby=\"read_notifications\"\n  aria-hidden=\"false\"\n  #caret\n  (keydown.escape)=\"closeToEscape()\"\n>\n  <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n  <div class=\"m-notifications-list__header\">\n    <h2 class=\"a-h2\">{{ '@yap.notif.label' | i18n }}</h2>\n    <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n      {{ '@yap.notif.noNotifications' | i18n }}\n    </p>\n    <ng-template #notification>\n      <div class=\"m-btn-group\">\n        <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n          {{ '@yap.notif.deleteAll' | i18n : { count: (notifications$ | async)?.length } }}\n        </button>\n      </div>\n    </ng-template>\n  </div>\n  <div class=\"m-notifications-list__content\">\n    <ul class=\"m-notifications-list__items\">\n      <li class=\"m-notifications-list__items__li\" *ngFor=\"let notification of notifications$ | async; let last = last\">\n        <div\n          class=\"m-notifications-list__items__li__txt\"\n          *ngIf=\"\n            ('@yap.notif.title.' + notification.text.code | i18n) !== '@yap.notif.title.' + notification.text.code;\n            else noTranslation\n          \"\n        >\n          <h3 class=\"a-h3\">{{ '@yap.notif.title.' + notification.text.code | i18n }}</h3>\n          <p class=\"a-p date\">{{ notification.creationDate | date : \"dd/MM/yyyy, H'h'mm\" }}</p>\n          <p class=\"a-p desc\">{{ '@yap.notif.message.' + notification.text.code | i18n : notification.text.param }}</p>\n          <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n            {{ '@yap.notif.link' | i18n }}\n          </a>\n        </div>\n        <ng-template #noTranslation>\n          <div class=\"m-notifications-list__items__li__txt\">\n            <h3 class=\"a-h3\">{{ notification.text.title }}</h3>\n            <p class=\"a-p date\">{{ notification.creationDate | date : \"dd/MM/yyyy, H'h'mm\" }}</p>\n            <p class=\"a-p desc\">{{ notification.text.code }}</p>\n            <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n              {{ '@yap.notif.link' | i18n }}\n            </a>\n          </div>\n        </ng-template>\n        <button\n          class=\"a-btn a-btn--deletenotification\"\n          (click)=\"delete(notification)\"\n          (keydown.tab)=\"last ? closeToEscape() : null\"\n          title=\"{{ '@yap.notif.delete' | i18n }}\"\n        >\n          <yap-icon iconSvg=\"close\"></yap-icon>\n          <span class=\"u-visually-hidden\">{{ '@yap.notif.delete' | i18n }}</span>\n        </button>\n      </li>\n    </ul>\n  </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n  selector: 'yap-notification-css',\n  template: '',\n  styleUrls: ['./_m-notifications.scss'],\n  encapsulation: ViewEncapsulation.None\n})\nexport class YapNotificationCssComponent {}\n","import { Overlay, OverlayConfig } from '@angular/cdk/overlay';\nimport { Component, ElementRef, ViewChild } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { SubscriptionnerDirective, YapDialogRef, YapDialogService, YapNotification } from '@onepoint-yap/dashboard';\nimport { Observable } from 'rxjs';\nimport { NotificationSelectors } from '../../store/notification.selectors';\nimport { YapNotificationContentComponent } from './content/notification-content.component';\n\n@Component({\n  selector: 'yap-notification',\n  templateUrl: './notification.component.html'\n})\nexport class YapNotificationComponent extends SubscriptionnerDirective {\n  @ViewChild('ref') ref!: ElementRef<HTMLButtonElement>;\n  notifications$: Observable<YapNotification[]>;\n  isOpened: boolean = false;\n  dialogRef?: YapDialogRef<YapNotificationContentComponent>;\n\n  constructor(private dialog: YapDialogService, private overlay: Overlay, protected store: Store<any>) {\n    super();\n    this.notifications$ = this.store.select(NotificationSelectors.list);\n  }\n\n  toggle() {\n    this.isOpened = true;\n    this.dialogRef = this.dialog.open(\n      YapNotificationContentComponent,\n      {\n        overlayConfig: new OverlayConfig({\n          hasBackdrop: true,\n          scrollStrategy: this.overlay.scrollStrategies.noop(),\n          positionStrategy: this.overlay\n            .position()\n            .flexibleConnectedTo(this.ref)\n            .withPositions([\n              {\n                originX: 'start',\n                originY: 'bottom',\n                overlayX: 'start',\n                overlayY: 'top'\n              }\n            ])\n        })\n      },\n      () => {\n        this.isOpened = false;\n      }\n    );\n    this.subscriptions.add(\n      this.dialogRef?.component?.closed.subscribe((isClosed) => {\n        if (isClosed) {\n          this.dialogRef?.close();\n          this.ref.nativeElement.focus();\n        }\n      })\n    );\n  }\n}\n","<yap-notification-css></yap-notification-css>\n<div\n  class=\"m-notifications\"\n  *ngIf=\"notifications$ | async as notifications\"\n  [class.has-unread]=\"notifications.length > 0\"\n>\n  <button\n    type=\"button\"\n    class=\"a-btn a-btn--icon-only\"\n    aria-controls=\"notifications_list\"\n    [attr.aria-expanded]=\"isOpened\"\n    aria-haspopup=\"true\"\n    id=\"read_notifications\"\n    #ref\n    (click)=\"toggle()\"\n    [title]=\"'@yap.notif.notifications' | i18n : { count: notifications.length }\"\n  >\n    <yap-icon iconSvg=\"notifications\"></yap-icon>\n    <span *ngIf=\"notifications.length > 0\" class=\"a-pastille -unread\"\n      >{{ notifications.length }} <span class=\"u-visually-hidden\">{{ '@yap.notif.label' | i18n | lowercase }}</span>\n    </span>\n  </button>\n</div>\n","export const enTranslations = {\n  '@yap': {\n    notif: {\n      label: 'Notifications',\n      link: 'See',\n      notifications: 'You have {{count}} notifications',\n      deleteAll: 'Delete all ({{count}})',\n      delete: 'Delete notification',\n      noNotifications: 'No notification',\n      title: {\n        DASHBOARD_PRIVATE: 'Presentation',\n        DASHBOARD_PUBLIC: 'Presentation',\n        DASHBOARD_DELETED: 'Presentation'\n      },\n      message: {\n        DASHBOARD_PRIVATE: 'Access to presentation <{{name}}> has been restrained',\n        DASHBOARD_PUBLIC: 'Presentation <{{name}}> is available',\n        DASHBOARD_DELETED: 'Presentation <{{name}}> has been removed'\n      }\n    }\n  }\n};\n","export const frTranslations = {\n  '@yap': {\n    notif: {\n      label: 'Notifications',\n      link: 'Voir',\n      notifications: 'Vous avez {{count}} notifications',\n      deleteAll: 'Tout supprimer ({{count}})',\n      delete: 'Supprimer la notification',\n      noNotifications: 'Aucune notification actuellement',\n      title: {\n        DASHBOARD_PRIVATE: 'Présentation',\n        DASHBOARD_PUBLIC: 'Présentation',\n        DASHBOARD_DELETED: 'Présentation'\n      },\n      message: {\n        DASHBOARD_PRIVATE: \"L'accès à la présentation <{{name}}> a été restreint\",\n        DASHBOARD_PUBLIC: 'La présentation <{{name}}> est disponible',\n        DASHBOARD_DELETED: 'La présentation <{{name}}> a été supprimée'\n      }\n    }\n  }\n};\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { mergeMap } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { ConfigSelectors } from '@onepoint-yap/dashboard';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class NotificationService {\n  constructor(private httpClient: HttpClient, private store: Store<any>) {}\n\n  deleteNotification(id: string) {\n    return this.store\n      .select(ConfigSelectors.refUrl)\n      .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me/id/${id}`))));\n  }\n\n  deleteAllNotifications() {\n    return this.store\n      .select(ConfigSelectors.refUrl)\n      .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me`))));\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { WebsocketService, wsMessage } from '@onepoint-yap/dashboard';\nimport { NotificationActions } from './notification.actions';\nimport { map, mergeMap } from 'rxjs';\nimport { NotificationService } from './notification.service';\n\n@Injectable()\nexport class NotificationEffects {\n  constructor(\n    private actions$: Actions,\n    private wsService: WebsocketService,\n    private store: Store,\n    private notificationService: NotificationService\n  ) {\n    wsService.messages$('notification').subscribe((msg: wsMessage) => {\n      this.store.dispatch(\n        NotificationActions.add({\n          notification: {\n            text: msg.payload.text,\n            link: msg.payload.link,\n            creationDate: msg.payload.creationDate,\n            id: msg.id\n          }\n        })\n      );\n    });\n  }\n\n  deleteNotification$ = createEffect(() =>\n    this.actions$.pipe(\n      ofType(NotificationActions.delete),\n      mergeMap((action) =>\n        this.notificationService\n          .deleteNotification(action.id)\n          .pipe(map(() => NotificationActions.deleteSuccess({ id: action.id })))\n      )\n    )\n  );\n\n  deleteAllNotifications$ = createEffect(() =>\n    this.actions$.pipe(\n      ofType(NotificationActions.deleteAll),\n      mergeMap((action) =>\n        this.notificationService.deleteAllNotifications().pipe(map(() => NotificationActions.deleteAllSuccess()))\n      )\n    )\n  );\n}\n","import { createReducer, on } from '@ngrx/store';\nimport { YapNotification } from '@onepoint-yap/dashboard';\nimport { NotificationActions } from './notification.actions';\n\nexport interface NotificationState {\n  list: YapNotification[];\n}\n\nexport const initialNotificationState: NotificationState = {\n  list: []\n};\n\nexport const notificationReducer = createReducer(\n  initialNotificationState,\n  on(NotificationActions.add, (state, action) => {\n    const allNotifications = [...state.list, { ...action.notification }];\n    const uniqueIds = [...new Set(allNotifications.map((notif) => notif.id))];\n    return {\n      ...state,\n      list: uniqueIds.map((id) => allNotifications.find((notif) => notif.id === id)) as YapNotification[]\n    };\n  }),\n  on(NotificationActions.deleteSuccess, (state, action) => ({\n    ...state,\n    list: state.list.filter((notification: YapNotification) => notification.id !== action.id)\n  })),\n  on(NotificationActions.deleteAllSuccess, (state, action) => ({\n    ...state,\n    list: []\n  }))\n);\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport {\n  notificationFeatureKey,\n  YapCoreModule,\n  YapI18nModule,\n  YapI18nService,\n  YapIconModule\n} from '@onepoint-yap/dashboard';\nimport { YapSearchModule } from '@onepoint-yap/dashboard/search';\nimport { YapNotificationContentComponent } from './components/notification/content/notification-content.component';\nimport { YapNotificationComponent } from './components/notification/notification.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { NotificationEffects } from './store/notification.effects';\nimport { notificationReducer } from './store/notification.reducer';\nimport { YapNotificationCssComponent } from './style/css.component';\n\n@NgModule({\n  imports: [\n    CommonModule,\n    YapCoreModule,\n    StoreModule.forFeature(notificationFeatureKey, notificationReducer),\n    EffectsModule.forFeature([NotificationEffects]),\n    YapIconModule,\n    YapSearchModule,\n    YapI18nModule\n  ],\n  declarations: [YapNotificationComponent, YapNotificationContentComponent, YapNotificationCssComponent],\n  exports: [YapNotificationComponent, YapNotificationContentComponent]\n})\nexport class YapNotificationModule {\n  constructor(private yapTranslateService: YapI18nService) {\n    this.yapTranslateService.addLangObject('fr', 'notification', frTranslations);\n    this.yapTranslateService.addLangObject('en', 'notification', enTranslations);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i3","i4","i2","i5.YapNotificationCssComponent","map","i4.NotificationService"],"mappings":";;;;;;;;;;;;;;;;;;;AAGa,MAAA,mBAAmB,GAAG;AACjC,IAAA,GAAG,EAAE,YAAY,CAAC,yBAAyB,EAAE,KAAK,EAAqC,CAAC;AACxF,IAAA,MAAM,EAAE,YAAY,CAAC,uBAAuB,EAAE,KAAK,EAAkB,CAAC;AACtE,IAAA,aAAa,EAAE,YAAY,CAAC,+BAA+B,EAAE,KAAK,EAAkB,CAAC;AACrF,IAAA,SAAS,EAAE,YAAY,CAAC,2BAA2B,CAAC;AACpD,IAAA,gBAAgB,EAAE,YAAY,CAAC,mCAAmC,CAAC;;;ACJrE,MAAM,OAAO,GAAG,qBAAqB,CAAqC,sBAAsB,CAAC,CAAC;AAElG,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;AAE/C,MAAA,qBAAqB,GAAG;IACnC,OAAO;IACP,IAAI;;;MCYO,+BAA+B,CAAA;IAQ1C,WAAsB,CAAA,KAAY,EAAU,MAAc,EAAA;QAApC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAP1D,IAAI,CAAA,IAAA,GAAY,KAAK,CAAC;AAEZ,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW,CAAC;QAG/C,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;AAGf,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK;AAC7B,aAAA,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC;AAClC,aAAA,IAAI,CACH,GAAG,CAAC,CAAC,aAAgC,KACnC,CAAC,GAAG,aAAa,CAAC,CAAC,IAA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