@simoncomputing/mui-bueno-v2 0.25.8 → 0.25.10
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 +19 -0
- package/dist/components/Table/DiffTable/DiffTable.d.ts +8 -6
- package/dist/index.cjs.js +87 -87
- package/dist/index.es.js +1701 -1698
- package/dist/index.umd.js +78 -78
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,25 @@ 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.25.10] - 2026-02-18
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `DiffTable`
|
|
19
|
+
- Added `isEqual` prop, which is highly recommeneded when using `renderExpand` in order to cover the use-case where content in the expanded section is changed but the content in the rows match so the row should be marked as "modified"
|
|
20
|
+
|
|
21
|
+
## [0.25.9] - 2026-02-18
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `DiffTable`
|
|
26
|
+
- Added `emptyTableMsg` (see `Table` component), with default "No changes to display"
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- `DiffTable`
|
|
31
|
+
- Fixed flex spacing from affecting the spacing between the table and the unmodified rows count
|
|
32
|
+
|
|
14
33
|
## [0.25.8] - 2026-02-18
|
|
15
34
|
|
|
16
35
|
### Changed
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableProps } from '../Table';
|
|
2
2
|
import { DiffTableConfig } from '../../../@types';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
export type ChangeType = 'added' | 'deleted' | 'modified';
|
|
4
5
|
export type DiffObj<T> = T & {
|
|
5
6
|
changeType: ChangeType;
|
|
@@ -17,12 +18,13 @@ export type DiffTableProps<T> = {
|
|
|
17
18
|
*/
|
|
18
19
|
columns: DiffTableConfig<T>;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Used to override the internal check for whether a row has been modified or not.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
+
* It's highly recommended to implement this when `renderExpand` is implemented, especially
|
|
24
|
+
* if ignoreDiff is enabled on all columns.
|
|
23
25
|
*/
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
+
isEqual?: (obj1: T, obj2: T) => boolean;
|
|
27
|
+
} & Pick<TableProps<T>, 'renderExpand' | 'emptyTableMsg'>;
|
|
26
28
|
/**
|
|
27
29
|
* Used to display changes (additions, modifications, removals) for a set of data.
|
|
28
30
|
*
|
|
@@ -43,7 +45,7 @@ export declare const DiffTable: <T extends {
|
|
|
43
45
|
*/
|
|
44
46
|
export declare const buildDiffData: <T extends {
|
|
45
47
|
id: number;
|
|
46
|
-
}>(columns: DiffTableConfig<T>, dataA: T[], dataB: T[], isMobileScreen?: boolean) => {
|
|
48
|
+
}>(columns: DiffTableConfig<T>, dataA: T[], dataB: T[], isMobileScreen?: boolean, isEqual?: (obj1: T, obj2: T) => boolean) => {
|
|
47
49
|
dataDiff: DiffObj<T>[];
|
|
48
50
|
unmodifiedCount: number;
|
|
49
51
|
};
|