@majoo-ui/react 1.46.0 → 1.46.2-rc.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/components/table/MobileTable.d.ts +2 -0
- package/components/table/Table.d.ts +16 -2
- package/hooks/index.d.ts +2 -0
- package/hooks/{useListOption.d.ts → useListOption/useListOption.d.ts} +0 -0
- package/hooks/useToggle/useToggle.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1430 -188
- package/index.umd.js +1437 -194
- package/package.json +3 -2
- package/utils/request.d.ts +9 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CSS } from '../../config/stitches.config';
|
|
3
|
+
import { RowGroup } from './Table';
|
|
3
4
|
import { TableInstance } from 'react-table';
|
|
4
5
|
interface MobileTableProps {
|
|
5
6
|
instance: TableInstance<object>;
|
|
@@ -9,6 +10,7 @@ interface MobileTableProps {
|
|
|
9
10
|
infiniteScrollWrapper: (children: JSX.Element) => JSX.Element;
|
|
10
11
|
isLoading: boolean;
|
|
11
12
|
emptyDataMessage?: string;
|
|
13
|
+
rowGroup?: RowGroup;
|
|
12
14
|
css?: CSS;
|
|
13
15
|
}
|
|
14
16
|
declare const MobileTable: React.ForwardRefExoticComponent<MobileTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CellProps } from 'react-table';
|
|
2
|
+
import { CellProps, Row } from 'react-table';
|
|
3
3
|
import { CSS } from '../../config/stitches.config';
|
|
4
4
|
export declare const TableContent: import("@stitches/react/types/styled-component").StyledComponent<"table", {}, {
|
|
5
5
|
sm: "(min-width: 359px)";
|
|
@@ -884,6 +884,10 @@ interface FetchDataParams {
|
|
|
884
884
|
sortAccessor?: string;
|
|
885
885
|
sortDirection?: string;
|
|
886
886
|
}
|
|
887
|
+
export interface RowGroup {
|
|
888
|
+
groupKey: string;
|
|
889
|
+
headerRender?: (row: Row<object>) => React.ReactNode;
|
|
890
|
+
}
|
|
887
891
|
export interface TableProps {
|
|
888
892
|
/**
|
|
889
893
|
* The data array that you want to display on the table.
|
|
@@ -962,8 +966,18 @@ export interface TableProps {
|
|
|
962
966
|
* }
|
|
963
967
|
*/
|
|
964
968
|
selectedIds?: Record<string, boolean>;
|
|
969
|
+
/**
|
|
970
|
+
* Define row grouping config.<br/>
|
|
971
|
+
* interface RowGroup { <br/>
|
|
972
|
+
* (define the child key of parent object)<br/>
|
|
973
|
+
* groupKey?: number;<br/>
|
|
974
|
+
* (define the header node)<br/>
|
|
975
|
+
* headerRender?: (row: Row) => React.ReactNode;<br/>
|
|
976
|
+
* }
|
|
977
|
+
*/
|
|
978
|
+
rowGroup?: RowGroup;
|
|
965
979
|
}
|
|
966
|
-
export declare function Table({ columns, data, keyId, pageIndex: controlledPageIndex, totalData, fetchData, hideDataInfo, emptyDataMessage, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, }: TableProps): JSX.Element;
|
|
980
|
+
export declare function Table({ columns, data, keyId, pageIndex: controlledPageIndex, totalData, fetchData, hideDataInfo, emptyDataMessage, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, }: TableProps): JSX.Element;
|
|
967
981
|
export interface TableColumnProps {
|
|
968
982
|
/**
|
|
969
983
|
* Required if accessor is a function<br/>
|
package/hooks/index.d.ts
ADDED
|
File without changes
|
package/index.d.ts
CHANGED