simple-table-core 1.2.3 → 1.2.5
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/components/animate/Animate.d.ts +2 -2
- package/dist/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/scroll-sync/ScrollSyncPane.d.ts +2 -2
- package/dist/components/simple-table/SimpleTable.d.ts +3 -3
- package/dist/components/simple-table/TableContent.d.ts +1 -1
- package/dist/components/simple-table/TableHeaderCell.d.ts +1 -1
- package/dist/components/simple-table/TableHorizontalScrollbar.d.ts +2 -2
- package/dist/components/simple-table/TableSection.d.ts +2 -3
- package/dist/context/TableContext.d.ts +8 -8
- package/dist/hooks/useExternalSort.d.ts +1 -1
- package/dist/hooks/useScrollbarWidth.d.ts +2 -2
- package/dist/hooks/useSortableData.d.ts +1 -1
- package/dist/hooks/useTableAPI.d.ts +3 -3
- package/dist/hooks/useWindowResize.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/DragHandlerProps.d.ts +3 -3
- package/dist/types/HandleResizeStartProps.d.ts +3 -3
- package/dist/types/SharedTableProps.d.ts +9 -9
- package/dist/types/SortColumn.d.ts +6 -0
- package/dist/types/TableHeaderProps.d.ts +2 -2
- package/dist/types/TableHeaderSectionProps.d.ts +2 -2
- package/dist/types/TableRowProps.d.ts +4 -4
- package/dist/utils/refUtils.d.ts +7 -0
- package/dist/utils/sortUtils.d.ts +1 -1
- package/package.json +1 -2
- package/dist/types/SortConfig.d.ts +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MutableRefObject } from "react";
|
|
2
2
|
import CellChangeProps from "./CellChangeProps";
|
|
3
3
|
import HeaderObject from "./HeaderObject";
|
|
4
4
|
import Row from "./Row";
|
|
@@ -8,12 +8,12 @@ type TableRowProps = {
|
|
|
8
8
|
currentRows: {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
}[];
|
|
11
|
-
draggedHeaderRef:
|
|
11
|
+
draggedHeaderRef: MutableRefObject<HeaderObject | null>;
|
|
12
12
|
getBorderClass: (rowIndex: number, columnIndex: number) => string;
|
|
13
13
|
handleMouseDown: (props: Cell) => void;
|
|
14
14
|
handleMouseOver: (rowIndex: number, columnIndex: number) => void;
|
|
15
15
|
headers: HeaderObject[];
|
|
16
|
-
hoveredHeaderRef:
|
|
16
|
+
hoveredHeaderRef: MutableRefObject<HeaderObject | null>;
|
|
17
17
|
isSelected: (rowIndex: number, columnIndex: number) => boolean;
|
|
18
18
|
isInitialFocusedCell: (rowIndex: number, columnIndex: number) => boolean;
|
|
19
19
|
onCellEdit?: (props: CellChangeProps) => void;
|
|
@@ -22,6 +22,6 @@ type TableRowProps = {
|
|
|
22
22
|
row: Row;
|
|
23
23
|
rowIndex: number;
|
|
24
24
|
shouldPaginate: boolean;
|
|
25
|
-
tableRef:
|
|
25
|
+
tableRef: MutableRefObject<HTMLDivElement | null>;
|
|
26
26
|
};
|
|
27
27
|
export default TableRowProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Merges multiple refs into a single ref callback
|
|
4
|
+
* Handles both callback refs and ref objects
|
|
5
|
+
* React 18 compatible
|
|
6
|
+
*/
|
|
7
|
+
export declare const mergeRefs: <T = any>(...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined)[]) => (value: T) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import HeaderObject from "../types/HeaderObject";
|
|
2
|
-
import { SortColumn } from "../types/SortConfig";
|
|
3
2
|
import Row from "../types/Row";
|
|
3
|
+
import SortColumn from "../types/SortColumn";
|
|
4
4
|
export declare const handleSort: ({ headers, rows, sortColumn, }: {
|
|
5
5
|
headers: HeaderObject[];
|
|
6
6
|
rows: Row[];
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.5",
|
|
3
3
|
"main": "dist/index.js",
|
|
4
4
|
"module": "dist/index.es.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"@storybook/test": "^8.4.1",
|
|
45
45
|
"@storybook/test-runner": "^0.23.0",
|
|
46
46
|
"@types/node": "^16.18.111",
|
|
47
|
-
"@types/react": "^19.0.0",
|
|
48
47
|
"chromatic": "^13.0.1",
|
|
49
48
|
"cssnano": "^7.0.6",
|
|
50
49
|
"eslint-plugin-storybook": "^0.9.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import HeaderObject from "./HeaderObject";
|
|
2
|
-
export type SortColumn = {
|
|
3
|
-
key: HeaderObject;
|
|
4
|
-
direction: "ascending" | "descending";
|
|
5
|
-
};
|
|
6
|
-
type SortConfig = {
|
|
7
|
-
previous: SortColumn | null;
|
|
8
|
-
current: SortColumn | null;
|
|
9
|
-
next: SortColumn | null;
|
|
10
|
-
};
|
|
11
|
-
export default SortConfig;
|