@simoncomputing/mui-bueno-v2 0.33.2 → 0.34.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 +17 -0
- package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +9 -1
- package/dist/components/Form/Inputs/CitationField/MenuComment/MenuComment.d.ts +22 -0
- package/dist/index.cjs.js +98 -97
- package/dist/index.es.js +8872 -8827
- package/dist/index.umd.js +99 -98
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,23 @@ 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.34.0] - 2026-07-06
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `CitationField`
|
|
19
|
+
- `onComment?: (selectedText: string) => void` (prop) - if defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback
|
|
20
|
+
- `canComment?: boolean` (prop) - enables/disables Comment button (`onComment` must be defined)
|
|
21
|
+
- `commentCount?: number;` (prop) - shows count in badge on Comment button
|
|
22
|
+
- `commentResolved?: boolean;` (prop) - shows green checkmark in badge on Comment button
|
|
23
|
+
|
|
24
|
+
## [0.33.3] - 2026-07-06
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- `CitationField`
|
|
29
|
+
- Redo/Undo buttons no longer show by default. Use `redoUndo` prop to enable (note: they do not work perfectly due to clash with debounced formik value).
|
|
30
|
+
|
|
14
31
|
## [0.33.2] - 2026-07-02
|
|
15
32
|
|
|
16
33
|
### Changed
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Citation, PageResponse, PageState } from '../../../../@types';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
3
|
import { BaseCitationManagerApiProps } from './CitationManager/BaseCitationManager';
|
|
4
|
+
import { CommentProps } from './MenuComment/MenuComment';
|
|
4
5
|
export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps & {
|
|
5
6
|
/**
|
|
6
7
|
* API call for fetching SELECTED citations. Used instead of getCitationsPaginated when the component is readOnly.
|
|
@@ -62,7 +63,14 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
|
|
|
62
63
|
* "search" will be passed to `getCitationsPaginated` with the search input text
|
|
63
64
|
*/
|
|
64
65
|
canSearch?: boolean;
|
|
65
|
-
|
|
66
|
+
/**
|
|
67
|
+
* If true, shows Redo & Undo buttons at the bottom of the editor. Uses Mui TipTap's built-in functionality
|
|
68
|
+
* for redo/undo.
|
|
69
|
+
*
|
|
70
|
+
* WARNING: Does not work perfectly, due to conflicts with debounced formik value.
|
|
71
|
+
*/
|
|
72
|
+
redoUndo?: boolean;
|
|
73
|
+
} & CommentProps;
|
|
66
74
|
/**
|
|
67
75
|
* Rich Text field -- uses MUI Tip Tap
|
|
68
76
|
*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MenuButtonProps } from 'mui-tiptap';
|
|
2
|
+
export type CommentProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Enables/disables comment button (To be used with `onComment`)
|
|
5
|
+
*/
|
|
6
|
+
canComment?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* If defined, shows "Comments" button in the menu bar. Clicking the button will trigger this callback.
|
|
9
|
+
* @param selectedText If the user has selected text within the field, the selected text will be passed here.
|
|
10
|
+
*/
|
|
11
|
+
onComment?: (selectedText: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Shows badge with count on comment button
|
|
14
|
+
*/
|
|
15
|
+
commentCount?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Shows green checkmark badge on comment button
|
|
18
|
+
*/
|
|
19
|
+
commentResolved?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type MenuCommentProps = Partial<MenuButtonProps> & CommentProps;
|
|
22
|
+
export default function MenuComment({ canComment, onComment, commentCount, commentResolved, ...menuButtonProps }: MenuCommentProps): import("react/jsx-runtime").JSX.Element | null;
|