@simoncomputing/mui-bueno-v2 0.18.17 → 0.18.19

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,55 +11,102 @@ 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.19] - 2025-10-09
15
+
16
+ ### Fixed
17
+
18
+ - `CitationField`
19
+ - Field not clearing when formik clears its value
20
+
21
+ ## [0.18.18] - 2025-10-08
22
+
23
+ ### Added
24
+
25
+ - `SelectableCitationManager`
26
+
27
+ - Added `readOnly` prop which when true, will hide the ability to create, update, delete and select/unselect citations/attachments. Note: checkboxes will still be visible but will be disabled.
28
+ - Added built-in close button to the top-right corner. Clicking will trigger `onClose`.
29
+
30
+ - `CitationManager`
31
+
32
+ - Added `readOnly` prop which when true, will hide the ability to create, update and delete citations/attachments.
33
+
34
+ - `CitationField`
35
+ - Added built-in close button to the top-right corner of the citation bubble menu. Clicking will close the bubble menu.
36
+
37
+ ### Changed
38
+
39
+ - `CitationField`
40
+
41
+ - Citation/Attachment bubble menu will now open when clicking on citations embedded in the field when the field is `readOnly`. When clicked, the popup will show a readonly view of the citations/attachments -- create, edit, delete and select/unselect actions are hidden, but the user can still download, view, and launch links. Checkboxes will be disabled but still visible.
42
+
43
+ - `CitationField`, `CitationManager`, `SelectableCitationManager`
44
+
45
+ - When adding an attachment, the "Upload a file" button for selecting a file has been relabeled to "Select a file", and "Add new attachment" button has been relabeled to "Upload Attachment"
46
+ - Adjusted spacing of fields on Attachment create/edit screen
47
+
48
+ - `FileUpload`
49
+ - Updated button styling to prevent text wrapping
50
+ - Changed button label from "Upload a file" to "Select a file"
51
+
14
52
  ## [0.18.17] - 2025-09-30
15
53
 
16
54
  ### Fixed
17
55
 
18
- - `CitationField`
56
+ - `CitationField`
19
57
  - Fixed conditional hook React error when `readOnly` changes
20
58
 
21
59
  ## [0.18.16] - 2025-09-29
22
60
 
23
61
  ### Changed
62
+
24
63
  - `CitationField`
25
64
  - Completely clear out field when empty (including only whitespace characters) instead of resolving to `<p></p>`
26
65
 
27
66
  ## [0.18.15] - 2025-09-29
28
67
 
29
68
  ### Fixed
69
+
30
70
  - `CitationManger`
31
71
  - Clear error when opening/closing modals
32
72
 
33
73
  ## [0.18.14] - 2025-09-29
34
74
 
35
75
  ### Fixed
76
+
36
77
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
37
78
  - Improved error message displayed when API call fails
38
79
 
39
80
  ### Changed
81
+
40
82
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
41
83
  - `onError` param changed from `string` to `obj`
42
84
 
43
85
  ## [0.18.13] - 2025-09-29
44
86
 
45
87
  ### Changed
88
+
46
89
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
47
90
  - Updated errors to allow for backend validation error to display as body of Alert
48
91
 
49
92
  ### Fixed
93
+
50
94
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
95
+
51
96
  - Empty form will display if an error occurs when clicking on the edit button and retrieve API call fails
52
97
 
53
- - `Radio`/`RadioGroup`
98
+ - `Radio`/`RadioGroup`
54
99
  - Fixed `helperText` getting passed to MUI props when it shouldn't
55
100
 
56
101
  ## [0.18.12] - 2025-09-26
57
102
 
58
- ### Added
103
+ ### Added
104
+
59
105
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
60
106
  - `canLaunchUrl` prop which, when defined and returns true, will display a Launch Link icon under the action columnn
61
107
 
62
108
  ### Removed
109
+
63
110
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
64
111
  - `canOpenPublicUrls`. Use `canLaunchUrl` instead
65
112
 
@@ -68,12 +115,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
68
115
  ### Added
69
116
 
70
117
  - `CitationField`
118
+
71
119
  - Added helper text for Classification field
72
120
 
73
121
  - `CitationField`, `CitationManger`, `SelectableCitationManager`
74
122
  - Added `canOpenPublicUrls` prop to enable launch url button to display for public source URLs
75
-
76
123
  - `CitationManger`, `SelectableCitationManager`
124
+
77
125
  - Added tooltips to actions (Edit, Delete, Download, Open URL)
78
126
  - Improved performance of Delete popper by reducing unnecessary re-renders
79
127
 
