@simoncomputing/mui-bueno-v2 0.19.11 → 0.19.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,31 @@ 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.19.13] - 2025-11-17
15
+
16
+ ### Fixed
17
+
18
+ - `CitationField`
19
+ - Removed outline when `readOnly=true`
20
+ - Fixed `margin` affecting space between label & field
21
+
22
+ ## Changed
23
+
24
+ - `CitationField`, `SelectableCitationManager`
25
+ - Long titles will be truncated in the table view
26
+
27
+ ## Added
28
+
29
+ - `CitationField`, `SelectableCitationManager`, `CitationManager`
30
+ - New prop `onViewAttachment`, which when defined, will display a new action "View File" that when clicked, will open the file in a new tab (without downloading)
31
+
32
+ ## [0.19.12] - 2025-11-12
33
+
34
+ ### Added
35
+
36
+ - `CheckboxGroup`
37
+ - Added `onChange` prop
38
+
14
39
  ## [0.19.11] - 2025-11-05
15
40
 
16
41
  ### Fixed
@@ -94,6 +94,11 @@ export type CheckboxGroupProps = BaseInputProps & {
94
94
  * Used to customize the label when the static label option is selected or the field is readOnly.
95
95
  */
96
96
  staticLabelProps?: TypographyProps;
97
+ /**
98
+ * OnChange handler, called when the user changes their selection.
99
+ * Provides a string array of selected checkboxes.
100
+ */
101
+ onChange?: (val: string[]) => void;
97
102
  };
98
103
  /**
99
104
  * CheckboxGroup produces a group of checkboxes that's defined as an array of strings or Checkboxes.
@@ -1,6 +1,7 @@
1
- import { Citation, PageState, PageResponse, UnsavedCitation } from '../../../../@types';
1
+ import { Citation } from '../../../../@types';
2
2
  import { BaseInputProps } from '../BaseInputProps';
3
- export type CitationFieldProps = BaseInputProps & {
3
+ import { BaseCitationManagerApiProps } from './CitationManager/BaseCitationManager';
4
+ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps & {
4
5
  /**
5
6
  * (Optional) Label. NOTE: this won't be floating, it's always static.
6
7
  */
