ehscan-react-table 0.0.8 → 0.0.10
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.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Table } from './elements/Table';
|
|
2
2
|
export { Pagination } from './elements/Pagination';
|
|
3
|
+
export { TableCellSelect } from './elements/TableCellSelect';
|
|
4
|
+
export { TableDefCell } from './elements/TableDefCell';
|
|
3
5
|
export { useSortOrder } from './elements/SortOrderUtils';
|
|
4
6
|
export { sortRows } from './elements/SortOrderUtils';
|
|
5
7
|
export type { SortOrder } from './elements/SortOrderUtils';
|
package/dist/Components.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// ehscan-react-table entry
|
|
2
2
|
export { Table } from './elements/Table';
|
|
3
3
|
export { Pagination } from './elements/Pagination';
|
|
4
|
+
export { TableCellSelect } from './elements/TableCellSelect';
|
|
5
|
+
export { TableDefCell } from './elements/TableDefCell';
|
|
4
6
|
export { useSortOrder } from './elements/SortOrderUtils';
|
|
5
7
|
export { sortRows } from './elements/SortOrderUtils';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import TableChecklistItem from "./TableChecklistItem";
|
|
3
|
-
const TableCellSelect = ({ rowIndex, checked, selectRow }) => {
|
|
3
|
+
export const TableCellSelect = ({ rowIndex, checked, selectRow }) => {
|
|
4
4
|
const checkClick = (event) => {
|
|
5
5
|
const shift = event.shiftKey;
|
|
6
6
|
selectRow({ rowIndex, checked: !checked }, shift);
|
|
7
7
|
};
|
|
8
8
|
return (_jsx(_Fragment, { children: _jsx("div", { onClick: (e) => { e.stopPropagation(); checkClick(e); }, children: _jsx(TableChecklistItem, { checked: checked !== null && checked !== void 0 ? checked : false }) }) }));
|
|
9
9
|
};
|
|
10
|
-
export default TableCellSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
type TableDefCellProps = {
|
|
3
|
+
content: ReactNode;
|
|
4
|
+
id: string | number;
|
|
5
|
+
col: string | number;
|
|
6
|
+
clickRow: (args: {
|
|
7
|
+
id: string | number;
|
|
8
|
+
col: string | number;
|
|
9
|
+
type: 'default';
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const TableDefCell: React.FC<TableDefCellProps>;
|
|
13
|
+
export {};
|