@@ -1,10 +1,18 @@
1
1
  import { Citation, UnsavedAttachmentCitation } from '../../../../../@types';
2
2
  export type AttachmentFormProps = {
3
- title?: string;
3
+ title: string;
4
4
  onSave: (unsavedAttachment: UnsavedAttachmentCitation) => Promise<void>;
5
5
  onCancel: () => void;
6
- disableFileUpload?: boolean;
7
6
  modifyCitation: Citation | undefined;
7
+ /**
8
+ * If true, file upload is disabled. (Title field is still enabled)
9
+ */
10
+ disableFileUpload?: boolean;
11
+ readOnly?: boolean;
12
+ /**
13
+ * If true, shows a close button inline with title. Intended to be used within modals.
14
+ */
15
+ showCloseBtn?: boolean;
8
16
  };
9
17
  declare const AttachmentForm: (props: AttachmentFormProps) => import("react/jsx-runtime").JSX.Element;
10
18
  export default AttachmentForm;
@@ -67,13 +67,19 @@ export interface BaseCitationManagerProps {
67
67
  * users will be allowed to launch URLs
68
68
  */
69
69
  canLaunchUrl?: (citation: Citation) => boolean;
70
+ /**
71
+ * Whether users can create/edit/delete citations or not
72
+ */
73
+ readOnly?: boolean;
70
74
  }
71
75
  export declare enum CitationManagerState {
72
76
  CITATIONS_TABLE = "Insert Citation/Attachment(s)",
73
77
  ADD_CITATION = "Add Citation",
74
78
  EDIT_CITATION = "Edit Citation",
75
79
  ADD_ATTACHMENT = "Add Attachment",
76
- EDIT_ATTACHMENT = "Edit Attachment"
80
+ EDIT_ATTACHMENT = "Edit Attachment",
81
+ VIEW_CITATION = "View Citation",
82
+ VIEW_ATTACHMENT = "View Attachment"
77
83
  }
78
84
  /**
79
85
  * BaseCitationManager handles creating, updating, deleting, downloading and selecting citations.
@@ -82,5 +88,5 @@ export declare enum CitationManagerState {
82
88
  *
83
89
  * For in-line citations, see CitationField instead.
84
90
  */
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;
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;
86
92
  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, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export default function CitationBubbleMenuTipTap({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, canLaunchUrl, readOnly, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,9 +1,12 @@
1
1
  import { Citation, UnsavedUrlCitation } from '../../../../../@types';
2
2
  export type CitationFormProps = {
3
- title?: string;
3
+ title: string;
4
4
  onSave: (unsavedUrl: UnsavedUrlCitation) => Promise<void>;
5
5
  onCancel: () => void;
6
6
  modifyCitation: Citation | undefined;
7
+ readOnly?: boolean;
8
+ /** If true, shows a close button inline with title. Intended to be used within modals. */
9
+ showCloseBtn?: boolean;
7
10
  };
8
11
  declare const CitationForm: (props: CitationFormProps) => import("react/jsx-runtime").JSX.Element;
9
12
  export default CitationForm;
@@ -34,12 +34,28 @@ export type CitationTableProps = {
34
34
  canSelect?: boolean;
35
35
  /**
36
36
  * When true, create citation & attachment buttons will display.
37
+ *
38
+ * Can be overridden by readOnly
37
39
  */
38
40
  canCreate?: boolean;
39
41
  /**
40
42
  * When true, edit citation icon buttons will display for each row.
43
+ *
44
+ * Can be overridden by readOnly
41
45
  */
42
46
  canEdit?: boolean;
47
+ /**
48
+ * When true, delete citation icon buttons will display for each row.
49
+ *
50
+ * Can be overridden by readOnly
51
+ */
52
+ canDelete?: boolean;
53
+ /**
54
+ * If true, renders as readOnly table. Overrides canCreate, canEdit, canDelete.
55
+ *
56
+ * If canSelect is true, checkboxes will render as disabled.
57
+ */
58
+ readOnly?: boolean;
43
59
  /**
44
60
  * When provided and the function returns true,
45
61
  * users will be allowed to launch URLs
@@ -53,6 +69,8 @@ export type CitationTableProps = {
53
69
  * Used to trigger a re-fetch of table data (via getPaginatedCitations)
54
70
  */
55
71
  refreshKey?: number;
72
+ /** If true, shows a close button inline with title. Intended to be used within modals. */
73
+ showCloseBtn?: boolean;
56
74
  };
57
75
  declare const CitationTable: (props: CitationTableProps) => import("react/jsx-runtime").JSX.Element;
58
76
  export default CitationTable;