@simoncomputing/mui-bueno-v2 0.29.4 → 0.31.0
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 +38 -0
- package/dist/components/Form/Inputs/CitationField/CitationManager/BaseCitationManager.d.ts +6 -6
- package/dist/components/Form/Inputs/CitationField/CitationManager/Buttons/DownloadFileBtn.d.ts +7 -0
- package/dist/components/Form/Inputs/CitationField/CitationManager/Buttons/LaunchUrlBtn.d.ts +8 -0
- package/dist/components/Form/Inputs/CitationField/CitationManager/Buttons/PreviewFileBtn.d.ts +7 -0
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationBubbleMenu.d.ts +1 -1
- package/dist/components/Form/Inputs/CitationField/CitationManager/{AttachmentForm.d.ts → CitationForms/AttachmentForm.d.ts} +5 -6
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationForms/CitationFormActions/CitationFormActions.d.ts +13 -0
- package/dist/components/Form/Inputs/CitationField/CitationManager/{UrlForm.d.ts → CitationForms/UrlForm.d.ts} +4 -4
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationManager.d.ts +1 -1
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationTable.d.ts +4 -4
- package/dist/components/Form/Inputs/CitationField/CitationManager/Poppers/LaunchUrlPopper/LaunchUrlPopper.d.ts +1 -0
- package/dist/index.cjs.js +105 -105
- package/dist/index.es.js +11558 -11443
- package/dist/index.umd.js +103 -103
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,44 @@ 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.31.0] - 2026-06-19
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `CitationManager`/`SelectableCitationManager`
|
|
19
|
+
- Added close buttons to the top-right of the edit/view pop-up
|
|
20
|
+
|
|
21
|
+
- `CitationField`/`CitationManager`/`SelectableCitationManager`
|
|
22
|
+
- Added extra param `selectedIds` to `getCitationsPaginated: (req: PageState, selectedIds: number[])` which will provide the selected ids of the citations, if any, of the current target. If none, the array will be empty. This is recommended to be used to assist with server-side sorting so that the paginated citations will return with the selected citations listed first.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- `CitationField`/`CitationManager`/`SelectableCitationManager`
|
|
27
|
+
- Fixed title of edit/view popup, which was showing "Edit Citation"/"Edit Attachment" when the form was read-only
|
|
28
|
+
|
|
29
|
+
## [0.30.0] - 2026-06-19
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `CitationField`
|
|
34
|
+
- When user clicks on a **_single_** inline citation, the popup will open directly to the detail page
|
|
35
|
+
- A "View All Citations" button is available to allow the user to append other citations and/or make other changes
|
|
36
|
+
- "Save"/"Cancel" buttons will close the popup, unless the user clicks "View All Citaitons", then normal routing will resume (i.e., the user will be taken to the citation table when clicking "Save"/"Cancel" and the "View All Citations" button will not display)
|
|
37
|
+
- `CitationManager`, `SelectableCitationManager`
|
|
38
|
+
- Renamed `onCancel` to `onClose` to clarify that the popup should close by the caller when this is called
|
|
39
|
+
- `CitationField`, `CitationManager`, `SelectableCitationManager`
|
|
40
|
+
- `getCitationById` parameter type changed from `citation: Citation` to `citationId: number`
|
|
41
|
+
- Users on a the detailed citation view can now launch URLs and preview/download attachments
|
|
42
|
+
- `canLaunchUrl` must return true for URLs to launchable
|
|
43
|
+
- URL will display as a hyperlink when the form is read-only
|
|
44
|
+
- Replaced "Save" button labels ("Create New Citation"/"Upload Attachment"/"Update Citation"/"Update Attachment") with generic "Save" label for consistency
|
|
45
|
+
- Tweaked minimum width to be `400px` instead of `300px`
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- `DateField`/`DateRangeField`
|
|
50
|
+
- Fixed size of label not consistent with other fields when `readOnly` prop is true
|
|
51
|
+
|
|
14
52
|
## [0.29.4] - 2026-06-04
|
|
15
53
|
|
|
16
54
|
### Fixed
|
|
@@ -6,7 +6,7 @@ export type BaseCitationManagerApiProps = {
|
|
|
6
6
|
*
|
|
7
7
|
* Error handling is supported internally.
|
|
8
8
|
*/
|
|
9
|
-
getCitationsPaginated: (req: PageState) => Promise<PageResponse<Citation>>;
|
|
9
|
+
getCitationsPaginated: (req: PageState, selectedIds: number[]) => Promise<PageResponse<Citation>>;
|
|
10
10
|
/**
|
|
11
11
|
* API call for creating a new citation/attachment.
|
|
12
12
|
*
|
|
@@ -57,8 +57,10 @@ export type BaseCitationManagerProps = BaseCitationManagerApiProps & {
|
|
|
57
57
|
onSelectCitations: (citationIds: number[]) => void;
|
|
58
58
|
/**
|
|
59
59
|
* Callback for when the user clicks the "Cancel" button. If you're using a modal, close your modal here.
|
|
60
|
+
*
|
|
61
|
+
* Button is named "Cancel" instead of "Close" because if the user has changed their selection, it will not be saved.
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
onClose: () => void;
|
|
62
64
|
/**
|
|
63
65
|
* Callback whenever the size of the content potentially changes. Use this if you're using something like
|
|
64
66
|
* a Popper, so that it can reposition itself when the dimensions of its content changes.
|
|
@@ -113,9 +115,7 @@ export declare enum CitationManagerState {
|
|
|
113
115
|
ADD_CITATION = "Add Citation",
|
|
114
116
|
EDIT_CITATION = "Edit Citation",
|
|
115
117
|
ADD_ATTACHMENT = "Add Attachment",
|
|
116
|
-
EDIT_ATTACHMENT = "Edit Attachment"
|
|
117
|
-
VIEW_CITATION = "View Citation",
|
|
118
|
-
VIEW_ATTACHMENT = "View Attachment"
|
|
118
|
+
EDIT_ATTACHMENT = "Edit Attachment"
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* BaseCitationManager handles creating, updating, deleting, downloading and selecting citations.
|
|
@@ -124,5 +124,5 @@ export declare enum CitationManagerState {
|
|
|
124
124
|
*
|
|
125
125
|
* For in-line citations, see CitationField instead.
|
|
126
126
|
*/
|
|
127
|
-
export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations,
|
|
127
|
+
export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations, onClose, initialSelectedIds, onContentChange, onError, renderAsPopup, canSelect, tableTitle, addlActions, canLaunchUrl, readOnly, canSearch, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
128
128
|
export default BaseCitationManager;
|
package/dist/components/Form/Inputs/CitationField/CitationManager/Buttons/DownloadFileBtn.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Citation } from '../../../../../../@types';
|
|
2
|
+
export type DownloadFileBtnProps = {
|
|
3
|
+
citation: Citation;
|
|
4
|
+
onDownloadAttachment?: (citation: Citation) => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export declare function DownloadFileBtn({ onDownloadAttachment, citation }: DownloadFileBtnProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
7
|
+
export default DownloadFileBtn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Citation } from '../../../../../../@types';
|
|
2
|
+
export type LaunchUrlBtnProps = {
|
|
3
|
+
canLaunchUrl?: (citation: Citation) => boolean;
|
|
4
|
+
citation: Citation;
|
|
5
|
+
asLink?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function LaunchUrlBtn({ canLaunchUrl, citation, asLink }: LaunchUrlBtnProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default LaunchUrlBtn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Citation } from '../../../../../../@types';
|
|
2
|
+
export type PreviewFileBtnProps = {
|
|
3
|
+
citation: Citation;
|
|
4
|
+
onPreviewAttachment?: (citation: Citation) => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export declare function DownloadFileBtn({ onPreviewAttachment, citation }: PreviewFileBtnProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
7
|
+
export default DownloadFileBtn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ControlledBubbleMenuProps } from 'mui-tiptap';
|
|
2
2
|
import { SelectableCitationManagerProps } from './SelectableCitationManager';
|
|
3
|
-
export type CitationBubbleMenuProps = Partial<Omit<ControlledBubbleMenuProps, 'open' | 'editor' | 'children' | 'classes'>> & Omit<SelectableCitationManagerProps, '
|
|
3
|
+
export type CitationBubbleMenuProps = Partial<Omit<ControlledBubbleMenuProps, 'open' | 'editor' | 'children' | 'classes'>> & Omit<SelectableCitationManagerProps, 'onClose' | 'onSelectCitations'> & {
|
|
4
4
|
onChanged?: (ids: number[]) => void;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Citation, UnsavedAttachmentCitation } from '
|
|
1
|
+
import { Citation, UnsavedAttachmentCitation } from '../../../../../../@types';
|
|
2
2
|
export type AttachmentFormProps = {
|
|
3
|
-
title: string;
|
|
4
3
|
onSave: (unsavedAttachment: UnsavedAttachmentCitation) => Promise<void>;
|
|
5
4
|
onCancel: () => void;
|
|
5
|
+
onViewCitationTable: () => void;
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
modifyCitation: Citation | undefined;
|
|
8
8
|
/**
|
|
@@ -10,10 +10,9 @@ export type AttachmentFormProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
disableFileUpload?: boolean;
|
|
12
12
|
readOnly?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
showCloseBtn?: boolean;
|
|
13
|
+
showViewAllCitationsBtn?: boolean;
|
|
14
|
+
onDownloadAttachment: ((citation: Citation) => Promise<void>) | undefined;
|
|
15
|
+
onPreviewAttachment: ((citation: Citation) => Promise<void>) | undefined;
|
|
17
16
|
};
|
|
18
17
|
declare const AttachmentForm: (props: AttachmentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export default AttachmentForm;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CitationFormActionsProps = {
|
|
2
|
+
onCancel: () => void;
|
|
3
|
+
onViewCitationTable: () => void;
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
showViewAllCitationsBtn?: boolean;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
onSaveClicked: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Action buttons (Save, Cancel, View All Citations) for the Citation/URL and Attachment forms
|
|
11
|
+
*/
|
|
12
|
+
declare const CitationFormActions: (props: CitationFormActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export default CitationFormActions;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Citation, UnsavedUrlCitation } from '
|
|
1
|
+
import { Citation, UnsavedUrlCitation } from '../../../../../../@types';
|
|
2
2
|
export type UrlFormProps = {
|
|
3
|
-
title: string;
|
|
4
3
|
onSave: (unsavedUrl: UnsavedUrlCitation) => Promise<void>;
|
|
5
4
|
onCancel: () => void;
|
|
5
|
+
onViewCitationTable: () => void;
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
modifyCitation: Citation | undefined;
|
|
8
8
|
readOnly?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
showViewAllCitationsBtn?: boolean;
|
|
10
|
+
canLaunchUrl?: (citation: Citation) => boolean;
|
|
11
11
|
};
|
|
12
12
|
declare const UrlForm: (props: UrlFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default UrlForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCitationManagerProps } from './BaseCitationManager';
|
|
2
|
-
export type CitationManagerProps = Omit<BaseCitationManagerProps, 'initialSelectedIds' | 'onSelectCitations' | '
|
|
2
|
+
export type CitationManagerProps = Omit<BaseCitationManagerProps, 'initialSelectedIds' | 'onSelectCitations' | 'onClose' | 'onContentChange' | 'renderAsPopup' | 'canSelect'>;
|
|
3
3
|
/**
|
|
4
4
|
* CitationManager is a basic table that handles creating, updating, and deleting citations.
|
|
5
5
|
*/
|
|
@@ -7,10 +7,10 @@ export type CitationTableProps = Omit<BaseCitationManagerApiProps, 'onCreateCita
|
|
|
7
7
|
onCancel: () => void;
|
|
8
8
|
onNewCitation: () => void;
|
|
9
9
|
onNewAttachment: () => void;
|
|
10
|
-
onEditCitation?: (
|
|
11
|
-
onEditAttachment?: (
|
|
12
|
-
onViewCitation?: (
|
|
13
|
-
onViewAttachment?: (
|
|
10
|
+
onEditCitation?: (citationId: number) => void;
|
|
11
|
+
onEditAttachment?: (citationId: number) => void;
|
|
12
|
+
onViewCitation?: (citationId: number) => void;
|
|
13
|
+
onViewAttachment?: (citationId: number) => void;
|
|
14
14
|
onSelect: (selectedIds: number[]) => void;
|
|
15
15
|
selectedIds: number[];
|
|
16
16
|
setSelectedIds: React.Dispatch<React.SetStateAction<number[]>>;
|