{"version":3,"sources":["webpack:///./src/views/Inspiration.vue?3708","webpack:///./src/views/Inspiration.vue?b5a7","webpack:///./src/views/Inspiration.vue","webpack:///./src/views/Inspiration.vue?e43d","webpack:///./src/views/Inspiration.vue?5568","webpack:///./src/util/formatDate.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","on","back","_v","selectedItem","_e","_l","item","index","key","$event","selectItem","style","backgroundImage","imageCaption","_s","category","formatDate","publishDate","title","content","type","domProps","text","caption","staticRenderFns","Inspiration","_Vue","_inherits","_super","_createSuper","_this","_classCallCheck","call","inspirationItems","fetch","_createClass","value","$router","go","_fetch","_asyncToGenerator","_regeneratorRuntime","mark","_callee","api","_yield$api$inspiratio","data","wrap","_context","prev","next","InspirationApi","inspirationGetInspirationMessages","sent","t0","stop","apply","arguments","Vue","__decorate","Component","components","Content","Toolbar","methods","computed","currentUser","$store","state","component","date","objDate","Date","getFullYear","months","concat","getDate","getMonth"],"mappings":"kHAAA,W,kECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,UAAU,CAACG,MAAM,CAAC,mBAAoB,GAAMC,GAAG,CAAC,KAAOR,EAAIS,OAAO,CAACL,EAAG,KAAK,GAAG,CAACJ,EAAIU,GAAG,kBAAkBN,EAAG,UAAU,CAAGJ,EAAIW,aAA41BX,EAAIY,KAAl1BR,EAAG,MAAM,CAACE,YAAY,eAAeN,EAAIa,GAAIb,EAAoB,kBAAE,SAASc,EAAKC,GAAO,OAAOX,EAAG,MAAM,CAACY,IAAK,eAAiBD,EAAOT,YAAY,qCAAqCE,GAAG,CAAC,MAAQ,SAASS,GAAQ,OAAOjB,EAAIkB,WAAWJ,EAAMC,MAAU,CAAED,EAAiB,aAAEV,EAAG,MAAM,CAACE,YAAY,0BAA0Ba,MAAM,CAAGC,gBAAkB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AT,IAAA,OAAAK,EAAAiB,MAAA,KAAAC,WAAA,OAAAvB,EAVA,MAUAT,EA7B6B,CAASiC,cAApBjC,EAAWkC,eAAA,CAd/BC,eAAU,CACTC,WAAY,CACVC,eACAC,gBAEFC,QAAS,CACPhD,mBAEFiD,SAAU,CACRC,YAAW,WACT,OAAOzE,KAAK0E,OAAOC,MAAMF,iBAIVzC,WC/EiX,I,wBCQlY4C,EAAY,eACd,EACA9E,EACAiC,GACA,EACA,KACA,KACA,MAIa,aAAA6C,E,uFCnBT,SAAUrD,EAAYsD,GAC1B,GAAa,KAATA,EACF,OAAOA,EAGT,IAAMC,EAAU,IAAIC,KAAKF,GACzB,IAAKC,EACH,OAAOD,EAET,GAA8B,IAA1BC,EAAQE,cACV,MAAO,GAET,IAAMC,EAAS,CACb,UACA,WACA,QACA,QACA,MACA,OACA,OACA,WACA,YACA,UACA,WACA,YAEF,MAAO,GAAPC,OAAUJ,EAAQK,UAAS,KAAAD,OAAID,EAAOH,EAAQM,YAAW,KAAAF,OAAIJ,EAAQE","file":"js/chunk-1cbd8652.2f2f4a07.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Inspiration.vue?vue&type=style&index=0&id=f7644274&prod&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"view view--toolbar\"},[_c('Toolbar',{attrs:{\"hasCustomCallback\":true},on:{\"back\":_vm.back}},[_c('h2',{},[_vm._v(\"Inspiratie\")])]),_c('Content',[(!_vm.selectedItem)?_c('div',{staticClass:\"inspiration\"},_vm._l((_vm.inspirationItems),function(item,index){return _c('div',{key:(\"inspiration-\" + index),staticClass:\"inspiration__item inspiration-item\",on:{\"click\":function($event){return _vm.selectItem(item, index)}}},[(item.thumbnailUrl)?_c('div',{staticClass:\"inspiration-item__image\",style:({ backgroundImage: (\"url('\" + (item.thumbnailUrl)) })},[_c('img',{attrs:{\"src\":(\"\" + (item.thumbnailUrl)),\"alt\":item.imageCaption,\"width\":\"480\",\"loading\":\"lazy\"}})]):_vm._e(),_c('div',{staticClass:\"inspiration-item__info\"},[_c('div',{staticClass:\"inspiration-item__category\"},[_vm._v(\" \"+_vm._s(item.category)+\" \")]),_c('div',{staticClass:\"inspiration-item__date\"},[_vm._v(\" \"+_vm._s(_vm.formatDate(item.publishDate))+\" \")]),_c('h2',{staticClass:\"inspiration-item__title\"},[_vm._v(\" \"+_vm._s(item.title)+\" \")])])])}),0):_vm._e(),(_vm.selectedItem)?_c('div',{staticClass:\"inspiration-detail inspiration-item\"},[_c('div',{staticClass:\"inspiration-item__category\"},[_vm._v(\" \"+_vm._s(_vm.selectedItem.category)+\" \")]),_c('div',{staticClass:\"inspiration-item__date\"},[_c('br'),_vm._v(\" \"+_vm._s(_vm.formatDate(_vm.selectedItem.publishDate))+\" \")]),_vm._l((_vm.selectedItem.content),function(content,index){return _c('div',{key:(\"content-\" + index)},[(content.type === \"title\")?_c('h2',[_vm._v(_vm._s(content.title))]):_vm._e(),(content.type === \"text\")?_c('div',{domProps:{\"innerHTML\":_vm._s(content.text)}}):_vm._e(),(content.type === \"image\")?_c('div',{staticClass:\"inspiration-item__image\"},[_c('img',{attrs:{\"src\":((content.imageUrl) + \"?width=960\"),\"alt\":\"{{content.caption}}\"}}),(content.caption)?_c('figcaption',[_vm._v(_vm._s(content.caption))]):_vm._e()]):_vm._e(),(content.type === \"list\")?_c('ul',_vm._l((content.items),function(item,index){return _c('li',{key:(\"item-\" + index)},[_vm._v(_vm._s(item))])}),0):_vm._e()])})],2):_vm._e()])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Vue from 'vue'\r\nimport Component from 'vue-class-component'\r\n\r\nimport Content from '@/components/Content.vue'\r\nimport Toolbar from '@/components/Layout/Toolbar.vue'\r\nimport { formatDate } from '@/util/formatDate'\r\n\r\nimport { InspirationApi, InspirationMessageDto } from '@/api'\r\n\r\n@Component({\r\n components: {\r\n Content,\r\n Toolbar\r\n },\r\n methods: {\r\n formatDate\r\n },\r\n computed: {\r\n currentUser () {\r\n return this.$store.state.currentUser\r\n }\r\n }\r\n})\r\nexport default class Inspiration extends Vue {\r\n public inspirationItems: InspirationMessageDto[] = [];\r\n public selectedItem: InspirationMessageDto | null = null;\r\n\r\n constructor () {\r\n super()\r\n this.fetch()\r\n }\r\n\r\n public selectItem (item: InspirationMessageDto) {\r\n this.selectedItem = item\r\n }\r\n\r\n public back () {\r\n if (this.selectedItem) {\r\n this.selectedItem = null\r\n } else {\r\n this.$router.go(-1)\r\n }\r\n }\r\n\r\n async fetch () {\r\n const api = new InspirationApi()\r\n try {\r\n const { data } = await api.inspirationGetInspirationMessages()\r\n this.inspirationItems = data\r\n } catch (e) {\r\n // ...\r\n }\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Inspiration.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Inspiration.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Inspiration.vue?vue&type=template&id=f7644274&\"\nimport script from \"./Inspiration.vue?vue&type=script&lang=ts&\"\nexport * from \"./Inspiration.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Inspiration.vue?vue&type=style&index=0&id=f7644274&prod&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 null,\n null\n \n)\n\nexport default component.exports","export function formatDate (date: string) {\r\n if (date === '') {\r\n return date\r\n }\r\n\r\n const objDate = new Date(date)\r\n if (!objDate) {\r\n return date\r\n }\r\n if (objDate.getFullYear() === 1) {\r\n return ''\r\n }\r\n const months = [\r\n 'januari',\r\n 'februari',\r\n 'maart',\r\n 'april',\r\n 'mei',\r\n 'juni',\r\n 'juli',\r\n 'augustus',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n return `${objDate.getDate()} ${months[objDate.getMonth()]} ${objDate.getFullYear()}`\r\n}\r\n"],"sourceRoot":""}