@simoncomputing/mui-bueno-v2 0.26.4 → 0.28.0
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/CHANGELOG.md +33 -0
- package/dist/components/Table/DiffTable/utils.d.ts +2 -2
- package/dist/components/Table/PaginatedTable/PaginatedTable.d.ts +3 -3
- package/dist/components/Table/Table.d.ts +30 -12
- package/dist/index.cjs.js +77 -77
- package/dist/index.es.js +3914 -3896
- package/dist/index.umd.js +82 -82
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- Minor increment --> singlular/minor changes. Minimal breaking changes.
|
|
12
12
|
- Patch increment --> singlular/minor changes. Zero breaking changes.
|
|
13
13
|
|
|
14
|
+
## [0.28.0] - 2026-04-14
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- `Table`, `PaginatedTable`
|
|
19
|
+
- Fixed cursor/hover styling when `onRowClickObj` or `expandOnRowClick` is defined
|
|
20
|
+
- Fixed inconsistent typing of id/key by adding 2nd generic type for the type of the id/key (string|number)
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- `Table`, `PaginatedTable`
|
|
25
|
+
- Renamed `checkedIds`/`setCheckedIds` to `checkedKeys`/`setCheckedKeys`
|
|
26
|
+
|
|
27
|
+
## [0.27.0] - 2026-04-14
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- `Table`, `PaginatedTable`
|
|
32
|
+
- Added controlled version of `highlightSelectedRow` -- see `selectedRowKey` prop
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- `Table`, `PaginatedTable`
|
|
37
|
+
- `highlightSelectedRow` prop has been split into `higlightSelectedRow` & `selectedRowColor`.
|
|
38
|
+
- MIGRATION:
|
|
39
|
+
- Old: <Table ... highlightSelectedRow={color} />
|
|
40
|
+
- New: <Table ... highlightSelectedRow selectedRowColor={color} />
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- `CitationManager`, `SelectableCitationManager`, `CitationField`
|
|
45
|
+
- Grammar fix in paste & prefill popup
|
|
46
|
+
|
|
14
47
|
## [0.26.4] - 2026-03-26
|
|
15
48
|
|
|
16
49
|
### Fixed
|
|
@@ -46,7 +46,7 @@ export type DiffTableInput<T> = {
|
|
|
46
46
|
*/
|
|
47
47
|
isEqual?: (obj1: T, obj2: T) => boolean;
|
|
48
48
|
isMobileScreen?: boolean;
|
|
49
|
-
} & Pick<TableProps<T>, 'renderExpand' | 'size'>;
|
|
49
|
+
} & Pick<TableProps<T, number>, 'renderExpand' | 'size'>;
|
|
50
50
|
export type DiffTableOutput<T> = {
|
|
51
51
|
unmodifiedCount: number;
|
|
52
52
|
columns: DiffTableConfig<T>;
|
|
@@ -61,4 +61,4 @@ export type DiffTableOutput<T> = {
|
|
|
61
61
|
export declare const buildTableDiff: <T extends {
|
|
62
62
|
id: number;
|
|
63
63
|
}>(props: DiffTableInput<T>) => DiffTableOutput<T>;
|
|
64
|
-
export type BaseDiffTableProps<T> = Pick<TableProps<T>, 'emptyTableMsg' | 'size'>;
|
|
64
|
+
export type BaseDiffTableProps<T> = Pick<TableProps<T, number>, 'emptyTableMsg' | 'size'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableProps } from '../Table';
|
|
2
|
-
import {
|
|
2
|
+
import { PaginationState } from '../../../@types';
|
|
3
3
|
/**
|
|
4
4
|
* Paginated Table Props
|
|
5
5
|
*/
|
|
@@ -32,7 +32,7 @@ type BasePaginatedTableProps = {
|
|
|
32
32
|
*/
|
|
33
33
|
rowsPerPageOptions?: Array<number>;
|
|
34
34
|
};
|
|
35
|
-
export type PaginatedTableProps<T> = BasePaginatedTableProps & Omit<TableProps<T>, 'sortField' | 'sortOrder'>;
|
|
35
|
+
export type PaginatedTableProps<T, K> = BasePaginatedTableProps & Omit<TableProps<T, K>, 'sortField' | 'sortOrder'>;
|
|
36
36
|
/**
|
|
37
37
|
* Table with Pagination.
|
|
38
38
|
*
|
|
@@ -40,5 +40,5 @@ export type PaginatedTableProps<T> = BasePaginatedTableProps & Omit<TableProps<T
|
|
|
40
40
|
*
|
|
41
41
|
* Pagination controls will auto-hide when the table is empty or hidePaginationControls is true
|
|
42
42
|
*/
|
|
43
|
-
export declare const PaginatedTable: <T extends
|
|
43
|
+
export declare const PaginatedTable: <T extends object, K extends string | number>(props: PaginatedTableProps<T, K>) => import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
export default PaginatedTable;
|
|
@@ -5,7 +5,7 @@ import { default as React } from 'react';
|
|
|
5
5
|
/**
|
|
6
6
|
* Interface for table props.
|
|
7
7
|
*/
|
|
8
|
-
export type BaseTableProps<T> = {
|
|
8
|
+
export type BaseTableProps<T, K> = {
|
|
9
9
|
/**
|
|
10
10
|
* Optional identifier for your table; useful when overriding styles for only a single table (NOTE: will render as "mobile-table-{id}" and "table-{id}")
|
|
11
11
|
*/
|
|
@@ -13,7 +13,7 @@ export type BaseTableProps<T> = {
|
|
|
13
13
|
/**
|
|
14
14
|
* If the data in your table does not have an id OR your the id is undefined, use `getRowKey` to tell Table how to uniquely identify each row.
|
|
15
15
|
*/
|
|
16
|
-
getRowKey?: (row: T) =>
|
|
16
|
+
getRowKey?: (row: T) => K;
|
|
17
17
|
/**
|
|
18
18
|
* An array of column definitions
|
|
19
19
|
*/
|
|
@@ -25,19 +25,23 @@ export type BaseTableProps<T> = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Function to call when a row is clicked
|
|
27
27
|
*/
|
|
28
|
-
onRowClick?: (
|
|
28
|
+
onRowClick?: (key?: K) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Same as onRowClick but provides the whole object.
|
|
31
31
|
*/
|
|
32
32
|
onRowClickObj?: (obj: T) => void;
|
|
33
33
|
/**
|
|
34
|
-
* For tables with selectable rows. When defined, shows checkbox as first column.
|
|
34
|
+
* For tables with selectable rows (checkboxes). When defined, shows checkbox as first column.
|
|
35
|
+
*
|
|
36
|
+
* Array will contain ids, or keys if `getRowKey` is defined.
|
|
35
37
|
*/
|
|
36
|
-
|
|
38
|
+
checkedKeys?: K[];
|
|
37
39
|
/**
|
|
38
40
|
* For tables with selectable rows. When defined, shows checkbox as first column.
|
|
41
|
+
*
|
|
42
|
+
* Returns arary of ids, or keys if `getRowKey` is defined.
|
|
39
43
|
*/
|
|
40
|
-
|
|
44
|
+
setCheckedKeys?: React.Dispatch<React.SetStateAction<K[]>>;
|
|
41
45
|
/**
|
|
42
46
|
* fieldName of field to be sorted (can be provided via redux)
|
|
43
47
|
*/
|
|
@@ -108,12 +112,26 @@ export type BaseTableProps<T> = {
|
|
|
108
112
|
*/
|
|
109
113
|
disableMobileCards?: boolean;
|
|
110
114
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
115
|
+
* Highlights user-selected row.
|
|
116
|
+
*
|
|
117
|
+
* Set to `true` to enable. Alternatively, if you want a default value, set this to your row ID (or KEY if you've defined `getRowKey`)
|
|
118
|
+
*
|
|
119
|
+
* UNCONTROLLED. See `selectedRowKey` for controlled version.
|
|
114
120
|
* @default false
|
|
115
121
|
*/
|
|
116
|
-
highlightSelectedRow?: boolean |
|
|
122
|
+
highlightSelectedRow?: boolean | K;
|
|
123
|
+
/**
|
|
124
|
+
* Defines highlight color for a selected row
|
|
125
|
+
* @default MUI palette gray
|
|
126
|
+
*/
|
|
127
|
+
selectedRowColor?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Highlights user-selected row.
|
|
130
|
+
*
|
|
131
|
+
* CONTROLLED. Use with `onRowClick` to update the selected row. Value must be the ID (or key if you've defined `getRowKey`).
|
|
132
|
+
* See `highlightSelectedRow` for uncontrolled version.
|
|
133
|
+
*/
|
|
134
|
+
selectedRowKey?: K;
|
|
117
135
|
/**
|
|
118
136
|
* Allows overriding of default header row style settings (table only -- this has no effect on the card list for mobile)
|
|
119
137
|
*
|
|
@@ -142,14 +160,14 @@ export type BaseTableProps<T> = {
|
|
|
142
160
|
*/
|
|
143
161
|
tooltipColor?: string;
|
|
144
162
|
};
|
|
145
|
-
export type TableProps<T> = BaseTableProps<T> & Omit<MuiTableProps, 'stickyHeader'>;
|
|
163
|
+
export type TableProps<T, K> = BaseTableProps<T, K> & Omit<MuiTableProps, 'stickyHeader'>;
|
|
146
164
|
/**
|
|
147
165
|
* The Table is a reusable component for displaying data in a table.
|
|
148
166
|
* It includes sorting (optional).
|
|
149
167
|
* If you're looking for a paginated table, use see {@link file://../PagingTable/PagingTable.tsx} or
|
|
150
168
|
* {@link file://../ListPage/ListPage.tsx} which includes add & search functionality.
|
|
151
169
|
*/
|
|
152
|
-
export declare const Table: <T extends object>(props: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
170
|
+
export declare const Table: <T extends object, K extends string | number>(props: TableProps<T, K>) => import("react/jsx-runtime").JSX.Element;
|
|
153
171
|
export declare const getFieldKey: <T>(col: TableColumn<T, keyof T>) => string;
|
|
154
172
|
/**
|
|
155
173
|
* Helper function to get the value of a generic object.
|