simple-table-core 2.4.2 → 2.4.4

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.
Files changed (51) hide show
  1. package/dist/{Animate-a00b8653.js → Animate-85a426a3.js} +2 -2
  2. package/dist/Animate-85a426a3.js.map +1 -0
  3. package/dist/DatePicker-9d5825ee.js +2 -0
  4. package/dist/DatePicker-9d5825ee.js.map +1 -0
  5. package/dist/cjs/{Animate-b6372d93.js → Animate-18759d53.js} +2 -2
  6. package/dist/cjs/Animate-18759d53.js.map +1 -0
  7. package/dist/cjs/DatePicker-3d0a5721.js +2 -0
  8. package/dist/cjs/DatePicker-3d0a5721.js.map +1 -0
  9. package/dist/cjs/components/simple-table/table-column-editor/columnEditorUtils.d.ts +1 -0
  10. package/dist/cjs/context/TableContext.d.ts +2 -9
  11. package/dist/cjs/hooks/useDragHandler.d.ts +5 -1
  12. package/dist/cjs/hooks/useQuickFilter.d.ts +14 -0
  13. package/dist/cjs/hooks/useTableAPI.d.ts +3 -1
  14. package/dist/cjs/index-63f4ad95.js +2 -0
  15. package/dist/cjs/index-63f4ad95.js.map +1 -0
  16. package/dist/cjs/index.d.ts +2 -1
  17. package/dist/cjs/index.js +1 -1
  18. package/dist/cjs/types/HeaderObject.d.ts +3 -0
  19. package/dist/cjs/types/QuickFilterTypes.d.ts +21 -0
  20. package/dist/cjs/types/SimpleTableProps.d.ts +2 -0
  21. package/dist/cjs/types/TableRefType.d.ts +2 -0
  22. package/dist/cjs/types/TableRow.d.ts +1 -0
  23. package/dist/cjs/utils/quickFilterUtils.d.ts +14 -0
  24. package/dist/cjs/utils/rowUtils.d.ts +27 -0
  25. package/dist/components/simple-table/table-column-editor/columnEditorUtils.d.ts +1 -0
  26. package/dist/context/TableContext.d.ts +2 -9
  27. package/dist/hooks/useDragHandler.d.ts +5 -1
  28. package/dist/hooks/useQuickFilter.d.ts +14 -0
  29. package/dist/hooks/useTableAPI.d.ts +3 -1
  30. package/dist/index-57a11501.js +2 -0
  31. package/dist/index-57a11501.js.map +1 -0
  32. package/dist/index.d.ts +2 -1
  33. package/dist/index.es.js +1 -1
  34. package/dist/types/HeaderObject.d.ts +3 -0
  35. package/dist/types/QuickFilterTypes.d.ts +21 -0
  36. package/dist/types/SimpleTableProps.d.ts +2 -0
  37. package/dist/types/TableRefType.d.ts +2 -0
  38. package/dist/types/TableRow.d.ts +1 -0
  39. package/dist/utils/quickFilterUtils.d.ts +14 -0
  40. package/dist/utils/rowUtils.d.ts +27 -0
  41. package/package.json +4 -1
  42. package/dist/Animate-a00b8653.js.map +0 -1
  43. package/dist/DatePicker-91f87634.js +0 -2
  44. package/dist/DatePicker-91f87634.js.map +0 -1
  45. package/dist/cjs/Animate-b6372d93.js.map +0 -1
  46. package/dist/cjs/DatePicker-7bfd609b.js +0 -2
  47. package/dist/cjs/DatePicker-7bfd609b.js.map +0 -1
  48. package/dist/cjs/index-e0379c0f.js +0 -2
  49. package/dist/cjs/index-e0379c0f.js.map +0 -1
  50. package/dist/index-fe1a2c58.js +0 -2
  51. package/dist/index-fe1a2c58.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{_ as n,u as i,a as t,c as e,b as o,A as a,d as r,f as l,R as d}from"./index-fe1a2c58.js";import{jsx as u}from"react/jsx-runtime";import{useRef as f,useMemo as s,useLayoutEffect as v}from"react";var m=function(m){var p=m.children,h=m.id,c=m.parentRef,M=m.tableRow,Y=n(m,["children","id","parentRef","tableRow"]),C=i(),g=C.allowAnimations,x=C.isResizing,R=C.isScrolling,b=C.rowHeight,j=f(null),A=f(null),B=t(R),w=t(x),_=s(function(){return e(b)},[b]);return v(function(){var n,i,t,e;if(g&&j.current&&!x){var u=j.current.getBoundingClientRect(),f=A.current;if(!R)if(!B||R)if(!w||x){if(A.current=u,f){var s=u.x-f.x,v=u.y-f.y;if((Math.abs(s)>=50||Math.abs(v)>5)&&(Math.abs(s)>5||Math.abs(v)>5)){var m=o(o({},a.ROW_REORDER),{onComplete:function(){j.current&&(j.current.style.zIndex="",j.current.style.position="",j.current.style.top="")}}),p=null===(n=null==c?void 0:c.current)||void 0===n?void 0:n.scrollTop,h=null===(i=null==c?void 0:c.current)||void 0===i?void 0:i.clientHeight,Y=null===(t=null==c?void 0:c.current)||void 0===t?void 0:t.scrollHeight;if(void 0!==p&&void 0!==h&&void 0!==Y){var C=_*(b+d),k=p-C,q=p+h+C,y=f.y>k&&q>f.y,z=u.y>k&&q>u.y,D=p>u.y,E=null!==(e=null==M?void 0:M.position)&&void 0!==e?e:0,F=.6*b,G=function(n,i,t){return Math.min(900,Math.max(100,100+80*Math.log10(Math.max(1,Math.min(Math.abs(n-i),Math.abs(n-t))))))};if(y&&!z&&u.y>p+h){var H=G(u.y,p,p+h);return void r({element:j.current,options:{startY:f.y,endY:p+h+H+E%15*F*2.5+E%7*.4*b,finalY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}})}if(y&&!z&&D)return H=G(u.y,p,p+h),void r({element:j.current,options:{startY:f.y,endY:p-H-E%15*F*2.5-E%7*.4*b,finalY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}});if(!y&&z&&f.y>p+h)return H=G(f.y,p,p+h),void r({element:j.current,options:{startY:p+h+H+E%10*F*1,endY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}});if(!y&&z&&p>f.y)return H=G(f.y,p,p+h),void r({element:j.current,options:{startY:p-H-E%10*F*1,endY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}})}l({element:j.current,fromBounds:f,toBounds:u,finalConfig:m})}}}else A.current=u;else A.current=u}},[g,_,x,R,c,B,w,b,null==M?void 0:M.position,M]),u("div",o({ref:j,"data-animate-id":h,id:h+""},Y,{children:p}))};m.displayName="Animate";export{m as Animate,m as default};
