{"version":3,"sources":["webpack:///../../../src/components/VGrid/grid.ts","webpack:///../../../src/components/VGrid/VContainer.ts","webpack:///./src/views/dashboard/api-download/DownloadFromApi.vue?fe96","webpack:///./src/views/dashboard/api-download/DownloadFromApi.store.js","webpack:///src/views/dashboard/api-download/DownloadFromApi.vue","webpack:///./src/views/dashboard/api-download/DownloadFromApi.vue?2afe","webpack:///./src/views/dashboard/api-download/DownloadFromApi.vue"],"names":["VGrid","name","Vue","extend","functional","props","id","String","tag","type","default","render","h","data","children","staticClass","trim","attrs","classes","Object","keys","filter","key","value","startsWith","length","join","domProps","Grid","fluid","Boolean","mergeData","class","Array","concat","_vm","this","_h","$createElement","_c","_self","directives","rawName","expression","isLoading","errorMessage","_v","_s","staticRenderFns","getters","state","initialState","mutations","clear","assign","setErrorMessage","payload","actions","get","commit","uuid","logUuid","requestType","window","document","baseUrl","process","params","log_uuid","request_type","endpoint","axios","url","method","responseType","response","URL","createObjectURL","Blob","link","createElement","href","setAttribute","body","appendChild","click","defaultText","statusText","namespaced","computed","mapGetters","created","module","mounted","methods","mapActions","mapMutations","component","VContainer","VProgressCircular"],"mappings":"0NAGc,SAAUA,EAAOC,GAE7B,OAAOC,OAAIC,OAAO,CAChBF,KAAM,KAAF,OAAOA,GAEXG,YAAY,EAEZC,MAAO,CACLC,GAAIC,OACJC,IAAK,CACHC,KAAMF,OACNG,QAAS,QAIbC,OAbgB,SAaRC,EAbQ,GAaoB,IAAvBP,EAAuB,EAAvBA,MAAOQ,EAAgB,EAAhBA,KAAMC,EAAU,EAAVA,SACxBD,EAAKE,YAAe,UAAGd,EAAH,YAAWY,EAAKE,aAAe,IAAMC,OAEzD,IAAQC,EAAUJ,EAAVI,MACR,GAAIA,EAAO,CAETJ,EAAKI,MAAQ,GACb,IAAMC,EAAUC,OAAOC,KAAKH,GAAOI,QAAO,SAAAC,GAGxC,GAAY,SAARA,EAAgB,OAAO,EAE3B,IAAMC,EAAQN,EAAMK,GAIpB,OAAIA,EAAIE,WAA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ACpB3B,EAAO,kBAAD,UAAyB,KAAEgB,SAAW,KAAEA,SAASY,WAAaD,IAvBJ,mEA6B7D,GACXE,YAAY,EACZtC,MAAO,kBAAKC,GACZM,UACAL,YACAH,WC1CW,GACfhD,uBACAY,gBAAA,OACA+B,eAGA6C,2BACAC,gBACA7C,2CAGA8C,QAXA,WAYA,6BAAAC,YAGAC,QAfA,WAeA,qKACAjC,EAAA,oBACAC,EAAA,wBACAC,EAAA,oBACA,eAJA,kBAMA,OACAF,OACAC,UACAC,cACAC,cACAC,oBAXA,gEAcA,eAdA,aAiBA,eAjBA,4DAoBA8B,yCACAC,uCACAC,0CCpDuX,I,yDCOnXC,EAAY,eACd,EACAtF,EACAqC,GACA,EACA,KACA,KACA,MAIa,aAAAiD,EAAiB,QAMhC,IAAkBA,EAAW,CAACC,aAAA,KAAWC,oBAAA","file":"js/chunk-01e6bfdc.b7b6109f.js","sourcesContent":["// Types\nimport Vue, { VNode } from 'vue'\n\nexport default function VGrid (name: string) {\n /* @vue/component */\n return Vue.extend({\n name: `v-${name}`,\n\n functional: true,\n\n props: {\n id: String,\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n render (h, { props, data, children }): VNode {\n data.staticClass = (`${name} ${data.staticClass || ''}`).trim()\n\n const { attrs } = data\n if (attrs) {\n // reset attrs to extract utility clases like pa-3\n data.attrs = {}\n const classes = Object.keys(attrs).filter(key => {\n // TODO: Remove once resolved\n // https://github.com/vuejs/vue/issues/7841\n if (key === 'slot') return false\n\n const value = attrs[key]\n\n // add back data attributes like data-test=\"foo\" but do not\n // add them as classes\n if (key.startsWith('data-')) {\n data.attrs![key] = value\n return false\n }\n\n return value || typeof value === 'string'\n })\n\n if (classes.length) data.staticClass += ` ${classes.join(' ')}`\n }\n\n if (props.id) {\n data.domProps = data.domProps || {}\n data.domProps.id = props.id\n }\n\n return h(props.tag, data, children)\n },\n })\n}\n","import './_grid.sass'\nimport './VGrid.sass'\n\nimport Grid from './grid'\n\nimport mergeData from '../../util/mergeData'\n\n/* @vue/component */\nexport default Grid('container').extend({\n name: 'v-container',\n functional: true,\n props: {\n id: String,\n tag: {\n type: String,\n default: 'div',\n },\n fluid: {\n type: Boolean,\n default: false,\n },\n },\n render (h, { props, data, children }) {\n let classes\n const { attrs } = data\n if (attrs) {\n // reset attrs to extract utility clases like pa-3\n data.attrs = {}\n classes = Object.keys(attrs).filter(key => {\n // TODO: Remove once resolved\n // https://github.com/vuejs/vue/issues/7841\n if (key === 'slot') return false\n\n const value = attrs[key]\n\n // add back data attributes like data-test=\"foo\" but do not\n // add them as classes\n if (key.startsWith('data-')) {\n data.attrs![key] = value\n return false\n }\n\n return value || typeof value === 'string'\n })\n }\n\n if (props.id) {\n data.domProps = data.domProps || {}\n data.domProps.id = props.id\n }\n\n return h(\n props.tag,\n mergeData(data, {\n staticClass: 'container',\n class: Array({\n 'container--fluid': props.fluid,\n }).concat(classes || []),\n }),\n children\n )\n },\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{attrs:{\"id\":\"download\",\"tag\":\"section\"}},[_c('v-progress-circular',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isLoading),expression:\"isLoading\"}],attrs:{\"indeterminate\":_vm.isLoading}}),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(!!_vm.errorMessage),expression:\"!!errorMessage\"}],staticClass:\"orange--text\"},[_vm._v(_vm._s(_vm.errorMessage))]),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.errorMessage && !_vm.isLoading),expression:\"!errorMessage && !isLoading\"}],staticClass:\"green--text\"},[_vm._v(\" Downloadet... \")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from '@/helpers/axios'\n\n\nconst getters = {\n errorMessage(state) {\n return state.errorMessage\n },\n}\n\nconst initialState = {\n errorMessage: '',\n}\n\nconst mutations = {\n clear(state) {\n Object.assign(state, initialState)\n },\n setErrorMessage(state, payload) {\n state.errorMessage = payload\n },\n}\n\nconst actions = {\n async get({ commit }, { uuid, logUuid, requestType, window, document }) {\n const baseUrl = process.env.VUE_APP_API_ASSESSMENTS_URL\n const params = {\n uuid: uuid,\n log_uuid: logUuid,\n request_type: requestType,\n }\n const endpoint = `clinics/download_pdf/`\n try {\n let response = await axios({\n url: `${baseUrl}/${endpoint}`,\n method: 'GET',\n responseType: 'blob',\n params: params,\n })\n const url = window.URL.createObjectURL(new Blob([response.data]))\n const link = document.createElement('a')\n link.href = url\n link.setAttribute('download', `${uuid}.pdf`)\n document.body.appendChild(link)\n link.click()\n } catch (e) {\n const defaultText = 'Noget gik galt'; // TODO: Localization\n commit('setErrorMessage', `${!!e.response ? e.response.statusText : defaultText}`)\n throw e;\n }\n },\n}\n\nexport default {\n namespaced: true,\n state: { ...initialState },\n actions,\n mutations,\n getters,\n}\n","\n\n \n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DownloadFromApi.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DownloadFromApi.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./DownloadFromApi.vue?vue&type=template&id=58e85c5e&\"\nimport script from \"./DownloadFromApi.vue?vue&type=script&lang=js&\"\nexport * from \"./DownloadFromApi.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\ninstallComponents(component, {VContainer,VProgressCircular})\n"],"sourceRoot":""}