{"version":3,"sources":["webpack:///./src/views/Reports/ReportHome.vue","webpack:///./src/views/Reports/ReportHome.vue?a63e","webpack:///./src/views/Reports/ReportHome.vue?13d8","webpack:///./src/views/Reports/ReportHome.vue?7b72","webpack:///./src/components/Alert/Alert.vue?46d5","webpack:///./src/services/ReportsService.ts","webpack:///./src/components/Alert/Alert.vue","webpack:///./src/components/Alert/Alert.vue?5e15","webpack:///./src/components/Alert/Alert.vue?6235","webpack:///./src/components/Alert/Alert.vue?0da0"],"names":["render","_vm","this","_c","_self","_setupProxy","staticClass","errorGettingData","attrs","_v","_s","$t","_e","staticRenderFns","ReportHome","Vue","constructor","store","ReportsService","BusyService","showBusy","getEmbedInfo","hideBusy","availableReports","length","firstReport","earningsDashboard","$router","push","reportId","$route","fullPath","includes","__decorate","Component","components","Alert","component","ReportsServiceClass","reportData","currentReportId","fullScreen","setCurrentReportId","_this$availableReport","_this$availableReport2","filter","r","reportName","map","label","value","_this$reportData$embe","_this$reportData","embedReport","_this$availableReport3","_this$availableReport4","find","_this$availableReport5","title","i18n","t","toString","report","_this$availableReport6","Date","embedToken","expiration","expired","ApiService","get","resetFullScreen","toggleFullScreen","dashboardContainer","document","getElementById","fullscreenElement","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen","display","class","alertClasses","icon","_t","variant","disableShake","restartAnimation","$nextTick","Prop","default","type","Boolean"],"mappings":"qHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAOF,EAAG,MAAM,CAACG,YAAY,eAAe,CAAEL,EAAIM,iBAAkBJ,EAAG,QAAQ,CAACK,MAAM,CAAC,QAAU,WAAW,CAACP,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,GAAG,oCAAoC,OAAOV,EAAIW,MAAM,IAEhRC,EAAkB,G,wECUtB,IAAqB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,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAUF,EAAIG,MAAMC,YAAY,OAAQJ,EAAImF,QAASjF,EAAG,MAAM,CAACG,YAAY,QAAQ+E,MAAMpF,EAAIqF,cAAc,CAACnF,EAAG,MAAM,CAACG,YAAY,6BAA6B,CAACH,EAAG,IAAI,CAACG,YAAY,QAAQ+E,MAAMpF,EAAIsF,KAAK/E,MAAM,CAAC,cAAc,UAAUL,EAAG,MAAM,CAAEF,EAAIyD,MAAOvD,EAAG,MAAM,CAACG,YAAY,SAAS,CAACL,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIyD,OAAO,OAAOzD,EAAIW,KAAKX,EAAIuF,GAAG,YAAY,OAAOvF,EAAIW,MAEhaC,EAAkB,G,wBCGtB,IAAqBuB,EAArB,cAAmCrB,OAAnCC,c,oBAsBE,KAAAoE,SAAU,EAlBV,mBACE,MAAO,SAASlF,KAAKuF,WAAWvF,KAAKwF,aAAa,GAAG,gBAGvD,WACE,MAAqB,WAAjBxF,KAAKuF,QACA,kBAGF,0BAUTE,mBACEzF,KAAKkF,SAAU,EACflF,KAAK0F,UAAU,IAAM1F,KAAKkF,SAAU,KAvBtCnD,eAAA,CADC4D,eAAK,CAAEC,QAAS,a,8BAgBjB7D,eAAA,CADC4D,eAAK,CAACC,SAAS,EAAOC,KAAMC,W,mCAI7B/D,eAAA,CADC4D,eAAK,CAAEC,QAAS,M,4BAnBE1D,EAAKH,eAAA,CADzBC,QACoBE,WCL4X,I,wBCQ7YC,EAAY,eACd,EACArC,EACAa,GACA,EACA,KACA,WACA,MAIa,OAAAwB,E","file":"js/reports-home.5bb6e676.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"flex-grow-1\"},[(_vm.errorGettingData)?_c('Alert',{attrs:{\"variant\":\"danger\"}},[_vm._v(\" \"+_vm._s(_vm.$t('R._MES_ProblemRetrievingReports'))+\" \")]):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport Alert from '@/components/Alert/Alert.vue';\r\nimport { ReportsService } from '@/services/ReportsService';\r\nimport { ProfileService } from '@/services/ProfileService';\r\nimport { BusyService } from '@/services/BusyService';\r\nimport { Component, Vue } from 'vue-property-decorator'\r\n\r\n@Component({\r\n components:{\r\n Alert\r\n }\r\n})\r\nexport default class ReportHome extends Vue {\r\n\r\n store = ReportsService;\r\n errorGettingData = false;\r\n\r\n //when loaded, it will load into the first embed info route available\r\n async mounted(){\r\n\r\n BusyService.showBusy();\r\n await this.store.getEmbedInfo();\r\n BusyService.hideBusy();\r\n\r\n if (!this.store.availableReports || !this.store.availableReports.length){\r\n this.errorGettingData = true;\r\n return;\r\n }\r\n\r\n const firstReport = this.store.availableReports[0];\r\n if(this.earningsDashboard){\r\n this.$router.push(`/earnings-dashboard/${firstReport.reportId}`)\r\n } else {\r\n this.$router.push(`/reports/${firstReport.reportId}`)\r\n }\r\n }\r\n\r\n get earningsDashboard() {\r\n return this.$route.fullPath.includes('/earnings-dashboard');\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ReportHome.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ReportHome.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ReportHome.vue?vue&type=template&id=09d9ecbf&scoped=true\"\nimport script from \"./ReportHome.vue?vue&type=script&lang=ts\"\nexport * from \"./ReportHome.vue?vue&type=script&lang=ts\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"09d9ecbf\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=style&index=0&id=43dc11e5&prod&scoped=true&lang=scss\"","import { i18n } from \"@/main\";\r\nimport { EmbedData } from \"@/models/EmbedData\";\r\nimport { SelectOption } from \"@/models/SelectOption\";\r\nimport { ApiService } from \"./ApiService\";\r\nimport { BusyService } from \"./BusyService\";\r\nclass ReportsServiceClass{\r\n\r\n reportData: EmbedData | null = null;\r\n currentReportId = '';\r\n fullScreen = false;\r\n\r\n setCurrentReportId(reportId: string){\r\n this.currentReportId = reportId;\r\n }\r\n\r\n get selectOptions(): SelectOption[]{\r\n return this.availableReports\r\n ?.filter(r => !r.reportName.includes('Earnings Dashboard'))\r\n .map(r => ({\r\n label: r.reportName,\r\n value: r.reportId\r\n })) ?? [];\r\n }\r\n\r\n get availableReports(){\r\n return this.reportData?.embedReport ?? null;\r\n }\r\n\r\n get earningsReportId(){\r\n return this.availableReports?.find(r => r.reportName.includes('Earnings Dashboard'))?.reportId ?? '';\r\n }\r\n\r\n get metaInfo() {\r\n let title = i18n.t('R.LIT_Reports').toString();\r\n\r\n if (this.availableReports?.length){\r\n const report = this.availableReports.find(r => r.reportId === this.currentReportId)\r\n if (report){\r\n title += ': ' + report.reportName;\r\n }\r\n }\r\n return {\r\n title: title\r\n }\r\n }\r\n\r\n get embedReport(){\r\n return this.availableReports?.find(r => r.reportId === this.currentReportId) || null;\r\n }\r\n\r\n get expired(){\r\n if (!this.reportData){\r\n return;\r\n }\r\n return new Date(this.reportData.embedToken.expiration) <= new Date();\r\n }\r\n\r\n async getEmbedInfo(){\r\n if (!this.reportData || this.expired ){\r\n this.reportData = await ApiService.get('/api/GetEmbedInfo') as EmbedData;\r\n }\r\n }\r\n\r\n get isFullScreen(){\r\n return this.fullScreen;\r\n }\r\n \r\n resetFullScreen(){\r\n this.fullScreen = false;\r\n }\r\n\r\n toggleFullScreen() {\r\n BusyService.showBusy();\r\n const dashboardContainer = document.getElementById('report-container') as HTMLElement;\r\n\r\n if (!document.fullscreenElement) {\r\n this.fullScreen = true;\r\n if (dashboardContainer.requestFullscreen) {\r\n dashboardContainer.requestFullscreen();\r\n } else if ((dashboardContainer as any).mozRequestFullScreen) { /* Firefox */\r\n (dashboardContainer as any).mozRequestFullScreen();\r\n } else if ((dashboardContainer as any).webkitRequestFullscreen) { /* Chrome, Safari and Opera */\r\n (dashboardContainer as any).webkitRequestFullscreen();\r\n } else if ((dashboardContainer as any).msRequestFullscreen) { /* IE/Edge */\r\n (dashboardContainer as any).msRequestFullscreen();\r\n }\r\n\r\n } else {\r\n if (document.exitFullscreen) {\r\n this.fullScreen = false;\r\n document.exitFullscreen();\r\n } else if ((document as any).mozCancelFullScreen) { /* Firefox */\r\n (document as any).mozCancelFullScreen();\r\n } else if ((document as any).webkitExitFullscreen) { /* Chrome, Safari and Opera */\r\n (document as any).webkitExitFullscreen();\r\n } else if ((document as any).msExitFullscreen) { /* IE/Edge */\r\n (document as any).msExitFullscreen();\r\n }\r\n }\r\n BusyService.hideBusy();\r\n }\r\n\r\n}\r\nexport const ReportsService = new ReportsServiceClass();\r\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.display)?_c('div',{staticClass:\"alert\",class:_vm.alertClasses},[_c('div',{staticClass:\"d-flex align-items-center\"},[_c('i',{staticClass:\"fa-lg\",class:_vm.icon,attrs:{\"aria-hidden\":\"true\"}}),_c('div',[(_vm.title)?_c('div',{staticClass:\"title\"},[_vm._v(\" \"+_vm._s(_vm.title)+\" \")]):_vm._e(),_vm._t(\"default\")],2)])]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport { Component, Prop, Vue } from 'vue-property-decorator'\r\n\r\n\r\n@Component\r\nexport default class Alert extends Vue {\r\n @Prop({ default: 'primary' })\r\n variant !: string;\r\n\r\n get alertClasses () : string {\r\n return `alert-${this.variant} ${this.disableShake?'':'alert-shake'}`\r\n }\r\n\r\n get icon () : string {\r\n if (this.variant === 'danger') {\r\n return 'fa-light fa-ban'\r\n }\r\n\r\n return 'fa-light fa-info-circle'\r\n }\r\n\r\n @Prop({default: false, type: Boolean})\r\n disableShake!: boolean;\r\n\r\n @Prop({ default: '' })\r\n title!: string;\r\n\r\n display = true;\r\n restartAnimation(){ \r\n this.display = false;\r\n this.$nextTick(() => this.display = true);\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Alert.vue?vue&type=template&id=43dc11e5&scoped=true\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Alert.vue?vue&type=style&index=0&id=43dc11e5&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"43dc11e5\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}