@redsift/table 10.8.2 → 11.0.0-alpha.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.
Files changed (4) hide show
  1. package/index.d.ts +38 -2
  2. package/index.js +1174 -178
  3. package/index.js.map +1 -1
  4. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
- import { GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputMultipleValue, DataGridProProps, GridFilterModel, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
2
+ import { GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputMultipleValue, DataGridProProps, GridPinnedColumns, GridFilterModel, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
3
3
  export * from '@mui/x-data-grid-pro';
4
4
  export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
5
5
  import { Theme, Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
@@ -17,6 +17,20 @@ declare const IS_BETWEEN: {
17
17
 
18
18
  declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
19
19
 
20
+ declare const DOES_NOT_EQUAL: {
21
+ label: string;
22
+ value: string;
23
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
24
+ InputComponent: typeof GridFilterInputValue;
25
+ };
26
+
27
+ declare const DOES_NOT_CONTAIN: {
28
+ label: string;
29
+ value: string;
30
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
31
+ InputComponent: typeof GridFilterInputValue;
32
+ };
33
+
20
34
  declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
21
35
 
22
36
  declare const CONTAINS_ANY_OF: {
@@ -62,6 +76,18 @@ declare const STARTS_WITH_ANY_OF: {
62
76
 
63
77
  declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
64
78
 
79
+ declare const operatorList: {
80
+ string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
81
+ number: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
82
+ boolean: _mui_x_data_grid_pro.GridFilterOperator<any, boolean | null, any>[];
83
+ date: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
84
+ dateTime: _mui_x_data_grid_pro.GridFilterOperator<any, Date, any>[];
85
+ singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
86
+ rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
87
+ rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
88
+ rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
89
+ };
90
+
65
91
  declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
66
92
 
67
93
  interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
@@ -79,6 +105,16 @@ interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<Da
79
105
  paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
80
106
  /** Theme. */
81
107
  theme?: Theme;
108
+ /** If set, the DataGrid configuration will be stored and synced in the URL and the local storage. useRouter prop should be defined. */
109
+ isStateful?: boolean;
110
+ /** Hook returning pathname, search params and a method to update query params. Used in stateful mode only. */
111
+ useRouter?: () => {
112
+ pathname: string;
113
+ search: string;
114
+ historyReplace: (newSearch: string) => void;
115
+ };
116
+ /** Pinned custom columns. */
117
+ pinnedCustomColumns?: Required<GridPinnedColumns>;
82
118
  }
83
119
  type SelectionStatus = {
84
120
  type: 'page' | 'table' | 'other' | 'none';
@@ -216,4 +252,4 @@ interface TextCellProps extends ComponentProps<'div'> {
216
252
  */
217
253
  declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
218
254
 
219
- export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, CompletionResponse, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, SelectionStatus, StyledDataGridProps, TextCell, Toolbar, getCompletion, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
255
+ export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, CompletionResponse, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, SelectionStatus, StyledDataGridProps, TextCell, Toolbar, getCompletion, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators, operatorList };