{"version":3,"sources":["webpack:///./src/components/UserContent.vue?66a8","webpack:///./src/components/UserContent.vue?f75d","webpack:///./src/components/UserContent.vue?2726","webpack:///./src/components/UserContent.vue","webpack:///./src/components/UserContent.vue?0c60","webpack:///./src/views/ContentPage.vue?0fb7","webpack:///./src/views/ContentPage.vue?f340","webpack:///./src/views/ContentPage.vue?482c","webpack:///./src/views/ContentPage.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","isLoading","isAdmin","isEditing","class","active","on","$event","_v","_e","save","editor","scopedSlots","_u","key","fn","ref","commands","isActive","bold","italic","strike","underline","paragraph","heading","level","bullet_list","ordered_list","horizontal_rule","isImage","undo","redo","fileAdded","target","files","image","directives","name","rawName","value","expression","domProps","composing","imageLink","setLinkImage","hideLinkMenu","getMarkAttrs","menu","style","preventDefault","setLinkUrl","link","linkUrl","type","indexOf","_k","keyCode","showLinkMenu","staticRenderFns","mixins","errorHandlingApiResponse","components","LoadingBlock","EditorMenuBubble","EditorMenuBar","EditorContent","props","page","String","default","data","contentId","html","linkMenuIsActive","VUE_APP_BACKEND_URI","computed","methods","command","url","src","file","reader","FileReader","readAsDataURL","onload","uploadFile","result","base64","uploadContentImage","fileBase64","then","response","uri","catch","error","getSnackbarText","status","finally","saveContent","id","locale","i18n","showImagePrompt","prompt","href","$nextTick","$refs","linkInput","focus","initEditor","console","log","editable","extensions","levels","content","onUpdate","getHTML","watch","setOptions","created","getContent","x","component","componentKey","pageName","UserContent","TheBannerSmall","BasePage","publicCheckMixin","$route","params"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAAgB,CAACE,YAAY,oBAAoBC,MAAM,CAAC,QAAUP,EAAIQ,YAAY,CAAER,EAAIS,UAAYT,EAAIU,UAAWN,EAAG,SAAS,CAACE,YAAY,oCAAoCK,MAAM,CAAEC,OAAQZ,EAA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213.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('loading-block',{staticClass:\"position-relative\",attrs:{\"loading\":_vm.isLoading}},[(_vm.isAdmin && !_vm.isEditing)?_c('button',{staticClass:\"btn btn-outline-primary mr-2 mb-2\",class:{ active: _vm.isEditing },attrs:{\"type\":\"button\"},on:{\"click\":function($event){_vm.isEditing = true}}},[_vm._v(\" Aanpassen \")]):_vm._e(),(_vm.isAdmin && _vm.isEditing)?_c('button',{staticClass:\"btn btn-outline-primary mr-2 mb-2\",class:{ active: _vm.isEditing },attrs:{\"type\":\"button\"},on:{\"click\":function($event){_vm.isEditing = false;\n _vm.save();}}},[_vm._v(\" Opslaan \")]):_vm._e(),(_vm.isEditing)?_c('editor-menu-bar',{attrs:{\"editor\":_vm.editor},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\n var commands = ref.commands;\n var isActive = ref.isActive;\nreturn [_c('div',[_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.bold() },on:{\"click\":commands.bold}},[_c('font-awesome-icon',{attrs:{\"icon\":\"bold\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.italic() },on:{\"click\":commands.italic}},[_c('font-awesome-icon',{attrs:{\"icon\":\"italic\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.strike() },on:{\"click\":commands.strike}},[_c('font-awesome-icon',{attrs:{\"icon\":\"strikethrough\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.underline() },on:{\"click\":commands.underline}},[_c('font-awesome-icon',{attrs:{\"icon\":\"underline\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.paragraph() },on:{\"click\":commands.paragraph}},[_c('font-awesome-icon',{attrs:{\"icon\":\"paragraph\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.heading({ level: 1 }) },on:{\"click\":function($event){return commands.heading({ level: 1 })}}},[_vm._v(\" H1 \")]),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.heading({ level: 2 }) },on:{\"click\":function($event){return commands.heading({ level: 2 })}}},[_vm._v(\" H2 \")]),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.heading({ level: 3 }) },on:{\"click\":function($event){return commands.heading({ level: 3 })}}},[_vm._v(\" H3 \")]),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.bullet_list() },on:{\"click\":commands.bullet_list}},[_c('font-awesome-icon',{attrs:{\"icon\":\"list-ul\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",class:{ active: isActive.ordered_list() },on:{\"click\":commands.ordered_list}},[_c('font-awesome-icon',{attrs:{\"icon\":\"list-ol\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",on:{\"click\":commands.horizontal_rule}},[_vm._v(\" - \")]),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",on:{\"click\":function($event){_vm.isImage = true}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"image\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",on:{\"click\":commands.undo}},[_c('font-awesome-icon',{attrs:{\"icon\":\"undo\"}})],1),_c('button',{staticClass:\"btn btn-sm btn-outline-secondary mr-2 mb-2\",on:{\"click\":commands.redo}},[_c('font-awesome-icon',{attrs:{\"icon\":\"redo\"}})],1),(_vm.isImage)?_c('b-modal',{attrs:{\"no-fade\":\"\",\"visible\":\"\",\"hide-footer\":\"\"},on:{\"hidden\":function($event){_vm.isImage = false}}},[_c('b-form-file',{attrs:{\"placeholder\":\"Upload\",\"accept\":\"image/jpeg\"},on:{\"change\":function($event){return _vm.fileAdded($event.target.files[0], commands.image)}}}),_c('hr'),_c('div',{staticClass:\"input-group mb-3\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.imageLink),expression:\"imageLink\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"placeholder\":\"Url\"},domProps:{\"value\":(_vm.imageLink)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.imageLink=$event.target.value}}}),_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-primary\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.setLinkImage(commands.image)}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"check\"}})],1)])])],1):_vm._e()],1)]}}],null,false,4174171869)}):_vm._e(),(_vm.isEditing)?_c('editor-menu-bubble',{staticClass:\"menububble mb-1\",attrs:{\"editor\":_vm.editor},on:{\"hide\":_vm.hideLinkMenu},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\n var commands = ref.commands;\n var isActive = ref.isActive;\n var getMarkAttrs = ref.getMarkAttrs;\n var menu = ref.menu;\nreturn [_c('div',{staticClass:\"menububble\",class:{ 'is-active': menu.isActive },style:((\"left: \" + (menu.left) + \"px; bottom: \" + (menu.bottom) + \"px;\"))},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl(commands.link, _vm.linkUrl)}}},[_c('div',{staticClass:\"input-group input-group-sm\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"form-control\",attrs:{\"placeholder\":\"https://\",\"type\":\"text\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-secondary\",attrs:{\"type\":\"button\",\"id\":\"button-addon2\"},on:{\"click\":function($event){return _vm.setLinkUrl(commands.link, null)}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"times\"}})],1)])])]):[_c('button',{staticClass:\"btn btn-sm btn-secondary\",class:{ 'is-active': isActive.link() },on:{\"click\":function($event){_vm.showLinkMenu(getMarkAttrs('link'))}}},[_c('font-awesome-icon',{attrs:{\"icon\":\"link\"}})],1)]],2)]}}],null,false,2308086707)}):_vm._e(),(_vm.editor)?_c('editor-content',{staticClass:\"editor-content mt-4\",attrs:{\"editor\":_vm.editor}}):_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\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\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Editor, EditorContent, EditorMenuBar } from \"tiptap\";\nimport {\n HardBreak,\n Heading,\n HorizontalRule,\n OrderedList,\n BulletList,\n ListItem,\n TodoItem,\n TodoList,\n Bold,\n Italic,\n Link,\n Strike,\n Underline,\n History,\n Image\n} from \"tiptap-extensions\";\nimport EditorMenuBubble from \"tiptap/src/Components/EditorMenuBubble\";\nimport { mapGetters } from \"vuex\";\nimport { apiClient } from \"@/services/api-client\";\nimport { i18n } from \"@/plugins/i18n\";\nimport LoadingBlock from \"@/components/LoadingBlock.vue\";\nimport { errorHandlingApiResponse } from \"@/mixins/errorHandlingApiResponse\";\n\nexport default {\n name: \"UserContent\",\n mixins: [errorHandlingApiResponse],\n components: {\n LoadingBlock,\n EditorMenuBubble,\n EditorMenuBar,\n EditorContent\n },\n props: {\n page: {\n type: String,\n default: null\n }\n },\n data() {\n return {\n imageLink: null,\n isImage: false,\n isLoading: false,\n contentId: null,\n html: null,\n isEditing: false,\n linkMenuIsActive: false,\n linkUrl: null,\n editor: null,\n VUE_APP_BACKEND_URI: process.env.VUE_APP_BACKEND_URI\n };\n },\n computed: {\n ...mapGetters([\"isAdmin\"])\n },\n methods: {\n setLinkImage(command) {\n const url = this.imageLink;\n\n if (url !== null) {\n command({\n src: url\n });\n\n this.imageLink = null;\n this.isImage = false;\n }\n },\n fileAdded(file, command) {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n this.uploadFile(reader.result, command);\n };\n },\n uploadFile(base64, command) {\n this.isLoading = true;\n\n apiClient\n .uploadContentImage({\n fileBase64: base64\n })\n .then(response => {\n command({\n src: `${this.VUE_APP_BACKEND_URI}/${response.uri}`\n });\n this.isImage = false;\n })\n .catch(error => {\n errorHandlingApiResponse.methods.getSnackbarText(error.status);\n })\n .finally(() => {\n this.isLoading = false;\n });\n },\n save() {\n this.isLoading = true;\n\n apiClient\n .saveContent({\n id: this.contentId,\n html: this.html,\n locale: i18n.locale,\n page: this.page\n })\n .then()\n .catch(error => {\n errorHandlingApiResponse.methods.getSnackbarText(error.status);\n })\n .finally(() => {\n this.isLoading = false;\n });\n },\n showImagePrompt(command) {\n const src = prompt(\"Enter the url of your image here\");\n if (src !== null) {\n command({ src });\n }\n },\n showLinkMenu(attrs) {\n this.linkUrl = attrs.href;\n this.linkMenuIsActive = true;\n this.$nextTick(() => {\n this.$refs.linkInput.focus();\n });\n },\n hideLinkMenu() {\n this.linkUrl = null;\n this.linkMenuIsActive = false;\n },\n setLinkUrl(command, url) {\n command({ href: url });\n this.hideLinkMenu();\n this.editor.focus();\n },\n initEditor() {\n console.log(\"Init editor\");\n console.log(this.html);\n this.editor = new Editor({\n editable: false,\n extensions: [\n new BulletList(),\n new HardBreak(),\n new Heading({ levels: [1, 2, 3] }),\n new HorizontalRule(),\n new ListItem(),\n new OrderedList(),\n new TodoItem(),\n new TodoList(),\n new Link(),\n new Bold(),\n new Italic(),\n new Strike(),\n new Underline(),\n new History(),\n new Image()\n ],\n content: this.html,\n onUpdate: ({ getHTML }) => {\n this.html = getHTML();\n }\n });\n }\n },\n watch: {\n isEditing() {\n this.editor.setOptions({\n editable: this.isEditing\n });\n }\n },\n created() {\n this.isLoading = true;\n\n apiClient\n .getContent({\n locale: i18n.locale,\n page: this.page\n })\n .then(x => {\n this.html = x.html;\n this.contentId = x.id;\n this.initEditor();\n })\n .catch(error => {\n errorHandlingApiResponse.methods.getSnackbarText(error.status);\n })\n .finally(() => {\n this.isLoading = false;\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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserContent.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserContent.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UserContent.vue?vue&type=template&id=eef632e8&scoped=true&\"\nimport script from \"./UserContent.vue?vue&type=script&lang=ts&\"\nexport * from \"./UserContent.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./UserContent.vue?vue&type=style&index=0&id=eef632e8&lang=scss&scoped=true&\"\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 \"eef632e8\",\n null\n \n)\n\nexport default component.exports","import mod 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/lib/loader.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!./UserContent.vue?vue&type=style&index=0&id=eef632e8&lang=scss&scoped=true&\"; export default mod; 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/lib/loader.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!./UserContent.vue?vue&type=style&index=0&id=eef632e8&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('base-page',[_c('the-banner-small'),_c('div',{staticClass:\"container\"},[_c('user-content',{key:_vm.componentKey,staticClass:\"mt-4\",attrs:{\"page\":_vm.pageName}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport BasePage from \"@/components/Base/BasePage.vue\";\nimport TheBannerSmall from \"@/components/The/TheBannerSmall.vue\";\nimport UserContent from \"@/components/UserContent.vue\";\nimport { i18n } from \"@/plugins/i18n\";\nimport { publicCheckMixin } from \"@/mixins/publicCheckMixin\";\n\nexport default {\n name: \"ContentPage\",\n components: { UserContent, TheBannerSmall, BasePage },\n mixins: [publicCheckMixin],\n computed: {\n locale() {\n return i18n.locale;\n },\n pageName() {\n return this.$route.params.name;\n },\n componentKey() {\n return this.locale + this.pageName;\n }\n },\n created() {}\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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContentPage.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContentPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ContentPage.vue?vue&type=template&id=420620e8&scoped=true&\"\nimport script from \"./ContentPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./ContentPage.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 \"420620e8\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}