2
- //# sourceMappingURL=Animate-a00b8653.js.map
1
+ import{_ as n,u as i,a as t,c as o,b as e,A as a,d as r,f as l,R as d}from"./index-57a11501.js";import{jsx as u}from"react/jsx-runtime";import{useRef as f,useMemo as s,useLayoutEffect as v}from"react";var m=function(m){var p=m.children,h=m.id,M=m.parentRef,c=m.tableRow,Y=n(m,["children","id","parentRef","tableRow"]),C=i(),g=C.allowAnimations,x=C.isResizing,R=C.isScrolling,b=C.rowHeight,j=f(null),A=f(null),B=t(R),w=t(x),_=s(function(){return o(b)},[b]);return v(function(){var n,i,t,o;if(g&&j.current&&!x){var u=j.current.getBoundingClientRect(),f=A.current;if(!R)if(!B||R)if(!w||x){if(A.current=u,f){var s=u.x-f.x,v=u.y-f.y;if((Math.abs(s)>=50||Math.abs(v)>5)&&(Math.abs(s)>5||Math.abs(v)>5)){var m=e(e({},a.ROW_REORDER),{onComplete:function(){j.current&&(j.current.style.zIndex="",j.current.style.position="",j.current.style.top="")}}),p=null===(n=null==M?void 0:M.current)||void 0===n?void 0:n.scrollTop,h=null===(i=null==M?void 0:M.current)||void 0===i?void 0:i.clientHeight,Y=null===(t=null==M?void 0:M.current)||void 0===t?void 0:t.scrollHeight;if(void 0!==p&&void 0!==h&&void 0!==Y){var C=_*(b+d),k=p-C,q=p+h+C,y=f.y>k&&q>f.y,z=u.y>k&&q>u.y,D=p>u.y,E=null!==(o=null==c?void 0:c.position)&&void 0!==o?o:0,F=.6*b,G=function(n,i,t){return Math.min(900,Math.max(100,100+80*Math.log10(Math.max(1,Math.min(Math.abs(n-i),Math.abs(n-t))))))};if(y&&!z&&u.y>p+h){var H=G(u.y,p,p+h);return void r({element:j.current,options:{startY:f.y,endY:p+h+H+E%15*F*2.5+E%7*.4*b,finalY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}})}if(y&&!z&&D)return H=G(u.y,p,p+h),void r({element:j.current,options:{startY:f.y,endY:p-H-E%15*F*2.5-E%7*.4*b,finalY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}});if(!y&&z&&f.y>p+h)return H=G(f.y,p,p+h),void r({element:j.current,options:{startY:p+h+H+E%10*F*1,endY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}});if(!y&&z&&p>f.y)return H=G(f.y,p,p+h),void r({element:j.current,options:{startY:p-H-E%10*F*1,endY:u.y,duration:m.duration,easing:m.easing,onComplete:m.onComplete}})}l({element:j.current,fromBounds:f,toBounds:u,finalConfig:m})}}}else A.current=u;else A.current=u}},[g,_,x,R,M,B,w,b,null==c?void 0:c.position,c]),u("div",e({ref:j,"data-animate-id":h,id:h+""},Y,{children:p}))};m.displayName="Animate";export{m as Animate,m as default};
2
+ //# sourceMappingURL=Animate-85a426a3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Animate-85a426a3.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{u as e,b as n}from"./index-57a11501.js";import{jsxs as t,Fragment as a,jsx as r}from"react/jsx-runtime";import{useState as c}from"react";var i=function(i){var d,o,s=i.onChange,l=i.onClose,u=i.value,f=e().icons,h=c(u||new Date),m=h[0],v=h[1],k=c("days"),p=k[0],w=k[1],y=function(e,n){return new Date(e,n+1,0).getDate()};return t("div",n({className:"st-datepicker"},{children:[t("div",n({className:"st-datepicker-header"},{children:["days"===p&&t(a,{children:[r("button",n({onClick:function(){v(new Date(m.getFullYear(),m.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:f.prev})),t("div",n({className:"st-datepicker-header-label",onClick:function(){return w("months")}},{children:[(o=m,o.toLocaleString("default",{month:"long"}))," ",m.getFullYear()]})),r("button",n({onClick:function(){v(new Date(m.getFullYear(),m.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:f.next}))]}),"months"===p&&r("div",n({className:"st-datepicker-header-label",onClick:function(){return w("years")}},{children:m.getFullYear()})),"years"===p&&r("div",n({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),t("div",n({className:"st-datepicker-grid st-datepicker-".concat(p,"-grid")},{children:["days"===p&&function(){var e=[],t=m.getFullYear(),a=m.getMonth(),c=y(t,a),i=function(e,n){return new Date(e,n,1).getDay()}(t,a),d=y(t,a-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach(function(t,a){e.push(r("div",n({className:"st-datepicker-weekday"},{children:t}),"header-".concat(a)))});for(var o=function(t){var a=d-i+t+1;e.push(r("div",n({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(m.getFullYear(),m.getMonth()-1,e,12,0,0);v(n),s(n),null==l||l()}(a)}},{children:a}),"prev-".concat(a)))},f=0;i>f;f++)o(f);for(var h=function(c){var i=c===(new Date).getDate()&&a===(new Date).getMonth()&&t===(new Date).getFullYear(),d=new Date(u),o=c===d.getDate()&&a===d.getMonth()&&t===d.getFullYear();e.push(r("div",n({className:"st-datepicker-day ".concat(i?"today":""," ").concat(o?"selected":""),onClick:function(){return function(e){var n=m.getFullYear(),t=m.getMonth(),a=new Date(n,t,e,12,0,0);v(a),s(a),null==l||l()}(c)}},{children:c}),"day-".concat(c)))},k=1;c>=k;k++)h(k);var p=35-(i+c),w=function(t){e.push(r("div",n({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(m.getFullYear(),m.getMonth()+1,e,12,0,0);v(n),s(n),null==l||l()}(t)}},{children:t}),"next-".concat(t)))};for(k=1;p>=k;k++)w(k);return e}(),"months"===p&&(d=[],Array.from({length:12},function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})}).forEach(function(e,t){var a=t===m.getMonth();d.push(r("div",n({className:"st-datepicker-month ".concat(a?"selected":""),onClick:function(){return function(e){v(new Date(m.getFullYear(),e,1)),w("days")}(t)}},{children:e}),"month-".concat(t)))}),d),"years"===p&&function(){for(var e=[],t=m.getFullYear(),a=t-6,c=function(a){e.push(r("div",n({className:"st-datepicker-year ".concat(a===t?"selected":""),onClick:function(){return function(e){v(new Date(e,m.getMonth(),1)),w("months")}(a)}},{children:a}),"year-".concat(a)))},i=a;a+12>i;i++)c(i);return e}()]})),r("div",n({className:"st-datepicker-footer"},{children:r("button",n({className:"st-datepicker-today-btn",onClick:function(){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);v(n),s(n),null==l||l()}},{children:"Today"}))}))]}))};export{i as default};
2
+ //# sourceMappingURL=DatePicker-9d5825ee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker-9d5825ee.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("./index-e0379c0f.js"),e=require("react/jsx-runtime"),i=require("react"),t=function(t){var o=t.children,r=t.id,a=t.parentRef,l=t.tableRow,d=n.__rest(t,["children","id","parentRef","tableRow"]),u=n.useTableContext(),v=u.allowAnimations,f=u.isResizing,s=u.isScrolling,m=u.rowHeight,h=i.useRef(null),p=i.useRef(null),c=n.usePrevious(s),M=n.usePrevious(f),Y=i.useMemo(function(){return n.calculateBufferRowCount(m)},[m]);return i.useLayoutEffect(function(){var e,i,t,o;if(v&&h.current&&!f){var r=h.current.getBoundingClientRect(),d=p.current;if(!s)if(!c||s)if(!M||f){if(p.current=r,d){var u=r.x-d.x,C=r.y-d.y;if((Math.abs(u)>=50||Math.abs(C)>5)&&(Math.abs(u)>5||Math.abs(C)>5)){var g=n.__assign(n.__assign({},n.ANIMATION_CONFIGS.ROW_REORDER),{onComplete:function(){h.current&&(h.current.style.zIndex="",h.current.style.position="",h.current.style.top="")}}),x=null===(e=null==a?void 0:a.current)||void 0===e?void 0:e.scrollTop,q=null===(i=null==a?void 0:a.current)||void 0===i?void 0:i.clientHeight,j=null===(t=null==a?void 0:a.current)||void 0===t?void 0:t.scrollHeight;if(void 0!==x&&void 0!==q&&void 0!==j){var B=Y*(m+n.ROW_SEPARATOR_WIDTH),R=x-B,b=x+q+B,w=d.y>R&&b>d.y,A=r.y>R&&b>r.y,k=x>r.y,y=null!==(o=null==l?void 0:l.position)&&void 0!==o?o:0,z=.6*m,D=function(n,e,i){return Math.min(900,Math.max(100,100+80*Math.log10(Math.max(1,Math.min(Math.abs(n-e),Math.abs(n-i))))))};if(w&&!A&&r.y>x+q){var E=D(r.y,x,x+q);return void n.animateWithCustomCoordinates({element:h.current,options:{startY:d.y,endY:x+q+E+y%15*z*2.5+y%7*.4*m,finalY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}})}if(w&&!A&&k)return E=D(r.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:d.y,endY:x-E-y%15*z*2.5-y%7*.4*m,finalY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}});if(!w&&A&&d.y>x+q)return E=D(d.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:x+q+E+y%10*z*1,endY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}});if(!w&&A&&x>d.y)return E=D(d.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:x-E-y%10*z*1,endY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}})}n.flipElement({element:h.current,fromBounds:d,toBounds:r,finalConfig:g})}}}else p.current=r;else p.current=r}},[v,Y,f,s,a,c,M,m,null==l?void 0:l.position,l]),e.jsx("div",n.__assign({ref:h,"data-animate-id":r,id:r+""},d,{children:o}))};t.displayName="Animate",exports.Animate=t,exports.default=t;
2
- //# sourceMappingURL=Animate-b6372d93.js.map
1
+ "use strict";var n=require("./index-63f4ad95.js"),e=require("react/jsx-runtime"),i=require("react"),t=function(t){var o=t.children,r=t.id,a=t.parentRef,l=t.tableRow,d=n.__rest(t,["children","id","parentRef","tableRow"]),u=n.useTableContext(),v=u.allowAnimations,f=u.isResizing,s=u.isScrolling,m=u.rowHeight,h=i.useRef(null),p=i.useRef(null),M=n.usePrevious(s),c=n.usePrevious(f),Y=i.useMemo(function(){return n.calculateBufferRowCount(m)},[m]);return i.useLayoutEffect(function(){var e,i,t,o;if(v&&h.current&&!f){var r=h.current.getBoundingClientRect(),d=p.current;if(!s)if(!M||s)if(!c||f){if(p.current=r,d){var u=r.x-d.x,C=r.y-d.y;if((Math.abs(u)>=50||Math.abs(C)>5)&&(Math.abs(u)>5||Math.abs(C)>5)){var g=n.__assign(n.__assign({},n.ANIMATION_CONFIGS.ROW_REORDER),{onComplete:function(){h.current&&(h.current.style.zIndex="",h.current.style.position="",h.current.style.top="")}}),x=null===(e=null==a?void 0:a.current)||void 0===e?void 0:e.scrollTop,q=null===(i=null==a?void 0:a.current)||void 0===i?void 0:i.clientHeight,j=null===(t=null==a?void 0:a.current)||void 0===t?void 0:t.scrollHeight;if(void 0!==x&&void 0!==q&&void 0!==j){var B=Y*(m+n.ROW_SEPARATOR_WIDTH),R=x-B,b=x+q+B,w=d.y>R&&b>d.y,A=r.y>R&&b>r.y,k=x>r.y,y=null!==(o=null==l?void 0:l.position)&&void 0!==o?o:0,z=.6*m,D=function(n,e,i){return Math.min(900,Math.max(100,100+80*Math.log10(Math.max(1,Math.min(Math.abs(n-e),Math.abs(n-i))))))};if(w&&!A&&r.y>x+q){var E=D(r.y,x,x+q);return void n.animateWithCustomCoordinates({element:h.current,options:{startY:d.y,endY:x+q+E+y%15*z*2.5+y%7*.4*m,finalY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}})}if(w&&!A&&k)return E=D(r.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:d.y,endY:x-E-y%15*z*2.5-y%7*.4*m,finalY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}});if(!w&&A&&d.y>x+q)return E=D(d.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:x+q+E+y%10*z*1,endY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}});if(!w&&A&&x>d.y)return E=D(d.y,x,x+q),void n.animateWithCustomCoordinates({element:h.current,options:{startY:x-E-y%10*z*1,endY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}})}n.flipElement({element:h.current,fromBounds:d,toBounds:r,finalConfig:g})}}}else p.current=r;else p.current=r}},[v,Y,f,s,a,M,c,m,null==l?void 0:l.position,l]),e.jsx("div",n.__assign({ref:h,"data-animate-id":r,id:r+""},d,{children:o}))};t.displayName="Animate",exports.Animate=t,exports.default=t;
2
+ //# sourceMappingURL=Animate-18759d53.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Animate-18759d53.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./index-63f4ad95.js"),n=require("react/jsx-runtime"),t=require("react");exports.default=function(a){var r,c,i=a.onChange,d=a.onClose,s=a.value,l=e.useTableContext().icons,o=t.useState(s||new Date),u=o[0],h=o[1],f=t.useState("days"),v=f[0],k=f[1],m=function(e,n){return new Date(e,n+1,0).getDate()};return n.jsxs("div",e.__assign({className:"st-datepicker"},{children:[n.jsxs("div",e.__assign({className:"st-datepicker-header"},{children:["days"===v&&n.jsxs(n.Fragment,{children:[n.jsx("button",e.__assign({onClick:function(){h(new Date(u.getFullYear(),u.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:l.prev})),n.jsxs("div",e.__assign({className:"st-datepicker-header-label",onClick:function(){return k("months")}},{children:[(c=u,c.toLocaleString("default",{month:"long"}))," ",u.getFullYear()]})),n.jsx("button",e.__assign({onClick:function(){h(new Date(u.getFullYear(),u.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:l.next}))]}),"months"===v&&n.jsx("div",e.__assign({className:"st-datepicker-header-label",onClick:function(){return k("years")}},{children:u.getFullYear()})),"years"===v&&n.jsx("div",e.__assign({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),n.jsxs("div",e.__assign({className:"st-datepicker-grid st-datepicker-".concat(v,"-grid")},{children:["days"===v&&function(){var t=[],a=u.getFullYear(),r=u.getMonth(),c=m(a,r),l=function(e,n){return new Date(e,n,1).getDay()}(a,r),o=m(a,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach(function(a,r){t.push(n.jsx("div",e.__assign({className:"st-datepicker-weekday"},{children:a}),"header-".concat(r)))});for(var f=function(a){var r=o-l+a+1;t.push(n.jsx("div",e.__assign({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(u.getFullYear(),u.getMonth()-1,e,12,0,0);h(n),i(n),null==d||d()}(r)}},{children:r}),"prev-".concat(r)))},v=0;l>v;v++)f(v);for(var k=function(c){var l=c===(new Date).getDate()&&r===(new Date).getMonth()&&a===(new Date).getFullYear(),o=new Date(s),f=c===o.getDate()&&r===o.getMonth()&&a===o.getFullYear();t.push(n.jsx("div",e.__assign({className:"st-datepicker-day ".concat(l?"today":""," ").concat(f?"selected":""),onClick:function(){return function(e){var n=u.getFullYear(),t=u.getMonth(),a=new Date(n,t,e,12,0,0);h(a),i(a),null==d||d()}(c)}},{children:c}),"day-".concat(c)))},p=1;c>=p;p++)k(p);var w=35-(l+c),y=function(a){t.push(n.jsx("div",e.__assign({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(u.getFullYear(),u.getMonth()+1,e,12,0,0);h(n),i(n),null==d||d()}(a)}},{children:a}),"next-".concat(a)))};for(p=1;w>=p;p++)y(p);return t}(),"months"===v&&(r=[],Array.from({length:12},function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})}).forEach(function(t,a){var c=a===u.getMonth();r.push(n.jsx("div",e.__assign({className:"st-datepicker-month ".concat(c?"selected":""),onClick:function(){return function(e){h(new Date(u.getFullYear(),e,1)),k("days")}(a)}},{children:t}),"month-".concat(a)))}),r),"years"===v&&function(){for(var t=[],a=u.getFullYear(),r=a-6,c=function(r){t.push(n.jsx("div",e.__assign({className:"st-datepicker-year ".concat(r===a?"selected":""),onClick:function(){return function(e){h(new Date(e,u.getMonth(),1)),k("months")}(r)}},{children:r}),"year-".concat(r)))},i=r;r+12>i;i++)c(i);return t}()]})),n.jsx("div",e.__assign({className:"st-datepicker-footer"},{children:n.jsx("button",e.__assign({className:"st-datepicker-today-btn",onClick:function(){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);h(n),i(n),null==d||d()}},{children:"Today"}))}))]}))};
2
+ //# sourceMappingURL=DatePicker-3d0a5721.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker-3d0a5721.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -9,6 +9,7 @@ export type FlattenedHeader = {
9
9
  visualIndex: number;
