asma-core-ui 2.19.64 → 2.19.65
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/asma-core-ui.es.js +18 -17
- package/dist/src/components/table/StyledTable.d.ts +2 -4
- package/dist/src/components/table/components/TableHeader.d.ts +6 -0
- package/dist/src/components/table/components/TablePagination.d.ts +6 -0
- package/dist/src/components/table/components/columns/{action-column/expandColumn.d.ts → expandColumn.d.ts} +1 -0
- package/dist/src/components/table/components/columns/injectColumns.d.ts +2 -0
- package/dist/src/components/table/components/columns/selectColumn.d.ts +8 -0
- package/dist/src/components/table/{components-story → story/components}/useTableColumns.d.ts +1 -1
- package/dist/src/components/table/types.d.ts +5 -30
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/components/inputs/checkbox/StyledCheckbox.stories.d.ts +0 -17
- package/dist/src/components/table/components/columns/widthStabilizer.d.ts +0 -6
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/StyledDataGrid.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/StyledGridActionsCellItem.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/ColumnFormControlItem.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/ColumnsMenu.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/columnActions.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/index.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/types.d.ts +0 -0
- /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/x-data-grid-types.d.ts +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const SELECT_COLUMN_ID = "select";
|
|
3
|
-
export declare const EXPAND_COLUMN_ID = "expand-column-id";
|
|
1
|
+
import { type StyledTableProps } from './types';
|
|
4
2
|
/**
|
|
5
3
|
*
|
|
6
4
|
* Custom props:
|
|
@@ -13,4 +11,4 @@ export declare const EXPAND_COLUMN_ID = "expand-column-id";
|
|
|
13
11
|
*/
|
|
14
12
|
export declare const StyledTable: <TData extends {
|
|
15
13
|
id: string | number;
|
|
16
|
-
}, TCustomData = Record<string, unknown>>({ actions, columns, data, customSubRowData, initialState, enableRowSelection, headerPin, loading, noRowsOverlay, tableInstanceRef,
|
|
14
|
+
}, TCustomData = Record<string, unknown>>({ actions, columns, data, customSubRowData, initialState, enableRowSelection, headerPin, loading, noRowsOverlay, tableInstanceRef, className, rowHeight, tdClassName, getRowClassName, onRowClick, renderSubRows, customActionsNode, focusable, stickyHeader, expandArrow, height, locale, ...rest }: StyledTableProps<TData, TCustomData>) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CellContext, HeaderContext } from '@tanstack/react-table';
|
|
2
|
+
export declare function selectColumn<TData>(): {
|
|
3
|
+
id: string;
|
|
4
|
+
size: number;
|
|
5
|
+
maxSize: number;
|
|
6
|
+
header: ({ table }: HeaderContext<TData, TData>) => JSX.Element;
|
|
7
|
+
cell: ({ cell }: CellContext<TData, TData>) => JSX.Element;
|
|
8
|
+
};
|
|
@@ -15,8 +15,9 @@ declare module '@tanstack/react-table' {
|
|
|
15
15
|
meta?: ColumnMeta<TData, TValue>;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export type TableRowClickHandler<TData extends RowData> = (e: MouseEvent<HTMLTableRowElement, globalThis.MouseEvent>, row: Row<TData>) => void;
|
|
19
18
|
export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> {
|
|
19
|
+
locale?: 'no' | 'en';
|
|
20
|
+
height?: string | number;
|
|
20
21
|
actions?: (row: Row<TData>) => {
|
|
21
22
|
label: string;
|
|
22
23
|
className?: string;
|
|
@@ -34,36 +35,7 @@ export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<
|
|
|
34
35
|
className?: string;
|
|
35
36
|
rowHeight?: number;
|
|
36
37
|
tdClassName?: string;
|
|
37
|
-
thClassName?: string;
|
|
38
38
|
focusable?: boolean;
|
|
39
|
-
getRowClassName?: (row: Row<TData>) => string;
|
|
40
|
-
onRowClick?: (e: MouseEvent<HTMLTableRowElement, globalThis.MouseEvent>, row: Row<TData>) => void;
|
|
41
|
-
renderSubRows?: (props: {
|
|
42
|
-
rows: TCustomData[];
|
|
43
|
-
row: TData;
|
|
44
|
-
}) => ReactElement;
|
|
45
|
-
getRowSelectionIds?: (ids: string[]) => void;
|
|
46
|
-
}
|
|
47
|
-
export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> {
|
|
48
|
-
actions?: (row: Row<TData>) => {
|
|
49
|
-
label: string;
|
|
50
|
-
className?: string;
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
hide?: boolean;
|
|
53
|
-
onClick?: (row: Row<TData>) => void;
|
|
54
|
-
}[];
|
|
55
|
-
autoSize?: boolean;
|
|
56
|
-
customSubRowData?: Map<string, TCustomData[]>;
|
|
57
|
-
headerPin?: boolean;
|
|
58
|
-
loading?: boolean;
|
|
59
|
-
noRowsOverlay?: ReactElement;
|
|
60
|
-
tableInstanceRef?: React.MutableRefObject<Table<TData> | null>;
|
|
61
|
-
virtualContainerRef?: React.RefObject<Element | null>;
|
|
62
|
-
useVirtualization?: boolean;
|
|
63
|
-
className?: string;
|
|
64
|
-
rowHeight?: number;
|
|
65
|
-
tdClassName?: string;
|
|
66
|
-
thClassName?: string;
|
|
67
39
|
stickyHeader?: boolean;
|
|
68
40
|
getRowClassName?: (row: Row<TData>) => string;
|
|
69
41
|
onRowClick?: (e: MouseEvent<HTMLTableRowElement, globalThis.MouseEvent>, row: Row<TData>) => void;
|
|
@@ -73,3 +45,6 @@ export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<
|
|
|
73
45
|
}) => ReactElement;
|
|
74
46
|
getRowSelectionIds?: (ids: string[]) => void;
|
|
75
47
|
}
|
|
48
|
+
export declare const SELECT_COLUMN_ID = "select";
|
|
49
|
+
export declare const EXPAND_COLUMN_ID = "expand-column-id";
|
|
50
|
+
export declare const ACTIONS_COLUMN_ID = "actions";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from './components/data-display/chip';
|
|
|
6
6
|
export * from './components/data-display/tooltip';
|
|
7
7
|
export * from './components/data-display/icons';
|
|
8
8
|
export * from './components/data-display/typography';
|
|
9
|
-
export * from './components/data-grid';
|
|
9
|
+
export * from './components/table/__deprecated-data-grid';
|
|
10
10
|
export * from './components/feedback/dialog';
|
|
11
11
|
export * from './components/feedback/alert';
|
|
12
12
|
export * from './components/feedback/snack-bar';
|