simple-table-core 2.4.9 → 2.5.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.
- package/dist/{Animate-83698811.js → Animate-32f9714e.js} +2 -2
- package/dist/Animate-32f9714e.js.map +1 -0
- package/dist/{DatePicker-351b14f7.js → DatePicker-bec3f874.js} +2 -2
- package/dist/DatePicker-bec3f874.js.map +1 -0
- package/dist/cjs/Animate-e560c8e0.js +2 -0
- package/dist/cjs/Animate-e560c8e0.js.map +1 -0
- package/dist/cjs/{DatePicker-f688bd14.js → DatePicker-5dcafd59.js} +2 -2
- package/dist/cjs/DatePicker-5dcafd59.js.map +1 -0
- package/dist/cjs/{index-6e0768e6.js → index-822400eb.js} +2 -2
- package/dist/cjs/index-822400eb.js.map +1 -0
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/ColumnEditorRowRendererProps.d.ts +16 -0
- package/dist/cjs/types/HeaderObject.d.ts +2 -0
- package/dist/{index-97894266.js → index-37ad9116.js} +2 -2
- package/dist/index-37ad9116.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +1 -1
- package/dist/types/ColumnEditorRowRendererProps.d.ts +16 -0
- package/dist/types/HeaderObject.d.ts +2 -0
- package/package.json +1 -1
- package/dist/Animate-83698811.js.map +0 -1
- package/dist/DatePicker-351b14f7.js.map +0 -1
- package/dist/cjs/Animate-602f9788.js +0 -2
- package/dist/cjs/Animate-602f9788.js.map +0 -1
- package/dist/cjs/DatePicker-f688bd14.js.map +0 -1
- package/dist/cjs/index-6e0768e6.js.map +0 -1
- package/dist/index-97894266.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-37ad9116.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import RowSelectionChangeProps from "./types/RowSelectionChangeProps";
|
|
|
28
28
|
import CellClickProps from "./types/CellClickProps";
|
|
29
29
|
import CellRendererProps, { CellRenderer } from "./types/CellRendererProps";
|
|
30
30
|
import HeaderRendererProps, { HeaderRenderer, HeaderRendererComponents } from "./types/HeaderRendererProps";
|
|
31
|
+
import ColumnEditorRowRendererProps, { ColumnEditorRowRenderer, ColumnEditorRowRendererComponents } from "./types/ColumnEditorRowRendererProps";
|
|
31
32
|
import HeaderDropdownProps, { HeaderDropdown } from "./types/HeaderDropdownProps";
|
|
32
33
|
import { RowButtonProps } from "./types/RowButton";
|
|
33
34
|
import FooterRendererProps from "./types/FooterRendererProps";
|
|
@@ -38,4 +39,4 @@ import { IconsConfig } from "./types/IconsConfig";
|
|
|
38
39
|
import { GetRowId, GetRowIdParams } from "./types/GetRowId";
|
|
39
40
|
export { SimpleTable, LineAreaChart, BarChart };
|
|
40
41
|
export * from "./icons";
|
|
41
|
-
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, HeaderRendererComponents, OnRowGroupExpandProps, OnSortProps, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, Row, RowButtonProps, RowSelectionChangeProps, RowState, SetHeaderRenameProps, SharedTableProps, ShowWhen, SortColumn, TableCellProps, TableFilterState, TableHeaderProps, TableRefType, TableRowProps, Theme, UpdateDataProps, ValueFormatter, ValueFormatterProps, ValueGetter, ValueGetterProps, };
|
|
42
|
+
export type { Accessor, AggregationConfig, AggregationType, BoundingBox, Cell, CellChangeProps, CellClickProps, CellRenderer, CellRendererProps, CellValue, ChartOptions, ColumnEditorConfig, ColumnEditorRowRenderer, ColumnEditorRowRendererComponents, ColumnEditorRowRendererProps, ColumnEditorSearchFunction, ColumnType, ColumnVisibilityState, Comparator, ComparatorProps, CustomTheme, DragHandlerProps, EmptyStateRenderer, EmptyStateRendererProps, EnumOption, ErrorStateRenderer, ErrorStateRendererProps, ExportToCSVProps, ExportValueGetter, ExportValueProps, FilterCondition, FooterRendererProps, GetRowId, GetRowIdParams, IconsConfig, LoadingStateRenderer, LoadingStateRendererProps, HeaderDropdown, HeaderDropdownProps, HeaderObject, HeaderRenderer, HeaderRendererProps, HeaderRendererComponents, OnRowGroupExpandProps, OnSortProps, QuickFilterConfig, QuickFilterGetter, QuickFilterGetterProps, QuickFilterMode, 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 DescIcon,k as DragIcon,F as FilterIcon,L as LineAreaChart,l as SelectIcon,S as SimpleTable}from"./index-
|
|
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 DescIcon,k as DragIcon,F as FilterIcon,L as LineAreaChart,l as SelectIcon,S as SimpleTable}from"./index-37ad9116.js";import"react/jsx-runtime";import"react";
|
|
2
2
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import type { Accessor } from "./HeaderObject";
|
|
3
|
+
import type HeaderObject from "./HeaderObject";
|
|
4
|
+
export interface ColumnEditorRowRendererComponents {
|
|
5
|
+
expandIcon?: ReactNode;
|
|
6
|
+
checkbox?: ReactNode;
|
|
7
|
+
dragIcon?: ReactNode;
|
|
8
|
+
labelContent?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
interface ColumnEditorRowRendererProps {
|
|
11
|
+
accessor: Accessor;
|
|
12
|
+
header: HeaderObject;
|
|
13
|
+
components?: ColumnEditorRowRendererComponents;
|
|
14
|
+
}
|
|
15
|
+
export type ColumnEditorRowRenderer = (props: ColumnEditorRowRendererProps) => ReactNode | string;
|
|
16
|
+
export default ColumnEditorRowRendererProps;
|
|
@@ -4,6 +4,7 @@ import EnumOption from "./EnumOption";
|
|
|
4
4
|
import { AggregationConfig } from "./AggregationTypes";
|
|
5
5
|
import { CellRenderer } from "./CellRendererProps";
|
|
6
6
|
import { HeaderRenderer } from "./HeaderRendererProps";
|
|
7
|
+
import { ColumnEditorRowRenderer } from "./ColumnEditorRowRendererProps";
|
|
7
8
|
import CellValue from "./CellValue";
|
|
8
9
|
import { SimpleTableProps } from "./SimpleTableProps";
|
|
9
10
|
import { QuickFilterGetter } from "./QuickFilterTypes";
|
|
@@ -62,6 +63,7 @@ type HeaderObject = {
|
|
|
62
63
|
children?: HeaderObject[];
|
|
63
64
|
collapsible?: boolean;
|
|
64
65
|
collapseDefault?: boolean;
|
|
66
|
+
columnEditorRowRenderer?: ColumnEditorRowRenderer;
|
|
65
67
|
comparator?: Comparator;
|
|
66
68
|
disableReorder?: boolean;
|
|
67
69
|
enumOptions?: EnumOption[];
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Animate-83698811.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker-351b14f7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./index-6e0768e6.js"),n=require("react/jsx-runtime"),i=require("react"),t=function(t){var o=t.children,r=t.id,a=t.parentRef,l=t.tableRow,d=e.__rest(t,["children","id","parentRef","tableRow"]),u=e.useTableContext(),v=u.allowAnimations,f=u.isResizing,s=u.isScrolling,m=u.rowHeight,h=i.useRef(null),p=i.useRef(null),M=e.usePrevious(s),c=e.usePrevious(f),Y=i.useMemo(function(){return e.calculateBufferRowCount(m)},[m]);return i.useLayoutEffect(function(){var n,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=e.__assign(e.__assign({},e.ANIMATION_CONFIGS.ROW_REORDER),{onComplete:function(){h.current&&(h.current.style.zIndex="",h.current.style.position="",h.current.style.top="")}}),x=null===(n=null==a?void 0:a.current)||void 0===n?void 0:n.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+e.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(e,n,i){return Math.min(900,Math.max(100,100+80*Math.log10(Math.max(1,Math.min(Math.abs(e-n),Math.abs(e-i))))))};if(w&&!A&&r.y>x+q){var E=D(r.y,x,x+q);return void e.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 e.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 e.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 e.animateWithCustomCoordinates({element:h.current,options:{startY:x-E-y%10*z*1,endY:r.y,duration:g.duration,easing:g.easing,onComplete:g.onComplete}})}e.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]),n.jsx("div",e.__assign({ref:h,"data-animate-id":r,id:r+""},d,{children:o}))};t.displayName="Animate",exports.Animate=t,exports.default=t;
|
|
2
|
-
//# sourceMappingURL=Animate-602f9788.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Animate-602f9788.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker-f688bd14.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-6e0768e6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-97894266.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|