@simoncomputing/mui-bueno-v2 0.19.12 → 0.19.14
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 +25 -0
- package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +3 -36
- package/dist/components/Form/Inputs/CitationField/CitationManager/BaseCitationManager.d.ts +23 -3
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationBubbleMenu.d.ts +1 -1
- package/dist/components/Form/Inputs/CitationField/CitationManager/CitationTable.d.ts +3 -5
- package/dist/index.cjs.js +103 -103
- package/dist/index.es.js +8417 -8361
- package/dist/index.umd.js +99 -99
- package/package.json +1 -1
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.14] - 2025-11-17
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- `CitationField`, `SelectableCitationManager`, `CitationManager`
|
|
19
|
+
- Restricted the file types that will show the view button when `onViewAttachment` is defined
|
|
20
|
+
|
|
21
|
+
## [0.19.13] - 2025-11-17
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- `CitationField`
|
|
26
|
+
- Removed outline when `readOnly=true`
|
|
27
|
+
- Fixed `margin` affecting space between label & field
|
|
28
|
+
|
|
29
|
+
## Changed
|
|
30
|
+
|
|
31
|
+
- `CitationField`, `SelectableCitationManager`
|
|
32
|
+
- Long titles will be truncated in the table view
|
|
33
|
+
|
|
34
|
+
## Added
|
|
35
|
+
|
|
36
|
+
- `CitationField`, `SelectableCitationManager`, `CitationManager`
|
|
37
|
+
- 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)
|
|
38
|
+
|
|
14
39
|
## [0.19.12] - 2025-11-12
|
|
15
40
|
|
|
16
41
|
### Added
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Citation
|
|
1
|
+
import { Citation } from '../../../../@types';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
|
-
|
|
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
|
|
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 {
|
|
3
|
-
|
|
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
|
/**
|