10
10
  depth: number;
11
11
  parent: HeaderObject | null;
12
+ indexPath: number[];
12
13
  };
13
14
  export declare const findClosestValidSeparatorIndex: ({ flattenedHeaders, draggingRow, hoveredRowIndex, isTopHalfOfRow, }: {
14
15
  flattenedHeaders: FlattenedHeader[];
@@ -16,6 +16,7 @@ import Row from "../types/Row";
16
16
  import { LoadingStateRenderer, ErrorStateRenderer, EmptyStateRenderer } from "../types/RowStateRendererProps";
17
17
  import { HeightOffsets } from "../utils/infiniteScrollUtils";
18
18
  import { CustomTheme } from "../types/CustomTheme";
19
+ import { IconsConfig } from "../types/IconsConfig";
19
20
  export interface CellRegistryEntry {
20
21
  updateContent: (newValue: CellValue) => void;
21
22
  }
@@ -41,10 +42,8 @@ interface TableContextType {
41
42
  enableHeaderEditing?: boolean;
42
43
  enableRowSelection?: boolean;
43
44
  expandedDepths: Set<number>;
44
- dragIcon?: ReactNode;
45
- expandIcon?: ReactNode;
46
- filterIcon?: ReactNode;
47
45
  filters: TableFilterState;
46
+ icons: IconsConfig;
48
47
  includeHeadersInCSVExport: boolean;
49
48
  loadingStateRenderer?: LoadingStateRenderer;
50
49
  errorStateRenderer?: ErrorStateRenderer;
@@ -62,10 +61,8 @@ interface TableContextType {
62
61
  handleRowSelect?: (rowId: string, isSelected: boolean) => void;
63
62
  handleSelectAll?: (isSelected: boolean) => void;
64
63
  handleToggleRow?: (rowId: string) => void;
65
- headerCollapseIcon?: ReactNode;
66
64
  headerContainerRef: RefObject<HTMLDivElement>;
67
65
  headerDropdown?: HeaderDropdown;
68
- headerExpandIcon?: ReactNode;
69
66
  headerRegistry?: Map<string, HeaderRegistryEntry>;
70
67
  headers: HeaderObject[];
71
68
  heightOffsets?: HeightOffsets;
@@ -81,7 +78,6 @@ interface TableContextType {
81
78
  isSelected: (cell: Cell) => boolean;
82
79
  isWarningFlashing: (cell: Cell) => boolean;
83
80
  mainBodyRef: RefObject<HTMLDivElement>;
84
- nextIcon: ReactNode;
85
81
  onCellEdit?: (props: any) => void;
86
82
  onCellClick?: (props: CellClickProps) => void;
87
83
  onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
@@ -94,7 +90,6 @@ interface TableContextType {
94
90
  onTableHeaderDragEnd: (newHeaders: HeaderObject[]) => void;
95
91
  pinnedLeftRef: RefObject<HTMLDivElement>;
96
92
  pinnedRightRef: RefObject<HTMLDivElement>;
97
- prevIcon: ReactNode;
98
93
  rowButtons?: RowButton[];
99
94
  rowGrouping?: Accessor[];
100
95
  rowHeight: number;
@@ -121,8 +116,6 @@ interface TableContextType {
121
116
  setExpandedRows: Dispatch<SetStateAction<Map<string, number>>>;
122
117
  setCollapsedRows: Dispatch<SetStateAction<Map<string, number>>>;
123
118
  shouldPaginate: boolean;
124
- sortDownIcon: ReactNode;
125
- sortUpIcon: ReactNode;
126
119
  tableBodyContainerRef: RefObject<HTMLDivElement>;
127
120
  tableEmptyStateRenderer?: ReactNode;
128
121
  tableRows: TableRow[];
@@ -6,7 +6,11 @@ export declare function swapHeaders(headers: HeaderObject[], draggedPath: number
6
6
  newHeaders: HeaderObject[];
7
7
  emergencyBreak: boolean;
8
8
  };
9
- export declare function insertHeaderAcrossSections(headers: HeaderObject[], draggedHeader: HeaderObject, hoveredHeader: HeaderObject): {
9
+ export declare function insertHeaderAcrossSections({ headers, draggedHeader, hoveredHeader, }: {
10
+ headers: HeaderObject[];
11
+ draggedHeader: HeaderObject;
12
+ hoveredHeader: HeaderObject;
13
+ }): {
10
14
  newHeaders: HeaderObject[];
11
15
  emergencyBreak: boolean;
12
16
  };
@@ -0,0 +1,14 @@
1
+ import { QuickFilterConfig } from "../types/QuickFilterTypes";
2
+ import Row from "../types/Row";
3
+ import HeaderObject from "../types/HeaderObject";
4
+ interface UseQuickFilterProps {
5
+ rows: Row[];
6
+ headers: HeaderObject[];
7
+ quickFilter?: QuickFilterConfig;
8
+ }
9
+ /**
10
+ * Hook to filter rows based on quick filter configuration
11
+ * Supports both simple (contains) and smart (multi-word, phrases, negation, column-specific) modes
12
+ */
13
+ declare const useQuickFilter: ({ rows, headers, quickFilter }: UseQuickFilterProps) => Row[];
14
+ export default useQuickFilter;
@@ -6,7 +6,8 @@ import TableRow from "../types/TableRow";
6
6
  import HeaderObject from "../types/HeaderObject";
7
7
  import { TableFilterState, FilterCondition } from "../types/FilterTypes";
8
8
  import { SortDirection } from "../types/SortColumn";
9
- declare const useTableAPI: ({ cellRegistryRef, clearAllFilters, clearFilter, currentPage, editColumns, expandedDepths, filters, flattenedRows, headerRegistryRef, headers, includeHeadersInCSVExport, onColumnVisibilityChange, onPageChange, paginatableRows, rowGrouping, rowIndexMap, rows, rowsPerPage, serverSidePagination, setCollapsedRows, setColumnEditorOpen, setCurrentPage, setExpandedDepths, setExpandedRows, setHeaders, setRows, shouldPaginate, sort, tableRef, totalRowCount, updateFilter, updateSort, visibleRows, }: {
9
+ import { QuickFilterConfig } from "../types/QuickFilterTypes";
10
+ declare const useTableAPI: ({ cellRegistryRef, clearAllFilters, clearFilter, currentPage, editColumns, expandedDepths, filters, flattenedRows, headerRegistryRef, headers, includeHeadersInCSVExport, onColumnVisibilityChange, onPageChange, paginatableRows, quickFilter, rowGrouping, rowIndexMap, rows, rowsPerPage, serverSidePagination, setCollapsedRows, setColumnEditorOpen, setCurrentPage, setExpandedDepths, setExpandedRows, setHeaders, setRows, shouldPaginate, sort, tableRef, totalRowCount, updateFilter, updateSort, visibleRows, }: {
10
11
  cellRegistryRef: MutableRefObject<Map<string, CellRegistryEntry>>;
11
12
  clearAllFilters: () => void;
12
13
  clearFilter: (accessor: Accessor) => void;
@@ -21,6 +22,7 @@ declare const useTableAPI: ({ cellRegistryRef, clearAllFilters, clearFilter, cur
21
22
  onColumnVisibilityChange?: ((visibilityState: Record<string, boolean>) => void) | undefined;
22
23
  onPageChange?: ((page: number) => void | Promise<void>) | undefined;
23
24
  paginatableRows: TableRow[];
25
+ quickFilter?: QuickFilterConfig | undefined;
24
26
  rowGrouping?: string[] | undefined;
25
27
  rowIndexMap: MutableRefObject<Map<string | number, number>>;
26
28
  rows: Row[];