{"version":3,"sources":["webpack:///./src/views/admin/components/VideoItem.vue?43f3","webpack:///./src/views/admin/components/VideoItem.vue","webpack:///./src/views/admin/components/VideoItem.vue?1d2d","webpack:///./src/views/admin/components/VideoItem.vue?90ca","webpack:///../../../src/components/VTextarea/VTextarea.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","VDialog","attrs","model","value","callback","$$v","dialog","expression","VCard","staticClass","editing","VTextField","newTitle","_v","_s","video","Title","VSpacer","VMenu","scopedSlots","_u","key","fn","ref","on","VBtn","_g","VIcon","VList","VListItem","loading","$event","$t","remove","ID","Video","URI","VTextarea","newDescription","Description","edit","_e","staticStyle","_f","CreatedAt","staticRenderFns","VideoItem","data","videoId","editVideo","deleteVideo","Vue","__decorate","Prop","default","Action","Component","components","VideoPlayer","component","baseMixins","mixins","extend","name","props","autoGrow","Boolean","noResize","rowHeight","type","Number","String","validator","v","isNaN","parseFloat","rows","parseInt","computed","classes","noResizeHandle","options","call","watch","val","$nextTick","calculateInputHeight","$refs","input","_a","style","removeProperty","lazyValue","mounted","setTimeout","methods","height","scrollHeight","minHeight","Math","max","genInput","tag","onInput","e","onKeyDown","isFocused","keyCode","stopPropagation","$emit"],"mappings":"oSAiBIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAGE,EAAA,KAAQ,CAACC,MAAM,CAAC,YAAY,SAASC,MAAM,CAACC,MAAOT,EAAU,OAAEU,SAAS,SAAUC,GAAMX,EAAIY,OAAOD,GAAKE,WAAW,WAAW,CAACT,EAAGU,EAAA,KAAM,CAACV,EAAG,OAAW,CAACW,YAAY,UAAU,CAAGf,EAAIgB,QAAqDZ,EAAGa,EAAA,KAAW,CAACV,MAAM,CAAC,MAAQ,eAAeC,MAAM,CAACC,MAAOT,EAAY,SAAEU,SAAS,SAAUC,GAAMX,EAAIkB,SAASP,GAAKE,WAAW,cAA3K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,KAAK2F,wBAExBmB,UAAS,SAAED,GAIL7G,KAAK+G,WAA2B,KAAdF,EAAEG,SACtBH,EAAEI,kBAGJjH,KAAKkH,MAAM,UAAWL","file":"assets/js/chunk-0c7fbcd5.90037c88.js","sourcesContent":["import { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\nimport { VListItemContent } from 'vuetify/lib/components/VList';\nimport { VListItemSubtitle } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\n\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c(VDialog,{attrs:{\"max-width\":\"600px\"},model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c(VCard,[_c(VCardTitle,{staticClass:\"d-flex\"},[(!_vm.editing)?_c('div',[_vm._v(_vm._s(_vm.video.Title))]):_c(VTextField,{attrs:{\"label\":\"Video Title\"},model:{value:(_vm.newTitle),callback:function ($$v) {_vm.newTitle=$$v},expression:\"newTitle\"}}),_c(VSpacer),_c(VMenu,{attrs:{\"offset-y\":\"\",\"left\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c(VBtn,_vm._g({attrs:{\"icon\":\"\"}},on),[_c(VIcon,[_vm._v(\"mdi-dots-vertical\")])],1)]}}])},[_c(VList,{attrs:{\"dense\":\"\"}},[_c(VListItem,{attrs:{\"disabled\":_vm.loading},on:{\"click\":function($event){_vm.editing = true}}},[_c(VListItemSubtitle,[_c(VIcon,{staticClass:\"mr-2\",attrs:{\"left\":\"\",\"small\":\"\"}},[_vm._v(\"mdi-pencil\")]),_c('span',[_vm._v(_vm._s(_vm.$t(\"videos.edit\")))])],1)],1),_c(VListItem,{attrs:{\"disabled\":_vm.loading},on:{\"click\":_vm.remove}},[_c(VListItemSubtitle,[_c(VIcon,{staticClass:\"mr-2\",attrs:{\"left\":\"\",\"small\":\"\"}},[_vm._v(\"mdi-delete\")]),_c('span',[_vm._v(_vm._s(_vm.$t(\"videos.delete\")))])],1)],1)],1)],1),_c(VBtn,{attrs:{\"icon\":\"\"},on:{\"click\":function($event){_vm.dialog = false}}},[_c(VIcon,[_vm._v(\"mdi-close\")])],1)],1),_c(VCardText,[_c('VideoPlayer',{key:_vm.video.ID,attrs:{\"id\":_vm.video.ID,\"url\":_vm.video.Video.URI}}),_c('div',{staticClass:\"my-4\"}),(!_vm.editing)?_c('div',[_vm._v(_vm._s(_vm.video.Description))]):_c(VTextarea,{attrs:{\"label\":_vm.$t('videos.desc'),\"auto-grow\":\"\",\"rows\":\"2\"},model:{value:(_vm.newDescription),callback:function ($$v) {_vm.newDescription=$$v},expression:\"newDescription\"}})],1),(_vm.editing)?_c(VCardActions,[_c(VSpacer),_c(VBtn,{attrs:{\"elevation\":\"0\"},on:{\"click\":function($event){_vm.editing = false}}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"global.cancel\")))])]),_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"primary\"},on:{\"click\":_vm.edit}},[_c('span',[_vm._v(_vm._s(_vm.$t(\"videos.edit\")))])])],1):_vm._e()],1)],1),_c(VListItem,{on:{\"click\":function($event){_vm.dialog = true}}},[_c(VListItemContent,[_c('div',{staticClass:\"font-weight-bold text-overline\",staticStyle:{\"line-height\":\"16px\"}},[_c('span',{staticStyle:{\"letter-spacing\":\"2px\"}},[_vm._v(\"ID: #\"+_vm._s(_vm.video.ID))])]),_c(VListItemTitle,[_vm._v(_vm._s(_vm.video.Title))]),_c(VListItemSubtitle,[_c('span',[_vm._v(_vm._s(_vm._f(\"format\")(_vm.video.CreatedAt)))])])],1)],1)],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\r\nimport Vue from \"vue\";\r\nimport { Action } from \"vuex-class\";\r\nimport { HowToVideo } from \"@/core/models\";\r\nimport { Component, Prop } from \"vue-property-decorator\";\r\nimport VideoPlayer from \"@/components/common/VideoPlayer.vue\";\r\n\r\n@Component({ components: { VideoPlayer } })\r\nexport default class VideoItem extends Vue {\r\n @Prop({ default: () => {} }) video!: HowToVideo;\r\n @Action(\"displaySnackbar\") displaySnackbar!: (msg: string) => void;\r\n @Action(\"howTos/editVideo\") editVideo!: Function;\r\n @Action(\"howTos/deleteVideo\") deleteVideo!: Function;\r\n\r\n dialog = false;\r\n loading = false;\r\n editing = false;\r\n newTitle = this.video.Title;\r\n newDescription = this.video.Description;\r\n\r\n async edit() {\r\n const data = {\r\n videoId: this.video.ID,\r\n newTitle: this.newTitle,\r\n newDescription: this.newDescription,\r\n };\r\n await this.editVideo(data);\r\n }\r\n\r\n async remove() {\r\n this.deleteVideo({ videoId: this.video.ID });\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!./VideoItem.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!./VideoItem.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./VideoItem.vue?vue&type=template&id=10778b63&\"\nimport script from \"./VideoItem.vue?vue&type=script&lang=ts&\"\nexport * from \"./VideoItem.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 null,\n null\n \n)\n\nexport default component.exports","// Styles\nimport './VTextarea.sass'\n\n// Extensions\nimport VTextField from '../VTextField/VTextField'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\n// Types\nimport Vue from 'vue'\n\ninterface options extends Vue {\n $refs: {\n input: HTMLTextAreaElement\n }\n}\n\nconst baseMixins = mixins\n>(\n VTextField\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-textarea',\n\n props: {\n autoGrow: Boolean,\n noResize: Boolean,\n rowHeight: {\n type: [Number, String],\n default: 24,\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n rows: {\n type: [Number, String],\n default: 5,\n validator: (v: any) => !isNaN(parseInt(v, 10)),\n },\n },\n\n computed: {\n classes (): object {\n return {\n 'v-textarea': true,\n 'v-textarea--auto-grow': this.autoGrow,\n 'v-textarea--no-resize': this.noResizeHandle,\n ...VTextField.options.computed.classes.call(this),\n }\n },\n noResizeHandle (): boolean {\n return this.noResize || this.autoGrow\n },\n },\n\n watch: {\n autoGrow (val: boolean) {\n this.$nextTick(() => {\n val\n ? this.calculateInputHeight()\n : this.$refs.input?.style.removeProperty('height')\n })\n },\n lazyValue () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n rowHeight () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n },\n\n mounted () {\n setTimeout(() => {\n this.autoGrow && this.calculateInputHeight()\n }, 0)\n },\n\n methods: {\n calculateInputHeight () {\n const input = this.$refs.input\n if (!input) return\n\n input.style.height = '0'\n const height = input.scrollHeight\n const minHeight = parseInt(this.rows, 10) * parseFloat(this.rowHeight)\n // This has to be done ASAP, waiting for Vue\n // to update the DOM causes ugly layout jumping\n input.style.height = Math.max(minHeight, height) + 'px'\n },\n genInput () {\n const input = VTextField.options.methods.genInput.call(this)\n\n input.tag = 'textarea'\n delete input.data!.attrs!.type\n input.data!.attrs!.rows = this.rows\n\n return input\n },\n onInput (e: Event) {\n VTextField.options.methods.onInput.call(this, e)\n this.autoGrow && this.calculateInputHeight()\n },\n onKeyDown (e: KeyboardEvent) {\n // Prevents closing of a\n // dialog when pressing\n // enter\n if (this.isFocused && e.keyCode === 13) {\n e.stopPropagation()\n }\n\n this.$emit('keydown', e)\n },\n },\n})\n"],"sourceRoot":""}