"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[8729],{2428:function(t,e,s){s.r(e),s.d(e,{default:function(){return d}});var l=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("HtmlEditor",{ref:"html",attrs:{value:t.value},on:{change:function(e){t.newValue=e},ctrlEnter:t.save}})],1),e("div",{staticClass:"uk-padding-small"},[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(" Сохранить ")])])])])},a=[],i=s(4041)["A"],n={name:"HtmlModal",components:{Modal:()=>s.e(8362).then(s.bind(s,2215)),HtmlEditor:()=>s.e(2235).then(s.bind(s,1642))},data(){return{newValue:"",refresh:null,saving:!1}},props:{field:Object,value:{type:String,default:""}},computed:{readonly(){return!!this.field.DOCPROP_READONY}},created(){this.value&&(this.newValue=this.value)},async mounted(){this.refresh=null,this.saving=!1},methods:{opened(){this.$refs.html.focus(),this.$refs.html.select()},closing(){this.saving||this.$emit("close")},async save(){if(this.readonly)this.close();else try{this.saving=!0,this.$emit("change",{value:this.newValue,display:this.newValue}),this.$refs.modal.close()}catch(t){i.alert(t)}},close(){this.$refs.modal.close()}}},o=n,u=s(1656),r=(0,u.A)(o,l,a,!1,null,null,null),d=r.exports}}]);
//# sourceMappingURL=FieldHtmlModal.0f8def31.js.map