@touchtech/baselayer-ui 8.0.1 → 8.1.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.
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ export declare type ColumnType = {
3
+ key: string;
4
+ title: JSX.Element | string;
5
+ className?: string;
6
+ dataIndex: string;
7
+ render?: (data: Record<string, any> | string) => JSX.Element;
8
+ width?: string;
9
+ };
10
+ declare type Props = {
11
+ columns: ColumnType[];
12
+ dataSource: Record<string, any>[];
13
+ tableHeight: number;
14
+ onRowClick?: (data: Record<string, any>) => void;
15
+ hasArrow?: boolean;
16
+ onLoadMore?: (page: number) => void;
17
+ page?: number;
18
+ setPage?: (page: number) => void;
19
+ pageSize?: number;
20
+ placeholder?: React.ReactElement;
21
+ rowHeight?: number;
22
+ disableLazyLoader?: boolean;
23
+ activeRows?: Record<string, any>;
24
+ itemsCount?: number;
25
+ isHeaderSticky?: boolean;
26
+ hasVirtualScroll?: boolean;
27
+ };
28
+ declare function Table({ columns, dataSource, onRowClick, hasArrow, onLoadMore, page, setPage, pageSize, tableHeight, placeholder, rowHeight, disableLazyLoader, activeRows, itemsCount, isHeaderSticky, hasVirtualScroll, }: Props): JSX.Element;
29
+ export default Table;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from "./Table";
3
+ declare type Props = {
4
+ columns: ColumnType[];
5
+ scrollTop: number;
6
+ isHeaderSticky?: boolean;
7
+ };
8
+ declare function TableHeader({ columns, scrollTop, isHeaderSticky }: Props): JSX.Element;
9
+ export default TableHeader;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from "./Table";
3
+ declare type Props = {
4
+ data: Record<string, any> | string;
5
+ columns: ColumnType[];
6
+ onRowClick?: (data: Record<string, any>) => void;
7
+ hasArrow?: boolean;
8
+ rowHeight: number;
9
+ isActive?: boolean;
10
+ };
11
+ declare function TableRow({ data, columns, onRowClick, hasArrow, rowHeight, isActive, }: Props): JSX.Element;
12
+ export default TableRow;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from "./Table";
3
+ declare type Props = {
4
+ item: Record<string, any> | string;
5
+ column: ColumnType;
6
+ rowHeight: number;
7
+ };
8
+ declare function TableRowCell({ item, column, rowHeight }: Props): JSX.Element;
9
+ export default TableRowCell;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as Table } from "./Table";
@@ -0,0 +1,5 @@
1
+ export declare enum TableConfig {
2
+ ROW_HEIGHT = 48,
3
+ PAGE_SIZE = 100,
4
+ ITEMS_LOADED = 5
5
+ }
@@ -0,0 +1 @@
1
+ export * from "../constants/Table";
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export * from "./components/ListView";
17
17
  export * from "./components/Menu";
18
18
  export * from "./components/Modal";
19
19
  export * from "./components/Overlay";
20
+ export * from "./components/Table";
20
21
  export * from "./components/TextInput";
21
22
  export * from "./components/Toast";
22
23
  export * from "./components/Video";