@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
20 lines • 292 kB
JavaScript
(function(Q,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("lodash-es"),require("../common/index.umd.js"),require("../data-view/index.umd.js"),require("../checkbox/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../tags/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/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("../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("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/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("../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("../text/index.umd.js"),require("../time-picker/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("../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("../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("@vueuse/core"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../common/index.umd.js","../data-view/index.umd.js","../checkbox/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../tags/index.umd.js","../dynamic-form/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/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","../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","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/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","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/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","../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","../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","@vueuse/core","../notify/index.umd.js"],i):(Q=typeof globalThis<"u"?globalThis:Q||self,i(Q["list-view"]={},Q.Vue,Q.LodashES,Q.common,Q.dataView,Q.checkbox,null,Q.FTransfer,Q.FTabs,Q.FOrder,null,Q.FFilterBar,Q.FTooltip,Q.FPagination,Q.FButton,Q.FSearchBox,Q.FTags,Q.FDynamicForm,Q.dynamicResolver,null,null,Q.FAccordion,Q.FAvatar,Q.FButtonEdit,Q.FButtonGroup,Q.FCalendar,Q.FCapsule,Q.FCheckbox,Q.FCheckboxGroup,Q.FComboList,Q.FComboTree,Q.FComponent,Q.FColorPicker,Q.FContentContainer,Q.FDatePicker,Q.FDataGrid,Q.FDropdown,Q.FEventsEditor,Q.FFieldSelector,Q.FBindingSelector,Q.FImageCropper,Q.FInputGroup,Q.FLayout,Q.FListNav,Q.FListView$1,Q.FLookup,Q.FMappingEditor,Q.FNav,Q.FNumberRange,Q.FNumberSpinner,Q.FPageHeader,Q.FPageFooter,Q.FProgress,Q.FQuerySolution,Q.FRadioGroup,Q.FRate,Q.FResponseToolbar,Q.FResponseLayout,Q.FResponseLayoutEditorSetting,Q.FSection,Q.FSmokeDetector,Q.FSplitter,Q.FStep,Q.FSwitch,Q.FText,Q.FTimePicker,Q.FTreeview,Q.FUploader,Q.FVerifyDetail,Q.FVideo,Q.FTextArea,Q.FSchemaSelector,Q.FTreeGrid$1,Q.FEventParameter,Q.FFilterConditionEditor,Q.FFieldset,Q.FSortConditionEditor,Q.FMenuLookup,Q.FDrawer,Q.FJsonEditor,Q.FPropertyEditor,Q.FExpressionEditor,Q.FCodeEditor,Q.FHtmlTemplate,null,Q.VueUseCore))})(this,function(Q,i,Ee,Oe,be,Wt,Mc,Gr,zr,Yr,Ec,Ur,wn,Xr,Qr,Kr,Jr,en,Zr,Oc,Ic,eo,to,no,ro,oo,io,bn,Cn,tn,ao,so,lo,co,uo,fo,po,mo,ho,go,vo,yo,wo,bo,Co,xo,_o,So,To,ko,Vo,Fo,No,Mo,Eo,Oo,Io,Do,jo,Po,Ro,Bo,$o,Ho,Lo,Wo,qo,Ao,Go,zo,Yo,Uo,Xo,Qo,Ko,Jo,Zo,ei,ti,ni,ri,oi,ii,ai,Dc,xn){"use strict";var Fc=Object.defineProperty;var Nc=(Q,i,Ee)=>i in Q?Fc(Q,i,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):Q[i]=Ee;var R=(Q,i,Ee)=>Nc(Q,typeof i!="symbol"?i+"":i,Ee);const _n={},Sn={};function nn(n){const{properties:t,title:e,ignore:r}=n,o=r&&Array.isArray(r),a=Object.keys(t).reduce((s,l)=>((!o||!r.find(c=>c===l))&&(s[l]=t[l].type==="object"&&t[l].properties?nn(t[l]):Ee.cloneDeep(t[l].default)),s),{});if(e&&(!o||!r.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");a.id=`${s}_${Math.random().toString().slice(2,6)}`}return a}function si(n){const{properties:t,title:e,required:r}=n;if(r&&Array.isArray(r)){const o=r.reduce((a,s)=>(a[s]=t[s].type==="object"&&t[s].properties?nn(t[s]):Ee.cloneDeep(t[s].default),a),{});if(e&&r.find(a=>a==="id")){const a=e.toLowerCase().replace(/-/g,"_");o.id=`${a}_${Math.random().toString().slice(2,6)}`}return o}return{type:e}}function Tn(n,t={},e){const r=_n[n];if(r){let o=si(r);const a=Sn[n];return o=a?a({getSchemaByType:Tn},o,t,e):o,o}return null}function li(n,t){const e=nn(t);return Object.keys(e).reduce((r,o)=>(Object.prototype.hasOwnProperty.call(n,o)&&(r[o]&&Ee.isPlainObject(r[o])&&Ee.isPlainObject(n[o]||!n[o])?Object.assign(r[o],n[o]||{}):r[o]=n[o]),r),e),e}function kn(n,t){return Object.keys(n).filter(r=>n[r]!=null).reduce((r,o)=>{if(t.has(o)){const a=t.get(o);if(typeof a=="string")r[a]=n[o];else{const s=a(o,n[o],n);Object.assign(r,s)}}else r[o]=n[o];return r},{})}function ci(n,t,e=new Map){const r=li(n,t);return kn(r,e)}function ui(n={}){function t(u,d,f,p){if(typeof f=="number")return p[u].length===f;if(typeof f=="object"){const h=Object.keys(f)[0],g=f[h];if(h==="not")return Number(p[u].length)!==Number(g);if(h==="moreThan")return Number(p[u].length)>=Number(g);if(h==="lessThan")return Number(p[u].length)<=Number(g)}return!1}function e(u,d,f,p){return p[u]&&p[u].propertyValue&&String(p[u].propertyValue.value)===String(f)}const r=new Map([["length",t],["getProperty",e]]);Object.keys(n).reduce((u,d)=>(u.set(d,n[d]),u),r);function o(u,d){const f=u;return typeof d=="number"?[{target:f,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:f,operator:"getProperty",param:u,value:!!d}]:typeof d=="object"?Object.keys(d).map(p=>{if(p==="length")return{target:f,operator:"length",param:null,value:d[p]};const h=p,g=d[p];return{target:f,operator:"getProperty",param:h,value:g}}):[]}function a(u){return Object.keys(u).reduce((f,p)=>{const h=o(p,u[p]);return f.push(...h),f},[])}function s(u,d){if(r.has(u.operator)){const f=r.get(u.operator);return f&&f(u.target,u.param,u.value,d)||!1}return!1}function l(u,d){return a(u).reduce((h,g)=>h&&s(g,d),!0)}function c(u,d){const f=Object.keys(u),p=f.includes("allOf"),h=f.includes("anyOf"),g=p||h,v=(g?u[g?p?"allOf":"anyOf":"allOf"]:[u]).map(y=>l(y,d));return p?!v.includes(!1):v.includes(!0)}return{parseValueSchema:c}}const ue={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:"筛选条"}},di={},fi={};ui();function gt(n,t,e=new Map,r=(s,l,c,u)=>l,o={},a=s=>s){return _n[t.title]=t,Sn[t.title]=r,di[t.title]=o,fi[t.title]=a,(s={},l=!0)=>{if(!l)return kn(s,e);const c=ci(s,t,e),u=Object.keys(n).reduce((d,f)=>(d[f]=n[f].default,d),{});return Object.assign(u,c)}}function qt(n,t){return{customClass:t.class,customStyle:t.style}}function pi(){function n(t,e){const{dataSource:r}=t||{};return r===void 0?{}:{}}return{resolve:n}}function mi(){function n(t,e){return t.selectItemById(e)}return{selectItemById:n}}function hi(){function n(t,e){const{columns:r}=e;return t.updateColumns(r)}return{updateColumns:n}}const Vn=new Map([["appearance",qt]]);function Fn(n,t,e){return t}const gi={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-view.schema.json",title:"list-view",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for list-view",type:"string"},type:{description:"The type string of list-view",type:"string",default:"list-view"},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"]},vi={title:"list-view",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:[]}}}}}},Rt={columns:{type:Array,default:[{field:"name",title:"",dataType:"string"}]},customClass:{type:String,default:""},data:{type:Array,default:[]},draggable:{type:Boolean,default:!1},multiSelect:{Type:Boolean,default:!1},multiSelectMode:{Type:String,default:"OnCheck"},idField:{Type:String,default:"id"},valueField:{Type:String,default:"id"},textField:{Type:String,default:"name"},titleField:{Type:String,default:"name"},view:{Type:String,default:"ContentView"},size:{Type:String,default:"default"},placeholder:{type:String,default:""},header:{Type:String,default:"ContentHeader"},headerClass:{Type:String,default:""},itemClass:{Type:String,default:""},itemContentClass:{Type:String,default:""},selectionValues:{type:Array,default:[]},group:{type:Object},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},keepOrder:{type:Boolean,default:!1},disableField:{type:String,default:"disabled"},enableHighlightSearch:{type:Boolean,default:!0},virtualized:{type:Boolean,default:!0}},rn=gt(Rt,gi,Vn,Fn,vi);function Nn(n,t){function e(a){const s=[];let l=a.nextNode();for(;l;)s.push(l),l=a.nextNode();return s}function r(a,s){const l=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);return e(l).map(f=>({textNode:f,text:(f.textContent||"").toLocaleLowerCase()})).map(({textNode:f,text:p})=>{const h=[];let g=0;for(;g<p.length;){const N=p.indexOf(s,g);if(N===-1)break;h.push(N),g=N+s.length}return h.map(N=>{const _=new Range;return _.setStart(f,N),_.setEnd(f,N+s.length),_})}).flat()}function o(a){if(!CSS.highlights||(CSS.highlights.clear(),!a||!t))return;const s=r(t.value,a.toLocaleLowerCase()),l=new Highlight(...s);CSS.highlights.set("search-result",l)}return{search:o}}function Mn(n,t,e,r,o,a,s,l,c,u){const d=i.ref(n.size),f=i.ref(n.textField),p=i.ref(n.titleField),h=i.ref(n.disableField),g=i.computed(()=>{var x,b;return((x=n.selection)==null?void 0:x.multiSelect)&&((b=n.selection)==null?void 0:b.showCheckbox)}),{onMouseenterItem:N,onMouseoverItem:_,onMouseoutItem:v}=a,{getKey:S,listViewItemClass:y,onCheckItem:T,onClickItem:k}=s,C=i.computed(()=>{const x={"text-overflow":"ellipsis",overflow:"hidden","white-space":"nowrap"};return n.itemClass?x:{margin:d.value==="small"?"0.25rem 0":"8px 0",...x}});function m(x,b,V){return x.checked=l.findIndexInSelectedItems(x)>-1,i.createVNode("li",{class:y(x,b),id:S(x,b),key:S(x,b),onClick:w=>k(w,x,b),onMouseenter:w=>N(w,x,b),onMouseover:w=>_(w,x,b),onMouseout:w=>v(w,x,b)},[g.value&&i.createVNode("div",{class:"f-list-select",onClick:w=>w.stopPropagation()},[i.createVNode(Wt.FCheckbox,{id:"list-"+S(x,b),customClass:"listview-checkbox",disabled:x[h.value],checked:x.checked,"onUpdate:checked":w=>x.checked=w,onChange:w=>{T(x,b,!w.checked)}},null)]),i.createVNode("div",{class:"f-list-content"},[i.createVNode("div",{class:n.itemContentClass,style:C.value,title:x.raw[p.value]||x.raw[f.value]},[x.raw[f.value]])])])}return{renderItem:m}}function yi(n,t,e,r,o,a,s,l,c,u){const d=i.ref(n.multiSelect),f=i.ref(n.disableField),p=i.ref(n.textField),{onMouseenterItem:h,onMouseoverItem:g,onMouseoutItem:N}=a,{getKey:_,listViewItemClass:v,onCheckItem:S,onClickItem:y}=s;function T(C,m,x){return t.slots.content?i.createVNode(i.Fragment,null,[t.slots.content&&t.slots.content({item:C.raw,index:m,selectedItem:x})]):i.createVNode("div",{style:"margin: 10px 0;"},[C.raw[p.value||"name"]])}function k(C,m,x){return i.createVNode("li",{class:v(C,m),id:_(C,m),key:_(C,m),onClick:b=>y(b,C,m),onMouseenter:b=>h(b,C,m),onMouseover:b=>g(b,C,m),onMouseout:b=>N(b,C,m)},[d.value&&i.createVNode("div",{class:"f-list-select",onClick:b=>b.stopPropagation()},[i.createVNode(Wt.FCheckbox,{id:"list-"+_(C,m),customClass:"listview-checkbox",disabled:C[f.value]||!C.checked,checked:C.checked,"onUpdate:checked":b=>C.checked=b,onChange:b=>S(C,m,!b.checked)},null)]),i.createVNode("div",{class:"f-list-content"},[T(C,m,x)])])}return{renderItem:k}}function wi(n,t,e,r,o,a,s,l,c,u){const d=i.ref(n.multiSelect),f=i.ref(n.disableField),p=i.ref(n.textField),{onMouseenterItem:h,onMouseoverItem:g,onMouseoutItem:N}=a,{getKey:_,listViewItemClass:v,onCheckItem:S,onClickItem:y}=s,{dragstart:T,dragenter:k,dragover:C,dragend:m}=r,{removeItem:x}=c,b=i.computed(()=>({margin:d.value?"10px 0":"10px 0px 10px 14px"}));function V(M,P=""){const B=M.target;B.title=B.scrollWidth>B.clientWidth?P:""}function w(M){return i.createVNode("div",{style:b.value,onMouseenter:P=>V(P,M.raw[p.value||"name"])},[M.raw[p.value||"name"]])}function O(){return t.slots.itemContent?t.slots.itemContent:w}const I=O();function F(M,P,B){return i.createVNode("li",{class:v(M,P),id:_(M,P),key:_(M,P),onClick:E=>y(E,M,P),onMouseenter:E=>h(E,M,P),onMouseover:E=>g(E,M,P),onMouseout:E=>N(E,M,P),draggable:"true",onDragstart:E=>T(E,M,P),onDragenter:E=>k(E,P),onDragend:E=>m(E,M),onDragover:E=>C(E)},[d.value&&i.createVNode("div",{class:"f-list-select",onClick:E=>E.stopPropagation()},[i.createVNode(Wt.FCheckbox,{id:"list-"+_(M,P),customClass:"listview-checkbox",disabled:M[f.value]||!M.checked,checked:M.checked,"onUpdate:checked":E=>M.checked=E,onChange:E=>S(M,P,!E.checked)},null)]),i.createVNode("div",{class:"f-list-content"},[I(M)]),i.createVNode("div",{class:"f-list-remove",onClick:E=>x(P)},[i.createVNode("div",{class:"f-list-remove-icon"},[i.createVNode("i",{class:"f-icon f-icon-remove_face"},null)])]),i.createVNode("div",{class:"f-list-handle"},[i.createVNode("div",null,[i.createVNode("i",{class:"f-icon f-icon-drag-vertical"},null)])])])}return{renderItem:F}}function bi(n,t,e,r,o,a,s,l,c,u){var _;const d=i.ref(((_=n.group)==null?void 0:_.groupFields)||[]),{collpaseGroupIconClass:f}=o,{toggleGroupRow:p}=u;function h(v,S){S.collapse=!S.collapse,e.value=p(S.collapse?"collapse":"expand",S,e.value)}function g(v,S,y){return t.slots.group?i.createVNode(i.Fragment,null,[t.slots.content&&t.slots.group({item:v.raw,index:S,selectedItem:y})]):i.createVNode("div",{class:"f-navlookup-recentHeader",onClick:T=>h(T,v)},[i.createVNode("div",{class:"fv-grid-group-row-icon"},[i.createVNode("span",{class:f(v)},null)]),i.createVNode("div",{class:"f-navlookup-recommandLabel"},[v.raw[d.value[v.layer]]])])}function N(v,S,y){return v.layer>-1&&g(v,S,y)}return{renderItem:N}}function Ci(n,t,e,r){const{dataView:o}=e,{updateSelectedItems:a}=r;function s(l){if(l>-1&&l<o.value.length){const c=o.value.splice(l,1);a(),t.emit("removeItem",c[0])}}return{removeItem:s}}function En(n,t,e,r,o,a,s,l,c,u){const d=i.ref(n.view),f=i.ref(n.view==="CardView"),p=i.ref({}),h=i.ref("暂无数据"),g=Ci(n,t,r,c),N=i.computed(()=>({"f-list-view-group":!0,"f-list-view-group-multiselect":n.multiSelect,"d-flex":f.value,"flex-wrap":f.value})),_=i.computed(()=>!!e.value&&e.value.length>0),v=i.computed(()=>e.value.length===0);i.computed(()=>v.value&&!t.slots.empty);function S(){return d.value==="SingleView"?Mn:d.value==="DraggableView"?wi:(d.value==="ContentView"||d.value==="CardView")&&t.slots.content?yi:Mn}const y=S(),{renderItem:T}=y(n,t,e,u,o,a,c,s,g,l),{renderItem:k}=bi(n,t,e,u,o,a,c,s,g,l),C=[T,k];function m(){return e.value.filter(V=>V.visible!==!1).map((V,w)=>C[V.type](V,w,p))}function x(){return i.createVNode("div",{class:"f-list-view-emptydata",style:"margin: 0 auto;"},[i.createVNode("p",{class:"f-empty-title"},[t.slots.empty?t.slots.empty():h.value])])}function b(){return i.createVNode("ul",{class:N.value,style:"list-style: none;"},[_.value&&m(),v.value&&x()])}return{renderListArea:b}}function On(n,t,e){function r(){return t.slots.header&&i.createVNode("div",{class:"f-list-view-header"},[t.slots.header()])}return{renderHeader:r}}function At(n,t,e){const r=i.ref(n.headerClass),o=i.ref(n.placeholder),a=i.ref(""),s=i.computed(()=>!a.value),l=i.computed(()=>!!a.value);function c(p){a.value=""}i.watch(a,p=>{n.enableHighlightSearch&&e.search(p),t.emit("afterSearch",p)});const u=i.computed(()=>{const p={"form-group":!0,"farris-form-group":!0};return r.value&&r.value.split(" ").reduce((g,N)=>(g[N]=!0,g),p),p});function d(p){}function f(){return i.createVNode("div",{class:"f-list-view-header",onClick:i.withModifiers(()=>d,["prevent","stop"])},[i.createVNode("div",{class:u.value},[i.createVNode("div",{class:"farris-input-wrap"},[i.createVNode("div",{class:"f-cmp-inputgroup"},[i.createVNode("div",{class:"input-group f-state-editable"},[i.withDirectives(i.createVNode("input",{class:"form-control f-utils-fill text-left","onUpdate:modelValue":p=>a.value=p,name:"input-group-value",type:"text",placeholder:o.value,autocomplete:"off"},null),[[i.vModelText,a.value]]),i.createVNode("div",{class:"input-group-append"},[l.value&&i.createVNode("span",{class:"input-group-text input-group-clear",onClick:p=>c()},[i.createVNode("i",{class:"f-icon f-icon-close-circle"},null)]),s.value&&i.createVNode("span",{class:"input-group-text"},[i.createVNode("span",{class:"f-icon f-icon-search"},null)])])])])])])])}return{renderHeader:f}}function In(){const n=i.ref(""),t=i.ref(-1),e=i.ref(""),r=i.ref(-1),o=i.ref(!1);function a(f,p,h){r.value=h}function s(f,p,h){o.value||(r.value=h)}function l(f,p,h){r.value=-1}function c(){o.value=!0}function u(){o.value=!1}function d(){t.value=-1,n.value=""}return{activeIndex:t,focusedItemId:e,hoverIndex:r,clearActiveItem:d,onMouseenterItem:a,onMouseoverItem:s,onMouseoutItem:l,resumeHover:u,suspendHover:c}}function Dn(n,t,e,r){const o=i.ref(n.idField),{dataView:a}=e,s=i.ref(-1),l=i.ref(!1),{activeIndex:c,focusedItemId:u,hoverIndex:d,resumeHover:f,suspendHover:p}=r;let h,g=0,N=0;function _(C,m){const x=C-g,b=m-N;h.style.left=parseInt(h.style.left)+x+"px",h.style.top=parseInt(h.style.top)+b+"px",g=C,N=m}function v(C){const{left:m,top:x}=C.getBoundingClientRect(),b=C.cloneNode(!0);return b.style.cssText=`
position:absolute;
left:${m}px;
top:${x}px;
z-index: 999999;
border: 1px solid #e2e3e5;
pointer-events: none;
background-color: #edf5ff;
border-radius: 10px;
margin: 4px 2px;
display: flex;
align-items: center;
float: none;
text-align: initial;
width:${getComputedStyle(C).width};
height:${getComputedStyle(C).height};
`,b.children[0].style.cssText="overflow: hidden;flex: 1 1 auto;width: 100%;",b.children[0].children[0].style.cssText=`
margin: 10px 0px 10px 14px;
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
`,b.children[1].style.cssText="width: 30px;color: #f4625f;padding: 0 14px 0 0",b.children[2].style.cssText="padding: 0 14px 0 0;",document.body.appendChild(b),b}function S(C,m,x){if(C.stopPropagation(),p(),m){if(h=v(C.target),C.dataTransfer){const b=new Image;b.src="",C.dataTransfer.setDragImage(b,0,0)}g=C.pageX,N=C.pageY,setTimeout(()=>{s.value=x,l.value=!0,m.moving=!0})}}function y(C,m){if(C.preventDefault(),s.value!==m){const x=a.value[s.value],b=a.value;b.splice(s.value,1),b.splice(m,0,x),s.value=m,_(C.pageX,C.pageY)}}function T(C){C.preventDefault(),C.dataTransfer&&(C.dataTransfer.dropEffect="move"),_(C.pageX,C.pageY)}function k(C,m){m&&(m.moving=!1,h&&(document.body.removeChild(h),h=null)),a.value.forEach((x,b)=>{x.__fv_index__=b}),l.value=!1,f(),d.value=m.raw.__fv_index__,c.value=m.raw.__fv_index__,u.value=m.raw[o.value],t.emit("change",a.value),t.emit("activeChange",[m.raw])}return{dragstart:S,dragenter:y,dragover:T,dragend:k,isDragging:l}}function jn(n,t,e,r,o,a){const s=i.ref(n.idField),l=i.ref(n.disableField),c=i.ref(n.draggable),u=i.ref(n.itemClass),d=i.ref(n.selection.multiSelect??!1),f=i.ref(n.selection.multiSelectMode),{isDragging:p}=r,{activeIndex:h,focusedItemId:g,hoverIndex:N}=o,{clearSelection:_,getSelectedItems:v,toggleSelectItem:S,currentSelectedDataId:y}=a,T=i.ref(v()),k=F=>T.value.length===0?!1:T.value.some(M=>{let P="";return M.data?P=M.data[s.value]:P=M[s.value],P===F});function C(){T.value=v()}function m(F,M){return F.raw[s.value]!=null?F.raw[s.value]:""}function x(F,M){const P={"f-list-view-group-item":!0,"f-list-view-draggable-item":c.value,"f-un-click":!F.checked,"f-un-select":!!F.raw[l.value],"f-listview-active":d.value&&k(m(F))||F.raw[s.value]===y.value,"f-listview-hover":!p.value&&M===N.value,moving:!!F.moving};return u.value.split(" ").reduce((E,H)=>(E[H]=!0,E),P),P}const b=i.computed(()=>!d.value);function V(F,M,P){F.checked=P,!F.raw[l.value]&&(b.value&&(g.value=F.raw[s.value]),S(F))}const w=i.computed(()=>d.value&&f.value==="OnCheckClearByClick"),O=i.computed(()=>!d.value||d.value&&(f.value==="OnCheckAndClick"||f.value==="OnClick"));function I(F,M,P){if(M.raw[l.value]){F.preventDefault(),F.stopPropagation();return}g.value=M.raw[s.value],h.value=P,w.value&&_(),O.value&&(S(M),C()),t.emit("clickItem",{data:T.value,index:P}),t.emit("activeChange",T.value)}return{getKey:m,selectedItems:T,listViewItemClass:x,updateSelectedItems:C,onCheckItem:V,onClickItem:I}}const vt=i.defineComponent({name:"FListView",props:Rt,emits:["afterSearch","checkValuesChange","clickItem","selectionChange","removeItem","change","activeChange"],setup(n,t){const e=i.ref(),r=i.ref(!0),o=i.ref(!1),a=i.ref([]),s=0,l=i.ref(n.columns),c=be.useFilter(),u=be.useIdentify(n),d=be.useHierarchy(n),f=be.useGroupData(n,u),p=be.useDataView(n,new Map,c,d,u),h=be.useSelection(n,p,u,a,t),g=Nn(n,e),N=i.computed(()=>p.dataView.value.length),_=be.useRow(n,t,h,u),v=be.useEdit(n,t,u,_,a),S=be.useVisualDataBound(n),y=be.useVisualDataCell(n,{},S),T=be.useVisualDataRow(n,p,v,d,u,S,y),k=be.useVisualGroupRow(n,u,y,T),C=be.useVisualSummaryRow(n,u,y,T),m=be.useVisualData(n,l,p,N,s,T,k,C),{getVisualData:x}=m;a.value=x(0,N.value+s-1);const b=i.computed(()=>{const z={"f-list-view":!0,"f-list-view-multiple":n.multiSelect};return n.size!=="default"&&(z[`${n.size}-item`]=!0),Oe.getCustomClass(z,n.customClass)}),V=i.computed(()=>!!t.slots.footer||r.value);function w(){return n.header==="SearchBar"?At:n.header==="ContentHeader"?On:At}const O=w(),{renderHeader:I}=O(n,t,g),F=In(),M=Dn(n,t,p,F),P=jn(n,t,a,M,F,h),{renderListArea:B}=En(n,t,a,p,f,F,h,m,P,M);function E(z){g.search(z)}function H(z){z&&(p.load(z),a.value=x(0,N.value+s-1))}function X(){h.clearSelection(),F.clearActiveItem()}function j(){return P.selectedItems.value}function D(){return P.selectedItems.value.map(z=>z[u.idField.value])}function U(z){h.selectedValues.value=z,P.updateSelectedItems()}function W(){return h.currentSelectedDataId.value}function L(z){_.activeRowById(z)}t.expose({search:E,updateDataSource:H,clearSelection:X,getSelections:j,updateSelectionByIds:U,getSelectionIds:D,activeRowById:L,getCurrentRowId:W});function A(z){n.multiSelect&&(z.preventDefault(),z.stopPropagation())}return()=>i.createVNode("div",{class:b.value,onClick:A},[I(),i.createVNode("div",{ref:e,class:"f-list-view-content",onMouseover:()=>{o.value=!0},onMouseleave:()=>{o.value=!1}},[B()]),V.value&&i.createVNode("div",{class:"f-list-view-footer"},[t.slots.footer&&t.slots.footer()])])}});function on(n,t,e){var m;const r=e&&e.getStyles&&e.getStyles()||"",o=e&&e.getDesignerClass&&e.getDesignerClass()||"",a=i.ref();function s(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:e&&e.checkCanMoveComponent?e.checkCanMoveComponent():!0}function l(){return!1}function c(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:e&&e.checkCanDeleteComponent?e.checkCanDeleteComponent():!0}function u(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:e&&e.hideNestedPaddingInDesginerView?e.hideNestedPaddingInDesginerView():!1}function d(x){if(!x||!x.value)return null;if(x.value.schema&&x.value.schema.type==="component")return x.value;const b=i.ref(x==null?void 0:x.value.parent),V=d(b);return V||null}function f(x=t){var O;if(e!=null&&e.getDraggableDesignItemElement)return e.getDraggableDesignItemElement(x);const{componentInstance:b,designerItemElementRef:V}=x;if(!b||!b.value)return null;const{getCustomButtons:w}=b.value;return b.value.canMove||w&&((O=w())!=null&&O.length)?V:f(x.parent)}function p(x){return!!e&&e.canAccepts(x)}function h(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function g(){}function N(x,b){var V;!x||!b||(e!=null&&e.onAcceptMovedChildElement&&e.onAcceptMovedChildElement(x,b),(V=t==null?void 0:t.setupContext)==null||V.emit("dragEnd"))}function _(x,b){const{componentType:V}=x;let w=Tn(V,x,b);e&&e.onResolveNewComponentSchema&&(w=e.onResolveNewComponentSchema(x,w));const O=V.toLowerCase().replace(/-/g,"_");return w&&!w.id&&w.type===V&&(w.id=`${O}_${Math.random().toString().slice(2,6)}`),w}function v(x){x&&e!=null&&e.onChildElementMovedOut&&e.onChildElementMovedOut(x)}function S(...x){if(e&&e.getPropsConfig)return e.getPropsConfig(...x)}function y(x){if(!x)return;const b=t==null?void 0:t.schema,{formSchemaUtils:V}=x;if(b&&V.getExpressions().length){const w=V.getExpressions().findIndex(O=>O.target===b.id);w>-1&&V.getExpressions().splice(w,1)}}function T(x){e&&e.onRemoveComponent&&e.onRemoveComponent(),y(x),t!=null&&t.schema.contents&&t.schema.contents.map(b=>{let V=b.id;b.type==="component-ref"&&(V=b.component);const w=n.value.querySelectorAll(`#${V}-design-item`);w!=null&&w.length&&Array.from(w).map(O=>{var I;(I=O==null?void 0:O.componentInstance)!=null&&I.value.onRemoveComponent&&O.componentInstance.value.onRemoveComponent(x)})})}function k(){if(e&&e.getCustomButtons)return e.getCustomButtons()}function C(x){if(e&&e.onPropertyChanged)return e.onPropertyChanged(x)}return a.value={canMove:s(),canSelectParent:l(),canDelete:c(),canNested:!u(),contents:t==null?void 0:t.schema.contents,elementRef:n,parent:(m=t==null?void 0:t.parent)==null?void 0:m.componentInstance,schema:t==null?void 0:t.schema,styles:r,designerClass:o,canAccepts:p,getBelongedComponentInstance:d,getDraggableDesignItemElement:f,getDraggingDisplayText:h,getPropConfig:S,getDragScopeElement:g,onAcceptMovedChildElement:N,onChildElementMovedOut:v,addNewChildComponentSchema:_,triggerBelongedComponentToMoveWhenMoved:!!e&&e.triggerBelongedComponentToMoveWhenMoved||i.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!e&&e.triggerBelongedComponentToDeleteWhenDeleted||i.ref(!1),onRemoveComponent:T,getCustomButtons:k,onPropertyChanged:C},a}var Ye=(n=>(n[n.readonly=0]="readonly",n[n.editable=1]="editable",n[n.editing=2]="editing",n))(Ye||{}),lt=(n=>(n[n.initial=0]="initial",n[n.editing=1]="editing",n))(lt||{}),Tt=(n=>(n[n.data=0]="data",n[n.group=1]="group",n[n.summary=2]="summary",n))(Tt||{}),Ze=(n=>(n[n.none=0]="none",n[n.filterable=1]="filterable",n[n.sortable=2]="sortable",n[n.filtered=4]="filtered",n[n.sorted=8]="sorted",n[n.ascending=16]="ascending",n[n.descending=32]="descending",n))(Ze||{});function xi(n,t){var h;const e=String(Date.now()),r=((h=n.rowOption)==null?void 0:h.height)||28,o=i.ref(t.value.primaryColumnsWidth);function a(g){const N={};return g.reduce((_,v,S)=>{const y=S<g.length-1?g[S+1]:null;return S===0&&(_[v.field]={left:0}),v.actualWidth!==void 0&&(_[v.field].width=v.actualWidth),y&&(_[y.field]={left:_[v.field].left+(v.actualWidth||0)}),_},N),N}function s(g,N,_){const v=r*(_+1),y=N[g.field].left-v+(N[g.field].width||0),T=g.parent.height?`${g.parent.height}px`:"";return{left:`${v}px`,width:`${y}px`,height:`${T}`}}function l(g,N,_){return{right:"0px",height:`${g.parent.height?`${g.parent.height}px`:""}`}}function c(g,N){const _=g.parent.height?`${g.parent.height}px`:"";return{left:`${N[g.field].left}px`,height:`${_}`,width:isNaN(Number(N[g.field].width))?"100%":`${N[g.field].width}px`}}function u(g,N,_){const S=(N.spanned||[]).reduce((T,k)=>T+(k.parent.height||0),0)+(g.height||0);return{top:`${g.top}px`,left:`${_[N.field].left}px`,width:`${_[N.field].width}px`,height:`${S}px`,padding:`calc(${S/2}px - 1rem) 0`}}function d(g,N){return`${e}_${g.type}_r_${g.index}_c_${N}_${g.refreshKey||""}`}function f(g){return`${e}_${g.type}_r_${g.index}_${g.refreshKey||""}`}function p(g){const N=g.height?`${g.height}px`:"";return{top:`${g.top}px`,width:isNaN(o.value)?"100%":`${o.value}px`,height:`${N}`}}return i.watch(t,()=>{o.value=t.value.primaryColumnsWidth}),{calculateCellPositionInRow:a,cellKey:d,cellPosition:c,groupCellPosition:s,rowKey:f,rowPosition:p,rowSpanCellPosition:u,summaryCellPosition:l}}function _i(n,t,e){const{hasChildrenField:r}=e,o=i.ref("#9399a0"),a=i.ref(28);function s(){return[].concat(...t.value.filter(p=>p.raw.__fv_descendant_index__.length!==0).map(p=>[...p.raw.__fv_descendant_index__.slice(-1)]).flat()).sort((p,h)=>Number(p)-Number(h))}function l(d){const f=new Array(t.value.length).fill(0);if(n.showLines){const p=s();t.value.forEach((h,g)=>{const N=p.includes(g),_=h.raw[r.value];f[g]=`repeating-linear-gradient(90deg, ${o.value} 0 1px, transparent 0px 2px) ${_?"-10px":"0px"} ${a.value/2}px/20px 1px no-repeat,repeating-linear-gradient(${o.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${N?"50%":"100%"} no-repeat`}),f[0]=""}return f[d]}function c(d,f,p){return p[d].parents.set(d,!0).forEach(g=>{p[g].childsLength=p[g].childWithLines.filter(N=>f[N].visible).length}),f}function u(d){const h=d.raw.__fv_parent_index__===void 0||d.raw.__fv_parent_index__===-1?0:8,g=0,N=d.raw[r.value],_=`${d.layer*10+d.layer*h+g}px`,v=d.visible||Ee.isUndefined(d.visible)?{paddingLeft:`calc(${_} + 0.75rem)`,background:l(d.index),display:"flex",width:"100%",position:"relative"}:{display:"none"};return N||(v.paddingLeft=`calc(${_} + 2rem)`),v}return{hierarchyCellContentStyle:u,handleCollapsedPaddingBottom:c}}function Si(n,t,e){const r=i.ref(n.iconField);function o(a,s){if(r.value)return a.raw[n.iconField];let l="";return a.raw[e.value]!==!0?l=t.value.leafnodes:l=a.collapse?t.value.fold:t.value.unfold,l}return{treeNodeIconsClass:o}}function Ti(n,t,e,r,o,a,s,l){const{dataView:c,hasRealChildren:u,reOrderVisibleIndex:d}=r,{collapseField:f,hasChildrenField:p}=o,{reCalculateVisualDataRows:h,updateVirticalScroll:g}=a;function N(_){if(_.raw[p.value]){const S=c.value[_.raw.__fv_index__];S[f.value]=!S[f.value],r.toggleChildrenVisibiltyByCollapseStatus(S),S[p.value]=u(S),d(),h(),g()}t.emit("expandNode",{row:_})}return{toggleTreeNode:N}}function ki(n){function t(o){return{}}function e(o){const{valign:a,align:s}=o;return{"d-flex":!0,"h-100":!0,"w-100":!0,"justify-content-start":s!=="center"&&s!=="right","justify-content-center":s==="center","justify-content-right":s==="right","align-items-start":a!=="middle"&&a!=="bottom","align-items-center":a==="middle","align-items-end":a==="bottom"}}function r(o){const{align:a,showEllipsis:s}=o;return{"w-100":!0,"text-left":a!=="center"&&a!=="right","text-center":a==="center","text-right":a==="right","text-truncate":s}}return{cellContentPosition:t,cellContentClass:e,cellContentClassWithEllipsis:r}}function Vi(n,t,e,r,o,a,s,l,c,u,d,f,p){const{onClickCell:h}=a,{gridCellClass:g,gridHierarchyCellClass:N,gridRowClass:_,onClickRow:v,onMouseoverRow:S,onMouseoutRow:y}=l,{enableMultiSelect:T,select:k,unSelect:C,selectItem:m}=c;i.ref(n.cellHeight);const x=i.ref(n.treeNodeIconsData||{}),{hasChildrenField:b,shouldShowCheckBox:V,shouldShowIcon:w}=s,{toggleTreeNode:O}=Ti(n,t,r,o,s,d),{toggleSelectHierarchyItem:I}=u,{cellKey:F,cellPosition:M,rowKey:P,rowPosition:B}=xi(n,e),{cellContentClass:E,cellContentPosition:H,cellContentClassWithEllipsis:X}=ki(),{hierarchyCellContentStyle:j}=_i(n,r,s),{treeNodeIconsClass:D}=Si(n,x,b);function U(q,ee){const ye=q.raw[b.value];return{"fv-tree-node-toggle":ye&&q.collapse,"fv-tree-node-toggle-minus":ye&&!q.collapse}}function W(q,ee){q.stopPropagation(),O(ee)}function L(q){q.stopPropagation()}function A(q,ee){return i.createVNode("div",{class:U(q),onClick:ye=>W(ye,q),onDblclick:L},null)}function z(q,ee){return w.value&&i.createVNode("div",{id:"treeNodeIcons",class:D(q,ee)},null)}function oe(q){T.value?(q.checked?k(q):C(q),I(q)):m(q)}function J(q,ee){return V.value&&i.createVNode(Wt.FCheckbox,{id:"checkbox_for_"+F(q,ee.index),indeterminate:q.indeterminate,disabled:q.disabled,checked:q.checked,"onUpdate:checked":ye=>q.checked=ye,onChange:()=>oe(q)},null)}function de(q,ee){return i.createVNode("span",{title:ee.data,style:"user-select:none"},[t.slots.cellTemplate?t.slots.cellTemplate({cell:ee,row:q}):ee.mode===Ye.editing?ee.getEditor(ee):ee.formatter?ee.formatter(ee,q):ee.data!=null?ee.data.toString():ee.data])}function he(q,ee){return i.createVNode("div",{class:X(ee)},[ee.showTips?i.createVNode(wn,null,{default:()=>de(q,ee),contentTemplate:()=>de(q,ee)}):de(q,ee)])}function _e(q,ee,ye){const ke=j(q);return i.createVNode("div",{ref:ee.setRef,key:F(q,ee.index),class:"fv-grid-hierarchy-cell",style:M(ee,ye)},[i.createVNode("div",{class:E(ee),style:ke},[A(q),z(q,ee),J(q,ee),he(q,ee)])])}function De(q,ee,ye){return i.createVNode("div",{ref:ee.setRef,key:F(q,ee.index),class:g(ee),style:M(ee,ye),onClick:ke=>h(ke,ee,q,ee.column)},[i.createVNode("div",{class:E(ee)},[i.createVNode("div",{class:X(ee)},[ee.showTips?i.createVNode(wn,null,{default:()=>de(q,ee),contentTemplate:()=>de(q,ee)}):de(q,ee)])])])}function Be(q,ee){return ee==="left"&&e.value.leftColumns.length>0&&e.value.leftColumns[0].field===q.field||ee==="primary"&&e.value.primaryColumns.length>0&&e.value.primaryColumns[0].field===q.field}function G(q,ee){t.emit("dblclickNode",{$event:q,node:ee.raw})}function ce(q,ee,ye="primary",ke){return i.createVNode("div",{ref:q.setRef,key:P(q),class:_(q,ke),style:B(q),onMouseover:Ie=>S(Ie,q),onMouseout:Ie=>y(Ie,q),onClick:Ie=>v(Ie,q),onDblclick:Ie=>G(Ie,q)},[Object.values(q.data).filter(Ie=>ee[Ie.field]&&Ie.rowSpan===1).map(Ie=>Be(Ie,ye)?_e(q,Ie,ee):De(q,Ie,ee))])}return{renderDataRow:ce}}function Fi(n,t,e){const{horizontalScrollThumbStyle:r,onMouseDownScrollThumb:o,shouldShowHorizontalScrollbar:a}=e;function s(){return a.value&&i.createVNode("div",{class:"fv-grid-horizontal-scroll"},[i.createVNode("div",{class:"fv-grid-horizontal-scroll-thumb",style:r.value,onMousedown:l=>o(l,t,"horizontal")},null)])}return{renderHorizontalScrollbar:s}}function Ni(){function n(r,o){switch(r.command){case"edit":case"remove":return o.status===lt.initial;case"accept":case"cancel":return o.status===lt.editing;default:return!r.hidden}}function t(r,o,a){switch(r.onClick(o,a.dataIndex,a),r.command){case"edit":a.status,lt.editing;break;case"accept":case"cancel":a.status,lt.initial;break}}function e(r,o){return r.commands&&r.commands.map(a=>n(a,o)&&i.createVNode(Qr,{class:"ml-2",type:a.type,size:a.size||"small",onClick:s=>t(a,s,o),style:{"margin-bottom":"3px"}},{default:()=>[i.createTextVNode(" "),a.text,i.createTextVNode(" ")]}))}return{renderCommandColumn:e}}function Mi(n){const t=i.ref(n.minHeight),e=i.ref(n.minWidth),r=i.ref(n.height),o=i.ref(n.width),a=i.computed(()=>r.value<=0?0:Math.max(r.value,t.value)),s=i.computed(()=>o.value<=0?0:Math.max(o.value,e.value));return i.watch([()=>n.height,()=>n.width,()=>n.minHeight,()=>n.minWidth],([c,u,d,f])=>{t.value=Number(d),e.value=Number(f),r.value=Number(c),o.value=Number(u)}),{containerStyleObject:i.computed(()=>({height:a.value>0?`${a.value}px`:n.fit?"100%":"",width:s.value>0?`${s.value}px`:n.fit?"100%":"",flex:"1 1 0"}))}}i.ref([{name:"七天",selectable:!0},{name:"一个月",selectable:!0},{name:"三个月",selectable:!0},{name:"半年",selectable:!0}]);function Ei(n){const e=i.ref(n.commandOption.enable||!1),r=i.ref(n.commandOption.commands||[]);function o(a){if(e.value&&!(a.value.findIndex(l=>l.dataType==="commands")>-1)){const l={field:"__commands__",title:"操作",width:120,fixed:"right",dataType:"commands",commands:r.value,visible:!0};a.value.push(l)}}return{applyCommands:o}}function Oi(n,t){var u;const e=i.ref((u=n.columnOption)==null?void 0:u.groups);function r(d,f,p,h,g){const N={actualWidth:0,children:[],depth:1,field:d.field,layer:1,left:0,parent:p,resizable:!0,title:d.title||"",status:Ze.none,popoverRef:i.ref(),showPopover:!1,column:null,sortType:"none"},_=h||N;if(d.group){let v=1;d.group.reduce((S,y)=>{if(typeof y=="string"){const T=f.get(y);T&&(g.fieldToRootMap.set(y,_),S.actualWidth+=T.actualWidth,S.children.push(T))}else{const T=r(y,f,S,_,g);v=Math.max(v,T.depth),S.actualWidth+=T.actualWidth,S.children.push(T)}return S},N),N.depth+=v}return t.value.headerDepth=Math.max(t.value.headerDepth,N.depth),N}function o(d){const f={groupedCells:new Map,fieldToRootMap:new Map};return e.value&&e.value.reduce((p,h)=>{const g=r(h,d,null,null,f);return p.groupedCells.set(h.field,g),p},f),f}function a(d){if(!d||d.length===0)return 0;const f=d[0];return f.children&&f.children.length>0&&(f.left=a(f.children)),f.left}function s(d,f){const p=t.value.headerDepth;d.forEach(h=>{h.layer=f?f.layer+1:1;const g=h.children&&h.children.length===0;h.depth=g?p-(h.layer-1):1,h.left=g?h.left:a(h.children),h.children&&s(h.children,h)})}function l(d,f){const p=new Map;return d.forEach(h=>{const g=f.fieldToRootMap.get(h.field),N=g!=null;N&&!p.has(g.field)&&p.set(g.field,g),N||p.set(h.field,h)}),s(Array.from(p.values())),p}function c(d){let f=new Map,p=0;if(d.reduce((h,g)=>{let N=Ze.none;N=g.filterable?N|Ze.filterable:N,N=g.sort&&g.sort!=="none"?N|Ze.sorted|(g.sort==="asc"?Ze.ascending:Ze.descending):N;const _=g.field;return h.set(_,{actualWidth:g.actualWidth||0,children:[],depth:1,layer:1,left:p,field:_,parent:null,resizable:g.resizable===void 0?!0:g.resizable,title:g.title,status:N,popoverRef:i.ref(),showPopover:!1,column:g,filterValue:null,sortType:g.sort||"none",showSetting:g.showSetting,draggable:g.draggable}),p+=g.actualWidth||0,h},f),e.value){const h=o(f);f=l(f,h)}return f}return{getGridHeaderCells:c}}function Pn(n,t){var S;Oe.useGuid();const{idField:e}=t,r=i.ref(n.summary),o=i.ref(n.group),a=i.ref(((S=n.group)==null?void 0:S.groupFields)||[]),s=i.computed(()=>{var y;return(y=n.group)==null?void 0:y.enable}),l=i.computed(()=>{var y;return(y=n.group)==null?void 0:y.showGroupPanel}),c=i.computed(()=>{const y=r.value;return(y==null?void 0:y.groupFields)||[]}),u=i.computed(()=>{const y=o.value;return y&&y.showSummary}),d=i.ref(0),f=new Map;let p=[];function h(y,T,k,C,m){const x=C[k];x&&(T.reduce((b,V,w)=>{var F;const O=V[x];let I=b.get(O);if(!I){const M=c.value.reduce((P,B)=>(P.set(B,0),P),new Map);I={field:x,title:((F=m.get(x))==null?void 0:F.title)||x,value:O,layer:k,details:[],groupSummaries:M},b.set(O,I)}return c.value&&c.value.forEach(M=>{if(I){const P=I.groupSummaries.get(M)||0;I.groupSummaries.set(M,P+V[M])}}),I.details.push(V),b},y),k<C.length-1&&y.forEach((b,V)=>{b.nestGroup=new Map,h(b.nestGroup,b.details,k+1,C,m),b.details=[]}))}function g(y,T){return n.group&&n.group.formatter?n.group.formatter(y.value,{...y,total:T}):`${y.title}:${y.value} (${T})`}function N(y,T){const k=[];return y.forEach(C=>{const m={[e.value]:`group_of_${T?T[e.value]+"_":""}${C.field}_${C.value}`,__fv_data_grid_group_collapse__:!1,__fv_data_grid_group_field__:C.field,__fv_data_grid_group_layer__:C.layer,__fv_data_grid_group_row__:!0,__fv_data_grid_group_value__:C.value};let x=0;if(k.push(m),C.nestGroup){const b=N(C.nestGroup,m);k.push(...b),x+=b.length}if(C.details&&C.details.length&&(k.push(...C.details),x+=C.details.length),u.value){const b={__fv_data_grid_group_field__:C.field,__fv_data_grid_group_layer__:C.layer,__fv_data_grid_group_summary__:!0};b[e.value]=`summary_of_${C.field}_${C.value}`,b[C.field]=Array.from(C.groupSummaries.entries()).reduce((V,[w,O])=>`${V} ${w} total:${O} `,""),k.push(b)}C.groupSummaries&&C.groupSummaries.size&&C.groupSummaries.forEach((b,V)=>{m[V]=b}),m[C.field]=g(C,x),m.value=C.value}),k.forEach((C,m)=>{C.__fv_data_index__=m}),k}function _(y,T,k){return!y||y.length===0||!T.length?T:(y.join(","),f.clear(),p=[],T=T.filter(C=>!C.__fv_data_grid_group_row__),h(f,T,0,y,k),p=N(f),p)}function v(y){return{"f-icon":!0,"f-icon-arrow-chevron-down":!0,"fv-grid-group-row-icon-collapse":y.collapse}}return{collpaseGroupIconClass:v,generateGroupData:_,groupFields:a,shouldGroupingData:s,showGroupPanel:l,groupRowSize:d}}function Ii(n,t,e,r){const o=i.ref(0),a=i.ref(!!n.hierarchy),{idField:s}=r,{collapseField:l,hasChildrenField:c,parentIdField:u}=e,d=new Map,f=new Map,p=new Map;function h(W,L){f.clear(),W.reduce((A,z)=>{const oe=z[u.value]!==void 0?z[u.value]:"";if(oe&&L.has(oe)){const de=L.get(oe),he=isNaN(Number(de.__fv_layer__))?1:Number(de.__fv_layer__);z.__fv_layer__=he+1,z.__fv_parent_index__=de.__fv_index__,de.__fv_hasChildren__=!0}else z.__fv_layer__=1;const J=A.has(oe)?A.get(oe):[];return J.push(z),A.set(oe,J),A},f)}function g(W){p.clear(),W.reduce((L,A)=>{const z=A[s.value];return L.set(z,A),L},p)}function N(W){W.forEach(L=>{const A=L[s.value];L.__fv_children_index__.map(oe=>W[oe]).forEach(oe=>{oe.__fv_parents__=new Map([...L.__fv_parents__.entries(),[A,!0]])})})}function _(W){W.forEach(L=>{const A=new Set(L.__fv_children_index__);L.__fv_children_index__=[...A].sort((z,oe)=>z-oe)})}function v(W){W.forEach(L=>{const A=L.__fv_parents__;Array.from(A.keys()).map(z=>p.get(z)).forEach(z=>{z.__fv_children_index__.push(L.__fv_index__)})}),_(W)}function S(W){W.forEach(L=>{L.__fv_child_with_lines__=[],L.__fv_child_length__=L.__fv_descendant_index__.length,L.__fv_descendant_index__.map(A=>W[A]).reduce((A,z)=>(A.__fv_child_length__+=z.__fv_children_index__.length,A.__fv_child_with_lines__.push(...z.__fv_children_index__,z.__fv_index__),A),L)})}function y(W,L){return{id:W,index:L,parentId:"",parentIndex:-1,parents:new Map,children:new Map,descendant:new Map,collapsed:!1,visibleInHierarchy:!0}}function T(W,L,A){Array.from(L.keys()).forEach(z=>{L.get(z).reduce((J,de)=>{const he=de[s.value],_e=W.get(de[s.value]),De=W.get(z),Be=A.get(z);return De&&Be&&(De.children.set(he,_e),De.children.set(he,_e),_e.parentId=z,_e.parentIndex=De.index,_e.parents.set(z,De)),J},W)})}function k(W){W.children.forEach(A=>{A.parents=new Map([...W.parents.entries(),[W.id,W]]),k(A)})}function C(W,L){W.filter(A=>A[u.value]===void 0||A[u.value]==="").forEach(A=>{const z=A[s.value],oe=L.get(z);k(oe)})}function m(W){Array.from(W.values()).forEach(L=>{Array.from(L.parents.values()).forEach(A=>{A.descendant.set(L.id,L)})})}function x(W){d.clear(),W.forEach((L,A)=>{const z=L[s.value];d.set(z,y(z,A))}),g(W),h(W,p),T(d,f,p),C(W,d),m(d)}function b(W){const L=W[s.value],A=d.get(L);return A&&A.children.size>0}function V(W){return W[c.value]&&!b(W)}function w(W){const L=W[s.value],A=d.get(L);return A&&A.visibleInHierarchy}function O(){o.value=Date.now()}function I(W,L){L.forEach(A=>{const z=d.get(A[s.value]),oe=d.get(W),J=p.get(W);oe&&J&&(z.visibleInHierarchy=!J[l.value]&&oe.visibleInHierarchy)}),O()}function F(W){if(f.has(W)){const A=f.get(W);I(W,A),A.map(z=>z[s.value]).forEach(z=>F(z))}}function M(W){const L=W[s.value];F(L)}function P(W,L,A=0){W.forEach(z=>{const oe=V(z),J=z.__fv_layer__<=A,de=L==="ToCollapse"?z.__fv_layer__<=A:!(z.__fv_layer__<=A),he=J?de:z[l.value];z[l.value]=oe||he});for(const[z,oe]of f.entries())I(z,oe);return W}function B(W,L){P(W,"ToCollapse",L)}function E(W,L){P(W,"ToExpand",L)}function H(W){W.forEach((L,A)=>{var de;const z=L[s.value],oe=f.has(z)?(de=f.get(z))==null?void 0:de.map(he=>he.__fv_index__):[],J=y(z,A);L.__fv_graph_node__=J,L.__fv_children_index__=oe,L.__fv_descendant_index__=[...oe],L.__fv_parents__=new Map,V(L)&&(L[l.value]=!0)})}function X(W){var z,oe;x(t.value),H(W),N(W),v(W),n.showLines&&S(W);const A=((z=n.hierarchy)==null?void 0:z.collapseTo)!==void 0?Number((oe=n.hierarchy)==null?void 0:oe.collapseTo):0;return P(W,"ToCollapse",A),W}function j(W,L,A){const oe=A.value[W][s.value],J=d.get(oe);if(J){const de=d.get(J.parentId);let he=A.value.length-1;if(de){const _e=Array.from(de.children.keys()).indexOf(J.id);if(_e===de.children.size-1){const Be=Array.from(de.descendant.values())[de.descendant.size-1];he=A.value.findIndex(ce=>ce[s.value]===Be.id)+1}else{const Be=Array.from(de.children.values())[_e+1];he=A.value.findIndex(ce=>ce[s.value]===Be.id)}L[c.value]=!1,L