@fattureincloud/fic-design-system 0.7.27 → 0.7.28
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/components/newTable/Table.d.ts +1 -1
- package/dist/components/newTable/components/bulkBar/BulkBar.d.ts +5 -5
- package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +1 -1
- package/dist/components/newTable/components/header/Header.d.ts +5 -6
- package/dist/components/newTable/components/header/headerCell/ActionHeaderCell.d.ts +5 -6
- package/dist/components/newTable/components/header/headerCell/HeaderCell.d.ts +5 -6
- package/dist/components/newTable/types.d.ts +9 -7
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -31,5 +31,5 @@ import { TableProps } from './types';
|
|
|
31
31
|
* @param {function} onRowClick Callback called after a click on a row, returns the row
|
|
32
32
|
* @param {number} rowIdHighlight id of the row that will be highlighted
|
|
33
33
|
*/
|
|
34
|
-
declare const Table: <T>({ data, columns, isSelectable, 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, rowSelection,
|
|
34
|
+
declare const Table: <T>({ data, columns, isSelectable, 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, rowSelection, onRowSelection, forceHideSettings, renderBulkActions, }: TableProps<T>) => JSX.Element;
|
|
35
35
|
export default Table;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AllSelectedCTA, BulkAction } from '../../types';
|
|
3
|
-
interface BulkBarProps
|
|
4
|
-
selectedRowData:
|
|
5
|
-
bulkBarActions?: BulkAction
|
|
3
|
+
interface BulkBarProps {
|
|
4
|
+
selectedRowData: string[];
|
|
5
|
+
bulkBarActions?: BulkAction[];
|
|
6
6
|
allSelectedCTA?: AllSelectedCTA;
|
|
7
|
-
renderBulkActions?: (rows:
|
|
7
|
+
renderBulkActions?: (rows: string[]) => JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
declare const BulkBar:
|
|
9
|
+
declare const BulkBar: ({ selectedRowData, bulkBarActions, allSelectedCTA, renderBulkActions }: BulkBarProps) => JSX.Element;
|
|
10
10
|
export default BulkBar;
|
|
@@ -8,5 +8,5 @@ declare type Props<CellProps> = {
|
|
|
8
8
|
rowSize?: RowSize;
|
|
9
9
|
onRowClick?: (row: Row<CellProps>) => void;
|
|
10
10
|
} & CustomCellProps & AccessorColumnDef<CellProps> & ActionColumnDef<CellProps> & AdditionalColumnDef<CellProps>;
|
|
11
|
-
declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isFavorite, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, align, }: Props<CellProps>) => JSX.Element;
|
|
11
|
+
declare const CustomCell: <CellProps>({ content, isEditable, tag, unitSymbol, headline, leadingIcon, avatar, actionType, row, rowSize, onActionChange, isFavorite, isToggled, hover, onChange, trailingMicroTag, minWidth, rowActions, context, onRowClick, maxWidth, align, disableClick, }: Props<CellProps>) => JSX.Element;
|
|
12
12
|
export default CustomCell;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HeaderGroup } from '@tanstack/react-table';
|
|
3
3
|
import { OnSort, RowSize } from '../../types';
|
|
4
4
|
interface HeaderProps<T> {
|
|
5
5
|
headerGroup: HeaderGroup<T>[];
|
|
6
6
|
headerSize?: RowSize;
|
|
7
7
|
onSort?: OnSort<T>;
|
|
8
8
|
forceHideSettings: boolean;
|
|
9
|
-
rowSelection?:
|
|
10
|
-
setRowSelection?:
|
|
11
|
-
setInternalRowSelection: Dispatch<SetStateAction<RowSelectionState>>;
|
|
9
|
+
rowSelection?: string[];
|
|
10
|
+
setRowSelection?: (e: string[]) => void;
|
|
12
11
|
}
|
|
13
|
-
declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection,
|
|
12
|
+
declare const Header: <T>({ headerGroup, headerSize, onSort, forceHideSettings, rowSelection, setRowSelection, }: HeaderProps<T>) => JSX.Element;
|
|
14
13
|
export default Header;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Header } from '@tanstack/react-table';
|
|
3
3
|
interface CustomHeaderCellProps<T> {
|
|
4
4
|
header: Header<T, unknown>;
|
|
5
5
|
onOpen?: (isOpen: boolean) => void;
|
|
6
6
|
forceHideSettings: boolean;
|
|
7
|
-
rowSelection?:
|
|
8
|
-
setRowSelection?:
|
|
9
|
-
setInternalRowSelection: Dispatch<SetStateAction<RowSelectionState>>;
|
|
7
|
+
rowSelection?: string[];
|
|
8
|
+
setRowSelection?: (e: string[]) => void;
|
|
10
9
|
}
|
|
11
|
-
declare const ActionHeaderCell: <T>({ header, onOpen, forceHideSettings, rowSelection, setRowSelection,
|
|
10
|
+
declare const ActionHeaderCell: <T>({ header, onOpen, forceHideSettings, rowSelection, setRowSelection, }: CustomHeaderCellProps<T>) => JSX.Element;
|
|
12
11
|
export default ActionHeaderCell;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Header,
|
|
2
|
-
import { default as React
|
|
1
|
+
import { Header, SortDirection } from '@tanstack/react-table';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
import { CustomSorted, OnSort, RowSize } from '../../../types';
|
|
4
4
|
interface HeaderCellProps<T> {
|
|
5
5
|
header: Header<T, unknown>;
|
|
@@ -8,9 +8,8 @@ interface HeaderCellProps<T> {
|
|
|
8
8
|
customSorted?: false | SortDirection;
|
|
9
9
|
setCustomSorted?: React.Dispatch<React.SetStateAction<CustomSorted<T> | undefined>>;
|
|
10
10
|
forceHideSettings: boolean;
|
|
11
|
-
rowSelection?:
|
|
12
|
-
setRowSelection?:
|
|
13
|
-
setInternalRowSelection: Dispatch<SetStateAction<RowSelectionState>>;
|
|
11
|
+
rowSelection?: string[];
|
|
12
|
+
setRowSelection?: (e: string[]) => void;
|
|
14
13
|
}
|
|
15
|
-
declare const HeaderCell: <T>({ header, headerSize, onSort, customSorted, setCustomSorted, forceHideSettings, rowSelection, setRowSelection,
|
|
14
|
+
declare const HeaderCell: <T>({ header, headerSize, onSort, customSorted, setCustomSorted, forceHideSettings, rowSelection, setRowSelection, }: HeaderCellProps<T>) => JSX.Element;
|
|
16
15
|
export default HeaderCell;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { DisplayColumnDef, GroupColumnDef, IdentifiedColumnDef, PaginationState, Row, SortDirection } from '@tanstack/react-table';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { AvatarProps } from '../avatar';
|
|
4
4
|
import { ButtonProps } from '../buttons';
|
|
5
5
|
import { DropdownItemType } from '../dropdown';
|
|
@@ -25,8 +25,8 @@ export interface TableProps<T> {
|
|
|
25
25
|
isFavoritesSortable?: boolean;
|
|
26
26
|
isTogglesSortable?: boolean;
|
|
27
27
|
rowActions?: RowActions<T>;
|
|
28
|
-
bulkActions?: BulkAction
|
|
29
|
-
renderBulkActions?: (rows:
|
|
28
|
+
bulkActions?: BulkAction[];
|
|
29
|
+
renderBulkActions?: (rows: string[]) => JSX.Element;
|
|
30
30
|
isLoading?: boolean;
|
|
31
31
|
allSelectedCTA?: AllSelectedCTA;
|
|
32
32
|
noPagination?: boolean;
|
|
@@ -43,8 +43,8 @@ export interface TableProps<T> {
|
|
|
43
43
|
totalPages?: number;
|
|
44
44
|
rowIdHighlight?: number | string;
|
|
45
45
|
rowHighlightColor?: string;
|
|
46
|
-
rowSelection?:
|
|
47
|
-
|
|
46
|
+
rowSelection?: string[];
|
|
47
|
+
onRowSelection?: (e: string[]) => void;
|
|
48
48
|
forceHideSettings?: boolean;
|
|
49
49
|
}
|
|
50
50
|
interface SettingsDropdownConfig {
|
|
@@ -71,11 +71,13 @@ interface ExtraColumnDef<T> extends Omit<IdentifiedColumnDef<T, CellProps>, 'hea
|
|
|
71
71
|
isEditable: boolean;
|
|
72
72
|
onChange: (text: string, row: Row<T>) => void;
|
|
73
73
|
header?: IdentifiedColumnDef<T, CellProps>['header'] | JSX.Element;
|
|
74
|
+
disableClick?: boolean;
|
|
74
75
|
}
|
|
75
76
|
interface InitalColumnDef<T> extends Omit<IdentifiedColumnDef<T, CellProps>, 'header'> {
|
|
76
77
|
isEditable?: false;
|
|
77
78
|
onChange?: never;
|
|
78
79
|
header?: IdentifiedColumnDef<T, CellProps>['header'] | JSX.Element;
|
|
80
|
+
disableClick?: boolean;
|
|
79
81
|
}
|
|
80
82
|
export declare type AccessorColumnDef<T> = InitalColumnDef<T> | ExtraColumnDef<T>;
|
|
81
83
|
export declare enum ActionType {
|
|
@@ -169,8 +171,8 @@ export declare type DropdownAction<T> = {
|
|
|
169
171
|
items: RowAction<T>[];
|
|
170
172
|
tooltip?: TooltipProps;
|
|
171
173
|
};
|
|
172
|
-
export interface BulkAction
|
|
173
|
-
onClick: (rows:
|
|
174
|
+
export interface BulkAction extends Omit<ButtonProps, 'onClick' | 'text'> {
|
|
175
|
+
onClick: (rows: string[]) => void;
|
|
174
176
|
text: string | JSX.Element;
|
|
175
177
|
}
|
|
176
178
|
export interface AllSelectedCTA {
|