@simoncomputing/mui-bueno-v2 0.25.25 → 0.26.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 CHANGED
@@ -11,6 +11,45 @@ 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.26.0] - 2026-03-16
15
+
16
+ ### Changed
17
+
18
+ - `CitationManager`, `SelectableCitationManager`, `CitationField`
19
+ - Source field is no longer required
20
+ - Order of Title & Source swapped so that Title is before Source
21
+ - Rename "URL" field to "URL / Other Identifier"
22
+ - Rename "URL/File Name" column to "URL/Other Identifier/File Name"
23
+
24
+ - `SelectableCitationManager`, `CitationField`
25
+ - Increased truncation of "Title" to account for new "URL / Other Identifier" column
26
+
27
+ ### Added
28
+
29
+ - `Table`, `PaginatedTable`
30
+ - Added `checkedIds` & `setCheckedIds` props that, when defined, will show a checkbox column in the table
31
+ - Improved console warnings to reduce collision issues or missing props
32
+
33
+ - `CitationManager`, `SelectableCitationManager`, `CitationField`
34
+ - New field "Details" (optional)
35
+
36
+ - `SelectableCitationManager`, `CitationField`
37
+ - Add "URL / Other Identifier" column
38
+ - Truncated "Title" or "URL / Other Identifier" can be hovered over to see the full title/url/other identifier
39
+
40
+ ### Fixed
41
+
42
+ - `CitationManager`, `SelectableCitationManager`, `CitationField`
43
+ - Classification field is now disabled during form submission, like the other fields
44
+
45
+ - `SelectableCitationManager`, `CitationField`
46
+ - Table was not adjusting to screen size so removed static size constraint
47
+
48
+ ### Removed
49
+
50
+ - `Table`, `PaginatedTable`
51
+ - Replaced `hideColumnsOnMobile` prop with `TableColumn.hideOnMobile` to be more consistent with `TableColumn.hideCol`
52
+
14
53
  ## [0.25.25] - 2026-03-03
15
54
 
16
55
  ### Fixed
