@akinon/akitable 0.0.3 → 0.0.5

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/index.d.ts CHANGED
@@ -1,22 +1,18 @@
1
- import { AnyObject } from 'antd/es/_util/type';
2
- import { ColumnsType, TableRowSelection } from 'antd/es/table/interface';
3
1
  import * as React from 'react';
4
- import { TableAction, UseDataTablePagination } from './types';
5
- export type { DataTablePagination, TableAction, UseDataTablePagination } from './types';
6
- export type DataTableProps<T> = {
7
- loading?: boolean;
8
- data: T[];
9
- columns: ColumnsType<T>;
2
+ import type { AntdTableProps } from './components/AntdTable';
3
+ import type { AnyObject, HeaderAction, UseAkitablePagination } from './types';
4
+ export type { AkitablePagination, HeaderAction, UseAkitablePagination } from './types';
5
+ export type AkitableProps<IData> = AntdTableProps<IData> & {
10
6
  title: string;
11
7
  description: string;
12
- tableActions?: TableAction<T>[];
13
- rowSelection?: TableRowSelection<T>;
14
- removeBg?: boolean;
15
- scroll?: {
16
- x: number | string;
17
- };
18
- useDataTablePagination: UseDataTablePagination;
8
+ useAkitablePagination: UseAkitablePagination;
9
+ headerActions?: HeaderAction<IData>[];
19
10
  headerMiddleBlock?: React.ReactNode;
20
11
  };
21
- export declare const DataTable: <T extends AnyObject>({ useDataTablePagination, data, title, description, rowSelection, tableActions, removeBg, scroll, headerMiddleBlock, ...restProps }: DataTableProps<T>) => React.JSX.Element;
12
+ /**
13
+ * Akitable component
14
+ * @param {AkitableProps} props
15
+ * @returns {React.ReactElement}
16
+ */
17
+ export declare const Akitable: <IData extends AnyObject>({ useAkitablePagination, title, description, headerActions, headerMiddleBlock, ...restProps }: AkitableProps<IData>) => React.JSX.Element;
22
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAMtB,OAAO,EAAE,SAAS,EAAE,MAAM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