UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 157 kB
(function(O,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("../locale/index.umd.js"),require("../common/index.umd.js"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../input-group/index.umd.js"),require("../button/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../dynamic-view/index.umd.js"),require("../section/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("../../designer/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("../../designer/dynamic-form/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("../../designer/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("../../designer/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("../query-solution/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../../designer/rate/index.umd.js"),require("../../designer/response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../../designer/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("../../designer/switch/index.umd.js"),require("../../designer/tabs/index.umd.js"),require("../../designer/tags/index.umd.js"),require("../text/index.umd.js"),require("../../designer/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("../collection-property-editor/index.umd.js"),require("../../designer/modal/index.umd.js"),require("../external-container/index.umd.js"),require("../language-textbox/index.umd.js"),require("../image/index.umd.js"),require("../comment/index.umd.js"),require("../property-panel/index.umd.js"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../locale/index.umd.js","../common/index.umd.js","@vueuse/core","../data-view/index.umd.js","../input-group/index.umd.js","../button/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js","../dynamic-view/index.umd.js","../section/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","../../designer/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","../../designer/dynamic-form/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","../../designer/list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../../designer/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","../query-solution/index.umd.js","../../designer/radio-group/index.umd.js","../../designer/rate/index.umd.js","../../designer/response-toolbar/index.umd.js","../response-layout/index.umd.js","../../designer/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","../../designer/switch/index.umd.js","../../designer/tabs/index.umd.js","../../designer/tags/index.umd.js","../text/index.umd.js","../../designer/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","../collection-property-editor/index.umd.js","../../designer/modal/index.umd.js","../external-container/index.umd.js","../language-textbox/index.umd.js","../image/index.umd.js","../comment/index.umd.js","../property-panel/index.umd.js","../notify/index.umd.js"],e):(O=typeof globalThis<"u"?globalThis:O||self,e(O["designer-canvas"]={},O.Vue,O.LodashES,O.locale,O.common,O.VueUseCore,O.dataView,O.FInputGroup,O.FButton,O.dynamicResolver,O.designerCanvas,O.dynamicView,O.FSection,O.FAccordion,O.FAvatar,O.FButtonEdit,O.FButtonGroup,O.FCalendar,O.FCapsule,O.FCheckbox,O.FCheckboxGroup,O.FComboList,O.FComboTree,O.FComponent,O.FColorPicker,O.FContentContainer,O.FDatePicker,O.FDataGrid,O.FDropdown,O.FDynamicForm$1,O.FEventsEditor,O.FFilterBar,O.FFieldSelector,O.FBindingSelector,O.FImageCropper,O.FInputGroup$1,O.FLayout,O.FListNav,O.FListView,O.FLookup,O.FMappingEditor,O.FNav,O.FNumberRange,O.FNumberSpinner,O.FOrder,O.FPageHeader,O.FPageFooter,O.FPagination,O.FProgress,O.FQuerySolution,O.FRadioGroup,O.FRate,O.FResponseToolbar,O.FResponseLayout,O.FResponseLayoutEditorSetting,O.FSearchBox,O.FSection$1,O.FSmokeDetector,O.FSplitter,O.FStep$1,O.FSwitch,O.FTabs,O.FTags,O.FText,O.FTimePicker,O.FTransfer,O.FTreeview,O.FUploader,O.FVerifyDetail,O.FVideo,O.FTextArea,O.FSchemaSelector,O.FTreeGrid$1,O.FEventParameter,O.FFilterConditionEditor,O.FFieldset,O.FSortConditionEditor,O.FMenuLookup,O.FDrawer,O.FJsonEditor,O.FPropertyEditor,O.FExpressionEditor,O.FCodeEditor,O.FHtmlTemplate,O.FCollectionPropertyEditor,O.FModal$1,O.FExternalContainer,O.FLanguageTextbox,O.FImage,O.FComment,null,O.notify))})(this,function(O,e,xe,Xe,Me,bo,ce,wo,So,Ne,xo,Qe,To,Ut,_t,Wt,Gt,Yt,Kt,Dt,gt,Xt,No,Qt,Jt,Zt,en,tn,nn,on,Do,rn,Fo,an,ln,sn,cn,un,dn,fn,jo,mn,pn,gn,hn,vn,yn,Cn,bn,wn,Sn,xn,Tn,Nn,Dn,Fn,jn,Mn,Vn,En,Bn,kn,In,On,Pn,Ln,qn,An,Rn,$n,zn,Mo,Hn,Vo,Eo,Un,Bo,ko,_n,Io,Oo,Po,Lo,Wn,qo,Ao,Gn,Yn,Kn,Xn,fa,Ro){"use strict";var ua=Object.defineProperty;var da=(O,e,xe)=>e in O?ua(O,e,{enumerable:!0,configurable:!0,writable:!0,value:xe}):O[e]=xe;var Ke=(O,e,xe)=>da(O,typeof e!="symbol"?e+"":e,xe);const Je=e.ref(0);function $o(){Je.value++}function zo(t,n){const o=n.getBoundingClientRect(),l=t.getBoundingClientRect(),i=l.top>=o.top,a=l.top<=o.bottom;return i&&a}function Ft(t){const n=t.querySelector(".component-btn-group");if(!n)return;n.style.display="";const o=n.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const l=n.querySelector("div");if(l){const i=l.getBoundingClientRect();l.style.top=o.top+"px";let a=o.left-i.width;const s=document.querySelector(".editorDiv");if(s){const u=s.getBoundingClientRect();a<u.left&&({left:a}=t.getBoundingClientRect())}l.style.left=a+"px"}}}function Qn(t){var o,l,i,a,s;if(!window.scrollContainerList)return;const n=Array.from(window.scrollContainerList);if(n.length)if(n.length===1){const u=n[0],g=document.querySelector(`[id=${u}]`);if(g&&g.contains(t))return g}else{const{componentInstance:u}=t;if(((o=u==null?void 0:u.value)==null?void 0:o.scrollElementId)===((l=u==null?void 0:u.value.schema)==null?void 0:l.id))return t;if(((i=u==null?void 0:u.value)==null?void 0:i.scrollElementId)===`${(a=u==null?void 0:u.value.schema)==null?void 0:a.id}-design-item`)return t.parentElement;if((s=u.value.parent)!=null&&s.elementRef)return Qn(u.value.parent.elementRef)}}function ht(t){if(!t)return;const n=t.getBoundingClientRect();if(n.width===0&&n.height===0)return;const o=t.querySelector(".component-btn-group");if(o){let l=!0;const i=Qn(t);if(i&&(l=zo(t,i)),!l){o.style.display="none";return}Ft(t)}}function ut(t){if(!t)return;let n;t.className.includes("dgComponentSelected")?n=t:n=t.querySelector(".dgComponentSelected"),n&&ht(n)}function Ho(){const t=document.querySelector(".dgComponentSelected");if(!t)return;const n=t.querySelector(".component-btn-group");n&&n.getBoundingClientRect().top!==0&&Ft(t)}const Jn={modelValue:{type:Object,default:{}},componentId:{type:String,default:""},components:{type:Array},canvasMode:{type:String,default:"PC"}};var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Zn={exports:{}};(function(t,n){(function(o){t.exports=o()})(function(){return function(){function o(l,i,a){function s(d,v){if(!i[d]){if(!l[d]){var m=typeof vt=="function"&&vt;if(!v&&m)return m(d,!0);if(u)return u(d,!0);var S=new Error("Cannot find module '"+d+"'");throw S.code="MODULE_NOT_FOUND",S}var r=i[d]={exports:{}};l[d][0].call(r.exports,function(c){var D=l[d][1][c];return s(D||c)},r,r.exports,o,l,i,a)}return i[d].exports}for(var u=typeof vt=="function"&&vt,g=0;g<a.length;g++)s(a[g]);return s}return o}()({1:[function(o,l,i){var a={},s="(?:^|\\s)",u="(?:\\s|$)";function g(m){var S=a[m];return S?S.lastIndex=0:a[m]=S=new RegExp(s+m+u,"g"),S}function d(m,S){var r=m.className;r.length?g(S).test(r)||(m.className+=" "+S):m.className=S}function v(m,S){m.className=m.className.replace(g(S)," ").trim()}l.exports={add:d,rm:v}},{}],2:[function(o,l,i){(function(a){var s=o("contra/emitter"),u=o("crossvent"),g=o("./classes"),d=document,v=d.documentElement;function m(y,C){var $=arguments.length;$===1&&Array.isArray(y)===!1&&(C=y,y=[]);var P,H,V,U,L,A,M,I,z,oe=null,ue,X,Ie=!1,be=0,me,J=C||{};J.moves===void 0&&(J.moves=F),J.accepts===void 0&&(J.accepts=F),J.invalid===void 0&&(J.invalid=rt),J.containers===void 0&&(J.containers=y||[]),J.isContainer===void 0&&(J.isContainer=N),J.copy===void 0&&(J.copy=!1),J.copySortSource===void 0&&(J.copySortSource=!1),J.revertOnSpill===void 0&&(J.revertOnSpill=!1),J.removeOnSpill===void 0&&(J.removeOnSpill=!1),J.direction===void 0&&(J.direction="vertical"),J.ignoreInputTextSelection===void 0&&(J.ignoreInputTextSelection=!0),J.mirrorContainer===void 0&&(J.mirrorContainer=d.body);var b=s({containers:J.containers,start:Pe,end:at,cancel:Ze,remove:st,destroy:De,canMove:ke,dragging:!1});return J.removeOnSpill===!0&&b.on("over",Bt).on("out",kt),re(),b;function ae(E){return b.containers.indexOf(E)!==-1||J.isContainer(E)}function re(E){var Y=E?"remove":"add";c(v,Y,"mousedown",Oe),c(v,Y,"mouseup",it)}function le(E){var Y=E?"remove":"add";c(v,Y,"mousemove",Te)}function fe(E){var Y=E?"remove":"add";u[Y](v,"selectstart",Ee),u[Y](v,"click",Ee)}function De(){re(!0),it({})}function Ee(E){ue&&E.preventDefault()}function Oe(E){U=E.clientX,L=E.clientY;var Y=D(E)!==1||E.metaKey||E.ctrlKey;if(!Y){var Q=E.target,ie=Be(Q);ie&&(ue=ie,le(),E.type==="mousedown"&&(j(Q)?Q.focus():E.preventDefault()))}}function Te(E){if(ue){if(D(E)===0){it({});return}if(!(E.clientX!==void 0&&Math.abs(E.clientX-U)<=(J.slideFactorX||0)&&E.clientY!==void 0&&Math.abs(E.clientY-L)<=(J.slideFactorY||0))){if(J.ignoreInputTextSelection){var Y=h("clientX",E)||0,Q=h("clientY",E)||0,ie=d.elementFromPoint(Y,Q);if(j(ie))return}var ge=ue;le(!0),fe(),at(),Le(ge),g.add(I||V,"gu-transit"),Ot(),It(),be=0,we(E)}}}function Be(E){if(!(b.dragging&&P)&&!ae(E)){for(var Y=E;f(E)&&ae(f(E))===!1;)if(J.invalid(E,Y)||(E=f(E),!E))return;var Q=f(E);if(Q&&!J.invalid(E,Y)){var ie=J.moves(E,Q,Y,T(E));if(ie)return{item:E,source:Q}}}}function ke(E){return!!Be(E)}function Pe(E){var Y=Be(E);Y&&Le(Y)}function Le(E){Ht(E.item,E.source)&&(I=E.item.cloneNode(!0),b.emit("cloned",I,E.item,"copy")),H=E.source,V=E.item,A=M=T(E.item),b.dragging=!0,b.emit("drag",V,H)}function rt(){return!1}function at(){if(b.dragging){var E=I||V;lt(E,f(E))}}function je(){ue=!1,le(!0),fe(!0)}function it(E){if(je(),!!b.dragging){var Y=I||V,Q=h("clientX",E)||0,ie=h("clientY",E)||0,ge=B(P,Q,ie),ve=Se(ge,Q,ie);ve&&(I&&J.copySortSource||!I||ve!==H)?lt(Y,ve):J.removeOnSpill?st():Ze()}}function lt(E,Y){var Q=f(E);I&&J.copySortSource&&Y===H&&Q.removeChild(V),se(Y)?b.emit("cancel",E,H):b.emit("drop",E,Y,H,M),q()}function st(){if(b.dragging){var E=I||V,Y=f(E);Y&&Y.removeChild(E),b.emit(I?"cancel":"remove",E,Y,H),q()}}function Ze(E){if(b.dragging){var Y=arguments.length>0?E:J.revertOnSpill,Q=I||V,ie=f(Q),ge=se(ie);ge===!1&&Y&&(I?ie&&ie.removeChild(I):H.insertBefore(Q,A)),ge||Y?b.emit("cancel",Q,H,H):b.emit("drop",Q,ie,H,M),q()}}function q(){var E=I||V;je(),Pt(),Lt(),E&&g.rm(E,"gu-transit"),z&&clearTimeout(z),b.dragging=!1,oe&&b.emit("out",E,oe,H),b.emit("dragend",E,be),H=V=I=A=M=z=oe=null}function se(E,Y){var Q;return Y!==void 0?Q=Y:P?Q=M:Q=T(I||V),E===H&&Q===A}function Se(E,Y,Q){for(var ie=E;ie&&!ge();)ie=f(ie);return ie;function ge(){var ve=ae(ie);if(ve===!1)return!1;var Ge=Tt(ie,E),$e=Nt(ie,Ge,Y,Q),Ue=se(ie,$e);return Ue?!0:J.accepts(V,ie,H,$e)}}function we(E){if(!P)return;E.preventDefault();var Y=h("clientX",E)||0,Q=h("clientY",E)||0;P.style.left=Y-2+"px",P.style.top=Q-2+"px";var ie=I||V,ge=B(P,Y,Q),ve=Se(ge,Y,Q),Ge=ve!==null&&ve!==oe;(Ge||ve===null)&&(He(),oe=ve,_e()),zt(ge,Q);var $e=f(ie);if(ve===H&&I&&!J.copySortSource){$e&&$e.removeChild(ie);return}var Ue,ze=Tt(ve,ge);if(Ie=qt(ze,ve),ze!==null)Ue=Nt(ve,ze,Y,Q);else if(J.revertOnSpill===!0&&!I)Ue=A,ve=H;else{I&&$e&&$e.removeChild(ie),I&&X&&(X.style.display="none");return}X.style.display="block",Re(Ue,ie,Ge),Ue?Rt(ze,Ue):$t(ve);function qe(Ae){b.emit(Ae,ie,oe,H)}function _e(){Ge&&qe("over")}function He(){oe&&qe("out")}}function Re(E,Y,Q){(E===Y||E===T(Y))&&(M=T(Y)),(E===null&&Q||E!==Y&&E!==T(Y))&&(M=E)}function Bt(E){g.rm(E,"gu-hide")}function kt(E){b.dragging&&g.add(E,"gu-hide")}function It(){P||(P=document.createElement("div"),P.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;",P.innerHTML=J.getMirrorText&&J.getMirrorText(V)||"控件",g.add(P,"gu-mirror"),J.mirrorContainer.appendChild(P),c(v,"add","mousemove",we),g.add(J.mirrorContainer,"gu-unselectable"),b.emit("cloned",P,V,"mirror"))}function Ot(){if(X=document.createElement("div"),g.add(X,"gu-insertion"),V){var E=V.getBoundingClientRect();X.style.left=E.left+"px",X.style.top=E.top+"px"}Ie=!1,J.mirrorContainer.appendChild(X)}function Pt(){P&&(g.rm(J.mirrorContainer,"gu-unselectable"),c(v,"remove","mousemove",we),f(P).removeChild(P),P=null)}function Lt(){X&&(f(X).removeChild(X),X=null)}function Tt(E,Y){for(var Q=Y;Q!==E&&f(Q)!==E;)Q=f(Q);return Q===v?null:Q}function qt(E,Y){if(!Y)return Ie;var Q=E||Y&&Y.lastElementChild;if(!Q)return!0;var ie=getComputedStyle(E),ge=/^inline/.test(ie.getPropertyValue("display"))||/^(left|right)$/.test(ie.getPropertyValue("float"));if(ge)return!0;if(Y){var ve=getComputedStyle(Y),Ge=ve.getPropertyValue("display");if(/flex$/.test(Ge)){var $e=ve.getPropertyValue("flex-direction")||"row";if($e==="row"||$e==="row-reverse")return!At(Y)}return!1}return!0}function At(E){if(!E.children||!E.children.length)return!1;for(const Y of Array.from(E.children)){const ie=(Y.className&&Y.className.split(" ")||[]).filter(ge=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ge));if(!ie.length)return!1;for(const ge of ie){const ve=ge.slice(ge.lastIndexOf("-")+1);if(parseInt(ve,10)!==12)return!1}}return!0}function Rt(E,Y){const Q=Y.getBoundingClientRect();if(X.style.left=Q.left+"px",X.style.top=Q.top+"px",Ie){if(X.style.height=Q.height+"px",X.style.width="4px",E){const ie=E.getBoundingClientRect();ie.top!==Q.top&&(X.style.left=ie.right+"px",X.style.top=ie.top+"px",X.style.height=ie.height+"px")}}else if(X.style.height="4px",X.style.width=Q.width+"px",me){const ie=me.getBoundingClientRect();Q.top<ie.top&&(X.style.display="none")}Y===V&&V&&(X.style.display="none")}function $t(E){M=null;var Y=E.lastElementChild;if(Y){var Q=Y.getBoundingClientRect();Ie?(X.style.left=Q.right+"px",X.style.top=Q.top+"px",X.style.height=Q.height+"px",X.style.width="4px"):(X.style.left=Q.left+"px",X.style.top=Q.bottom+"px",X.style.height="4px",X.style.width=Q.width+"px"),Y===V&&V&&(X.style.display="none")}else X.style.display="none"}function zt(E,Y){if(!J.mirrorContainer.contains(E)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(me=S(E),!me||!me.contains(E)))return;const Q=document.querySelector(".dgComponentSelected"),ie=me.getBoundingClientRect();if(Y-30<ie.top&&me.scrollTop>0){let ge=me.scrollTop<10?me.scrollTop:10;me.scrollBy(0,-1*ge),Q&&me.contains(Q)&&(be=be+-1*ge)}if(Y+30>ie.bottom&&me.scrollTop<me.scrollHeight-me.clientHeight){const ge=me.scrollHeight-me.clientHeight-me.scrollTop;let ve=ge<10?ge:10;me.scrollBy(0,ve),Q&&me.contains(Q)&&(be=be+ve)}}function Nt(E,Y,Q,ie){var ge=J.direction==="horizontal",ve=J.direction==="mixed",Ge=Y!==E?Ue():$e();return Ge;function $e(){var qe=E.children.length,_e,He,Ae;for(_e=0;_e<qe;_e++)if(He=E.children[_e],Ae=He.getBoundingClientRect(),ge&&Ae.left+Ae.width/2>Q||!ve&&!ge&&Ae.top+Ae.height/2>ie||ve&&Ae.left+Ae.width>Q&&Ae.top+Ae.height>ie)return He;return null}function Ue(){var qe=Y.getBoundingClientRect();if(ve){var _e=ie-qe.top,He=Q-qe.left,Ae=qe.bottom-ie,mt=qe.right-Q,pt=Math.min(He,mt,_e,Ae),ct;return Ie?ct=mt<He:ct=Ae===pt||mt===pt||He===pt,ze(ct)}return ze(ge?Q>qe.left+k(qe)/2:ie>qe.top+p(qe)/2)}function ze(qe){return qe?T(Y):Y}}function Ht(E,Y){return typeof J.copy=="boolean"?J.copy:J.copy(E,Y)}}function S(y){const C=Array.from(window.scrollContainerList);if(C.length===1){const P=Array.from(window.scrollContainerList)[0];return document.getElementById(P)}const $=r(C);for(const P of $)if(P.contains(y))return P;return null}function r(y){const C=[];return y.forEach($=>{const P=document.getElementById($);P&&C.push(P)}),C.sort(($,P)=>$.contains(P)?1:P.contains($)?-1:0),C}function c(y,C,$,P){var H={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},V={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},U={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};a.navigator.pointerEnabled?u[C](y,V[$],P):a.navigator.msPointerEnabled?u[C](y,U[$],P):(u[C](y,H[$],P),u[C](y,$,P))}function D(y){if(y.touches!==void 0)return y.touches.length;if(y.which!==void 0&&y.which!==0)return y.which;if(y.buttons!==void 0)return y.buttons;var C=y.button;if(C!==void 0)return C&1?1:C&2?3:C&4?2:0}function B(y,C,$){y=y||{};var P=y.className||"",H;return y.className+=" gu-hide",H=d.elementFromPoint(C,$),y.className=P,H}function N(){return!1}function F(){return!0}function k(y){return y.width||y.right-y.left}function p(y){return y.height||y.bottom-y.top}function f(y){return y.parentNode===d?null:y.parentNode}function j(y){return y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.tagName==="SELECT"||x(y)}function x(y){return!y||y.contentEditable==="false"?!1:y.contentEditable==="true"?!0:x(f(y))}function T(y){return y.nextElementSibling||C();function C(){var $=y;do $=$.nextSibling;while($&&$.nodeType!==1);return $}}function w(y){return y.targetTouches&&y.targetTouches.length?y.targetTouches[0]:y.changedTouches&&y.changedTouches.length?y.changedTouches[0]:y}function h(y,C){var $=w(C),P={pageX:"clientX",pageY:"clientY"};return y in P&&!(y in $)&&P[y]in $&&(y=P[y]),$[y]}l.exports=m}).call(this,typeof tt<"u"?tt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,l,i){l.exports=function(s,u){return Array.prototype.slice.call(s,u)}},{}],4:[function(o,l,i){var a=o("ticky");l.exports=function(u,g,d){u&&a(function(){u.apply(d||null,g||[])})}},{ticky:10}],5:[function(o,l,i){var a=o("atoa"),s=o("./debounce");l.exports=function(g,d){var v=d||{},m={};return g===void 0&&(g={}),g.on=function(S,r){return m[S]?m[S].push(r):m[S]=[r],g},g.once=function(S,r){return r._once=!0,g.on(S,r),g},g.off=function(S,r){var c=arguments.length;if(c===1)delete m[S];else if(c===0)m={};else{var D=m[S];if(!D)return g;D.splice(D.indexOf(r),1)}return g},g.emit=function(){var S=a(arguments);return g.emitterSnapshot(S.shift()).apply(this,S)},g.emitterSnapshot=function(S){var r=(m[S]||[]).slice(0);return function(){var c=a(arguments),D=this||g;if(S==="error"&&v.throws!==!1&&!r.length)throw c.length===1?c[0]:c;return r.forEach(function(N){v.async?s(N,c,D):N.apply(D,c),N._once&&g.off(S,N)}),g}},g}},{"./debounce":4,atoa:3}],6:[function(o,l,i){(function(a){var s=o("custom-event"),u=o("./eventmap"),g=a.document,d=S,v=c,m=[];a.addEventListener||(d=r,v=D),l.exports={add:d,remove:v,fabricate:B};function S(f,j,x,T){return f.addEventListener(j,x,T)}function r(f,j,x){return f.attachEvent("on"+j,F(f,j,x))}function c(f,j,x,T){return f.removeEventListener(j,x,T)}function D(f,j,x){var T=k(f,j,x);if(T)return f.detachEvent("on"+j,T)}function B(f,j,x){var T=u.indexOf(j)===-1?h():w();f.dispatchEvent?f.dispatchEvent(T):f.fireEvent("on"+j,T);function w(){var y;return g.createEvent?(y=g.createEvent("Event"),y.initEvent(j,!0,!0)):g.createEventObject&&(y=g.createEventObject()),y}function h(){return new s(j,{detail:x})}}function N(f,j,x){return function(w){var h=w||a.event;h.target=h.target||h.srcElement,h.preventDefault=h.preventDefault||function(){h.returnValue=!1},h.stopPropagation=h.stopPropagation||function(){h.cancelBubble=!0},h.which=h.which||h.keyCode,x.call(f,h)}}function F(f,j,x){var T=k(f,j,x)||N(f,j,x);return m.push({wrapper:T,element:f,type:j,fn:x}),T}function k(f,j,x){var T=p(f,j,x);if(T){var w=m[T].wrapper;return m.splice(T,1),w}}function p(f,j,x){var T,w;for(T=0;T<m.length;T++)if(w=m[T],w.element===f&&w.type===j&&w.fn===x)return T}}).call(this,typeof tt<"u"?tt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,l,i){(function(a){var s=[],u="",g=/^on/;for(u in a)g.test(u)&&s.push(u.slice(2));l.exports=s}).call(this,typeof tt<"u"?tt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,l,i){(function(a){var s=a.CustomEvent;function u(){try{var g=new s("cat",{detail:{foo:"bar"}});return g.type==="cat"&&g.detail.foo==="bar"}catch{}return!1}l.exports=u()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(d,v){var m=document.createEvent("CustomEvent");return v?m.initCustomEvent(d,v.bubbles,v.cancelable,v.detail):m.initCustomEvent(d,!1,!1,void 0),m}:function(d,v){var m=document.createEventObject();return m.type=d,v?(m.bubbles=!!v.bubbles,m.cancelable=!!v.cancelable,m.detail=v.detail):(m.bubbles=!1,m.cancelable=!1,m.detail=void 0),m}}).call(this,typeof tt<"u"?tt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,l,i){var a=l.exports={},s,u;function g(){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=g}catch{s=g}try{typeof clearTimeout=="function"?u=clearTimeout:u=d}catch{u=d}})();function v(p){if(s===setTimeout)return setTimeout(p,0);if((s===g||!s)&&setTimeout)return s=setTimeout,setTimeout(p,0);try{return s(p,0)}catch{try{return s.call(null,p,0)}catch{return s.call(this,p,0)}}}function m(p){if(u===clearTimeout)return clearTimeout(p);if((u===d||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(p);try{return u(p)}catch{try{return u.call(null,p)}catch{return u.call(this,p)}}}var S=[],r=!1,c,D=-1;function B(){!r||!c||(r=!1,c.length?S=c.concat(S):D=-1,S.length&&N())}function N(){if(!r){var p=v(B);r=!0;for(var f=S.length;f;){for(c=S,S=[];++D<f;)c&&c[D].run();D=-1,f=S.length}c=null,r=!1,m(p)}}a.nextTick=function(p){var f=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)f[j-1]=arguments[j];S.push(new F(p,f)),S.length===1&&!r&&v(N)};function F(p,f){this.fun=p,this.array=f}F.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function k(){}a.on=k,a.addListener=k,a.once=k,a.off=k,a.removeListener=k,a.removeAllListeners=k,a.emit=k,a.prependListener=k,a.prependOnceListener=k,a.listeners=function(p){return[]},a.binding=function(p){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(p){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],10:[function(o,l,i){(function(a){var s=typeof a=="function",u;s?u=function(g){a(g)}:u=function(g){setTimeout(g,0)},l.exports=u}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,l,i){(function(a,s){var u=o("process/browser.js").nextTick,g=Function.prototype.apply,d=Array.prototype.slice,v={},m=0;i.setTimeout=function(){return new S(g.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new S(g.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(r){r.close()};function S(r,c){this._id=r,this._clearFn=c}S.prototype.unref=S.prototype.ref=function(){},S.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(r,c){clearTimeout(r._idleTimeoutId),r._idleTimeout=c},i.unenroll=function(r){clearTimeout(r._idleTimeoutId),r._idleTimeout=-1},i._unrefActive=i.active=function(r){clearTimeout(r._idleTimeoutId);var c=r._idleTimeout;c>=0&&(r._idleTimeoutId=setTimeout(function(){r._onTimeout&&r._onTimeout()},c))},i.setImmediate=typeof a=="function"?a:function(r){var c=m++,D=arguments.length<2?!1:d.call(arguments,1);return v[c]=!0,u(function(){v[c]&&(D?r.apply(null,D):r.call(null),i.clearImmediate(c))}),c},i.clearImmediate=typeof s=="function"?s:function(r){delete v[r]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Zn);var _o=Zn.exports;const eo=Uo(_o),Wo={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}},Go={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},jt=e.defineComponent({name:"Toast",props:Go,emits:["close","click"],setup:(t,n)=>{const o=e.ref(t.animate),l="fadeOut",i=e.computed(()=>t.options),a=e.ref(!1),s=e.computed(()=>i.value.title&&i.value.message),u=e.computed(()=>!i.value.title&&i.value.message),g=e.computed(()=>{const F={animated:a.value,toast:!0,"toast--only-content":!s.value};return F[t.animate]=!1,F[l]=a.value,F["toasty-type-"+i.value.type]=!0,i.value.theme&&(F[i.value.theme]=!0),F}),d=e.computed(()=>{const p=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,f={"f-icon":!0};return f[p]=!0,f}),v=e.computed(()=>i.value.title||i.value.message),m=e.computed(()=>t.showCloseButton),S=e.computed(()=>!!i.value.buttons||!!n.slots.default),r=e.computed(()=>Xe.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function c(F){F.stopPropagation(),F.preventDefault(),a.value=!1,setTimeout(()=>{n.emit("close",i.value)},200)}function D(F,k){}function B(F){return`f-preten-link ${F.customClass?F.customClass:""}`}e.watch(o,()=>{o.value});const N=()=>{var F;return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((F=i.value.buttons)==null?void 0:F.map(k=>e.createVNode("span",{class:B(k),onClick:p=>void 0},[k.text]))),n.slots.default&&n.slots.default()])])};return()=>e.createVNode("div",{class:g.value,style:"min-height:44px"},[m.value&&e.createVNode("button",{title:Xe.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:c},[e.createVNode("span",{class:"f-icon modal_close"},null)]),v.value&&e.createVNode("section",{class:"modal-tips"},[!s.value&&e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:d.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[s.value&&e.createVNode(e.Fragment,null,[e.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),e.createVNode("p",{class:"toast-msg",innerHTML:i.value.message,style:r.value},null),S.value&&N()]),u.value&&(i.value.buttons?e.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:r.value,innerHTML:i.value.message},null),e.createVNode("div",{class:"after-toast-title text-right ml-auto"},[N()])]):e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:r.value,innerHTML:i.value.message},null))])])])}}),yt=e.defineComponent({name:"Notify",props:Wo,emits:["close","empty"],setup(t,n){const o=e.computed(()=>({"farris-notify":!0})),l={left:12,right:12,top:20,bottom:12},i=e.ref(),a=e.ref(t.options),s=e.ref(t.showCloseButton),u=e.computed(()=>t.position||"bottom-right"),g=e.computed(()=>t.timeout!=null?t.timeout:3e3),d=e.computed(()=>{const S=t.bottom?t.bottom:l.bottom,r=t.top?t.top:l.top,c={transition:"all 0.2s ease",left:u.value.indexOf("left")>-1?`${t.left?t.left:l.left}px`:"",right:u.value.indexOf("right")>-1?`${t.right?t.right:l.right}px`:"",top:u.value.indexOf("top")>-1?`${r}px`:"",bottom:u.value.indexOf("bottom")>-1?`${S}px`:""};return u.value.indexOf("center")>-1&&(c.left="50%",c.marginLeft="calc(-24rem / 2)",u.value==="center-center"&&(c.top="50%",c.transform="translate(-50%, -50%)")),c});function v(S){n.emit("close")}g.value&&setTimeout(()=>{v()},g.value),n.expose({closeToast:v,container:i,notifyPosition:u});function m(S,r){v()}return()=>e.createVNode("div",{class:o.value,style:d.value,ref:i},[e.createVNode(jt,{options:a.value,showCloseButton:s.value,animate:t.animate,onClose:S=>m(S,a.value)},null)])}});class Mt{constructor(){Ke(this,"notifyRefs",[]);Ke(this,"globalConfig",e.reactive({}))}escapeAllHtml(n){if(typeof n!="string"||!n)return"";const o=document.createElement("div");return o.textContent=n||"",o.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),a=document.createElement("div");a.style.display="contents";const s=e.createApp({setup(){var d;const u=e.ref();function g(){u.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,u),s.unmount()},220)}if(i.position.indexOf("top")>-1){const v=o.getNotifyInstances(i.position),m=v[v.length-1];if(m){const S=m.value.container.getBoundingClientRect();i.top=S.bottom}}return i.safeHtml&&((d=i.options)!=null&&d.message)&&(i.options.message=o.escapeAllHtml(i.options.message)),e.onUnmounted(()=>{document.body.removeChild(a)}),e.onMounted(()=>{o.updateNotifyPositionForCreate(i,u)}),()=>e.createVNode(e.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[e.createVNode(yt,e.mergeProps({ref:u},i,{onClose:g}),null)]})}});return s.provide("NotifyService",this),document.body.appendChild(a),s.use(Xe.LocaleService.i18n),s.mount(a),s}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const l=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(i=>{const a=i.value.container.getBoundingClientRect();i.value.container.style.bottom=a.height+l-a.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const l=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const i=this.getNotifyInstances(n.position),a=i.indexOf(o);i.slice(a+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}l>-1&&this.notifyRefs.splice(l,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let l="",i="",a,s,u;typeof o=="string"?l=o:o&&(l=o.message||"",i=o.title||"",s=o.position||null,u=o.showCloseButton!=null?o.showCloseButton:null,a=o.timeout!=null?o.timeout:null);const d={options:{type:n,message:l,title:i}};return s!=null&&(d.position=s),u!=null&&(d.showCloseButton=u),a!=null&&(d.timeout=a),d}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const Yo=Symbol("NOTIFY_SERVICE_TOKEN");yt.install=t=>{t.component(yt.name,yt),t.component(jt.name,jt);const n=new Mt;t.provide(Yo,n),t.provide("FNotifyService",n)};const Ko={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]},targetComponentInstance:{type:Object,default:{}}};`${Xe.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Xo={customClass:{type:String,default:""},sort:{type:Object},filter:{type:Object},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},loadData:{type:Function},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:36,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!1}},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},emptyTemplate:{type:Object},summary:{type:Object,default:{enable:!1,groupFields:["numericField1","numericField2"]}},autoHeight:{type:Boolean,default:!1},checkboxPosition:{type:String,default:"after-expand"},enableColumnSettingSolution:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},customSearch:{type:Function}};function Qo(t,n,o,l,i,a,s,u,g,d,v,m,S,r,c,D,B,N,F){const{calculateCellPositionInRow:k}=a,{columnContext:p,hasLeftFixedColumn:f,hasRightFixedColumn:j}=s,{gridDataStyle:x,leftFixedGridDataStyle:T,rightFixedGridDataStyle:w}=r,{renderDataRow:h}=ce.getHierarchyRow(t,n,p,B,u,g,d,v,m,S,r,c,D,N,F),y=[h];function C(U,L){const A=k(U);return B.value.filter(M=>M.visible!==!1).map((M,I)=>y[M.type](M,A,L,I))}function $(){return e.createVNode("div",{ref:l,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:T.value},[C(p.value.leftColumns.filter(U=>U.visible),"left")])])}function P(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:x.value},[C(p.value.primaryColumns.filter(U=>U.visible),"primary")])])}function H(){return e.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:w.value},[C(p.value.rightColumns.filter(U=>U.visible),"right")])])}function V(){const U=[];return f.value&&U.push($()),U.push(P()),j.value&&U.push(H()),U}return{renderDataArea:V}}const Vt=e.defineComponent({name:"FTreeGrid",props:Xo,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","unSelectAll","selectAll","sortChanged","selectionUpdate","endEditCell"],setup(t,n){var yo,Co;const o=e.ref(!1),l=e.ref(!1),i=0,a=e.ref(((yo=t.rowOption)==null?void 0:yo.height)||28);let s=[],u=[];const g=e.ref(20),d=e.ref(t.columns),v=ce.useIdentify(t),{idField:m}=v,S=e.ref(),r=e.ref(),c=e.ref(),D=e.ref(),B=e.ref(),N=e.ref([]),F=e.ref(!1),k=e.ref(((Co=t.rowOption)==null?void 0:Co.wrapContent)||!1),p=ce.useGroupData(t,v),f=ce.useFilter(t,n),j=ce.useHierarchy(t),{collapseField:x}=j,{showLoading:T,renderLoading:w}=ce.useLoading(t,S),h=ce.useDataView(t,new Map,f,j,v),{dataView:y}=h,C=ce.useSelection(t,h,v,N,n),{showSelection:$,selectedValues:P}=C,H=ce.useSelectHierarchyItem(t,N,h,v,C,n),V=e.computed(()=>t.disabled),U=e.computed(()=>t.virtualized?Math.min(h.dataView.value.length,g.value):h.dataView.value.length),L=ce.usePagination(t,h),{shouldRenderPagination:A}=L,{containerStyleObject:M}=ce.useDataViewContainerStyle(t,N),I=e.ref(""),z=e.ref([]),oe=e.computed(()=>t.searchable||!1),ue=e.ref(0),X=ce.useCommandColumn(t),{applyCommands:Ie}=X;Ie(d);const{applyColumnSetting:be,removeColumnSetting:me}=ce.useSettingColumn(t);t.showSetting&&be(d);const J=ce.useColumn(t,n),b=ce.useSort(t),{applyColumnSorter:ae,columnContext:re,updateColumnRenderContext:le}=J;ae(h,b);const fe=ce.useGroupColumn(t,re),De=ce.useRow(t,n,C,v),Ee=ce.useEdit(t,n,v,De,N),Oe=ce.useVisualDataBound(t,h,a),Te=ce.useVisualDataCell(t,Ee,Oe),Be=ce.useVisualDataRow(t,h,Ee,j,v,Oe,Te,a),ke=ce.useVisualData(t,d,h,U,i,Be),{getVisualData:Pe}=ke,Le=ce.useCellPosition(t,re,a,o),rt=ce.useSidebar(t,C),{sidebarWidth:at}=rt,je=ce.useVirtualScroll(t,h,N,re,ke,U,i,at,a,o),{onWheel:it,dataGridWidth:lt,viewPortHeight:st,viewPortWidth:Ze,resetScroll:q,updateVisibleRowsOnLatestVisibleScope:se}=je,Se=ce.useFitColumn(t,re,r,Ze,fe),{calculateColumnsSize:we}=Se,Re=ce.useFilterHistory(),Bt=ce.useColumnFilter(r,B,h,Re,je),kt=ce.useDragColumn(t,n,J,h,fe,p,je),It=e.computed(()=>{const R={"fv-grid":!0,"fv-grid-bordered":t.showBorder,"fv-grid-horizontal-bordered":t.showHorizontalLines,"fv-datagrid-strip":t.showStripe};return Me.getCustomClass(R,t.customClass)}),Ot=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":F.value,"fv-grid-wrap-content":k.value})),{renderDataArea:Pt}=Qo(t,n,c,D,B,Le,J,h,Ee,j,De,C,H,je,ke,Oe,N,a,o),{renderGridHeader:Lt,renderGridColumnResizeOverlay:Tt,shouldShowHeader:qt}=ce.getColumnHeader(t,n,r,D,B,J,h,kt,Bt,f,Re,Se,fe,C,rt,b,je,Ze,N,l),{renderDataGridSidebar:At}=ce.getSidebar(t,De,C,rt,je),{renderDisableMask:Rt}=ce.getDisableMask(),{renderHorizontalScrollbar:$t}=ce.getHorizontalScrollbar(t,r,je),{renderVerticalScrollbar:zt}=ce.getVerticalScrollbar(t,r,je);function Nt(){var R,Z,he;if(r.value&&r.value.clientHeight>0&&((R=r.value)==null?void 0:R.clientWidth)>0){const pe=Math.ceil(r.value.clientHeight/a.value);pe>g.value&&(g.value=pe,se()),st.value=((Z=c.value)==null?void 0:Z.clientHeight)||0,lt.value=((he=r.value)==null?void 0:he.clientWidth)||0}r.value&&(r.value.clientHeight>0||r.value.clientWidth>0)&&we()}e.onMounted(()=>{r.value&&(g.value=Math.max(Math.ceil(r.value.clientHeight/a.value),g.value),N.value=Pe(0,U.value+i-1),bo.useResizeObserver(r.value,Nt),we(),e.nextTick(()=>{r.value&&(lt.value=r.value.clientWidth),c.value&&(Ze.value=c.value.clientWidth,st.value=c.value.clientHeight)})),T.value&&w()}),e.onUnmounted(()=>{}),e.watch(Ze,()=>{r.value&&we()});function Ht(R){h.collapseTo(R),h.reOrderVisibleIndex(),q()}function E(R){h.expandTo(R),h.reOrderVisibleIndex(),q()}function Y(){const R=C.getSelectionRow();return R?R.dataIndex-1:-1}function Q(R){const Z=R!==void 0?R:Y(),he=h.insertNewDataItem(Z===-1?0:Z);return N.value=Pe(0,U.value+i-1),he}function ie(){const R=Y();h.insertNewChildDataItem(R),N.value=Pe(0,U.value+i-1)}function ge(R,Z){const he=N.value.find(ye=>ye.raw[m.value]===Z),pe=he?he.dataIndex-1:-1;h.insertNewChildDataItems(R,pe)}function ve(){const R=Y(),Z=H.getNextSelectableHierarchyItemId(R);h.removeHierarchyDataItem(R),N.value=Pe(0,U.value+i-1),Z&&H.selectItemById(Z)}function Ge(R){Ee.onEditingRow(R)}function $e(R){Ee.acceptEditingRow(R)}function Ue(R){Ee.cancelEditingRow(R)}function ze(R){R&&(d.value=R,Ie(d),t.showSetting&&be(d),le(d.value),ae(h,b),we())}e.watch(()=>t.columns,R=>{if(t.showSetting&&t.enableColumnSettingSolution){ze(d.value);return}ze(R)});function qe(R,Z){R&&(h.load(R),h.reOrderVisibleIndex(),Z!=null&&Z.keepScrollPosition?je.scrollTo(je.offsetY.value):q())}function _e(R){De.activeRowById(R)}function He(R,Z={isCurrent:!0}){Z!=null&&Z.isCurrent&&_e(R),H.selectItemById(R)}function Ae(R){const Z=N.value.find(he=>he.raw[v.idField.value]===R);Z&&De.clickRowItem(Z)}function mt(R){H.selectItemByIds(R)}function pt(){return C.getSelectedItems()}function ct(){C.clearSelection()}function Ar(){C.emptyCurrentRowId()}const Rr=e.computed(()=>!N.value||!N.value.length),{renderEmpty:$r}=ce.getEmpty(t,n);function zr(){return C.getSelectionRow()}function Hr(R,Z={clearCurrent:!0}){Z!=null&&Z.clearCurrent&&_e(""),H.unSelectItemByIds(R)}function Ur(){return C.currentSelectedDataId.value}function _r(R,Z,he){const pe=y.value.find(ye=>ye[m.value]===R);if(pe){if(Object.keys(pe).forEach(Ce=>{Object.prototype.hasOwnProperty.call(Z,Ce)&&(pe[Ce]=Z[Ce])}),he){const{collapseField:Ce,disabledField:We,checkedField:et,visibleField:Ye}=he;Ce&&!xe.isUndefined(Z[Ce])&&(pe.__fv_collapse__=Z[Ce]),et&&!xe.isUndefined(Z[et])&&(pe.__fv_checked__=Z[et]),We&&!xe.isUndefined(Z[We])&&(pe.__fv_disabled__=Z[We]),Ye&&!xe.isUndefined(Z[Ye])&&(pe.__fv_visible__=Z[Ye])}const ye=N.value.find(Ce=>Ce.raw[m.value]===R),de=N.value.findIndex(Ce=>Ce.raw[m.value]===R);if(ye){if(ye.raw=pe,Object.keys(ye.data).forEach(Ce=>{ye.data[Ce].updateData(pe)}),he){const{collapseField:Ce,disabledField:We,checkedField:et,visibleField:Ye}=he;Ce&&!xe.isUndefined(Z[Ce])&&(ye.collapse=Z[Ce]),et&&!xe.isUndefined(Z[et])&&(ye.checked=Z[et]),We&&!xe.isUndefined(Z[We])&&(ye.disabled=Z[We]),Ye&&!xe.isUndefined(Z[Ye])&&(ye.visible=Z[Ye])}N.value=[...N.value.slice(0,de),ye,...N.value.slice(de+1)],h.updateSummary()}}}function Wr(R){return Object.prototype.hasOwnProperty.call(R,"raw")?h.hasRealChildren(R.raw):h.hasRealChildren(R)}function Gr(R){const Z=h.dataView.value.find(he=>he[m.value]===R);return Z?Z[x.value]:""}function Yr(){return x.value}e.watch(()=>t.showSetting,(R,Z)=>{R!==Z&&(R?be(d):me(d),ze(d.value))});function Kr(R){return N.value.filter(Z=>R.includes(Z.raw[t.idField]))}function ho(R){const Z=v.idField.value,he=N.value.find(pe=>pe.raw[Z]===R);he&&De.changeRow(he)}function Xr(){C.keepSelectingOnPaging.value||ct(),h.updateVisibleDataSummary(N.value)}function Qr(R){C.updateSelectedValues(R)}function Jr(R){C.removeSelectedValues(R)}function Zr(R){e.nextTick(()=>{je.scrollToRowByIndex(R.dataIndex-1)})}function ea(R){let Z=R;for(;Z.parentId;){const he=h.dataView.value.find(pe=>pe[v.idField.value]===Z.parentId);if(he)he[v.idField.value],h.unFold({raw:he}),Z=he;else break}}function ta(R,Z){if(R.length!==Z.length)return!1;const he=R.map(ye=>ye[v.idField.value]).sort(),pe=Z.map(ye=>ye[v.idField.value]).sort();return he.every((ye,de)=>ye===pe[de])}function vo(){if(!I.value.trim()){z.value=[],ue.value=0;return}const R=[],Z=I.value.toLowerCase().trim();h.dataView.value.forEach(pe=>{var de;let ye=!1;(de=t.search)!=null&&de.customSearch?ye=t.search.customSearch(Z,pe,t.columns):t.columns.forEach(Ce=>{!ye&&Ce.field&&pe[Ce.field]!==void 0&&String(pe[Ce.field]).toLowerCase().includes(Z)&&(ye=!0)}),ye&&(R.push(pe),ea(pe))}),!ta(R,z.value)?(z.value=R,ue.value=0):R.length>0&&(ue.value=(ue.value+1)%R.length),R.length>0&&e.nextTick(()=>{const pe=R[ue.value];ho(pe[v.idField.value]);const ye=N.value.find(de=>de.raw[v.idField.value]===pe[v.idField.value]);ye&&Zr(ye)})}function na(R){R.key==="Enter"&&vo()}function oa(){vo()}n.expose({activeRowById:_e,addNewDataItem:Q,addNewChildDataItem:ie,addChildrenToNode:ge,collapseTo:Ht,expandTo:E,removeDataItem:ve,editDataItem:Ge,acceptDataItem:$e,cancelDataItem:Ue,updateColumns:ze,updateDataSource:qe,selectItemById:He,selectItemByIds:mt,getSelectedItems:pt,clearSelection:ct,getSelectionRow:zr,clickRowItemById:Ae,unSelectItemByIds:Hr,getCurrentRowId:Ur,reassignRowData:_r,hasChildren:Wr,getCollapseField:Yr,getCollapseStatusById:Gr,getVisibleDataByIds:Kr,selectRowById:ho,updateDerivedData:Xr,emptyCurrentRowId:Ar,calculateColumnsSize:we,updateSelectedValues:Qr,removeSelectedValues:Jr});const ra=e.computed(()=>{const R={};return je.shouldShowHorizontalScrollbar.value&&(R.paddingBottom="10px"),je.shouldShowVirticalScrollbar.value&&(R.paddingRight="10px"),R}),aa=e.computed(()=>({...M.value,borderRadius:"5px"})),{renderDataGridPagination:Aa}=ce.getPagination(t,n,h,je,L,C),ia=e.computed(()=>({"d-flex":!0,"justify-content-between":A.value&&$.value,"justify-content-end":A.value&&!$.value,"position-relative":!0})),la=e.computed(()=>({"d-flex":!0,"align-items-center":!0}));function sa(R){const Z=R.map(de=>de.id),he=[...d.value,...s,...u];he.filter(de=>de.dataType!==ce.COMMAND_COLUMN_DATA_TYPE&&de.dataType!==ce.SETTING_COLUMN_DATA_TYPE).forEach(de=>{const Ce=R.find(We=>We.id===de.id);Ce&&(de.width=Ce.actualWidth||de.width||120,de.title=Ce.title,de.halign=Ce.halign,de.align=Ce.align,de.fixed=Ce.fixed)}),u=he.filter(de=>de.dataType===ce.COMMAND_COLUMN_DATA_TYPE||de.dataType===ce.SETTING_COLUMN_DATA_TYPE);const pe=he.filter(de=>de.dataType!==ce.COMMAND_COLUMN_DATA_TYPE&&de.dataType!==ce.SETTING_COLUMN_DATA_TYPE),ye=pe.filter(de=>Z.includes(de.id));s=pe.filter(de=>!Z.includes(de.id)),ye.sort((de,Ce)=>{const We=R.findIndex(Ye=>Ye.id===de.id),et=R.findIndex(Ye=>Ye.id===Ce.id);return We-et}),ze(ye)}const{renderDataGridSummary:ca}=ce.getSummary(t,h,J);return()=>e.createVNode(e.Fragment,null,[oe.value&&e.createVNode("div",{class:"fv-grid-search",style:{padding:"8px 12px",border:"1px solid #e0e0e0",borderBottom:"none",borderRadius:"4px 4px 0 0"}},[e.createVNode("div",{style:{display:"flex",alignItems:"center"}},[e.createVNode(wo,{value:I.value,onInput:R=>I.value=R,onKeydown:na,placeholder:"搜索数据...",style:{flex:1}},null),e.createVNode(So,{type:"link",onClick:oa,style:{cursor:"pointer",marginLeft:"8px"}},{default:()=>[e.createVNode("i",{class:"f-icon f-icon-search"},null)]})])]),e.createVNode("div",{ref:S,class:It.value,style:aa.value,onWheel:it},[r.value&&qt.value&&Lt(),e.createVNode("div",{ref:r,class:Ot.value,onMouseover:()=>F.value=!0,onMouseleave:()=>F.value=!1,onTouchstart:R=>{R.stopPropagation(),F.value=!0,je.onTouchstartScrollThumb(R,r)},onTouchend:R=>{F.value=!1},style:ra.value},[r.value&&At(N),r.value&&Pt(),r.value&&Rr.value&&$r(),r.value&&$t(),r.value&&zt()]),r.value&&ca(),$.value&&e.createVNode("div",{class:ia.value},[$.value&&e.createVNode("div",{class:la.value},[e.createVNode("div",null,["已选:"+P.value.length,e.createTextVNode(" 条")])])]),Tt(),V.value&&Rt()]),t.enableColumnSettingSolution&&e.createVNode(ce.ColumnSettingSolution,{columns:[...d.value,...s],componentId:t.id,modelValue:l.value,"onUpdate:modelValue":R=>l.value=R,onChangeColumnSetting:sa},null)])}});Me.withInstall(Vt);function to(t){const{designerHostService:n}=t,o=new Map,l=e.ref(),i=e.ref(),a=e.ref([{field:"name",title:"字段名称"},{field:"bi