@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 510 kB
JavaScript
(function(U,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("bignumber.js"),require("lodash-es"),require("vue-i18n"),require("../components/locale/index.umd.js"),require("../components/common/index.umd.js"),require("@vueuse/core"),require("../components/data-view/index.umd.js"),require("../components/dynamic-resolver/index.umd.js"),require("../components/designer-canvas/index.umd.js"),require("../components/property-panel/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("../components/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("../components/date-picker/index.umd.js"),require("./data-grid/index.umd.js"),require("../components/dropdown/index.umd.js"),require("../components/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("../components/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("../components/rate/index.umd.js"),require("../components/response-toolbar/index.umd.js"),require("../components/response-layout/index.umd.js"),require("../components/response-layout-editor/index.umd.js"),require("../components/search-box/index.umd.js"),require("../components/section/index.umd.js"),require("../components/smoke-detector/index.umd.js"),require("../components/splitter/index.umd.js"),require("../components/step/index.umd.js"),require("../components/switch/index.umd.js"),require("../components/tabs/index.umd.js"),require("../components/tags/index.umd.js"),require("../components/text/index.umd.js"),require("../components/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("../components/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("../components/modal/index.umd.js"),require("../components/external-container/index.umd.js"),require("../components/language-textbox/index.umd.js"),require("../components/notify/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/list-view/index.umd.js"),require("../components/loading/index.umd.js"),require("../components/checkbox/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","bignumber.js","lodash-es","vue-i18n","../components/locale/index.umd.js","../components/common/index.umd.js","@vueuse/core","../components/data-view/index.umd.js","../components/dynamic-resolver/index.umd.js","../components/designer-canvas/index.umd.js","../components/property-panel/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","../components/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","../components/date-picker/index.umd.js","./data-grid/index.umd.js","../components/dropdown/index.umd.js","../components/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","../components/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","../components/rate/index.umd.js","../components/response-toolbar/index.umd.js","../components/response-layout/index.umd.js","../components/response-layout-editor/index.umd.js","../components/search-box/index.umd.js","../components/section/index.umd.js","../components/smoke-detector/index.umd.js","../components/splitter/index.umd.js","../components/step/index.umd.js","../components/switch/index.umd.js","../components/tabs/index.umd.js","../components/tags/index.umd.js","../components/text/index.umd.js","../components/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","../components/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","../components/modal/index.umd.js","../components/external-container/index.umd.js","../components/language-textbox/index.umd.js","../components/notify/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/list-view/index.umd.js","../components/loading/index.umd.js","../components/checkbox/index.umd.js"],t):(U=typeof globalThis<"u"?globalThis:U||self,t(U.FarrisVue={},U.vue,null,U.lodashEs,U.vueI18n,U.locale,U.common,U.core,U.dataView,U.dynamicResolver,U.designerCanvas,U.propertyPanel,U.FAccordion,U.FAvatar,U.FButtonEdit$1,U.FButtonGroup,U.FCalendar,U.FCapsule,U.FCheckbox,U.FCheckboxGroup,U.FComboList,U.FComboTree,U.FComponent,U.FColorPicker,U.FContentContainer,U.FDatePicker,U.FDataGrid$1,U.FDropdown,U.FDynamicForm,U.FEventsEditor,U.FFilterBar,U.FFieldSelector,U.FBindingSelector,U.FImageCropper,U.FInputGroup,U.FLayout,U.FListNav,U.FListView$1,U.FLookup$1,U.FMappingEditor,U.FNav,U.FNumberRange,U.FNumberSpinner,U.FOrder,U.FPageHeader,U.FPageFooter,U.FPagination$1,U.FProgress,U.FQuerySolution,U.FRadioGroup,U.FRate,U.FResponseToolbar,U.FResponseLayout,U.FResponseLayoutEditorSetting,U.FSearchBox$1,U.FSection$1,U.FSmokeDetector,U.FSplitter,U.FStep,U.FSwitch,U.FTabs$1,U.FTags,U.FText,U.FTimePicker,U.FTransfer,U.FTreeView,U.FUploader,U.FVerifyDetail,U.FVideo,U.FTextArea,U.FSchemaSelector$1,U.FTreeGrid$1,U.FEventParameter$1,U.FFilterConditionEditor,U.FFieldset,U.FSortConditionEditor,U.FMenuLookup,U.FDrawer,U.FJsonEditor,U.FPropertyEditor,U.FExpressionEditor,U.FCodeEditor,U.FHtmlTemplate,U.FCollectionPropertyEditor,U.FModal$1,U.FExternalContainer,U.FLanguageTextbox,U.notify,U.FButtonEdit$2,U.dataGrid,U.treeGrid,U.FPopover,U.FListView$2,U.FLoading$1,U.checkbox))})(this,function(U,t,Qt,Ve,ot,Vt,De,Xo,re,at,Un,Wn,Yo,Jo,Gn,Qo,Zo,Xn,Yn,fn,pn,vr,Ko,ea,ta,na,oa,aa,Jn,Cr,ia,Zt,ra,la,sa,wt,ca,da,ua,wr,fa,pa,ma,ga,ha,ya,ba,va,Ca,wa,Sa,mn,xa,Ta,Na,Qn,Ia,Va,Fa,Pa,gn,Zn,ka,Ba,Da,zt,Ea,Ma,Oa,Kn,Sr,ja,xr,Tr,La,Nr,Ir,$a,Vr,Fr,Pr,kr,Ra,Br,eo,Aa,za,Kt,hn,yn,bn,qa,Dr,Er,to){"use strict";var sf=Object.defineProperty;var cf=(U,t,Qt)=>t in U?sf(U,t,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):U[t]=Qt;var Be=(U,t,Qt)=>cf(U,typeof t!="symbol"?t+"":t,Qt);const Mr=["moz","ms","webkit"];function Or(){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 jr(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const e=Mr.filter(n=>`${n}RequestAnimationFrame`in window)[0];return e?window[`${e}RequestAnimationFrame`]:Or()}jr();const Lr=Symbol("controller schema repository inject token"),$r=Symbol("form schema repository inject token"),it=t.ref(0);function Rr(){it.value++}function Ar(e,n){const o=n.getBoundingClientRect(),a=e.getBoundingClientRect(),i=a.top>=o.top,r=a.top<=o.bottom;return i&&r}function no(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 zr(e){if(!window.scrollContainerList)return;const n=Array.from(window.scrollContainerList);if(n.length&&n.length===1){const o=n[0],a=document.querySelector(`[id=${o}]`);if(a&&a.contains(e))return a}}function vn(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=zr(e);if(i&&(a=Ar(e,i)),!a){o.style.display="none";return}no(e)}}function en(e){if(!e)return;let n;e.className.includes("dgComponentSelected")?n=e:n=e.querySelector(".dgComponentSelected"),n&&vn(n)}const Ha={modelValue:{type:Object,default:{}},componentId:{type:String,default:""},components:{type:Array},canvasMode:{type:String,default:"PC"}};var St=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Cn(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 _a={exports:{}};(function(e,n){(function(o){e.exports=o()})(function(){return function(){function o(a,i,r){function l(c,f){if(!i[c]){if(!a[c]){var u=typeof Cn=="function"&&Cn;if(!f&&u)return u(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[c]={exports:{}};a[c][0].call(p.exports,function(g){var m=a[c][1][g];return l(m||g)},p,p.exports,o,a,i,r)}return i[c].exports}for(var s=typeof Cn=="function"&&Cn,d=0;d<r.length;d++)l(r[d]);return l}return o}()({1:[function(o,a,i){var r={},l="(?:^|\\s)",s="(?:\\s|$)";function d(u){var h=r[u];return h?h.lastIndex=0:r[u]=h=new RegExp(l+u+s,"g"),h}function c(u,h){var p=u.className;p.length?d(h).test(p)||(u.className+=" "+h):u.className=h}function f(u,h){u.className=u.className.replace(d(h)," ").trim()}a.exports={add:c,rm:f}},{}],2:[function(o,a,i){(function(r){var l=o("contra/emitter"),s=o("crossvent"),d=o("./classes"),c=document,f=c.documentElement;function u(I,O){var j=arguments.length;j===1&&Array.isArray(I)===!1&&(O=I,I=[]);var L,$,F,N,B,k,D,M,A,H=null,X,_,te=!1,K=0,Y,q=O||{};q.moves===void 0&&(q.moves=C),q.accepts===void 0&&(q.accepts=C),q.invalid===void 0&&(q.invalid=he),q.containers===void 0&&(q.containers=I||[]),q.isContainer===void 0&&(q.isContainer=b),q.copy===void 0&&(q.copy=!1),q.copySortSource===void 0&&(q.copySortSource=!1),q.revertOnSpill===void 0&&(q.revertOnSpill=!1),q.removeOnSpill===void 0&&(q.removeOnSpill=!1),q.direction===void 0&&(q.direction="vertical"),q.ignoreInputTextSelection===void 0&&(q.ignoreInputTextSelection=!0),q.mirrorContainer===void 0&&(q.mirrorContainer=c.body);var G=l({containers:q.containers,start:ce,end:oe,cancel:Pe,remove:ae,destroy:ee,canMove:Ee,dragging:!1});return q.removeOnSpill===!0&&G.on("over",Fe).on("out",Le),z(),G;function R(J){return G.containers.indexOf(J)!==-1||q.isContainer(J)}function z(J){var se=J?"remove":"add";g(f,se,"mousedown",ge),g(f,se,"mouseup",Ae)}function W(J){var se=J?"remove":"add";g(f,se,"mousemove",Se)}function Z(J){var se=J?"remove":"add";s[se](f,"selectstart",ie),s[se](f,"click",ie)}function ee(){z(!0),Ae({})}function ie(J){X&&J.preventDefault()}function ge(J){N=J.clientX,B=J.clientY;var se=m(J)!==1||J.metaKey||J.ctrlKey;if(!se){var ye=J.target,Ne=le(ye);Ne&&(X=Ne,W(),J.type==="mousedown"&&(w(ye)?ye.focus():J.preventDefault()))}}function Se(J){if(X){if(m(J)===0){Ae({});return}if(!(J.clientX!==void 0&&Math.abs(J.clientX-N)<=(q.slideFactorX||0)&&J.clientY!==void 0&&Math.abs(J.clientY-B)<=(q.slideFactorY||0))){if(q.ignoreInputTextSelection){var se=E("clientX",J)||0,ye=E("clientY",J)||0,Ne=c.elementFromPoint(se,ye);if(w(Ne))return}var Oe=X;W(!0),Z(),oe(),de(Oe),d.add(M||F,"gu-transit"),ze(),Te(),K=0,Ct(J)}}}function le(J){if(!(G.dragging&&L)&&!R(J)){for(var se=J;x(J)&&R(x(J))===!1;)if(q.invalid(J,se)||(J=x(J),!J))return;var ye=x(J);if(ye&&!q.invalid(J,se)){var Ne=q.moves(J,ye,se,S(J));if(Ne)return{item:J,source:ye}}}}function Ee(J){return!!le(J)}function ce(J){var se=le(J);se&&de(se)}function de(J){dn(J.item,J.source)&&(M=J.item.cloneNode(!0),G.emit("cloned",M,J.item,"copy")),$=J.source,F=J.item,k=D=S(J.item),G.dragging=!0,G.emit("drag",F,$)}function he(){return!1}function oe(){if(G.dragging){var J=M||F;qe(J,x(J))}}function Ie(){X=!1,W(!0),Z(!0)}function Ae(J){if(Ie(),!!G.dragging){var se=M||F,ye=E("clientX",J)||0,Ne=E("clientY",J)||0,Oe=y(L,ye,Ne),Me=dt(Oe,ye,Ne);Me&&(M&&q.copySortSource||!M||Me!==$)?qe(se,Me):q.removeOnSpill?ae():Pe()}}function qe(J,se){var ye=x(J);M&&q.copySortSource&&se===$&&ye.removeChild(F),He(se)?G.emit("cancel",J,$):G.emit("drop",J,se,$,D),Re()}function ae(){if(G.dragging){var J=M||F,se=x(J);se&&se.removeChild(J),G.emit(M?"cancel":"remove",J,se,$),Re()}}function Pe(J){if(G.dragging){var se=arguments.length>0?J:q.revertOnSpill,ye=M||F,Ne=x(ye),Oe=He(Ne);Oe===!1&&se&&(M?Ne&&Ne.removeChild(M):$.insertBefore(ye,k)),Oe||se?G.emit("cancel",ye,$,$):G.emit("drop",ye,Ne,$,D),Re()}}function Re(){var J=M||F;Ie(),ht(),It(),J&&d.rm(J,"gu-transit"),A&&clearTimeout(A),G.dragging=!1,H&&G.emit("out",J,H,$),G.emit("dragend",J,K),$=F=M=k=D=A=H=null}function He(J,se){var ye;return se!==void 0?ye=se:L?ye=D:ye=S(M||F),J===$&&ye===k}function dt(J,se,ye){for(var Ne=J;Ne&&!Oe();)Ne=x(Ne);return Ne;function Oe(){var Me=R(Ne);if(Me===!1)return!1;var rt=yt(Ne,J),Ke=Jt(Ne,rt,se,ye),tt=He(Ne,Ke);return tt?!0:q.accepts(F,Ne,$,Ke)}}function Ct(J){if(!L)return;J.preventDefault();var se=E("clientX",J)||0,ye=E("clientY",J)||0;L.style.left=se-2+"px",L.style.top=ye-2+"px";var Ne=M||F,Oe=y(L,se,ye),Me=dt(Oe,se,ye),rt=Me!==null&&Me!==H;(rt||Me===null)&&(nt(),H=Me,ft()),cn(Oe,ye);var Ke=x(Ne);if(Me===$&&M&&!q.copySortSource){Ke&&Ke.removeChild(Ne);return}var tt,ut=yt(Me,Oe);if(te=jt(ut,Me),ut!==null)tt=Jt(Me,ut,se,ye);else if(q.revertOnSpill===!0&&!M)tt=k,Me=$;else{M&&Ke&&Ke.removeChild(Ne),M&&_&&(_.style.display="none");return}_.style.display="block",Q(tt,Ne,rt),tt?ln(ut,tt):sn(Me);function We(Ye){G.emit(Ye,Ne,H,$)}function ft(){rt&&We("over")}function nt(){H&&We("out")}}function Q(J,se,ye){(J===se||J===S(se))&&(D=S(se)),(J===null&&ye||J!==se&&J!==S(se))&&(D=J)}function Fe(J){d.rm(J,"gu-hide")}function Le(J){G.dragging&&d.add(J,"gu-hide")}function Te(){L||(L=document.createElement("div"),L.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;",L.innerHTML=q.getMirrorText&&q.getMirrorText(F)||"控件",d.add(L,"gu-mirror"),q.mirrorContainer.appendChild(L),g(f,"add","mousemove",Ct),d.add(q.mirrorContainer,"gu-unselectable"),G.emit("cloned",L,F,"mirror"))}function ze(){if(_=document.createElement("div"),d.add(_,"gu-insertion"),F){var J=F.getBoundingClientRect();_.style.left=J.left+"px",_.style.top=J.top+"px"}te=!1,q.mirrorContainer.appendChild(_)}function ht(){L&&(d.rm(q.mirrorContainer,"gu-unselectable"),g(f,"remove","mousemove",Ct),x(L).removeChild(L),L=null)}function It(){_&&(x(_).removeChild(_),_=null)}function yt(J,se){for(var ye=se;ye!==J&&x(ye)!==J;)ye=x(ye);return ye===f?null:ye}function jt(J,se){if(!se)return te;var ye=J||se&&se.lastElementChild;if(!ye)return!0;var Ne=getComputedStyle(J),Oe=/^inline/.test(Ne.getPropertyValue("display"))||/^(left|right)$/.test(Ne.getPropertyValue("float"));if(Oe)return!0;if(se){var Me=getComputedStyle(se),rt=Me.getPropertyValue("display");if(/flex$/.test(rt)){var Ke=Me.getPropertyValue("flex-direction")||"row";if(Ke==="row"||Ke==="row-reverse")return!rn(se)}return!1}return!0}function rn(J){if(!J.children||!J.children.length)return!1;for(const se of Array.from(J.children)){const Ne=(se.className&&se.className.split(" ")||[]).filter(Oe=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Oe));if(!Ne.length)return!1;for(const Oe of Ne){const Me=Oe.slice(Oe.lastIndexOf("-")+1);if(parseInt(Me,10)!==12)return!1}}return!0}function ln(J,se){const ye=se.getBoundingClientRect();if(_.style.left=ye.left+"px",_.style.top=ye.top+"px",te){if(_.style.height=ye.height+"px",_.style.width="4px",J){const Ne=J.getBoundingClientRect();Ne.top!==ye.top&&(_.style.left=Ne.right+"px",_.style.top=Ne.top+"px",_.style.height=Ne.height+"px")}}else if(_.style.height="4px",_.style.width=ye.width+"px",Y){const Ne=Y.getBoundingClientRect();ye.top<Ne.top&&(_.style.display="none")}se===F&&F&&(_.style.display="none")}function sn(J){D=null;var se=J.lastElementChild;if(se){var ye=se.getBoundingClientRect();te?(_.style.left=ye.right+"px",_.style.top=ye.top+"px",_.style.height=ye.height+"px",_.style.width="4px"):(_.style.left=ye.left+"px",_.style.top=ye.bottom+"px",_.style.height="4px",_.style.width=ye.width+"px"),se===F&&F&&(_.style.display="none")}else _.style.display="none"}function cn(J,se){if(!q.mirrorContainer.contains(J)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Y=h(J),!Y||!Y.contains(J)))return;const ye=document.querySelector(".dgComponentSelected"),Ne=Y.getBoundingClientRect();if(se-30<Ne.top&&Y.scrollTop>0){let Oe=Y.scrollTop<10?Y.scrollTop:10;Y.scrollBy(0,-1*Oe),ye&&Y.contains(ye)&&(K=K+-1*Oe)}if(se+30>Ne.bottom&&Y.scrollTop<Y.scrollHeight-Y.clientHeight){const Oe=Y.scrollHeight-Y.clientHeight-Y.scrollTop;let Me=Oe<10?Oe:10;Y.scrollBy(0,Me),ye&&Y.contains(ye)&&(K=K+Me)}}function Jt(J,se,ye,Ne){var Oe=q.direction==="horizontal",Me=q.direction==="mixed",rt=se!==J?tt():Ke();return rt;function Ke(){var We=J.children.length,ft,nt,Ye;for(ft=0;ft<We;ft++)if(nt=J.children[ft],Ye=nt.getBoundingClientRect(),Oe&&Ye.left+Ye.width/2>ye||!Me&&!Oe&&Ye.top+Ye.height/2>Ne||Me&&Ye.left+Ye.width>ye&&Ye.top+Ye.height>Ne)return nt;return null}function tt(){var We=se.getBoundingClientRect();if(Me){var ft=Ne-We.top,nt=ye-We.left,Ye=We.bottom-Ne,Lt=We.right-ye,$t=Math.min(nt,Lt,ft,Ye),Rt;return te?Rt=Lt<nt:Rt=Ye===$t||Lt===$t||nt===$t,ut(Rt)}return ut(Oe?ye>We.left+P(We)/2:Ne>We.top+v(We)/2)}function ut(We){return We?S(se):se}}function dn(J,se){return typeof q.copy=="boolean"?q.copy:q.copy(J,se)}}function h(I){const O=Array.from(window.scrollContainerList);if(O.length===1){const L=Array.from(window.scrollContainerList)[0];return document.getElementById(L)}const j=p(O);for(const L of j)if(L.contains(I))return L;return null}function p(I){const O=[];return I.forEach(j=>{const L=document.getElementById(j);L&&O.push(L)}),O.sort((j,L)=>j.contains(L)?1:L.contains(j)?-1:0),O}function g(I,O,j,L){var $={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},F={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},N={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};r.navigator.pointerEnabled?s[O](I,F[j],L):r.navigator.msPointerEnabled?s[O](I,N[j],L):(s[O](I,$[j],L),s[O](I,j,L))}function m(I){if(I.touches!==void 0)return I.touches.length;if(I.which!==void 0&&I.which!==0)return I.which;if(I.buttons!==void 0)return I.buttons;var O=I.button;if(O!==void 0)return O&1?1:O&2?3:O&4?2:0}function y(I,O,j){I=I||{};var L=I.className||"",$;return I.className+=" gu-hide",$=c.elementFromPoint(O,j),I.className=L,$}function b(){return!1}function C(){return!0}function P(I){return I.width||I.right-I.left}function v(I){return I.height||I.bottom-I.top}function x(I){return I.parentNode===c?null:I.parentNode}function w(I){return I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.tagName==="SELECT"||T(I)}function T(I){return!I||I.contentEditable==="false"?!1:I.contentEditable==="true"?!0:T(x(I))}function S(I){return I.nextElementSibling||O();function O(){var j=I;do j=j.nextSibling;while(j&&j.nodeType!==1);return j}}function V(I){return I.targetTouches&&I.targetTouches.length?I.targetTouches[0]:I.changedTouches&&I.changedTouches.length?I.changedTouches[0]:I}function E(I,O){var j=V(O),L={pageX:"clientX",pageY:"clientY"};return I in L&&!(I in j)&&L[I]in j&&(I=L[I]),j[I]}a.exports=u}).call(this,typeof St<"u"?St: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,d,c){s&&r(function(){s.apply(c||null,d||[])})}},{ticky:10}],5:[function(o,a,i){var r=o("atoa"),l=o("./debounce");a.exports=function(d,c){var f=c||{},u={};return d===void 0&&(d={}),d.on=function(h,p){return u[h]?u[h].push(p):u[h]=[p],d},d.once=function(h,p){return p._once=!0,d.on(h,p),d},d.off=function(h,p){var g=arguments.length;if(g===1)delete u[h];else if(g===0)u={};else{var m=u[h];if(!m)return d;m.splice(m.indexOf(p),1)}return d},d.emit=function(){var h=r(arguments);return d.emitterSnapshot(h.shift()).apply(this,h)},d.emitterSnapshot=function(h){var p=(u[h]||[]).slice(0);return function(){var g=r(arguments),m=this||d;if(h==="error"&&f.throws!==!1&&!p.length)throw g.length===1?g[0]:g;return p.forEach(function(b){f.async?l(b,g,m):b.apply(m,g),b._once&&d.off(h,b)}),d}},d}},{"./debounce":4,atoa:3}],6:[function(o,a,i){(function(r){var l=o("custom-event"),s=o("./eventmap"),d=r.document,c=h,f=g,u=[];r.addEventListener||(c=p,f=m),a.exports={add:c,remove:f,fabricate:y};function h(x,w,T,S){return x.addEventListener(w,T,S)}function p(x,w,T){return x.attachEvent("on"+w,C(x,w,T))}function g(x,w,T,S){return x.removeEventListener(w,T,S)}function m(x,w,T){var S=P(x,w,T);if(S)return x.detachEvent("on"+w,S)}function y(x,w,T){var S=s.indexOf(w)===-1?E():V();x.dispatchEvent?x.dispatchEvent(S):x.fireEvent("on"+w,S);function V(){var I;return d.createEvent?(I=d.createEvent("Event"),I.initEvent(w,!0,!0)):d.createEventObject&&(I=d.createEventObject()),I}function E(){return new l(w,{detail:T})}}function b(x,w,T){return function(V){var E=V||r.event;E.target=E.target||E.srcElement,E.preventDefault=E.preventDefault||function(){E.returnValue=!1},E.stopPropagation=E.stopPropagation||function(){E.cancelBubble=!0},E.which=E.which||E.keyCode,T.call(x,E)}}function C(x,w,T){var S=P(x,w,T)||b(x,w,T);return u.push({wrapper:S,element:x,type:w,fn:T}),S}function P(x,w,T){var S=v(x,w,T);if(S){var V=u[S].wrapper;return u.splice(S,1),V}}function v(x,w,T){var S,V;for(S=0;S<u.length;S++)if(V=u[S],V.element===x&&V.type===w&&V.fn===T)return S}}).call(this,typeof St<"u"?St:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,a,i){(function(r){var l=[],s="",d=/^on/;for(s in r)d.test(s)&&l.push(s.slice(2));a.exports=l}).call(this,typeof St<"u"?St:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,a,i){(function(r){var l=r.CustomEvent;function s(){try{var d=new l("cat",{detail:{foo:"bar"}});return d.type==="cat"&&d.detail.foo==="bar"}catch{}return!1}a.exports=s()?l:typeof document<"u"&&typeof document.createEvent=="function"?function(c,f){var u=document.createEvent("CustomEvent");return f?u.initCustomEvent(c,f.bubbles,f.cancelable,f.detail):u.initCustomEvent(c,!1,!1,void 0),u}:function(c,f){var u=document.createEventObject();return u.type=c,f?(u.bubbles=!!f.bubbles,u.cancelable=!!f.cancelable,u.detail=f.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof St<"u"?St:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,a,i){var r=a.exports={},l,s;function d(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?l=setTimeout:l=d}catch{l=d}try{typeof clearTimeout=="function"?s=clearTimeout:s=c}catch{s=c}})();function f(v){if(l===setTimeout)return setTimeout(v,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(v,0);try{return l(v,0)}catch{try{return l.call(null,v,0)}catch{return l.call(this,v,0)}}}function u(v){if(s===clearTimeout)return clearTimeout(v);if((s===c||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(v);try{return s(v)}catch{try{return s.call(null,v)}catch{return s.call(this,v)}}}var h=[],p=!1,g,m=-1;function y(){!p||!g||(p=!1,g.length?h=g.concat(h):m=-1,h.length&&b())}function b(){if(!p){var v=f(y);p=!0;for(var x=h.length;x;){for(g=h,h=[];++m<x;)g&&g[m].run();m=-1,x=h.length}g=null,p=!1,u(v)}}r.nextTick=function(v){var x=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)x[w-1]=arguments[w];h.push(new C(v,x)),h.length===1&&!p&&f(b)};function C(v,x){this.fun=v,this.array=x}C.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function P(){}r.on=P,r.addListener=P,r.once=P,r.off=P,r.removeListener=P,r.removeAllListeners=P,r.emit=P,r.prependListener=P,r.prependOnceListener=P,r.listeners=function(v){return[]},r.binding=function(v){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(v){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(d){r(d)}:s=function(d){setTimeout(d,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,d=Function.prototype.apply,c=Array.prototype.slice,f={},u=0;i.setTimeout=function(){return new h(d.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(d.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(p){p.close()};function h(p,g){this._id=p,this._clearFn=g}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(p,g){clearTimeout(p._idleTimeoutId),p._idleTimeout=g},i.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},i._unrefActive=i.active=function(p){clearTimeout(p._idleTimeoutId);var g=p._idleTimeout;g>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},g))},i.setImmediate=typeof r=="function"?r:function(p){var g=u++,m=arguments.length<2?!1:c.call(arguments,1);return f[g]=!0,s(function(){f[g]&&(m?p.apply(null,m):p.call(null),i.clearImmediate(g))}),g},i.clearImmediate=typeof l=="function"?l:function(p){delete f[p]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(_a);var Hr=_a.exports;const qt=qr(Hr),_r={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}},Ur={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},oo=t.defineComponent({name:"Toast",props:Ur,emits:["close","click"],setup:(e,n)=>{const{locale:o,t:a}=ot.useI18n(),i=t.ref(e.animate),r="fadeOut",l=t.computed(()=>e.options),s=t.ref(!1),d=t.computed(()=>l.value.title&&l.value.message),c=t.computed(()=>!l.value.title&&l.value.message),f=t.computed(()=>{const v={animated:s.value,toast:!0,"toast--only-content":c.value};return v[e.animate]=!1,v[r]=s.value,v["toasty-type-"+l.value.type]=!0,l.value.theme&&(v[l.value.theme]=!0),v}),u=t.computed(()=>{const w=`f-icon-${l.value&&l.value.type?l.value.type.replace("toasty-type-",""):"default"}`,T={"f-icon":!0};return T[w]=!0,T}),h=t.computed(()=>l.value.title||l.value.message),p=t.computed(()=>e.showCloseButton),g=t.computed(()=>!!l.value.buttons||!!n.slots.default),m=t.computed(()=>o.value==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function y(v){v.stopPropagation(),v.preventDefault(),s.value=!1,setTimeout(()=>{n.emit("close",l.value)},200)}function b(v,x){}function C(v){return`f-preten-link ${v.customClass?v.customClass:""}`}t.watch(i,()=>{i.value});const P=()=>{var v;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((v=l.value.buttons)==null?void 0:v.map(x=>t.createVNode("span",{class:C(x),onClick:w=>void 0},[x.text]))),n.slots.default&&n.slots.default()])])};return()=>t.createVNode("div",{class:f.value,style:"min-height:44px"},[p.value&&t.createVNode("button",{title:a("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:y},[t.createVNode("span",{class:"f-icon modal_close"},null)]),h.value&&t.createVNode("section",{class:"modal-tips"},[t.createVNode("div",{class:"float-left modal-tips-iconwrap"},[t.createVNode("span",{class:u.value},null)]),t.createVNode("div",{class:"modal-tips-content"},[d.value&&t.createVNode(t.Fragment,null,[t.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:l.value.title},null),t.createVNode("p",{class:"toast-msg",innerHTML:l.value.message,style:m.value},null),g.value&&P()]),c.value&&(l.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:m.value,innerHTML:l.value.message},null),t.createVNode("div",{class:"after-toast-title text-right ml-auto"},[P()])]):t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:m.value,innerHTML:l.value.message},null))])])])}}),wn=t.defineComponent({name:"Notify",props:_r,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"),d=t.computed(()=>e.timeout!=null?e.timeout:3e3),c=t.computed(()=>{const h=e.bottom?e.bottom:a.bottom,p=e.top?e.top:a.top,g={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&&(g.left="50%",g.marginLeft="calc(-24rem / 2)",s.value==="center-center"&&(g.top="50%",g.transform="translate(-50%, -50%)")),g});function f(h){n.emit("close")}d.value&&setTimeout(()=>{f()},d.value),n.expose({closeToast:f,container:i,notifyPosition:s});function u(h,p){f()}return()=>t.createVNode("div",{class:o.value,style:c.value,ref:i},[t.createVNode(oo,{options:r.value,showCloseButton:l.value,animate:e.animate,onClose:h=>u(h,r.value)},null)])}});class Sn{constructor(){Be(this,"notifyRefs",[]);Be(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 c;const s=t.ref();function d(){s.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,s),l.unmount()},220)}if(i.position.indexOf("top")>-1){const f=o.getNotifyInstances(i.position),u=f[f.length-1];if(u){const h=u.value.container.getBoundingClientRect();i.top=h.bottom}}return i.safeHtml&&((c=i.options)!=null&&c.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(wn,t.mergeProps({ref:s},i,{onClose:d}),null)]})}});return l.provide("NotifyService",this),document.body.appendChild(r),l.use(Vt.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 c={options:{type:n,message:a,title:i}};return l!=null&&(c.position=l),s!=null&&(c.showCloseButton=s),r!=null&&(c.timeout=r),c}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 ao=Symbol("NOTIFY_SERVICE_TOKEN");wn.install=e=>{e.component(wn.name,wn),e.component(oo.name,oo);const n=new Sn;e.provide(ao,n),e.provide("FNotifyService",n)};const Wr={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]}};`${Vt.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Gr={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:32,heading:Vt.LocaleService.getLocaleValue("datagrid.lineNumberTitle")}},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"]}}};function Xr(e,n,o,a,i,r,l,s,d,c,f,u,h,p,g,m,y){const{calculateCellPositionInRow:b}=r,{columnContext:C,hasLeftFixedColumn:P,hasRightFixedColumn:v}=l,{gridDataStyle:x,leftFixedGridDataStyle:w,rightFixedGridDataStyle:T}=p,{renderDataRow:S}=re.getHierarchyRow(e,n,C,y,s,d,c,f,u,h,p,g,m),V=[S];function E($,F){const N=b($);return y.value.filter(B=>B.visible!==!1).map((B,k)=>V[B.type](B,N,F,k))}function I(){return t.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:w.value},[E(C.value.leftColumns.filter($=>$.visible),"left")])])}function O(){return t.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[t.createVNode("div",{class:"fv-grid-data",style:x.value},[E(C.value.primaryColumns.filter($=>$.visible),"primary")])])}function j(){return t.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:T.value},[E(C.value.rightColumns.filter($=>$.visible),"right")])])}function L(){const $=[];return P.value&&$.push(I()),$.push(O()),v.value&&$.push(j()),$}return{renderDataArea:L}}const io=t.defineComponent({name:"FTreeGrid",props:Gr,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","unSelectItem","selectItem","filterChanged","sortChanged"],setup(e,n){var Hn,_n;const a=((Hn=e.rowOption)==null?void 0:Hn.height)||28,i=t.ref(20),r=t.ref(e.columns),l=re.useIdentify(e),{idField:s}=l,d=t.ref(),c=t.ref(),f=t.ref(),u=t.ref(),h=t.ref(),p=t.ref([]),g=t.ref(!1),m=t.ref(((_n=e.rowOption)==null?void 0:_n.wrapContent)||!1),y=re.useGroupData(e,l),b=re.useFilter(e,n),C=re.useHierarchy(e),{collapseField:P}=C,{showLoading:v,renderLoading:x}=re.useLoading(e,d),w=re.useDataView(e,new Map,b,C,l),{dataView:T}=w,S=re.useSelection(e,w,l,p,n),{showSelection:V,selectedValues:E}=S,I=re.useSelectHierarchyItem(e,p,w,l,S,n),O=t.computed(()=>e.disabled),j=t.computed(()=>e.virtualized?Math.min(w.dataView.value.length,i.value):w.dataView.value.length),L=re.usePagination(e,w),{shouldRenderPagination:$}=L,{containerStyleObject:F}=re.useDataViewContainerStyle(e),N=re.useCommandColumn(e),{applyCommands:B}=N;B(r);const{applyColumnSetting:k,removeColumnSetting:D}=re.useSettingColumn(e);e.showSetting&&k(r);const M=re.useColumn(e,n),A=re.useSort(e),{applyColumnSorter:H,columnContext:X,updateColumnRenderContext:_}=M;H(w,A);const te=re.useGroupColumn(e,X),K=re.useRow(e,n,S,l),Y=re.useEdit(e,n,l,K,p),q=re.useVisualDataBound(e),G=re.useVisualDataCell(e,Y,q),R=re.useVisualDataRow(e,w,Y,C,l,q,G),z=re.useVisualData(e,r,w,j,0,R),{getVisualData:W}=z,Z=re.useCellPosition(e,X),ee=re.useSidebar(e,S),{sidebarWidth:ie}=ee,ge=re.useVirtualScroll(e,w,p,X,z,j,0,ie),{onWheel:Se,dataGridWidth:le,viewPortHeight:Ee,viewPortWidth:ce,resetScroll:de,updateVisibleRowsOnLatestVisibleScope:he}=ge,oe=re.useFitColumn(e,X,c,ce,te),{calculateColumnsSize:Ie}=oe,Ae=re.useFilterHistory(),qe=re.useColumnFilter(c,h,w,Ae,ge),ae=re.useDragColumn(e,n,M,w,te,y,ge),Pe=t.computed(()=>{const ve={"fv-grid":!0,"fv-grid-bordered":e.showBorder,"fv-grid-horizontal-bordered":e.showHorizontalLines,"fv-datagrid-strip":e.showStripe};return De.getCustomClass(ve,e.customClass)}),Re=t.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":g.value,"fv-grid-wrap-content":m.value})),{renderDataArea:He}=Xr(e,n,f,u,h,Z,M,w,Y,C,K,S,I,ge,z,q,p),{renderGridHeader:dt,renderGridColumnResizeOverlay:Ct,shouldShowHeader:Q}=re.getColumnHeader(e,n,c,u,h,M,w,ae,qe,b,Ae,oe,te,S,ee,A,ge,ce,p),{renderDataGridSidebar:Fe}=re.getSidebar(e,K,S,ee,ge),{renderDisableMask:Le}=re.getDisableMask(),{renderHorizontalScrollbar:Te}=re.getHorizontalScrollbar(e,c,ge),{renderVerticalScrollbar:ze}=re.getVerticalScrollbar(e,c,ge);function ht(){var ve,ke,Ge;if(c.value&&c.value.clientHeight>0&&((ve=c.value)==null?void 0:ve.clientWidth)>0){const Je=Math.ceil(c.value.clientHeight/a);Je>i.value&&(i.value=Je,he()),Ee.value=((ke=f.value)==null?void 0:ke.clientHeight)||0,le.value=((Ge=c.value)==null?void 0:Ge.clientWidth)||0,Ie()}}t.onMounted(()=>{c.value&&(i.value=Math.max(Math.ceil(c.value.clientHeight/a),i.value),p.value=W(0,j.value+0-1),Xo.useResizeObserver(c.value,ht),Ie(),t.nextTick(()=>{c.value&&(le.value=c.value.clientWidth),f.value&&(ce.value=f.value.clientWidth,Ee.value=f.value.clientHeight)})),v.value&&x()}),t.onUnmounted(()=>{}),t.watch(ce,()=>{c.value&&Ie()});function It(ve){w.collapseTo(ve),w.reOrderVisibleIndex(),de()}function yt(ve){w.expandTo(ve),w.reOrderVisibleIndex(),de()}function jt(){const ve=S.getSelectionRow();return ve?ve.dataIndex-1:-1}function rn(){const ve=jt();w.insertNewDataItem(ve),p.value=W(0,j.value+0-1)}function ln(){const ve=jt();w.insertNewChildDataItem(ve),p.value=W(0,j.value+0-1)}function sn(ve,ke){const Ge=p.value.find(et=>et.raw[s.value]===ke),Je=Ge?Ge.dataIndex-1:-1;w.insertNewChildDataItems(ve,Je)}function cn(){const ve=jt(),ke=I.getNextSelectableHierarchyItemId(ve);w.removeHierarchyDataItem(ve),p.value=W(0,j.value+0-1),ke&&S.selectItemById(ke)}function Jt(ve){Y.onEditingRow(ve)}function dn(ve){Y.acceptEditingRow(ve)}function J(ve){Y.cancelEditingRow(ve)}function se(ve){ve&&(r.value=ve,B(r),_(r.value),H(w,A),Ie())}t.watch(()=>e.columns,ve=>{se(ve)});function ye(ve,ke){ve&&(w.load(ve),w.reOrderVisibleIndex(),ke!=null&&ke.keepScrollPosition?ge.scrollTo(ge.offsetY.value):de())}function Ne(ve){S.selectItemById(ve)}function Oe(ve){const ke=p.value.find(Ge=>Ge.raw[l.idField.value]===ve);ke&&K.clickRowItem(ke)}function Me(ve){K.activeRowById(ve)}function rt(ve){S.selectItemByIds(ve)}function Ke(){return S.getSelectedItems()}function tt(){S.clearSelection()}const ut=t.computed(()=>!p.value||!p.value.length),{renderEmpty:We}=re.getEmpty(e,n);function ft(){return S.getSelectionRow()}function nt(ve){S.unSelectItemByIds(ve)}function Ye(){return S.currentSelectedDataId.value}function Lt(ve,ke,Ge){const Je=T.value.find(et=>et[s.value]===ve);if(Je){if(Object.keys(Je).forEach(be=>{Object.prototype.hasOwnProperty.call(ke,be)&&(Je[be]=ke[be])}),Ge){const{collapseField:be,disabledField:je,checkedField:Qe,visibleField:st}=Ge;be&&!Ve.isUndefined(ke[be])&&(Je.__fv_collapse__=ke[be]),Qe&&!Ve.isUndefined(ke[Qe])&&(Je.__fv_checked__=ke[Qe]),je&&!Ve.isUndefined(ke[je])&&(Je.__fv_disabled__=ke[je]),st&&!Ve.isUndefined(ke[st])&&(Je.__fv_visible__=ke[st])}const et=p.value.find(be=>be.raw[s.value]===ve),un=p.value.findIndex(be=>be.raw[s.value]===ve);if(et){if(et.raw=Je,Object.keys(et.data).forEach(be=>{et.data[be].updateData(Je)}),Ge){const{collapseField:be,disabledField:je,checkedField:Qe,visibleField:st}=Ge;be&&!Ve.isUndefined(ke[be])&&(et.collapse=ke[be]),Qe&&!Ve.isUndefined(ke[Qe])&&(et.checked=ke[Qe]),je&&!Ve.isUndefined(ke[je])&&(et.disabled=ke[je]),st&&!Ve.isUndefined(ke[st])&&(et.visible=ke[st])}p.value=[...p.value.slice(0,un),et,...p.value.slice(un+1)],w.updateSummary()}}}function $t(ve){return Object.prototype.hasOwnProperty.call(ve,"raw")?w.hasRealChildren(ve.raw):w.hasRealChildren(ve)}function Rt(ve){const ke=w.dataView.value.find(Ge=>Ge[s.value]===ve);return ke?ke[P.value]:""}function zo(){return P.value}t.watch(()=>e.showSetting,(ve,ke)=>{ve!==ke&&(ve?k(r):D(r),se(r.value))});function qo(ve){return p.value.filter(ke=>ve.includes(ke.raw[e.idField]))}function zn(ve){const ke=l.idField.value,Ge=p.value.find(Je=>Je.raw[ke]===ve);Ge&&K.selectRow(Ge)}function Ho(){S.keepSelectingOnPaging.value||tt(),w.updateVisibleDataSummary(p.value)}n.expose({activeRowById:Me,addNewDataItem:rn,addNewChildDataItem:ln,addChildrenToNode:sn,collapseTo:It,expandTo:yt,removeDataItem:cn,editDataItem:Jt,acceptDataItem:dn,cancelDataItem:J,updateColumns:se,updateDataSource:ye,selectItemById:Ne,selectItemByIds:rt,getSelectedItems:Ke,clearSelection:tt,getSelectionRow:ft,clickRowItemById:Oe,unSelectItemByIds:nt,getCurrentRowId:Ye,reassignRowData:Lt,hasChildren:$t,getCollapseField:zo,getCollapseStatusById:Rt,getVisibleDataByIds:qo,selectRowById:zn,updateDerivedData:Ho});const _o=t.computed(()=>{const ve={};return ge.shouldShowHorizontalScrollbar.value&&(ve.paddingBottom="10px"),ge.shouldShowVirticalScrollbar.value&&(ve.paddingRight="10px"),ve}),Uo=t.computed(()=>({...F.value,borderRadius:"5px"}));re.getPagination(e,n,w,ge,L,S);const Wo=t.computed(()=>({"d-flex":!0,"justify-content-between":$.value&&V.value,"justify-content-end":$.value&&!V.value,"position-relative":!0})),qn=t.computed(()=>({"d-flex":!0,"align-items-center":!0})),{renderDataGridSummary:Go}=re.getSummary(e,w,M);return()=>t.createVNode("div",{ref:d,class:Pe.value,style:Uo.value,onWheel:Se},[c.value&&Q.value&&dt(),t.createVNode("div",{ref:c,class:Re.value,onMouseover:()=>g.value=!0,onMouseleave:()=>g.value=!1,style:_o.value},[c.value&&Fe(p),c.value&&He(),c.value&&ut.value&&We(),c.value&&Te(),c.value&&ze()]),c.value&&Go(),V.value&&t.createVNode("div",{class:Wo.value},[V.value&&t.createVNode("div",{class:qn.value},[t.createVNode("div",null,["已选:"+E.value.length,t.createTextVNode(" 条")])])]),Ct(),O.value&&Le()])}});De.withInstall(io);function Ua(e){const{designerHostService:n}=e,o=new Map,a=t.ref(),i=t.ref(),r=t.ref([{field:"name",title:"字段名称"},{field:"bindingField",title:"绑定字段"},{field:"displayedTypeName",title:"字段类型"}]),l={enableSelectRow:!0,multiSelect:!0,multiSelectMode:"OnCheckAndClick",showCheckbox:!0,showSelectAll:!0},s=t.ref(!1),d=t.ref(e.componentType);function c(m){const y=[];return m.forEach(b=>{let C=[];b.type&&b.type.fields&&b.type.fields.length>0&&(C=c(b.type.fields));const P=Ve.cloneDeep(b),v=b.multiLanguage?"多语言":b.type.displayName,x=C.length?!1:!o.has(b.id);x&&(s.value=!0),y.push({data:Object.assign({displayedTypeName:v,selectable:x},P),children:C})}),y}function f(m){switch(m){case"data-grid":case"tree-grid":return"data-grid";case"response-form":return"form";default:return m}}function u(m){if(o.clear(),!m)return;let y=f(d.value);["frame","table","form"].includes(y)&&(y="form");const{formSchemaUtils:b,schemaService:C}=n;b.getFormSchema().module.viewmodels.forEach(P=>{if(!P.fields||P.fields.length===0)return;let x=b.getComponentByViewModelId(P.id).componentType;["frame","table","form"].includes(x)&&(x="form");const w=C.getTableInfoByViewModelId(P.id);x!==y||!w||w.id!==m.id||P.fields.forEach(T=>{o.set(T.id,!0)})})}function h(m){u(m);const{fields:y}=m.type;s.value=!1,a.value=c(y),i.value&&i.value.updateDataSource(a.value)}const p={customRowStatus:m=>(m.disabled=!m.raw.selectable,m)};function g(){return i.value.getSelectedItems().map(y=>y.data)}return{fieldTreeGridRef:i,resolveFieldDataSource:h,occupiedFieldMap:o,fieldDataSource:a,fieldTreeRowOption:p,fieldColumns:r,fieldSelectionOption:l,checkAndGetSelectedFields:g,hasSelectableField:s,currentComponentType:d}}function Yr(e){const{designerHostService:n}=e,o=new Map,a=t.ref(),i=t.ref(),r=t.ref([{field:"name",title:"实体名称"}]),l=t.ref(),s=t.ref(!1);function d(g){const m=Ua(e);return m.resolveFieldDataSource(g),m.hasSelectableField.value?(l.value=l.value||g,!0):!1}function c(g){return!(e.bindingEntityId&&e.bindingEntityId!==g.id||!d(g))}function f(g,m=""){var v;if(!g)return;const y=Ve.cloneDeep(g),b=m?`${m}/${y.label}`:"/";o.set(y.label,b.replace("//","/"));const C=c(y),P={data:Object.assign({selectable:C},y),children:[]};if(y.type.entities&&y.type.entities.length){const x=y.type.entities.map(w=>f(w,b));P.children=P.children.concat(x)}r