@simoncomputing/mui-bueno-v2 0.18.12 → 0.18.14

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,29 @@ 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.18.14] - 2025-09-29
15
+
16
+ ### Fixed
17
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
18
+ - Improved error message displayed when API call fails
19
+
20
+ ### Changed
21
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
22
+ - `onError` param changed from `string` to `obj`
23
+
24
+ ## [0.18.13] - 2025-09-29
25
+
26
+ ### Changed
27
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
28
+ - Updated errors to allow for backend validation error to display as body of Alert
29
+
30
+ ### Fixed
31
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
32
+ - Empty form will display if an error occurs when clicking on the edit button and retrieve API call fails
33
+
34
+ - `Radio`/`RadioGroup`
35
+ - Fixed `helperText` getting passed to MUI props when it shouldn't
36
+
14
37
  ## [0.18.12] - 2025-09-26
15
38
 
16
39
  ### Added
@@ -73,7 +73,7 @@ export type CitationFieldProps = BaseInputProps & {
73
73
  * NOTE: All errors are handled internally, so this prop is mainly intended to
74
74
  * help debug issues so developers can see specific details about an error.
75
75
  */
76
- onError?: (err: string) => void;
76
+ onError?: (err: any) => void;
77
77
  /**
78
78
  * Placeholder text. Default "Start typing here..."
79
79
  */
@@ -1,13 +1,10 @@
1
1
  import { Citation, UnsavedAttachmentCitation } from '../../../../../@types';
2
- import { CitationManagerError } from './CitationAlert';
3
2
  export type AttachmentFormProps = {
4
- id?: number;
5
3
  title?: string;
6
4
  onSave: (unsavedAttachment: UnsavedAttachmentCitation) => Promise<void>;
7
5
  onCancel: () => void;
8
- getCitationById: (id: number) => Promise<Citation>;
9
6
  disableFileUpload?: boolean;
10
- setError: React.Dispatch<React.SetStateAction<CitationManagerError | undefined>>;
7
+ modifyCitation: Citation | undefined;
11
8
  };
12
9
  declare const AttachmentForm: (props: AttachmentFormProps) => import("react/jsx-runtime").JSX.Element;
13
10
  export default AttachmentForm;
@@ -52,7 +52,7 @@ export interface BaseCitationManagerProps {
52
52
  * NOTE: All errors are handled internally, so this prop is mainly intended to
53
53
  * help debug issues so developers can see specific details about an error.
54
54
  */
55
- onError?: (err: string) => void;
55
+ onError?: (err: any) => void;
56
56
  /**
57
57
  * When true, the table will be rendered for pop-ups with the ability to select citations from the table.
58
58
  * When false, teh table will be rendered as a basic paginated table with all columns displayed.
@@ -1,17 +1,16 @@
1
1
  type Props = {
2
- error?: CitationManagerError;
3
- setError: React.Dispatch<React.SetStateAction<CitationManagerError | undefined>>;
4
- success?: string;
5
- setSuccess: React.Dispatch<React.SetStateAction<string | undefined>>;
2
+ alert?: CitationManagerAlert;
3
+ setAlert: React.Dispatch<React.SetStateAction<CitationManagerAlert | undefined>>;
6
4
  };
7
5
  /**
8
6
  * Error for BaseCitationManager, CitationManager & SelectableCitationManager
9
7
  * title = human-friendly/shortened version of the error (ex. "Failed to create citation")
10
8
  * err = the actual error thrown by the exception that was caught
11
9
  */
12
- export type CitationManagerError = {
10
+ export type CitationManagerAlert = {
13
11
  title: string;
14
- err: string;
12
+ message: string;
13
+ type: 'Success' | 'Error';
15
14
  };
16
15
  declare const CitationAlert: (props: Props) => import("react/jsx-runtime").JSX.Element;
17
16
  export default CitationAlert;
@@ -1,12 +1,9 @@
1
1
  import { Citation, UnsavedUrlCitation } from '../../../../../@types';
2
- import { CitationManagerError } from './CitationAlert';
3
2
  export type CitationFormProps = {
4
- id?: number;
5
3
  title?: string;
6
4
  onSave: (unsavedUrl: UnsavedUrlCitation) => Promise<void>;
7
5
  onCancel: () => void;
8
- getCitationById: (id: number) => Promise<Citation>;
9
- setError: React.Dispatch<React.SetStateAction<CitationManagerError | undefined>>;
6
+ modifyCitation: Citation | undefined;
10
7
  };
11
8
  declare const CitationForm: (props: CitationFormProps) => import("react/jsx-runtime").JSX.Element;
12
9
  export default CitationForm;
@@ -1,6 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PageState, PageResponse, Citation } from '../../../../../@types';
3
- import { CitationManagerError } from './CitationAlert';
4
3
  export type CitationTableProps = {
5
4
  title: string;
6
5
  onCancel: () => void;
@@ -20,9 +19,7 @@ export type CitationTableProps = {
20
19
  * NOTE: All errors are handled internally, so this prop is mainly intended to
21
20
  * help debug issues so developers can see specific details about an error.
22
21
  */
23
- onError?: (err: string) => void;
24
- setError: React.Dispatch<React.SetStateAction<CitationManagerError | undefined>>;
25
- setSuccess: React.Dispatch<React.SetStateAction<string | undefined>>;
22
+ onError?: (err: any) => void;
26
23
  /**
27
24
  * When true, the Source, Accessed At & Classification columns will not be displayed
28
25
  * to preserve horizontal space.