@simoncomputing/mui-bueno-v2 0.25.20 → 0.25.22

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,30 @@ 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.25.22] - 2026-02-27
15
+
16
+ ### Added
17
+
18
+ - `SearchField`, `PageHeader`
19
+ - `onSearch` is now debounced at 500ms, which can be optionally overridden via the `debounceMillis` prop
20
+
21
+ ### Changed
22
+
23
+ - `SelectableCitationManager`, `CitationManager`, `CitationField`
24
+ - Search is debounced by 500ms to avoid excessive calls to `getCitationsPaginated`/`getSelectedCiationsPaginated`
25
+
26
+ ## [0.25.21] - 2026-02-27
27
+
28
+ ### Added
29
+
30
+ - `SelectableCitationManager`, `CitationManager`, `CitationField`
31
+ - Added `canSearch` prop. When true, a search bar is displayed above the citations table. The search input text can be obtained from `pageState.search` in `getCitationsPaginated(pageState: PageState)` & `getSelectedCiationsPaginated(pageState: PageState)` to allow for backend filtering.
32
+
33
+ ### Fixed
34
+
35
+ - `SearchField`
36
+ - Fixed TSDoc for props
37
+
14
38
  ## [0.25.20] - 2026-02-26
15
39
 
16
40
  ### Fixed
@@ -19,6 +19,11 @@ export type PageState = {
19
19
  * Page size for paginated results (number of rows).
20
20
  */
21
21
  pageSize: number;
22
+
23
+ /**
24
+ * (Optional) Search criteria. For tables that support searching.
25
+ */
26
+ search?: string;
22
27
  };
23
28
 
24
29
  /**
@@ -47,7 +52,6 @@ export type Filter = {
47
52
 
48
53
  export type PaginationState = PageState & {
49
54
  totalCount: number;
50
- // searchTerm?: string;
51
55
  sortField?: string;
52
56
  sortOrder?: 'asc' | 'desc';
53
57
  };
@@ -56,6 +56,12 @@ export type CitationFieldProps = BaseInputProps & BaseCitationManagerApiProps &
56
56
  * users will be allowed to launch URLs
57
57
  */
58
58
  canLaunchUrl?: (citation: Citation) => boolean;
59
+ /**
60
+ * When true, search bar is displayed in pop-up above table.
61
+ *
62
+ * "search" will be passed to `getCitationsPaginated` with the search input text
63
+ */
64
+ canSearch?: boolean;
59
65
  };
60
66
  /**
61
67
  * Rich Text field -- uses MUI Tip Tap
@@ -100,6 +100,13 @@ export type BaseCitationManagerProps = BaseCitationManagerApiProps & {
100
100
  * Whether users can create/edit/delete citations or not
101
101
  */
102
102
  readOnly?: boolean;
103
+ /**
104
+ * When true, search bar is displayed.
105
+ *
106
+ * { "search": <search input value> } will be passed to `getCitationsPaginated`/`getSelectedCitationsPaginated` along
107
+ * with the request
108
+ */
109
+ canSearch?: boolean;
103
110
  };
104
111
  export declare enum CitationManagerState {
105
112
  CITATIONS_TABLE = "Insert Citation/Attachment(s)",
@@ -117,5 +124,5 @@ export declare enum CitationManagerState {
117
124
  *
118
125
  * For in-line citations, see CitationField instead.
119
126
  */
120
- export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsPopup, canSelect, tableTitle, addlActions, canLaunchUrl, readOnly, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
127
+ export declare function BaseCitationManager({ getCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, onSelectCitations, onCancel, initialSelectedIds, onContentChange, onError, renderAsPopup, canSelect, tableTitle, addlActions, canLaunchUrl, readOnly, canSearch, }: BaseCitationManagerProps): import("react/jsx-runtime").JSX.Element;
121
128
  export default BaseCitationManager;
@@ -23,4 +23,4 @@ export type CitationBubbleMenuProps = Partial<Omit<ControlledBubbleMenuProps, 'o
23
23
  * update, which will happen if it's a child of the component using
24
24
  * `useEditor`).
25
25
  */
26
- export default function CitationBubbleMenuTipTap({ getCitationsPaginated, getSelectedCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, canLaunchUrl, readOnly, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
26
+ export default function CitationBubbleMenuTipTap({ getCitationsPaginated, getSelectedCitationsPaginated, onCreateCitation, onUpdateCitation, onDeleteCitation, getCitationById, onDownloadAttachment, onPreviewAttachment, canLaunchUrl, readOnly, canSearch, ...controlledBubbleMenuProps }: CitationBubbleMenuProps): import("react/jsx-runtime").JSX.Element | null;
@@ -39,6 +39,12 @@ export type CitationTableProps = Omit<BaseCitationManagerApiProps, 'onCreateCita
39
39
  * Can be overridden by readOnly
40
40
  */
41
41
  canCreate?: boolean;
42
+ /**
43
+ * When true, search bar is displayed.
44
+ *
45
+ * "search" will be passed to `getCitationsPaginated` with the search input text
46
+ */
47
+ canSearch?: boolean;
42
48
  /**
43
49
  * If true, renders as readOnly table. Overrides canCreate, canEdit, canDelete.
44
50
  *
@@ -1,13 +1,20 @@
1
- /**
2
- * Interface for SearchField props.
3
- * @property {(value?: string) => void} onSearch - called each time user types a character in the input field, or when they click the search bar/'Enter' key
4
- * @property {string} initialValue - initial value (may be useful if using Redux)
5
- * @property {boolean} lazySearch - If true, onSearch will only be called when user clicks search button/'Enter' key
6
- */
7
1
  export type SearchFieldProps = {
8
- onSearch: (value?: string) => void;
2
+ /**
3
+ * Called each time user types a character in the input field, or when they click the search bar/'Enter' key
4
+ */
5
+ onSearch: (value: string) => void;
6
+ /**
7
+ * Initial value for the input (may be useful if using Redux)
8
+ */
9
9
  initialValue?: string;
10
+ /**
11
+ * If true, onSearch will only be called when user clicks search button/'Enter' key
12
+ */
10
13
  lazySearch?: boolean;
14
+ /**
15
+ * Override the debounce search value, in milliseconds. Default: 500ms
16
+ */
17
+ debounceMillis?: number;
11
18
  };
12
19
  /**
13
20
  * Search Field component. Can be used by itself, and/or with a table to filter data (Table/PagingTable).