@simoncomputing/mui-bueno-v2 0.36.0 → 0.36.2

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.36.2] - 2026-08-25
15
+
16
+ ### Fixed
17
+
18
+ - `CitationField`, `SelectableCitationManager`
19
+ - Prevent refetch when checking/unchecking citations (lazy load)
20
+
21
+ ## [0.36.1] - 2026-08-25
22
+
23
+ ### Fixed
24
+
25
+ - `CitationField`, `CitationManager`, `SelectableCitationManager`
26
+ - Prevent double-clicks on API triggered buttons (creating, updating, deleting, downloading attachments). These buttons will disable while the API call is active.
27
+
28
+ ### Changed
29
+
30
+ - `CitationField`, `CitationManager`, `SelectableCitationManager`
31
+ - Replaced `onError` callback with `debugMode`. This is to avoid developers using `onError` to handle errors in the UI since it's meant only for debugging purposes (since error handling is already built-in to these components).
32
+
14
33
  ## [0.36.0] - 2026-08-10
15
34
 
16
35
  ### Added
@@ -36,12 +36,9 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
36
36
  */
37
37
  citationMaxLength?: number;
38
38
  /**
39
- * Error callback.
40
- *
41
- * NOTE: All errors are handled internally, so this prop is mainly intended to
42
- * help debug issues so developers can see specific details about an error.
39
+ * Flag to help with debugging.
43
40
  */
44
- onError?: (err: any) => void;
41
+ debugMode?: boolean;
45
42
  /**
46
43
  * Placeholder text. Default "Start typing here..."
47
44
  */
@@ -58,13 +58,13 @@ export type BaseCitationManagerProps = BaseCitationManagerApiProps & {
58
58
  * Callback for when the user clicks the "Select" button. This passes an array of selected citations
59
59
  * that the user chose to the parent component.
60
60
  */
61
- onSelectCitations: (citationIds: number[]) => void;
61
+ onSelectCitations?: (citationIds: number[]) => void | Promise<void>;
62
62
  /**
63
63
  * Callback for when the user clicks the "Cancel" button. If you're using a modal, close your modal here.
64
64
  *
65
65
  * Button is named "Cancel" instead of "Close" because if the user has changed their selection, it will not be saved.
66
66
  */
67
- onClose: () => void;
67
+ onClose?: () => void;
68
68
  /**
69
69
  * Callback whenever the size of the content potentially changes. Use this if you're using something like
70
70
  * a Popper, so that it can reposition itself when the dimensions of its content changes.
@@ -73,12 +73,9 @@ export type BaseCitationManagerProps = BaseCitationManagerApiProps & {
73
73
  */
74
74
  onContentChange?: () => void;
75
75
  /**
76
- * Error callback.
77
- *
78
- * NOTE: All errors are handled internally, so this prop is mainly intended to
79
- * help debug issues so developers can see specific details about an error.
76
+ * Flag to help with debugging.
80
77
  */
81
- onError?: (err: any) => void;
78
+ debugMode?: boolean;
82
79
  /**
83
80
  * When true, the table will be rendered for pop-ups (limited columns displayed, close button at top, etc).
84
81
  * When false, the table will be rendered as a basic paginated table with all columns displayed.
@@ -130,5 +127,5 @@ export declare enum CitationManagerState {
130
127
  *
131
128
  * For in-line citations, see CitationField instead.
132
129
  */
133
- export declare function BaseCitationManager({ getCitationsPaginated, getCitations, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations, onClose, initialSelectedIds, onContentChange, onError, renderAsPopup, canSelect, tableTitle, addlActions, canLaunchUrl, readOnly, printMode, canSearch, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
130
+ export declare function BaseCitationManager({ getCitationsPaginated, getCitations, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations, onClose, initialSelectedIds, onContentChange, debugMode, renderAsPopup, canSelect, tableTitle, addlActions, canLaunchUrl, readOnly, printMode, canSearch, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
134
131
  export default BaseCitationManager;
@@ -23,4 +23,4 @@ export type CitationBubbleMenuProps = Partial<Omit<ControlledBubbleMenuProps, 'o
23
23
  * update, which will happen if it's a child of the component using
24
24
  * `useEditor`).
25
25
  */
26
- export default function CitationBubbleMenuTipTap({ getCitationsPaginated, getSelectedCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, canLaunchUrl, readOnly, canSearch, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
26
+ export default function CitationBubbleMenuTipTap({ getCitationsPaginated, getSelectedCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, canLaunchUrl, readOnly, canSearch, debugMode, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -4,23 +4,20 @@ import { Citation } from '../../../../../@types';
4
4
  import { BaseCitationManagerApiProps } from './BaseCitationManager';
5
5
  export type CitationTableProps = Omit<BaseCitationManagerApiProps, 'onCreateCitation' | 'onUpdateCitation' | 'getCitationById'> & {
6
6
  title: string;
7
- onCancel: () => void;
7
+ onCancel?: () => void;
8
8
  onNewCitation: () => void;
9
9
  onNewAttachment: () => void;
10
10
  onEditCitation?: (citationId: number) => void;
11
11
  onEditAttachment?: (citationId: number) => void;
12
12
  onViewCitation?: (citationId: number) => void;
13
13
  onViewAttachment?: (citationId: number) => void;
14
- onSelect: (selectedIds: number[]) => void;
14
+ onSelect: (selectedIds: number[]) => Promise<void>;
15
15
  selectedIds: number[];
16
16
  setSelectedIds: React.Dispatch<React.SetStateAction<number[]>>;
17
17
  /**
18
- * Error callback.
19
- *
20
- * NOTE: All errors are handled internally, so this prop is mainly intended to
21
- * help debug issues so developers can see specific details about an error.
18
+ * Flag to help with debugging.
22
19
  */
23
- onError?: (err: any) => void;
20
+ debugMode?: boolean;
24
21
  /**
25
22
  * When true, the Source, Accessed At & Classification columns will not be displayed
26
23
  * to preserve horizontal space.
@@ -10,6 +10,8 @@ export type SelectableCitationManagerProps = Omit<BaseCitationManagerProps, 'ren
10
10
  * SelectableCitationManager is a condensed table that handles creating, updating, deleting and selecting citations.
11
11
  *
12
12
  * It's intended to be used in a pop-up/modal.
13
+ *
14
+ * REQUIREMENT: @tanstack/react-query
13
15
  */
14
16
  export declare function SelectableCitationManager({ getSelectedCitationsPaginated, getCitationsPaginated, readOnly, initialSelectedIds, ...rest }: SelectableCitationManagerProps): import("react/jsx-runtime").JSX.Element;
15
17
  export default SelectableCitationManager;
@@ -78,7 +78,7 @@ export type BaseTableProps<T, K> = {
78
78
  *
79
79
  * Note: This is lower priorty than isLoading, so this will not display if the table is loading.
80
80
  */
81
- errorTableMsg?: string;
81
+ errorTableMsg?: string | null;
82
82
  /**
83
83
  * When defined, renders a "Retry?" button that the user can click which will trigger this callback. Intended for allowing the user
84
84
  * to trigger a re-fetch in an attempt to populate the table with data from an API when the previous attempt failed.