"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[3156],{4795:function(e,t,i){i.r(t),i.d(t,{default:function(){return h}});var n=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"flex-grow":"1","border-bottom":"1px solid #008FEF",cursor:"pointer"},on:{click:e.edit}},[e.editing&&e.editComponent.inline?e._e():t("span",[e._v(e._s(e.value.display))]),e.editing?t(e.editComponent.component,{ref:"editor",tag:"component",attrs:{value:e.value.value,field:e.fakeField},on:{close:function(t){e.editing=!1},change:e.changeValue,"document-open":function(t){return e.$emit("document-open",t)}}}):e._e()],1)},a=[],o={name:"actionParam",props:{value:Object},data(){return{fakeField:null,dataType:null,editComponent:null,editing:!1}},async mounted(){},beforeDestroy(){},methods:{async edit(){this.fields||(this.fields=await i.e(6756).then(i.bind(i,6104)),this.fields=this.fields.default),this.fakeField=this.makeFakeField(this.value.param),this.dataType=this.fields.getDataType(this.fakeField),this.editComponent=this.fields.getComponent(this.fakeField),"buttonsYesNo"===this.editComponent.name&&(this.editComponent.name="autoYesNo",this.editComponent.component=()=>i.e(2700).then(i.bind(i,1439)),this.editComponent.inline=!1),"document"===this.editComponent.name&&(this.editComponent.component=()=>i.e(1136).then(i.bind(i,4097))),this.editing=!0,this.$emit("startEdit")},save(){this.editing&&this.$refs.editor&&this.$refs.editor.save()},changeValue(e){this.editing=!1,e.dataType=this.dataType,console.log("changeValue",e),this.$emit("change",e)},makeFakeField(e){return{DOCPROP_ID:e.PARAM_ID,DOCPROP_NAME:e.PARAM_DESCR,DOCPROP_DESCR:e.PARAM_NAME,DOCPROP_KIND:parseInt(e.DATATYPE),DOCPROP_OBJECT:e.PATTERN?e.PATTERN:e.OBJECT_PARAM,DOCPROP_MULTI:parseInt(e.MULTI_PARAM),DOCPROP_SQL:""}}}},s=o,d=i(1656),l=(0,d.A)(s,n,a,!1,null,null,null),h=l.exports}}]);
//# sourceMappingURL=ActionParam.64b8e154.js.map