@simoncomputing/mui-bueno-v2 0.25.9 → 0.25.11

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 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.11] - 2026-02-18
15
+
16
+ ### Changed
17
+
18
+ - `DiffProvider`
19
+ - Added `ReadOnlyProvider` wrapper internally so if `showDiff` is false, it will default to `readOnly` instead of an editable form
20
+
21
+ ### Fixed
22
+
23
+ - `DiffTable`
24
+ - Fixed Added/Deleted rows were displaying diff notation in the expanded sections
25
+
26
+ ## [0.25.10] - 2026-02-18
27
+
28
+ ### Added
29
+
30
+ - `DiffTable`
31
+ - 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"
32
+
14
33
  ## [0.25.9] - 2026-02-18
15
34
 
16
35
  ### Added
@@ -1,6 +1,7 @@
1
1
  type DiffContextValue = {
2
2
  /**
3
3
  * Used by fields to determine whether to render as a read-only diff or not
4
+ * If false, renders as read-only
4
5
  */
5
6
  showDiff: boolean;
6
7
  /**
@@ -1,6 +1,6 @@
1
+ import { ReactNode } from 'react';
1
2
  import { TableProps } from '../Table';
2
3
  import { DiffTableConfig } from '../../../@types';
3
- import { ReactNode } from 'react';
4
4
  export type ChangeType = 'added' | 'deleted' | 'modified';
5
5
  export type DiffObj<T> = T & {
6
6
  changeType: ChangeType;
@@ -17,6 +17,13 @@ export type DiffTableProps<T> = {
17
17
  * See Table.columns
18
18
  */
19
19
  columns: DiffTableConfig<T>;
20
+ /**
21
+ * Used to override the internal check for whether a row has been modified or not.
22
+ *
23
+ * It's highly recommended to implement this when `renderExpand` is implemented, especially
24
+ * if ignoreDiff is enabled on all columns.
25
+ */
26
+ isEqual?: (obj1: T, obj2: T) => boolean;
20
27
  } & Pick<TableProps<T>, 'renderExpand' | 'emptyTableMsg'>;
21
28
  /**
22
29
  * Used to display changes (additions, modifications, removals) for a set of data.
@@ -38,7 +45,7 @@ export declare const DiffTable: <T extends {
38
45
  */
39
46
  export declare const buildDiffData: <T extends {
40
47
  id: number;
41
- }>(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) => {
42
49
  dataDiff: DiffObj<T>[];
43
50
  unmodifiedCount: number;
44
51
  };