@redsift/table 9.1.0 → 9.2.0-muiv5

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 +16 -3
  2. package/index.js +4740 -698
  3. package/index.js.map +1 -1
  4. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
- import { GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputMultipleValue, DataGridProProps, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
3
- export * from '@mui/x-data-grid-pro';
2
+ import { GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputMultipleValue, DataGridProProps, GridToolbarExportProps, GridToolbarFilterButtonProps, GridFilterModel, 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';
4
4
  import { Comp, IconProps, NotificationsColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
5
5
  import React, { ReactNode, RefObject, ComponentProps } from 'react';
6
6
 
@@ -9,7 +9,7 @@ declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any,
9
9
  declare const IS_BETWEEN: {
10
10
  label: string;
11
11
  value: string;
12
- getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams<any, any>) => boolean) | null;
12
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
13
13
  InputComponent: (props: any) => JSX.Element;
14
14
  };
15
15
 
@@ -63,13 +63,23 @@ interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<Da
63
63
  toolbar?: ReactNode;
64
64
  /** Whether the Toolbar is displayed or not. */
65
65
  hideToolbar?: boolean;
66
+ /** Indicates how to display pagination. */
67
+ paginationPlacement?: 'top' | 'bottom' | 'both' | 'none';
66
68
  }
69
+
67
70
  type StyledDataGridProps = {
68
71
  $height?: string;
69
72
  };
70
73
 
71
74
  declare const DataGrid: Comp<DataGridProps, HTMLDivElement>;
72
75
 
76
+ interface FilterConfig {
77
+ columns: object[];
78
+ typeOperators: object;
79
+ notes: string;
80
+ openaiApiKey: string | undefined;
81
+ }
82
+
73
83
  type GridToolbarColumnsProps = Omit<typeof GridToolbarColumnsButton, 'ref'>;
74
84
  type GridToolbarDensityProps = Omit<typeof GridToolbarDensitySelector, 'ref'>;
75
85
  interface ToolbarProps {
@@ -97,6 +107,9 @@ interface ToolbarProps {
97
107
  hasExportButton?: boolean;
98
108
  /** Whether the filter button is displayed or not. */
99
109
  hasFilterButton?: boolean;
110
+ /** Configuration object for NLP filter. undefined if disabled. */
111
+ nlpFilterConfig?: FilterConfig;
112
+ onFilterModelChange?: (filterModel: GridFilterModel) => void;
100
113
  }
101
114
 
102
115
  /**