@fattureincloud/fic-design-system 0.19.12 → 0.19.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/icon/icon.stories.d.ts +2 -2
- package/dist/components/newTable/Table.d.ts +2 -1
- package/dist/components/newTable/components/body/Body.d.ts +5 -5
- package/dist/components/newTable/components/cell/Cell.d.ts +3 -2
- package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +2 -1
- package/dist/components/newTable/components/row/Row.d.ts +6 -5
- package/dist/components/newTable/types.d.ts +34 -33
- package/dist/components/newTable/utils.d.ts +3 -4
- package/dist/components/tableV3/components/body/Body.d.ts +2 -2
- package/dist/components/tableV3/components/cell/actionsCell/ActionsCell.d.ts +2 -1
- package/dist/components/tableV3/components/row/Row.d.ts +2 -2
- package/dist/components/tableV3/types/tableTypes.d.ts +1 -0
- package/dist/index.esm.js +7 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { Meta } from '@storybook/react';
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
3
3
|
import { IconProps } from './Icon';
|
4
|
-
export declare const Normal:
|
4
|
+
export declare const Normal: Story<IconProps>;
|
5
5
|
export declare const WithBackground: () => JSX.Element;
|
6
6
|
export declare const DuotoneColored: () => JSX.Element;
|
7
7
|
export declare const _CustomIcon: () => JSX.Element;
|
@@ -29,6 +29,7 @@ import { TableProps } from './types';
|
|
29
29
|
* @param {function} onRowClick Callback called after a click on a row, returns the row
|
30
30
|
* @param {number} actionColumnWidth used to determine the width of the action column
|
31
31
|
* @param {function} isRowHighlighted used to underline table rows
|
32
|
+
* @param {boolean} disableActions disable actions
|
32
33
|
*/
|
33
|
-
declare const Table: <T>({ actionColumnWidth, allSelectedCTA, bodyHeight, bulkActions, columns, data, disableScrollX, enableSettings, forceHideSettings, headerSize, isLoading, isRowDisabled, isRowHighlighted, isSelectable, isTogglesSortable, listSize, noPagination, notRemovableColumns, onChangeTableSettings, onPaginationChange, onRowClick, onRowSelection, onSort, onTogglesChange, pageSize: pageLength, paginationNextText, paginationPreviousText, preSettedTableSettings, renderBulkActions, renderEmptyState, resetPageIndex, rowActions, rowHighlightColor, rowHighlightHideBorderBottom, rowSelection, rowSize, settingsDropdownConfig, sortDescFirst, sortable, toggles, totalPages, uniqueId, }: TableProps<T>) => JSX.Element;
|
34
|
+
declare const Table: <T>({ actionColumnWidth, allSelectedCTA, bodyHeight, bulkActions, columns, data, disableActions, disableScrollX, enableSettings, forceHideSettings, headerSize, isLoading, isRowDisabled, isRowHighlighted, isSelectable, isTogglesSortable, listSize, noPagination, notRemovableColumns, onChangeTableSettings, onPaginationChange, onRowClick, onRowSelection, onSort, onTogglesChange, pageSize: pageLength, paginationNextText, paginationPreviousText, preSettedTableSettings, renderBulkActions, renderEmptyState, resetPageIndex, rowActions, rowHighlightColor, rowHighlightHideBorderBottom, rowSelection, rowSize, settingsDropdownConfig, sortDescFirst, sortable, toggles, totalPages, uniqueId, }: TableProps<T>) => JSX.Element;
|
34
35
|
export default Table;
|
@@ -1,13 +1,13 @@
|
|
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' | 'rowHighlightColor' | 'isRowHighlighted' | 'rowHighlightHideBorderBottom' | 'isRowDisabled'> {
|
5
|
-
|
4
|
+
interface BodyProps<T> extends Pick<TableProps<T>, 'rowSize' | 'bodyHeight' | 'rowHighlightColor' | 'isRowHighlighted' | 'rowHighlightHideBorderBottom' | 'isRowDisabled' | 'disableActions'> {
|
5
|
+
actionColumnWidth: number;
|
6
|
+
disableScrollX?: boolean;
|
6
7
|
isLoading?: boolean;
|
7
8
|
onRowClick?: (row: Row<T>) => void;
|
8
9
|
pageIndex: number;
|
9
|
-
|
10
|
-
disableScrollX?: boolean;
|
10
|
+
rows: Row<T>[];
|
11
11
|
}
|
12
|
-
declare const Body: <T>({
|
12
|
+
declare const Body: <T>({ actionColumnWidth, bodyHeight, disableActions, disableScrollX, isLoading, isRowDisabled, isRowHighlighted, onRowClick, pageIndex, rowHighlightColor, rowHighlightHideBorderBottom, rowSize, rows, }: BodyProps<T>) => JSX.Element;
|
13
13
|
export default Body;
|
@@ -4,12 +4,13 @@ import { RowSize } from '../../types';
|
|
4
4
|
interface Props<T> {
|
5
5
|
actionColumnWidth: number;
|
6
6
|
cell: TCell<T, unknown>;
|
7
|
+
disableAction: boolean;
|
8
|
+
disableRow: boolean;
|
7
9
|
hover?: boolean;
|
8
10
|
isLoading?: boolean;
|
9
|
-
disableRow: boolean;
|
10
11
|
onRowClick?: (row: Row<T>) => void;
|
11
12
|
row: Row<T>;
|
12
13
|
rowSize?: RowSize;
|
13
14
|
}
|
14
|
-
declare const Cell: <T>({ actionColumnWidth, cell, disableRow, hover, isLoading, onRowClick, row, rowSize, }: Props<T>) => JSX.Element;
|
15
|
+
declare const Cell: <T>({ actionColumnWidth, cell, disableAction, disableRow, hover, isLoading, onRowClick, row, rowSize, }: Props<T>) => JSX.Element;
|
15
16
|
export default Cell;
|
@@ -4,11 +4,12 @@ import { AccessorColumnDef, ActionColumnDef, AdditionalColumnDef, CustomCellProp
|
|
4
4
|
declare type Props<CellProps> = {
|
5
5
|
actionColumnWidth: number;
|
6
6
|
context: CellContext<CellProps, unknown>;
|
7
|
+
disableAction: boolean;
|
7
8
|
disableRow: boolean;
|
8
9
|
hover?: boolean;
|
9
10
|
onRowClick?: (row: Row<CellProps>) => void;
|
10
11
|
row: Row<CellProps>;
|
11
12
|
rowSize?: RowSize;
|
12
13
|
} & CustomCellProps & AccessorColumnDef<CellProps> & ActionColumnDef<CellProps> & AdditionalColumnDef<CellProps>;
|
13
|
-
declare const CustomCell: <CellProps>({ actionColumnWidth, actionType, align, avatar, content, context, disableClick, disableRow, headline, hover, isEditable, isToggled, leadingIcon, maxWidth, minWidth, onActionChange, onChange, onRowClick, row, rowActions, rowSize, tag, trailingMicroTag, unitSymbol, }: Props<CellProps>) => JSX.Element;
|
14
|
+
declare const CustomCell: <CellProps>({ actionColumnWidth, actionType, align, avatar, content, context, disableAction, disableClick, disableRow, headline, hover, isEditable, isToggled, leadingIcon, maxWidth, minWidth, onActionChange, onChange, onRowClick, row, rowActions, rowSize, tag, trailingMicroTag, unitSymbol, }: Props<CellProps>) => JSX.Element;
|
14
15
|
export default CustomCell;
|
@@ -2,15 +2,16 @@ import { Row } from '@tanstack/react-table';
|
|
2
2
|
import React from 'react';
|
3
3
|
import { RowSize, TableProps } from '../../types';
|
4
4
|
interface TrProps<T> extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement> {
|
5
|
-
|
5
|
+
actionColumnWidth: number;
|
6
6
|
defaultRowSize?: RowSize;
|
7
|
+
disableActions?: (row: Row<T>) => boolean;
|
7
8
|
isLoading?: boolean;
|
9
|
+
isRowDisabled?: (row: Row<T>) => boolean;
|
10
|
+
isRowHighlighted?: (row: Row<T>) => boolean;
|
8
11
|
onRowClick?: (row: Row<T>) => void;
|
12
|
+
row: Row<T>;
|
9
13
|
rowHighlightColor?: TableProps<T>['rowHighlightColor'];
|
10
|
-
actionColumnWidth: number;
|
11
|
-
isRowHighlighted?: (row: Row<T>) => boolean;
|
12
14
|
rowHighlightHideBorderBottom?: boolean;
|
13
|
-
isRowDisabled?: (row: Row<T>) => boolean;
|
14
15
|
}
|
15
|
-
declare const Tr: <T>({
|
16
|
+
declare const Tr: <T>({ actionColumnWidth, defaultRowSize, disableActions, isLoading, isRowDisabled, isRowHighlighted, onRowClick, row, rowHighlightColor, rowHighlightHideBorderBottom, }: TrProps<T>) => JSX.Element;
|
16
17
|
export default Tr;
|
@@ -9,52 +9,53 @@ import { MicroTagProps } from '../microTag';
|
|
9
9
|
import { TagProps } from '../tag';
|
10
10
|
import { TooltipProps } from '../tooltip';
|
11
11
|
export interface TableProps<T> {
|
12
|
-
|
13
|
-
|
12
|
+
actionColumnWidth?: number;
|
13
|
+
allSelectedCTA?: AllSelectedCTA;
|
14
|
+
bodyHeight?: number;
|
15
|
+
bulkActions?: BulkAction[];
|
14
16
|
columns: ColumnsType<T>[];
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
data: T[];
|
18
|
+
disableActions?: (row: Row<T>) => boolean;
|
19
|
+
disableScrollX?: boolean;
|
20
|
+
enableSettings?: boolean;
|
21
|
+
forceHideSettings?: boolean;
|
19
22
|
headerSize?: RowSize;
|
20
|
-
sortable?: boolean;
|
21
|
-
sortDescFirst?: boolean;
|
22
|
-
onSort?: OnSort<T>;
|
23
|
-
isTogglesSortable?: boolean;
|
24
|
-
rowActions?: RowActions<T> | ((row?: Row<T>) => RowActions<T>);
|
25
|
-
bulkActions?: BulkAction[];
|
26
|
-
renderBulkActions?: (rows: string[]) => JSX.Element;
|
27
23
|
isLoading?: boolean;
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
isRowDisabled?: (row: Row<T>) => boolean;
|
25
|
+
isRowHighlighted?: (row: Row<T>) => boolean;
|
26
|
+
isSelectable?: boolean;
|
27
|
+
isTogglesSortable?: boolean;
|
31
28
|
listSize?: number;
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
paginationNextText?: string;
|
29
|
+
noPagination?: boolean;
|
30
|
+
notRemovableColumns?: string[];
|
31
|
+
onChangeTableSettings?: onChangeTableSettings;
|
36
32
|
onPaginationChange?: (pagination: PaginationState) => void;
|
37
|
-
renderEmptyState?: () => JSX.Element;
|
38
33
|
onRowClick?: (row: Row<T>) => void;
|
39
|
-
bodyHeight?: number;
|
40
|
-
totalPages?: number;
|
41
|
-
isRowHighlighted?: (row: Row<T>) => boolean;
|
42
|
-
rowHighlightColor?: string;
|
43
|
-
rowHighlightHideBorderBottom?: boolean;
|
44
|
-
rowSelection?: string[];
|
45
34
|
onRowSelection?: (e: string[]) => void;
|
46
|
-
|
35
|
+
onSort?: OnSort<T>;
|
36
|
+
onTogglesChange?: (toggles: string[]) => void;
|
37
|
+
pageSize?: number;
|
38
|
+
paginationNextText?: string;
|
39
|
+
paginationPreviousText?: string;
|
47
40
|
preSettedTableSettings?: {
|
48
41
|
orderColumns?: string[];
|
49
42
|
dimensionRow?: number;
|
50
43
|
notVisibleColumns?: string[];
|
51
44
|
};
|
52
|
-
|
53
|
-
|
54
|
-
actionColumnWidth?: number;
|
55
|
-
disableScrollX?: boolean;
|
45
|
+
renderBulkActions?: (rows: string[]) => JSX.Element;
|
46
|
+
renderEmptyState?: () => JSX.Element;
|
56
47
|
resetPageIndex?: boolean;
|
57
|
-
|
48
|
+
rowActions?: RowActions<T> | ((row?: Row<T>) => RowActions<T>);
|
49
|
+
rowHighlightColor?: string;
|
50
|
+
rowHighlightHideBorderBottom?: boolean;
|
51
|
+
rowSelection?: string[];
|
52
|
+
rowSize?: RowSize;
|
53
|
+
settingsDropdownConfig?: SettingsDropdownConfig;
|
54
|
+
sortDescFirst?: boolean;
|
55
|
+
sortable?: boolean;
|
56
|
+
toggles?: string[];
|
57
|
+
totalPages?: number;
|
58
|
+
uniqueId: keyof T;
|
58
59
|
}
|
59
60
|
export declare type onChangeTableSettings = (key: keyof PreSettedTableSettings, valueChange: Pick<PreSettedTableSettings, 'orderColumns' | 'dimensionRow' | 'notVisibleColumns'>) => void;
|
60
61
|
export interface PreSettedTableSettings {
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { ColumnDef, SortDirection } from '@tanstack/react-table';
|
2
|
-
import { CellProps, RowSize } from './types';
|
3
|
-
import { TableProps } from './types';
|
2
|
+
import { CellProps, RowSize, TableProps } from './types';
|
4
3
|
interface ColumnsHelperProps<T> extends Omit<TableProps<T>, 'data' | 'uniqueId'> {
|
5
4
|
preSettedTableSettings?: {
|
6
|
-
orderColumns?: string[];
|
7
5
|
dimensionRow?: RowSize;
|
8
6
|
notVisibleColumns?: string[];
|
7
|
+
orderColumns?: string[];
|
9
8
|
};
|
10
9
|
}
|
11
|
-
export declare const useColumnsHelper: <T>({ columns,
|
10
|
+
export declare const useColumnsHelper: <T>({ actionColumnWidth, columns, enableSettings, isSelectable, isTogglesSortable, onTogglesChange, preSettedTableSettings, rowActions, settingsDropdownConfig, toggles, }: ColumnsHelperProps<T>) => ColumnDef<T, CellProps>[];
|
12
11
|
export declare const getNextSortingDirection: (direction?: false | SortDirection | undefined) => false | SortDirection;
|
13
12
|
export {};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Row as RowType } from '@tanstack/react-table';
|
3
3
|
import { TableProps } from '../../types';
|
4
|
-
interface BodyProps<T> extends Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip' | 'renderEmptyState'> {
|
4
|
+
interface BodyProps<T> extends Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip' | 'renderEmptyState' | 'isRowActionDisabled'> {
|
5
5
|
pageIndex: number;
|
6
6
|
rows: RowType<T>[];
|
7
7
|
columnsCount: number;
|
8
8
|
isTableEmpty?: boolean;
|
9
9
|
}
|
10
|
-
declare const Body: <T>({ columnsCount, isLoading, isRowDisabled, isRowHighlighted, isTableEmpty, onRowClick, pageIndex, renderEmptyState, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
|
10
|
+
declare const Body: <T>({ columnsCount, isLoading, isRowActionDisabled, isRowDisabled, isRowHighlighted, isTableEmpty, onRowClick, pageIndex, renderEmptyState, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
|
11
11
|
export default Body;
|
@@ -3,6 +3,7 @@ import { Row } from '@tanstack/react-table';
|
|
3
3
|
import { TableProps } from '../../../types';
|
4
4
|
declare type Props<T> = {
|
5
5
|
disableRow: boolean;
|
6
|
+
disableRowActions: boolean;
|
6
7
|
mouseHover: boolean;
|
7
8
|
isRowHighlighted?: boolean;
|
8
9
|
row: Row<T>;
|
@@ -10,5 +11,5 @@ declare type Props<T> = {
|
|
10
11
|
rowHighlightColor?: string;
|
11
12
|
selected: boolean;
|
12
13
|
};
|
13
|
-
declare const ActionsCell: <T>({ disableRow, isRowHighlighted, mouseHover, row, rowActions, rowHighlightColor, selected, }: Props<T>) => JSX.Element;
|
14
|
+
declare const ActionsCell: <T>({ disableRow, disableRowActions, isRowHighlighted, mouseHover, row, rowActions, rowHighlightColor, selected, }: Props<T>) => JSX.Element;
|
14
15
|
export default ActionsCell;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Row as RowType } from '@tanstack/react-table';
|
3
3
|
import { TableProps } from '../../types';
|
4
|
-
declare type TrProps<T> = Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> & {
|
4
|
+
declare type TrProps<T> = Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowActionDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> & {
|
5
5
|
row: RowType<T>;
|
6
6
|
};
|
7
|
-
declare const Row: <T>({ isLoading, isRowDisabled, isRowHighlighted, onRowClick, row, rowActions, rowHighlightColor, rowSelection, rowTooltip, }: TrProps<T>) => JSX.Element;
|
7
|
+
declare const Row: <T>({ isLoading, isRowActionDisabled, isRowDisabled, isRowHighlighted, onRowClick, row, rowActions, rowHighlightColor, rowSelection, rowTooltip, }: TrProps<T>) => JSX.Element;
|
8
8
|
export default Row;
|
@@ -16,6 +16,7 @@ export declare type TableProps<T> = SelectableTable<T> & PaginatedTable & Sortab
|
|
16
16
|
headerSize?: RowSize;
|
17
17
|
isLoading?: boolean;
|
18
18
|
isRowDisabled?: (row: Row<T>) => boolean;
|
19
|
+
isRowActionDisabled?: (row: Row<T>) => boolean;
|
19
20
|
loadingStyle?: LoadingStyle;
|
20
21
|
maxHeight?: number;
|
21
22
|
onRowClick?: (row: Row<T>) => void;
|