tabulify 1.0.22 → 1.0.23

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabulify",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "type": "module",
5
5
  "description": "A lightweight and customizable React table component.",
6
6
  "scripts": {
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- interface PaginationProps {
3
- pageSize: number;
4
- total: number;
5
- currentPage: number;
6
- onPageChange: (page: number) => void;
7
- }
8
- declare const Pagination: React.FC<PaginationProps>;
9
- export default Pagination;
@@ -1,5 +0,0 @@
1
- import './styles.css';
2
- import React from 'react';
3
- import { TableProps } from './Table.types';
4
- declare const Table: <T>({ columns, dataSource, rowSelection, pagination, dataIndex, className, onRowClick, }: TableProps<T>) => React.JSX.Element;
5
- export default Table;
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- export interface Column<T, K extends keyof T = keyof T> {
3
- title: string;
4
- key: K;
5
- sorter?: (a: T, b: T) => number;
6
- render?: (value: T[K], record: T, index: number) => React.ReactNode;
7
- }
8
- export interface RowSelection<T> {
9
- type: 'checkbox' | 'radio';
10
- selectedRowKeys?: (keyof T)[];
11
- onChange?: (selectedRowKeys: (keyof T)[], selectedRows: T[]) => void;
12
- }
13
- export interface Pagination {
14
- pageSize: number;
15
- total: number;
16
- current?: number;
17
- onChange?: (page: number) => void;
18
- }
19
- export interface TableProps<T> {
20
- className?: string;
21
- columns: Column<T>[];
22
- dataSource: T[];
23
- dataIndex: keyof T;
24
- rowSelection?: RowSelection<T>;
25
- pagination?: Pagination;
26
- onRowClick?: (id: T[keyof T]) => void;
27
- }
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- export interface Column<T> {
3
- title: string;
4
- dataIndex: keyof T;
5
- key: string;
6
- sorter?: (a: T, b: T) => number;
7
- render?: (value: T[keyof T], record: T, index: number) => React.ReactNode;
8
- }
9
- export interface RowSelection<T> {
10
- type: 'checkbox' | 'radio';
11
- selectedRowKeys?: (keyof T)[];
12
- onChange?: (selectedRowKeys: (keyof T)[], selectedRows: T[]) => void;
13
- }
14
- export interface Pagination {
15
- pageSize: number;
16
- total: number;
17
- current?: number;
18
- onChange?: (page: number) => void;
19
- }
20
- export interface TableProps<T extends {
21
- key: React.Key;
22
- }> {
23
- columns: Column<T>[];
24
- dataSource: T[];
25
- rowSelection?: RowSelection<T>;
26
- pagination?: Pagination;
27
- }
@@ -1 +0,0 @@
1
- export declare const getUniqueId: (prefix: unknown) => string;