@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
2 lines (1 loc) • 22.9 kB
JavaScript
(function(g,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("../button-edit/index.umd.js"),require("../locale/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("lodash-es"),require("../list-view/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("../property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../button-edit/index.umd.js","../locale/index.umd.js","../dynamic-resolver/index.umd.js","lodash-es","../list-view/index.umd.js","../../designer/button-edit/index.umd.js","../designer-canvas/index.umd.js","../common/index.umd.js","../property-panel/index.umd.js"],o):(g=typeof globalThis<"u"?globalThis:g||self,o(g["combo-list"]={},g.Vue,g.FButtonEdit,g.locale,g.dynamicResolver,g.LodashES,g.FListView,g.FButtonEditDesign,g.designerCanvas,g.common,g.propertyPanel))})(this,function(g,o,K,j,k,Q,X,Y,Z,B,D){"use strict";const $=new Map([["appearance",k.resolveAppearance]]),q={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{description:"",type:"boolean",default:!1},enableClear:{description:"",type:"boolean",default:!1},editable:{description:"",type:"boolean",default:!1},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:"请选择"},idField:{description:"",type:"string",default:"id"},valueField:{description:"",type:"string",default:"id"},titleField:{description:"",type:"string",default:"name"},textField:{description:"",type:"string",default:"name"},dataSourceType:{description:"",type:"string",default:"static"},data:{description:"",type:"array"},dataSource:{description:"",type:"string"},remote:{description:"",type:"string"},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},multiSelect:{description:"",type:"boolean",default:!1},maxLength:{description:"",type:"number",default:null},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:350},minPanelWidth:{description:"",type:"number",default:160},popupOnClick:{description:"",type:"boolean",default:!0},separator:{description:"",type:"string",default:","},viewType:{description:"",type:"string",default:"tag"},enableSearch:{description:"启用搜索",type:"boolean",default:!0},enableHighlightSearch:{description:"启用高亮搜索",type:"boolean",default:!1},beforeOpen:{description:"打卡面板前回调",type:"string"},onChange:{description:"值变化事件",type:"string",default:""},onInput:{description:"输入事件",type:"string",default:""},onClear:{description:"清空事件",type:"string",default:""},onDataChanged:{description:"清空事件",type:"string",default:""}},required:["type"],ignore:["id","appearance","binding","visible"],events:{onClear:"清空事件",onChange:"值变化事件",beforeOpen:"打开下拉面板前事件"}};function N(e,t,l){return t}function ee(){function e(t,l,a){const r={};return r.beforeOpen=c=>l.call("beforeOpen",t,[c,t],a),r}return{resolve:e}}var G=(e=>(e.top="top",e.bottom="bottom",e.auto="auto",e))(G||{});const E={id:{type:String},data:{type:Array,default:[]},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-chevron-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},fitEditor:{default:!1,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{type:Boolean,default:!1},modelValue:{},placeholder:{type:String,default:"请选择"},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},titleField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"tag",type:String},change:{type:Function,default:()=>{}},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!0},beforeOpen:{type:Function,default:null},load:{type:Function},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0},minPanelWidth:{type:Number,default:160},popupOnClick:{type:Boolean,default:!0}},U=Object.assign({},E,{readonly:{}}),te=k.createPropsResolver(E,q,$,N),A=k.getPropsResolverGenerator(E,q,$,N),W=ee(),ie={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{type:Boolean,default:!1},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},width:{type:Number},maxHeight:{type:Number},valueField:{type:String,default:"id"},onSelectionChange:{type:Function,default:()=>{}},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0}},J=o.defineComponent({name:"FComboListContainer",props:ie,emits:["selectionChange"],setup(e,t){const l=o.ref(),a=o.ref(e.dataSource),r=o.ref([]),c=o.ref(e.separator),y=o.ref(e.width),C=o.ref(e.maxHeight),F=o.computed(()=>e.multiSelect),b=o.ref(e.multiSelect?String(e.selectedValues).split(c.value):[e.selectedValues]),p=o.computed(()=>({enableSelectRow:!0,multiSelect:e.multiSelect,multiSelectMode:"OnCheckAndClick",showCheckbox:F.value,showSelectAll:!1,showSelection:!0}));o.watch(e.dataSource,()=>{a.value=e.dataSource}),o.computed(()=>e.enableSearch?"SearchBar":"ContentHeader");const f=o.computed(()=>{const i={};return y.value!==void 0&&(i.width=`${y.value}px`),C.value!==void 0&&C.value>0&&(i.maxHeight=`${C.value}px`),i});function v(i){l.value.search(i)}function T(i){r.value=i.map(n=>Object.assign({},n)),b.value=i.map(n=>n[e.idField]),t.emit("selectionChange",r.value)}function w(i){if(e.enableHighlightSearch)return;let n=[];const{searchOption:s}=e;typeof s=="function"?n=a.value.filter(m=>s(i,m)):n=a.value.filter(m=>m[e.valueField].indexOf(i)>-1||m[e.textField].indexOf(i)>-1),l.value.updateDataSource(n)}o.watch([()=>e.selectedValues],([i])=>{e.multiSelect?b.value=i.split(c.value):b.value=[i]});function x(i){l.value.activeRowById(i)}return o.onMounted(()=>{var i,n;if(!e.multiSelect){const s=(i=b.value)==null?void 0:i[0];let m=s;const V=a.value.map(u=>u[e.valueField||e.idField]);if(!Q.isUndefined(s)&&V.includes(s)){const u=typeof s,d=typeof((n=a.value[0])==null?void 0:n[e.valueField||e.idField]);d==="number"&&u!==d&&(m=Number(s)),d==="boolean"&&u!==d&&(m=s==="true"?!0:s==="false"?!1:s),x(m)}}}),t.expose({search:v,activeRowById:x}),()=>o.createVNode("div",{class:"f-combo-list-container",style:f.value},[o.createVNode(X,{ref:l,size:"small",itemClass:"f-combo-list-item",itemContentClass:"text-truncate",header:"ContentHeader",headerClass:"f-combo-list-search-box",data:a.value,idField:e.idField,textField:e.textField,titleField:e.titleField,multiSelect:e.multiSelect,selection:p.value,enableHighlightSearch:e.enableHighlightSearch,selectionValues:b.value,onSelectionUpdate:T,onAfterSearch:w},null)])}});function _(e,t){const l=o.ref(""),a=o.ref(e.modelValue),r=o.ref(e.data||[]),c=o.ref(e.editable);function y(i){const n=e.multiSelect?String(i).split(e.separator):[String(i)],s=n.map(u=>[u,!0]),m=new Map(s);return r.value.filter(u=>m.has(String(u[e.valueField]))).sort((u,d)=>{const P=n.indexOf(u[e.valueField]),L=n.indexOf(d[e.valueField]);return P-L})}function C(i){const n=y(i).map(s=>s[e.textField]).join(e.separator);l.value=c.value?n||i:n}function F(i){if(e.multiSelect){const n=i.split(e.separator).map(m=>[m,!0]),s=new Map(n);return r.value.filter(m=>s.has(m[e.textField]))}return r.value.filter(n=>""+n[e.textField]===i)}function b(i){const n={};return n[e.idField]=i,n[e.textField]=i,[n]}function p(i){let n=F(i);const s=n&&n.length>0;return c.value&&!s&&(n=b(i)),n}function f(){const{url:i,method:n="GET",headers:s={"Content-Type":"application/json;charset=utf-8;"},body:m=null}=e.remote;if(!i)return;const V=n.toLowerCase()==="get"?{method:n,headers:s}:{method:n,headers:s,body:m};let u=!1;fetch(new Request(i,V)).then(d=>{var L,M;if(d.status===200)return u=!!((M=(L=d.headers)==null?void 0:L.get("content-type"))!=null&&M.includes("application/json")),u?d.text():d.json();throw d.status===405?new Error(j.LocaleService.getLocaleValue("comboList.remoteError")):new Error(d.statusText)}).then(d=>{d.length&&(r.value=u?JSON.parse(d):d,a.value&&C(a.value))}).catch(d=>{console.warn(d)})}e.remote&&(e.load?e.load().then(i=>{r.value=i}).catch(i=>{console.log(i)}):f()),o.watch(()=>e.data,()=>{r.value=e.data}),o.watch([r],([i],[n])=>{if(e.modelValue!=null&&!e.multiSelect){const s=i.find(m=>m[e.valueField]===a.value);s?s[e.valueField]!==a.value?(a.value=s[e.valueField],l.value=s[e.textField],t.emit("update:modelValue",s[e.valueField]),t.emit("change",[s],s[e.valueField])):l.value!==s[e.textField]&&(l.value=s[e.textField]):a.value!==""&&(a.value="",l.value="",t.emit("update:modelValue",""),t.emit("change",[],""))}}),o.watch(()=>e.modelValue,(i,n)=>{n!==i&&(a.value=i,C(i))});function v(i){r.value=i,t.emit("dataChanged",i)}function T(){return r.value}function w(){return l.value}function x(){const i=typeof e.beforeOpen=="function";return!e.beforeOpen||!i?Promise.resolve(!0):Promise.resolve().then(()=>e.beforeOpen({instance:{updateDataSource:v,getData:T,getDisplayText:w}})).then(n=>typeof(n==null?void 0:n.canOpen)=="boolean"?n==null?void 0:n.canOpen:!0)}return C(e.modelValue),{dataSource:r,displayText:l,editable:c,modelValue:a,beforeOpenList:x,getItemsByDisplayText:F,getItemsByValue:y,getSelectedItemsByDisplayText:p}}const R=o.defineComponent({name:"FComboList",props:E,emits:["clear","update:modelValue","change","input","dataChanged"],setup(e,t){const l=o.ref(),a=o.ref(),r=o.ref(e.disabled||e.readonly),c=o.ref(e.enableClear),y=o.ref(e.enableSearch),C=o.ref(e.readonly),{dataSource:F,displayText:b,editable:p,modelValue:f,getItemsByDisplayText:v,getItemsByValue:T,beforeOpenList:w}=_(e,t),x=o.ref(e.dropDownIcon);x.value==='<span class="f-icon f-icon-arrow-chevron-down"></span>'&&(x.value='<span id="'+e.id+'-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');const i=o.computed(()=>e.multiSelect),n=o.computed(()=>a.value?a.value.elementRef.getBoundingClientRect().width:0);function s(){!i.value&&a.value&&a.value.hidePopup()}function m(h){b.value=h.map(I=>I[e.textField]).join(e.separator)||f.value;let S="";h.length===1?S=h[0][e.valueField]:S=h.map(I=>I[e.valueField]).join(e.separator),f.value!==S&&(f.value=S,t.emit("update:modelValue",f.value),t.emit("change",h,f.value))}function V(){const h=T(f.value);m(h)}function u(){C.value||b.value}function d(h){var S;f.value="",(S=l.value)==null||S.activeRowById(""),t.emit("clear")}function P(h){var S,I;e.enableSearch&&e.enableHighlightSearch&&((S=l.value)==null||S.search(h)),(I=l.value)==null||I.activeRowById(h),t.emit("change",[f.value],f.value)}function L(h){if(e.multiSelect){const S=v(h);e.viewType;const O=S.map(H=>H[e.idField||e.valueField]).join(e.separator);f.value!==O&&(f.value=O,t.emit("update:modelValue",f.value),t.emit("change",S,f.value))}else h!==f.value&&(f.value=h,t.emit("update:modelValue",f.value),t.emit("change",[],h))}function M(){return b.value}function de(h){const{value:S}=h.target;P(S),t.emit("input",S)}function re(){a.value.hidePopup()}function ue(h){F.value=h}function se(){return F.value}const ce={getDisplayText:M,hidePopup:re,updateDataSource:ue,getData:se};return t.expose(ce),o.watch([()=>e.disabled,()=>e.editable,()=>e.enableClear,()=>e.enableSearch,()=>e.readonly],([h,S,I,O,H])=>{r.value=h,p.value=S,c.value=I,y.value=O,C.value=H}),()=>o.createVNode(K,{ref:a,id:e.id,disable:r.value,readonly:C.value,forcePlaceholder:e.forcePlaceholder,editable:p.value,buttonContent:x.value,placeholder:e.placeholder==="请选择"?j.LocaleService.getLocaleValue("comboList.placeholder"):e.placeholder,enableClear:c.value,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?e.viewType:"text",modelValue:b.value,"onUpdate:modelValue":h=>b.value=h,focusOnCreated:e.focusOnCreated,selectOnCreated:e.selectOnCreated,onClear:d,onClick:u,onChange:L,onBlur:V,onInput:de,beforeOpen:w,placement:e.placement,popupMinWidth:e.minPanelWidth,popupClass:"f-combo-list-wrapper",popupOnClick:e.popupOnClick,limitContentBySpace:!0},{default:()=>[o.createVNode(J,{ref:l,idField:e.idField,valueField:e.valueField,textField:e.textField,titleField:e.titleField,dataSource:F.value,selectedValues:f.value,separator:e.separator,multiSelect:e.multiSelect,enableSearch:y.value,maxHeight:e.maxHeight,enableHighlightSearch:e.enableHighlightSearch,width:e.fitEditor?n.value:void 0,onSelectionChange:h=>{m(h),s()}},null)]})}}),z={convertFrom:(e,t)=>(e.editor.remote||{})[t],convertTo:(e,t,l)=>{e.editor.remote=e.editor.remote||{},e.editor.remote[t]=l}};class ne extends D.InputBaseProperty{constructor(t,l){super(t,l)}getCommonEditorProperties(t){var l,a,r;return{viewType:{visible:!!((l=t.editor)!=null&&l.multiSelect),description:"数据展示类型,有标签和文本两种方式",title:"数据展示类型",type:"enum",editor:{data:[{id:"tag",name:"标签"},{id:"text",name:"文本"}]},refreshPanelAfterChanged:!0},separator:{visible:!!((a=t.editor)!=null&&a.multiSelect)&&((r=t.editor)==null?void 0:r.viewType)==="text",description:"下拉列表启用多选且数据展示类型为文本时的分隔符",title:"分隔符",type:"enum",editor:{data:[{id:",",name:"逗号(,)"},{id:"#",name:"井号(#)"},{id:".",name:"句号(.)"},{id:"|",name:"竖线(|)"}]}},editable:{description:"",title:"允许编辑",type:"boolean",refreshPanelAfterChanged:!0,readonly:!0}}}getEditorProperties(t){var F,b,p,f,v,T,w,x,i,n,s,m,V;const l=this;let a="";if(((F=t==null?void 0:t.binding)==null?void 0:F.type)==="Form"){const u=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(b=u==null?void 0:u.schemaField)!=null&&b.type&&(a=u.schemaField.type.$type)}const r=this.getPropertyEditorParams(t,["Variable"]),c=!t.editor.dataSourceType||t.editor.dataSourceType==="static",y=(((f=(p=this.designViewModelField)==null?void 0:p.type)==null?void 0:f.$type)===B.FormSchemaEntityFieldType$Type.StringType||!!this.formRule&&((v=this.designerHostService.schemaService.getFieldByID(t.binding.field))==null?void 0:v.type.$type)===B.FormSchemaEntityFieldType$Type.StringType)&&((T=t.editor)==null?void 0:T.type)==="combo-list"&&((w=t.editor)==null?void 0:w.dataSourceType)==="dynamic"&&!((i=(x=t.editor)==null?void 0:x.remote)!=null&&i.url)&&!((n=t.editor)!=null&&n.multiSelect);return l.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},dataSourceType:{description:"",title:"数据源类型",type:"enum",editor:{default:"static",data:[{id:"static",name:"静态"},{id:"dynamic",name:"动态"}]},refreshPanelAfterChanged:!0},dataSource:{description:"动态数据源绑定变量",visible:y,title:"数据",editor:{...r,controlName:"",enableClear:!0},refreshPanelAfterChanged:!0},data:{description:"",title:"数据",type:"array",visible:c,...l.getItemCollectionEditor(t,t.editor.valueField,t.editor.textField),refreshPanelAfterChanged:!0},url:{visible:t.editor.dataSourceType==="dynamic"&&!((s=t.editor)!=null&&s.dataSource),$converter:z,description:"",title:"服务端API",type:"string",refreshPanelAfterChanged:!0},body:{visible:!1,$converter:z,description:"",title:"服务端API参数",type:"string"},textField:{description:"",title:"数据源显示字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},valueField:{description:"",title:"数据源值字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},multiSelect:{description:"",title:"启用多选",visible:!a||a==="StringType",readonly:((m=t.editor)==null?void 0:m.dataSourceType)==="dynamic"&&!!((V=t.editor)!=null&&V.dataSource),type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1,needValid:!0}},...this.getCommonEditorProperties(t)},(u,d)=>{if(!u||!d.editor)return;const P=this;switch(u.propertyID){case"dataSourceType":{u.propertyValue==="static"?(d.editor.valueField="value",d.editor.textField="name",d.editor.remote=null):u.propertyValue==="dynamic"&&(d.editor.remote={method:"GET"},d.editor.valueField="value",d.editor.textField="name");break}case"data":{!P.checkEnumDataReadonly(d)&&d.formatter&&(d.formatter.data=[...u.propertyValue]);break}case"viewType":{u.propertyValue==="tag"&&(d.editor.editable=!1);break}case"dataSource":P.afterMutilEditorChanged(d,u)}})}getGridFieldEdtiorProperties(t,l){var F,b,p,f,v,T,w,x,i,n,s,m,V;const a=this;let r="";if(((F=t==null?void 0:t.binding)==null?void 0:F.type)==="Form"){const u=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(b=u==null?void 0:u.schemaField)!=null&&b.type&&(r=u.schemaField.type.$type)}const c=((f=(p=this.designViewModelField)==null?void 0:p.type)==null?void 0:f.$type)===B.FormSchemaEntityFieldType$Type.StringType&&((v=t.editor)==null?void 0:v.type)==="combo-list"&&((T=t.editor)==null?void 0:T.dataSourceType)==="dynamic"&&!((w=t.editor)!=null&&w.multiSelect),y=this.getPropertyEditorParams(t,["Variable"]);return a.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},dataSourceType:{description:"",title:"数据源类型",type:"enum",editor:{default:"static",data:[{id:"static",name:"静态"},{id:"dynamic",name:"动态"}]},refreshPanelAfterChanged:!0},dataSource:{description:"动态数据源绑定变量",visible:c,title:"数据",editor:{...y,controlName:"",enableClear:!0},refreshPanelAfterChanged:!0},data:{description:"",title:"数据",type:"array",visible:!((x=t.editor)!=null&&x.dataSourceType)||((i=t.editor)==null?void 0:i.dataSourceType)==="static",...a.getItemCollectionEditor(t,(n=t.editor)==null?void 0:n.valueField,(s=t.editor)==null?void 0:s.textField),refreshPanelAfterChanged:!0},textField:{description:"",title:"数据源显示字段",type:"string",readonly:!0},valueField:{description:"",title:"数据源值字段",type:"string",readonly:!0},multiSelect:{description:"",title:"启用多选",visible:r==="StringType",readonly:((m=t.editor)==null?void 0:m.dataSourceType)==="dynamic"&&!!((V=t.editor)!=null&&V.dataSource),type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1,needValid:!0}},...this.getCommonEditorProperties(t)},(u,d)=>{if(!u||!d.editor)return;const P=this;switch(u.propertyID){case"dataSourceType":{u.propertyValue==="static"?(d.editor.valueField="value",d.editor.textField="name",d.editor.remote=null):u.propertyValue==="dynamic"&&(d.editor.remote={method:"GET"},d.editor.valueField="value",d.editor.textField="name");break}case"data":{!P.checkEnumDataReadonly(d)&&d.formatter&&(d.formatter.data=[...u.propertyValue]);break}case"dataSource":P.afterMutilEditorChanged(d,u)}})}setEditorPropertyRelates(t,l,a){if(!t||!l.editor)return;const r=this;switch(t.propertyID){case"dataSourceType":{t.propertyValue==="static"&&(l.editor.valueField="value",l.editor.textField="name",l.editor.remote={});break}case"data":{!r.checkEnumDataReadonly(l)&&l.formatter&&(l.formatter.data=[...t.propertyValue]);break}}}changeBindingField(t,l,a){var c;super.changeBindingField(t,l);const r=a;t.editor&&((c=r==null?void 0:r.type)==null?void 0:c.$type)===B.FormSchemaEntityFieldType$Type.EnumType&&(t.editor.data=r.type.enumValues||[])}getEventPropertyConfig(t,l="card",a,r){const c=this;let y=[{label:"onChange",name:"值变化事件"},{label:"beforeOpen",name:"下拉面板前事件"}];y=[...y,...this.getInputCommonEvents(t)],a&&(y=y.concat(a)),this.formRule&&(y=y.filter(p=>p.label!=="onChange")),this.appendFieldValueChangeEvents(t,y);const C=c.eventsEditorUtils.formProperties(t,c.viewModelId,y);return{title:"事件",hideTitle:!0,properties:c.createBaseEventProperty(C),tabId:"commands",tabName:"交互",setPropertyRelates(p,f){const v=p.propertyValue;delete t[c.viewModelId],v&&(v.setPropertyRelates=this.setPropertyRelates,c.eventsEditorUtils.saveRelatedParameters(t,c.viewModelId,v.events,v),c.updateLinkedLabel(v,f)),r&&r(p,f,v);const T=c.designViewModelUtils.getDgViewModel(c.viewModelId);T&&c.designViewModelField&&T.changeField(c.designViewModelField.id,{valueChanging:t.fieldValueChanging,valueChanged:t.fieldValueChanged}),t.editor.beforeOpen!==t.beforeOpen&&(t.editor.beforeOpen=t.beforeOpen),t.editor.onChange!==t.onChange&&(t.editor.onChange=t.onChange),t.editor.onClear!==t.onClear&&(t.editor.onClear=t.onClear)}}}}function le(e,t){const l=e.schema;function a(r,c){return new ne(r,t).getPropertyConfig(l,c)}return{getPropsConfig:a}}const ae=o.defineComponent({name:"FComboListDesign",props:U,emits:["clear","update:modelValue","change"],setup(e,t){const l=o.ref(),a=o.inject("designer-host-service"),r=o.inject("design-item-context"),c=le(r,a),y=Z.useDesignerComponent(l,r,c);return o.onMounted(()=>{l.value.componentInstance=y}),t.expose(y.value),()=>o.createVNode(Y,{ref:l,buttonContent:e.dropDownIcon,readonly:!0,editable:!1,forcePlaceholder:!0,placeholder:e.placeholder,enableClear:!0},null)}});R.register=(e,t,l,a,r)=>{e["combo-list"]=R,t["combo-list"]=A(r),a["combo-list"]={callbackResolver:W}},R.registerDesigner=(e,t,l,a)=>{e["combo-list"]=ae,t["combo-list"]=A(a)};const oe=B.withInstall(R);g.FComboList=R,g.FComboListContainer=J,g.Placement=G,g.callbackResolver=W,g.comboListDesignProps=U,g.comboListProps=E,g.default=oe,g.propsResolver=te,g.propsResolverGenerator=A,g.useDataSource=_,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});