@simoncomputing/mui-bueno-v2 0.18.11 → 0.18.13

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
+
15
+ ## [0.18.13] - 2025-09-29
16
+
17
+ ### Changed
18
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
19
+ - Updated errors to allow for backend validation error to display as body of Alert
20
+
21
+ ### Fixed
22
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
23
+ - Empty form will display if an error occurs when clicking on the edit button and retrieve API call fails
24
+
25
+ - `Radio`/`RadioGroup`
26
+ - Fixed `helperText` getting passed to MUI props when it shouldn't
27
+
28
+ ## [0.18.12] - 2025-09-26
29
+
30
+ ### Added
31
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
32
+ - `canLaunchUrl` prop which, when defined and returns true, will display a Launch Link icon under the action columnn
33
+
34
+ ### Removed
35
+ - `CitationField`, `CitationManger`, `SelectableCitationManager`
36
+ - `canOpenPublicUrls`. Use `canLaunchUrl` instead
37
+
14
38
  ## [0.18.11] - 2025-09-26
15
39
 
16
40
  ### Added
@@ -85,9 +85,10 @@ export type CitationFieldProps = BaseInputProps & {
85
85
  */
86
86
  notApplicableName?: string;
87
87
  /**
88
- * When true, users have the option to open public urls
88
+ * When provided and the function returns true,
89
+ * users will be allowed to launch URLs
89
90
  */
90
- canOpenPublicUrls?: boolean;
91
+ canLaunchUrl?: (citation: Citation) => boolean;
91
92
  };
92
93
  /**
93
94
  * Rich Text field -- uses MUI Tip Tap
@@ -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;
@@ -63,9 +63,10 @@ export interface BaseCitationManagerProps {
63
63
  */
64
64
  addlActions?: (citation: Citation) => ReactNode;
65
65
  /**
66
- * When true, users have the option to open public urls
66
+ * When provided and the function returns true,
67
+ * users will be allowed to launch URLs
67
68
  */
68
- canOpenPublicUrls?: boolean;
69
+ canLaunchUrl?: (citation: Citation) => boolean;
69
70
  }
70
71
  export declare enum CitationManagerState {
71
72
  CITATIONS_TABLE = "Insert Citation/Attachment(s)",
@@ -81,5 +82,5 @@ export declare enum CitationManagerState {
81
82
  *
82
83
  * For in-line citations, see CitationField instead.
83
84
  */
84
- export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsSelectablePopup, addlActions, canOpenPublicUrls, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
85
+ export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsSelectablePopup, addlActions, canLaunchUrl, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
85
86
  export default BaseCitationManager;
@@ -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;
@@ -24,4 +24,4 @@ export type CitationBubbleMenuProps = Partial<Except<ControlledBubbleMenuProps,
24
24
  * update, which will happen if it's a child of the component using
25
25
  * `useEditor`).
26
26
  */
27
- export default function CitationBubbleMenuTipTap({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, canOpenPublicUrls, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export default function CitationBubbleMenuTipTap({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, canLaunchUrl, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -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;
@@ -21,8 +20,6 @@ export type CitationTableProps = {
21
20
  * help debug issues so developers can see specific details about an error.
22
21
  */
23
22
  onError?: (err: string) => void;
24
- setError: React.Dispatch<React.SetStateAction<CitationManagerError | undefined>>;
25
- setSuccess: React.Dispatch<React.SetStateAction<string | undefined>>;
26
23
  /**
27
24
  * When true, the Source, Accessed At & Classification columns will not be displayed
28
25
  * to preserve horizontal space.
@@ -44,9 +41,10 @@ export type CitationTableProps = {
44
41
  */
45
42
  canEdit?: boolean;
46
43
  /**
47
- * When true, users can open public urls
44
+ * When provided and the function returns true,
45
+ * users will be allowed to launch URLs
48
46
  */
49
- canOpenPublicUrls?: boolean;
47
+ canLaunchUrl?: (citation: Citation) => boolean;
50
48
  /**
51
49
  * Additional actions to be displayed for each row. Will be inserted in between Download (if applicable) and Edit button.
52
50
  */