UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

2 lines (1 loc) 21.5 kB
(function(p,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("../button-edit/index.umd.js"),require("../tree-grid/index.umd.js"),require("../radio-group/index.umd.js"),require("../common/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../locale/index.umd.js"),require("../property-panel/index.umd.js"),require("lodash-es"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../button-edit/index.umd.js","../tree-grid/index.umd.js","../radio-group/index.umd.js","../common/index.umd.js","../dynamic-resolver/index.umd.js","../locale/index.umd.js","../property-panel/index.umd.js","lodash-es","../notify/index.umd.js"],t):(p=typeof globalThis<"u"?globalThis:p||self,t(p["binding-selector"]={},p.Vue,p.FButtonEdit,p.FTreeGrid,p.FRadioGroup,p.common,p.dynamicResolver,p.locale,p.propertyPanel,p.LodashES,p.notify))})(this,function(p,t,k,re,de,H,ce,Y,q,ee,ue){"use strict";var ge=Object.defineProperty;var he=(p,t,k)=>t in p?ge(p,t,{enumerable:!0,configurable:!0,writable:!0,value:k}):p[t]=k;var D=(p,t,k)=>he(p,typeof t!="symbol"?t+"":t,k);const me={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/binding-selector.schema.json",title:"binding-selector",description:"字段绑定选择器",type:"object",properties:{disabled:{description:"",type:"boolean",default:!1},readonly:{description:"",type:"boolean",default:!1},bindingType:{description:"",type:"object",default:{}},idField:{description:"",type:"string",default:"id"},title:{description:"",type:"string",default:"字段选择器"},modalWidth:{description:"",type:"number",default:800},modalHeight:{description:"",type:"number",default:600},separator:{description:"",type:"string",default:","},bindingData:{description:"",type:"array",default:[]},textField:{description:"",type:"string",default:"code"},editorParams:{description:"",type:"object",default:{}}}},z=[{field:"name",title:"名称"},{field:"bindingField",title:"绑定字段"},{field:"fieldType",title:"字段类型"}],J=[{field:"name",title:"名称"},{field:"code",title:"编号"},{field:"displayTypeName",title:"变量类型"}],te=[{value:"Form",text:"绑定字段"},{value:"LocaleVariable",text:"绑定组件变量"},{value:"RemoteVariable",text:"绑定表单变量"}],_={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},modelValue:{type:Object,default:null},bindingType:{type:Object,default:{enable:!0,value:"Form",textField:"text",valueField:"value"}},data:{type:Array,default:[]},idField:{type:String,default:"id"},title:{type:String,default:"字段选择器"},modalWidth:{type:Number,default:800},modalHeight:{type:Number,default:600},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},bindingData:{type:Array,default:[]},textField:{type:String,default:"code"},beforeOpenDialog:{type:Function,default:null},editorParams:{type:Object,default:null},onFieldSelected:{type:Function,default:null},showCustomFooter:{type:Boolean,default:!1}},ne=ce.createPropsResolver(_,me),fe={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object},safeHtml:{type:Boolean,default:!0}},pe={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Q=t.defineComponent({name:"Toast",props:pe,emits:["close","click"],setup:(e,o)=>{const l=t.ref(e.animate),s="fadeOut",a=t.computed(()=>e.options),u=t.ref(!1),f=t.computed(()=>a.value.title&&a.value.message),m=t.computed(()=>!a.value.title&&a.value.message),N=t.computed(()=>{const h={animated:u.value,toast:!0,"toast--only-content":!f.value};return h[e.animate]=!1,h[s]=u.value,h["toasty-type-"+a.value.type]=!0,a.value.theme&&(h[a.value.theme]=!0),h}),b=t.computed(()=>{const T=`f-icon-${a.value&&a.value.type?a.value.type.replace("toasty-type-",""):"default"}`,M={"f-icon":!0};return M[T]=!0,M}),x=t.computed(()=>a.value.title||a.value.message),v=t.computed(()=>e.showCloseButton),V=t.computed(()=>!!a.value.buttons||!!o.slots.default),C=t.computed(()=>Y.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function w(h){h.stopPropagation(),h.preventDefault(),u.value=!1,setTimeout(()=>{o.emit("close",a.value)},200)}function $(h,B){}function R(h){return`f-preten-link ${h.customClass?h.customClass:""}`}t.watch(l,()=>{l.value});const E=()=>{var h;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"after-toast-msg text-right"},[!o.slots.default&&((h=a.value.buttons)==null?void 0:h.map(B=>t.createVNode("span",{class:R(B),onClick:T=>void 0},[B.text]))),o.slots.default&&o.slots.default()])])};return()=>t.createVNode("div",{class:N.value,style:"min-height:44px"},[v.value&&t.createVNode("button",{title:Y.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:w},[t.createVNode("span",{class:"f-icon modal_close"},null)]),x.value&&t.createVNode("section",{class:"modal-tips"},[!f.value&&t.createVNode("div",{class:"float-left modal-tips-iconwrap"},[t.createVNode("span",{class:b.value},null)]),t.createVNode("div",{class:"modal-tips-content"},[f.value&&t.createVNode(t.Fragment,null,[t.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:a.value.title},null),t.createVNode("p",{class:"toast-msg",innerHTML:a.value.message,style:C.value},null),V.value&&E()]),m.value&&(a.value.buttons?t.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:C.value,innerHTML:a.value.message},null),t.createVNode("div",{class:"after-toast-title text-right ml-auto"},[E()])]):t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:C.value,innerHTML:a.value.message},null))])])])}}),A=t.defineComponent({name:"Notify",props:fe,emits:["close","empty"],setup(e,o){const l=t.computed(()=>({"farris-notify":!0})),s={left:12,right:12,top:20,bottom:12},a=t.ref(),u=t.ref(e.options),f=t.ref(e.showCloseButton),m=t.computed(()=>e.position||"bottom-right"),N=t.computed(()=>e.timeout!=null?e.timeout:3e3),b=t.computed(()=>{const V=e.bottom?e.bottom:s.bottom,C=e.top?e.top:s.top,w={transition:"all 0.2s ease",left:m.value.indexOf("left")>-1?`${e.left?e.left:s.left}px`:"",right:m.value.indexOf("right")>-1?`${e.right?e.right:s.right}px`:"",top:m.value.indexOf("top")>-1?`${C}px`:"",bottom:m.value.indexOf("bottom")>-1?`${V}px`:""};return m.value.indexOf("center")>-1&&(w.left="50%",w.marginLeft="calc(-24rem / 2)",m.value==="center-center"&&(w.top="50%",w.transform="translate(-50%, -50%)")),w});function x(V){o.emit("close")}N.value&&setTimeout(()=>{x()},N.value),o.expose({closeToast:x,container:a,notifyPosition:m});function v(V,C){x()}return()=>t.createVNode("div",{class:l.value,style:b.value,ref:a},[t.createVNode(Q,{options:u.value,showCloseButton:f.value,animate:e.animate,onClose:V=>v(V,u.value)},null)])}});class oe{constructor(){D(this,"notifyRefs",[]);D(this,"globalConfig",t.reactive({}))}escapeAllHtml(o){if(typeof o!="string"||!o)return"";const l=document.createElement("div");return l.textContent=o||"",l.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(o){const l=this,a=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...o}),u=document.createElement("div");u.style.display="contents";const f=t.createApp({setup(){var b;const m=t.ref();function N(){m.value.container.style.transform="scale(0)",setTimeout(()=>{l.updateNotifyPositionForClose(a,m),f.unmount()},220)}if(a.position.indexOf("top")>-1){const x=l.getNotifyInstances(a.position),v=x[x.length-1];if(v){const V=v.value.container.getBoundingClientRect();a.top=V.bottom}}return a.safeHtml&&((b=a.options)!=null&&b.message)&&(a.options.message=l.escapeAllHtml(a.options.message)),t.onUnmounted(()=>{document.body.removeChild(u)}),t.onMounted(()=>{l.updateNotifyPositionForCreate(a,m)}),()=>t.createVNode(t.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[t.createVNode(A,t.mergeProps({ref:m},a,{onClose:N}),null)]})}});return f.provide("NotifyService",this),document.body.appendChild(u),f.use(Y.LocaleService.i18n),f.mount(u),f}getNotifyInstances(o){return this.notifyRefs.filter(l=>l.value.notifyPosition===o)}updateNotifyPositionForCreate(o,l){if(this.notifyRefs&&this.notifyRefs.length){const s=window.innerHeight;o.position.indexOf("bottom")>-1&&this.getNotifyInstances(o.position).forEach(a=>{const u=a.value.container.getBoundingClientRect();a.value.container.style.bottom=u.height+s-u.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,l]}updateNotifyPositionForClose(o,l){const s=this.notifyRefs.indexOf(l);if(o.position.indexOf("top")>-1){const a=this.getNotifyInstances(o.position),u=a.indexOf(l);a.slice(u+1).forEach(f=>{f.value.container.style.top=f.value.container.offsetTop-f.value.container.offsetHeight+"px"})}s>-1&&this.notifyRefs.splice(s,1)}show(o){return this.createNotifyInstance(o)}buildNotifyProps(o,l){let s="",a="",u,f,m;typeof l=="string"?s=l:l&&(s=l.message||"",a=l.title||"",f=l.position||null,m=l.showCloseButton!=null?l.showCloseButton:null,u=l.timeout!=null?l.timeout:null);const b={options:{type:o,message:s,title:a}};return f!=null&&(b.position=f),m!=null&&(b.showCloseButton=m),u!=null&&(b.timeout=u),b}info(o){const l=this.buildNotifyProps("info",o);return this.show(l)}success(o){const l=this.buildNotifyProps("success",o);return this.show(l)}warning(o){const l=this.buildNotifyProps("warning",o);return this.show(l)}error(o){const l=this.buildNotifyProps("error",o);return this.show(l)}close(o){o&&o.unmount()}closeAll(){this.notifyRefs.forEach(o=>{o==null||o.value.closeToast()}),this.notifyRefs.length=0}}const ye=Symbol("NOTIFY_SERVICE_TOKEN");A.install=e=>{e.component(A.name,A),e.component(Q.name,Q);const o=new oe;e.provide(ye,o),e.provide("FNotifyService",o)};function ie(e){const{designViewModelUtils:o,schemaService:l,formSchemaUtils:s,designerContext:a}=e.editorParams.designerHostService,{viewModelId:u}=e.editorParams;let f=[],m=[],N=[];const b=new oe;b.globalConfig={position:"top-center"};function x(i){switch(i){case"LocaleVariable":return m;case"RemoteVariable":return N;default:return f}}function v(){f=o.getAllFields2TreeByVMId(u)}function V(){const i=s.getViewModelById(u);if(i.parent){const d=s.getLocaleVariablesByViewModelId(i.parent);d&&d.length&&(d[0].data.name="根组件",m=m.concat(d))}const r=s.getLocaleVariablesByViewModelId(u);m=m.concat(r)}function C(){N=s.getRemoteVariables()}function w(i){var c,g,F,S;const r=ee.merge({},i.rawData,{groupId:null,groupName:null}),d=(c=e.editorParams.componentSchema)==null?void 0:c.binding,y=(g=e.editorParams.componentSchema)==null?void 0:g.label,n=o.getDgViewModel(u);if(d!=null&&d.field){const I=n.fields.find(O=>O.id===d.field);if(n.removeField([d.field]),I){const{groupId:O,groupName:L,editor:P}=I;ee.merge(r,{editor:P,groupId:O,groupName:L})}}n.addField(r),(S=(F=e.editorParams.componentSchema)==null?void 0:F.editor)!=null&&S.type&&n.changeField(r.id,{editor:r.editor}),y&&n.changeField(r.id,{name:y})}function $(i){var n;const r=(n=e.editorParams.componentSchema)==null?void 0:n.binding,d=o.getDgViewModel(u),y={type:"Variable",id:i.id,fieldName:i.code,groupId:"",groupName:""};if(r!=null&&r.field){const c=s.getViewModelById(u),g=c==null?void 0:c.fields.find(F=>F.id===(r==null?void 0:r.field));g&&(y.groupName=g.groupName,y.groupId=g.groupId),d.removeField([r==null?void 0:r.field])}s.addViewModelField(u,y)}function R(i,r){if(!e.editorParams.needSyncToViewModel||!e.editorParams.viewModelId||!e.editorParams.designerHostService)return;const d=e.editorParams.componentSchema.binding;d&&d.field===i.id||(r==="Form"?w(i):$(i))}function E(i){if(!e.editorParams.needSyncToViewModel||!e.editorParams.viewModelId||!e.editorParams.designerHostService)return;const r=e.editorParams.componentSchema.binding;if(!(!r||r.field===i.id)&&s.getExpressions().length){const{componentSchema:d}=e.editorParams,y=s.getExpressions().findIndex(n=>n.target===r.field);y>-1&&(s.getExpressions().splice(y,1),b.warning("切换绑定后,请重新配置表达式"),Object.keys(d).forEach(n=>{d[n]&&d[n].type==="Expression"&&(d[n].expressionId=""),d.editor&&Object.keys(d.editor).forEach(c=>{d.editor[c]&&d.editor[c].type==="Expression"&&(d.editor[c].expressionId="")})}))}}function h(i){var d;[H.FormSchemaEntityFieldTypeName.Number,H.FormSchemaEntityFieldTypeName.String,H.FormSchemaEntityFieldTypeName.Text].includes(i.type.name)&&((d=i.type)==null?void 0:d.length)&&e.editorParams.componentSchema.editor&&!Object.prototype.hasOwnProperty.call(e.editorParams.componentSchema.editor,"maxLength")&&(e.editorParams.componentSchema.editor.maxLength=i.type.length)}function B(i,r){if(e.editorParams.componentSchema){switch(e.editorParams.componentSchema.binding||(e.editorParams.componentSchema.binding={}),r){case"Form":{e.editorParams.componentSchema.binding.path=i.bindingField,e.editorParams.componentSchema.binding.field=i.id,e.editorParams.componentSchema.binding.fullPath=i.path;break}case"LocaleVariable":{e.editorParams.componentSchema.binding.path=i.viewModelId===u?i.code:"root-component."+i.code,e.editorParams.componentSchema.binding.field=i.id,e.editorParams.componentSchema.binding.fullPath=i.code;break}case"RemoteVariable":{e.editorParams.componentSchema.binding.path="root-component."+i.code,e.editorParams.componentSchema.binding.field=i.id,e.editorParams.componentSchema.binding.fullPath=i.code;break}}return e.editorParams.componentSchema.binding.type=r,e.editorParams.componentSchema.path=i.bindingPath,h(i),e.editorParams.componentSchema.binding}}function T(i){const r=i==null?void 0:i.field,d=new Set,y=s.getFormSchema().module,n=s.getViewModelById(u),c=y.components.find(S=>S.viewModel===u),g=s.checkComponentExistInDrawer(c.id);let F=c.componentType;return(F==="frame"||F==="table")&&(F="form"),y.viewmodels.forEach(S=>{if(!S.fields||S.fields.length===0)return;const I=y.components.find(P=>P.viewModel===S.id);let{componentType:O}=I;if((O==="frame"||O==="table")&&(O="form"),O!==F||S.bindTo!==n.bindTo)return;const L=s.checkComponentExistInDrawer(I.id);g&&L&&S.fields.forEach(P=>{P.id!==r&&d.add(P.id)}),!g&&!L&&S.fields.forEach(P=>{P.id!==r&&d.add(P.id)})}),d}function M(i){if(!i)return[];const r={},d=a&&a.schemaDOMMapping?a.schemaDOMMapping:q.SchemaDOMMapping,{fieldControlTypeMapping:y}=d;for(const n in y){const c=y[n];!c||!c.length||c.forEach(g=>{r[g.key]=r[g.key]||[],r[g.key].push(n)})}return r["language-textbox"]=["multiLanguage"],r[i]}function X(){v(),V(),C()}function W(i,r){if(i.multiLanguage)return{fieldType:"multiLanguage",fieldTypeName:"多语言"};const d=r===q.FormBindingType.Form?i.type.name:i.type,y=r===q.FormBindingType.Form?i.type.displayName:i.displayTypeName;return{fieldType:d,fieldTypeName:y}}function G(){var n;const i=(n=e.editorParams)==null?void 0:n.componentSchema,r=i==null?void 0:i.binding;if(!r)return{originalFieldType:"",isOriginalBindComplexField:!1};let d,y=!1;if(r.type===q.FormBindingType.Form){const c=l.getFieldByID(r.field);c&&(d=W(c,q.FormBindingType.Form).fieldType,c.$type===H.FormSchemaEntityField$Type.ComplexField&&(y=!0))}else{const c=s.getVariableById(r.field);c&&(d=c.type)}return{originalFieldType:d,isOriginalBindComplexField:y}}function Z(i,r){var P,ae,le,se;if(!(i!=null&&i.length))return b.warning({message:"请先选择数据"}),!1;const d=(P=e.editorParams)==null?void 0:P.componentSchema;if(!(d==null?void 0:d.binding))return!0;let n=!0;const{originalFieldType:c,isOriginalBindComplexField:g}=G(),F=i[0],{fieldType:S,fieldTypeName:I}=W(F,r),O="不可以切换成",L="类型字段,请重新选择!";if(g||!c){const K=M((se=(le=(ae=e.editorParams)==null?void 0:ae.componentSchema)==null?void 0:le.editor)==null?void 0:se.type);return K!=null&&K.length&&!K.includes(S)&&(b.warning(`${O}${I}${L}`),n=!1),n}return c&&c!==S?e.editorParams.canChangeFieldType?!0:(b.warning(`${O}${I}${L}`),!1):n}return{initTreeData:X,getTreeDataSource:x,updateViewModel:R,updateComponentSchema:B,resolveOccupiedFields:T,resolveFieldTypesByEditorType:M,checkFieldValiation:Z,clearExpresssionConfig:E,getOriginalFieldType:G}}const U=t.defineComponent({name:"FBindingSelectorContainer",props:_,emits:["selected","bindingTypeChange","cancel","submit","skip"],setup(e,o){var r,d,y;const l=t.ref(e.data),s=t.ref(((r=e.modelValue)==null?void 0:r.type)||"Form"),a=t.ref(e.bindingData),u=t.ref(),f=t.ref(),m=t.ref(),{getTreeDataSource:N,initTreeData:b,resolveOccupiedFields:x,resolveFieldTypesByEditorType:v,getOriginalFieldType:V}=ie(e),C=t.ref([]),{originalFieldType:w,isOriginalBindComplexField:$}=V();t.onBeforeMount(()=>{var n,c,g,F,S,I;b(),l.value=N(s.value),(n=e.editorParams)!=null&&n.disableOccupiedFields&&(f.value=x((g=(c=e.editorParams)==null?void 0:c.componentSchema)==null?void 0:g.binding)),m.value=v((I=(S=(F=e.editorParams)==null?void 0:F.componentSchema)==null?void 0:S.editor)==null?void 0:I.type),C.value=s.value==="Form"?z:J}),t.onMounted(()=>{var c,g,F;const n=(F=(g=(c=e.editorParams)==null?void 0:c.componentSchema)==null?void 0:g.binding)==null?void 0:F.field;n&&u.value.selectRowById(n)});const R={"f-utils-fill":!0,"m-2":(d=e.bindingType)==null?void 0:d.enable,"mx-2":!((y=e.bindingType)!=null&&y.enable),border:!0};function E(n){C.value=n==="Form"?z:J,u.value.updateColumns(C.value),l.value=N(n),u.value.updateDataSource(l.value),u.value.clearSelection(),a.value=[],o.emit("selected",[]),o.emit("bindingTypeChange",n)}function h(n){a.value=n,o.emit("selected",n)}function B(){return t.createVNode("div",{class:"px-3"},[t.createVNode(de,{name:"bindingType",textField:e.bindingType.textField||"text",valueField:e.bindingType.valueField||"value",data:te,modelValue:s.value,"onUpdate:modelValue":n=>s.value=n,onChangeValue:E},null)])}function T(n){var c;return n.raw.multiLanguage?"multiLanguage":s.value==="Form"?(c=n.raw.type)==null?void 0:c.name:n.raw.type}const M={customRowStatus:n=>{var g;if(n.raw.$type&&n.raw.$type!==H.FormSchemaEntityField$Type.SimpleField||f.value&&f.value.has(n.raw.id))return n.disabled=!0,n;const c=T(n);if($||!w){if(c&&((g=m.value)!=null&&g.length)&&!m.value.includes(c))return n.disabled=!0,n}else if(w&&w!==c)return n.disabled=!0,n;return n.disabled=!1,n}};function X(){return t.createVNode(re,{ref:u,fit:!0,data:l.value,idField:e.idField,columns:C.value,rowNumber:{enable:!1},columnOption:{fitColumns:!0},onSelectionChange:h,"row-option":M},null)}function W(){o.emit("cancel")}function G(){if(!a.value||!a.value.length){const n=new ue.FNotifyService;return n.globalConfig={position:"top-center"},n.warning({message:"请先选择数据"}),!1}return!0}function Z(){G()&&o.emit("submit",{selectedData:a.value[0],bindingType:s.value})}function i(){o.emit("skip")}return()=>t.createVNode("div",{class:"h-100 d-flex flex-column"},[e.bindingType.enable&&B(),t.createVNode("div",{class:R,style:"position:relative;border-radius:10px;"},[t.createTextVNode(" "),X()]),e.showCustomFooter?t.createVNode("div",{class:"modal-footer"},[t.createVNode("button",{type:"button",class:"btn btn-secondary",onClick:W},[t.createTextVNode("取消")]),t.createVNode("button",{type:"button",class:"btn btn-secondary",onClick:i},[t.createTextVNode("跳过绑定")]),t.createVNode("button",{type:"button",class:"btn btn-primary",onClick:Z},[t.createTextVNode("确定")])]):""])}}),j=t.defineComponent({name:"FBindingSelector",props:_,emits:["selected","bindingTypeChanged"],setup(e,o){var h,B;const l='<i class="f-icon f-icon-lookup"></i>',s=t.ref(e.bindingData),a=t.ref(e.data),u=t.ref(),f=t.ref(((h=e.modelValue)==null?void 0:h.type)||"Form"),m=t.ref((B=e.modelValue)==null?void 0:B.path),{updateViewModel:N,updateComponentSchema:b,checkFieldValiation:x,clearExpresssionConfig:v}=ie(e);function V(T){s.value=T}function C(T){f.value=T}function w(T){m.value=T.path}function $(){return t.createVNode(U,{ref:u,data:a.value,onSelected:V,modelValue:e.modelValue,idField:e.idField,bindingData:s.value,onBindingTypeChange:C,editorParams:e.editorParams,bindingType:e.bindingType,showCustomFooter:!1},null)}function R(){return!!x(s.value,f.value)}const E={title:e.title,fitContent:!1,height:e.modalHeight,width:e.modalWidth,buttons:[{name:"cancel",text:"取消",class:"btn btn-secondary",handle:T=>(s.value=[],!0)},{name:"accept",text:"确定",class:"btn btn-primary",handle:T=>{if(!R())return!1;N(s.value[0],f.value),v(s.value[0]);const M=b(s.value[0],f.value);return w(M),e.onFieldSelected&&typeof e.onFieldSelected=="function"&&e.onFieldSelected(M,void 0,s.value[0]),!0}}],resizeable:!1,draggable:!0};return()=>t.createVNode(k,{modelValue:m.value,"onUpdate:modelValue":T=>m.value=T,editable:!1,disabled:e.disabled,readonly:e.readonly,inputType:"text",enableClear:!1,buttonContent:l,buttonBehavior:"Modal",modalOptions:E},{default:()=>[t.createVNode("div",{class:"h-100 d-flex flex-column"},[$()])]})}});j.install=e=>{e.component(j.name,j),e.component(U.name,U)},j.register=(e,o,l,s)=>{e["binding-selector"]=j,o["binding-selector"]=ne},p.BindingSelector=j,p.FBindingSelectorContainer=U,p.bindingSelectorProps=_,p.bindingTypes=te,p.default=j,p.fieldColumns=z,p.propsResolver=ne,p.variableColumns=J,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});