simple-table-core 2.0.6 → 2.0.8

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-3ee6f1b1.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -27,11 +27,11 @@ import { FilterCondition, TableFilterState } from "./types/FilterTypes";
27
27
  import RowSelectionChangeProps from "./types/RowSelectionChangeProps";
28
28
  import CellClickProps from "./types/CellClickProps";
29
29
  import CellRendererProps, { CellRenderer } from "./types/CellRendererProps";
30
- import HeaderRendererProps, { HeaderRenderer } from "./types/HeaderRendererProps";
30
+ import HeaderRendererProps, { HeaderRenderer, HeaderRendererComponents } from "./types/HeaderRendererProps";
31
31
  import HeaderDropdownProps, { HeaderDropdown } from "./types/HeaderDropdownProps";
32
32
  import { RowButtonProps } from "./types/RowButton";
33
33
  import FooterRendererProps from "./types/FooterRendererProps";
34
34
  import { LoadingStateRenderer, ErrorStateRenderer, EmptyStateRenderer, LoadingStateRendererProps, ErrorStateRendererProps, EmptyStateRendererProps } from "./types/RowStateRendererProps";
35
35
  export { SimpleTable, LineAreaChart, BarChart, DefaultEmptyState };
36
36
  export * from "./icons";
37
- export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorPosition, ColumnType, Comparator, ComparatorProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, OnRowGroupExpandProps, OnSortProps, Row, RowButtonProps, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SortColumn, TableCellProps, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, };
37
+ export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorPosition, ColumnType, Comparator, ComparatorProps, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, HeaderRendererComponents, OnRowGroupExpandProps, OnSortProps, Row, RowButtonProps, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SortColumn, TableCellProps, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, };
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-1c9ecfde.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-3ee6f1b1.js";import"react/jsx-runtime";import"react";
2
2
  //# sourceMappingURL=index.es.js.map
@@ -1,10 +1,17 @@
1
1
  import { ReactNode } from "react";
2
2
  import type { Accessor } from "./HeaderObject";
3
3
  import type HeaderObject from "./HeaderObject";
4
+ export interface HeaderRendererComponents {
5
+ sortIcon?: ReactNode;
6
+ filterIcon?: ReactNode;
7
+ collapseIcon?: ReactNode;
8
+ labelContent?: ReactNode;
9
+ }
4
10
  interface HeaderRendererProps {
5
11
  accessor: Accessor;
6
12
  colIndex: number;
7
13
  header: HeaderObject;
14
+ components?: HeaderRendererComponents;
8
15
  }
9
16
  export type HeaderRenderer = (props: HeaderRendererProps) => ReactNode | string;
10
17
  export default HeaderRendererProps;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.6",
2
+ "version": "2.0.8",
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 e,b as o,A as a,d as r,f as l,R as d}from"./index-1c9ecfde.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-24343a1f.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Animate-24343a1f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker-e3d4002e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Animate-0b6a0081.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker-61718852.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-aaa9b53c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-1c9ecfde.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}