@simoncomputing/mui-bueno-v2 0.28.4 → 0.29.1

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,30 @@ 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.29.1] - 2026-06-03
15
+
16
+ ### Changed
17
+
18
+ - `DiffTable`, `buildTableDiff`
19
+ - Replaced "_+X modified rows_" with "_Show/hide X unmodified row(s)_" link that when clicked, shows/hides unchanged data rows so that user can see any unmodified data
20
+
21
+ ## [0.29.0] - 2026-05-06
22
+
23
+ ### Changed
24
+
25
+ - `Breadcrumbs`
26
+ - Renamed `crumbInfo: BreadcrumbInfo[]` prop to `crumbs: BreadcrumbOptions[]` (the type has also been moved to `@types`)
27
+ - Tweaked styling
28
+ - underline will only appear on hover
29
+ - links are bold
30
+ - non-links are black (white in dark mode)
31
+ - separator is dark grey (white in dark mode)
32
+
33
+ ### Added
34
+
35
+ - `Breadcrumbs`
36
+ - Improved link handling. Added `openInNewTab`, `externalUrl`, and `onClick` (previously only `path` for react routes was allowed).
37
+
14
38
  ## [0.28.4] - 2026-04-30
15
39
 
16
40
  ### Fixed
@@ -257,3 +257,5 @@ export type UnsavedCitation = {
257
257
 
258
258
  type UnsavedUrlCitation = Omit<UnsavedCitation, 'type'> & { type: 'Url' };
259
259
  type UnsavedAttachmentCitation = Omit<UnsavedCitation, 'type'> & { type: 'Attachment' };
260
+
261
+ export type BreadcrumbOption = Omit<MenuOption, 'minPermission' | 'icon'>; // icon support can be added later
@@ -40,7 +40,7 @@ export declare function renderValue<T>(options: SelectOption<T>[], value?: strin
40
40
  * @param naviate -- pass useNavigate's navigate fn. used when onClick & path are both present to navigate to the path
41
41
  * @param onClickCallback -- (optional) called at the end of the onClick in case any additional execution is needed (ex. closing a modal)
42
42
  */
43
- export declare function generateButtonLinkProps(menuOption: MenuOption, navigate: (path: string) => void, onClickCallback?: () => void): {
43
+ export declare function generateButtonLinkProps(menuOption: Pick<MenuOption, 'openInNewTab' | 'path' | 'externalUrl' | 'onClick'>, navigate: (path: string) => void, onClickCallback?: () => void): {
44
44
  onClick: () => void;
45
45
  component?: undefined;
46
46
  to?: undefined;
@@ -56,7 +56,7 @@ export declare function generateButtonLinkProps(menuOption: MenuOption, navigate
56
56
  rel?: undefined;
57
57
  } | {
58
58
  component: string;
59
- href: string;
59
+ href: string | undefined;
60
60
  target: string;
61
61
  rel: string;
62
62
  onClick?: undefined;
@@ -1,10 +1,7 @@
1
+ import { BreadcrumbOption } from '../../@types';
1
2
  import * as React from 'react';
2
3
  export type BreadcrumbsProps = {
3
- crumbInfo: BreadcrumbInfo[];
4
- };
5
- export type BreadcrumbInfo = {
6
- label: string;
7
- path?: string;
4
+ crumbs: BreadcrumbOption[];
8
5
  };
9
6
  export declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
10
7
  export default Breadcrumbs;
@@ -1,6 +1,6 @@
1
- import { BreadcrumbInfo } from '../Breadcrumbs/Breadcrumbs';
2
1
  import { SxProps, Theme } from '@mui/material';
3
2
  import { ReactNode } from 'react';
3
+ import { BreadcrumbOption } from '../../@types';
4
4
  /**
5
5
  * Interface for PageHeader props.
6
6
  * @property {string} tableKey - The key of the table.
@@ -16,7 +16,7 @@ export type PageHeaderProps = {
16
16
  createButtonLabel?: string;
17
17
  showAddButton?: boolean;
18
18
  onAdd?: (id?: number | string) => void;
19
- breadcrumbs?: BreadcrumbInfo[];
19
+ breadcrumbs?: BreadcrumbOption[];
20
20
  children?: React.ReactNode;
21
21
  sx?: SxProps<Theme>;
22
22
  bottomGutter?: boolean;
@@ -7,7 +7,7 @@ export type DiffTableProps<T> = BaseDiffTableProps<T> & Omit<DiffTableInput<T>,
7
7
  * NOTE: If you already have computed the diff in your parent component and/or need access to the diff output, use `DiffTableView` instead.
8
8
  *
9
9
  * - A new column (left) that denotes whether a row was added, changed or removed.
10
- * - Any unchanged rows will be counted and displayed at the bottom, under the table.
10
+ * - Any unchanged rows will be counted and can be displayed/hidden using at the bottom, under the table.
11
11
  * - Updates cell render function to show diff notation for modified rows.
12
12
  * - Updates renderExpand, if provided, to show diff notation for modified rows.
13
13
  *
@@ -7,10 +7,10 @@ export type DiffTableViewProps<T> = BaseDiffTableProps<T> & DiffTableOutput<T>;
7
7
  *
8
8
  * Once the diff is computed, the following table will be displayed:
9
9
  * - A new column (left) that denotes whether a row was added, changed or removed.
10
- * - Any unchanged rows will be counted and displayed at the bottom, under the table.
10
+ * - Any unchanged rows will be counted and can be displayed/hidden using at the bottom, under the table.
11
11
  * - Updates cell render function to show diff notation for modified rows.
12
12
  * - Updates renderExpand, if provided, to show diff notation for modified rows.
13
13
  */
14
14
  export declare const DiffTableView: <T extends {
15
15
  id: number;
16
- }>({ columns, data, emptyTableMsg, renderExpand, size, unmodifiedCount, }: DiffTableViewProps<T>) => import("react/jsx-runtime").JSX.Element;
16
+ }>({ columns, data, unmodifiedData, emptyTableMsg, renderExpand, size, }: DiffTableViewProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { DiffTableConfig } from '../../../@types';
2
2
  import { SvgIcon } from '@mui/material';
3
3
  import { ReactNode } from 'react';
4
4
  import { TableProps } from '../Table';
5
- export type ChangeType = 'added' | 'deleted' | 'modified';
5
+ export type ChangeType = 'added' | 'deleted' | 'modified' | 'unmodified';
6
6
  export type DiffObj<T> = T & {
7
7
  changeType: ChangeType;
8
8
  modifiedDiff?: Record<string, ReactNode>;
@@ -13,9 +13,9 @@ export type TableDiff<T> = {
13
13
  };
14
14
  export declare const ChangeMap: {
15
15
  [key: string]: {
16
- icon: typeof SvgIcon;
16
+ icon?: typeof SvgIcon;
17
17
  label: string;
18
- color: 'success' | 'error' | 'info';
18
+ color: 'success' | 'error' | 'info' | 'default';
19
19
  };
20
20
  };
21
21
  /**
@@ -29,7 +29,7 @@ export declare const buildDiffData: <T extends {
29
29
  id: number;
30
30
  }>(columns: DiffTableConfig<T>, dataA: T[], dataB: T[], isMobileScreen?: boolean, isEqual?: (obj1: T, obj2: T) => boolean) => {
31
31
  dataDiff: DiffObj<T>[];
32
- unmodifiedCount: number;
32
+ dataUnmodified: DiffObj<T>[];
33
33
  };
34
34
  export type DiffTableInput<T> = {
35
35
  beforeData: T[];
@@ -48,9 +48,9 @@ export type DiffTableInput<T> = {
48
48
  isMobileScreen?: boolean;
49
49
  } & Pick<TableProps<T, number>, 'renderExpand' | 'size'>;
50
50
  export type DiffTableOutput<T> = {
51
- unmodifiedCount: number;
52
51
  columns: DiffTableConfig<T>;
53
52
  data: DiffObj<T>[];
53
+ unmodifiedData?: DiffObj<T>[];
54
54
  renderExpand?: (item: DiffObj<T>) => React.ReactNode;
55
55
  };
56
56
  /**