hplx-react-elements-dev 1.2.21 → 1.2.23
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/esm/datePicker/DatePicker.d.ts +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/reusableTable/ReusableTable.d.ts +4 -0
- package/dist/esm/reusableTable/ReusableTableTypes.d.ts +50 -0
- package/dist/esm/reusableTable/components/Pagination.d.ts +14 -0
- package/dist/esm/reusableTable/components/TableBody.d.ts +3 -0
- package/dist/esm/reusableTable/components/TableCell.d.ts +4 -0
- package/dist/esm/reusableTable/components/TableHead.d.ts +3 -0
- package/dist/esm/reusableTable/components/TableMain.d.ts +3 -0
- package/dist/esm/reusableTable/components/TableRow.d.ts +4 -0
- package/dist/esm/reusableTable/context/TableContext.d.ts +24 -0
- package/dist/esm/timePicker/TimePicker.d.ts +14 -0
- package/dist/esm/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const PinnableValues: {
|
|
3
|
+
readonly Left: "left";
|
|
4
|
+
readonly Right: "right";
|
|
5
|
+
};
|
|
6
|
+
export interface ReusableTableProps {
|
|
7
|
+
tableRef?: React.MutableRefObject<null>;
|
|
8
|
+
columns: ITableColDef[];
|
|
9
|
+
tableName: string;
|
|
10
|
+
rows: Array<object>;
|
|
11
|
+
totalRowsLength?: number;
|
|
12
|
+
curentPageRowCount?: number;
|
|
13
|
+
showPagination?: boolean;
|
|
14
|
+
activePage?: number;
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
totalPages?: number;
|
|
17
|
+
onPaginationClick?: ((activePage: number) => void) | undefined;
|
|
18
|
+
displayHeaderName?: string;
|
|
19
|
+
tableClassesToOverride?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ITableColDef {
|
|
22
|
+
field: string;
|
|
23
|
+
headerClasses?: string;
|
|
24
|
+
cellClasses?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
fieldHeaderName: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
maxWidth?: number;
|
|
29
|
+
minWidth?: number;
|
|
30
|
+
pinned?: typeof PinnableValues[keyof typeof PinnableValues];
|
|
31
|
+
truncateCell?: boolean;
|
|
32
|
+
renderCell?: (value: unknown, row: object, column: ITableColDef, rowIndex: number) => React.ReactNode;
|
|
33
|
+
renderHeader?: (params: any) => React.ReactNode;
|
|
34
|
+
valueFormatter?: (value: unknown, row: object, column: ITableColDef, rowIndex: number) => React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export interface ITableCellProps {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
isHeaderCell?: boolean;
|
|
39
|
+
column: ITableColDef;
|
|
40
|
+
colIndex: number;
|
|
41
|
+
rowIndex?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ITableRowProps {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
isHeaderRow: boolean;
|
|
46
|
+
classes?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ITableHeadProps {
|
|
49
|
+
columns: ITableColDef[];
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IPaginationProps {
|
|
3
|
+
activePage: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
currentPageRowCount: number;
|
|
6
|
+
totalRecords: number;
|
|
7
|
+
totalPages: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const PaginationClickTypes: {
|
|
10
|
+
NEXT_PAGE: string;
|
|
11
|
+
PREV_PAGE: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Pagination: () => JSX.Element;
|
|
14
|
+
export default Pagination;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITableColDef } from '../ReusableTableTypes';
|
|
3
|
+
import { IPaginationProps } from '../components/Pagination';
|
|
4
|
+
interface TableContextProps {
|
|
5
|
+
rowsData: Array<object>;
|
|
6
|
+
allColumns: ITableColDef[];
|
|
7
|
+
leftPinnedColumns: ITableColDef[];
|
|
8
|
+
rightPinnedColumns: ITableColDef[];
|
|
9
|
+
nonPinnedColumns: ITableColDef[];
|
|
10
|
+
setRowsData: React.Dispatch<React.SetStateAction<object[]>>;
|
|
11
|
+
setAllColumns: React.Dispatch<React.SetStateAction<ITableColDef[]>>;
|
|
12
|
+
paginationState: IPaginationProps;
|
|
13
|
+
setPaginationState: React.Dispatch<React.SetStateAction<IPaginationProps>>;
|
|
14
|
+
onPaginationClick: ((activePage: number) => void) | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const useTableContext: () => TableContextProps;
|
|
17
|
+
export declare const TableProvider: ({ children, initialColumns, rowData, paginationProps, onPaginationClick }: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
initialColumns: Array<ITableColDef>;
|
|
20
|
+
rowData: Array<object>;
|
|
21
|
+
paginationProps: IPaginationProps;
|
|
22
|
+
onPaginationClick: ((activePage: number) => void) | undefined;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const PERIOD_TYPES: {
|
|
3
|
+
AM: string;
|
|
4
|
+
PM: string;
|
|
5
|
+
};
|
|
6
|
+
interface TimePickerProps {
|
|
7
|
+
maxHours?: number;
|
|
8
|
+
minHours?: number;
|
|
9
|
+
timeOptionsStepper?: number;
|
|
10
|
+
value: string;
|
|
11
|
+
onChange: (newTime: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const TimePicker: React.FC<TimePickerProps>;
|
|
14
|
+
export default TimePicker;
|
package/dist/esm/types.d.ts
CHANGED