@@ -111,27 +111,56 @@ export type EnvironmentInfo = {
111
111
 
112
112
  /**
113
113
  * TableColumn represents a column in a table where `K` represents a property of `T`
114
- * EXAMPLE: For a table of users, this would be the `TableColumn` defintion for the
115
- * phone number column: TableColumn<User, 'phoneNumber'>.
116
- *
117
- * @property {string} label - Label that will display in the Table header for the column
118
- * @property {string} fieldName - Property name of the object
119
- * @property {(value: K, object: T, isMobile: boolean) => React.ReactNode} render - customize
120
- * how the data is displayed in the column where `value` is the property value. `object`
121
- * is the whole object, in case you need to determine styling based on another property
122
- * within the object. isMobile in case your styling depends on whether the user is viewing
123
- * on a phone vs tablet/desktop
124
- * @property {SxProps<Theme>} tableCellSx - (Optional) styles applies to TableCell (non-mobile)
125
- * @property {boolean} hideCol - (Optional) if true, this column will not be displayed
126
- * @property {string} tooltip - (Optional) if provided, shows a help icon with the specified tooltip when hovered
114
+ * EXAMPLE: For a table of users, this would be the defintion for the phone number column: TableColumn<User, 'phoneNumber'>.
127
115
  */
128
116
  export type TableColumn<T, K extends keyof T> = {
117
+ /**
118
+ * Property name of the object (ex. 'id', 'firstName', etc.)
119
+ */
120
+ fieldName: K;
121
+
122
+ /**
123
+ * (Optional) Unique key to identify this column. This should be defined if your table has more than one
124
+ * column with the same `fieldName`
125
+ */
129
126
  key?: string;
127
+
128
+ /**
129
+ * (Optional) Label that will display in the Table header for the column.
130
+ * By default, the key, or fieldName as fallback, will be converted into title case (ex 'firstName' -> 'First Name')
131
+ */
130
132
  label?: string;
131
- fieldName: K;
133
+
134
+ /**
135
+ * (Optional) Customize how the data is displayed in the column where `value` is the property value (based on `fieldName`).
136
+ * By default, the value is rendered as-is.
137
+ *
138
+ * `object` is the whole object, in case you need to determine styling based on another property
139
+ * within the object.
140
+ *
141
+ * `isMobile` in case your styling depends on whether the user is viewing
142
+ * on a phone vs tablet/desktop
143
+ */
132
144
  render?: (value: T[K], object: T, isMobile: boolean) => React.ReactNode;
145
+
146
+ /**
147
+ * (Optional) styles applies to TableCell (non-mobile)
148
+ */
133
149
  tableCellSx?: SxProps<Theme>;
150
+
151
+ /**
152
+ * (Optional) if true, this column will not be displayed
153
+ */
134
154
  hideCol?: boolean;
155
+
156
+ /**
157
+ * (Optional) if true, this column will not be displayed on small/mobile screens
158
+ */
159
+ hideOnMobile?: boolean;
160
+
161
+ /**
162
+ * (Optional) if provided, shows a help icon with the specified tooltip when hovered
163
+ */
135
164
  tooltip?: string;
136
165
  };
137
166
 
@@ -213,6 +242,7 @@ export type Citation = {
213
242
  source?: string; // publisher
214
243
  accessedAt?: string | null;
215
244
  classification?: string; // public, unclassified
245
+ details?: string;
216
246
  };
217
247
 
218
248
  /**
@@ -80,29 +80,24 @@ export declare const baseCitationTableColumns: (palette: Palette, condenseTable?
80
80
  label: string;
81
81
  render: (fileName: string | undefined, citation: Citation) => import("react/jsx-runtime").JSX.Element;
82
82
  ignoreDiff: boolean;
83
- tableCellSx?: undefined;
84
- hideCol?: undefined;
85
83
  isEqual?: undefined;
84
+ hideCol?: undefined;
86
85
  } | {
87
86
  fieldName: string;
88
- tableCellSx: {
89
- width: string;
90
- };
91
- render: (title: string) => string;
87
+ render: (title: string) => import("react/jsx-runtime").JSX.Element;
92
88
  key?: undefined;
93
89
  label?: undefined;
94
90
  ignoreDiff?: undefined;
95
- hideCol?: undefined;
96
91
  isEqual?: undefined;
92
+ hideCol?: undefined;
97
93
  } | {
98
94
  fieldName: string;
99
95
  key: string;
100
96
  label: string;
101
- hideCol: boolean;
102
97
  render: (fileName: string, citation: Citation) => import("react/jsx-runtime").JSX.Element;
103
98
  isEqual: (citation1: Citation, citation2: Citation) => boolean;
104
99
  ignoreDiff?: undefined;
105
- tableCellSx?: undefined;
100
+ hideCol?: undefined;
106
101
  } | {
107
102
  fieldName: string;
108
103
  hideCol: boolean;
@@ -110,7 +105,6 @@ export declare const baseCitationTableColumns: (palette: Palette, condenseTable?
110
105
  label?: undefined;
111
106
  render?: undefined;
112
107
  ignoreDiff?: undefined;
113
- tableCellSx?: undefined;
114
108
  isEqual?: undefined;
115
109
  } | {
116
110
  fieldName: string;
@@ -119,6 +113,5 @@ export declare const baseCitationTableColumns: (palette: Palette, condenseTable?
119
113
  key?: undefined;
120
114
  label?: undefined;
121
115
  ignoreDiff?: undefined;
122
- tableCellSx?: undefined;
123
116
  isEqual?: undefined;
124
117
  })[];
@@ -31,9 +31,13 @@ export type BaseTableProps<T> = {
31
31
  */
32
32
  onRowClickObj?: (obj: T) => void;
33
33
  /**
34
- * Define which columns (fieldName) to hide on mobile/small screens
34
+ * For tables with selectable rows. When defined, shows checkbox as first column.
35
35
  */
36
- hideColumnsOnMobile?: string[];
36
+ checkedIds?: number[];
37
+ /**
38
+ * For tables with selectable rows. When defined, shows checkbox as first column.
39
+ */
40
+ setCheckedIds?: React.Dispatch<React.SetStateAction<number[]>>;
37
41
  /**
38
42
  * fieldName of field to be sorted (can be provided via redux)
39
43
  */