@fattureincloud/fic-design-system 0.7.10 → 0.7.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/newTable/Table.d.ts +2 -1
- package/dist/components/newTable/components/body/Body.d.ts +2 -2
- package/dist/components/newTable/components/row/Row.d.ts +4 -2
- package/dist/components/newTable/types.d.ts +6 -2
- package/dist/components/toast/types.d.ts +2 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -29,6 +29,7 @@ import { TableProps } from './types';
|
|
29
29
|
* @param {function} onPaginationChange Callback to handle server side pagination
|
30
30
|
* @param {function} renderEmptyState Render a custom empty state for the table's body
|
31
31
|
* @param {function} onRowClick Callback called after a click on a row, returns the row
|
32
|
+
* @param {number} rowIdHighlight id of the row that will be highlighted
|
32
33
|
*/
|
33
|
-
declare const Table: <T>({ data, columns, isSelectable, onRowSelectionChange, favorites, onFavoritesChange, toggles, onTogglesChange, rowSize, headerSize, isFavoritesSortable, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, }: TableProps<T>) => JSX.Element;
|
34
|
+
declare const Table: <T>({ data, columns, isSelectable, onRowSelectionChange, favorites, onFavoritesChange, toggles, onTogglesChange, rowSize, headerSize, isFavoritesSortable, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, rowIdHighlight, rowHighlightColor, }: TableProps<T>) => JSX.Element;
|
34
35
|
export default Table;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Row } from '@tanstack/react-table';
|
3
3
|
import { TableProps } from '../../types';
|
4
|
-
interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight'> {
|
4
|
+
interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'rowIdHighlight' | 'rowHighlightColor'> {
|
5
5
|
rows: Row<T>[];
|
6
6
|
isLoading?: boolean;
|
7
7
|
onRowClick?: (row: Row<T>) => void;
|
8
8
|
}
|
9
|
-
declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight }: BodyProps<T>) => JSX.Element;
|
9
|
+
declare const Body: <T>({ rows, rowSize, isLoading, onRowClick, bodyHeight, rowIdHighlight, rowHighlightColor, }: BodyProps<T>) => JSX.Element;
|
10
10
|
export default Body;
|
@@ -1,11 +1,13 @@
|
|
1
1
|
import { Row } from '@tanstack/react-table';
|
2
2
|
import React from 'react';
|
3
|
-
import { RowSize } from '../../types';
|
3
|
+
import { RowSize, TableProps } from '../../types';
|
4
4
|
interface TrProps<T> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {
|
5
5
|
row: Row<T>;
|
6
6
|
rowSize?: RowSize;
|
7
7
|
isLoading?: boolean;
|
8
8
|
onRowClick?: (row: Row<T>) => void;
|
9
|
+
isRowHighlighted: boolean;
|
10
|
+
rowHighlightColor?: TableProps<T>['rowHighlightColor'];
|
9
11
|
}
|
10
|
-
declare const Tr: <T>({ row, isLoading, onRowClick }: TrProps<T>) => JSX.Element;
|
12
|
+
declare const Tr: <T>({ row, isLoading, onRowClick, isRowHighlighted, rowHighlightColor }: TrProps<T>) => JSX.Element;
|
11
13
|
export default Tr;
|
@@ -40,6 +40,8 @@ export interface TableProps<T> {
|
|
40
40
|
onRowClick?: (row: Row<T>) => void;
|
41
41
|
bodyHeight?: number;
|
42
42
|
totalPages?: number;
|
43
|
+
rowIdHighlight?: number | string;
|
44
|
+
rowHighlightColor?: string;
|
43
45
|
}
|
44
46
|
interface SettingsDropdownConfig {
|
45
47
|
settingsTooltip?: TooltipProps;
|
@@ -61,13 +63,15 @@ export declare enum ColumnDefType {
|
|
61
63
|
GROUP = "group",
|
62
64
|
ACTION = "action"
|
63
65
|
}
|
64
|
-
interface ExtraColumnDef<T> extends IdentifiedColumnDef<T, CellProps> {
|
66
|
+
interface ExtraColumnDef<T> extends Omit<IdentifiedColumnDef<T, CellProps>, 'header'> {
|
65
67
|
isEditable: boolean;
|
66
68
|
onChange: (text: string, row: Row<T>) => void;
|
69
|
+
header?: IdentifiedColumnDef<T, CellProps>['header'] | JSX.Element;
|
67
70
|
}
|
68
|
-
interface InitalColumnDef<T> extends IdentifiedColumnDef<T, CellProps> {
|
71
|
+
interface InitalColumnDef<T> extends Omit<IdentifiedColumnDef<T, CellProps>, 'header'> {
|
69
72
|
isEditable?: false;
|
70
73
|
onChange?: never;
|
74
|
+
header?: IdentifiedColumnDef<T, CellProps>['header'] | JSX.Element;
|
71
75
|
}
|
72
76
|
export declare type AccessorColumnDef<T> = InitalColumnDef<T> | ExtraColumnDef<T>;
|
73
77
|
export declare enum ActionType {
|
@@ -18,6 +18,7 @@ export interface ToastProps {
|
|
18
18
|
actionLabel?: string;
|
19
19
|
onActionClick?: () => void;
|
20
20
|
autoClose?: boolean | number;
|
21
|
+
isDisabledAction?: boolean;
|
21
22
|
}
|
22
23
|
export interface ToastContentProps {
|
23
24
|
title: ReactNode;
|
@@ -26,6 +27,7 @@ export interface ToastContentProps {
|
|
26
27
|
actionLabel?: string;
|
27
28
|
onActionClick?: () => void;
|
28
29
|
type?: ToastType;
|
30
|
+
isDisabledAction?: boolean;
|
29
31
|
}
|
30
32
|
export interface ToastInterface {
|
31
33
|
Container: React.FC<ToastContainerProps>;
|