hplx-react-elements-dev 1.2.32 → 1.2.34
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/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/inputTag/InputTagWithCursorPosition.d.ts +4 -0
- package/dist/esm/reusableTable/ReusableTable.d.ts +1 -1
- package/dist/esm/reusableTable/ReusableTableTypes.d.ts +10 -11
- package/dist/esm/reusableTable/components/TableCell.d.ts +1 -1
- package/dist/esm/reusableTable/components/TableHead.d.ts +1 -1
- package/dist/esm/reusableTable/context/TableContext.d.ts +12 -12
- package/package.json +1 -1
- package/dist/esm/inputTag/InputTag1.d.ts +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputTagProps } from "../types";
|
|
3
|
+
declare const InputTagWithCursorPosition: ({ inputProps, className, dropdownClassName, options, tagList, tagString, tagClassName, handleValChange, onDropdownClick, allowDuplicates, getInputValue, shouldModifyTextCase, isScrollUp, elemID, }: InputTagProps) => JSX.Element;
|
|
4
|
+
export default InputTagWithCursorPosition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ReusableTableProps } from "./ReusableTableTypes";
|
|
3
|
-
declare const ReusableTable: (props: ReusableTableProps) => JSX.Element;
|
|
3
|
+
declare const ReusableTable: <T>(props: ReusableTableProps<T>) => JSX.Element;
|
|
4
4
|
export default ReusableTable;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export interface ReusableTableProps {
|
|
2
|
+
export interface ReusableTableProps<T> {
|
|
3
3
|
tableRef?: React.MutableRefObject<null>;
|
|
4
|
-
columns: ITableColDef[];
|
|
4
|
+
columns: ITableColDef<T>[];
|
|
5
5
|
tableName: string;
|
|
6
|
-
rows: Array<
|
|
6
|
+
rows: Array<T>;
|
|
7
7
|
totalRowsLength?: number;
|
|
8
8
|
curentPageRowCount?: number;
|
|
9
9
|
showPagination?: boolean;
|
|
@@ -17,7 +17,7 @@ export interface ReusableTableProps {
|
|
|
17
17
|
tableBodyClassesToOverride?: string;
|
|
18
18
|
hideHeader?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export interface ITableColDef {
|
|
20
|
+
export interface ITableColDef<T> {
|
|
21
21
|
field: string;
|
|
22
22
|
headerCellClasses?: string;
|
|
23
23
|
cellClasses?: string;
|
|
@@ -27,18 +27,17 @@ export interface ITableColDef {
|
|
|
27
27
|
maxWidth?: number;
|
|
28
28
|
minWidth?: number;
|
|
29
29
|
pinned?: typeof PinnableValues[keyof typeof PinnableValues];
|
|
30
|
-
renderCell?: (value: unknown, row:
|
|
31
|
-
|
|
32
|
-
valueFormatter?: (value: unknown, row: object, column: ITableColDef, rowIndex: number) => React.ReactNode;
|
|
30
|
+
renderCell?: (value: unknown, row: T, column: ITableColDef<T>, rowIndex: number) => React.ReactNode;
|
|
31
|
+
valueFormatter?: (value: unknown, row: T, column: ITableColDef<T>, rowIndex: number) => React.ReactNode;
|
|
33
32
|
}
|
|
34
33
|
export declare const PinnableValues: {
|
|
35
34
|
Left: string;
|
|
36
35
|
Right: string;
|
|
37
36
|
};
|
|
38
|
-
export interface ITableCellProps {
|
|
37
|
+
export interface ITableCellProps<T> {
|
|
39
38
|
children: React.ReactNode;
|
|
40
39
|
isHeaderCell?: boolean;
|
|
41
|
-
column: ITableColDef
|
|
40
|
+
column: ITableColDef<T>;
|
|
42
41
|
colIndex: number;
|
|
43
42
|
rowIndex?: number;
|
|
44
43
|
}
|
|
@@ -47,6 +46,6 @@ export interface ITableRowProps {
|
|
|
47
46
|
isHeaderRow: boolean;
|
|
48
47
|
classes?: string;
|
|
49
48
|
}
|
|
50
|
-
export interface ITableHeadProps {
|
|
51
|
-
columns: ITableColDef[];
|
|
49
|
+
export interface ITableHeadProps<T> {
|
|
50
|
+
columns: ITableColDef<T>[];
|
|
52
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ITableCellProps } from "../ReusableTableTypes";
|
|
3
|
-
declare const TableCell: ({ children, column, isHeaderCell }: ITableCellProps) => JSX.Element;
|
|
3
|
+
declare const TableCell: <T>({ children, column, isHeaderCell, }: ITableCellProps<T>) => JSX.Element;
|
|
4
4
|
export default TableCell;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ITableColDef } from "../ReusableTableTypes";
|
|
3
3
|
import { IPaginationProps } from "../components/Pagination";
|
|
4
|
-
interface TableContextProps {
|
|
5
|
-
rowsData: Array<
|
|
6
|
-
allColumns: ITableColDef[];
|
|
4
|
+
interface TableContextProps<T> {
|
|
5
|
+
rowsData: Array<T>;
|
|
6
|
+
allColumns: ITableColDef<T>[];
|
|
7
7
|
headerRowClasses: string;
|
|
8
8
|
tableBodyClassesToOverride: string;
|
|
9
9
|
hideHeader: boolean;
|
|
10
|
-
leftPinnedColumns: ITableColDef[];
|
|
11
|
-
rightPinnedColumns: ITableColDef[];
|
|
12
|
-
nonPinnedColumns: ITableColDef[];
|
|
13
|
-
setRowsData: React.Dispatch<React.SetStateAction<
|
|
14
|
-
setAllColumns: React.Dispatch<React.SetStateAction<ITableColDef[]>>;
|
|
10
|
+
leftPinnedColumns: ITableColDef<T>[];
|
|
11
|
+
rightPinnedColumns: ITableColDef<T>[];
|
|
12
|
+
nonPinnedColumns: ITableColDef<T>[];
|
|
13
|
+
setRowsData: React.Dispatch<React.SetStateAction<T[]>>;
|
|
14
|
+
setAllColumns: React.Dispatch<React.SetStateAction<ITableColDef<T>[]>>;
|
|
15
15
|
paginationState: IPaginationProps;
|
|
16
16
|
setPaginationState: React.Dispatch<React.SetStateAction<IPaginationProps>>;
|
|
17
17
|
onPaginationClick: ((activePage: number) => void) | undefined;
|
|
18
18
|
}
|
|
19
|
-
export declare const useTableContext: () => TableContextProps
|
|
20
|
-
export declare const TableProvider: ({ children, initialColumns, rowData, headerRowClasses, tableBodyClassesToOverride, hideHeader, paginationProps, onPaginationClick, }: {
|
|
19
|
+
export declare const useTableContext: <T>() => TableContextProps<T>;
|
|
20
|
+
export declare const TableProvider: <T>({ children, initialColumns, rowData, headerRowClasses, tableBodyClassesToOverride, hideHeader, paginationProps, onPaginationClick, }: {
|
|
21
21
|
children: React.ReactNode;
|
|
22
|
-
initialColumns:
|
|
23
|
-
rowData:
|
|
22
|
+
initialColumns: ITableColDef<T>[];
|
|
23
|
+
rowData: T[];
|
|
24
24
|
headerRowClasses: string;
|
|
25
25
|
tableBodyClassesToOverride: string;
|
|
26
26
|
hideHeader: boolean;
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { InputTagProps } from "../types";
|
|
3
|
-
declare const InputTag1: ({ inputProps, className, dropdownClassName, options, tagList, tagString, tagClassName, handleValChange, onDropdownClick, allowDuplicates, getInputValue, shouldModifyTextCase, isScrollUp, elemID, }: InputTagProps) => JSX.Element;
|
|
4
|
-
export default InputTag1;
|