@datacrest/dcuikit 1.0.52 → 1.0.54
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/build/components/Molecule/ProfileCard/types.d.ts +3 -1
- package/build/components/Molecule/Table/Table.d.ts +1 -1
- package/build/components/Molecule/Table/Table.types.d.ts +7 -2
- package/build/components/Molecule/Table/TableActionsMenu.d.ts +1 -1
- package/build/index.css +1 -1
- package/build/index.esm.css +1 -1
- package/build/index.esm.js +2 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.prod.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { PROFILE_CARD_SIZES } from './const';
|
|
3
3
|
export interface DropdownItem {
|
|
4
4
|
name: string;
|
|
@@ -6,6 +6,7 @@ export interface DropdownItem {
|
|
|
6
6
|
link?: string;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
onClick?: () => void;
|
|
9
|
+
linkComponent?: ElementType;
|
|
9
10
|
}
|
|
10
11
|
export interface ProfileCardProps {
|
|
11
12
|
avatarUrl: string;
|
|
@@ -17,4 +18,5 @@ export interface ProfileCardProps {
|
|
|
17
18
|
className?: string;
|
|
18
19
|
isDropdownOpen?: boolean;
|
|
19
20
|
onToggleDropdown?: () => void;
|
|
21
|
+
linkComponent?: ElementType;
|
|
20
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { TableProps } from './Table.types';
|
|
3
|
-
declare const Table: <T extends Record<string, unknown>>({ columns, data, sortable, pagination, searchable, currentPage, pageSize, totalPages: externalTotalPages, totalCount: externalTotalCount, manualPagination, onSort, onPageChange, onPageSizeChange, onSearch, actions, onRowClick, showCustomCells, useBuiltInStatus, swapPaginationLayout, selectable, onSelectionChange, }: TableProps<T>) => JSX.Element;
|
|
3
|
+
declare const Table: <T extends Record<string, unknown>>({ columns, data, sortable, pagination, searchable, currentPage, pageSize, totalPages: externalTotalPages, totalCount: externalTotalCount, manualPagination, onSort, onPageChange, onPageSizeChange, onSearch, actions, onRowClick, rowHref, linkComponent, showCustomCells, useBuiltInStatus, swapPaginationLayout, selectable, onSelectionChange, }: TableProps<T>) => JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterFn } from '@tanstack/react-table';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
export declare enum TableColumnAlign {
|
|
4
4
|
Left = "left",
|
|
5
5
|
Center = "center",
|
|
@@ -40,9 +40,11 @@ export interface TableColumn<T extends Record<string, unknown>> {
|
|
|
40
40
|
}
|
|
41
41
|
export interface TableActionItem {
|
|
42
42
|
label: string;
|
|
43
|
-
onClick
|
|
43
|
+
onClick?: () => void;
|
|
44
44
|
variant?: 'default' | 'danger';
|
|
45
45
|
disabled?: boolean;
|
|
46
|
+
href?: string;
|
|
47
|
+
linkComponent?: ElementType;
|
|
46
48
|
}
|
|
47
49
|
export declare enum TableActionsMenuAlign {
|
|
48
50
|
Start = "start",
|
|
@@ -53,6 +55,7 @@ export interface TableActionsMenuProps {
|
|
|
53
55
|
items: TableActionItem[];
|
|
54
56
|
align?: TableActionsMenuAlign;
|
|
55
57
|
ariaLabel?: string;
|
|
58
|
+
linkComponent?: ElementType;
|
|
56
59
|
}
|
|
57
60
|
export interface ColumnInfo<T> {
|
|
58
61
|
toggleSorting: (desc?: boolean) => void;
|
|
@@ -76,6 +79,8 @@ export interface TableProps<T extends Record<string, unknown>> {
|
|
|
76
79
|
onPageSizeChange?: (pageSize: PageSizeOptions) => void;
|
|
77
80
|
actions?: (row: T) => ReactNode;
|
|
78
81
|
onRowClick?: (row: T) => void;
|
|
82
|
+
rowHref?: (row: T) => string | undefined;
|
|
83
|
+
linkComponent?: ElementType;
|
|
79
84
|
showCustomCells?: boolean;
|
|
80
85
|
useBuiltInStatus?: boolean;
|
|
81
86
|
swapPaginationLayout?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableActionsMenuProps } from './Table.types';
|
|
3
|
-
declare const TableActionsMenu: ({ items, align, ariaLabel, }: TableActionsMenuProps) => React.JSX.Element | null;
|
|
3
|
+
declare const TableActionsMenu: ({ items, align, ariaLabel, linkComponent, }: TableActionsMenuProps) => React.JSX.Element | null;
|
|
4
4
|
export default TableActionsMenu;
|