"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[8203],{6975:function(t,e,s){s.r(e),s.d(e,{default:function(){return c}});var a=function(){var t=this,e=t._self._c;return e("Modal",{ref:"modal",attrs:{title:t.field.DOCPROP_NAME,fullHeight:!0,large:!0,autoOpen:!0},on:{opened:t.opened,closing:t.closing}},[e("div",{staticClass:"uk-padding-small",staticStyle:{"flex-grow":"1","min-height":"1px",overflow:"auto","padding-bottom":"0"}},[e("textarea",{ref:"inputValue",staticClass:"uk-textarea",staticStyle:{height:"100%"},attrs:{readonly:t.readonly,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"},on:{keydown:t.keydown}})]),e("div",{staticClass:"uk-padding-small"},[t.readonly?e("div",{staticClass:"uk-text-small uk-text-muted uk-float-left"},[t._v(' Только для чтения, "ESC" - выход ')]):e("div",{staticClass:"uk-text-small uk-text-muted uk-float-left"},[t._v(' "ESC" - отмена, "CTRL+ENTER" - сохранить и выйти ')]),e("div",{staticClass:"uk-text-right"},[e("button",{staticClass:"uk-button",attrs:{type:"button"},on:{click:t.close}},[t._v(" Отмена ")]),e("button",{staticClass:"uk-button uk-button-primary uk-border-rounded",attrs:{disabled:t.readonly,type:"button"},on:{click:t.save}},[t._v(" Сохранить ")])])])])},l=[],i=(s(3216),s(4041)["A"]),n={name:"textModal",components:{Modal:()=>s.e(8362).then(s.bind(s,2215))},data(){return{refresh:null,saving:!1}},props:{field:Object,value:{type:String,default:null}},computed:{readonly(){return!!this.field.DOCPROP_READONY}},created(){},async mounted(){this.refresh=null,this.saving=!1},methods:{keydown(t){t.ctrlKey&&13===t.keyCode&&setTimeout((()=>{this.save().then()}),0)},opened(){this.$refs.inputValue.value=this.value,this.$refs.inputValue.focus(),this.$refs.inputValue.select()},closing(){this.saving||this.$emit("close")},async save(){if(this.readonly)this.close();else try{let t=this.$refs.inputValue.value;this.saving=!0,this.$emit("change",{value:t,display:t}),this.$refs.modal.close()}catch(t){i.alert(t)}},close(){this.$refs.modal.close()}}},o=n,u=s(1656),r=(0,u.A)(o,a,l,!1,null,null,null),c=r.exports}}]);
//# sourceMappingURL=FieldTextModal.7d528993.js.map