@cerebruminc/cerebellum 11.1.1 → 11.2.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Table } from "./Table";
|
|
2
2
|
import { TableOptionLabel } from "./TableOptionLabel";
|
|
3
|
-
import { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditEnum, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType,
|
|
3
|
+
import { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditEnum, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType, TableFocusEventType, TableMouseEventType, TableOptionLabelType, TableOptionType, TablePaginationType, TableType } from "./types";
|
|
4
4
|
export { EditEnum, Table, TableOptionLabel };
|
|
5
|
-
export type { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType, TableOptionLabelType, TableOptionType, TableType, };
|
|
5
|
+
export type { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType, TableFocusEventType, TableMouseEventType, TableOptionLabelType, TableOptionType, TablePaginationType, TableType, };
|
|
@@ -79,15 +79,9 @@ export interface TableType {
|
|
|
79
79
|
/** If provided, this function will determine if each row should be clickable. It must return a boolean. Has no effect if clickRow is not provided */
|
|
80
80
|
isRowClickable?: (props: IsRowClickableType) => boolean;
|
|
81
81
|
/** Called when a row is hovered */
|
|
82
|
-
mouseEnterRow?: (props:
|
|
83
|
-
event: MouseEvent<HTMLDivElement>;
|
|
84
|
-
row: RowType;
|
|
85
|
-
}) => void;
|
|
82
|
+
mouseEnterRow?: (props: TableMouseEventType) => void;
|
|
86
83
|
/** Called when row hover ends */
|
|
87
|
-
mouseLeaveRow?: (props:
|
|
88
|
-
event: MouseEvent<HTMLDivElement>;
|
|
89
|
-
row: RowType;
|
|
90
|
-
}) => void;
|
|
84
|
+
mouseLeaveRow?: (props: TableMouseEventType) => void;
|
|
91
85
|
/** A field in `rows` that determines if the row should appear in a loading state. Defaults to `loading` */
|
|
92
86
|
loadingRowId?: string;
|
|
93
87
|
/** This will enable a button in the no results state, and will be called when the button is clicked. Usually it will clear the filters or a similar action */
|
|
@@ -101,10 +95,7 @@ export interface TableType {
|
|
|
101
95
|
/** Will close menus & tooltips when this element scrolls. This must be supplied on mount. Defaults to `window` */
|
|
102
96
|
observeScrollRef?: RefObject<HTMLElement>;
|
|
103
97
|
/** Called when a row loses focus. Please note that this is called when transitioning between cells in the same row */
|
|
104
|
-
onBlurRow?: (props:
|
|
105
|
-
event: FocusEvent<HTMLDivElement>;
|
|
106
|
-
row: RowType;
|
|
107
|
-
}) => void;
|
|
98
|
+
onBlurRow?: (props: TableFocusEventType) => void;
|
|
108
99
|
/** This will be returned when the editing action is complete, with the new data for `row`. See below for more information on the edit feature */
|
|
109
100
|
onEdit?: (row: RowType) => void;
|
|
110
101
|
/** Called when the filter menu closes */
|
|
@@ -112,14 +103,9 @@ export interface TableType {
|
|
|
112
103
|
/** Called when the filter menu opens */
|
|
113
104
|
onFilterMenuOpen?: () => void;
|
|
114
105
|
/** Called when a row is focused. Please note that this is called when transitioning between cells in the same row */
|
|
115
|
-
onFocusRow?: (props:
|
|
116
|
-
event: FocusEvent<HTMLDivElement>;
|
|
117
|
-
row: RowType;
|
|
118
|
-
}) => void;
|
|
106
|
+
onFocusRow?: (props: TableFocusEventType) => void;
|
|
119
107
|
/** Called when pagination is updated. Required for external pagination. */
|
|
120
|
-
onPagination?: (props:
|
|
121
|
-
currentPage: number;
|
|
122
|
-
}) => void;
|
|
108
|
+
onPagination?: (props: TablePaginationType) => void;
|
|
123
109
|
/** Causes the 'more' menu to appear on the right of the row. An array of objects that describe functions that impact the entire row (delete, resend, etc). See `TableOptionType` below. Note: Edit is activated by `onEdit` */
|
|
124
110
|
options?: Array<TableOptionType>;
|
|
125
111
|
/** Which page to display for pagination. Required for external pagination. */
|
|
@@ -249,6 +235,17 @@ export interface OptionClickResponseType {
|
|
|
249
235
|
row: RowType;
|
|
250
236
|
option: TableOptionType;
|
|
251
237
|
}
|
|
238
|
+
export interface TablePaginationType {
|
|
239
|
+
currentPage: number;
|
|
240
|
+
}
|
|
241
|
+
export interface TableFocusEventType {
|
|
242
|
+
event: FocusEvent<HTMLDivElement>;
|
|
243
|
+
row: RowType;
|
|
244
|
+
}
|
|
245
|
+
export interface TableMouseEventType {
|
|
246
|
+
event: MouseEvent<HTMLDivElement>;
|
|
247
|
+
row: RowType;
|
|
248
|
+
}
|
|
252
249
|
export interface AddRowResponseType {
|
|
253
250
|
isValid: boolean;
|
|
254
251
|
message?: string;
|
|
@@ -373,22 +370,10 @@ export interface RowProps {
|
|
|
373
370
|
highlightRowExtend?: number;
|
|
374
371
|
highlightTipColor?: string;
|
|
375
372
|
inactiveHeaderColor?: string;
|
|
376
|
-
mouseEnterRow?: (props:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
mouseLeaveRow?: (props: {
|
|
381
|
-
event: MouseEvent<HTMLDivElement>;
|
|
382
|
-
row: RowType;
|
|
383
|
-
}) => void;
|
|
384
|
-
onBlurRow?: (props: {
|
|
385
|
-
event: FocusEvent<HTMLDivElement>;
|
|
386
|
-
row: RowType;
|
|
387
|
-
}) => void;
|
|
388
|
-
onFocusRow?: (props: {
|
|
389
|
-
event: FocusEvent<HTMLDivElement>;
|
|
390
|
-
row: RowType;
|
|
391
|
-
}) => void;
|
|
373
|
+
mouseEnterRow?: (props: TableMouseEventType) => void;
|
|
374
|
+
mouseLeaveRow?: (props: TableMouseEventType) => void;
|
|
375
|
+
onBlurRow?: (props: TableFocusEventType) => void;
|
|
376
|
+
onFocusRow?: (props: TableFocusEventType) => void;
|
|
392
377
|
okButtonColorFamily: ButtonColorFamilyEnum;
|
|
393
378
|
row: RowType;
|
|
394
379
|
rowIndex: number;
|
package/lib/types/src/index.d.ts
CHANGED
|
@@ -178,7 +178,7 @@ export type { DialogHandlerPropsType } from "./components/SnackContainer";
|
|
|
178
178
|
export type { SsnInputType, InlineSsnInputType } from "./components/SsnInput";
|
|
179
179
|
export type { StatusIndicatorType } from "./components/StatusIndicator";
|
|
180
180
|
export type { CompletedStepsType, StepType, StepperType } from "./components/Stepper";
|
|
181
|
-
export type { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType, TableOptionLabelType, TableOptionType, TableType, } from "./components/Table";
|
|
181
|
+
export type { ActiveFiltersType, AddRowResponseType, CalcRowBackgroundProps, ColumnType, ComponentWrapperType, DynamicOptionsProps, EditRowValidationMessageType, EditSelectLabelFilterType, EditSelectOptionsFilterType, FilterFunctionResponseType, HeaderComponentWrapperType, IsRowClickableType, OptionClickResponseType, RowType, SortRowsPropsType, TableFocusEventType, TableMouseEventType, TableOptionLabelType, TableOptionType, TablePaginationType, TableType, } from "./components/Table";
|
|
182
182
|
export type { TabModalType, TabModalTabType } from "./components/TabModal";
|
|
183
183
|
export type { InlineTextareaType, TextareaType } from "./components/Textarea";
|
|
184
184
|
export type { TextLinkType } from "./components/TextLink";
|