@simoncomputing/mui-bueno-v2 0.24.4 → 0.25.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 +20 -0
- package/dist/components/Form/Diff/DiffContext.d.ts +16 -6
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/index.cjs.js +68 -68
- package/dist/index.es.js +2481 -2473
- package/dist/index.umd.js +47 -47
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,26 @@ 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.1] - 2026-02-04
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- `DiffProvider`/`useDiff` hook
|
|
19
|
+
- Added `getSnapshotValue` helper function to `useDiff` hook, which can be used to get desired field value from the `previousSnapshot`. Use this to obtain the before/snapshot value before passing it to `DiffTable` or `ReadOnly` component.
|
|
20
|
+
- Updated supported components (`TextField`, `TextArea`, `Select`, `Autocomplete`, `RadioGroup`, `CitationField`) to use `getSnapshotValue` internally. Previously, they were only working with non-nested formik names.
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
- `useDiff` hook
|
|
25
|
+
- `previousSnapshot` is no longer exposed. Use `getSnapshotValue` to get the specific value directly.
|
|
26
|
+
|
|
27
|
+
## [0.25.0] - 2026-02-04
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- `Snackbar`
|
|
32
|
+
- Changed default value of the `autoHideDuration` prop from 8 seconds to `undefined`. Since Snackbars can be dismissed by the user, by default they will no longer auto-dismiss unless a value is provided to the `autoHideDuration` prop. This is to avoid the user missing important messages, which should only be dismissed by the user.
|
|
33
|
+
|
|
14
34
|
## [0.24.4] - 2026-02-03
|
|
15
35
|
|
|
16
36
|
### Added
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
type
|
|
1
|
+
type DiffContextValue = {
|
|
2
|
+
/**
|
|
3
|
+
* Used by fields to determine whether to render as a read-only diff or not
|
|
4
|
+
*/
|
|
5
|
+
showDiff: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Obtains the snapshot value from `previousSnapshot`.
|
|
8
|
+
*
|
|
9
|
+
* @param name - formik field name
|
|
10
|
+
* @returns value in previousSnapshot (ex. name='phone' could return "999-123-1234")
|
|
11
|
+
*/
|
|
12
|
+
getSnapshotValue: (name: string) => any;
|
|
13
|
+
};
|
|
14
|
+
type DiffProviderProps = {
|
|
2
15
|
showDiff?: boolean;
|
|
3
16
|
previousSnapshot?: any;
|
|
4
17
|
children: React.ReactNode;
|
|
@@ -9,9 +22,6 @@ type DiffContextType = {
|
|
|
9
22
|
* @param showDiff - when true (default), enables text diff. Set to false to return form to normal.
|
|
10
23
|
* @param previousSnapshot - previous snapshot. This should match the same stucture as your fields (i.e. formik initialValues)
|
|
11
24
|
*/
|
|
12
|
-
export declare const DiffProvider: ({ showDiff, previousSnapshot, children }:
|
|
13
|
-
export declare const useDiff: () =>
|
|
14
|
-
showDiff: boolean;
|
|
15
|
-
previousSnapshot: null;
|
|
16
|
-
};
|
|
25
|
+
export declare const DiffProvider: ({ showDiff, previousSnapshot, children }: DiffProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const useDiff: () => DiffContextValue;
|
|
17
27
|
export {};
|