@@ -33,40 +34,6 @@ export type CitationFieldProps = BaseInputProps & {
33
34
  * @default 24
34
35
  */
35
36
  citationMaxLength?: number;
36
- /**
37
- * API call for fetching paginated citations. These will populate the "Insert Citation/Attachment(s)" table.
38
- *
39
- * Error handling is supported internally.
40
- */
41
- getCitationsPaginated: (req: PageState) => Promise<PageResponse<Citation>>;
42
- /**
43
- * API call for creating a new citation/attachment.
44
- *
45
- * Error handling is supported internally.
46
- */
47
- onCreateCitation?: (unsavedCitation: UnsavedCitation) => Promise<Citation>;
48
- /**
49
- * API call for updating a citation/attachment.
50
- *
51
- * Error handling is supported internally.
52
- */
53
- onUpdateCitation?: (citation: Citation) => Promise<Citation>;
54
- /**
55
- * API call for updating a citation/attachment.
56
- *
57
- * Error handling is supported internally.
58
- */
59
- onDeleteCitation?: (id: number) => Promise<void>;
60
- /**
61
- * API call for retrieving a citation by id
62
- *
63
- * Error handling is supported internally.
64
- */
65
- getCitationById: (id: number) => Promise<Citation>;
66
- /**
67
- * API call to download the attachment
68
- */
69
- onDownloadAttachment?: (citation: Citation) => Promise<void>;
70
37
  /**
71
38
  * Error callback.
72
39
  *
@@ -1,30 +1,50 @@
1
1
  import { Citation, PageState, PageResponse, UnsavedCitation } from '../../../../../@types';
2
2
  import { ReactNode } from 'react';
3
- export interface BaseCitationManagerProps {
3
+ export type BaseCitationManagerApiProps = {
4
4
  /**
5
5
  * API call for fetching citations. These will populate the "Insert Citation/Attachment(s)" table.
6
+ *
7
+ * Error handling is supported internally.
6
8
  */
7
9
  getCitationsPaginated: (req: PageState) => Promise<PageResponse<Citation>>;
8
10
  /**
9
11
  * API call for creating a new citation/attachment.
12
+ *
13
+ * Error handling is supported internally.
10
14
  */
11
15
  onCreateCitation?: (citation: UnsavedCitation) => Promise<Citation>;
12
16
  /**
13
17
  * API call for updating a citation/attachment.
18
+ *
19
+ * Error handling is supported internally.
14
20
  */
15
21
  onUpdateCitation?: (citation: Citation) => Promise<Citation>;
16
22
  /**
17
23
  * API call for deleting a citation/attachment.
24
+ *
25
+ * Error handling is supported internally.
18
26
  */
19
27
  onDeleteCitation?: (id: number) => Promise<void>;
20
28
  /**
21
29
  * API call for retrieving a citation by id
30
+ *
31
+ * Error handling is supported internally.
22
32
  */
23
33
  getCitationById: (id: number) => Promise<Citation>;
24
34
  /**
25
35
  * API call to download the attachment
36
+ *
37
+ * Error handling is supported internally.
26
38
  */
27
39
  onDownloadAttachment?: (citation: Citation) => Promise<void>;
40
+ /**
41
+ * API call to view the attachment
42
+ *
43
+ * Error handling is supported internally.
44
+ */
45
+ onViewAttachment?: (citation: Citation) => Promise<void>;
46
+ };
47
+ export type BaseCitationManagerProps = BaseCitationManagerApiProps & {
28
48
  /**
29
49
  * Set which citations should be pre-checked in the citations table when this component is first rendered (used
30
50
  * to initialize useState).
@@ -71,7 +91,7 @@ export interface BaseCitationManagerProps {
71
91
  * Whether users can create/edit/delete citations or not
72
92
  */
73
93
  readOnly?: boolean;
74
- }
94
+ };
75
95
  export declare enum CitationManagerState {
76
96
  CITATIONS_TABLE = "Insert Citation/Attachment(s)",
77
97
  ADD_CITATION = "Add Citation",
@@ -88,5 +108,5 @@ export declare enum CitationManagerState {
88
108
  *
89
109
  * For in-line citations, see CitationField instead.
90
110
  */
91
- export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsSelectablePopup, addlActions, canLaunchUrl, readOnly, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
111
+ export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onViewAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsSelectablePopup, addlActions, canLaunchUrl, readOnly, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
92
112
  export default BaseCitationManager;
@@ -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, canLaunchUrl, readOnly, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export default function CitationBubbleMenuTipTap({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onViewAttachment, canLaunchUrl, readOnly, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,16 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
- import { PageState, PageResponse, Citation } from '../../../../../@types';
3
- export type CitationTableProps = {
2
+ import { Citation } from '../../../../../@types';
3
+ import { BaseCitationManagerApiProps } from './BaseCitationManager';
4
+ export type CitationTableProps = Omit<BaseCitationManagerApiProps, 'onCreateCitation' | 'onUpdateCitation' | 'getCitationById'> & {
4
5
  title: string;
5
6
  onCancel: () => void;
6
7
  onNewCitation: () => void;
7
8
  onNewAttachment: () => void;
8
9
  onEditCitation: (citation: Citation) => void;
9
10
  onEditAttachment: (citation: Citation) => void;
10
- onDeleteCitation?: (id: number) => Promise<void>;
11
- onDownloadAttachment?: (citation: Citation) => Promise<void>;
12
11
  onSelect: (selectedIds: number[]) => void;
13
- getCitationsPaginated: (req: PageState) => Promise<PageResponse<Citation>>;
14
12
  selectedIds: number[];
15
13
  setSelectedIds: React.Dispatch<React.SetStateAction<number[]>>;
16
14
  /**