@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 513 kB
JavaScript
(function(q,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("bignumber.js"),require("lodash-es"),require("../components/locale/index.umd.js"),require("../components/common/index.umd.js"),require("@vueuse/core"),require("../components/data-view/index.umd.js"),require("../components/input-group/index.umd.js"),require("../components/button/index.umd.js"),require("../components/dynamic-resolver/index.umd.js"),require("../components/designer-canvas/index.umd.js"),require("../components/dynamic-view/index.umd.js"),require("../components/section/index.umd.js"),require("../components/accordion/index.umd.js"),require("../components/avatar/index.umd.js"),require("./button-edit/index.umd.js"),require("../components/button-group/index.umd.js"),require("../components/calendar/index.umd.js"),require("./capsule/index.umd.js"),require("./checkbox/index.umd.js"),require("./checkbox-group/index.umd.js"),require("../components/combo-list/index.umd.js"),require("../components/combo-tree/index.umd.js"),require("../components/component/index.umd.js"),require("../components/color-picker/index.umd.js"),require("../components/content-container/index.umd.js"),require("./date-picker/index.umd.js"),require("./data-grid/index.umd.js"),require("../components/dropdown/index.umd.js"),require("./dynamic-form/index.umd.js"),require("../components/events-editor/index.umd.js"),require("../components/filter-bar/index.umd.js"),require("../components/field-selector/index.umd.js"),require("../components/binding-selector/index.umd.js"),require("../components/image-cropper/index.umd.js"),require("./input-group/index.umd.js"),require("../components/layout/index.umd.js"),require("../components/list-nav/index.umd.js"),require("./list-view/index.umd.js"),require("../components/lookup/index.umd.js"),require("../components/mapping-editor/index.umd.js"),require("../components/nav/index.umd.js"),require("../components/number-range/index.umd.js"),require("./number-spinner/index.umd.js"),require("../components/order/index.umd.js"),require("../components/page-header/index.umd.js"),require("../components/page-footer/index.umd.js"),require("../components/pagination/index.umd.js"),require("../components/progress/index.umd.js"),require("../components/query-solution/index.umd.js"),require("./radio-group/index.umd.js"),require("./rate/index.umd.js"),require("./response-toolbar/index.umd.js"),require("../components/response-layout/index.umd.js"),require("./response-layout-editor/index.umd.js"),require("../components/search-box/index.umd.js"),require("./section/index.umd.js"),require("../components/smoke-detector/index.umd.js"),require("../components/splitter/index.umd.js"),require("../components/step/index.umd.js"),require("./switch/index.umd.js"),require("./tabs/index.umd.js"),require("./tags/index.umd.js"),require("../components/text/index.umd.js"),require("./time-picker/index.umd.js"),require("../components/transfer/index.umd.js"),require("../components/tree-view/index.umd.js"),require("../components/uploader/index.umd.js"),require("../components/verify-detail/index.umd.js"),require("../components/video/index.umd.js"),require("./textarea/index.umd.js"),require("../components/schema-selector/index.umd.js"),require("./tree-grid/index.umd.js"),require("../components/event-parameter/index.umd.js"),require("../components/filter-condition-editor/index.umd.js"),require("../components/fieldset/index.umd.js"),require("../components/sort-condition-editor/index.umd.js"),require("../components/menu-lookup/index.umd.js"),require("./drawer/index.umd.js"),require("../components/json-editor/index.umd.js"),require("../components/property-editor/index.umd.js"),require("../components/expression-editor/index.umd.js"),require("../components/code-editor/index.umd.js"),require("../components/html-template/index.umd.js"),require("../components/collection-property-editor/index.umd.js"),require("./modal/index.umd.js"),require("../components/external-container/index.umd.js"),require("../components/language-textbox/index.umd.js"),require("../components/image/index.umd.js"),require("../components/comment/index.umd.js"),require("../components/property-panel/index.umd.js"),require("../components/notify/index.umd.js"),require("../components/modal/index.umd.js"),require("../components/button-edit/index.umd.js"),require("../components/data-grid/index.umd.js"),require("../components/tree-grid/index.umd.js"),require("../components/popover/index.umd.js"),require("../components/dynamic-form/index.umd.js"),require("../components/tabs/index.umd.js"),require("../components/textarea/index.umd.js"),require("../components/capsule/index.umd.js"),require("../components/response-toolbar/index.umd.js"),require("../components/list-view/index.umd.js"),require("../components/loading/index.umd.js"),require("../components/checkbox/index.umd.js"),require("../components/tags/index.umd.js"),require("../components/drawer/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","bignumber.js","lodash-es","../components/locale/index.umd.js","../components/common/index.umd.js","@vueuse/core","../components/data-view/index.umd.js","../components/input-group/index.umd.js","../components/button/index.umd.js","../components/dynamic-resolver/index.umd.js","../components/designer-canvas/index.umd.js","../components/dynamic-view/index.umd.js","../components/section/index.umd.js","../components/accordion/index.umd.js","../components/avatar/index.umd.js","./button-edit/index.umd.js","../components/button-group/index.umd.js","../components/calendar/index.umd.js","./capsule/index.umd.js","./checkbox/index.umd.js","./checkbox-group/index.umd.js","../components/combo-list/index.umd.js","../components/combo-tree/index.umd.js","../components/component/index.umd.js","../components/color-picker/index.umd.js","../components/content-container/index.umd.js","./date-picker/index.umd.js","./data-grid/index.umd.js","../components/dropdown/index.umd.js","./dynamic-form/index.umd.js","../components/events-editor/index.umd.js","../components/filter-bar/index.umd.js","../components/field-selector/index.umd.js","../components/binding-selector/index.umd.js","../components/image-cropper/index.umd.js","./input-group/index.umd.js","../components/layout/index.umd.js","../components/list-nav/index.umd.js","./list-view/index.umd.js","../components/lookup/index.umd.js","../components/mapping-editor/index.umd.js","../components/nav/index.umd.js","../components/number-range/index.umd.js","./number-spinner/index.umd.js","../components/order/index.umd.js","../components/page-header/index.umd.js","../components/page-footer/index.umd.js","../components/pagination/index.umd.js","../components/progress/index.umd.js","../components/query-solution/index.umd.js","./radio-group/index.umd.js","./rate/index.umd.js","./response-toolbar/index.umd.js","../components/response-layout/index.umd.js","./response-layout-editor/index.umd.js","../components/search-box/index.umd.js","./section/index.umd.js","../components/smoke-detector/index.umd.js","../components/splitter/index.umd.js","../components/step/index.umd.js","./switch/index.umd.js","./tabs/index.umd.js","./tags/index.umd.js","../components/text/index.umd.js","./time-picker/index.umd.js","../components/transfer/index.umd.js","../components/tree-view/index.umd.js","../components/uploader/index.umd.js","../components/verify-detail/index.umd.js","../components/video/index.umd.js","./textarea/index.umd.js","../components/schema-selector/index.umd.js","./tree-grid/index.umd.js","../components/event-parameter/index.umd.js","../components/filter-condition-editor/index.umd.js","../components/fieldset/index.umd.js","../components/sort-condition-editor/index.umd.js","../components/menu-lookup/index.umd.js","./drawer/index.umd.js","../components/json-editor/index.umd.js","../components/property-editor/index.umd.js","../components/expression-editor/index.umd.js","../components/code-editor/index.umd.js","../components/html-template/index.umd.js","../components/collection-property-editor/index.umd.js","./modal/index.umd.js","../components/external-container/index.umd.js","../components/language-textbox/index.umd.js","../components/image/index.umd.js","../components/comment/index.umd.js","../components/property-panel/index.umd.js","../components/notify/index.umd.js","../components/modal/index.umd.js","../components/button-edit/index.umd.js","../components/data-grid/index.umd.js","../components/tree-grid/index.umd.js","../components/popover/index.umd.js","../components/dynamic-form/index.umd.js","../components/tabs/index.umd.js","../components/textarea/index.umd.js","../components/capsule/index.umd.js","../components/response-toolbar/index.umd.js","../components/list-view/index.umd.js","../components/loading/index.umd.js","../components/checkbox/index.umd.js","../components/tags/index.umd.js","../components/drawer/index.umd.js"],t):(q=typeof globalThis<"u"?globalThis:q||self,t(q.FarrisVue={},q.vue,null,q.lodashEs,q.locale,q.common,q.core,q.dataView,q.FInputGroup,q.FButton,q.dynamicResolver,q.designerCanvas,q.dynamicView,q.FSection,q.FAccordion,q.FAvatar,q.FButtonEdit$1,q.FButtonGroup,q.FCalendar,q.FCapsule,q.FCheckbox,q.FCheckboxGroup,q.FComboList,q.FComboTree,q.FComponent,q.FColorPicker,q.FContentContainer,q.FDatePicker,q.FDataGrid$1,q.FDropdown,q.FDynamicForm$1,q.FEventsEditor,q.FFilterBar,q.FFieldSelector,q.FBindingSelector,q.FImageCropper,q.FInputGroup$1,q.FLayout,q.FListNav,q.FListView$1,q.FLookup$1,q.FMappingEditor,q.FNav,q.FNumberRange,q.FNumberSpinner,q.FOrder,q.FPageHeader,q.FPageFooter,q.FPagination$1,q.FProgress,q.FQuerySolution,q.FRadioGroup,q.FRate,q.FResponseToolbar,q.FResponseLayout,q.FResponseLayoutEditorSetting,q.FSearchBox$1,q.FSection$1,q.FSmokeDetector,q.FSplitter,q.FStep$1,q.FSwitch,q.FTabs$1,q.FTags,q.FText,q.FTimePicker,q.FTransfer,q.FTreeView,q.FUploader,q.FVerifyDetail,q.FVideo,q.FTextArea,q.FSchemaSelector$1,q.FTreeGrid$1,q.FEventParameter$1,q.FFilterConditionEditor,q.FFieldset,q.FSortConditionEditor,q.FMenuLookup,q.FDrawer,q.FJsonEditor,q.FPropertyEditor,q.FExpressionEditor,q.FCodeEditor,q.FHtmlTemplate,q.FCollectionPropertyEditor,q.FModal$1,q.FExternalContainer,q.FLanguageTextbox,q.FImage,q.FComment,q.propertyPanel,q.notify,q.modal,q.FButtonEdit$2,q.dataGrid,q.treeGrid,q.FPopover,q.FResponseForm$1,q.FTabs$2,q.FTextarea,q.FCapsule$1,q.FResponseToolbar$1,q.FListView$2,q.FLoading$1,q.checkbox,q.FTags$1,q.FDrawer$1))})(this,function(q,t,sn,Oe,Ze,Re,aa,ae,Dr,Zn,et,ce,Bt,Kn,ia,ra,eo,la,sa,ca,to,xn,Fn,Br,da,ua,fa,pa,ma,ga,ha,Or,ya,cn,va,ba,Ca,_t,wa,Sa,Ta,Lr,xa,Fa,Va,Na,ka,Pa,Ia,Ea,Ma,Da,Ba,Oa,La,ja,Aa,Ra,$a,_a,za,Ua,Ha,qa,Ga,Wa,Ya,Kt,Xa,Ja,Qa,Za,jr,Ka,Ar,Rr,ei,$r,_r,ti,zr,Ur,Hr,qr,ni,Gr,Wr,oi,ai,ii,ri,no,dn,li,oo,Vn,ao,si,Nn,ci,Yr,Xr,Jr,Qr,Zr,io,Kr,el){"use strict";var rf=Object.defineProperty;var lf=(q,t,sn)=>t in q?rf(q,t,{enumerable:!0,configurable:!0,writable:!0,value:sn}):q[t]=sn;var Pe=(q,t,sn)=>lf(q,typeof t!="symbol"?t+"":t,sn);const tl=["moz","ms","webkit"];function nl(){let e=0;return n=>{const o=new Date().getTime(),a=Math.max(0,16-(o-e)),i=setTimeout(()=>{n(o+a)},a);return e=o+a,i}}function ol(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const e=tl.filter(n=>`${n}RequestAnimationFrame`in window)[0];return e?window[`${e}RequestAnimationFrame`]:nl()}ol();const al=Symbol("controller schema repository inject token"),il=Symbol("form schema repository inject token"),jt=t.ref(0);function rl(){jt.value++}function ll(e,n){const o=n.getBoundingClientRect(),a=e.getBoundingClientRect(),i=a.top>=o.top,r=a.top<=o.bottom;return i&&r}function ro(e){const n=e.querySelector(".component-btn-group");if(!n)return;n.style.display="";const o=n.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const a=n.querySelector("div");if(a){const i=a.getBoundingClientRect();a.style.top=o.top+"px";let r=o.left-i.width;const l=document.querySelector(".editorDiv");if(l){const s=l.getBoundingClientRect();r<s.left&&({left:r}=e.getBoundingClientRect())}a.style.left=r+"px"}}}function di(e){var o,a,i,r,l;if(!window.scrollContainerList)return;const n=Array.from(window.scrollContainerList);if(n.length)if(n.length===1){const s=n[0],f=document.querySelector(`[id=${s}]`);if(f&&f.contains(e))return f}else{const{componentInstance:s}=e;if(((o=s==null?void 0:s.value)==null?void 0:o.scrollElementId)===((a=s==null?void 0:s.value.schema)==null?void 0:a.id))return e;if(((i=s==null?void 0:s.value)==null?void 0:i.scrollElementId)===`${(r=s==null?void 0:s.value.schema)==null?void 0:r.id}-design-item`)return e.parentElement;if((l=s.value.parent)!=null&&l.elementRef)return di(s.value.parent.elementRef)}}function kn(e){if(!e)return;const n=e.getBoundingClientRect();if(n.width===0&&n.height===0)return;const o=e.querySelector(".component-btn-group");if(o){let a=!0;const i=di(e);if(i&&(a=ll(e,i)),!a){o.style.display="none";return}ro(e)}}function un(e){if(!e)return;let n;e.className.includes("dgComponentSelected")?n=e:n=e.querySelector(".dgComponentSelected"),n&&kn(n)}function sl(){const e=document.querySelector(".dgComponentSelected");if(!e)return;const n=e.querySelector(".component-btn-group");n&&n.getBoundingClientRect().top!==0&&ro(e)}const ui={modelValue:{type:Object,default:{}},componentId:{type:String,default:""},components:{type:Array},canvasMode:{type:String,default:"PC"}};var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fi={exports:{}};(function(e,n){(function(o){e.exports=o()})(function(){return function(){function o(a,i,r){function l(u,d){if(!i[u]){if(!a[u]){var c=typeof Pn=="function"&&Pn;if(!d&&c)return c(u,!0);if(s)return s(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[u]={exports:{}};a[u][0].call(p.exports,function(m){var g=a[u][1][m];return l(g||m)},p,p.exports,o,a,i,r)}return i[u].exports}for(var s=typeof Pn=="function"&&Pn,f=0;f<r.length;f++)l(r[f]);return l}return o}()({1:[function(o,a,i){var r={},l="(?:^|\\s)",s="(?:\\s|$)";function f(c){var h=r[c];return h?h.lastIndex=0:r[c]=h=new RegExp(l+c+s,"g"),h}function u(c,h){var p=c.className;p.length?f(h).test(p)||(c.className+=" "+h):c.className=h}function d(c,h){c.className=c.className.replace(f(h)," ").trim()}a.exports={add:u,rm:d}},{}],2:[function(o,a,i){(function(r){var l=o("contra/emitter"),s=o("crossvent"),f=o("./classes"),u=document,d=u.documentElement;function c(B,I){var $=arguments.length;$===1&&Array.isArray(B)===!1&&(I=B,B=[]);var j,L,C,T,k,P,M,O,z,X=null,R,U,Q=!1,ee=0,H,_=I||{};_.moves===void 0&&(_.moves=b),_.accepts===void 0&&(_.accepts=b),_.invalid===void 0&&(_.invalid=we),_.containers===void 0&&(_.containers=B||[]),_.isContainer===void 0&&(_.isContainer=y),_.copy===void 0&&(_.copy=!1),_.copySortSource===void 0&&(_.copySortSource=!1),_.revertOnSpill===void 0&&(_.revertOnSpill=!1),_.removeOnSpill===void 0&&(_.removeOnSpill=!1),_.direction===void 0&&(_.direction="vertical"),_.ignoreInputTextSelection===void 0&&(_.ignoreInputTextSelection=!0),_.mirrorContainer===void 0&&(_.mirrorContainer=u.body);var A=l({containers:_.containers,start:xe,end:Ce,cancel:qe,remove:se,destroy:re,canMove:Me,dragging:!1});return _.removeOnSpill===!0&&A.on("over",Et).on("out",Mt),G(),A;function Y(J){return A.containers.indexOf(J)!==-1||_.isContainer(J)}function G(J){var me=J?"remove":"add";m(d,me,"mousedown",ve),m(d,me,"mouseup",He)}function ne(J){var me=J?"remove":"add";m(d,me,"mousemove",be)}function Z(J){var me=J?"remove":"add";s[me](d,"selectstart",ie),s[me](d,"click",ie)}function re(){G(!0),He({})}function ie(J){R&&J.preventDefault()}function ve(J){T=J.clientX,k=J.clientY;var me=g(J)!==1||J.metaKey||J.ctrlKey;if(!me){var ge=J.target,De=Be(ge);De&&(R=De,ne(),J.type==="mousedown"&&(E(ge)?ge.focus():J.preventDefault()))}}function be(J){if(R){if(g(J)===0){He({});return}if(!(J.clientX!==void 0&&Math.abs(J.clientX-T)<=(_.slideFactorX||0)&&J.clientY!==void 0&&Math.abs(J.clientY-k)<=(_.slideFactorY||0))){if(_.ignoreInputTextSelection){var me=w("clientX",J)||0,ge=w("clientY",J)||0,De=u.elementFromPoint(me,ge);if(E(De))return}var Xe=R;ne(!0),Z(),Ce(),de(Xe),f.add(O||C,"gu-transit"),Le(),te(),ee=0,Ge(J)}}}function Be(J){if(!(A.dragging&&j)&&!Y(J)){for(var me=J;V(J)&&Y(V(J))===!1;)if(_.invalid(J,me)||(J=V(J),!J))return;var ge=V(J);if(ge&&!_.invalid(J,me)){var De=_.moves(J,ge,me,F(J));if(De)return{item:J,source:ge}}}}function Me(J){return!!Be(J)}function xe(J){var me=Be(J);me&&de(me)}function de(J){pt(J.item,J.source)&&(O=J.item.cloneNode(!0),A.emit("cloned",O,J.item,"copy")),L=J.source,C=J.item,P=M=F(J.item),A.dragging=!0,A.emit("drag",C,L)}function we(){return!1}function Ce(){if(A.dragging){var J=O||C;ut(J,V(J))}}function Se(){R=!1,ne(!0),Z(!0)}function He(J){if(Se(),!!A.dragging){var me=O||C,ge=w("clientX",J)||0,De=w("clientY",J)||0,Xe=v(j,ge,De),Qe=We(Xe,ge,De);Qe&&(O&&_.copySortSource||!O||Qe!==L)?ut(me,Qe):_.removeOnSpill?se():qe()}}function ut(J,me){var ge=V(J);O&&_.copySortSource&&me===L&&ge.removeChild(C),Ie(me)?A.emit("cancel",J,L):A.emit("drop",J,me,L,M),oe()}function se(){if(A.dragging){var J=O||C,me=V(J);me&&me.removeChild(J),A.emit(O?"cancel":"remove",J,me,L),oe()}}function qe(J){if(A.dragging){var me=arguments.length>0?J:_.revertOnSpill,ge=O||C,De=V(ge),Xe=Ie(De);Xe===!1&&me&&(O?De&&De.removeChild(O):L.insertBefore(ge,P)),Xe||me?A.emit("cancel",ge,L,L):A.emit("drop",ge,De,L,M),oe()}}function oe(){var J=O||C;Se(),Ye(),W(),J&&f.rm(J,"gu-transit"),z&&clearTimeout(z),A.dragging=!1,X&&A.emit("out",J,X,L),A.emit("dragend",J,ee),L=C=O=P=M=z=X=null}function Ie(J,me){var ge;return me!==void 0?ge=me:j?ge=M:ge=F(O||C),J===L&&ge===P}function We(J,me,ge){for(var De=J;De&&!Xe();)De=V(De);return De;function Xe(){var Qe=Y(De);if(Qe===!1)return!1;var vt=he(De,J),bt=gt(De,vt,me,ge),xt=Ie(De,bt);return xt?!0:_.accepts(C,De,L,bt)}}function Ge(J){if(!j)return;J.preventDefault();var me=w("clientX",J)||0,ge=w("clientY",J)||0;j.style.left=me-2+"px",j.style.top=ge-2+"px";var De=O||C,Xe=v(j,me,ge),Qe=We(Xe,me,ge),vt=Qe!==null&&Qe!==X;(vt||Qe===null)&&(St(),X=Qe,Ft()),_e(Xe,ge);var bt=V(De);if(Qe===L&&O&&!_.copySortSource){bt&&bt.removeChild(De);return}var xt,Ct=he(Qe,Xe);if(Q=Te(Ct,Qe),Ct!==null)xt=gt(Qe,Ct,me,ge);else if(_.revertOnSpill===!0&&!O)xt=P,Qe=L;else{O&&bt&&bt.removeChild(De),O&&U&&(U.style.display="none");return}U.style.display="block",st(xt,De,vt),xt?$e(Ct,xt):Ae(Qe);function mt(ht){A.emit(ht,De,X,L)}function Ft(){vt&&mt("over")}function St(){X&&mt("out")}}function st(J,me,ge){(J===me||J===F(me))&&(M=F(me)),(J===null&&ge||J!==me&&J!==F(me))&&(M=J)}function Et(J){f.rm(J,"gu-hide")}function Mt(J){A.dragging&&f.add(J,"gu-hide")}function te(){j||(j=document.createElement("div"),j.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;",j.innerHTML=_.getMirrorText&&_.getMirrorText(C)||"控件",f.add(j,"gu-mirror"),_.mirrorContainer.appendChild(j),m(d,"add","mousemove",Ge),f.add(_.mirrorContainer,"gu-unselectable"),A.emit("cloned",j,C,"mirror"))}function Le(){if(U=document.createElement("div"),f.add(U,"gu-insertion"),C){var J=C.getBoundingClientRect();U.style.left=J.left+"px",U.style.top=J.top+"px"}Q=!1,_.mirrorContainer.appendChild(U)}function Ye(){j&&(f.rm(_.mirrorContainer,"gu-unselectable"),m(d,"remove","mousemove",Ge),V(j).removeChild(j),j=null)}function W(){U&&(V(U).removeChild(U),U=null)}function he(J,me){for(var ge=me;ge!==J&&V(ge)!==J;)ge=V(ge);return ge===d?null:ge}function Te(J,me){if(!me)return Q;var ge=J||me&&me.lastElementChild;if(!ge)return!0;var De=getComputedStyle(J),Xe=/^inline/.test(De.getPropertyValue("display"))||/^(left|right)$/.test(De.getPropertyValue("float"));if(Xe)return!0;if(me){var Qe=getComputedStyle(me),vt=Qe.getPropertyValue("display");if(/flex$/.test(vt)){var bt=Qe.getPropertyValue("flex-direction")||"row";if(bt==="row"||bt==="row-reverse")return!je(me)}return!1}return!0}function je(J){if(!J.children||!J.children.length)return!1;for(const me of Array.from(J.children)){const De=(me.className&&me.className.split(" ")||[]).filter(Xe=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Xe));if(!De.length)return!1;for(const Xe of De){const Qe=Xe.slice(Xe.lastIndexOf("-")+1);if(parseInt(Qe,10)!==12)return!1}}return!0}function $e(J,me){const ge=me.getBoundingClientRect();if(U.style.left=ge.left+"px",U.style.top=ge.top+"px",Q){if(U.style.height=ge.height+"px",U.style.width="4px",J){const De=J.getBoundingClientRect();De.top!==ge.top&&(U.style.left=De.right+"px",U.style.top=De.top+"px",U.style.height=De.height+"px")}}else if(U.style.height="4px",U.style.width=ge.width+"px",H){const De=H.getBoundingClientRect();ge.top<De.top&&(U.style.display="none")}me===C&&C&&(U.style.display="none")}function Ae(J){M=null;var me=J.lastElementChild;if(me){var ge=me.getBoundingClientRect();Q?(U.style.left=ge.right+"px",U.style.top=ge.top+"px",U.style.height=ge.height+"px",U.style.width="4px"):(U.style.left=ge.left+"px",U.style.top=ge.bottom+"px",U.style.height="4px",U.style.width=ge.width+"px"),me===C&&C&&(U.style.display="none")}else U.style.display="none"}function _e(J,me){if(!_.mirrorContainer.contains(J)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(H=h(J),!H||!H.contains(J)))return;const ge=document.querySelector(".dgComponentSelected"),De=H.getBoundingClientRect();if(me-30<De.top&&H.scrollTop>0){let Xe=H.scrollTop<10?H.scrollTop:10;H.scrollBy(0,-1*Xe),ge&&H.contains(ge)&&(ee=ee+-1*Xe)}if(me+30>De.bottom&&H.scrollTop<H.scrollHeight-H.clientHeight){const Xe=H.scrollHeight-H.clientHeight-H.scrollTop;let Qe=Xe<10?Xe:10;H.scrollBy(0,Qe),ge&&H.contains(ge)&&(ee=ee+Qe)}}function gt(J,me,ge,De){var Xe=_.direction==="horizontal",Qe=_.direction==="mixed",vt=me!==J?xt():bt();return vt;function bt(){var mt=J.children.length,Ft,St,ht;for(Ft=0;Ft<mt;Ft++)if(St=J.children[Ft],ht=St.getBoundingClientRect(),Xe&&ht.left+ht.width/2>ge||!Qe&&!Xe&&ht.top+ht.height/2>De||Qe&&ht.left+ht.width>ge&&ht.top+ht.height>De)return St;return null}function xt(){var mt=me.getBoundingClientRect();if(Qe){var Ft=De-mt.top,St=ge-mt.left,ht=mt.bottom-De,Dt=mt.right-ge,Zt=Math.min(St,Dt,Ft,ht),Rt;return Q?Rt=Dt<St:Rt=ht===Zt||Dt===Zt||St===Zt,Ct(Rt)}return Ct(Xe?ge>mt.left+D(mt)/2:De>mt.top+x(mt)/2)}function Ct(mt){return mt?F(me):me}}function pt(J,me){return typeof _.copy=="boolean"?_.copy:_.copy(J,me)}}function h(B){const I=Array.from(window.scrollContainerList);if(I.length===1){const j=Array.from(window.scrollContainerList)[0];return document.getElementById(j)}const $=p(I);for(const j of $)if(j.contains(B))return j;return null}function p(B){const I=[];return B.forEach($=>{const j=document.getElementById($);j&&I.push(j)}),I.sort(($,j)=>$.contains(j)?1:j.contains($)?-1:0),I}function m(B,I,$,j){var L={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},C={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},T={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};r.navigator.pointerEnabled?s[I](B,C[$],j):r.navigator.msPointerEnabled?s[I](B,T[$],j):(s[I](B,L[$],j),s[I](B,$,j))}function g(B){if(B.touches!==void 0)return B.touches.length;if(B.which!==void 0&&B.which!==0)return B.which;if(B.buttons!==void 0)return B.buttons;var I=B.button;if(I!==void 0)return I&1?1:I&2?3:I&4?2:0}function v(B,I,$){B=B||{};var j=B.className||"",L;return B.className+=" gu-hide",L=u.elementFromPoint(I,$),B.className=j,L}function y(){return!1}function b(){return!0}function D(B){return B.width||B.right-B.left}function x(B){return B.height||B.bottom-B.top}function V(B){return B.parentNode===u?null:B.parentNode}function E(B){return B.tagName==="INPUT"||B.tagName==="TEXTAREA"||B.tagName==="SELECT"||N(B)}function N(B){return!B||B.contentEditable==="false"?!1:B.contentEditable==="true"?!0:N(V(B))}function F(B){return B.nextElementSibling||I();function I(){var $=B;do $=$.nextSibling;while($&&$.nodeType!==1);return $}}function S(B){return B.targetTouches&&B.targetTouches.length?B.targetTouches[0]:B.changedTouches&&B.changedTouches.length?B.changedTouches[0]:B}function w(B,I){var $=S(I),j={pageX:"clientX",pageY:"clientY"};return B in j&&!(B in $)&&j[B]in $&&(B=j[B]),$[B]}a.exports=c}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,a,i){a.exports=function(l,s){return Array.prototype.slice.call(l,s)}},{}],4:[function(o,a,i){var r=o("ticky");a.exports=function(s,f,u){s&&r(function(){s.apply(u||null,f||[])})}},{ticky:10}],5:[function(o,a,i){var r=o("atoa"),l=o("./debounce");a.exports=function(f,u){var d=u||{},c={};return f===void 0&&(f={}),f.on=function(h,p){return c[h]?c[h].push(p):c[h]=[p],f},f.once=function(h,p){return p._once=!0,f.on(h,p),f},f.off=function(h,p){var m=arguments.length;if(m===1)delete c[h];else if(m===0)c={};else{var g=c[h];if(!g)return f;g.splice(g.indexOf(p),1)}return f},f.emit=function(){var h=r(arguments);return f.emitterSnapshot(h.shift()).apply(this,h)},f.emitterSnapshot=function(h){var p=(c[h]||[]).slice(0);return function(){var m=r(arguments),g=this||f;if(h==="error"&&d.throws!==!1&&!p.length)throw m.length===1?m[0]:m;return p.forEach(function(y){d.async?l(y,m,g):y.apply(g,m),y._once&&f.off(h,y)}),f}},f}},{"./debounce":4,atoa:3}],6:[function(o,a,i){(function(r){var l=o("custom-event"),s=o("./eventmap"),f=r.document,u=h,d=m,c=[];r.addEventListener||(u=p,d=g),a.exports={add:u,remove:d,fabricate:v};function h(V,E,N,F){return V.addEventListener(E,N,F)}function p(V,E,N){return V.attachEvent("on"+E,b(V,E,N))}function m(V,E,N,F){return V.removeEventListener(E,N,F)}function g(V,E,N){var F=D(V,E,N);if(F)return V.detachEvent("on"+E,F)}function v(V,E,N){var F=s.indexOf(E)===-1?w():S();V.dispatchEvent?V.dispatchEvent(F):V.fireEvent("on"+E,F);function S(){var B;return f.createEvent?(B=f.createEvent("Event"),B.initEvent(E,!0,!0)):f.createEventObject&&(B=f.createEventObject()),B}function w(){return new l(E,{detail:N})}}function y(V,E,N){return function(S){var w=S||r.event;w.target=w.target||w.srcElement,w.preventDefault=w.preventDefault||function(){w.returnValue=!1},w.stopPropagation=w.stopPropagation||function(){w.cancelBubble=!0},w.which=w.which||w.keyCode,N.call(V,w)}}function b(V,E,N){var F=D(V,E,N)||y(V,E,N);return c.push({wrapper:F,element:V,type:E,fn:N}),F}function D(V,E,N){var F=x(V,E,N);if(F){var S=c[F].wrapper;return c.splice(F,1),S}}function x(V,E,N){var F,S;for(F=0;F<c.length;F++)if(S=c[F],S.element===V&&S.type===E&&S.fn===N)return F}}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,a,i){(function(r){var l=[],s="",f=/^on/;for(s in r)f.test(s)&&l.push(s.slice(2));a.exports=l}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,a,i){(function(r){var l=r.CustomEvent;function s(){try{var f=new l("cat",{detail:{foo:"bar"}});return f.type==="cat"&&f.detail.foo==="bar"}catch{}return!1}a.exports=s()?l:typeof document<"u"&&typeof document.createEvent=="function"?function(u,d){var c=document.createEvent("CustomEvent");return d?c.initCustomEvent(u,d.bubbles,d.cancelable,d.detail):c.initCustomEvent(u,!1,!1,void 0),c}:function(u,d){var c=document.createEventObject();return c.type=u,d?(c.bubbles=!!d.bubbles,c.cancelable=!!d.cancelable,c.detail=d.detail):(c.bubbles=!1,c.cancelable=!1,c.detail=void 0),c}}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,a,i){var r=a.exports={},l,s;function f(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?l=setTimeout:l=f}catch{l=f}try{typeof clearTimeout=="function"?s=clearTimeout:s=u}catch{s=u}})();function d(x){if(l===setTimeout)return setTimeout(x,0);if((l===f||!l)&&setTimeout)return l=setTimeout,setTimeout(x,0);try{return l(x,0)}catch{try{return l.call(null,x,0)}catch{return l.call(this,x,0)}}}function c(x){if(s===clearTimeout)return clearTimeout(x);if((s===u||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(x);try{return s(x)}catch{try{return s.call(null,x)}catch{return s.call(this,x)}}}var h=[],p=!1,m,g=-1;function v(){!p||!m||(p=!1,m.length?h=m.concat(h):g=-1,h.length&&y())}function y(){if(!p){var x=d(v);p=!0;for(var V=h.length;V;){for(m=h,h=[];++g<V;)m&&m[g].run();g=-1,V=h.length}m=null,p=!1,c(x)}}r.nextTick=function(x){var V=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)V[E-1]=arguments[E];h.push(new b(x,V)),h.length===1&&!p&&d(y)};function b(x,V){this.fun=x,this.array=V}b.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function D(){}r.on=D,r.addListener=D,r.once=D,r.off=D,r.removeListener=D,r.removeAllListeners=D,r.emit=D,r.prependListener=D,r.prependOnceListener=D,r.listeners=function(x){return[]},r.binding=function(x){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(x){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],10:[function(o,a,i){(function(r){var l=typeof r=="function",s;l?s=function(f){r(f)}:s=function(f){setTimeout(f,0)},a.exports=s}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,a,i){(function(r,l){var s=o("process/browser.js").nextTick,f=Function.prototype.apply,u=Array.prototype.slice,d={},c=0;i.setTimeout=function(){return new h(f.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(f.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(p){p.close()};function h(p,m){this._id=p,this._clearFn=m}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(p,m){clearTimeout(p._idleTimeoutId),p._idleTimeout=m},i.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},i._unrefActive=i.active=function(p){clearTimeout(p._idleTimeoutId);var m=p._idleTimeout;m>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},m))},i.setImmediate=typeof r=="function"?r:function(p){var m=c++,g=arguments.length<2?!1:u.call(arguments,1);return d[m]=!0,s(function(){d[m]&&(g?p.apply(null,g):p.call(null),i.clearImmediate(m))}),m},i.clearImmediate=typeof l=="function"?l:function(p){delete d[p]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(fi);var dl=fi.exports;const pi=cl(dl),ul={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}},fl={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},lo=t.defineComponent({name:"Toast",props:fl,emits:["close","click"],setup:(e,n)=>{const o=t.ref(e.animate),a="fadeOut",i=t.computed(()=>e.options),r=t.ref(!1),l=t.computed(()=>i.value.title&&i.value.message),s=t.computed(()=>!i.value.title&&i.value.message),f=t.computed(()=>{const b={animated:r.value,toast:!0,"toast--only-content":!l.value};return b[e.animate]=!1,b[a]=r.value,b["toasty-type-"+i.value.type]=!0,i.value.theme&&(b[i.value.theme]=!0),b}),u=t.computed(()=>{const x=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,V={"f-icon":!0};return V[x]=!0,V}),d=t.computed(()=>i.value.title||i.value.message),c=t.computed(()=>e.showCloseButton),h=t.computed(()=>!!i.value.buttons||!!n.slots.default),p=t.computed(()=>Ze.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function m(b){b.stopPropagation(),b.preventDefault(),r.value=!1,setTimeout(()=>{n.emit("close",i.value)},200)}function g(b,D){}function v(b){return`f-preten-link ${b.customClass?b.customClass:""}`}t.watch(o,()=>{o.value});const y=()=>{var b;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((b=i.value.buttons)==null?void 0:b.map(D=>t.createVNode("span",{class:v(D),onClick:x=>void 0},[D.text]))),n.slots.default&&n.slots.default()])])};return()=>t.createVNode("div",{class:f.value,style:"min-height:44px"},[c.value&&t.createVNode("button",{title:Ze.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:m},[t.createVNode("span",{class:"f-icon modal_close"},null)]),d.value&&t.createVNode("section",{class:"modal-tips"},[!l.value&&t.createVNode("div",{class:"float-left modal-tips-iconwrap"},[t.createVNode("span",{class:u.value},null)]),t.createVNode("div",{class:"modal-tips-content"},[l.value&&t.createVNode(t.Fragment,null,[t.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),t.createVNode("p",{class:"toast-msg",innerHTML:i.value.message,style:p.value},null),h.value&&y()]),s.value&&(i.value.buttons?t.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:p.value,innerHTML:i.value.message},null),t.createVNode("div",{class:"after-toast-title text-right ml-auto"},[y()])]):t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:p.value,innerHTML:i.value.message},null))])])])}}),In=t.defineComponent({name:"Notify",props:ul,emits:["close","empty"],setup(e,n){const o=t.computed(()=>({"farris-notify":!0})),a={left:12,right:12,top:20,bottom:12},i=t.ref(),r=t.ref(e.options),l=t.ref(e.showCloseButton),s=t.computed(()=>e.position||"bottom-right"),f=t.computed(()=>e.timeout!=null?e.timeout:3e3),u=t.computed(()=>{const h=e.bottom?e.bottom:a.bottom,p=e.top?e.top:a.top,m={transition:"all 0.2s ease",left:s.value.indexOf("left")>-1?`${e.left?e.left:a.left}px`:"",right:s.value.indexOf("right")>-1?`${e.right?e.right:a.right}px`:"",top:s.value.indexOf("top")>-1?`${p}px`:"",bottom:s.value.indexOf("bottom")>-1?`${h}px`:""};return s.value.indexOf("center")>-1&&(m.left="50%",m.marginLeft="calc(-24rem / 2)",s.value==="center-center"&&(m.top="50%",m.transform="translate(-50%, -50%)")),m});function d(h){n.emit("close")}f.value&&setTimeout(()=>{d()},f.value),n.expose({closeToast:d,container:i,notifyPosition:s});function c(h,p){d()}return()=>t.createVNode("div",{class:o.value,style:u.value,ref:i},[t.createVNode(lo,{options:r.value,showCloseButton:l.value,animate:e.animate,onClose:h=>c(h,r.value)},null)])}});class En{constructor(){Pe(this,"notifyRefs",[]);Pe(this,"globalConfig",t.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," ").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),r=document.createElement("div");r.style.display="contents";const l=t.createApp({setup(){var u;const s=t.ref();function f(){s.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,s),l.unmount()},220)}if(i.position.indexOf("top")>-1){const d=o.getNotifyInstances(i.position),c=d[d.length-1];if(c){const h=c.value.container.getBoundingClientRect();i.top=h.bottom}}return i.safeHtml&&((u=i.options)!=null&&u.message)&&(i.options.message=o.escapeAllHtml(i.options.message)),t.onUnmounted(()=>{document.body.removeChild(r)}),t.onMounted(()=>{o.updateNotifyPositionForCreate(i,s)}),()=>t.createVNode(t.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[t.createVNode(In,t.mergeProps({ref:s},i,{onClose:f}),null)]})}});return l.provide("NotifyService",this),document.body.appendChild(r),l.use(Ze.LocaleService.i18n),l.mount(r),l}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const a=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(i=>{const r=i.value.container.getBoundingClientRect();i.value.container.style.bottom=r.height+a-r.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const a=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const i=this.getNotifyInstances(n.position),r=i.indexOf(o);i.slice(r+1).forEach(l=>{l.value.container.style.top=l.value.container.offsetTop-l.value.container.offsetHeight+"px"})}a>-1&&this.notifyRefs.splice(a,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let a="",i="",r,l,s;typeof o=="string"?a=o:o&&(a=o.message||"",i=o.title||"",l=o.position||null,s=o.showCloseButton!=null?o.showCloseButton:null,r=o.timeout!=null?o.timeout:null);const u={options:{type:n,message:a,title:i}};return l!=null&&(u.position=l),s!=null&&(u.showCloseButton=s),r!=null&&(u.timeout=r),u}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 so=Symbol("NOTIFY_SERVICE_TOKEN");In.install=e=>{e.component(In.name,In),e.component(lo.name,lo);const n=new En;e.provide(so,n),e.provide("FNotifyService",n)};const pl={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]},targetComponentInstance:{type:Object,default:{}}};`${Ze.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const ml={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 gl(e,n,o,a,i,r,l,s,f,u,d,c,h,p,m,g,v,y,b){const{calculateCellPositionInRow:D}=r,{columnContext:x,hasLeftFixedColumn:V,hasRightFixedColumn:E}=l,{gridDataStyle:N,leftFixedGridDataStyle:F,rightFixedGridDataStyle:S}=p,{renderDataRow:w}=ae.getHierarchyRow(e,n,x,v,s,f,u,d,c,h,p,m,g,y,b),B=[w];function I(T,k){const P=D(T);return v.value.filter(M=>M.visible!==!1).map((M,O)=>B[M.type](M,P,k,O))}function $(){return t.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:F.value},[I(x.value.leftColumns.filter(T=>T.visible),"left")])])}function j(){return t.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[t.createVNode("div",{class:"fv-grid-data",style:N.value},[I(x.value.primaryColumns.filter(T=>T.visible),"primary")])])}function L(){return t.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:S.value},[I(x.value.rightColumns.filter(T=>T.visible),"right")])])}function C(){const T=[];return V.value&&T.push($()),T.push(j()),E.value&&T.push(L()),T}return{renderDataArea:C}}const co=t.defineComponent({name:"FTreeGrid",props:ml,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","unSelectAll","selectAll","sortChanged","selectionUpdate","endEditCell"],setup(e,n){var Jn,Qn;const o=t.ref(!1),a=t.ref(!1),i=0,r=t.ref(((Jn=e.rowOption)==null?void 0:Jn.height)||28);let l=[],s=[];const f=t.ref(20),u=t.ref(e.columns),d=ae.useIdentify(e),{idField:c}=d,h=t.ref(),p=t.ref(),m=t.ref(),g=t.ref(),v=t.ref(),y=t.ref([]),b=t.ref(!1),D=t.ref(((Qn=e.rowOption)==null?void 0:Qn.wrapContent)||!1),x=ae.useGroupData(e,d),V=ae.useFilter(e,n),E=ae.useHierarchy(e),{collapseField:N}=E,{showLoading:F,renderLoading:S}=ae.useLoading(e,h),w=ae.useDataView(e,new Map,V,E,d),{dataView:B}=w,I=ae.useSelection(e,w,d,y,n),{showSelection:$,selectedValues:j}=I,L=ae.useSelectHierarchyItem(e,y,w,d,I,n),C=t.computed(()=>e.disabled),T=t.computed(()=>e.virtualized?Math.min(w.dataView.value.length,f.value):w.dataView.value.length),k=ae.usePagination(e,w),{shouldRenderPagination:P}=k,{containerStyleObject:M}=ae.useDataViewContainerStyle(e,y),O=t.ref(""),z=t.ref([]),X=t.computed(()=>e.searchable||!1),R=t.ref(0),U=ae.useCommandColumn(e),{applyCommands:Q}=U;Q(u);const{applyColumnSetting:ee,removeColumnSetting:H}=ae.useSettingColumn(e);e.showSetting&&ee(u);const _=ae.useColumn(e,n),A=ae.useSort(e),{applyColumnSorter:Y,columnContext:G,updateColumnRenderContext:ne}=_;Y(w,A);const Z=ae.useGroupColumn(e,G),re=ae.useRow(e,n,I,d),ie=ae.useEdit(e,n,d,re,y),ve=ae.useVisualDataBound(e,w,r),be=ae.useVisualDataCell(e,ie,ve),Be=ae.useVisualDataRow(e,w,ie,E,d,ve,be,r),Me=ae.useVisualData(e,u,w,T,i,Be),{getVisualData:xe}=Me,de=ae.useCellPosition(e,G,r,o),we=ae.useSidebar(e,I),{sidebarWidth:Ce}=we,Se=ae.useVirtualScroll(e,w,y,G,Me,T,i,Ce,r,o),{onWheel:He,dataGridWidth:ut,viewPortHeight:se,viewPortWidth:qe,resetScroll:oe,updateVisibleRowsOnLatestVisibleScope:Ie}=Se,We=ae.useFitColumn(e,G,p,qe,Z),{calculateColumnsSize:Ge}=We,st=ae.useFilterHistory(),Et=ae.useColumnFilter(p,v,w,st,Se),Mt=ae.useDragColumn(e,n,_,w,Z,x,Se),te=t.computed(()=>{const le={"fv-grid":!0,"fv-grid-bordered":e.showBorder,"fv-grid-horizontal-bordered":e.showHorizontalLines,"fv-datagrid-strip":e.showStripe};return Re.getCustomClass(le,e.customClass)}),Le=t.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":b.value,"fv-grid-wrap-content":D.value})),{renderDataArea:Ye}=gl(e,n,m,g,v,de,_,w,ie,E,re,I,L,Se,Me,ve,y,r,o),{renderGridHeader:W,renderGridColumnResizeOverlay:he,shouldShowHeader:Te}=ae.getColumnHeader(e,n,p,g,v,_,w,Mt,Et,V,st,We,Z,I,we,A,Se,qe,y,a),{renderDataGridSidebar:je}=ae.getSidebar(e,re,I,we,Se),{renderDisableMask:$e}=ae.getDisableMask(),{renderHorizontalScrollbar:Ae}=ae.getHorizontalScrollbar(e,p,Se),{renderVerticalScrollbar:_e}=ae.getVerticalScrollbar(e,p,Se);function gt(){var le,Fe,tt;if(p.value&&p.value.clientHeight>0&&((le=p.value)==null?void 0:le.clientWidth)>0){const Ke=Math.ceil(p.value.clientHeight/r.value);Ke>f.value&&(f.value=Ke,Ie()),se.value=((Fe=m.value)==null?void 0:Fe.clientHeight)||0,ut.value=((tt=p.value)==null?void 0:tt.clientWidth)||0}p.value&&(p.value.clientHeight>0||p.value.clientWidth>0)&&Ge()}t.onMounted(()=>{p.value&&(f.value=Math.max(Math.ceil(p.value.clientHeight/r.value),f.value),y.value=xe(0,T.value+i-1),aa.useResizeObserver(p.value,gt),Ge(),t.nextTick(()=>{p.value&&(ut.value=p.value.clientWidth),m.value&&(qe.value=m.value.clientWidth,se.value=m.value.clientHeight)})),F.value&&S()}),t.onUnmounted(()=>{}),t.watch(qe,()=>{p.value&&Ge()});function pt(le){w.collapseTo(le),w.reOrderVisibleIndex(),oe()}function J(le){w.expandTo(le),w.reOrderVisibleIndex(),oe()}function me(){const le=I.getSelectionRow();return le?le.dataIndex-1:-1}function ge(le){const Fe=le!==void 0?le:me(),tt=w.insertNewDataItem(Fe===-1?0:Fe);return y.value=xe(0,T.value+i-1),tt}function De(){const le=me();w.insertNewChildDataItem(le),y.value=xe(0,T.value+i-1)}function Xe(le,Fe){const tt=y.value.find(nt=>nt.raw[c.value]===Fe),Ke=tt?tt.dataIndex-1:-1;w.insertNewChildDataItems(le,Ke)}function Qe(){const le=me(),Fe=L.getNextSelectableHierarchyItemId(le);w.removeHierarchyDataItem(le),y.value=xe(0,T.value+i-1),Fe&&L.selectItemById(Fe)}function vt(le){ie.onEditingRow(le)}function bt(le){ie.acceptEditingRow(le)}function xt(le){ie.cancelEditingRow(le)}function Ct(le){le&&(u.value=le,Q(u),e.showSetting&&ee(u),ne(u.value),Y(w,A),Ge())}t.watch(()=>e.columns,le=>{if(e.showSetting&&e.enableColumnSettingSolution){Ct(u.value);return}Ct(le)});function mt(le,Fe){le&&(w.load(le),w.reOrderVisibleIndex(),Fe!=null&&Fe.keepScrollPosition?Se.scrollTo(Se.offsetY.value):oe())}function Ft(le){re.activeRowById(le)}function St(le,Fe={isCurrent:!0}){Fe!=null&&Fe.isCurrent&&Ft(le),L.selectItemById(le)}function ht(le){const Fe=y.value.find(tt=>tt.raw[d.idField.value]===le);Fe&&re.clickRowItem(Fe)}function Dt(le){L.selectItemByIds(le)}function Zt(){return I.getSelectedItems()}function Rt(){I.clearSelection()}function Lo(){I.emptyCurrentRowId()}const Sn=t.computed(()=>!y.value||!y.value.length),{renderEmpty:jo}=ae.getEmpty(e,n);function Ao(){return I.getSelectionRow()}function Ro(le,Fe={clearCurrent:!0}){Fe!=null&&Fe.clearCurrent&&Ft(""),L.unSelectItemByIds(le)}function $o(){return I.currentSelectedDataId.value}function _o(le,Fe,tt){const Ke=B.value.find(nt=>nt[c.value]===le);if(Ke){if(Object.keys(Ke).forEach(ot=>{Object.prototype.hasOwnProperty.call(Fe,ot)&&(Ke[ot]=Fe[ot])}),tt){const{collapseField:ot,disabledField:Tt,checkedField:kt,visibleField:K}=tt;ot&&!Oe.isUndefined(Fe[ot])&&(Ke.__fv_collapse__=Fe[ot]),kt&&!Oe.isUndefined(Fe[kt])&&(Ke.__fv_checked__=Fe[kt]),Tt&&!Oe.isUndefined(Fe[Tt])&&(Ke.__fv_disabled__=Fe[Tt]),K&&!Oe.isUndefined(Fe[K])&&(Ke.__fv_visible__=Fe[K])}const nt=y.value.find(ot=>ot.raw[c.value]===le),Je=y.value.findIndex(ot=>ot.raw[c.value]===le);if(nt){if(nt.raw=Ke,Object.keys(nt.data).forEach(ot=>{nt.data[ot].updateData(Ke)}),tt){const{collapseField:ot,disabledField:Tt,checkedField:kt,visibleField:K}=tt;ot&&!Oe.isUndefined(Fe[ot])&&(nt.collapse=Fe[ot]),kt&&!Oe.isUndefined(Fe[kt])&&(nt.checked=Fe[kt]),Tt&&!Oe.isUndefined(Fe[Tt])&&(nt.disabled=Fe[Tt]),K&&!Oe.isUndefined(Fe[K])&&(nt.visible=Fe[K])}y.value=[...y.value.slice(0,Je),nt,...y.value.slice(Je+1)],w.updateSummary()}}}function zo(le){return Object.prototype.hasOwnProperty.call(le,"raw")?w.hasRealChildren(le.raw):w.hasRealChildren(le)}function Uo(le){const Fe=w.dataView.value.find(tt=>tt[c.value]===le);return Fe?Fe[N.value]:""}function Ho(){return N.value}t.watch(()=>e.showSetting,(le,Fe)=>{le!==Fe&&(le?ee(u):H(u),Ct(u.value))});function qo(le){return y.value.filter(Fe=>le.includes(Fe.raw[e.idField]))}function Gn(le){const Fe=d.idField.value,tt=y.value.find(Ke=>Ke.raw[Fe]===le);tt&&re.changeRow(tt)}function Wn(){I.keepSelectingOnPaging.value||Rt(),w.updateVisibleDataSummary(y.value)}function Go(le){I.updateSelectedValues(le)}function Wo(le){I.removeSelectedValues(le)}function Yo(le){t.nextTick(()=>{Se.scrollToRowByIndex(le.dataIndex-1)})}function Xo(le){let Fe=le;for(;Fe.parentId;){const tt=w.dataView.value.find(Ke=>Ke[d.idField.value]===Fe.parentId);if(tt)tt[d.idField.value],w.unFold({raw:tt}),Fe=tt;else break}}function Jo(le,Fe){if(le.length!==Fe.length)return!1;const tt=le.map(nt=>nt[d.idField.value]).sort(),Ke=Fe.map(nt=>nt[d.idField.value]).sort();return tt.every((nt,Je)=>nt===Ke[Je])}function Yn(){if(!O.value.trim()){z.value=[],R.value=0;return}const le=[],Fe=O.value.toLowerCase().trim();w.dataView.value.forEach(Ke=>{var Je;let nt=!1;(Je=e.search)!=null&&Je.customSearch?nt=e.search.customSearch(Fe,Ke,e.columns):e.columns.forEach(ot=>{!nt&&ot.field&&Ke[ot.field]!==void 0&&String(Ke[ot.field]).toLowerCase().includes(Fe)&&(nt=!0)}),nt&&(le.push(Ke),Xo(Ke))}),!Jo(le,z.value)?(z.value=le,R.value=0):le.length>0&&(R.value=(R.value+1)%le.length),le.length>0&&t.nextTick(()=>{const Ke=le[R.value];Gn(Ke[d.idField.value]);const nt=y.value.find(Je=>Je.raw[d.idField.value]===Ke[d.idField.value]);nt&&Yo(nt)})}function Qo(le){le.key==="Enter"&&Yn()}function Zo(){Yn()}n.expose({activeRowById:Ft,addNewDataItem:ge,addNewChildDataItem:De,addChildrenToNode:Xe,collapseTo:pt,expandTo:J,removeDataItem:Qe,editDataItem:vt,acceptDataItem:bt,cancelDataItem:xt,updateColumns:Ct,updateDataSource:mt,selectItem