{"version":3,"sources":["webpack:///./src/components/email_admin.vue","webpack:///src/components/email_admin.vue","webpack:///./src/components/email_admin.vue?69c4","webpack:///./src/components/email_admin.vue?44d6","webpack:///../../../src/components/VTextarea/VTextarea.ts"],"names":["expression","_c","attrs","staticClass","_vm","model","value","active_item","callback","staticStyle","sabira_users","sabira_template","$$v","_l","key","index","scopedSlots","proxy","recipient","email","recipients","add_recipient","_e","is_loading","on","render","staticRenderFns","component","baseMixins","extend","name","props","autoGrow","Boolean","noResize","rowHeight","type","Number","String","default","validator","v","isNaN","parseFloat","rows","parseInt","computed","this","noResizeHandle","options","classes","call","watch","val","$nextTick","calculateInputHeight","$refs","input","style","removeProperty","setTimeout","methods","height","scrollHeight","minHeight","Math","max","genInput","tag","data","e","onInput","isFocused","keyCode","stopPropagation","$emit"],"mappings":"0RAA4M,W,IAACA,OAAmB,aAAC,OAAM,SAAUC,CAAgBC,MAAM,CAAC,MAAQ,QAAsB,WAAO,GAAE,eAAsBC,OAAmBD,MAAM,SAAC,SAAO,YAAgB,EAAM,OAAK,GAAiB,WAAO,WAAU,CAACD,EAAG,iBAAmBG,CAAqDD,OAAqBF,MAAG,sBAAgBC,KAAM,K,CAAe,gBAAgB,C,YAAY,O,MAAO,CAAa,qBAACG,KAAM,KAACC,YAAWC,EAAqBC,KAAQ,WAA0D,EAAC,mD,YAAW,QAAsB,WAAG,MAAI,CAAYC,SAAY,GAAC,eAAqB,gBAACP,QAAM,IAA2B,MAAC,CAACG,MAAM,sBAACC,SAAU,SAACI,GAAcF,OAAS,cAAe,cAAqB,WAAC,yBAA0B,UAAG,YAAI,CAAYC,aAAY,SAAqB,MAAC,CAACP,MAAM,oBAA0B,MAAC,CAACG,MAAM,eAACC,SAAU,SAACK,GAAiBH,eAAmBI,GAA6B,WAAC,kBAA6B,UAAG,YAAMF,CAAyCP,aAAY,S,MAAc,CAA2B,yBAGpsC,MAAKU,CAA0D,MAAS,EAAC,gBAAOC,SAAS,SAAO,GAACL,kBAAY,G,WA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A8B,aAAC,mBAAoDF,EAAM,qDAAC,YAAcqB,C,YAAkB,cAAG,WAACC,MAAG,CAAC,KAAO,I,GAAyC,CAAC,kBAAIpB,OAAOA,EAAM,8BAI91E,GAASqB,iBAAQC,UAAe,U,kIC2HhC,G,UAAA,CACA,YACA,4DACA,0EAEA,OACA,SACA,aACA,YAEA,SACA,YACA,cAEA,QACA,YACA,cAEA,YACA,WACA,gBAEA,SACA,YACA,cAEA,aACA,WACA,gBAEA,OACA,YACA,eAGA,OACA,OACA,mBACA,gBACA,cACA,UACA,aACA,aACA,aACA,cACA,QACA,iEACA,+BACA,+BACA,MAEA,eACA,cAEA,OACA,OACA,6BACA,SACA,uDACA,uCAKA,OACA,SACA,UACA,0BAEA,cAEA,UACA,IACA,4DACA,wDAGA,iBACA,yCAGA,SACA,UACA,uCAEA,cAEA,QACA,UACA,iDAMA,oCALA,yBACA,mCACA,uCAMA,cAEA,YACA,UACA,6CAEA,cAEA,SACA,UACA,uCAEA,cAEA,aACA,UACA,+CAEA,eAGA,SACA,WACA,2BACA,SACA,0CAGA,OAFA,UACA,yCAGA,2CACA,gCAGA,OAFA,UACA,uCAIA,GACA,OAIA,wBACA,gDACA,mCACA,+BACA,kCACA,gBACA,oBAKA,0BACA,+CAEA,2BACA,wDACA,kBACA,aACA,aACA,cACA,QACA,mCACA,sCAEA,eACA,cAEA,qBACA,yBAEA,oBACA,yCAEA,gBACA,0DAEA,aACA,wBACA,oBAEA,YAEA,mBACA,OACA,iCACA,uCACA,iCACA,+BACA,WACA,yCACA,oDAGA,YACA,cACA,+BACA,SAEA,SACA,eACA,2CACA,eACA,kCACA,cAEA,iCAEA,2CACA,aACA,wCACA,gBAIA,UACA,2CACA,aACA,UACA,gBAGA,aACA,uBAIA,UACA,8BAEA,YACA,kCCxWoV,I,YCOhVC,EAAY,eACd,EACA,EACAD,GACA,EACA,KACA,KACA,MAIa,aAAAC,E,2CClBf,sCAkBA,MAAMC,EAAa,eAGjB,QAIa,OAAAA,EAA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AILvB,KAAKyB,WAA2B,KAAdF,EAAEG,SACtBH,EAAEI,kBAGJ3B,KAAK4B,MAAM,UAAWL","file":"js/chunk-1dba2dd4.3ab8bb81.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-dialog',{attrs:{\"width\":\"40rem\",\"persistent\":\"\",\"scrollable\":\"\"},model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',[_c('v-toolbar',{attrs:{\"color\":\"primary white--text\",\"flat\":\"\"}},[_c('sabira_icon',{staticClass:\"mr-3\",attrs:{\"icon\":\"email_invoice\",\"size\":\"42\",\"strokewidth\":3,\"fill\":\"white\"}}),_c('v-toolbar-title',[_vm._v(\"Admin email sistem\")])],1),_c('v-card-text',{staticClass:\"pa-4\"},[_c('v-text-field',{attrs:{\"outlined\":\"\",\"label\":\"Naslov\",\"maxlength\":\"100\",\"counter\":\"\"},model:{value:(_vm.active_item.subject),callback:function ($$v) {_vm.$set(_vm.active_item, \"subject\", $$v)},expression:\"active_item.subject\"}}),_c('v-switch',{staticStyle:{\"margin-top\":\"-1rem\"},attrs:{\"label\":\"SABIRA korisnici\"},model:{value:(_vm.sabira_users),callback:function ($$v) {_vm.sabira_users=$$v},expression:\"sabira_users\"}}),_c('v-switch',{staticStyle:{\"margin-top\":\"-1rem\"},attrs:{\"label\":\"SABIRA template\"},model:{value:(_vm.sabira_template),callback:function ($$v) {_vm.sabira_template=$$v},expression:\"sabira_template\"}}),(_vm.sabira_users)?_c('webpage_lookup_users',{staticClass:\"mb-7\",attrs:{\"update\":\"wp_user_changed\",\"selected_id\":typeof _vm.active_item.user_id !== 'undefined' &&\n _vm.active_item.user_id !== null\n ? _vm.active_item.user_id\n : null}}):_vm._l((_vm.active_item.recipients),function(recipient,index){return _c('div',{key:'r_' + index,staticStyle:{\"display\":\"grid\",\"grid-column-gap\":\"1rem\",\"grid-template-columns\":\"1fr 1fr\",\"align-items\":\"center\"}},[_c('div',{staticStyle:{\"display\":\"grid\",\"grid-template-columns\":\"max-content 1fr\",\"align-items\":\"center\"}},[(index > 0)?_c('v-btn',{staticClass:\"mb-8\",attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.remove_recipient(index)}}},[_c('sabira_icon',{attrs:{\"icon\":\"trash\"}})],1):_c('div',[_vm._v(\" \")]),_c('v-text-field',{attrs:{\"outlined\":\"\",\"label\":\"Naziv primaoca\",\"counter\":\"\",\"maxlength\":\"50\"},model:{value:(recipient.name),callback:function ($$v) {_vm.$set(recipient, \"name\", $$v)},expression:\"recipient.name\"}})],1),_c('div',{staticStyle:{\"display\":\"grid\",\"grid-template-columns\":\"1fr max-content\",\"align-items\":\"center\"}},[_c('v-text-field',{staticClass:\"mb-0\",attrs:{\"type\":\"email\",\"rules\":[_vm.rules.email.regex],\"outlined\":\"\",\"label\":\"Email primaoca\",\"counter\":\"\",\"maxlength\":\"100\"},scopedSlots:_vm._u([{key:\"prepend-inner\",fn:function(){return [_c('sabira_icon',{staticClass:\"mr-2\",attrs:{\"icon\":\"at-sign\"}})]},proxy:true}],null,true),model:{value:(recipient.email),callback:function ($$v) {_vm.$set(recipient, \"email\", $$v)},expression:\"recipient.email\"}}),(index == _vm.recipients.length - 1)?_c('v-btn',{staticClass:\"mb-8\",attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.add_recipient()}}},[_c('sabira_icon',{attrs:{\"icon\":\"plus\"}})],1):_vm._e()],1)])}),_c('v-textarea',{attrs:{\"label\":\"Poruka\",\"clearable\":\"\",\"outlined\":\"\",\"counter\":\"\",\"maxlength\":\"1000\"},model:{value:(_vm.active_item.message),callback:function ($$v) {_vm.$set(_vm.active_item, \"message\", $$v)},expression:\"active_item.message\"}}),_vm._l((_vm.active_item.attachments),function(attachment,index){return _c('v-chip',{key:'a_' + index,staticClass:\"pl-2\",attrs:{\"label\":\"\",\"color\":\"primary\"}},[_c('sabira_icon',{staticClass:\"left mr-2\",attrs:{\"width\":20,\"fill\":\"white\",\"icon\":\"file-pdf\"}}),_vm._v(\"\\n \"+_vm._s(attachment.filename)+\"\\n \")],1)})],2),_c('v-card-actions',{staticClass:\"background\"},[_c('v-btn',{attrs:{\"text\":\"\"},on:{\"click\":function($event){return _vm.close_email_admin_dialog()}}},[_vm._v(\"Odustani\")]),_c('v-spacer'),_c('v-btn',{attrs:{\"loading\":_vm.is_loading,\"text\":\"\"},on:{\"click\":function($event){return _vm.send_email()}}},[_vm._v(_vm._s(_vm.$t(\"send\")))])],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./email_admin.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./email_admin.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./email_admin.vue?vue&type=template&id=f2ad3ea2\"\nimport script from \"./email_admin.vue?vue&type=script&lang=js\"\nexport * from \"./email_admin.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","// 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":""}