simple-table-core 2.0.0 → 2.0.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-fc4a02fe.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- export{e as AngleDownIcon,g as AngleLeftIcon,h as AngleRightIcon,i as AngleUpIcon,j as AscIcon,B as BarChart,C as CheckIcon,D as DefaultEmptyState,k as DescIcon,F as FilterIcon,L as LineAreaChart,l as SelectIcon,S as SimpleTable}from"./index-74614bb2.js";import"react/jsx-runtime";import"react";
1
+ export{e as AngleDownIcon,g as AngleLeftIcon,h as AngleRightIcon,i as AngleUpIcon,j as AscIcon,B as BarChart,C as CheckIcon,D as DefaultEmptyState,k as DescIcon,F as FilterIcon,L as LineAreaChart,l as SelectIcon,S as SimpleTable}from"./index-fc4a02fe.js";import"react/jsx-runtime";import"react";
2
2
  //# sourceMappingURL=index.es.js.map
@@ -22,7 +22,10 @@ type TableRefType = {
22
22
  /** Returns the current sort state */
23
23
  getSortState: () => SortColumn | null;
24
24
  /** Applies a new sort state to the table. Pass null to clear sort. Direction defaults to cycling through asc -> desc -> null */
25
- applySortState: (accessor: Accessor | null, direction?: SortDirection) => Promise<void>;
25
+ applySortState: (props?: {
26
+ accessor: Accessor;
27
+ direction?: SortDirection;
28
+ }) => Promise<void>;
26
29
  /** Returns the current filter state */
27
30
  getFilterState: () => TableFilterState;
28
31
  /** Applies a filter to a specific column */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "2.0.1",
3
3
  "main": "dist/cjs/index.js",
4
4
  "module": "dist/index.es.js",
5
5
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
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-74614bb2.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,b=C.isResizing,x=C.isScrolling,R=C.rowHeight,j=f(null),A=f(null),B=t(x),w=t(b),_=s(function(){return o(R)},[R]);return v(function(){var n,i,t,o;if(g&&j.current&&!b){var u=j.current.getBoundingClientRect(),f=A.current;if(!x)if(!B||x)if(!w||b){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=_*(R+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*R,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*R,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*R,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,_,b,x,M,B,w,R,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-af1cbe73.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Animate-af1cbe73.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker-b87fba0b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Animate-ca94ec13.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker-20646e7b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-fc6a62ca.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-74614bb2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}