master-components-react-ts 2.2.7 → 2.2.8

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 @@
1
+ export declare const IconColumnConfig: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const IconDragandDrop: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ interface RowsPerPageDropdownProps {
2
+ currentValue: number;
3
+ options: number[];
4
+ onChange: (value: number) => void;
5
+ }
6
+ export default function RowsPerPageDropdown({ currentValue, options, onChange }: RowsPerPageDropdownProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,2 +1,2 @@
1
1
  import { TableProps } from './Table.types';
2
- export default function Table({ columns, data, onRowClick, onHeaderClick, sort, selectedRows, onSelectionChange, withSelectAll, actionButtonText, actionButtonIcon, onActionButtonClick, actionButtons, currentPage, totalPages, onPageChange, showPagination, onRowEdit, onRowDelete, rowActions, }: TableProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Table({ columns, data, onRowClick, onHeaderClick, sort, selectedRows, onSelectionChange, withSelectAll, actionButtonText, actionButtonIcon, onActionButtonClick, actionButtons, withColumnConfiguration, headerSlot, onColumnOrderChange, onColumnVisibilityChange, currentPage, totalPages, onPageChange, showPagination, rowsPerPage, rowsPerPageOptions, onRowsPerPageChange, totalItems, startItem, endItem, onRowEdit, onRowDelete, rowActions, }: TableProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  export type ColumnType = {
2
2
  key?: string;
3
3
  label?: string;
4
+ visible?: boolean;
4
5
  render?: (row: any) => React.ReactNode;
5
6
  [key: string]: any;
6
7
  };
@@ -18,10 +19,20 @@ export interface TableProps {
18
19
  actionButtonIcon?: React.ReactNode;
19
20
  onActionButtonClick?: (row: any) => void;
20
21
  actionButtons?: any[];
22
+ withColumnConfiguration?: boolean;
23
+ headerSlot?: React.ReactNode;
24
+ onColumnOrderChange?: (newColumns: ColumnType[]) => void;
25
+ onColumnVisibilityChange?: (newColumns: ColumnType[]) => void;
21
26
  currentPage?: number;
22
27
  totalPages?: number;
23
28
  onPageChange?: (page: number) => void;
24
29
  showPagination?: boolean;
30
+ rowsPerPage?: number;
31
+ rowsPerPageOptions?: number[];
32
+ onRowsPerPageChange?: (rowsPerPage: number) => void;
33
+ totalItems?: number;
34
+ startItem?: number;
35
+ endItem?: number;
25
36
  onRowEdit?: (row: any, rowIndex: number) => void;
26
37
  onRowDelete?: (row: any, rowIndex: number) => void;
27
38
  rowActions?: any[];
@@ -0,0 +1,34 @@
1
+ type Department = "Engineering" | "HR" | "Marketing" | "Sales";
2
+ type Status = "active" | "inactive" | "pending";
3
+ type Role = "Admin" | "User" | "Manager" | "Guest";
4
+ export interface UserData {
5
+ id: number;
6
+ name: string;
7
+ email: string;
8
+ department: Department;
9
+ status: Status;
10
+ role: Role;
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ }
14
+ export interface SortConfig {
15
+ selector: keyof UserData;
16
+ desc: boolean;
17
+ }
18
+ export interface FilterConfig {
19
+ key: keyof UserData;
20
+ operator: "contains" | "equals" | "startsWith";
21
+ value: string;
22
+ }
23
+ export interface FetchDataParams {
24
+ skip?: number;
25
+ take?: number;
26
+ sort?: SortConfig[];
27
+ filter?: FilterConfig[];
28
+ }
29
+ export interface FetchDataResponse {
30
+ data: UserData[];
31
+ totalCount: number;
32
+ }
33
+ export declare function fetchDataDevExpressLike({ skip, take, sort, filter, }: FetchDataParams): Promise<FetchDataResponse>;
34
+ export {};