@farris/ui-vue 1.5.7 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +5 -5
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +5 -5
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +5 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +5 -5
- package/components/content-container/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1082 -1421
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +908 -897
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +5 -5
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +5 -5
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +5 -5
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +13 -12
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +5 -5
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +5 -5
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +5 -5
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +862 -3625
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +5 -5
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +77 -76
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/response-layout/index.esm.js +5 -5
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +500 -3662
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +3008 -7347
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/section/index.esm.js +117 -7544
- package/components/section/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +545 -4943
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +100 -5841
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +5 -5
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +5 -5
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +1556 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +207 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +377 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +14332 -0
- package/designer/data-grid/index.umd.cjs +20 -0
- package/designer/data-view/index.esm.js +271 -0
- package/designer/data-view/index.umd.cjs +1 -0
- package/designer/date-picker/index.esm.js +1879 -0
- package/designer/date-picker/index.umd.cjs +1 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +463 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +16827 -0
- package/designer/farris-designer.all.umd.cjs +32 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +647 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +6959 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/response-toolbar/index.esm.js +3015 -0
- package/designer/response-toolbar/index.umd.cjs +1 -0
- package/designer/section/index.esm.js +744 -0
- package/designer/section/index.umd.cjs +1 -0
- package/designer/tabs/index.esm.js +2200 -0
- package/designer/tabs/index.umd.cjs +1 -0
- package/designer/textarea/index.esm.js +249 -0
- package/designer/textarea/index.umd.cjs +1 -0
- package/designer/tree-grid/index.css +1 -0
- package/designer/tree-grid/index.esm.js +1673 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +30447 -30444
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/date-picker/designer.d.ts +29 -0
- package/types/date-picker/index.d.ts +2 -1
- package/types/date-picker/src/date-picker.props.d.ts +0 -5
- package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
- package/types/designer-canvas/index.d.ts +2 -2
- package/types/response-toolbar/designer.d.ts +37 -0
- package/types/response-toolbar/index.d.ts +6 -5
- package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
- package/types/response-toolbar/src/composition/types.d.ts +1 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
- package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
- package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
- package/types/section/designer.d.ts +26 -0
- package/types/section/index.d.ts +1 -0
- package/types/section/src/designer/section-header.design.component.d.ts +2 -2
- package/types/section/src/designer/section-toolbar-item.design.props.d.ts +16 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +0 -1
- package/types/section/src/designer/section-toolbar.design.component.d.ts +2 -2
- package/types/section/src/designer/section.design.props.d.ts +11 -0
- package/types/section/src/designer/use-designer-rules.d.ts +1 -2
- package/types/section/src/property-config/section.property-config.d.ts +1 -1
- package/types/section/src/schema/schema-resolver.d.ts +1 -1
- package/types/section/src/section.props.d.ts +0 -10
- package/types/tabs/designer.d.ts +28 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/src/components/tab-page.props.d.ts +0 -1
- package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
- package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
- package/types/tabs/src/tabs.props.d.ts +0 -11
- package/types/textarea/designer.d.ts +28 -0
- package/types/textarea/index.d.ts +0 -15
- package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
- package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
- package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
- package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
- package/types/textarea/src/textarea.props.d.ts +0 -5
- package/components/textarea/index.css +0 -1
- /package/{components/section → designer/radio-group}/index.css +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(Q,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../condition/index.umd.js"),require("../query-solution/index.umd.js"),require("../drawer/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("@vueuse/core"),require("../dynamic-resolver/index.umd.js"),require("../data-view/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../../designer/tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../../designer/drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../external-container/index.umd.js"),require("../notify/index.umd.js"),require("../popover/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../condition/index.umd.js","../query-solution/index.umd.js","../drawer/index.umd.js","../dynamic-form/index.umd.js","../designer-canvas/index.umd.js","../common/index.umd.js","@vueuse/core","../dynamic-resolver/index.umd.js","../data-view/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../../designer/radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../schema-selector/index.umd.js","../../designer/tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../../designer/drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../external-container/index.umd.js","../notify/index.umd.js","../popover/index.umd.js"],n):(Q=typeof globalThis<"u"?globalThis:Q||self,n(Q["filter-bar"]={},Q.Vue,Q.LodashES,Q.condition,Q.FQuerySolution,Q.drawer,Q.FDynamicForm,Q.designerCanvas,Q.common,Q.VueUseCore,Q.dynamicResolver,Q.dataView,Q.propertyPanel,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.FDatePicker,null,null,null,null,Q.FFieldSelector,null,null,null,null,null,null,Q.FLookup,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.FTags,null,null,Q.FTransfer,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.FPopover))})(this,function(Q,n,Z,jt,Jt,Zt,Kt,mt,Ue,en,xe,J,tn,ei,ti,ni,oi,ii,ri,li,ai,si,ci,di,ui,pi,nn,fi,mi,yi,gi,yt,hi,vi,bi,Ci,wi,xi,on,Fi,Si,Ti,Ii,ki,Mi,Ei,Bi,Vi,Ni,ji,Pi,Oi,$i,Ri,qi,Li,Ai,Hi,Ui,Di,rn,zi,Wi,ln,Gi,_i,Xi,Yi,Qi,Ji,Zi,Ki,er,tr,nr,or,ir,rr,lr,ar,sr,cr,dr,ur,an){"use strict";var Zo=Object.defineProperty;var Ko=(Q,n,Z)=>n in Q?Zo(Q,n,{enumerable:!0,configurable:!0,writable:!0,value:Z}):Q[n]=Z;var D=(Q,n,Z)=>Ko(Q,typeof n!="symbol"?n+"":n,Z);const sn={},cn={};function Pt(o){const{properties:t,title:e,ignore:i}=o,r=i&&Array.isArray(i),l=Object.keys(t).reduce((s,c)=>((!r||!i.find(a=>a===c))&&(s[c]=t[c].type==="object"&&t[c].properties?Pt(t[c]):Z.cloneDeep(t[c].default)),s),{});if(e&&(!r||!i.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");l.id=`${s}_${Math.random().toString().slice(2,6)}`}return l}function dn(o,t){const e=Pt(t);return Object.keys(e).reduce((i,r)=>(Object.prototype.hasOwnProperty.call(o,r)&&(i[r]&&Z.isPlainObject(i[r])&&Z.isPlainObject(o[r]||!o[r])?Object.assign(i[r],o[r]||{}):i[r]=o[r]),i),e),e}function Ot(o,t){return Object.keys(o).filter(i=>o[i]!=null).reduce((i,r)=>{if(t.has(r)){const l=t.get(r);if(typeof l=="string")i[l]=o[r];else{const s=l(r,o[r],o);Object.assign(i,s)}}else i[r]=o[r];return i},{})}function un(o,t,e=new Map){const i=dn(o,t);return Ot(i,e)}function pn(o={}){function t(d,f,u,m){if(typeof u=="number")return m[d].length===u;if(typeof u=="object"){const y=Object.keys(u)[0],p=u[y];if(y==="not")return Number(m[d].length)!==Number(p);if(y==="moreThan")return Number(m[d].length)>=Number(p);if(y==="lessThan")return Number(m[d].length)<=Number(p)}return!1}function e(d,f,u,m){return m[d]&&m[d].propertyValue&&String(m[d].propertyValue.value)===String(u)}const i=new Map([["length",t],["getProperty",e]]);Object.keys(o).reduce((d,f)=>(d.set(f,o[f]),d),i);function r(d,f){const u=d;return typeof f=="number"?[{target:u,operator:"length",param:null,value:Number(f)}]:typeof f=="boolean"?[{target:u,operator:"getProperty",param:d,value:!!f}]:typeof f=="object"?Object.keys(f).map(m=>{if(m==="length")return{target:u,operator:"length",param:null,value:f[m]};const y=m,p=f[m];return{target:u,operator:"getProperty",param:y,value:p}}):[]}function l(d){return Object.keys(d).reduce((u,m)=>{const y=r(m,d[m]);return u.push(...y),u},[])}function s(d,f){if(i.has(d.operator)){const u=i.get(d.operator);return u&&u(d.target,d.param,d.value,f)||!1}return!1}function c(d,f){return l(d).reduce((y,p)=>y&&s(p,f),!0)}function a(d,f){const u=Object.keys(d),m=u.includes("allOf"),y=u.includes("anyOf"),p=m||y,w=(p?d[p?m?"allOf":"anyOf":"allOf"]:[d]).map(k=>c(k,f));return m?!w.includes(!1):w.includes(!0)}return{parseValueSchema:a}}const N={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"filter-bar":{type:"filter-bar",name:"筛选条"}},fn={},mn={};pn();function Ye(o,t,e=new Map,i=(s,c,a,d)=>c,r={},l=s=>s){return sn[t.title]=t,cn[t.title]=i,fn[t.title]=r,mn[t.title]=l,(s={},c=!0)=>{if(!c)return Ot(s,e);const a=un(s,t,e),d=Object.keys(o).reduce((f,u)=>(f[u]=o[u].default,f),{});return Object.assign(d,a)}}function Qe(o,t){return{customClass:t.class,customStyle:t.style}}const yn=new Map([["appearance",Qe]]);function gn(o,t,e){return t}const hn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar.schema.json",title:"filter-bar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for filter-bar",type:"string"},type:{description:"The type string of filter-bar",type:"string",default:"filter-bar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},defaultValues:{description:"",type:"array"},disable:{type:"string",default:!1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},ot={data:{type:Array,default:[{id:"name",fieldCode:"name",fieldName:"名称",compareType:"0",valueType:0,value:"示例1",relation:"1"}]},fields:{type:Array,default:[]},mode:{type:String,default:"editable"},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},resetText:{type:String,default:"清空"},showReset:{type:Boolean,default:!1}},gt=Ye(ot,hn,yn,gn);function $t(o,t){const e=n.ref([]),i=n.ref([]),r=n.ref([]),l=n.ref("");n.ref(!1),n.ref(o.mode);const s=new Map,{createConditionValue:c}=jt.useConditionValue(),a=Jt.useCondition(o,t),{getFilterConditions:d}=a;function f(S){return!S.value.isEmpty()&&!!S.value.getDisplayText()}function u(S){const h={id:S.id,fieldCode:S.labelCode,fieldName:S.name,required:S.editor.required,editor:S.editor,value:c(S.controlType||"text")};return S.controlType==="lookup"?(h.value.valueField=S.editor.valueField,h.value.helpId=S.editor.helpId):S.controlType==="date-picker"?(h.value.displayFormat=S.editor.displayFormat||"yyyy-MM-dd",h.value.valueFormat=S.editor.valueFormat||"yyyy-MM-dd"):S.controlType==="datetime-picker"&&(h.value.displayFormat=S.editor.displayFormat||"yyyy-MM-dd HH:mm:ss",h.value.valueFormat=S.editor.valueFormat||"yyyy-MM-dd HH:mm:ss"),h}function m(S){i.value=o.fields.map(h=>{const v=Z.cloneDeep(h);return v.editor.type||(v.editor.type=h.controlType),v.editor.type==="number-spinner"||v.editor.type==="number-range"?(v.editor.showZero=!0,v.editor.nullable=!0):v.editor.type==="combo-list"?v.editor.enableClear=!0:v.editor.type==="datetime-picker"&&(v.editor.type="date-picker",v.editor.showTime=!0),v}),i.value.reduce((h,v)=>h,s)}function y(S){r.value=i.value.map(h=>u(h))}function p(S,h){m(o.fields),y(o.data)}function g(S){r.value=r.value.filter(h=>h.id!==S.id),e.value=e.value.filter(h=>h.fieldCode!==S.fieldCode),i.value=i.value.filter(h=>h.id!==S.id),t.emit("remove",S.fieldCode)}function b(S){S.value.clear(),e.value=e.value.filter(h=>h.fieldCode!==S.fieldCode),t.emit("clear",S.fieldCode)}function w(){r.value.forEach(S=>S.value.clear())}function I(){r.value.forEach(S=>{S.value.clear()}),t.emit("reset")}p(o.fields,o.data);function k(){var v;const S=(v=r.value)==null?void 0:v.filter(T=>{var F;return!((F=T.value)!=null&&F.isEmpty())});return d(S,i.value)}return{clearAll:w,clearFilterItem:b,currentFilterId:l,filterFields:i,filterItems:r,loadFilterItems:p,removeFilterItem:g,reset:I,shouldShowClearButtonInFilterItem:f,handleQuery:k}}function vn(o,t){function e(){}return()=>n.createVNode("div",{class:"f-filter-list-ellipsis",onClick:i=>void 0},[n.createTextVNode("...")])}function bn(o,t,e,i,r){const{filterFields:l,handleQuery:s}=r,c=n.ref(Z.cloneDeep(i.value)),a=n.ref("更多筛选");function d(){e.value=!1,c.value=Z.cloneDeep(i.value)}function f(){e.value=!1,i.value.forEach(y=>{const p=c.value.find(g=>g.id===y.id);p!=null&&p.value&&(y.value=p.value)});const m=s();t.emit("conditionChange",m)}function u(){return n.createVNode("div",null,[n.createVNode(jt.FConditionFields,{fields:l.value,conditions:c.value},null),n.createVNode("div",null,[n.createVNode("button",{class:"btn btn-secondary",onClick:d},[n.createTextVNode("取消")]),n.createVNode("button",{class:"btn btn-primary",onClick:f},[n.createTextVNode("确定")])])])}return()=>n.createVNode(Zt.FDrawer,{modelValue:e.value,"onUpdate:modelValue":m=>e.value=m,showClose:!1,width:480,closeByMask:!1,title:a.value},{content:u})}function Rt(o,t,e){const i=n.ref([]),r=n.ref("更多"),l=n.ref(o.resetText),s=n.ref(o.showReset),c=n.ref(!1),{clearAll:a,reset:d,filterItems:f,filterFields:u}=e;function m(){i.value=f.value.filter(I=>I.editor.isExtend)}m();const y=n.computed(()=>i.value&&i.value.length>0),p=n.computed(()=>s.value);function g(I){c.value=!0}function b(I){o.mode==="display-only"?a():d()}const w=bn(o,t,c,i,e);return()=>n.createVNode("div",{class:"f-filter-toolbars"},[y.value&&n.createVNode("button",{class:"btn btn-link",onClick:I=>g()},[r.value]),p.value&&n.createVNode("button",{class:"btn btn-link",onClick:I=>b()},[l.value]),w()])}const Cn={filterItem:{type:Object,default:null},position:{type:Object,default:null}},wn=n.defineComponent({name:"FFilterBarItem",props:Cn,emits:["cancel","confirm"],setup(o,t){const e=n.ref(Z.cloneDeep(o.filterItem)),i=n.ref(o.position),r={left:i.value.left,top:i.value.top};function l(d,f,u){d.value.editorType==="combo-list"&&u.newValue?d.value.valueList=u.newValue.map(m=>({name:m[d.editor.textField||"name"],value:m[d.editor.valueField||"value"]})):d.value.editorType==="radio-group"&&(d.value.valueList=[d.editor.data.find(m=>m.value===f)])}function s(){var u,m,y;const{editor:d}=e.value,f=e.value;return((u=f.value)==null?void 0:u.editorType)==="lookup"&&d?(d.idValue=(m=f.value.mapFields)==null?void 0:m.map(p=>p.id).join(","),d.onClear=()=>{f.value.mapFields=[],l(f,"")},d["onUpdate:dataMapping"]=p=>{f.value.mapFields=p.items,l(f,f.value.getValue())}):((y=f.value)==null?void 0:y.editorType)==="number-range"&&d&&(d.beginValue=f.value.begin,d.onBeginValueChange=p=>{f.value.begin=p,l(f,p)},d.endValue=f.value.end,d.onEndValueChange=p=>{f.value.end=p,l(f,p)}),n.createVNode(Kt.FDynamicFormGroup,{label:"",editor:d,required:d==null?void 0:d.required,modelValue:f.value.value,"onUpdate:modelValue":p=>f.value.value=p,onChange:(p,g)=>l(f,p,g)},null)}function c(d){t.emit("cancel")}function a(d){d.stopPropagation(),t.emit("confirm",e.value)}return()=>n.createVNode("div",{class:"f-filter-panel-wrapper can-close",onClick:c},[n.createVNode("div",{class:"f-filter-panel",style:r},[n.createVNode("div",{class:"f-filter-panel-inner",onClick:d=>d.stopPropagation()},[n.createVNode("div",{class:"f-filter-panel-arrow",style:{left:i.value.arrowLeft,right:i.value.arrowRight}},null),s(),n.createVNode("div",{class:"f-filter-panel-footer ng-star-inserted"},[n.createVNode("div",{class:"filer-panel-clear"},[n.createVNode("button",{class:"btn btn-link",disabled:""},[n.createTextVNode("清空筛选")])]),n.createVNode("div",{class:"filter-panel-btns"},[n.createVNode("button",{class:"btn btn-secondary can-close",onClick:c},[n.createTextVNode("取消")]),n.createVNode("button",{class:"filter-panel-submit btn btn-primary",onClick:a},[n.createTextVNode("确定")])])])])])])}}),xn={filterItem:{type:Object,default:null},useFilterItemsComposition:{type:Object,default:null},disabled:{type:Boolean,default:!1}},qt=n.defineComponent({name:"FFilterBarItem",props:xn,emits:["confirm"],setup(o,t){const e=n.ref(o.filterItem),{clearFilterItem:i,currentFilterId:r,removeFilterItem:l,shouldShowClearButtonInFilterItem:s}=o.useFilterItemsComposition,c=n.ref(o.disabled),a=n.ref(),d=n.ref(!1),f=function(){return{"f-filter-item":!0,"f-filter-item-actived":!e.value.value.isEmpty(),"f-filter-item-edit":e.value.id===r.value}};n.computed(()=>!c.value&&o.mode==="editable");function u(g){o.mode==="display-only"?l(e.value):i(e.value)}function m(g){var I;const b=(I=g.currentTarget)==null?void 0:I.getBoundingClientRect(),w=380;b.left>document.body.clientWidth-w-20?a.value={left:b.left+b.width-w+"px",top:b.top+b.height+"px",arrowLeft:"auto",arrowRight:"26px"}:a.value={left:b.left+"px",top:b.top+b.height+"px",arrowLeft:"26px",arrowRight:"auto"},d.value=!0}function y(){d.value=!1}function p(g){d.value=!1,e.value.value=g.value,t.emit("confirm",g)}return()=>n.createVNode("div",{key:e.value.id,id:e.value.id,class:f()},[n.createVNode("div",{class:"f-filter-item-inner",onClick:g=>m(g)},[e.value.editor.required&&n.createVNode("span",{class:"f-filter-item-required text-danger"},[n.createTextVNode("*")]),n.createVNode("span",{class:"f-filter-item-text"},[e.value.fieldName]),e.value.value.getDisplayText()&&n.createVNode(n.Fragment,null,[n.createVNode("span",{class:"f-filter-item-tip"},[n.createTextVNode(":")]),n.createVNode("span",{class:"f-filter-item-content"},[e.value.value.getDisplayText()])]),!c.value&&n.createVNode("span",{class:"f-filter-item-arrow f-icon f-icon-arrow-chevron-down"},null)]),s(e.value)&&n.createVNode("span",{class:"mr-3 f-filter-item-clear",onClick:g=>u()},[n.createVNode("span",{class:"f-icon f-icon-close-circle"},null)]),d.value&&n.createVNode(wn,{position:a.value,filterItem:e.value,onConfirm:p,onCancel:y},null)])}});function Fn(o,t,e){const i=n.ref(null);function r(){var y,p;let c=!1;const a=(y=t.value)==null?void 0:y.children;if(!t.value||!o.value||!a||a.length===0)return;const d=(p=o.value.children[1])==null?void 0:p.clientWidth,f=o.value.clientWidth;let u=0,m=0;Array.from(a).forEach(g=>{g.style.display="block"});for(let g=0;g<a.length;g++){const b=a[g],w=b.offsetWidth;u+w<=f-30-d?(u+=w,m++):(b.style.display="none",c=!0)}return e.value=c,m}function l(){var a;if(!o.value||!t.value)return;(a=i.value)==null||a.unobserve(o.value);const c=t.value.children;Array.from(c).forEach(d=>{d.style.display="block"})}function s(){if(!t.value||!o.value)return;const c=new ResizeObserver(a=>{r()});return c.observe(o.value),i.value=c,c}return{setupWidthObserver:s,cancelWidthObserver:l}}const Me=n.defineComponent({name:"FFilterBar",props:ot,emits:["clear","remove","reset","conditionChange","change"],setup(o,t){const e=n.ref(!0),i=n.ref(!1),r=n.ref(!1),l=n.ref(!1),s=n.ref(null),c=n.ref(null),a=$t(o,t),d=Fn(c,s,l),{cancelWidthObserver:f,setupWidthObserver:u}=d,{filterFields:m,filterItems:y,loadFilterItems:p,handleQuery:g}=a,b=n.computed(()=>({display:m.value&&m.value.length?"":"none"}));n.watch([()=>o.data,()=>o.fields],([P,L])=>{p(L,P)}),n.onMounted(()=>{u()});const w=n.computed(()=>i.value&&e.value),I=n.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":w.value})),k=n.computed(()=>({'"extend-btn-arrow':!0,"f-icon":!0,"f-icon-arrow-chevron-up":i.value,"f-icon-arrow-chevron-down":!i.value})),S=n.computed(()=>y.value.length>0);n.computed(()=>r.value&&!i.value&&l.value);const h=Rt(o,t,a);function v(P){t.emit("change",P);const L=g();t.emit("conditionChange",L)}function T(){return n.createVNode("div",{class:I.value,ref:s},[y.value.map((P,L)=>!P.editor.isExtend&&n.createVNode(qt,{filterItem:P,useFilterItemsComposition:a,onConfirm:v},null)),i.value&&h()])}function F(){i.value=!i.value,i.value?f():u()}return()=>n.createVNode("div",{class:"f-filter-wrapper",style:b.value},[n.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[n.createVNode("div",{class:"f-filter-main f-utils-fill",ref:c},[n.createVNode("div",{class:"f-filter-list-wrapper d-flex w-100"},[S.value&&T()]),!i.value&&h()]),l.value&&n.createVNode("div",{class:"f-filter-extend-btn"},[n.createVNode("button",{class:"btn btn-link",onClick:F},[n.createVNode("span",{class:"extend-btn-text"},[i.value?"收折":"展开"]),n.createVNode("span",{class:k.value},null)])])])])}}),Sn=n.ref(0);function Tn(){Sn.value++}const it=n.ref(0);function In(o){const{formSchemaUtils:t,formStateMachineUtils:e}=o;function i(a,d=""){return{path:d+a.code,field:a.id,fullPath:a.code}}function r(a,d=""){return t.getViewModelById(a).states.map(u=>i(u,d))}function l(a){const d=t.getRootViewModelId(),f=r(a);if(a===d)return f;const u=r(d,"root-component.");return[...f,...u]}function s(a){return a.binding&&a.binding.path||a.id||""}function c(){return e&&e.getRenderStates()||[]}return{getVariables:l,getControlName:s,getStateMachines:c}}class Lt{constructor(t){D(this,"sessionVariables",[{key:"CurrentSysOrgName",name:"当前组织Name",description:"当前组织Name"},{key:"CurrentSysOrgId",name:"当前组织Id",description:"当前组织Id"},{key:"CurrentUserName",name:"当前用户Name",description:"当前用户Name"},{key:"CurrentUserCode",name:"当前用户Code",description:"当前用户Code"},{key:"CurrentUserId",name:"当前用户Id",description:"当前用户Id"},{key:"CurrentLanguage",name:"当前语言编号",description:"当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"}]);D(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});D(this,"getExpressionConverter",(t,e)=>({convertFrom:(i,r,l,s)=>{const c=l.getExpressionRuleValue(t,e||r);return c&&c.value||""},convertTo:(i,r,l,s,c)=>{var a;if(r==="dataPicking"&&(l!=null&&l.target)){const d=`${l.target}_dataPicking`;((a=l.rules)==null?void 0:a.some(u=>u.id===d&&u.value))?i.dictPickingExpressionId=d:delete i.dictPickingExpressionId}s.updateExpression(l)}}));this.formSchemaService=t}getExpressionRule(t,e){const i=this.formSchemaService.getExpressions();if(!i)return"";const r=i.find(s=>s.target===t);if(!r)return"";const l=r.rules.find(s=>s.type===e);return l||""}getContextFormVariables(){const{module:t}=this.formSchemaService.getFormSchema();if(!t.viewmodels||t.viewmodels.length===0)return[];const e=this.formSchemaService.getRootViewModelId(),i=this.formSchemaService.getViewModelById(e);if(!i||!i.states||i.states.length===0)return[];const r=[];return i.states.forEach(l=>{r.push({key:l.code,name:l.name,description:l.name,category:l.category})}),r}createTreeNode(t,e,i="label"){return{id:t.id,name:t.name,bindingPath:t[i],parents:e}}buildEntityFieldsTreeData(t=null,e){const i=[];return t==null||t.forEach(r=>{var c;const l=this.createTreeNode(r,e);let s=[];(c=r.type)!=null&&c.fields&&(s=this.buildEntityFieldsTreeData(r.type.fields,[...e,r.label])),i.push({data:l,children:s,expanded:!0})}),i}buildChildEntityTreeData(t=null,e){const i=[];return t==null||t.forEach(r=>{var a,d;const l=this.createTreeNode(r,e),s=this.buildEntityFieldsTreeData((a=r.type)==null?void 0:a.fields,[...e,r.label]),c=this.buildChildEntityTreeData((d=r.type)==null?void 0:d.entities,[...e,r.label]);c!=null&&c.length&&(s==null||s.push(...c)),i.push({data:l,children:s||[],expanded:!0})}),i}getEntitiesTreeData(){const t=this.formSchemaService.getSchemaEntities();if(!(t!=null&&t.length))return[];const e=t[0];if(!(e!=null&&e.type))return[];const i=this.buildEntityFieldsTreeData(e.type.fields,[e.code]),r=this.buildChildEntityTreeData(e.type.entities,[e.code]);return r!=null&&r.length&&(i==null||i.push(...r)),{entityCode:e.code,fields:[{data:this.createTreeNode(e,[],"code"),children:i||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(t,e,i){const r=i==="Field"?t.binding.field:t.id,l=this.getExpressionRule(r,e),s=this.getEntitiesAndVariables(),c={message:["validate","required","dataPicking"].includes(e)&&l?l.message:"",...s};return l.messageType!=null&&(c.messageType=l.messageType),c}buildRule(t,e,i,r){const{expression:l,message:s,messageType:c}=e,a={id:`${t}_${i}`,type:i,value:l};return(i==="validate"||i==="dataPicking"||i==="required")&&(a.message=s),i==="dataPicking"&&(a.messageType=c),i==="validate"&&r&&(a.elementId=r),a}getExpressionData(){const{expressions:t}=this.formSchemaService.getFormSchema().module;return t||[]}updateExpression(t,e,i,r){const l=e==="Field"?t.binding.field:t.id,s=this.buildRule(l,i,r,t.type==="form-group"?t.id:"");let a=this.getExpressionData().find(f=>f.targetType===e&&f.target===l);const d=f=>f.value.trim()==="";if(a){const f=a.rules.find(u=>u.id===s.id);if(f)d(s)?a.rules=a.rules.filter(u=>u.id!==s.id):(Object.assign(f,s),r==="validate"&&t.type==="form-group"&&(f.elementId=t.id));else{if(d(s))return null;a.rules=a.rules||[],a.rules.push(s)}}else{if(d(s))return null;a={target:`${l}`,rules:[s],targetType:e}}return a}getExpressionEditorOptions(t,e,i,r){return i.reduce((l,s)=>{var a,d;const c=e==="Field"?(a=t==null?void 0:t.binding)==null?void 0:a.field:t.id;return l[s]={hide:e==="Field"?!!((d=t==null?void 0:t.binding)!=null&&d.field):!1,description:"",title:this.expressionNames[s],type:"string",$converter:this.getExpressionConverter(c),editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[s]}编辑器`,showMessage:s==="validate"||s==="dataPicking"||s==="required",showMessageType:s==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(t,s,e),onSubmitModal:f=>{const u=this.updateExpression(t,e,f,s);if(r){const m=this.buildRule(c,f,s);r(m)}return u}}},l},{})}getExpressionInfo(t,e,i){const r=e==="Field"?t.binding.field:t.id,l=this.getExpressionRule(r,i),s={value:l&&l.value,targetId:r,targetType:e,expressionType:i};return l&&l.message&&(s.message=l.message),s}getExpressionConfig(t,e,i=["compute","dependency","validate"],r){return{description:"表达式",title:"表达式",properties:{...this.getExpressionEditorOptions(t,e,i,r)}}}getExpressionOptions(t,e,i){const r=this.getExpressionInfo(t,e,i);return{dialogTitle:`${this.expressionNames[i]}编辑器`,singleExpand:!1,showMessage:i==="required",beforeOpen:()=>this.onBeforeOpenExpression(t,i,e),expressionInfo:r}}}class kn{constructor(t,e){D(this,"componentId");D(this,"viewModelId");D(this,"eventsEditorUtils");D(this,"formSchemaUtils");D(this,"formMetadataConverter");D(this,"designViewModelUtils");D(this,"designViewModelField");D(this,"controlCreatorUtils");D(this,"designerHostService");D(this,"schemaService",null);D(this,"metadataService",null);D(this,"propertyConfig",{type:"object",categories:{}});var i;this.componentId=t,this.designerHostService=e,this.eventsEditorUtils=e.eventsEditorUtils,this.formSchemaUtils=e.formSchemaUtils,this.formMetadataConverter=e.formMetadataConverter,this.viewModelId=((i=this.formSchemaUtils)==null?void 0:i.getViewModelIdByComponentId(t))||"",this.designViewModelUtils=e.designViewModelUtils,this.controlCreatorUtils=e.controlCreatorUtils,this.metadataService=e.metadataService,this.schemaService=e.schemaService}getTableInfo(){var t;return(t=this.schemaService)==null?void 0:t.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(t){var i;const e=t.binding&&t.binding.type==="Form"&&t.binding.field;if(e){if(!this.designViewModelField){const r=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=r.fields.find(l=>l.id===e)}t.updateOn=(i=this.designViewModelField)==null?void 0:i.updateOn}}getBasicPropConfig(t){return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"name",valueField:"value",idField:"value",editable:!1,data:[{value:t.type,name:N[t.type].name}]}}}}}getAppearanceConfig(t=null,e={},i){const r={title:"外观",description:"Appearance"},l={class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的样式",$converter:"/converter/appearance.converter"}};for(const s in e)l[s]=Object.assign(l[s]||{},e[s]);return{...r,properties:{...l},setPropertyRelates(s,c){if(s){switch(s&&s.propertyID){case"class":case"style":{it.value++;break}}i&&i(s,t,c)}}}}getPropertyEditorParams(t,e=[],i="visible",r={},l={}){const{getVariables:s,getControlName:c,getStateMachines:a}=In(this.designerHostService),d=this.getRealTargetType(t),f=e&&e.length>0?e:["Const","Variable","StateMachine","Expression"],u={type:"property-editor",propertyTypes:f};return f.map(m=>{switch(m){case"Const":Object.assign(u,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},r);break;case"Expression":u.expressionConfig=this.getExpressionOptions(t,d,i);break;case"StateMachine":u.stateMachines=a();break;case"Variable":Object.assign(u,{controlName:c(t),newVariablePrefix:"is",newVariableType:"Boolean",variables:s(this.viewModelId),onBeforeOpenVariables:y=>{y.value=s(this.viewModelId)}},l);break}}),u}getVisibleProperty(t,e=""){return{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(t,e==="gridFieldEditor"?["Const","Expression"]:["Const","Variable","StateMachine","Expression"],"visible")}}}getBehaviorConfig(t,e="",i={},r){const l={title:"行为",description:""},s=this.getVisibleProperty(t,e);for(const a in i)s[a]=Object.assign(s[a]||{},i[a]);const c=this;return{...l,properties:{...s},setPropertyRelates(a,d){if(a){switch(a.propertyID){case"disabled":case"readonly":case"visible":c.afterMutilEditorChanged(t,a);break}r&&r(a,d)}}}}afterMutilEditorChanged(t,e){this.addNewVariableToViewModel(e,this.viewModelId),this.updateExpressionValue(e),this.clearExpression(e,t)}updateElementByParentContainer(t,e){const i=e&&e.parent&&e.parent.schema;if(!i)return;const r=i.contents.findIndex(s=>s.id===t),l=Z.cloneDeep(i.contents[r]);i.contents.splice(r,1),i.contents.splice(r,0,l),Tn()}addNewVariableToViewModel(t,e){const i=t.propertyValue;if(!(i&&typeof i=="object")||!(i.type==="Variable"&&i.isNewVariable))return;const s={id:i.field,category:"locale",code:i.fullPath,name:i.fullPath,type:i.newVariableType||"String"};delete i.newVariableType,delete i.isNewVariable,this.formSchemaUtils.getVariableByCode(s.code)||this.formSchemaUtils.getViewModelById(e).states.push(s)}updateExpressionValue(t){const e=t.propertyValue;if(!((e&&e.type)==="Expression"&&e.expressionInfo))return;const{expressionId:l,expressionInfo:s}=e,{targetId:c,targetType:a,expressionType:d,value:f,message:u}=s,m=this.formSchemaUtils.getModule();m.expressions??(m.expressions=[]);const{expressions:y}=m;let p=y.find(b=>b.target===c);p||(p={target:c,rules:[],targetType:a},y.push(p));const g=p.rules.find(b=>b.type===d);if(g)g.value=f,g.message=u;else{const b={id:l,type:d,value:f,message:u};p.rules.push(b)}delete e.expressionInfo}clearExpression(t,e){const i=t.propertyValue;if(i&&i.type==="Expression")return;const l=t.propertyID,s=this.formSchemaUtils.getExpressions(),c=e.binding?e.binding.field:e.id,a=s.find(d=>d.target===c);!a||!a.rules||(a.rules=a.rules.filter(d=>d.type!==l))}getExpressionOptions(t,e,i){return new Lt(this.formSchemaUtils).getExpressionOptions(t,e,i)}getRealTargetType(t){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(t.type)>-1?"Button":t.binding&&t.binding.field?"Field":"Container"}}const De=class De{static getEditorTypesByMDataType(t,e=""){let i=De.fieldControlTypeMapping[t];if(e==="data-grid-column"&&(i!=null&&i.length)){const r=[N["check-group"].type,N["radio-group"].type];i=i.filter(l=>!r.includes(l.key))}return i}static getAllInputTypes(){const t=[];for(const e in De.fieldControlTypeMapping)De.fieldControlTypeMapping[e].forEach(i=>{t.find(r=>r.key===i.key&&r.value===i.value)||t.push({key:i.key,value:i.value})});return t}static mappingDomPropAndSchemaProp(t,e){var l;const i=(l=t.editor)==null?void 0:l.type,r=[];return(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&e&&e.categoryId&&e.categoryId.indexOf("gridFieldEditor")<0&&r.push({domField:"title",schemaField:"name"}),r.push({domField:"label",schemaField:"name"}),r.push({domField:"editor.required",schemaField:"require"}),r.push({domField:"editor.readonly",schemaField:"readonly"}),(i===N["input-group"].type||i===N.textarea.type||i===N["number-spinner"].type)&&r.push({domField:"editor.maxLength",schemaField:"type.length"}),i===N["number-spinner"].type&&r.push({domField:"editor.precision",schemaField:"type.precision"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"formatter.precision",schemaField:"type.precision"}),(i===N["combo-list"].type||i===N["radio-group"].type)&&r.push({domField:"editor.data",schemaField:"type.enumValues"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"formatter.data",schemaField:"type.enumValues"}),i===N["date-picker"].type&&(r.push({domField:"editor.displayFormat",schemaField:"editor.format"}),r.push({domField:"editor.fieldType",schemaField:"type.name"})),i===N["number-spinner"].type&&(r.push({domField:"editor.max",schemaField:"editor.maxValue"}),r.push({domField:"editor.min",schemaField:"editor.minValue"})),i===N.lookup.type&&(r.push({domField:"editor.dataSource",schemaField:"editor.dataSource"}),r.push({domField:"editor.valueField",schemaField:"editor.valueField"}),r.push({domField:"editor.textField",schemaField:"editor.textField"}),r.push({domField:"editor.displayType",schemaField:"editor.displayType"}),r.push({domField:"editor.mapFields",schemaField:"editor.mapFields"}),r.push({domField:"editor.helpId",schemaField:"editor.helpId"})),r.push({domField:"path",schemaField:"bindingPath"}),r.push({domField:"binding.path",schemaField:"bindingField"}),r.push({domField:"binding.fullPath",schemaField:"path"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"field",schemaField:"bindingPath"}),r}};D(De,"fieldControlTypeMapping",{String:[{key:N["input-group"].type,value:N["input-group"].name},{key:N.lookup.type,value:N.lookup.name},{key:N["date-picker"].type,value:N["date-picker"].name},{key:N["check-group"].type,value:N["check-group"].name},{key:N["radio-group"].type,value:N["radio-group"].name},{key:N["combo-list"].type,value:N["combo-list"].name},{key:N.textarea.type,value:N.textarea.name},{key:N["time-picker"].type,value:N["time-picker"].name}],Text:[{key:N.textarea.type,value:N.textarea.name},{key:N.lookup.type,value:N.lookup.name}],Decimal:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Integer:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Number:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],BigNumber:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Date:[{key:N["date-picker"].type,value:N["date-picker"].name}],DateTime:[{key:N["date-picker"].type,value:N["date-picker"].name}],Boolean:[{key:N.switch.type,value:N.switch.name},{key:N["check-box"].type,value:N["check-box"].name}],Enum:[{key:N["combo-list"].type,value:N["combo-list"].name},{key:N["radio-group"].type,value:N["radio-group"].name}],Object:[{key:N.lookup.type,value:N.lookup.name},{key:N["combo-list"].type,value:N["combo-list"].name},{key:N["radio-group"].type,value:N["radio-group"].name}]});let rt=De;var lt=(o=>(o.Form="Form",o.Variable="Variable",o))(lt||{});class Mn{constructor(){D(this,"label","");D(this,"id","");D(this,"columnInSM",12);D(this,"columnInMD",6);D(this,"columnInLG",3);D(this,"columnInEL",2);D(this,"displayWidthInSM",1);D(this,"displayWidthInMD",1);D(this,"displayWidthInLG",1);D(this,"displayWidthInEL",1);D(this,"displayColumnCountAtBreakPoint","md");D(this,"tagRow",0);D(this,"showTopBorder",0);D(this,"group",1);D(this,"isSupportedClass",!0);D(this,"fieldSetId","")}}function En(o){let t,e;const i=new Map;let r=[];function l(f,u){const y=f.split(" ").filter(I=>I.startsWith("col-"));if(y.length===0){u.isSupportedClass=!1;return}let p=y.find(I=>/^col-([1-9]|10|11|12)$/.test(I)),g=y.find(I=>/^col-md-([1-9]|10|11|12)$/.test(I)),b=y.find(I=>/^col-xl-([1-9]|10|11|12)$/.test(I)),w=y.find(I=>/^col-el-([1-9]|10|11|12)$/.test(I));p=p||"col-12",u.columnInSM=parseInt(p.replace("col-",""),10),u.displayWidthInSM=u.columnInSM/12,u.displayWidthInSM!==1&&(u.isSupportedClass=!1),g=g||"col-md-"+u.columnInSM,u.columnInMD=parseInt(g.replace("col-md-",""),10),u.displayWidthInMD=u.columnInMD/6,[1,2].includes(u.displayWidthInMD)||(u.isSupportedClass=!1),b=b||"col-xl-"+u.columnInMD,u.columnInLG=parseInt(b.replace("col-xl-",""),10),u.displayWidthInLG=u.columnInLG/3,[1,2,3,4].includes(u.displayWidthInLG)||(u.isSupportedClass=!1),w=w||"col-el-"+u.columnInLG,u.columnInEL=parseInt(w.replace("col-el-",""),10),u.displayWidthInEL=u.columnInEL/2,[1,2,3,4,5,6].includes(u.displayWidthInEL)||(u.isSupportedClass=!1)}function s(f,u,m,y=!1){let p=!1;f.contents.forEach(g=>{if(g.type==="fieldset"){m+=1,s(g,u,m,!0),p=!0;return}p&&(m+=1,p=!1);const b=g.appearance&&g.appearance.class,w=new Mn;b?l(b,w):w.isSupportedClass=!1,w.label=g.label||g.id,w.id=g.id,w.group=m,y&&(w.fieldSetId=f.id),e===g.id&&(t=m),i.set(g.id,g),u.push(w)})}function c(f){const u=o.getComponentById(f);if(!u||!u.componentType||!u.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const m=o.selectNode(u,y=>y.type===mt.DgControl["response-form"].type);return!m||!m.contents||m.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:m}}function a(f,u){u=u||f.id;const{result:m,message:y,formNode:p}=c(u);if(!m)return{result:m,message:y};e=f.id,r=[],i.clear();const g=p.contents[0].type===mt.DgControl.fieldset.type?0:1;s(p,r,g);const b=r.find(I=>!I.isSupportedClass);return{defaultState:{defaultGroupNumber:t||1,model:b?"customize":"standard"},importData:r}}function d(f,u){u=u;const{result:m,formNode:y}=c(u);if(!m)return"";const p=[];return f.forEach(g=>{var I;const b=i.get(g.id),w=b.appearance&&b.appearance.class;if(w){const S=w.split(" ").filter(L=>!L.startsWith("col-")),h="col-"+g.columnInSM,v="col-md-"+g.columnInMD,T="col-xl-"+g.columnInLG,F="col-el-"+g.columnInEL,P=[h,v,T,F].concat(S);b.appearance.class=P.join(" ")}if(g.fieldSetId){const k=y.contents.find(h=>h.id===g.fieldSetId),S=p.find(h=>h.id===g.fieldSetId);S?(I=S.contents)==null||I.push(b):(p.push(k),k.contents=[b])}else p.push(b)}),y.contents=p,y.id}return{checkCanFindFormNode:c,checkCanOpenLayoutEditor:a,changeFormControlsByResponseLayoutConfig:d,getResonseFormLayoutConfig:s}}var Ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Bn={exports:{}};(function(o,t){(function(e){o.exports=e()})(function(){return function(){function e(i,r,l){function s(d,f){if(!r[d]){if(!i[d]){var u=typeof at=="function"&&at;if(!f&&u)return u(d,!0);if(c)return c(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var y=r[d]={exports:{}};i[d][0].call(y.exports,function(p){var g=i[d][1][p];return s(g||p)},y,y.exports,e,i,r,l)}return r[d].exports}for(var c=typeof at=="function"&&at,a=0;a<l.length;a++)s(l[a]);return s}return e}()({1:[function(e,i,r){var l={},s="(?:^|\\s)",c="(?:\\s|$)";function a(u){var m=l[u];return m?m.lastIndex=0:l[u]=m=new RegExp(s+u+c,"g"),m}function d(u,m){var y=u.className;y.length?a(m).test(y)||(u.className+=" "+m):u.className=m}function f(u,m){u.className=u.className.replace(a(m)," ").trim()}i.exports={add:d,rm:f}},{}],2:[function(e,i,r){(function(l){var s=e("contra/emitter"),c=e("crossvent"),a=e("./classes"),d=document,f=d.documentElement;function u(C,U){var _=arguments.length;_===1&&Array.isArray(C)===!1&&(U=C,C=[]);var O,A,z,de,B,j,W,$,te,ue=null,Ie,X,ge=!1,ye=0,oe,R=U||{};R.moves===void 0&&(R.moves=I),R.accepts===void 0&&(R.accepts=I),R.invalid===void 0&&(R.invalid=Ke),R.containers===void 0&&(R.containers=C||[]),R.isContainer===void 0&&(R.isContainer=w),R.copy===void 0&&(R.copy=!1),R.copySortSource===void 0&&(R.copySortSource=!1),R.revertOnSpill===void 0&&(R.revertOnSpill=!1),R.removeOnSpill===void 0&&(R.removeOnSpill=!1),R.direction===void 0&&(R.direction="vertical"),R.ignoreInputTextSelection===void 0&&(R.ignoreInputTextSelection=!0),R.mirrorContainer===void 0&&(R.mirrorContainer=d.body);var ne=s({containers:R.containers,start:Ze,end:_e,cancel:he,remove:ie,destroy:je,canMove:We,dragging:!1});return R.removeOnSpill===!0&&ne.on("over",Ft).on("out",nt),ze(),ne;function le(x){return ne.containers.indexOf(x)!==-1||R.isContainer(x)}function ze(x){var E=x?"remove":"add";p(f,E,"mousedown",qe),p(f,E,"mouseup",M)}function Ve(x){var E=x?"remove":"add";p(f,E,"mousemove",Oe)}function Ne(x){var E=x?"remove":"add";c[E](f,"selectstart",Pe),c[E](f,"click",Pe)}function je(){ze(!0),M({})}function Pe(x){Ie&&x.preventDefault()}function qe(x){de=x.clientX,B=x.clientY;var E=g(x)!==1||x.metaKey||x.ctrlKey;if(!E){var V=x.target,H=Fe(V);H&&(Ie=H,Ve(),x.type==="mousedown"&&(v(V)?V.focus():x.preventDefault()))}}function Oe(x){if(Ie){if(g(x)===0){M({});return}if(!(x.clientX!==void 0&&Math.abs(x.clientX-de)<=(R.slideFactorX||0)&&x.clientY!==void 0&&Math.abs(x.clientY-B)<=(R.slideFactorY||0))){if(R.ignoreInputTextSelection){var E=L("clientX",x)||0,V=L("clientY",x)||0,H=d.elementFromPoint(E,V);if(v(H))return}var K=Ie;Ve(!0),Ne(),_e(),Ge(K),a.add($||z,"gu-transit"),Tt(),St(),ye=0,tt(x)}}}function Fe(x){if(!(ne.dragging&&O)&&!le(x)){for(var E=x;h(x)&&le(h(x))===!1;)if(R.invalid(x,E)||(x=h(x),!x))return;var V=h(x);if(V&&!R.invalid(x,E)){var H=R.moves(x,V,E,F(x));if(H)return{item:x,source:V}}}}function We(x){return!!Fe(x)}function Ze(x){var E=Fe(x);E&&Ge(E)}function Ge(x){Nt(x.item,x.source)&&($=x.item.cloneNode(!0),ne.emit("cloned",$,x.item,"copy")),A=x.source,z=x.item,j=W=F(x.item),ne.dragging=!0,ne.emit("drag",z,A)}function Ke(){return!1}function _e(){if(ne.dragging){var x=$||z;Y(x,h(x))}}function Xe(){Ie=!1,Ve(!0),Ne(!0)}function M(x){if(Xe(),!!ne.dragging){var E=$||z,V=L("clientX",x)||0,H=L("clientY",x)||0,K=b(O,V,H),ee=dt(K,V,H);ee&&($&&R.copySortSource||!$||ee!==A)?Y(E,ee):R.removeOnSpill?ie():he()}}function Y(x,E){var V=h(x);$&&R.copySortSource&&E===A&&V.removeChild(z),et(E)?ne.emit("cancel",x,A):ne.emit("drop",x,E,A,W),ke()}function ie(){if(ne.dragging){var x=$||z,E=h(x);E&&E.removeChild(x),ne.emit($?"cancel":"remove",x,E,A),ke()}}function he(x){if(ne.dragging){var E=arguments.length>0?x:R.revertOnSpill,V=$||z,H=h(V),K=et(H);K===!1&&E&&($?H&&H.removeChild($):A.insertBefore(V,j)),K||E?ne.emit("cancel",V,A,A):ne.emit("drop",V,H,A,W),ke()}}function ke(){var x=$||z;Xe(),It(),kt(),x&&a.rm(x,"gu-transit"),te&&clearTimeout(te),ne.dragging=!1,ue&&ne.emit("out",x,ue,A),ne.emit("dragend",x,ye),A=z=$=j=W=te=ue=null}function et(x,E){var V;return E!==void 0?V=E:O?V=W:V=F($||z),x===A&&V===j}function dt(x,E,V){for(var H=x;H&&!K();)H=h(H);return H;function K(){var ee=le(H);if(ee===!1)return!1;var Ce=ut(H,x),fe=ft(H,Ce,E,V),ve=et(H,fe);return ve?!0:R.accepts(z,H,A,fe)}}function tt(x){if(!O)return;x.preventDefault();var E=L("clientX",x)||0,V=L("clientY",x)||0;O.style.left=E-2+"px",O.style.top=V-2+"px";var H=$||z,K=b(O,E,V),ee=dt(K,E,V),Ce=ee!==null&&ee!==ue;(Ce||ee===null)&&(me(),ue=ee,Te()),Vt(K,V);var fe=h(H);if(ee===A&&$&&!R.copySortSource){fe&&fe.removeChild(H);return}var ve,Se=ut(ee,K);if(ge=Mt(Se,ee),Se!==null)ve=ft(ee,Se,E,V);else if(R.revertOnSpill===!0&&!$)ve=j,ee=A;else{$&&fe&&fe.removeChild(H),$&&X&&(X.style.display="none");return}X.style.display="block",xt(ve,H,Ce),ve?Et(Se,ve):Bt(ee);function ae(se){ne.emit(se,H,ue,A)}function Te(){Ce&&ae("over")}function me(){ue&&ae("out")}}function xt(x,E,V){(x===E||x===F(E))&&(W=F(E)),(x===null&&V||x!==E&&x!==F(E))&&(W=x)}function Ft(x){a.rm(x,"gu-hide")}function nt(x){ne.dragging&&a.add(x,"gu-hide")}function St(){O||(O=document.createElement("div"),O.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",O.innerHTML=R.getMirrorText&&R.getMirrorText(z)||"控件",a.add(O,"gu-mirror"),R.mirrorContainer.appendChild(O),p(f,"add","mousemove",tt),a.add(R.mirrorContainer,"gu-unselectable"),ne.emit("cloned",O,z,"mirror"))}function Tt(){if(X=document.createElement("div"),a.add(X,"gu-insertion"),z){var x=z.getBoundingClientRect();X.style.left=x.left+"px",X.style.top=x.top+"px"}ge=!1,R.mirrorContainer.appendChild(X)}function It(){O&&(a.rm(R.mirrorContainer,"gu-unselectable"),p(f,"remove","mousemove",tt),h(O).removeChild(O),O=null)}function kt(){X&&(h(X).removeChild(X),X=null)}function ut(x,E){for(var V=E;V!==x&&h(V)!==x;)V=h(V);return V===f?null:V}function Mt(x,E){if(!E)return ge;var V=x||E&&E.lastElementChild;if(!V)return!0;var H=getComputedStyle(x),K=/^inline/.test(H.getPropertyValue("display"))||/^(left|right)$/.test(H.getPropertyValue("float"));if(K)return!0;if(E){var ee=getComputedStyle(E),Ce=ee.getPropertyValue("display");if(/flex$/.test(Ce)){var fe=ee.getPropertyValue("flex-direction")||"row";if(fe==="row"||fe==="row-reverse")return!pt(E)}return!1}return!0}function pt(x){if(!x.children||!x.children.length)return!1;for(const E of Array.from(x.children)){const H=(E.className&&E.className.split(" ")||[]).filter(K=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(K));if(!H.length)return!1;for(const K of H){const ee=K.slice(K.lastIndexOf("-")+1);if(parseInt(ee,10)!==12)return!1}}return!0}function Et(x,E){const V=E.getBoundingClientRect();if(X.style.left=V.left+"px",X.style.top=V.top+"px",ge){if(X.style.height=V.height+"px",X.style.width="4px",x){const H=x.getBoundingClientRect();H.top!==V.top&&(X.style.left=H.right+"px",X.style.top=H.top+"px",X.style.height=H.height+"px")}}else if(X.style.height="4px",X.style.width=V.width+"px",oe){const H=oe.getBoundingClientRect();V.top<H.top&&(X.style.display="none")}E===z&&z&&(X.style.display="none")}function Bt(x){W=null;var E=x.lastElementChild;if(E){var V=E.getBoundingClientRect();ge?(X.style.left=V.right+"px",X.style.top=V.top+"px",X.style.height=V.height+"px",X.style.width="4px"):(X.style.left=V.left+"px",X.style.top=V.bottom+"px",X.style.height="4px",X.style.width=V.width+"px"),E===z&&z&&(X.style.display="none")}else X.style.display="none"}function Vt(x,E){if(!R.mirrorContainer.contains(x)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(oe=m(x),!oe||!oe.contains(x)))return;const V=document.querySelector(".dgComponentSelected"),H=oe.getBoundingClientRect();if(E-30<H.top&&oe.scrollTop>0){let K=oe.scrollTop<10?oe.scrollTop:10;oe.scrollBy(0,-1*K),V&&oe.contains(V)&&(ye=ye+-1*K)}if(E+30>H.bottom&&oe.scrollTop<oe.scrollHeight-oe.clientHeight){const K=oe.scrollHeight-oe.clientHeight-oe.scrollTop;let ee=K<10?K:10;oe.scrollBy(0,ee),V&&oe.contains(V)&&(ye=ye+ee)}}function ft(x,E,V,H){var K=R.direction==="horizontal",ee=R.direction==="mixed",Ce=E!==x?ve():fe();return Ce;function fe(){var ae=x.children.length,Te,me,se;for(Te=0;Te<ae;Te++)if(me=x.children[Te],se=me.getBoundingClientRect(),K&&se.left+se.width/2>V||!ee&&!K&&se.top+se.height/2>H||ee&&se.left+se.width>V&&se.top+se.height>H)return me;return null}function ve(){var ae=E.getBoundingClientRect();if(ee){var Te=H-ae.top,me=V-ae.left,se=ae.bottom-H,q=ae.right-V,G=Math.min(me,q,Te,se),pe;return ge?pe=q<me:pe=se===G||q===G||me===G,Se(pe)}return Se(K?V>ae.left+k(ae)/2:H>ae.top+S(ae)/2)}function Se(ae){return ae?F(E):E}}function Nt(x,E){return typeof R.copy=="boolean"?R.copy:R.copy(x,E)}}function m(C){const U=Array.from(window.scrollContainerList);if(U.length===1){const O=Array.from(window.scrollContainerList)[0];return document.getElementById(O)}const _=y(U);for(const O of _)if(O.contains(C))return O;return null}function y(C){const U=[];return C.forEach(_=>{const O=document.getElementById(_);O&&U.push(O)}),U.sort((_,O)=>_.contains(O)?1:O.contains(_)?-1:0),U}function p(C,U,_,O){var A={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},z={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},de={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?c[U](C,z[_],O):l.navigator.msPointerEnabled?c[U](C,de[_],O):(c[U](C,A[_],O),c[U](C,_,O))}function g(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var U=C.button;if(U!==void 0)return U&1?1:U&2?3:U&4?2:0}function b(C,U,_){C=C||{};var O=C.className||"",A;return C.className+=" gu-hide",A=d.elementFromPoint(U,_),C.className=O,A}function w(){return!1}function I(){return!0}function k(C){return C.width||C.right-C.left}function S(C){return C.height||C.bottom-C.top}function h(C){return C.parentNode===d?null:C.parentNode}function v(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||T(C)}function T(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:T(h(C))}function F(C){return C.nextElementSibling||U();function U(){var _=C;do _=_.nextSibling;while(_&&_.nodeType!==1);return _}}function P(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function L(C,U){var _=P(U),O={pageX:"clientX",pageY:"clientY"};return C in O&&!(C in _)&&O[C]in _&&(C=O[C]),_[C]}i.exports=u}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(e,i,r){i.exports=function(s,c){return Array.prototype.slice.call(s,c)}},{}],4:[function(e,i,r){var l=e("ticky");i.exports=function(c,a,d){c&&l(function(){c.apply(d||null,a||[])})}},{ticky:10}],5:[function(e,i,r){var l=e("atoa"),s=e("./debounce");i.exports=function(a,d){var f=d||{},u={};return a===void 0&&(a={}),a.on=function(m,y){return u[m]?u[m].push(y):u[m]=[y],a},a.once=function(m,y){return y._once=!0,a.on(m,y),a},a.off=function(m,y){var p=arguments.length;if(p===1)delete u[m];else if(p===0)u={};else{var g=u[m];if(!g)return a;g.splice(g.indexOf(y),1)}return a},a.emit=function(){var m=l(arguments);return a.emitterSnapshot(m.shift()).apply(this,m)},a.emitterSnapshot=function(m){var y=(u[m]||[]).slice(0);return function(){var p=l(arguments),g=this||a;if(m==="error"&&f.throws!==!1&&!y.length)throw p.length===1?p[0]:p;return y.forEach(function(w){f.async?s(w,p,g):w.apply(g,p),w._once&&a.off(m,w)}),a}},a}},{"./debounce":4,atoa:3}],6:[function(e,i,r){(function(l){var s=e("custom-event"),c=e("./eventmap"),a=l.document,d=m,f=p,u=[];l.addEventListener||(d=y,f=g),i.exports={add:d,remove:f,fabricate:b};function m(h,v,T,F){return h.addEventListener(v,T,F)}function y(h,v,T){return h.attachEvent("on"+v,I(h,v,T))}function p(h,v,T,F){return h.removeEventListener(v,T,F)}function g(h,v,T){var F=k(h,v,T);if(F)return h.detachEvent("on"+v,F)}function b(h,v,T){var F=c.indexOf(v)===-1?L():P();h.dispatchEvent?h.dispatchEvent(F):h.fireEvent("on"+v,F);function P(){var C;return a.createEvent?(C=a.createEvent("Event"),C.initEvent(v,!0,!0)):a.createEventObject&&(C=a.createEventObject()),C}function L(){return new s(v,{detail:T})}}function w(h,v,T){return function(P){var L=P||l.event;L.target=L.target||L.srcElement,L.preventDefault=L.preventDefault||function(){L.returnValue=!1},L.stopPropagation=L.stopPropagation||function(){L.cancelBubble=!0},L.which=L.which||L.keyCode,T.call(h,L)}}function I(h,v,T){var F=k(h,v,T)||w(h,v,T);return u.push({wrapper:F,element:h,type:v,fn:T}),F}function k(h,v,T){var F=S(h,v,T);if(F){var P=u[F].wrapper;return u.splice(F,1),P}}function S(h,v,T){var F,P;for(F=0;F<u.length;F++)if(P=u[F],P.element===h&&P.type===v&&P.fn===T)return F}}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(e,i,r){(function(l){var s=[],c="",a=/^on/;for(c in l)a.test(c)&&s.push(c.slice(2));i.exports=s}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(e,i,r){(function(l){var s=l.CustomEvent;function c(){try{var a=new s("cat",{detail:{foo:"bar"}});return a.type==="cat"&&a.detail.foo==="bar"}catch{}return!1}i.exports=c()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(d,f){var u=document.createEvent("CustomEvent");return f?u.initCustomEvent(d,f.bubbles,f.cancelable,f.detail):u.initCustomEvent(d,!1,!1,void 0),u}:function(d,f){var u=document.createEventObject();return u.type=d,f?(u.bubbles=!!f.bubbles,u.cancelable=!!f.cancelable,u.detail=f.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(e,i,r){var l=i.exports={},s,c;function a(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?c=clearTimeout:c=d}catch{c=d}})();function f(S){if(s===setTimeout)return setTimeout(S,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(S,0);try{return s(S,0)}catch{try{return s.call(null,S,0)}catch{return s.call(this,S,0)}}}function u(S){if(c===clearTimeout)return clearTimeout(S);if((c===d||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(S);try{return c(S)}catch{try{return c.call(null,S)}catch{return c.call(this,S)}}}var m=[],y=!1,p,g=-1;function b(){!y||!p||(y=!1,p.length?m=p.concat(m):g=-1,m.length&&w())}function w(){if(!y){var S=f(b);y=!0;for(var h=m.length;h;){for(p=m,m=[];++g<h;)p&&p[g].run();g=-1,h=m.length}p=null,y=!1,u(S)}}l.nextTick=function(S){var h=new Array(arguments.length-1);if(arguments.length>1)for(var v=1;v<arguments.length;v++)h[v-1]=arguments[v];m.push(new I(S,h)),m.length===1&&!y&&f(w)};function I(S,h){this.fun=S,this.array=h}I.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function k(){}l.on=k,l.addListener=k,l.once=k,l.off=k,l.removeListener=k,l.removeAllListeners=k,l.emit=k,l.prependListener=k,l.prependOnceListener=k,l.listeners=function(S){return[]},l.binding=function(S){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(S){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(e,i,r){(function(l){var s=typeof l=="function",c;s?c=function(a){l(a)}:c=function(a){setTimeout(a,0)},i.exports=c}).call(this,e("timers").setImmediate)},{timers:11}],11:[function(e,i,r){(function(l,s){var c=e("process/browser.js").nextTick,a=Function.prototype.apply,d=Array.prototype.slice,f={},u=0;r.setTimeout=function(){return new m(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new m(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(y){y.close()};function m(y,p){this._id=y,this._clearFn=p}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(y,p){clearTimeout(y._idleTimeoutId),y._idleTimeout=p},r.unenroll=function(y){clearTimeout(y._idleTimeoutId),y._idleTimeout=-1},r._unrefActive=r.active=function(y){clearTimeout(y._idleTimeoutId);var p=y._idleTimeout;p>=0&&(y._idleTimeoutId=setTimeout(function(){y._onTimeout&&y._onTimeout()},p))},r.setImmediate=typeof l=="function"?l:function(y){var p=u++,g=arguments.length<2?!1:d.call(arguments,1);return f[p]=!0,c(function(){f[p]&&(g?y.apply(null,g):y.call(null),r.clearImmediate(p))}),p},r.clearImmediate=typeof s=="function"?s:function(y){delete f[y]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Bn);const Vn={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}},Nn={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},ht=n.defineComponent({name:"Toast",props:Nn,emits:["close","click"],setup:(o,t)=>{const e=n.ref(o.animate),i="fadeOut",r=n.computed(()=>o.options),l=n.ref(!1),s=n.computed(()=>{const w={animated:l.value,toast:!0};return w[o.animate]=!1,w[i]=l.value,w[r.value.type]=!0,r.value.theme&&(w[r.value.theme]=!0),w}),c=n.computed(()=>{const k=`f-icon-${r.value&&r.value.type?r.value.type.replace("toasty-type-",""):"default"}`,S={"f-icon":!0};return S[k]=!0,S}),a=n.computed(()=>r.value.title||r.value.message),d=n.computed(()=>r.value.title&&r.value.message),f=n.computed(()=>!r.value.title&&r.value.message),u=n.computed(()=>o.showCloseButton),m=n.computed(()=>!!r.value.buttons||!!t.slots.default);function y(w){w.stopPropagation(),w.preventDefault(),l.value=!1,setTimeout(()=>{t.emit("close",r.value)},200)}function p(w,I){}function g(w){return`f-preten-link ${w.customClass?w.customClass:""}`}n.watch(e,()=>{e.value});const b=()=>{var w;return n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"after-toast-msg text-right"},[!t.slots.default&&((w=r.value.buttons)==null?void 0:w.map(I=>n.createVNode("span",{class:g(I),onClick:k=>void 0},[I.text]))),t.slots.default&&t.slots.default()])])};return()=>n.createVNode("div",{class:s.value,style:"min-height:44px"},[u.value&&n.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:y},[n.createVNode("span",{class:"f-icon modal_close"},null)]),a.value&&n.createVNode("section",{class:"modal-tips"},[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:c.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[d.value&&n.createVNode(n.Fragment,null,[n.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:r.value.title},null),n.createVNode("p",{class:"toast-msg",innerHTML:r.value.message},null),m.value&&b()]),f.value&&(r.value.buttons?n.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null),n.createVNode("div",{class:"after-toast-title text-right ml-auto"},[b()])]):n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null))])])])}}),st=n.defineComponent({name:"Notify",props:Vn,emits:["close","empty"],setup(o,t){const e=n.computed(()=>({"farris-notify":!0})),i={left:12,right:12,top:20,bottom:12},r=n.ref(),l=n.ref(o.options),s=n.ref(o.showCloseButton),c=n.computed(()=>o.position||"bottom-right"),a=n.computed(()=>o.timeout!=null?o.timeout:3e3),d=n.computed(()=>{const m=o.bottom?o.bottom:i.bottom,y=o.top?o.top:i.top,p={transition:"all 0.2s ease",left:c.value.indexOf("left")>-1?`${o.left?o.left:i.left}px`:"",right:c.value.indexOf("right")>-1?`${o.right?o.right:i.right}px`:"",top:c.value.indexOf("top")>-1?`${y}px`:"",bottom:c.value.indexOf("bottom")>-1?`${m}px`:""};return c.value.indexOf("center")>-1&&(p.left="50%",p.marginLeft="calc(-24rem / 2)",c.value==="center-center"&&(p.top="50%",p.transform="translate(-50%, -50%)")),p});function f(m){t.emit("close")}a.value&&setTimeout(()=>{f()},a.value),t.expose({closeToast:f,container:r,notifyPosition:c});function u(m,y){f()}return()=>n.createVNode("div",{class:e.value,style:d.value,ref:r},[n.createVNode(ht,{options:l.value,showCloseButton:s.value,animate:o.animate,onClose:m=>u(m,l.value)},null)])}});class jn{constructor(){D(this,"notifyRefs",[]);D(this,"globalConfig",n.reactive({}))}escapeAllHtml(t){if(typeof t!="string"||!t)return"";const e=document.createElement("div");return e.textContent=t||"",e.innerHTML.replace(/ /g," ").replace(/\\n/g,"<br>").replace(/\\t/g," ").replace(/\\r/g,"")}createNotifyInstance(t){const e=this,r=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...t}),l=document.createElement("div");l.style.display="contents";const s=n.createApp({setup(){var d;const c=n.ref();function a(){c.value.container.style.transform="scale(0)",setTimeout(()=>{e.updateNotifyPositionForClose(r,c),s.unmount()},220)}if(r.position.indexOf("top")>-1){const f=e.getNotifyInstances(r.position),u=f[f.length-1];if(u){const m=u.value.container.getBoundingClientRect();r.top=m.bottom}}return r.safeHtml&&((d=r.options)!=null&&d.message)&&(r.options.message=e.escapeAllHtml(r.options.message)),n.onUnmounted(()=>{document.body.removeChild(l)}),n.onMounted(()=>{e.updateNotifyPositionForCreate(r,c)}),()=>n.createVNode(n.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[n.createVNode(st,n.mergeProps({ref:c},r,{onClose:a}),null)]})}});return s.provide("NotifyService",this),document.body.appendChild(l),s.mount(l),s}getNotifyInstances(t){return this.notifyRefs.filter(e=>e.value.notifyPosition===t)}updateNotifyPositionForCreate(t,e){if(this.notifyRefs&&this.notifyRefs.length){const i=window.innerHeight;t.position.indexOf("bottom")>-1&&this.getNotifyInstances(t.position).forEach(r=>{const l=r.value.container.getBoundingClientRect();r.value.container.style.bottom=l.height+i-l.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,e]}updateNotifyPositionForClose(t,e){const i=this.notifyRefs.indexOf(e);if(t.position.indexOf("top")>-1){const r=this.getNotifyInstances(t.position),l=r.indexOf(e);r.slice(l+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}i>-1&&this.notifyRefs.splice(i,1)}show(t){return this.createNotifyInstance(t)}buildNotifyProps(t,e){let i="",r="",l,s,c;typeof e=="string"?i=e:e&&(i=e.message||"",r=e.title||"",s=e.position||null,c=e.showCloseButton!=null?e.showCloseButton:null,l=e.timeout!=null?e.timeout:null);const d={options:{type:t,message:i,title:r}};return s!=null&&(d.position=s),c!=null&&(d.showCloseButton=c),l!=null&&(d.timeout=l),d}info(t){const e=this.buildNotifyProps("info",t);return this.show(e)}success(t){const e=this.buildNotifyProps("success",t);return this.show(e)}warning(t){const e=this.buildNotifyProps("warning",t);return this.show(e)}error(t){const e=this.buildNotifyProps("error",t);return this.show(e)}close(t){t&&t.unmount()}closeAll(){this.notifyRefs.forEach(t=>{t==null||t.value.closeToast()}),this.notifyRefs.length=0}}const Pn=Symbol("NOTIFY_SERVICE_TOKEN");st.install=o=>{o.component(st.name,st),o.component(ht.name,ht);const t=new jn;o.provide(Pn,t),o.provide("FNotifyService",t)};const At=new Map([["appearance",xe.resolveAppearance],["column","columnOption"]]);function On(o,t,e){var u;const i=e.parentComponentInstance,r=i.schema.type,l=String(((u=i.schema.appearance)==null?void 0:u.class)||"").split(" "),s=r==="section"||r==="tab-page",c=l.includes("f-page-content-nav"),a=l.includes("f-page-main"),d=o.getSchemaByType("component");d.id=`${t.id}-component`,d.componentType="data-grid";let f="";return f+=s?"f-struct-data-grid-in-card f-struct-is-subgrid":"",f+=c?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",f+=a?"f-struct-data-grid f-struct-wrapper":"",d.appearance={class:f},d.contents=[t],d}function $n(o,t,e){const i=e.parentComponentInstance,r=String(i.schema.appearance.class||"").split(" "),l=r.includes("f-page-content-nav"),s=r.includes("f-page-main"),c=o.getSchemaByType("section");c.id=`${t.id}-section`;let a="";return a+=l?"f-section-in-nav ":"",a+=s?"f-section-in-managelist ":"",a+="f-section-grid",c.appearance={class:a},c.contents=[t],c}function Rn(o,t,e){const i=o.getSchemaByType("content-container");return i.id=`${t.id}-layout`,i.appearance={class:"f-grid-is-sub f-utils-flex-column"},i.contents=[t],i}function Ht(o,t,e){const r=e.parentComponentInstance.schema.type,l=r==="section"||r==="tab-page";t.appearance={class:"f-component-grid"};const c=(l?Rn:$n)(o,t,e);return On(o,c,e)}const Ut={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-grid.schema.json",title:"tree-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"tree-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fit:{type:"boolean",default:!1},showStripe:{type:"boolean",default:!0},showBorder:{type:"boolean",default:!1},showTreeNodeIcons:{type:"boolean",default:!1},showSetting:{type:"boolean",default:!1},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disabled:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enableSelectRow:{description:"允许选中行",type:"boolean",default:!0},enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}},onSelectionChange:{description:"行切换事件",type:"string",default:""}},required:["id","type","columns"],events:{onSelectionChange:"行切换事件",onClickRow:"行点击事件"}},vt={autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1}};xe.createPropsResolver(vt,Ut,At,Ht),xe.createTreeGridSelectionItemResolver(),xe.createTreeGridBindingResolver();const qn=Object.assign({},vt,{componentId:{type:String,default:""}});xe.createPropsResolver(qn,Ut,At,Ht),xe.createDataViewUpdateColumnsResolver();function Ln(o,t,e,i,r,l,s,c,a,d,f,u,m,y,p,g,b){const{calculateCellPositionInRow:w}=l,{columnContext:I,hasLeftFixedColumn:k,hasRightFixedColumn:S}=s,{gridDataStyle:h,leftFixedGridDataStyle:v,rightFixedGridDataStyle:T}=y,{renderDataRow:F}=J.getHierarchyRow(o,t,I,b,c,a,d,f,u,m,y,p,g),P=[F];function L(A,z){const de=w(A);return b.value.filter(B=>B.visible!==!1).map((B,j)=>P[B.type](B,de,z,j))}function C(){return n.createVNode("div",{ref:i,class:"fv-grid-content-left-fixed"},[n.createVNode("div",{class:"fv-grid-data",style:v.value},[L(I.value.leftColumns.filter(A=>A.visible),"left")])])}function U(){return n.createVNode("div",{ref:e,class:"fv-grid-content-primary"},[n.createVNode("div",{class:"fv-grid-data",style:h.value},[L(I.value.primaryColumns.filter(A=>A.visible),"primary")])])}function _(){return n.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[n.createVNode("div",{class:"fv-grid-data",style:T.value},[L(I.value.rightColumns.filter(A=>A.visible),"right")])])}function O(){const A=[];return k.value&&A.push(C()),A.push(U()),S.value&&A.push(_()),A}return{renderDataArea:O}}const An=n.defineComponent({name:"FTreeGrid",props:vt,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode"],setup(o,t){var me,se;const i=((me=o.rowOption)==null?void 0:me.height)||28,r=n.ref(20),l=n.ref(o.columns),s=J.useIdentify(o),{idField:c}=s,a=n.ref(),d=n.ref(),f=n.ref(),u=n.ref(),m=n.ref(),y=n.ref([]),p=n.ref(!1),g=n.ref(((se=o.rowOption)==null?void 0:se.wrapContent)||!1),b=J.useGroupData(o,s),w=J.useFilter(),I=J.useHierarchy(o),{collapseField:k}=I,{showLoading:S,renderLoading:h}=J.useLoading(o,a),v=J.useDataView(o,new Map,w,I,s),{dataView:T}=v,F=J.useSelection(o,v,s,y,t),P=J.useSelectHierarchyItem(o,y,v,s,F,t),L=n.computed(()=>o.disabled),C=n.computed(()=>o.virtualized?Math.min(v.dataView.value.length,r.value):v.dataView.value.length),{containerStyleObject:U}=J.useDataViewContainerStyle(o),_=J.useCommandColumn(o),{applyCommands:O}=_;O(l);const A=J.useColumn(o),z=J.useSort(o),{applyColumnSorter:de,columnContext:B,updateColumnRenderContext:j}=A;de(v,z);const W=J.useGroupColumn(o,B),$=J.useRow(o,t,F,s),te=J.useEdit(o,t,s,$,y),ue=J.useVisualDataBound(o),Ie=J.useVisualDataCell(o,te,ue),X=J.useVisualDataRow(o,v,te,I,s,ue,Ie),ge=J.useVisualData(o,l,v,C,0,X),{getVisualData:ye}=ge,oe=J.useCellPosition(o,B),R=J.useSidebar(o,F),{sidebarWidth:ne}=R,le=J.useVirtualScroll(o,v,y,B,ge,C,0,ne),{onWheel:ze,dataGridWidth:Ve,viewPortHeight:Ne,viewPortWidth:je,resetScroll:Pe,updateVisibleRowsOnLatestVisibleScope:qe}=le,Oe=J.useFitColumn(o,B,d,je,W),{calculateColumnsSize:Fe}=Oe,We=J.useFilterHistory(),Ze=J.useColumnFilter(d,m,v,We,le),Ge=J.useDragColumn(o,t,A,v,W,b,le),Ke=n.computed(()=>({"fv-grid":!0,"fv-grid-bordered":o.showBorder,"fv-grid-horizontal-bordered":o.showHorizontalLines,"fv-datagrid-strip":o.showStripe})),_e=n.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":p.value,"fv-grid-wrap-content":g.value})),{renderDataArea:Xe}=Ln(o,t,f,u,m,oe,A,v,te,I,$,F,P,le,ge,ue,y),{renderGridHeader:M,renderGridColumnResizeOverlay:Y,shouldShowHeader:ie}=J.getColumnHeader(o,t,d,u,m,A,v,Ge,Ze,w,We,Oe,W,F,R,z,le,je,y),{renderDataGridSidebar:he}=J.getSidebar(o,$,F,R,le),{renderDisableMask:ke}=J.getDisableMask(),{renderHorizontalScrollbar:et}=J.getHorizontalScrollbar(o,d,le),{renderVerticalScrollbar:dt}=J.getVerticalScrollbar(o,d,le);function tt(){var q,G,pe;if(d.value&&d.value.clientHeight>0&&((q=d.value)==null?void 0:q.clientWidth)>0){const be=Math.ceil(d.value.clientHeight/i);be>r.value&&(r.value=be,qe()),Ne.value=((G=f.value)==null?void 0:G.clientHeight)||0,Ve.value=((pe=d.value)==null?void 0:pe.clientWidth)||0,Fe()}}n.onMounted(()=>{d.value&&(r.value=Math.max(Math.ceil(d.value.clientHeight/i),r.value),y.value=ye(0,C.value+0-1),en.useResizeObserver(d.value,tt),Fe(),n.nextTick(()=>{d.value&&(Ve.value=d.value.clientWidth),f.value&&(je.value=f.value.clientWidth,Ne.value=f.value.clientHeight)})),S.value&&h()}),n.onUnmounted(()=>{}),n.watch(je,()=>{d.value&&Fe()});function xt(q){v.collapseTo(q),v.reOrderVisibleIndex(),Pe()}function Ft(q){v.expandTo(q),v.reOrderVisibleIndex(),Pe()}function nt(){const q=F.getSelectionRow();return q?q.dataIndex-1:-1}function St(){const q=nt();v.insertNewDataItem(q),y.value=ye(0,C.value+0-1)}function Tt(){const q=nt();v.insertNewChildDataItem(q),y.value=ye(0,C.value+0-1)}function It(){const q=nt(),G=P.getNextSelectableHierarchyItemId(q);v.removeHierarchyDataItem(q),y.value=ye(0,C.value+0-1),G&&F.selectItemById(G)}function kt(q){te.onEditingRow(q)}function ut(q){te.acceptEditingRow(q)}function Mt(q){te.cancelEditingRow(q)}function pt(q){q&&(l.value=q,O(l),j(l.value),de(v,z),Fe())}n.watch(()=>o.columns,q=>{pt(q)});function Et(q,G){q&&(v.load(q),v.reOrderVisibleIndex(),G!=null&&G.keepScrollPosition?le.scrollTo(le.offsetY.value):Pe())}function Bt(q){F.selectItemById(q)}function Vt(q){const G=y.value.find(pe=>pe.raw[s.idField.value]===q);G&&$.clickRowItem(G)}function ft(q){$.activeRowById(q)}function Nt(q){F.selectItemByIds(q)}function x(){return F.getSelectedItems()}function E(){F.clearSelection()}const V=n.computed(()=>!y.value||!y.value.length),{renderEmpty:H}=J.getEmpty(t);function K(){return F.getSelectionRow()}function ee(q){F.unSelectItemByIds(q)}function Ce(){return F.currentSelectedDataId.value}function fe(q,G,pe){const be=T.value.find(we=>we[c.value]===q);if(be){if(Object.keys(be).forEach(ce=>{Object.prototype.hasOwnProperty.call(G,ce)&&(be[ce]=G[ce])}),pe){const{collapseField:ce,disabledField:Le,checkedField:Ae,visibleField:He}=pe;ce&&!Z.isUndefined(G[ce])&&(be.__fv_collapse__=G[ce]),Ae&&!Z.isUndefined(G[Ae])&&(be.__fv_checked__=G[Ae]),Le&&!Z.isUndefined(G[Le])&&(be.__fv_disabled__=G[Le]),He&&!Z.isUndefined(G[He])&&(be.__fv_visible__=G[He])}const we=y.value.find(ce=>ce.raw[c.value]===q),Qt=y.value.findIndex(ce=>ce.raw[c.value]===q);if(we){if(we.raw=be,Object.keys(we.data).forEach(ce=>{we.data[ce].updateData(be)}),pe){const{collapseField:ce,disabledField:Le,checkedField:Ae,visibleField:He}=pe;ce&&!Z.isUndefined(G[ce])&&(we.collapse=G[ce]),Ae&&!Z.isUndefined(G[Ae])&&(we.checked=G[Ae]),Le&&!Z.isUndefined(G[Le])&&(we.disabled=G[Le]),He&&!Z.isUndefined(G[He])&&(we.visible=G[He])}y.value=[...y.value.slice(0,Qt),we,...y.value.slice(Qt+1)]}}}function ve(q){const G=v.dataView.value.find(pe=>pe[c.value]===q);return G?G[k.value]:""}function Se(){return k.value}t.expose({activeRowById:ft,addNewDataItem:St,addNewChildDataItem:Tt,collapseTo:xt,expandTo:Ft,removeDataItem:It,editDataItem:kt,acceptDataItem:ut,cancelDataItem:Mt,updateColumns:pt,updateDataSource:Et,selectItemById:Bt,selectItemByIds:Nt,getSelectedItems:x,clearSelection:E,getSelectionRow:K,clickRowItemById:Vt,unSelectItemByIds:ee,getCurrentRowId:Ce,reassignRowData:fe,getCollapseField:Se,getCollapseStatusById:ve});const ae=n.computed(()=>{const q={};return le.shouldShowHorizontalScrollbar.value&&(q.paddingBottom="10px"),le.shouldShowVirticalScrollbar.value&&(q.paddingRight="10px"),q}),Te=n.computed(()=>({...U.value,borderRadius:"5px"}));return()=>n.createVNode("div",{ref:a,class:Ke.value,style:Te.value,onWheel:ze},[d.value&&ie.value&&M(),n.createVNode("div",{ref:d,class:_e.value,onMouseover:()=>p.value=!0,onMouseleave:()=>p.value=!1,style:ae.value},[d.value&&he(y),d.value&&Xe(),d.value&&V.value&&H(),d.value&&et(),d.value&&dt()]),Y(),L.value&&ke()])}});Ue.withInstall(An);const Hn=new Map([["appearance",Qe]]);function Un(o,t,e){return t}Ye({direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Hn,Un,{title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}});const bt=new Map([["appearance",Qe]]),Dn=new Map([]),zn="root-viewmodel";class Wn{constructor(t,e){D(this,"formSchemaUtils");D(this,"controlCreatorUtils");D(this,"designViewModelUtils");this.resolver=t,this.designerHostService=e,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(t){const e=this.createComponentRefNode(t),i=this.createComponentNode(t),r=this.createViewModeNode(t),l=this.formSchemaUtils.getFormSchema();return l.module.viewmodels.push(r),l.module.components.push(i),this.designViewModelUtils.assembleDesignViewModel(),e}createComponentRefNode(t){const e=this.resolver.getSchemaByType("component-ref");return Object.assign(e,{id:`${t.componentId}-component-ref`,component:`${t.componentId}-component`}),e}createComponentNode(t){const e=this.resolver.getSchemaByType("component"),i=this.createFormComponentContents(t);return Object.assign(e,{id:`${t.componentId}-component`,viewModel:`${t.componentId}-component-viewmodel`,componentType:t.componentType,appearance:{class:this.getFormComponentClass()},formColumns:t.formColumns,contents:i}),e}getFormComponentClass(){const{templateId:t}=this.formSchemaUtils.getFormSchema().module;return t==="double-list-in-tab-template"?"f-struct-wrapper f-utils-fill-flex-column":"f-struct-wrapper"}createFormComponentContents(t){const e=this.resolver.getSchemaByType("section");Object.assign(e,{id:t.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:t.componentName});const i=this.resolver.getSchemaByType("response-form"),r=[];Object.assign(i,{id:t.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:r}),e.contents=[i];const{selectedFields:l}=t;l==null||l.forEach(c=>{const a=Z.cloneDeep(c),d=this.resolveControlClassByFormColumns(t),f=this.controlCreatorUtils.setFormFieldProperty(a,"",d);f&&r.push(f)});const{templateId:s}=this.formSchemaUtils.getFormSchema().module;return s==="double-list-in-tab-template"&&(e.appearance.class="f-section-grid f-section-in-main px-0 pt-0",e.fill=!0),[e]}resolveControlClassByFormColumns(t){let e="";switch(t.formColumns){case 1:{e="col-12";break}case 2:{e="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{e="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{e="col-12 col-md-6 col-xl-3 col-el-2";break}}return e}createViewModeNode(t){return{id:`${t.componentId}-component-viewmodel`,code:`${t.componentId}-component-viewmodel`,name:t.componentName,bindTo:t.bindTo,parent:zn,fields:this.assembleViewModelFields(t),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(t){const e=[],{selectedFields:i}=t;return i==null||i.forEach(r=>{let l="blur";const s=r.type.name;(s===Ue.FormSchemaEntityFieldTypeName.Enum||s===Ue.FormSchemaEntityFieldTypeName.Boolean)&&(l="change"),e.push({type:"Form",id:r.id,fieldName:r.bindingField,groupId:null,groupName:null,updateOn:l,fieldSchema:{}})}),e}}function Gn(o,t,e,i){var l,s,c,a,d,f;const r=e.parentComponentInstance;if(r&&i){const u=(l=r.schema)==null?void 0:l.type,y={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((s=e.bindingSourceContext)==null?void 0:s.entityTitle)||((a=(c=e.bindingSourceContext)==null?void 0:c.bindingEntity)==null?void 0:a.name)||"标题",componentType:"form",formColumns:u==="splitter-pane"?1:4,parentContainerId:r.schema.id,bindTo:((d=e.bindingSourceContext)==null?void 0:d.bindTo)||"/",selectedFields:(f=e.bindingSourceContext)==null?void 0:f.bindingEntityFields};return new Wn(o,i).createComponent(y)}else return t}function _n(o,t,e){return t}Ye({customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]},bt,Gn);const Dt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct",default:null},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},binding:{description:"",type:"object",default:{}},visible:{description:"",type:"boolean",default:!0},required:{description:"",type:"boolean",default:!1},errors:{description:"",type:"object",default:null}},required:["id","type","editor"]},Xn={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number]},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null}};xe.createPropsResolver(Xn,Dt,bt,void 0),xe.createFormGroupEditorResolver();const Yn={id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number]},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}};xe.createPropsResolver(Yn,Dt,bt,void 0);const Qn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/grid-field-editor.schema.json",title:"response-form-layout-setting",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"response-form-layout-setting"},initialState:{description:"",type:"object"}},required:["id","type"]},Jn={initialState:{type:Object,default:{uniqueColClassInSM:12,uniqueColClassInMD:6,uniqueColClassInLG:3,uniqueColClassInEL:2}}};xe.createPropsResolver(Jn,Qn,Dn,_n);const Zn={width:{Type:Number,default:400},type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"},buttons:{type:Object,default:[]}};function Ct(){return new DOMException("The request is not allowed","NotAllowedError")}async function Kn(o){if(!navigator.clipboard)throw Ct();return navigator.clipboard.writeText(o)}async function eo(o){const t=document.createElement("span");t.textContent=o,t.style.whiteSpace="pre",t.style.webkitUserSelect="auto",t.style.userSelect="all",document.body.appendChild(t);const e=window.getSelection(),i=window.document.createRange();e==null||e.removeAllRanges(),i.selectNode(t),e==null||e.addRange(i);let r=!1;try{r=window.document.execCommand("copy")}finally{e==null||e.removeAllRanges(),window.document.body.removeChild(t)}if(!r)throw Ct()}async function to(o){try{await Kn(o)}catch(t){try{await eo(o)}catch(e){throw e||t||Ct()}}}function no(){async function o(t){await to(t)}return{onCopy:o}}function oo(o,t,e,i){const r=n.ref(14),l=n.ref(140),s=n.ref(""),c=n.ref(i.value.length),a=n.computed(()=>i.value),d=n.computed(()=>({"font-size":`${r.value}px`,height:"100%"}));function f(u){if(u.currentTarget){const m=u.currentTarget.value||"";c.value=m.length}}return()=>n.createVNode(n.Fragment,null,[n.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:d.value,rows:"4",maxlength:l.value,onInput:u=>f(u)},[a.value]),n.createVNode("span",{class:"textarea-wordcount",title:s.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[c.value+" / "+l.value])])}function io(o,t,e,i){const r=oo(o,t,e,i),l=new Map([["text-area",r]]);function s(c){return l.get(c)||null}return{getEditorRender:s}}function ro(){const o=n.ref(!1),t=n.ref("复制成功");return{feedbackStyle:n.computed(()=>{const i={position:"absolute",left:"50%",top:"50%",width:"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease"};return i.opacity=o.value?"0.8":"0",i.display=o.value?"":"none",i}),feedbackMessage:t,toShowFeedback:o}}function lo(o,t){const e=t.getEditorRender(o.promptEditorType);return()=>e&&e()}function ao(o){function t(m){if(m==null)return 0;let y=0;for(let p=0;p<m.length;p++){const g=m.charCodeAt(p);g>=0&&g<=128?y++:y=y+2}return y}function e(m,y){if(m!==""&&m!==void 0&&m!==null){m=""+m;const p=m.length;let g="",b=0;for(let w=0;w<p;w++){const I=m.charAt(w);if(b++,encodeURI(I).length>4&&b++,g=g.concat(I),b>=y)return g=g.concat("..."),g}if(b<y)return m}return""}const i=n.computed(()=>!!o.value&&!!o.value.date),r=n.computed(()=>`发生时间 : ${o.value&&o.value.date||""}`),l=n.computed(()=>!!o.value&&!!o.value.detail),s=n.computed(()=>o.value?t(o.value.detail)>160:!1),c=n.ref(!1),a=n.computed(()=>c.value?"收起":"展开"),d=n.computed(()=>{const m="详细信息 : "+(o.value&&o.value.detail)||"";return c.value?m:e(m,160)}),f=n.computed(()=>({position:"absolute",right:0,bottom:c.value?0:"2px",color:"#2A87FF",cursor:"pointer"}));function u(){c.value=!c.value}return()=>n.createVNode("div",{class:"toast-msg-detail"},[i.value&&n.createVNode("div",null,[r.value]),l.value&&n.createVNode("div",{class:"exception_wrap"},[n.createVNode("div",{class:"exception_error_msg"},[n.createVNode("div",{innerHTML:d.value},null),s.value&&n.createVNode("span",{style:f.value,onClick:u},[a.value])])])])}function so(o){return()=>n.createVNode("p",{class:"toast-msg-detail",innerHTML:o.value},null)}function co(o,t,e,i){const r=n.ref(o.exceptionInfo),l=n.computed(()=>{const m={"f-icon":!0},y=`f-icon-${t.value}`;return m[y]=!0,m}),s=n.computed(()=>e.value||r.value&&r.value.message),c=n.computed(()=>i.value),a=n.computed(()=>!!i.value),d=n.computed(()=>!!r.value);function f(){return d.value?ao(r):a.value?so(c):()=>null}const u=f();return()=>n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:l.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[n.createVNode("p",{class:"toast-msg-title",innerHTML:s.value},null),u()])])}function uo(o,t,e){const{onCopy:i}=t,{toShowFeedback:r}=e,l=n.ref("复制成功"),s=n.ref("复制详细信息"),c=n.ref(o.exceptionInfo||{date:"",message:"",detail:""}),a=n.computed(()=>c.value&&c.value.detail||"");function d(f){i(a.value).catch(u=>{l.value="复制失败"}).finally(()=>{r.value=!0,setTimeout(()=>{r.value=!1},700)})}return()=>n.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[n.createVNode("span",{onClick:d,style:"cursor: pointer;"},[s.value])])}function po(o,t,e,i){const r=n.ref(o.type),l=n.ref(o.buttons),s=n.ref(o.exceptionInfo),c=n.ref(o.okButtonText),a=n.ref(o.cancelButtonText),d=n.ref(!0),f=n.ref(!0),u=n.computed(()=>!!(l.value&&l.value.length)),m=n.computed(()=>s.value&&s.value.date&&s.value.message&&s.value.detail),y=n.computed(()=>!(l.value&&l.value.length)&&(c.value||a.value)),p=n.computed(()=>f.value&&c.value),g=n.computed(()=>d.value&&a.value),b=uo(o,e,i);function w(k){r.value==="question"&&t.emit("reject"),t.emit("close")}function I(k){r.value==="question"&&t.emit("accept"),t.emit("close")}return()=>n.createVNode("div",{class:"modal-footer"},[m.value&&b(),y.value&&g.value&&n.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:w},[a.value]),y.value&&p.value&&n.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:I},[c.value]),u.value&&l.value.length&&l.value.map(k=>n.createVNode("button",{type:"button",onClick:k.handle,class:k.class},[k.iconClass&&n.createVNode("span",{class:k.iconClass},null),k.text]))])}const ct=n.defineComponent({name:"FMessageBox",props:Zn,emits:["accept","reject","close"],setup(o,t){const e=n.ref(o.type),i=n.ref(o.title),r=n.ref(o.detail),l=n.computed(()=>{const b={"modal-tips":!0,"d-flex":!0,"flex-row":!0},w=`messager-type-${e.value}`;return b[w]=!0,b}),s=n.computed(()=>{const b={};return e.value==="prompt"?b.padding="0.5rem 0.5rem 1rem 1.5rem":e.value==="error"&&(b.padding="0.5rem 1.5rem 1rem 1.5rem"),b}),c=no(),a=io(o,e,i,r),d=ro(),{feedbackStyle:f,feedbackMessage:u}=d;function m(){return n.createVNode("div",{style:f.value},[u.value])}function y(){switch(e.value){case"prompt":return lo(o,a);default:return co(o,e,i,r)}}const p=y(),g=po(o,t,c,d);return()=>n.createVNode("div",{class:"farris-messager"},[n.createVNode("section",{class:l.value,style:s.value},[p()]),g(),m()])}}),fo={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"}};class re{constructor(t,e){this.x=t,this.y=e}static getTransformInfo(t){const i=window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(i.length>=6){const r=parseInt(i[4],10),l=parseInt(i[5],10);return{x:r,y:l}}return{x:0,y:0}}static fromEvent(t,e=null){if(this.isMouseEvent(t))return new re(t.clientX,t.clientY);if(e===null||t.changedTouches.length===1)return new re(t.changedTouches[0].clientX,t.changedTouches[0].clientY);for(let i=0;i<t.changedTouches.length;i++)if(t.changedTouches[i].target===e)return new re(t.changedTouches[i].clientX,t.changedTouches[i].clientY)}static isMouseEvent(t){return Object.prototype.toString.apply(t).indexOf("MouseEvent")===8}static isIPosition(t){return!!t&&"x"in t&&"y"in t}static getCurrent(t){const e=new re(0,0);if(window){const i=window.getComputedStyle(t);if(i){const r=parseInt(i.getPropertyValue("left"),10),l=parseInt(i.getPropertyValue("top"),10);e.x=isNaN(r)?0:r,e.y=isNaN(l)?0:l}return e}return null}static copy(t){return new re(0,0).set(t)}get value(){return{x:this.x,y:this.y}}add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.x-=t.x,this.y-=t.y,this}multiply(t){this.x*=t,this.y*=t}divide(t){this.x/=t,this.y/=t}reset(){return this.x=0,this.y=0,this}set(t){return this.x=t.x,this.y=t.y,this}}class $e{constructor(t,e){this.width=t,this.height=e}static getCurrent(t){const e=new $e(0,0);if(window){const i=window.getComputedStyle(t);return i&&(e.width=parseInt(i.getPropertyValue("width"),10),e.height=parseInt(i.getPropertyValue("height"),10)),e}return null}static copy(t){return new $e(0,0).set(t)}set(t){return this.width=t.width,this.height=t.height,this}}function mo(o,t){const e=n.ref(),i=n.ref(),r=n.ref(),l=n.ref(),s=n.ref(),c=n.ref(),a=n.ref(),d=n.ref(),f=n.ref(),u=n.ref(),m=n.ref(),y=n.ref(o.resizeable),p=n.ref(),g=n.ref(o.draggable),b=n.ref(!1);function w(){const B=i.value||document.body,j=window.getComputedStyle(B);if(!j||!e.value)return;const W=re.getTransformInfo(e.value),$={};a.value&&($.deltaL=e.value.offsetLeft-a.value.x,$.deltaT=e.value.offsetTop-a.value.y);const te=j.getPropertyValue("position");$.width=B.clientWidth,$.height=B.clientHeight,$.pr=parseInt(j.getPropertyValue("padding-right"),10),$.pb=parseInt(j.getPropertyValue("padding-bottom"),10),$.position=j.getPropertyValue("position"),te==="static"&&(B.style.position="relative"),$.translateX=W.x,$.translateY=W.y,u.value=$}function I(B){if(e.value){l.value=$e.getCurrent(e.value),s.value=re.getCurrent(e.value),c.value=l.value?$e.copy(l.value):null,a.value=s.value?re.copy(s.value):null,w();const j=B.target.getAttribute("type")||"";d.value={n:!!j.match(/n/),s:!!j.match(/s/),w:!!j.match(/w/),e:!!j.match(/e/)}}}function k(){var B,j,W,$;if(e.value){const te=e.value;d.value&&((d.value.n||d.value.s)&&((B=c.value)!=null&&B.height)&&(te.style.height=c.value.height+"px"),(d.value.w||d.value.e)&&((j=c.value)!=null&&j.width)&&(te.style.width=c.value.width+"px"),a.value&&((W=a.value)!=null&&W.x&&(te.style.left=a.value.x+"px"),($=a.value)!=null&&$.y&&(te.style.top=a.value.y+"px")))}}function S(){const B=o.minHeight?o.minHeight:1,j=o.minWidth?o.minWidth:1;c.value&&a.value&&d.value&&l.value&&(c.value.height<B&&(c.value.height=B,d.value.n&&s.value&&(a.value.y=s.value.y+(l.value.height-B))),c.value.width<j&&(c.value.width=j,d.value.w&&s.value&&(a.value.x=s.value.x+(l.value.width-j))),o.maxHeight&&c.value.height>o.maxHeight&&(c.value.height=o.maxHeight,s.value&&d.value.n&&(a.value.y=s.value.y+(l.value.height-o.maxHeight))),o.maxWidth&&c.value.width>o.maxWidth&&(c.value.width=o.maxWidth,d.value.w&&s.value&&(a.value.x=s.value.x+(l.value.width-o.maxWidth))))}function h(){if(i.value){const B=u.value;if(a.value&&c.value&&d.value&&l.value){const j=B.width-B.pr-B.deltaL-B.translateX-a.value.x,W=B.height-B.pb-B.deltaT-B.translateY-a.value.y;d.value.n&&a.value.y+B.translateY<0&&s.value&&(a.value.y=-B.translateY,c.value.height=l.value.height+s.value.y+B.translateY),d.value.w&&a.value.x+B.translateX<0&&s.value&&(a.value.x=-B.translateX,c.value.width=l.value.width+s.value.x+B.translateX),c.value.width>j&&(c.value.width=j),c.value.height>W&&(c.value.height=W)}}}function v(B){if(!r.value||!l.value||!s.value||!d.value)return;B.subtract(r.value);const j=B.x,W=B.y;d.value.n?(a.value.y=s.value.y+W,c.value.height=l.value.height-W):d.value.s&&(c.value.height=l.value.height+W),d.value.e?c.value.width=l.value.width+j:d.value.w&&(c.value.width=l.value.width-j,a.value.x=s.value.x+j),h(),S(),k()}function T(B){if(!f.value)return;const j=re.fromEvent(B);j&&v(j)}function F(){if(e.value){const{width:B,height:j,x:W,y:$}=e.value.getBoundingClientRect(),te=re.getTransformInfo(e.value);return{size:{width:B,height:j},position:{x:W-te.x,y:$-te.y}}}return null}function P(B){if(e.value){const j=F();m.value=j}r.value=void 0,l.value=null,s.value=null,c.value=null,a.value=null,d.value=null,f.value=null,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P)}function L(){document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}function C(B){B instanceof MouseEvent&&B.button===2||g.value&&(document.body.click(),B.stopPropagation(),B.preventDefault(),r.value=re.fromEvent(B),f.value=B.target,I(B),L())}function U(B){return e.value=B,y.value&&n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:j=>C(j)},null)])}function _(B=!0){document.body.click();const j=i.value||document.body,W=$e.getCurrent(j),$=e.value;B&&$&&(p.value=F(),p.value.transform=$.style.transform),W&&$&&(c.value=W,c.value.height-=14,c.value.width-=14,$.style.height=c.value.height+"px",$.style.width=c.value.width+"px",$.style.left="7px",$.style.top="7px",$.style.transform="",m.value={size:c.value,position:{x:0,y:0}},g.value=!1,b.value=!0)}function O(){var B,j;if(document.body.click(),p.value){const W={width:p.value.size.width||0,height:p.value.size.height||0},$={x:(window.innerWidth-W.width)/2,y:(window.innerHeight-W.height)/2};(B=c.value)==null||B.set(W),(j=a.value)==null||j.set($);const te=e.value;te.style.height=W.height+"px",te.style.width=W.width+"px",te.style.left=`${$.x}px`,te.style.top=`${$.y}px`,te.style.transform="",m.value={size:W,position:$},g.value=o.draggable,b.value=!1}}function A(){if(e.value){const B=$e.getCurrent(e.value);if(B){const{width:j,height:W}=B;e.value.style.left=`${(window.innerWidth-j)/2}px`,e.value.style.top=`${(window.innerHeight-W)/2}px`,e.value.style.transform=""}}}function z(){const B=()=>{b.value?_(!1):A(),document.body.click()};return window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}}const de=z();return{renderResizeBar:U,boundingElement:i,resizedEventParam:m,maximize:_,restore:O,allowDrag:g,isMaximized:b,unWindowResizeHandle:de}}function yo(o,t,e){const i=n.ref(),r=n.ref(o.draggable),l=n.ref(o.lockAxis),s=n.ref(),c=n.ref(),a=n.ref(!1),d=n.ref(new re(0,0)),f=n.ref(new re(0,0)),u=n.ref(new re(0,0)),m=n.ref(new re(0,0));n.watch(()=>e.value,T=>{s.value.style.cursor=T?"move":"default"});function y(T,F){if(F.tagName==="BUTTON")return!1;if(F===T)return!0;for(const P in F.children)if(Object.prototype.hasOwnProperty.call(F.children,P)&&y(T,F.children[P]))return!0;return!1}function p(){var L,C;let T=u.value.x+f.value.x,F=u.value.y+f.value.y;l.value==="x"?(T=((L=d.value)==null?void 0:L.x)||0,u.value.x=0):l.value==="y"&&(F=((C=d.value)==null?void 0:C.y)||0,u.value.y=0);const P=`translate3d(${Math.round(T)}px, ${Math.round(F)}px, 0px)`;i.value&&(i.value.style.transform=P),m.value.x=T,m.value.y=F}function g(){if(!c.value||!i.value)return null;const T=c.value.getBoundingClientRect(),F=i.value.getBoundingClientRect(),P={top:T.top<F.top,right:T.right>F.right,bottom:T.bottom>F.bottom,left:T.left<F.left};return P.top||(u.value.y-=F.top-T.top),P.bottom||(u.value.y-=F.bottom-T.bottom),P.right||(u.value.x-=F.right-T.right),P.left||(u.value.x-=F.left-T.left),p(),P}function b(T){T&&(d.value&&T.subtract(d.value),u.value.set(T),p(),g())}function w(T){a.value&&r.value&&(T.stopPropagation(),T.preventDefault(),b(re.fromEvent(T,s.value)))}function I(){var T;a.value&&(a.value=!1,f.value.add(u.value),u.value.reset(),(T=i.value)==null||T.classList.remove("ng-dragging"),t.emit("stopMove"),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",I))}function k(){!a.value&&s.value&&(a.value=!0,s.value.classList.add("ng-dragging"),document.addEventListener("mousemove",w),document.addEventListener("mouseup",I))}function S(){if(i.value){const T=re.getTransformInfo(i.value);f.value.set(T);return}f.value.reset()}function h(T){if(!e.value||T instanceof MouseEvent&&T.button===2)return;const F=T.target||T.srcElement;s.value!==void 0&&F&&!y(F,s.value)||r.value!==!1&&(document.body.click(),T.stopPropagation(),T.preventDefault(),d.value=re.fromEvent(T,i.value),S(),k())}function v(T,F,P){if(r.value&&F){if(T)s.value=T;else if(o.dragHandle){if(o.dragHandle instanceof HTMLElement)s.value=o.dragHandle;else if(typeof o.dragHandle=="string"){const L=F.querySelector(o.dragHandle);L&&(s.value=L)}}i.value=F,c.value=P,s.value?(s.value.classList.add("ng-draggable"),s.value.addEventListener("mousedown",h)):r.value=!1}}return{registerDraggle:v,resetTranslate:S}}function zt(o,t){if(o){const e=i=>{i.key.toLowerCase()===o.toLowerCase()&&t({event:i,key:o})};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}}function go(o,t){const e=n.ref(o.enableEsc);let i=null;return e.value?(i=zt("Escape",r=>{t.emit("esc",{event:r.event,type:"esc"})}),{remove:i}):null}function ho(o,t){const e=n.ref(o.enableEnter);let i=null;return e.value?(i=zt("Enter",r=>{t.emit("enter",{event:r.event,type:"enter"})}),{remove:i}):null}const Je=n.defineComponent({name:"FModal",props:fo,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(o,t){const e=n.ref(o.width||300),i=n.ref(o.height||200),r=n.ref(o.modelValue),l=n.ref(""),s=n.ref(o.class),c=n.ref(o.fitContent),a=n.ref(o.showHeader),d=n.ref(""),f=n.ref(o.showCloseButton),u=n.ref(o.showMaxButton),m=n.ref(!1),y=n.ref(o.dialogType),p=n.ref(o.src),g=n.ref(""),b=n.ref(o.showButtons),w=n.ref(o.title),I=n.ref(o.containment||null),k=n.ref(),S=n.ref(!1);function h(M,Y){Promise.resolve().then(()=>{var ie;return(ie=o.beforeClose)==null?void 0:ie.call(o)}).then(ie=>{ie&&(r.value=!1,t.emit("update:modelValue",!1),Y!=null&&t.emit(Y?"accept":"cancel"),t.emit("closed",M))})}const v=[{name:"cancel",text:"取消",class:"btn btn-secondary",handle:M=>{h(M,!1)}},{name:"accept",text:"确定",class:"btn btn-primary",handle:M=>{h(M,!0)}}],T=n.ref(o.buttons&&o.buttons.length?o.buttons:v),F=n.computed(()=>!!d.value),P=n.computed(()=>!!b.value&&!!T.value),L=n.ref(),C=n.ref(),U=n.ref(!1),{renderResizeBar:_,maximize:O,restore:A,boundingElement:z,resizedEventParam:de,allowDrag:B,unWindowResizeHandle:j}=mo(o),{registerDraggle:W}=yo(o,t,B);function $(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function te(){const M=document.querySelectorAll(".farris-modal").length;(!M||M-1<=0)&&document.body.classList.remove("modal-open"),k.value&&k.value.classList.remove("show")}n.watch(()=>o.title,(M,Y)=>{M!==Y&&(w.value=M)}),n.watch(()=>o.modelValue,(M,Y)=>{M!==Y&&(r.value=M,r.value&&o.draggable&&n.nextTick(()=>{C.value&&!I.value&&(I.value=C.value.parentElement,z.value=I.value,W(L.value,C.value,z.value))}),M||(I.value&&(I.value=null),te())),r.value&&(S.value=$())}),n.watch(()=>o.showHeader,(M,Y)=>{M!==Y&&(a.value=M)}),n.watch(()=>o.showButtons,(M,Y)=>{M!==Y&&(b.value=M)}),n.watch(()=>de.value,(M,Y)=>{const ie=M||{},he=Y||{};JSON.stringify(ie)!==JSON.stringify(he)&&t.emit("resize",{newSize:M,oldSize:Y,isMaximized:U.value})});const ue=n.computed(()=>(r.value&&document.body.classList.add("modal-open"),r.value)),Ie=n.computed(()=>{var ie;const M={modal:!0,"farris-modal":!0,fade:!0};M["f-modal-fitContent"]=!!c.value,M.show=!!ue.value;const Y=(ie=o.maskClass)==null?void 0:ie.split(" ");return Y==null||Y.reduce((he,ke)=>(he[ke]=!0,he),M),M}),X=n.computed(()=>{var ie;const M={"modal-dialog":!0},Y=(ie=s.value)==null?void 0:ie.split(" ");return Y==null||Y.reduce((he,ke)=>(he[ke]=!0,he),M),M}),ge=n.computed(()=>{const M={position:"absolute",top:`${(window.innerHeight-i.value)/2}px`,left:`${(window.innerWidth-e.value)/2}px`,width:`${e.value}px`,height:c.value?"auto":`${i.value}px`};return o.mask||(M.pointerEvents="auto"),M}),ye=n.computed(()=>{const M={display:"block"};return o.mask||(M.pointerEvents="none",M.backgroundColor="transparent"),S.value&&(M.backgroundColor="transparent"),M}),oe=n.computed(()=>({"modal-content":!0,"modal-content-has-header":a.value})),R=n.computed(()=>{const M={display:a.value?"":"none"};return M["pointer-events"]=B.value?"auto":"none",M}),ne=n.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:U.value})),le=n.computed(()=>({"modal-body":!0,"f-utils-flex-column":y.value==="iframe","f-utils-fill":!0}));function ze(){return{height:`${o.footerHeight||60}px`}}const Ve=n.computed(()=>{const M={textAlgin:g.value},Y=ze();return Object.assign(M,Y)});function Ne(M){if(M.stopPropagation(),U.value){U.value=!1,A();return}O(),U.value=!0}async function je(M,Y){M.handle&&await M.handle(Y,M)&&t.emit("closed",Y)}function Pe(M){M.width&&(e.value=M.width),M.height&&(i.value=M.height),M.buttons&&(T.value=M.buttons),M.title&&(w.value=M.title)}let qe=null,Oe=null;n.onBeforeMount(()=>{S.value=$()}),n.onMounted(()=>{C.value&&!I.value&&(I.value=C.value.parentElement,z.value=I.value,W(L.value,C.value,z.value)),ue.value&&document.body.classList.add("modal-open"),qe=go(o,t),Oe=ho(o,t)}),n.onUnmounted(()=>{j&&j(),qe&&qe.remove(),Oe&&Oe.remove()}),t.expose({modalElementRef:C,updateModalOptions:Pe,close:h,maxDialog:Ne,isMaximized:U});function Fe(){return n.createVNode("ul",null,[m.value&&n.createVNode("li",{class:"f-btn-icon f-bare"},[n.createVNode("span",{class:"f-icon modal_minimize"},null)]),u.value&&n.createVNode("li",{onClick:Ne,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[n.createVNode("span",{class:ne.value},null)]),f.value&&n.createVNode("li",{class:"f-btn-icon f-bare",onClick:M=>h(M,!1),style:"pointer-events: auto;"},[n.createVNode("span",{class:"f-icon modal_close"},null)])])}function We(){return n.createVNode("div",{class:"modal-footer",style:Ve.value},[T.value&&T.value.map(M=>{const Y=n.ref(M.disabled);return n.createVNode("button",{name:M.name,type:"button",disabled:Y.value,class:M.class+(M.iconClass?" btn-icontext":""),onClick:ie=>{je(M,ie)}},[!!M.iconClass&&n.createVNode("i",{class:M.iconClass},null),M.text])})])}function Ze(){return n.createVNode("div",{ref:L,class:"modal-header",style:R.value},[t.slots.headerTemplate?t.slots.headerTemplate():n.createVNode("div",{class:"modal-title"},[F.value&&n.createVNode("span",{class:d.value,style:"margin-right: 8px"},null),n.createVNode("span",{class:"modal-title-label"},[w.value])]),n.createVNode("div",{class:"actions"},[Fe()])])}function Ge(){return t.slots.footerTemplate?t.slots.footerTemplate():P.value&&We()}function Ke(M){if(M.stopPropagation(),o.allowClickMaskToClose){if(M.target!==k.value)return;h(M,!1)}}function _e(){var M,Y;return n.createVNode("div",{id:l.value,class:X.value,style:ge.value,ref:C},[n.createVNode("div",{class:oe.value},[a.value&&Ze(),n.createVNode("div",{class:le.value},[(Y=(M=t.slots).default)==null?void 0:Y.call(M),y.value==="iframe"&&n.createVNode("iframe",{title:l.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:p.value},null)]),Ge()]),!c.value&&C.value&&!U.value&&_(C.value)])}function Xe(M){return M||"body"}return()=>n.createVNode(n.Teleport,{to:Xe(o.host)},{default:()=>[ue.value&&n.createVNode(n.Transition,{name:"fade",appear:!0},{default:()=>[n.createVNode("div",{ref:k,class:Ie.value,style:ye.value,onClick:Ke},[_e()])]})]})}});function Wt(o){if(o.content&&o.content.render)return o.content.render;if(o.render&&typeof o.render=="function")return o.render}function vo(o){const t=document.createElement("div");t.style.display="contents";const e=n.createApp({setup(i,r){n.onUnmounted(()=>{document.body.removeChild(t)});const l=n.ref(),s=n.ref(o.class||""),c=n.ref(!!o.showButtons),a=n.ref(!!o.showHeader),d=n.ref(o.showCloseButton==null?!0:o.showCloseButton),f=n.ref(!0),u=n.ref(o.title||""),m=o.acceptCallback||(()=>{}),y=o.rejectCallback||(()=>{}),p=o.closedCallback||(k=>{}),g=o.resizeHandle||(k=>{}),b=o.stopMoveHandle||(k=>{}),w=Wt(o),I=k=>{f.value=!1,e.unmount(),p(k)};return n.onMounted(()=>{}),r.expose({modalRef:l}),()=>n.createVNode(Je,{ref:l,class:s.value,modelValue:f.value,"onUpdate:modelValue":k=>f.value=k,title:u.value,width:o.width,height:o.height,buttons:o.buttons,"show-header":a.value,"show-buttons":c.value,"show-close-button":d.value,"show-max-button":!1,onAccept:m,onCancel:y,fitContent:o.fitContent==null?!0:o.fitContent,onClosed:I,onResize:g,onStopMove:b},{default:()=>[w&&w(e)]})}});return document.body.appendChild(t),e.mount(t),e}class Gt{constructor(t){D(this,"appContext",null);D(this,"modalRef",n.ref());D(this,"activeModalIndex",n.ref(0));D(this,"modalRefs",{});D(this,"isUseEscCloseModal",n.ref(!1));D(this,"activeModalInstance",n.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=t,this.appContext=t?t._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(t,e){const{width:i,height:r}={width:window.innerWidth,height:window.innerHeight};return i<t&&(t=i-14),r<e&&(e=r-14),{width:t,height:e}}static show(t){const e=Object.assign({title:"",showButtons:!0,showHeader:!0},t);return vo(e)}close(t){var e,i;t?(i=t.value)==null||i.close():(e=this.getCurrentModal())==null||e.close()}open(t){const e=document.createDocumentFragment();t.showMaxButton&&t.fitContent&&(t.showMaxButton=!1);const i=n.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},t)),r=n.ref(!0),l=i.value.acceptCallback||(()=>{}),s=i.value.rejectCallback||(()=>{}),c=i.value.closedCallback||((h,v)=>{}),a=i.value.resizeHandle||(h=>{}),d=t.stopMoveHandle||(h=>{});let f;const u=Wt(i.value),m=h=>{var T;r.value=!1;const v=(T=h==null?void 0:h.target)==null?void 0:T.classList.contains("modal_close");c(h,this.isUseEscCloseModal.value?"esc":v?"icon":"button")},y=h=>{m(h),f&&n.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],n.render(null,e),f=null,this.modalRef.value=null,this.modalRefs){const v=Object.keys(this.modalRefs).map(T=>Number(T));v.length>0?this.activeModalIndex.value=Math.max(...v):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},p=h=>{var v;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((v=this.activeModalInstance.value)==null||v.close(h==null?void 0:h.event))},{width:g,height:b}=i.value,w=this.adaptToWindow(g||500,b||320);Object.assign(i.value,w);const I=()=>n.createVNode(Je,n.mergeProps({ref:this.modalRef,modelValue:r.value,"onUpdate:modelValue":h=>r.value=h},i.value,{onAccept:l,onCancel:s,onClosed:y,onResize:a,onEsc:p,onStopMove:d}),{default:()=>[u&&u(this.app)]});return f=(h=>{const v=n.h(I,h);return v.appContext=this.appContext,n.render(v,e),v})({...i.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:h=>{i.value={...i.value,...h},f&&n.render(n.cloneVNode(f,{...i}),e)},destroy:y,modalRef:this.activeModalInstance,close:()=>this.close()}}}const _t=Symbol("FModalService");Je.install=o=>{o.component(Je.name,Je);const t=new Gt(o);o.provide(_t,t),o.provide("FModalService",t)};class Be{static show(t){const e=n.reactive({...t}),i=!1,r=e.type==="error"||e.type==="prompt",l=e.type==="error"?"错误提示":e.type==="prompt"&&e.title||"",s=e.acceptCallback||(()=>{}),c=e.rejectCallback||(()=>{});let a=null,d=new Gt(a);const f=()=>{a&&(a==null||a.destroy(),d=null)};return a=d==null?void 0:d.open({class:"modal-message modal-message-type-info",title:l,showButtons:i,showHeader:r,width:e.width||400,fitContent:!0,showMaxButton:!1,draggable:!0,render:()=>n.createVNode(ct,n.mergeProps(e,{onAccept:s,onReject:c,onClose:f}),null)}),d==null?void 0:d.getCurrentModal()}static info(t,e){const i=n.reactive({type:"info",title:t,detail:e,okButtonText:"知道了",cancelButtonText:""});Be.show(i)}static warning(t,e){const i=n.reactive({type:"warning",title:t,detail:e,okButtonText:"知道了",cancelButtonText:""});Be.show(i)}static success(t,e){const i=n.reactive({type:"success",title:t,detail:e,okButtonText:"关闭",cancelButtonText:""});Be.show(i)}static error(t,e,i){const r=n.reactive({width:500,type:"error",okButtonText:"关闭",cancelButtonText:"",exceptionInfo:{date:i,message:t,detail:e}});Be.show(r)}static prompt(t,e){const i=n.reactive({type:"prompt",title:t,detail:e,okButtonText:"确定",cancelButtonText:"取消"});Be.show(i)}static question(t,e,i,r){const l=n.reactive({type:"question",title:t,detail:e,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:i,rejectCallback:r});Be.show(l)}}ct.install=o=>{o.component(ct.name,ct),o.provide("FMessageBoxService",Be)};class bo extends kn{constructor(e,i){super(e,i);D(this,"responseLayoutEditorFunction");D(this,"bindingVarible");this.responseLayoutEditorFunction=En(this.formSchemaUtils)}getCommonPropertyConfig(e,i){this.propertyConfig.categories.basic=this.getBasicProperties(e,i),this.propertyConfig.categories.appearance=this.getAppearanceProperties(e,i),this.propertyConfig.categories.behavior=this.getBehaviorConfig(e)}getPropertyConfig(e,i){return this.getCommonPropertyConfig(e,i),this.propertyConfig.categories.editor=this.getEditorProperties(e),this.propertyConfig.categories.expressons=this.getExpressionConfig(e,"Field"),this.propertyConfig}getGridFieldEdtiorPropConfig(e,i){return this.propertyConfig.categories={},this.getCommonPropertyConfig(e,i),this.getGridFieldEdtiorProperties?this.propertyConfig.categories.editor=this.getGridFieldEdtiorProperties(e):this.propertyConfig.categories.editor=this.getEditorProperties(e),this.propertyConfig.categories.expressons=this.getExpressionConfig(e,"Field"),this.propertyConfig.categories}getBasicProperties(e,i){const r=this;this.setDesignViewModelField(e);const{canChangeControlType:l,editorTypeList:s}=this.getAvailableEditorType(e);return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"编辑器类型",title:"编辑器类型",type:"string",$converter:"/converter/change-editor.converter",editor:{type:"combo-list",textField:"value",valueField:"key",idField:"key",editable:!1,data:s,readonly:!l}},label:{title:"标签",type:"string",$converter:"/converter/form-group-label.converter"},binding:{description:"绑定的表单字段",title:"绑定",editor:{type:"binding-selector",bindingType:{enable:!1},editorParams:{componentSchema:e,needSyncToViewModel:!0,viewModelId:this.viewModelId,designerHostService:this.designerHostService,disableOccupiedFields:!0},textField:"bindingField"},refreshPanelAfterChanged:!0}},setPropertyRelates(c,a,d){if(c)switch(c&&c.propertyID){case"type":{r.changeControlType(e,c,i);break}case"label":{c.needRefreshControlTree=!0;break}case"binding":{r.changeBindingField(e,c,d);break}}}}}checkCanChangeControlType(e,i){if(!e.binding)return!1;if(e.binding.type==="Variable"){if(this.bindingVarible=this.formSchemaUtils.getVariableById(e.binding.field),!this.bindingVarible)return!1}else if(!this.designViewModelField||this.designViewModelField.$type!==Ue.FormSchemaEntityField$Type.SimpleField)return!1;return!0}getAvailableEditorType(e){var l;const i=this.checkCanChangeControlType(e,this.viewModelId);if(!i)return{canChangeControlType:!1,editorTypeList:[{key:e.editor.type,value:((l=N[e.editor.type])==null?void 0:l.name)||e.editor.type}]};let r=[];return this.designViewModelField&&this.designViewModelField.$type===Ue.FormSchemaEntityField$Type.SimpleField?r=rt.getEditorTypesByMDataType(this.designViewModelField.type.name):this.bindingVarible&&(r=rt.getEditorTypesByMDataType(this.bindingVarible.type)),{canChangeControlType:i,editorTypeList:r}}changeBindingField(e,i,r){i.needRefreshEntityTree=!0}getAppearanceProperties(e,i){const r=this;return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的内联样式",$converter:"/converter/appearance.converter"},responseLayout:{description:"响应式列宽",title:"响应式列宽",type:"boolean",visible:!0,refreshPanelAfterChanged:!0,editor:{type:"response-layout-editor-setting",beforeOpen:()=>r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e,r.componentId)}}},setPropertyRelates(l,s){if(l)switch(l&&l.propertyID){case"responseLayout":r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue,r.componentId||e.id),r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId),r.updateElementByParentContainer(e.id,i),delete e.responseLayout;break;case"class":r.updateUnifiedLayoutAfterControlChanged(l.propertyValue,e.id,this.componentId),it.value++;break;case"style":{it.value++;break}}}}}getEditorProperties(e){return this.getComponentConfig(e)}changeControlType(e,i,r){const l=i.propertyValue,s=r&&r.parent&&r.parent.schema;if(!s)return;const c=s.contents.findIndex(f=>f.id===e.id);if(c===-1)return;const a=s.contents[c];let d;if(this.designViewModelField){const m=this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find(p=>p.id===this.designViewModelField.id).fieldSchema||{};m.editor||(m.editor={}),m.editor.$type=l,this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id,m,!1),d=this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField,l)}d||(d=this.controlCreatorUtils.createFormGroupWithoutField(l)),Object.assign(d,{id:a.id,appearance:a.appearance,size:a.size,label:a.label,binding:a.binding}),Object.prototype.hasOwnProperty.call(a,"visible")&&Object.assign(d,{visible:a.visible}),a.editor&&["readonly","required","placeholder"].map(f=>{Object.prototype.hasOwnProperty.call(a.editor,f)&&(d.editor[f]=a.editor[f])}),s.contents.splice(c,1),s.contents.splice(c,0,d),r.schema=Object.assign(a,d),Object.assign(e,d),Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(f=>f.classList.remove("dgComponentSelected")),Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(f=>f.classList.remove("dgComponentFocused")),it.value++}getComponentConfig(e,i={},r={},l){const s=Object.assign({description:"编辑器",title:"编辑器",type:"input-group",$converter:"/converter/property-editor.converter"},i),c=this.getPropertyEditorParams(e,[],"readonly"),a=this.getPropertyEditorParams(e,[],"required"),d={readonly:{description:"",title:"只读",editor:c},required:{description:"",title:"必填",type:"boolean",editor:a},placeholder:{description:"当控件没有值时在输入框中显示的文本",title:"提示文本",type:"string"}};for(const u in r)d[u]=Object.assign(d[u]||{},r[u]);const f=this;return{...s,properties:{...d},setPropertyRelates(u,m){if(u){switch(u.propertyID){case"readonly":case"required":f.afterMutilEditorChanged(e,u);break}l&&l.bind(f)(u,e,m)}}}}updateUnifiedLayoutAfterControlChanged(e,i,r){const l=e.split(" ");let s=l.find(u=>/^col-([1-9]|10|11|12)$/.test(u)),c=l.find(u=>/^col-md-([1-9]|10|11|12)$/.test(u)),a=l.find(u=>/^col-xl-([1-9]|10|11|12)$/.test(u)),d=l.find(u=>/^col-el-([1-9]|10|11|12)$/.test(u));s=s||"col-12",c=c||"col-md-"+s.replace("col-",""),a=a||"col-xl-"+c.replace("col-md-",""),d=d||"col-el-"+a.replace("col-xl-","");const f={id:i,columnInSM:parseInt(s.replace("col-",""),10),columnInMD:parseInt(c.replace("col-md-",""),10),columnInLG:parseInt(a.replace("col-xl-",""),10),columnInEL:parseInt(d.replace("col-el-",""),10)};this.updateUnifiedLayoutAfterResponseLayoutChanged(r,f)}updateUnifiedLayoutAfterResponseLayoutChanged(e,i){const{formNode:r}=this.responseLayoutEditorFunction.checkCanFindFormNode(e);if(!r||!r.unifiedLayout)return;const l=[];if(this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r,l,1),i){const p=l.find(g=>g.id===i.id);Object.assign(p||{},i)}const s=l.map(p=>p.columnInSM),c=l.map(p=>p.columnInMD),a=l.map(p=>p.columnInLG),d=l.map(p=>p.columnInEL),f=this.checkIsUniqueColumn(s)?s[0]:null,u=this.checkIsUniqueColumn(c)?c[0]:null,m=this.checkIsUniqueColumn(a)?a[0]:null,y=this.checkIsUniqueColumn(d)?d[0]:null;Object.assign(r.unifiedLayout,{uniqueColClassInSM:f,uniqueColClassInMD:u,uniqueColClassInLG:m,uniqueColClassInEL:y})}checkIsUniqueColumn(e){const i=new Set(e);return Array.from(i).length===1}getItemCollectionEditor(e,i,r){return i=i||"value",r=r||"name",{editor:{columns:[{field:i,title:"值",dataType:"string"},{field:r,title:"名称",dataType:"string"}],type:"item-collection-editor",valueField:i,nameField:r,requiredFields:[i,r],uniqueFields:[i,r],readonly:this.checkEnumDataReadonly(e)}}}checkEnumDataReadonly(e){return!e.binding||e.binding.type!=="Form"?!1:!!(this.designViewModelField&&this.designViewModelField.type&&this.designViewModelField.type.$type===Ue.FormSchemaEntityFieldType$Type.EnumType)}appendFieldValueChangeEvents(e,i){e.binding&&e.binding.type===lt.Form&&e.binding.field?(i.find(s=>s.label==="fieldValueChanging")||i.push({label:"fieldValueChanging",name:"绑定字段值变化前事件"}),i.find(s=>s.label==="fieldValueChanged")||i.push({label:"fieldValueChanged",name:"绑定字段值变化后事件"}),this.designViewModelField&&(e.fieldValueChanging=this.designViewModelField.valueChanging,e.fieldValueChanged=this.designViewModelField.valueChanged)):i=i.filter(r=>r.label!=="fieldValueChanging"&&r.label!=="fieldValueChanged")}getControlMethodType(e){if(!e.binding)return e.type;switch(e.binding.type){case lt.Form:return e.binding.path||e.type;case lt.Variable:return e.binding.fullPath||e.type}return e.type}getEventPropertyConfig(e,i="card",r,l){const s=this;let c=[];r&&(c=c.concat(r)),this.appendFieldValueChangeEvents(e,c);const a=s.eventsEditorUtils.formProperties(e,s.viewModelId,c),d={};return d[s.viewModelId]={type:"events-editor",editor:{initialData:a}},{title:"事件",hideTitle:!0,properties:d,tabId:"commands",tabName:"交互",setPropertyRelates(u,m){const y=u.propertyValue;delete e[s.viewModelId],y&&(y.setPropertyRelates=this.setPropertyRelates,y.controlInfo={type:s.getControlMethodType(e),name:e.title},s.eventsEditorUtils.saveRelatedParameters(e,s.viewModelId,y.events,y)),l&&l(u,m,y);const p=s.designViewModelUtils.getDgViewModel(s.viewModelId);p&&s.designViewModelField&&p.changeField(s.designViewModelField.id,{valueChanging:e.fieldValueChanging,valueChanged:e.fieldValueChanged})}}}getExpressionConfig(e,i,r=["compute","dependency","validate"],l){return new Lt(this.formSchemaUtils).getExpressionConfig(e,i,r,l)}}class Co extends bo{getPropertyConfig(t,e){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.getAppearanceConfig(),this.getBehaviorConfig(t),this.getFilterBarConfig(t),this.getEventPropConfig(t),this.propertyConfig}getBehaviorConfig(t){this.propertyConfig.categories.apperance={description:"Basic Infomation",title:"行为",properties:{showExtendSiderbar:{description:"是否在侧边栏中展示收起的控件",type:"boolean",title:"启用侧边栏收折",refreshPanelAfterChanged:!0},resetText:{description:"选择筛选条件后,按钮“清空筛选”的文本",type:"string",title:"按钮“清空筛选”的文本"}}}}getFilterBarConfig(t){const e=this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId),i=this;this.propertyConfig.categories.control={description:"Basic Infomation",title:"编辑器",properties:{fields:{description:"筛选条字段设置",title:"筛选条字段",type:"",refreshPanelAfterChanged:!0,editor:{type:"filter-bar-config",fieldsConfig:e,formSchemaUtils:this.formSchemaUtils,metadataService:this.metadataService,viewModelId:this.viewModelId,designViewModelUtils:this.designViewModelUtils,eventsEditorUtils:this.eventsEditorUtils}},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",refreshPanelAfterChanged:!0},disable:{description:"是否禁用",type:"boolean",title:"是否禁用"},defaultValues:{description:"默认值绑定字段",type:"object",title:"默认值绑定字段",editor:this.getPropertyEditorParams(t,["Variable"])}},setPropertyRelates(r,l){i.addNewVariableToViewModel(r,i.viewModelId)}}}getEventPropConfig(t){const e=[{label:"onQuery",name:"查询事件"}],i=this,r=i.eventsEditorUtils.formProperties(t,i.viewModelId,e),l={};l[i.viewModelId]={type:"events-editor",editor:{initialData:r}},this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:l,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(s,c){const a=s.propertyValue;delete t[i.viewModelId],a&&(a.setPropertyRelates=this.setPropertyRelates,i.eventsEditorUtils.saveRelatedParameters(t,i.viewModelId,a.events,a)),t.remoteSort=!!t.columnSorted}}}}function wo(o,t){function e(c,a){const d=o.schema;return new Co(c,t).getPropertyConfig(d,a)}function i(){return!1}function r(){return!1}function l(){return!1}function s(){var u,m,y,p,g,b;if((m=(u=o==null?void 0:o.parent)==null?void 0:u.parent)!=null&&m.schema){const w=(y=o==null?void 0:o.parent)==null?void 0:y.parent.schema;(p=w.appearance)!=null&&p.class&&((g=w.appearance)!=null&&g.class.includes("f-page-has-scheme"))&&(w.appearance.class=(b=w.appearance)==null?void 0:b.class.replace("f-page-has-scheme","").replace(" ",""))}const{formSchemaUtils:c}=t,a=o.componentInstance.value.belongedComponentId,d=c.getViewModelIdByComponentId(a),f=c.getViewModelById(d);if(f&&f.states){const w=f.states.findIndex(I=>I.code==="originalFilterConditionList");w>-1&&f.states.splice(w,1)}}return{getPropsConfig:e,canAccepts:i,checkCanDeleteComponent:r,checkCanMoveComponent:l,onRemoveComponent:s}}const xo=n.defineComponent({name:"FFilterBarDesign",props:ot,emits:["Clear","Remove","Reset"],setup(o,t){const e=n.ref(!1),i=n.ref(!1),r=n.ref(!1),l=n.ref(!1),s=$t(o,t),{filterFields:c,filterItems:a,loadFilterItems:d}=s,f=n.ref(),u=n.inject("design-item-context"),m=n.inject("designer-host-service"),y=wo(u,m),p=mt.useDesignerComponent(f,u,y),g=n.computed(()=>({display:c.value&&c.value.length?"":"none"}));n.onMounted(()=>{f.value.componentInstance=p}),t.expose(p.value),n.watch([()=>o.data,()=>o.fields],([F,P])=>{d(P,F)});const b=n.computed(()=>i.value&&e.value),w=n.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":b.value})),I=n.computed(()=>a.value.length>0);function k(){return n.createVNode("div",{class:w.value},[a.value.map((F,P)=>n.createVNode(qt,{filterItem:F,useFilterItemsComposition:s},null))])}const S=n.computed(()=>r.value&&!i.value&&l.value),h=vn(),v=n.computed(()=>!i.value),T=Rt(o,t,s);return()=>n.createVNode("div",{ref:f,class:"f-filter-wrapper",style:g.value},[n.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[n.createVNode("div",{class:"f-filter-main f-utils-fill"},[n.createVNode("div",{class:"f-filter-list-wrapper"},[I.value&&k(),S.value&&h(),v.value&&T()])])])])}}),Fo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"query-solution-config",description:"A Farris Container Component",properties:{fieldsConfig:{description:"所有字段(树结构)",type:"array"},designViewModelUtils:{description:"",type:"object"},formSchemaUtils:{description:"",type:"object"},metadataService:{description:"",type:"object"},viewModelId:{description:"",type:"array"},eventsEditorUtils:{description:"",type:"object"}}},So=new Map([["appearance",Qe]]);function To(o,t,e){return t}const Xt={fieldsConfig:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"query-solution"},onFieldsChanged:{type:Function,default:null},formSchemaUtils:{type:Object,default:{}},metadataService:{type:Object,default:{}},designViewModelUtils:{type:Object,default:{}},eventsEditorUtils:{type:Object,default:{}},viewModelId:{type:String,default:""}};Ye(Xt,Fo,So,To);const Io={"input-group":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"number-spinner":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},max:{description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0}},min:{description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0}}},"number-range":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},max:{description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0}},min:{description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0}}},"combo-list":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},enumValueType:{description:"值类型",title:"值类型",type:"select",editor:{type:"combo-list",data:[{value:"int",name:"整型"},{value:"string",name:"字符串"},{value:"boolean",name:"布尔"}],valueField:"value",textField:"name",idField:"value"}}},lookup:{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},helpId:{description:"帮助元数据ID",title:"帮助元数据ID",type:"string"},displayName:{description:"帮助元数据名称",title:"帮助元数据名称",type:"string",readonly:!0},uri:{description:"uri",title:"uri",type:"string",readonly:!0},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string",readonly:!0},displayType:{description:"类型: 树列表、列表、双列表、左树右列表",title:"展示类型",type:"string",editor:{type:"combo-list",editable:!1,disabled:!0,data:[{text:"列表",value:"List"},{text:"树列表",value:"TreeList"},{text:"双列表",value:"NavList"},{text:"左树右列表",value:"NavTreeList"}],textField:"text",idField:"value",valueField:"value"}},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"}},"date-picker":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"datetime-picker":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"radio-group":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},direction:{description:"布局方向",title:"布局方向",type:"select",editor:{type:"combo-list",data:[{text:"水平",value:"horizontal"},{text:"垂直",value:"vertical"}],textField:"text",idField:"value",valueField:"value"}},showLabel:{description:"是否显示标签",title:"是否显示标签",type:"boolean"}}},ko={convertFrom:(o,t)=>o[t],convertTo:(o,t,e)=>{o[t]=e}},Mo={convertFrom:(o,t)=>o[t]||!1,convertTo:(o,t,e)=>{o[t]=e}};function wt(o){const t={"input-group":{key:"input-group",value:"文本"},"number-spinner":{key:"number-spinner",value:"数值"},"number-range":{key:"number-range",value:"数值区间"},lookup:{key:"lookup",value:"弹出帮助"},"combo-lookup":{key:"combo-lookup",value:"下拉帮助"},"date-picker":{key:"date-picker",value:"日期"},"datetime-picker":{key:"datetime-picker",value:"日期时间"},"combo-list":{key:"combo-list",value:"下拉列表"},"radio-group":{key:"radio-group",value:"单选组"}};function e(f){let u=[];if(f){switch(f){case"Enum":case"Boolean":u=[t["radio-group"],t["combo-list"]];break;case"Number":case"Integer":case"Decimal":case"BigNumber":u=[t["number-spinner"],t["number-range"]];break;case"String":u=[t["input-group"],t.lookup,t["radio-group"],t["combo-list"],t["date-picker"],t["datetime-picker"]];break;case"Date":u=[t["date-picker"]];break;case"DateTime":u=[t["date-picker"],t["datetime-picker"]];break}return u}else return[{key:"input-group",value:"文本"}]}function i(f){return e(f)}function r(f,u){const m={required:!1,multiLineLabel:!1};let y={};switch(f){case"input-group":break;case"number-range":case"number-spinner":y={precision:u.precision||0,max:null,min:null};break;case"combo-list":y={multiSelect:!1,data:(u==null?void 0:u.data)||[],valueField:"value",textField:"name",idField:"value",enumValueType:(u==null?void 0:u.enumValueType)||"string"};break;case"lookup":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"date-range":case"date-picker":y={valueFormat:"yyyy-MM-dd",displayFormat:"yyyy-MM-dd"};break;case"datetime-picker":y={valueFormat:"yyyy-MM-dd HH:mm:ss",displayFormat:"yyyy-MM-dd HH:mm:ss"};break;case"radio-group":y={direction:"horizontal",showLabel:!1,data:(u==null?void 0:u.data)||[],enumValueType:u==null?void 0:u.enumValueType};break}return{...m,...y}}function l(f,u){const m={required:!1,isExtend:!1};let y={};switch(f){case"input-group":break;case"number-range":case"number-spinner":y={precision:u.precision||0,max:null,min:null};break;case"combo-list":y={multiSelect:!1,data:(u==null?void 0:u.data)||[],valueField:"value",textField:"name",idField:"value",enumValueType:(u==null?void 0:u.enumValueType)||"string"};break;case"lookup":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"date-range":case"date-picker":y={valueFormat:"yyyy-MM-dd",displayFormat:"yyyy-MM-dd"};break;case"datetime-picker":y={valueFormat:"yyyy-MM-dd HH:mm:ss",displayFormat:"yyyy-MM-dd HH:mm:ss"};break;case"radio-group":y={direction:"horizontal",showLabel:!1,data:(u==null?void 0:u.data)||[],enumValueType:u==null?void 0:u.enumValueType};break}return{...m,...y}}function s(f,u){return r(f,u)}function c(f,u){return s(f,u)}function a(f){let u="",m={};switch(f.type.name){case"String":{u="input-group",m=c("input-group");break}case"Number":case"Integer":case"Decimal":case"BigNumber":{u="number-range";const p={precision:f.type.precision};m=c("number-spinner",p);break}case"Date":u="date-picker",m=c("date-picker");break;case"DateTime":{u="datetime-picker",m=c("datetime-picker");break}case"Enum":{u="combo-list";const p={data:f.type.enumValues,enumValueType:"string"};m=c("combo-list",p);break}case"Boolean":{u="combo-list";const p={data:f.type.enumValues||[{name:"true",value:!0},{name:"false",value:!1}],enumValueType:"boolean"};m=c("combo-list",p);break}default:u="input-group",m=c("input-group")}return m?{id:f.id,labelCode:f.path,code:f.code,name:f.name,labelName:f.name,placeHolder:"",controlType:u,$type:f.$type,$typeInfo:f.type,...m}:void 0}function d(f){if(!f||!f.id)return null;const{id:u,code:m,labelCode:y,name:p,controlType:g,labelName:b,$type:w,$typeInfo:I,...k}=f,S={id:u,code:m,labelCode:y,name:p,controlType:g,$type:w,$typeInfo:I,editor:k};return S.editor.type=g,S}return{getQuerySolutionExtendSchemaProerty:r,getFilterBarionExtendSchemaProerty:l,getExtendSchemaProerty:s,getEditorByType:c,getSolutionField:a,getControlTypeListByFieldType:i,formatUsingFieldToField:d}}function Eo(o,t){const{getControlTypeListByFieldType:e}=wt();function i(p){return{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"string",editor:{type:"combo-list",data:e(p.$typeInfo.name),valueField:"key",textField:"value",idField:"key",editable:!1,multiSelect:!1}}}}}function r(p){let g="form_group_"+Date.now();return p&&(g=p.replaceAll("-","_").replaceAll(".","_")),"lookup."+g}function l(p){const g={description:"帮助元数据",title:"帮助元数据",type:"string",refreshPanelAfterChanged:!0,editor:{type:"schema-selector",title:"选择数据源",textField:"id",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},viewOptions:[{id:"recommend",title:"推荐",type:"List",dataSource:"Recommand",enableGroup:!0,groupField:"category",groupFormatter:(k,S)=>`${k==="local"?"本地元数据":"最近使用"}`},{id:"total",title:"全部",type:"List",dataSource:"Total"}],repositoryToken:on.LookupSchemaRepositoryToken,onSubmitModal:k=>{if(k){const S=o.formSchemaUtils.getFormMetadataBasicInfo();return o.metadataService.getPickMetadata(S.relativePath,k[0].data).then(h=>{const v=JSON.parse(h==null?void 0:h.metadata.content);return p.helpId=v.id,p.displayName=v.name,p.displayType=v.displayType,p.textField=v.textField,p.valueField=v.valueField,p.idField=v.idField,p.uri=r(v.id),p.dataSource={displayName:v.name,idField:v.idField,uri:p.uri},null})}}}},b={description:"显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1},textField:"bindingPath",idField:"bindingPath",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},columns:[{field:"name",title:"名称"},{field:"code",title:"编号"},{field:"bindingPath",title:"绑定字段"}],repositoryToken:yt.FieldSelectorRepositoryToken,onSubmitModal:k=>(p.textField=k[0].bindingPath,null)}},w={description:"显示值字段",title:"值字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1},textField:"bindingPath",idField:"bindingPath",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},columns:[{field:"name",title:"名称"},{field:"code",title:"编号"},{field:"bindingPath",title:"绑定字段"}],repositoryToken:yt.FieldSelectorRepositoryToken,onSubmitModal:k=>(p.valueField=k[0].bindingPath,null)}},I={description:"字段映射",title:"字段映射",type:"string",editor:{type:"mapping-editor",modalWidth:800,modalHeight:600,editable:!1,editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},fromData:{editable:!1,formatter:(k,S)=>`${S.raw.name} [${S.raw.bindingPath}]`,idField:"id",textField:"bindingPath",valueField:"bindingPath",repositoryToken:yt.FieldSelectorRepositoryToken},toData:{idField:"id",textField:"bindingPath",valueField:"bindingPath",dataSource:o.designViewModelUtils.getAllFields2TreeByVMId(o.viewModelId),formatter:(k,S)=>`${S.raw.name} [${S.raw.bindingPath}]`}}};return{helpId:g,textField:b,valueField:w,mappingFields:I}}function s(p){return{enumValues:{description:"枚举值",title:"枚举值",type:"string",editor:{columns:[{field:"value",title:"值",dataType:"string"},{field:"name",title:"名称",dataType:"string"},{field:"disabled",title:"禁用",visible:!1,dataType:"boolean",editor:{type:"switch"}}],type:"item-collection-editor",valueField:"value",nameField:"name",requiredFields:["value","name"],uniqueFields:["value","name"]},$converter:ko}}}function c(p){const g={description:"精度",title:"精度",type:"number",editor:{type:"number-spinner",nullable:!1,precision:0,min:0}},b={description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0,precision:p.precision,min:p.min}},w={description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0,precision:p.precision,max:p.max}};return{precision:g,max:b,min:w}}function a(p,g){if(!g)return p;const b=g.includes("yyyy"),w=g.includes("MM"),I=g.includes("dd"),k=g.includes("HH"),S=g.includes("mm"),h=g.includes("ss");return b||(p=p.filter(v=>!v.id.includes("yyyy"))),w||(p=p.filter(v=>!v.id.includes("MM"))),I||(p=p.filter(v=>!v.id.includes("dd"))),k||(p=p.filter(v=>!v.id.includes("HH"))),S||(p=p.filter(v=>!v.id.includes("mm"))),h||(p=p.filter(v=>!v.id.includes("ss"))),p}function d(p){const{timeFormats:g,yMdFormats:b,yMFormats:w,mdFormats:I,yFormats:k}=nn.DATE_FORMATS();let S=[];const{controlType:h}=p;h==="date-picker"?S=S.concat(b,w,k,I):h==="datetime-picker"&&(S=S.concat(g,b,w,k,I));const v={description:"查询格式",title:"查询格式",type:"enum",editor:{data:S}},F={description:"显示格式",title:"显示格式",type:"enum",editor:{data:a(S,p.valueFormat)}};return{valueFormat:v,displayFormat:F}}function f(p){const{controlType:g}=p,b={description:"",title:"控件",properties:Z.cloneDeep(Io[g])};if(b.properties.multiLineLabel.$converter=Mo,g==="lookup"||g==="combo-lookup"){const{helpId:w,textField:I,valueField:k,mappingFields:S}=l(p);b.properties.helpId=w,b.properties.textField=I,b.properties.valueField=k,b.properties.mapFields=S}else if(g==="radio-group"||g==="combo-list"){const{enumValues:w}=s();b.properties.data=w}else if(g==="date-picker"||g==="datetime-picker"){const{$typeInfo:w}=p,{valueFormat:I,displayFormat:k}=d(p);w&&w.name==="String"&&(b.properties.valueFormat=I),b.properties.displayFormat=k}else if(g==="number-spinner"||g==="number-range"){const{precision:w,max:I,min:k}=c(p);b.properties.precision=w,b.properties.max=I,b.properties.min=k}return b}function u(p){const g=[{label:"valueChangedCmd",name:"值变化事件"}];switch(p){case"combo-lookup":case"lookup":g.push({label:"preEventCmd",name:"帮助前事件"},{label:"preEventCmd",name:"帮助前事件"});break;case"combo-list":g.push({label:"beforeShow",name:"面板展开前事件"},{label:"afterShow",name:"面板关闭后事件"});break}return g}function m(p){const g=u(p.controlType),b=o.eventsEditorUtils.formProperties(p,o.viewModelId,g),w={};return w[o.viewModelId]={type:"events-editor",editor:{initialData:b}},{title:"事件",hideTitle:!0,properties:w,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(k,S){const h=k.propertyValue;delete p[o.viewModelId],h&&(h.setPropertyRelates=this.setPropertyRelates,o.eventsEditorUtils.saveRelatedParameters(p,o.viewModelId,h.events,h)),p.remoteSort=!!p.columnSorted}}}function y(p){const g=i(p),b=f(p);return m(p),{title:"query-solution-config",description:"A Farris Component",type:"object",categories:{basic:g,control:b}}}return{getPropertyConfig:y}}function Bo(o,t,e,i){const r=n.ref(),l=n.ref("query-solution-config"),s=n.ref({}),c=n.ref(),a=n.ref(null),{getPropertyConfig:d}=Eo(o),{getExtendSchemaProerty:f}=wt();n.watch(()=>{var p;return(p=e.value)==null?void 0:p.id},(p,g)=>{if(!p)a.value=null;else if(p!==g){const b=i.get(p);a.value=b}});function u(p){return{id:p.id,code:p.code||p.id,labelCode:p.labelCode,name:p.name,controlType:p.controlType,$typeInfo:p.$typeInfo,$type:p.$type}}n.watch(()=>{var p,g;return[(p=a.value)==null?void 0:p.id,(g=a.value)==null?void 0:g.controlType]},([p,g],[b,w])=>{if(!p)r.value.updatePropertyConfig({},{},!0);else if(p!==b){const I=d(a.value);r.value.updatePropertyConfig(I,a.value,!0)}else if(g!==w){const I=i.get(p),k=u(I);k.controlType=g;const S={...k,...f(g,I)};(g==="number-spinner"||g==="number-range")&&(S.precision=I==null?void 0:I.$typeInfo.precision),i.set(p,S),a.value=i.get(p);const h=d(a.value);r.value.updatePropertyConfig(h,a.value,!0)}});function m(p){const{propertyID:g}=p.changeObject;if(g==="precision"||g==="max"||g==="min"){const b=d(a.value);r.value.updatePropertyConfig(b,a.value,!1)}if(g==="valueFormat"){const b=d(a.value),w=b.categories.control.properties.displayFormat.editor.data;w.find(I=>a.value.displayFormat===I.id)||(a.value.displayFormat=w[0].id),r.value.updatePropertyConfig(b,a.value,!1)}}function y(){return n.createVNode(tn.FPropertyPanel,{propertyConfig:c.value,ref:r,propertyName:l.value,enableSearch:!1,schema:s.value,onPropertyChanged:m},{default:()=>[n.createTextVNode(" ")]})}return{renderPanel:y}}function Vo(o,t,e,i){const r=new Map,l=n.ref(!1),s=n.ref(),c=n.ref([]),a=n.ref([]),d=n.ref([]),{getSolutionField:f}=wt(),u={customRowStatus:h=>{const v=h.raw;h.disabled=v.$type!=="SimpleField"||v.$typeInfo.name==="Text"}};function m(h){e.value=h.length?h[0]:null}function y(h){var T;a.value.forEach(F=>{!h.find(L=>L.id===F.id)&&i.set(F.id,Z.cloneDeep(r.get(F.id)))}),a.value=h;const v=(T=e.value)==null?void 0:T.id;(!v||!a.value.find(F=>F.id===v))&&(e.value=null)}function p(h,v=!1){if(h.forEach(T=>{T.data=f(T.data),i.set(T.data.id,Z.cloneDeep(T.data)),r.set(T.data.id,Z.cloneDeep(T.data)),T.children&&T.children.length&&p(T.children)}),v)return h}function g(){const h=Z.cloneDeep(o.fieldsConfig);return p(h,!0)}function b(h,v){return h.reduce((T,F)=>{v.set(F.data.id,F.data),F.children&&F.children.length&&b(F.children,v)},v)}function w(){d.value=g();const h=new Map([]);b(o.fieldsConfig,h);const v={},T=Z.cloneDeep(o.modelValue)||[];a.value=[],T.forEach(F=>{const P=h.get(F.id);P&&(v[F.id]={...F.editor,id:P.id,code:P.code,labelCode:P.path,labelName:P.name,name:F.name,$type:P.$type,$typeInfo:P.type,controlType:F.controlType},delete v[F.id].type,a.value.push(v[F.id]),i.set(F.id,Z.cloneDeep(v[F.id])))}),l.value=!0,s.value=Z.cloneDeep(v),c.value=Z.cloneDeep(a.value)}function I(){const h=[];a.value.forEach(v=>{const T=i.get(v.id);if(T){const{id:F,code:P,labelCode:L,name:C,controlType:U,labelName:_,$type:O,$typeInfo:A,...z}=T,de={id:F,code:P,labelCode:L,name:C,controlType:U,$type:O,$typeInfo:A,editor:z};de.editor.type=U,h.push(de)}}),t.emit("update:modelValue",h),o.onFieldsChanged&&typeof o.onFieldsChanged=="function"&&o.onFieldsChanged(h),l.value=!1,e.value=null}function k(){a.value=Z.cloneDeep(c.value),l.value=!1,e.value=null}function S(){return l.value?n.createVNode(ln,{selections:a.value,"data-source":d.value,rowOption:u,"display-type":"Tree",class:"query-solution-config-transfer","text-field":"labelName",onActiveChange:m,onChange:y},null):null}return{renderTransfer:S,initData:w,selectPanels:a,confirm:I,cancel:k}}const No={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},buttonBehavior:{type:String,default:"Popup"},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number,popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},popupOnInput:{type:Boolean,default:!1},popupOnFocus:{type:Boolean,default:!1},popupOnClick:{type:Boolean,default:!1},popupClass:{type:String,default:""},popupMinWidth:{type:Number,default:160},modalOptions:{type:Object,default:{}},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},textAlign:{type:String,default:"left"},beforeClickButton:{type:Function,default:null},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},beforeOpen:{type:Function,default:null},updateOn:{type:String,default:"change"},keepWidthWithReference:{type:Boolean,default:!0},placement:{type:String,default:"bottom-left"},limitContentBySpace:{type:Boolean,default:!1}},jo={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object},backgroundColor:{type:String,default:""}},Po=n.defineComponent({name:"FOverlay",props:jo,emits:["click"],setup(o,t){const e=n.ref(o.popupContentPosition),i=n.ref(o.host),r=n.computed(()=>({backgroundColor:o.backgroundColor||"",pointerEvents:"auto"}));function l(c){t.emit("click"),c.preventDefault(),c.stopPropagation()}n.computed(()=>{const c=i.value;if(c){const a=c.getBoundingClientRect(),{left:d,top:f,height:u}=a;return{left:d,top:f+u}}return e.value});const s=n.computed(()=>({}));return()=>n.createVNode(n.Teleport,{to:"body"},{default:()=>{var c,a;return[n.createVNode("div",{class:"overlay-container",onClick:d=>l(d),style:r.value},[n.createVNode("div",{style:s.value},[(a=(c=t.slots).default)==null?void 0:a.call(c)])])]}})}});function Oo(o){if(o.content&&o.content.render)return o.content.render;if(o.render&&typeof o.render=="function")return o.render}function $o(o){const t=document.createElement("div");t.style.display="contents";let e;const i=o.onClickCallback||(()=>{}),r=()=>{i(),e&&e.unmount()};return e=n.createApp({setup(){n.onUnmounted(()=>{document.body.removeChild(t)});const l=Oo(o);return()=>n.createVNode(Po,{"popup-content-position":o.popupPosition,host:o.host,onClick:r,backgroundColor:o.backgroundColor},{default:()=>[l&&l()]})}}),document.body.appendChild(t),e.mount(t),e}class Ro{static show(t){return $o(t)}}function Yt(o,t){function e(){const i=o.beforeOpen||o.beforeClickButton||null;let r=Promise.resolve(!0);if(i){const l=i(t.value);if(typeof l>"u")return r;typeof l=="boolean"?r=Promise.resolve(l):r=l}return r}return{judgeCanOpen:e}}function qo(o,t,e,i,r){const l=n.ref(o.buttonBehavior),s=n.ref(o.popupOnInput),c=n.computed(()=>({"input-group-append":!0,"append-force-show":o.showButtonWhenDisabled&&(o.readonly||o.disable)})),{judgeCanOpen:a}=Yt(o,r),d=n.computed(()=>o.showButtonWhenDisabled||(!o.editable||!o.readonly)&&!o.disable),f=n.inject(_t,null),u=n.ref();async function m(g){if(await a()&&d.value){const b=!!t.slots.default;if(l.value==="Modal"){const w=o.modalOptions,I=f==null?void 0:f.open({...w,render:()=>t.slots.default&&t.slots.default()});u.value=I==null?void 0:I.modalRef}l.value==="Overlay"&&Ro.show({host:document.body,backgroundColor:"rgba(0,0,0,.15)",render:()=>t.slots.default&&t.slots.default()}),b&&l.value==="Popup"&&i.togglePopup(!0),b&&s.value&&i.hidePopup(),t.emit("clickButton",{origin:g,value:o.modelValue})}}function y(g){t.emit("mouseEnterIcon",g)}function p(g){t.emit("mouseLeaveIcon",g)}return{buttonGroupClass:c,onClickButton:m,onMouseEnterButton:y,onMouseLeaveButton:p,modalRef:u}}function Lo(o,t,e,i,r,l){const s=n.ref(!1),c=n.computed(()=>o.enableClear&&!o.readonly&&!o.disable),{changeTextBoxValue:a,hasClearClass:d}=l;function f(p){s.value=p,d.value=p}n.watch(r,()=>{f(!!r.value)});function u(p){const g=!o.readonly&&!o.disable&&o.editable,b=!o.editable;p.stopPropagation(),(g||b)&&(a(""),f(!s.value),t.emit("clear"))}function m(p){if(c.value){if(!e.value){f(!1);return}!o.disable&&!o.readonly&&f(!0)}}function y(p){c.value&&f(!1)}return{enableClearButton:c,showClearButton:s,onClearValue:u,onMouseEnterTextBox:m,onMouseLeaveTextBox:y}}function Ao(o,t,e,i,r){const l=n.computed(()=>o.popupOnInput),s=n.computed(()=>o.popupOnFocus),{shouldPopupContent:c,closeAllPopover:a}=r,d=n.ref(!1),f=n.computed(()=>o.enableTitle?e.value:""),u=n.computed(()=>(o.disable||o.readonly)&&!o.forcePlaceholder?"":o.placeholder),m=n.computed(()=>o.readonly||!o.editable),y=n.ref(!1),p=n.computed(()=>!o.disable&&y.value),g=n.computed(()=>({"text-left":o.textAlign==="left","text-center":o.textAlign==="center","text-right":o.textAlign==="right","form-control":!0,"f-utils-fill":!0})),b=n.computed(()=>({"input-group":!0,"f-state-disabled":o.disable,"f-state-editable":o.editable&&!o.disable&&!o.readonly,"f-state-readonly":o.readonly,"f-state-focus":p.value,"input-group--has-clear":o.enableClear&&d.value}));function w(C,U=!0){e.value=C,U&&(t.emit("change",C),t.emit("update:modelValue",C))}function I(C){c.value=!1,w(C,!0)}n.watch(()=>o.modelValue,C=>{e.value=C});function k(C){y.value=!1,t.emit("blur",C),C.stopPropagation()}function S(C){t.emit("click",C),a(),t.slots.default&&!o.disable&&!o.readonly&&o.popupOnClick&&r.togglePopup()}function h(C){o.disable||(y.value=!0,m.value||(t.emit("focus",C),s.value&&!c.value&&r.popup()))}function v(C){t.emit("input",C.target.value);const U=C.target.value;i.value=U,e.value!==U&&w(U,o.updateOn==="change"),l.value&&!c.value&&r.popup()}function T(C){C.target.tagName!=="INPUT"&&C.preventDefault(),C.stopPropagation()}function F(C){t.emit("keydown",C)}function P(C){C.key==="Enter"&&(l.value||s.value)&&r.hidePopup(),t.emit("keyup",C)}function L(C){const U=C.target.value;C.stopPropagation(),w(U)}return{hasFocusedTextBox:p,isTextBoxReadonly:m,textBoxClass:g,textBoxPlaceholder:u,textBoxTitle:f,inputGroupClass:b,hasClearClass:d,changeTextBoxValue:w,commitValue:I,onBlurTextBox:k,onClickTextBox:S,onFocusTextBox:h,onInput:v,onKeyDownTextBox:F,onKeyUpTextBox:P,onMouseDownTextBox:T,onTextBoxValueChange:L}}const Re="FarrisVue_PopoverInstancesKey";function Ho(o,t,e,i){const r=n.ref(),l=n.ref(!1),{judgeCanOpen:s}=Yt(o,i);n.watch(()=>r.value,(y,p)=>{window[Re]=window[Re]||new WeakMap,y?window[Re].set(e.value,y):window[Re].delete(e.value)});function c(){if(window[Re]){const y=window[Re];document.querySelectorAll(".f-button-edit,.v-popover").forEach(p=>{y.get(p)&&p!==e.value&&y.get(p).hide()})}}function a(){const y=r.value;y&&y.show(e.value)}async function d(y=!1){if(!!t.slots.default){if(!y&&!l.value&&!await s())return;l.value=!l.value,await n.nextTick(),a()}}async function f(y=!1){if(!!t.slots.default){if(!y&&!await s())return;l.value=!0,await n.nextTick(),a()}}function u(){l.value=!1}function m(){l.value=!0,n.nextTick(()=>{a()})}return{hidePopup:u,showPopup:m,popup:f,shouldPopupContent:l,togglePopup:d,popoverRef:r,closeAllPopover:c}}function Uo(o,t,e){const i=n.ref(),{isTextBoxReadonly:r,textBoxClass:l,textBoxPlaceholder:s,textBoxTitle:c,onBlurTextBox:a,onClickTextBox:d,onFocusTextBox:f,onInput:u,onKeyDownTextBox:m,onKeyUpTextBox:y,onMouseDownTextBox:p,onTextBoxValueChange:g}=e;return n.onMounted(()=>{var b,w;o.selectOnCreated&&((b=i.value)==null||b.select()),o.focusOnCreated&&((w=i.value)==null||w.focus({preventScroll:!0}))}),()=>n.createVNode("input",{ref:i,name:"input-group-value",autocomplete:o.autoComplete?"on":"off",class:l.value,disabled:o.disable,maxlength:o.maxLength,minlength:o.minLength,placeholder:s.value,readonly:r.value,tabindex:o.tabIndex,title:c.value,type:o.inputType,value:t.value,onBlur:a,onChange:g,onClick:d,onFocus:f,onInput:u,onKeydown:m,onKeyup:y,onMousedown:p},null)}function Do(o,t,e){const i=n.ref(o.separator),r=n.computed(()=>o.readonly||o.disable),{changeTextBoxValue:l,onFocusTextBox:s,onBlurTextBox:c,onClickTextBox:a,textBoxPlaceholder:d}=e,f=n.computed(()=>t.value?t.value.split(i.value).map(p=>({name:p,selectable:!0})):[]);function u(p){l(p.map(g=>g.name).join(i.value),!0)}n.watch(()=>o.separator,p=>{i.value=p});const m=n.ref(!o.disable&&!o.readonly);n.watch([()=>o.disable,()=>o.readonly],([p,g],[b,w])=>{m.value=!p&&!g});function y(p){a(p)}return()=>n.createVNode(rn,{tabindex:o.tabIndex,onFocus:s,onBlur:c,id:`${o.id}-tag-editor`,class:"form-control",placeholder:d.value,data:f.value,showClose:!r.value,showInput:!0,disable:r.value,onChange:u,onClick:y},null)}function zo(o,t,e,i){const{buttonGroupClass:r,onClickButton:l,onMouseEnterButton:s,onMouseLeaveButton:c}=e,{enableClearButton:a,showClearButton:d,onClearValue:f}=i,u=n.ref();return{renderButtonGroup:()=>n.createVNode("div",{id:`${o.id}-button-group`,class:r.value},[a.value&&n.withDirectives(n.createVNode("span",{class:"input-group-text input-group-clear",onClick:f},[n.createVNode("i",{class:"f-icon modal_close"},null)]),[[n.vShow,d.value]]),t.slots.buttonContent?n.createVNode("span",{class:"input-group-text input-group-append-button",onClick:l,onMouseenter:s,onMouseleave:c},[t.slots.buttonContent()]):o.buttonContent?n.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:o.buttonContent,ref:u,onClick:l,onMouseenter:s,onMouseleave:c},null):null]),buttonHandleElement:u}}function Wo(o,t,e){const i=n.ref(o.popupMinWidth),{hidePopup:r,popoverRef:l}=e;return()=>n.createVNode(an,{id:`${o.id}-popover`,ref:l,placement:o.placement,host:o.popupHost,"keep-width-with-reference":o.keepWidthWithReference,fitContent:!0,"right-boundary":o.popupRightBoundary,minWidth:i.value,class:o.popupClass,offsetX:o.popupOffsetX,onHidden:r,limitContentBySpace:o.limitContentBySpace},{default:()=>{var s,c;return[(c=(s=t.slots).default)==null?void 0:c.call(s)]}})}const Go=n.defineComponent({name:"FButtonEdit",props:No,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(o,t){const e=n.ref(),i=n.ref(o.customClass),r=n.ref(o.modelValue),l=Ho(o,t,e,r),{shouldPopupContent:s,hidePopup:c,showPopup:a,togglePopup:d}=l,f=qo(o,t,e,l,r),u=n.ref(""),m=Ao(o,t,r,u,l),{hasFocusedTextBox:y,commitValue:p,inputGroupClass:g}=m,b=Lo(o,t,r,y,u,m),{onMouseEnterTextBox:w,onMouseLeaveTextBox:I}=b,k=n.computed(()=>{const O={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!o.wrapText};return i.value&&i.value.split(" ").reduce((A,z)=>(A[z]=!0,A),O),O}),S=n.computed(()=>({overflow:o.wrapText?"hidden":""})),h=n.computed(()=>({paddingLeft:"3px",backgroundColor:"#fff"}));function v(){if(!o.multiSelect||o.inputType!=="tag"||!e.value)return 0;let O=0;const A=Array.from(e.value.querySelectorAll(".farris-tag-item"));return A&&A.length&&(O=A.map(z=>z.offsetTop).filter(z=>z>20).length),O}const T=n.ref(v());n.onUpdated(()=>{T.value=v()});function F(){return o.multiSelect&&o.inputType==="tag"?()=>n.createVNode(n.Fragment,null,[Do(o,r,m)(),!!T.value&&n.createVNode("div",{class:"d-flex flex-row mr-2 more-tags","more-tags":!0},[n.createVNode("span",{class:"multi--more-text"},[n.createTextVNode("+"),T.value])])]):Uo(o,r,m)}let P=F();n.watch([()=>o.multiSelect,()=>o.inputType],()=>{P=F()});const{renderButtonGroup:L,buttonHandleElement:C}=zo(o,t,f,b),U=Wo(o,t,l),_={commitValue:p,elementRef:e,hidePopup:c,showPopup:a,popoverRef:l.popoverRef,shouldPopupContent:s,togglePopup:d,openDialog:()=>{C.value&&o.buttonBehavior==="Modal"&&C.value.click()},getModal:()=>{var O;return o.buttonBehavior==="Modal"?(O=f.modalRef.value)==null?void 0:O.value:null}};return n.onMounted(()=>{e.value.componentInstance=_,window.onresize=()=>{document.body.click()}}),n.onBeforeUnmount(()=>{var O;window.onresize=null,(O=window[Re])==null||O.delete(e.value)}),t.expose(_),()=>n.createVNode(n.Fragment,null,[n.createVNode("div",n.mergeProps(t.attrs,{ref:e,class:k.value,id:o.id,style:S.value}),[n.createVNode("div",{id:`${o.id}-input-group`,class:g.value,style:h.value,onMouseenter:w,onMouseleave:I},[P(),L()])]),s.value&&U()])}}),_o=n.defineComponent({name:"FQuerySolutionConfig",props:Xt,emits:["update:modelValue"],setup(o,t){const e=n.ref(null),i=n.computed(()=>"共"+o.modelValue.length+"项"),r=new Map,l=Bo(o,t,e,r),{renderPanel:s}=l,{renderTransfer:c,initData:a,confirm:d,cancel:f}=Vo(o,t,e,r);function u(){d()}function m(){f()}const y={fitContent:!1,width:900,height:600,draggable:!0,title:"筛选方案配置",acceptCallback:u,rejectCallback:m};function p(){return n.createVNode(n.Fragment,null,[c(),s()])}return()=>n.createVNode(Go,{id:o.id,"button-behavior":"Modal",editable:!1,"modal-options":y,modelValue:i.value,"onUpdate:modelValue":g=>i.value=g,onClickButton:()=>a()},{default:()=>[n.createVNode("div",{class:"query-solution-config d-flex f-utils-absolute-all"},[p()])]})}}),Xo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"filter-bar-config",description:"A Farris Container Component",properties:{fieldsConfig:{description:"所有字段(树结构)",type:"array"},designViewModelUtils:{description:"",type:"object"},formSchemaUtils:{description:"",type:"object"},metadataService:{description:"",type:"object"},viewModelId:{description:"",type:"array"},eventsEditorUtils:{description:"",type:"object"}}},Yo=new Map([["appearance",Qe]]);function Qo(o,t,e){return t}const Jo=Ye({fieldsConfig:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"filter-bar"},onFieldsChanged:{type:Function,default:null},formSchemaUtils:{type:Object,default:{}},metadataService:{type:Object,default:{}},designViewModelUtils:{type:Object,default:{}},eventsEditorUtils:{type:Object,default:{}},viewModelId:{type:String,default:""}},Xo,Yo,Qo);Me.install=o=>{o.component(Me.name,Me)},Me.register=(o,t,e,i)=>{o["filter-bar"]=Me,t["filter-bar"]=gt,o["filter-bar-config"]=_o,t["filter-bar-config"]=Jo},Me.registerDesigner=(o,t,e)=>{o["filter-bar"]=xo,t["filter-bar"]=gt},Q.FFilterBar=Me,Q.default=Me,Q.filterBarProps=ot,Q.propsResolver=gt,Object.defineProperties(Q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(Q,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../condition/index.umd.js"),require("../query-solution/index.umd.js"),require("../drawer/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("@vueuse/core"),require("../dynamic-resolver/index.umd.js"),require("../data-view/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../../designer/date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../../designer/response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../../designer/section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../../designer/tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../../designer/textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../../designer/tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../../designer/drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../external-container/index.umd.js"),require("../notify/index.umd.js"),require("../date-picker/index.umd.js"),require("../popover/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../condition/index.umd.js","../query-solution/index.umd.js","../drawer/index.umd.js","../dynamic-form/index.umd.js","../designer-canvas/index.umd.js","../common/index.umd.js","@vueuse/core","../dynamic-resolver/index.umd.js","../data-view/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../../designer/date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../../designer/radio-group/index.umd.js","../rate/index.umd.js","../../designer/response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../../designer/section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../../designer/tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../../designer/textarea/index.umd.js","../schema-selector/index.umd.js","../../designer/tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../../designer/drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../external-container/index.umd.js","../notify/index.umd.js","../date-picker/index.umd.js","../popover/index.umd.js"],n):(Q=typeof globalThis<"u"?globalThis:Q||self,n(Q["filter-bar"]={},Q.Vue,Q.LodashES,Q.condition,Q.FQuerySolution,Q.drawer,Q.FDynamicForm,Q.designerCanvas,Q.common,Q.VueUseCore,Q.dynamicResolver,Q.dataView,Q.propertyPanel,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.FFieldSelector,null,null,null,null,null,null,Q.FLookup,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.FTags,null,null,Q.FTransfer,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Q.datePicker,Q.FPopover))})(this,function(Q,n,Z,jt,Jt,Zt,Kt,mt,Ue,en,xe,J,tn,ei,ti,ni,oi,ii,ri,li,ai,si,ci,di,ui,pi,fi,mi,yi,gi,hi,yt,vi,bi,Ci,wi,xi,Fi,nn,Si,Ti,Ii,ki,Mi,Ei,Bi,Vi,Ni,ji,Pi,Oi,$i,Ri,qi,Li,Ai,Hi,Ui,Di,zi,on,Wi,Gi,rn,_i,Xi,Yi,Qi,Ji,Zi,Ki,er,tr,nr,or,ir,rr,lr,ar,sr,cr,dr,ur,pr,ln,an){"use strict";var Zo=Object.defineProperty;var Ko=(Q,n,Z)=>n in Q?Zo(Q,n,{enumerable:!0,configurable:!0,writable:!0,value:Z}):Q[n]=Z;var D=(Q,n,Z)=>Ko(Q,typeof n!="symbol"?n+"":n,Z);const sn={},cn={};function Pt(o){const{properties:t,title:e,ignore:i}=o,r=i&&Array.isArray(i),l=Object.keys(t).reduce((s,c)=>((!r||!i.find(a=>a===c))&&(s[c]=t[c].type==="object"&&t[c].properties?Pt(t[c]):Z.cloneDeep(t[c].default)),s),{});if(e&&(!r||!i.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");l.id=`${s}_${Math.random().toString().slice(2,6)}`}return l}function dn(o,t){const e=Pt(t);return Object.keys(e).reduce((i,r)=>(Object.prototype.hasOwnProperty.call(o,r)&&(i[r]&&Z.isPlainObject(i[r])&&Z.isPlainObject(o[r]||!o[r])?Object.assign(i[r],o[r]||{}):i[r]=o[r]),i),e),e}function Ot(o,t){return Object.keys(o).filter(i=>o[i]!=null).reduce((i,r)=>{if(t.has(r)){const l=t.get(r);if(typeof l=="string")i[l]=o[r];else{const s=l(r,o[r],o);Object.assign(i,s)}}else i[r]=o[r];return i},{})}function un(o,t,e=new Map){const i=dn(o,t);return Ot(i,e)}function pn(o={}){function t(d,f,u,m){if(typeof u=="number")return m[d].length===u;if(typeof u=="object"){const y=Object.keys(u)[0],p=u[y];if(y==="not")return Number(m[d].length)!==Number(p);if(y==="moreThan")return Number(m[d].length)>=Number(p);if(y==="lessThan")return Number(m[d].length)<=Number(p)}return!1}function e(d,f,u,m){return m[d]&&m[d].propertyValue&&String(m[d].propertyValue.value)===String(u)}const i=new Map([["length",t],["getProperty",e]]);Object.keys(o).reduce((d,f)=>(d.set(f,o[f]),d),i);function r(d,f){const u=d;return typeof f=="number"?[{target:u,operator:"length",param:null,value:Number(f)}]:typeof f=="boolean"?[{target:u,operator:"getProperty",param:d,value:!!f}]:typeof f=="object"?Object.keys(f).map(m=>{if(m==="length")return{target:u,operator:"length",param:null,value:f[m]};const y=m,p=f[m];return{target:u,operator:"getProperty",param:y,value:p}}):[]}function l(d){return Object.keys(d).reduce((u,m)=>{const y=r(m,d[m]);return u.push(...y),u},[])}function s(d,f){if(i.has(d.operator)){const u=i.get(d.operator);return u&&u(d.target,d.param,d.value,f)||!1}return!1}function c(d,f){return l(d).reduce((y,p)=>y&&s(p,f),!0)}function a(d,f){const u=Object.keys(d),m=u.includes("allOf"),y=u.includes("anyOf"),p=m||y,w=(p?d[p?m?"allOf":"anyOf":"allOf"]:[d]).map(k=>c(k,f));return m?!w.includes(!1):w.includes(!0)}return{parseValueSchema:a}}const N={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"filter-bar":{type:"filter-bar",name:"筛选条"}},fn={},mn={};pn();function Ye(o,t,e=new Map,i=(s,c,a,d)=>c,r={},l=s=>s){return sn[t.title]=t,cn[t.title]=i,fn[t.title]=r,mn[t.title]=l,(s={},c=!0)=>{if(!c)return Ot(s,e);const a=un(s,t,e),d=Object.keys(o).reduce((f,u)=>(f[u]=o[u].default,f),{});return Object.assign(d,a)}}function Qe(o,t){return{customClass:t.class,customStyle:t.style}}const yn=new Map([["appearance",Qe]]);function gn(o,t,e){return t}const hn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar.schema.json",title:"filter-bar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for filter-bar",type:"string"},type:{description:"The type string of filter-bar",type:"string",default:"filter-bar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},defaultValues:{description:"",type:"array"},disable:{type:"string",default:!1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},ot={data:{type:Array,default:[{id:"name",fieldCode:"name",fieldName:"名称",compareType:"0",valueType:0,value:"示例1",relation:"1"}]},fields:{type:Array,default:[]},mode:{type:String,default:"editable"},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},resetText:{type:String,default:"清空"},showReset:{type:Boolean,default:!1}},gt=Ye(ot,hn,yn,gn);function $t(o,t){const e=n.ref([]),i=n.ref([]),r=n.ref([]),l=n.ref("");n.ref(!1),n.ref(o.mode);const s=new Map,{createConditionValue:c}=jt.useConditionValue(),a=Jt.useCondition(o,t),{getFilterConditions:d}=a;function f(S){return!S.value.isEmpty()&&!!S.value.getDisplayText()}function u(S){const h={id:S.id,fieldCode:S.labelCode,fieldName:S.name,required:S.editor.required,editor:S.editor,value:c(S.controlType||"text")};return S.controlType==="lookup"?(h.value.valueField=S.editor.valueField,h.value.helpId=S.editor.helpId):S.controlType==="date-picker"?(h.value.displayFormat=S.editor.displayFormat||"yyyy-MM-dd",h.value.valueFormat=S.editor.valueFormat||"yyyy-MM-dd"):S.controlType==="datetime-picker"&&(h.value.displayFormat=S.editor.displayFormat||"yyyy-MM-dd HH:mm:ss",h.value.valueFormat=S.editor.valueFormat||"yyyy-MM-dd HH:mm:ss"),h}function m(S){i.value=o.fields.map(h=>{const v=Z.cloneDeep(h);return v.editor.type||(v.editor.type=h.controlType),v.editor.type==="number-spinner"||v.editor.type==="number-range"?(v.editor.showZero=!0,v.editor.nullable=!0):v.editor.type==="combo-list"?v.editor.enableClear=!0:v.editor.type==="datetime-picker"&&(v.editor.type="date-picker",v.editor.showTime=!0),v}),i.value.reduce((h,v)=>h,s)}function y(S){r.value=i.value.map(h=>u(h))}function p(S,h){m(o.fields),y(o.data)}function g(S){r.value=r.value.filter(h=>h.id!==S.id),e.value=e.value.filter(h=>h.fieldCode!==S.fieldCode),i.value=i.value.filter(h=>h.id!==S.id),t.emit("remove",S.fieldCode)}function b(S){S.value.clear(),e.value=e.value.filter(h=>h.fieldCode!==S.fieldCode),t.emit("clear",S.fieldCode)}function w(){r.value.forEach(S=>S.value.clear())}function I(){r.value.forEach(S=>{S.value.clear()}),t.emit("reset")}p(o.fields,o.data);function k(){var v;const S=(v=r.value)==null?void 0:v.filter(T=>{var F;return!((F=T.value)!=null&&F.isEmpty())});return d(S,i.value)}return{clearAll:w,clearFilterItem:b,currentFilterId:l,filterFields:i,filterItems:r,loadFilterItems:p,removeFilterItem:g,reset:I,shouldShowClearButtonInFilterItem:f,handleQuery:k}}function vn(o,t){function e(){}return()=>n.createVNode("div",{class:"f-filter-list-ellipsis",onClick:i=>void 0},[n.createTextVNode("...")])}function bn(o,t,e,i,r){const{filterFields:l,handleQuery:s}=r,c=n.ref(Z.cloneDeep(i.value)),a=n.ref("更多筛选");function d(){e.value=!1,c.value=Z.cloneDeep(i.value)}function f(){e.value=!1,i.value.forEach(y=>{const p=c.value.find(g=>g.id===y.id);p!=null&&p.value&&(y.value=p.value)});const m=s();t.emit("conditionChange",m)}function u(){return n.createVNode("div",null,[n.createVNode(jt.FConditionFields,{fields:l.value,conditions:c.value},null),n.createVNode("div",null,[n.createVNode("button",{class:"btn btn-secondary",onClick:d},[n.createTextVNode("取消")]),n.createVNode("button",{class:"btn btn-primary",onClick:f},[n.createTextVNode("确定")])])])}return()=>n.createVNode(Zt.FDrawer,{modelValue:e.value,"onUpdate:modelValue":m=>e.value=m,showClose:!1,width:480,closeByMask:!1,title:a.value},{content:u})}function Rt(o,t,e){const i=n.ref([]),r=n.ref("更多"),l=n.ref(o.resetText),s=n.ref(o.showReset),c=n.ref(!1),{clearAll:a,reset:d,filterItems:f,filterFields:u}=e;function m(){i.value=f.value.filter(I=>I.editor.isExtend)}m();const y=n.computed(()=>i.value&&i.value.length>0),p=n.computed(()=>s.value);function g(I){c.value=!0}function b(I){o.mode==="display-only"?a():d()}const w=bn(o,t,c,i,e);return()=>n.createVNode("div",{class:"f-filter-toolbars"},[y.value&&n.createVNode("button",{class:"btn btn-link",onClick:I=>g()},[r.value]),p.value&&n.createVNode("button",{class:"btn btn-link",onClick:I=>b()},[l.value]),w()])}const Cn={filterItem:{type:Object,default:null},position:{type:Object,default:null}},wn=n.defineComponent({name:"FFilterBarItem",props:Cn,emits:["cancel","confirm"],setup(o,t){const e=n.ref(Z.cloneDeep(o.filterItem)),i=n.ref(o.position),r={left:i.value.left,top:i.value.top};function l(d,f,u){d.value.editorType==="combo-list"&&u.newValue?d.value.valueList=u.newValue.map(m=>({name:m[d.editor.textField||"name"],value:m[d.editor.valueField||"value"]})):d.value.editorType==="radio-group"&&(d.value.valueList=[d.editor.data.find(m=>m.value===f)])}function s(){var u,m,y;const{editor:d}=e.value,f=e.value;return((u=f.value)==null?void 0:u.editorType)==="lookup"&&d?(d.idValue=(m=f.value.mapFields)==null?void 0:m.map(p=>p.id).join(","),d.onClear=()=>{f.value.mapFields=[],l(f,"")},d["onUpdate:dataMapping"]=p=>{f.value.mapFields=p.items,l(f,f.value.getValue())}):((y=f.value)==null?void 0:y.editorType)==="number-range"&&d&&(d.beginValue=f.value.begin,d.onBeginValueChange=p=>{f.value.begin=p,l(f,p)},d.endValue=f.value.end,d.onEndValueChange=p=>{f.value.end=p,l(f,p)}),n.createVNode(Kt.FDynamicFormGroup,{label:"",editor:d,required:d==null?void 0:d.required,modelValue:f.value.value,"onUpdate:modelValue":p=>f.value.value=p,onChange:(p,g)=>l(f,p,g)},null)}function c(d){t.emit("cancel")}function a(d){d.stopPropagation(),t.emit("confirm",e.value)}return()=>n.createVNode("div",{class:"f-filter-panel-wrapper can-close",onClick:c},[n.createVNode("div",{class:"f-filter-panel",style:r},[n.createVNode("div",{class:"f-filter-panel-inner",onClick:d=>d.stopPropagation()},[n.createVNode("div",{class:"f-filter-panel-arrow",style:{left:i.value.arrowLeft,right:i.value.arrowRight}},null),s(),n.createVNode("div",{class:"f-filter-panel-footer ng-star-inserted"},[n.createVNode("div",{class:"filer-panel-clear"},[n.createVNode("button",{class:"btn btn-link",disabled:""},[n.createTextVNode("清空筛选")])]),n.createVNode("div",{class:"filter-panel-btns"},[n.createVNode("button",{class:"btn btn-secondary can-close",onClick:c},[n.createTextVNode("取消")]),n.createVNode("button",{class:"filter-panel-submit btn btn-primary",onClick:a},[n.createTextVNode("确定")])])])])])])}}),xn={filterItem:{type:Object,default:null},useFilterItemsComposition:{type:Object,default:null},disabled:{type:Boolean,default:!1}},qt=n.defineComponent({name:"FFilterBarItem",props:xn,emits:["confirm"],setup(o,t){const e=n.ref(o.filterItem),{clearFilterItem:i,currentFilterId:r,removeFilterItem:l,shouldShowClearButtonInFilterItem:s}=o.useFilterItemsComposition,c=n.ref(o.disabled),a=n.ref(),d=n.ref(!1),f=function(){return{"f-filter-item":!0,"f-filter-item-actived":!e.value.value.isEmpty(),"f-filter-item-edit":e.value.id===r.value}};n.computed(()=>!c.value&&o.mode==="editable");function u(g){o.mode==="display-only"?l(e.value):i(e.value)}function m(g){var I;const b=(I=g.currentTarget)==null?void 0:I.getBoundingClientRect(),w=380;b.left>document.body.clientWidth-w-20?a.value={left:b.left+b.width-w+"px",top:b.top+b.height+"px",arrowLeft:"auto",arrowRight:"26px"}:a.value={left:b.left+"px",top:b.top+b.height+"px",arrowLeft:"26px",arrowRight:"auto"},d.value=!0}function y(){d.value=!1}function p(g){d.value=!1,e.value.value=g.value,t.emit("confirm",g)}return()=>n.createVNode("div",{key:e.value.id,id:e.value.id,class:f()},[n.createVNode("div",{class:"f-filter-item-inner",onClick:g=>m(g)},[e.value.editor.required&&n.createVNode("span",{class:"f-filter-item-required text-danger"},[n.createTextVNode("*")]),n.createVNode("span",{class:"f-filter-item-text"},[e.value.fieldName]),e.value.value.getDisplayText()&&n.createVNode(n.Fragment,null,[n.createVNode("span",{class:"f-filter-item-tip"},[n.createTextVNode(":")]),n.createVNode("span",{class:"f-filter-item-content"},[e.value.value.getDisplayText()])]),!c.value&&n.createVNode("span",{class:"f-filter-item-arrow f-icon f-icon-arrow-chevron-down"},null)]),s(e.value)&&n.createVNode("span",{class:"mr-3 f-filter-item-clear",onClick:g=>u()},[n.createVNode("span",{class:"f-icon f-icon-close-circle"},null)]),d.value&&n.createVNode(wn,{position:a.value,filterItem:e.value,onConfirm:p,onCancel:y},null)])}});function Fn(o,t,e){const i=n.ref(null);function r(){var y,p;let c=!1;const a=(y=t.value)==null?void 0:y.children;if(!t.value||!o.value||!a||a.length===0)return;const d=(p=o.value.children[1])==null?void 0:p.clientWidth,f=o.value.clientWidth;let u=0,m=0;Array.from(a).forEach(g=>{g.style.display="block"});for(let g=0;g<a.length;g++){const b=a[g],w=b.offsetWidth;u+w<=f-30-d?(u+=w,m++):(b.style.display="none",c=!0)}return e.value=c,m}function l(){var a;if(!o.value||!t.value)return;(a=i.value)==null||a.unobserve(o.value);const c=t.value.children;Array.from(c).forEach(d=>{d.style.display="block"})}function s(){if(!t.value||!o.value)return;const c=new ResizeObserver(a=>{r()});return c.observe(o.value),i.value=c,c}return{setupWidthObserver:s,cancelWidthObserver:l}}const Me=n.defineComponent({name:"FFilterBar",props:ot,emits:["clear","remove","reset","conditionChange","change"],setup(o,t){const e=n.ref(!0),i=n.ref(!1),r=n.ref(!1),l=n.ref(!1),s=n.ref(null),c=n.ref(null),a=$t(o,t),d=Fn(c,s,l),{cancelWidthObserver:f,setupWidthObserver:u}=d,{filterFields:m,filterItems:y,loadFilterItems:p,handleQuery:g}=a,b=n.computed(()=>({display:m.value&&m.value.length?"":"none"}));n.watch([()=>o.data,()=>o.fields],([P,L])=>{p(L,P)}),n.onMounted(()=>{u()});const w=n.computed(()=>i.value&&e.value),I=n.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":w.value})),k=n.computed(()=>({'"extend-btn-arrow':!0,"f-icon":!0,"f-icon-arrow-chevron-up":i.value,"f-icon-arrow-chevron-down":!i.value})),S=n.computed(()=>y.value.length>0);n.computed(()=>r.value&&!i.value&&l.value);const h=Rt(o,t,a);function v(P){t.emit("change",P);const L=g();t.emit("conditionChange",L)}function T(){return n.createVNode("div",{class:I.value,ref:s},[y.value.map((P,L)=>!P.editor.isExtend&&n.createVNode(qt,{filterItem:P,useFilterItemsComposition:a,onConfirm:v},null)),i.value&&h()])}function F(){i.value=!i.value,i.value?f():u()}return()=>n.createVNode("div",{class:"f-filter-wrapper",style:b.value},[n.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[n.createVNode("div",{class:"f-filter-main f-utils-fill",ref:c},[n.createVNode("div",{class:"f-filter-list-wrapper d-flex w-100"},[S.value&&T()]),!i.value&&h()]),l.value&&n.createVNode("div",{class:"f-filter-extend-btn"},[n.createVNode("button",{class:"btn btn-link",onClick:F},[n.createVNode("span",{class:"extend-btn-text"},[i.value?"收折":"展开"]),n.createVNode("span",{class:k.value},null)])])])])}}),Sn=n.ref(0);function Tn(){Sn.value++}const it=n.ref(0);function In(o){const{formSchemaUtils:t,formStateMachineUtils:e}=o;function i(a,d=""){return{path:d+a.code,field:a.id,fullPath:a.code}}function r(a,d=""){return t.getViewModelById(a).states.map(u=>i(u,d))}function l(a){const d=t.getRootViewModelId(),f=r(a);if(a===d)return f;const u=r(d,"root-component.");return[...f,...u]}function s(a){return a.binding&&a.binding.path||a.id||""}function c(){return e&&e.getRenderStates()||[]}return{getVariables:l,getControlName:s,getStateMachines:c}}class Lt{constructor(t){D(this,"sessionVariables",[{key:"CurrentSysOrgName",name:"当前组织Name",description:"当前组织Name"},{key:"CurrentSysOrgId",name:"当前组织Id",description:"当前组织Id"},{key:"CurrentUserName",name:"当前用户Name",description:"当前用户Name"},{key:"CurrentUserCode",name:"当前用户Code",description:"当前用户Code"},{key:"CurrentUserId",name:"当前用户Id",description:"当前用户Id"},{key:"CurrentLanguage",name:"当前语言编号",description:"当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"}]);D(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});D(this,"getExpressionConverter",(t,e)=>({convertFrom:(i,r,l,s)=>{const c=l.getExpressionRuleValue(t,e||r);return c&&c.value||""},convertTo:(i,r,l,s,c)=>{var a;if(r==="dataPicking"&&(l!=null&&l.target)){const d=`${l.target}_dataPicking`;((a=l.rules)==null?void 0:a.some(u=>u.id===d&&u.value))?i.dictPickingExpressionId=d:delete i.dictPickingExpressionId}s.updateExpression(l)}}));this.formSchemaService=t}getExpressionRule(t,e){const i=this.formSchemaService.getExpressions();if(!i)return"";const r=i.find(s=>s.target===t);if(!r)return"";const l=r.rules.find(s=>s.type===e);return l||""}getContextFormVariables(){const{module:t}=this.formSchemaService.getFormSchema();if(!t.viewmodels||t.viewmodels.length===0)return[];const e=this.formSchemaService.getRootViewModelId(),i=this.formSchemaService.getViewModelById(e);if(!i||!i.states||i.states.length===0)return[];const r=[];return i.states.forEach(l=>{r.push({key:l.code,name:l.name,description:l.name,category:l.category})}),r}createTreeNode(t,e,i="label"){return{id:t.id,name:t.name,bindingPath:t[i],parents:e}}buildEntityFieldsTreeData(t=null,e){const i=[];return t==null||t.forEach(r=>{var c;const l=this.createTreeNode(r,e);let s=[];(c=r.type)!=null&&c.fields&&(s=this.buildEntityFieldsTreeData(r.type.fields,[...e,r.label])),i.push({data:l,children:s,expanded:!0})}),i}buildChildEntityTreeData(t=null,e){const i=[];return t==null||t.forEach(r=>{var a,d;const l=this.createTreeNode(r,e),s=this.buildEntityFieldsTreeData((a=r.type)==null?void 0:a.fields,[...e,r.label]),c=this.buildChildEntityTreeData((d=r.type)==null?void 0:d.entities,[...e,r.label]);c!=null&&c.length&&(s==null||s.push(...c)),i.push({data:l,children:s||[],expanded:!0})}),i}getEntitiesTreeData(){const t=this.formSchemaService.getSchemaEntities();if(!(t!=null&&t.length))return[];const e=t[0];if(!(e!=null&&e.type))return[];const i=this.buildEntityFieldsTreeData(e.type.fields,[e.code]),r=this.buildChildEntityTreeData(e.type.entities,[e.code]);return r!=null&&r.length&&(i==null||i.push(...r)),{entityCode:e.code,fields:[{data:this.createTreeNode(e,[],"code"),children:i||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(t,e,i){const r=i==="Field"?t.binding.field:t.id,l=this.getExpressionRule(r,e),s=this.getEntitiesAndVariables(),c={message:["validate","required","dataPicking"].includes(e)&&l?l.message:"",...s};return l.messageType!=null&&(c.messageType=l.messageType),c}buildRule(t,e,i,r){const{expression:l,message:s,messageType:c}=e,a={id:`${t}_${i}`,type:i,value:l};return(i==="validate"||i==="dataPicking"||i==="required")&&(a.message=s),i==="dataPicking"&&(a.messageType=c),i==="validate"&&r&&(a.elementId=r),a}getExpressionData(){const{expressions:t}=this.formSchemaService.getFormSchema().module;return t||[]}updateExpression(t,e,i,r){const l=e==="Field"?t.binding.field:t.id,s=this.buildRule(l,i,r,t.type==="form-group"?t.id:"");let a=this.getExpressionData().find(f=>f.targetType===e&&f.target===l);const d=f=>f.value.trim()==="";if(a){const f=a.rules.find(u=>u.id===s.id);if(f)d(s)?a.rules=a.rules.filter(u=>u.id!==s.id):(Object.assign(f,s),r==="validate"&&t.type==="form-group"&&(f.elementId=t.id));else{if(d(s))return null;a.rules=a.rules||[],a.rules.push(s)}}else{if(d(s))return null;a={target:`${l}`,rules:[s],targetType:e}}return a}getExpressionEditorOptions(t,e,i,r){return i.reduce((l,s)=>{var a,d;const c=e==="Field"?(a=t==null?void 0:t.binding)==null?void 0:a.field:t.id;return l[s]={hide:e==="Field"?!!((d=t==null?void 0:t.binding)!=null&&d.field):!1,description:"",title:this.expressionNames[s],type:"string",$converter:this.getExpressionConverter(c),editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[s]}编辑器`,showMessage:s==="validate"||s==="dataPicking"||s==="required",showMessageType:s==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(t,s,e),onSubmitModal:f=>{const u=this.updateExpression(t,e,f,s);if(r){const m=this.buildRule(c,f,s);r(m)}return u}}},l},{})}getExpressionInfo(t,e,i){const r=e==="Field"?t.binding.field:t.id,l=this.getExpressionRule(r,i),s={value:l&&l.value,targetId:r,targetType:e,expressionType:i};return l&&l.message&&(s.message=l.message),s}getExpressionConfig(t,e,i=["compute","dependency","validate"],r){return{description:"表达式",title:"表达式",properties:{...this.getExpressionEditorOptions(t,e,i,r)}}}getExpressionOptions(t,e,i){const r=this.getExpressionInfo(t,e,i);return{dialogTitle:`${this.expressionNames[i]}编辑器`,singleExpand:!1,showMessage:i==="required",beforeOpen:()=>this.onBeforeOpenExpression(t,i,e),expressionInfo:r}}}class kn{constructor(t,e){D(this,"componentId");D(this,"viewModelId");D(this,"eventsEditorUtils");D(this,"formSchemaUtils");D(this,"formMetadataConverter");D(this,"designViewModelUtils");D(this,"designViewModelField");D(this,"controlCreatorUtils");D(this,"designerHostService");D(this,"schemaService",null);D(this,"metadataService",null);D(this,"propertyConfig",{type:"object",categories:{}});var i;this.componentId=t,this.designerHostService=e,this.eventsEditorUtils=e.eventsEditorUtils,this.formSchemaUtils=e.formSchemaUtils,this.formMetadataConverter=e.formMetadataConverter,this.viewModelId=((i=this.formSchemaUtils)==null?void 0:i.getViewModelIdByComponentId(t))||"",this.designViewModelUtils=e.designViewModelUtils,this.controlCreatorUtils=e.controlCreatorUtils,this.metadataService=e.metadataService,this.schemaService=e.schemaService}getTableInfo(){var t;return(t=this.schemaService)==null?void 0:t.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(t){var i;const e=t.binding&&t.binding.type==="Form"&&t.binding.field;if(e){if(!this.designViewModelField){const r=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=r.fields.find(l=>l.id===e)}t.updateOn=(i=this.designViewModelField)==null?void 0:i.updateOn}}getBasicPropConfig(t){return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"name",valueField:"value",idField:"value",editable:!1,data:[{value:t.type,name:N[t.type].name}]}}}}}getAppearanceConfig(t=null,e={},i){const r={title:"外观",description:"Appearance"},l={class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的样式",$converter:"/converter/appearance.converter"}};for(const s in e)l[s]=Object.assign(l[s]||{},e[s]);return{...r,properties:{...l},setPropertyRelates(s,c){if(s){switch(s&&s.propertyID){case"class":case"style":{it.value++;break}}i&&i(s,t,c)}}}}getPropertyEditorParams(t,e=[],i="visible",r={},l={}){const{getVariables:s,getControlName:c,getStateMachines:a}=In(this.designerHostService),d=this.getRealTargetType(t),f=e&&e.length>0?e:["Const","Variable","StateMachine","Expression"],u={type:"property-editor",propertyTypes:f};return f.map(m=>{switch(m){case"Const":Object.assign(u,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},r);break;case"Expression":u.expressionConfig=this.getExpressionOptions(t,d,i);break;case"StateMachine":u.stateMachines=a();break;case"Variable":Object.assign(u,{controlName:c(t),newVariablePrefix:"is",newVariableType:"Boolean",variables:s(this.viewModelId),onBeforeOpenVariables:y=>{y.value=s(this.viewModelId)}},l);break}}),u}getVisibleProperty(t,e=""){return{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(t,e==="gridFieldEditor"?["Const","Expression"]:["Const","Variable","StateMachine","Expression"],"visible")}}}getBehaviorConfig(t,e="",i={},r){const l={title:"行为",description:""},s=this.getVisibleProperty(t,e);for(const a in i)s[a]=Object.assign(s[a]||{},i[a]);const c=this;return{...l,properties:{...s},setPropertyRelates(a,d){if(a){switch(a.propertyID){case"disabled":case"readonly":case"visible":c.afterMutilEditorChanged(t,a);break}r&&r(a,d)}}}}afterMutilEditorChanged(t,e){this.addNewVariableToViewModel(e,this.viewModelId),this.updateExpressionValue(e),this.clearExpression(e,t)}updateElementByParentContainer(t,e){const i=e&&e.parent&&e.parent.schema;if(!i)return;const r=i.contents.findIndex(s=>s.id===t),l=Z.cloneDeep(i.contents[r]);i.contents.splice(r,1),i.contents.splice(r,0,l),Tn()}addNewVariableToViewModel(t,e){const i=t.propertyValue;if(!(i&&typeof i=="object")||!(i.type==="Variable"&&i.isNewVariable))return;const s={id:i.field,category:"locale",code:i.fullPath,name:i.fullPath,type:i.newVariableType||"String"};delete i.newVariableType,delete i.isNewVariable,this.formSchemaUtils.getVariableByCode(s.code)||this.formSchemaUtils.getViewModelById(e).states.push(s)}updateExpressionValue(t){const e=t.propertyValue;if(!((e&&e.type)==="Expression"&&e.expressionInfo))return;const{expressionId:l,expressionInfo:s}=e,{targetId:c,targetType:a,expressionType:d,value:f,message:u}=s,m=this.formSchemaUtils.getModule();m.expressions??(m.expressions=[]);const{expressions:y}=m;let p=y.find(b=>b.target===c);p||(p={target:c,rules:[],targetType:a},y.push(p));const g=p.rules.find(b=>b.type===d);if(g)g.value=f,g.message=u;else{const b={id:l,type:d,value:f,message:u};p.rules.push(b)}delete e.expressionInfo}clearExpression(t,e){const i=t.propertyValue;if(i&&i.type==="Expression")return;const l=t.propertyID,s=this.formSchemaUtils.getExpressions(),c=e.binding?e.binding.field:e.id,a=s.find(d=>d.target===c);!a||!a.rules||(a.rules=a.rules.filter(d=>d.type!==l))}getExpressionOptions(t,e,i){return new Lt(this.formSchemaUtils).getExpressionOptions(t,e,i)}getRealTargetType(t){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(t.type)>-1?"Button":t.binding&&t.binding.field?"Field":"Container"}}const De=class De{static getEditorTypesByMDataType(t,e=""){let i=De.fieldControlTypeMapping[t];if(e==="data-grid-column"&&(i!=null&&i.length)){const r=[N["check-group"].type,N["radio-group"].type];i=i.filter(l=>!r.includes(l.key))}return i}static getAllInputTypes(){const t=[];for(const e in De.fieldControlTypeMapping)De.fieldControlTypeMapping[e].forEach(i=>{t.find(r=>r.key===i.key&&r.value===i.value)||t.push({key:i.key,value:i.value})});return t}static mappingDomPropAndSchemaProp(t,e){var l;const i=(l=t.editor)==null?void 0:l.type,r=[];return(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&e&&e.categoryId&&e.categoryId.indexOf("gridFieldEditor")<0&&r.push({domField:"title",schemaField:"name"}),r.push({domField:"label",schemaField:"name"}),r.push({domField:"editor.required",schemaField:"require"}),r.push({domField:"editor.readonly",schemaField:"readonly"}),(i===N["input-group"].type||i===N.textarea.type||i===N["number-spinner"].type)&&r.push({domField:"editor.maxLength",schemaField:"type.length"}),i===N["number-spinner"].type&&r.push({domField:"editor.precision",schemaField:"type.precision"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"formatter.precision",schemaField:"type.precision"}),(i===N["combo-list"].type||i===N["radio-group"].type)&&r.push({domField:"editor.data",schemaField:"type.enumValues"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"formatter.data",schemaField:"type.enumValues"}),i===N["date-picker"].type&&(r.push({domField:"editor.displayFormat",schemaField:"editor.format"}),r.push({domField:"editor.fieldType",schemaField:"type.name"})),i===N["number-spinner"].type&&(r.push({domField:"editor.max",schemaField:"editor.maxValue"}),r.push({domField:"editor.min",schemaField:"editor.minValue"})),i===N.lookup.type&&(r.push({domField:"editor.dataSource",schemaField:"editor.dataSource"}),r.push({domField:"editor.valueField",schemaField:"editor.valueField"}),r.push({domField:"editor.textField",schemaField:"editor.textField"}),r.push({domField:"editor.displayType",schemaField:"editor.displayType"}),r.push({domField:"editor.mapFields",schemaField:"editor.mapFields"}),r.push({domField:"editor.helpId",schemaField:"editor.helpId"})),r.push({domField:"path",schemaField:"bindingPath"}),r.push({domField:"binding.path",schemaField:"bindingField"}),r.push({domField:"binding.fullPath",schemaField:"path"}),(t.type===N["data-grid-column"].type||t.type===N["tree-grid-column"].type)&&r.push({domField:"field",schemaField:"bindingPath"}),r}};D(De,"fieldControlTypeMapping",{String:[{key:N["input-group"].type,value:N["input-group"].name},{key:N.lookup.type,value:N.lookup.name},{key:N["date-picker"].type,value:N["date-picker"].name},{key:N["check-group"].type,value:N["check-group"].name},{key:N["radio-group"].type,value:N["radio-group"].name},{key:N["combo-list"].type,value:N["combo-list"].name},{key:N.textarea.type,value:N.textarea.name},{key:N["time-picker"].type,value:N["time-picker"].name}],Text:[{key:N.textarea.type,value:N.textarea.name},{key:N.lookup.type,value:N.lookup.name}],Decimal:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Integer:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Number:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],BigNumber:[{key:N["number-spinner"].type,value:N["number-spinner"].name}],Date:[{key:N["date-picker"].type,value:N["date-picker"].name}],DateTime:[{key:N["date-picker"].type,value:N["date-picker"].name}],Boolean:[{key:N.switch.type,value:N.switch.name},{key:N["check-box"].type,value:N["check-box"].name}],Enum:[{key:N["combo-list"].type,value:N["combo-list"].name},{key:N["radio-group"].type,value:N["radio-group"].name}],Object:[{key:N.lookup.type,value:N.lookup.name},{key:N["combo-list"].type,value:N["combo-list"].name},{key:N["radio-group"].type,value:N["radio-group"].name}]});let rt=De;var lt=(o=>(o.Form="Form",o.Variable="Variable",o))(lt||{});class Mn{constructor(){D(this,"label","");D(this,"id","");D(this,"columnInSM",12);D(this,"columnInMD",6);D(this,"columnInLG",3);D(this,"columnInEL",2);D(this,"displayWidthInSM",1);D(this,"displayWidthInMD",1);D(this,"displayWidthInLG",1);D(this,"displayWidthInEL",1);D(this,"displayColumnCountAtBreakPoint","md");D(this,"tagRow",0);D(this,"showTopBorder",0);D(this,"group",1);D(this,"isSupportedClass",!0);D(this,"fieldSetId","")}}function En(o){let t,e;const i=new Map;let r=[];function l(f,u){const y=f.split(" ").filter(I=>I.startsWith("col-"));if(y.length===0){u.isSupportedClass=!1;return}let p=y.find(I=>/^col-([1-9]|10|11|12)$/.test(I)),g=y.find(I=>/^col-md-([1-9]|10|11|12)$/.test(I)),b=y.find(I=>/^col-xl-([1-9]|10|11|12)$/.test(I)),w=y.find(I=>/^col-el-([1-9]|10|11|12)$/.test(I));p=p||"col-12",u.columnInSM=parseInt(p.replace("col-",""),10),u.displayWidthInSM=u.columnInSM/12,u.displayWidthInSM!==1&&(u.isSupportedClass=!1),g=g||"col-md-"+u.columnInSM,u.columnInMD=parseInt(g.replace("col-md-",""),10),u.displayWidthInMD=u.columnInMD/6,[1,2].includes(u.displayWidthInMD)||(u.isSupportedClass=!1),b=b||"col-xl-"+u.columnInMD,u.columnInLG=parseInt(b.replace("col-xl-",""),10),u.displayWidthInLG=u.columnInLG/3,[1,2,3,4].includes(u.displayWidthInLG)||(u.isSupportedClass=!1),w=w||"col-el-"+u.columnInLG,u.columnInEL=parseInt(w.replace("col-el-",""),10),u.displayWidthInEL=u.columnInEL/2,[1,2,3,4,5,6].includes(u.displayWidthInEL)||(u.isSupportedClass=!1)}function s(f,u,m,y=!1){let p=!1;f.contents.forEach(g=>{if(g.type==="fieldset"){m+=1,s(g,u,m,!0),p=!0;return}p&&(m+=1,p=!1);const b=g.appearance&&g.appearance.class,w=new Mn;b?l(b,w):w.isSupportedClass=!1,w.label=g.label||g.id,w.id=g.id,w.group=m,y&&(w.fieldSetId=f.id),e===g.id&&(t=m),i.set(g.id,g),u.push(w)})}function c(f){const u=o.getComponentById(f);if(!u||!u.componentType||!u.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const m=o.selectNode(u,y=>y.type===mt.DgControl["response-form"].type);return!m||!m.contents||m.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:m}}function a(f,u){u=u||f.id;const{result:m,message:y,formNode:p}=c(u);if(!m)return{result:m,message:y};e=f.id,r=[],i.clear();const g=p.contents[0].type===mt.DgControl.fieldset.type?0:1;s(p,r,g);const b=r.find(I=>!I.isSupportedClass);return{defaultState:{defaultGroupNumber:t||1,model:b?"customize":"standard"},importData:r}}function d(f,u){u=u;const{result:m,formNode:y}=c(u);if(!m)return"";const p=[];return f.forEach(g=>{var I;const b=i.get(g.id),w=b.appearance&&b.appearance.class;if(w){const S=w.split(" ").filter(L=>!L.startsWith("col-")),h="col-"+g.columnInSM,v="col-md-"+g.columnInMD,T="col-xl-"+g.columnInLG,F="col-el-"+g.columnInEL,P=[h,v,T,F].concat(S);b.appearance.class=P.join(" ")}if(g.fieldSetId){const k=y.contents.find(h=>h.id===g.fieldSetId),S=p.find(h=>h.id===g.fieldSetId);S?(I=S.contents)==null||I.push(b):(p.push(k),k.contents=[b])}else p.push(b)}),y.contents=p,y.id}return{checkCanFindFormNode:c,checkCanOpenLayoutEditor:a,changeFormControlsByResponseLayoutConfig:d,getResonseFormLayoutConfig:s}}var Ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Bn={exports:{}};(function(o,t){(function(e){o.exports=e()})(function(){return function(){function e(i,r,l){function s(d,f){if(!r[d]){if(!i[d]){var u=typeof at=="function"&&at;if(!f&&u)return u(d,!0);if(c)return c(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var y=r[d]={exports:{}};i[d][0].call(y.exports,function(p){var g=i[d][1][p];return s(g||p)},y,y.exports,e,i,r,l)}return r[d].exports}for(var c=typeof at=="function"&&at,a=0;a<l.length;a++)s(l[a]);return s}return e}()({1:[function(e,i,r){var l={},s="(?:^|\\s)",c="(?:\\s|$)";function a(u){var m=l[u];return m?m.lastIndex=0:l[u]=m=new RegExp(s+u+c,"g"),m}function d(u,m){var y=u.className;y.length?a(m).test(y)||(u.className+=" "+m):u.className=m}function f(u,m){u.className=u.className.replace(a(m)," ").trim()}i.exports={add:d,rm:f}},{}],2:[function(e,i,r){(function(l){var s=e("contra/emitter"),c=e("crossvent"),a=e("./classes"),d=document,f=d.documentElement;function u(C,U){var _=arguments.length;_===1&&Array.isArray(C)===!1&&(U=C,C=[]);var O,A,z,de,B,j,W,$,te,ue=null,Ie,X,ge=!1,ye=0,oe,R=U||{};R.moves===void 0&&(R.moves=I),R.accepts===void 0&&(R.accepts=I),R.invalid===void 0&&(R.invalid=Ke),R.containers===void 0&&(R.containers=C||[]),R.isContainer===void 0&&(R.isContainer=w),R.copy===void 0&&(R.copy=!1),R.copySortSource===void 0&&(R.copySortSource=!1),R.revertOnSpill===void 0&&(R.revertOnSpill=!1),R.removeOnSpill===void 0&&(R.removeOnSpill=!1),R.direction===void 0&&(R.direction="vertical"),R.ignoreInputTextSelection===void 0&&(R.ignoreInputTextSelection=!0),R.mirrorContainer===void 0&&(R.mirrorContainer=d.body);var ne=s({containers:R.containers,start:Ze,end:_e,cancel:he,remove:ie,destroy:je,canMove:We,dragging:!1});return R.removeOnSpill===!0&&ne.on("over",Ft).on("out",nt),ze(),ne;function le(x){return ne.containers.indexOf(x)!==-1||R.isContainer(x)}function ze(x){var E=x?"remove":"add";p(f,E,"mousedown",qe),p(f,E,"mouseup",M)}function Ve(x){var E=x?"remove":"add";p(f,E,"mousemove",Oe)}function Ne(x){var E=x?"remove":"add";c[E](f,"selectstart",Pe),c[E](f,"click",Pe)}function je(){ze(!0),M({})}function Pe(x){Ie&&x.preventDefault()}function qe(x){de=x.clientX,B=x.clientY;var E=g(x)!==1||x.metaKey||x.ctrlKey;if(!E){var V=x.target,H=Fe(V);H&&(Ie=H,Ve(),x.type==="mousedown"&&(v(V)?V.focus():x.preventDefault()))}}function Oe(x){if(Ie){if(g(x)===0){M({});return}if(!(x.clientX!==void 0&&Math.abs(x.clientX-de)<=(R.slideFactorX||0)&&x.clientY!==void 0&&Math.abs(x.clientY-B)<=(R.slideFactorY||0))){if(R.ignoreInputTextSelection){var E=L("clientX",x)||0,V=L("clientY",x)||0,H=d.elementFromPoint(E,V);if(v(H))return}var K=Ie;Ve(!0),Ne(),_e(),Ge(K),a.add($||z,"gu-transit"),Tt(),St(),ye=0,tt(x)}}}function Fe(x){if(!(ne.dragging&&O)&&!le(x)){for(var E=x;h(x)&&le(h(x))===!1;)if(R.invalid(x,E)||(x=h(x),!x))return;var V=h(x);if(V&&!R.invalid(x,E)){var H=R.moves(x,V,E,F(x));if(H)return{item:x,source:V}}}}function We(x){return!!Fe(x)}function Ze(x){var E=Fe(x);E&&Ge(E)}function Ge(x){Nt(x.item,x.source)&&($=x.item.cloneNode(!0),ne.emit("cloned",$,x.item,"copy")),A=x.source,z=x.item,j=W=F(x.item),ne.dragging=!0,ne.emit("drag",z,A)}function Ke(){return!1}function _e(){if(ne.dragging){var x=$||z;Y(x,h(x))}}function Xe(){Ie=!1,Ve(!0),Ne(!0)}function M(x){if(Xe(),!!ne.dragging){var E=$||z,V=L("clientX",x)||0,H=L("clientY",x)||0,K=b(O,V,H),ee=dt(K,V,H);ee&&($&&R.copySortSource||!$||ee!==A)?Y(E,ee):R.removeOnSpill?ie():he()}}function Y(x,E){var V=h(x);$&&R.copySortSource&&E===A&&V.removeChild(z),et(E)?ne.emit("cancel",x,A):ne.emit("drop",x,E,A,W),ke()}function ie(){if(ne.dragging){var x=$||z,E=h(x);E&&E.removeChild(x),ne.emit($?"cancel":"remove",x,E,A),ke()}}function he(x){if(ne.dragging){var E=arguments.length>0?x:R.revertOnSpill,V=$||z,H=h(V),K=et(H);K===!1&&E&&($?H&&H.removeChild($):A.insertBefore(V,j)),K||E?ne.emit("cancel",V,A,A):ne.emit("drop",V,H,A,W),ke()}}function ke(){var x=$||z;Xe(),It(),kt(),x&&a.rm(x,"gu-transit"),te&&clearTimeout(te),ne.dragging=!1,ue&&ne.emit("out",x,ue,A),ne.emit("dragend",x,ye),A=z=$=j=W=te=ue=null}function et(x,E){var V;return E!==void 0?V=E:O?V=W:V=F($||z),x===A&&V===j}function dt(x,E,V){for(var H=x;H&&!K();)H=h(H);return H;function K(){var ee=le(H);if(ee===!1)return!1;var Ce=ut(H,x),fe=ft(H,Ce,E,V),ve=et(H,fe);return ve?!0:R.accepts(z,H,A,fe)}}function tt(x){if(!O)return;x.preventDefault();var E=L("clientX",x)||0,V=L("clientY",x)||0;O.style.left=E-2+"px",O.style.top=V-2+"px";var H=$||z,K=b(O,E,V),ee=dt(K,E,V),Ce=ee!==null&&ee!==ue;(Ce||ee===null)&&(me(),ue=ee,Te()),Vt(K,V);var fe=h(H);if(ee===A&&$&&!R.copySortSource){fe&&fe.removeChild(H);return}var ve,Se=ut(ee,K);if(ge=Mt(Se,ee),Se!==null)ve=ft(ee,Se,E,V);else if(R.revertOnSpill===!0&&!$)ve=j,ee=A;else{$&&fe&&fe.removeChild(H),$&&X&&(X.style.display="none");return}X.style.display="block",xt(ve,H,Ce),ve?Et(Se,ve):Bt(ee);function ae(se){ne.emit(se,H,ue,A)}function Te(){Ce&&ae("over")}function me(){ue&&ae("out")}}function xt(x,E,V){(x===E||x===F(E))&&(W=F(E)),(x===null&&V||x!==E&&x!==F(E))&&(W=x)}function Ft(x){a.rm(x,"gu-hide")}function nt(x){ne.dragging&&a.add(x,"gu-hide")}function St(){O||(O=document.createElement("div"),O.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",O.innerHTML=R.getMirrorText&&R.getMirrorText(z)||"控件",a.add(O,"gu-mirror"),R.mirrorContainer.appendChild(O),p(f,"add","mousemove",tt),a.add(R.mirrorContainer,"gu-unselectable"),ne.emit("cloned",O,z,"mirror"))}function Tt(){if(X=document.createElement("div"),a.add(X,"gu-insertion"),z){var x=z.getBoundingClientRect();X.style.left=x.left+"px",X.style.top=x.top+"px"}ge=!1,R.mirrorContainer.appendChild(X)}function It(){O&&(a.rm(R.mirrorContainer,"gu-unselectable"),p(f,"remove","mousemove",tt),h(O).removeChild(O),O=null)}function kt(){X&&(h(X).removeChild(X),X=null)}function ut(x,E){for(var V=E;V!==x&&h(V)!==x;)V=h(V);return V===f?null:V}function Mt(x,E){if(!E)return ge;var V=x||E&&E.lastElementChild;if(!V)return!0;var H=getComputedStyle(x),K=/^inline/.test(H.getPropertyValue("display"))||/^(left|right)$/.test(H.getPropertyValue("float"));if(K)return!0;if(E){var ee=getComputedStyle(E),Ce=ee.getPropertyValue("display");if(/flex$/.test(Ce)){var fe=ee.getPropertyValue("flex-direction")||"row";if(fe==="row"||fe==="row-reverse")return!pt(E)}return!1}return!0}function pt(x){if(!x.children||!x.children.length)return!1;for(const E of Array.from(x.children)){const H=(E.className&&E.className.split(" ")||[]).filter(K=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(K));if(!H.length)return!1;for(const K of H){const ee=K.slice(K.lastIndexOf("-")+1);if(parseInt(ee,10)!==12)return!1}}return!0}function Et(x,E){const V=E.getBoundingClientRect();if(X.style.left=V.left+"px",X.style.top=V.top+"px",ge){if(X.style.height=V.height+"px",X.style.width="4px",x){const H=x.getBoundingClientRect();H.top!==V.top&&(X.style.left=H.right+"px",X.style.top=H.top+"px",X.style.height=H.height+"px")}}else if(X.style.height="4px",X.style.width=V.width+"px",oe){const H=oe.getBoundingClientRect();V.top<H.top&&(X.style.display="none")}E===z&&z&&(X.style.display="none")}function Bt(x){W=null;var E=x.lastElementChild;if(E){var V=E.getBoundingClientRect();ge?(X.style.left=V.right+"px",X.style.top=V.top+"px",X.style.height=V.height+"px",X.style.width="4px"):(X.style.left=V.left+"px",X.style.top=V.bottom+"px",X.style.height="4px",X.style.width=V.width+"px"),E===z&&z&&(X.style.display="none")}else X.style.display="none"}function Vt(x,E){if(!R.mirrorContainer.contains(x)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(oe=m(x),!oe||!oe.contains(x)))return;const V=document.querySelector(".dgComponentSelected"),H=oe.getBoundingClientRect();if(E-30<H.top&&oe.scrollTop>0){let K=oe.scrollTop<10?oe.scrollTop:10;oe.scrollBy(0,-1*K),V&&oe.contains(V)&&(ye=ye+-1*K)}if(E+30>H.bottom&&oe.scrollTop<oe.scrollHeight-oe.clientHeight){const K=oe.scrollHeight-oe.clientHeight-oe.scrollTop;let ee=K<10?K:10;oe.scrollBy(0,ee),V&&oe.contains(V)&&(ye=ye+ee)}}function ft(x,E,V,H){var K=R.direction==="horizontal",ee=R.direction==="mixed",Ce=E!==x?ve():fe();return Ce;function fe(){var ae=x.children.length,Te,me,se;for(Te=0;Te<ae;Te++)if(me=x.children[Te],se=me.getBoundingClientRect(),K&&se.left+se.width/2>V||!ee&&!K&&se.top+se.height/2>H||ee&&se.left+se.width>V&&se.top+se.height>H)return me;return null}function ve(){var ae=E.getBoundingClientRect();if(ee){var Te=H-ae.top,me=V-ae.left,se=ae.bottom-H,q=ae.right-V,G=Math.min(me,q,Te,se),pe;return ge?pe=q<me:pe=se===G||q===G||me===G,Se(pe)}return Se(K?V>ae.left+k(ae)/2:H>ae.top+S(ae)/2)}function Se(ae){return ae?F(E):E}}function Nt(x,E){return typeof R.copy=="boolean"?R.copy:R.copy(x,E)}}function m(C){const U=Array.from(window.scrollContainerList);if(U.length===1){const O=Array.from(window.scrollContainerList)[0];return document.getElementById(O)}const _=y(U);for(const O of _)if(O.contains(C))return O;return null}function y(C){const U=[];return C.forEach(_=>{const O=document.getElementById(_);O&&U.push(O)}),U.sort((_,O)=>_.contains(O)?1:O.contains(_)?-1:0),U}function p(C,U,_,O){var A={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},z={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},de={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?c[U](C,z[_],O):l.navigator.msPointerEnabled?c[U](C,de[_],O):(c[U](C,A[_],O),c[U](C,_,O))}function g(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var U=C.button;if(U!==void 0)return U&1?1:U&2?3:U&4?2:0}function b(C,U,_){C=C||{};var O=C.className||"",A;return C.className+=" gu-hide",A=d.elementFromPoint(U,_),C.className=O,A}function w(){return!1}function I(){return!0}function k(C){return C.width||C.right-C.left}function S(C){return C.height||C.bottom-C.top}function h(C){return C.parentNode===d?null:C.parentNode}function v(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||T(C)}function T(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:T(h(C))}function F(C){return C.nextElementSibling||U();function U(){var _=C;do _=_.nextSibling;while(_&&_.nodeType!==1);return _}}function P(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function L(C,U){var _=P(U),O={pageX:"clientX",pageY:"clientY"};return C in O&&!(C in _)&&O[C]in _&&(C=O[C]),_[C]}i.exports=u}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(e,i,r){i.exports=function(s,c){return Array.prototype.slice.call(s,c)}},{}],4:[function(e,i,r){var l=e("ticky");i.exports=function(c,a,d){c&&l(function(){c.apply(d||null,a||[])})}},{ticky:10}],5:[function(e,i,r){var l=e("atoa"),s=e("./debounce");i.exports=function(a,d){var f=d||{},u={};return a===void 0&&(a={}),a.on=function(m,y){return u[m]?u[m].push(y):u[m]=[y],a},a.once=function(m,y){return y._once=!0,a.on(m,y),a},a.off=function(m,y){var p=arguments.length;if(p===1)delete u[m];else if(p===0)u={};else{var g=u[m];if(!g)return a;g.splice(g.indexOf(y),1)}return a},a.emit=function(){var m=l(arguments);return a.emitterSnapshot(m.shift()).apply(this,m)},a.emitterSnapshot=function(m){var y=(u[m]||[]).slice(0);return function(){var p=l(arguments),g=this||a;if(m==="error"&&f.throws!==!1&&!y.length)throw p.length===1?p[0]:p;return y.forEach(function(w){f.async?s(w,p,g):w.apply(g,p),w._once&&a.off(m,w)}),a}},a}},{"./debounce":4,atoa:3}],6:[function(e,i,r){(function(l){var s=e("custom-event"),c=e("./eventmap"),a=l.document,d=m,f=p,u=[];l.addEventListener||(d=y,f=g),i.exports={add:d,remove:f,fabricate:b};function m(h,v,T,F){return h.addEventListener(v,T,F)}function y(h,v,T){return h.attachEvent("on"+v,I(h,v,T))}function p(h,v,T,F){return h.removeEventListener(v,T,F)}function g(h,v,T){var F=k(h,v,T);if(F)return h.detachEvent("on"+v,F)}function b(h,v,T){var F=c.indexOf(v)===-1?L():P();h.dispatchEvent?h.dispatchEvent(F):h.fireEvent("on"+v,F);function P(){var C;return a.createEvent?(C=a.createEvent("Event"),C.initEvent(v,!0,!0)):a.createEventObject&&(C=a.createEventObject()),C}function L(){return new s(v,{detail:T})}}function w(h,v,T){return function(P){var L=P||l.event;L.target=L.target||L.srcElement,L.preventDefault=L.preventDefault||function(){L.returnValue=!1},L.stopPropagation=L.stopPropagation||function(){L.cancelBubble=!0},L.which=L.which||L.keyCode,T.call(h,L)}}function I(h,v,T){var F=k(h,v,T)||w(h,v,T);return u.push({wrapper:F,element:h,type:v,fn:T}),F}function k(h,v,T){var F=S(h,v,T);if(F){var P=u[F].wrapper;return u.splice(F,1),P}}function S(h,v,T){var F,P;for(F=0;F<u.length;F++)if(P=u[F],P.element===h&&P.type===v&&P.fn===T)return F}}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(e,i,r){(function(l){var s=[],c="",a=/^on/;for(c in l)a.test(c)&&s.push(c.slice(2));i.exports=s}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(e,i,r){(function(l){var s=l.CustomEvent;function c(){try{var a=new s("cat",{detail:{foo:"bar"}});return a.type==="cat"&&a.detail.foo==="bar"}catch{}return!1}i.exports=c()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(d,f){var u=document.createEvent("CustomEvent");return f?u.initCustomEvent(d,f.bubbles,f.cancelable,f.detail):u.initCustomEvent(d,!1,!1,void 0),u}:function(d,f){var u=document.createEventObject();return u.type=d,f?(u.bubbles=!!f.bubbles,u.cancelable=!!f.cancelable,u.detail=f.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof Ee<"u"?Ee:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(e,i,r){var l=i.exports={},s,c;function a(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?c=clearTimeout:c=d}catch{c=d}})();function f(S){if(s===setTimeout)return setTimeout(S,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(S,0);try{return s(S,0)}catch{try{return s.call(null,S,0)}catch{return s.call(this,S,0)}}}function u(S){if(c===clearTimeout)return clearTimeout(S);if((c===d||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(S);try{return c(S)}catch{try{return c.call(null,S)}catch{return c.call(this,S)}}}var m=[],y=!1,p,g=-1;function b(){!y||!p||(y=!1,p.length?m=p.concat(m):g=-1,m.length&&w())}function w(){if(!y){var S=f(b);y=!0;for(var h=m.length;h;){for(p=m,m=[];++g<h;)p&&p[g].run();g=-1,h=m.length}p=null,y=!1,u(S)}}l.nextTick=function(S){var h=new Array(arguments.length-1);if(arguments.length>1)for(var v=1;v<arguments.length;v++)h[v-1]=arguments[v];m.push(new I(S,h)),m.length===1&&!y&&f(w)};function I(S,h){this.fun=S,this.array=h}I.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function k(){}l.on=k,l.addListener=k,l.once=k,l.off=k,l.removeListener=k,l.removeAllListeners=k,l.emit=k,l.prependListener=k,l.prependOnceListener=k,l.listeners=function(S){return[]},l.binding=function(S){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(S){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(e,i,r){(function(l){var s=typeof l=="function",c;s?c=function(a){l(a)}:c=function(a){setTimeout(a,0)},i.exports=c}).call(this,e("timers").setImmediate)},{timers:11}],11:[function(e,i,r){(function(l,s){var c=e("process/browser.js").nextTick,a=Function.prototype.apply,d=Array.prototype.slice,f={},u=0;r.setTimeout=function(){return new m(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new m(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(y){y.close()};function m(y,p){this._id=y,this._clearFn=p}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(y,p){clearTimeout(y._idleTimeoutId),y._idleTimeout=p},r.unenroll=function(y){clearTimeout(y._idleTimeoutId),y._idleTimeout=-1},r._unrefActive=r.active=function(y){clearTimeout(y._idleTimeoutId);var p=y._idleTimeout;p>=0&&(y._idleTimeoutId=setTimeout(function(){y._onTimeout&&y._onTimeout()},p))},r.setImmediate=typeof l=="function"?l:function(y){var p=u++,g=arguments.length<2?!1:d.call(arguments,1);return f[p]=!0,c(function(){f[p]&&(g?y.apply(null,g):y.call(null),r.clearImmediate(p))}),p},r.clearImmediate=typeof s=="function"?s:function(y){delete f[y]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Bn);const Vn={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}},Nn={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},ht=n.defineComponent({name:"Toast",props:Nn,emits:["close","click"],setup:(o,t)=>{const e=n.ref(o.animate),i="fadeOut",r=n.computed(()=>o.options),l=n.ref(!1),s=n.computed(()=>{const w={animated:l.value,toast:!0};return w[o.animate]=!1,w[i]=l.value,w[r.value.type]=!0,r.value.theme&&(w[r.value.theme]=!0),w}),c=n.computed(()=>{const k=`f-icon-${r.value&&r.value.type?r.value.type.replace("toasty-type-",""):"default"}`,S={"f-icon":!0};return S[k]=!0,S}),a=n.computed(()=>r.value.title||r.value.message),d=n.computed(()=>r.value.title&&r.value.message),f=n.computed(()=>!r.value.title&&r.value.message),u=n.computed(()=>o.showCloseButton),m=n.computed(()=>!!r.value.buttons||!!t.slots.default);function y(w){w.stopPropagation(),w.preventDefault(),l.value=!1,setTimeout(()=>{t.emit("close",r.value)},200)}function p(w,I){}function g(w){return`f-preten-link ${w.customClass?w.customClass:""}`}n.watch(e,()=>{e.value});const b=()=>{var w;return n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"after-toast-msg text-right"},[!t.slots.default&&((w=r.value.buttons)==null?void 0:w.map(I=>n.createVNode("span",{class:g(I),onClick:k=>void 0},[I.text]))),t.slots.default&&t.slots.default()])])};return()=>n.createVNode("div",{class:s.value,style:"min-height:44px"},[u.value&&n.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:y},[n.createVNode("span",{class:"f-icon modal_close"},null)]),a.value&&n.createVNode("section",{class:"modal-tips"},[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:c.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[d.value&&n.createVNode(n.Fragment,null,[n.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:r.value.title},null),n.createVNode("p",{class:"toast-msg",innerHTML:r.value.message},null),m.value&&b()]),f.value&&(r.value.buttons?n.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null),n.createVNode("div",{class:"after-toast-title text-right ml-auto"},[b()])]):n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null))])])])}}),st=n.defineComponent({name:"Notify",props:Vn,emits:["close","empty"],setup(o,t){const e=n.computed(()=>({"farris-notify":!0})),i={left:12,right:12,top:20,bottom:12},r=n.ref(),l=n.ref(o.options),s=n.ref(o.showCloseButton),c=n.computed(()=>o.position||"bottom-right"),a=n.computed(()=>o.timeout!=null?o.timeout:3e3),d=n.computed(()=>{const m=o.bottom?o.bottom:i.bottom,y=o.top?o.top:i.top,p={transition:"all 0.2s ease",left:c.value.indexOf("left")>-1?`${o.left?o.left:i.left}px`:"",right:c.value.indexOf("right")>-1?`${o.right?o.right:i.right}px`:"",top:c.value.indexOf("top")>-1?`${y}px`:"",bottom:c.value.indexOf("bottom")>-1?`${m}px`:""};return c.value.indexOf("center")>-1&&(p.left="50%",p.marginLeft="calc(-24rem / 2)",c.value==="center-center"&&(p.top="50%",p.transform="translate(-50%, -50%)")),p});function f(m){t.emit("close")}a.value&&setTimeout(()=>{f()},a.value),t.expose({closeToast:f,container:r,notifyPosition:c});function u(m,y){f()}return()=>n.createVNode("div",{class:e.value,style:d.value,ref:r},[n.createVNode(ht,{options:l.value,showCloseButton:s.value,animate:o.animate,onClose:m=>u(m,l.value)},null)])}});class jn{constructor(){D(this,"notifyRefs",[]);D(this,"globalConfig",n.reactive({}))}escapeAllHtml(t){if(typeof t!="string"||!t)return"";const e=document.createElement("div");return e.textContent=t||"",e.innerHTML.replace(/ /g," ").replace(/\\n/g,"<br>").replace(/\\t/g," ").replace(/\\r/g,"")}createNotifyInstance(t){const e=this,r=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...t}),l=document.createElement("div");l.style.display="contents";const s=n.createApp({setup(){var d;const c=n.ref();function a(){c.value.container.style.transform="scale(0)",setTimeout(()=>{e.updateNotifyPositionForClose(r,c),s.unmount()},220)}if(r.position.indexOf("top")>-1){const f=e.getNotifyInstances(r.position),u=f[f.length-1];if(u){const m=u.value.container.getBoundingClientRect();r.top=m.bottom}}return r.safeHtml&&((d=r.options)!=null&&d.message)&&(r.options.message=e.escapeAllHtml(r.options.message)),n.onUnmounted(()=>{document.body.removeChild(l)}),n.onMounted(()=>{e.updateNotifyPositionForCreate(r,c)}),()=>n.createVNode(n.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[n.createVNode(st,n.mergeProps({ref:c},r,{onClose:a}),null)]})}});return s.provide("NotifyService",this),document.body.appendChild(l),s.mount(l),s}getNotifyInstances(t){return this.notifyRefs.filter(e=>e.value.notifyPosition===t)}updateNotifyPositionForCreate(t,e){if(this.notifyRefs&&this.notifyRefs.length){const i=window.innerHeight;t.position.indexOf("bottom")>-1&&this.getNotifyInstances(t.position).forEach(r=>{const l=r.value.container.getBoundingClientRect();r.value.container.style.bottom=l.height+i-l.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,e]}updateNotifyPositionForClose(t,e){const i=this.notifyRefs.indexOf(e);if(t.position.indexOf("top")>-1){const r=this.getNotifyInstances(t.position),l=r.indexOf(e);r.slice(l+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}i>-1&&this.notifyRefs.splice(i,1)}show(t){return this.createNotifyInstance(t)}buildNotifyProps(t,e){let i="",r="",l,s,c;typeof e=="string"?i=e:e&&(i=e.message||"",r=e.title||"",s=e.position||null,c=e.showCloseButton!=null?e.showCloseButton:null,l=e.timeout!=null?e.timeout:null);const d={options:{type:t,message:i,title:r}};return s!=null&&(d.position=s),c!=null&&(d.showCloseButton=c),l!=null&&(d.timeout=l),d}info(t){const e=this.buildNotifyProps("info",t);return this.show(e)}success(t){const e=this.buildNotifyProps("success",t);return this.show(e)}warning(t){const e=this.buildNotifyProps("warning",t);return this.show(e)}error(t){const e=this.buildNotifyProps("error",t);return this.show(e)}close(t){t&&t.unmount()}closeAll(){this.notifyRefs.forEach(t=>{t==null||t.value.closeToast()}),this.notifyRefs.length=0}}const Pn=Symbol("NOTIFY_SERVICE_TOKEN");st.install=o=>{o.component(st.name,st),o.component(ht.name,ht);const t=new jn;o.provide(Pn,t),o.provide("FNotifyService",t)};const At=new Map([["appearance",xe.resolveAppearance],["column","columnOption"]]);function On(o,t,e){var u;const i=e.parentComponentInstance,r=i.schema.type,l=String(((u=i.schema.appearance)==null?void 0:u.class)||"").split(" "),s=r==="section"||r==="tab-page",c=l.includes("f-page-content-nav"),a=l.includes("f-page-main"),d=o.getSchemaByType("component");d.id=`${t.id}-component`,d.componentType="data-grid";let f="";return f+=s?"f-struct-data-grid-in-card f-struct-is-subgrid":"",f+=c?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",f+=a?"f-struct-data-grid f-struct-wrapper":"",d.appearance={class:f},d.contents=[t],d}function $n(o,t,e){const i=e.parentComponentInstance,r=String(i.schema.appearance.class||"").split(" "),l=r.includes("f-page-content-nav"),s=r.includes("f-page-main"),c=o.getSchemaByType("section");c.id=`${t.id}-section`;let a="";return a+=l?"f-section-in-nav ":"",a+=s?"f-section-in-managelist ":"",a+="f-section-grid",c.appearance={class:a},c.contents=[t],c}function Rn(o,t,e){const i=o.getSchemaByType("content-container");return i.id=`${t.id}-layout`,i.appearance={class:"f-grid-is-sub f-utils-flex-column"},i.contents=[t],i}function Ht(o,t,e){const r=e.parentComponentInstance.schema.type,l=r==="section"||r==="tab-page";t.appearance={class:"f-component-grid"};const c=(l?Rn:$n)(o,t,e);return On(o,c,e)}const Ut={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-grid.schema.json",title:"tree-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"tree-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fit:{type:"boolean",default:!1},showStripe:{type:"boolean",default:!0},showBorder:{type:"boolean",default:!1},showTreeNodeIcons:{type:"boolean",default:!1},showSetting:{type:"boolean",default:!1},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disabled:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enableSelectRow:{description:"允许选中行",type:"boolean",default:!0},enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}},onSelectionChange:{description:"行切换事件",type:"string",default:""}},required:["id","type","columns"],events:{onSelectionChange:"行切换事件",onClickRow:"行点击事件"}},vt={autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1}};xe.createPropsResolver(vt,Ut,At,Ht),xe.createTreeGridSelectionItemResolver(),xe.createTreeGridBindingResolver();const qn=Object.assign({},vt,{componentId:{type:String,default:""}});xe.createPropsResolver(qn,Ut,At,Ht),xe.createDataViewUpdateColumnsResolver();function Ln(o,t,e,i,r,l,s,c,a,d,f,u,m,y,p,g,b){const{calculateCellPositionInRow:w}=l,{columnContext:I,hasLeftFixedColumn:k,hasRightFixedColumn:S}=s,{gridDataStyle:h,leftFixedGridDataStyle:v,rightFixedGridDataStyle:T}=y,{renderDataRow:F}=J.getHierarchyRow(o,t,I,b,c,a,d,f,u,m,y,p,g),P=[F];function L(A,z){const de=w(A);return b.value.filter(B=>B.visible!==!1).map((B,j)=>P[B.type](B,de,z,j))}function C(){return n.createVNode("div",{ref:i,class:"fv-grid-content-left-fixed"},[n.createVNode("div",{class:"fv-grid-data",style:v.value},[L(I.value.leftColumns.filter(A=>A.visible),"left")])])}function U(){return n.createVNode("div",{ref:e,class:"fv-grid-content-primary"},[n.createVNode("div",{class:"fv-grid-data",style:h.value},[L(I.value.primaryColumns.filter(A=>A.visible),"primary")])])}function _(){return n.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[n.createVNode("div",{class:"fv-grid-data",style:T.value},[L(I.value.rightColumns.filter(A=>A.visible),"right")])])}function O(){const A=[];return k.value&&A.push(C()),A.push(U()),S.value&&A.push(_()),A}return{renderDataArea:O}}const An=n.defineComponent({name:"FTreeGrid",props:vt,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode"],setup(o,t){var me,se;const i=((me=o.rowOption)==null?void 0:me.height)||28,r=n.ref(20),l=n.ref(o.columns),s=J.useIdentify(o),{idField:c}=s,a=n.ref(),d=n.ref(),f=n.ref(),u=n.ref(),m=n.ref(),y=n.ref([]),p=n.ref(!1),g=n.ref(((se=o.rowOption)==null?void 0:se.wrapContent)||!1),b=J.useGroupData(o,s),w=J.useFilter(),I=J.useHierarchy(o),{collapseField:k}=I,{showLoading:S,renderLoading:h}=J.useLoading(o,a),v=J.useDataView(o,new Map,w,I,s),{dataView:T}=v,F=J.useSelection(o,v,s,y,t),P=J.useSelectHierarchyItem(o,y,v,s,F,t),L=n.computed(()=>o.disabled),C=n.computed(()=>o.virtualized?Math.min(v.dataView.value.length,r.value):v.dataView.value.length),{containerStyleObject:U}=J.useDataViewContainerStyle(o),_=J.useCommandColumn(o),{applyCommands:O}=_;O(l);const A=J.useColumn(o),z=J.useSort(o),{applyColumnSorter:de,columnContext:B,updateColumnRenderContext:j}=A;de(v,z);const W=J.useGroupColumn(o,B),$=J.useRow(o,t,F,s),te=J.useEdit(o,t,s,$,y),ue=J.useVisualDataBound(o),Ie=J.useVisualDataCell(o,te,ue),X=J.useVisualDataRow(o,v,te,I,s,ue,Ie),ge=J.useVisualData(o,l,v,C,0,X),{getVisualData:ye}=ge,oe=J.useCellPosition(o,B),R=J.useSidebar(o,F),{sidebarWidth:ne}=R,le=J.useVirtualScroll(o,v,y,B,ge,C,0,ne),{onWheel:ze,dataGridWidth:Ve,viewPortHeight:Ne,viewPortWidth:je,resetScroll:Pe,updateVisibleRowsOnLatestVisibleScope:qe}=le,Oe=J.useFitColumn(o,B,d,je,W),{calculateColumnsSize:Fe}=Oe,We=J.useFilterHistory(),Ze=J.useColumnFilter(d,m,v,We,le),Ge=J.useDragColumn(o,t,A,v,W,b,le),Ke=n.computed(()=>({"fv-grid":!0,"fv-grid-bordered":o.showBorder,"fv-grid-horizontal-bordered":o.showHorizontalLines,"fv-datagrid-strip":o.showStripe})),_e=n.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":p.value,"fv-grid-wrap-content":g.value})),{renderDataArea:Xe}=Ln(o,t,f,u,m,oe,A,v,te,I,$,F,P,le,ge,ue,y),{renderGridHeader:M,renderGridColumnResizeOverlay:Y,shouldShowHeader:ie}=J.getColumnHeader(o,t,d,u,m,A,v,Ge,Ze,w,We,Oe,W,F,R,z,le,je,y),{renderDataGridSidebar:he}=J.getSidebar(o,$,F,R,le),{renderDisableMask:ke}=J.getDisableMask(),{renderHorizontalScrollbar:et}=J.getHorizontalScrollbar(o,d,le),{renderVerticalScrollbar:dt}=J.getVerticalScrollbar(o,d,le);function tt(){var q,G,pe;if(d.value&&d.value.clientHeight>0&&((q=d.value)==null?void 0:q.clientWidth)>0){const be=Math.ceil(d.value.clientHeight/i);be>r.value&&(r.value=be,qe()),Ne.value=((G=f.value)==null?void 0:G.clientHeight)||0,Ve.value=((pe=d.value)==null?void 0:pe.clientWidth)||0,Fe()}}n.onMounted(()=>{d.value&&(r.value=Math.max(Math.ceil(d.value.clientHeight/i),r.value),y.value=ye(0,C.value+0-1),en.useResizeObserver(d.value,tt),Fe(),n.nextTick(()=>{d.value&&(Ve.value=d.value.clientWidth),f.value&&(je.value=f.value.clientWidth,Ne.value=f.value.clientHeight)})),S.value&&h()}),n.onUnmounted(()=>{}),n.watch(je,()=>{d.value&&Fe()});function xt(q){v.collapseTo(q),v.reOrderVisibleIndex(),Pe()}function Ft(q){v.expandTo(q),v.reOrderVisibleIndex(),Pe()}function nt(){const q=F.getSelectionRow();return q?q.dataIndex-1:-1}function St(){const q=nt();v.insertNewDataItem(q),y.value=ye(0,C.value+0-1)}function Tt(){const q=nt();v.insertNewChildDataItem(q),y.value=ye(0,C.value+0-1)}function It(){const q=nt(),G=P.getNextSelectableHierarchyItemId(q);v.removeHierarchyDataItem(q),y.value=ye(0,C.value+0-1),G&&F.selectItemById(G)}function kt(q){te.onEditingRow(q)}function ut(q){te.acceptEditingRow(q)}function Mt(q){te.cancelEditingRow(q)}function pt(q){q&&(l.value=q,O(l),j(l.value),de(v,z),Fe())}n.watch(()=>o.columns,q=>{pt(q)});function Et(q,G){q&&(v.load(q),v.reOrderVisibleIndex(),G!=null&&G.keepScrollPosition?le.scrollTo(le.offsetY.value):Pe())}function Bt(q){F.selectItemById(q)}function Vt(q){const G=y.value.find(pe=>pe.raw[s.idField.value]===q);G&&$.clickRowItem(G)}function ft(q){$.activeRowById(q)}function Nt(q){F.selectItemByIds(q)}function x(){return F.getSelectedItems()}function E(){F.clearSelection()}const V=n.computed(()=>!y.value||!y.value.length),{renderEmpty:H}=J.getEmpty(t);function K(){return F.getSelectionRow()}function ee(q){F.unSelectItemByIds(q)}function Ce(){return F.currentSelectedDataId.value}function fe(q,G,pe){const be=T.value.find(we=>we[c.value]===q);if(be){if(Object.keys(be).forEach(ce=>{Object.prototype.hasOwnProperty.call(G,ce)&&(be[ce]=G[ce])}),pe){const{collapseField:ce,disabledField:Le,checkedField:Ae,visibleField:He}=pe;ce&&!Z.isUndefined(G[ce])&&(be.__fv_collapse__=G[ce]),Ae&&!Z.isUndefined(G[Ae])&&(be.__fv_checked__=G[Ae]),Le&&!Z.isUndefined(G[Le])&&(be.__fv_disabled__=G[Le]),He&&!Z.isUndefined(G[He])&&(be.__fv_visible__=G[He])}const we=y.value.find(ce=>ce.raw[c.value]===q),Qt=y.value.findIndex(ce=>ce.raw[c.value]===q);if(we){if(we.raw=be,Object.keys(we.data).forEach(ce=>{we.data[ce].updateData(be)}),pe){const{collapseField:ce,disabledField:Le,checkedField:Ae,visibleField:He}=pe;ce&&!Z.isUndefined(G[ce])&&(we.collapse=G[ce]),Ae&&!Z.isUndefined(G[Ae])&&(we.checked=G[Ae]),Le&&!Z.isUndefined(G[Le])&&(we.disabled=G[Le]),He&&!Z.isUndefined(G[He])&&(we.visible=G[He])}y.value=[...y.value.slice(0,Qt),we,...y.value.slice(Qt+1)]}}}function ve(q){const G=v.dataView.value.find(pe=>pe[c.value]===q);return G?G[k.value]:""}function Se(){return k.value}t.expose({activeRowById:ft,addNewDataItem:St,addNewChildDataItem:Tt,collapseTo:xt,expandTo:Ft,removeDataItem:It,editDataItem:kt,acceptDataItem:ut,cancelDataItem:Mt,updateColumns:pt,updateDataSource:Et,selectItemById:Bt,selectItemByIds:Nt,getSelectedItems:x,clearSelection:E,getSelectionRow:K,clickRowItemById:Vt,unSelectItemByIds:ee,getCurrentRowId:Ce,reassignRowData:fe,getCollapseField:Se,getCollapseStatusById:ve});const ae=n.computed(()=>{const q={};return le.shouldShowHorizontalScrollbar.value&&(q.paddingBottom="10px"),le.shouldShowVirticalScrollbar.value&&(q.paddingRight="10px"),q}),Te=n.computed(()=>({...U.value,borderRadius:"5px"}));return()=>n.createVNode("div",{ref:a,class:Ke.value,style:Te.value,onWheel:ze},[d.value&&ie.value&&M(),n.createVNode("div",{ref:d,class:_e.value,onMouseover:()=>p.value=!0,onMouseleave:()=>p.value=!1,style:ae.value},[d.value&&he(y),d.value&&Xe(),d.value&&V.value&&H(),d.value&&et(),d.value&&dt()]),Y(),L.value&&ke()])}});Ue.withInstall(An);const Hn=new Map([["appearance",Qe]]);function Un(o,t,e){return t}Ye({direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Hn,Un,{title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}});const bt=new Map([["appearance",Qe]]),Dn=new Map([]),zn="root-viewmodel";class Wn{constructor(t,e){D(this,"formSchemaUtils");D(this,"controlCreatorUtils");D(this,"designViewModelUtils");this.resolver=t,this.designerHostService=e,this.formSchemaUtils=this.designerHostService.formSchemaUtils,this.controlCreatorUtils=this.designerHostService.controlCreatorUtils,this.designViewModelUtils=this.designerHostService.designViewModelUtils}createComponent(t){const e=this.createComponentRefNode(t),i=this.createComponentNode(t),r=this.createViewModeNode(t),l=this.formSchemaUtils.getFormSchema();return l.module.viewmodels.push(r),l.module.components.push(i),this.designViewModelUtils.assembleDesignViewModel(),e}createComponentRefNode(t){const e=this.resolver.getSchemaByType("component-ref");return Object.assign(e,{id:`${t.componentId}-component-ref`,component:`${t.componentId}-component`}),e}createComponentNode(t){const e=this.resolver.getSchemaByType("component"),i=this.createFormComponentContents(t);return Object.assign(e,{id:`${t.componentId}-component`,viewModel:`${t.componentId}-component-viewmodel`,componentType:t.componentType,appearance:{class:this.getFormComponentClass()},formColumns:t.formColumns,contents:i}),e}getFormComponentClass(){const{templateId:t}=this.formSchemaUtils.getFormSchema().module;return t==="double-list-in-tab-template"?"f-struct-wrapper f-utils-fill-flex-column":"f-struct-wrapper"}createFormComponentContents(t){const e=this.resolver.getSchemaByType("section");Object.assign(e,{id:t.componentId+"-form-section",appearance:{class:"f-section-form f-section-in-mainsubcard"},mainTitle:t.componentName});const i=this.resolver.getSchemaByType("response-form"),r=[];Object.assign(i,{id:t.componentId+"-form",appearance:{class:"f-form-layout farris-form farris-form-controls-inline"},contents:r}),e.contents=[i];const{selectedFields:l}=t;l==null||l.forEach(c=>{const a=Z.cloneDeep(c),d=this.resolveControlClassByFormColumns(t),f=this.controlCreatorUtils.setFormFieldProperty(a,"",d);f&&r.push(f)});const{templateId:s}=this.formSchemaUtils.getFormSchema().module;return s==="double-list-in-tab-template"&&(e.appearance.class="f-section-grid f-section-in-main px-0 pt-0",e.fill=!0),[e]}resolveControlClassByFormColumns(t){let e="";switch(t.formColumns){case 1:{e="col-12";break}case 2:{e="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{e="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{e="col-12 col-md-6 col-xl-3 col-el-2";break}}return e}createViewModeNode(t){return{id:`${t.componentId}-component-viewmodel`,code:`${t.componentId}-component-viewmodel`,name:t.componentName,bindTo:t.bindTo,parent:zn,fields:this.assembleViewModelFields(t),commands:[],states:[],enableValidation:!0}}assembleViewModelFields(t){const e=[],{selectedFields:i}=t;return i==null||i.forEach(r=>{let l="blur";const s=r.type.name;(s===Ue.FormSchemaEntityFieldTypeName.Enum||s===Ue.FormSchemaEntityFieldTypeName.Boolean)&&(l="change"),e.push({type:"Form",id:r.id,fieldName:r.bindingField,groupId:null,groupName:null,updateOn:l,fieldSchema:{}})}),e}}function Gn(o,t,e,i){var l,s,c,a,d,f;const r=e.parentComponentInstance;if(r&&i){const u=(l=r.schema)==null?void 0:l.type,y={componentId:`form-${Math.random().toString(36).slice(2,6)}`,componentName:((s=e.bindingSourceContext)==null?void 0:s.entityTitle)||((a=(c=e.bindingSourceContext)==null?void 0:c.bindingEntity)==null?void 0:a.name)||"标题",componentType:"form",formColumns:u==="splitter-pane"?1:4,parentContainerId:r.schema.id,bindTo:((d=e.bindingSourceContext)==null?void 0:d.bindTo)||"/",selectedFields:(f=e.bindingSourceContext)==null?void 0:f.bindingEntityFields};return new Wn(o,i).createComponent(y)}else return t}function _n(o,t,e){return t}Ye({customClass:{type:String,default:""},customStyle:{type:String,defaut:""},visible:{type:Boolean,default:!0}},{$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-form.schema.json",title:"response-form",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"response-form"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},visible:{description:"",type:"boolean",default:!0},labelAutoOverflow:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]},bt,Gn);const Dt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/form-group.schema.json",title:"form-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a form group",type:"string"},type:{description:"The type string of form group component",type:"string",default:"form-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},enableLinkLabel:{description:"",type:"boolean",default:!1},editor:{description:"",type:"obejct",default:null},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},binding:{description:"",type:"object",default:{}},visible:{description:"",type:"boolean",default:!0},required:{description:"",type:"boolean",default:!1},errors:{description:"",type:"object",default:null}},required:["id","type","editor"]},Xn={id:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},editor:{type:Object,default:{}},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number]},visible:{type:Boolean,default:!0},required:{type:Boolean,default:!1},showLabel:{type:Boolean,default:!0},type:{type:String,default:"input-group"},componentId:{type:String,default:""},errors:{type:Object,default:null}};xe.createPropsResolver(Xn,Dt,bt,void 0),xe.createFormGroupEditorResolver();const Yn={id:{type:String,default:""},editor:{type:Object,default:{}},modelValue:{type:[String,Boolean,Array,Number]},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}};xe.createPropsResolver(Yn,Dt,bt,void 0);const Qn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/grid-field-editor.schema.json",title:"response-form-layout-setting",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"response-form-layout-setting"},initialState:{description:"",type:"object"}},required:["id","type"]},Jn={initialState:{type:Object,default:{uniqueColClassInSM:12,uniqueColClassInMD:6,uniqueColClassInLG:3,uniqueColClassInEL:2}}};xe.createPropsResolver(Jn,Qn,Dn,_n);const Zn={width:{Type:Number,default:400},type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"},buttons:{type:Object,default:[]}};function Ct(){return new DOMException("The request is not allowed","NotAllowedError")}async function Kn(o){if(!navigator.clipboard)throw Ct();return navigator.clipboard.writeText(o)}async function eo(o){const t=document.createElement("span");t.textContent=o,t.style.whiteSpace="pre",t.style.webkitUserSelect="auto",t.style.userSelect="all",document.body.appendChild(t);const e=window.getSelection(),i=window.document.createRange();e==null||e.removeAllRanges(),i.selectNode(t),e==null||e.addRange(i);let r=!1;try{r=window.document.execCommand("copy")}finally{e==null||e.removeAllRanges(),window.document.body.removeChild(t)}if(!r)throw Ct()}async function to(o){try{await Kn(o)}catch(t){try{await eo(o)}catch(e){throw e||t||Ct()}}}function no(){async function o(t){await to(t)}return{onCopy:o}}function oo(o,t,e,i){const r=n.ref(14),l=n.ref(140),s=n.ref(""),c=n.ref(i.value.length),a=n.computed(()=>i.value),d=n.computed(()=>({"font-size":`${r.value}px`,height:"100%"}));function f(u){if(u.currentTarget){const m=u.currentTarget.value||"";c.value=m.length}}return()=>n.createVNode(n.Fragment,null,[n.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:d.value,rows:"4",maxlength:l.value,onInput:u=>f(u)},[a.value]),n.createVNode("span",{class:"textarea-wordcount",title:s.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[c.value+" / "+l.value])])}function io(o,t,e,i){const r=oo(o,t,e,i),l=new Map([["text-area",r]]);function s(c){return l.get(c)||null}return{getEditorRender:s}}function ro(){const o=n.ref(!1),t=n.ref("复制成功");return{feedbackStyle:n.computed(()=>{const i={position:"absolute",left:"50%",top:"50%",width:"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease"};return i.opacity=o.value?"0.8":"0",i.display=o.value?"":"none",i}),feedbackMessage:t,toShowFeedback:o}}function lo(o,t){const e=t.getEditorRender(o.promptEditorType);return()=>e&&e()}function ao(o){function t(m){if(m==null)return 0;let y=0;for(let p=0;p<m.length;p++){const g=m.charCodeAt(p);g>=0&&g<=128?y++:y=y+2}return y}function e(m,y){if(m!==""&&m!==void 0&&m!==null){m=""+m;const p=m.length;let g="",b=0;for(let w=0;w<p;w++){const I=m.charAt(w);if(b++,encodeURI(I).length>4&&b++,g=g.concat(I),b>=y)return g=g.concat("..."),g}if(b<y)return m}return""}const i=n.computed(()=>!!o.value&&!!o.value.date),r=n.computed(()=>`发生时间 : ${o.value&&o.value.date||""}`),l=n.computed(()=>!!o.value&&!!o.value.detail),s=n.computed(()=>o.value?t(o.value.detail)>160:!1),c=n.ref(!1),a=n.computed(()=>c.value?"收起":"展开"),d=n.computed(()=>{const m="详细信息 : "+(o.value&&o.value.detail)||"";return c.value?m:e(m,160)}),f=n.computed(()=>({position:"absolute",right:0,bottom:c.value?0:"2px",color:"#2A87FF",cursor:"pointer"}));function u(){c.value=!c.value}return()=>n.createVNode("div",{class:"toast-msg-detail"},[i.value&&n.createVNode("div",null,[r.value]),l.value&&n.createVNode("div",{class:"exception_wrap"},[n.createVNode("div",{class:"exception_error_msg"},[n.createVNode("div",{innerHTML:d.value},null),s.value&&n.createVNode("span",{style:f.value,onClick:u},[a.value])])])])}function so(o){return()=>n.createVNode("p",{class:"toast-msg-detail",innerHTML:o.value},null)}function co(o,t,e,i){const r=n.ref(o.exceptionInfo),l=n.computed(()=>{const m={"f-icon":!0},y=`f-icon-${t.value}`;return m[y]=!0,m}),s=n.computed(()=>e.value||r.value&&r.value.message),c=n.computed(()=>i.value),a=n.computed(()=>!!i.value),d=n.computed(()=>!!r.value);function f(){return d.value?ao(r):a.value?so(c):()=>null}const u=f();return()=>n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:l.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[n.createVNode("p",{class:"toast-msg-title",innerHTML:s.value},null),u()])])}function uo(o,t,e){const{onCopy:i}=t,{toShowFeedback:r}=e,l=n.ref("复制成功"),s=n.ref("复制详细信息"),c=n.ref(o.exceptionInfo||{date:"",message:"",detail:""}),a=n.computed(()=>c.value&&c.value.detail||"");function d(f){i(a.value).catch(u=>{l.value="复制失败"}).finally(()=>{r.value=!0,setTimeout(()=>{r.value=!1},700)})}return()=>n.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[n.createVNode("span",{onClick:d,style:"cursor: pointer;"},[s.value])])}function po(o,t,e,i){const r=n.ref(o.type),l=n.ref(o.buttons),s=n.ref(o.exceptionInfo),c=n.ref(o.okButtonText),a=n.ref(o.cancelButtonText),d=n.ref(!0),f=n.ref(!0),u=n.computed(()=>!!(l.value&&l.value.length)),m=n.computed(()=>s.value&&s.value.date&&s.value.message&&s.value.detail),y=n.computed(()=>!(l.value&&l.value.length)&&(c.value||a.value)),p=n.computed(()=>f.value&&c.value),g=n.computed(()=>d.value&&a.value),b=uo(o,e,i);function w(k){r.value==="question"&&t.emit("reject"),t.emit("close")}function I(k){r.value==="question"&&t.emit("accept"),t.emit("close")}return()=>n.createVNode("div",{class:"modal-footer"},[m.value&&b(),y.value&&g.value&&n.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:w},[a.value]),y.value&&p.value&&n.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:I},[c.value]),u.value&&l.value.length&&l.value.map(k=>n.createVNode("button",{type:"button",onClick:k.handle,class:k.class},[k.iconClass&&n.createVNode("span",{class:k.iconClass},null),k.text]))])}const ct=n.defineComponent({name:"FMessageBox",props:Zn,emits:["accept","reject","close"],setup(o,t){const e=n.ref(o.type),i=n.ref(o.title),r=n.ref(o.detail),l=n.computed(()=>{const b={"modal-tips":!0,"d-flex":!0,"flex-row":!0},w=`messager-type-${e.value}`;return b[w]=!0,b}),s=n.computed(()=>{const b={};return e.value==="prompt"?b.padding="0.5rem 0.5rem 1rem 1.5rem":e.value==="error"&&(b.padding="0.5rem 1.5rem 1rem 1.5rem"),b}),c=no(),a=io(o,e,i,r),d=ro(),{feedbackStyle:f,feedbackMessage:u}=d;function m(){return n.createVNode("div",{style:f.value},[u.value])}function y(){switch(e.value){case"prompt":return lo(o,a);default:return co(o,e,i,r)}}const p=y(),g=po(o,t,c,d);return()=>n.createVNode("div",{class:"farris-messager"},[n.createVNode("section",{class:l.value,style:s.value},[p()]),g(),m()])}}),fo={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"}};class re{constructor(t,e){this.x=t,this.y=e}static getTransformInfo(t){const i=window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(i.length>=6){const r=parseInt(i[4],10),l=parseInt(i[5],10);return{x:r,y:l}}return{x:0,y:0}}static fromEvent(t,e=null){if(this.isMouseEvent(t))return new re(t.clientX,t.clientY);if(e===null||t.changedTouches.length===1)return new re(t.changedTouches[0].clientX,t.changedTouches[0].clientY);for(let i=0;i<t.changedTouches.length;i++)if(t.changedTouches[i].target===e)return new re(t.changedTouches[i].clientX,t.changedTouches[i].clientY)}static isMouseEvent(t){return Object.prototype.toString.apply(t).indexOf("MouseEvent")===8}static isIPosition(t){return!!t&&"x"in t&&"y"in t}static getCurrent(t){const e=new re(0,0);if(window){const i=window.getComputedStyle(t);if(i){const r=parseInt(i.getPropertyValue("left"),10),l=parseInt(i.getPropertyValue("top"),10);e.x=isNaN(r)?0:r,e.y=isNaN(l)?0:l}return e}return null}static copy(t){return new re(0,0).set(t)}get value(){return{x:this.x,y:this.y}}add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.x-=t.x,this.y-=t.y,this}multiply(t){this.x*=t,this.y*=t}divide(t){this.x/=t,this.y/=t}reset(){return this.x=0,this.y=0,this}set(t){return this.x=t.x,this.y=t.y,this}}class $e{constructor(t,e){this.width=t,this.height=e}static getCurrent(t){const e=new $e(0,0);if(window){const i=window.getComputedStyle(t);return i&&(e.width=parseInt(i.getPropertyValue("width"),10),e.height=parseInt(i.getPropertyValue("height"),10)),e}return null}static copy(t){return new $e(0,0).set(t)}set(t){return this.width=t.width,this.height=t.height,this}}function mo(o,t){const e=n.ref(),i=n.ref(),r=n.ref(),l=n.ref(),s=n.ref(),c=n.ref(),a=n.ref(),d=n.ref(),f=n.ref(),u=n.ref(),m=n.ref(),y=n.ref(o.resizeable),p=n.ref(),g=n.ref(o.draggable),b=n.ref(!1);function w(){const B=i.value||document.body,j=window.getComputedStyle(B);if(!j||!e.value)return;const W=re.getTransformInfo(e.value),$={};a.value&&($.deltaL=e.value.offsetLeft-a.value.x,$.deltaT=e.value.offsetTop-a.value.y);const te=j.getPropertyValue("position");$.width=B.clientWidth,$.height=B.clientHeight,$.pr=parseInt(j.getPropertyValue("padding-right"),10),$.pb=parseInt(j.getPropertyValue("padding-bottom"),10),$.position=j.getPropertyValue("position"),te==="static"&&(B.style.position="relative"),$.translateX=W.x,$.translateY=W.y,u.value=$}function I(B){if(e.value){l.value=$e.getCurrent(e.value),s.value=re.getCurrent(e.value),c.value=l.value?$e.copy(l.value):null,a.value=s.value?re.copy(s.value):null,w();const j=B.target.getAttribute("type")||"";d.value={n:!!j.match(/n/),s:!!j.match(/s/),w:!!j.match(/w/),e:!!j.match(/e/)}}}function k(){var B,j,W,$;if(e.value){const te=e.value;d.value&&((d.value.n||d.value.s)&&((B=c.value)!=null&&B.height)&&(te.style.height=c.value.height+"px"),(d.value.w||d.value.e)&&((j=c.value)!=null&&j.width)&&(te.style.width=c.value.width+"px"),a.value&&((W=a.value)!=null&&W.x&&(te.style.left=a.value.x+"px"),($=a.value)!=null&&$.y&&(te.style.top=a.value.y+"px")))}}function S(){const B=o.minHeight?o.minHeight:1,j=o.minWidth?o.minWidth:1;c.value&&a.value&&d.value&&l.value&&(c.value.height<B&&(c.value.height=B,d.value.n&&s.value&&(a.value.y=s.value.y+(l.value.height-B))),c.value.width<j&&(c.value.width=j,d.value.w&&s.value&&(a.value.x=s.value.x+(l.value.width-j))),o.maxHeight&&c.value.height>o.maxHeight&&(c.value.height=o.maxHeight,s.value&&d.value.n&&(a.value.y=s.value.y+(l.value.height-o.maxHeight))),o.maxWidth&&c.value.width>o.maxWidth&&(c.value.width=o.maxWidth,d.value.w&&s.value&&(a.value.x=s.value.x+(l.value.width-o.maxWidth))))}function h(){if(i.value){const B=u.value;if(a.value&&c.value&&d.value&&l.value){const j=B.width-B.pr-B.deltaL-B.translateX-a.value.x,W=B.height-B.pb-B.deltaT-B.translateY-a.value.y;d.value.n&&a.value.y+B.translateY<0&&s.value&&(a.value.y=-B.translateY,c.value.height=l.value.height+s.value.y+B.translateY),d.value.w&&a.value.x+B.translateX<0&&s.value&&(a.value.x=-B.translateX,c.value.width=l.value.width+s.value.x+B.translateX),c.value.width>j&&(c.value.width=j),c.value.height>W&&(c.value.height=W)}}}function v(B){if(!r.value||!l.value||!s.value||!d.value)return;B.subtract(r.value);const j=B.x,W=B.y;d.value.n?(a.value.y=s.value.y+W,c.value.height=l.value.height-W):d.value.s&&(c.value.height=l.value.height+W),d.value.e?c.value.width=l.value.width+j:d.value.w&&(c.value.width=l.value.width-j,a.value.x=s.value.x+j),h(),S(),k()}function T(B){if(!f.value)return;const j=re.fromEvent(B);j&&v(j)}function F(){if(e.value){const{width:B,height:j,x:W,y:$}=e.value.getBoundingClientRect(),te=re.getTransformInfo(e.value);return{size:{width:B,height:j},position:{x:W-te.x,y:$-te.y}}}return null}function P(B){if(e.value){const j=F();m.value=j}r.value=void 0,l.value=null,s.value=null,c.value=null,a.value=null,d.value=null,f.value=null,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P)}function L(){document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}function C(B){B instanceof MouseEvent&&B.button===2||g.value&&(document.body.click(),B.stopPropagation(),B.preventDefault(),r.value=re.fromEvent(B),f.value=B.target,I(B),L())}function U(B){return e.value=B,y.value&&n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:j=>C(j)},null),n.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:j=>C(j)},null)])}function _(B=!0){document.body.click();const j=i.value||document.body,W=$e.getCurrent(j),$=e.value;B&&$&&(p.value=F(),p.value.transform=$.style.transform),W&&$&&(c.value=W,c.value.height-=14,c.value.width-=14,$.style.height=c.value.height+"px",$.style.width=c.value.width+"px",$.style.left="7px",$.style.top="7px",$.style.transform="",m.value={size:c.value,position:{x:0,y:0}},g.value=!1,b.value=!0)}function O(){var B,j;if(document.body.click(),p.value){const W={width:p.value.size.width||0,height:p.value.size.height||0},$={x:(window.innerWidth-W.width)/2,y:(window.innerHeight-W.height)/2};(B=c.value)==null||B.set(W),(j=a.value)==null||j.set($);const te=e.value;te.style.height=W.height+"px",te.style.width=W.width+"px",te.style.left=`${$.x}px`,te.style.top=`${$.y}px`,te.style.transform="",m.value={size:W,position:$},g.value=o.draggable,b.value=!1}}function A(){if(e.value){const B=$e.getCurrent(e.value);if(B){const{width:j,height:W}=B;e.value.style.left=`${(window.innerWidth-j)/2}px`,e.value.style.top=`${(window.innerHeight-W)/2}px`,e.value.style.transform=""}}}function z(){const B=()=>{b.value?_(!1):A(),document.body.click()};return window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}}const de=z();return{renderResizeBar:U,boundingElement:i,resizedEventParam:m,maximize:_,restore:O,allowDrag:g,isMaximized:b,unWindowResizeHandle:de}}function yo(o,t,e){const i=n.ref(),r=n.ref(o.draggable),l=n.ref(o.lockAxis),s=n.ref(),c=n.ref(),a=n.ref(!1),d=n.ref(new re(0,0)),f=n.ref(new re(0,0)),u=n.ref(new re(0,0)),m=n.ref(new re(0,0));n.watch(()=>e.value,T=>{s.value.style.cursor=T?"move":"default"});function y(T,F){if(F.tagName==="BUTTON")return!1;if(F===T)return!0;for(const P in F.children)if(Object.prototype.hasOwnProperty.call(F.children,P)&&y(T,F.children[P]))return!0;return!1}function p(){var L,C;let T=u.value.x+f.value.x,F=u.value.y+f.value.y;l.value==="x"?(T=((L=d.value)==null?void 0:L.x)||0,u.value.x=0):l.value==="y"&&(F=((C=d.value)==null?void 0:C.y)||0,u.value.y=0);const P=`translate3d(${Math.round(T)}px, ${Math.round(F)}px, 0px)`;i.value&&(i.value.style.transform=P),m.value.x=T,m.value.y=F}function g(){if(!c.value||!i.value)return null;const T=c.value.getBoundingClientRect(),F=i.value.getBoundingClientRect(),P={top:T.top<F.top,right:T.right>F.right,bottom:T.bottom>F.bottom,left:T.left<F.left};return P.top||(u.value.y-=F.top-T.top),P.bottom||(u.value.y-=F.bottom-T.bottom),P.right||(u.value.x-=F.right-T.right),P.left||(u.value.x-=F.left-T.left),p(),P}function b(T){T&&(d.value&&T.subtract(d.value),u.value.set(T),p(),g())}function w(T){a.value&&r.value&&(T.stopPropagation(),T.preventDefault(),b(re.fromEvent(T,s.value)))}function I(){var T;a.value&&(a.value=!1,f.value.add(u.value),u.value.reset(),(T=i.value)==null||T.classList.remove("ng-dragging"),t.emit("stopMove"),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",I))}function k(){!a.value&&s.value&&(a.value=!0,s.value.classList.add("ng-dragging"),document.addEventListener("mousemove",w),document.addEventListener("mouseup",I))}function S(){if(i.value){const T=re.getTransformInfo(i.value);f.value.set(T);return}f.value.reset()}function h(T){if(!e.value||T instanceof MouseEvent&&T.button===2)return;const F=T.target||T.srcElement;s.value!==void 0&&F&&!y(F,s.value)||r.value!==!1&&(document.body.click(),T.stopPropagation(),T.preventDefault(),d.value=re.fromEvent(T,i.value),S(),k())}function v(T,F,P){if(r.value&&F){if(T)s.value=T;else if(o.dragHandle){if(o.dragHandle instanceof HTMLElement)s.value=o.dragHandle;else if(typeof o.dragHandle=="string"){const L=F.querySelector(o.dragHandle);L&&(s.value=L)}}i.value=F,c.value=P,s.value?(s.value.classList.add("ng-draggable"),s.value.addEventListener("mousedown",h)):r.value=!1}}return{registerDraggle:v,resetTranslate:S}}function zt(o,t){if(o){const e=i=>{i.key.toLowerCase()===o.toLowerCase()&&t({event:i,key:o})};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}}function go(o,t){const e=n.ref(o.enableEsc);let i=null;return e.value?(i=zt("Escape",r=>{t.emit("esc",{event:r.event,type:"esc"})}),{remove:i}):null}function ho(o,t){const e=n.ref(o.enableEnter);let i=null;return e.value?(i=zt("Enter",r=>{t.emit("enter",{event:r.event,type:"enter"})}),{remove:i}):null}const Je=n.defineComponent({name:"FModal",props:fo,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(o,t){const e=n.ref(o.width||300),i=n.ref(o.height||200),r=n.ref(o.modelValue),l=n.ref(""),s=n.ref(o.class),c=n.ref(o.fitContent),a=n.ref(o.showHeader),d=n.ref(""),f=n.ref(o.showCloseButton),u=n.ref(o.showMaxButton),m=n.ref(!1),y=n.ref(o.dialogType),p=n.ref(o.src),g=n.ref(""),b=n.ref(o.showButtons),w=n.ref(o.title),I=n.ref(o.containment||null),k=n.ref(),S=n.ref(!1);function h(M,Y){Promise.resolve().then(()=>{var ie;return(ie=o.beforeClose)==null?void 0:ie.call(o)}).then(ie=>{ie&&(r.value=!1,t.emit("update:modelValue",!1),Y!=null&&t.emit(Y?"accept":"cancel"),t.emit("closed",M))})}const v=[{name:"cancel",text:"取消",class:"btn btn-secondary",handle:M=>{h(M,!1)}},{name:"accept",text:"确定",class:"btn btn-primary",handle:M=>{h(M,!0)}}],T=n.ref(o.buttons&&o.buttons.length?o.buttons:v),F=n.computed(()=>!!d.value),P=n.computed(()=>!!b.value&&!!T.value),L=n.ref(),C=n.ref(),U=n.ref(!1),{renderResizeBar:_,maximize:O,restore:A,boundingElement:z,resizedEventParam:de,allowDrag:B,unWindowResizeHandle:j}=mo(o),{registerDraggle:W}=yo(o,t,B);function $(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function te(){const M=document.querySelectorAll(".farris-modal").length;(!M||M-1<=0)&&document.body.classList.remove("modal-open"),k.value&&k.value.classList.remove("show")}n.watch(()=>o.title,(M,Y)=>{M!==Y&&(w.value=M)}),n.watch(()=>o.modelValue,(M,Y)=>{M!==Y&&(r.value=M,r.value&&o.draggable&&n.nextTick(()=>{C.value&&!I.value&&(I.value=C.value.parentElement,z.value=I.value,W(L.value,C.value,z.value))}),M||(I.value&&(I.value=null),te())),r.value&&(S.value=$())}),n.watch(()=>o.showHeader,(M,Y)=>{M!==Y&&(a.value=M)}),n.watch(()=>o.showButtons,(M,Y)=>{M!==Y&&(b.value=M)}),n.watch(()=>de.value,(M,Y)=>{const ie=M||{},he=Y||{};JSON.stringify(ie)!==JSON.stringify(he)&&t.emit("resize",{newSize:M,oldSize:Y,isMaximized:U.value})});const ue=n.computed(()=>(r.value&&document.body.classList.add("modal-open"),r.value)),Ie=n.computed(()=>{var ie;const M={modal:!0,"farris-modal":!0,fade:!0};M["f-modal-fitContent"]=!!c.value,M.show=!!ue.value;const Y=(ie=o.maskClass)==null?void 0:ie.split(" ");return Y==null||Y.reduce((he,ke)=>(he[ke]=!0,he),M),M}),X=n.computed(()=>{var ie;const M={"modal-dialog":!0},Y=(ie=s.value)==null?void 0:ie.split(" ");return Y==null||Y.reduce((he,ke)=>(he[ke]=!0,he),M),M}),ge=n.computed(()=>{const M={position:"absolute",top:`${(window.innerHeight-i.value)/2}px`,left:`${(window.innerWidth-e.value)/2}px`,width:`${e.value}px`,height:c.value?"auto":`${i.value}px`};return o.mask||(M.pointerEvents="auto"),M}),ye=n.computed(()=>{const M={display:"block"};return o.mask||(M.pointerEvents="none",M.backgroundColor="transparent"),S.value&&(M.backgroundColor="transparent"),M}),oe=n.computed(()=>({"modal-content":!0,"modal-content-has-header":a.value})),R=n.computed(()=>{const M={display:a.value?"":"none"};return M["pointer-events"]=B.value?"auto":"none",M}),ne=n.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:U.value})),le=n.computed(()=>({"modal-body":!0,"f-utils-flex-column":y.value==="iframe","f-utils-fill":!0}));function ze(){return{height:`${o.footerHeight||60}px`}}const Ve=n.computed(()=>{const M={textAlgin:g.value},Y=ze();return Object.assign(M,Y)});function Ne(M){if(M.stopPropagation(),U.value){U.value=!1,A();return}O(),U.value=!0}async function je(M,Y){M.handle&&await M.handle(Y,M)&&t.emit("closed",Y)}function Pe(M){M.width&&(e.value=M.width),M.height&&(i.value=M.height),M.buttons&&(T.value=M.buttons),M.title&&(w.value=M.title)}let qe=null,Oe=null;n.onBeforeMount(()=>{S.value=$()}),n.onMounted(()=>{C.value&&!I.value&&(I.value=C.value.parentElement,z.value=I.value,W(L.value,C.value,z.value)),ue.value&&document.body.classList.add("modal-open"),qe=go(o,t),Oe=ho(o,t)}),n.onUnmounted(()=>{j&&j(),qe&&qe.remove(),Oe&&Oe.remove()}),t.expose({modalElementRef:C,updateModalOptions:Pe,close:h,maxDialog:Ne,isMaximized:U});function Fe(){return n.createVNode("ul",null,[m.value&&n.createVNode("li",{class:"f-btn-icon f-bare"},[n.createVNode("span",{class:"f-icon modal_minimize"},null)]),u.value&&n.createVNode("li",{onClick:Ne,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[n.createVNode("span",{class:ne.value},null)]),f.value&&n.createVNode("li",{class:"f-btn-icon f-bare",onClick:M=>h(M,!1),style:"pointer-events: auto;"},[n.createVNode("span",{class:"f-icon modal_close"},null)])])}function We(){return n.createVNode("div",{class:"modal-footer",style:Ve.value},[T.value&&T.value.map(M=>{const Y=n.ref(M.disabled);return n.createVNode("button",{name:M.name,type:"button",disabled:Y.value,class:M.class+(M.iconClass?" btn-icontext":""),onClick:ie=>{je(M,ie)}},[!!M.iconClass&&n.createVNode("i",{class:M.iconClass},null),M.text])})])}function Ze(){return n.createVNode("div",{ref:L,class:"modal-header",style:R.value},[t.slots.headerTemplate?t.slots.headerTemplate():n.createVNode("div",{class:"modal-title"},[F.value&&n.createVNode("span",{class:d.value,style:"margin-right: 8px"},null),n.createVNode("span",{class:"modal-title-label"},[w.value])]),n.createVNode("div",{class:"actions"},[Fe()])])}function Ge(){return t.slots.footerTemplate?t.slots.footerTemplate():P.value&&We()}function Ke(M){if(M.stopPropagation(),o.allowClickMaskToClose){if(M.target!==k.value)return;h(M,!1)}}function _e(){var M,Y;return n.createVNode("div",{id:l.value,class:X.value,style:ge.value,ref:C},[n.createVNode("div",{class:oe.value},[a.value&&Ze(),n.createVNode("div",{class:le.value},[(Y=(M=t.slots).default)==null?void 0:Y.call(M),y.value==="iframe"&&n.createVNode("iframe",{title:l.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:p.value},null)]),Ge()]),!c.value&&C.value&&!U.value&&_(C.value)])}function Xe(M){return M||"body"}return()=>n.createVNode(n.Teleport,{to:Xe(o.host)},{default:()=>[ue.value&&n.createVNode(n.Transition,{name:"fade",appear:!0},{default:()=>[n.createVNode("div",{ref:k,class:Ie.value,style:ye.value,onClick:Ke},[_e()])]})]})}});function Wt(o){if(o.content&&o.content.render)return o.content.render;if(o.render&&typeof o.render=="function")return o.render}function vo(o){const t=document.createElement("div");t.style.display="contents";const e=n.createApp({setup(i,r){n.onUnmounted(()=>{document.body.removeChild(t)});const l=n.ref(),s=n.ref(o.class||""),c=n.ref(!!o.showButtons),a=n.ref(!!o.showHeader),d=n.ref(o.showCloseButton==null?!0:o.showCloseButton),f=n.ref(!0),u=n.ref(o.title||""),m=o.acceptCallback||(()=>{}),y=o.rejectCallback||(()=>{}),p=o.closedCallback||(k=>{}),g=o.resizeHandle||(k=>{}),b=o.stopMoveHandle||(k=>{}),w=Wt(o),I=k=>{f.value=!1,e.unmount(),p(k)};return n.onMounted(()=>{}),r.expose({modalRef:l}),()=>n.createVNode(Je,{ref:l,class:s.value,modelValue:f.value,"onUpdate:modelValue":k=>f.value=k,title:u.value,width:o.width,height:o.height,buttons:o.buttons,"show-header":a.value,"show-buttons":c.value,"show-close-button":d.value,"show-max-button":!1,onAccept:m,onCancel:y,fitContent:o.fitContent==null?!0:o.fitContent,onClosed:I,onResize:g,onStopMove:b},{default:()=>[w&&w(e)]})}});return document.body.appendChild(t),e.mount(t),e}class Gt{constructor(t){D(this,"appContext",null);D(this,"modalRef",n.ref());D(this,"activeModalIndex",n.ref(0));D(this,"modalRefs",{});D(this,"isUseEscCloseModal",n.ref(!1));D(this,"activeModalInstance",n.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=t,this.appContext=t?t._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(t,e){const{width:i,height:r}={width:window.innerWidth,height:window.innerHeight};return i<t&&(t=i-14),r<e&&(e=r-14),{width:t,height:e}}static show(t){const e=Object.assign({title:"",showButtons:!0,showHeader:!0},t);return vo(e)}close(t){var e,i;t?(i=t.value)==null||i.close():(e=this.getCurrentModal())==null||e.close()}open(t){const e=document.createDocumentFragment();t.showMaxButton&&t.fitContent&&(t.showMaxButton=!1);const i=n.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},t)),r=n.ref(!0),l=i.value.acceptCallback||(()=>{}),s=i.value.rejectCallback||(()=>{}),c=i.value.closedCallback||((h,v)=>{}),a=i.value.resizeHandle||(h=>{}),d=t.stopMoveHandle||(h=>{});let f;const u=Wt(i.value),m=h=>{var T;r.value=!1;const v=(T=h==null?void 0:h.target)==null?void 0:T.classList.contains("modal_close");c(h,this.isUseEscCloseModal.value?"esc":v?"icon":"button")},y=h=>{m(h),f&&n.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],n.render(null,e),f=null,this.modalRef.value=null,this.modalRefs){const v=Object.keys(this.modalRefs).map(T=>Number(T));v.length>0?this.activeModalIndex.value=Math.max(...v):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},p=h=>{var v;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((v=this.activeModalInstance.value)==null||v.close(h==null?void 0:h.event))},{width:g,height:b}=i.value,w=this.adaptToWindow(g||500,b||320);Object.assign(i.value,w);const I=()=>n.createVNode(Je,n.mergeProps({ref:this.modalRef,modelValue:r.value,"onUpdate:modelValue":h=>r.value=h},i.value,{onAccept:l,onCancel:s,onClosed:y,onResize:a,onEsc:p,onStopMove:d}),{default:()=>[u&&u(this.app)]});return f=(h=>{const v=n.h(I,h);return v.appContext=this.appContext,n.render(v,e),v})({...i.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:h=>{i.value={...i.value,...h},f&&n.render(n.cloneVNode(f,{...i}),e)},destroy:y,modalRef:this.activeModalInstance,close:()=>this.close()}}}const _t=Symbol("FModalService");Je.install=o=>{o.component(Je.name,Je);const t=new Gt(o);o.provide(_t,t),o.provide("FModalService",t)};class Be{static show(t){const e=n.reactive({...t}),i=!1,r=e.type==="error"||e.type==="prompt",l=e.type==="error"?"错误提示":e.type==="prompt"&&e.title||"",s=e.acceptCallback||(()=>{}),c=e.rejectCallback||(()=>{});let a=null,d=new Gt(a);const f=()=>{a&&(a==null||a.destroy(),d=null)};return a=d==null?void 0:d.open({class:"modal-message modal-message-type-info",title:l,showButtons:i,showHeader:r,width:e.width||400,fitContent:!0,showMaxButton:!1,draggable:!0,render:()=>n.createVNode(ct,n.mergeProps(e,{onAccept:s,onReject:c,onClose:f}),null)}),d==null?void 0:d.getCurrentModal()}static info(t,e){const i=n.reactive({type:"info",title:t,detail:e,okButtonText:"知道了",cancelButtonText:""});Be.show(i)}static warning(t,e){const i=n.reactive({type:"warning",title:t,detail:e,okButtonText:"知道了",cancelButtonText:""});Be.show(i)}static success(t,e){const i=n.reactive({type:"success",title:t,detail:e,okButtonText:"关闭",cancelButtonText:""});Be.show(i)}static error(t,e,i){const r=n.reactive({width:500,type:"error",okButtonText:"关闭",cancelButtonText:"",exceptionInfo:{date:i,message:t,detail:e}});Be.show(r)}static prompt(t,e){const i=n.reactive({type:"prompt",title:t,detail:e,okButtonText:"确定",cancelButtonText:"取消"});Be.show(i)}static question(t,e,i,r){const l=n.reactive({type:"question",title:t,detail:e,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:i,rejectCallback:r});Be.show(l)}}ct.install=o=>{o.component(ct.name,ct),o.provide("FMessageBoxService",Be)};class bo extends kn{constructor(e,i){super(e,i);D(this,"responseLayoutEditorFunction");D(this,"bindingVarible");this.responseLayoutEditorFunction=En(this.formSchemaUtils)}getCommonPropertyConfig(e,i){this.propertyConfig.categories.basic=this.getBasicProperties(e,i),this.propertyConfig.categories.appearance=this.getAppearanceProperties(e,i),this.propertyConfig.categories.behavior=this.getBehaviorConfig(e)}getPropertyConfig(e,i){return this.getCommonPropertyConfig(e,i),this.propertyConfig.categories.editor=this.getEditorProperties(e),this.propertyConfig.categories.expressons=this.getExpressionConfig(e,"Field"),this.propertyConfig}getGridFieldEdtiorPropConfig(e,i){return this.propertyConfig.categories={},this.getCommonPropertyConfig(e,i),this.getGridFieldEdtiorProperties?this.propertyConfig.categories.editor=this.getGridFieldEdtiorProperties(e):this.propertyConfig.categories.editor=this.getEditorProperties(e),this.propertyConfig.categories.expressons=this.getExpressionConfig(e,"Field"),this.propertyConfig.categories}getBasicProperties(e,i){const r=this;this.setDesignViewModelField(e);const{canChangeControlType:l,editorTypeList:s}=this.getAvailableEditorType(e);return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"编辑器类型",title:"编辑器类型",type:"string",$converter:"/converter/change-editor.converter",editor:{type:"combo-list",textField:"value",valueField:"key",idField:"key",editable:!1,data:s,readonly:!l}},label:{title:"标签",type:"string",$converter:"/converter/form-group-label.converter"},binding:{description:"绑定的表单字段",title:"绑定",editor:{type:"binding-selector",bindingType:{enable:!1},editorParams:{componentSchema:e,needSyncToViewModel:!0,viewModelId:this.viewModelId,designerHostService:this.designerHostService,disableOccupiedFields:!0},textField:"bindingField"},refreshPanelAfterChanged:!0}},setPropertyRelates(c,a,d){if(c)switch(c&&c.propertyID){case"type":{r.changeControlType(e,c,i);break}case"label":{c.needRefreshControlTree=!0;break}case"binding":{r.changeBindingField(e,c,d);break}}}}}checkCanChangeControlType(e,i){if(!e.binding)return!1;if(e.binding.type==="Variable"){if(this.bindingVarible=this.formSchemaUtils.getVariableById(e.binding.field),!this.bindingVarible)return!1}else if(!this.designViewModelField||this.designViewModelField.$type!==Ue.FormSchemaEntityField$Type.SimpleField)return!1;return!0}getAvailableEditorType(e){var l;const i=this.checkCanChangeControlType(e,this.viewModelId);if(!i)return{canChangeControlType:!1,editorTypeList:[{key:e.editor.type,value:((l=N[e.editor.type])==null?void 0:l.name)||e.editor.type}]};let r=[];return this.designViewModelField&&this.designViewModelField.$type===Ue.FormSchemaEntityField$Type.SimpleField?r=rt.getEditorTypesByMDataType(this.designViewModelField.type.name):this.bindingVarible&&(r=rt.getEditorTypesByMDataType(this.bindingVarible.type)),{canChangeControlType:i,editorTypeList:r}}changeBindingField(e,i,r){i.needRefreshEntityTree=!0}getAppearanceProperties(e,i){const r=this;return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的内联样式",$converter:"/converter/appearance.converter"},responseLayout:{description:"响应式列宽",title:"响应式列宽",type:"boolean",visible:!0,refreshPanelAfterChanged:!0,editor:{type:"response-layout-editor-setting",beforeOpen:()=>r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e,r.componentId)}}},setPropertyRelates(l,s){if(l)switch(l&&l.propertyID){case"responseLayout":r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue,r.componentId||e.id),r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId),r.updateElementByParentContainer(e.id,i),delete e.responseLayout;break;case"class":r.updateUnifiedLayoutAfterControlChanged(l.propertyValue,e.id,this.componentId),it.value++;break;case"style":{it.value++;break}}}}}getEditorProperties(e){return this.getComponentConfig(e)}changeControlType(e,i,r){const l=i.propertyValue,s=r&&r.parent&&r.parent.schema;if(!s)return;const c=s.contents.findIndex(f=>f.id===e.id);if(c===-1)return;const a=s.contents[c];let d;if(this.designViewModelField){const m=this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find(p=>p.id===this.designViewModelField.id).fieldSchema||{};m.editor||(m.editor={}),m.editor.$type=l,this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id,m,!1),d=this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField,l)}d||(d=this.controlCreatorUtils.createFormGroupWithoutField(l)),Object.assign(d,{id:a.id,appearance:a.appearance,size:a.size,label:a.label,binding:a.binding}),Object.prototype.hasOwnProperty.call(a,"visible")&&Object.assign(d,{visible:a.visible}),a.editor&&["readonly","required","placeholder"].map(f=>{Object.prototype.hasOwnProperty.call(a.editor,f)&&(d.editor[f]=a.editor[f])}),s.contents.splice(c,1),s.contents.splice(c,0,d),r.schema=Object.assign(a,d),Object.assign(e,d),Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(f=>f.classList.remove("dgComponentSelected")),Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(f=>f.classList.remove("dgComponentFocused")),it.value++}getComponentConfig(e,i={},r={},l){const s=Object.assign({description:"编辑器",title:"编辑器",type:"input-group",$converter:"/converter/property-editor.converter"},i),c=this.getPropertyEditorParams(e,[],"readonly"),a=this.getPropertyEditorParams(e,[],"required"),d={readonly:{description:"",title:"只读",editor:c},required:{description:"",title:"必填",type:"boolean",editor:a},placeholder:{description:"当控件没有值时在输入框中显示的文本",title:"提示文本",type:"string"}};for(const u in r)d[u]=Object.assign(d[u]||{},r[u]);const f=this;return{...s,properties:{...d},setPropertyRelates(u,m){if(u){switch(u.propertyID){case"readonly":case"required":f.afterMutilEditorChanged(e,u);break}l&&l.bind(f)(u,e,m)}}}}updateUnifiedLayoutAfterControlChanged(e,i,r){const l=e.split(" ");let s=l.find(u=>/^col-([1-9]|10|11|12)$/.test(u)),c=l.find(u=>/^col-md-([1-9]|10|11|12)$/.test(u)),a=l.find(u=>/^col-xl-([1-9]|10|11|12)$/.test(u)),d=l.find(u=>/^col-el-([1-9]|10|11|12)$/.test(u));s=s||"col-12",c=c||"col-md-"+s.replace("col-",""),a=a||"col-xl-"+c.replace("col-md-",""),d=d||"col-el-"+a.replace("col-xl-","");const f={id:i,columnInSM:parseInt(s.replace("col-",""),10),columnInMD:parseInt(c.replace("col-md-",""),10),columnInLG:parseInt(a.replace("col-xl-",""),10),columnInEL:parseInt(d.replace("col-el-",""),10)};this.updateUnifiedLayoutAfterResponseLayoutChanged(r,f)}updateUnifiedLayoutAfterResponseLayoutChanged(e,i){const{formNode:r}=this.responseLayoutEditorFunction.checkCanFindFormNode(e);if(!r||!r.unifiedLayout)return;const l=[];if(this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r,l,1),i){const p=l.find(g=>g.id===i.id);Object.assign(p||{},i)}const s=l.map(p=>p.columnInSM),c=l.map(p=>p.columnInMD),a=l.map(p=>p.columnInLG),d=l.map(p=>p.columnInEL),f=this.checkIsUniqueColumn(s)?s[0]:null,u=this.checkIsUniqueColumn(c)?c[0]:null,m=this.checkIsUniqueColumn(a)?a[0]:null,y=this.checkIsUniqueColumn(d)?d[0]:null;Object.assign(r.unifiedLayout,{uniqueColClassInSM:f,uniqueColClassInMD:u,uniqueColClassInLG:m,uniqueColClassInEL:y})}checkIsUniqueColumn(e){const i=new Set(e);return Array.from(i).length===1}getItemCollectionEditor(e,i,r){return i=i||"value",r=r||"name",{editor:{columns:[{field:i,title:"值",dataType:"string"},{field:r,title:"名称",dataType:"string"}],type:"item-collection-editor",valueField:i,nameField:r,requiredFields:[i,r],uniqueFields:[i,r],readonly:this.checkEnumDataReadonly(e)}}}checkEnumDataReadonly(e){return!e.binding||e.binding.type!=="Form"?!1:!!(this.designViewModelField&&this.designViewModelField.type&&this.designViewModelField.type.$type===Ue.FormSchemaEntityFieldType$Type.EnumType)}appendFieldValueChangeEvents(e,i){e.binding&&e.binding.type===lt.Form&&e.binding.field?(i.find(s=>s.label==="fieldValueChanging")||i.push({label:"fieldValueChanging",name:"绑定字段值变化前事件"}),i.find(s=>s.label==="fieldValueChanged")||i.push({label:"fieldValueChanged",name:"绑定字段值变化后事件"}),this.designViewModelField&&(e.fieldValueChanging=this.designViewModelField.valueChanging,e.fieldValueChanged=this.designViewModelField.valueChanged)):i=i.filter(r=>r.label!=="fieldValueChanging"&&r.label!=="fieldValueChanged")}getControlMethodType(e){if(!e.binding)return e.type;switch(e.binding.type){case lt.Form:return e.binding.path||e.type;case lt.Variable:return e.binding.fullPath||e.type}return e.type}getEventPropertyConfig(e,i="card",r,l){const s=this;let c=[];r&&(c=c.concat(r)),this.appendFieldValueChangeEvents(e,c);const a=s.eventsEditorUtils.formProperties(e,s.viewModelId,c),d={};return d[s.viewModelId]={type:"events-editor",editor:{initialData:a}},{title:"事件",hideTitle:!0,properties:d,tabId:"commands",tabName:"交互",setPropertyRelates(u,m){const y=u.propertyValue;delete e[s.viewModelId],y&&(y.setPropertyRelates=this.setPropertyRelates,y.controlInfo={type:s.getControlMethodType(e),name:e.title},s.eventsEditorUtils.saveRelatedParameters(e,s.viewModelId,y.events,y)),l&&l(u,m,y);const p=s.designViewModelUtils.getDgViewModel(s.viewModelId);p&&s.designViewModelField&&p.changeField(s.designViewModelField.id,{valueChanging:e.fieldValueChanging,valueChanged:e.fieldValueChanged})}}}getExpressionConfig(e,i,r=["compute","dependency","validate"],l){return new Lt(this.formSchemaUtils).getExpressionConfig(e,i,r,l)}}class Co extends bo{getPropertyConfig(t,e){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.getAppearanceConfig(),this.getBehaviorConfig(t),this.getFilterBarConfig(t),this.getEventPropConfig(t),this.propertyConfig}getBehaviorConfig(t){this.propertyConfig.categories.apperance={description:"Basic Infomation",title:"行为",properties:{showExtendSiderbar:{description:"是否在侧边栏中展示收起的控件",type:"boolean",title:"启用侧边栏收折",refreshPanelAfterChanged:!0},resetText:{description:"选择筛选条件后,按钮“清空筛选”的文本",type:"string",title:"按钮“清空筛选”的文本"}}}}getFilterBarConfig(t){const e=this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId),i=this;this.propertyConfig.categories.control={description:"Basic Infomation",title:"编辑器",properties:{fields:{description:"筛选条字段设置",title:"筛选条字段",type:"",refreshPanelAfterChanged:!0,editor:{type:"filter-bar-config",fieldsConfig:e,formSchemaUtils:this.formSchemaUtils,metadataService:this.metadataService,viewModelId:this.viewModelId,designViewModelUtils:this.designViewModelUtils,eventsEditorUtils:this.eventsEditorUtils}},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",refreshPanelAfterChanged:!0},disable:{description:"是否禁用",type:"boolean",title:"是否禁用"},defaultValues:{description:"默认值绑定字段",type:"object",title:"默认值绑定字段",editor:this.getPropertyEditorParams(t,["Variable"])}},setPropertyRelates(r,l){i.addNewVariableToViewModel(r,i.viewModelId)}}}getEventPropConfig(t){const e=[{label:"onQuery",name:"查询事件"}],i=this,r=i.eventsEditorUtils.formProperties(t,i.viewModelId,e),l={};l[i.viewModelId]={type:"events-editor",editor:{initialData:r}},this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:l,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(s,c){const a=s.propertyValue;delete t[i.viewModelId],a&&(a.setPropertyRelates=this.setPropertyRelates,i.eventsEditorUtils.saveRelatedParameters(t,i.viewModelId,a.events,a)),t.remoteSort=!!t.columnSorted}}}}function wo(o,t){function e(c,a){const d=o.schema;return new Co(c,t).getPropertyConfig(d,a)}function i(){return!1}function r(){return!1}function l(){return!1}function s(){var u,m,y,p,g,b;if((m=(u=o==null?void 0:o.parent)==null?void 0:u.parent)!=null&&m.schema){const w=(y=o==null?void 0:o.parent)==null?void 0:y.parent.schema;(p=w.appearance)!=null&&p.class&&((g=w.appearance)!=null&&g.class.includes("f-page-has-scheme"))&&(w.appearance.class=(b=w.appearance)==null?void 0:b.class.replace("f-page-has-scheme","").replace(" ",""))}const{formSchemaUtils:c}=t,a=o.componentInstance.value.belongedComponentId,d=c.getViewModelIdByComponentId(a),f=c.getViewModelById(d);if(f&&f.states){const w=f.states.findIndex(I=>I.code==="originalFilterConditionList");w>-1&&f.states.splice(w,1)}}return{getPropsConfig:e,canAccepts:i,checkCanDeleteComponent:r,checkCanMoveComponent:l,onRemoveComponent:s}}const xo=n.defineComponent({name:"FFilterBarDesign",props:ot,emits:["Clear","Remove","Reset"],setup(o,t){const e=n.ref(!1),i=n.ref(!1),r=n.ref(!1),l=n.ref(!1),s=$t(o,t),{filterFields:c,filterItems:a,loadFilterItems:d}=s,f=n.ref(),u=n.inject("design-item-context"),m=n.inject("designer-host-service"),y=wo(u,m),p=mt.useDesignerComponent(f,u,y),g=n.computed(()=>({display:c.value&&c.value.length?"":"none"}));n.onMounted(()=>{f.value.componentInstance=p}),t.expose(p.value),n.watch([()=>o.data,()=>o.fields],([F,P])=>{d(P,F)});const b=n.computed(()=>i.value&&e.value),w=n.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":b.value})),I=n.computed(()=>a.value.length>0);function k(){return n.createVNode("div",{class:w.value},[a.value.map((F,P)=>n.createVNode(qt,{filterItem:F,useFilterItemsComposition:s},null))])}const S=n.computed(()=>r.value&&!i.value&&l.value),h=vn(),v=n.computed(()=>!i.value),T=Rt(o,t,s);return()=>n.createVNode("div",{ref:f,class:"f-filter-wrapper",style:g.value},[n.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[n.createVNode("div",{class:"f-filter-main f-utils-fill"},[n.createVNode("div",{class:"f-filter-list-wrapper"},[I.value&&k(),S.value&&h(),v.value&&T()])])])])}}),Fo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"query-solution-config",description:"A Farris Container Component",properties:{fieldsConfig:{description:"所有字段(树结构)",type:"array"},designViewModelUtils:{description:"",type:"object"},formSchemaUtils:{description:"",type:"object"},metadataService:{description:"",type:"object"},viewModelId:{description:"",type:"array"},eventsEditorUtils:{description:"",type:"object"}}},So=new Map([["appearance",Qe]]);function To(o,t,e){return t}const Xt={fieldsConfig:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"query-solution"},onFieldsChanged:{type:Function,default:null},formSchemaUtils:{type:Object,default:{}},metadataService:{type:Object,default:{}},designViewModelUtils:{type:Object,default:{}},eventsEditorUtils:{type:Object,default:{}},viewModelId:{type:String,default:""}};Ye(Xt,Fo,So,To);const Io={"input-group":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"number-spinner":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},max:{description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0}},min:{description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0}}},"number-range":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},max:{description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0}},min:{description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0}}},"combo-list":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},enumValueType:{description:"值类型",title:"值类型",type:"select",editor:{type:"combo-list",data:[{value:"int",name:"整型"},{value:"string",name:"字符串"},{value:"boolean",name:"布尔"}],valueField:"value",textField:"name",idField:"value"}}},lookup:{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},helpId:{description:"帮助元数据ID",title:"帮助元数据ID",type:"string"},displayName:{description:"帮助元数据名称",title:"帮助元数据名称",type:"string",readonly:!0},uri:{description:"uri",title:"uri",type:"string",readonly:!0},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string",readonly:!0},displayType:{description:"类型: 树列表、列表、双列表、左树右列表",title:"展示类型",type:"string",editor:{type:"combo-list",editable:!1,disabled:!0,data:[{text:"列表",value:"List"},{text:"树列表",value:"TreeList"},{text:"双列表",value:"NavList"},{text:"左树右列表",value:"NavTreeList"}],textField:"text",idField:"value",valueField:"value"}},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"}},"date-picker":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"datetime-picker":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"}},"radio-group":{class:{description:"样式",title:"样式",type:"string"},required:{description:"必填",title:"是否必填",type:"boolean"},multiLineLabel:{description:"标签过长时是否展示两行",title:"标签是否折行展示",type:"boolean"},direction:{description:"布局方向",title:"布局方向",type:"select",editor:{type:"combo-list",data:[{text:"水平",value:"horizontal"},{text:"垂直",value:"vertical"}],textField:"text",idField:"value",valueField:"value"}},showLabel:{description:"是否显示标签",title:"是否显示标签",type:"boolean"}}},ko={convertFrom:(o,t)=>o[t],convertTo:(o,t,e)=>{o[t]=e}},Mo={convertFrom:(o,t)=>o[t]||!1,convertTo:(o,t,e)=>{o[t]=e}};function wt(o){const t={"input-group":{key:"input-group",value:"文本"},"number-spinner":{key:"number-spinner",value:"数值"},"number-range":{key:"number-range",value:"数值区间"},lookup:{key:"lookup",value:"弹出帮助"},"combo-lookup":{key:"combo-lookup",value:"下拉帮助"},"date-picker":{key:"date-picker",value:"日期"},"datetime-picker":{key:"datetime-picker",value:"日期时间"},"combo-list":{key:"combo-list",value:"下拉列表"},"radio-group":{key:"radio-group",value:"单选组"}};function e(f){let u=[];if(f){switch(f){case"Enum":case"Boolean":u=[t["radio-group"],t["combo-list"]];break;case"Number":case"Integer":case"Decimal":case"BigNumber":u=[t["number-spinner"],t["number-range"]];break;case"String":u=[t["input-group"],t.lookup,t["radio-group"],t["combo-list"],t["date-picker"],t["datetime-picker"]];break;case"Date":u=[t["date-picker"]];break;case"DateTime":u=[t["date-picker"],t["datetime-picker"]];break}return u}else return[{key:"input-group",value:"文本"}]}function i(f){return e(f)}function r(f,u){const m={required:!1,multiLineLabel:!1};let y={};switch(f){case"input-group":break;case"number-range":case"number-spinner":y={precision:u.precision||0,max:null,min:null};break;case"combo-list":y={multiSelect:!1,data:(u==null?void 0:u.data)||[],valueField:"value",textField:"name",idField:"value",enumValueType:(u==null?void 0:u.enumValueType)||"string"};break;case"lookup":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"date-range":case"date-picker":y={valueFormat:"yyyy-MM-dd",displayFormat:"yyyy-MM-dd"};break;case"datetime-picker":y={valueFormat:"yyyy-MM-dd HH:mm:ss",displayFormat:"yyyy-MM-dd HH:mm:ss"};break;case"radio-group":y={direction:"horizontal",showLabel:!1,data:(u==null?void 0:u.data)||[],enumValueType:u==null?void 0:u.enumValueType};break}return{...m,...y}}function l(f,u){const m={required:!1,isExtend:!1};let y={};switch(f){case"input-group":break;case"number-range":case"number-spinner":y={precision:u.precision||0,max:null,min:null};break;case"combo-list":y={multiSelect:!1,data:(u==null?void 0:u.data)||[],valueField:"value",textField:"name",idField:"value",enumValueType:(u==null?void 0:u.enumValueType)||"string"};break;case"lookup":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"date-range":case"date-picker":y={valueFormat:"yyyy-MM-dd",displayFormat:"yyyy-MM-dd"};break;case"datetime-picker":y={valueFormat:"yyyy-MM-dd HH:mm:ss",displayFormat:"yyyy-MM-dd HH:mm:ss"};break;case"radio-group":y={direction:"horizontal",showLabel:!1,data:(u==null?void 0:u.data)||[],enumValueType:u==null?void 0:u.enumValueType};break}return{...m,...y}}function s(f,u){return r(f,u)}function c(f,u){return s(f,u)}function a(f){let u="",m={};switch(f.type.name){case"String":{u="input-group",m=c("input-group");break}case"Number":case"Integer":case"Decimal":case"BigNumber":{u="number-range";const p={precision:f.type.precision};m=c("number-spinner",p);break}case"Date":u="date-picker",m=c("date-picker");break;case"DateTime":{u="datetime-picker",m=c("datetime-picker");break}case"Enum":{u="combo-list";const p={data:f.type.enumValues,enumValueType:"string"};m=c("combo-list",p);break}case"Boolean":{u="combo-list";const p={data:f.type.enumValues||[{name:"true",value:!0},{name:"false",value:!1}],enumValueType:"boolean"};m=c("combo-list",p);break}default:u="input-group",m=c("input-group")}return m?{id:f.id,labelCode:f.path,code:f.code,name:f.name,labelName:f.name,placeHolder:"",controlType:u,$type:f.$type,$typeInfo:f.type,...m}:void 0}function d(f){if(!f||!f.id)return null;const{id:u,code:m,labelCode:y,name:p,controlType:g,labelName:b,$type:w,$typeInfo:I,...k}=f,S={id:u,code:m,labelCode:y,name:p,controlType:g,$type:w,$typeInfo:I,editor:k};return S.editor.type=g,S}return{getQuerySolutionExtendSchemaProerty:r,getFilterBarionExtendSchemaProerty:l,getExtendSchemaProerty:s,getEditorByType:c,getSolutionField:a,getControlTypeListByFieldType:i,formatUsingFieldToField:d}}function Eo(o,t){const{getControlTypeListByFieldType:e}=wt();function i(p){return{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"string",editor:{type:"combo-list",data:e(p.$typeInfo.name),valueField:"key",textField:"value",idField:"key",editable:!1,multiSelect:!1}}}}}function r(p){let g="form_group_"+Date.now();return p&&(g=p.replaceAll("-","_").replaceAll(".","_")),"lookup."+g}function l(p){const g={description:"帮助元数据",title:"帮助元数据",type:"string",refreshPanelAfterChanged:!0,editor:{type:"schema-selector",title:"选择数据源",textField:"id",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},viewOptions:[{id:"recommend",title:"推荐",type:"List",dataSource:"Recommand",enableGroup:!0,groupField:"category",groupFormatter:(k,S)=>`${k==="local"?"本地元数据":"最近使用"}`},{id:"total",title:"全部",type:"List",dataSource:"Total"}],repositoryToken:nn.LookupSchemaRepositoryToken,onSubmitModal:k=>{if(k){const S=o.formSchemaUtils.getFormMetadataBasicInfo();return o.metadataService.getPickMetadata(S.relativePath,k[0].data).then(h=>{const v=JSON.parse(h==null?void 0:h.metadata.content);return p.helpId=v.id,p.displayName=v.name,p.displayType=v.displayType,p.textField=v.textField,p.valueField=v.valueField,p.idField=v.idField,p.uri=r(v.id),p.dataSource={displayName:v.name,idField:v.idField,uri:p.uri},null})}}}},b={description:"显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1},textField:"bindingPath",idField:"bindingPath",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},columns:[{field:"name",title:"名称"},{field:"code",title:"编号"},{field:"bindingPath",title:"绑定字段"}],repositoryToken:yt.FieldSelectorRepositoryToken,onSubmitModal:k=>(p.textField=k[0].bindingPath,null)}},w={description:"显示值字段",title:"值字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1},textField:"bindingPath",idField:"bindingPath",editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},columns:[{field:"name",title:"名称"},{field:"code",title:"编号"},{field:"bindingPath",title:"绑定字段"}],repositoryToken:yt.FieldSelectorRepositoryToken,onSubmitModal:k=>(p.valueField=k[0].bindingPath,null)}},I={description:"字段映射",title:"字段映射",type:"string",editor:{type:"mapping-editor",modalWidth:800,modalHeight:600,editable:!1,editorParams:{propertyData:p,formBasicInfo:o.formSchemaUtils.getFormMetadataBasicInfo()},fromData:{editable:!1,formatter:(k,S)=>`${S.raw.name} [${S.raw.bindingPath}]`,idField:"id",textField:"bindingPath",valueField:"bindingPath",repositoryToken:yt.FieldSelectorRepositoryToken},toData:{idField:"id",textField:"bindingPath",valueField:"bindingPath",dataSource:o.designViewModelUtils.getAllFields2TreeByVMId(o.viewModelId),formatter:(k,S)=>`${S.raw.name} [${S.raw.bindingPath}]`}}};return{helpId:g,textField:b,valueField:w,mappingFields:I}}function s(p){return{enumValues:{description:"枚举值",title:"枚举值",type:"string",editor:{columns:[{field:"value",title:"值",dataType:"string"},{field:"name",title:"名称",dataType:"string"},{field:"disabled",title:"禁用",visible:!1,dataType:"boolean",editor:{type:"switch"}}],type:"item-collection-editor",valueField:"value",nameField:"name",requiredFields:["value","name"],uniqueFields:["value","name"]},$converter:ko}}}function c(p){const g={description:"精度",title:"精度",type:"number",editor:{type:"number-spinner",nullable:!1,precision:0,min:0}},b={description:"最大值",title:"最大值",type:"number",editor:{type:"number-spinner",nullable:!0,precision:p.precision,min:p.min}},w={description:"最小值",title:"最小值",type:"number",editor:{type:"number-spinner",nullable:!0,precision:p.precision,max:p.max}};return{precision:g,max:b,min:w}}function a(p,g){if(!g)return p;const b=g.includes("yyyy"),w=g.includes("MM"),I=g.includes("dd"),k=g.includes("HH"),S=g.includes("mm"),h=g.includes("ss");return b||(p=p.filter(v=>!v.id.includes("yyyy"))),w||(p=p.filter(v=>!v.id.includes("MM"))),I||(p=p.filter(v=>!v.id.includes("dd"))),k||(p=p.filter(v=>!v.id.includes("HH"))),S||(p=p.filter(v=>!v.id.includes("mm"))),h||(p=p.filter(v=>!v.id.includes("ss"))),p}function d(p){const{timeFormats:g,yMdFormats:b,yMFormats:w,mdFormats:I,yFormats:k}=ln.DATE_FORMATS();let S=[];const{controlType:h}=p;h==="date-picker"?S=S.concat(b,w,k,I):h==="datetime-picker"&&(S=S.concat(g,b,w,k,I));const v={description:"查询格式",title:"查询格式",type:"enum",editor:{data:S}},F={description:"显示格式",title:"显示格式",type:"enum",editor:{data:a(S,p.valueFormat)}};return{valueFormat:v,displayFormat:F}}function f(p){const{controlType:g}=p,b={description:"",title:"控件",properties:Z.cloneDeep(Io[g])};if(b.properties.multiLineLabel.$converter=Mo,g==="lookup"||g==="combo-lookup"){const{helpId:w,textField:I,valueField:k,mappingFields:S}=l(p);b.properties.helpId=w,b.properties.textField=I,b.properties.valueField=k,b.properties.mapFields=S}else if(g==="radio-group"||g==="combo-list"){const{enumValues:w}=s();b.properties.data=w}else if(g==="date-picker"||g==="datetime-picker"){const{$typeInfo:w}=p,{valueFormat:I,displayFormat:k}=d(p);w&&w.name==="String"&&(b.properties.valueFormat=I),b.properties.displayFormat=k}else if(g==="number-spinner"||g==="number-range"){const{precision:w,max:I,min:k}=c(p);b.properties.precision=w,b.properties.max=I,b.properties.min=k}return b}function u(p){const g=[{label:"valueChangedCmd",name:"值变化事件"}];switch(p){case"combo-lookup":case"lookup":g.push({label:"preEventCmd",name:"帮助前事件"},{label:"preEventCmd",name:"帮助前事件"});break;case"combo-list":g.push({label:"beforeShow",name:"面板展开前事件"},{label:"afterShow",name:"面板关闭后事件"});break}return g}function m(p){const g=u(p.controlType),b=o.eventsEditorUtils.formProperties(p,o.viewModelId,g),w={};return w[o.viewModelId]={type:"events-editor",editor:{initialData:b}},{title:"事件",hideTitle:!0,properties:w,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(k,S){const h=k.propertyValue;delete p[o.viewModelId],h&&(h.setPropertyRelates=this.setPropertyRelates,o.eventsEditorUtils.saveRelatedParameters(p,o.viewModelId,h.events,h)),p.remoteSort=!!p.columnSorted}}}function y(p){const g=i(p),b=f(p);return m(p),{title:"query-solution-config",description:"A Farris Component",type:"object",categories:{basic:g,control:b}}}return{getPropertyConfig:y}}function Bo(o,t,e,i){const r=n.ref(),l=n.ref("query-solution-config"),s=n.ref({}),c=n.ref(),a=n.ref(null),{getPropertyConfig:d}=Eo(o),{getExtendSchemaProerty:f}=wt();n.watch(()=>{var p;return(p=e.value)==null?void 0:p.id},(p,g)=>{if(!p)a.value=null;else if(p!==g){const b=i.get(p);a.value=b}});function u(p){return{id:p.id,code:p.code||p.id,labelCode:p.labelCode,name:p.name,controlType:p.controlType,$typeInfo:p.$typeInfo,$type:p.$type}}n.watch(()=>{var p,g;return[(p=a.value)==null?void 0:p.id,(g=a.value)==null?void 0:g.controlType]},([p,g],[b,w])=>{if(!p)r.value.updatePropertyConfig({},{},!0);else if(p!==b){const I=d(a.value);r.value.updatePropertyConfig(I,a.value,!0)}else if(g!==w){const I=i.get(p),k=u(I);k.controlType=g;const S={...k,...f(g,I)};(g==="number-spinner"||g==="number-range")&&(S.precision=I==null?void 0:I.$typeInfo.precision),i.set(p,S),a.value=i.get(p);const h=d(a.value);r.value.updatePropertyConfig(h,a.value,!0)}});function m(p){const{propertyID:g}=p.changeObject;if(g==="precision"||g==="max"||g==="min"){const b=d(a.value);r.value.updatePropertyConfig(b,a.value,!1)}if(g==="valueFormat"){const b=d(a.value),w=b.categories.control.properties.displayFormat.editor.data;w.find(I=>a.value.displayFormat===I.id)||(a.value.displayFormat=w[0].id),r.value.updatePropertyConfig(b,a.value,!1)}}function y(){return n.createVNode(tn.FPropertyPanel,{propertyConfig:c.value,ref:r,propertyName:l.value,enableSearch:!1,schema:s.value,onPropertyChanged:m},{default:()=>[n.createTextVNode(" ")]})}return{renderPanel:y}}function Vo(o,t,e,i){const r=new Map,l=n.ref(!1),s=n.ref(),c=n.ref([]),a=n.ref([]),d=n.ref([]),{getSolutionField:f}=wt(),u={customRowStatus:h=>{const v=h.raw;h.disabled=v.$type!=="SimpleField"||v.$typeInfo.name==="Text"}};function m(h){e.value=h.length?h[0]:null}function y(h){var T;a.value.forEach(F=>{!h.find(L=>L.id===F.id)&&i.set(F.id,Z.cloneDeep(r.get(F.id)))}),a.value=h;const v=(T=e.value)==null?void 0:T.id;(!v||!a.value.find(F=>F.id===v))&&(e.value=null)}function p(h,v=!1){if(h.forEach(T=>{T.data=f(T.data),i.set(T.data.id,Z.cloneDeep(T.data)),r.set(T.data.id,Z.cloneDeep(T.data)),T.children&&T.children.length&&p(T.children)}),v)return h}function g(){const h=Z.cloneDeep(o.fieldsConfig);return p(h,!0)}function b(h,v){return h.reduce((T,F)=>{v.set(F.data.id,F.data),F.children&&F.children.length&&b(F.children,v)},v)}function w(){d.value=g();const h=new Map([]);b(o.fieldsConfig,h);const v={},T=Z.cloneDeep(o.modelValue)||[];a.value=[],T.forEach(F=>{const P=h.get(F.id);P&&(v[F.id]={...F.editor,id:P.id,code:P.code,labelCode:P.path,labelName:P.name,name:F.name,$type:P.$type,$typeInfo:P.type,controlType:F.controlType},delete v[F.id].type,a.value.push(v[F.id]),i.set(F.id,Z.cloneDeep(v[F.id])))}),l.value=!0,s.value=Z.cloneDeep(v),c.value=Z.cloneDeep(a.value)}function I(){const h=[];a.value.forEach(v=>{const T=i.get(v.id);if(T){const{id:F,code:P,labelCode:L,name:C,controlType:U,labelName:_,$type:O,$typeInfo:A,...z}=T,de={id:F,code:P,labelCode:L,name:C,controlType:U,$type:O,$typeInfo:A,editor:z};de.editor.type=U,h.push(de)}}),t.emit("update:modelValue",h),o.onFieldsChanged&&typeof o.onFieldsChanged=="function"&&o.onFieldsChanged(h),l.value=!1,e.value=null}function k(){a.value=Z.cloneDeep(c.value),l.value=!1,e.value=null}function S(){return l.value?n.createVNode(rn,{selections:a.value,"data-source":d.value,rowOption:u,"display-type":"Tree",class:"query-solution-config-transfer","text-field":"labelName",onActiveChange:m,onChange:y},null):null}return{renderTransfer:S,initData:w,selectPanels:a,confirm:I,cancel:k}}const No={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},buttonBehavior:{type:String,default:"Popup"},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number,popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},popupOnInput:{type:Boolean,default:!1},popupOnFocus:{type:Boolean,default:!1},popupOnClick:{type:Boolean,default:!1},popupClass:{type:String,default:""},popupMinWidth:{type:Number,default:160},modalOptions:{type:Object,default:{}},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},textAlign:{type:String,default:"left"},beforeClickButton:{type:Function,default:null},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},beforeOpen:{type:Function,default:null},updateOn:{type:String,default:"change"},keepWidthWithReference:{type:Boolean,default:!0},placement:{type:String,default:"bottom-left"},limitContentBySpace:{type:Boolean,default:!1}},jo={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object},backgroundColor:{type:String,default:""}},Po=n.defineComponent({name:"FOverlay",props:jo,emits:["click"],setup(o,t){const e=n.ref(o.popupContentPosition),i=n.ref(o.host),r=n.computed(()=>({backgroundColor:o.backgroundColor||"",pointerEvents:"auto"}));function l(c){t.emit("click"),c.preventDefault(),c.stopPropagation()}n.computed(()=>{const c=i.value;if(c){const a=c.getBoundingClientRect(),{left:d,top:f,height:u}=a;return{left:d,top:f+u}}return e.value});const s=n.computed(()=>({}));return()=>n.createVNode(n.Teleport,{to:"body"},{default:()=>{var c,a;return[n.createVNode("div",{class:"overlay-container",onClick:d=>l(d),style:r.value},[n.createVNode("div",{style:s.value},[(a=(c=t.slots).default)==null?void 0:a.call(c)])])]}})}});function Oo(o){if(o.content&&o.content.render)return o.content.render;if(o.render&&typeof o.render=="function")return o.render}function $o(o){const t=document.createElement("div");t.style.display="contents";let e;const i=o.onClickCallback||(()=>{}),r=()=>{i(),e&&e.unmount()};return e=n.createApp({setup(){n.onUnmounted(()=>{document.body.removeChild(t)});const l=Oo(o);return()=>n.createVNode(Po,{"popup-content-position":o.popupPosition,host:o.host,onClick:r,backgroundColor:o.backgroundColor},{default:()=>[l&&l()]})}}),document.body.appendChild(t),e.mount(t),e}class Ro{static show(t){return $o(t)}}function Yt(o,t){function e(){const i=o.beforeOpen||o.beforeClickButton||null;let r=Promise.resolve(!0);if(i){const l=i(t.value);if(typeof l>"u")return r;typeof l=="boolean"?r=Promise.resolve(l):r=l}return r}return{judgeCanOpen:e}}function qo(o,t,e,i,r){const l=n.ref(o.buttonBehavior),s=n.ref(o.popupOnInput),c=n.computed(()=>({"input-group-append":!0,"append-force-show":o.showButtonWhenDisabled&&(o.readonly||o.disable)})),{judgeCanOpen:a}=Yt(o,r),d=n.computed(()=>o.showButtonWhenDisabled||(!o.editable||!o.readonly)&&!o.disable),f=n.inject(_t,null),u=n.ref();async function m(g){if(await a()&&d.value){const b=!!t.slots.default;if(l.value==="Modal"){const w=o.modalOptions,I=f==null?void 0:f.open({...w,render:()=>t.slots.default&&t.slots.default()});u.value=I==null?void 0:I.modalRef}l.value==="Overlay"&&Ro.show({host:document.body,backgroundColor:"rgba(0,0,0,.15)",render:()=>t.slots.default&&t.slots.default()}),b&&l.value==="Popup"&&i.togglePopup(!0),b&&s.value&&i.hidePopup(),t.emit("clickButton",{origin:g,value:o.modelValue})}}function y(g){t.emit("mouseEnterIcon",g)}function p(g){t.emit("mouseLeaveIcon",g)}return{buttonGroupClass:c,onClickButton:m,onMouseEnterButton:y,onMouseLeaveButton:p,modalRef:u}}function Lo(o,t,e,i,r,l){const s=n.ref(!1),c=n.computed(()=>o.enableClear&&!o.readonly&&!o.disable),{changeTextBoxValue:a,hasClearClass:d}=l;function f(p){s.value=p,d.value=p}n.watch(r,()=>{f(!!r.value)});function u(p){const g=!o.readonly&&!o.disable&&o.editable,b=!o.editable;p.stopPropagation(),(g||b)&&(a(""),f(!s.value),t.emit("clear"))}function m(p){if(c.value){if(!e.value){f(!1);return}!o.disable&&!o.readonly&&f(!0)}}function y(p){c.value&&f(!1)}return{enableClearButton:c,showClearButton:s,onClearValue:u,onMouseEnterTextBox:m,onMouseLeaveTextBox:y}}function Ao(o,t,e,i,r){const l=n.computed(()=>o.popupOnInput),s=n.computed(()=>o.popupOnFocus),{shouldPopupContent:c,closeAllPopover:a}=r,d=n.ref(!1),f=n.computed(()=>o.enableTitle?e.value:""),u=n.computed(()=>(o.disable||o.readonly)&&!o.forcePlaceholder?"":o.placeholder),m=n.computed(()=>o.readonly||!o.editable),y=n.ref(!1),p=n.computed(()=>!o.disable&&y.value),g=n.computed(()=>({"text-left":o.textAlign==="left","text-center":o.textAlign==="center","text-right":o.textAlign==="right","form-control":!0,"f-utils-fill":!0})),b=n.computed(()=>({"input-group":!0,"f-state-disabled":o.disable,"f-state-editable":o.editable&&!o.disable&&!o.readonly,"f-state-readonly":o.readonly,"f-state-focus":p.value,"input-group--has-clear":o.enableClear&&d.value}));function w(C,U=!0){e.value=C,U&&(t.emit("change",C),t.emit("update:modelValue",C))}function I(C){c.value=!1,w(C,!0)}n.watch(()=>o.modelValue,C=>{e.value=C});function k(C){y.value=!1,t.emit("blur",C),C.stopPropagation()}function S(C){t.emit("click",C),a(),t.slots.default&&!o.disable&&!o.readonly&&o.popupOnClick&&r.togglePopup()}function h(C){o.disable||(y.value=!0,m.value||(t.emit("focus",C),s.value&&!c.value&&r.popup()))}function v(C){t.emit("input",C.target.value);const U=C.target.value;i.value=U,e.value!==U&&w(U,o.updateOn==="change"),l.value&&!c.value&&r.popup()}function T(C){C.target.tagName!=="INPUT"&&C.preventDefault(),C.stopPropagation()}function F(C){t.emit("keydown",C)}function P(C){C.key==="Enter"&&(l.value||s.value)&&r.hidePopup(),t.emit("keyup",C)}function L(C){const U=C.target.value;C.stopPropagation(),w(U)}return{hasFocusedTextBox:p,isTextBoxReadonly:m,textBoxClass:g,textBoxPlaceholder:u,textBoxTitle:f,inputGroupClass:b,hasClearClass:d,changeTextBoxValue:w,commitValue:I,onBlurTextBox:k,onClickTextBox:S,onFocusTextBox:h,onInput:v,onKeyDownTextBox:F,onKeyUpTextBox:P,onMouseDownTextBox:T,onTextBoxValueChange:L}}const Re="FarrisVue_PopoverInstancesKey";function Ho(o,t,e,i){const r=n.ref(),l=n.ref(!1),{judgeCanOpen:s}=Yt(o,i);n.watch(()=>r.value,(y,p)=>{window[Re]=window[Re]||new WeakMap,y?window[Re].set(e.value,y):window[Re].delete(e.value)});function c(){if(window[Re]){const y=window[Re];document.querySelectorAll(".f-button-edit,.v-popover").forEach(p=>{y.get(p)&&p!==e.value&&y.get(p).hide()})}}function a(){const y=r.value;y&&y.show(e.value)}async function d(y=!1){if(!!t.slots.default){if(!y&&!l.value&&!await s())return;l.value=!l.value,await n.nextTick(),a()}}async function f(y=!1){if(!!t.slots.default){if(!y&&!await s())return;l.value=!0,await n.nextTick(),a()}}function u(){l.value=!1}function m(){l.value=!0,n.nextTick(()=>{a()})}return{hidePopup:u,showPopup:m,popup:f,shouldPopupContent:l,togglePopup:d,popoverRef:r,closeAllPopover:c}}function Uo(o,t,e){const i=n.ref(),{isTextBoxReadonly:r,textBoxClass:l,textBoxPlaceholder:s,textBoxTitle:c,onBlurTextBox:a,onClickTextBox:d,onFocusTextBox:f,onInput:u,onKeyDownTextBox:m,onKeyUpTextBox:y,onMouseDownTextBox:p,onTextBoxValueChange:g}=e;return n.onMounted(()=>{var b,w;o.selectOnCreated&&((b=i.value)==null||b.select()),o.focusOnCreated&&((w=i.value)==null||w.focus({preventScroll:!0}))}),()=>n.createVNode("input",{ref:i,name:"input-group-value",autocomplete:o.autoComplete?"on":"off",class:l.value,disabled:o.disable,maxlength:o.maxLength,minlength:o.minLength,placeholder:s.value,readonly:r.value,tabindex:o.tabIndex,title:c.value,type:o.inputType,value:t.value,onBlur:a,onChange:g,onClick:d,onFocus:f,onInput:u,onKeydown:m,onKeyup:y,onMousedown:p},null)}function Do(o,t,e){const i=n.ref(o.separator),r=n.computed(()=>o.readonly||o.disable),{changeTextBoxValue:l,onFocusTextBox:s,onBlurTextBox:c,onClickTextBox:a,textBoxPlaceholder:d}=e,f=n.computed(()=>t.value?t.value.split(i.value).map(p=>({name:p,selectable:!0})):[]);function u(p){l(p.map(g=>g.name).join(i.value),!0)}n.watch(()=>o.separator,p=>{i.value=p});const m=n.ref(!o.disable&&!o.readonly);n.watch([()=>o.disable,()=>o.readonly],([p,g],[b,w])=>{m.value=!p&&!g});function y(p){a(p)}return()=>n.createVNode(on,{tabindex:o.tabIndex,onFocus:s,onBlur:c,id:`${o.id}-tag-editor`,class:"form-control",placeholder:d.value,data:f.value,showClose:!r.value,showInput:!0,disable:r.value,onChange:u,onClick:y},null)}function zo(o,t,e,i){const{buttonGroupClass:r,onClickButton:l,onMouseEnterButton:s,onMouseLeaveButton:c}=e,{enableClearButton:a,showClearButton:d,onClearValue:f}=i,u=n.ref();return{renderButtonGroup:()=>n.createVNode("div",{id:`${o.id}-button-group`,class:r.value},[a.value&&n.withDirectives(n.createVNode("span",{class:"input-group-text input-group-clear",onClick:f},[n.createVNode("i",{class:"f-icon modal_close"},null)]),[[n.vShow,d.value]]),t.slots.buttonContent?n.createVNode("span",{class:"input-group-text input-group-append-button",onClick:l,onMouseenter:s,onMouseleave:c},[t.slots.buttonContent()]):o.buttonContent?n.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:o.buttonContent,ref:u,onClick:l,onMouseenter:s,onMouseleave:c},null):null]),buttonHandleElement:u}}function Wo(o,t,e){const i=n.ref(o.popupMinWidth),{hidePopup:r,popoverRef:l}=e;return()=>n.createVNode(an,{id:`${o.id}-popover`,ref:l,placement:o.placement,host:o.popupHost,"keep-width-with-reference":o.keepWidthWithReference,fitContent:!0,"right-boundary":o.popupRightBoundary,minWidth:i.value,class:o.popupClass,offsetX:o.popupOffsetX,onHidden:r,limitContentBySpace:o.limitContentBySpace},{default:()=>{var s,c;return[(c=(s=t.slots).default)==null?void 0:c.call(s)]}})}const Go=n.defineComponent({name:"FButtonEdit",props:No,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(o,t){const e=n.ref(),i=n.ref(o.customClass),r=n.ref(o.modelValue),l=Ho(o,t,e,r),{shouldPopupContent:s,hidePopup:c,showPopup:a,togglePopup:d}=l,f=qo(o,t,e,l,r),u=n.ref(""),m=Ao(o,t,r,u,l),{hasFocusedTextBox:y,commitValue:p,inputGroupClass:g}=m,b=Lo(o,t,r,y,u,m),{onMouseEnterTextBox:w,onMouseLeaveTextBox:I}=b,k=n.computed(()=>{const O={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!o.wrapText};return i.value&&i.value.split(" ").reduce((A,z)=>(A[z]=!0,A),O),O}),S=n.computed(()=>({overflow:o.wrapText?"hidden":""})),h=n.computed(()=>({paddingLeft:"3px",backgroundColor:"#fff"}));function v(){if(!o.multiSelect||o.inputType!=="tag"||!e.value)return 0;let O=0;const A=Array.from(e.value.querySelectorAll(".farris-tag-item"));return A&&A.length&&(O=A.map(z=>z.offsetTop).filter(z=>z>20).length),O}const T=n.ref(v());n.onUpdated(()=>{T.value=v()});function F(){return o.multiSelect&&o.inputType==="tag"?()=>n.createVNode(n.Fragment,null,[Do(o,r,m)(),!!T.value&&n.createVNode("div",{class:"d-flex flex-row mr-2 more-tags","more-tags":!0},[n.createVNode("span",{class:"multi--more-text"},[n.createTextVNode("+"),T.value])])]):Uo(o,r,m)}let P=F();n.watch([()=>o.multiSelect,()=>o.inputType],()=>{P=F()});const{renderButtonGroup:L,buttonHandleElement:C}=zo(o,t,f,b),U=Wo(o,t,l),_={commitValue:p,elementRef:e,hidePopup:c,showPopup:a,popoverRef:l.popoverRef,shouldPopupContent:s,togglePopup:d,openDialog:()=>{C.value&&o.buttonBehavior==="Modal"&&C.value.click()},getModal:()=>{var O;return o.buttonBehavior==="Modal"?(O=f.modalRef.value)==null?void 0:O.value:null}};return n.onMounted(()=>{e.value.componentInstance=_,window.onresize=()=>{document.body.click()}}),n.onBeforeUnmount(()=>{var O;window.onresize=null,(O=window[Re])==null||O.delete(e.value)}),t.expose(_),()=>n.createVNode(n.Fragment,null,[n.createVNode("div",n.mergeProps(t.attrs,{ref:e,class:k.value,id:o.id,style:S.value}),[n.createVNode("div",{id:`${o.id}-input-group`,class:g.value,style:h.value,onMouseenter:w,onMouseleave:I},[P(),L()])]),s.value&&U()])}}),_o=n.defineComponent({name:"FQuerySolutionConfig",props:Xt,emits:["update:modelValue"],setup(o,t){const e=n.ref(null),i=n.computed(()=>"共"+o.modelValue.length+"项"),r=new Map,l=Bo(o,t,e,r),{renderPanel:s}=l,{renderTransfer:c,initData:a,confirm:d,cancel:f}=Vo(o,t,e,r);function u(){d()}function m(){f()}const y={fitContent:!1,width:900,height:600,draggable:!0,title:"筛选方案配置",acceptCallback:u,rejectCallback:m};function p(){return n.createVNode(n.Fragment,null,[c(),s()])}return()=>n.createVNode(Go,{id:o.id,"button-behavior":"Modal",editable:!1,"modal-options":y,modelValue:i.value,"onUpdate:modelValue":g=>i.value=g,onClickButton:()=>a()},{default:()=>[n.createVNode("div",{class:"query-solution-config d-flex f-utils-absolute-all"},[p()])]})}}),Xo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"filter-bar-config",description:"A Farris Container Component",properties:{fieldsConfig:{description:"所有字段(树结构)",type:"array"},designViewModelUtils:{description:"",type:"object"},formSchemaUtils:{description:"",type:"object"},metadataService:{description:"",type:"object"},viewModelId:{description:"",type:"array"},eventsEditorUtils:{description:"",type:"object"}}},Yo=new Map([["appearance",Qe]]);function Qo(o,t,e){return t}const Jo=Ye({fieldsConfig:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"filter-bar"},onFieldsChanged:{type:Function,default:null},formSchemaUtils:{type:Object,default:{}},metadataService:{type:Object,default:{}},designViewModelUtils:{type:Object,default:{}},eventsEditorUtils:{type:Object,default:{}},viewModelId:{type:String,default:""}},Xo,Yo,Qo);Me.install=o=>{o.component(Me.name,Me)},Me.register=(o,t,e,i)=>{o["filter-bar"]=Me,t["filter-bar"]=gt,o["filter-bar-config"]=_o,t["filter-bar-config"]=Jo},Me.registerDesigner=(o,t,e)=>{o["filter-bar"]=xo,t["filter-bar"]=gt},Q.FFilterBar=Me,Q.default=Me,Q.filterBarProps=ot,Q.propsResolver=gt,Object.defineProperties(Q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|