@redsift/table 10.8.2-muiv5 → 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 +44 -7
  2. package/index.js +1277 -303
  3. package/index.js.map +1 -1
  4. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
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';
3
- export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } 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
+ export * from '@mui/x-data-grid-pro';
4
+ export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
4
5
  import { Theme, Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
5
6
  import React, { ReactNode, ComponentProps, RefObject } from 'react';
6
7
  import { TablePaginationProps } from '@mui/material';
@@ -10,12 +11,26 @@ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any,
10
11
  declare const IS_BETWEEN: {
11
12
  label: string;
12
13
  value: string;
13
- getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
14
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
14
15
  InputComponent: (props: any) => JSX.Element;
15
16
  };
16
17
 
17
18
  declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
18
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
+
19
34
  declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
20
35
 
21
36
  declare const CONTAINS_ANY_OF: {
@@ -61,6 +76,18 @@ declare const STARTS_WITH_ANY_OF: {
61
76
 
62
77
  declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
63
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
+
64
91
  declare function getCompletion(text: string, role: string, openai_api_key: string | undefined, model?: string): Promise<string>;
65
92
 
66
93
  interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
@@ -78,6 +105,16 @@ interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<Da
78
105
  paginationProps?: Omit<TablePaginationProps, 'component' | 'count' | 'page' | 'onPageChange' | 'rowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'paginationMode'>;
79
106
  /** Theme. */
80
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>;
81
118
  }
82
119
  type SelectionStatus = {
83
120
  type: 'page' | 'table' | 'other' | 'none';
@@ -95,12 +132,12 @@ type StyledDataGridProps = {
95
132
  declare const DataGrid: Comp<DataGridProps, HTMLDivElement>;
96
133
 
97
134
  interface CompletionResponseItem {
98
- columnField: string;
99
- operatorValue: string;
135
+ field: string;
136
+ operator: string;
100
137
  value?: string;
101
138
  }
102
139
  type CompletionResponse = {
103
- linkOperator: 'and' | 'or';
140
+ logicOperator: 'and' | 'or';
104
141
  items: CompletionResponseItem[];
105
142
  };
106
143
  interface LocaleText {
@@ -215,4 +252,4 @@ interface TextCellProps extends ComponentProps<'div'> {
215
252
  */
216
253
  declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
217
254
 
218
- 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 };