{"version":3,"file":"app-80774721.beb8efd65116956d.bundle.js","mappings":"kOAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gzEAAizE,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,8EAA8E,6DAA6D,gDAAgD,MAAQ,GAAG,SAAW,w8BAAw8B,eAAiB,CAAC,m+GAAu+G,6jGAA6jG,47CAA47C,WAAa,MAE7gX,S,oECPAD,EAAOE,QAAU,u5E,wNCQV,IAAMC,EAAN,MAON,WAAAC,CAAoBC,EAAiCC,EAAuCC,EAA8BC,GAAtG,KAAAH,OAAAA,EAAiC,KAAAC,WAAAA,EAAuC,KAAAC,UAAAA,EAA8B,KAAAC,MAAAA,EANnH,KAAAC,WAAqB,GACrB,KAAAC,cAAwB,EACxB,KAAAC,QAAkB,EAEjB,KAAAC,cAAgC,GA+CjC,KAAAC,WAAa,KACnBC,KAAKH,QAAUG,KAAKH,OACpBG,KAAKT,OAAOU,QAAQ,iBAAiBD,KAAKH,OAAsB,EA9ChEG,KAAKE,YAAc,oBACpB,CAEA,QAAAC,GAGCH,KAAKF,cAAgB,CACpBE,KAAKT,OAAOa,UAAUJ,KAAKE,YAAc,sBAFnBG,GAAcL,KAAKM,kBAAkBD,KAG3DL,KAAKT,OAAOa,UAAU,iBAAkBG,IAAmBP,KAAKJ,aAAeW,CAAO,IACtFP,KAAKT,OAAOa,UAAU,8BALW,IAAMJ,KAAKD,eAM5CC,KAAKT,OAAOa,UAAU,mBAAmB,IAAMJ,KAAKQ,UAEtD,CAEA,QAAAC,GACCT,KAAKF,cAAcY,SAAQC,GAC1BA,EAAaC,WAEf,CAEO,YAAMC,CAAO1B,GACnB,IAAI2B,QAAsCd,KAAKP,UAAUsB,OAAOC,SAAS,2BAA4B7B,GAAI2B,WACzG,GAA2B,KAAvBA,EAASG,WAAmB,CAE/BjB,KAAKR,WAAW0B,mBAAmBC,OAAOnB,KAAKR,WAAW0B,mBAAmBE,WAAUC,GAAKA,EAAElC,KAAOA,IAAK,GAC1Ga,KAAKT,OAAOU,QAAQ,+BAEpB,IAAIqB,QAAetB,KAAKP,UAAU8B,QAAQT,EAASU,QAAQC,QAAQT,SAAS,6BAA8BF,EAASU,SAASV,WAC5HY,QAAQC,IAAIL,E,CAEd,CAEO,MAAAM,CAAOzC,GACba,KAAKN,MAAMmC,YAAY,oBAAqB,oDAAoDC,YAAWC,IAC1G,GAAIA,EAAOC,aACV,OAAO,EAERhC,KAAKP,UAAUsB,OAAOC,SAAS,kCAAmC7B,GAAI2B,WAAWmB,MAAKnB,IACrFd,KAAKR,WAAW0B,mBAAmBC,OAAOnB,KAAKR,WAAW0B,mBAAmBE,WAAUC,GAAKA,EAAElC,KAAOA,IAAK,GAC1Ga,KAAKT,OAAOU,QAAQ,8BAA8B,GACjD,GAEJ,CAOQ,KAAAO,GACPR,KAAKH,QAAS,EACdG,KAAKT,OAAOU,QAAQ,gBAAgB,EACrC,CAEQ,iBAAAK,CAAkBD,QACZ6B,IAAT7B,EACHL,KAAKL,WAAaU,EAElBL,KAAKQ,OAEP,GApEYnB,E,mUAAkB,EAD9B,EAAA8C,W,kIAQ4B,EAAAC,gBAAqC,IAAsC,IAA0B,OAPrH/C,E","sources":["webpack://client-app/./src/app/components/notification-center/notification-center.scss","webpack://client-app/./src/app/components/notification-center/notification-center.html","webpack://client-app/./src/app/components/notification-center/notification-center.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.notification-center{display:flex;flex-direction:column;position:fixed;height:100vh;top:0;background:#fff;left:0;z-index:calc(1040 + 1);box-shadow:0 0 .25rem rgba(0,0,0,.175);opacity:0;transition:all 200ms ease-in-out}[data-device-type=mobile] .notification-center{left:-100vw;width:100vw}[data-device-type=mobile] .notification-center.open{width:100%;left:0;opacity:1;z-index:calc(1040 + 3)}[data-device-type=tablet] .notification-center{left:-500px;width:0}[data-device-type=tablet] .notification-center.open{width:500px;left:0;opacity:1;z-index:calc(1040 + 3)}[data-device-type=desktop] .notification-center{left:calc(275px - 500px);width:0}[data-device-type=desktop] .notification-center.open{width:500px;z-index:calc(1040 + 5);left:0;opacity:1}.notification-center__header{display:grid;align-items:center;grid-template-columns:1fr 3em;gap:15px;min-height:4em;padding:0 15px;color:#fff}.notification-center__header h4{margin:0}.notification-center .list{border-top:1px solid rgba(0,0,0,.175);display:flex;flex-direction:column;flex:1 1 100%;position:relative;min-height:calc(100vh - 4em);overflow:hidden}.notification-center .list__inner{display:flex;flex-direction:column;flex:1 1 100%;gap:15px;position:relative;overflow:auto;padding:15px 0}.notification-center .no-results{font-weight:600;padding:0 15px}.notification-center .notification{display:grid;grid-template-columns:3em 1fr auto;gap:15px;align-items:start;font-weight:600;min-height:5em;padding:0 15px;transition:all 200ms ease-in-out}.notification-center .notification--project-invitation{border-color:#00b3c9}.notification-center .notification__icon{border-radius:50%;display:flex;justify-content:center;align-items:center;height:3em;width:3em}.notification-center .notification__icon[data-type=invitation]{color:#fff}.notification-center .notification__actions{display:grid;grid-template-columns:auto auto}.notification-center .notification__actions .action,.notification-center .notification__actions .action--reject,.notification-center .notification__actions .action--accept{border:none}.notification-center .notification__actions .action--accept:hover{background:#00b3c9;color:#fff}.notification-center .notification__actions .action--reject:hover{background:#ff5b57;color:#fff}.notification-center .notification .cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/notification-center/notification-center.scss\",\"webpack://./src/resources/customized-styles/variables.scss\",\"webpack://./src/resources/styling-admin.scss\"],\"names\":[],\"mappings\":\"AAGA,qBACC,YAAA,CACG,qBAAA,CACH,cAAA,CACA,YAAA,CACA,KAAA,CACA,eAAA,CACA,MAAA,CACA,sBAAA,CACA,sCAAA,CACA,SAAA,CACA,gCAAA,CAEA,+CACC,WAAA,CACA,WAAA,CAEA,oDACC,UAAA,CACA,MAAA,CACA,SAAA,CACA,sBAAA,CAIF,+CACC,WAAA,CACA,OAAA,CAEA,oDACC,WC8ByB,CD7BzB,MAAA,CACA,SAAA,CACA,sBAAA,CAIF,gDACC,wBAAA,CACA,OAAA,CAEA,qDACC,WCkByB,CDjBzB,sBAAA,CACA,MAAA,CACA,SAAA,CAcF,6BACC,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,QCxDO,CDyDP,cCpCe,CDqCf,cAAA,CACA,UAAA,CAEA,gCACC,QAAA,CAIF,2BACC,qCAAA,CACA,YAAA,CACA,qBAAA,CACA,aAAA,CACA,iBAAA,CACA,4BAAA,CACA,eAAA,CAEA,kCACC,YAAA,CACA,qBAAA,CACA,aAAA,CACA,QC/EM,CDgFN,iBAAA,CACA,aAAA,CACA,cAAA,CAIF,iCACC,eAAA,CACA,cAAA,CAGD,mCACC,YAAA,CACA,kCAAA,CACG,QC9FI,CD+FP,iBAAA,CACA,eAAA,CACA,cAAA,CACA,cAAA,CACA,gCAAA,CAEA,uDACC,oBC/GM,CDkHP,yCACC,iBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,UAAA,CACA,SAAA,CAEA,+DAEC,UAAA,CAIF,4CACC,YAAA,CACA,+BAAA,CAEA,4KACC,WAAA,CAIC,kEACC,kBC1IG,CD2IH,UAAA,CAMD,kEACC,kBEvIQ,CFwIR,UAAA,CAMJ,yCACC,eAAA,CACA,sBAAA,CACA,kBAAA\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n@import \\\"src/resources/styling-admin\\\";\\r\\n\\r\\n.notification-center {\\r\\n\\tdisplay: flex;\\r\\n flex-direction: column;\\r\\n\\tposition: fixed;\\r\\n\\theight: 100vh;\\r\\n\\ttop: 0;\\r\\n\\tbackground: white;\\r\\n\\tleft: 0;\\t\\r\\n\\tz-index: calc(#{$header-fixed-zindex} + 1);\\r\\n\\tbox-shadow: $box-shadow;\\r\\n\\topacity: 0;\\r\\n\\ttransition: all 200ms ease-in-out;\\t\\r\\n\\r\\n\\t[data-device-type=mobile] & {\\r\\n\\t\\tleft: -100vw;\\r\\n\\t\\twidth: 100vw;\\r\\n\\r\\n\\t\\t&.open {\\r\\n\\t\\t\\twidth: 100%;\\r\\n\\t\\t\\tleft: 0;\\t\\t\\t\\r\\n\\t\\t\\topacity: 1;\\r\\n\\t\\t\\tz-index: calc(#{$header-fixed-zindex} + 3);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t[data-device-type=tablet] & {\\r\\n\\t\\tleft: -$notification-center-width;\\r\\n\\t\\twidth: 0;\\r\\n\\r\\n\\t\\t&.open {\\r\\n\\t\\t\\twidth: $notification-center-width;\\r\\n\\t\\t\\tleft: 0;\\r\\n\\t\\t\\topacity: 1;\\r\\n\\t\\t\\tz-index: calc(#{$header-fixed-zindex} + 3);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t[data-device-type=desktop] & {\\r\\n\\t\\tleft: calc(#{$nav-width} - #{$notification-center-width});\\r\\n\\t\\twidth: 0;\\r\\n\\t\\t\\r\\n\\t\\t&.open {\\r\\n\\t\\t\\twidth: $notification-center-width;\\r\\n\\t\\t\\tz-index: calc(#{$header-fixed-zindex} + 5);\\r\\n\\t\\t\\tleft: 0;\\r\\n\\t\\t\\topacity: 1;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t// [data-device-type=desktop] [data-nav-collapsed=true] & {\\r\\n\\t// \\tleft: -$notification-center-width;\\r\\n\\t// \\topacity: 0;\\r\\n\\t\\t\\r\\n\\t// \\t&.open {\\r\\n\\t// \\t\\tleft: $nav-width-collapsed;\\r\\n\\t// \\t\\topacity: 1;\\r\\n\\t// \\t}\\r\\n\\t// }\\r\\n\\r\\n\\t&__header {\\r\\n\\t\\tdisplay: grid;\\r\\n\\t\\talign-items: center;\\r\\n\\t\\tgrid-template-columns: 1fr 3em;\\r\\n\\t\\tgap: $gutter;\\r\\n\\t\\tmin-height: $top-bar-height;\\r\\n\\t\\tpadding: 0 $gutter;\\r\\n\\t\\tcolor:white;\\r\\n\\r\\n\\t\\th4 {\\r\\n\\t\\t\\tmargin: 0;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t.list {\\r\\n\\t\\tborder-top: 1px solid $border-color;\\r\\n\\t\\tdisplay: flex;\\r\\n\\t\\tflex-direction: column;\\r\\n\\t\\tflex: 1 1 100%;\\r\\n\\t\\tposition: relative;\\r\\n\\t\\tmin-height: calc(100vh - #{$top-bar-height});\\r\\n\\t\\toverflow: hidden;\\r\\n\\r\\n\\t\\t&__inner {\\r\\n\\t\\t\\tdisplay: flex;\\r\\n\\t\\t\\tflex-direction: column;\\r\\n\\t\\t\\tflex: 1 1 100%;\\r\\n\\t\\t\\tgap: $gutter;\\r\\n\\t\\t\\tposition: relative;\\r\\n\\t\\t\\toverflow: auto;\\r\\n\\t\\t\\tpadding: $gutter 0;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t.no-results {\\r\\n\\t\\tfont-weight: 600;\\r\\n\\t\\tpadding: 0 $gutter;\\r\\n\\t}\\r\\n\\r\\n\\t.notification {\\r\\n\\t\\tdisplay: grid;\\r\\n\\t\\tgrid-template-columns: 3em 1fr auto;\\r\\n \\tgap: $gutter;\\r\\n\\t\\talign-items: start;\\r\\n\\t\\tfont-weight: 600;\\r\\n\\t\\tmin-height: 5em;\\r\\n\\t\\tpadding: 0 $gutter;\\r\\n\\t\\ttransition: all 200ms ease-in-out;\\r\\n\\r\\n\\t\\t&--project-invitation {\\r\\n\\t\\t\\tborder-color: $accent;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t&__icon {\\r\\n\\t\\t\\tborder-radius: 50%;\\r\\n\\t\\t\\tdisplay: flex;\\r\\n\\t\\t\\tjustify-content: center;\\r\\n\\t\\t\\talign-items: center;\\r\\n\\t\\t\\theight: 3em;\\r\\n\\t\\t\\twidth: 3em;\\r\\n\\r\\n\\t\\t\\t&[data-type=invitation] {\\r\\n\\t\\t\\t\\t// background: $accent;\\r\\n\\t\\t\\t\\tcolor: #fff;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t&__actions {\\r\\n\\t\\t\\tdisplay: grid;\\r\\n\\t\\t\\tgrid-template-columns: auto auto;\\r\\n\\r\\n\\t\\t\\t.action {\\r\\n\\t\\t\\t\\tborder: none;\\r\\n\\r\\n\\t\\t\\t\\t&--accept {\\r\\n\\t\\t\\t\\t\\t@extend .action;\\r\\n\\t\\t\\t\\t\\t&:hover {\\r\\n\\t\\t\\t\\t\\t\\tbackground: $accent;\\r\\n\\t\\t\\t\\t\\t\\tcolor: #fff;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t&--reject {\\r\\n\\t\\t\\t\\t\\t@extend .action;\\r\\n\\t\\t\\t\\t\\t&:hover {\\r\\n\\t\\t\\t\\t\\t\\tbackground: $red;\\r\\n\\t\\t\\t\\t\\t\\tcolor: #fff;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t.cell {\\r\\n\\t\\t\\toverflow: hidden;\\r\\n\\t\\t\\ttext-overflow: ellipsis;\\r\\n\\t\\t\\twhite-space: nowrap;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\n\",\"$text-color: #333;\\r\\n$accent: #00B3C9;\\r\\n$accent-15pct: #D9F4F7;\\r\\n$bs-default: #f1f3f4;\\r\\n$grey: #dddddd;\\r\\n$grey-light: #efefef;\\r\\n$grey-lighter: #F0F3F4;\\r\\n$grey-darker: #A5A3A3;\\r\\n$white-hsl-97: hsla(0deg, 0%, 97%, 1);\\r\\n\\r\\n$gutter: 15px;\\r\\n\\r\\n$box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-right: 0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-left: -0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n$border-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n\\r\\n// Showroom header\\r\\n$showroom-header-height: 350px;\\r\\n$showroom-header-height-small: 150px;\\r\\n$showroom-header-height-mobile: 200px;\\r\\n\\r\\n// Navigation\\r\\n$nav-width: 275px;\\r\\n$nav-width-collapsed: 50px;\\r\\n$nav-height-mobile: 50px;\\r\\n\\r\\n// Top bar\\r\\n$top-bar-height: 4em;\\r\\n\\r\\n// CSS grid table\\r\\n$css-grid-header-height: calc(4em + 1px);\\r\\n\\r\\n// Object Presentation\\r\\n$object-presentation-left-content-width: 250px;\\r\\n$object-presentation-left-content-width-lg: 350px;\\r\\n$object-presentation-img-height: 250px;\\r\\n\\r\\n\\r\\n// Card deck\\r\\n$card-height: 250px;\\r\\n\\r\\n\\r\\n// Select\\r\\n$select-min-width: 200px;\\r\\n\\r\\n\\r\\n// Modal\\r\\n$modal-header-height: 50px;\\r\\n$modal-footer-height: 50px;\\r\\n\\r\\n// Object Properties\\r\\n$object-properties-width: 480px;\\r\\n$object-properties-width--detailed: 560px;\\r\\n$object-properties-width-mobile: 100vw;\\r\\n$object-properties-width-mobile--detailed: 100vw;\\r\\n$object-properties-width-tablet: 480px;\\r\\n$object-properties-width-tablet--detailed: 560px;\\r\\n\\r\\n// Notification Center\\r\\n$notification-center-width: 500px;\\r\\n\\r\\n// 7.0 z-index Setting\\r\\n\\r\\n$btn-scroll-to-top-zindex: 1020 !default;\\r\\n$content-zindex: 1020 !default;\\r\\n$float-submenu-zindex: 1020 !default;\\r\\n$footer-zindex: 1020 !default;\\r\\n$header-zindex: 1020 !default;\\r\\n$header-fixed-zindex: 1040 !default;\\r\\n$sidebar-zindex: 1010 !default;\\r\\n$top-menu-zindex: 1015 !default;\\r\\n$theme-panel-zindex: 1020 !default;\\r\\n$page-loader-zindex : 9999 !default;\\r\\n$page-title-zindex: 1020 !default;\\r\\n$pace-loader-zindex: 1030 !default;\\r\\n$panel-expand-zindex: 1080 !default;\\r\\n\\r\\n// 2.0 RTL Setting\\r\\n\\r\\n$enable-rtl: false !default;\\r\\n\\r\\n// 6.0 App Component Setting\\r\\n@import 'functions.scss';\\r\\n$boxed-layout-width: rem(1280px) !default;\\r\\n$content-padding-x: rem(30px) !default;\\r\\n$content-padding-y: rem(20px) !default;\\r\\n$content-padding-x-sm: rem(20px) !default;\\r\\n$content-padding-y-sm: rem(20px) !default;\\r\\n$header-height: rem(50px) !default;\\r\\n$header-height-sm: rem(50px) !default;\\r\\n$sidebar-width: rem(220px) !default;\\r\\n$sidebar-minified-width: rem(60px) !default;\\r\\n$sidebar-wide-width: rem(250px) !default;\\r\\n$top-menu-height: rem(40px) !default;\\r\\n\",\"$black: #000000 !default;\\r\\n$blue: #348fe2 !default;\\r\\n$cyan: #49b6d6 !default;\\r\\n$dark: #2d353c !default;\\r\\n$dark-darker: #1a2229 !default;\\r\\n$green: #32a932 !default;\\r\\n$indigo: #8753de !default;\\r\\n$lime: #90ca4b !default;\\r\\n$light: #f2f3f4 !default;\\r\\n$orange: #f59c1a !default;\\r\\n$purple: #727cb6 !default;\\r\\n$pink: #fb5597 !default;\\r\\n$red: #ff5b57 !default;\\r\\n$silver: #b6c2c9 !default;\\r\\n$teal: #00acac !default;\\r\\n$white: #FFFFFF !default;\\r\\n$yellow: #ffd900 !default;\\r\\n$inverse: $dark !default;\\r\\n$link-color: $blue !default;\\r\\n$btn-eg-theme-color: #517770 !default;\\r\\n$btn-ajour-theme-color:\\trgb(29, 30, 90) !default; \\t\\r\\n$colors: (\\r\\n\\t'black': $black,\\r\\n\\t'cyan': $cyan,\\r\\n\\t'dark': $dark,\\r\\n\\t'dark-darker': $dark-darker,\\r\\n\\t'green': $green,\\r\\n\\t'indigo': $indigo,\\r\\n\\t'lime': $lime,\\r\\n\\t'light': $light,\\r\\n\\t'orange': $orange,\\r\\n\\t'purple': $purple,\\r\\n\\t'pink': $pink,\\r\\n\\t'red': $red,\\r\\n\\t'silver': $silver,\\r\\n\\t'teal': $teal,\\r\\n\\t'white': $white,\\r\\n\\t'yellow': $yellow,\\r\\n\\t'muted': darken($silver, 30%),\\r\\n\\t'aqua': $cyan,\\r\\n\\t'btn-eg-theme-color': $btn-eg-theme-color,\\r\\n\\t'btn-ajour-theme-color': $btn-ajour-theme-color,\\r\\n\\r\\n);\\r\\n\\r\\n$border-radius: 4px !default;\\r\\n$border-radius-lg: 6px !default;\\r\\n$border-radius-sm: 3px !default;\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\\r\\n\";","import { ModalService } from './../../services/modal-service';\r\nimport { ApiClient } from './../../services/api-client';\r\nimport { EventAggregator, Subscription } from 'aurelia-event-aggregator';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { AppContextService } from 'app/services/app-context-service';\r\nimport { HttpResponseMessage } from 'aurelia-http-client';\r\n\r\n@autoinject\r\nexport class NotificationCenter {\r\n\tpublic searchTerm: string = \"\";\r\n\tpublic navCollapsed: boolean = false;\r\n\tpublic isOpen: boolean = false;\r\n\tpublic viewContext: string;\r\n\tprivate subscriptions: Subscription[] = [];\r\n\r\n\tconstructor(private events: EventAggregator, private appContext: AppContextService, private apiClient: ApiClient, private modal: ModalService) {\r\n\t\tthis.viewContext = \"NotificationCenter\";\r\n\t}\r\n\r\n\tattached() {\r\n\t\tconst notificationCenterHandler = () => this.toggleOpen();\r\n\t\tconst searchHandler = (data: any) => this.handleSearchEvent(data);\r\n\t\tthis.subscriptions = [\r\n\t\t\tthis.events.subscribe(this.viewContext + \":SearchTermChanged\", searchHandler),\r\n\t\t\tthis.events.subscribe(\"nav-collapsed\", (payload: any) => { this.navCollapsed = payload }),\r\n\t\t\tthis.events.subscribe(\"notification-center:toggle\", notificationCenterHandler),\r\n\t\t\tthis.events.subscribe('overlay:clicked', () => this.close())\r\n\t\t];\r\n\t}\r\n\r\n\tdetached() {\r\n\t\tthis.subscriptions.forEach(subscription => (\r\n\t\t\tsubscription.dispose()\r\n\t\t));\r\n\t}\r\n\r\n\tpublic async accept(id: string) {\r\n\t\tlet response: HttpResponseMessage = await this.apiClient.global.postJson('Project/AcceptInvitation', id).response();\r\n\t\tif (response.statusCode == 200) {\r\n\t\t\t//response.content is a UserInfoState.\r\n\t\t\tthis.appContext.projectInvitations.splice(this.appContext.projectInvitations.findIndex(e => e.id === id), 1);\r\n\t\t\tthis.events.publish(\"project-invitation-accepted\");\r\n\t\t\t//If everything goes well we insert the user into OrgDatabase.\r\n\t\t\tlet result = await this.apiClient.orgById(response.content.org_Id).postJson(\"UserInfo/AddUserToUserInfo\", response.content).response();\r\n\t\t\tconsole.log(result);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic reject(id: string) {\r\n\t\tthis.modal.OpenConfirm('Reject invitation', 'Are you sure you want to reject this invitation?').whenClosed(answer => {\r\n\t\t\tif (answer.wasCancelled) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.apiClient.global.postJson('Project/SetInvitationAsRejected', id).response().then(response => {\r\n\t\t\t\tthis.appContext.projectInvitations.splice(this.appContext.projectInvitations.findIndex(e => e.id === id), 1);\r\n\t\t\t\tthis.events.publish(\"project-invitation-rejected\");\r\n\t\t\t})\r\n\t\t});\r\n\t}\r\n\r\n\tpublic toggleOpen = () => {\r\n\t\tthis.isOpen = !this.isOpen;\r\n\t\tthis.events.publish(\"show-overlay\", !this.isOpen ? false : true);\r\n\t}\r\n\r\n\tprivate close() {\r\n\t\tthis.isOpen = false;\r\n\t\tthis.events.publish(\"show-overlay\", false);\r\n\t}\r\n\r\n\tprivate handleSearchEvent(data: string) {\r\n\t\tif (data !== undefined) {\r\n\t\t\tthis.searchTerm = data;\r\n\t\t} else {\r\n\t\t\tthis.close();\r\n\t\t}\r\n\t}\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","NotificationCenter","constructor","events","appContext","apiClient","modal","searchTerm","navCollapsed","isOpen","subscriptions","toggleOpen","this","publish","viewContext","attached","subscribe","data","handleSearchEvent","payload","close","detached","forEach","subscription","dispose","accept","response","global","postJson","statusCode","projectInvitations","splice","findIndex","e","result","orgById","content","org_Id","console","log","reject","OpenConfirm","whenClosed","answer","wasCancelled","then","undefined","autoinject","EventAggregator"],"sourceRoot":""}