@ehfuse/mui-virtual-data-table 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{forwardRef as rt,useCallback as xe,useMemo as nt,useRef as W,useEffect as Te,memo as Lt,useState as ot}from"react";import{flushSync as Dt}from"react-dom";import{Box as Me,Table as Et,TableBody as Ht,TableCell as qe,TableContainer as It,TableHead as $t,TableRow as _e,TableSortLabel as it,Paper as Ot,Typography as Bt}from"@mui/material";import{TableVirtuoso as Pt}from"react-virtuoso";import{jsx as tt}from"react/jsx-runtime";import{useRef as lt,useState as pt,useEffect as ft}from"react";import{Box as mt,CircularProgress as ht}from"@mui/material";var We=function(){return We=Object.assign||function(u){for(var y,m=1,g=arguments.length;m<g;m++){y=arguments[m];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(u[E]=y[E])}return u},We.apply(this,arguments)};function at(a){var u=a.visible,y=a.onComplete,m=a.fadeoutDuration,g=m===void 0?200:m,E=a.exitDelay,d=E===void 0?0:E,P=a.size,k=P===void 0?40:P,Y=a.className,Q=a.style,N=a.sx,q=a.indicator,L=a.background,V=L===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:L,fe=lt(void 0),l=lt(null),F=pt(u),me=F[0],we=F[1],$=V.show,Se=$===void 0?!0:$,S=V.color,D=S===void 0?"255, 255, 255":S,he=V.opacity,ee=he===void 0?.9:he;if(ft(function(){var te=fe.current;if(te===!0&&u===!1&&l.current){var _=l.current;_.style.opacity="0",setTimeout(function(){we(!1),y?.()},g+d)}else u===!0&&(we(!0),l.current&&(l.current.style.opacity="1"));fe.current=u},[u,y,g,d]),!me)return null;var De=function(){return typeof q=="string"?tt("img",{src:q,alt:"Loading",style:{width:k,height:k}}):q||tt(ht,{size:k})},ge=function(){return Se?D.startsWith("rgba")?{backgroundColor:D}:/^\d+,\s*\d+,\s*\d+$/.test(D)?{backgroundColor:"rgba(".concat(D,", ").concat(ee,")")}:ee!==1?{backgroundColor:D,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:D,opacity:ee,zIndex:-1}}:{backgroundColor:D}:{backgroundColor:"transparent"}};return tt(mt,{ref:l,className:Y,style:We({},Q),sx:We(We({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:u?1:0,transition:"opacity ".concat(g,"ms ease-out")},ge()),N),children:De()})}import{useRef as Z,useEffect as pe,useState as A,useCallback as I,useMemo as Ye,forwardRef as gt,useImperativeHandle as bt,useLayoutEffect as yt}from"react";import{jsx as $e,jsxs as ct}from"react/jsx-runtime";var vt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],st=(a,u)=>{let y=a.tagName.toLowerCase(),m=["text","password","email","number","search","tel","url","checkbox","radio"];if(y==="input"){let g=a.type;return m.includes(g)}if(["textarea","select","button"].includes(y)||["svg","path","circle","rect","line","polygon","polyline"].includes(y)||a.getAttribute("contenteditable")==="true")return!0;if(u?.excludeSelectors){for(let g of u.excludeSelectors)if(a.matches(g))return!0}return xt(a,u)},xt=(a,u)=>{let y=[...vt,...u?.excludeClasses||[]],m=a,g=0,E=5;for(;m&&g<=E;){if(y.some(d=>m.classList.contains(d)))return!0;if(m.classList.contains("MuiDialogContent-root"))break;m=m.parentElement,g++}return!1},Tt={},Mt={},wt={},St={},Ct={},kt=gt(({className:a="",style:u={},containerStyle:y={},contentStyle:m={},children:g,onScroll:E,thumb:d=Tt,track:P=Mt,arrows:k=wt,dragScroll:Y=St,autoHide:Q=Ct,showScrollbar:N=!0,detectInnerScroll:q=!1},L)=>{let V=Z({});pe(()=>{V.current={children:g,onScroll:E,showScrollbar:N,thumb:d,track:P,arrows:k,dragScroll:Y,autoHide:Q}});let fe=Z(null),l=Z(null),F=Z(null),me=Z(null),we=Z(null),$=Z(null),[Se,S]=A(!1),[D,he]=A(!1),[ee,De]=A(!1),[ge,te]=A({y:0,scrollTop:0}),[_,Ue]=A(0),[Xe,Be]=A(0),[Pe,Ke]=A(!1),[ne,Ee]=A(!1),[R,be]=A({x:0,y:0,scrollTop:0,scrollLeft:0}),[Je,Ze]=A(null),[Ce,oe]=A(null),[Re,Ne]=A(!1),He=Z(null),[Ve,Ie]=A(!1),ie=Z(null),re=Z(null),le=Z(null),H=Ye(()=>{let e=d.color??"#606060";return{width:d.width??8,minHeight:d.minHeight??50,radius:d.radius??(d.width??8)/2,color:e,opacity:d.opacity??.6,hoverColor:d.hoverColor??e,hoverOpacity:d.hoverOpacity??1}},[d]),v=Ye(()=>({width:P.width??16,color:P.color??"rgba(128, 128, 128, 0.1)",visible:P.visible??!0,alignment:P.alignment??"center",radius:P.radius??H.radius??4,margin:P.margin??4}),[P,H.radius]),G=Ye(()=>{let e=k.color??"#808080";return{visible:k.visible??!1,step:k.step??50,color:e,opacity:k.opacity??.6,hoverColor:k.hoverColor??e,hoverOpacity:k.hoverOpacity??1}},[k]),je=Ye(()=>({enabled:Y.enabled??!0,excludeClasses:Y.excludeClasses??[],excludeSelectors:Y.excludeSelectors??[]}),[Y]),b=Ye(()=>({enabled:Q.enabled??!0,delay:Q.delay??1500,delayOnWheel:Q.delayOnWheel??700}),[Q]),r=H.width,i=v.width,x=H.minHeight,p=G.visible,U=G.step,t=I(()=>{if(!l.current)return;let e=document.activeElement;e&&l.current.contains(e)&&e!==l.current||l.current.focus()},[]);bt(L,()=>({getScrollContainer:()=>l.current,scrollTo:e=>{l.current&&l.current.scrollTo(e)},get scrollTop(){return l.current?.scrollTop||0},get scrollHeight(){return l.current?.scrollHeight||0},get clientHeight(){return l.current?.clientHeight||0}}),[]);let f=I(()=>{if($.current){let n=$.current;if(document.contains(n)&&n.scrollHeight>n.clientHeight+2)return n;$.current=null}if(!l.current)return null;if(F.current&&F.current.scrollHeight>l.current.clientHeight+2)return $.current=l.current,l.current;if(!q)return null;let e=l.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let n of e){let o=n;if(o!==l.current&&o.classList.contains("overlay-scrollbar-container"))continue;let s=o.parentElement,M=!1;for(;s&&s!==l.current;){if(s.classList.contains("overlay-scrollbar-container")&&s!==l.current){M=!0;break}s=s.parentElement}if(!M&&o.scrollHeight>o.clientHeight+2)return $.current=o,o}return null},[]),ae=I(()=>f()!==null,[f]),h=I(()=>{ie.current&&(clearTimeout(ie.current),ie.current=null)},[]),se=I(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),ce=I(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),C=I(e=>{b.enabled&&(h(),ie.current=setTimeout(()=>{S(!1),ie.current=null},e))},[h,b.enabled]),T=I(()=>{let e=f();if(!e){S(!1),Ke(!1),h();return}if(Ke(!0),!me.current)return;b.enabled||(S(!0),h());let n=e.clientHeight,o=e.scrollHeight,s=e.scrollTop,M=0;if(fe.current){let Fe=window.getComputedStyle(fe.current),et=parseFloat(Fe.paddingTop)||0,dt=parseFloat(Fe.paddingBottom)||0;M=et+dt}let w=p?r*2+v.margin*4:v.margin*2,O=n-w+M,B=n/o,Le=Math.max(O*B,x),Ae=o-n,J=O-Le,Qe=Ae>0?s/Ae*J:0;Ue(Le),Be(Qe)},[f,h,p,r,x,b.enabled]),ze=I(e=>{e.preventDefault(),e.stopPropagation();let n=f();n&&(he(!0),te({y:e.clientY,scrollTop:n.scrollTop}),h(),S(!0),t())},[f,h,t]),X=I(e=>{if(!D)return;let n=f();if(!n)return;let o=n.clientHeight,s=n.scrollHeight-o,M=e.clientY-ge.y,w=o-_,O=M/w*s,B=Math.max(0,Math.min(s,ge.scrollTop+O));n.scrollTop=B,T()},[D,ge,_,T,f]),j=I(()=>{he(!1),ae()&&C(b.delay)},[ae,C,b.delay]),K=I(e=>{if(!me.current)return;let n=me.current.getBoundingClientRect(),o=e.clientY-n.top,s=f();if(!s)return;let M=s.clientHeight,w=s.scrollHeight,O=o/M*(w-M);s.scrollTop=Math.max(0,Math.min(w-M,O)),T(),S(!0),C(b.delay),t()},[T,C,b.delay,f,t]),ye=I(e=>{if(e.preventDefault(),e.stopPropagation(),!l.current)return;let n=Math.max(0,l.current.scrollTop-U);l.current.scrollTop=n,T(),S(!0),C(b.delay),t()},[T,C,U,b.delay,t]),ke=I(e=>{if(e.preventDefault(),e.stopPropagation(),!l.current||!F.current)return;let n=l.current,o=F.current.scrollHeight-n.clientHeight,s=Math.min(o,n.scrollTop+U);n.scrollTop=s,T(),S(!0),C(b.delay),t()},[T,C,U,b.delay,t]),ve=I(e=>{if(!je.enabled)return;let n=e.target;if(st(n,je)||e.button!==0)return;let o=f();o&&(o.scrollHeight<=o.clientHeight||(e.preventDefault(),Ee(!0),be({x:e.clientX,y:e.clientY,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft||0}),h()))},[je,st,f,h]),ue=I(e=>{if(!ne)return;let n=f();if(!n)return;let o=R.x-e.clientX,s=R.y-e.clientY;if(Math.abs(s)<3&&Math.abs(o)<3)return;S(!0);let M=Math.max(0,Math.min(n.scrollHeight-n.clientHeight,R.scrollTop+s));n.scrollTop=M,T()},[ne,R,f,T]),z=I(()=>{Ee(!1),ae()&&C(b.delay)},[ae,C,b.delay]);pe(()=>{let e=w=>{T(),h(),S(!0);let O=Ve?b.delayOnWheel:b.delay;C(O),E&&E(w)},n=()=>{Ie(!0),He.current&&clearTimeout(He.current),He.current=setTimeout(()=>{Ie(!1)},300),h(),ce(),le.current=setTimeout(()=>{S(!0),le.current=null},50)},o=[],s=f();s&&o.push(s);let M=l.current;return M&&!s&&(o.push(M),M.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(w=>{let O=w;if(O!==M&&O.classList.contains("overlay-scrollbar-container"))return;let B=O.parentElement;for(;B&&B!==M;){if(B.classList.contains("overlay-scrollbar-container")&&B!==M)return;B=B.parentElement}o.push(O)})),o.forEach(w=>{w.addEventListener("scroll",e,{passive:!0}),w.addEventListener("wheel",n,{passive:!0})}),()=>{o.forEach(w=>{w.removeEventListener("scroll",e),w.removeEventListener("wheel",n)}),He.current&&clearTimeout(He.current),le.current&&clearTimeout(le.current)}},[f,T,E,h,C,b,Ve]),pe(()=>{let e=o=>{let s=f();if(!s)return;let{key:M}=o,{scrollTop:w,scrollHeight:O,clientHeight:B}=s,Le=O-B,Ae=50,J=null;switch(M){case"ArrowUp":o.preventDefault(),J=Math.max(0,w-Ae);break;case"ArrowDown":o.preventDefault(),J=Math.min(Le,w+Ae);break;case"PageUp":o.preventDefault(),J=Math.max(0,w-B);break;case"PageDown":o.preventDefault(),J=Math.min(Le,w+B);break;case"Home":o.preventDefault(),J=0;break;case"End":o.preventDefault(),J=Le;break;default:return}if(J!==null){let Qe=J/Le,Fe=p?r*2+v.margin*4:v.margin*2,et=(B-Fe-_)*Qe;Be(et),s.scrollTop=J,h(),S(!0),C(b.delay)}},n=l.current;if(n)return n.addEventListener("keydown",e),()=>{n.removeEventListener("keydown",e)}},[f,p,r,v.margin,_,h,C,b.delay]),pe(()=>{if(ne)return document.addEventListener("mousemove",ue),document.addEventListener("mouseup",z),()=>{document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",z)}},[ne,ue,z]),pe(()=>{if(D)return document.addEventListener("mousemove",X),document.addEventListener("mouseup",j),()=>{document.removeEventListener("mousemove",X),document.removeEventListener("mouseup",j)}},[D,X,j]),pe(()=>{T();let e=setTimeout(()=>{T()},100);return()=>clearTimeout(e)},[T]),yt(()=>{Ne(!0),T(),!b.enabled&&ae()&&S(!0)},[ae,T,b.enabled]),pe(()=>{let e=new ResizeObserver(()=>{T()}),n=[];return l.current&&n.push(l.current),F.current&&n.push(F.current),$.current&&document.contains($.current)&&n.push($.current),n.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[T]),pe(()=>{if(!l.current)return;let e=new MutationObserver(()=>{$.current=null,T()});return e.observe(l.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[T]);let de=Math.max(i,r);return pe(()=>{let e="overlay-scrollbar-webkit-hide",n=document.getElementById(e);n&&n.remove();let o=document.createElement("style");return o.id=e,o.textContent=`
|
|
1
|
+
import{forwardRef as rt,useCallback as ye,useMemo as nt,useRef as j,useEffect as de,memo as Lt,useState as ot}from"react";import{flushSync as Dt}from"react-dom";import{Box as ve,Table as Et,TableBody as Ht,TableCell as We,TableContainer as It,TableHead as $t,TableRow as Ge,TableSortLabel as it,Paper as Ot,Typography as Bt}from"@mui/material";import{TableVirtuoso as Pt}from"react-virtuoso";import{jsx as tt}from"react/jsx-runtime";import{useRef as lt,useState as pt,useEffect as ft}from"react";import{Box as mt,CircularProgress as ht}from"@mui/material";var ze=function(){return ze=Object.assign||function(d){for(var y,h=1,g=arguments.length;h<g;h++){y=arguments[h];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(d[E]=y[E])}return d},ze.apply(this,arguments)};function at(s){var d=s.visible,y=s.onComplete,h=s.fadeoutDuration,g=h===void 0?200:h,E=s.exitDelay,p=E===void 0?0:E,R=s.size,k=R===void 0?40:R,Y=s.className,te=s.style,z=s.sx,q=s.indicator,L=s.background,V=L===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:L,pe=lt(void 0),l=lt(null),F=pt(d),fe=F[0],xe=F[1],$=V.show,Te=$===void 0?!0:$,S=V.color,D=S===void 0?"255, 255, 255":S,me=V.opacity,re=me===void 0?.9:me;if(ft(function(){var ie=pe.current;if(ie===!0&&d===!1&&l.current){var A=l.current;A.style.opacity="0",setTimeout(function(){xe(!1),y?.()},g+p)}else d===!0&&(xe(!0),l.current&&(l.current.style.opacity="1"));pe.current=d},[d,y,g,p]),!fe)return null;var Le=function(){return typeof q=="string"?tt("img",{src:q,alt:"Loading",style:{width:k,height:k}}):q||tt(ht,{size:k})},he=function(){return Te?D.startsWith("rgba")?{backgroundColor:D}:/^\d+,\s*\d+,\s*\d+$/.test(D)?{backgroundColor:"rgba(".concat(D,", ").concat(re,")")}:re!==1?{backgroundColor:D,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:D,opacity:re,zIndex:-1}}:{backgroundColor:D}:{backgroundColor:"transparent"}};return tt(mt,{ref:l,className:Y,style:ze({},te),sx:ze(ze({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:d?1:0,transition:"opacity ".concat(g,"ms ease-out")},he()),z),children:Le()})}import{useRef as ee,useEffect as ue,useState as W,useCallback as H,useMemo as Ae,forwardRef as gt,useImperativeHandle as bt,useLayoutEffect as yt}from"react";import{jsx as Oe,jsxs as ct}from"react/jsx-runtime";var vt=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],st=(s,d)=>{let y=s.tagName.toLowerCase(),h=["text","password","email","number","search","tel","url","checkbox","radio"];if(y==="input"){let g=s.type;return h.includes(g)}if(["textarea","select","button"].includes(y)||["svg","path","circle","rect","line","polygon","polyline"].includes(y)||s.getAttribute("contenteditable")==="true")return!0;if(d?.excludeSelectors){for(let g of d.excludeSelectors)if(s.matches(g))return!0}return xt(s,d)},xt=(s,d)=>{let y=[...vt,...d?.excludeClasses||[]],h=s,g=0,E=5;for(;h&&g<=E;){if(y.some(p=>h.classList.contains(p)))return!0;if(h.classList.contains("MuiDialogContent-root"))break;h=h.parentElement,g++}return!1},Tt={},Mt={},wt={},St={},Ct={},kt=gt(({className:s="",style:d={},containerStyle:y={},contentStyle:h={},children:g,onScroll:E,thumb:p=Tt,track:R=Mt,arrows:k=wt,dragScroll:Y=St,autoHide:te=Ct,showScrollbar:z=!0,detectInnerScroll:q=!1},L)=>{let V=ee({});ue(()=>{V.current={children:g,onScroll:E,showScrollbar:z,thumb:p,track:R,arrows:k,dragScroll:Y,autoHide:te}});let pe=ee(null),l=ee(null),F=ee(null),fe=ee(null),xe=ee(null),$=ee(null),[Te,S]=W(!1),[D,me]=W(!1),[re,Le]=W(!1),[he,ie]=W({y:0,scrollTop:0}),[A,Ye]=W(0),[Xe,qe]=W(0),[De,Ve]=W(!1),[Ee,He]=W(!1),[ge,X]=W({x:0,y:0,scrollTop:0,scrollLeft:0}),[Me,Ke]=W(null),[we,Se]=W(null),[Pe,Ie]=W(!1),le=ee(null),[Je,Fe]=W(!1),ae=ee(null),se=ee(null),_=ee(null),O=Ae(()=>{let t=p.color??"#606060";return{width:p.width??8,minHeight:p.minHeight??50,radius:p.radius??(p.width??8)/2,color:t,opacity:p.opacity??.6,hoverColor:p.hoverColor??t,hoverOpacity:p.hoverOpacity??1}},[p]),b=Ae(()=>({width:R.width??16,color:R.color??"rgba(128, 128, 128, 0.1)",visible:R.visible??!0,alignment:R.alignment??"center",radius:R.radius??O.radius??4,margin:R.margin??4}),[R,O.radius]),G=Ae(()=>{let t=k.color??"#808080";return{visible:k.visible??!1,step:k.step??50,color:t,opacity:k.opacity??.6,hoverColor:k.hoverColor??t,hoverOpacity:k.hoverOpacity??1}},[k]),Re=Ae(()=>({enabled:Y.enabled??!0,excludeClasses:Y.excludeClasses??[],excludeSelectors:Y.excludeSelectors??[]}),[Y]),v=Ae(()=>({enabled:te.enabled??!0,delay:te.delay??1500,delayOnWheel:te.delayOnWheel??700}),[te]),C=O.width,o=b.width,i=O.minHeight,f=G.visible,T=G.step,I=H(()=>{if(!l.current)return;let t=document.activeElement;t&&l.current.contains(t)&&t!==l.current||l.current.focus()},[]);bt(L,()=>({getScrollContainer:()=>l.current,scrollTo:t=>{l.current&&l.current.scrollTo(t)},get scrollTop(){return l.current?.scrollTop||0},get scrollHeight(){return l.current?.scrollHeight||0},get clientHeight(){return l.current?.clientHeight||0}}),[]);let e=H(()=>{if($.current){let n=$.current;if(document.contains(n)&&n.scrollHeight>n.clientHeight+2)return n;$.current=null}if(!l.current)return null;if(F.current&&F.current.scrollHeight>l.current.clientHeight+2)return $.current=l.current,l.current;if(!q)return null;let t=l.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let n of t){let r=n;if(r!==l.current&&r.classList.contains("overlay-scrollbar-container"))continue;let a=r.parentElement,c=!1;for(;a&&a!==l.current;){if(a.classList.contains("overlay-scrollbar-container")&&a!==l.current){c=!0;break}a=a.parentElement}if(!c&&r.scrollHeight>r.clientHeight+2)return $.current=r,r}return null},[]),N=H(()=>e()!==null,[e]),M=H(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),Ze=H(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),U=H(()=>{_.current&&(clearTimeout(_.current),_.current=null)},[]),x=H(t=>{v.enabled&&(M(),ae.current=setTimeout(()=>{S(!1),ae.current=null},t))},[M,v.enabled]),m=H(()=>{let t=e();if(!t){S(!1),Ve(!1),M();return}if(Ve(!0),!fe.current)return;v.enabled||(S(!0),M());let n=t.clientHeight,r=t.scrollHeight,a=t.scrollTop,c=0;if(pe.current){let _e=window.getComputedStyle(pe.current),et=parseFloat(_e.paddingTop)||0,dt=parseFloat(_e.paddingBottom)||0;c=et+dt}let w=f?C*2+b.margin*4:b.margin*2,B=n-w+c,P=n/r,ke=Math.max(B*P,i),je=r-n,Q=B-ke,Qe=je>0?a/je*Q:0;Ye(ke),qe(Qe)},[e,M,f,C,i,v.enabled]),$e=H(t=>{t.preventDefault(),t.stopPropagation();let n=e();n&&(me(!0),ie({y:t.clientY,scrollTop:n.scrollTop}),M(),S(!0),I())},[e,M,I]),Ne=H(t=>{if(!D)return;let n=e();if(!n)return;let r=n.clientHeight,a=n.scrollHeight-r,c=t.clientY-he.y,w=r-A,B=c/w*a,P=Math.max(0,Math.min(a,he.scrollTop+B));n.scrollTop=P,m()},[D,he,A,m,e]),Ce=H(()=>{me(!1),N()&&x(v.delay)},[N,x,v.delay]),ne=H(t=>{if(!fe.current)return;let n=fe.current.getBoundingClientRect(),r=t.clientY-n.top,a=e();if(!a)return;let c=a.clientHeight,w=a.scrollHeight,B=r/c*(w-c);a.scrollTop=Math.max(0,Math.min(w-c,B)),m(),S(!0),x(v.delay),I()},[m,x,v.delay,e,I]),K=H(t=>{if(t.preventDefault(),t.stopPropagation(),!l.current)return;let n=Math.max(0,l.current.scrollTop-T);l.current.scrollTop=n,m(),S(!0),x(v.delay),I()},[m,x,T,v.delay,I]),J=H(t=>{if(t.preventDefault(),t.stopPropagation(),!l.current||!F.current)return;let n=l.current,r=F.current.scrollHeight-n.clientHeight,a=Math.min(r,n.scrollTop+T);n.scrollTop=a,m(),S(!0),x(v.delay),I()},[m,x,T,v.delay,I]),be=H(t=>{if(!Re.enabled)return;let n=t.target;if(st(n,Re)||t.button!==0)return;let r=e();r&&(r.scrollHeight<=r.clientHeight||(t.preventDefault(),He(!0),X({x:t.clientX,y:t.clientY,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft||0}),M()))},[Re,st,e,M]),ce=H(t=>{if(!Ee)return;let n=e();if(!n)return;let r=ge.x-t.clientX,a=ge.y-t.clientY;if(Math.abs(a)<3&&Math.abs(r)<3)return;S(!0);let c=Math.max(0,Math.min(n.scrollHeight-n.clientHeight,ge.scrollTop+a));n.scrollTop=c,m()},[Ee,ge,e,m]),oe=H(()=>{He(!1),N()&&x(v.delay)},[N,x,v.delay]);ue(()=>{let t=w=>{m(),M(),S(!0);let B=Je?v.delayOnWheel:v.delay;x(B),E&&E(w)},n=()=>{Fe(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{Fe(!1)},300),M(),U(),_.current=setTimeout(()=>{S(!0),_.current=null},50)},r=[],a=e();a&&r.push(a);let c=l.current;return c&&!a&&(r.push(c),c.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(w=>{let B=w;if(B!==c&&B.classList.contains("overlay-scrollbar-container"))return;let P=B.parentElement;for(;P&&P!==c;){if(P.classList.contains("overlay-scrollbar-container")&&P!==c)return;P=P.parentElement}r.push(B)})),r.forEach(w=>{w.addEventListener("scroll",t,{passive:!0}),w.addEventListener("wheel",n,{passive:!0})}),()=>{r.forEach(w=>{w.removeEventListener("scroll",t),w.removeEventListener("wheel",n)}),le.current&&clearTimeout(le.current),_.current&&clearTimeout(_.current)}},[e,m,E,M,x,v,Je]),ue(()=>{let t=r=>{let a=e();if(!a)return;let{key:c}=r,{scrollTop:w,scrollHeight:B,clientHeight:P}=a,ke=B-P,je=50,Q=null;switch(c){case"ArrowUp":r.preventDefault(),Q=Math.max(0,w-je);break;case"ArrowDown":r.preventDefault(),Q=Math.min(ke,w+je);break;case"PageUp":r.preventDefault(),Q=Math.max(0,w-P);break;case"PageDown":r.preventDefault(),Q=Math.min(ke,w+P);break;case"Home":r.preventDefault(),Q=0;break;case"End":r.preventDefault(),Q=ke;break;default:return}if(Q!==null){let Qe=Q/ke,_e=f?C*2+b.margin*4:b.margin*2,et=(P-_e-A)*Qe;qe(et),a.scrollTop=Q,M(),S(!0),x(v.delay)}},n=l.current;if(n)return n.addEventListener("keydown",t),()=>{n.removeEventListener("keydown",t)}},[e,f,C,b.margin,A,M,x,v.delay]),ue(()=>{if(Ee)return document.addEventListener("mousemove",ce),document.addEventListener("mouseup",oe),()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",oe)}},[Ee,ce,oe]),ue(()=>{if(D)return document.addEventListener("mousemove",Ne),document.addEventListener("mouseup",Ce),()=>{document.removeEventListener("mousemove",Ne),document.removeEventListener("mouseup",Ce)}},[D,Ne,Ce]),ue(()=>{m();let t=setTimeout(()=>{m()},100);return()=>clearTimeout(t)},[m]),yt(()=>{Ie(!0),m(),!v.enabled&&N()&&S(!0)},[N,m,v.enabled]),ue(()=>{let t=new ResizeObserver(()=>{m()}),n=[];return l.current&&n.push(l.current),F.current&&n.push(F.current),$.current&&document.contains($.current)&&n.push($.current),n.forEach(r=>{t.observe(r)}),()=>t.disconnect()},[m]),ue(()=>{if(!l.current)return;let t=new MutationObserver(()=>{$.current=null,m()});return t.observe(l.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[m]);let Z=Math.max(o,C);return ue(()=>{let t="overlay-scrollbar-webkit-hide",n=document.getElementById(t);n&&n.remove();let r=document.createElement("style");return r.id=t,r.textContent=`
|
|
2
2
|
.overlay-scrollbar-container::-webkit-scrollbar {
|
|
3
3
|
display: none !important;
|
|
4
4
|
width: 0 !important;
|
|
@@ -18,7 +18,7 @@ import{forwardRef as rt,useCallback as xe,useMemo as nt,useRef as W,useEffect as
|
|
|
18
18
|
outline: 2px solid rgba(0, 123, 255, 0.5);
|
|
19
19
|
outline-offset: -2px;
|
|
20
20
|
}
|
|
21
|
-
`,document.head.appendChild(o),()=>{let s=document.getElementById(e);s&&s.remove()}},[]),ct("div",{ref:fe,className:`overlay-scrollbar-wrapper ${a}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...u},children:[$e("div",{ref:l,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:ve,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:ne?"none":"auto",...y},children:$e("div",{ref:F,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...m},children:g})}),N&&Pe&&ct("div",{ref:me,className:"overlay-scrollbar-track",onMouseEnter:()=>{h(),re.current=setTimeout(()=>{S(!0),re.current=null},100)},onMouseLeave:()=>{se(),D||C(b.delay)},style:{position:"absolute",top:0,right:0,width:`${de}px`,height:"100%",opacity:Se?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[v.visible&&$e("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),K(e)},style:{position:"absolute",top:p?`${H.width+v.margin*2}px`:`${v.margin}px`,right:v.alignment==="right"?"0px":`${(de-H.width)/2}px`,width:`${H.width}px`,height:p?`calc(100% - ${H.width*2+v.margin*4}px)`:`calc(100% - ${v.margin*2}px)`,backgroundColor:v.color,borderRadius:`${v.radius}px`,cursor:"pointer"}}),$e("div",{ref:we,className:"overlay-scrollbar-thumb",onMouseDown:ze,onMouseEnter:()=>De(!0),onMouseLeave:()=>De(!1),style:{position:"absolute",top:`${(p?r+v.margin*2:v.margin)+Xe}px`,right:v.alignment==="right"?"0px":`${(de-r)/2}px`,width:`${r}px`,height:`${Math.max(_,x)}px`,backgroundColor:ee||D?H.hoverColor:H.color,opacity:ee||D?H.hoverOpacity:H.opacity,borderRadius:`${H.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),N&&Pe&&p&&$e("div",{className:"overlay-scrollbar-up-arrow",onClick:ye,onMouseEnter:()=>oe("up"),onMouseLeave:()=>oe(null),style:{position:"absolute",top:`${v.margin}px`,right:v.alignment==="right"?"0px":`${(de-r)/2}px`,width:`${r}px`,height:`${r}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(r*.75,8)}px`,color:Ce==="up"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:Se?Ce==="up"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),N&&Pe&&p&&$e("div",{className:"overlay-scrollbar-down-arrow",onClick:ke,onMouseEnter:()=>oe("down"),onMouseLeave:()=>oe(null),style:{position:"absolute",bottom:`${v.margin}px`,right:v.alignment==="right"?"0px":`${(de-r)/2}px`,width:`${r}px`,height:`${r}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(r*.75,8)}px`,color:Ce==="down"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:Se?Ce==="down"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),ut=kt;import{Fragment as Ge,jsx as c,jsxs as Oe}from"react/jsx-runtime";var Rt={alignment:"right",margin:0,radius:0};function Nt({data:a,loading:u=!1,columns:y,onRowClick:m,onRowMouseDown:g,getRowId:E,selectedRowId:d,rowHeight:P=50,columnHeight:k=56,striped:Y,rowDivider:Q=!0,onSort:N,onLoadMore:q,sortBy:L,sortDirection:V,showPaper:fe=!0,paddingX:l="1rem",paddingTop:F=0,paddingBottom:me=0,rowHoverColor:we,rowHoverOpacity:$,scrollbars:Se,emptyMessage:S="NO DATA",LoadingComponent:D}){let he=nt(()=>rt((r,i)=>{let x=W(null);return c(ut,{detectInnerScroll:!0,track:Rt,...Se,children:c(It,{component:Me,...r,ref:p=>{x.current=p,typeof i=="function"?i(p):i&&(i.current=p)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:l,paddingTop:F,paddingBottom:me}}})})}),[]),ee=nt(()=>{if(Y===!0)return"#f5f5f5";if(typeof Y=="string")return Y},[Y]),[De,ge]=ot(u),[te,_]=ot(null),[Ue,Xe]=ot(0);Te(()=>{u&&ge(!0)},[u]),Te(()=>{te!==null&&te===d&&_(null)},[te,d]),Te(()=>{d==null&&_(null)},[d]);let Be=xe(()=>{ge(!1)},[]),Pe=De,Ke=u&&a.length>0,ne=W(!1),Ee=W(null),R=W(null),be=W(!1),Je=W({x:0,y:0,scrollTop:0}),Ze=W(!1),Ce=W(0),oe=W(0),Re=W(!1),Ne=W({x:0,y:0}),He=W(null),Ve=xe(r=>{},[]),Ie=xe(r=>{if(!Ze.current||!R.current)return;let i=r.clientY-Je.current.y;if(!be.current&&Math.abs(i)>5&&(be.current=!0,R.current&&(R.current.style.userSelect="none")),be.current){let p=i*2;oe.current+=-p;let U=R.current,t=Math.max(0,Ce.current+oe.current);U.scrollTop=t,Je.current.y=r.clientY,r.preventDefault()}},[]),ie=xe(()=>{if(Ze.current=!1,be.current&&R.current){let r=Math.max(0,Ce.current+oe.current),i=()=>{R.current&&(R.current.scrollTop=r)};i(),setTimeout(i,1),setTimeout(i,5),setTimeout(i,10)}be.current=!1,oe.current=0,R.current&&(R.current.style.userSelect="auto")},[]);Te(()=>{let r=document.querySelector('[data-testid="virtuoso-scroller"]');r&&r.querySelectorAll(".MuiTableSortLabel-root").forEach(x=>{let p=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});x.dispatchEvent(p)})},[L]);let re=xe(r=>{if(!N)return;N(r,L===r&&V==="asc"?"desc":"asc")},[N,L,V]),le=xe(r=>{if(!q||u&&a.length===0)return;let i=Date.now(),x=window.lastRangeChangeTime||0;if(i-x<100)return;window.lastRangeChangeTime=i;let p=Math.max(10,Math.floor(a.length*.1)),U=r.endIndex>=a.length-p,t=a.length>=30;if(U&&t&&q&&!ne.current){ne.current=!0;let f=a.length;q(f,50)}},[a.length,u,q]);Te(()=>{u||(ne.current=!1)},[u]),Te(()=>{a.length===0&&Xe(r=>r+1)},[a.length]);let H=W(a.length);Te(()=>{let r=H.current,i=a.length;if(i>r&&r>0){H.current=i;return}Ee.current&&i>0&&i<=r&&Ee.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),H.current=i},[a]),Te(()=>(document.addEventListener("mousemove",Ie),document.addEventListener("mouseup",ie),()=>{document.removeEventListener("mousemove",Ie),document.removeEventListener("mouseup",ie)}),[Ie,ie]);let v=xe(()=>{let r={},i=[];if(y.forEach(t=>{t.group?(r[t.group]||(r[t.group]=[]),r[t.group].push(t)):i.push(t)}),!(Object.keys(r).length>0))return c(_e,{children:y.map(t=>c(qe,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable?c("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Oe(Me,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>re(String(t.id)),children:[t.text,c(it,{active:L===t.id,direction:L===t.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===t.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):t.text},String(t.id)))});let p=[...i.map(t=>c(qe,{rowSpan:2,align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&N?c("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Oe(Me,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>re(String(t.id)),children:[t.text,c(it,{active:L===t.id,direction:L===t.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===t.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):t.text},String(t.id))),...Object.entries(r).map(([t,f])=>c(qe,{align:"center",colSpan:f.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t},t))],U=[...Object.values(r).flat().map(t=>c(qe,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&N?c("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Oe(Me,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>re(String(t.id)),children:[t.text,c(it,{active:L===t.id,direction:L===t.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===t.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):t.text},String(t.id)))];return Oe(Ge,{children:[c(_e,{children:p}),c(_e,{children:U})]})},[y,L,V,re,N,k]),G=xe((r,i)=>i?c(Ge,{children:y.map(x=>c(qe,{align:x.align||"left",style:{width:x.width,minWidth:x.width,...x.style,padding:"8px 16px"},children:x.render?x.render(i,r):String(i[x.id]||"")},String(x.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",r),null),[y]),je=nt(()=>({Scroller:he,Table:r=>c(Et,{...r,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:rt((r,i)=>c($t,{...r,ref:i,sx:{userSelect:"none","& tr":{height:k,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:r=>{let{item:i,...x}=r,p=x["data-index"]??0,U=p%2===1,t=i&&E?E(i,p):p,f=d!=null&&t===d||te!==null&&t===te,ae=h=>{if(f)return"#dbeafe";let se=h.palette.mode==="dark",C=we??"#000000",T=$??.06,ze=C.replace("#",""),X=parseInt(ze.substring(0,2),16)/255,j=parseInt(ze.substring(2,4),16)/255,K=parseInt(ze.substring(4,6),16)/255;if(se){let ye=Math.max(X,j,K),ke=Math.min(X,j,K),ve=0,ue=0,z=(ye+ke)/2;if(ye!==ke){let e=ye-ke;switch(ue=z>.5?e/(2-ye-ke):e/(ye+ke),ye){case X:ve=((j-K)/e+(j<K?6:0))/6;break;case j:ve=((K-X)/e+2)/6;break;case K:ve=((X-j)/e+4)/6;break}}z=1-z;let de=(e,n,o)=>(o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*6*o:o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e);if(ue===0)X=j=K=z;else{let e=z<.5?z*(1+ue):z+ue-z*ue,n=2*z-e;X=de(n,e,ve+1/3),j=de(n,e,ve),K=de(n,e,ve-1/3)}}return`rgba(${Math.round(X*255)}, ${Math.round(j*255)}, ${Math.round(K*255)}, ${T})`};return c(_e,{...x,onMouseDown:h=>{Re.current=!1,Ne.current={x:h.clientX,y:h.clientY},h.button===0&&(i&&(m||g)&&t!==d&&Dt(()=>{_(t)}),i&&g&&g(i,p))},onMouseMove:h=>{let se=Math.abs(h.clientX-Ne.current.x),ce=Math.abs(h.clientY-Ne.current.y),C=5;(se>C||ce>C)&&(Re.current=!0)},onClick:()=>{!Re.current&&!be.current&&i&&m&&(t!==d&&_(t),m(i,p)),Re.current=!1},sx:h=>{let se=f?"#dbeafe":U&&ee?ee:"transparent",ce=ae(h);return{userSelect:"none",height:P,backgroundColor:se,boxShadow:f?"inset 3px 0 0 #3b82f6":"none","& td":{padding:"8px 16px",borderBottom:Q?"1px solid rgba(224, 224, 224, 1)":"none",fontWeight:f?600:void 0,backgroundColor:se},"& th":{padding:"8px 16px",borderBottom:"none",backgroundColor:se},"&:hover":m||g?{backgroundColor:ce,transition:"background-color 0.2s ease"}:void 0,"&:hover td":m||g?{backgroundColor:ce,transition:"background-color 0.2s ease"}:void 0,"&:active":m||g?{backgroundColor:ce}:void 0,"&:active td":m||g?{backgroundColor:ce}:void 0,cursor:m||g?"pointer":void 0}}})},TableBody:rt((r,i)=>c(Ht,{...r,ref:i}))}),[m,g,E,d,te,P,Ve,ee,Q,k,we,$,he]),b=Oe(Me,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:r=>r.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[c(Pt,{ref:Ee,data:a,totalCount:q?a.length+1:a.length,fixedHeaderContent:v,itemContent:G,rangeChanged:le,components:je,style:{height:"100%"},increaseViewportBy:{top:100,bottom:300},overscan:5,followOutput:!1},Ue),a.length===0&&!u&&c(Me,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof S=="string"?Oe(Ge,{children:[c(Me,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),c(Bt,{variant:"body1",sx:{color:"text.secondary"},children:S})]}):S}),Pe&&c(Ge,{children:D?c(D,{visible:u,onComplete:Be}):c(at,{visible:u,onComplete:Be,size:40,sx:{top:`${y.some(r=>r.group)?k*2:k}px`},background:{show:a.length===0,opacity:.8}})})]});return fe?c(Ot,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:l,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:b}):c(Me,{className:"grow",style:{padding:0,paddingLeft:l,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:b})}var jt=Lt(Nt);export{jt as VirtualDataTable};
|
|
21
|
+
`,document.head.appendChild(r),()=>{let a=document.getElementById(t);a&&a.remove()}},[]),ct("div",{ref:pe,className:`overlay-scrollbar-wrapper ${s}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...d},children:[Oe("div",{ref:l,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:be,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:Ee?"none":"auto",...y},children:Oe("div",{ref:F,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...h},children:g})}),z&&De&&ct("div",{ref:fe,className:"overlay-scrollbar-track",onMouseEnter:()=>{M(),se.current=setTimeout(()=>{S(!0),se.current=null},100)},onMouseLeave:()=>{Ze(),D||x(v.delay)},style:{position:"absolute",top:0,right:0,width:`${Z}px`,height:"100%",opacity:Te?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[b.visible&&Oe("div",{className:"overlay-scrollbar-track-background",onClick:t=>{t.preventDefault(),t.stopPropagation(),ne(t)},style:{position:"absolute",top:f?`${O.width+b.margin*2}px`:`${b.margin}px`,right:b.alignment==="right"?"0px":`${(Z-O.width)/2}px`,width:`${O.width}px`,height:f?`calc(100% - ${O.width*2+b.margin*4}px)`:`calc(100% - ${b.margin*2}px)`,backgroundColor:b.color,borderRadius:`${b.radius}px`,cursor:"pointer"}}),Oe("div",{ref:xe,className:"overlay-scrollbar-thumb",onMouseDown:$e,onMouseEnter:()=>Le(!0),onMouseLeave:()=>Le(!1),style:{position:"absolute",top:`${(f?C+b.margin*2:b.margin)+Xe}px`,right:b.alignment==="right"?"0px":`${(Z-C)/2}px`,width:`${C}px`,height:`${Math.max(A,i)}px`,backgroundColor:re||D?O.hoverColor:O.color,opacity:re||D?O.hoverOpacity:O.opacity,borderRadius:`${O.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),z&&De&&f&&Oe("div",{className:"overlay-scrollbar-up-arrow",onClick:K,onMouseEnter:()=>Se("up"),onMouseLeave:()=>Se(null),style:{position:"absolute",top:`${b.margin}px`,right:b.alignment==="right"?"0px":`${(Z-C)/2}px`,width:`${C}px`,height:`${C}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(C*.75,8)}px`,color:we==="up"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:Te?we==="up"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),z&&De&&f&&Oe("div",{className:"overlay-scrollbar-down-arrow",onClick:J,onMouseEnter:()=>Se("down"),onMouseLeave:()=>Se(null),style:{position:"absolute",bottom:`${b.margin}px`,right:b.alignment==="right"?"0px":`${(Z-C)/2}px`,width:`${C}px`,height:`${C}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(C*.75,8)}px`,color:we==="down"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:Te?we==="down"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),ut=kt;import{Fragment as Ue,jsx as u,jsxs as Be}from"react/jsx-runtime";var Rt={alignment:"right",margin:0,radius:0};function Nt({data:s,loading:d=!1,columns:y,onRowClick:h,onRowMouseDown:g,getRowId:E,selectedRowId:p,rowHeight:R=50,columnHeight:k=56,striped:Y,rowDivider:te=!0,onSort:z,onLoadMore:q,sortBy:L,sortDirection:V,showPaper:pe=!0,paddingX:l="1rem",paddingTop:F=0,paddingBottom:fe=0,rowHoverColor:xe,rowHoverOpacity:$,scrollbars:Te,emptyMessage:S="NO DATA",LoadingComponent:D}){let me=nt(()=>rt((o,i)=>{let f=j(null);return u(ut,{detectInnerScroll:!0,track:Rt,...Te,children:u(It,{component:ve,...o,ref:T=>{f.current=T,typeof i=="function"?i(T):i&&(i.current=T)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:l,paddingTop:F,paddingBottom:fe}}})})}),[]),re=nt(()=>{if(Y===!0)return"#f5f5f5";if(typeof Y=="string")return Y},[Y]),[Le,he]=ot(d),[ie,A]=ot(null),Ye=j(p),[Xe,qe]=ot(0);de(()=>{d&&he(!0)},[d]),de(()=>{ie!==null&&ie===p&&A(null)},[ie,p]),de(()=>{Ye.current!==p&&(A(null),Ye.current=p)},[p]),de(()=>{p==null&&A(null)},[p]);let De=ye(()=>{he(!1)},[]),Ve=Le,Ee=d&&s.length>0,He=j(!1),ge=j(null),X=j(null),Me=j(!1),Ke=j({x:0,y:0,scrollTop:0}),we=j(!1),Se=j(0),Pe=j(0),Ie=j(!1),le=j({x:0,y:0}),Je=j(null),Fe=ye(o=>{},[]),ae=ye(o=>{if(!we.current||!X.current)return;let i=o.clientY-Ke.current.y;if(!Me.current&&Math.abs(i)>5&&(Me.current=!0,X.current&&(X.current.style.userSelect="none")),Me.current){let T=i*2;Pe.current+=-T;let I=X.current,e=Math.max(0,Se.current+Pe.current);I.scrollTop=e,Ke.current.y=o.clientY,o.preventDefault()}},[]),se=ye(()=>{if(we.current=!1,Me.current&&X.current){let o=Math.max(0,Se.current+Pe.current),i=()=>{X.current&&(X.current.scrollTop=o)};i(),setTimeout(i,1),setTimeout(i,5),setTimeout(i,10)}Me.current=!1,Pe.current=0,X.current&&(X.current.style.userSelect="auto")},[]);de(()=>{let o=document.querySelector('[data-testid="virtuoso-scroller"]');o&&o.querySelectorAll(".MuiTableSortLabel-root").forEach(f=>{let T=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});f.dispatchEvent(T)})},[L]);let _=ye(o=>{if(!z)return;z(o,L===o&&V==="asc"?"desc":"asc")},[z,L,V]),O=ye(o=>{if(!q||d&&s.length===0)return;let i=Date.now(),f=window.lastRangeChangeTime||0;if(i-f<100)return;window.lastRangeChangeTime=i;let T=Math.max(10,Math.floor(s.length*.1)),I=o.endIndex>=s.length-T,e=s.length>=30;if(I&&e&&q&&!He.current){He.current=!0;let N=s.length;q(N,50)}},[s.length,d,q]);de(()=>{d||(He.current=!1)},[d]),de(()=>{s.length===0&&qe(o=>o+1)},[s.length]);let b=j(s.length);de(()=>{let o=b.current,i=s.length;if(i>o&&o>0){b.current=i;return}ge.current&&i>0&&i<=o&&ge.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),b.current=i},[s]),de(()=>(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",se),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",se)}),[ae,se]);let G=ye(()=>{let o={},i=[];if(y.forEach(e=>{e.group?(o[e.group]||(o[e.group]=[]),o[e.group].push(e)):i.push(e)}),!(Object.keys(o).length>0))return u(Ge,{children:y.map(e=>u(We,{align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable?u("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Be(ve,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,u(it,{active:L===e.id,direction:L===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===e.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):e.text},String(e.id)))});let T=[...i.map(e=>u(We,{rowSpan:2,align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable&&z?u("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Be(ve,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,u(it,{active:L===e.id,direction:L===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===e.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):e.text},String(e.id))),...Object.entries(o).map(([e,N])=>u(We,{align:"center",colSpan:N.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e},e))],I=[...Object.values(o).flat().map(e=>u(We,{align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable&&z?u("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Be(ve,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,u(it,{active:L===e.id,direction:L===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:L===e.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):e.text},String(e.id)))];return Be(Ue,{children:[u(Ge,{children:T}),u(Ge,{children:I})]})},[y,L,V,_,z,k]),Re=ye((o,i)=>i?u(Ue,{children:y.map(f=>u(We,{align:f.align||"left",style:{width:f.width,minWidth:f.width,...f.style,padding:"8px 16px"},children:f.render?f.render(i,o):String(i[f.id]||"")},String(f.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",o),null),[y]),v=nt(()=>({Scroller:me,Table:o=>u(Et,{...o,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:rt((o,i)=>u($t,{...o,ref:i,sx:{userSelect:"none","& tr":{height:k,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:o=>{let{item:i,...f}=o,T=f["data-index"]??0,I=T%2===1,e=i&&E?E(i,T):T,N=ie??p,M=N!=null&&e===N,Ze=U=>{if(M)return"#dbeafe";let x=U.palette.mode==="dark",$e=xe??"#000000",Ne=$??.06,Ce=$e.replace("#",""),ne=parseInt(Ce.substring(0,2),16)/255,K=parseInt(Ce.substring(2,4),16)/255,J=parseInt(Ce.substring(4,6),16)/255;if(x){let be=Math.max(ne,K,J),ce=Math.min(ne,K,J),oe=0,Z=0,t=(be+ce)/2;if(be!==ce){let r=be-ce;switch(Z=t>.5?r/(2-be-ce):r/(be+ce),be){case ne:oe=((K-J)/r+(K<J?6:0))/6;break;case K:oe=((J-ne)/r+2)/6;break;case J:oe=((ne-K)/r+4)/6;break}}t=1-t;let n=(r,a,c)=>(c<0&&(c+=1),c>1&&(c-=1),c<1/6?r+(a-r)*6*c:c<1/2?a:c<2/3?r+(a-r)*(2/3-c)*6:r);if(Z===0)ne=K=J=t;else{let r=t<.5?t*(1+Z):t+Z-t*Z,a=2*t-r;ne=n(a,r,oe+1/3),K=n(a,r,oe),J=n(a,r,oe-1/3)}}return`rgba(${Math.round(ne*255)}, ${Math.round(K*255)}, ${Math.round(J*255)}, ${Ne})`};return u(Ge,{...f,onMouseDown:U=>{Ie.current=!1,le.current={x:U.clientX,y:U.clientY},U.button===0&&(i&&(h||g)&&e!==p&&Dt(()=>{A(e)}),i&&g&&g(i,T))},onMouseMove:U=>{let x=Math.abs(U.clientX-le.current.x),m=Math.abs(U.clientY-le.current.y),$e=5;(x>$e||m>$e)&&(Ie.current=!0)},onClick:()=>{!Ie.current&&!Me.current&&i&&h&&(e!==p&&A(e),h(i,T)),Ie.current=!1},sx:U=>{let x=M?"#dbeafe":I&&re?re:"transparent",m=Ze(U);return{userSelect:"none",height:R,backgroundColor:x,boxShadow:M?"inset 3px 0 0 #3b82f6":"none","& td":{padding:"8px 16px",borderBottom:te?"1px solid rgba(224, 224, 224, 1)":"none",fontWeight:M?600:void 0,backgroundColor:x},"& th":{padding:"8px 16px",borderBottom:"none",backgroundColor:x},"&:hover":h||g?{backgroundColor:m,transition:"background-color 0.2s ease"}:void 0,"&:hover td":h||g?{backgroundColor:m,transition:"background-color 0.2s ease"}:void 0,"&:active":h||g?{backgroundColor:m}:void 0,"&:active td":h||g?{backgroundColor:m}:void 0,cursor:h||g?"pointer":void 0}}})},TableBody:rt((o,i)=>u(Ht,{...o,ref:i}))}),[h,g,E,p,ie,R,Fe,re,te,k,xe,$,me]),C=Be(ve,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:o=>o.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[u(Pt,{ref:ge,data:s,totalCount:q?s.length+1:s.length,fixedHeaderContent:G,itemContent:Re,rangeChanged:O,components:v,style:{height:"100%"},increaseViewportBy:{top:100,bottom:300},overscan:5,followOutput:!1},Xe),s.length===0&&!d&&u(ve,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof S=="string"?Be(Ue,{children:[u(ve,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),u(Bt,{variant:"body1",sx:{color:"text.secondary"},children:S})]}):S}),Ve&&u(Ue,{children:D?u(D,{visible:d,onComplete:De}):u(at,{visible:d,onComplete:De,size:40,sx:{top:`${y.some(o=>o.group)?k*2:k}px`},background:{show:s.length===0,opacity:.8}})})]});return pe?u(Ot,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:l,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:C}):u(ve,{className:"grow",style:{padding:0,paddingLeft:l,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:C})}var jt=Lt(Nt);export{jt as VirtualDataTable};
|
|
22
22
|
/**
|
|
23
23
|
* Virtual Data Table - A high-performance virtual data table component for React
|
|
24
24
|
*
|