oziko-ui-kit 0.0.95 → 0.0.97
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.
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TypeFlexElement } from "../../../components/atoms/flex-element/FlexElement";
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
export type TableColumnRenderCellParams<TRow = any> = {
|
|
4
|
+
row: TRow;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
isFocused: boolean;
|
|
7
|
+
columnKey: string;
|
|
8
|
+
};
|
|
9
|
+
export type TableColumn<TRow = any> = {
|
|
10
|
+
key: string;
|
|
11
|
+
header: React.ReactNode;
|
|
12
|
+
width?: string;
|
|
13
|
+
renderCell: (params: TableColumnRenderCellParams<TRow>) => React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export type TableSaveToLocalStorage = {
|
|
16
|
+
id: string;
|
|
17
|
+
save?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type TableCellKeyDownParams = {
|
|
20
|
+
columnKey: string;
|
|
21
|
+
rowIndex: number;
|
|
22
|
+
event: KeyboardEvent;
|
|
23
|
+
};
|
|
24
|
+
export type TypeTable<TRow = any> = {
|
|
25
|
+
columns: TableColumn<TRow>[];
|
|
26
|
+
data: TRow[];
|
|
27
|
+
saveToLocalStorage?: TableSaveToLocalStorage;
|
|
10
28
|
fixedColumns?: string[];
|
|
11
29
|
noResizeableColumns?: string[];
|
|
12
|
-
|
|
13
|
-
onCellEscape?: (columnKey: string, rowIndex: number, event: KeyboardEvent) => void;
|
|
30
|
+
onCellKeyDown?: (params: TableCellKeyDownParams) => void;
|
|
14
31
|
tableClassName?: string;
|
|
15
32
|
columnClassName?: string;
|
|
16
33
|
headerClassName?: string;
|
|
17
34
|
cellClassName?: string;
|
|
18
35
|
};
|
|
19
|
-
declare const
|
|
20
|
-
export default
|
|
36
|
+
declare const MemoizedTable: <TRow = any>(props: TypeTable<TRow>) => React.ReactElement;
|
|
37
|
+
export default MemoizedTable;
|
|
21
38
|
export type TypeColumn = {
|
|
22
39
|
columnKey?: string;
|
|
23
40
|
children?: React.ReactNode;
|
package/dist/index.export.d.ts
CHANGED
|
@@ -167,6 +167,10 @@ export { type TypeDashboardItem } from "./components/organisms/dashboard/layout/
|
|
|
167
167
|
export { type TypeDashboardLayout } from "./components/organisms/dashboard/layout/DashboardLayout";
|
|
168
168
|
export { type TypeSection } from "./components/organisms/section/Section";
|
|
169
169
|
export { type TypeSectionComponent } from "./components/organisms/section/Section";
|
|
170
|
+
export { type TableColumn } from "./components/organisms/table/Table";
|
|
171
|
+
export { type TableColumnRenderCellParams } from "./components/organisms/table/Table";
|
|
172
|
+
export { type TableSaveToLocalStorage } from "./components/organisms/table/Table";
|
|
173
|
+
export { type TableCellKeyDownParams } from "./components/organisms/table/Table";
|
|
170
174
|
export { type TypeTable } from "./components/organisms/table/Table";
|
|
171
175
|
export { type TypeColumn } from "./components/organisms/table/Table";
|
|
172
176
|
export { type TypeColumnComponent } from "./components/organisms/table/Table";
|